initial import
[vuplus_webkit] / Source / WebKit / mac / ChangeLog-2010-01-29
1 2010-01-29  Mark Rowe  <mrowe@apple.com>
2
3         Fix the Mac build.
4
5         Disable ENABLE_INDEXED_DATABASE since it is "completely non-functional".
6
7         As the comment in FeatureDefines.xcconfig notes, the list of feature defines
8         needs to be kept in sync across the various files.  The default values also
9         need to be kept in sync between these files and build-webkit.
10
11         * Configurations/FeatureDefines.xcconfig:
12
13 2010-01-29  Alexey Proskuryakov  <ap@apple.com>
14
15         Reviewed by Dan Bernstein.
16
17         <rdar://problem/7441982> REGRESSION (TOT): Adobe CS4: Installer alerts are displayed as
18         blank windows
19
20         * WebView/WebView.mm:
21         (shouldEnableLoadDeferring): Load deferring is enabled unless the application is Adobe
22         Installer.
23         (-[WebView _preferencesChangedNotification:]): Call setLoadDeferringEnabled().
24
25 2010-01-28  Enrica Casucci  <enrica@apple.com>
26
27         Reviewed by Maciej Stachowiak.
28
29         Huge plain text pastes are slow
30         <rdar://problem/5195056>
31         https://bugs.webkit.org/show_bug.cgi?id=34237
32
33         Mail is ignoring the fragment created from plain text or HTML that is
34         passed to the delegate function, that creates a new one.
35         This fix avoids creating the fragment twice.
36
37         * WebView/WebHTMLView.mm:
38         (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
39
40 2010-01-25  Anders Carlsson  <andersca@apple.com>
41
42         Featureless build fixes.
43
44         * Misc/WebCache.mm:
45         (+[WebCache empty]):
46         * WebCoreSupport/WebApplicationCache.mm:
47         * WebCoreSupport/WebChromeClient.h:
48         * WebView/WebDataSource.mm:
49         (-[WebDataSource _transferApplicationCache:]):
50         * WebView/WebFrame.mm:
51         (-[WebFrame _cacheabilityDictionary]):
52         * WebView/WebView.mm:
53         (WebKitInitializeApplicationCachePathIfNecessary):
54         (-[WebView _close]):
55         * WebView/WebViewData.mm:
56         (-[WebViewPrivate dealloc]):
57         (-[WebViewPrivate finalize]):
58
59 2010-01-25  Steve Falkenburg  <sfalken@apple.com>
60
61         Reviewed by Simon Fraser.
62
63         A WebGeolocationControllerClient is leaked for every WebView
64         https://bugs.webkit.org/show_bug.cgi?id=34145
65
66         * WebCoreSupport/WebGeolocationControllerClient.h:
67         * WebCoreSupport/WebGeolocationControllerClient.mm:
68         (WebGeolocationControllerClient::geolocationDestroyed):
69
70 2010-01-22  Steve Falkenburg  <sfalken@apple.com>
71
72         Reviewed by Darin Adler.
73
74         https://bugs.webkit.org/show_bug.cgi?id=34025
75         Enable client-based Geolocation abstraction for Mac, Windows AppleWebKit targets.
76
77         * Configurations/FeatureDefines.xcconfig:
78
79 2010-01-22  Brady Eidson  <beidson@apple.com>
80
81         Reviewed by Adele Peterson.
82
83         [WebFrame loadRequest:] does not null check the WebCore::Frame
84         <rdar://problem/7416286> and https://bugs.webkit.org/show_bug.cgi?id=34021
85
86         * WebView/WebFrame.mm:
87         (-[WebFrame loadRequest:]): Null check the WebCore::Frame as it can disappear
88           out of underneath a WebFrame.
89
90 2010-01-22  Peter Kasting  <pkasting@google.com>
91
92         Reviewed by David Hyatt.
93
94         When scrolling by page, hold back 1/8th of the visible size instead of
95         40 px.
96         https://bugs.webkit.org/show_bug.cgi?id=32595
97
98         * WebView/WebFrameView.mm:
99         (-[WebFrameView _verticalPageScrollDistance]):
100         (-[WebFrameView initWithFrame:]):
101         (-[WebFrameView _horizontalPageScrollDistance]):
102
103 2010-01-20  Jian Li  <jianli@chromium.org>
104
105         Reviewed by Dmitry Titov.
106
107         Implement File and Blob interfaces as defined in File API spec.
108         https://bugs.webkit.org/show_bug.cgi?id=32912
109
110         * MigrateHeaders.make:
111
112 2010-01-19  Timothy Hatcher  <timothy@apple.com>
113
114         Fix erroneous page scrolls when trying to select text or use form elements
115         with the Web Inspector docked.
116
117         http://webkit.org/b/24403
118         rdar://problem/6753925
119
120         Reviewed by John Sullivan and Darin Adler.
121
122         * WebCoreSupport/WebChromeClient.mm:
123         (WebChromeClient::scrollRectIntoView): The scrollRect.move() call was
124         incorrectly converting the rect under the assumption that the frame view
125         is the same size as the WebView. Using convertRect:fromView: instead
126         is enough to fix the bug, but that code isn't needed since WebCore
127         already takes care of scrolling the main frame's document view, so it
128         was redundant to do it here too.
129
130 2010-01-20  Steve Falkenburg  <sfalken@apple.com>
131
132         Reviewed by Darin Adler and Adam Roben.
133
134         Feature defines are difficult to maintain on Windows builds
135         https://bugs.webkit.org/show_bug.cgi?id=33883
136
137         * Configurations/FeatureDefines.xcconfig: Add comments about keeping feature definitions in sync.
138
139 2010-01-20  Dan Bernstein  <mitz@apple.com>
140
141         Reviewed by Simon Fraser.
142
143         <rdar://problem/7489504> Clicking on an overflow scrollbar when the window doesn't have
144         focus only focuses the window; it should start scrolling too
145         https://bugs.webkit.org/show_bug.cgi?id=33906
146
147         * Misc/WebElementDictionary.mm:
148         (+[WebElementDictionary initializeLookupTable]): Initialize WebElementIsInScrollBarKey.
149         (-[WebElementDictionary _isInScrollBar]): Added. Returns whether the HitTestResult contains
150         a scroll bar.
151         * WebView/WebHTMLView.mm:
152         (-[WebHTMLView _isScrollBarEvent:]): Added. Returns whether the event point is in a scroll
153         bar in this view.
154         (-[WebHTMLView acceptsFirstMouse:]): Accept scroll bar events.
155         * WebView/WebView.mm: Define WebElementIsInScrollBarKey.
156         * WebView/WebViewPrivate.h: Declare WebElementIsInScrollBarKey.
157
158 2010-01-19  Dan Bernstein  <mitz@apple.com>
159
160         Redo Tiger build fix without making WebTypesInternal.h a private header
161
162         * WebView/WebHTMLRepresentation.h: Define and use WebNSUInteger.
163         * WebView/WebHTMLRepresentation.mm: Import WebTypesInternal.h.
164
165 2009-12-18  Anders Carlsson  <andersca@apple.com>
166
167         Reviewed by Dan Bernstein.
168
169         <rdar://problem/7068584> Crash at NetscapePluginHostProxy::processRequests
170
171         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
172         (WebKit::NetscapePluginInstanceProxy::waitForReply): Wrapped with calls
173         to willCallPluginFunction/didCallPluginFunction. This prevents the plug-in
174         from being stopped while waiting for reply.
175         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
176         (WebKit::NetscapePluginInstanceProxy::createBindingsInstance): Protect the
177         instance proxy in case the plug-in host crashes while waiting for reply.
178         * Plugins/Hosted/ProxyInstance.h:
179         (WebKit::ProxyInstance::waitForReply): Added. Calls through to
180         NetscapePluginInstanceProxy::waitForReply(), but returns a null reply if the
181         proxy gets invalidated while waiting for the reply.
182         * Plugins/Hosted/ProxyInstance.mm:
183         (WebKit::ProxyInstance::invoke): Use ProxyInstance::waitForReply().
184         (WebKit::ProxyInstance::supportsInvokeDefaultMethod): Ditto.
185         (WebKit::ProxyInstance::supportsConstruct): Ditto.
186         (WebKit::ProxyInstance::getPropertyNames): Ditto.
187         (WebKit::ProxyInstance::methodsNamed): Ditto.
188         (WebKit::ProxyInstance::fieldNamed): Ditto.
189         (WebKit::ProxyInstance::fieldValue): Ditto.
190         (WebKit::ProxyInstance::setFieldValue): Ditto.
191
192 2010-01-19  John Sullivan  <sullivan@apple.com>
193
194         Tiger build fix.
195         
196         * WebView/WebHTMLRepresentation.h:
197         Added #import for WebTypesInternal.h so NSUInteger will be defined on Tiger.
198
199 2010-01-19  Brian Weinstein  <bweinstein@apple.com>
200
201         Reviewed by Tim Hatcher.
202
203         Part of <http://webkit.org/b/28622>.
204         Caught exceptions still pause the debugger.
205         
206         Update WebScriptDebugger::exception to have the hasHandler parameter.
207         
208         This just adds a new parameter, no behavior is changed.
209
210         * WebView/WebScriptDebugger.h:
211         * WebView/WebScriptDebugger.mm:
212         (WebScriptDebugger::exception):
213
214 2010-01-19  Jon Honeycutt  <jhoneycutt@apple.com>
215
216         MSAA: The child <option> elements of a non-multiple <select> are not
217         exposed
218
219         https://bugs.webkit.org/show_bug.cgi?id=33773
220         <rdar://problem/7550556>
221
222         * WebCoreSupport/WebViewFactory.mm:
223         (-[WebViewFactory AXMenuListPopupActionVerb]):
224         Stubbed.
225         (-[WebViewFactory AXMenuListActionVerb]):
226         Stubbed.
227
228 2010-01-19  John Sullivan  <sullivan@apple.com>
229
230         https://bugs.webkit.org/show_bug.cgi?id=33854
231         Would like a variant of WebHTMLRepresentation's searchForLabelsBeforeElement that returns 
232         more info about where the result was found
233
234         Reviewed by Darin Adler
235
236         * WebView/WebHTMLRepresentation.h:
237         Declare -searchForLabels:beforeElement:resultDistance:resultIsInCellAbove.
238         
239         * WebView/WebHTMLRepresentation.mm:
240         (-[WebHTMLRepresentation searchForLabels:beforeElement:]):
241         Now calls through to searchForLabels:beforeElement:resultDistance:resultIsInCellAbove.
242         (-[WebHTMLRepresentation searchForLabels:beforeElement:resultDistance:resultIsInCellAbove:]):
243         New method, calls through to WebCore.
244
245 2010-01-19  Dave Hyatt  <hyatt@apple.com>
246
247         Reviewed by Adam Roben.
248
249         Add an API to obtain the WebScriptWorld for a given JSGlobalContextRef.
250
251         * WebView/WebScriptWorld.h:
252         * WebView/WebScriptWorld.mm:
253         (+[WebScriptWorld scriptWorldForGlobalContext:]):
254
255 2010-01-19  Steve Block  <steveblock@google.com>
256
257         Unreviewed build fix.
258
259         Fixes Snow Leopard build due to http://trac.webkit.org/changeset/53464
260
261         * Plugins/Hosted/WebHostedNetscapePluginView.mm: Modified. Import <WebCore/Bridge.h>
262
263 2010-01-19  Steve Block  <steveblock@google.com>
264
265         Reviewed by Adam Barth.
266
267         Renames WebCore/bridge/runtime.[cpp|h] to WebCore/bridge/Bridge.[cpp|h]
268         https://bugs.webkit.org/show_bug.cgi?id=33801
269
270         * Plugins/Hosted/ProxyInstance.h:
271
272 2010-01-18  Enrica Casucci  <enrica@apple.com>
273
274         Reviewed by Darin Adler.
275
276         Script attributes are copied and pasted, making cross-domain attacks possible (30019)
277         <rdar://problem/6008809>
278         https://bugs.webkit.org/show_bug.cgi?id=30019
279
280         * WebView/WebFrame.mm:
281         (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Modified the call to createMarkupString.
282
283 2010-01-18  Steve Falkenburg  <sfalken@apple.com>
284
285         Rubber-stamped by Sam Weinig.
286
287         Add missing export for Geolocation.
288
289         * WebKit.exp:
290
291 2010-01-18  Adam Roben  <aroben@apple.com>
292
293         Add +[WebView _setDomainRelaxationForbidden:forURLScheme:]
294
295         WebKit/mac part of fixing <http://webkit.org/b/33806>
296         <rdar://problem/7552837> Would like API to disallow setting of
297         document.domain for pages with certain URL schemes
298
299         Reviewed by Sam Weinig.
300
301         * WebView/WebView.mm:
302         (+[WebView _setDomainRelaxationForbidden:forURLScheme:]):
303         * WebView/WebViewPrivate.h:
304         Added. Calls through to SecurityOrigin.
305
306 2010-01-16  Maciej Stachowiak  <mjs@apple.com>
307
308         Reviewed by Oliver Hunt.
309
310         Cache JS string values made from DOM strings (Dromaeo speedup)
311         https://bugs.webkit.org/show_bug.cgi?id=33768
312         <rdar://problem/7353576>
313         
314         * Plugins/Hosted/ProxyInstance.mm:
315         (WebKit::ProxyInstance::stringValue): Explicitly make a String, since char*
316         is now ambiguous.
317
318 2010-01-13  Simon Fraser  <simon.fraser@apple.com>
319
320         Reviewed by Darin Adler.
321
322         <rdar://problem/7532544>
323         
324         Expose new method on WebKitSystemInterface, WKGetUserToBaseCTM(), which will
325         be used for a shadow drawing fix.
326
327         * WebCoreSupport/WebSystemInterface.m:
328         (InitWebCoreSystemInterface):
329
330 2010-01-13  Kevin Decker  <kdecker@apple.com>
331
332         Reviewed by Mark Rowe.
333
334         https://bugs.webkit.org/show_bug.cgi?id=33610
335         <rdar://problem/7288546> Silverlight full screen performance problem seen on Snow Leopard.
336         
337         * Plugins/WebNetscapePluginView.mm:
338         (-[WebNetscapePluginView _workaroundSilverlightFullScreenBug:]): Added. Work around Silverlight full screen
339          performance issue by maintaining an accelerated GL pixel format. We can safely remove this at some point in
340          the future when both Microsoft releases a genuine fix for 7288546 and enough Silverlight users update to the
341          new Silverlight. For now, we'll distinguish older broken versions of Silverlight by asking the plug-in if it
342          resolved its full screen badness.
343         (-[WebNetscapePluginView _createPlugin]): Call _workaroundSilverlightFullScreenBug:YES if this is Silverlight.
344         (-[WebNetscapePluginView _destroyPlugin]): Call _workaroundSilverlightFullScreenBug:NO if this is Silverlight.
345
346 2010-01-11  Mark Rowe  <mrowe@apple.com>
347
348         Reviewed by Darin Adler.
349
350         <rdar://problem/7512726> Flash full-screen does not work correctly with Flash 10.1 beta
351
352         Explicitly track when the plug-in shows and hides a full-screen window to determine
353         whether a plug-in is currently full-screen, rather than relying on menu bar visibility.
354         This ensures that we activate the plug-in host process and client application as
355         appropriate when the plug-in enters or exits full-screen.
356
357         * Plugins/Hosted/NetscapePluginHostProxy.h:
358         (WebKit::NetscapePluginHostProxy::isFullScreenWindowShowing):
359         * Plugins/Hosted/NetscapePluginHostProxy.mm:
360         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
361         (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
362         (WebKit::NetscapePluginHostProxy::didEnterFullScreen):
363         (WebKit::NetscapePluginHostProxy::didExitFullScreen):
364         (WebKit::NetscapePluginHostProxy::setFullScreenWindowIsShowing):
365         (WKPCSetMenuBarVisible):
366         (WKPCSetFullScreenWindowIsShowing):
367         * Plugins/Hosted/WebKitPluginClient.defs:
368
369 2010-01-11  Simon Fraser  <simon.fraser@apple.com>
370
371         Reviewed by Kevin Decker.
372
373         https://bugs.webkit.org/show_bug.cgi?id=33455
374         Allows plugins to participate in accelerated compositing
375
376         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
377         (-[WebHostedNetscapePluginView createPlugin]):
378         * Plugins/WebNetscapePluginView.mm:
379         (-[WebNetscapePluginView createPlugin]): If accelerated compositing is
380         available, don't use a layer-backed NSView for plugins. Instead, tickle the
381         accelerated compositing code via setNeedsStyleRecalc(SyntheticStyleChange),
382         which will parent the plugin's layer in the accelerated compositing layer
383         tree.
384
385 2010-01-09  Adam Barth  <abarth@webkit.org>
386
387         Reviewed by Darin Adler.
388
389         ScriptController::isEnabled needs to be renamed
390         https://bugs.webkit.org/show_bug.cgi?id=32063
391
392         Rename ScriptController::isEnabled to
393         ScriptController::canExecuteScripts.
394
395         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
396         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
397         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
398
399 2010-01-07  Daniel Bates  <dbates@rim.com>
400
401         Reviewed by Eric Seidel.
402
403         https://bugs.webkit.org/show_bug.cgi?id=32987
404
405         Added ENABLE_XHTMLMP flag. Disabled by default.
406
407         * Configurations/FeatureDefines.xcconfig:
408
409 2010-01-07  Alexey Proskuryakov  <ap@apple.com>
410
411         More build fix.
412
413         * WebKitPrefix.h: Define JS_EXPORTCLASS here, as well (as empty).
414
415 2010-01-07  Maciej Stachowiak  <mjs@apple.com>
416
417         Reviewed by Simon Fraser.
418
419         REGRESSION (r48075): Clicking and dragging in a widget's text field doesn't create a selection; drags widget instead ( Translation, Weather, Ski Report )
420         https://bugs.webkit.org/show_bug.cgi?id=33348
421         <rdar://problem/7310616>
422         
423         * WebView/WebView.mm:
424         (-[WebView _preferencesChangedNotification:]): We only want to
425         handle file: URLs for the user stylesheet now, so special-case the
426         DashboardClient's funky user stylesheet URL by mapping it to the
427         equivalent file URL.
428
429 2010-01-07  Kevin Decker  <kdecker@apple.com>
430
431         Reviewed by Simon Fraser.
432
433         https://bugs.webkit.org/show_bug.cgi?id=33331   
434         (WebHostedNetscapePluginView should pass acceleratedCompositingEnabled bool to NetscapePluginHostManager when instantiating plug-ins)
435         
436         * Plugins/Hosted/NetscapePluginHostManager.h: Modify method signature for instantiatePlugin to include acceleratedCompositingEnabled bool.
437         * Plugins/Hosted/NetscapePluginHostManager.mm:
438         (WebKit::NetscapePluginHostManager::instantiatePlugin):
439         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
440         (-[WebHostedNetscapePluginView createPlugin]): Pass accelerated compositing status to NetscapePluginHostManage
441
442 2010-01-06  Kevin Decker  <kdecker@apple.com>
443
444         Reviewed by Simon Fraser.
445
446         Third step of:
447         <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism
448
449         * Plugins/WebNetscapePluginView.mm:
450         (-[WebNetscapePluginView getVariable:value:]): Add case for WKNVSupportsCompositingCoreAnimationPluginsBool.
451
452 2010-01-06  Kevin Decker  <kdecker@apple.com>
453
454         Reviewed by Simon Fraser.
455
456         Second step of:
457         <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism
458
459         * Plugins/Hosted/WebHostedNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
460         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
461         (-[WebHostedNetscapePluginView pluginLayer]): Added.
462         * Plugins/WebNetscapePluginView.h: Expose the CALayer of the plugin by adding -pluginLayer method.
463         * Plugins/WebNetscapePluginView.mm:
464         (-[WebNetscapePluginView pluginLayer]): Added.
465
466 2010-01-06  Kevin Decker  <kdecker@apple.com>
467
468         Reviewed by Eric Carlson.
469
470         First step toward:
471         <rdar://problem/6398111> Integrate hardware layers with out-of-process plug-ins layer hosting mechanism
472         
473         Small refactoring moving the PluginWidget class from WebKit to WebCore.
474
475         * WebCoreSupport/WebFrameLoaderClient.mm: Use the WebCore version of PluginWidget.
476
477 2010-01-05  Dan Bernstein  <mitz@apple.com>
478
479         Reviewed by Mark Rowe.
480
481         Re-enable plug-in halting on Mac after r51953
482
483         * WebCoreSupport/WebPluginHalterClient.mm:
484         (WebPluginHalterClient::enabled): Test for the correct selector.
485
486 2010-01-04  Dan Bernstein  <mitz@apple.com>
487
488         Reviewed by Ada Chan and Mark Rowe.
489
490         Updated copyright string
491
492         * Info.plist:
493
494 2009-12-27  Maciej Stachowiak  <mjs@apple.com>
495
496         Reviewed by Alexey Proskuryakov.
497
498         plugins/get-url-with-iframe-target.html fails on SnowLeopard (64-bit)
499         https://bugs.webkit.org/show_bug.cgi?id=32982
500         
501         This test has been failing on SnowLeopard since it was landed.
502         
503         The problem is that we never delivered the notification for
504         NPN_GetURLNotify, in the frame-targeting case, for out-of-process
505         plugins on Mac.
506         
507         I implemented support for this based on how in-process Mac plugins
508         do it.
509
510         * Plugins/Hosted/HostedNetscapePluginStream.h:
511         * Plugins/Hosted/HostedNetscapePluginStream.mm:
512         (WebKit::HostedNetscapePluginStream::reasonForError):
513         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
514         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
515         (WebKit::NetscapePluginInstanceProxy::PluginRequest::create):
516         (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
517         (WebKit::NetscapePluginInstanceProxy::destroy):
518         (WebKit::NetscapePluginInstanceProxy::performRequest):
519         (WebKit::NetscapePluginInstanceProxy::webFrameDidFinishLoadWithReason):
520         (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
521         (WebKit::NetscapePluginInstanceProxy::loadRequest):
522         * Plugins/Hosted/WebHostedNetscapePluginView.h:
523         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
524         (-[WebHostedNetscapePluginView webFrame:didFinishLoadWithReason:]):
525         (-[WebHostedNetscapePluginView webFrame:didFinishLoadWithError:]):
526
527 2009-12-22  Darin Adler  <darin@apple.com>
528
529         Reviewed by Mark Rowe.
530
531         Turn off datagrid by default, at least for all platforms Apple ships.
532         The datagrid implementation isn't ready for general web use yet.
533
534         * Configurations/FeatureDefines.xcconfig: Turn off datagrid by default.
535
536 2009-12-21  Mark Rowe  <mrowe@apple.com>
537
538         Reviewed by Sam Weinig.
539
540         Don't allocate a WebGeolocationControllerClient unless that compile-time setting is enabled.
541
542         * WebView/WebView.mm:
543         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
544
545 2009-12-18  Sam Weinig  <sam@webkit.org>
546
547         Reviewed by Dan Bernstein.
548
549         Add Mac WebKit side of the client based geolocation provider.
550
551         * Misc/WebKitErrors.m:
552         (registerErrors): Add Geolocation errors.
553         * Misc/WebKitErrorsPrivate.h:
554         * WebCoreSupport/WebGeolocationControllerClient.h: Added.
555         (WebGeolocationControllerClient::webView):
556         * WebCoreSupport/WebGeolocationControllerClient.mm: Added.
557         (WebGeolocationControllerClient::WebGeolocationControllerClient):
558         (WebGeolocationControllerClient::startUpdating):
559         (WebGeolocationControllerClient::stopUpdating):
560         (WebGeolocationControllerClient::lastPosition):
561         Add implementation of the WebGeolocationControllerClient.
562
563         * WebView/WebGeolocationPosition.h: Added.
564         * WebView/WebGeolocationPosition.mm: Added.
565         (-[WebGeolocationPositionInternal initWithCoreGeolocationPosition:]):
566         (core):
567         (-[WebGeolocationPosition initWithTimestamp:latitude:longitude:accuracy:]):
568         * WebView/WebGeolocationPositionInternal.h: Added.
569         Add an Objective-C wrapper for GeolocationPosition.
570  
571         * WebView/WebView.mm:
572         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Set the GeolocationControllerClient.
573         (-[WebView _setGeolocationProvider:]): Set the GeolocationProvider
574         (-[WebView _geolocationProvider]): Return the GeolocationProvider.
575         (-[WebView _geolocationDidChangePosition:]): Notify WebCore that the position changed.
576         (-[WebView _geolocationDidFailWithError:]): Notify WebCore that an error occured.
577         * WebView/WebViewData.h:
578         * WebView/WebViewPrivate.h:
579
580 2009-12-18  Eric Seidel  <eric@webkit.org>
581
582         Reviewed by Adam Barth.
583
584         REGRESSION(52325) Chromium build broken due to link failure
585         https://bugs.webkit.org/show_bug.cgi?id=32753
586
587         * WebCoreSupport/WebSystemInterface.m:
588          - Chromium Mac builds use this file, but do not
589            enable Pre-compiled Header (PCH) files so that
590            Chromium build bots can take advantage of the faster
591            distcc 3.  Eventually all mac builds will likely use
592            distcc, but for now we'll add Platform.h here and document
593            its usage so it's not removed by accident.
594
595 2009-12-18  Sam Weinig  <sam@webkit.org>
596
597         Reviewed by Anders Carlsson.
598
599         Fix preference key name.
600
601         * WebView/WebPreferenceKeysPrivate.h:
602
603 2009-12-18  Anders Carlsson  <andersca@apple.com>
604
605         Reviewed by Sam Weinig.
606
607         Pass preference to plug-in host.
608
609         * Plugins/Hosted/NetscapePluginHostManager.mm:
610         (WebKit::NetscapePluginHostManager::spawnPluginHost):
611
612 2009-12-18  Anders Carlsson  <andersca@apple.com>
613
614         Reviewed by Sam Weinig.
615
616         Add WKPCRunSyncOpenPanel implementation.
617
618         * Plugins/Hosted/NetscapePluginHostProxy.mm:
619         (WKPCRunSyncOpenPanel):
620         * Plugins/Hosted/WebKitPluginClient.defs:
621         * Plugins/Hosted/WebKitPluginHost.defs:
622
623 2009-12-18  Anders Carlsson  <andersca@apple.com>
624
625         Reviewed by Sam Weinig.
626
627         Add a useProxiedOpenPanel WebPreference and tunnel it through to the plug-in host.
628
629         * Plugins/Hosted/NetscapePluginHostManager.h:
630         * Plugins/Hosted/NetscapePluginHostManager.mm:
631         (WebKit::NetscapePluginHostManager::hostForPackage):
632         (WebKit::NetscapePluginHostManager::spawnPluginHost):
633         (WebKit::NetscapePluginHostManager::instantiatePlugin):
634         * WebView/WebPreferenceKeysPrivate.h:
635         * WebView/WebPreferences.mm:
636         (+[WebPreferences initialize]):
637         (-[WebPreferences usesProxiedOpenPanel]):
638         (-[WebPreferences setUsesProxiedOpenPanel:]):
639         * WebView/WebPreferencesPrivate.h:
640
641 2009-12-18  Sam Weinig  <sam@webkit.org>
642
643         Reviewed by Anders Carlsson.
644
645         Update WebKitSystemInterface for <rdar://problem/7237059>.        
646
647         * WebCoreSupport/WebSystemInterface.m:
648         (InitWebCoreSystemInterface):
649
650 2009-12-18  Adam Roben  <aroben@apple.com>
651
652         Add #includes needed after WebCore clean-up
653
654         Rubber-stamped by Anders Carlsson.
655
656         Fixes <http://webkit.org/b/32718>.
657
658         * WebView/WebFrame.mm:
659         * WebView/WebFrameView.mm:
660         * WebView/WebView.mm:
661
662 2009-12-17  Adam Roben  <aroben@apple.com>
663
664         Mac build fix
665
666         * WebView/WebVideoFullscreenController.mm: Added now-needed #import.
667
668 2009-12-13  Sam Weinig  <sam@webkit.org>
669
670         Reviewed by Dan Bernstein.
671
672         Fix for https://bugs.webkit.org/show_bug.cgi?id=32499
673         Add client based Geolocation provider
674
675         Add first cut of a client based Geolocation provider. This is guarded by
676         ENABLE(CLIENT_BASED_GEOLOCATION) and is off by default for now. This adds a
677         GeolocationControllerClient interface that no-one currently implements,
678         but will in a subsequent patch.
679
680         * WebView/WebView.mm:
681         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
682
683 2009-12-10  Jon Honeycutt  <jhoneycutt@apple.com>
684
685         Mac build fix. Unreviewed.
686
687         Re-adds code that was mistakenly removed from my last patch.
688
689         * WebCoreSupport/WebPluginHalterClient.mm:
690         Add necessary #import.
691
692         * WebView/WebDelegateImplementationCaching.h:
693         Declare a new overload of CallUIDelegateReturningBoolean.
694
695         * WebView/WebDelegateImplementationCaching.mm:
696         (CallDelegateReturningBoolean):
697         Add a new overload with different arguments.
698         (CallUIDelegateReturningBoolean):
699         Ditto.
700
701 2009-12-10  Jon Honeycutt  <jhoneycutt@apple.com>
702
703         Pass more information about a plug-in to the PluginHalterDelegate
704
705         Reviewed by Adam Roben.
706
707         * Plugins/WebBaseNetscapePluginView.mm:
708         (WebHaltablePlugin::isWindowed):
709         Return false - the Mac doesn't really have windowed plug-ins.
710         (WebHaltablePlugin::pluginName):
711         Return the name from the plug-in package.
712
713         * WebCoreSupport/WebPluginHalterClient.h:
714         Update for new parameters.
715
716         * WebCoreSupport/WebPluginHalterClient.mm:
717         (WebPluginHalterClient::shouldHaltPlugin):
718         Ditto; pass them when making the delegate call.
719
720         * WebView/WebUIDelegatePrivate.h:
721         Update for new parameters.
722
723 2009-12-08  Simon Fraser  <simon.fraser@apple.com>
724
725         Reviewed by Dan Bernstein.
726
727         <rdar://problem/7295070> WebKit video fullscreen keeps playing after closing the window
728         
729         Fix a leak of the QTMovieView when exiting fullscreen video, and remove the
730         old workaround.
731
732         * WebView/WebVideoFullscreenController.mm:
733         (-[WebVideoFullscreenController windowDidLoad]): Set the movie view as the contentView directly.
734         (-[WebVideoFullscreenController setMediaElement:WebCore::]): Cast the contentView to a movie view.
735         (-[WebVideoFullscreenController windowDidExitFullscreen]): Remove the old workaround.
736
737 2009-12-08  Dmitry Titov  <dimich@chromium.org>
738
739         Rubber-stamped by David Levin.
740
741         Revert and reopen "Add asserts to RefCounted to make sure ref/deref happens on the right thread."
742         It may have caused massive increase of reported leaks on the bots.
743         https://bugs.webkit.org/show_bug.cgi?id=31639
744
745         * ForwardingHeaders/wtf/ThreadVerifier.h: Removed.
746
747 2009-12-08  Dmitry Titov  <dimich@chromium.org>
748
749         Reviewed by Darin Adler.
750
751         Add asserts to RefCounted to make sure ref/deref happens on the right thread.
752         https://bugs.webkit.org/show_bug.cgi?id=31639
753
754         * ForwardingHeaders/wtf/ThreadVerifier.h: Added.
755
756 2009-12-07  Dmitry Titov  <dimich@chromium.org>
757
758         Rubber-stamped by Darin Adler.
759
760         Remove ENABLE_SHARED_SCRIPT flags
761         https://bugs.webkit.org/show_bug.cgi?id=32245
762         This patch was obtained by "git revert" command and then un-reverting of ChangeLog files.
763
764         * Configurations/FeatureDefines.xcconfig:
765
766 2009-12-07  Simon Fraser  <simon.fraser@apple.com>
767
768         Reviewed by Darin Adler.
769
770         <rdar://problem/7450481> One compositing test keeps DRT in "compositing mode", breaks repaint tests
771
772         The counter that WebView used to keep track of the number of enclosed WebHTMLViews using
773         accelerated compositing was hard to manage, and maintained incorrectly in a number of cases.
774         This caused one compositing test make DumpRenderTree think that all subsequent tests
775         were compositing too.
776         
777         Replace this counter with notifications, which are only fired if a client (DRT) requests them. The
778         notification informs the client that a WebHTMLView entered compositing mode (or an already-
779         compositing WebHTML was added); it does not say when a view becomes uncomposited, or all
780         compositing subviews were removed, since this is tricky to get right.
781         
782         Change -[WebView _isUsingAcceleratedCompositing] to manually walk the frames, and
783         return YES if any document view is composited.
784
785         * WebKit.exp:
786         * WebView/WebHTMLView.mm:
787         (-[WebHTMLView close]):
788         (-[WebHTMLView viewDidMoveToSuperview]):
789         (-[WebHTMLView attachRootLayer:]):
790         (-[WebHTMLView detachRootLayer]):
791         * WebView/WebView.mm:
792         (+[WebView automaticallyNotifiesObserversForKey:]):
793         (-[WebView _postsAcceleratedCompositingNotifications]):
794         (-[WebView _setPostsAcceleratedCompositingNotifications:]):
795         (-[WebView _isUsingAcceleratedCompositing]):
796         * WebView/WebViewData.h:
797         * WebView/WebViewInternal.h:
798         * WebView/WebViewPrivate.h:
799
800 2009-12-07  Gavin Barraclough  <barraclough@apple.com>
801
802         Reviewed by Oliver Hunt.
803
804         https://bugs.webkit.org/show_bug.cgi?id=32184
805         Handle out-of-memory conditions with JSC Ropes with a JS exception, rather than crashing.
806         Switch from using fastMalloc to tryFastMalloc, pass an ExecState to record the exception on.
807
808         * WebView/WebView.mm:
809         (aeDescFromJSValue):
810
811 2009-12-07  Nikolas Zimmermann  <nzimmermann@rim.com>
812
813         Reviewed by Holger Hans Peter Freyther.
814
815         Turn on (SVG) Filters support, by default.
816         https://bugs.webkit.org/show_bug.cgi?id=32224
817
818         * Configurations/FeatureDefines.xcconfig: Enable FILTERS build flag.
819
820 2009-12-03  Brady Eidson  <beidson@apple.com>
821
822         Reviewed by Sam Weinig.
823
824         <rdar://problem/7214236> and http://webkit.org/b/32052 - Implement HTML5 state object history API
825
826         * WebCoreSupport/WebFrameLoaderClient.h:
827         * WebCoreSupport/WebFrameLoaderClient.mm:
828         (WebFrameLoaderClient::dispatchDidPushStateWithinPage):
829         (WebFrameLoaderClient::dispatchDidReplaceStateWithinPage):
830         (WebFrameLoaderClient::dispatchDidPopStateWithinPage):
831         * WebView/WebDelegateImplementationCaching.h:
832         * WebView/WebFrameLoadDelegatePrivate.h:
833         * WebView/WebView.mm:
834         (-[WebView _cacheFrameLoadDelegateImplementations]):
835
836 2009-12-03  Pavel Feldman  <pfeldman@dhcp-172-28-174-220.spb.corp.google.com>
837
838         Reviewed by Timothy Hatcher.
839
840         Web Inspector: Simplify the settings support in inspector controller.
841
842         https://bugs.webkit.org/show_bug.cgi?id=32076
843
844         * WebCoreSupport/WebInspectorClient.h:
845         * WebCoreSupport/WebInspectorClient.mm:
846         (-[WebInspectorWindowController showWindow:]):
847         (-[WebInspectorWindowController attach]):
848         (-[WebInspectorWindowController detach]):
849
850 2009-12-03  Ben Murdoch  <benm@google.com>
851
852         Reviewed by Brady Eidson.
853
854         [Android] notifyHistoryItemChanged() should pass a pointer to the HistoryItem that changed.
855         https://bugs.webkit.org/show_bug.cgi?id=31915
856
857         * History/WebHistoryItem.mm:
858         (WKNotifyHistoryItemChanged): Update WKNotifyHistoryItemChanged() to add the new HistoryItem parameter added in the WebCore portion of this patch.
859         * History/WebHistoryItemInternal.h: ditto.
860
861 2009-12-03  Ben Murdoch  <benm@google.com>
862
863         Reviewed by Brady Eidson.
864
865         [Android] The FrameLoaderClient is unaware of BackForwardList changes.
866         https://bugs.webkit.org/show_bug.cgi?id=31914
867
868         * WebCoreSupport/WebFrameLoaderClient.h:
869         * WebCoreSupport/WebFrameLoaderClient.mm:
870         (WebFrameLoaderClient::dispatchDidAddBackForwardItem): Add an empty implementation. Method added to FrameLoaderClient by Android (see bug).
871         (WebFrameLoaderClient::dispatchDidRemoveBackForwardItem): ditto.
872         (WebFrameLoaderClient::dispatchDidChangeBackForwardIndex): ditto.
873
874 2009-12-02  Dan Bernstein  <mitz@apple.com>
875
876         Reviewed by Mark Rowe.
877
878         Fix a mistake in the previous change
879
880         * WebView/WebView.mm:
881         (+[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]):
882         Make sure to include the image types’ view and representation classes
883         even when plug-ins are not allowed.
884
885 2009-12-02  Dan Bernstein  <mitz@apple.com>
886
887         Reviewed by Anders Carlsson.
888
889         Fixed <rdar://problem/7254127> WebKit can load plug-ins even when
890         plug-ins are disabled
891
892         Ensure that the shared WebPluginDatabase is not instantiated if no
893         WebViews are used that have plug-ins enabled.
894
895         * DefaultDelegates/WebDefaultPolicyDelegate.m:
896         (-[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]):
897         Call -[WebView _canShowMIMEType:] on the WebView instead of calling the
898         class method.
899
900         * WebCoreSupport/WebFrameLoaderClient.mm:
901         (WebFrameLoaderClient::canShowMIMEType): Ditto.
902         (WebFrameLoaderClient::transitionToCommittedForNewPage): Call
903         -[WebFrameView _viewClassForMIMEType:] on the WebView instead of calling
904         the class method.
905         (WebFrameLoaderClient::objectContentType): Ditto.
906
907         * WebView/WebDataSource.mm:
908         (+[WebDataSource _representationClassForMIMEType:allowingPlugins:]):
909         Added the allowPlugins parameter, which is passed through to
910         +[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:].
911         (-[WebDataSource _makeRepresentation]): Pass an allowPlugins value
912         based on the WebView’s preferences.
913
914         * WebView/WebFrameView.mm:
915         (-[WebFrameView _makeDocumentViewForDataSource:]): Call
916         -[WebFrameView _viewClassForMIMEType:] instead of calling the class
917         method.
918         (+[WebFrameView _viewClassForMIMEType:allowingPlugins:]): Added the
919         allowPlugins parameter, which is passed through to
920         +[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:].
921         (-[WebFrameView _viewClassForMIMEType:]): Added. Passes an allowPlugins
922         value based on the WebView’s preferences.
923
924         * WebView/WebFrameViewInternal.h:
925         * WebView/WebView.mm:
926         (+[WebView _viewClass:andRepresentationClass:forMIMEType:allowingPlugins:]):
927         Added the allowPlugins parameter. If false, skip the instantiation of
928         the shared WebPluginDatabase.
929         (-[WebView _viewClass:andRepresentationClass:forMIMEType:]): Pass an
930         allowPlugins value based on the WebView’s preferences.
931         (+[WebView _canShowMIMEType:allowingPlugins:]): Passes allowPlugins to
932         +_viewClass:andRepresentationClass:forMIMEType:allowingPlugins:.
933         (+[WebView canShowMIMEType:]): Changed to pass YES to
934         +_canShowMIMEType:allowingPlugins:.
935         (-[WebView _canShowMIMEType:]): Added. Passes an allowPlugins value
936         based on the WebView’s preferences.
937         (-[WebView _pluginForMIMEType:]): Return nil if plug-ins are disabled.
938         (-[WebView _pluginForExtension:]): Ditto.
939         (-[WebView _isMIMETypeRegisteredAsPlugin:]): Return NO if plug-ins are
940         disabled.
941         * WebView/WebViewInternal.h:
942
943 2009-12-02  Timothy Hatcher  <timothy@apple.com>
944
945         Fixes a crash when scrolling a frame that goes away mid-scroll.
946
947         <rdar://problem/7400263>
948
949         Reviewed by John Sullivan.
950
951         * WebView/WebDynamicScrollBarsView.mm:
952         (-[WebDynamicScrollBarsView scrollWheel:]): Retain self incase the last
953         reference is released when calling super.
954
955 2009-11-13  Timothy Hatcher  <timothy@apple.com>
956
957         Migrate DOMHTMLInputElementPrivate.h as a private header.
958
959         Reviewed by Darin Adler.
960
961         * MigrateHeaders.make:
962
963 2009-12-01  Nikolas Zimmermann  <nzimmermann@rim.com>
964
965         Reviewed by Simon Fraser.
966
967         Add SVG animation test framework with 'snapshot' functionality
968         https://bugs.webkit.org/show_bug.cgi?id=31897
969
970         Add API used by the new 'sampleSVGAnimationForElementAtTime' DRT method,
971         forwarding the call to SVGDocumentExtensions, if SVG is enabled.
972
973         Implemented just like the existing pauseAnimation* methods for CSS animations.
974
975         * WebView/WebFrame.mm:
976         (-[WebFrame _pauseSVGAnimation:onSMILNode:atTime:]):
977         * WebView/WebFramePrivate.h:
978
979 2009-12-01  Sam Weinig  <sam@webkit.org>
980
981         Reviewed by Mark Rowe.
982
983         Simplify [WebView userAgentForURL:].  No need to call into helper function.
984
985         * WebCoreSupport/WebFrameLoaderClient.mm:
986         (WebFrameLoaderClient::userAgent):
987         * WebView/WebView.mm:
988         (-[WebView userAgentForURL:]):
989         * WebView/WebViewInternal.h:
990
991 2009-11-24  Gavin Barraclough  <barraclough@apple.com>
992
993         Reviewed by Geoff Garen.
994
995         Bug 31859 - Make world selection for JSC IsolatedWorlds automagical.
996
997         WebCore presently has to explicitly specify the world before entering into JSC,
998         which is a little fragile (particularly since property access via a
999         getter/setter might invoke execution). Instead derive the current world from
1000         the lexical global object.
1001
1002         Since WebCore no longer needs to explicitly specify the world on entry to JSC DebuggerCallFrame::evaluate can be called directly.
1003
1004         * WebView/WebScriptDebugDelegate.mm:
1005         (-[WebScriptCallFrame evaluateWebScript:]):
1006
1007 2009-11-24  Dmitry Titov  <dimich@chromium.org>
1008
1009         Reviewed by Eric Seidel.
1010
1011         Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit
1012         https://bugs.webkit.org/show_bug.cgi?id=31444
1013
1014         * Configurations/FeatureDefines.xcconfig:
1015
1016 2009-11-24  Alexey Proskuryakov  <ap@apple.com>
1017
1018         Reviewed by Brady Eidson.
1019
1020         https://bugs.webkit.org/show_bug.cgi?id=31844
1021         SocketStreamHandleCFNet should support CONNECT proxy credentials
1022
1023         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Add WKSI methods.
1024
1025 2009-11-23  Simon Fraser  <simon.fraser@apple.com>
1026
1027         Reviewed by Dan Bernstein.
1028
1029         DocumentMarkers need to be educated about transforms
1030         https://bugs.webkit.org/show_bug.cgi?id=31751
1031         
1032         Find highlight is incorrect with transforms
1033         <rdar://problem/6358394>
1034         
1035         Allow callers to specify that Frame::selectionTextRects() takes transforms into account
1036         when computing the set of rects that encompass a selection. For transformed elemenets, the
1037         selection rect will be the bounding box of the selected content.
1038         
1039         Fix DocumentMarkers to cache rects in absolute coordinates, rather than painting coordinates.
1040         
1041         * WebView/WebHTMLView.mm:
1042         (-[WebHTMLView selectionTextRects]):
1043         Pass RespectTransforms to get a list of rects with transforms taken into account.
1044
1045 2009-11-23  Kevin Decker  <kdecker@apple.com>
1046
1047         Reviewed by Adam Roben.
1048         
1049         <rdar://problem/7401503>
1050         
1051         Added a workaround for plug-ins not drawing immediately.
1052         
1053         * Plugins/WebBaseNetscapePluginView.mm: Added new constant.
1054         (-[WebBaseNetscapePluginView _clearSubstituteImage]): Added.
1055         (-[WebBaseNetscapePluginView resumeFromHalt]): Call above new method.
1056
1057 2009-11-20  Dave Hyatt  <hyatt@apple.com>
1058
1059         Reviewed by Darin Adler.
1060
1061         Make sure to export WebSerializedJSValue.
1062
1063         * WebKit.exp:
1064
1065 2009-11-20  Dave Hyatt  <hyatt@apple.com>
1066
1067         Reviewed by Oliver Hunt and Jon Honeycutt.
1068
1069         Add support for WebSerializedJSValue to WebKit.  This object wraps the SerializedScriptValue functionality in WebCore
1070         and exposes the ability to do JS value serialization/deserialization to WebKit clients.
1071
1072         * WebView/WebSerializedJSValue.h: Added.
1073         * WebView/WebSerializedJSValue.mm: Added.
1074         (-[WebSerializedJSValue initWithValue:context:]):
1075         (-[WebSerializedJSValue deserialize:]):
1076         (-[WebSerializedJSValue dealloc]):
1077
1078 2009-11-20  Chris Fleizach  <cfleizach@apple.com>
1079
1080         Reviewed by Beth Dakin.
1081
1082         WAI-ARIA: add support for 'math' role
1083         https://bugs.webkit.org/show_bug.cgi?id=31706
1084
1085         * WebCoreSupport/WebViewFactory.mm:
1086         (-[WebViewFactory AXARIAContentGroupText:]):
1087
1088 2009-11-19  Eric Carlson  <eric.carlson@apple.com>
1089
1090         Reviewed by Dan Bernstein.
1091
1092         <rdar://problem/7035231>
1093         Support closed caption in <video> element
1094
1095         * WebCoreSupport/WebSystemInterface.m:
1096         (InitWebCoreSystemInterface):
1097             Add QTMovieHasClosedCaptions and QTMovieSetShowClosedCaptions.
1098
1099         * WebCoreSupport/WebViewFactory.mm:
1100         (-[WebViewFactory localizedMediaControlElementString:]):
1101         (-[WebViewFactory localizedMediaControlElementHelpText:]):
1102             Add accessibility help strings for media controller closed caption button.
1103
1104 2009-11-18  Michelangelo De Simone  <micdesim@gmail.com>
1105
1106         Reviewed by Darin Adler.
1107
1108         Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
1109         Support for validationMessage attribute, as per HTML5 specs.
1110
1111         * WebCoreSupport/WebViewFactory.mm:
1112         (-[WebViewFactory validationMessageValueMissingText]):
1113         (-[WebViewFactory validationMessageTypeMismatchText]):
1114         (-[WebViewFactory validationMessagePatternMismatchText]):
1115         (-[WebViewFactory validationMessageTooLongText]):
1116         (-[WebViewFactory validationMessageRangeUnderflowText]):
1117         (-[WebViewFactory validationMessageRangeOverflowText]):
1118         (-[WebViewFactory validationMessageStepMismatchText]):
1119
1120 2009-11-18  Sam Weinig  <sam@webkit.org>
1121
1122         Reviewed by Anders Carlsson.
1123
1124         Make the Mac Geolocation API async.
1125
1126         * WebCoreSupport/WebChromeClient.mm:
1127         (WebChromeClient::requestGeolocationPermissionForFrame):
1128         (-[WebGeolocationPolicyListener initWithGeolocation:]):
1129         (-[WebGeolocationPolicyListener allow]):
1130         (-[WebGeolocationPolicyListener deny]):
1131         Add WebGeolocationPolicyListener implementation of the new WebGeolocationPolicyListener
1132         protocol and use if to implement requestGeolocationPermissionForFrame using the new async
1133         API.
1134         
1135         * WebCoreSupport/WebGeolocation.mm: Removed.
1136         * WebCoreSupport/WebGeolocationInternal.h: Removed.
1137         * WebCoreSupport/WebGeolocationMock.mm: Remove bogus include.
1138         * WebCoreSupport/WebGeolocationPrivate.h: Removed.
1139         * WebView/WebUIDelegatePrivate.h: Remove requestGeolocationPermission and add
1140         WebGeolocationPolicyListener protocol and decidePolicyForGeolocationRequestFromOrigin delegate
1141         method.
1142
1143 2009-11-18  Chris Marrin  <cmarrin@apple.com>
1144
1145         Reviewed by Simon Fraser.
1146
1147         Add Preferences for WebKitShowDebugBorders and WebKitShowRepaintCounter
1148         https://bugs.webkit.org/show_bug.cgi?id=31601
1149
1150         These are used to debug accelerated compositing layers
1151
1152         * WebView/WebPreferenceKeysPrivate.h:
1153         * WebView/WebPreferences.mm:
1154         (+[WebPreferences initialize]):
1155         (-[WebPreferences showDebugBorders]):
1156         (-[WebPreferences setShowDebugBorders:]):
1157         (-[WebPreferences showRepaintCounter]):
1158         (-[WebPreferences setShowRepaintCounter:]):
1159         * WebView/WebPreferencesPrivate.h:
1160         * WebView/WebView.mm:
1161         (-[WebView _preferencesChangedNotification:]):
1162
1163 2009-11-17  Pavel Feldman  <pfeldman@chromium.org>
1164
1165         Reviewed by Timothy Hatcher.
1166
1167         Web Inspector: Make DRT show web inspector for tests in inspector/ folder.
1168         - Updated DRT to show/close inspector for all tests under /inspector
1169         - Introduced LayoutTestController::setTimelineProfilingEnabled and
1170           WebInspector::setTimelineProfilingEnabled beside setJavaScriptProfilingEnabled
1171         - Removed reload on each inspector test
1172         - Renamed fast/inspector to fast/inspector-support in order not to trigger
1173         inspector for those.
1174         - Reimplemented timeline tests in order to get rid of reload there.
1175         - Moved tests that don't require harness into the fast group.
1176
1177         https://bugs.webkit.org/show_bug.cgi?id=31472
1178
1179         * WebInspector/WebInspector.h:
1180         * WebInspector/WebInspector.mm:
1181         (-[WebInspector isTimelineProfilingEnabled]):
1182         (-[WebInspector setTimelineProfilingEnabled:]):
1183
1184 2009-11-14  Chris Fleizach  <cfleizach@apple.com>
1185
1186         Reviewed by Darin Adler.
1187
1188         Need to implement ARIA role="directory"
1189         https://bugs.webkit.org/show_bug.cgi?id=31516
1190
1191         Fix a spelling error in the comment of a localized (accessibility) string.
1192
1193         * WebCoreSupport/WebViewFactory.mm:
1194         (-[WebViewFactory AXARIAContentGroupText:]):
1195
1196 2009-11-14  Eric Carlson  <eric.carlson@apple.com>
1197
1198         Reviewed by Oliver Hunt.
1199
1200         <rdar://problem/7287487> 
1201         Do not use QuickTime version to detect media controller theme
1202
1203         * WebCoreSupport/WebSystemInterface.m:
1204         (InitWebCoreSystemInterface): Initialize wkMediaControllerThemeAvailable.
1205
1206 2009-11-13  Adam Roben  <aroben@apple.com>
1207
1208         Tell the WebFrameLoadDelegate when window objects in isolated worlds
1209         are cleared
1210
1211         Fixes <http://webkit.org/b/31124>.
1212
1213         Reviewed by Dave Hyatt.
1214
1215         * WebCoreSupport/WebFrameLoaderClient.h:
1216         * WebCoreSupport/WebFrameLoaderClient.mm:
1217         (WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
1218         Replaced windowObjectCleared with this function. If the delegate
1219         implements it, call
1220         -webView:didClearWindowObjectForFrame:inScriptWorld:. Otherwise, if
1221         the passed-in world is the mainThreadNormalWorld(), call
1222         -webView:didClearWindowObject:forFrame:.
1223
1224         * WebView/WebDelegateImplementationCaching.h: Added a new entry in the
1225         frame load delegate implementation cache for the new delegate method.
1226
1227         * WebView/WebFrameLoadDelegatePrivate.h:
1228         * WebView/WebScriptWorld.mm:
1229         (allWorlds): Added. Returns a HashMap of all the WebScriptWorlds in
1230         existence.
1231         (-[WebScriptWorld initWithWorld:]): Add ourselves to allWorlds().
1232         (-[WebScriptWorld dealloc]): Remove ourselves from allWorlds().
1233         (+[WebScriptWorld findOrCreateWorld:]): Returns the existing
1234         WebScriptWorld for this DOMWrapperWorld, or a new one if one doesn't
1235         already exist.
1236
1237         * WebView/WebScriptWorldInternal.h: Declared +findOrCreateWorld:.
1238
1239         * WebView/WebView.mm:
1240         (-[WebView _cacheFrameLoadDelegateImplementations]): Cache the
1241         implementation of the new frame load delegate method.
1242
1243 2009-11-13  Adam Roben  <aroben@apple.com>
1244
1245         Finish replacing worldIDs with world objects
1246
1247         The only remaining use of worldIDs was in a method only used by DRT
1248         for the isolated worlds tests.
1249
1250         Fixes <http://webkit.org/b/31414> Replace worldIDs with world objects
1251
1252         Reviewed by Mark Rowe.
1253
1254         * WebView/WebFrame.mm:
1255         (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
1256         * WebView/WebFramePrivate.h:
1257         Renamed from
1258         _stringByEvaluatingJavaScriptInIsolatedWorld:WithGobalObject:FromString:.
1259         Now takes a WebScriptWorld instead of a worldID, so we don't need to
1260         maintain a map of worldID -> world anymore.
1261
1262 2009-11-12  Dan Bernstein  <mitz@apple.com>
1263
1264         Reviewed by Adele Peterson.
1265
1266         When exiting full-screen video, rather than resetting the system UI
1267         mode, restore it to what it was when full-screen mode was entered.
1268
1269         * WebView/WebVideoFullscreenController.h: Cleaned up style, removed
1270         unnecessary imports, and added _savedUIMode and _savedUIOptions ivars.
1271         * WebView/WebVideoFullscreenController.mm:
1272         (-[WebVideoFullscreenController delegate]): Cleaned up style.
1273         (-[WebVideoFullscreenController setDelegate:]): Ditto.
1274         (-[WebVideoFullscreenController windowDidExitFullscreen]): Restore the
1275         system UI mode.
1276         (-[WebVideoFullscreenController windowDidEnterFullscreen]): Save the
1277         system UI mode.
1278         * WebView/WebView.mm: Added now-necessary import.
1279
1280 2009-11-12  Shinichiro Hamaji  <hamaji@chromium.org>
1281
1282         Reviewed by Darin Adler.
1283
1284         externalRepresentation should take Frame as the argument
1285         https://bugs.webkit.org/show_bug.cgi?id=31393
1286
1287         No new tests as this is just a refactoring.
1288
1289         * Misc/WebCoreStatistics.mm:
1290         (-[WebFrame renderTreeAsExternalRepresentation]):
1291
1292 2009-11-12  Adam Roben  <aroben@apple.com>
1293
1294         Replace worldIDs with world objects
1295
1296         WebScriptWorld is the new object that represents a world.  The only
1297         place worldID is still used is in -[WebFrame
1298         _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:],
1299         but that will change soon.
1300
1301         Part of <http://webkit.org/b/31414> Implement new SPI for dealing with
1302         user scripts/stylesheets and isolated worlds
1303
1304         Reviewed by Sam Weinig.
1305
1306         * WebKit.exp: Export WebScriptWorld.
1307
1308         * WebView/WebFrame.mm:
1309         (-[WebFrame _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:]):
1310         Moved the bizarre world caching/creation logic that DRT depends on
1311         here from the findWorld function in ScriptController.cpp. Updated to
1312         use ScriptController::executeScriptInWorld instead of
1313         ScriptController::executeScriptInIsolatedWorld.
1314         (-[WebFrame _contextForWorld:]): Renamed from contextForWorldID:. Now
1315         takes a WebScriptWorld.
1316
1317         * WebView/WebFramePrivate.h: Replaced contextForWorldID: with
1318         _contextForWorld:.
1319
1320         * WebView/WebScriptWorld.h: Added.
1321         * WebView/WebScriptWorld.mm: Added.
1322         (-[WebScriptWorld initWithWorld:]): Store the passed-in world in our
1323         _private member.
1324         (-[WebScriptWorld init]): Create a new DOMWrapperWorld and pass it to
1325         -initWithWorld:.
1326         (-[WebScriptWorld dealloc]): Release _private.
1327         (+[WebScriptWorld standardWorld]): Returns a shared instance that
1328         represents WebCore's mainThreadNormalWorld().
1329         (+[WebScriptWorld world]): Returns a new instance.
1330         (core): Returns the DOMWrapperWorld for this WebScriptWorld.
1331
1332         * WebView/WebScriptWorldInternal.h: Added.
1333
1334         * WebView/WebView.mm:
1335         (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:]):
1336         (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:]):
1337         (+[WebView _removeUserScriptFromGroup:world:url:]):
1338         (+[WebView _removeUserStyleSheetFromGroup:world:url:]):
1339         (+[WebView _removeUserScriptsFromGroup:world:]):
1340         (+[WebView _removeUserStyleSheetsFromGroup:world:]):
1341         * WebView/WebViewPrivate.h:
1342         Changed these functions to take a WebScriptWorld instead of a worldID.
1343
1344 2009-11-12  Chris Fleizach  <cfleizach@apple.com>
1345
1346         Reviewed by Darin Adler.
1347
1348         ARIA: add alert type roles
1349         https://bugs.webkit.org/show_bug.cgi?id=31392
1350
1351         * WebCoreSupport/WebViewFactory.mm:
1352         (-[WebViewFactory AXARIAContentGroupText:]):
1353
1354 2009-11-10  Daniel Bates  <dbates@webkit.org>
1355
1356         Reviewed by Oliver Hunt.
1357
1358         https://bugs.webkit.org/show_bug.cgi?id=30754
1359
1360         Removed method draggedImage:movedTo:
1361
1362         * WebView/WebFrame.mm:
1363         * WebView/WebFrameInternal.h:
1364         * WebView/WebHTMLView.mm:
1365
1366 2009-11-10  Beth Dakin  <bdakin@apple.com>
1367
1368         Reviewed by Darin Adler.
1369
1370         Small WebKit part of:
1371         Fix for <rdar://problem/7059710> 
1372         -and corresponding-
1373         https://bugs.webkit.org/show_bug.cgi?id=31196 Implement -webkit-
1374         color-correction for CSS colors
1375
1376         * Misc/WebKitNSStringExtras.mm:
1377         (-[NSString _web_drawAtPoint:font:textColor:]): setFillColor now 
1378         requires callers to pass a ColorSpace.
1379
1380 2009-11-10  Dan Bernstein  <mitz@apple.com>
1381
1382         Reviewed by Eric Carlson and Darin Adler.
1383
1384         WebKit part of making full-screen video pause during scrubbing.
1385
1386         * WebView/WebVideoFullscreenHUDWindowController.h: Added _isScrubbing
1387         ivar.
1388         * WebView/WebVideoFullscreenHUDWindowController.mm:
1389         (-[WebVideoFullscreenHUDWindowController dealloc]): Assert that
1390         _isScrubbing is NO.
1391         (-[WebVideoFullscreenHUDWindowController endScrubbing]): Call
1392         HTMLMediaElement::endScrubbing().
1393         (-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]):
1394         If scrubbing has just begun, call HTMLMediaElement::beginScrubbing()
1395         and schedule -endScrubbing to be called when mouse tracking ends.
1396
1397 2009-11-09  Mark Mentovai  <mark@chromium.org>
1398
1399         Reviewed by Dan Bernstein.
1400
1401         Track "can have scrollbar" state within FrameView independently of the
1402         individual scrollbar states in ScrollView.
1403
1404         rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
1405         REGRESSION (r48064): mint.com loses scrollbars after coming out of
1406         edit mode.
1407
1408         rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
1409         REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
1410
1411         Test: fast/overflow/scrollbar-restored.html
1412
1413         * WebView/WebFrameView.mm:
1414         (-[WebFrameView _install]):
1415
1416 2009-11-08  Dan Bernstein  <mitz@apple.com>
1417
1418         Reviewed by Eric Carlson.
1419
1420         Made the full-screen video HUD appear when playback stops, such as when
1421         the end of the video is reached.
1422
1423         * WebView/WebVideoFullscreenHUDWindowController.h: Cleaned up.
1424         * WebView/WebVideoFullscreenHUDWindowController.mm:
1425         (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Updated
1426         for the renaming of -updateRate to -updatePlayButton.
1427         (-[WebVideoFullscreenHUDWindowController updatePlayButton]): Renamed
1428         -updateRate to this.
1429         (-[WebVideoFullscreenHUDWindowController updateRate]): This method now
1430         responds to changes to the playback rate by updating the play button
1431         and showing or hiding the HUD as necessary.
1432         (-[WebVideoFullscreenHUDWindowController togglePlaying:]): Now only
1433         toggles playing. UI updates are driven by -updateRate being called.
1434         (-[WebVideoFullscreenHUDWindowController playing]): Cleaned up.
1435
1436 2009-11-02  Eric Carlson  <eric.carlson@apple.com>
1437
1438         Reviewed by John Sullivan and Mark Rowe.
1439
1440         <rdar://problem/7356733> Voiceover does not read correct media controller time values
1441
1442         * WebCoreSupport/WebViewFactory.mm:
1443         (-[WebViewFactory localizedMediaTimeDescription:]):
1444
1445 2009-11-02  Dan Bernstein  <mitz@apple.com>
1446
1447         Reviewed by Anders Carlsson.
1448
1449         Made the remaining time display show negative zero at the end of the
1450         video.
1451
1452         Made other cleanup.
1453
1454         * WebView/WebVideoFullscreenHUDWindowController.h: Reverted the types of
1455         _timeline and _volumeSlider to the more generic NSControl.
1456         * WebView/WebVideoFullscreenHUDWindowController.mm:
1457         (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Cleaned
1458         up style.
1459         (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Added an
1460         assertion that the cast to NSButton * is legal. Removed casts.
1461         (-[WebVideoFullscreenHUDWindowController updateTime]): Use
1462         -setValue:forKey: instead of an NSSlider method.
1463         (timeToString): Changed to support only non-negative values and
1464         simplified.
1465         (-[WebVideoFullscreenHUDWindowController remainingTimeText]): Always
1466         prepend a “-” to the time.
1467
1468 2009-11-02  Dan Bernstein  <mitz@apple.com>
1469
1470         Reviewed by John Sullivan.
1471
1472         WebKit part of making the appearance of the full-screen video HUD match
1473         QuickTime Player X’s HUD.
1474
1475         * WebView/WebVideoFullscreenHUDWindowController.h: Removed unnecessary
1476         #import statements, cleaned up style, and changed _timeline,
1477         _volumeSlider and _playButton to have more specific types.
1478         * WebView/WebVideoFullscreenHUDWindowController.mm: Updated #import
1479         statements.
1480         (webkit_CGFloor): Added this helper function.
1481         (-[WebVideoFullscreenHUDWindowController init]): Cleaned up style.
1482         (createTimeTextField): Changed to use the bold system font.
1483         (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Changed the
1484         subviews’ metrics and the text fields’ text alignment.
1485         (-[WebVideoFullscreenHUDWindowController updateTime]): Avoid conversion
1486         from double to float.
1487         (stringToTimeTextAttributed): Removed this useless function that
1488         returned an NSAttributedString masquerading as an NSString.
1489         (-[WebVideoFullscreenHUDWindowController remainingTimeText]): Removed
1490         call to stringToTimeTextAttributed().
1491         (-[WebVideoFullscreenHUDWindowController elapsedTimeText]): Ditto.
1492
1493 2009-11-02  Chris Fleizach  <cfleizach@apple.com>
1494
1495         Reviewed by Beth Dakin.
1496
1497         Support ARIA "tab" roles
1498         https://bugs.webkit.org/show_bug.cgi?id=30842
1499
1500         * WebCoreSupport/WebViewFactory.mm:
1501         (-[WebViewFactory AXARIAContentGroupText:]):
1502
1503 2009-11-01  Dan Bernstein  <mitz@apple.com>
1504
1505         Reviewed by Mark Rowe.
1506
1507         Made the space bar toggle playing state in full-screen video when
1508         modifier keys are down. Made it do so without highlighting the
1509         Play/Pause button.
1510
1511         * WebView/WebVideoFullscreenHUDWindowController.mm:
1512         (-[WebVideoFullscreenHUDWindowController keyDown:]):
1513
1514 2009-11-01  Dan Bernstein  <mitz@apple.com>
1515
1516         Reviewed by Mark Rowe.
1517
1518         Made the full-screen video HUD respond to the up and down arrow keys by
1519         increasing and decreasing the volume by 1/10 of the range or, when
1520         combined with the Option key, all the way up or down.
1521
1522         Made the volume buttons in the full-screen video HUD match the behavior
1523         of their equivalents in the QuickTime Player HUD by turning the volume
1524         all the way up or down.
1525
1526         Made the volume slider update immediately when the keyboard or volume
1527         buttons are used to change the volume, rather than at the nearest 1/4
1528         second interval.
1529
1530         Made the elapsed and remaining time displays update immediately when the
1531         play head is dragged across the timeline, rather than at 1/4 second
1532         intervals.
1533
1534         * WebView/WebVideoFullscreenHUDWindowController.mm:
1535         (-[WebVideoFullscreenHUDWindowController keyDown:]): Handle the up and
1536         down arrow keys.
1537         (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Changed the
1538         actions of the volume up and volume down buttons.
1539         (-[WebVideoFullscreenHUDWindowController setCurrentTime:]): Call
1540         -updateTime.
1541         (-[WebVideoFullscreenHUDWindowController setVolumeToZero:]): Added this
1542         action for the volume down button.
1543         (-[WebVideoFullscreenHUDWindowController setVolumeToMaximum:]): Added
1544         this action for the volume up button.
1545         (-[WebVideoFullscreenHUDWindowController decrementVolume]): No longer
1546         and action method.
1547         (-[WebVideoFullscreenHUDWindowController incrementVolume]): Ditto.
1548         (-[WebVideoFullscreenHUDWindowController setVolume:]): Call
1549         -updateVolume.
1550
1551 2009-10-30  Evan Stade  <estade@chromium.org>
1552
1553         Reviewed by David Levin.
1554
1555         Notify the chrome when the focused node has changed.
1556         https://bugs.webkit.org/show_bug.cgi?id=30832
1557
1558         Added stub implementation for new ChromeClient function.
1559
1560         * WebCoreSupport/WebChromeClient.h:
1561         * WebCoreSupport/WebChromeClient.mm:
1562         (WebChromeClient::focusedNodeChanged):
1563
1564 2009-10-30  Roland Steiner  <rolandsteiner@chromium.org>
1565
1566         Reviewed by Eric Seidel.
1567
1568         Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak.
1569
1570         Bug 28420 -  Implement HTML5 <ruby> rendering
1571         (https://bugs.webkit.org/show_bug.cgi?id=28420)
1572
1573         No new tests (no functional change).
1574
1575         * Configurations/FeatureDefines.xcconfig:
1576
1577 2009-10-29  Mark Rowe  <mrowe@apple.com>
1578
1579         Reviewed by Oliver Hunt.
1580
1581         Validate the stopSpeaking: selector so that is not always enabled when a WebView is first responder.
1582
1583         * WebView/WebHTMLView.mm:
1584         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
1585
1586 2009-10-29  Anders Carlsson  <andersca@apple.com>
1587
1588         Reviewed by Sam Weinig.
1589
1590         https://bugs.webkit.org/show_bug.cgi?id=30932
1591         <rdar://problem/7350269>
1592         
1593         REGRESSION: Crash when turning on Private Browsing on site with flash.
1594         
1595         Null check setValue.
1596         
1597         * Plugins/WebNetscapePluginView.mm:
1598         (-[WebNetscapePluginView privateBrowsingModeDidChange]):
1599
1600 2009-10-29  Eric Carlson  <eric.carlson@apple.com>
1601
1602         Reviewed by Kevin Decker.
1603
1604         Refactor some duplicate plug-in clean up code into shared functions.
1605
1606         * Plugins/WebPluginController.mm:
1607         (-[WebPluginController stopOnePlugin:]): New, stop a plug-in.
1608         (-[WebPluginController destroyOnePlugin:]): New, destroy plug-in.
1609         (-[WebPluginController stopAllPlugins]): Call stopOnePlugin.
1610         (-[WebPluginController destroyPlugin:]): Call stopOnePlugin and destroyOnePlugin.
1611         (-[WebPluginController destroyAllPlugins]): Call destroyOnePlugin.
1612
1613 2009-10-28  Eric Carlson  <eric.carlson@apple.com>
1614
1615         Reviewed by Simon Fraser.
1616
1617         <rdar://problem/7303145> 
1618         Can't exit full screen mode or restart movie after pressing command -R.
1619
1620         * WebView/WebVideoFullscreenController.mm:
1621         (-[WebVideoFullscreenController _requestExit]): 
1622             New, call media element's exitFullscreen method.
1623         (-[WebVideoFullscreenController requestExitFullscreenWithAnimation:]): 
1624             Call mediaElement->exitFullscreen() after a delay as it turns around and calls
1625             WebVideoFullscreenController:exitFullscreen.
1626
1627         * WebView/WebVideoFullscreenHUDWindowController.h:
1628         * WebView/WebVideoFullscreenHUDWindowController.mm:
1629         (-[WebVideoFullscreenHUDWindow resignFirstResponder]):
1630             New, don't give up responder status.
1631         (-[WebVideoFullscreenHUDWindow performKeyEquivalent:]):
1632             New, block all command key events.
1633         (-[WebVideoFullscreenHUDWindowController exitFullscreen:]):
1634             Remember when we are in the process of exiting fullscreen, don't allow recursion.
1635
1636         * WebView/WebView.mm:
1637         (-[WebView _exitFullscreen]):
1638             Early return if fullscreen controller is nil.
1639
1640         * WebView/WebWindowAnimation.h: 
1641             Correct comment about _window retain status.
1642         * WebView/WebWindowAnimation.m:
1643         (-[WebWindowScaleAnimation dealloc]):
1644             Don't release _window, we never reatained it.
1645
1646 2009-10-27  Shinichiro Hamaji  <hamaji@chromium.org>
1647
1648         Reviewed by Darin Adler.
1649
1650         Provide a way to get counter values with layoutTestContoller
1651         https://bugs.webkit.org/show_bug.cgi?id=30555
1652
1653         Add counterValueForElement in WebFrame to call WebCore::counterValueForElement.
1654
1655         * Misc/WebCoreStatistics.h:
1656         * Misc/WebCoreStatistics.mm:
1657         (-[WebFrame counterValueForElement:]):
1658
1659 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
1660
1661         Reviewed by Sam Weinig.
1662
1663         Updated for refactoring in the date code.
1664
1665         * WebView/WebView.mm:
1666         (aeDescFromJSValue): Since we just want a number of milliseconds, do that
1667         instead of something more complicated.
1668
1669 2009-10-26  Sam Weinig  <sam@webkit.org>
1670
1671         Reviewed by Anders Carlsson.
1672
1673         Move some WebView event handling code into its own file, WebViewEventHandling.mm
1674
1675         * WebView/WebView.mm:
1676         (-[WebView _close]):
1677         (-[WebView _selectedOrMainFrame]):
1678         * WebView/WebViewEventHandling.mm: Added.
1679         (-[WebView _closingEventHandling]):
1680         (-[WebView _setMouseDownEvent:]):
1681         (-[WebView mouseDown:]):
1682         (-[WebView mouseUp:]):
1683         (+[WebView _updateMouseoverWithEvent:]):
1684         (-[WebView _updateMouseoverWithFakeEvent]):
1685         (_updateMouseoverWithEvent:fakeEvent::if):
1686         (-[WebView _stopAutoscrollTimer]):
1687         (-[WebView _setToolTip:]):
1688         * WebView/WebViewInternal.h:
1689
1690 2009-10-26  Simon Fraser  <simon.fraser@apple.com>
1691
1692         Reviewed by Sam Weinig.
1693
1694         <rdar://problem/6988966> Hardware layers do not show up in page snapshots
1695
1696         * WebView/WebHTMLViewPrivate.h:
1697         * WebView/WebHTMLView.mm:
1698         (-[WebHTMLView _compositingLayersHostingView]):
1699         Add a private method that returns the NSView used to host compositing layers.
1700         
1701 2009-10-23  Mark Rowe  <mrowe@apple.com>
1702
1703         Fix engineering builds in the mysterious future.
1704
1705         * Configurations/DebugRelease.xcconfig:
1706
1707 2009-10-23  Gavin Barraclough  <barraclough@apple.com>
1708
1709         Reviewed by Geoff Garen.
1710
1711         https://bugs.webkit.org/show_bug.cgi?id=30729
1712         Provide private API to request the global context for a specific world.
1713         Used to initialize parameters on the global object.
1714
1715         * WebView/WebFramePrivate.h:
1716         * WebView/WebFrame.mm:
1717         (-[WebFrame contextForWorldID:]):
1718
1719 2009-10-22  Eric Carlson  <eric.carlson@apple.com>
1720
1721         Reviewed by John Sullivan.
1722
1723         <rdar://problem/7322847>
1724         Pressing space bar key in full screen mode should pause movie but doesn't
1725
1726         * WebView/WebVideoFullscreenHUDWindowController.mm:
1727         (-[WebVideoFullscreenHUDWindowController keyDown:]):  New, toggle playback on space key.
1728         (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Play button action is now called togglePlaying.
1729         (-[WebVideoFullscreenHUDWindowController togglePlaying:]): Rename from playingChanged.
1730
1731 2009-10-22  Gavin Barraclough  <barraclough@apple.com>
1732
1733         Reviewed by NOBODY (build fix).
1734         Build fix following bug #30696.
1735
1736         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1737         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
1738         (WebKit::NetscapePluginInstanceProxy::evaluate):
1739         (WebKit::NetscapePluginInstanceProxy::invoke):
1740         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
1741         (WebKit::NetscapePluginInstanceProxy::construct):
1742         (WebKit::NetscapePluginInstanceProxy::getProperty):
1743         (WebKit::NetscapePluginInstanceProxy::setProperty):
1744         (WebKit::NetscapePluginInstanceProxy::removeProperty):
1745         (WebKit::NetscapePluginInstanceProxy::hasProperty):
1746         (WebKit::NetscapePluginInstanceProxy::hasMethod):
1747         (WebKit::NetscapePluginInstanceProxy::enumerate):
1748
1749 2009-10-16  Gavin Barraclough  <barraclough@apple.com>
1750
1751         Reviewed by Sam Weinig & Geoff Garen.
1752
1753         https://bugs.webkit.org/show_bug.cgi?id=30696
1754         Update to incorporate support for IsolatedWorlds in JSC bindings.
1755
1756         * WebView/WebFrame.mm:
1757         (-[WebFrame _attachScriptDebugger]):
1758         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
1759         (-[WebFrame globalContext]):
1760         * WebView/WebScriptDebugDelegate.mm:
1761         (-[WebScriptCallFrame evaluateWebScript:]):
1762         * WebView/WebView.mm:
1763         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
1764
1765 2009-10-22  Eric Carlson  <eric.carlson@apple.com>
1766
1767         Reviewed by Dan Bernstein & Simon Fraser.
1768
1769         <rdar://problem/7297717>
1770         https://bugs.webkit.org/show_bug.cgi?id=30323
1771         Play/pause button in full-screen video controller does not reflect current state
1772
1773         * WebView/WebVideoFullscreenController.mm:
1774         (-[WebVideoFullscreenController setMediaElement:WebCore::]): Register for QTMovieRateDidChangeNotification
1775         (-[WebVideoFullscreenController rateChanged:]): Call HUD controller when rate changes.
1776
1777         * WebView/WebVideoFullscreenHUDWindowController.h:
1778         * WebView/WebVideoFullscreenHUDWindowController.mm:
1779         (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Call updateRate so play button
1780         reflects playback state.
1781         (-[WebVideoFullscreenHUDWindowController updateRate]): New, set play button state according to
1782         movie state.
1783         (-[WebVideoFullscreenHUDWindowController playingChanged:]): Only call [self playing] once.
1784
1785 2009-10-21  John Sullivan  <sullivan@apple.com>
1786
1787         Rubber-stamped by Dan Bernstein.
1788
1789         * WebView/WebDynamicScrollBarsView.h:
1790         Corrected a couple of long-obsolete comments regarding Safari's use of this class.
1791
1792 2009-10-20  Dan Bernstein  <mitz@apple.com>
1793
1794         Rubber-stamped by Mark Rowe.
1795
1796         <rdar://problem/7319749> REGRESSION(r49806): Contextual Menu items missing
1797         https://bugs.webkit.org/show_bug.cgi?id=30568
1798
1799         Revert accidental change from r49806.
1800
1801         * WebCoreSupport/WebContextMenuClient.mm:
1802         (WebContextMenuClient::getCustomMenuFromDefaultItems):
1803
1804 2009-10-20  Fumitoshi Ukai  <ukai@chromium.org>
1805
1806         Reviewed by David Levin.
1807
1808         Removed WebSocket runtime settings.
1809         https://bugs.webkit.org/show_bug.cgi?id=29896
1810
1811         WebSocket runtime configuration is supported by chromium/v8 only.
1812
1813         * WebView/WebPreferenceKeysPrivate.h:
1814         * WebView/WebPreferences.mm:
1815         (+[WebPreferences initialize]):
1816         * WebView/WebPreferencesPrivate.h:
1817         * WebView/WebView.mm:
1818         (-[WebView _preferencesChangedNotification:]):
1819
1820 2009-10-19  Nate Chapin  <japhet@chromium.org>
1821
1822         Reviewed by Alexey Proskuryakov.
1823
1824         Update call to loadFrameRequest to match new parameters.
1825
1826         * WebView/WebPDFView.mm:
1827         (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Update call to loadFrameRequest.
1828
1829 2009-10-19  David Kilzer  <ddkilzer@apple.com>
1830
1831         Documentation fix for -[NSObject(WebResourceLoadDelegate) webView:resource:willSendRequest:redirectResponse:fromDataSource:]
1832
1833         Reviewed by Dan Bernstein.
1834
1835         * WebView/WebResourceLoadDelegate.h: Prepended "webView:" to the
1836         @method declaration of
1837         -webView:resource:willSendRequest:redirectResponse:fromDataSource:
1838         which was absent before r3953 and was missed during the great
1839         documentation clean up of r4269.
1840
1841 2009-10-19  Anders Carlsson  <andersca@apple.com>
1842
1843         Fix build.
1844
1845         * Plugins/WebNetscapePluginView.mm:
1846         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
1847
1848 2009-10-19  Dan Bernstein  <mitz@apple.com>
1849
1850         Reviewed by Anders Carlsson.
1851
1852         Split assertions of conjunctions into separate statements or remove
1853         redundant assertions.
1854
1855         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1856         (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
1857         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1858         (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
1859         (-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
1860         * Plugins/WebBaseNetscapePluginView.mm:
1861         (-[WebBaseNetscapePluginView halt]):
1862         (-[WebBaseNetscapePluginView resumeFromHalt]):
1863         * Plugins/WebNetscapePluginView.mm:
1864         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
1865         (-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
1866         * WebCoreSupport/WebContextMenuClient.mm:
1867         (WebContextMenuClient::getCustomMenuFromDefaultItems):
1868         * WebCoreSupport/WebEditorClient.mm:
1869         (WebEditorClient::checkGrammarOfString):
1870         (WebEditorClient::checkTextOfParagraph):
1871         * WebView/WebTextCompletionController.mm:
1872         (-[WebTextCompletionController _reflectSelection]):
1873
1874 2009-10-18  Mark Rowe  <mrowe@apple.com>
1875
1876         Reviewed by Dan Bernstein.
1877
1878         <rdar://problem/7309062> Crashes in WebCore::DocumentLoader::isStopping below WebKit::NetscapePluginInstanceProxy::loadRequest.
1879
1880         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1881         (WebKit::NetscapePluginInstanceProxy::loadRequest): Null-check the DocumentLoader before deferencing it.
1882
1883 2009-10-16  Kevin Decker  <kdecker@apple.com>
1884
1885         Reviewed by Jon Honeycutt.
1886
1887         <rdar://problem/7304575>
1888         
1889         * Plugins/WebBaseNetscapePluginView.h: Added new boolean ivar and -hasBeenHalted instance method.
1890         * Plugins/WebBaseNetscapePluginView.mm:
1891         (-[WebBaseNetscapePluginView halt]):Update _hasBeenHalted.
1892         (-[WebBaseNetscapePluginView hasBeenHalted]): Added.
1893         * WebView/WebView.mm:
1894         (+[WebView _hasPluginForNodeBeenHalted:]): Checks to see if a plug-in node's been halted.
1895         * WebView/WebViewPrivate.h: Added -_hasPluginForNodeBeenHalted method.
1896
1897 2009-10-16  Kevin Decker  <kdecker@apple.com>
1898
1899         Reviewed by Anders Carlson.
1900
1901         Small code cleanup
1902         
1903         * Plugins/WebBaseNetscapePluginView.mm:
1904         (WebHaltablePlugin::halt): Just call -[WebBaseNetscapePluginView halt].
1905         (WebHaltablePlugin::restart): Just call -[WebBaseNetscapePluginView resumeFromHalt]
1906         (-[WebBaseNetscapePluginView halt]): 
1907         (-[WebBaseNetscapePluginView resumeFromHalt]):
1908         * WebView/WebView.mm:
1909         (_pluginViewForNode): Added a check if a render is a widget. This prevents a later assertion.
1910
1911 2009-10-16  Kevin Decker  <kdecker@apple.com>
1912
1913         Reviewed by Anders Carlson.
1914
1915         Last part of:
1916         <rdar://problem/7273354>
1917
1918         * WebView/WebView.mm: 
1919         (_pluginViewForNode): Added with code extracted from _isNodeHaltedPlugin
1920         (+[WebView _isNodeHaltedPlugin:]): Made this a class method.
1921         (+[WebView _restartHaltedPluginForNode:]): Added. Restarts a plug-in
1922         * WebView/WebViewPrivate.h: Added +_restartHaltedPluginForNode to header.
1923
1924 2009-10-16  Kevin Decker  <kdecker@apple.com>
1925
1926         Reviewed by Anders.
1927
1928         <rdar://problem/7273354> 
1929
1930         * Plugins/WebBaseNetscapePluginView.h: Added _isHalted ivar and three new methods: -halt, -resumeFromHalt, and -isHalted
1931         * Plugins/WebBaseNetscapePluginView.mm:
1932         (WebHaltablePlugin::halt): Call -halt instead of -stop.  
1933         (WebHaltablePlugin::restart):Call -resumeFromHalt instead of -start. 
1934         (-[WebBaseNetscapePluginView halt]): Added. Stop the plug-in, update _isHalted.
1935         (-[WebBaseNetscapePluginView resumeFromHalt]): Added. Start the plug-in, update _isHalted.
1936         (-[WebBaseNetscapePluginView isHalted]): Added.
1937         * WebView/WebView.mm:
1938         (-[WebView _isNodeHaltedPlugin:]): Added. Queries a DOMNode to determine if it's a halted plug-in.
1939         * WebView/WebViewPrivate.h: Added _isNodeHaltedPlugin.
1940
1941 2009-10-15  Eric Carlson  <eric.carlson@apple.com>
1942
1943         Reviewed by Adele Peterson.
1944
1945         <rdar://problem/7306052> Fullscreen max/min volume buttons non-functional
1946
1947         * WebView/WebVideoFullscreenHUDWindowController.mm:
1948         (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Set volume buttons target and action.
1949         (-[WebVideoFullscreenHUDWindowController decrementVolume:]): New, decrement the volume by 10%.
1950         (-[WebVideoFullscreenHUDWindowController incrementVolume:]): New, increment the volume by 10%.
1951
1952 2009-10-15  Eric Carlson  <eric.carlson@apple.com>
1953
1954         Reviewed by Simon Fraser.
1955
1956         <rdar://problem/7295738> No way to mute/unmute a movie in full screen video mode
1957
1958         * WebView/WebVideoFullscreenHUDWindowController.mm:
1959         (-[WebVideoFullscreenHUDWindowController setVolume:]): Unmute movie before changing volume.
1960
1961 2009-10-14  Kevin Decker  <kdecker@apple.com>
1962
1963         Unbreak the world.
1964         
1965         * Plugins/WebBaseNetscapePluginView.mm:
1966         (WebHaltablePlugin::restart):
1967
1968 2009-10-14  Kevin Decker  <kdecker@apple.com>
1969
1970         Reviewed by Anders Carlsson and Jon Honeycutt
1971
1972         <rdar://problem/7304295> snapshots of halted plug-ins are missing
1973         
1974         * Plugins/WebBaseNetscapePluginView.mm: Move bodies of WebHaltablePlugin virtual functions from WebHaltablePlugin class definition.
1975         (WebHaltablePlugin::halt): Provide a substitute image to the RenderWidget for the plug-in view.
1976         (WebHaltablePlugin::restart): Clear the substitute image.
1977
1978 2009-10-13  Dave Hyatt  <hyatt@apple.com>
1979
1980         Reviewed by Adam Roben.
1981
1982         Change the order of arguments on some methods.  Split removal for user stylesheets and script into
1983         separate functions based off the type of object being removed.
1984
1985         * WebView/WebView.mm:
1986         (+[WebView _addUserScriptToGroup:worldID:source:url:whitelist:blacklist:injectionTime:]):
1987         (+[WebView _addUserStyleSheetToGroup:worldID:source:url:whitelist:blacklist:]):
1988         (+[WebView _removeUserScriptFromGroup:worldID:url:]):
1989         (+[WebView _removeUserStyleSheetFromGroup:worldID:url:]):
1990         (+[WebView _removeUserScriptsFromGroup:worldID:]):
1991         (+[WebView _removeUserStyleSheetsFromGroup:worldID:]):
1992         * WebView/WebViewPrivate.h:
1993
1994 2009-10-13  Anders Carlsson  <andersca@apple.com>
1995
1996         Reviewed by Sam Weinig.
1997
1998         <rdar://problem/6660507> Add "privacy mode" to Netscape Plug-in API
1999
2000         Listen for WebPreferences notifications and update the _isPrivateBrowsingEnabled ivar 
2001         when the value changes. Also call -[WebBaseNetscapePluginView privateBrowsingModeDidChange] when the
2002         value changes. In process this just calls NPP_SetValue, and OOP it sends a MIG message to the plug-in host.
2003         
2004         * Plugins/Hosted/NetscapePluginHostManager.h:
2005         * Plugins/Hosted/NetscapePluginHostManager.mm:
2006         (WebKit::NetscapePluginHostManager::instantiatePlugin):
2007         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2008         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2009         (WebKit::NetscapePluginInstanceProxy::privateBrowsingModeDidChange):
2010         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2011         (-[WebHostedNetscapePluginView createPlugin]):
2012         (-[WebHostedNetscapePluginView privateBrowsingModeDidChange]):
2013         * Plugins/Hosted/WebKitPluginHost.defs:
2014         * Plugins/WebBaseNetscapePluginView.h:
2015         * Plugins/WebBaseNetscapePluginView.mm:
2016         (-[WebBaseNetscapePluginView privateBrowsingModeDidChange]):
2017         (-[WebBaseNetscapePluginView viewDidMoveToWindow]):
2018         (-[WebBaseNetscapePluginView preferencesHaveChanged:]):
2019         * Plugins/WebNetscapePluginView.mm:
2020         (-[WebNetscapePluginView privateBrowsingModeDidChange]):
2021         (-[WebNetscapePluginView getVariable:value:]):
2022
2023 2009-10-12  Simon Fraser  <simon.fraser@apple.com>
2024
2025         Reviewed by Darin Adler.
2026
2027         Video keeps playing after going fullscreen, then closing window
2028         https://bugs.webkit.org/show_bug.cgi?id=30164
2029         
2030         Clear the QTMovie on the QTMovieView when coming out of fullscreen,
2031         to fix issue where the underlying movie keeps playing.
2032
2033         * WebView/WebVideoFullscreenController.mm:
2034         (-[WebVideoFullscreenController windowDidExitFullscreen]):
2035
2036 2009-10-11  Dan Bernstein  <mitz@apple.com>
2037
2038         Reviewed by Darin Adler.
2039
2040         <rdar://problem/7294267> REGRESSION (r48492): Gmail voice and video chat
2041         doesn’t work
2042         https://bugs.webkit.org/show_bug.cgi?id=30295
2043
2044         Test: plugins/setProperty.html
2045
2046         * Plugins/Hosted/ProxyInstance.mm:
2047         (WebKit::ProxyInstance::setFieldValue): Fixed a typo. The function
2048         should return early if m_instanceProxy is null.
2049
2050 2009-10-09  Adam Barth  <abarth@webkit.org>
2051
2052         Reviewed by Darin Adler.
2053
2054         Factor HistoryController out of FrameLoader
2055         https://bugs.webkit.org/show_bug.cgi?id=30246
2056
2057         Update API call.
2058
2059         * WebCoreSupport/WebFrameLoaderClient.mm:
2060         (WebFrameLoaderClient::restoreViewState):
2061         * WebView/WebView.mm:
2062         (-[WebView _loadBackForwardListFromOtherView:]):
2063
2064 2009-10-09  Mark Rowe  <mrowe@apple.com>
2065
2066         Reviewed by Brady Eidson.
2067
2068         <rdar://problem/7290671> Crash after navigating away from a page with subframe containing plug-in
2069
2070         At the time that -stop is called on a WebBaseNetscapePluginView that is contained within a subframe
2071         the WebFrame's data source has been zeroed out.  This was causing -[WebBaseNetscapePluginView webFrame]
2072         to return nil during -stop, preventing the plug-in view from unregistering itself from the PluginHalter.
2073         We fix this by having -webFrame retrieve the frame directly rather than retrieving it from the data source.
2074
2075         * Plugins/WebBaseNetscapePluginView.mm:
2076         (-[WebBaseNetscapePluginView dataSource]): Get the data source from the WebFrame.
2077         (-[WebBaseNetscapePluginView webFrame]): Get the Frame directly from the element's document rather
2078         than taking a windy route through the WebDataSource.
2079
2080 2009-10-09  Brady Eidson  <beidson@apple.com>
2081
2082         Reviewed by Dan Bernstein.
2083
2084         Add SPI to specifically enable visited link tracking.
2085
2086         * History/WebHistory.mm:
2087         (+[WebHistory _setVisitedLinkTrackingEnabled:]):
2088         * History/WebHistoryPrivate.h:
2089
2090 2009-10-08  Jon Honeycutt  <jhoneycutt@apple.com>
2091
2092         Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking
2093         for the existence of a PluginHalterDelegate.
2094
2095         Reviewed by Dan Bernstein.
2096
2097         * WebCoreSupport/WebPluginHalterClient.h:
2098         Add declaration for new function.
2099
2100         * WebCoreSupport/WebPluginHalterClient.mm:
2101         (WebPluginHalterClient::enabled):
2102         Check whether the UIDelegate responds to shouldHaltPlugin.
2103
2104         * WebView/WebPreferenceKeysPrivate.h:
2105         Remove the "enabled" preference key.
2106
2107         * WebView/WebPreferences.mm:
2108         (+[WebPreferences initialize]):
2109         Remove the initialization of the pref.
2110
2111         * WebView/WebPreferencesPrivate.h:
2112         Remove the getter/setter for this pref.
2113
2114         * WebView/WebView.mm:
2115         (-[WebView _preferencesChangedNotification:]):
2116         Remove propagation of the pref. 
2117
2118 2009-10-08  Adam Barth  <abarth@webkit.org>
2119
2120         Reviewed by Eric Seidel.
2121
2122         Move executeScript from FrameLoader to ScriptController
2123         https://bugs.webkit.org/show_bug.cgi?id=30200
2124
2125         Update API call.
2126
2127         * WebView/WebFrame.mm:
2128         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2129         * WebView/WebView.mm:
2130         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
2131
2132 2009-10-08  Brady Eidson  <beidson@apple.com>
2133
2134         Reviewed by Dan Bernstein.
2135
2136         Ask the History Delegate to populate the visited links hash.
2137         <rdar://problem/7285293> and https://webkit.org/b/29904
2138
2139         * History/WebHistory.mm:
2140         (+[WebHistory _removeAllVisitedLinks]):
2141         * History/WebHistoryPrivate.h:
2142         * WebCoreSupport/WebChromeClient.mm:
2143         (WebChromeClient::populateVisitedLinks):
2144         * WebView/WebDelegateImplementationCaching.h:
2145         * WebView/WebDelegateImplementationCaching.mm:
2146         (CallHistoryDelegate):
2147         * WebView/WebHistoryDelegate.h:
2148         * WebView/WebView.mm:
2149         (-[WebView _cacheHistoryDelegateImplementations]):
2150         (-[WebView addVisitedLinks:]):
2151         * WebView/WebViewPrivate.h:
2152
2153 2009-10-08  Anders Carlsson  <andersca@apple.com>
2154
2155         Reviewed by Sam Weinig.
2156
2157         Remove the shouldLoadMediaElementURL implementation.
2158
2159         * WebCoreSupport/WebFrameLoaderClient.h:
2160         * WebCoreSupport/WebFrameLoaderClient.mm:
2161         * WebView/WebPolicyDelegatePrivate.h:
2162
2163 2009-10-07  Simon Fraser  <simon.fraser@apple.com>
2164
2165         Re-land 49269-49271 since reverting them did not fix the tests.
2166
2167         * WebView/WebHTMLView.mm:
2168         (-[WebHTMLView drawRect:]):
2169
2170 2009-10-07  Simon Fraser  <simon.fraser@apple.com>
2171
2172         Revert 49269-49271 to see if it fixes test failures on SnowLeopard that do not
2173         reproduce locally.
2174
2175         * WebView/WebHTMLView.mm:
2176         (-[WebHTMLView drawRect:]):
2177
2178 2009-10-07  Adam Barth  <abarth@webkit.org>
2179
2180         Reviewed by Darin Adler.
2181
2182         Factor PolicyChecker out of FrameLoader
2183         https://bugs.webkit.org/show_bug.cgi?id=30155
2184
2185         Move the policy callback to the policy object.
2186
2187         * WebCoreSupport/WebFrameLoaderClient.mm:
2188         (WebFrameLoaderClient::dispatchWillSubmitForm):
2189         (WebFrameLoaderClient::receivedPolicyDecison):
2190
2191 2009-10-07  Brady Eidson  <beidson@apple.com>
2192
2193         Reviewed by Darin Adler.
2194
2195         Send title changes to the global history delegate.
2196         <rdar://problem/7285293> and https://webkit.org/b/29904
2197
2198         * WebCoreSupport/WebFrameLoaderClient.mm:
2199         (WebFrameLoaderClient::setTitle):
2200         * WebView/WebDelegateImplementationCaching.h:
2201         * WebView/WebHistoryDelegate.h:
2202         * WebView/WebView.mm:
2203         (-[WebView _cacheHistoryDelegateImplementations]):
2204
2205 2009-10-07  Darin Adler  <darin@apple.com>
2206
2207         Reviewed by John Sullivan.
2208
2209         Make the setMetadataURL function foolproof by having it remove user info
2210         https://bugs.webkit.org/show_bug.cgi?id=30178
2211         rdar://problem/6544670
2212
2213         * Misc/WebNSFileManagerExtras.m:
2214         (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]):
2215         Call _web_URLByRemovingUserInfo on the passed in URL string after converting
2216         it to a URL, and then convert it back to a string.
2217
2218         * Misc/WebNSURLExtras.h: Added _web_URLByRemovingUserInfo.
2219         * Misc/WebNSURLExtras.mm: Removed unused WebKitURLComponents struct.
2220         (-[NSURL _web_URLByTruncatingOneCharacterBeforeComponent:]): Renamed to be
2221         clearer on what this does.
2222         (-[NSURL _webkit_URLByRemovingFragment]): Changed to call new name.
2223         (-[NSURL _webkit_URLByRemovingResourceSpecifier]): Ditto.
2224         (-[NSURL _web_URLByRemovingComponentAndSubsequentCharacter:]): Added.
2225         (-[NSURL _web_URLByRemovingUserInfo]): Added.
2226
2227 2009-10-07  Simon Fraser  <simon.fraser@apple.com>
2228
2229         Make Dan Bernstein happy.
2230
2231         * WebView/WebHTMLView.mm:
2232         (-[WebHTMLView drawRect:]):
2233
2234 2009-10-07  Simon Fraser  <simon.fraser@apple.com>
2235
2236         Reviewed by Dan Bernstein.
2237
2238         Avoid Obj-C message dispatch when possible by storing accessed objects
2239         in local variables.
2240
2241         * WebView/WebHTMLView.mm:
2242         (-[WebHTMLView drawRect:]):
2243
2244 2009-10-07  Simon Fraser  <simon.fraser@apple.com>
2245
2246         Reviewed by Dan Bernstein.
2247
2248         Animation stalls for a few seconds partway through
2249         https://bugs.webkit.org/show_bug.cgi?id=30182
2250         
2251         Make sure that we only call -disableScreenUpdatesUntilFlush when a window
2252         update is actually going to happen, otherwise screen updates are disabled
2253         for too long.
2254
2255         * WebView/WebHTMLView.mm:
2256         (-[WebHTMLView drawRect:]):
2257
2258 2009-10-06  Pavel Feldman  <pfeldman@chromium.org>
2259
2260         Reviewed by Timothy Hatcher.
2261
2262         Web Inspector: default to an attached inspector window on Windows (as on Mac).
2263
2264         https://bugs.webkit.org/show_bug.cgi?id=30134
2265
2266         * WebCoreSupport/WebInspectorClient.mm:
2267         (-[WebInspectorWindowController showWindow:]):
2268
2269 2009-10-06  Adam Barth  <abarth@webkit.org>
2270
2271         Reviewed by Eric Seidel.
2272
2273         Move FrameLoader::canLoad to SecurityOrigin
2274         https://bugs.webkit.org/show_bug.cgi?id=30111
2275
2276         * Plugins/Hosted/HostedNetscapePluginStream.mm:
2277         (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
2278         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2279         (WebKit::NetscapePluginInstanceProxy::loadRequest):
2280         * Plugins/WebBaseNetscapePluginStream.mm:
2281         (WebNetscapePluginStream::WebNetscapePluginStream):
2282         * Plugins/WebNetscapePluginView.mm:
2283         (-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
2284         * Plugins/WebPluginContainerCheck.mm:
2285         (-[WebPluginContainerCheck _isForbiddenFileLoad]):
2286         * WebView/WebFrame.mm:
2287         (-[WebFrame _allowsFollowingLink:]):
2288
2289 2009-10-06  Adam Barth  <abarth@webkit.org>
2290
2291         Reviewed by Eric Seidel.
2292
2293         Move setLocalLoadPolicy and friends to SecurityOrigin
2294         https://bugs.webkit.org/show_bug.cgi?id=30110
2295
2296         Call the new API.
2297
2298         * WebView/WebView.mm:
2299         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
2300
2301 2009-10-06  Simon Fraser  <simon.fraser@apple.com>
2302
2303         Reviewed by Mark Rowe.
2304
2305         accessibility/media-element.html crashes (and has incorrect result)
2306         https://bugs.webkit.org/show_bug.cgi?id=30108
2307
2308         Fix up the accessibilty label for the newly added fullscreen button,
2309         and update the test result accordingly.
2310
2311         * WebCoreSupport/WebViewFactory.mm:
2312         (-[WebViewFactory localizedMediaControlElementString:]):
2313         Handle "ControlsPanel" which is just an empty container, to avoid
2314         asserting in debug builds.
2315
2316 2009-10-06  Daniel Bates  <dbates@webkit.org>
2317
2318         Reviewed by Eric Seidel.
2319
2320         https://bugs.webkit.org/show_bug.cgi?id=30107
2321         
2322         Fixes an issue where the Mac build does return the correct drop effect
2323         with respect to the HTML 5 specification when effectAllowed == "none".
2324         
2325         Currently, when effectAllowed == "none" and dropEffect == "copy" or 
2326         dropEffect == "move" the resulting drop effect is "copy" and "move",
2327         respectively. However, the HTML 5 specification states that regardless
2328         of the specified dropEffect, when effectAllowed == "none" the resulting
2329         drop effect should be "none".
2330
2331         * WebView/WebHTMLView.mm:
2332         (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
2333
2334 2009-10-06  Pavel Feldman  <pfeldman@chromium.org>
2335
2336         Reviewed by Timothy Hatcher.
2337
2338         Web Inspector: close inspector client view on
2339         InspectorController::close API call.
2340
2341         In order to run batch web inspector layout tests (and not affect 
2342         subsequent tests) we should close inspector client's view upon
2343         InspectorController::close API call.
2344
2345         https://bugs.webkit.org/show_bug.cgi?id=30009
2346
2347         * WebCoreSupport/WebInspectorClient.mm:
2348         (WebInspectorClient::createPage):
2349
2350 2009-10-05  Dan Bernstein  <mitz@apple.com>
2351
2352         Rubber-stamped by Mark Rowe.
2353
2354         Moved a WebPluginHalterClient out of the WebCore namesapce.
2355
2356         * WebCoreSupport/WebPluginHalterClient.h:
2357
2358 2009-10-05  Kevin Decker  <kdecker@apple.com>
2359
2360         Reviewed by Dan Bernstein.
2361
2362         Added new PluginHalter client, delegate and few more WebPreferences keys.
2363
2364         * WebView/WebPreferenceKeysPrivate.h: Added two new keys.
2365         * WebView/WebPreferences.mm:
2366         (+[WebPreferences initialize]): Initialize newly added key.
2367         (-[WebPreferences pluginAllowedRunTime]): Added.
2368         (-[WebPreferences setPluginAllowedRunTime:]): Added.
2369         * WebView/WebPreferencesPrivate.h: Added above two methods.
2370         * WebView/WebUIDelegatePrivate.h: Added shouldHaltPlugin delegate.
2371         * WebView/WebView.mm:
2372         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
2373         Setup a new WebPluginHalterClient.
2374         (-[WebView _preferencesChangedNotification:]): Update WebCore settings accordingly.
2375         * WebCoreSupport/WebPluginHalterClient.h: Added.
2376         * WebCoreSupport/WebPluginHalterClient.mm: Added.
2377         (WebPluginHalterClient::WebPluginHalterClient):
2378         (WebPluginHalterClient::shouldHaltPlugin): Added, invoke the delegate.
2379
2380 2009-10-05  Simon Fraser  <simon.fraser@apple.com>
2381
2382         More build fixes for Tiger.
2383
2384         * WebView/WebVideoFullscreenController.mm:
2385
2386 2009-10-05  Simon Fraser  <simon.fraser@apple.com>
2387
2388         More build fixes for Tiger.
2389
2390         * WebView/WebVideoFullscreenController.mm:
2391         (-[WebVideoFullscreenWindow animationDidEnd:]):
2392         * WebView/WebWindowAnimation.m:
2393
2394 2009-10-05  Simon Fraser  <simon.fraser@apple.com>
2395
2396         More build fixes for Tiger.
2397
2398         * WebView/WebVideoFullscreenController.mm:
2399         * WebView/WebVideoFullscreenHUDWindowController.mm:
2400         (-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]):
2401         (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]):
2402         (-[WebVideoFullscreenHUDWindowController fadeWindowIn]):
2403         (-[WebVideoFullscreenHUDWindowController fadeWindowOut]):
2404         (-[WebVideoFullscreenHUDWindowController closeWindow]):
2405
2406 2009-10-05  Simon Fraser  <simon.fraser@apple.com>
2407
2408         Build fixes for Tiger.
2409
2410         * WebView/WebVideoFullscreenHUDWindowController.h:
2411         * WebView/WebVideoFullscreenHUDWindowController.mm:
2412         (-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]):
2413         (-[WebVideoFullscreenHUDWindowController dealloc]):
2414         (-[WebVideoFullscreenHUDWindowController closeWindow]):
2415         (-[WebVideoFullscreenHUDWindowController windowDidLoad]):
2416
2417 2009-10-05  Simon Fraser  <simon.fraser@apple.com>
2418
2419         Build fix. If you call Node::hasTagName(), you also have to include Element.h.
2420
2421         * WebCoreSupport/WebChromeClient.mm:
2422
2423 2009-10-05  Pierre d'Herbemont  <pdherbemont@webkit.org>
2424
2425         Reviewed by Simon Fraser
2426         
2427         Support fullscreen in MediaPlayer (Mac)
2428         https://bugs.webkit.org/show_bug.cgi?id=26742
2429
2430         Add a fullscreen button to the <video> controller if the media engine,
2431         and the theme have support for fullscreen, and can show appropriate controls.
2432         Clicking the button calls through the ChromeClient to the WebVideoFullscreenController
2433         in WebKit to do a nice animation to fullscreen, with a custom controller.
2434
2435         * WebCoreSupport/WebChromeClient.h:
2436         * WebCoreSupport/WebChromeClient.mm:
2437         (WebChromeClient::supportsFullscreenForNode):
2438         (WebChromeClient::enterFullscreenForNode):
2439         (WebChromeClient::exitFullscreenForNode):
2440         New methods to ask whether fullscreen is possible for a given node, and
2441         notifications on enterying and exiting fullscreen.
2442         
2443         * WebView/WebVideoFullscreenController.h: Added.
2444         * WebView/WebVideoFullscreenController.mm: Added.
2445         WebVideoFullscreenController is responsible for creating the fullscreen window,
2446         and coordinating the various animations when going fullscreen.
2447
2448         * WebView/WebVideoFullscreenHUDWindowController.h: Added.
2449         * WebView/WebVideoFullscreenHUDWindowController.mm: Added.
2450         This class manages the heads-up display (HUD) control bar.
2451
2452         * WebView/WebView.mm:
2453         (-[WebView _close]):
2454         Make sure we come out of fullscreen if the WebView is torn down (e.g. if
2455         you close a background window).
2456
2457         (-[WebView _enterFullscreenForNode:WebCore::]):
2458         Make a WebVideoFullscreenController and tell is to start to go fullscreen.
2459         
2460         (-[WebView _exitFullscreen]):
2461         Tell the WebVideoFullscreenController to come out of fullscreen, and clean up.
2462         
2463         * WebView/WebViewData.h:
2464         * WebView/WebViewData.mm:
2465         (-[WebViewPrivate dealloc]):
2466         (-[WebViewPrivate finalize]):
2467         * WebView/WebViewInternal.h:
2468         Keep a pointer to the WebVideoFullscreenController.
2469         
2470         * WebView/WebWindowAnimation.h: Added.
2471         * WebView/WebWindowAnimation.m: Added.
2472         (WebWindowAnimationDurationFromDuration):
2473         (scaledRect):
2474         (squaredDistance):
2475         Handle the animations used during the transitition to fullscreen.
2476
2477 2009-10-05  Anders Carlsson  <andersca@apple.com>
2478
2479         Reviewed by Kevin Decker.
2480        
2481         WebKit side of <rdar://problem/7179166>
2482        
2483         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
2484         Add an m_pluginIsWaitingForDraw member variable.
2485         
2486         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2487         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
2488         Initialize m_pluginIsWaitingForDraw.
2489         
2490         (WebKit::NetscapePluginInstanceProxy::invalidateRect):
2491         Set m_pluginIsWaitingForDraw to true.
2492         
2493         (WebKit::NetscapePluginInstanceProxy::didDraw):
2494         If m_pluginIsWaitingForDraw is true, call _WKPHPluginInstanceDidDraw.
2495         
2496         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2497         (-[WebHostedNetscapePluginView drawRect:]):
2498         Call didDraw.
2499         
2500         * Plugins/Hosted/WebKitPluginHost.defs:
2501         Add PHPluginInstanceDidDraw.
2502
2503 2009-10-02  Chris Marrin  <cmarrin@apple.com>
2504
2505         Reviewed by Adele Peterson.
2506
2507         Add functionality to pause/throttle CSS transitions/animations in a WebView
2508         https://bugs.webkit.org/show_bug.cgi?id=29942
2509
2510         Added both a setter and getter function
2511
2512         * WebView/WebView.mm:
2513         (-[WebView cssAnimationsSuspended]):
2514         (-[WebView setCSSAnimationsSuspended:]):
2515         * WebView/WebViewData.h:
2516         * WebView/WebViewData.mm:
2517         (-[WebViewPrivate init]):
2518         * WebView/WebViewPrivate.h:
2519
2520 2009-10-04  Kevin Decker  <kdecker@apple.com>
2521
2522         Reviewed by Sam Weinig.
2523
2524         <rdar://problem/7273363> Plug-ins should use PluginHalter
2525         
2526         * Plugins/WebBaseNetscapePluginView.h: Add WebHaltablePlugin forward declare and _haltable ivar.
2527         * Plugins/WebBaseNetscapePluginView.mm:
2528         (WebHaltablePlugin::WebHaltablePlugin): Added.
2529         (WebHaltablePlugin::halt): New method that stops a plug-in.
2530         (WebHaltablePlugin::restart): New method that starts a plug-in.
2531         (WebHaltablePlugin::node): Added. Provides the DOMNode corresponding to the plug-in in WebBaseNetscapePluginView.
2532         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
2533         Initialize new _haltable ivar.
2534         (-[WebBaseNetscapePluginView start]): Call the page's didStartPlugin() upon starting a plug-in.
2535         (-[WebBaseNetscapePluginView stop]): Call the page's didStopPlugin() upon stopping a plug-in.
2536
2537 2009-10-05  Pavel Feldman  <pfeldman@chromium.org>
2538
2539         Reviewed by Timothy Hatcher.
2540
2541         Web Inspector: add testing harness for Web Inspector.
2542
2543         https://bugs.webkit.org/show_bug.cgi?id=30010
2544
2545         * WebInspector/WebInspector.mm:
2546         (-[WebInspector evaluateInFrontend:callId:script:]):
2547         * WebInspector/WebInspectorPrivate.h: Added.
2548
2549 2009-10-04  Kevin Decker  <kdecker@apple.com>
2550
2551         Reviewed by Cameron Zwarich.
2552
2553         * WebView/WebPreferenceKeysPrivate.h: Added new key.
2554         * WebView/WebPreferences.mm:
2555         (+[WebPreferences initialize]): Leave plug-in halting disabled by default.
2556         (-[WebPreferences pluginHalterEnabled]): Added.
2557         (-[WebPreferences setPluginHalterEnabled:]): Ditto.
2558         * WebView/WebPreferencesPrivate.h: Added above new methods. 
2559
2560 2009-10-02  Dave Hyatt  <hyatt@apple.com>
2561
2562         Reviewed by Adam Roben.
2563
2564         Add support for blacklist patterns to user stylesheets and scripts in addition to whitelist patterns.
2565
2566         * WebView/WebView.mm:
2567         (toStringVector):
2568         (+[WebView _addUserScriptToGroup:source:url:worldID:whitelist:blacklist:injectionTime:]):
2569         (+[WebView _addUserStyleSheetToGroup:source:url:worldID:whitelist:blacklist:]):
2570         * WebView/WebViewPrivate.h:
2571
2572 2009-10-01  Mark Rowe  <mrowe@apple.com>
2573
2574         Fix the Tiger build.  Don't unconditionally enable 3D canvas as it is not supported on Tiger.
2575
2576         * Configurations/FeatureDefines.xcconfig:
2577
2578 2009-10-01  Chris Marrin  <cmarrin@apple.com>
2579
2580         Reviewed by Oliver Hunt.
2581
2582         Turn on ENABLE_3D_CANVAS in TOT
2583         https://bugs.webkit.org/show_bug.cgi?id=29906
2584
2585         * Configurations/FeatureDefines.xcconfig:
2586         * WebView/WebPreferenceKeysPrivate.h:
2587         * WebView/WebPreferences.mm:
2588         (+[WebPreferences initialize]):
2589         (-[WebPreferences webGLEnabled]):
2590         (-[WebPreferences setWebGLEnabled:]):
2591         * WebView/WebPreferencesPrivate.h:
2592         * WebView/WebView.mm:
2593         (-[WebView _preferencesChangedNotification:]):
2594
2595 2009-09-30  Sam Weinig  <sam@webkit.org>
2596
2597         Reviewed by Dan Bernstein.
2598
2599         Fix for <rdar://problem/7259706>
2600         Need WebKit API or SPI on Mac and Windows to test whether it's safe to load a page in a new tab/window
2601
2602         * WebView/WebFrame.mm:
2603         (-[WebFrame _allowsFollowingLink:]):
2604         * WebView/WebFramePrivate.h:
2605
2606 2009-09-30  Dave Hyatt  <hyatt@apple.com>
2607
2608         Reviewed by Adam Roben.
2609
2610         Add the ability to remove user stylesheets and scripts by URL.
2611
2612         * WebView/WebView.mm:
2613         (+[WebView _removeUserContentFromGroup:url:worldID:]):
2614         * WebView/WebViewPrivate.h:
2615
2616 2009-09-29  Brady Eidson  <beidson@apple.com>
2617
2618         Rubberstamped by Dan Bernstein.
2619
2620         Fix license and some sorting in new files.
2621
2622         * WebView/WebHistoryDelegate.h:
2623         * WebView/WebNavigationData.h:
2624         * WebView/WebNavigationData.mm:
2625
2626 2009-09-29  Brady Eidson  <beidson@apple.com>
2627
2628         Reviewed by John Sullivan.
2629
2630         WebKit Mac API should provide a delegate interface for global history.
2631         <rdar://problem/7042773> and https://webkit.org/b/29904
2632
2633         * WebView/WebHistoryDelegate.h: Added. New interface for WebKit clients to implement to manage 
2634           their own global history store.
2635
2636         Object to store all of the bits of data relevant to a page visit:
2637         * WebView/WebNavigationData.h: Added.
2638         * WebView/WebNavigationData.mm: Added.
2639         (-[WebNavigationDataPrivate dealloc]):
2640         (-[WebNavigationData initWithURLString:title:originalRequest:response:hasSubstituteData:clientRedirectSource:]):
2641         (-[WebNavigationData url]):
2642         (-[WebNavigationData title]):
2643         (-[WebNavigationData originalRequest]):
2644         (-[WebNavigationData response]):
2645         (-[WebNavigationData hasSubstituteData]):
2646         (-[WebNavigationData clientRedirectSource]):
2647         (-[WebNavigationData dealloc]):
2648
2649         * WebCoreSupport/WebFrameLoaderClient.mm:
2650         (WebFrameLoaderClient::updateGlobalHistory): If the delegate exists, don't use the built-in WebHistory.
2651           If the implementation for this method exists, call it.
2652         (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): Ditto
2653
2654         * WebView/WebDelegateImplementationCaching.h:
2655         * WebView/WebDelegateImplementationCaching.mm:
2656         (WebViewGetHistoryDelegateImplementations):
2657         (CallHistoryDelegate):
2658
2659         * WebView/WebView.mm:
2660         (-[WebView _cacheHistoryDelegateImplementations]):
2661         (-[WebView setHistoryDelegate:]):
2662         (-[WebView historyDelegate]):
2663         * WebView/WebViewData.h:
2664         * WebView/WebViewPrivate.h:
2665
2666 2009-09-29  Kenneth Russell  <kbr@google.com>
2667
2668         Reviewed by Dimitri Glazkov.
2669
2670         Add support for run-time flag for 3D canvas
2671         https://bugs.webkit.org/show_bug.cgi?id=29826
2672
2673         * WebView/WebView.mm:
2674         (-[WebView _preferencesChangedNotification:]): Enable experimental
2675         WebGL flag when 3D_CANVAS is enabled in the build.
2676
2677 2009-09-28  Fumitoshi Ukai  <ukai@chromium.org>
2678
2679         Reviewed by Eric Seidel.
2680
2681         Add experimentalWebSocketsEnabled in WebPreferences.
2682         https://bugs.webkit.org/show_bug.cgi?id=28941
2683
2684         * WebView/WebPreferenceKeysPrivate.h:
2685         * WebView/WebPreferences.mm:
2686         (+[WebPreferences initialize]):
2687         (-[WebPreferences experimentalWebSocketsEnabled]):
2688         (-[WebPreferences setExperimentalWebSocketsEnabled:]):
2689         * WebView/WebPreferencesPrivate.h:
2690         * WebView/WebView.mm:
2691         (-[WebView _preferencesChangedNotification:]):
2692
2693 2009-09-28  Dan Bernstein  <mitz@apple.com>
2694
2695         Reviewed by Anders Carlsson.
2696
2697         <rdar://problem/7240911> REGRESSION (r48586): Crash occurs when loading
2698         a PDF
2699
2700         CGPDFObjectRef is not a CFTypeRef, and cannot be retained or released.
2701         Its lifetime is managed by its container. Just use a Vector to store
2702         CGPDFObjectRefs, relying on the CGPDFDocument to keep them alive.
2703
2704         * WebView/WebPDFDocumentExtras.mm:
2705         (appendValuesInPDFNameSubtreeToVector):
2706         (getAllValuesInPDFNameTree):
2707         (web_PDFDocumentAllScripts):
2708
2709 2009-09-24  Jon Honeycutt  <jhoneycutt@apple.com>
2710
2711         Reviewed by Alice Liu.
2712
2713         * WebView/WebView.mm:
2714         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
2715         Pass 0 for new Page constructor argument.
2716
2717 2009-09-14  John Gregg  <johnnyg@google.com>
2718
2719         Reviewed by Eric Seidel.
2720
2721         isEnabled switch for notifications (experimental) in Page Settings
2722         https://bugs.webkit.org/show_bug.cgi?id=28930
2723
2724         Adds support for the experimentalNotificationsEnabled flag in Settings
2725         through WebPreferencesPrivate.
2726
2727         * WebView/WebPreferenceKeysPrivate.h:
2728         * WebView/WebPreferences.mm:
2729         (+[WebPreferences initialize]):
2730         (-[WebPreferences experimentalNotificationsEnabled]):
2731         (-[WebPreferences setExperimentalNotificationsEnabled:]):
2732         * WebView/WebPreferencesPrivate.h:
2733         * WebView/WebView.mm:
2734         (-[WebView _preferencesChangedNotification:]):
2735
2736 2009-09-23  Geoffrey Garen  <ggaren@apple.com>
2737
2738         Reviewed by Sam Weinig.
2739
2740         Updated for a WebCore rename.
2741
2742         * WebView/WebFrame.mm:
2743         (-[WebFrame _cacheabilityDictionary]):
2744
2745 2009-09-23  Darin Adler  <darin@apple.com>
2746
2747         Reviewed by Dan Bernstein.
2748
2749         Speed up access to history items by caching date computation.
2750
2751         * History/WebHistory.mm:
2752         (getDayBoundaries): Refactored from timeIntervalForBeginningOfDay.
2753         Returns the beginning of the day that the passed time is within and
2754         the beginning of the next day.
2755         (beginningOfDay): Added. Uses getDayBoundaries so it can be fast for
2756         multiple dates within the same day, which is the common case.
2757         (dateKey): Added. Calls beginningOfDay and converts to an integer.
2758         (-[WebHistoryPrivate findKey:forDay:]): Changed to call dateKey
2759         insetad of timeIntervalForBeginningOfDay.
2760
2761 2009-09-23  David Kilzer  <ddkilzer@apple.com>
2762
2763         Move definition of USE(PLUGIN_HOST_PROCESS) from WebKitPrefix.h to Platform.h
2764
2765         Reviewed by Mark Rowe.
2766
2767         * WebKitPrefix.h: Removed definition of
2768         WTF_USE_PLUGIN_HOST_PROCESS.
2769
2770 2009-09-22  Timothy Hatcher  <timothy@apple.com>
2771
2772         Prevent scrolling multiple frames during latched wheel events.
2773
2774         Reviewed by Anders Carlsson.
2775
2776         * WebView/WebDynamicScrollBarsView.h:
2777         * WebView/WebDynamicScrollBarsView.mm:
2778         (-[WebDynamicScrollBarsView scrollWheel:]):
2779
2780 2009-09-22  Dan Bernstein  <mitz@apple.com>
2781
2782         Reviewed by John Sullivan.
2783
2784         <rdar://problem/7240911> REGRESSION (r48586): Crash occurs when loading
2785         a PDF
2786
2787         * WebView/WebPDFDocumentExtras.mm:
2788         (addWebPDFDocumentExtras): Made methodList static, because
2789         class_addMethods() doesn't copy it.
2790
2791 2009-09-21  Dan Bernstein  <mitz@apple.com>
2792
2793         Attempt to fix the Tiger build
2794
2795         * WebView/WebPDFDocumentExtras.mm:
2796         (addWebPDFDocumentExtras):
2797
2798 2009-09-21  Dan Bernstein  <mitz@apple.com>
2799
2800         Attempt to fix the Tiger build
2801
2802         * WebView/WebPDFDocumentExtras.mm:
2803         (web_PDFDocumentAllScripts):
2804         (addWebPDFDocumentExtras):
2805
2806 2009-09-21  Dan Bernstein  <mitz@apple.com>
2807
2808         Attempt to fix the Tiger build
2809
2810         * WebView/WebPDFDocumentExtras.mm:
2811         * WebView/WebPDFRepresentation.mm:
2812
2813 2009-09-21  Dan Bernstein  <mitz@apple.com>
2814
2815         Attempt to fix the Leopard and Tiger builds
2816
2817         * WebView/WebPDFDocumentExtras.mm:
2818
2819 2009-09-21  Dan Bernstein  <mitz@apple.com>
2820
2821         Reviewed by Anders Carlsson.
2822
2823         <rdar://problem/4137135> iFrame with PDF not being handled correctly on
2824         usps.com
2825         https://bugs.webkit.org/show_bug.cgi?id=4151
2826
2827         * WebView/WebJSPDFDoc.h: Added.
2828         * WebView/WebJSPDFDoc.mm: Added.
2829         (jsPDFDocInitialize): Retains the WebDataSource.
2830         (jsPDFDocFinalize): Releases the WebDataSource.
2831         (jsPDFDocPrint): Call the WebUIDelegate method -webView:printFrameView:
2832         with the PDF document's view.
2833         (makeJSPDFDoc): Makes and returns a JavaScript Doc instance that wraps
2834         the WebDataSource.
2835         * WebView/WebPDFDocumentExtras.h: Added.
2836         * WebView/WebPDFDocumentExtras.mm: Added.
2837         (appendValuesInPDFNameSubtreeToArray): Traverses a subtree of a PDF name
2838         tree and adds all values in the subtree to an array.
2839         (allValuesInPDFNameTree): Returns an array with all of the values in a
2840         PDF name tree.
2841         (web_PDFDocumentAllScripts): This is the implementation of -[PDFDocument
2842         _web_allScripts]. It gets all values in the document-level "JavaScript"
2843         name tree, which are action dictionaries, and returns an array of the
2844         actions' scripts.
2845         (addWebPDFDocumentExtras): Adds the -_web_allScripts method to
2846         PDFDocument.
2847         * WebView/WebPDFRepresentation.h:
2848         * WebView/WebPDFRepresentation.m: Removed.
2849         * WebView/WebPDFRepresentation.mm: Copied from WebKit/mac/WebView/WebPDFRepresentation.m.
2850         (+[WebPDFRepresentation initialize]): Added. Calls
2851         addWebPDFDocumentExtras().
2852         (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Get the
2853         scripts from the PDF document, create a JavaScript Doc object for the
2854         document, and a JavaScript execution context, then execute every script
2855         in the context, with the Doc object as "this".
2856
2857 2009-09-17  Simon Fraser  <simon.fraser@apple.com>
2858
2859         Reviewed by Dave Hyatt.
2860
2861         Compositing layers are incorrectly positioned after scrolling with position:fixed
2862         https://bugs.webkit.org/show_bug.cgi?id=29262
2863         
2864         When scrolling a page with compositing layers inside a position:fixed element,
2865         we need to update the compositing layer positions when the scroll position changes.
2866
2867         * WebView/WebHTMLView.mm:
2868         (-[WebHTMLView _frameOrBoundsChanged]):
2869         Call the new FrameView::scrollPositionChanged() method rather than sending the
2870         scroll event directly.
2871
2872 2009-09-17  Kenneth Rohde Christiansen  <kenneth@webkit.org>
2873
2874         Reviewed by Simon Hausmann.
2875
2876         Make PlatformWindow return something else than PlatformWidget
2877         https://bugs.webkit.org/show_bug.cgi?id=29085
2878
2879         Reflect the rename of platformWindow and it's return type.
2880
2881         * WebCoreSupport/WebChromeClient.h:
2882         * WebCoreSupport/WebChromeClient.mm:
2883         (WebChromeClient::platformPageClient):
2884
2885 2009-09-17  Anders Carlsson  <andersca@apple.com>
2886
2887         Reviewed by Oliver Hunt.
2888
2889         <rdar://problem/7007541> 
2890         CrashTracer: 4800+ crashes in Safari at com.apple.WebKit • WTF::HashTableIterator...
2891
2892         Add null checks for m_instanceProxy (It will be null when a plug-in has crashed).
2893         
2894         * Plugins/Hosted/ProxyInstance.mm:
2895         (WebKit::ProxyInstance::invoke):
2896         (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
2897         (WebKit::ProxyInstance::supportsConstruct):
2898         (WebKit::ProxyInstance::getPropertyNames):
2899         (WebKit::ProxyInstance::methodsNamed):
2900         (WebKit::ProxyInstance::fieldNamed):
2901         (WebKit::ProxyInstance::fieldValue):
2902         (WebKit::ProxyInstance::setFieldValue):
2903         (WebKit::ProxyInstance::invalidate):
2904
2905 2009-09-16  Simon Fraser  <simon.fraser@apple.com>
2906
2907         Reviewed by Dan Bernstein.
2908
2909         Work around a bug in AppKit on Leopard which causes compositing layers to jitter, and
2910         become misplaced when the WebHTMLView is resized or scrolled sometimes.
2911         <rdar://problem/7071636>
2912         
2913         The previous fix didn't fix the case where the layers jiggle when resizing the docked
2914         inspector when the view size is over 2048px tall, on Leopard.
2915
2916         * WebView/WebHTMLView.mm:
2917         (-[WebHTMLView _updateLayerHostingViewPosition]):
2918
2919 2009-09-16  Simon Fraser  <simon.fraser@apple.com>
2920
2921         Reviewed by Oliver Hunt.
2922
2923         Work around a bug in AppKit on Leopard which causes compositing layers to jitter, and
2924         become misplaced when the WebHTMLView is resized or scrolled sometimes.
2925         <rdar://problem/7071636>
2926         
2927         We call an internal AppKit method to make sure the layer geometry is updated correctly.
2928
2929         * WebView/WebHTMLView.mm:
2930         (-[WebHTMLView _updateLayerHostingViewPosition]):
2931
2932 2009-09-15  Simon Fraser  <simon.fraser@apple.com>
2933
2934         Reviewed by Dan Bernstein.
2935
2936         Fixed position elements flash when CSS transforms are applied on page > 2048px tall
2937         https://bugs.webkit.org/show_bug.cgi?id=27272
2938         
2939         Update the previous workaround for misplaced compositing layers, which used a 4096px
2940         threshold, to 2048px since that's the GPU max texture size on some older hardware.
2941
2942         * WebView/WebHTMLView.mm:
2943         (-[WebHTMLView _updateLayerHostingViewPosition]):
2944
2945 2009-09-15  Alex Milowski  <alex@milowski.com>
2946
2947         Reviewed by Tor Arne Vestbø.
2948
2949         Added the ENABLE_MATHML to the feaure defines
2950
2951         * Configurations/FeatureDefines.xcconfig:
2952
2953 2009-09-15  Mark Rowe  <mrowe@apple.com>
2954
2955         Reviewed by Anders Carlsson.
2956
2957         <rdar://problem/7224378> REGRESSION(r48360): Dragging a tab with a plug-in out of a window, the plug-in gets slow and confused
2958
2959         In r48360, the fix for <rdar://problem/7090444>, I neglected to consider the case where the plug-in had already been started and
2960         -start would do an early-return rather than calling -restartTimers and -addWindowObservers itself.
2961
2962         * Plugins/WebBaseNetscapePluginView.mm:
2963         (-[WebBaseNetscapePluginView viewDidMoveToWindow]): Reinstate the call to -restartTimers and -addWindowObservers, but guard them
2964         with a check that the view is still in the window.
2965
2966 2009-09-14  Brady Eidson  <beidson@apple.com>
2967
2968         Reviewed by Alexey Proskuryakov.
2969
2970         Safari 4 cannot be used to update firmware on Linksys routers.
2971         <rdar://problem/7174050> and https://bugs.webkit.org/show_bug.cgi?id=29160
2972
2973         Adopt the new WebCore::CredentialStorage in WebKit/Mac.
2974
2975         * Misc/WebDownload.mm:
2976         (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):
2977         * Plugins/WebBaseNetscapePluginView.mm:
2978         (WebKit::getAuthenticationInfo):
2979
2980 2009-09-12  Mark Rowe  <mrowe@apple.com>
2981
2982         Reviewed by Anders Carlsson.
2983
2984         Fix <rdar://problem/7090444> Crashes in-[WebBaseNetscapePluginView stop] handling NSWindowWillCloseNotification.
2985
2986         It's not valid to call -addWindowObservers when the view is not in a window, but this can happen when -start
2987         initializes a plug-in and the plug-in removes itself from the document during initialization.  -viewDidMoveToWindow
2988         calls -start and then calls -addWindowObservers without ensuring that the view is still in a window.
2989
2990         If -[WebBaseNetscapePluginView addWindowObservers] is incorrectly called when the view is not in a window, it will
2991         observe NSWindowWillCloseNotification on all windows.  This unexpected observer registration is not balanced by an
2992         unregistration so the notification can be delivered after the view is deallocated, causing the crash seen in
2993         <rdar://problem/7090444>.
2994
2995         * Plugins/WebBaseNetscapePluginView.mm:
2996         (-[WebBaseNetscapePluginView start]): Only call -updateAndSetWindow if we still have a current window.
2997         (-[WebBaseNetscapePluginView viewDidMoveToWindow]): Remove unnecessary calls to -restartTimers and -addWindowObservers
2998         from -[WebBaseNetscapePluginView viewDidMoveToWindow].  They are already called from within -start with the extra benefit
2999         of ensuring that the view is still in a window when they are called.
3000
3001 2009-09-11  Mark Rowe  <mrowe@apple.com>
3002
3003         Reviewed by Jon Honeycutt.
3004
3005         Fix <rdar://problem/7145242> Crashes inside WTF::HashTable below NetscapePluginInstanceProxy::disconnectStream
3006
3007         * Plugins/Hosted/HostedNetscapePluginStream.mm:
3008         (WebKit::HostedNetscapePluginStream::cancelLoad): Canceling the load can result in calling through to disconnectStream.
3009         If the plug-in instance holds the last reference to the plug-in stream this will result in the stream being deallocated.
3010         This leads to HostedNetscapePluginStream::cancelLoad's call to disconnectStream being passed a deallocated stream object.
3011         Since the stream was already disconnected by the call to cancel there's no need to call disconnectStream a second time.
3012
3013 2009-09-11  Eric Seidel  <eric@webkit.org>
3014
3015         No review, rolling out r48229.
3016         http://trac.webkit.org/changeset/48229
3017
3018         * WebView/WebFrame.mm:
3019         (-[WebFrame _dragSourceMovedTo:]):
3020
3021 2009-09-10  Mark Rowe  <mrowe@apple.com>
3022
3023         Rubber-stamped by Sam Weinig.
3024
3025         Update JavaScriptCore and WebKit's FeatureDefines.xcconfig so that they are in sync with WebCore as they need to be.
3026
3027         * Configurations/FeatureDefines.xcconfig:
3028
3029 2009-09-09  Jens Alfke  <snej@chromium.org>
3030
3031         Reviewed by Eric Seidel.
3032
3033         Initialize DataTransfer's effectAllowed and dropEffect properties correctly
3034         according to HTML5 spec (sec. 7.9.2-7.9.3).
3035         https://bugs.webkit.org/show_bug.cgi?id=26700
3036
3037         * WebView/WebFrame.mm:
3038         (-[WebFrame _dragSourceMovedTo:]):
3039             Pass current drag operation (if known) to EventHandler::dragSourceMovedTo().
3040
3041 2009-09-09  Dave Hyatt  <hyatt@apple.com>
3042
3043         Reviewed by Adam Roben.
3044
3045         https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
3046         to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
3047         to all Frames in the PageGroup.
3048
3049         Added userscripts/simple-stylesheet.html test case.
3050
3051         * WebView/WebView.mm:
3052         (+[WebView _addUserStyleSheetToGroup:source:url:worldID:patterns:]):
3053         * WebView/WebViewPrivate.h:
3054
3055 2009-09-07  Steve Block  <steveblock@google.com>
3056
3057         Reviewed by Adam Barth.
3058
3059         Adds a mock Geolocation service. This will be used to provide predictable behavior of the
3060         Geolocation API for use in LayoutTests. Later changes will integrate the the mock
3061         Geolocation service with DumpRenderTree.
3062         https://bugs.webkit.org/show_bug.cgi?id=28264
3063
3064         * WebCoreSupport/WebGeolocationMockPrivate.h: Added.
3065         * WebCoreSupport/WebGeolocationMock.mm: Added.
3066         (+[WebGeolocationMock setError:code:]): Added. Used by DumpRender tree to configure the mock Geolocation service.
3067         (+[WebGeolocationMock setPosition:latitude:longitude:accuracy:]): Added. Used by DumpRender tree to configure the mock Geolocation service.
3068         * WebKit.exp: Modified. Exports WebGeolocationMock.
3069
3070 2009-09-07  Drew Wilson  <atwilson@google.com>
3071
3072         Reviewed by David Levin.
3073
3074         Enable SHARED_WORKERS by default.
3075         https://bugs.webkit.org/show_bug.cgi?id=28959
3076
3077         * Configurations/FeatureDefines.xcconfig:
3078
3079 2009-09-06  Cameron McCormack  <cam@mcc.id.au>
3080
3081         Reviewed by Eric Seidel.
3082
3083         Drop <definition-src> support
3084         https://bugs.webkit.org/show_bug.cgi?id=28991
3085
3086         * MigrateHeaders.make: Remove reference to ObjC definition-src
3087         binding class.
3088
3089 2009-09-04  Mark Mentovai  <mark@chromium.org>
3090
3091         Reviewed by Dave Hyatt.
3092
3093         https://bugs.webkit.org/show_bug.cgi?id=28614
3094
3095         Account for scrollbar state changes that occur during layout.
3096
3097         * WebView/WebDynamicScrollBarsView.mm:
3098         (-[WebDynamicScrollBarsView updateScrollers]):
3099
3100         Perform a layout prior to checking whether the scrollbar modes are
3101         off, on, or automatic.  The modes may change during layout.
3102
3103         * WebView/WebFrameView.mm:
3104         (-[WebFrameView _install]):
3105
3106         Eliminate duplicated (and incorrect) scrollbar mode tracking between
3107         FrameView and ScrollView.
3108
3109 2009-09-03  Dave Hyatt  <hyatt@apple.com>
3110
3111         Reviewed by Adam Roben.
3112
3113         https://bugs.webkit.org/show_bug.cgi?id=28890, make simple user script injection work.
3114         
3115         This patch adds new API for adding and removing user scripts from page groups.  User scripts
3116         are bundled together in isolated worlds (you can have multiple scripts together in the same
3117         world).
3118
3119         Added userscripts/ directory for holding new tests (along with a simple test of script injection).
3120
3121         * WebView/WebView.mm:
3122         (+[WebView _addUserScriptToGroup:source:url:worldID:patterns:injectionTime:]):
3123         (+[WebView _removeUserContentFromGroup:worldID:]):
3124         (+[WebView _removeAllUserContentFromGroup:]):
3125         * WebView/WebViewPrivate.h:
3126
3127 2009-09-04  Adam Barth  <abarth@webkit.org>
3128
3129         Reviewed by Eric Seidel.
3130
3131         https://bugs.webkit.org/show_bug.cgi?id=24696
3132
3133         Plumb mixed content notifications to WebFrameLoadDelegatePrivate.
3134
3135         * WebCoreSupport/WebFrameLoaderClient.mm:
3136         (WebFrameLoaderClient::didDisplayInsecureContent):
3137         (WebFrameLoaderClient::didRunInsecureContent):
3138         * WebView/WebDelegateImplementationCaching.h:
3139         * WebView/WebFrameLoadDelegatePrivate.h: Added.
3140
3141 2009-09-03  Adam Barth  <abarth@webkit.org>
3142
3143         Unreviewed build fix.
3144
3145         Change notImplemented() to a FIXME.
3146
3147         * WebCoreSupport/WebFrameLoaderClient.mm:
3148         (WebFrameLoaderClient::didDisplayInsecureContent):
3149         (WebFrameLoaderClient::didRunInsecureContent):
3150
3151 2009-09-03  Adam Barth  <abarth@webkit.org>
3152
3153         Reviewed by eric@webkit.org.
3154
3155         https://bugs.webkit.org/show_bug.cgi?id=24696
3156
3157         Plumb mixed content notifications to WebFrameLoadDelegatePrivate.
3158
3159         * WebCoreSupport/WebFrameLoaderClient.mm:
3160         (WebFrameLoaderClient::didDisplayInsecureContent):
3161         (WebFrameLoaderClient::didRunInsecureContent):
3162         * WebView/WebDelegateImplementationCaching.h:
3163         * WebView/WebFrameLoadDelegatePrivate.h: Added.
3164
3165 2009-09-03  Adam Barth  <abarth@webkit.org>
3166
3167         Reviewed by Eric Seidel.
3168
3169         https://bugs.webkit.org/show_bug.cgi?id=24696
3170
3171         Stub implementations of mixed content methods of FrameLoaderClient. 
3172
3173         * WebCoreSupport/WebFrameLoaderClient.h:
3174         * WebCoreSupport/WebFrameLoaderClient.mm:
3175         (WebFrameLoaderClient::didDisplayInsecureContent):
3176         (WebFrameLoaderClient::didRunInsecureContent):
3177
3178 2009-09-02  Brady Eidson  <beidson@apple.com>
3179
3180         Reviewed by Darin Adler.
3181
3182         More partial work towards "Page Cache should support pages with Frames"
3183         https://bugs.webkit.org/show_bug.cgi?id=13631
3184
3185         * WebView/WebHTMLView.mm:
3186         (-[WebHTMLView _topHTMLView]): Rework the ASSERT in this method to reflect the
3187           reality of calling this method for pages currently in the PageCache.
3188
3189 2009-08-31  Dimitri Glazkov  <dglazkov@chromium.org>
3190
3191     Reverting http://trac.webkit.org/changeset/47904, because it caused
3192     layout test failure.
3193
3194 2009-08-31  Alexey Proskuryakov  <ap@webkit.org>
3195
3196         Reviewed by Darin Adler.
3197
3198         https://bugs.webkit.org/show_bug.cgi?id=28852
3199         Rename KURL single argument constructor to avoid confusion
3200
3201         * WebView/WebScriptDebugger.mm: (toNSURL): Adapt to the change.
3202
3203 2009-08-31  Mark Mentovai  <mark@chromium.org>
3204
3205         Reviewed by Dave Hyatt.
3206
3207         https://bugs.webkit.org/show_bug.cgi?id=28614
3208
3209         Perform a layout prior to checking whether the scrollbar modes are
3210         off, on, or automatic.  The modes may change during layout.
3211
3212         * WebView/WebDynamicScrollBarsView.mm:
3213         (-[WebDynamicScrollBarsView updateScrollers]):
3214
3215 2009-08-28  Chris Fleizach  <cfleizach@apple.com>
3216
3217         Reviewed by John Sullivan.
3218
3219         update-webkit-localizable-strings script can no longer complete
3220         https://bugs.webkit.org/show_bug.cgi?id=28792
3221
3222         * WebCoreSupport/WebViewFactory.mm:
3223         (-[WebViewFactory AXARIAContentGroupText:]):
3224
3225 2009-08-28  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
3226
3227         Reviewed by Holger Freyther.
3228
3229         https://bugs.webkit.org/show_bug.cgi?id=25889
3230         [GTK] scrollbar policy for main frame is not implementable
3231
3232         Add empty implementation for new ChromeClient method.
3233
3234         * WebCoreSupport/WebChromeClient.h:
3235         (WebChromeClient::scrollbarsModeDidChange):
3236
3237 2009-08-25  Eric Carlson  <eric.carlson@apple.com>
3238
3239         Reviewed by Oliver Hunt.
3240
3241         <video> and <audio> controller should be accessible
3242         https://bugs.webkit.org/show_bug.cgi?id=28081
3243
3244         * WebCoreSupport/WebViewFactory.mm:
3245         (-[WebViewFactory localizedMediaControlElementString:]):
3246         (-[WebViewFactory localizedMediaControlElementHelpText:]):
3247         (-[WebViewFactory localizedMediaTimeDescription:]):
3248             New.
3249
3250 2009-08-24  Simon Fraser  <simon.fraser@apple.com>
3251
3252         Reviewed by NOBODY (build fix)
3253
3254         Turn off ENABLE_3D_CANVAS in the xconfig files.
3255
3256         * Configurations/FeatureDefines.xcconfig:
3257
3258 2009-08-22  Adam Barth  <abarth@webkit.org>
3259
3260         Revert 47684.  We're going to do this later once clients have had a
3261         chance to opt into the setting they like.
3262
3263         * Misc/WebKitVersionChecks.h:
3264         * WebView/WebPreferences.mm:
3265         (+[WebPreferences initialize]):
3266
3267 2009-08-22  Adam Barth  <abarth@webkit.org>
3268
3269         Reviewed by Eric Seidel.
3270
3271         Don't let local files access web URLs
3272         https://bugs.webkit.org/show_bug.cgi?id=28480
3273
3274         * Misc/WebKitVersionChecks.m:
3275         * WebView/WebPreferences.mm:
3276         (+[WebPreferences initialize]):
3277
3278 2009-08-21  Anders Carlsson  <andersca@apple.com>
3279
3280         Reviewed by Darin Adler.
3281
3282         <rdar://problem/7162480>
3283         Sometimes WebKit does not layout correctly when a WebView is embedded in an HICocoaView
3284         
3285         Add a null check for the current context when reflectScrolledClipView: is called from outside a 
3286         draw operation.
3287         
3288         * WebView/WebDynamicScrollBarsView.mm:
3289         (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
3290
3291 2009-08-20  Chris Fleizach  <cfleizach@apple.com>
3292
3293         Reviewed by Darin Adler.
3294
3295         Enable various "grouping" ARIA roles
3296         https://bugs.webkit.org/show_bug.cgi?id=28486
3297
3298         * WebCoreSupport/WebViewFactory.mm:
3299         (-[WebViewFactory AXARIAContentGroupText:]):
3300
3301 2009-08-19  Mark Rowe  <mrowe@apple.com>
3302
3303         Reviewed by Dan Bernstein.
3304
3305         Fix <http://webkit.org/b/28484> Plug-in-related leaks seen on the build bot
3306
3307         When the plug-in data is being loaded manually there is a reference cycle between the
3308         NetscapePluginInstanceProxy and the HostedNetscapePluginStream.  We need to explicitly
3309         break the reference cycle in NetscapePluginInstanceProxy::cleanup so that both objects
3310         will be destroyed.
3311
3312         Take the opportunity to add RefCountedLeakCounter support to HostedNetscapePluginStream
3313         and NetscapePluginInstanceProxy to simplify tracking down leaks of these objects in the future.
3314
3315         * Plugins/Hosted/HostedNetscapePluginStream.h:
3316         * Plugins/Hosted/HostedNetscapePluginStream.mm:
3317         (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
3318         (WebKit::HostedNetscapePluginStream::~HostedNetscapePluginStream):
3319         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3320         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
3321         (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
3322         (WebKit::NetscapePluginInstanceProxy::cleanup): Clear m_manualStream to break the reference
3323         cycle.
3324
3325 2009-08-19  Aaron Boodman  <aa@chromium.org>
3326
3327         Reviewed by David Levin.
3328
3329         https://bugs.webkit.org/show_bug.cgi?id=24853: Provide a way for WebKit clients to
3330         specify a more granular policy for cross-origin XHR access.
3331
3332         * WebView/WebView.mm: Add SPI to manipulate origin access whitelists.
3333         (+[WebView _whiteListAccessFromOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]): Ditto.
3334         (+[WebView _resetOriginAccessWhiteLists]): Ditto.
3335         * WebView/WebViewPrivate.h: Ditto.
3336
3337 2009-08-18  Anders Carlsson  <andersca@apple.com>
3338
3339         Reviewed by Adele Peterson.
3340
3341         Mac specific part of
3342         
3343         <rdar://problem/7135588> HTMLMediaElement should ask WebPolicyLoadDelegate before loading resource
3344
3345         * WebCoreSupport/WebFrameLoaderClient.h:
3346         * WebCoreSupport/WebFrameLoaderClient.mm:
3347         Implement shouldLoadMediaElementURL by asking the policy delegate.
3348         
3349         * WebView/WebPolicyDelegatePrivate.h:
3350         Add new delegate method, remove some unused cruft.
3351
3352 2009-08-18  Drew Wilson  <atwilson@google.com>
3353
3354         Reviewed by Eric Seidel.
3355
3356         Need to extend DumpRenderTree to expose number of worker threads.
3357         https://bugs.webkit.org/show_bug.cgi?id=28292
3358
3359         * WebKit.exp:
3360         Exported WebWorkersPrivate so DumpRenderTree can access it.
3361         * Workers/WebWorkersPrivate.h: Added.
3362         * Workers/WebWorkersPrivate.mm: Added.
3363         (+[WebWorkersPrivate workerThreadCount]):
3364         Added WebWorkersPrivate::workerThreadCount() API for DumpRenderTree.
3365
3366 2009-08-17  Darin Adler  <darin@apple.com>
3367
3368         Reviewed by Sam Weinig.
3369
3370         Use a HashMap instead of a list of if statements for the command
3371         name exception map.
3372
3373         * WebView/WebHTMLView.mm:
3374         (createSelectorExceptionMap): Added.
3375         (commandNameForSelector): Use createSelectorExceptionMap.
3376
3377 2009-08-16  David Kilzer  <ddkilzer@apple.com>
3378
3379         <http://webkit.org/b/28366> WebHTMLViewInternal.h: add @class CALayer declaration
3380
3381         Reviewed by Simon Fraser.
3382
3383         Without WebKitPrefix.h, the missing @class CALayer declaration
3384         causes a compile-time error.
3385
3386         * WebView/WebHTMLViewInternal.h: Added @class CALayer
3387         declaration with USE(ACCELERATED_COMPOSITING).
3388
3389 2009-08-16  David Kilzer  <ddkilzer@apple.com>
3390
3391         <http://webkit.org/b/28355> Replace MAX()/MIN() macros with type-safe std::max()/min() templates
3392
3393         Reviewed by Dan Bernstein.
3394
3395         * Plugins/WebBaseNetscapePluginStream.mm: Added using std::min
3396         statement.
3397         (WebNetscapePluginStream::deliverData): Changed MIN() to min().
3398         Changed C-style cast to a static_cast.
3399         * Plugins/WebNetscapePluginView.mm: Added using std::min
3400         statement.
3401         (-[WebNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]):
3402         Changed MIN() to min().  Changed C-style cast to a static_cast.
3403         * WebView/WebHTMLView.mm: Added using std::max statement.
3404         (-[WebHTMLView _dragImageForURL:withLabel:]): Changed MAX() to
3405         max().
3406         (-[WebHTMLView _scaleFactorForPrintOperation:]): Ditto.
3407         * WebView/WebTextCompletionController.mm: Added using std::max
3408         and using std::min statements.
3409         (-[WebTextCompletionController _placePopupWindow:]): Changed
3410         type of maxWidth variable from float to CGFloat to prevent a
3411         type mismatch on x86_64.  Changed MAX() to max() and MIN() to
3412         min().  Added static_cast for a constant value since CGFloat is
3413         defined as a float on i386 and as a double on x86_64.
3414
3415 2009-08-15  Adam Bergkvist  <adam.bergkvist@ericsson.com>
3416
3417         Reviewed by Sam Weinig.
3418
3419         Added ENABLE_EVENTSOURCE flag.
3420         https://bugs.webkit.org/show_bug.cgi?id=14997
3421
3422         * Configurations/FeatureDefines.xcconfig:
3423
3424 2009-08-14  Mark Rowe  <mrowe@apple.com>
3425
3426         Build fix.
3427
3428         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3429         (WebKit::NetscapePluginInstanceProxy::enumerate):  Add the necessary .get() calls.
3430
3431 2009-08-14  Brady Eidson  <beidson@apple.com>
3432
3433         Reviewed by Anders Carlsson.
3434
3435         <rdar://problem/7091546> - Assertion failure in plugins/return-error-from-new-stream-doesnt-invoke-destroy-stream.html 
3436         on 64-bit SnowLeopard
3437
3438         * Plugins/Hosted/HostedNetscapePluginStream.mm:
3439         (WebKit::HostedNetscapePluginStream::cancelLoad): Since this might be called while the FrameLoader is switching DocumentLoaders
3440           during the brief moment where there is no activeDocumentLoader(), accept and handle a validly null DocumentLoader.
3441
3442 2009-08-14  Mark Rowe  <mrowe@apple.com>
3443
3444         Reviewed by Brady Eidson.
3445
3446         Fix leaks of NSNumber and NSMutableArray objects seen during layout tests.
3447
3448         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3449         (WebKit::NetscapePluginInstanceProxy::enumerate): Don't leak an NSMutableArray that we allocate.
3450
3451 2009-08-14  Mark Rowe  <mrowe@apple.com>
3452
3453         Reviewed by Anders Carlsson.
3454
3455         Fix leaks of HostedNetscapePluginStream and NetscapePlugInStreamLoader objects seen during layout tests.
3456
3457         * Plugins/Hosted/HostedNetscapePluginStream.mm:
3458         (WebKit::HostedNetscapePluginStream::didFail): Disconnect the stream from the plug-in instance proxy
3459         when the load fails.
3460
3461 2009-08-13  Darin Adler  <darin@apple.com>
3462
3463         * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Updated includes.
3464         * WebView/WebScriptDebugger.mm: Ditto.
3465
3466 2009-08-12  Mark Rowe  <mrowe@apple.com>
3467
3468         Reviewed by Kevin Decker.
3469
3470         <rdar://problem/6017913> Replace use of HISearchWindowShow in -[WebView _searchWithSpotlightFromMenu].
3471
3472         * WebView/WebView.mm:
3473         (-[WebView _searchWithSpotlightFromMenu:]): Use -[NSWorkspace showSearchResultsForQueryString:] post-Leopard.
3474
3475 2009-08-12  Greg Bolsinga  <bolsinga@apple.com>
3476
3477         Reviewed by Eric Seidel.
3478
3479         Add delegate methods about focus and blur and state change
3480         https://bugs.webkit.org/show_bug.cgi?id=27153
3481         
3482         Have ObjC delegate methods match C++ method names in the ChromeClient.
3483
3484         * WebCoreSupport/WebChromeClient.mm:
3485         (WebChromeClient::formDidFocus):
3486         (WebChromeClient::formDidBlur):
3487         * WebView/WebUIDelegatePrivate.h:
3488
3489 2009-08-11  John Gregg  <johnnyg@google.com>
3490
3491         Reviewed by Maciej Stachowiak.
3492
3493         Desktop Notifications API
3494         https://bugs.webkit.org/show_bug.cgi?id=25643
3495
3496         Adds ENABLE_NOTIFICATION flag.
3497
3498         * Configurations/FeatureDefines.xcconfig:
3499
3500 2009-08-11  Anders Carlsson  <andersca@apple.com>
3501
3502         Reviewed by Sam Weinig.
3503
3504         Remove dead declarations.
3505         
3506         * WebView/WebViewInternal.h:
3507
3508 2009-08-11  Dmitry Titov  <dimich@chromium.org>
3509
3510         Reviewed by Adam Roben.
3511
3512         Originally implemented by Glenn Wilson <gwilson@chromium.org>.
3513
3514         Added new methods for overriding default WebPreference values
3515         and for resetting preferences to their defaults.
3516         See https://bugs.webkit.org/show_bug.cgi?id=20534
3517
3518         * WebView/WebPreferences.mm:
3519         (-[WebPreferences _setPreferenceForTestWithValue:withKey:]): added.
3520         * WebView/WebPreferencesPrivate.h: same.
3521
3522 2009-08-09  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
3523
3524         Reviewed by George Staikos.
3525
3526         [WML] Deck access control is completly broken
3527         https://bugs.webkit.org/show_bug.cgi?id=27721
3528
3529         Synchronize WebFrameLoadType with FrameLoadType enum. Append 'WebFrameLoadTypeBackWMLDeckNotAccessible'.
3530
3531         * WebView/WebFramePrivate.h:
3532
3533 2009-08-07  Simon Fraser  <simon.fraser@apple.com>
3534
3535         Fix the build on 10.6.
3536
3537         * WebView/WebHTMLView.mm:
3538         (-[WebHTMLView attachRootLayer:]):
3539
3540 2009-08-07  Simon Fraser  <simon.fraser@apple.com>
3541
3542         Fix a stylistic nit related to the location of the *, which, for some
3543         ridiculous reason, WebKit style dictates to be different between Objective-C and C++.
3544         
3545         * WebView/WebDynamicScrollBarsView.mm:
3546         (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
3547
3548 2009-08-07  Simon Fraser  <simon.fraser@apple.com>
3549
3550         Reviewed by Dan Bernstein.
3551
3552         Work around an issue on Leopard where composited layers are misplaced and squished when the page
3553         gets over 4096px tall.
3554         https://bugs.webkit.org/show_bug.cgi?id=27272
3555         <rdar://problem/7067892> [Leopard] Composisted layers are misplaced and squished on on long pages
3556         <rdar://problem/7068252> [Leopard] When switching to a tab with HW layers, they fade in
3557
3558         * WebView/WebDynamicScrollBarsView.mm:
3559         (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
3560         Call -_updateLayerHostingViewPosition after scrolling.
3561         
3562         * WebView/WebHTMLView.mm:
3563         (-[WebHTMLView _frameOrBoundsChanged]):
3564         Call -_updateLayerHostingViewPosition after the view changes size.
3565
3566         (-[WebHTMLView attachRootLayer:]):
3567         Turn off default animations, to avoid animations of sublayer transform, and fading-in
3568         when tab switching.
3569         
3570         * WebView/WebHTMLViewInternal.h:
3571         (-[WebHTMLView _updateLayerHostingViewPosition]):
3572         New method that constrains the height of the layer-hosting view to a max height
3573         of 4096px, and compensates for the height restriction by placing the layer-hosting
3574         view at the top of the visible part of the WebHTMLView, and adjusting the position
3575         of the hosted layers via sublayer transform.
3576
3577 2009-08-07  Anders Carlsson  <andersca@apple.com>
3578
3579         Fix Tiger build.
3580         
3581         * WebView/WebRenderNode.mm:
3582         (-[WebRenderNode _initWithCoreFrame:]):
3583
3584 2009-08-07  Anders Carlsson  <andersca@apple.com>
3585
3586         Reviewed by Timothy Hatcher and Sam Weinig.
3587
3588         Change WebRenderNode to take a WebFrame instead of a WebFrameView.
3589         
3590         * WebView/WebRenderNode.h:
3591         * WebView/WebRenderNode.mm:
3592         (-[WebRenderNode _initWithName:position:rect:coreFrame:children:]):
3593         (copyRenderNode):
3594         (-[WebRenderNode _initWithCoreFrame:]):
3595         (-[WebRenderNode initWithWebFrame:]):
3596
3597 2009-08-06  Anders Carlsson  <andersca@apple.com>
3598
3599         Reviewed by Darin Adler and Dan Bernstein.
3600
3601         * WebCoreSupport/WebFrameLoaderClient.mm:
3602         (WebFrameLoaderClient::hasHTMLView):
3603         Always return true when we're in viewless mode.
3604
3605 2009-08-06  Anders Carlsson  <andersca@apple.com>
3606
3607         Remove WebGraphicsExtras.h include.
3608         
3609         * Plugins/WebNetscapePluginView.mm:
3610
3611 2009-08-06  Anders Carlsson  <andersca@apple.com>
3612
3613         Reviewed by Sam Weinig.
3614
3615         Remove WebGraphicsExtras, it is no longer used.
3616
3617         * Misc/WebGraphicsExtras.c: Removed.
3618         * Misc/WebGraphicsExtras.h: Removed.
3619
3620 2009-08-06  Chris Marrin  <cmarrin@apple.com>
3621
3622         Reviewed by David Hyatt.
3623
3624         Added ENABLE_3D_CANVAS flag to build, default to off
3625
3626         * Configurations/FeatureDefines.xcconfig:
3627
3628 2009-08-04  Michael Nordman  <michaeln@google.com>
3629
3630         Reviewed by Alexey Proskuryakov.
3631
3632         https://bugs.webkit.org/show_bug.cgi?id=27821
3633
3634         Mods to keep up with ApplicationCacheHost refactoring.
3635
3636         * WebView/WebDataSource.mm:
3637         (-[WebDataSource _transferApplicationCache:]):
3638
3639 2009-07-30  Darin Adler  <darin@apple.com>
3640
3641         Reviewed by David Levin.
3642
3643         Use checked casts for render tree
3644         https://bugs.webkit.org/show_bug.cgi?id=23522
3645
3646         * Misc/WebNSAttributedStringExtras.mm:
3647         (fileWrapperForElement):
3648         * Misc/WebNSPasteboardExtras.mm:
3649         (imageFromElement):
3650         (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
3651         * WebView/WebFrame.mm:
3652         (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
3653         (-[WebFrame _accessibilityTree]):
3654         * WebView/WebRenderNode.mm:
3655         (copyRenderNode):
3656         Use checked casts.
3657
3658 2009-07-31  Simon Fraser  <simon.fraser@apple.com>
3659
3660         Reviewed by Anders Carlsson.
3661         
3662         Accelerated animations stutter on pages with lots of animations and 3d transforms
3663         https://bugs.webkit.org/show_bug.cgi?id=27884
3664         
3665         This patch changes the strategy for synchronizing painting view the view,
3666         and compositing layer updates. Previously the strategy was to disable screen
3667         updates between the time we updated the layer tree, and painted the view. That
3668         left screen updates disabled for too long (hundreds of milliseconds) in some
3669         cases, causing animation stutter.
3670         
3671         The new strategy is to batch up changes to the CA layer tree, and commit them
3672         all at once just before painting happens (referred to as a "sync" in the code).
3673         GraphicsLayerCA now keeps a bitmask of changed properties, and then migrates
3674         the values stored in GraphicsLayer into the CA layer tree at commit time.
3675         
3676         Compositing layers are then synced in FrameView::paintContents(). However, not
3677         all style/layout changes will result in painting; to deal with style changes that
3678         touch only compositing properties, we set up a runloop observer that takes care
3679         of comitting layer changes when no painting happens.
3680
3681         * WebCoreSupport/WebChromeClient.h:
3682         * WebCoreSupport/WebChromeClient.mm:
3683         (WebChromeClient::scheduleCompositingLayerSync):
3684         scheduleViewUpdate() renamed to syncCompositingStateRecursive()
3685         
3686         * WebView/WebView.mm:
3687         (-[WebView _close]):
3688         (-[WebView _clearLayerSyncLoopObserver]):
3689         "viewUpdateRunLoopObserver" is now "layerSyncLoopObserver".
3690
3691         (-[WebView _syncCompositingChanges]):
3692         Helper method that calls syncCompositingStateRecursive() on the FrameView.
3693         
3694         (layerSyncRunLoopObserverCallBack):
3695         (-[WebView _scheduleCompositingLayerSync]):
3696         This is all about layer sycning now. Also, the run loop observer is repeating,
3697         because it has to keep firing until syncCompositingStateRecursive() says that it
3698         has completed.
3699         
3700         * WebView/WebViewData.h:
3701         "viewUpdateRunLoopObserver" is now "layerSyncLoopObserver".
3702
3703         * WebView/WebViewInternal.h:
3704         _scheduleViewUpdate is now _scheduleCompositingLayerSync
3705
3706 2009-07-30  Michael Nordman  <michaeln@google.com>
3707
3708         Reviewed by Darin Fisher.
3709
3710         https://bugs.webkit.org/show_bug.cgi?id=27821
3711
3712         Mods to keep up with ApplicationCacheHost refactoring.
3713
3714         * WebView/WebDataSource.mm:
3715         (-[WebDataSource _transferApplicationCache:]):
3716
3717 2009-07-29  David Kilzer  <ddkilzer@apple.com>
3718
3719         <http://webkit.org/b/27788> Don't export WebPluginController.h as a private header
3720
3721         Reviewed by Mark Rowe.
3722
3723         * Plugins/WebPluginController.h: Changed #import of
3724         WebPluginContainerCheck.h to use a framework-style include in
3725         case other platforms wish to export WebPluginController.h as a
3726         private header.
3727
3728 2009-07-29  Kevin McCullough  <kmccullough@apple.com>
3729
3730         Reviewed by Darin Adler.
3731
3732         Added foundation work to allow a testing infrastructure for the Web
3733         Inspector.
3734
3735         * WebCoreSupport/WebInspectorClient.h:
3736         * WebCoreSupport/WebInspectorClient.mm:
3737         (WebInspectorClient::inspectorWindowObjectCleared): Send the delegate
3738         callback.
3739         * WebView/WebDelegateImplementationCaching.h:
3740         * WebView/WebView.mm:
3741         (-[WebView _cacheFrameLoadDelegateImplementations]):
3742         * WebView/WebViewPrivate.h: The delegate SPI.
3743
3744 2009-07-27  Mark Rowe  <mrowe@apple.com>
3745
3746         Reviewed by Darin Adler.
3747
3748         <rdar://problem/7091036> REGRESSION: Microsoft Messenger crashes during file send/receive due to use of WebKit on non-main thread
3749
3750         In some situations Microsoft Messenger can attempt to manipulate the DOM from a secondary thread while
3751         updating its file transfer progress bar.  This results in corruption of WebCore data structures that is
3752         quickly followed by a crash.  We can work around this by having -[WebFrame DOMDocument] return nil when
3753         called from a secondary thread by Microsoft Messenger, which has the effect of turning its attempts at
3754         DOM manipulation in to no-ops.
3755
3756         * WebView/WebFrame.mm:
3757         (needsMicrosoftMessengerDOMDocumentWorkaround):
3758         (-[WebFrame DOMDocument]):
3759
3760 2009-07-27  Alexey Proskuryakov  <ap@webkit.org>
3761
3762         Reviewed by Darin Adler.
3763
3764         https://bugs.webkit.org/show_bug.cgi?id=27735
3765         Give a helpful name to JSLock constructor argument
3766
3767         * Misc/WebCoreStatistics.mm:
3768         (+[WebCoreStatistics javaScriptObjectsCount]):
3769         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
3770         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
3771         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
3772         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
3773         (+[WebCoreStatistics shouldPrintExceptions]):
3774         (+[WebCoreStatistics setShouldPrintExceptions:]):
3775         (+[WebCoreStatistics memoryStatistics]):
3776         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
3777         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3778         (WebKit::NetscapePluginInstanceProxy::evaluate):
3779         (WebKit::NetscapePluginInstanceProxy::invoke):
3780         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
3781         (WebKit::NetscapePluginInstanceProxy::construct):
3782         (WebKit::NetscapePluginInstanceProxy::getProperty):
3783         (WebKit::NetscapePluginInstanceProxy::setProperty):
3784         (WebKit::NetscapePluginInstanceProxy::removeProperty):
3785         (WebKit::NetscapePluginInstanceProxy::hasMethod):
3786         (WebKit::NetscapePluginInstanceProxy::enumerate):
3787         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
3788         * Plugins/WebBaseNetscapePluginStream.mm:
3789         (WebNetscapePluginStream::wantsAllStreams):
3790         * Plugins/WebNetscapePluginView.mm:
3791         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
3792         (-[WebNetscapePluginView setWindowIfNecessary]):
3793         (-[WebNetscapePluginView createPluginScriptableObject]):
3794         (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
3795         (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
3796         (-[WebNetscapePluginView loadPluginRequest:]):
3797         (-[WebNetscapePluginView _printedPluginBitmap]):
3798         * Plugins/WebPluginController.mm:
3799         (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
3800         (-[WebPluginController startAllPlugins]):
3801         (-[WebPluginController stopAllPlugins]):
3802         (-[WebPluginController addPlugin:]):
3803         (-[WebPluginController destroyPlugin:]):
3804         (-[WebPluginController destroyAllPlugins]):
3805         * WebView/WebFrame.mm:
3806         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
3807         * WebView/WebScriptDebugDelegate.mm:
3808         (-[WebScriptCallFrame scopeChain]):
3809         (-[WebScriptCallFrame evaluateWebScript:]):
3810         * WebView/WebView.mm:
3811         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
3812
3813 2009-07-24  Darin Adler  <darin@apple.com>
3814
3815         Reviewed by Mark Rowe.
3816
3817         REGRESSION (r46298): Exception after clicking on Bookmarks button in the Bookmarks Bar
3818         https://bugs.webkit.org/show_bug.cgi?id=27667
3819
3820         * WebCoreSupport/WebFrameLoaderClient.mm:
3821         (WebFrameLoaderClient::transitionToCommittedForNewPage): Moved the code to set the
3822         title here. This is late enough that both the view and representation exist.
3823
3824         * WebView/WebDataSource.mm:
3825         (-[WebDataSource _makeRepresentation]): Removed the code to set the title from here.
3826         It's a bit too early.
3827
3828 2009-07-24  Andrei Popescu  <andreip@google.com>
3829
3830         Reviewed by Anders Carlsson.
3831
3832         ApplicationCache should have size limit
3833         https://bugs.webkit.org/show_bug.cgi?id=22700
3834
3835         Adds the WebApplicationCache class that is
3836         used by the DumpRenderTree test application to
3837         configure the Application Cache maximum size.
3838
3839         * WebCoreSupport/WebApplicationCache.h: Added.
3840         * WebCoreSupport/WebApplicationCache.mm: Added.
3841         * WebCoreSupport/WebChromeClient.h:
3842         * WebCoreSupport/WebChromeClient.mm:
3843         (WebChromeClient::reachedMaxAppCacheSize):
3844         Adds empty implementation of the reachedMaxAppCacheSize callback.
3845         * WebKit.exp:
3846
3847 2009-07-23  Darin Adler  <darin@apple.com>
3848
3849         * WebView/WebDataSource.mm:
3850         (-[WebDataSource _makeRepresentation]): Landed a comment I forgot last time.
3851
3852 2009-07-23  Darin Adler  <darin@apple.com>
3853
3854         Reviewed by Brady Eidson.
3855
3856         URL appears in back/forward button menu instead of title for items with custom representation
3857         https://bugs.webkit.org/show_bug.cgi?id=27586
3858         rdar://problem/5060337
3859
3860         The problem is that DocumentLoader expects to store a title, but for custom representations
3861         it is never passed to the document loader.
3862
3863         * WebView/WebDataSource.mm:
3864         (-[WebDataSource _makeRepresentation]): Added a call to DocumentLoader::setTitle.
3865         Works as long as the title does not change during the document's lifetime, which
3866         is good enough for the simple cases in Safari.
3867
3868 2009-07-20  Darin Adler  <darin@apple.com>
3869
3870         Reviewed by Dan Bernstein.
3871
3872         REGRESSION (r39185): Safari adds ".jpeg" extension to images that already have ".JPG" extension
3873         https://bugs.webkit.org/show_bug.cgi?id=27472
3874
3875         * WebView/WebHTMLView.mm:
3876         (matchesExtensionOrEquivalent): Changed category method into a C function.
3877         Made it require the leading dot when checking for the extension and do it
3878         in a non-case-sensitive way.
3879         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Changed to call
3880         the function.
3881
3882 2009-07-21  Roland Steiner  <rolandsteiner@google.com>
3883
3884         Reviewed by David Levin.
3885
3886         Add ENABLE_RUBY to list of build options
3887         https://bugs.webkit.org/show_bug.cgi?id=27324
3888
3889         * Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY.
3890
3891 2009-07-17  Brian Weinstein  <bweinstein@apple.com>
3892
3893         Reviewed by Adam Roben.
3894
3895         Fix of <rdar://problem/5712795> Win: Cannot change the height of the docked Web Inspector (14272)
3896         https://bugs.webkit.org/show_bug.cgi?id=14272
3897         
3898         Removed size calculation code from [WebInspectorWindowController setInitialAttachedHeight] into
3899         InspectorController.cpp to make it cross platform, and use InspectorController to store the 
3900         user's preferred size for an attached window, instead of NSUserDefaults.
3901
3902         * WebCoreSupport/WebInspectorClient.mm:
3903         (-[WebInspectorWindowController showWindow:]):
3904         (-[WebInspectorWindowController setAttachedWindowHeight:]):
3905
3906 2009-07-16  Fumitoshi Ukai  <ukai@chromium.org>
3907
3908         Reviewed by David Levin.
3909
3910         Add --web-sockets flag and ENABLE_WEB_SOCKETS define.
3911         https://bugs.webkit.org/show_bug.cgi?id=27206
3912         
3913         Add ENABLE_WEB_SOCKETS
3914
3915         * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS
3916
3917 2009-07-16  Xiaomei Ji  <xji@chromium.org>
3918
3919         Reviewed by Darin Adler.
3920
3921         Fix tooltip does not get its directionality from its element's directionality.
3922         https://bugs.webkit.org/show_bug.cgi?id=24187
3923
3924         Per mitz's suggestion in comment #6, while getting the plain-text 
3925         title, we also get the directionality of the title. How to handle 
3926         the directionality is up to clients. Clients could ignore it, 
3927         or use attribute or unicode control characters to display the title
3928         as what they want.
3929
3930         * Misc/WebElementDictionary.mm:
3931         (-[WebElementDictionary _spellingToolTip]): Change spellingToolTip caller due to signature change.
3932         (-[WebElementDictionary _title]): Change title caller due to signature change.
3933         * WebCoreSupport/WebChromeClient.h: Add directionality as 2nd parameter to setToolTip().
3934         * WebCoreSupport/WebChromeClient.mm:
3935         (WebChromeClient::setToolTip): Add directionality as 2nd parameter to setToopTip() (without handling it yet).
3936
3937 2009-07-15  Darin Adler  <darin@apple.com>
3938
3939         Reviewed by Sam Weinig.
3940
3941         Renamed parseURL to deprecatedParseURL.
3942
3943         * DOM/WebDOMOperations.mm:
3944         (-[DOMDocument URLWithAttributeString:]): Renamed.
3945         * WebCoreSupport/WebFrameLoaderClient.mm:
3946         (WebFrameLoaderClient::createPlugin): Renamed.
3947
3948 2009-07-15  Brady Eidson  <beidson@apple.com>
3949
3950         Reviewed by Dan Bernstein.
3951
3952         https://bugs.webkit.org/show_bug.cgi?id=27304
3953         WebKit should provide usage and eligibility information about the page cache.
3954
3955         * Misc/WebCoreStatistics.h:
3956         * Misc/WebCoreStatistics.mm:
3957         (+[WebCoreStatistics numberCachedPages]):
3958         (+[WebCoreStatistics numberCachedFrames]):
3959         (+[WebCoreStatistics numberAutoreleasedPages]):
3960         * WebKit.exp:
3961
3962         * WebView/WebFrame.mm:
3963         (-[WebFrame _cacheabilityDictionary]): Returns a dictionary with all the data about
3964           why the frame is not cacheable. If the frame *is* cacheable, the dictionary is
3965           empty.
3966         * WebView/WebFramePrivate.h:
3967
3968 2009-07-13  Simon Fraser  <simon.fraser@apple.com>
3969
3970         Reviewed by Dan Bernstein, Adam Roben.
3971
3972         "Unrecognized selector" console log when the Safari 4 Welcome page navigates to Top Sites.
3973         <rdar://problem/6994893
3974
3975         attachRootGraphicsLayer() should not assume that the frameView's documentView
3976         is a WebHTMLView.
3977         
3978         * WebCoreSupport/WebChromeClient.mm:
3979         (WebChromeClient::attachRootGraphicsLayer):
3980
3981 2009-07-13  Anders Carlsson  <andersca@apple.com>
3982
3983         Reviewed by Darin Adler and Kevin Decker.
3984
3985         <rdar://problem/7053687> Core Animation plug-ins continue to grow larger and larger when opening new tabs (32 bit-only)
3986
3987         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3988         (-[WebHostedNetscapePluginView setLayer:]):
3989         Add a FIXME.
3990         
3991         * Plugins/WebNetscapePluginView.mm:
3992         (-[WebNetscapePluginView setLayer:]):
3993         Make sure to set the size of the layer before changing the autoresizing mask so it won't grow everytime it's inserted
3994         into the layer tree.
3995
3996 2009-07-13  Greg Bolsinga  <bolsinga@apple.com>
3997
3998         Reviewed by Simon Fraser.
3999
4000         Correct these delegate methods' declarations by adding parameter names.
4001
4002         * WebView/WebUIDelegatePrivate.h:
4003
4004 2009-07-13  Drew Wilson  <atwilson@google.com>
4005
4006         Reviewed by David Levin.
4007
4008         Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
4009         https://bugs.webkit.org/show_bug.cgi?id=26932
4010
4011         Added ENABLE(SHARED_WORKERS) flag (disabled by default).
4012
4013         * Configurations/FeatureDefines.xcconfig:
4014
4015 2009-07-12  Keishi Hattori  <casey.hattori@gmail.com>
4016
4017         Reviewed by Timothy Hatcher.
4018
4019         Refactor ConsoleMessage to add MessageType attribute.
4020         https://bugs.webkit.org/show_bug.cgi?id=20625
4021
4022         * WebCoreSupport/WebChromeClient.h:
4023         * WebCoreSupport/WebChromeClient.mm:
4024         (WebChromeClient::addMessageToConsole):
4025
4026 2009-07-11  Simon Fraser  <simon.fraser@apple.com>
4027
4028         Enable support for accelerated compositing and 3d transforms on Leopard.
4029         <https://bugs.webkit.org/show_bug.cgi?id=20166>
4030         <rdar://problem/6120614>
4031
4032         Reviewed by Oliver Hunt.
4033
4034         * Configurations/FeatureDefines.xcconfig:
4035
4036 2009-07-10  David Kilzer  <ddkilzer@apple.com>
4037
4038         Bug 27007: Build fixes when ICONDATABASE is disabled
4039
4040         <https://bugs.webkit.org/show_bug.cgi?id=27007>
4041
4042         Reviewed by Sam Weinig.
4043
4044         * Misc/WebIconDatabase.mm:
4045         (defaultClient): Return 0 if ICONDATABASE is disabled.
4046         * WebCoreSupport/WebFrameLoaderClient.mm:
4047         (WebFrameLoaderClient::dispatchDidReceiveIcon): Commented out
4048         the body of the method if ICONDATABASE is disabled.
4049         (WebFrameLoaderClient::registerForIconNotification): Ditto.
4050         * WebCoreSupport/WebIconDatabaseClient.mm: Added #if
4051         ENABLE(ICONDATABASE)/#endif guard to source.
4052         * WebView/WebView.mm:
4053         (-[WebView setFrameLoadDelegate:]): Wrapped code that starts the
4054         icon database machinery in #if ENABLE(ICONDATABASE)/#endif.
4055         (-[WebView _registerForIconNotification:]): Wrapped method in
4056         #if ENABLE(ICONDATABASE)/#endif guard.
4057         (-[WebView _dispatchDidReceiveIconFromWebFrame:]): Ditto.
4058         * WebView/WebViewInternal.h: Wrapped methods in #if
4059         ENABLE(ICONDATABASE)/#endif guard.
4060         (-[WebView _registerForIconNotification:]):
4061         (-[WebView _dispatchDidReceiveIconFromWebFrame:]):
4062
4063 2009-07-10  Simon Fraser  <simon.fraser@apple.com>
4064
4065         Reviewed by John Sullivan.
4066
4067         Flashing as hardware layers are created and destroyed in some content
4068         <rdar://problem/7032246>
4069         
4070         There's a window of time between the end of one runloop cycle, after CA layers changes
4071         have been committed, and the window display at the start of the next cycle when 
4072         CA may push updates to the screen before AppKit has drawn the view contents. If
4073         we know that we need to do drawing synchronization (which we do when content moves
4074         between a layer and the view), then we need to call -disableScreenUpdatesUntilFlush
4075         from the existing runloop observer that is set up when layers need repainting to
4076         ensure that layer updates don't reach the screen before view-based painting does.
4077
4078         * WebView/WebHTMLView.mm:
4079         (-[WebHTMLView drawRect:]):
4080         Tweak the comments
4081         
4082         * WebView/WebView.mm:
4083         (viewUpdateRunLoopObserverCallBack):
4084         (-[WebView _scheduleViewUpdate]):
4085         Add a big comment to explain the timing of things.
4086         Call -disableScreenUpdatesUntilFlush when the view _needsOneShotDrawingSynchronization.
4087
4088  2009-07-09  Brian Weinstein  <bweinstein@apple.com>
4089  
4090          Reviewed by Tim Hatcher.
4091 2009-07-10  Adam Barth  <abarth@webkit.org>
4092
4093         Reviewed by Sam Weinig with the power of Grayskull.
4094
4095         Enable XSSAuditor by default.
4096
4097         * WebView/WebPreferences.mm:
4098         (+[WebPreferences initialize]):
4099
4100 2009-07-10  Greg Bolsinga  <bolsinga@apple.com>
4101
4102         Reviewed by Antti Koivisto.
4103
4104         Add delegate methods about focus and blur and state change
4105         https://bugs.webkit.org/show_bug.cgi?id=27153
4106
4107         Call the appropriate private delegate methods from the ChromeClient.
4108         
4109         * WebCoreSupport/WebChromeClient.h:
4110         * WebCoreSupport/WebChromeClient.mm:
4111         (WebChromeClient::formStateDidChange):
4112         (WebChromeClient::formDidFocus):
4113         (WebChromeClient::formDidBlur):
4114         * WebView/WebUIDelegatePrivate.h:
4115
4116 2009-07-09  Brian Weinstein  <bweinstein@apple.com>
4117
4118         Reviewed by Tim Hatcher.
4119
4120         https://bugs.webkit.org/show_bug.cgi?id=27141
4121         
4122         Updated WebInspectorClient to use Web Inspector Preferences to remember whether or not it should be 
4123         docked or a free window instead of NSUserDefaults it used to have.
4124
4125         * WebCoreSupport/WebInspectorClient.mm:
4126         (-[WebInspectorWindowController init]):
4127         (-[WebInspectorWindowController showWindow:]):
4128         (-[WebInspectorWindowController attach]):
4129         (-[WebInspectorWindowController detach]):
4130
4131 2009-07-09  Drew Wilson  <atwilson@google.com>
4132
4133         Reviewed by Alexey Proskuryakov.
4134
4135         https://bugs.webkit.org/show_bug.cgi?id=26903
4136
4137         Turned on CHANNEL_MESSAGING by default because the MessageChannel API
4138         can now be implemented for Web Workers and is reasonably stable.
4139
4140         * Configurations/FeatureDefines.xcconfig:
4141
4142 2009-07-09  Darin Adler  <darin@apple.com>
4143
4144         Reviewed by Adele Peterson and Dan Bernstein.
4145
4146         <rdar://problem/7024972> Cannot set font to Helvetica Neue Light in Mail compose window
4147
4148         No regression test because this only affects the font panel.
4149
4150         * WebView/WebHTMLView.mm:
4151         (-[WebHTMLView _addToStyle:fontA:fontB:]): Fix code that detects whether the font would
4152         survive a round trip by using the weight corresponding to "bold" or "normal" rather than
4153         the actual weight number.
4154
4155 2009-07-09  Beth Dakin and Jon Honeycutt <bdakin@apple.com>
4156
4157         Reviewed by Dave Hyatt.
4158
4159         Make Widget RefCounted to fix:
4160
4161         <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs 
4162         at WebCore::Widget::afterMouseDown() after clicking To Do's close 
4163         box
4164         <rdar://problem/6978804> WER #16: Repro Access Violation in 
4165         WebCore::PluginView::bindingInstance (1310178023)
4166         -and-
4167         <rdar://problem/6991251> WER #13: Crash in WebKit!
4168         WebCore::PluginView::performRequest+203 (1311461169) 
4169
4170         * WebCoreSupport/WebFrameLoaderClient.h:
4171         * WebCoreSupport/WebFrameLoaderClient.mm:
4172         (WebFrameLoaderClient::createPlugin):
4173
4174 2009-07-09  Sam Weinig  <sam@webkit.org>
4175
4176         Reviewed by Steve Falkenburg.
4177
4178         Roll out r43848. The quirk is no longer necessary.
4179
4180         * WebView/WebView.mm:
4181         (-[WebView WebCore::_userAgentForURL:WebCore::]):
4182
4183 2009-07-09  Alexey Proskuryakov  <ap@webkit.org>
4184
4185         Reviewed by Geoff Garen.
4186
4187         <rdar://problem/6921671> Visit count shouldn't be incremented by redirects.
4188
4189         * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::updateGlobalHistory):
4190         Do not increase visit count if there is a redirect source. As a result, only pages that were
4191         explicitly visited by the user (by typing a URL, choosing one from bookmarks, or clicking
4192         a link) will be counted.
4193
4194         * History/WebHistory.mm:
4195         (-[WebHistoryPrivate visitedURL:withTitle:increaseVisitCount:]):
4196         (-[WebHistory _visitedURL:withTitle:method:wasFailure:increaseVisitCount:]):
4197         * History/WebHistoryInternal.h:
4198         * History/WebHistoryItem.mm:
4199         (-[WebHistoryItem _visitedWithTitle:increaseVisitCount:]):
4200         * History/WebHistoryItemInternal.h:
4201         Marshal this new argument all the way down to WebCore.
4202
4203 2009-07-08  Greg Bolsinga  <bolsinga@apple.com>
4204
4205         Reviewed by Darin Adler.
4206
4207         Add -[WebView _isProcessingUserGesture]
4208         https://bugs.webkit.org/show_bug.cgi?id=27084
4209
4210         Add -_isProcessingUserGesture that calls into WebCore::FrameLoader::isProcessingUserGesture()
4211         so that WebView code can determine if a user gesture is in progress.
4212
4213         * WebView/WebView.mm:
4214         (-[WebView _isProcessingUserGesture]):
4215         * WebView/WebViewPrivate.h:
4216
4217 2009-07-07  Anders Carlsson  <andersca@apple.com>
4218
4219         Reviewed by Sam Weinig.
4220
4221         - Fix <rdar://problem/6544693>.
4222         
4223         For Flash, don't cache which methods or fields in an object are missing, since they can
4224         be added at any time.
4225         
4226         * Plugins/Hosted/NetscapePluginHostManager.mm:
4227         (WebKit::NetscapePluginHostManager::hostForPackage):
4228         * Plugins/Hosted/NetscapePluginHostProxy.h:
4229         (WebKit::NetscapePluginHostProxy::shouldCacheMissingPropertiesAndMethods):
4230         * Plugins/Hosted/NetscapePluginHostProxy.mm:
4231         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
4232         * Plugins/Hosted/ProxyInstance.mm:
4233         (WebKit::ProxyInstance::methodsNamed):
4234         (WebKit::ProxyInstance::fieldNamed):
4235
4236 2009-07-06  David Kilzer  <ddkilzer@apple.com>
4237
4238         Bug 27006: Build fix when MAC_JAVA_BRIDGE is disabled
4239
4240         <https://bugs.webkit.org/show_bug.cgi?id=27006>
4241
4242         Reviewed by Darin Adler.
4243
4244         * WebCoreSupport/WebFrameLoaderClient.mm:
4245         (WebFrameLoaderClient::createJavaAppletWidget): Wrap contents of
4246         the method in #if ENABLE(MAC_JAVA_BRIDGE)/#endif and return 0
4247         when this feature is disabled.
4248
4249 2009-07-06  David Kilzer  <ddkilzer@apple.com>
4250
4251         Bug 27005: Build fixes when NETSCAPE_PLUGIN_API is disabled
4252
4253         <https://bugs.webkit.org/show_bug.cgi?id=27005>
4254
4255         Reviewed by Geoff Garen.
4256
4257         * Plugins/WebPluginController.mm:
4258         (-[WebPluginController destroyPlugin:]): Wrap call to
4259         ScriptController::cleanupScriptObjectsForPlugin() in
4260         #if ENABLE(NETSCAPE_PLUGIN_API)/#endif macro.
4261         (-[WebPluginController destroyAllPlugins]): Ditto.
4262         * Plugins/WebPluginDatabase.mm:
4263         (-[WebPluginDatabase removePluginInstanceViewsFor:]): Wrap
4264         WebBaseNetscapePluginView class checks in
4265         #if ENABLE(NETSCAPE_PLUGIN_API)/#endif macro.
4266         (-[WebPluginDatabase destroyAllPluginInstanceViews]): Ditto.
4267
4268 2009-07-06  David Kilzer  <ddkilzer@apple.com>
4269
4270         BUILD FIX: Use ENABLE(NETSCAPE_PLUGIN_API) instead of USE(PLUGIN_HOST_PROCESS)
4271
4272         In r45579, #if/#endif macros for USE(PLUGIN_HOST_PROCESS) were
4273         used, but ENABLE(NETSCAPE_PLUGIN_API) should have been used
4274         instead.
4275
4276         * Plugins/WebNetscapeContainerCheckContextInfo.h:
4277         * Plugins/WebNetscapeContainerCheckContextInfo.mm:
4278         * Plugins/WebNetscapeContainerCheckPrivate.mm:
4279
4280 2009-07-06  David Kilzer  <ddkilzer@apple.com>
4281
4282         Bug 27004: Build fix for ENABLE(PLUGIN_PROXY_FOR_VIDEO) after r42618
4283
4284         <https://bugs.webkit.org/show_bug.cgi?id=27004>
4285
4286         Reviewed by Geoff Garen.
4287
4288         * Plugins/WebPluginController.mm:
4289         (mediaProxyClient): Use core() method to convert from
4290         DOMElement to WebCore::Element.
4291
4292 2009-07-06  David Kilzer  <ddkilzer@apple.com>
4293
4294         Bug 27003: Build fix when USE(PLUGIN_HOST_PROCESS) is disabled
4295
4296         <https://bugs.webkit.org/show_bug.cgi?id=27003>
4297
4298         Reviewed by Geoff Garen.
4299
4300         * Plugins/WebNetscapeContainerCheckContextInfo.h: Added #if
4301         USE(PLUGIN_HOST_PROCESS)/#endif guards.
4302         * Plugins/WebNetscapeContainerCheckContextInfo.mm: Ditto.
4303         * Plugins/WebNetscapeContainerCheckPrivate.mm: Ditto.
4304
4305 2009-07-06  Anders Carlsson  <andersca@apple.com>
4306
4307         Reviewed by Adele Peterson.
4308
4309         Initialize wkIsLatchingWheelEvent.
4310         
4311         * WebCoreSupport/WebSystemInterface.m:
4312         (InitWebCoreSystemInterface):
4313
4314 2009-07-03  Dan Bernstein  <mitz@apple.com>
4315
4316         Reviewed by Simon Fraser.
4317
4318         - fix <rdar://problem/6964278> REGRESSION (r42118): Scrolling redraw
4319           problem in FileMaker Pro
4320
4321         * WebView/WebHTMLView.mm:
4322         (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
4323         Perform layout if needed, even on Mac OS X versions that have
4324         -viewWillDraw. This prevents attempts to draw without layout in case
4325         -viewWillDraw was not called due to NSView issues or the client
4326         did something during the display operation that re-invalidated the
4327         layout.
4328
4329 2009-07-02  Anders Carlsson  <andersca@apple.com>
4330
4331         Reviewed by Dan Bernstein.
4332
4333         <rdar://problem/6978783> 
4334         Software-rendered plug-in does not update correctly when inside a hardware layer
4335         
4336         Replace calls to setNeedsDisplay: and setNeedsDisplayInRect: with a call to the new method
4337         invalidatePluginContentRect:. This new method will ask WebCore to do the repainting, taking
4338         transforms into account.
4339         
4340         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
4341         (WebKit::NetscapePluginInstanceProxy::invalidateRect):
4342         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
4343         (-[WebHostedNetscapePluginView pluginHostDied]):
4344         * Plugins/WebBaseNetscapePluginView.h:
4345         * Plugins/WebBaseNetscapePluginView.mm:
4346         (-[WebBaseNetscapePluginView windowBecameKey:]):
4347         (-[WebBaseNetscapePluginView windowResignedKey:]):
4348         (-[WebBaseNetscapePluginView preferencesHaveChanged:]):
4349         (-[WebBaseNetscapePluginView invalidatePluginContentRect:]):
4350         * Plugins/WebNetscapePluginView.mm:
4351         (-[WebNetscapePluginView invalidateRect:]):
4352         (-[WebNetscapePluginView invalidateRegion:]):
4353         (-[WebNetscapePluginView forceRedraw]):
4354
4355 2009-07-02  Adam Roben  <aroben@apple.com>
4356
4357         Fix warnings from update-webkit-localizable-strings
4358
4359         Rubber-stamped by Eric Carlson.
4360
4361         * WebCoreSupport/WebViewFactory.mm:
4362         (-[WebViewFactory mediaElementLoadingStateText]):
4363         (-[WebViewFactory mediaElementLiveBroadcastStateText]):
4364         Changed the localization comments to match the comments in the Windows
4365         version of this file, to avoid warnings about different comments for
4366         the same localized string.
4367
4368 2009-07-02  Simon Fraser  <simon.fraser@apple.com>
4369
4370         Reviewed by Dan Bernstein.
4371         
4372         Compositing-related preference methods are not public API; should move to WebPreferencesPrivate.h
4373         <rdar://problem/7027363>
4374
4375         Move accelerated-compositing pref to WebPreferencesPrivate.h
4376
4377         * WebView/WebPreferences.h:
4378         * WebView/WebPreferences.mm:
4379         (-[WebPreferences acceleratedCompositingEnabled]):
4380         (-[WebPreferences setAcceleratedCompositingEnabled:]):
4381         * WebView/WebPreferencesPrivate.h:
4382
4383 2009-07-02  Pierre d'Herbemont  <pdherbemont@apple.com>
4384
4385         Reviewed by Simon Fraser.
4386
4387         <rdar://problem/6518119>
4388
4389         Add localized strings for media controller status messages.
4390
4391         * WebCoreSupport/WebViewFactory.mm: Add new localized text.
4392         (-[WebViewFactory mediaElementLoadingStateText]):
4393         (-[WebViewFactory mediaElementLiveBroadcastStateText]):
4394
4395 2009-07-01  Brady Eidson  <beidson@apple.com>
4396
4397         Reviewed by Sam Weinig.
4398
4399         Add a preference/setting to toggle whether content sniffing is enabled for file URLs.
4400
4401         * WebView/WebPreferenceKeysPrivate.h:
4402
4403         * WebView/WebPreferences.mm:
4404         (+[WebPreferences initialize]):
4405         (-[WebPreferences localFileContentSniffingEnabled]):
4406         (-[WebPreferences setLocalFileContentSniffingEnabled:]):
4407         * WebView/WebPreferencesPrivate.h:
4408
4409         * WebView/WebView.mm:
4410         (-[WebView _preferencesChangedNotification:]):
4411
4412 2009-07-01  David Hyatt  <hyatt@apple.com>
4413
4414         Reviewed by Tim Hatcher.
4415
4416         <rdar://problem/6998524> REGRESSION (r44474): Form text field has focus ring, looks focused,
4417         even though the field is not actually focused for keyboard input
4418         
4419         Add the concept of whether or not the Page is focused by adding a boolean to the focusController.  This allows the
4420         focused frame and focused node to both be cached and changed programmatically without causing errors when the Page doesn't
4421         have focus.
4422
4423         * WebView/WebHTMLView.mm:
4424         (-[WebHTMLView becomeFirstResponder]):
4425         (-[WebHTMLView resignFirstResponder]):
4426
4427 2009-06-30  Adele Peterson  <adele@apple.com>
4428
4429         Reviewed by Dan Bernstein.
4430
4431         Fix for <rdar://problem/7014389> REGRESSION(4-TOT): Hyperlinks have no tooltips in Mail unless you first click in the message body
4432
4433         Updated these new methods (added as part of the viewless WebKit effort) that call through to WebHTMLView to use _selectedOrMainFrame, 
4434         instead of just selectedFrame.  When the selection changes, I don't think there is a situation where there's no selected frame, but
4435         it seems better to keep these two uses the same, since if there is a case, this will be more like the old behavior, before there was
4436         a version of _selectionChanged in WebView. 
4437
4438         * WebView/WebView.mm:
4439         (-[WebView _setToolTip:]):
4440         (-[WebView _selectionChanged]):
4441
4442 2009-06-30  Mark Rowe  <mrowe@apple.com>
4443
4444         Reviewed by Timothy Hatcher.
4445
4446         <rdar://problem/7006959> 'Save as…’ does not work in Mail
4447
4448         * WebView/WebFrameView.mm:
4449         (-[WebFrameView initWithFrame:]): Call _needMailThreadWorkaroundIfCalledOffMainThread rather than
4450         needMailThreadWorkaround, as the latter is intended to be used at the point which a workaround would
4451         be applied and thus contains a main thread check.  Since -initWithFrame: is called on the main thread,
4452         this was causing us to not switch from exception-throwing to logging for the thread violation behavior.
4453
4454 2009-06-30  Dan Bernstein  <mitz@apple.com>
4455
4456         Reviewed by Dave Hyatt.
4457
4458         - fix <rdar://problem/6946611> REGRESSION (r30673): Shade10:" D_Snap
4459           to Grid" window is clipping
4460
4461         * Misc/WebKitVersionChecks.h: Added
4462             WEBKIT_FIRST_VERSION_WITHOUT_SHADE10_QUIRK
4463         * WebView/WebView.mm:
4464         (-[WebView _needsLinkElementTextCSSQuirk]): Added. Returns YES if the
4465             client app is a version of Shade 10 earlier than 10.6 and it was
4466             linked against a version of WebKit earlier than 531.2.
4467         (-[WebView _preferencesChangedNotification:]): Added a call to
4468             Settings::setTreatsAnyTextCSSLinkAsStylesheet().
4469
4470 2009-06-29  Eric Carlson  <eric.carlson@apple.com>
4471
4472         Reviewed by Simon Fraser.
4473
4474         <rdar://problem/7014813> Ask media engine if a movie is streamed or downloaded.
4475
4476         * WebCoreSupport/WebSystemInterface.m:
4477         (InitWebCoreSystemInterface):
4478             Add QTMovieGetType.
4479
4480 2009-06-29  David Hyatt  <hyatt@apple.com>
4481
4482         Reviewed by Adam Roben.
4483
4484         Put datagrid behind an #ifdef.
4485
4486         * Configurations/FeatureDefines.xcconfig:
4487
4488 2009-06-26  John Sullivan  <sullivan@apple.com>
4489
4490         Added support for disabling Stop Speaking when there is no speaking to stop.
4491         Also fixed Stop Speaking so that it works (formerly it would throw an exception, and
4492         selecting it from the menu would perform a web search instead (!)).
4493
4494         Reviewed by Tim Hatcher.
4495
4496         * WebCoreSupport/WebContextMenuClient.h:
4497         declare isSpeaking()
4498         
4499         * WebCoreSupport/WebContextMenuClient.mm:
4500         (WebContextMenuClient::isSpeaking):
4501         implement by calling through to NSApplication
4502         (WebContextMenuClient::stopSpeaking):
4503         fixed implementation by correcting the signature of the NSApplication method
4504
4505 2009-06-26  Chris Marrin  <cmarrin@apple.com>
4506
4507         Reviewed by Simon Fraser  <simon.fraser@apple.com>.
4508
4509         Additional fix for https://bugs.webkit.org/show_bug.cgi?id=26651
4510
4511         The flag should always default to true to avoid it getting set
4512         to false in a build with accelerated compositing turned off
4513         and then disabling accelerated compositing when subsequently
4514         running a build with it turned on.
4515
4516         * WebView/WebPreferences.mm:
4517         (+[WebPreferences initialize]):
4518
4519 2009-06-26  Brady Eidson  <beidson@apple.com>
4520
4521         Fix SnowLeopard build.
4522
4523         * Plugins/Hosted/HostedNetscapePluginStream.mm:
4524         (WebKit::HostedNetscapePluginStream::didReceiveResponse):
4525
4526 2009-06-26  Brady Eidson  <beidson@apple.com>
4527
4528         Reviewed by Sam Weinig
4529
4530         <rdar://problem/6961578> REGRESSION (r43511): Opening .fdf files from Acrobat Professional fails
4531
4532         Replace all usage of the now obsolete [NSURLResponse _webcore_MIMEType].
4533
4534         * Plugins/WebBaseNetscapePluginStream.mm:
4535         (WebNetscapePluginStream::didReceiveResponse):
4536         * Plugins/WebNetscapePluginView.mm:
4537         (-[WebNetscapePluginView pluginView:receivedData:]):
4538         * Plugins/WebPluginController.mm:
4539         (-[WebPluginController pluginView:receivedResponse:]):
4540         * WebView/WebDataSource.mm:
4541         (-[WebDataSource _responseMIMEType]):
4542         * WebView/WebResource.mm:
4543         (-[WebResource _initWithData:URL:response:]):
4544
4545 2009-06-26  Alexey Proskuryakov  <ap@webkit.org>
4546
4547         Reviewed by Sam Weinig.
4548
4549         <rdar://problem/6651201> Update lookalike character list.
4550
4551         * Misc/WebNSURLExtras.mm: (isLookalikeCharacter): Added more characters to the list.
4552
4553 2009-06-25  Anders Carlsson  <andersca@apple.com>
4554
4555         Reviewed by Oliver Hunt.
4556
4557         <rdar://problem/6989017> 
4558         REGRESSION (SnowLeopard): RealPlayer content replays when opening a new tab or switching back to the RealPlayer tab
4559         
4560         If a plug-in fails in NPP_New, we would try to recreate it whenever the preferences for a web view would change. 
4561         
4562         Fix this by setting a flag when we fail to instantiate the plug-in, so we only try once.
4563         
4564         * Plugins/WebBaseNetscapePluginView.h:
4565         * Plugins/WebBaseNetscapePluginView.mm:
4566         (-[WebBaseNetscapePluginView start]):
4567
4568 2009-06-25  Chris Marrin  <cmarrin@apple.com>
4569
4570         Reviewed by Simon Fraser  <simon.fraser@apple.com>.
4571
4572         https://bugs.webkit.org/show_bug.cgi?id=26651
4573         
4574         Preference is named "WebKitAcceleratedCompositingEnabled"
4575         and is a boolean value. When false, prevents compositing layers from
4576         being created, which prevents hardware animation from running.
4577         Also forces video to do software rendering. Added a cache for
4578         the flag in RenderLayerCompositing and made it all work
4579         on-the-fly when the flag is changed while a page is loaded.
4580
4581         * WebView/WebPreferenceKeysPrivate.h:
4582         * WebView/WebPreferences.h:
4583         * WebView/WebPreferences.mm:
4584         (+[WebPreferences initialize]):
4585         (-[WebPreferences acceleratedCompositingEnabled]):
4586         (-[WebPreferences setAcceleratedCompositingEnabled:]):
4587         * WebView/WebView.mm:
4588         (-[WebView _preferencesChangedNotification:]):
4589
4590 2009-06-24  Dan Bernstein  <mitz@apple.com>
4591
4592         Reviewed by Anders Carlsson.
4593
4594         Fix the most recently seen kind of crash in <rdar://problem/5983224>
4595
4596         * WebView/WebHTMLView.mm:
4597         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Null-check the
4598         Frame.
4599
4600 2009-06-24  Jeff Johnson  <opendarwin@lapcatsoftware.com>
4601
4602         Reviewed by Darin Adler.
4603
4604         https://bugs.webkit.org/show_bug.cgi?id=26638 WebKitErrors.m: _initWithPluginErrorCode: does not set localizedDescription
4605
4606         Add localized descriptions for plugin errors.
4607         The localized strings already existed but were unused; now NSLocalizedDescriptionKey is added to the NSError userInfo.
4608
4609         * Misc/WebKitErrors.m:
4610         (-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]):
4611
4612 2009-06-23  Brady Eidson  <beidson@apple.com>
4613
4614         Reviewed by Darin Adler.
4615
4616         <rdar://problem/6950660> REGRESSION: iSale 5.5.3 crashes after I click a template to load
4617
4618         Due to some subtle WebKit changes - presumably some delegate callback behavior - a latent bug in 
4619         iSale was uncovered where they aren't properly retaining their FrameLoadDelegate, and we ended up
4620         calling back to a dealloc'ed object.
4621
4622         * WebView/WebView.mm:
4623         (-[WebView _needsAdobeFrameReloadingQuirk]): Use more intelligent C++-style initialization.
4624         (-[WebView _needsKeyboardEventDisambiguationQuirks]): Ditto.
4625         (-[WebView _needsFrameLoadDelegateRetainQuirk]): YES for iSale versions under 5.6
4626         (-[WebView dealloc]): Release the delegate if the quirk is in effect.
4627         (-[WebView setFrameLoadDelegate:]): Retain the new delegate if the quirk is in effect.
4628
4629 2009-06-23  Anders Carlsson  <andersca@apple.com>
4630
4631         Reviewed by Darin Adler.
4632
4633         - Fix <rdar://problem/6965672>
4634         
4635         Defer calls to WKPCInvalidateRect, so we don't try to invalidate while waiting for a reply, since
4636         that is too early.
4637         
4638         * Plugins/Hosted/NetscapePluginHostProxy.h:
4639         (WebKit::NetscapePluginHostProxy::isProcessingRequests):
4640         * Plugins/Hosted/NetscapePluginHostProxy.mm:
4641         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
4642         (WebKit::NetscapePluginHostProxy::processRequests):
4643         (WKPCInvalidateRect):
4644
4645 2009-06-22  Timothy Hatcher  <timothy@apple.com>
4646
4647         Add Mail on Tiger and Leopard to the list of applications that need the WebView init thread workaround.
4648
4649         <rdar://problem/6929524> Console shows WebKit Threading Violations from Mail
4650
4651         Reviewed by Anders Carlsson.
4652
4653         * WebView/WebView.mm:
4654         (clientNeedsWebViewInitThreadWorkaround): Return true for com.apple.Mail.
4655
4656 2009-06-22  Dan Bernstein  <mitz@apple.com>
4657
4658         Reviewed by Anders Carlsson.
4659
4660         - speculative fix for <rdar://problem/6889082>
4661           Crash at -[WebHTMLView(WebPrivate) _updateMouseoverWithEvent:]
4662
4663         The crash seems to happen because lastHitView points to a deleted
4664         object. Since -close calls -_clearLastHitViewIfSelf, I speculate that
4665         lastHitView has been set to an already-closed view.
4666
4667         * WebView/WebHTMLView.mm:
4668         (-[WebHTMLView hitTest:]): Return nil if the view is closed.
4669
4670 2009-06-22  Alexey Proskuryakov  <ap@webkit.org>
4671
4672         Reviewed by John Sullivan.
4673
4674         <rdar://problem/6956606> REGRESSION (S4Beta -> Final): After the password is input,
4675         Japanese can't be input.
4676
4677         * WebView/WebHTMLView.mm: (-[WebHTMLView _updateSelectionForInputManager]): Removed an
4678         unnecessary check - the function has an early return for null frame.
4679
4680 2009-06-22  Dan Bernstein  <mitz@apple.com>
4681
4682         Reviewed by Dave Hyatt.
4683
4684         - fix <rdar://problem/6990938> REGRESSION (r42787): After showing and
4685           hiding the Find banner, the WebHTMLView's height is not restored
4686
4687         * WebView/WebFrameView.mm:
4688         (-[WebFrameView setFrameSize:]): Mark the FrameView for layout when the
4689         WebFrameView's size changes.
4690         * WebView/WebView.mm:
4691         (-[WebView setFrameSize:]): Left the resize logic here, but only for
4692         the single view model.
4693
4694 2009-06-20  Darin Adler  <darin@apple.com>
4695
4696         Reviewed by Sam Weinig.
4697
4698         <rdar://problem/6964221> Need more processing of pluginspage.
4699
4700         * WebCoreSupport/WebFrameLoaderClient.mm:
4701         (WebFrameLoaderClient::createPlugin): Check protocolInHTTPFamily.
4702
4703 2009-06-18  Adam Barth  <abarth@webkit.org>
4704
4705         Reviewed by Sam Weinig.
4706
4707         https://bugs.webkit.org/show_bug.cgi?id=26199
4708
4709         Added preference to enable the XSSAuditor.
4710
4711         * WebView/WebPreferenceKeysPrivate.h:
4712         * WebView/WebPreferences.mm:
4713         (+[WebPreferences initialize]):
4714         (-[WebPreferences isXSSAuditorEnabled]):
4715         (-[WebPreferences setXSSAuditorEnabled:]):
4716         * WebView/WebPreferencesPrivate.h:
4717         * WebView/WebView.mm:
4718         (-[WebView _preferencesChangedNotification:]):
4719
4720 2009-06-18  Anders Carlsson  <andersca@apple.com>
4721
4722         Reviewed by Sam Weinig.
4723
4724         <rdar://problem/6926859>
4725         NPN_ConvertPoint doesn't give the right value when converting to/from NPCoordinateSpaceFlippedScreen
4726         
4727         When inverting Y, use the height of the first screen instead of the screen the window is on.
4728         
4729         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
4730         (WebKit::NetscapePluginInstanceProxy::windowFrameChanged):
4731         (WebKit::NetscapePluginInstanceProxy::mouseEvent):
4732         * Plugins/WebBaseNetscapePluginView.mm:
4733         (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]):
4734
4735 2009-06-16  Simon Fraser  <simon.fraser@apple.com>
4736
4737         Reviewed by Dan Bernstein
4738
4739         <rdar://problem/6976766> Control-click on pages with accelerated compositing
4740         content does not work.
4741         
4742         Part deux. #ifdef the use of _private->layerHostingView with 
4743         USE(ACCELERATED_COMPOSITING)
4744
4745         * WebView/WebHTMLView.mm:
4746         (-[WebHTMLView hitTest:]):
4747
4748 2009-06-16  Simon Fraser  <simon.fraser@apple.com>
4749
4750         Reviewed by Dan Bernstein
4751
4752         <rdar://problem/6976766> Control-click on pages with accelerated compositing
4753         content does not work.
4754         
4755         Remove the WebLayerHostingView subclass of NSView, with its attempts to
4756         forward events to the WebHTMLView, and just fix -[WebHTMLView hitTest:]
4757         to ignore the layerHostingView.
4758         
4759         * WebView/WebHTMLView.mm:
4760         (-[WebHTMLView hitTest:]):
4761         (-[WebHTMLView attachRootLayer:]):
4762
4763 2009-06-15  Simon Fraser  <simon.fraser@apple.com>
4764
4765         Reviewed by Mark Rowe.
4766
4767         <rdar://problem/6974857>
4768         
4769         Define ENABLE_3D_RENDERING when building on 10.6, and move ENABLE_3D_RENDERING
4770         switch from config.h to wtf/Platform.h.
4771
4772         * Configurations/FeatureDefines.xcconfig:
4773         * WebKitPrefix.h:
4774
4775 2009-06-15  Anders Carlsson  <andersca@apple.com>
4776
4777         Reviewed by Dan Bernstein.
4778
4779         <rdar://problem/6967569>
4780         CrashTracer: 15 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostManager::didCreateWindow + 85
4781         
4782         Make sure to remove the entry from the plug-in host map so we won't end up with an entry that has a null value.
4783         
4784         * Plugins/Hosted/NetscapePluginHostManager.mm:
4785         (WebKit::NetscapePluginHostManager::hostForPackage):
4786
4787 2009-06-15  Dan Bernstein  <mitz@apple.com>
4788
4789         Reviewed by Tim Hatcher.
4790
4791         - make the source code font in the Web Inspector match Mac defaults
4792
4793         * WebCoreSupport/WebInspectorClient.mm:
4794         (-[WebInspectorWindowController init]): Set the default monospace font
4795         to 11px Menlo, except on Leopard and Tiger where it is 10px Monaco.
4796
4797 2009-06-09  Justin Garcia  <justin.garcia@apple.com>
4798
4799         Reviewed by Eric Seidel.  Landed by Adam Barth.
4800
4801         https://bugs.webkit.org/show_bug.cgi?id=26281
4802
4803         REGRESSION: Copying from TextEdit/OmniGraffle and pasting into editable
4804         region loses images
4805         
4806         Prefer RTFD (RTF with inline images) over RTF.  In
4807         http://trac.webkit.org/changeset/19745 I accidently reversed their
4808         order.
4809
4810         * WebView/WebHTMLView.mm:
4811         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]): 
4812
4813 2009-06-13  Adam Barth  <abarth@webkit.org>
4814
4815         Reviewed by Darin Fisher.
4816
4817         https://bugs.webkit.org/show_bug.cgi?id=24492
4818
4819         Move registerURLSchemeAsLocal from FrameLoader to SecurityOrigin
4820
4821         * WebView/WebView.mm:
4822         (+[WebView registerURLSchemeAsLocal:]):
4823
4824 2009-06-12  Peter Kasting  <pkasting@google.com>
4825
4826         Reviewed by Eric Seidel.
4827
4828         * ChangeLog-2007-10-14: Change pseudonym "Don Gibson" to me (was used while Google Chrome was not public); update my email address.
4829
4830 2009-06-08  Dan Bernstein  <mitz@apple.com>
4831
4832         Rubber-stamped by Mark Rowe.
4833
4834         - gave Objective-C++ files the .mm extension
4835
4836         * Carbon/HIWebView.m: Removed.
4837         * Carbon/HIWebView.mm: Copied from WebKit/mac/Carbon/HIWebView.m.
4838         * Misc/WebKitNSStringExtras.m: Removed.
4839         * Misc/WebKitNSStringExtras.mm: Copied from WebKit/mac/Misc/WebKitNSStringExtras.m.
4840         * Misc/WebStringTruncator.m: Removed.
4841         * Misc/WebStringTruncator.mm: Copied from WebKit/mac/Misc/WebStringTruncator.m.
4842         * WebInspector/WebNodeHighlight.m: Removed.
4843         * WebInspector/WebNodeHighlight.mm: Copied from WebKit/mac/WebInspector/WebNodeHighlight.m.
4844         * WebInspector/WebNodeHighlightView.m: Removed.
4845         * WebInspector/WebNodeHighlightView.mm: Copied from WebKit/mac/WebInspector/WebNodeHighlightView.m.
4846         * WebView/WebDynamicScrollBarsView.m: Removed.
4847         * WebView/WebDynamicScrollBarsView.mm: Copied from WebKit/mac/WebView/WebDynamicScrollBarsView.m.
4848
4849 2009-06-05  David Hyatt  <hyatt@apple.com>
4850
4851         Reviewed by Mark Rowe.
4852
4853         https://bugs.webkit.org/show_bug.cgi?id=26220
4854
4855         Update a WebView's active state when it moves to a different window.
4856
4857         * WebView/WebView.mm:
4858         (-[WebView viewDidMoveToWindow]):
4859
4860 2009-06-04  Sam Weinig  <sam@webkit.org>
4861
4862         Reviewed by Alice Liu.
4863
4864         Move WebView internal data into WebViewData.h/mm.
4865
4866         * WebView/WebDelegateImplementationCaching.mm:
4867         * WebView/WebView.mm:
4868         * WebView/WebViewData.h: Copied from mac/WebView/WebViewInternal.h.
4869         * WebView/WebViewData.mm: Copied from mac/WebView/WebViewInternal.mm.
4870         * WebView/WebViewInternal.h:
4871         * WebView/WebViewInternal.mm: Removed.
4872
4873 2009-06-04  David Hyatt  <hyatt@apple.com>
4874
4875         Reviewed by Sam Weinig.
4876
4877         Remove _updateFocusedStateForFrame, since it's actually not even necessary now that I made
4878         setFocusedFrame get called explicitly from become/ResignFirstResponder.  setFocusedFrame does
4879         the work of focusing the selection already.
4880
4881         * WebCoreSupport/WebFrameLoaderClient.mm:
4882         (WebFrameLoaderClient::transitionToCommittedForNewPage):
4883         * WebView/WebHTMLView.mm:
4884         (-[WebHTMLView becomeFirstResponder]):
4885         (-[WebHTMLView resignFirstResponder]):
4886         * WebView/WebView.mm:
4887         * WebView/WebViewInternal.h:
4888
4889 2009-06-04  Dan Bernstein  <mitz@apple.com>
4890
4891         - build fix
4892
4893         * WebView/WebViewInternal.mm:
4894
4895 2009-06-03  David Hyatt  <hyatt@apple.com>
4896
4897         Reviewed by Sam Weinig.
4898
4899         Reworking of focus and active state updating for WebHTMLViews so that it actually works instead of reporting wrong answers.
4900
4901         * WebCoreSupport/WebFrameLoaderClient.mm:
4902         (WebFrameLoaderClient::transitionToCommittedForNewPage):
4903         WebHTMLViews become first responders before they are able to reach their Frames/Pages.  This happens because the NSClipView
4904         becomes first responder when the WebHTMLView gets destroyed, and then we transfer the responder state back to the new WebHTMLView
4905         when it is first connected.  Once we have transitioned to a new page and have the Frame/Page available, go ahead and explicitly
4906         focus the frame in WebCore and update our focused state.  This change allows us to remove the updateFocusedActive timer and the
4907         code from viewDidMoveToWindow.
4908         
4909         * WebView/WebHTMLView.mm:
4910         (-[WebHTMLView close]):
4911         (-[WebHTMLView addWindowObservers]):
4912         (-[WebHTMLView viewWillMoveToWindow:]):
4913         (-[WebHTMLView viewDidMoveToWindow]):
4914         (-[WebHTMLView _removeWindowObservers]):
4915         Remove all the updateFocusedActiveState timer code, since it no longer exists.
4916
4917         (-[WebHTMLView windowDidBecomeKey:]):
4918         (-[WebHTMLView windowDidResignKey:]):
4919         Active state updating is no longer done by WebHTMLViews.   It is handled by the WebView instead.
4920     
4921         (-[WebHTMLView becomeFirstResponder]):
4922         (-[WebHTMLView resignFirstResponder]):
4923         Reworking of WebHTMLView's code for gaining/losing responder status.  No longer update active state here, since the active state
4924         can never change just because of responder changes.  Make sure that the focused frame gets updated properly (and most importantly
4925         actually cleared when a WebHTMLView resigns responder status).
4926
4927         * WebView/WebHTMLViewInternal.h:
4928         * WebView/WebHTMLViewPrivate.h:
4929         State updating for focused and active states has been made independent.
4930
4931         * WebView/WebView.mm:
4932         (-[WebView _updateActiveState]):
4933         WebView now handles updating of active state in _updateActiveState.  It is now purely based off whether the window is key and nothing
4934         else.
4935
4936         (-[WebView addWindowObserversForWindow:]):
4937         (-[WebView removeWindowObservers]):
4938         Start listening for the window becoming/losing key even in the usesDocumentViews case.
4939
4940         (-[WebView _updateFocusedStateForFrame:]):
4941         Focused state updating is split into its own method now and called when WebHTMLViews gain and lose responder status.
4942
4943         (-[WebView _windowDidBecomeKey:]):
4944         (-[WebView _windowDidResignKey:]):
4945         Make sure to call _updateActiveState as the window gains/loses key.
4946
4947         (-[WebView _windowWillOrderOnScreen:]):
4948         Run this code now that WebHTMLView no longer does it.
4949
4950         * WebView/WebViewInternal.h:
4951         * WebView/WebViewPrivate.h:
4952         Updating for the split of focused and active state updating into separate methods.
4953
4954 2009-06-04  Mark Rowe  <mrowe@apple.com>
4955
4956         Speculative Tiger build fix.
4957
4958         * WebView/WebDelegateImplementationCaching.h:
4959
4960 2009-06-03  Sam Weinig  <sam@webkit.org>
4961
4962         Reviewed by Mark Rowe.
4963
4964         Move delegate implementation caching logic into its own files.
4965
4966         * WebView/WebDelegateImplementationCaching.h: Copied from mac/WebView/WebViewInternal.h.
4967         * WebView/WebDelegateImplementationCaching.mm: Copied from mac/WebView/WebView.mm.
4968         (WebViewGetResourceLoadDelegateImplementations):
4969         (WebViewGetFrameLoadDelegateImplementations):
4970         (WebViewGetScriptDebugDelegateImplementations):
4971         * WebView/WebView.mm:
4972         * WebView/WebViewInternal.h:
4973
4974 2009-06-03  Sam Weinig  <sam@webkit.org>
4975
4976         Reviewed by Mark Rowe.
4977
4978         Move WebViewPrivate structure to WebViewInternal.h/mm.
4979
4980         * WebView/WebView.mm:
4981         * WebView/WebViewInternal.h:
4982         * WebView/WebViewInternal.mm: Added.
4983         (+[WebViewPrivate initialize]):
4984         (-[WebViewPrivate init]):
4985         (-[WebViewPrivate dealloc]):
4986         (-[WebViewPrivate finalize]):
4987
4988 2009-06-03  Sam Weinig  <sam@webkit.org>
4989
4990         Reviewed by Darin Adler.
4991
4992         Small cleanup in WebView.
4993         - Move global data initialization to WebView's initialization method.
4994         - Move _clearViewUpdateRunLoopObserver from WebViewPrivate to WebView (FileInternal)
4995
4996         * WebView/WebView.mm:
4997         (-[WebViewPrivate init]): Remove global initializers.
4998         (-[WebViewPrivate dealloc]): Cleanup whitespace.
4999         (-[WebViewPrivate finalize]): Ditto.
5000         (-[WebView _close]): Call [self _clearViewUpdateRunLoopObserver] instead of
5001         [_private _clearViewUpdateRunLoopObserver]
5002         (+[WebView initialize]): Move global initializers here.
5003         (-[WebView _clearViewUpdateRunLoopObserver]): Moved from WebViewPrivate.
5004         (viewUpdateRunLoopObserverCallBack): Call [self _clearViewUpdateRunLoopObserver]
5005         instead of [_private _clearViewUpdateRunLoopObserver]
5006
5007 2009-06-03  Dan Bernstein  <mitz@apple.com>
5008
5009         Reviewed by Anders Carlsson.
5010
5011         - WebKit part of eliminating WebCoreTextRenderer
5012
5013         * Misc/WebKitNSStringExtras.m:
5014         (webkit_CGCeiling): Added.
5015         (-[NSString _web_drawAtPoint:font:textColor:]): Replaced the malloc()ed
5016             string buffer with a Vector. Moved code from
5017             WebCoreDrawTextAtPoint() to here.
5018         (-[NSString _web_drawDoubledAtPoint:withTopColor:bottomColor:font:]):
5019         (-[NSString _web_widthWithFont:]): Replaced the malloc()ed string buffer
5020             with a Vector. Moved code from WebCoreTextFloatWidth() to here.
5021         * WebView/WebHTMLView.mm:
5022         (-[WebHTMLView _addToStyle:fontA:fontB:]): Replaced call to
5023             WebCoreFindFont() with use of
5024             +[WebFontCache fontWithFamily:traits:weight:size:].
5025         * WebView/WebView.mm:
5026         (+[WebView _setAlwaysUsesComplexTextCodePath:]): Changed to call
5027             Font::setCodePath() directly.
5028         (+[WebView _setShouldUseFontSmoothing:]): Changed to call
5029             Font::setShouldUseSmoothing().
5030         (+[WebView _shouldUseFontSmoothing]): Changed to call 
5031             Font::shouldUseSmoothing().
5032
5033 2009-06-03  Dan Bernstein  <mitz@apple.com>
5034
5035         Rubber-stamped by Mark Rowe.
5036
5037         - remove a private method that was used only by Safari 3.0.
5038
5039         * WebView/WebView.mm: Removed +_minimumRequiredSafariBuildNumber.
5040         * WebView/WebViewPrivate.h: Ditto.
5041
5042 2009-06-03  Dan Bernstein  <mitz@apple.com>
5043
5044         - build fix
5045
5046         * WebView/WebHTMLView.mm:
5047
5048 2009-06-03  Dan Bernstein  <mitz@apple.com>
5049
5050         Reviewed by Anders Carlsson.
5051
5052         - build fix
5053
5054         * WebView/WebHTMLView.mm:
5055         * WebView/WebView.mm:
5056
5057 2009-06-02  Darin Adler  <darin@apple.com>
5058
5059         Reviewed by David Hyatt.
5060
5061         Bug 26112: viewless WebKit -- make events work
5062         https://bugs.webkit.org/show_bug.cgi?id=26112
5063
5064         One change here is to make the -[WebFrame frameView] function assert if ever called
5065         in viewless mode, and fix many callers that would trip that assertion.
5066
5067         A major change is to put some methods and data in WebView that are currently in
5068         WebHTMLView, used only in viewless mode. A next step will be to use the WebView
5069         methods whenever possible, even when not in the viewless mode.
5070
5071         Also fix FrameView to do normal reference counting instead of a strange model with
5072         an explicit deref near creation time.
5073
5074         * WebCoreSupport/WebChromeClient.mm:
5075         (WebChromeClient::scrollRectIntoView): Add code to start in the appropriate place
5076         when dealing with viewless mode. This gets triggered when visiting the Google home page.
5077         (WebChromeClient::setToolTip): Changed to call WebView instead of WebHTMLView.
5078         (WebChromeClient::print): Changed to use a new selector that doesn't require a
5079         WebFrameView if present. Also don't even try to use the old selector in viewless mode.
5080
5081         * WebCoreSupport/WebEditorClient.mm:
5082         (WebEditorClient::respondToChangedSelection): Changed to call WebView instead of WebHTMLView.
5083
5084         * WebCoreSupport/WebFrameLoaderClient.mm:
5085         (WebFrameLoaderClient::transitionToCommittedForNewPage): Added more code paths for
5086         viewless mode to skip things we can't do in that mode, with appropriate FIXME.
5087         Use Frame::create and RefPtr and eliminate the strange reference counting of FrameView.
5088
5089         * WebView/WebDataSource.mm:
5090         (-[WebDataSource _receivedData:]): Added a _usesDocumentViews guard around code that's
5091         specific to document views.
5092
5093         * WebView/WebFrame.mm:
5094         (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): Added a _usesDocumentViews
5095         guard around code that's specific to document views.
5096         (-[WebFrame _hasSelection]): Added an implementation for viewless mode.
5097         (-[WebFrame _clearSelection]): Assert we're not in viewless mode; it doesn't really
5098         make sense to clear the selection in only one frame in viewless mode. Later we can
5099         decide what to do.
5100         (-[WebFrame _dragSourceMovedTo:]): Assert we're not in viewless mode; the dragging
5101         code for viewless mode shouldn't have to involve the WebFrame object at all.
5102         (-[WebFrame _dragSourceEndedAt:operation:]): Ditto.
5103         (-[WebFrame frameView]): Assert we're not in viewless mode. This assertion fires
5104         often, but it's a great pointer to code that needs to be changed.
5105
5106         * WebView/WebHTMLView.mm:
5107         (-[WebHTMLView hitTest:]): Tweaked a comment.
5108         (-[WebHTMLView _updateMouseoverWithEvent:]): Fixed a bug where the fake event for
5109         moving the mouse out of the old view ended up overwriting the event for moving
5110         the mouse within the new view.
5111         (-[WebHTMLView mouseDown:]): Got rid of explicit conversion of event to
5112         PlatformMouseEvent in call to sendContextMenuEvent; that's no longer possible
5113         without passing another argument, and it's now handled in EventHandler.
5114
5115         * WebView/WebTextCompletionController.h: Copied from WebKit/mac/WebView/WebHTMLView.mm.
5116         Removed everything except for the WebTextCompletionController class.
5117         * WebView/WebTextCompletionController.mm: Copied from WebKit/mac/WebView/WebHTMLView.mm.
5118         Ditto.
5119
5120         * WebView/WebUIDelegatePrivate.h: Added webView:printFrame: method.
5121
5122         * WebView/WebView.mm: Moved includes and fields in from WebHTMLView.
5123         (-[WebView _usesDocumentViews]): Updated for name change from useDocumentViews
5124         to usesDocumentViews.
5125         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Ditto.
5126         (-[WebView drawSingleRect:]): Ditto.
5127         (-[WebView isFlipped]): Ditto.
5128         (-[WebView setFrameSize:]): Ditto. Also changed to use _mainCoreFrame method.
5129         (-[WebView _viewWillDrawInternal]): Ditto.
5130         (-[WebView viewWillDraw]): Ditto.
5131         (-[WebView drawRect:]): Ditto.
5132         (-[WebView _close]): Added code to nil out the lastMouseoverView global.
5133         (-[WebView _dashboardRegions]): Use _mainCoreFrame.
5134         (-[WebView setProhibitsMainFrameScrolling:]): Ditto.
5135         (-[WebView _setInViewSourceMode:]): Ditto.
5136         (-[WebView _inViewSourceMode]): Ditto.
5137         (-[WebView _attachScriptDebuggerToAllFrames]): Ditto.
5138         (-[WebView _detachScriptDebuggerFromAllFrames]): Ditto.
5139         (-[WebView textIteratorForRect:]): Ditto.
5140         (-[WebView _executeCoreCommandByName:value:]): Ditto.
5141         (-[WebView addWindowObserversForWindow:]): Ditto.
5142         (-[WebView removeWindowObservers]): Ditto.
5143         (-[WebView _updateFocusedAndActiveState]): Ditto.
5144         (-[WebView _updateFocusedAndActiveStateForFrame:]): Turned into a class method.
5145         Added code to handle the viewless case without calling frameView.
5146         (-[WebView _windowDidBecomeKey:]): Updated for name change from useDocumentViews
5147         to usesDocumentViews.
5148         (-[WebView _windowDidResignKey:]): Ditto.
5149         (-[WebView _windowWillOrderOnScreen:]): Ditto.
5150         (-[WebView mainFrame]): Tweaked.
5151         (-[WebView selectedFrame]): Added a conditional to avoid trying to get at the
5152         frame view in viewless case.
5153         (-[WebView _setZoomMultiplier:isTextOnly:]): Use _mainCoreFrame.
5154         (-[WebView setCustomTextEncodingName:]): Ditto.
5155         (-[WebView windowScriptObject]): Ditto.
5156         (-[WebView setHostWindow:]): Ditto. Also put some code that's needed only for
5157         document views inside _private->usesDocumentViews.
5158         (-[WebView _hitTest:dragTypes:]): Tweaked.
5159         (-[WebView acceptsFirstResponder]): Added case for viewless mode along with a
5160         FIXME, since it's not complete.
5161         (-[WebView becomeFirstResponder]): Ditto.
5162         (-[WebView _webcore_effectiveFirstResponder]): Put the body of this inside
5163         a usesDocumentView check, because we don't need the first responder forwarding
5164         in viewless mode.
5165         (-[WebView setNextKeyView:]): Ditto.
5166         (-[WebView mouseDown:]): Added. Copied from WebHTMLView. FIXME in here suggests
5167         that we make WebHTMLView share this one soon, which I think is practical.
5168         (-[WebView mouseUp:]): Ditto.
5169         (-[WebView setHoverFeedbackSuspended:]): Added a code path for viewless mode.
5170         (-[WebView shouldClose]): Use _mainCoreFrame.
5171         (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
5172         (-[WebView setEditable:]): Ditto.
5173         (-[WebView _frameViewAtWindowPoint:]): Added an assertion that we're not in
5174         viewless mode since this method makes no sense in that mode.
5175         (-[WebView _setMouseDownEvent:]): Added. Copied from WebHTMLView. I plan to
5176         eliminate the one in WebHTMLView soon.
5177         (-[WebView _cancelUpdateMouseoverTimer]): Ditto.
5178         (-[WebView _stopAutoscrollTimer]): Ditto.
5179         (+[WebView _updateMouseoverWithEvent:]): Ditto.
5180         (-[WebView _updateMouseoverWithFakeEvent]): Ditto.
5181         (-[WebView _setToolTip:]): Added. Calls through to the WebHTMLView version.
5182         (-[WebView _selectionChanged]): Ditto.
5183         (-[WebView _mainCoreFrame]): Added.
5184         (-[WebView _needsOneShotDrawingSynchronization]): Moved into the WebInternal
5185         category.
5186         (-[WebView _setNeedsOneShotDrawingSynchronization:]): Ditto.
5187         (-[WebView _startedAcceleratedCompositingForFrame:]): Ditto.
5188         (-[WebView _stoppedAcceleratedCompositingForFrame:]): Ditto.
5189         (viewUpdateRunLoopObserverCallBack): Ditto.
5190         (-[WebView _scheduleViewUpdate]): Ditto.
5191
5192         * WebView/WebViewInternal.h: Made most of the file not compile at all when
5193         included from non-C++ source files, elminating some excess declarations and
5194         typedefs. Moved more methods into the real internal category. Added new
5195         methods _setMouseDownEvent, _cancelUpdateMouseoverTimer, _stopAutoscrollTimer,
5196         _updateMouseoverWithFakeEvent, _selectionChanged, and _setToolTip:.
5197
5198 2009-06-02  Mark Rowe  <mrowe@apple.com>
5199
5200         Reviewed by Anders Carlsson.
5201
5202         Remove workaround that was added to address <rdar://problem/5488678> as it no longer affects our Tiger builds.
5203
5204         * Configurations/Base.xcconfig:
5205
5206 2009-06-01  Darin Adler  <darin@apple.com>
5207
5208         * WebView/WebTextCompletionController.mm: Fix Tiger build by adding import
5209         of WebTypesInternal.h.
5210
5211 2009-06-01  Darin Adler  <darin@apple.com>
5212
5213         Reviewed by Maciej Stachowiak.
5214
5215         Bug 26113: break WebTextCompletionController out into its own source file
5216         https://bugs.webkit.org/show_bug.cgi?id=26113
5217
5218         * WebView/WebHTMLView.mm:
5219         (-[WebHTMLViewPrivate dealloc]): Updated for new name.
5220         (-[WebHTMLViewPrivate clear]): Ditto.
5221         (-[WebHTMLView _frameOrBoundsChanged]): Ditto.
5222         (-[WebHTMLView menuForEvent:]): Ditto.
5223         (-[WebHTMLView windowDidResignKey:]): Ditto.
5224         (-[WebHTMLView windowWillClose:]): Ditto.
5225         (-[WebHTMLView mouseDown:]): Ditto.
5226         (-[WebHTMLView resignFirstResponder]): Ditto.
5227         (-[WebHTMLView keyDown:]): Ditto.
5228         (-[WebHTMLView complete:]): Ditto. Also pass WebView to init method.
5229         (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]): Ditto.
5230
5231         * WebView/WebTextCompletionController.h: Copied from mac/WebView/WebHTMLView.mm.
5232         * WebView/WebTextCompletionController.mm: Copied from mac/WebView/WebHTMLView.mm.
5233         Changed initializer to pass in a spearate WebView and WebHTMLView, to smooth the
5234         way for handling viewless mode properly in the future.
5235
5236 2009-05-30  David Kilzer  <ddkilzer@apple.com>
5237
5238         Add JSLock to -[WebScriptCallFrame scopeChain]
5239
5240         Reviewed by Darin Adler.
5241
5242         In Debug builds of WebKit, Dashcode launching MobileSafari could
5243         cause the ASSERT(JSLock::lockCount() > 0) assertion to fire in
5244         JSC::Heap::heapAllocate() because the JSLock wasn't taken.
5245
5246         * WebView/WebScriptDebugDelegate.mm:
5247         (-[WebScriptCallFrame scopeChain]): Take JSLock before calling
5248         into JavaScriptCore.
5249
5250 2009-05-28  Mark Rowe  <mrowe@apple.com>
5251
5252         Rubber-stamped by Dan Bernstein.
5253
5254         Build fix.  Move off a deprecated NSFileManager method.
5255
5256         * Misc/WebNSFileManagerExtras.h:
5257         * Misc/WebNSFileManagerExtras.m:
5258         (-[NSFileManager destinationOfSymbolicLinkAtPath:error:]): Implement a new-in-Leopard method for Tiger to use.
5259         (-[NSFileManager attributesOfItemAtPath:error:]): Ditto.
5260         * Plugins/WebNetscapePluginPackage.mm:
5261         (-[WebNetscapePluginPackage _initWithPath:]): Use the new non-deprecated methods.
5262
5263 2009-05-28  Dirk Schulze  <krit@webkit.org>
5264
5265         Reviewed by Nikolas Zimmermann.
5266
5267         Added new build flag --filters. More details in WebCore/ChangeLog.
5268
5269         * Configurations/FeatureDefines.xcconfig:
5270
5271 2009-05-27  Alexey Proskuryakov  <ap@webkit.org>
5272
5273         Reviewed by Darin Adler.
5274
5275         https://bugs.webkit.org/show_bug.cgi?id=26009
5276         <rdar://problem/6925656> REGRESSION (r43973): Problems While Working With OpenVanilla
5277
5278         * WebView/WebHTMLView.mm:
5279         (-[WebHTMLView _updateSelectionForInputManager]): Don't call updateWindows if the selection
5280         is None. This routinely happens during editing, and it doesn't mean that we left an editable
5281         area (in which case the selection changes to a non-editable one).
5282
5283 2009-05-26  Sam Weinig  <sam@webkit.org>
5284
5285         Reviewed by Brady Eidson.
5286
5287         Fix for <rdar://problem/6916371>
5288         iWeb 'Announce' button does nothing after publishing to MobileMe
5289
5290         Add linked-on-or-after check to allow older WebKit apps to use the
5291         old behavior of sniffing everything (including file: urls)
5292
5293         * Misc/WebKitVersionChecks.h:
5294         * WebView/WebView.mm:
5295         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
5296
5297 2009-05-26  Stephanie Lewis  <slewis@apple.com>
5298
5299         Reviewed by Ada Chan and Oliver Hunt.
5300
5301         Remove WebView observers in during fast teardown.
5302         <rdar://problem/6922619> REGRESSION (Tiger-only?): After restoring windows from the previous session, a crash occurs while attempting to quit Safari
5303
5304         * WebView/WebView.mm:
5305         (-[WebView _closeWithFastTeardown]):
5306
5307 2009-05-26  Anders Carlsson  <andersca@apple.com>
5308
5309         Reviewed by Dan Bernstein.
5310
5311         <rdar://problem/6901751> 
5312         REGRESSION (r35515): Tiger crash painting the selection on registration page of car2go.com
5313
5314         Remove WKCGContextIsSafeToClip.
5315
5316         * WebCoreSupport/WebSystemInterface.m:
5317         (InitWebCoreSystemInterface):
5318
5319 2009-05-26  Dan Bernstein  <mitz@apple.com>
5320
5321         Reviewed by Darin Adler.
5322
5323         - fix <rdar://problem/6922371> REGRESSION (r43973): Can't type first
5324           character with an umlaut, circumflex, or accent in Mail or in a wiki
5325
5326         * WebView/WebHTMLView.mm:
5327         (isTextInput): Moved here.
5328         (isInPasswordField): Moved here.
5329         (-[WebHTMLView becomeFirstResponder]): Update the exposeInputContext
5330         flag and let NSApplication update the input manager with the new input
5331         context if necessary.
5332         (-[WebHTMLView _updateSelectionForInputManager]): Changed to use the
5333         NSApp global instead of +[NSApplication sharedApplication].
5334
5335 2009-05-26  Mark Rowe  <mrowe@apple.com>
5336
5337         Fix the Tiger build.
5338
5339         * Misc/WebNSObjectExtras.mm:
5340         (-[NSInvocation _webkit_invokeAndHandleException:]): Rename the local variable so that
5341         it doesn't conflict with a member variable on Tiger.
5342
5343 2009-05-26  Darin Adler  <darin@apple.com>
5344
5345         Reviewed by Mark Rowe.
5346
5347         <rdar://problem/6921835> REGRESSION (r44115): Crash in Leopard Mail viewing message
5348
5349         Fix case where we autorelease an object on the main thread that we are returning
5350         to another thread when using our _webkit_invokeOnMainThread method.
5351
5352         * Misc/WebNSObjectExtras.mm:
5353         (returnTypeIsObject): Added.
5354         (-[WebMainThreadInvoker forwardInvocation:]): Autorelease the object on the calling
5355         thread, balancing a retain done on the main thread.
5356         (-[NSInvocation _webkit_invokeAndHandleException:]): Retain the object on the main
5357         thread.
5358
5359 2009-05-26  David Hyatt  <hyatt@apple.com>
5360
5361         Back out the workaround for Mail crashing.  Darin is working on the real fix.
5362
5363         * Misc/WebNSObjectExtras.mm:
5364         (-[WebMainThreadInvoker forwardInvocation:]):
5365
5366 2009-05-26  David Hyatt  <hyatt@apple.com>
5367
5368         Reviewed by Darin Adler.
5369
5370         Fix for https://bugs.webkit.org/show_bug.cgi?id=25969.
5371
5372         Stop using notifications for boundsChanged, since the notifications are being sent too late.
5373         Since subviews get resized before parents do, the notification comes in telling the WebHTMLView
5374         that its size has changed *before* we've done setNeedsLayout in the WebView size change callback.
5375
5376         Become more like the Windows platform and just do the bounds changed immediately as our size is
5377         being altered by subclassing setFrameSize in WebView.
5378
5379         Also patch WebDynamicScrollbarsView to detect the case where neither axis is really spilling out
5380         past the viewport, so that in shrinking situations we figure out that we don't need scrollbars
5381         any more.
5382
5383         * WebView/WebDynamicScrollBarsView.m:
5384         (-[WebDynamicScrollBarsView updateScrollers]):
5385         * WebView/WebView.mm:
5386         (-[WebView _boundsChangedToNewSize:]):
5387         (-[WebView setFrameSize:]):
5388         (-[WebView viewWillMoveToWindow:]):
5389         (-[WebView viewDidMoveToWindow]):
5390
5391 2009-05-25  Anders Carlsson  <andersca@apple.com>
5392
5393         Reviewed by Sam Weinig.
5394
5395         - WebKit side of <rdar://problem/6914001>.
5396
5397         * Plugins/Hosted/NetscapePluginHostManager.h:
5398         * Plugins/Hosted/NetscapePluginHostManager.mm:
5399         (WebKit::NetscapePluginHostManager::didCreateWindow):
5400         Iterate over all plug-in hosts. If one is in full-screen mode, make sure to activate the
5401         WebKit app instead.
5402         
5403         * Plugins/Hosted/NetscapePluginHostProxy.h:
5404         (WebKit::NetscapePluginHostProxy::isMenuBarVisible):
5405         Add getter.
5406         
5407         * Plugins/Hosted/NetscapePluginHostProxy.mm:
5408         (WKPCEvaluate):
5409         Add allowPopups flag.
5410         
5411         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
5412         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
5413         (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
5414         (WebKit::NetscapePluginInstanceProxy::PluginRequest::allowPopups):
5415         (WebKit::NetscapePluginInstanceProxy::loadURL):
5416         (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
5417         (WebKit::NetscapePluginInstanceProxy::loadRequest):
5418         (WebKit::NetscapePluginInstanceProxy::evaluate):
5419         Use "allowPopups" instead of "userGesture".
5420         
5421         * Plugins/Hosted/WebKitPluginClient.defs:
5422         Add allowPopups argument to Evaluate.
5423         
5424         * Plugins/Hosted/WebKitPluginHostTypes.h:
5425         Use "allowPopups" instead of "userGesture".
5426
5427         * WebCoreSupport/WebChromeClient.mm:
5428         (WebChromeClient::createWindow):
5429         Call didCreateWindow here.
5430         
5431         * WebCoreSupport/WebFrameLoaderClient.mm:
5432         (WebFrameLoaderClient::dispatchCreatePage):
5433         Ditto.
5434
5435 2009-05-25  Anders Carlsson  <andersca@apple.com>
5436
5437         Reviewed by Sam Weinig.
5438
5439         - Fix <rdar://problem/6915849>.
5440         
5441         Release the placeholder window after -[NSApplication runModalForWindow] returns.
5442         
5443         * Plugins/Hosted/NetscapePluginHostProxy.mm:
5444         (WebKit::NetscapePluginHostProxy::beginModal):
5445         (WebKit::NetscapePluginHostProxy::endModal):
5446
5447 2009-05-24  Dan Bernstein  <mitz@apple.com>
5448
5449         - revert an accidental change from r43964.
5450
5451         * WebView/WebView.mm:
5452         (+[WebView _setShouldUseFontSmoothing:]):
5453
5454 2009-05-24  Darin Adler  <darin@apple.com>
5455
5456         Reviewed by Dan Bernstein and Tim Hatcher.
5457
5458         <rdar://problem/6913045> New console message spewed by automator CLI after installing JetstreamLeo40B21a
5459
5460         * Misc/WebNSObjectExtras.mm:
5461         (-[WebMainThreadInvoker initWithTarget:]): Tweaked argument name.
5462         (-[WebMainThreadInvoker forwardInvocation:]): Removed call to retainArguments.
5463         This was unneeded and in the case of a newly created but not yet fully initialized
5464         NSView object it caused the abovementioned bug.
5465         (-[WebMainThreadInvoker handleException:]): Tweaked argument name. Added assertion.
5466         (-[NSInvocation _webkit_invokeAndHandleException:]): Tweaked name of local variable
5467         that holds the exception.
5468
5469 2009-05-23  David Kilzer  <ddkilzer@apple.com>
5470
5471         Part 2 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr
5472
5473         <https://bugs.webkit.org/show_bug.cgi?id=25495>
5474
5475         Reviewed by Oliver Hunt.
5476
5477         * History/WebHistory.mm:
5478         (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Return
5479         0 instead of an empty auto_ptr<>.
5480         * History/WebHistoryItem.mm:
5481         (-[WebHistoryItem initFromDictionaryRepresentation:]): Use
5482         OwnPtr<> instead of auto_ptr<> for stack variable.
5483         * WebCoreSupport/WebChromeClient.h:
5484         (WebChromeClient::createHTMLParserQuirks): Return a PassOwnPtr<>
5485         instead of a raw HTMLParserQuirks pointer.
5486
5487 2009-05-23  David Kilzer  <ddkilzer@apple.com>
5488
5489         Part 1 of 2: Bug 25495: Implement PassOwnPtr and replace uses of std::auto_ptr
5490
5491         <https://bugs.webkit.org/show_bug.cgi?id=25495>
5492
5493         Reviewed by Oliver Hunt.
5494
5495         * ForwardingHeaders/wtf/OwnPtrCommon.h: Added.
5496         * ForwardingHeaders/wtf/PassOwnPtr.h: Added.
5497
5498 2009-05-22  Darin Adler  <darin@apple.com>
5499
5500         Reviewed by Dan Bernstein.
5501
5502         - Fix <rdar://problem/6913765> REGRESSION (r42331-r42334): Extra scroll
5503           bars appearing on Welcome panels of iLife '09 apps
5504
5505         * WebView/WebView.mm:
5506         (needsUnwantedScrollBarWorkaround): Added. Checks if this is a panel
5507         where scroll bars are unwanted. For safety, limited to only Apple applications. 
5508         (-[WebView viewDidMoveToWindow]): If the workaround is needed, disallow
5509         scrolling the main frame. This prevents scroll bars from appearing.
5510
5511 2009-05-22  Adam Barth  <abarth@webkit.org>
5512
5513         Reviewed by Maciej Stachowiak.
5514
5515         https://bugs.webkit.org/show_bug.cgi?id=25955
5516
5517         Remove the policyBaseURL parameter from setCookie.  This parameter is
5518         redudant with the document parameter.
5519
5520         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
5521         (WebKit::NetscapePluginInstanceProxy::setCookies):
5522         * Plugins/WebNetscapePluginView.mm:
5523         (-[WebNetscapePluginView setVariable:forURL:value:length:]):
5524
5525 2009-05-21  Darin Fisher  <darin@chromium.org>
5526
5527         Fix-up coding style.
5528
5529         * WebCoreSupport/WebEditorClient.mm:
5530         (WebEditorClient::getAutoCorrectSuggestionForMisspelledWord):
5531
5532 2009-05-20  Siddhartha Chattopadhyaya  <sidchat@google.com>
5533
5534         Reviewed by Justin Garcia.
5535         
5536         Add automatic spell correction support in WebKit
5537
5538         https://bugs.webkit.org/show_bug.cgi?id=24953
5539
5540         * WebCoreSupport/WebEditorClient.h:
5541         * WebCoreSupport/WebEditorClient.mm:
5542         (WebEditorClient::getAutoCorrectSuggestionForMisspelledWord):
5543
5544 2009-05-21  Alexey Proskuryakov  <ap@webkit.org>
5545
5546         Reviewed by Darin Adler.
5547
5548         <rdar://problem/6907542> REGRESSION (r43143): Hang in RenderLineBoxList::dirtyLinesFromChangedChild
5549         when clicking link to load Flash animation (http://www.roambi.com)
5550
5551         * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::respondToChangedSelection):
5552         Don't call -[NSApplication updateWindows] here, WebHTMLView can take care of this.
5553
5554         * WebView/WebHTMLView.mm:
5555         (-[WebHTMLView inputContext]): Use a precomputed boolean stored in WebHTMLViewPrivate, as
5556         calling isTextInput() is not always safe.
5557         (-[WebHTMLView textStorage]): Ditto.
5558         (-[WebHTMLView _updateSelectionForInputManager]): Update _private->exposeInputContext when
5559         selection changes, and let AppKit update its cache if necessary.
5560
5561 2009-05-21  Alexey Proskuryakov  <ap@webkit.org>
5562
5563         Reviewed by Darin Adler.
5564
5565         <rdar://problem/5579292> REGRESSION (2-3): "Default default" encoding for Korean changed
5566         from Korean (Windows, DOS) to Korean (ISO 2022-KR), which breaks some sites
5567
5568         * WebView/WebPreferences.mm:
5569        (+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Update the existing fix
5570        for the changed result of CFStringConvertEncodingToIANACharSetName().
5571
5572 2009-05-21  Alexey Proskuryakov  <ap@webkit.org>
5573
5574         Reviewed by Darin Adler.
5575
5576         <rdar://problem/6883758> REGRESSION (r43143): First character typed with input method does
5577         not go into inline hole (seen with Chinese & Kotoeri on top Chinese website www.baidu.com)
5578
5579         * WebCoreSupport/WebEditorClient.mm: (WebEditorClient::respondToChangedSelection):
5580         Call -[NSApplication updateWindows] to make AppKit re-fetch the input context when selection
5581         changes. Since we use SelectionController to check whether the view is editable, it is
5582         important not to re-fetch the context too early, e.g. from a focus changed notification.
5583
5584 2009-05-21  Eric Seidel  <eric@webkit.org>
5585
5586         Reviewed by Alexey Proskuryakov.
5587
5588         Rename DragController::dragOperation() to sourceDragOperation() for clarity
5589
5590         * WebView/WebHTMLView.mm:
5591         (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
5592
5593 2009-05-21  Dan Bernstein  <mitz@apple.com>
5594
5595         Reviewed by Anders Carlsson.
5596
5597         - WebKit part of <rdar://problem/6901751> REGRESSION (r35515): Tiger
5598           crash painting the selection on registration page of car2go.com
5599
5600         * WebCoreSupport/WebSystemInterface.m:
5601         (InitWebCoreSystemInterface): Added CGContextIsSafeToClip.
5602
5603 2009-05-20  Stephanie Lewis  <slewis@apple.com>
5604
5605         Update the order files.  <rdar://problem/6881750> Generate new order files.
5606
5607         * WebKit.order:
5608
5609 2009-05-20  Brady Eidson  <beidson@apple.com>
5610
5611         Reviewed by Darin Adler.
5612
5613         <rdar://problem/6905336> REGRESSION: "Clear History" does not save empty history to disk
5614
5615         * History/WebHistory.mm:
5616         (-[WebHistoryPrivate data]): If there are no entries, return an empty NSData instead of nil.
5617
5618 2009-05-20  Anders Carlsson  <andersca@apple.com>
5619
5620         Reviewed by Darin Adler and Kevin Decker.
5621
5622         WebKit side of <rdar://problem/6895072>
5623         
5624         Pass the localization as a launch property.
5625         
5626         * Plugins/Hosted/NetscapePluginHostManager.mm:
5627         (WebKit::NetscapePluginHostManager::spawnPluginHost):
5628
5629 2009-05-20  Dan Bernstein  <mitz@apple.com>
5630
5631         - fix the build after r43918
5632
5633         * WebCoreSupport/WebChromeClient.h:
5634         (WebChromeClient::setCursor):
5635
5636 2009-05-20  Darin Adler  <darin@apple.com>
5637
5638         Reviewed by John Sullivan.
5639
5640         <rdar://problem/4023899> Shift-Tab skips key views in toolbar in Safari, although Tab
5641         iterates through them properly
5642
5643         * WebView/WebView.mm:
5644         (-[WebView previousValidKeyView]): Work around a bug in -[NSView previousValidKeyView].
5645
5646 2009-05-19  Timothy Hatcher  <timothy@apple.com>
5647
5648         Add a new private API method that will dispatch pending loads that have been scheduled
5649         because of recent DOM additions or style changes.
5650
5651         <rdar://problem/6889218> REGRESSION: Some iChat transcript resources are not
5652         loaded because willSendRequest doesn't happen immediately
5653
5654         Reviewed by Antti Koivisto.
5655
5656         * WebView/WebView.mm:
5657         (-[WebView _dispatchPendingLoadRequests]): Call Loader::servePendingRequests().
5658         * WebView/WebViewPrivate.h: Added _dispatchPendingLoadRequests.
5659
5660 2009-05-18  Sam Weinig  <sam@webkit.org>
5661
5662         <rdar://problem/6899044> Can't see Apple ad on nytimes.com unless I spoof the user agent
5663         
5664         Add user agent hack for pointroll.com.
5665
5666         Reviewed by Steve Falkenburg.
5667
5668         * WebView/WebView.mm:
5669         (-[WebView WebCore::_userAgentForURL:WebCore::]):
5670
5671 2009-05-16  Anders Carlsson  <andersca@apple.com>
5672
5673         Reviewed by Sam Weinig and Dan Bernstein.
5674
5675         Fix <rdar://problem/6889644>
5676         
5677         * Plugins/Hosted/NetscapePluginHostManager.mm:
5678         (WebKit::NetscapePluginHostManager::spawnPluginHost):
5679
5680 2009-05-16  Dan Bernstein  <mitz@apple.com>
5681
5682         - revert an accidental change from r43802.
5683
5684         * WebInspector/WebInspector.mm:
5685
5686 2009-05-16  Anders Carlsson  <andersca@apple.com>
5687
5688         Reviewed by Dan Bernstein.
5689
5690         <rdar://problem/6895347> Mouse wheeling in the QuickTime plug-in (incorrectly) scrolls the page
5691         
5692         Fix logic. The plug-in returns true if it handled the event.
5693         
5694         * Plugins/WebNetscapePluginView.mm:
5695         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
5696
5697 2009-05-16  Dan Bernstein  <mitz@apple.com>
5698
5699         Reviewed by Alexey Proskuryakov.
5700
5701         - fix <rdar://problem/6873305> Two distinct characters are not displayed
5702           correctly with 2 of the font selections from the stickies widget
5703
5704         * WebView/WebHTMLView.mm:
5705         (-[WebHTMLView _plainTextFromPasteboard:]): Return precomposed text.
5706         This is consistent with
5707         -_documentFragmentFromPasteboard:forType:inContext:subresources:.
5708
5709 2009-05-15  Anders Carlsson  <andersca@apple.com>
5710
5711         Reviewed by Dan Bernstein.
5712
5713         Fix <rdar://problem/6875398>.
5714         
5715         * Plugins/Hosted/NetscapePluginHostManager.mm:
5716         (WebKit::NetscapePluginHostManager::instantiatePlugin):
5717         If we failed to instantiate the plug-in, call cleanup() so that any streams created by the plug-in from its
5718         NPP_New callback are destroyed.
5719         
5720         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
5721         Make cleanup() public.
5722
5723 2009-05-15  Darin Adler  <darin@apple.com>
5724
5725         Reviewed by Anders Carlsson.
5726
5727         <rdar://problem/6889823> hash table iterator used after hash table modified in
5728         ProxyInstance::fieldNamed() when viewing movie trailer
5729
5730         * Plugins/Hosted/ProxyInstance.mm:
5731         (WebKit::ProxyInstance::methodsNamed): Move add call after the waitForReply call.
5732         Anders says that by the time we return someone else might have done the same add
5733         for us.
5734         (WebKit::ProxyInstance::fieldNamed): Ditto.
5735
5736 2009-05-15  Anders Carlsson  <andersca@apple.com>
5737
5738         Reviewed by Darin Adler.
5739
5740         <rdar://problem/6892055> 
5741         Replace WKN_GetLocation with WKN_ResolveURL (WKN_GetLocation was confusing and did not take the base URL into account)
5742         
5743         * Plugins/Hosted/NetscapePluginHostProxy.mm:
5744         (WKPCResolveURL):
5745         New MIG callback.
5746         
5747         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
5748         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
5749         (WebKit::NetscapePluginInstanceProxy::resolveURL):
5750         Use FrameLoader::complete URL here.
5751         
5752         * Plugins/Hosted/WebKitPluginClient.defs:
5753         Add new MIG definition.
5754         
5755         * Plugins/WebBaseNetscapePluginView.h:
5756         * Plugins/WebBaseNetscapePluginView.mm:
5757         (-[WebBaseNetscapePluginView resolvedURLStringForURL:target:]):        
5758         * Plugins/WebNetscapeContainerCheckPrivate.h:
5759         * Plugins/WebNetscapeContainerCheckPrivate.mm:
5760         (browserContainerCheckFuncs):
5761         * Plugins/WebNetscapePluginView.h:
5762         * Plugins/WebNetscapePluginView.mm:
5763         (-[WebNetscapePluginView resolveURL:forTarget:]):
5764         * Plugins/npapi.mm:
5765         (WKN_ResolveURL):
5766
5767 2009-05-15  Dan Bernstein  <mitz@apple.com>
5768
5769         Reviewed by Darin Adler.
5770
5771         - fix <rdar://problem/6892052> WebTextIterator should not “emit
5772           characters between all visible positions”
5773
5774         * WebView/WebTextIterator.mm:
5775         (-[WebTextIterator initWithRange:]): Changed to construct a TextIterator
5776         with emitCharactersBetweenAllVisiblePositions set to false.
5777
5778 2009-05-15  Mark Rowe  <mrowe@apple.com>
5779
5780         Reviewed by Dave Kilzer.
5781
5782         Look for libWebKitSystemInterface.a in a more reasonable location.
5783
5784         * Configurations/DebugRelease.xcconfig:
5785
5786 2009-05-14  David Hyatt  <hyatt@apple.com>
5787
5788         Reviewed by Tim Hatcher.
5789
5790         Fix for <rdar://problem/6886217> REGRESSION (S4 beta-ToT): Adium chat window contents no longer resize.
5791
5792         Technically this is a bug in Adium.  It appears that Adium has subclassed the WebView and implemented
5793         viewDidMoveToWindow in its subclass improperly.  It doesn't call up to the base class WebView like it
5794         should and so our boundsChanged notification never gets added.
5795
5796         Reduce the dependence on viewDidMoveToWindow by moving the registration of observers into
5797         viewWillMoveToWindow instead.
5798
5799         * WebView/WebView.mm:
5800         (-[WebView addSizeObserversForWindow:]):
5801         (-[WebView removeWindowObservers]):
5802         (-[WebView addWindowObserversForWindow:]):
5803         (-[WebView viewWillMoveToWindow:]):
5804         (-[WebView viewDidMoveToWindow]):
5805         (-[WebView viewDidMoveToSuperview]):
5806
5807 2009-05-14  David Levin  <levin@chromium.org>
5808
5809         Reviewed by Eric Seidel.
5810
5811         https://bugs.webkit.org/show_bug.cgi?id=24704
5812
5813         Allow the local cache directory to be set using a defaults key.
5814
5815         * Misc/WebKitNSStringExtras.h:
5816         * Misc/WebKitNSStringExtras.m:
5817         (+[NSString _webkit_localCacheDirectoryWithBundleIdentifier:]):
5818         * WebKit.exp:
5819
5820 2009-05-14  Darin Adler  <darin@apple.com>
5821
5822         Reviewed by Adam Roben.
5823
5824         <rdar://problem/6879999> Automator actions that use WebKit on a background thread fail when run outside of Automator
5825
5826         * WebView/WebView.mm:
5827         (clientNeedsWebViewInitThreadWorkaround): Added. Contains new broader rule.
5828         (needsWebViewInitThreadWorkaround): Changed to call clientNeedsWebViewInitThreadWorkaround.
5829
5830 2009-05-14  Darin Adler  <darin@apple.com>
5831
5832         Reviewed by John Sullivan.
5833
5834         Bug 24049: Second right-click crashes safari when alert invoked
5835         https://bugs.webkit.org/show_bug.cgi?id=24049
5836         rdar://problem/6878977
5837
5838         * WebView/WebHTMLView.mm:
5839         (-[WebHTMLView rightMouseUp:]): Added a retain/autorelease of the event.
5840         (-[WebHTMLView menuForEvent:]): Ditto. Also cleaned up the logic here and
5841         eliminated some use of pointers that might be invalid after calling through
5842         to WebCore.
5843         (-[WebHTMLView scrollWheel:]): Ditto.
5844         (-[WebHTMLView acceptsFirstMouse:]): Ditto.
5845         (-[WebHTMLView shouldDelayWindowOrderingForEvent:]): Ditto.
5846         (-[WebHTMLView mouseDown:]): Ditto.
5847         (-[WebHTMLView mouseDragged:]): Ditto.
5848         (-[WebHTMLView mouseUp:]): Ditto.
5849         (-[WebHTMLView keyDown:]): Ditto.
5850         (-[WebHTMLView keyUp:]): Ditto.
5851         (-[WebHTMLView flagsChanged:]): Ditto.
5852         (-[WebHTMLView performKeyEquivalent:]): Ditto.
5853
5854 2009-05-14  Mark Rowe  <mrowe@apple.com>
5855
5856         Rubber-stamped by Darin Adler.
5857
5858         <rdar://problem/6681868> When building with Xcode 3.1.3 should be using gcc 4.2
5859
5860         The meaning of XCODE_VERSION_ACTUAL is more sensible in newer versions of Xcode.
5861         Update our logic to select the compiler version to use the more appropriate XCODE_VERSION_MINOR
5862         if the version of Xcode supports it, and fall back to XCODE_VERSION_ACTUAL if not.
5863
5864         * Configurations/Base.xcconfig:
5865
5866 2009-05-13  Anders Carlsson  <andersca@apple.com>
5867
5868         Reviewed by Sam Weinig.
5869
5870         WebKit side of <rdar://problem/6884476>.
5871         
5872         * Plugins/Hosted/NetscapePluginHostProxy.mm:
5873         (WKPCGetLocation):
5874         Forward this to the plug-in instance proxy.
5875         
5876         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
5877         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
5878         (WebKit::NetscapePluginInstanceProxy::getLocation):
5879         Ask the plug-in view for the location.
5880         
5881         * Plugins/Hosted/WebKitPluginClient.defs:
5882         Add MIG definition.
5883         
5884         * Plugins/WebBaseNetscapePluginView.h:
5885         * Plugins/WebBaseNetscapePluginView.mm:
5886         (-[WebBaseNetscapePluginView locationStringForTarget:]):
5887         Return the URL for a given frame.
5888         
5889         * Plugins/WebNetscapeContainerCheckPrivate.h:
5890         Bump version. Add new declaration to the vtable.
5891         
5892         * Plugins/WebNetscapeContainerCheckPrivate.mm:
5893         (browserContainerCheckFuncs):
5894         Add new declaration to the vtable.
5895         
5896         * Plugins/WebNetscapePluginView.h:
5897         * Plugins/WebNetscapePluginView.mm:
5898         (-[WebNetscapePluginView locationForTarget:]):
5899         Call the base class method.
5900         
5901         * Plugins/npapi.mm:
5902         (WKN_GetLocation):
5903         Forward this to the plug-in view.
5904
5905 2009-05-13  Douglas R. Davidson  <ddavidso@apple.com>
5906
5907         Reviewed by Darin Adler.
5908
5909         <rdar://problem/6871587> Smart Copy/Paste setting should persist as continuous
5910         spell checking setting does
5911
5912         * WebView/WebPreferenceKeysPrivate.h: Added WebSmartInsertDeleteEnabled.
5913
5914         * WebView/WebView.mm:
5915         (-[WebViewPrivate init]): Initialize based on WebSmartInsertDeleteEnabled
5916         default.
5917         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
5918         Removed code that initialized here.
5919         (-[WebView setSmartInsertDeleteEnabled:]): Set default here was with
5920         continuous spell checking setting.
5921
5922 2009-05-13  Darin Adler  <darin@apple.com>
5923
5924         Revert the parser arena change. It was a slowdown, not a speedup.
5925         Better luck next time (I'll break it up into pieces).
5926
5927 2009-05-13  Darin Adler  <darin@apple.com>
5928
5929         Reviewed by Cameron Zwarich.
5930
5931         Bug 25674: syntax tree nodes should use arena allocation
5932         https://bugs.webkit.org/show_bug.cgi?id=25674
5933
5934         * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Updated includes.
5935         New ones needed due to reducing includes of JSDOMBinding.h.
5936         * WebView/WebScriptDebugger.mm: Ditto.
5937
5938 2009-05-13  Douglas R. Davidson  <ddavidso@apple.com>
5939
5940         Reviewed by Darin Adler.
5941
5942         <rdar://problem/6879145>
5943         Generate a contextual menu item allowing autocorrections to
5944         easily be changed back.  Refrain from re-correcting items
5945         that have already been autocorrected once.
5946
5947         * WebCoreSupport/WebViewFactory.mm:
5948         (-[WebViewFactory contextMenuItemTagChangeBack:]):
5949         * WebView/WebUIDelegatePrivate.h:
5950
5951 2009-05-12  Anders Carlsson  <andersca@apple.com>
5952
5953         Reviewed by Dan Bernstein.
5954
5955         Fix <rdar://problem/6878105>.
5956         
5957         When instantiating the QT plug-in under Dashboard, force "kiosk mode". 
5958         
5959         * Plugins/WebBaseNetscapePluginView.mm:
5960         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
5961
5962 2009-05-12  Dan Bernstein  <mitz@apple.com>
5963
5964         Reviewed by Darin Adler.
5965
5966         - declare a forgotten method
5967
5968         * DOM/WebDOMOperationsPrivate.h: Declare -[DOMNode markupString] in the
5969         WebDOMNodeOperationsPendingPublic category.
5970
5971 2009-05-10  Alexey Proskuryakov  <ap@webkit.org>
5972
5973         Reviewed by Dan Bernstein.
5974
5975         <rdar://problem/6870383> Have to enter credentials twice when downloading from a protected page
5976
5977         * Misc/WebDownload.m: Removed.
5978         * Misc/WebDownload.mm: Copied from WebKit/mac/Misc/WebDownload.m.
5979         (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]): Try to use
5980         credentials from WebCore storage.
5981
5982 2009-05-08  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
5983
5984         Not reviewed. Fix clean builds, forgot to land name() -> formControlName() rename patch in WebKit. Only landed the WebCore side.
5985
5986         * WebView/WebHTMLRepresentation.mm:
5987         (-[WebHTMLRepresentation elementWithName:inForm:]):
5988
5989 2009-05-08  Anders Carlsson  <andersca@apple.com>
5990
5991         Reviewed by Kevin Decker.
5992
5993         - Fix <rdar://problem/6866712>.
5994
5995         Instead of just caching whether a plug-in object _has_ a field or method, also add an entry to the cache
5996         if it _doesn't_ have a certain field or method. This way we have to make fewer calls to the plug-in host.
5997         
5998         * Plugins/Hosted/ProxyInstance.mm:
5999         (WebKit::ProxyInstance::methodsNamed):
6000         (WebKit::ProxyInstance::fieldNamed):
6001
6002 2009-05-08  Douglas R. Davidson  <ddavidso@apple.com>
6003
6004         Reviewed by Darin Adler.
6005
6006         Fixes for <rdar://problem/6852771>.
6007         Disable text checking menu items if view is not editable.
6008
6009         * WebView/WebHTMLView.mm:
6010         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
6011         (-[WebHTMLView smartInsertDeleteEnabled]):
6012         (-[WebHTMLView setSmartInsertDeleteEnabled:]):
6013         (-[WebHTMLView toggleSmartInsertDelete:]):
6014         * WebView/WebHTMLViewInternal.h:
6015
6016 2009-05-08  Alexey Proskuryakov  <ap@webkit.org>
6017
6018         Reviewed by Maciej Stachowiak.
6019
6020         <rdar://problem/6868773> NPN_GetAuthenticationInfo does not work with non-permanent credentials
6021
6022         * Plugins/WebBaseNetscapePluginView.mm: (WebKit::getAuthenticationInfo): Ask WebCore for
6023         credentials first (but also ask NSURLCredentialStorage, because WebCore won't know about
6024         permanent credentials).
6025
6026 2009-05-05  Ben Murdoch  <benm@google.com>
6027
6028         Reviewed by Eric Seidel.
6029         
6030         Add #if ENABLE(DATABASE) guards around database code so toggling ENABLE_DATABASE off does not break builds.
6031         https://bugs.webkit.org/show_bug.cgi?id=24776
6032
6033         * Storage/WebDatabaseManager.mm:
6034         * Storage/WebDatabaseManagerInternal.h:
6035         * Storage/WebDatabaseManagerPrivate.h:
6036         * Storage/WebDatabaseTrackerClient.h:
6037         * Storage/WebDatabaseTrackerClient.mm:
6038         * Storage/WebSecurityOrigin.mm:
6039         (-[WebSecurityOrigin usage]):
6040         (-[WebSecurityOrigin quota]):
6041         (-[WebSecurityOrigin setQuota:]):
6042         * Storage/WebSecurityOriginPrivate.h:
6043         * WebCoreSupport/WebChromeClient.h:
6044         * WebCoreSupport/WebChromeClient.mm:
6045         * WebView/WebView.mm:
6046         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
6047
6048 2009-05-04  Anders Carlsson  <andersca@apple.com>
6049
6050         Reviewed by Kevin Decker.
6051
6052         Fix <rdar://problem/6797644>.
6053         
6054         Make sure to send a reply even when an instance proxy can't be found.
6055         
6056         * Plugins/Hosted/NetscapePluginHostProxy.mm:
6057         (WKPCEvaluate):
6058         (WKPCInvoke):
6059         (WKPCInvokeDefault):
6060         (WKPCGetProperty):
6061         (WKPCHasProperty):
6062         (WKPCHasMethod):
6063         (WKPCEnumerate):
6064
6065 2009-05-04  Darin Adler  <darin@apple.com>
6066
6067         Reviewed by Eric Seidel.
6068
6069         Bug 24924: remove Document.h include of Attr.h and HTMLCollection.h,
6070         and NamedMappedAttrMap.h include of MappedAttribute.h
6071         https://bugs.webkit.org/show_bug.cgi?id=24924
6072
6073         * WebView/WebFrame.mm: Added include of CSSMutableStyleDeclaration.h
6074         and ScriptValue.h.
6075
6076 2009-05-02  Geoffrey Garen  <ggaren@apple.com>
6077
6078         Reviewed by Sam Weinig.
6079
6080         Simplified null-ish JSValues.
6081         
6082         Replaced calls to noValue() with calls to JSValue() (which is what
6083         noValue() returned). Removed noValue().
6084         
6085         Removed "JSValue()" initialiazers, since default construction happens...
6086         by default.
6087
6088         * WebView/WebScriptDebugDelegate.mm:
6089         (-[WebScriptCallFrame evaluateWebScript:]):
6090
6091 2009-05-02  Alexey Proskuryakov  <ap@webkit.org>
6092
6093         Reviewed by Dan Bernstein.
6094
6095         <rdar://problem/6741615> REGRESSION (r38629): Shortcut "Flag/Junk" in MobileMe does not work
6096         when Kotoeri is used.
6097
6098         * WebView/WebHTMLView.mm: (-[WebHTMLView inputContext]): Return a nil input context when
6099         focus is not in editable content.
6100
6101 2009-05-01  Geoffrey Garen  <ggaren@apple.com>
6102
6103         Rubber Stamped by Sam Weinig.
6104         
6105         Renamed JSValuePtr => JSValue.
6106
6107         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
6108         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
6109         (WebKit::NetscapePluginInstanceProxy::evaluate):
6110         (WebKit::NetscapePluginInstanceProxy::invoke):
6111         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
6112         (WebKit::NetscapePluginInstanceProxy::construct):
6113         (WebKit::NetscapePluginInstanceProxy::getProperty):
6114         (WebKit::NetscapePluginInstanceProxy::setProperty):
6115         (WebKit::NetscapePluginInstanceProxy::hasMethod):
6116         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
6117         (WebKit::NetscapePluginInstanceProxy::marshalValue):
6118         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
6119         (WebKit::NetscapePluginInstanceProxy::demarshalValue):
6120         (WebKit::NetscapePluginInstanceProxy::demarshalValues):
6121         * Plugins/Hosted/ProxyInstance.h:
6122         * Plugins/Hosted/ProxyInstance.mm:
6123         (WebKit::ProxyField::valueFromInstance):
6124         (WebKit::ProxyField::setValueToInstance):
6125         (WebKit::ProxyInstance::invoke):
6126         (WebKit::ProxyInstance::invokeMethod):
6127         (WebKit::ProxyInstance::invokeDefaultMethod):
6128         (WebKit::ProxyInstance::invokeConstruct):
6129         (WebKit::ProxyInstance::defaultValue):
6130         (WebKit::ProxyInstance::stringValue):
6131         (WebKit::ProxyInstance::numberValue):
6132         (WebKit::ProxyInstance::booleanValue):
6133         (WebKit::ProxyInstance::valueOf):
6134         (WebKit::ProxyInstance::fieldValue):
6135         (WebKit::ProxyInstance::setFieldValue):
6136         * WebView/WebFrame.mm:
6137         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
6138         * WebView/WebScriptDebugDelegate.mm:
6139         (-[WebScriptCallFrame _convertValueToObjcValue:]):
6140         (-[WebScriptCallFrame exception]):
6141         (-[WebScriptCallFrame evaluateWebScript:]):
6142         * WebView/WebView.mm:
6143         (aeDescFromJSValue):
6144         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
6145
6146 2009-05-01  Pavel Feldman  <pfeldman@chromium.org>
6147
6148         Reviewed by Timothy Hatcher.
6149
6150         Add a FrameLoaderClient callback for the ResourceRetrievedByXMLHttpRequest.
6151
6152         https://bugs.webkit.org/show_bug.cgi?id=25347
6153
6154         * WebCoreSupport/WebFrameLoaderClient.h:
6155         * WebCoreSupport/WebFrameLoaderClient.mm:
6156         (WebFrameLoaderClient::dispatchDidLoadResourceByXMLHttpRequest):
6157
6158 2009-04-30  David Kilzer  <ddkilzer@apple.com>
6159
6160         Provide a mechanism to create a quirks delegate for HTMLParser
6161
6162         Reviewed by David Hyatt.
6163
6164         * WebCoreSupport/WebChromeClient.h:
6165         (WebChromeClient::createHTMLParserQuirks): Added.  The default
6166         implementation of this factory method returns 0.
6167
6168 2009-04-30  Dimitri Glazkov  <dglazkov@chromium.org>
6169
6170         Reviewed by Timothy Hatcher.
6171
6172         https://bugs.webkit.org/show_bug.cgi?id=25470
6173         Extend the cover of ENABLE_JAVASCRIPT_DEBUGGER to profiler.
6174
6175         * Configurations/FeatureDefines.xcconfig: Added ENABLE_JAVASCRIPT_DEBUGGER define.
6176
6177 2009-04-30  Kevin Decker  <kdecker@apple.com>
6178
6179         Reviewed by Anders Carlson.
6180
6181         <rdar://problem/6823049>
6182         
6183         Fix an issue where some plug-ins would cause the application icon to constantly bounce
6184         up and down in the Dock.
6185         
6186         * Plugins/Hosted/NetscapePluginHostProxy.h: Change m_placeholderWindow ivar to be
6187         a subclass of NSWindow, WebPlaceholderModalWindow.
6188         * Plugins/Hosted/NetscapePluginHostProxy.mm:  Added WebPlaceholderModalWindow NSWindow subclass.
6189         (-[WebPlaceholderModalWindow _wantsUserAttention]): Prevent NSApp from calling requestUserAttention:
6190          when the window is shown modally, even if the app is inactive.
6191         (WebKit::NetscapePluginHostProxy::beginModal): NSWindow -> WebPlaceholderModalWindow.
6192
6193 2009-04-30  Pavel Feldman  <pfeldman@chromium.org>
6194
6195         Reviewed by Dimitri Glazkov.
6196
6197         https://bugs.webkit.org/show_bug.cgi?id=25342
6198         Add MessageSource and MessageLevel parameters to the ChromeClient::addMessageToConsole.
6199
6200         * WebCoreSupport/WebChromeClient.h:
6201         * WebCoreSupport/WebChromeClient.mm:
6202         (WebChromeClient::addMessageToConsole):
6203
6204 2009-04-29  Mark Rowe  <mrowe@apple.com>
6205
6206         More build fixing after r43037.
6207
6208         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
6209         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
6210         (WebKit::NetscapePluginInstanceProxy::invoke):
6211         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
6212         (WebKit::NetscapePluginInstanceProxy::construct):
6213         (WebKit::NetscapePluginInstanceProxy::demarshalValues):
6214
6215 2009-04-29  Dan Bernstein  <mitz@apple.com>
6216
6217         Reviewed by Simon Fraser.
6218
6219         - WebKit part of <rdar://problem/6609509> Select All and then Delete
6220           should put Mail editing back into the same state as a new message
6221
6222         * WebView/WebView.mm:
6223         (-[WebView _selectionIsCaret]): Added.
6224         (-[WebView _selectionIsAll]): Added. Returns whether the selection
6225         encompasses the entire document.
6226         * WebView/WebViewPrivate.h:
6227
6228 2009-04-29  Douglas Davidson  <ddavidso@apple.com>
6229
6230         Reviewed by Justin Garcia.
6231         
6232         <rdar://problem/6836921> Mail exhibits issues with text checking, e.g. menu items not always validated correctly
6233
6234         * WebView/WebHTMLView.mm:
6235         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
6236         (-[WebHTMLView orderFrontSubstitutionsPanel:]):
6237         * WebView/WebView.mm:
6238         (-[WebView validateUserInterfaceItemWithoutDelegate:]):
6239
6240 2009-04-29  David Hyatt  <hyatt@apple.com>
6241
6242         Reviewed by Dan Bernstein.
6243
6244         Fix a bug in the bounds checking for setNeedsLayout dirtying when a WebView's size changes.  The superview
6245         of the WebView was being incorrectly checked instead of the WebView itself.
6246
6247         * WebView/WebView.mm:
6248         (-[WebView _boundsChanged]):
6249
6250 2009-04-29  Kevin Decker  <kdecker@apple.com>
6251
6252         Reviewed by Anders Carlson.
6253
6254         Allow WKN_CheckIfAllowedToLoadURL() to take an optional void* context parameter.
6255         
6256         * Plugins/WebNetscapeContainerCheckContextInfo.h:
6257         * Plugins/WebNetscapeContainerCheckContextInfo.mm:
6258         (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:context:]):
6259         (-[WebNetscapeContainerCheckContextInfo callback]):
6260         (-[WebNetscapeContainerCheckContextInfo context]):
6261         * Plugins/WebNetscapeContainerCheckPrivate.h:
6262         * Plugins/WebNetscapeContainerCheckPrivate.mm:
6263         (browserContainerCheckFuncs):
6264         * Plugins/WebNetscapePluginView.h:
6265         * Plugins/WebNetscapePluginView.mm:
6266         (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:context:]):
6267         (-[WebNetscapePluginView _containerCheckResult:contextInfo:]):
6268         * Plugins/npapi.mm:
6269         (WKN_CheckIfAllowedToLoadURL):
6270
6271 2009-04-29  David Hyatt  <hyatt@apple.com>
6272
6273         Reviewed by John Sullivan.
6274
6275         Fix for <rdar://problem/6835573>, Find Banner turns invisible when WebView is resized.  Make sure
6276         not to resize the interior views of a WebView in response to its bounds changing when not using
6277         viewless WebKit.  Auto-resizing rules were already in place to handle size adjustments for us.
6278         Just mark as needing layout and do nothing else.
6279
6280         This does mean viewless WebKit is broken with the Find Banner, and that will likely require a
6281         Safari change (using a new API that will enable clients to define the edges of the content area as offsets
6282         from the sides of the WebView).
6283
6284         * WebView/WebView.mm:
6285         (-[WebView _boundsChanged]):
6286
6287 2009-04-28  Geoffrey Garen  <ggaren@apple.com>
6288
6289         Rubber stamped by Beth Dakin.
6290         
6291         Removed scaffolding supporting dynamically converting between 32bit and
6292         64bit value representations. 
6293
6294         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
6295         (WebKit::NetscapePluginInstanceProxy::marshalValues):
6296
6297 2009-04-28  Anders Carlsson  <andersca@apple.com>
6298
6299         Reviewed by Kevin Decker and Darin Adler.
6300
6301         Fix <rdar://problem/6836132>.
6302         
6303         * Plugins/Hosted/NetscapePluginHostProxy.mm:
6304         (WKPCCheckIfAllowedToLoadURL):
6305         Call the instance proxy.
6306         
6307         (WKPCCancelCheckIfAllowedToLoadURL):
6308         Ditto.
6309         
6310         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
6311         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
6312         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
6313         Initialize the check ID counter.
6314         
6315         (WebKit::NetscapePluginInstanceProxy::checkIfAllowedToLoadURL):
6316         Create a WebPluginContainerCheck, add it to the map, and start it.
6317         
6318         (WebKit::NetscapePluginInstanceProxy::cancelCheckIfAllowedToLoadURL):
6319         Remove the check from the map.
6320         
6321         (WebKit::NetscapePluginInstanceProxy::checkIfAllowedToLoadURLResult):
6322         Call the WKPH MIG callback.
6323         
6324         * Plugins/Hosted/WebHostedNetscapePluginView.h:
6325         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
6326         (-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
6327         Call the instance proxy.
6328         
6329         (-[WebHostedNetscapePluginView _containerCheckResult:contextInfo:]):
6330         Ditto.
6331         
6332         * Plugins/Hosted/WebKitPluginClient.defs:
6333         * Plugins/Hosted/WebKitPluginHost.defs:
6334         Add MIG declarations.
6335
6336 2009-04-28  Dan Bernstein  <mitz@apple.com>
6337
6338         Reviewed by John Sullivan.
6339
6340         - fix <rdar://problem/6786360> Make PDF an insertable pasteboard type
6341
6342         * WebCoreSupport/WebPasteboardHelper.mm:
6343         (WebPasteboardHelper::insertablePasteboardTypes):
6344         * WebView/WebHTMLView.mm:
6345         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
6346         (+[WebHTMLView _insertablePasteboardTypes]):
6347         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
6348
6349 2009-04-27  Douglas R. Davidson  <ddavidso@apple.com>
6350
6351         Add the various switches and context menu items needed for
6352         <rdar://problem/6724106> WebViews need to implement text checking
6353         and adopt updatePanels in place of old SPI _updateGrammar.
6354
6355         Reviewed by Justin Garcia.
6356
6357         * WebCoreSupport/WebContextMenuClient.mm:
6358         (fixMenusReceivedFromOldClients):
6359         * WebCoreSupport/WebEditorClient.h:
6360         * WebCoreSupport/WebEditorClient.mm:
6361         (WebEditorClient::uppercaseWord):
6362         (WebEditorClient::lowercaseWord):
6363         (WebEditorClient::capitalizeWord):
6364         (WebEditorClient::showSubstitutionsPanel):
6365         (WebEditorClient::substitutionsPanelIsShowing):
6366         (WebEditorClient::toggleSmartInsertDelete):
6367         (WebEditorClient::isAutomaticQuoteSubstitutionEnabled):
6368         (WebEditorClient::toggleAutomaticQuoteSubstitution):
6369         (WebEditorClient::isAutomaticLinkDetectionEnabled):
6370         (WebEditorClient::toggleAutomaticLinkDetection):
6371         (WebEditorClient::isAutomaticDashSubstitutionEnabled):
6372         (WebEditorClient::toggleAutomaticDashSubstitution):
6373         (WebEditorClient::isAutomaticTextReplacementEnabled):
6374         (WebEditorClient::toggleAutomaticTextReplacement):
6375         (WebEditorClient::isAutomaticSpellingCorrectionEnabled):
6376         (WebEditorClient::toggleAutomaticSpellingCorrection):
6377         (WebEditorClient::checkTextOfParagraph):
6378         * WebCoreSupport/WebViewFactory.mm:
6379         (-[WebViewFactory contextMenuItemTagShowColors]):
6380         (-[WebViewFactory contextMenuItemTagCorrectSpellingAutomatically]):
6381         (-[WebViewFactory contextMenuItemTagSubstitutionsMenu]):
6382         (-[WebViewFactory contextMenuItemTagShowSubstitutions:]):
6383         (-[WebViewFactory contextMenuItemTagSmartCopyPaste]):
6384         (-[WebViewFactory contextMenuItemTagSmartQuotes]):
6385         (-[WebViewFactory contextMenuItemTagSmartDashes]):
6386         (-[WebViewFactory contextMenuItemTagSmartLinks]):
6387         (-[WebViewFactory contextMenuItemTagTextReplacement]):
6388         (-[WebViewFactory contextMenuItemTagTransformationsMenu]):
6389         (-[WebViewFactory contextMenuItemTagMakeUpperCase]):
6390         (-[WebViewFactory contextMenuItemTagMakeLowerCase]):
6391         (-[WebViewFactory contextMenuItemTagCapitalize]):
6392         * WebView/WebHTMLView.mm:
6393         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
6394         (-[WebHTMLView isAutomaticQuoteSubstitutionEnabled]):
6395         (-[WebHTMLView setAutomaticQuoteSubstitutionEnabled:]):
6396         (-[WebHTMLView toggleAutomaticQuoteSubstitution:]):
6397         (-[WebHTMLView isAutomaticLinkDetectionEnabled]):
6398         (-[WebHTMLView setAutomaticLinkDetectionEnabled:]):
6399         (-[WebHTMLView toggleAutomaticLinkDetection:]):
6400         (-[WebHTMLView isAutomaticDashSubstitutionEnabled]):
6401         (-[WebHTMLView setAutomaticDashSubstitutionEnabled:]):
6402         (-[WebHTMLView toggleAutomaticDashSubstitution:]):
6403         (-[WebHTMLView isAutomaticTextReplacementEnabled]):
6404         (-[WebHTMLView setAutomaticTextReplacementEnabled:]):
6405         (-[WebHTMLView toggleAutomaticTextReplacement:]):
6406         (-[WebHTMLView isAutomaticSpellingCorrectionEnabled]):
6407         (-[WebHTMLView setAutomaticSpellingCorrectionEnabled:]):
6408         (-[WebHTMLView toggleAutomaticSpellingCorrection:]):
6409         * WebView/WebHTMLViewInternal.h:
6410         * WebView/WebPreferenceKeysPrivate.h:
6411         * WebView/WebUIDelegatePrivate.h:
6412         * WebView/WebView.mm:
6413         (-[WebViewPrivate init]):
6414         (-[WebView validateUserInterfaceItemWithoutDelegate:]):
6415         (-[WebView setGrammarCheckingEnabled:]):
6416         (-[WebView isAutomaticQuoteSubstitutionEnabled]):
6417         (-[WebView isAutomaticLinkDetectionEnabled]):
6418         (-[WebView isAutomaticDashSubstitutionEnabled]):
6419         (-[WebView isAutomaticTextReplacementEnabled]):
6420         (-[WebView isAutomaticSpellingCorrectionEnabled]):
6421         (-[WebView setAutomaticQuoteSubstitutionEnabled:]):
6422         (-[WebView toggleAutomaticQuoteSubstitution:]):
6423         (-[WebView setAutomaticLinkDetectionEnabled:]):
6424         (-[WebView toggleAutomaticLinkDetection:]):
6425         (-[WebView setAutomaticDashSubstitutionEnabled:]):
6426         (-[WebView toggleAutomaticDashSubstitution:]):
6427         (-[WebView setAutomaticTextReplacementEnabled:]):
6428         (-[WebView toggleAutomaticTextReplacement:]):
6429         (-[WebView setAutomaticSpellingCorrectionEnabled:]):
6430         (-[WebView toggleAutomaticSpellingCorrection:]):
6431         * WebView/WebViewPrivate.h:
6432
6433 2009-04-27  David Kilzer  <ddkilzer@apple.com>
6434
6435         Consolidate runtime application checks for Apple Mail and Safari
6436
6437         Reviewed by Mark Rowe and Darin Adler.
6438
6439         * WebCoreSupport/WebContextMenuClient.mm:
6440         (isAppleMail): Removed.
6441         (fixMenusToSendToOldClients): Switched to use
6442         applicationIsAppleMail().
6443         * WebView/WebFrame.mm:
6444         (-[WebFrame reload]): Switched to use applicationIsSafari().
6445         * WebView/WebPDFView.mm:
6446         (-[WebPDFView menuForEvent:]): Ditto.
6447         * WebView/WebResource.mm:
6448         (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]):
6449         Switched to use applicationIsAppleMail().
6450         * WebView/WebView.mm:
6451         (runningLeopardMail): Ditto.
6452         (runningTigerMail): Ditto.
6453         (-[WebView _needsKeyboardEventDisambiguationQuirks]): Switched
6454         to use applicationIsSafari().
6455
6456 2009-04-27  Kevin Decker  <kdecker@apple.com>
6457
6458         Fix the Tiger build.
6459         
6460         * Plugins/WebNetscapePluginView.mm: The base class of WebNetscapePluginView.mm, WebBaseNetscapePluginView, already implemented 
6461         the two methods below. But the Tiger compiler didn't know that. 
6462         (-[WebNetscapePluginView webView]): 
6463         (-[WebNetscapePluginView webFrame]):
6464
6465 2009-04-27  Kevin Decker  <kdecker@apple.com>
6466
6467         Reviewed by Anders Carlsson.
6468
6469         <rdar://problem/6352982>
6470         
6471         * Plugins/WebBaseNetscapePluginView.mm: Removed checkIfAllowedToLoadURL:frame:callbackFunc, cancelCheckIfAllowedToLoadURL, and 
6472         _webPluginContainerCancelCheckIfAllowedToLoadRequest from the base class. These methods now exist in the subclass WebNetscapePluginView.
6473         
6474         Added WebNetscapeContainerCheckContextInfo, which is used as a "contextInfo" object in 
6475         -[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]
6476         * Plugins/WebNetscapeContainerCheckContextInfo.h: Added.
6477         * Plugins/WebNetscapeContainerCheckContextInfo.mm: Added.
6478         (-[WebNetscapeContainerCheckContextInfo initWithCheckRequestID:callbackFunc:]): Added desiginated initializer.
6479         (-[WebNetscapeContainerCheckContextInfo checkRequestID]): Added. Returns the checkRequestID.
6480         (-[WebNetscapeContainerCheckContextInfo callback]): Added. Returns the callback.
6481         
6482         * Plugins/WebNetscapePluginView.h: Added two new ivars: _containerChecksInProgress and _currentContainerCheckRequestID.
6483         * Plugins/WebNetscapePluginView.mm: #import both WebPluginContainerCheck.h and WebNetscapeContainerCheckContextInfo.h
6484         
6485         (-[WebNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]): Added. This is the implementation of WKN_CheckIfAllowedToLoadURL.
6486         Here, we increment the request ID and start the container check.
6487         
6488         (-[WebNetscapePluginView _containerCheckResult:contextInfo:]): Added. This is a callback method for WebPluginContainerCheck.
6489         It's where we actually call into the plug-in and provide the allow-or-deny result.
6490     
6491         (-[WebNetscapePluginView cancelCheckIfAllowedToLoadURL:]): Added. This is the implementation of WKN_CancelCheckIfAllowedToLoadURL. 
6492         Here we lookup the check, cancel it, and remove it from _containerChecksInProgress.
6493         
6494         (-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): Added. WebPluginContainerCheck automatically calls
6495         this method after invoking our _containerCheckResult: selector. It works this way because calling -[WebPluginContainerCheck cancel] allows
6496         it to do it's teardown process.
6497         
6498         (-[WebNetscapePluginView fini]): Release _containerChecksInProgress ivar.
6499         
6500         * Plugins/WebPluginContainerCheck.h: Removed initWithRequest: method from header; no client was using this method directly.
6501         * Plugins/WebPluginContainerCheck.mm: 
6502         (+[WebPluginContainerCheck checkWithRequest:target:resultObject:selector:controller:contextInfo:]): Added optional contextInfo parameter.
6503         (-[WebPluginContainerCheck _continueWithPolicy:]): If there's a contextInfo object, pass it as a parameter to resultSelector.
6504         (-[WebPluginContainerCheck cancel]): Release _contextInfo ivar.
6505         (-[WebPluginContainerCheck contextInfo]): Added new method. Returns the contextInfo object, if one so exists.
6506         * Plugins/WebPluginController.mm:
6507         (-[WebPluginController _webPluginContainerCheckIfAllowedToLoadRequest:inFrame:resultObject:selector:]): Pass nil for contextInfo. WebKit-style
6508         plug-ins do not need additional context information.
6509
6510 2009-04-25  Brady Eidson  <beidson@apple.com>
6511
6512         Reviewed by Sam Weinig
6513
6514         Some *obvious* style cleanup in my last patch.
6515
6516         * History/WebBackForwardList.mm:
6517         (bumperCarBackForwardHackNeeded):
6518
6519 2009-04-25  Brady Eidson  <beidson@apple.com>
6520
6521         Reviewed by Oliver Hunt
6522
6523         <rdar://problem/6817607> BumperCar 2.2 crashes going back (invalid WebHistoryItem)
6524
6525         BumperCar was holding a pointer to a WebHistoryItem they never retain, then later
6526         tried to go to it.  In some cases it would be dealloc'ed first.
6527         When WebHistoryItems were pure Objective-C they probably got away with this more often.
6528         With the WebCore/Obj-C mixed WebHistoryItems it's more likely to crash.
6529
6530         * History/WebBackForwardList.mm:
6531         (bumperCarBackForwardHackNeeded):
6532         (-[WebBackForwardList backListWithLimit:]):  If this is BumperCar, hang on to the
6533           NSArray of WebHistoryItems until the next time this method is called.
6534         (-[WebBackForwardList forwardListWithLimit:]):  Ditto.
6535
6536         * Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITHOUT_BUMPERCAR_BACK_FORWARD_QUIRK.
6537
6538 2009-04-24  Anders Carlsson  <andersca@apple.com>
6539
6540         Reviewed by Darin Adler.
6541
6542         Fix <rdar://problem/6761635>.
6543         
6544         Make sure to keep an extra reference to the instance proxy in case the plug-in host crashes while
6545         we're waiting for a reply.
6546         
6547         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
6548         (WebKit::NetscapePluginInstanceProxy::destroy):
6549
6550 2009-04-24  Brady Eidson  <beidson@apple.com>
6551
6552         Reviewed by Dan Bernstein
6553
6554         Currently working on a bug where a WebHistoryItem was being used after being dealloc'ed.
6555         I added this assertion to help catch the case as soon as it happens instead of random
6556         issues downstream.  Figured it's worth checking in by itself.
6557
6558         * History/WebHistoryItem.mm:
6559         (core): ASSERT that the WebCore::HistoryItem inside this WebHistoryItem is supposed to have
6560           this WebHistoryItem as a wrapper.
6561
6562 2009-04-23  Beth Dakin  <bdakin@apple.com>
6563
6564         Reviewed by Darin Adler.
6565
6566         Fix for <rdar://problem/6333461> REGRESSION (r36864-r36869): 
6567         Dragging stocks widget scrollbar drags the whole widget
6568
6569         Look for our new WebCore scrollbars in the WebHTMLView and add 
6570         proper Dashboard regions for them.
6571
6572         * WebView/WebView.mm:
6573         (-[WebView _addScrollerDashboardRegionsForFrameView:dashboardRegions:]):
6574         (-[WebView _addScrollerDashboardRegions:from:]):
6575
6576 2009-04-23  John Sullivan  <sullivan@apple.com>
6577
6578         fixed <rdar://problem/6822479> Assertion failure after Reset Safari in new history-writing code
6579
6580         Reviewed by Oliver Hunt
6581
6582         * History/WebHistory.mm:
6583         (-[WebHistoryPrivate data]):
6584         Return nil immediately if there are no entries; this matches a recent Windows-platform fix.
6585
6586 2009-04-23  Dimitri Glazkov  <dglazkov@chromium.org>
6587
6588         Reviewed by Darin Adler.
6589
6590         https://bugs.webkit.org/show_bug.cgi?id=25313
6591         Missing scroll bars in GMail.
6592
6593         * WebView/WebDynamicScrollBarsView.m:
6594         (-[WebDynamicScrollBarsView updateScrollers]): Added check for the ScrollbarAlwaysOn
6595             scroll mode.
6596
6597 2009-04-23  Kevin Decker  <kdecker@apple.com>
6598
6599         * Plugins/WebPluginContainerCheck.h: Fix the Tiger build.
6600
6601 2009-04-23  Anders Carlsson  <andersca@apple.com>
6602
6603         Reviewed by Geoffrey Garen.
6604
6605         Fix <rdar://problem/6821992>
6606
6607         Add a new m_inDestroy member variable. Set it to true when in destroy, and have all NPRuntime functions return false
6608         when m_inDestroy is true.
6609         
6610         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
6611         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
6612         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
6613         (WebKit::NetscapePluginInstanceProxy::destroy):
6614         (WebKit::NetscapePluginInstanceProxy::invoke):
6615         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
6616         (WebKit::NetscapePluginInstanceProxy::construct):
6617         (WebKit::NetscapePluginInstanceProxy::getProperty):
6618         (WebKit::NetscapePluginInstanceProxy::setProperty):
6619         (WebKit::NetscapePluginInstanceProxy::removeProperty):
6620         (WebKit::NetscapePluginInstanceProxy::hasProperty):
6621         (WebKit::NetscapePluginInstanceProxy::hasMethod):
6622         (WebKit::NetscapePluginInstanceProxy::enumerate):
6623
6624 2009-04-23  David Hyatt  <hyatt@apple.com>
6625
6626         Reviewed by Maciej.
6627
6628         Fix for <rdar://problem/6789879> REGRESSION (42464): Hitting assertion when loading message in Mail + TOT WebKit
6629         
6630         Make the Mac platform the same as all the other platforms.  Instead of (incorrectly) marking a FrameView for layout
6631         when its underlying document view changes, just mark the outermost frame view for layout when the WebView's size changes.
6632
6633         * WebView/WebHTMLView.mm:
6634         (-[WebHTMLView _frameOrBoundsChanged]):
6635         (-[WebHTMLView addSuperviewObservers]):
6636         * WebView/WebView.mm:
6637         (-[WebView _boundsChanged]):
6638         (-[WebView removeSizeObservers]):
6639         (-[WebView addSizeObservers]):
6640
6641 2009-04-23  Kevin Decker  <kdecker@apple.com>
6642
6643         Reviewed by Tim Hatcher.
6644
6645         Second part of the fix for <rdar://problem/6352982>
6646
6647         * Plugins/WebBaseNetscapePluginView.h: Make this class conform to WebPluginContainerCheckController
6648         * Plugins/WebBaseNetscapePluginView.mm: Likewise.
6649         (-[WebBaseNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]): Added skeleton method.
6650         * Plugins/WebPluginContainerCheck.h: Added protocol for <WebPluginContainerCheckController>
6651         * Plugins/WebPluginContainerCheck.mm:
6652         (-[WebPluginContainerCheck initWithRequest:target:resultObject:selector:controller:]):
6653         * Plugins/WebPluginController.h: Make this class conform to WebPluginContainerCheckController
6654
6655 2009-04-23  Kevin Decker  <kdecker@apple.com>
6656
6657         Reviewed by Anders Carlsson.
6658         
6659         First part of <rdar://problem/6352982>
6660
6661         * Plugins/WebBaseNetscapePluginView.h: Imported #WebNetscapeContainerCheckPrivate.h; Added two new method:
6662         checkIfAllowedToLoadURL:url:frame:callbackFunc: and cancelCheckIfAllowedToLoadURL:
6663         * Plugins/WebBaseNetscapePluginView.mm:
6664         (-[WebBaseNetscapePluginView checkIfAllowedToLoadURL:frame:callbackFunc:]): Added skeleton method, does nothing interesting
6665         yet.
6666         (-[WebBaseNetscapePluginView cancelCheckIfAllowedToLoadURL:]): Likewise.
6667         * Plugins/WebNetscapeContainerCheckPrivate.h: Added.
6668         * Plugins/WebNetscapeContainerCheckPrivate.mm: Added.
6669         (browserContainerCheckFuncs): Added. 
6670         * Plugins/WebNetscapePluginView.h: Imported #WebNetscapeContainerCheckPrivate.h;
6671         * Plugins/WebNetscapePluginView.mm: Imported #WebNetscapeContainerCheckPrivate.h; added WKN_CheckIfAllowedToLoadURL
6672         and WKN_CancelCheckIfAllowedToLoadURL functions.
6673         (-[WebNetscapePluginView getVariable:value:]): Return vtable for container check functions.
6674         * Plugins/npapi.mm:
6675         (WKN_CheckIfAllowedToLoadURL): Added new private function.
6676         (WKN_CancelCheckIfAllowedToLoadURL): Ditto.
6677
6678 2009-04-22  Oliver Hunt  <oliver@apple.com>
6679
6680         Reviewed by Darin Adler.
6681
6682         <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves
6683         
6684         Make mouseUP forward to the root view as we do for mouseMoves and mouseDragged:.
6685
6686         * WebView/WebHTMLView.mm:
6687         (-[WebHTMLView mouseUp:]):
6688
6689 2009-04-22  Oliver Hunt  <oliver@apple.com>
6690
6691         Reviewed by Darin Adler.
6692
6693         <rdar://problem/6757346> SAP: Prevent default on mouseDown does not stop iframe from capturing subsequent mouse moves
6694         
6695         Make mouseDragged forward to the root view as we do for mouseMoves.
6696
6697         * WebView/WebHTMLView.mm:
6698         (-[WebHTMLView mouseDragged:]):
6699
6700 2009-04-22  Anders Carlsson  <andersca@apple.com>
6701
6702         Reviewed by Oliver Hunt.
6703
6704         Fix <rdar://problem/6792694>
6705         
6706         When we're trying to instantiate a plug-in and the plug-in host has died, we need to invalidate the
6707         instance so that it doesn't stick around and do bad things.
6708         
6709         * Plugins/Hosted/NetscapePluginHostManager.mm:
6710         (WebKit::NetscapePluginHostManager::instantiatePlugin):
6711
6712 2009-04-22  Sam Weinig  <sam@webkit.org>
6713
6714         Rubber-stamped by Darin Adler.
6715
6716         Fix for <rdar://problem/6816957>
6717         Turn off Geolocation by default
6718
6719         * Configurations/FeatureDefines.xcconfig:
6720
6721 2009-04-21  Dan Bernstein  <mitz@apple.com>
6722
6723         Reviewed by Jon Honeycutt.
6724
6725         - Mac part of fixing for <rdar://problem/6755137> Action dictionary for
6726           policy decision is missing keys when full-page zoom is used
6727
6728         * WebCoreSupport/WebFrameLoaderClient.mm:
6729         (WebFrameLoaderClient::actionDictionary): Use absoluteLocation() instead
6730         of pageX() and pageY(), which are adjusted for zoom.
6731
6732 2009-04-21  Anders Carlsson  <andersca@apple.com>
6733
6734         Reviewed by Darin Adler and Kevin Decker.
6735
6736         WebKit side of <rdar://problem/6781642>.
6737         
6738         When we call resize with an actual changed size, block until the plug-in host is done.
6739         
6740         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
6741         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
6742         (WebKit::NetscapePluginInstanceProxy::resize):
6743         * Plugins/Hosted/WebHostedNetscapePluginView.h:
6744         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
6745         (-[WebHostedNetscapePluginView updateAndSetWindow]):
6746         * Plugins/Hosted/WebKitPluginHost.defs:
6747
6748 2009-04-17  Timothy Hatcher  <timothy@apple.com>
6749
6750         Change how sudden termination works with WebView teardown.
6751
6752         <rdar://problem/6383352&6383379&6383940>
6753
6754         Reviewed by Darin Adler.
6755
6756         * WebCoreSupport/WebChromeClient.h: Remove disableSuddenTermination/enableSuddenTermination.
6757         * WebCoreSupport/WebChromeClient.mm: Ditto.
6758         * WebView/WebFrame.mm:
6759         (-[WebFrame _pendingFrameUnloadEventCount]): Ask the DOMWindow.
6760         * WebView/WebView.mm:
6761         (+[WebView canCloseAllWebViews]): Call DOMWindow::dispatchAllPendingBeforeUnloadEvents.
6762         (+[WebView closeAllWebViews]): Call DOMWindow::dispatchAllPendingUnloadEvents and
6763         call close on all the WebViews.
6764         (-[WebView _closeWithFastTeardown]): Remove code for unload event dispatch.
6765         (-[WebView _close]): Correct a comment.
6766         (+[WebView _applicationWillTerminate]): Call closeAllWebViews.
6767         * WebView/WebViewPrivate.h: Add canCloseAllWebViews and closeAllWebViews.
6768
6769 2009-04-21  Geoffrey Garen  <ggaren@apple.com>
6770
6771         Reviewed by Mark Rowe.
6772
6773         Tiger crash fix: Put VM tags in their own header file, and fixed up the
6774         #ifdefs so they're not used on Tiger.
6775
6776         * ForwardingHeaders/wtf/VMTags.h: Copied from ForwardingHeaders/wtf/HashTraits.h.
6777
6778 2009-04-17  Anders Carlsson  <andersca@apple.com>
6779
6780         Reviewed by Sam Weinig.
6781
6782         <rdar://problem/6722845>
6783         In the Cocoa event model, NPWindow's window field should be null
6784         
6785         * Plugins/Hosted/NetscapePluginHostProxy.mm:
6786         (WKPCConvertPoint):
6787         Get the instance proxy and call it's convertPoint function.
6788         
6789         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
6790         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
6791         (WebKit::NetscapePluginInstanceProxy::convertPoint):
6792         Call convertPoint on the plug-in view.
6793         
6794         * Plugins/Hosted/WebKitPluginClient.defs:
6795         Add PCConvertPoint.
6796         
6797         * Plugins/WebBaseNetscapePluginView.h:
6798         Add a declaration for convertFromX:andY:space:toX:andY:space:.
6799         
6800         * Plugins/WebBaseNetscapePluginView.mm:
6801         (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]):
6802         Convert a point from one coordinate system to another.
6803         
6804         * Plugins/WebNetscapePluginEventHandler.h:
6805         * Plugins/WebNetscapePluginEventHandlerCarbon.h:
6806         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
6807         (WebNetscapePluginEventHandlerCarbon::drawRect):
6808         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
6809         Add CGContextRef to drawRect.
6810
6811         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
6812         (WebNetscapePluginEventHandlerCocoa::drawRect):
6813         Set the passed in context.
6814         
6815         * Plugins/WebNetscapePluginPackage.mm:
6816         (-[WebNetscapePluginPackage _tryLoad]):
6817         Add NPN_ConvertPoint to the browserFuncs vtable.
6818         
6819         * Plugins/WebNetscapePluginView.mm:
6820         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
6821         Only set the window for the Carbon event model.
6822         
6823         (-[WebNetscapePluginView restorePortState:]):
6824         It's OK for the window context to be null.
6825         
6826         (-[WebNetscapePluginView sendDrawRectEvent:]):
6827         Pass the CGContextRef to drawRect.
6828
6829         * Plugins/npapi.mm:
6830         (NPN_ConvertPoint):
6831         Call the plug-in view method.
6832
6833 2009-04-20  Sam Weinig  <sam@webkit.org>
6834
6835         Rubber-stamped by Tim Hatcher.
6836
6837         Add licenses for xcconfig files.
6838         
6839         * Configurations/Base.xcconfig:
6840         * Configurations/DebugRelease.xcconfig:
6841         * Configurations/FeatureDefines.xcconfig:
6842         * Configurations/Version.xcconfig:
6843         * Configurations/WebKit.xcconfig:
6844
6845 2009-04-20  Anders Carlsson  <andersca@apple.com>
6846
6847         Reviewed by Dan Bernstein.
6848
6849         WebKit side of <rdar://problem/6781302>
6850         
6851         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
6852         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
6853         (WebKit::NetscapePluginInstanceProxy::keyEvent):
6854         Pass the event keyChar.
6855         
6856         (WebKit::NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier):
6857         Ditto.
6858         
6859         (WebKit::NetscapePluginInstanceProxy::flagsChanged):
6860         Pass a 0 keyChar.
6861         
6862         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
6863         (-[WebHostedNetscapePluginView flagsChanged:]):
6864         Call NetscapePluginInstanceProxy::flagsChanged.
6865         
6866         * Plugins/Hosted/WebKitPluginHost.defs:
6867         Add a keyChar argument.
6868
6869 2009-04-19  Adele Peterson  <adele@apple.com>
6870
6871         Reviewed by Darin Adler.
6872
6873         Fix for <rdar://problem/6804809> REGRESSION: In Mail, Home and End do not scroll message
6874
6875         If no scrolling occurs, call tryToPerform on the next responder.  Then our WebResponderChainSink
6876         will correctly detect if no responders handle the selector.
6877
6878         * WebView/WebFrameView.mm:
6879         (-[WebFrameView _scrollToBeginningOfDocument]):
6880         (-[WebFrameView _scrollToEndOfDocument]):
6881         (-[WebFrameView scrollToBeginningOfDocument:]):
6882         (-[WebFrameView scrollToEndOfDocument:]):
6883         (-[WebFrameView scrollLineUp:]):
6884         (-[WebFrameView scrollLineDown:]):
6885
6886 2009-04-19  David Kilzer  <ddkilzer@apple.com>
6887
6888         Make FEATURE_DEFINES completely dynamic
6889
6890         Reviewed by Darin Adler.
6891
6892         Make FEATURE_DEFINES depend on individual ENABLE_FEATURE_NAME
6893         variables for each feature, making it possible to remove all
6894         knowledge of FEATURE_DEFINES from build-webkit.
6895
6896         * Configurations/FeatureDefines.xcconfig: Extract a variable
6897         from FEATURE_DEFINES for each feature setting.
6898
6899 2009-04-18  Pierre d'Herbemont  <pdherbemont@apple.com>
6900
6901         Reviewed by Mark Rowe.
6902
6903         <rdar://problem/6781295> video.buffered and video.seekable are not
6904         the same. video.buffered should return only what is buffered and
6905         not what is seekable
6906
6907         * WebCoreSupport/WebSystemInterface.m:
6908         (InitWebCoreSystemInterface): Add wkQTMovieMaxTimeSeekable.
6909
6910 2009-04-18  Pierre d'Herbemont  <pdherbemont@apple.com>
6911
6912         Reviewed by Adele Peterson.
6913
6914         <rdar://problem/6747241> work around QTKit no longer reaching
6915         QTMovieLoadStateComplete
6916
6917         * WebCoreSupport/WebSystemInterface.m:
6918         (InitWebCoreSystemInterface): Init the new WKSI exported symbol.
6919
6920 2009-04-17  Anders Carlsson  <andersca@apple.com>
6921
6922         Reviewed by Dan Bernstein.
6923
6924         <rdar://problem/6714488>
6925         REGRESSION (Safari 3-4): Edit menu commands (cut/copy/paste/select all) do not work on Flash content
6926         
6927         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
6928         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
6929         (WebKit::NetscapePluginInstanceProxy::syntheticKeyDownWithCommandModifier):
6930         Send a keyDown event to the plug-in host.
6931         
6932         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
6933         (-[WebHostedNetscapePluginView sendModifierEventWithKeyCode:character:]):
6934         Call the plug-in instance proxy.
6935         
6936         * Plugins/WebBaseNetscapePluginView.mm:
6937         (-[WebBaseNetscapePluginView sendModifierEventWithKeyCode:character:]):
6938         Add this. Subclasses are required to override it.
6939         
6940         (-[WebBaseNetscapePluginView cut:]):
6941         (-[WebBaseNetscapePluginView copy:]):
6942         (-[WebBaseNetscapePluginView paste:]):
6943         (-[WebBaseNetscapePluginView selectAll:]):
6944         Call sendModifierEventWithKeyCode.
6945         
6946         * Plugins/WebNetscapePluginEventHandler.h:
6947         Add syntheticKeyDownWithCommandModifier.
6948         
6949         * Plugins/WebNetscapePluginEventHandlerCarbon.h:
6950         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
6951         (WebNetscapePluginEventHandlerCarbon::syntheticKeyDownWithCommandModifier):
6952         Send the synthetic event.
6953         
6954         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
6955         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
6956         (WebNetscapePluginEventHandlerCocoa::syntheticKeyDownWithCommandModifier):
6957         Send the synthetic event.
6958         
6959         * Plugins/WebNetscapePluginView.mm:
6960         (-[WebNetscapePluginView sendModifierEventWithKeyCode:character:]):
6961         Call the event handler.
6962
6963 2009-04-17  David Kilzer  <ddkilzer@apple.com>
6964
6965         Simplify FEATURE_DEFINES definition
6966
6967         Reviewed by Darin Adler.
6968
6969         This moves FEATURE_DEFINES and its related ENABLE_FEATURE_NAME
6970         variables to their own FeatureDefines.xcconfig file.  It also
6971         extracts a new ENABLE_GEOLOCATION variable so that
6972         FEATURE_DEFINES only needs to be defined once.
6973
6974         * Configurations/FeatureDefines.xcconfig: Added.
6975         * Configurations/WebKit.xcconfig: Removed definition of
6976         ENABLE_SVG_DOM_OBJC_BINDINGS and FEATURE_DEFINES.  Added include
6977         of FeatureDefines.xcconfig.
6978
6979 2009-04-17  Anders Carlsson  <andersca@apple.com>
6980
6981         Reviewed by Darin Adler.
6982
6983         Fix crashes seen in regression tests with hosted plug-ins.
6984
6985         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
6986         (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad): Check the stream for 0,
6987         not the stream ID.
6988
6989 2009-04-17  Darin Adler  <darin@apple.com>
6990
6991         Reviewed by Antti Koivisto.
6992
6993         Bug 25210: don't use ObjC methods to wrap/unwrap DOM objects with ObjC
6994         https://bugs.webkit.org/show_bug.cgi?id=25210
6995
6996         * DOM/WebDOMOperations.mm:
6997         (-[DOMNode markupString]): Use the core function instead of an Objective-C method.
6998         (-[DOMNode _subresourceURLs]): Ditto.
6999         (-[DOMDocument _focusableNodes]): Ditto.
7000         (-[DOMRange webArchive]): Ditto.
7001         (-[DOMRange markupString]): Ditto.
7002
7003         * Misc/WebElementDictionary.mm: Added now-needed include since the core and kit
7004         functions now come from the internal headers from DOM bindings.
7005         * Misc/WebNSPasteboardExtras.mm: Ditto.
7006         * Plugins/WebNullPluginView.mm: Ditto.
7007         * Plugins/WebPluginController.mm: Ditto.
7008         * WebCoreSupport/WebChromeClient.mm: Ditto.
7009         * WebCoreSupport/WebInspectorClient.mm: Ditto.
7010         * WebCoreSupport/WebPasteboardHelper.mm: Ditto.
7011         * WebView/WebHTMLView.mm: Ditto.
7012
7013         * WebCoreSupport/WebEditorClient.mm: Made kit function have internal linkage
7014         since it's only used in this file. Someone had instead added a declaration to
7015         suppress the warning you would otherwise get. Removed the core function.
7016         (WebEditorClient::textFieldDidBeginEditing): Added correct type checking.
7017         Previously the function would check only that something was an HTMLElement,
7018         but then cast it to HTMLInputElement. Also call kit instead of old wrap method.
7019         (WebEditorClient::textFieldDidEndEditing): Ditto.
7020         (WebEditorClient::textDidChangeInTextField): Ditto.
7021         (WebEditorClient::doTextFieldCommandFromEvent): Ditto.
7022         (WebEditorClient::textWillBeDeletedInTextField): Ditto.
7023         (WebEditorClient::textDidChangeInTextArea): Ditto, but for HTMLTextAreaElement.
7024
7025         * WebView/WebFrame.mm: Removed the core and kit functions here which are no longer
7026         needed since they're automatically generated now.
7027         (-[WebFrame _nodesFromList:]): Use kit.
7028         (-[WebFrame _markupStringFromRange:nodes:]): Use core.
7029         (-[WebFrame _stringForRange:]): More of the same.
7030         (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto.
7031         (-[WebFrame _firstRectForDOMRange:]): Ditto.
7032         (-[WebFrame _scrollDOMRangeToVisible:]): Ditto.
7033         (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
7034         Ditto.
7035         (-[WebFrame _convertNSRangeToDOMRange:]): Ditto.
7036         (-[WebFrame _convertDOMRangeToNSRange:]): Ditto.
7037         (-[WebFrame _markDOMRange]): Ditto.
7038         (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto.
7039         (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
7040         (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
7041         (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto.
7042         (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto.
7043         (-[WebFrame _characterRangeAtPoint:]): Ditto.
7044         (-[WebFrame _typingStyle]): Ditto.
7045         (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto.
7046         (-[WebFrame _pauseAnimation:onNode:atTime:]): Ditto.
7047         (-[WebFrame _pauseTransitionOfProperty:onNode:atTime:]): Ditto.
7048         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto.
7049
7050         * WebView/WebFrameInternal.h: Removed the core and kit functions here which are no longer
7051         needed since they're automatically generated now.
7052
7053         * WebView/WebHTMLRepresentation.mm:
7054         (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]): Use core.
7055         (formElementFromDOMElement): Ditto.
7056         (inputElementFromDOMElement): Ditto.
7057         * WebView/WebTextIterator.mm:
7058         (-[WebTextIterator initWithRange:]): Ditto.
7059         (-[WebTextIterator currentRange]): Ditto.
7060         (-[WebTextIterator currentNode]): Ditto.
7061         * WebView/WebView.mm:
7062         (-[WebView textIteratorForRect:]): Ditto.
7063         (-[WebView setSelectedDOMRange:affinity:]): Ditto.
7064
7065 2009-04-17  Anders Carlsson  <andersca@apple.com>
7066
7067         Reviewed by Sam Weinig.
7068
7069         WebKit side of <rdar://problem/6449642>.
7070         
7071         * Plugins/Hosted/HostedNetscapePluginStream.h:
7072         (WebKit::HostedNetscapePluginStream::create):
7073         New function that creates a stream from a frame loader.
7074         
7075         * Plugins/Hosted/HostedNetscapePluginStream.mm:
7076         (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
7077         Add the constructor that takes a frame loader.
7078         
7079         * Plugins/Hosted/NetscapePluginHostManager.h:
7080         * Plugins/Hosted/NetscapePluginHostManager.mm:
7081         (WebKit::NetscapePluginHostManager::instantiatePlugin):
7082         Pass "fullFrame" to the plug-in host.
7083         
7084         * Plugins/Hosted/NetscapePluginHostProxy.mm:
7085         (WKPCCancelLoadURL):
7086         Call NetscapePluginInstanceProxy::cancelStreamLoad.
7087         
7088         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
7089         (WebKit::NetscapePluginInstanceProxy::create):
7090         Pass "fullFrame" to the constructor.
7091         
7092         (WebKit::NetscapePluginInstanceProxy::manualStream):
7093         New getter for the manual stream.
7094         
7095         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
7096         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
7097         Take the implicit request into account if we have a full frame plug-in.
7098         
7099         (WebKit::NetscapePluginInstanceProxy::setManualStream):
7100         Setter for the manual stream.
7101         
7102         (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad):
7103         Cancel the manual stream if necessary.
7104         
7105         * Plugins/Hosted/WebHostedNetscapePluginView.h:
7106         WebHostedNetscapePluginView now conforms to the WebPluginManualLoader protocol.
7107         
7108         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
7109         (-[WebHostedNetscapePluginView createPlugin]):
7110         Pass "fullFrame" to instantiatePlugin.
7111         
7112         (-[WebHostedNetscapePluginView pluginView:receivedResponse:]):
7113         (-[WebHostedNetscapePluginView pluginView:receivedData:]):
7114         (-[WebHostedNetscapePluginView pluginView:receivedError:]):
7115         (-[WebHostedNetscapePluginView pluginViewFinishedLoading:]):
7116         Call the equivalent manual stream functions.
7117         
7118         * WebCoreSupport/WebFrameLoaderClient.mm:
7119         (WebFrameLoaderClient::createPlugin):
7120         Use a macro for getting the plug-in view type.
7121
7122 2009-04-14  Simon Fraser  <simon.fraser@apple.com>
7123
7124         Reviewed by Dan Bernstein
7125
7126         https://bugs.webkit.org/show_bug.cgi?id=25157
7127         
7128         Move the run loop observer cleanup from -close
7129         to -_close.
7130
7131         * WebView/WebView.mm:
7132         (-[WebView _close]):
7133         (-[WebView close]):
7134
7135 2009-04-14  Anders Carlsson  <andersca@apple.com>
7136
7137         Reviewed by Sam Weinig.
7138
7139         - Speculative fix for <rdar://problem/6781422> 
7140
7141         Protect the plug-in instance proxy in case it's deleted while waiting for a reply.
7142
7143         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
7144         (WebKit::NetscapePluginInstanceProxy::wheelEvent):
7145
7146 2009-04-14  Adele Peterson  <adele@apple.com>
7147
7148         Reviewed by Darin.
7149
7150         Initialize WebKitSystemInterface in class methods that could get called before a WebView/WebFrame is set up.  This was causing Mail to crash on launch.
7151
7152         * Misc/WebCache.mm: (+[WebCache initialize]):
7153         * WebView/WebView.mm: (+[WebView initialize]):
7154
7155 2009-04-13  Kevin Decker  <kdecker@apple.com>
7156
7157         Reviewed by Darin.
7158
7159         <rdar://problem/6784955> REGRESSION: closing a tab containing a PDF causes world leaks
7160         
7161         Simplify the _trackFirstResponder method by just caching the value instead of retaining
7162         a Cocoa object.
7163         
7164         * WebView/WebPDFView.h: Eliminated trackedFirstResponder object and replaced it with
7165         a firstResponderIsPDFDocumentView boolean.
7166         * WebView/WebPDFView.mm: 
7167         (-[WebPDFView dealloc]): Removed no longer necessary ASSERT.
7168         (-[WebPDFView viewWillMoveToWindow:]): Removed call to release and nil-out trackedFirstResponder,
7169         which no longer exists. In the new code all we do now is set firstResponderIsPDFDocumentView to NO.
7170         (-[WebPDFView _trackFirstResponder]): Rewrote this method to just cache the value instead
7171         of retaining an object.
7172
7173 2009-04-13  David Hyatt  <hyatt@apple.com>
7174
7175         Reviewed by Sam Weinig.
7176
7177         Fix for https://bugs.webkit.org/show_bug.cgi?id=25125.  Rework scrolling so that a layout happens first when
7178         it's already needed so that the code doesn't end up making bad decisions based off invalid document sizes.
7179
7180         This patch also eliminates WebHTMLView's separate notion of needing a layout and just consolidates it with
7181         WebCore's notion of needing layout.
7182
7183         * WebView/WebDynamicScrollBarsView.m:
7184         (-[WebDynamicScrollBarsView updateScrollers]):
7185         * WebView/WebHTMLView.mm:
7186         (-[WebHTMLView _frameOrBoundsChanged]):
7187         (-[WebHTMLView initWithFrame:]):
7188         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
7189         (-[WebHTMLView setNeedsLayout:]):
7190         (-[WebHTMLView _layoutIfNeeded]):
7191         (-[WebHTMLView _needsLayout]):
7192         * WebView/WebHTMLViewInternal.h:
7193
7194 2009-04-13  Darin Adler  <darin@apple.com>
7195
7196         * WebView/WebViewPrivate.h: Updated comments.
7197
7198 2009-04-13  Antti Koivisto  <antti@apple.com>
7199
7200         Reviewed by Darin Adler.
7201         
7202         <rdar://problem/6740294> Increase the connection count per host
7203
7204         * WebCoreSupport/WebSystemInterface.m:
7205         (InitWebCoreSystemInterface):
7206
7207 2009-04-13  Brady Eidson  <beidson@apple.com>
7208
7209         Reviewed by Tim Hatcher
7210
7211         Tweak my last check-in, moving the thread violation check up to the API-level calls so the logging is more
7212         useful to developers/users.
7213
7214         * WebView/WebFrame.mm:
7215         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): If not on the main thread, only
7216           perform the "call on main thead" workaround, as the log/exception raising is now up at the API level.
7217         (-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]): Perform a thread violation check here so logging
7218           is more meaningful.
7219         (-[WebFrame loadHTMLString:baseURL:]): Ditto.
7220         (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]): Ditto.
7221
7222 2009-04-13  Brady Eidson  <beidson@apple.com>
7223
7224         Reviewed by Kevin Decker
7225
7226         <rdar://problem/6712063> Garmin WebUpdater crashes
7227
7228         * WebView/WebFrame.mm:
7229         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):  If not called on the main thread,
7230           add a ThreadViolationCheckRoundTwo() call to either log or raise an exception.  In the case where it's
7231           only a log, reschedule the _loadData call to occur on the main thread.
7232
7233 2009-04-10  Dan Bernstein  <mitz@apple.com>
7234
7235         Reviewed by Jon Honeycutt.
7236
7237         - fix <rdar://problem/6752340> Light blue-green background in content
7238           area in Mail
7239
7240         * WebView/WebView.mm:
7241         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
7242         Use device white, rather than calibrated white, as the default
7243         background color.
7244
7245 2009-04-10  Darin Adler  <darin@apple.com>
7246
7247         Reviewed by Brady Eidson.
7248
7249         <rdar://problem/6773515> crash in push_heap inside WebCore when printing
7250
7251         The crash was due to manipulating a timer on a different thread than the one it was created on.
7252
7253         * History/WebHistoryItem.mm:
7254         (-[WebWindowWatcher windowWillClose:]): Call later on main thread, if called on non-main thread.
7255         * WebView/WebHTMLView.mm:
7256         (-[WebHTMLView windowDidBecomeKey:]): Ditto.
7257         (-[WebHTMLView windowDidResignKey:]): Ditto.
7258         (-[WebHTMLView windowWillClose:]): Ditto.
7259         (-[WebHTMLView _updateControlTints]): Added. Factored out the non-thread-safe part of
7260         our override of _windowChangedKeyState.
7261         (-[WebHTMLView _windowChangedKeyState]): Call _updateControlTints later on main thread, if
7262         called on non-main thread.
7263         * WebView/WebPreferences.mm:
7264         (-[WebPreferences _postPreferencesChangesNotification]): Call later on main thread, if called
7265         on non-main thread
7266
7267 2009-04-10  Timothy Hatcher  <timothy@apple.com>
7268
7269         Remove DOMDocumentPrivate.h now that <rdar://problem/6730996> is fixed.
7270
7271         Rubber-stamped by Mark Rowe.
7272
7273         * Misc/DOMDocumentPrivate.h: Removed.
7274
7275 2009-04-10  Pierre d'Herbemont  <pdherbemont@apple.com>
7276
7277         Reviewed by Adele Peterson.
7278
7279         <rdar://problem/6646998> Avoid starting QTKitServer if possible
7280         Add the requires symbol in the WebSystemInterface. It is used by
7281         WebCore.
7282
7283         * WebCoreSupport/WebSystemInterface.m:
7284         (InitWebCoreSystemInterface): Add wkQTIncludeOnlyModernMediaFileTypes.
7285
7286 2009-04-09  Kevin Decker  <kdecker@apple.com>
7287
7288         Reviewed by Hyatt.
7289
7290         <rdar://problem/4680397> tearing seen because deferred updates are disabled
7291         
7292         * WebView/WebFrameView.mm:
7293         (-[WebFrameView initWithFrame:]): Don't call WKDisableCGDeferredUpdates on post-Leopard if 
7294         NSAppKitVersionNumberWithDeferredWindowDisplaySupport is defined.
7295
7296 2009-04-09  John Sullivan  <sullivan@apple.com>
7297
7298         <rdar://problem/6775682> WebKit's support for SnowLeopard sudden termination for 
7299         downloads is broken and should be removed
7300
7301         Reviewed by Darin Adler
7302
7303         * Misc/WebDownload.m:
7304         (-[WebDownloadInternal downloadDidBegin:]):
7305         remove disableSuddenTermination call
7306         (-[WebDownloadInternal downloadDidFinish:]):
7307         remove enableSuddenTermination call
7308         (-[WebDownloadInternal download:didFailWithError:]):
7309         remove enableSuddenTermination call
7310
7311 2009-04-09  Darin Adler  <darin@apple.com>
7312
7313         Reviewed by Anders Carlsson and Sam Weinig.
7314
7315         Part of <rdar://problem/5438063> Saving history containing 100,000 entries causes pauses of 2s while browsing
7316
7317         Longer term solution is to change the design so Safari doesn't read and write all of history.
7318         This patch is step one: Do the serializing, which is done on the main thread, much faster.
7319
7320         * History/WebHistory.mm:
7321         (-[WebHistoryPrivate data]): Added. Returns the NSData object containing serialized history.
7322         For creating new SPI so you can get the data in memory instead of on disk. Uses WebHistoryWriter.
7323         (-[WebHistoryPrivate saveToURL:error:]): Changed to call [self data
7324         (-[WebHistory _data]): Added.
7325         (WebHistoryWriter::WebHistoryWriter): Added.
7326         (WebHistoryWriter::writeHistoryItems): Added.
7327
7328         * History/WebHistoryPrivate.h: Added a new _data method.
7329
7330 2009-04-09  Mike Thole  <mthole@apple.com>
7331
7332         Rubber-stamped by Mark Rowe.
7333
7334         Fix 64-bit build
7335
7336         * Panels/WebAuthenticationPanel.h:
7337             Declare the 'separateRealmLabel' IBOutlet as an NSTextField instead of 'id'.
7338             This fixes a duplicate method warning (setAutoresizingMask: on NSView and CALayer)
7339
7340 2009-04-09  Mike Thole  <mthole@apple.com>
7341
7342         Reviewed by Ada Chan.
7343
7344         <rdar://problem/5697111> Basic authentication dialog spoofing vulnerability
7345
7346         * Panels/WebAuthenticationPanel.h:
7347             Added IBOutlet for separateRealmLabel
7348         * Panels/WebAuthenticationPanel.m:
7349         (-[WebAuthenticationPanel setUpForChallenge:]):
7350             In the realm case, decide if it is a simple or complex realm name.  A realm name
7351             is considered complex if it has any whitespace or newline characters.  Present
7352             alternative text and layout for the complex case, where the realm name isn't inline
7353             with the rest of the sheet's text.
7354         
7355         * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
7356         * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
7357             Updated the nib with a new 'separateRealmLabel' outlet. 
7358             Updated the File's Owner to correctly be WebAuthenticationPanel.  
7359             Fixed springs on the sheet's icon to keep it from moving during a resize.
7360
7361 2009-04-09  David Kilzer  <ddkilzer@apple.com>
7362
7363         Reinstating <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
7364
7365         Rolled r42345 back in.  The build failure was caused by an
7366         internal script which had not been updated the same way that
7367         build-webkit was updated.
7368
7369         * Configurations/WebKit.xcconfig:
7370         * DOM/WebDOMOperations.mm:
7371         * MigrateHeaders.make:
7372
7373 2009-04-09  Alexey Proskuryakov  <ap@webkit.org>
7374
7375         Reverting <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings.
7376         It broke Mac build, and I don't know how to fix it.
7377
7378         * Configurations/WebKit.xcconfig:
7379         * DOM/WebDOMOperations.mm:
7380         * MigrateHeaders.make:
7381
7382 2009-04-08  David Kilzer  <ddkilzer@apple.com>
7383
7384         <rdar://problem/6718589> Option to turn off SVG DOM Objective-C bindings
7385
7386         Reviewed by Darin Adler and Maciej Stachowiak.
7387
7388         Introduce the ENABLE_SVG_DOM_OBJC_BINDINGS feature define so
7389         that SVG DOM Objective-C bindings may be optionally disabled.
7390
7391         * Configurations/WebKit.xcconfig: Added
7392         ENABLE_SVG_DOM_OBJC_BINDINGS variable and use it in
7393         FEATURE_DEFINES.
7394         * DOM/WebDOMOperations.mm: Removed unused header.
7395         * MigrateHeaders.make: Switched from using ENABLE_SVG to using
7396         ENABLE_SVG_DOM_OBJC_BINDINGS.
7397
7398 2009-04-08  David Hyatt  <hyatt@apple.com>
7399
7400         Reviewed by Adam Roben and Darin Adler
7401
7402         Fix for https://bugs.webkit.org/show_bug.cgi?id=12440, fixed positioned elements end up in
7403         inconsistent positions.  Rewrite updateScrollers to improve the correctness.
7404
7405         * WebView/WebDynamicScrollBarsView.h:
7406         * WebView/WebDynamicScrollBarsView.m:
7407         (-[WebDynamicScrollBarsView updateScrollers]):
7408
7409 2009-04-07  Anders Carlsson  <andersca@apple.com>
7410
7411         Fix Tiger build for real this time.
7412
7413         * Plugins/WebNetscapePluginView.h:
7414         * Plugins/WebNetscapePluginView.mm:
7415         (-[WebNetscapePluginView getVariable:forURL:value:length:]):
7416         (-[WebNetscapePluginView setVariable:forURL:value:length:]):
7417         (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
7418         * Plugins/npapi.mm:
7419         (NPN_GetValueForURL):
7420         (NPN_SetValueForURL):
7421
7422 2009-04-07  David Hyatt  <hyatt@apple.com>
7423
7424         Reviewed by Adam Roben
7425
7426         Mac portion of fix to make DumpRenderTree always produce accurate scrollbar results.  Change
7427         updateScrollers to call minimumContentsSize when a WebHTMLView is inside the WebDynamicScrollbarsView.
7428
7429         * WebView/WebDynamicScrollBarsView.m:
7430         (-[WebDynamicScrollBarsView updateScrollers]):
7431
7432 2009-04-07  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
7433
7434         Reviewed by Anders Carlsson.
7435
7436         Trying to fix Tiger build.
7437
7438         * Plugins/WebNetscapePluginView.h:
7439         * Plugins/WebNetscapePluginView.mm:
7440         (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
7441
7442 2009-04-07  Anders Carlsson  <andersca@apple.com>
7443
7444         Try to fix the Leopard build once more.
7445         
7446         * Plugins/WebBaseNetscapePluginView.h:
7447         * Plugins/WebBaseNetscapePluginView.mm:
7448         * Plugins/WebNetscapePluginView.mm:
7449         (-[WebNetscapePluginView getVariable:forURL:value:length:]):
7450
7451 2009-04-07  Anders Carlsson  <andersca@apple.com>
7452
7453         ...and try to fix the Leopard build.
7454         
7455         * Plugins/npapi.mm:
7456         (NPN_GetAuthenticationInfo):
7457
7458 2009-04-07  Anders Carlsson  <andersca@apple.com>
7459
7460         Try to fix the Tiger build.
7461
7462         * Plugins/WebBaseNetscapePluginView.mm:
7463
7464 2009-04-07  Anders Carlsson  <andersca@apple.com>
7465
7466         Reviewed by Sam Weinig.
7467
7468         <rdar://problem/6667001>
7469         NPAPI: need NPN_Get/SetValueForURL() and NPN_GetAuthenticationInfo()
7470         
7471         * Plugins/Hosted/NetscapePluginHostProxy.mm:
7472         (WKPCGetCookies):
7473         (WKPCGetProxy):
7474         (WKPCSetCookies):
7475         (WKPCGetAuthenticationInfo):
7476         New MIG functions to be used by the plug-in host.
7477         
7478         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
7479         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
7480         (WebKit::NetscapePluginInstanceProxy::getCookies):
7481         (WebKit::NetscapePluginInstanceProxy::setCookies):
7482         (WebKit::NetscapePluginInstanceProxy::getProxy):
7483         (WebKit::NetscapePluginInstanceProxy::getAuthenticationInfo):
7484         Implement these.
7485         
7486         * Plugins/Hosted/WebKitPluginClient.defs:
7487         Add callbacks.
7488         
7489         * Plugins/WebBaseNetscapePluginView.h:
7490         * Plugins/WebBaseNetscapePluginView.mm:
7491         (-[WebBaseNetscapePluginView URLWithCString:]):
7492         Factor this out of URLWithCString.
7493         
7494         (-[WebBaseNetscapePluginView requestWithURLCString:]):
7495         Call URLWithCString.
7496         
7497         (WebKit::proxiesForURL):
7498         Return a string representation of proxies for a given URL.
7499         
7500         (WebKit::getAuthenticationInfo):
7501         Get the authentication info for a given host/protocol/scheme/realm/port combination.
7502         
7503         * Plugins/WebNetscapePluginPackage.mm:
7504         (-[WebNetscapePluginPackage _tryLoad]):
7505         Initialize the new vtable functions.
7506         
7507         * Plugins/WebNetscapePluginView.h:
7508         * Plugins/WebNetscapePluginView.mm:
7509         (-[WebNetscapePluginView getVariable:forURL:value:length:]):
7510         (-[WebNetscapePluginView setVariable:forURL:value:length:]):
7511         (-[WebNetscapePluginView getAuthenticationInfoWithProtocol:host:port:scheme:realm:username:usernameLength:password:passwordLength:]):
7512         Implement these.
7513         
7514         * Plugins/npapi.mm:
7515         (NPN_GetValueForURL):
7516         (NPN_SetValueForURL):
7517         (NPN_GetAuthenticationInfo):
7518         Call the plug-in view functions.
7519
7520 2009-04-03  Kevin Decker  <kdecker@apple.com>
7521
7522         Reviewed by Anders Carlsson.
7523
7524         <rdar://problem/6756512>
7525         
7526         * Plugins/Hosted/NetscapePluginHostManager.mm:
7527         (WebKit::NetscapePluginHostManager::spawnPluginHost): Tweaked the visibleName property.
7528
7529 2009-04-03  John Sullivan  <sullivan@apple.com>
7530
7531         Reviewed by Ada Chan
7532         
7533         <rdar://problem/6755838> Removing all icons can delete other items from disk.
7534
7535         * Misc/WebIconDatabase.mm:
7536         (importToWebCoreFormat):
7537         When snooping around in various directories looking for a directory full of Safari-2-style
7538         icon database information to convert and delete, bail out without doing the delete part if
7539         we didn't actually find any Safari-2-style icon database information.
7540
7541 2009-04-03  John Sullivan  <sullivan@apple.com>
7542
7543         fixed <rdar://problem/6355573> [WebView _setCacheModel:] leaks the result of _CFURLCacheCopyCacheDirectory
7544
7545         Reviewed by Adam Roben
7546
7547         * WebView/WebView.mm:
7548         (+[WebView _setCacheModel:]):
7549         use WebCFAutorelease rather than autorelease on result of method that returns CFStringRef
7550
7551 2009-04-03  Chris Marrin  <cmarrin@apple.com>
7552
7553         Reviewed by David Hyatt.
7554
7555         Fixed https://bugs.webkit.org/show_bug.cgi?id=24941
7556
7557         This fix essentially does a -viewWillDraw call for layout. It adds 
7558         a CFRunLoopObserver which performs layout just before drawing on the 
7559         Mac platform. This makes sure layout is complete before rendering and 
7560         avoids a flash.
7561
7562         * WebCoreSupport/WebChromeClient.h:
7563         * WebCoreSupport/WebChromeClient.mm:
7564         (WebChromeClient::attachRootGraphicsLayer):
7565         (WebChromeClient::setNeedsOneShotDrawingSynchronization):
7566         (WebChromeClient::scheduleViewUpdate):
7567         * WebView/WebView.mm:
7568         (-[WebViewPrivate _clearViewUpdateRunLoopObserver]):
7569         (-[WebView _viewWillDrawInternal]):
7570         (-[WebView viewWillDraw]):
7571         (-[WebView close]):
7572         (viewUpdateRunLoopObserverCallBack):
7573         (-[WebView _scheduleViewUpdate]):
7574         * WebView/WebViewInternal.h:
7575
7576 2009-04-03  Anders Carlsson  <andersca@apple.com>
7577
7578         Reviewed by Kevin Decker.
7579
7580         WebKit side of <rdar://problem/6752953>.
7581         
7582         Pass the clip rect to the plug-in host.
7583         
7584         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
7585         (WebKit::NetscapePluginInstanceProxy::resize):
7586         * Plugins/Hosted/WebKitPluginHost.defs:
7587
7588 2009-04-02  Mark Rowe  <mrowe@apple.com>
7589
7590         Reviewed by Dan Bernstein and Timothy Hatcher.
7591
7592         <rdar://problem/6684745> Crash in -[WebView removeSizeObservers] when loading NIB file
7593
7594         The implementation of -[NSView initWithCoder:] can result in -viewWillMoveToSuperview:/-viewDidMoveToSuperview: being sent to
7595         our view before we've had a chance to initialize _private, so we need to ensure it is non-nil before dereferencing it in those
7596         methods.
7597
7598         * WebView/WebView.mm:
7599         (-[WebView removeSizeObservers]): Nil-check _private before dereferencing it.
7600         (-[WebView addSizeObservers]): Ditto.
7601
7602 2009-04-02  Adele Peterson  <adele@apple.com>
7603
7604         Reviewed by Darin Adler.
7605
7606         Add a way to get a list of focusable nodes.
7607
7608         * DOM/WebDOMOperations.mm:
7609         (-[DOMDocument _focusableNodes]):
7610         * DOM/WebDOMOperationsInternal.h: Added.
7611         * DOM/WebDOMOperationsPrivate.h: Make this a private header.
7612         Move old methods to WebDOMOperationsInternal.h
7613         * WebView/WebHTMLView.mm: Use methods from WebDOMOperationsInternal.h
7614
7615 2009-04-01  Darin Adler  <darin@apple.com>
7616
7617         Reviewed by Geoff Garen.
7618
7619         Bug 22378: Crash submitting a form when parsing an XHTML document
7620         https://bugs.webkit.org/show_bug.cgi?id=22378
7621         rdar://problem/6388377
7622
7623         * History/WebHistoryItem.mm:
7624         (-[WebHistoryItem targetItem]): Call targetItem directly instead of callling
7625         isTargetItem, hasChildren, and recurseToFindTargetItem.
7626
7627         * WebCoreSupport/WebFrameLoaderClient.mm:
7628         (WebFrameLoaderClient::dispatchWillSubmitForm): Updated for the new
7629         textFieldValues function in FormState.
7630
7631         * WebView/WebPDFView.mm:
7632         (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Updated for name and
7633         argument change of loadFrameRequest.
7634
7635 2009-04-01  Greg Bolsinga  <bolsinga@apple.com>
7636
7637         Reviewed by Mark Rowe.
7638         
7639         https://bugs.webkit.org/show_bug.cgi?id=24990
7640         Put SECTORDER_FLAGS into xcconfig files.
7641
7642         * Configurations/Base.xcconfig:
7643         * Configurations/DebugRelease.xcconfig:
7644
7645 2009-03-31  Anders Carlsson  <andersca@apple.com>
7646
7647         Reviewed by Adam Roben.
7648
7649         WebKit side of <rdar://problem/6500266>.
7650         
7651         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
7652         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
7653         (WebKit::NetscapePluginInstanceProxy::wheelEvent):
7654         Send the event.
7655         
7656         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
7657         (-[WebHostedNetscapePluginView scrollWheel:]):
7658         Call NetscapePluginInstanceProxy::wheelEvent. If the plug-in processed the event, don't
7659         call super.
7660         
7661         * Plugins/Hosted/WebKitPluginHost.defs:
7662         Add definition.
7663
7664 2009-03-31  Darin Adler  <darin@apple.com>
7665
7666         Reviewed by Adele Peterson.
7667
7668         <rdar://problem/6740581> REGRESSION (r41793): Page Down and Page Up don’t work in Leopard Mail
7669
7670         * WebView/WebHTMLView.mm:
7671         (-[WebResponderChainSink tryToPerform:with:]): Added. Without this we would think we had
7672         handled an event when we actually hadn't. Specifically, when -[WebFrameView scrollPageDown:]
7673         calls tryToPerform on the next responder.
7674
7675 2009-03-30  Greg Bolsinga  <bolsinga@apple.com>
7676
7677         Reviewed by Simon Fraser.
7678         
7679         https://bugs.webkit.org/show_bug.cgi?id=24938
7680         
7681         Build fixes when building --no-svg
7682         
7683         DOMHTMLFrameElementPrivate.h and DOMHTMLIFrameElementPrivate.h are only available with ENABLE_SVG.
7684
7685         * MigrateHeaders.make:
7686
7687 2009-03-29  Darin Adler  <darin@apple.com>
7688
7689         Reviewed by Cameron Zwarich.
7690
7691         * Plugins/WebNullPluginView.mm: Added now-needed includes.
7692         * WebView/WebHTMLRepresentation.mm: Ditto.
7693         * WebView/WebHTMLView.mm: Ditto.
7694
7695 2009-03-27  Timothy Hatcher  <timothy@apple.com>
7696
7697         * MigrateHeaders.make: Remove DOMHTMLBodyElementPrivate.h since it
7698         is not generated anymore.
7699
7700 2009-03-27  Adam Roben  <aroben@apple.com>
7701
7702         Don't include substitute data URLs in global history redirect chains
7703
7704         <rdar://6690169>
7705
7706         Reviewed by Darin Adler.
7707
7708         * WebCoreSupport/WebFrameLoaderClient.mm:
7709         (WebFrameLoaderClient::updateGlobalHistory): Don't call
7710         updateGlobalHistoryRedirectLinks. FrameLoader calls this for us now.
7711         (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
7712         Added an assertion to help catch cases where we might be adding a
7713         substitute data URL into a redirect chain.
7714
7715 2009-03-27  Darin Adler  <darin@apple.com>
7716
7717         Reviewed by Adam Roben.
7718
7719         <rdar://problem/6541923> REGRESSION (r38629): Tab cycle in empty tab is broken
7720
7721         * WebView/WebHTMLView.mm:
7722         (-[WebHTMLView _wantsKeyDownForEvent:]): Only return YES when we have a Frame.
7723
7724 2009-03-27  Darin Adler  <darin@apple.com>
7725
7726         Reviewed by John Sullivan and Anders Carlsson.
7727
7728         <rdar://problem/5987442> Pasteboard not exposed to WebEditingDelegate for WebViewInsertActionPasted (needed for system services)
7729
7730         Added SPI to tell which pasteboard is currently being inserted.
7731         I chose to put it on WebView to be forward-looking since we're migrating things
7732         from WebHTMLView to WebView in the future.
7733
7734         * WebView/WebHTMLView.mm:
7735         (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Add calls to _setInsertionPasteboard.
7736         (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto.
7737         * WebView/WebView.mm:
7738         (-[WebViewPrivate dealloc]): Assert the pasteboard is nil.
7739         (-[WebViewPrivate finalize]): Ditto.
7740         (-[WebView _insertionPasteboard]): Return the pastebaord.
7741         (-[WebView _setInsertionPasteboard:]): Set the pasteboard.
7742         * WebView/WebViewInternal.h: Added _setInsertionPasteboard.
7743         * WebView/WebViewPrivate.h: Added _insertionPasteboard.
7744
7745 2009-03-25  Timothy Hatcher  <timothy@apple.com>
7746
7747         Expose new DOM methods as public Objective-C API.
7748
7749         <rdar://problem/5837350> Expose new DOM classes and methods
7750         as public API (match the additions to the JavaScript DOM)
7751
7752         Reviewed by Mark Rowe and Darin Adler.
7753
7754         * MigrateHeaders.make:
7755         * Misc/DOMDocumentPrivate.h: Added. Forwarding header for
7756         <rdar://problem/6730996>.
7757
7758 2009-03-26  Jungshik Shin  <jshin@chromium.org>
7759
7760         Reviewed by Alexey Proskuryakov.
7761
7762         Add WebPreferences for encoding autodetection on Mac.
7763   
7764         http://bugs.webkit.org/show_bug.cgi?id=16482
7765
7766         * WebView/WebPreferenceKeysPrivate.h:
7767         * WebView/WebPreferences.mm:
7768         (+[WebPreferences initialize]):
7769         (-[WebPreferences usesEncodingDetector]):
7770         (-[WebPreferences setUsesEncodingDetector:]):
7771         * WebView/WebPreferencesPrivate.h:
7772         * WebView/WebView.mm:
7773         (-[WebView _preferencesChangedNotification:]):
7774
7775 2009-03-26  Anders Carlsson  <andersca@apple.com>
7776
7777         Reviewed by Dan Bernstein.
7778
7779         - Fix <rdar://problem/6687055> and <rdar://problem/6713639>.
7780         
7781         * Plugins/Hosted/NetscapePluginHostProxy.mm:
7782         (WKPCInvalidateRect):
7783         Call NetscapePluginInstanceProxy::invalidateRect.
7784         
7785         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
7786         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
7787         (WebKit::NetscapePluginInstanceProxy::cleanup):
7788         Stop the request timer, set m_pluginView to nil.
7789         
7790         (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
7791         No need to set m_pluginView to nil here anymore, it's now done in cleanup().
7792         
7793         (WebKit::NetscapePluginInstanceProxy::performRequest):
7794         (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
7795         Assert that the plug-in view is not nil.
7796         
7797         (WebKit::NetscapePluginInstanceProxy::invalidateRect):
7798         Call setNeedsDisplayInRect here.
7799
7800 2009-03-25  Anders Carlsson  <andersca@apple.com>
7801
7802         Reviewed by Darin Adler.
7803
7804         <rdar://problem/6714964>
7805         CrashTracer: [REGRESSION] 51 crashes in Safari at com.apple.WebKit • WebNetscapePluginStream::deliverData + 775
7806         
7807         Don't release m_deliveryData since it's a RetainPtr. Also, use adoptNS instead of releasing newDeliveryData manually.
7808         
7809         * Plugins/WebBaseNetscapePluginStream.mm:
7810         (WebNetscapePluginStream::deliverData):
7811
7812 2009-03-25  Mike Thole  <mthole@apple.com>
7813
7814         Reviewed by Kevin Decker.
7815         
7816         <rdar://problem/6453738> call SetWindow when user creates a new tab
7817         
7818         CoreGraphics plug-ins now receive an NPP_SetWindow call when moving to a background tab.
7819         Flash is excluded from this change in behavior, as it has historical WebKit-specific code
7820         that isn't compatible with this change.
7821
7822         * Plugins/WebNetscapePluginView.h:
7823             Added an _isFlash ivar.
7824         * Plugins/WebNetscapePluginView.mm:
7825         (-[WebNetscapePluginView _createPlugin]):
7826             Set the new _isFlash ivar based on the bundle identifier.
7827         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
7828             When using the CG drawing model and in a non-drawable state,  set the portState
7829             to NULL and return early.
7830         (-[WebNetscapePluginView updateAndSetWindow]):
7831             When using the CG drawing model, call -setWindowIfNecessary even if the portState is NULL.
7832             Flash is an exception to this, due to its historical behavior.
7833         (-[WebNetscapePluginView setWindowIfNecessary]):
7834             Removed an assertion that was no longer true.  The [NSView focus] view
7835             is no longer guaranteed to be 'self' at this point.
7836             Also modified the debug logging for CG plug-ins to include the size of the 
7837             window's clipRect, which was useful in verifying the correct behavior of this patch.
7838
7839 2009-03-24  Dan Bernstein  <mitz@apple.com>
7840
7841         Reviewed by Oliver Hunt.
7842
7843         - speculative fix for <rdar://problem/6630134> Crash at
7844           Editor::compositionRange()
7845
7846         * WebView/WebHTMLView.mm:
7847         (-[WebHTMLView markedRange]): Null-check the Frame like most other
7848         methods in this class.
7849
7850 2009-03-23  Sam Weinig  <sam@webkit.org>
7851
7852         Reviewed by Dan Bernstein.
7853
7854         Fix for <rdar://problem/6140966>
7855         Empty Caches does not clear the Cross-site XMLHttpRequest preflight cache
7856
7857         * Misc/WebCache.mm:
7858         (+[WebCache empty]):
7859
7860 2009-03-23  Adele Peterson  <adele@apple.com>
7861
7862         Reviewed by Mark Rowe & Dave Hyatt.
7863
7864         Merge some of the individual Mail quirks into two settings that we can check for future quirks.
7865
7866         * WebView/WebView.mm:
7867         (runningLeopardMail):
7868         (runningTigerMail):
7869         (-[WebView _preferencesChangedNotification:]):
7870
7871 2009-03-23  Darin Adler  <darin@apple.com>
7872
7873         * WebView/WebTextIterator.h: Fixed a spelling error in a comment.
7874
7875 2009-03-22  Dan Bernstein  <mitz@apple.com>
7876
7877         Reviewed by John Sullivan.
7878
7879         - fix <rdar://problem/6640741> Messages not displaying after the
7880           Safari 4 beta was installed
7881
7882         Mail assumes that if -[WebArchive subresources] is not nil, then it
7883         contains at least one object.
7884
7885         * WebView/WebArchive.mm:
7886         (-[WebArchive subresources]): Preserve the behavior of returning nil
7887         if there are no subresources.
7888
7889 2009-03-20  Adele Peterson  <adele@apple.com>
7890
7891         Build fix.
7892
7893         Reviewed by Darin Adler.
7894
7895         * WebView/WebFrameView.mm: (-[WebFrameView initWithFrame:]):
7896
7897 2009-03-20  Timothy Hatcher  <timothy@apple.com>
7898
7899         Change how threading exceptions are checked so they are reported
7900         by what round they were added. That way WebKit can decided the
7901         behavior per-round based on linked-on-or-after checks.
7902
7903         <rdar://problem/6626741&6648478&6635474&6674079>
7904
7905         Reviewed by Darin Adler.
7906
7907         * History/WebBackForwardList.mm: Use the new WebCoreThreadViolationCheckRoundOne macro.
7908         * History/WebHistoryItem.mm: Ditto.
7909         * Misc/WebIconDatabase.mm: Ditto.
7910
7911         * WebView/WebArchive.mm: Use the new WebCoreThreadViolationCheckRoundTwo macro.
7912         * WebView/WebResource.mm: Ditto.
7913         (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Check Mail's bundle version
7914         to truly decide if it is an old Mail client.
7915         * WebView/WebView.mm: Ditto.
7916
7917         * Misc/WebKitVersionChecks.h: Add a new linked-on-or-after version define.
7918         * WebView/WebFrameView.mm:
7919         (-[WebFrameView initWithFrame:]): Set the default thread violation behavior per-round
7920         based on difference version checks and the Mail workaround check.
7921
7922 2009-03-20  Darin Adler  <darin@apple.com>
7923
7924         Reviewed by Timothy Hatcher.
7925
7926         * WebView/WebTextIterator.h: Improved comments to point out some of the pitfalls
7927         of this SPI.
7928
7929 2009-03-20  Darin Adler  <darin@apple.com>
7930
7931         Reviewed by Adele Peterson.
7932
7933         Use a better technique to handle finding out if something responds to a selector
7934         in WebHTMLView's doCommandBySelector method.
7935
7936         * WebView/WebHTMLView.mm:
7937         (-[WebHTMLView doCommandBySelector:]): Removed unneeded check for 0 coreFrame;
7938         this is already handled by coreCommandBySelector: so doesn't need to be checked
7939         twice. Got rid of initial value for eventWasHandled boolean to make it more clear.
7940         Use WebResponderChainSink to find out if a command is handled rather than walking
7941         the responder chain explicitly.
7942         (-[WebResponderChainSink initWithResponderChain:]): Added.
7943         (-[WebResponderChainSink detach]): Added.
7944         (-[WebResponderChainSink receivedUnhandledCommand]): Added.
7945         (-[WebResponderChainSink noResponderFor:]): Added.
7946         (-[WebResponderChainSink doCommandBySelector:]): Added.
7947
7948 2009-03-19  Timothy Hatcher  <timothy@apple.com>
7949
7950         Remove #ifndef BUILDING_ON_TIGER around code that schedules runloop modes
7951         for Page, so the new RunLoopTimer in WebCore always gets a default mode.
7952         Fixes the layout test failures on the Tiger build bots.
7953
7954         Reviewed by Mark Rowe.
7955
7956         * WebView/WebView.mm:
7957         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
7958         (-[WebView scheduleInRunLoop:forMode:]):
7959         (-[WebView unscheduleFromRunLoop:forMode:]):
7960
7961 2009-03-18  Anders Carlsson  <andersca@apple.com>
7962
7963         Reviewed by Oliver Hunt.
7964
7965         WebKit side of <rdar://problem/6688244>.
7966         
7967         Try reinitializing the vendor port if it's invalid.
7968         
7969         * Plugins/Hosted/NetscapePluginHostManager.mm:
7970         (WebKit::NetscapePluginHostManager::spawnPluginHost):
7971
7972 2009-03-18  Anders Carlsson  <andersca@apple.com>
7973
7974         Reviewed by Darin Adler.
7975
7976         <rdar://problem/6504776> 
7977         CrashTracer: [USER] 188 crashes in Safari at com.apple.WebCore • WTF::HashTableIterator<WTF::RefPtr<WebCore::ResourceLoader>, ...
7978         
7979         If the m_pluginView member was zeroed out as a result of making a call into the plug-in, the pluginFunctionCallDepth would be off
7980         causing the plug-in never to be stopped. Simplify the code by using a RAII object.
7981
7982         * Plugins/WebBaseNetscapePluginStream.mm:
7983         (PluginStopDeferrer::PluginStopDeferrer):
7984         (PluginStopDeferrer::~PluginStopDeferrer):
7985         (WebNetscapePluginStream::startStream):
7986         (WebNetscapePluginStream::wantsAllStreams):
7987         (WebNetscapePluginStream::destroyStream):
7988
7989 2009-03-17  Darin Adler  <darin@apple.com>
7990
7991         Reviewed by Adele Peterson.
7992
7993         <rdar://problem/6687005> Need support for new move-left/right selectors.
7994
7995         * WebView/WebHTMLView.mm: Added the four new selectors to the command-forwarding list.
7996         * WebView/WebView.mm: Ditto.
7997
7998 2009-03-17  Darin Adler  <darin@apple.com>
7999
8000         Reviewed by Adele Peterson.
8001
8002         Bug 24477: REGRESSION (r41467): Page Down key scrolls two pages
8003         https://bugs.webkit.org/show_bug.cgi?id=24477
8004         rdar://problem/6674184
8005
8006         * WebView/WebHTMLView.mm:
8007         (responderChainRespondsToSelector): Added.
8008         (-[WebHTMLView doCommandBySelector:]): Set eventWasHandled based on whether we
8009         can find a responder that responds to this selector rather than always assuming
8010         the selector will not be handled.
8011
8012 2009-03-17  Mark Rowe  <mrowe@apple.com>
8013
8014         Fix the build.
8015
8016         * Plugins/Hosted/HostedNetscapePluginStream.mm:
8017
8018 2009-03-17  David Kilzer  <ddkilzer@apple.com>
8019
8020         Use -[NSURLResponse(WebCoreURLResponse) _webcore_MIMEType] consistently
8021
8022         Reviewed by Darin Adler.
8023
8024         WebKit r30323 added -_webcore_MIMEType to fix issues with
8025         incorrect MIME types in NS[HTTP]URLResponse objects.  However,
8026         uses of -[NSURLResponse MIMEType] still persist in WebKit that
8027         should be switched to use -_webcore_MIMEType.  Note that
8028         -[WebDataSource _responseMIMEType] calls back into WebCore to
8029         get the MIME type from the ResourceResponse object, which has
8030         already retrieved it via -_webcore_MIMEType.
8031
8032         * Plugins/Hosted/HostedNetscapePluginStream.mm:
8033         (WebKit::HostedNetscapePluginStream::didReceiveResponse): Use
8034         -_webcore_MIMEType.
8035         * Plugins/WebBaseNetscapePluginStream.mm:
8036         (WebNetscapePluginStream::didReceiveResponse): Ditto.
8037         * Plugins/WebNetscapePluginView.mm:
8038         (-[WebNetscapePluginView pluginView:receivedData:]): Ditto.
8039         * Plugins/WebPluginController.mm:
8040         (-[WebPluginController pluginView:receivedResponse:]): Ditto.
8041         * WebView/WebHTMLRepresentation.mm:
8042         (-[WebHTMLRepresentation _isDisplayingWebArchive]): Use
8043         -[WebDataSource _responseMIMEType] instead.
8044         * WebView/WebPDFRepresentation.m:
8045         (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Ditto.
8046         * WebView/WebPDFView.mm:
8047         (-[WebPDFView menuForEvent:]): Ditto.
8048
8049 2009-03-17  Simon Fraser  <simon.fraser@apple.com>
8050
8051         Reviewed by Darin Adler
8052
8053         https://bugs.webkit.org/show_bug.cgi?id=24396
8054         
8055         Add WTF_USE_ACCELERATED_COMPOSITING, defined to 0 for now.
8056
8057         * WebKitPrefix.h:
8058
8059 2009-03-17  Kevin Ollivier  <kevino@theolliviers.com>
8060
8061         Reviewed by Mark Rowe.
8062
8063         Get BUILDING_ON_* defines from Platform.h.
8064         
8065         https://bugs.webkit.org/show_bug.cgi?id=24630
8066
8067         * WebKitPrefix.h:
8068
8069 2009-03-16  Darin Adler  <darin@apple.com>
8070
8071         Reviewed by Dan Bernstein.
8072
8073         <rdar://problem/6577174> Rename the text directionality submenus to “Paragraph Direction” and “Selection Direction”
8074
8075         * WebCoreSupport/WebViewFactory.mm:
8076         (-[WebViewFactory contextMenuItemTagParagraphDirectionMenu]): Changed string here, but only
8077         post-Leopard, since we want this to match the Mac OS X menu on Tiger and Leopard.
8078         (-[WebViewFactory contextMenuItemTagSelectionDirectionMenu]): Changed string here.
8079
8080 2009-03-16  Anders Carlsson  <andersca@apple.com>
8081
8082         Reviewed by Oliver Hunt.
8083
8084         Don't mig_deallocate random data in case an instance proxy method returns false.
8085         
8086         * Plugins/Hosted/NetscapePluginHostProxy.mm:
8087         (WKPCEvaluate):
8088         (WKPCInvoke):
8089         (WKPCInvokeDefault):
8090         (WKPCGetProperty):
8091         (WKPCEnumerate):
8092
8093 2009-03-16  Anders Carlsson  <andersca@apple.com>
8094
8095         Reviewed by Oliver Hunt.
8096
8097         <rdar://problem/6633944> 
8098         REGRESSION (Safari 4 PB): Many crashes in Flip4Mac involving loading the plugin
8099         
8100         Defer loading while calling webPlugInInitialize since it can end up spinning the run loop.
8101         
8102         * Plugins/WebPluginController.mm:
8103         (-[WebPluginController addPlugin:]):
8104
8105 2009-03-16  Anders Carlsson  <andersca@apple.com>
8106
8107         Reviewed by Sam Weinig.
8108
8109         Fix <rdar://problem/6622601>
8110         
8111         Make sure to update both the window frame and the plug-in frame.
8112         
8113         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
8114         (-[WebHostedNetscapePluginView addWindowObservers]):
8115
8116 2009-03-15  Dan Bernstein  <mitz@apple.com>
8117
8118         Reviewed by Adele Peterson.
8119
8120         - fix <rdar://problem/6607773> WebKit should support the "Default"
8121           paragraph writing direction -- or at least validate the menu item
8122           appropriately
8123
8124         Made WebHTMLView validate user interface items with the selector
8125         -makeBaseWritingDirectionNatural: by returning NO and, if the item is
8126         a menu item, setting its state to "off".
8127
8128         Strictly speaking, since -makeBaseWritingDirectionNatural: is never
8129         valid for WebViews, WebHTMLView should not need to respond to it and
8130         validate it, however because other responders respond to all three
8131         -makeBaseWritingDirection*: messages and set the menu item state, having
8132         WebHTMLView do the same makes application developers' lives easier.
8133
8134         * WebView/WebHTMLView.mm:
8135         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
8136         (-[WebHTMLView makeBaseWritingDirectionNatural:]):
8137
8138 2009-03-13  Mark Rowe  <mrowe@apple.com>
8139
8140         Rubber-stamped by Dan Bernstein.
8141
8142         Take advantage of the ability of recent versions of Xcode to easily switch the active
8143         architecture.
8144
8145         * Configurations/DebugRelease.xcconfig:
8146
8147 2009-03-13  Anders Carlsson  <andersca@apple.com>
8148
8149         Reviewed by Kevin Decker and Geoffrey Garen.
8150
8151         <rdar://problem/6590384>
8152         REGRESSION (Safari 3-4): Tiger-only Crash occurs at WebView hostWindow () after reloading a set of tabs then quitting
8153         
8154         When we're doing fast teardown, plug-in views can be destroyed from -[WebView dealloc]'s [super dealloc] call, 
8155         and thus calling -[WebView hostWindow] will crash since _private is nil.
8156         
8157         * WebView/WebView.mm:
8158         (-[WebView hostWindow]):
8159
8160 2009-03-13  Anders Carlsson  <andersca@apple.com>
8161
8162         And yet another attempt...
8163         
8164         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
8165         (WebNetscapePluginEventHandlerCocoa::installKeyEventHandler):
8166         (WebNetscapePluginEventHandlerCocoa::removeKeyEventHandler):
8167         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
8168
8169 2009-03-13  Anders Carlsson  <andersca@apple.com>
8170
8171         Another attempt at fixing the build.
8172         
8173         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
8174         (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
8175
8176 2009-03-13  Anders Carlsson  <andersca@apple.com>
8177
8178         Try to fix the SL build.
8179
8180         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
8181         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
8182         (WebNetscapePluginEventHandlerCocoa::keyDown):
8183
8184 2009-03-13  Greg Bolsinga  <bolsinga@apple.com>
8185
8186         Reviewed by Simon Fraser.
8187
8188         Update Geolocation perimission dialogs to be asynchronous.
8189         https://bugs.webkit.org/show_bug.cgi?id=24505
8190
8191         WebGeolocation is a wrapper around WebCore::Geolocation. It mimics the
8192         coding style set by WebSecurityOrigin.
8193         
8194         WebChromeClient now calls the private UI delegate method 
8195         -webView:frame:requestGeolocationPermission:securityOrigin:
8196
8197         * WebCoreSupport/WebChromeClient.h:
8198         * WebCoreSupport/WebChromeClient.mm:
8199         (WebChromeClient::requestGeolocationPermissionForFrame):
8200         * WebCoreSupport/WebGeolocation.mm: Added.
8201         (WebCore::if):
8202         (-[WebGeolocation shouldClearCache]):
8203         (-[WebGeolocation setIsAllowed:]):
8204         (-[WebGeolocation dealloc]):
8205         * WebCoreSupport/WebGeolocationInternal.h: Added.
8206         * WebCoreSupport/WebGeolocationPrivate.h: Added.
8207         * WebView/WebUIDelegatePrivate.h:
8208
8209 2009-03-13  Anders Carlsson  <andersca@apple.com>
8210
8211         Reviewed by Dan Bernstein.
8212
8213         <rdar://problem/6610666> Revise the Cocoa event model text API
8214
8215         Replace the text input API with a simpler API that uses a separate text input window.
8216         
8217         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
8218         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
8219         (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
8220         Initialize m_keyEventHandler to 0.
8221         
8222         (WebNetscapePluginEventHandlerCocoa::keyDown):
8223         If the plug-in returns 0 from NPP_HandleEvent, pass the event to the TSM machinery.
8224         
8225         (WebNetscapePluginEventHandlerCocoa::focusChanged):
8226         Install/remove the key event handler as needed.
8227         
8228         (WebNetscapePluginEventHandlerCocoa::handleTSMEvent):
8229         Get the text and send a TextInput event.
8230         
8231         * Plugins/WebNetscapePluginView.h:
8232         * Plugins/WebNetscapePluginView.mm:
8233         Remove the old text input API.
8234         
8235         (-[WebNetscapePluginView inputContext]):
8236         Always return nil here.
8237         
8238         * Plugins/npapi.mm:
8239         * Plugins/nptextinput.h: Removed.
8240
8241 2009-03-12  Anders Carlsson  <andersca@apple.com>
8242
8243         Reviewed by Mike Thole and Mark Rowe.
8244
8245         Fix <rdar://problem/6624105>.
8246         
8247         Make sure to process incoming messages for the NSEventTrackingRunLoopMode as well.
8248         
8249         * Plugins/Hosted/NetscapePluginHostProxy.mm:
8250         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
8251
8252 2009-03-12  Anders Carlsson  <andersca@apple.com>
8253
8254         Reviewed by Geoffrey Garen.
8255
8256         WebKit side of <rdar://problem/6607801>
8257         
8258         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
8259         (WebKit::NetscapePluginInstanceProxy::destroy):
8260         Pass a requestID to _WKPCDestroyPluginInstance and wait until we get a reply back.
8261         
8262         * Plugins/Hosted/WebKitPluginHost.defs:
8263         Add requestID parameter.
8264
8265 2009-03-12  Kevin Decker  <kdecker@apple.com>
8266
8267         Reviewed by Anders Carlsson.
8268
8269         * Plugins/WebNetscapePluginPackage.mm:
8270         (-[WebNetscapePluginPackage _unloadWithShutdown:]): Simply a small SUPPORT_CFM code block.
8271
8272 2009-03-12  Kevin Decker  <kdecker@apple.com>
8273
8274         Reviewed by Anders Carlsson.
8275
8276         Fixed: <rdar://problem/5815862> Opening a subclassed NSWindow from a Safari plugin causes Safari to crash on Quit
8277         
8278         This fix addresses crashes in both Silverlight and ChemDraw.  This type of crash would occur because AppKit still
8279         had a reference to open windows that the plugin created (which no longer exist). 
8280         
8281         * Plugins/WebNetscapePluginPackage.mm:
8282         (-[WebNetscapePluginPackage _unloadWithShutdown:]): Do not unload the plug-in bundle on browser shutdown. 
8283         
8284 2009-03-11  David Kilzer  <ddkilzer@apple.com>
8285
8286         Remove duplicate header include
8287
8288         Rubber-stamped by Mark Rowe.
8289
8290         * WebView/WebView.mm: Remove duplicate #include <runtime/InitializeThreading.h>.
8291         Also realphabetized lowercase #include statements.
8292
8293 2009-03-11  David Kilzer  <ddkilzer@apple.com>
8294
8295         Clarify comments regarding order of FEATURE_DEFINES
8296
8297         Rubber-stamped by Mark Rowe.
8298
8299         * Configurations/WebKit.xcconfig: Added warning about the
8300         consequences when FEATURE_DEFINES are not kept in sync.
8301
8302 2009-03-11  Anders Carlsson  <andersca@apple.com>
8303
8304         Reviewed by Sam Weinig.
8305
8306         WebKit side of <rdar://problem/6656147>.
8307         
8308         * Plugins/Hosted/NetscapePluginHostManager.mm:
8309         (WebKit::NetscapePluginHostManager::instantiatePlugin):
8310         Pass the requestID to _WKPHInstantiatePlugin.
8311         
8312         * Plugins/Hosted/NetscapePluginHostProxy.mm:
8313         Pass the requestID to setCurrentReply.
8314         
8315         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
8316         (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
8317         Store the reply in a map with the requestID as the key.
8318         
8319         (WebKit::NetscapePluginInstanceProxy::waitForReply):
8320         Wait for a reply that matches the given requestID.
8321         
8322         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
8323         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
8324         Initialize member variables.
8325         
8326         (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
8327         Delete all requests.
8328         
8329         (WebKit::NetscapePluginInstanceProxy::print):
8330         Pass the requestID to _WKPHPluginInstancePrint.
8331         
8332         (WebKit::NetscapePluginInstanceProxy::loadRequest):
8333         Rename m_currentRequestID to m_currentURLRequestID.
8334         
8335         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
8336         Process requests until we find a reply with the right requestID.
8337         
8338         (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
8339         Pass a requestID to the _WKPH function.
8340         
8341         (WebKit::NetscapePluginInstanceProxy::nextRequestID):
8342         Ditto.
8343         
8344         * Plugins/Hosted/ProxyInstance.mm:
8345         Pass a requestID to the _WKPH functions.
8346         
8347         * Plugins/Hosted/WebKitPluginClient.defs:
8348         * Plugins/Hosted/WebKitPluginHost.defs:
8349         Add requestID parameters.
8350
8351 2009-03-11  Anders Carlsson  <andersca@apple.com>
8352
8353         Reviewed by Darin Adler.
8354
8355         Fix <rdar://problem/6620064>.
8356         
8357         * Plugins/WebPluginContainerPrivate.h:
8358
8359 2009-03-10  Xan Lopez  <xlopez@igalia.com>
8360
8361         Build fix, no review.
8362
8363         * WebView/WebFrame.mm:
8364         (-[WebFrame _smartDeleteRangeForProposedRange:]):
8365
8366 2009-03-09  Anders Carlsson  <andersca@apple.com>
8367
8368         Reviewed by Kevin Decker.
8369
8370         WebKit side of <rdar://problem/6530007>
8371         
8372         * Plugins/Hosted/NetscapePluginHostProxy.mm:
8373         (WKPCEnumerate):
8374         Call NetscapePluginInstanceProxy::enumerate.
8375         
8376         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
8377         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
8378         (WebKit::NetscapePluginInstanceProxy::enumerate):
8379         Enumerate the JS object and serialize its values.
8380         
8381         * Plugins/Hosted/ProxyInstance.h:
8382         * Plugins/Hosted/ProxyInstance.mm:
8383         (WebKit::ProxyInstance::getPropertyNames):
8384         Ask the plug-in host to get the property names and deserialize them.
8385         
8386         * Plugins/Hosted/WebKitPluginClient.defs:
8387         * Plugins/Hosted/WebKitPluginHost.defs:
8388
8389 2009-03-09  Simon Fraser  <simon.fraser@apple.com>
8390
8391         Reviewed by Oliver Hunt and Cameron Zwarich
8392
8393         https://bugs.webkit.org/show_bug.cgi?id=24440
8394         
8395         The sublayer added to WebHTMLView to host accelerated compositing layers needs to
8396         be a subclass of NSView which allows context menu clicks through.
8397
8398         * WebView/WebHTMLView.mm:
8399         (-[WebLayerHostingView rightMouseDown:]):
8400         (-[WebHTMLView attachRootLayer:]):
8401
8402 2009-03-08  Mark Rowe  <mrowe@apple.com>
8403
8404         Reviewed by Oliver Hunt.
8405
8406         Split ScrollAlignment and ScrollBehavior out of RenderLayer.h so that
8407         Frame.h no longer needs to include it.  This cuts the size of the symbols
8408         for a debug build by around 3%.
8409
8410         * Plugins/WebNetscapePluginView.mm:
8411         * WebView/WebFrame.mm:
8412         (-[WebFrame _scrollDOMRangeToVisible:]):
8413         (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
8414         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
8415         * WebView/WebHTMLView.mm:
8416         (-[WebHTMLView jumpToSelection:]):
8417         (-[WebHTMLView centerSelectionInVisibleArea:]):
8418
8419 2009-03-07  Dan Bernstein  <mitz@apple.com>
8420
8421         Reviewed by Alexey Proskuryakov.
8422
8423         - fix a bug where debug builds were clearing the HTML5 application cache
8424           on application termination
8425
8426         * WebView/WebView.mm:
8427         (-[WebView _close]): Call -[WebCache setDisabled:YES] instead of
8428         -[WebCache empty].
8429
8430 2009-03-06  Douglas R. Davidson  <ddavidso@apple.com>
8431
8432         Reviewed by Justin Garcia.
8433
8434         https://bugs.webkit.org/show_bug.cgi?id=24108
8435
8436         Update spelling and grammar checking to use the new combined text 
8437         checking (with automatic language identification) on Snow Leopard. 
8438
8439         * WebCoreSupport/WebEditorClient.h:
8440         * WebCoreSupport/WebEditorClient.mm:
8441         (WebEditorClient::checkSpellingAndGrammarOfParagraph):
8442
8443 2009-03-05  Adele Peterson  <adele@apple.com>
8444
8445         Reviewed by Darin Adler.
8446
8447         Fix for https://bugs.webkit.org/show_bug.cgi?id=24079
8448         <rdar://problem/6611233> REGRESSION (r39549): Page loads cannot be interrupted with Command-. or Escape
8449         <rdar://problem/6636563> Ctrl-tab shortcut doesn't switch tabs when focus is in text field
8450        
8451         * WebView/WebHTMLView.mm: (-[WebHTMLView doCommandBySelector:]):
8452         If WebKit does not support the command, we need to pass the selector to super.  In this case,
8453         we'll consider the event not to be handled.  This is not perfect because in theory, [super doCommandBySelector:] 
8454         can do some action that would cause WebKit to need to consider the event handled.  But in practice, I've found no
8455         example of that happening and causing broken behavior.
8456
8457 2009-03-04  Mark Rowe  <mrowe@apple.com>
8458
8459         Reviewed by Dan Bernstein.
8460
8461         <rdar://problem/6206172> Adoption of new Cocoa API for dictionary contextual menu
8462
8463         * WebView/WebHTMLView.mm:
8464         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
8465
8466 2009-03-04  Adam Barth  <abath@webkit.org>
8467
8468         Reviewed by Alexey Proskuryakov.
8469
8470         https://bugs.webkit.org/show_bug.cgi?id=24356
8471
8472         Fix WebKit style for allowUniversalAccessFromFileURLs.
8473
8474         * WebView/WebPreferenceKeysPrivate.h:
8475         * WebView/WebPreferences.mm:
8476         (+[WebPreferences initialize]):
8477         (-[WebPreferences allowUniversalAccessFromFileURLs]):
8478         (-[WebPreferences setAllowUniversalAccessFromFileURLs:]):
8479         * WebView/WebPreferencesPrivate.h:
8480         * WebView/WebView.mm:
8481         (-[WebView _preferencesChangedNotification:]):
8482
8483 2009-03-03  David Kilzer  <ddkilzer@apple.com>
8484
8485         <rdar://problem/6581203> WebCore and WebKit should install the same set of headers during installhdrs phase as build phase
8486
8487         Reviewed by Mark Rowe.
8488
8489         The fix is to add INSTALLHDRS_COPY_PHASE = YES and
8490         INSTALLHDRS_SCRIPT_PHASE = YES to WebKit.xcconfig, then to
8491         make sure various build phase scripts work with the installhdrs
8492         build phase.
8493
8494         * Configurations/Base.xcconfig: Defined REAL_PLATFORM_NAME
8495         based on PLATFORM_NAME to work around the missing definition on
8496         Tiger.
8497         * Configurations/WebKit.xcconfig: Added
8498         WEBCORE_PRIVATE_HEADERS_DIR variable to remove definition of
8499         UMBRELLA_FRAMEWORKS_DIR for Debug and Release builds in the
8500         Xcode project file.  Added INSTALLHDRS_COPY_PHASE = YES and
8501         INSTALLHDRS_SCRIPT_PHASE = YES.
8502
8503 2009-03-03  David Kilzer  <ddkilzer@apple.com>
8504
8505         Remove last vestiges of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR from WebKit
8506
8507         Reviewed by Adam Roben.
8508
8509         Use of JAVASCRIPTCORE_PRIVATE_HEADERS_DIR was removed in r37465
8510         since NPAPI headers had migrated from JavaScriptCore to WebCore
8511         before that.
8512
8513         * Configurations/WebKit.xcconfig: Removed definition of
8514         JAVASCRIPTCORE_PRIVATE_HEADERS_DIR used in Production builds.
8515
8516 2009-03-03  Anders Carlsson  <andersca@apple.com>
8517
8518         Reviewed by Darin Adler.
8519
8520         Fix <rdar://problem/6633834>.
8521         
8522         * Plugins/Hosted/NetscapePluginHostManager.mm:
8523         (WebKit::NetscapePluginHostManager::instantiatePlugin):
8524         Create a new plug-in instance if the plug-in host has crashed.
8525         
8526         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
8527         (WebKit::NetscapePluginInstanceProxy::invalidate):
8528         Add a null check for the plug-in host proxy.
8529
8530 2009-03-02  Sam Weinig  <sam@webkit.org>
8531
8532         Reviewed by Mark Rowe.
8533
8534         Enable Geolocation (except on Tiger and Leopard).
8535
8536         * Configurations/WebKit.xcconfig:
8537
8538 2009-03-02  Anders Carlsson  <andersca@apple.com>
8539
8540         Reviewed by Dan Bernstein.
8541
8542         WebKit part of <rdar://problem/6638658>.
8543         
8544         * Plugins/Hosted/NetscapePluginHostManager.h:
8545         * Plugins/Hosted/NetscapePluginHostManager.mm:
8546         (WebKit::NetscapePluginHostManager::createPropertyListFile):
8547         Spawn the plug-in host and wait for it to create the property list.
8548         
8549         * Plugins/WebBasePluginPackage.mm:
8550         (-[WebBasePluginPackage createPropertyListFile]):
8551         Factor code out into a new method.
8552         
8553         (-[WebBasePluginPackage pListForPath:createFile:]):
8554         Call the newly added createPropertyListFile method.
8555         
8556         * Plugins/WebNetscapePluginPackage.mm:
8557         (-[WebNetscapePluginPackage createPropertyListFile]):
8558         Tell the plug-in host manager to create a property list file for us.
8559
8560 2009-03-02  Sam Weinig  <sam@webkit.org>
8561
8562         Reviewed by Geoffrey Garen.
8563
8564         Fix for <rdar://problem/6507404> Add Geolocation support.
8565
8566         This is not yet turned on for any Mac platform.
8567
8568         Add SPI to ask the embedding application whether to allow
8569         Geolocation for an origin.
8570
8571         * WebCoreSupport/WebChromeClient.h:
8572         * WebCoreSupport/WebChromeClient.mm:
8573         (WebChromeClient::shouldAllowGeolocationForFrame):
8574         * WebView/WebUIDelegatePrivate.h:
8575
8576 2009-03-02  Anders Carlsson  <andersca@apple.com>
8577
8578         Fix PowerPC build.
8579
8580         * Plugins/WebNetscapePluginPackage.mm:
8581         (-[WebNetscapePluginPackage _tryLoad]):
8582
8583 2009-03-02  Anders Carlsson  <andersca@apple.com>
8584
8585         Reviewed by John Sullivan, Ada Chan.
8586
8587         Factor loading code out into its own method and get rid of a bunch of gotos.
8588         
8589         * Plugins/WebNetscapePluginPackage.mm:
8590         (-[WebNetscapePluginPackage _tryLoad]):
8591         (-[WebNetscapePluginPackage load]):
8592
8593 2009-03-02  Anders Carlsson  <andersca@apple.com>
8594
8595         Build fix.
8596
8597         * Plugins/WebNetscapeDeprecatedFunctions.h:
8598
8599 2009-03-02  Anders Carlsson  <andersca@apple.com>
8600
8601         Reviewed by John Sullivan.
8602
8603         Rename WebNetscapePluginPackage.m to WebNetscapePluginPackage.mm
8604
8605         * Plugins/WebNetscapePluginPackage.m: Removed.
8606         * Plugins/WebNetscapePluginPackage.mm: Copied from mac/Plugins/WebNetscapePluginPackage.m.
8607
8608 2009-03-01  Anders Carlsson  <andersca@apple.com>
8609
8610         Reviewed by Sam Weinig.
8611
8612         WebKit side of <rdar://problem/6449689>
8613
8614         Pass the visible name to the plug-in host.
8615         
8616         * Plugins/Hosted/NetscapePluginHostManager.mm:
8617         (WebKit::NetscapePluginHostManager::spawnPluginHost):
8618
8619 2009-02-27  Alice Liu  <alice.liu@apple.com>
8620
8621         Fix <rdar://problem/6531265> REGRESSION (r39185): adding ".jpeg"
8622         extension to images that already have .jpg extension
8623
8624         Reviewed by Oliver Hunt.
8625
8626         * WebView/WebHTMLView.mm:
8627         (-[NSString matchesExtensionEquivalent:]):
8628         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
8629         Relax the check for the proper extension to allow for known
8630         equivalents, special-cased in matchesExtensionEquivalent function.
8631
8632 2009-02-27  Anders Carlsson  <andersca@apple.com>
8633
8634         Reviewed by Geoffrey Garen.
8635
8636         <rdar://problem/6631436>
8637         CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::addValueToArray + 55
8638         
8639         Port the NPN_Evaluate code over from WebCore instead of using the frame loader.
8640         
8641         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
8642         (WebKit::NetscapePluginInstanceProxy::evaluate):
8643
8644 2009-02-27  Anders Carlsson  <andersca@apple.com>
8645
8646         Reviewed by Geoffrey Garen.
8647
8648         WebKit side of <rdar://problem/6626814>.
8649         
8650         * Plugins/Hosted/NetscapePluginHostProxy.mm:
8651         (WKPCInvokeDefault):
8652         Make InvokeDefault async.
8653         
8654         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
8655         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
8656         Handle passing NPObjects back to the plug-in host.
8657         
8658         * Plugins/Hosted/ProxyInstance.h:
8659         (WebKit::ProxyInstance::objectID):
8660         Add objectID getter.
8661         
8662         * Plugins/Hosted/WebKitPluginClient.defs:
8663         Make InvokeDefault a simpleroutine.
8664
8665 2009-02-27  Timothy Hatcher  <timothy@apple.com>
8666
8667         Fixes an exception by null checking the WebResource before adding it to
8668         the subresources array.
8669
8670         <rdar://problem/5950769> Bug in [WebDataSource subresources] can throw an exception
8671
8672         Reviewed by Geoff Garen and Anders Carlsson.
8673
8674         * WebView/WebDataSource.mm:
8675         (-[WebDataSource subresources]): Null check the WebResource before adding it.
8676
8677 2009-02-27  Timothy Hatcher  <timothy@apple.com>
8678
8679         Adds a workaround for Automator creating a WebView from a secondary thread.
8680
8681         <rdar://problem/6631951> REGRESSION (Safari 4 Beta): Automator crash on
8682         secondary thread beneath -[WebView initWithFrame:frameName:groupName:]
8683
8684         Reviewed by Geoff Garen.
8685
8686         * WebView/WebView.mm:
8687         (needsWebViewInitThreadWorkaround): Check for com.apple.Automator.
8688
8689 2009-02-27  Adam Barth  <abarth@webkit.org>
8690
8691         Reviewed by Eric Seidel.
8692
8693         Add a preference to reduce the power of file:// URLs.
8694
8695         * WebView/WebPreferenceKeysPrivate.h:
8696         * WebView/WebPreferences.mm:
8697         (+[WebPreferences initialize]):
8698         (-[WebPreferences allowUniversalAccessFromFileUrls]):
8699         (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
8700         * WebView/WebPreferencesPrivate.h:
8701         * WebView/WebView.mm:
8702         (-[WebView _preferencesChangedNotification:]):
8703
8704 2009-02-27  Simon Fraser  <simon.fraser@apple.com>
8705
8706         Reviewed by Anders Carlsson
8707
8708         https://bugs.webkit.org/show_bug.cgi?id=24242
8709         
8710         setCursor(), and resetCursorRects() on Tiger, were using global, not local
8711         coordinates for elementAtPoint:
8712         
8713         * WebView/WebHTMLView.mm:
8714         (resetCursorRects):
8715         (setCursor):
8716
8717 2009-02-27  Adam Barth  <abarth@webkit.org>
8718
8719         Reviewed by Eric Seidel.
8720
8721         Add a preference to reduce the power of file:// URLs.
8722
8723         * WebView/WebPreferenceKeysPrivate.h:
8724         * WebView/WebPreferences.mm:
8725         (+[WebPreferences initialize]):
8726         (-[WebPreferences allowUniversalAccessFromFileUrls]):
8727         (-[WebPreferences setAllowUniversalAccessFromFileUrls:]):
8728         * WebView/WebPreferencesPrivate.h:
8729         * WebView/WebView.mm:
8730         (-[WebView _preferencesChangedNotification:]):
8731
8732 2009-02-26  Adele Peterson  <adele@apple.com>
8733
8734         Reviewed by Geoff Garen.
8735
8736         Fix for <rdar://problem/6618166>
8737         https://bugs.webkit.org/show_bug.cgi?id=24216
8738         (REGRESSION r36919) Safari 4 Beta causes MSN Messenger's text entry field to lose focus after entering a message
8739
8740         During a series of firstResponder changes, at some point while the WebHTMLView was losing first responder status,
8741         we incorrectly marked the page as active, and then when the WebHTMLView became first responder again, setActive did nothing.
8742         This change restores behavior from before r36919 to check if the WebHTMLView is in the middle of losing first responder when calling setActive.
8743
8744         In addition to updating editing/selection/designmode-no-caret.html results, I also made sure the test cases that were 
8745         fixed in r36919 and r38570 are still fixed.
8746
8747         * WebView/WebHTMLView.mm:
8748         (-[WebHTMLView resignFirstResponder]): Keep track if we're in the process of resigning first responder.
8749         (-[WebHTMLView _isResigningFirstResponder]): Added.
8750         * WebView/WebHTMLViewInternal.h:
8751         * WebView/WebView.mm: (-[WebView _updateFocusedAndActiveStateForFrame:]): Don't set the page to be active
8752         if the document view is currently resigning first responder.
8753
8754 2009-02-25  Anders Carlsson  <andersca@apple.com>
8755
8756         Reviewed by Kevin Decker.
8757
8758         Fix <rdar://problem/6623697>.
8759         
8760         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
8761         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
8762         (WebKit::NetscapePluginInstanceProxy::print):
8763         Ask the plug-in host to print, create a CGImage of the returned bytes and draw
8764         the image into the passed in context.
8765         
8766         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
8767         (-[WebHostedNetscapePluginView drawRect:]):
8768         When printing, call NetscapePluginInstanceProxy::print.
8769         
8770         * Plugins/Hosted/WebKitPluginHost.defs:
8771
8772 2009-02-19  Alexey Proskuryakov  <ap@webkit.org>
8773
8774         Reviewed by Darin Adler.
8775
8776         https://bugs.webkit.org/show_bug.cgi?id=24024
8777         REGRESSION (r39845): Assertion failure in -[WebHistoryItem dictionaryRepresentation] when
8778         archiving a submission to about:blank
8779
8780         I don't know how to make an automated test for this bug.
8781
8782         * History/WebHistory.mm: (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
8783         Account for the fact that HTTP method may be non-empty for non-HTTP requests.
8784
8785 2009-02-25  Chris Fleizach  <cfleizach@apple.com>
8786
8787         Reviewed by Beth Dakin.
8788
8789         Naming change from
8790         Bug 24143: Crash occurs at WebCore::AccessibilityTable::isTableExposableThroughAccessibility() when applying a link in GMail
8791         https://bugs.webkit.org/show_bug.cgi?id=24143
8792
8793         * WebView/WebFrame.mm:
8794         (-[WebFrame _accessibilityTree]):
8795
8796 2009-02-25  Simon Fraser  <simon.fraser@apple.com>
8797
8798         Build fix with ACCELERATED_COMPOSITING turned on.
8799         
8800         I missed a spot in my last commit in renaming to
8801         _stoppedAcceleratedCompositingForFrame:
8802         
8803         * WebView/WebHTMLView.mm:
8804         (-[WebHTMLView close]):
8805
8806 2009-02-25  Simon Fraser  <simon.fraser@apple.com>
8807
8808         Reviewed by Dan Bernstein
8809
8810         https://bugs.webkit.org/show_bug.cgi?id=23854
8811
8812         Make an observable property, _isUsingAcceleratedCompositing, on
8813         WebView that DumpRenderTree can use to specialize behavior.
8814         
8815         This is implemented via a count of Frames that are using
8816         accelerated compositing.
8817
8818         * WebView/WebHTMLView.mm:
8819         (-[WebHTMLViewPrivate clear]):
8820         (-[WebHTMLView close]):
8821         (-[WebHTMLView attachRootLayer:]):
8822         (-[WebHTMLView detachRootLayer]):
8823         * WebView/WebView.mm:
8824         (+[WebView automaticallyNotifiesObserversForKey:]):
8825         (-[WebView _startedAcceleratedCompositingForFrame:]):
8826         (-[WebView _stoppedAcceleratedCompositingForFrame:]):
8827         (-[WebView _isUsingAcceleratedCompositing]):
8828         * WebView/WebViewInternal.h:
8829         * WebView/WebViewPrivate.h:
8830
8831 2009-02-24  Sam Weinig  <sam@webkit.org>
8832
8833         Reviewed by Geoffrey Garen.
8834
8835         Related to <rdar://problem/6590295>
8836         Allow disabling javascript: urls.
8837
8838         * WebView/WebView.mm:
8839         (-[WebView _setJavaScriptURLsAreAllowed:]):
8840         * WebView/WebViewPrivate.h:
8841
8842 2009-02-24  Mark Rowe  <mrowe@apple.com>
8843
8844         Reviewed by Oliver Hunt.
8845
8846         <rdar://problem/6259220> Rename AVAILABLE_AFTER_WEBKIT_VERSION_3_1 (etc.) to match the other macros
8847
8848         * Carbon/CarbonUtils.h:
8849         * Carbon/HIWebView.h:
8850         * Plugins/WebPlugin.h:
8851         * Plugins/WebPluginViewFactory.h:
8852         * WebView/WebUIDelegate.h:
8853
8854 2009-02-24  Peter Ammon  <pammon@apple.com>
8855
8856         Reviewed by Mark Rowe.
8857
8858         Fix <rdar://problem/6251410> Services can modify non-editable content in Safari
8859
8860         * WebView/WebHTMLView.mm:
8861         (-[WebHTMLView validRequestorForSendType:returnType:]): Return self only if we can handle
8862         both the send and return type.  We should also handle a nil send or return type by ignoring
8863         the argument and returning whether we can handle the other type passed in.
8864
8865 2009-02-23  Anders Carlsson  <andersca@apple.com>
8866
8867         Reviewed by Geoffrey Garen and Darin Adler.
8868
8869         WebKit side of <rdar://problem/6613151>.
8870         
8871         Make sure to vm_deallocate all memory we get from MIG callbacks.
8872         
8873         * Plugins/Hosted/NetscapePluginHostProxy.mm:
8874         (DataDeallocator::DataDeallocator):
8875         (DataDeallocator::~DataDeallocator):
8876         Add a simple deallocator class.
8877         
8878         (WKPCStatusText):
8879         (WKPCLoadURL):
8880         (WKPCBooleanAndDataReply):
8881         (WKPCEvaluate):
8882         (WKPCGetStringIdentifier):
8883         (WKPCInvoke):
8884         (WKPCInvokeDefault):
8885         (WKPCConstruct):
8886         (WKPCSetProperty):
8887         Use the new deallocator class.
8888
8889 2009-02-23  Anders Carlsson  <andersca@apple.com>
8890
8891         Reviewed by Darin Adler.
8892
8893         Fix <rdar://problem/6450656>.
8894         
8895         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
8896         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
8897         (WebKit::NetscapePluginInstanceProxy::insertText):
8898         Add insert text which just calls the new WKPH function.
8899         
8900         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
8901         (-[WebHostedNetscapePluginView inputContext]):
8902         Get the input context from the shared input panel.
8903         
8904         (-[WebHostedNetscapePluginView keyDown:]):
8905         Let the shared input panel have a go at the event first.
8906         
8907         * Plugins/Hosted/WebKitPluginHost.defs:
8908         Add new InsertText function.
8909
8910 2009-02-23  Mark Rowe  <mrowe@apple.com>
8911
8912         Fix the build after r41126.
8913
8914         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
8915         (WebKit::NetscapePluginInstanceProxy::invoke):
8916         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
8917         (WebKit::NetscapePluginInstanceProxy::construct):
8918
8919 2009-02-22  Dan Bernstein  <mitz@apple.com>
8920
8921         Reviewed by Darin Adler.
8922
8923         - fix <rdar://problem/5966123> REGRESSION (r30741): Generic Sun Applet loading logo appears half off screen
8924
8925         * WebCoreSupport/WebFrameLoaderClient.mm: Correct a copy & paste error
8926         in r30741, and assign the height value, rather than the width, to the
8927         "height" parameter.
8928
8929 2009-02-21  Anders Carlsson  <andersca@apple.com>
8930
8931         Fix build.
8932         
8933         * Plugins/Hosted/WebTextInputWindowController.m:
8934
8935 2009-02-20  Anders Carlsson  <andersca@apple.com>
8936
8937         Reviewed by Dan Bernstein.
8938
8939         Add a shared floating text input window implementation, to be used by the hosted plug-in view.
8940         
8941         * Plugins/Hosted/WebTextInputWindowController.h: Added.
8942         * Plugins/Hosted/WebTextInputWindowController.m: Added.
8943
8944 2009-02-20  Kevin Decker  <kdecker@apple.com>
8945
8946         Reviewed by andersca.
8947     
8948         <rdar://problem/6496140> Safari sometimes hangs in WKSetMetadataURL for several seconds after downloading a file
8949          
8950          Spawn a background thread for WKSetMetadataURL because this function will not return until mds has journaled the data
8951          we are trying to set. Depending on what other I/O is going on, it can take some time. 
8952
8953         * Misc/WebNSFileManagerExtras.m: Import pthread.h and FoundationExtras.h
8954         (setMetaData): Added. Calls WKSetMetadataURL().
8955         (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Call setMetaData on a background thread 
8956  
8957 2009-02-19  Dan Bernstein  <mitz@apple.com>
8958
8959         Reviewed by Sam Weinig.
8960
8961         - WebKit part of fixing https://bugs.webkit.org/show_bug.cgi?id=24027
8962           Do not send loader callbacks during CSS styling
8963
8964         * WebView/WebView.mm:
8965         (-[WebView _preferencesChangedNotification:]): Reverted the
8966         iChat-specific quirk added in <http://trac.webkit.org/changeset/41071>.
8967
8968 2009-02-18  Dan Bernstein  <mitz@apple.com>
8969
8970         Reviewed by Brady Eidson.
8971
8972         - WebKit part of fixing <rdar://problem/6507512> Crash in iChat at CSSStyleSelector::adjustRenderStyle
8973
8974         * WebView/WebView.mm:
8975         (-[WebView _preferencesChangedNotification:]): Activate the WebCore
8976         workaround for this crash in iChat.
8977
8978 2009-02-18  Anders Carlsson  <andersca@apple.com>
8979
8980         Reviewed by Sam Weinig.
8981
8982         Fix for <rdar://problem/6542390>
8983         
8984         There's no need to call setDefersLoading here - we already defer anything a plug-in can do that
8985         would cause a load to begin.
8986         
8987         * Plugins/WebNetscapePluginView.mm:
8988         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
8989
8990 2009-02-18  Adam Roben  <aroben@apple.com>
8991
8992         Add SPI to get WebKit's custom pointing-hand cursor
8993
8994         Reviewed by John Sullivan.
8995
8996         * WebView/WebView.mm:
8997         (+[WebView _pointingHandCursor]): Added. Returns the custom
8998         pointing-hand cursor that WebKit uses.
8999         * WebView/WebViewPrivate.h: Added +_pointingHandCursor.
9000
9001 2009-02-17  Eric Carlson  <eric.carlson@apple.com>
9002
9003         Reviewed by Antti Koivisto.
9004
9005         https://bugs.webkit.org/show_bug.cgi?id=23917
9006         Allow a WebKit plug-in to act as a proxy for the <audio> and <video>
9007         element.
9008
9009         * Plugins/WebPluginContainerPrivate.h:
9010         * Plugins/WebPluginController.mm:
9011         (mediaProxyClient): New, cast to HTMLMediaElement if it is a video or audio element
9012         (-[WebPluginController _setMediaPlayerProxy:forElement:]): New, pass proxy to HTMLMediaElement
9013         (-[WebPluginController _postMediaPlayerNotification:forElement:]): New, deliver event to HTMLMediaElement
9014
9015         * WebCoreSupport/WebFrameLoaderClient.mm:
9016         (WebFrameLoaderClient::createPlugin): Don't allow a media player proxy plug-in to be chosen by
9017         file extension, only want a match for the new MIME type proxy plug-ins should have.
9018
9019 2009-02-13  Anders Carlsson  <andersca@apple.com>
9020
9021         Reviewed by Kevin Decker.
9022
9023         <rdar://problem/6584834> ESPN radio live stream link hangs Safari 
9024
9025         When a plug-in invokes JavaScript code that will destroy the plug-in, we need to
9026         defer destruction until we're done executing the script.
9027         
9028         * Plugins/Hosted/NetscapePluginHostProxy.mm:
9029         (WebKit::PluginDestroyDeferrer::PluginDestroyDeferrer):
9030         (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
9031         Add a simple RAII object for deferring destruction of the plug-in instance.
9032         
9033         (WKPCEvaluate):
9034         (WKPCInvoke):
9035         (WKPCInvokeDefault):
9036         (WKPCConstruct):
9037         (WKPCGetProperty):
9038         (WKPCSetProperty):
9039         (WKPCRemoveProperty):
9040         (WKPCHasProperty):
9041         (WKPCHasMethod):
9042         Use the PluginDestroyDeferrer.
9043         
9044         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
9045         (WebKit::NetscapePluginInstanceProxy::pluginID):
9046         Assert that the plug-in ID is not 0 here.
9047         
9048         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
9049         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
9050         Initialize the call depth.
9051         
9052         (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
9053         Set the plug-in ID to 0 to aid debugging.
9054         
9055         (WebKit::NetscapePluginInstanceProxy::willCallPluginFunction):
9056         Increment the call depth.
9057         
9058         (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
9059         Decrement the call depth, if it's 0 and we should stop the plug-in, do so.
9060         
9061         (WebKit::NetscapePluginInstanceProxy::shouldStop):
9062         If we're called this with a non-zero call depth, set shouldStopSoon to true.
9063         
9064         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
9065         (-[WebHostedNetscapePluginView shouldStop]):
9066         Call the proxy.
9067
9068 2009-02-12  Brady Eidson  <beidson@apple.com>
9069
9070         Reviewed by Kevin Decker
9071
9072         <rdar://problem/6582180> - Wrong HTTP method applied to history item.
9073
9074         * WebCoreSupport/WebFrameLoaderClient.mm:
9075         (WebFrameLoaderClient::updateGlobalHistory): Check the original request, not any
9076           redirected request.
9077
9078 2009-02-12  Anders Carlsson  <andersca@apple.com>
9079
9080         Reviewed by Kevin Decker.
9081
9082         <rdar://problem/6579412> 
9083         REGRESSION (3.2.1-ToT): Crash in Silverlight viewing streaming lecture
9084         
9085         * Plugins/WebNetscapePluginView.h:
9086         * Plugins/WebNetscapePluginView.mm:
9087         (-[WebNetscapePluginView userAgent]):
9088         Apply workaround for Silverlight workaround.
9089         
9090         (-[WebNetscapePluginView _createPlugin]):
9091         Check if the plug-in that we're creating is the silverlight plug-in.
9092
9093 2009-02-12  Brady Eidson  <beidson@apple.com>
9094
9095         Reviewed by Darin Adler
9096
9097         Fix potential ref-count or null-deref problems with C++ objects as Obj-C members.
9098
9099         * History/WebBackForwardList.mm:
9100         (-[WebBackForwardList dealloc]): Null check before deref()'ing.
9101         (-[WebBackForwardList finalize]): Ditto.
9102
9103         * Misc/WebIconFetcher.mm:
9104         (-[WebIconFetcher dealloc]): Null check before deref()'ing.
9105         (-[WebIconFetcher finalize]): Ditto.
9106
9107         * WebCoreSupport/WebEditorClient.mm: Change to use RefPtr<> instead of ref()/deref().
9108         (-[WebEditCommand initWithEditCommand:]):
9109         (-[WebEditCommand dealloc]):
9110         (-[WebEditCommand finalize]):
9111         (-[WebEditCommand command]):
9112
9113         * WebView/WebArchive.mm: Change to use RefPtr<> instead of ref()/deref().
9114         (-[WebArchivePrivate init]):
9115         (-[WebArchivePrivate initWithCoreArchive:]):
9116         (-[WebArchivePrivate coreArchive]):
9117         (-[WebArchivePrivate setCoreArchive:]):
9118         (-[WebArchivePrivate dealloc]):
9119         (-[WebArchivePrivate finalize]):
9120
9121         * WebView/WebDataSource.mm: 
9122         (-[WebDataSourcePrivate dealloc]): Null check before deref()'ing.
9123         (-[WebDataSourcePrivate finalize]): Ditto.
9124
9125 2009-02-12  Brady Eidson  <beidson@apple.com>
9126
9127         Reviewed by Kevin Decker
9128
9129         <rdar://problem/6579750> - Crash in WebArchivePrivate in Tiger TextEdit
9130
9131         NSHTMLReader tries to create a WebArchive from a random chunk of data.  Previously, WebArchive creation would
9132         fail and return nil and NSHTMLReader would try something else.  When we changed the behavior to return an invalid
9133         WebArchive object, things started getting weird.
9134
9135         * WebView/WebArchive.mm:
9136         (-[WebArchivePrivate setCoreArchive:]): Null check the pointer before calling ->deref()
9137         (-[WebArchivePrivate dealloc]): Remove the ASSERT which is now invalid, and null check the pointer before ->deref().
9138         (-[WebArchivePrivate finalize]): Ditto
9139         (-[WebArchive initWithData:]): If the LegacyWebArchive cannot be created, return nil instead of an invalid object.
9140
9141 2009-02-11  Mark Rowe  <mrowe@apple.com>
9142
9143         Fix the build.
9144
9145         * History/WebHistory.mm:
9146         (-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense.
9147
9148 2009-02-11  Brady Eidson  <beidson@apple.com>
9149
9150         Reviewed by Mark Rowe
9151
9152         <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative
9153
9154         Remove the item from the date caches before registering the visit.  Otherwise it might not be successfully removed 
9155         and when we add it back later it will exist in the list twice.  This will cause the entry to be written out twice,
9156         which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.
9157
9158         * History/WebHistory.mm:
9159         (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls.
9160         (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded
9161           if an entry for the URL already exists.  Use that mode when reading the History.plist so only the most
9162           recent entry for a given URL will be used.
9163         (-[WebHistoryPrivate addItems:]):
9164         (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): 
9165
9166 2009-02-11  Dimitri Dupuis-latour  <dupuislatour@apple.com>
9167
9168         Added a preference to disable some Inspector's panels (rdar://6419624, rdar://6419645).
9169         This is controlled via the 'WebKitInspectorHiddenPanels' key; if nothing is specified, all panels are shown.
9170
9171         Reviewed by Timothy Hatcher.
9172
9173         * WebCoreSupport/WebInspectorClient.h:
9174         * WebCoreSupport/WebInspectorClient.mm:
9175         (WebInspectorClient::hiddenPanels):
9176
9177 2009-02-11  Alexey Proskuryakov  <ap@webkit.org>
9178
9179         Reviewed by Darin Adler.
9180
9181         <rdar://problem/6562920> Pasted text should be normalized to NFC
9182
9183         * Misc/WebNSURLExtras.mm: (-[NSURL _web_userVisibleString]): Route the URL string through
9184         -[NSString precomposedStringWithCanonicalMapping].
9185
9186         * WebCoreSupport/WebPasteboardHelper.mm:
9187         (WebPasteboardHelper::plainTextFromPasteboard): Ditto. 
9188
9189         * WebView/WebHTMLView.mm:
9190         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
9191         Ditto. The affected cases are all plain text ones - RTF, RTFD and HTML are assumed to be
9192         precomposed already, and the conversion is performed outside WebKit for those anyway.
9193
9194 2009-02-10  John Sullivan  <sullivan@apple.com>
9195
9196         Reviewed by Dan Bernstein
9197         
9198         <https://bugs.webkit.org/show_bug.cgi?id=23889>, <rdar://problem/6572300>
9199         Negative visit counts stored in History.plist aren't corrected.
9200         
9201         It's not clear how a huge negative visit count ended up in History.plist, but we can't
9202         trust data read from disk so we can at least reset this to something sane. WebCore has
9203         no guard against a visit count overflowing an int, but that seems very unlikely to have
9204         caused this.
9205
9206         * History/WebHistoryItem.mm:
9207         (-[WebHistoryItem initFromDictionaryRepresentation:]):
9208         If a negative visit count is in the dictionary, replace it with 1. If a negative daily or
9209         weekly visit count is in the dictionary, replace it with 0. 
9210
9211 2009-02-10  John Sullivan  <sullivan@apple.com>
9212
9213         Reviewed by Dan Bernstein
9214         
9215         <https://bugs.webkit.org/show_bug.cgi?id=23891>
9216         [WebHistoryItem _setVisitCount:] is unused and should be removed
9217
9218         * History/WebHistoryItem.mm:
9219         (-[WebHistoryItem _setVisitCount:]):
9220         removed this unused method, which is a synonym for setVisitCount: that was introduced
9221         recently and abandoned even more recently
9222
9223         * History/WebHistoryItemInternal.h:
9224         removed declaration of _setVisitCount:
9225
9226 2009-02-10  Anders Carlsson  <andersca@apple.com>
9227
9228         Reviewed by Mark Rowe.
9229
9230         <rdar://problem/6573916> 
9231         CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit • WebKit::NetscapePluginInstanceProxy::pluginHostDied + 25.
9232         
9233         * Plugins/Hosted/NetscapePluginHostManager.mm:
9234         (WebKit::NetscapePluginHostManager::instantiatePlugin):
9235         If we failed to instantiate the plug-in, invalidate the instance proxy.
9236         
9237         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
9238         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
9239         (WebKit::NetscapePluginInstanceProxy::invalidate):
9240         Remove the instance from the plug-in host's set.
9241         
9242         (WebKit::NetscapePluginInstanceProxy::destroy):
9243         Call invalidate().
9244
9245 2009-02-09  Mark Rowe  <mrowe@apple.com>
9246
9247         Reviewed by Dan Bernstein.
9248
9249         Fix <https://bugs.webkit.org/show_bug.cgi?id=23863> / <rdar://problem/6571390>.
9250         Bug 23863: Reproducible crash in Mail with TOT WebKit when creating a new message
9251
9252         * WebView/WebHTMLView.mm:
9253         (-[WebHTMLView _removeMouseMovedObserverUnconditionally]): Nil-check _private as it may have not
9254         yet been initialized if this WebHTMLView was loaded from a nib.
9255         (-[WebHTMLView _removeSuperviewObservers]): Ditto.
9256
9257 2009-02-09  Eric Seidel  <eric@webkit.org>
9258
9259         Reviewed by Dave Hyatt.
9260
9261         Rename Selection to VisibleSelection to allow us to separate
9262         the selections the user works with from the ones used by
9263         the JS editing APIs.
9264         https://bugs.webkit.org/show_bug.cgi?id=23852
9265
9266         * WebView/WebFrame.mm:
9267         (-[WebFrame _selectNSRange:]):
9268         * WebView/WebView.mm:
9269         (-[WebView textIteratorForRect:]):
9270
9271 2009-02-06  Anders Carlsson  <andersca@apple.com>
9272
9273         Reviewed by Kevin Decker.
9274         
9275         Fix crash when plug-in host dies.
9276         
9277         * Plugins/Hosted/HostedNetscapePluginStream.mm:
9278         (WebKit::HostedNetscapePluginStream::didFail):
9279
9280 2009-02-05  Eric Seidel  <eric@webkit.org>
9281
9282         Reviewed by Justin Garcia.
9283
9284         DOMSelection.getRangeAt() returns a different range than the selection
9285         https://bugs.webkit.org/show_bug.cgi?id=23601
9286
9287         Rename toRange to toNormalizedRange and add new firstRange which returns an unmodified range
9288
9289         * WebView/WebFrame.mm:
9290         (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
9291         (-[WebFrame _markDOMRange]):
9292         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
9293         (-[WebFrame _selectedNSRange]):
9294         * WebView/WebHTMLView.mm:
9295         (-[WebHTMLView _selectedRange]):
9296         (-[WebTextCompleteController doCompletion]):
9297         (-[WebHTMLView selectedAttributedString]):
9298         * WebView/WebView.mm:
9299         (-[WebView textIteratorForRect:]):
9300         (-[WebView selectedDOMRange]):
9301
9302 2009-02-06  Geoffrey Garen  <ggaren@apple.com>
9303
9304         Reviewed by Sam Weinig.
9305
9306         Part III of <rdar://problem/6552272>.
9307         
9308         Refactored to use the redirect data WebCore makes available, instead of
9309         tracking loading state in WebKit.
9310         
9311         * History/WebHistory.mm:
9312         (-[WebHistoryPrivate dealloc]):
9313         (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
9314         (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]):
9315         * History/WebHistoryInternal.h:
9316         * WebCoreSupport/WebFrameLoaderClient.h:
9317         * WebCoreSupport/WebFrameLoaderClient.mm:
9318         (WebFrameLoaderClient::updateGlobalHistory):
9319         (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
9320
9321 2009-02-06  Anders Carlsson  <andersca@apple.com>
9322
9323         Reviewed by Sam Weinig.
9324
9325         <rdar://problem/6562220> 
9326         CrashTracer: [USER] 21 crashes in Safari at com.apple.WebKit • WebKit::NetscapePluginHostProxy::port
9327         
9328         Make the handling of crashes in the plug-in host more robust.
9329         
9330         * Plugins/Hosted/NetscapePluginHostProxy.h:
9331         Add m_portSet.
9332         
9333         * Plugins/Hosted/NetscapePluginHostProxy.mm:
9334         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
9335         Initialize m_portSet.
9336         
9337         (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
9338         Free m_portSet.
9339         
9340         (WebKit::NetscapePluginHostProxy::processRequests):
9341         Listen for messages on the port set. If we get a message to the port death notification port,
9342         then call pluginHostDied. Otherwise, process the message.
9343         
9344         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
9345         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
9346         (WebKit::NetscapePluginInstanceProxy::cleanup):
9347         Factor code that should be shared between destroy() and pluginHostDied() into cleanup.
9348         
9349         (WebKit::NetscapePluginInstanceProxy::destroy):
9350         Call cleanup().
9351         
9352         (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
9353         Call cleanup().
9354         
9355         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
9356         Call NetscapePluginHostProxy::processRequests.
9357         
9358         * Plugins/Hosted/ProxyInstance.mm:
9359         (WebKit::ProxyInstance::invalidate):
9360         Add a null check for the host proxy.
9361
9362 2009-02-06  Dan Bernstein  <mitz@apple.com>
9363
9364         - try to fix the Tiger build
9365
9366         * Misc/WebNSArrayExtras.h:
9367
9368 2009-02-06  Anders Carlsson  <andersca@apple.com>
9369
9370         Reviewed by Dan Bernstein.
9371
9372         <rdar://problem/6563650> 
9373         Add Netscape plug-in API to tell the browser not to load streams (some plug-ins handle network loading manually)
9374                 
9375         * Plugins/WebNetscapePluginView.mm:
9376         (-[WebNetscapePluginView loadStream]):
9377         (-[WebNetscapePluginView pluginView:receivedData:]):
9378         (-[WebNetscapePluginView _shouldCancelSrcStream]):
9379
9380 2009-02-05  Maciej Stachowiak  <mjs@apple.com> and Brady Eidson  <beidson@apple.com>
9381
9382         Reviewed by Dan Bernstein and Geoff Garen.
9383
9384         - WebKit code to track per-day and per-week visit counts in history
9385
9386         For now this data is only exposed via SPI for performance reasons.
9387         
9388         * History/WebHistoryItem.mm:
9389         (-[WebHistoryItem initFromDictionaryRepresentation:]): Add parsing support
9390         for new data.
9391         (-[WebHistoryItem _recordInitialVisit]): Tell WebCore to record an initial visit.
9392         (-[WebHistoryItem dictionaryRepresentation]): Add saving support for new data.
9393         (-[WebHistoryItem _getDailyVisitCounts:]): SPI accessor.
9394         (-[WebHistoryItem _getWeeklyVisitCounts:]): SPI accessor.
9395         * History/WebHistoryItemInternal.h: Declare new methods.
9396         * History/WebHistoryItemPrivate.h: Ditto.
9397
9398         * History/WebHistory.mm:
9399         (-[WebHistoryPrivate visitedURL:withTitle:]): For the initial visit, use
9400         the new _recordInitialVisit method instead of setting visit count to 1.
9401
9402         * Misc/WebNSArrayExtras.h:
9403         * Misc/WebNSArrayExtras.m:
9404         (-[NSArray _webkit_numberAtIndex:]): Helper to retrieve an NSNumber or nil from an NSArray
9405         (-[NSArray _webkit_stringAtIndex:]): Helper to retrieve an NSString of nil from an NSArray
9406         
9407 2009-02-05  Aaron Boodman  <aa@chromium.org>
9408
9409         Reviewed by Dave Hyatt.
9410
9411         https://bugs.webkit.org/show_bug.cgi?id=23708
9412         Adds documentElementAvailable() callback to FrameLoaderClient.
9413
9414         * WebCoreSupport/WebFrameLoaderClient.h:
9415         Stub out documentElementAvailable().
9416         * WebCoreSupport/WebFrameLoaderClient.mm:
9417         Ditto.
9418
9419 2009-02-05  Dan Bernstein  <mitz@apple.com>
9420
9421         - build fix
9422
9423         * WebView/WebScriptDebugger.mm:
9424         (WebScriptDebugger::initGlobalCallFrame):
9425
9426 2009-02-05  Beth Dakin  <bdakin@apple.com>
9427
9428         Reviewed by John Sullivan and Brady Eidson.
9429
9430         Fix for <rdar://problem/6557595> REGRESSION: In Mail, selecting a 
9431         mail note message doesn't display it in Mail's preview pane
9432
9433         This was failing because revision 36962 removed a version of 
9434         setVerticalScrollingMode that mail calls. This patch simply adds 
9435         that method back.
9436
9437         * WebView/WebDynamicScrollBarsView.m:
9438         (-[WebDynamicScrollBarsView setVerticalScrollingMode:]):
9439
9440 2009-02-04  Anders Carlsson  <andersca@apple.com>
9441
9442         Build fix fix.
9443
9444         * WebView/WebScriptDebugger.mm:
9445         (WebScriptDebugger::initGlobalCallFrame):
9446
9447 2009-02-04  Anders Carlsson  <andersca@apple.com>
9448
9449         Reviewed by Sam Weinig.
9450         
9451         Change PCHasProperty, PCHasMethod and PCGetProperty into simpleroutines.
9452         
9453         Rename PHEvaluateReply to PHBooleanAndDataReply and add PHBooleanReply.
9454         
9455         * Plugins/Hosted/NetscapePluginHostProxy.mm:
9456         (WKPCEvaluate):
9457         (WKPCInvoke):
9458         (WKPCGetProperty):
9459         (WKPCHasProperty):
9460         (WKPCHasMethod):
9461         * Plugins/Hosted/WebKitPluginClient.defs:
9462         * Plugins/Hosted/WebKitPluginHost.defs:
9463
9464 2009-02-04  Anders Carlsson  <andersca@apple.com>
9465
9466         Reviewed by Mark Rowe.
9467
9468         Fix 64-bit build.
9469         
9470         * WebView/WebScriptDebugger.mm:
9471         (WebScriptDebugger::initGlobalCallFrame):
9472
9473 2009-02-04  Geoffrey Garen  <ggaren@apple.com>
9474
9475         Reviewed by Mark Rowe.
9476         
9477         Part I of <rdar://problem/6552272>.
9478
9479         Clear the redirectURLs entry when first visiting a site, so sites that
9480         only redirect you the first time you visit them can later learn that
9481         they don't redirect.
9482
9483         * History/WebHistory.mm:
9484         (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
9485
9486 2009-02-04  Timothy Hatcher  <timothy@apple.com>
9487
9488         Change the WebSourceId typedef from int to intptr_t now that <rdar://problem/6263297> is fixed.
9489
9490         <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for sourceId, not int
9491
9492         Reviewed by Oliver Hunt.
9493
9494         * WebView/WebScriptDebugDelegate.h:
9495
9496 2009-02-04  Timothy Hatcher  <timothy@apple.com>
9497
9498         Switched over from using the WebSafeForwarder for the Script Debug
9499         delegate and added high performance CallScriptDebugDelegate functions.
9500
9501         <rdar://problem/6508457> Launching widget in Dashcode debugger is
9502         super-slow due forwardInvocation: calling debug delegate
9503
9504         Reviewed by Oliver Hunt.
9505
9506         * DefaultDelegates/WebDefaultScriptDebugDelegate.h: Removed.
9507         * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Removed.
9508         * WebView/WebScriptDebugger.mm:
9509         (WebScriptDebugger::initGlobalCallFrame): Use CallScriptDebugDelegate.
9510         (WebScriptDebugger::sourceParsed): Ditto.
9511         (WebScriptDebugger::callEvent): Ditto.
9512         (WebScriptDebugger::atStatement): Ditto.
9513         (WebScriptDebugger::returnEvent): Ditto.
9514         (WebScriptDebugger::exception): Ditto.
9515         * WebView/WebView.mm:
9516         (-[WebViewPrivate dealloc]): Removed scriptDebugDelegateForwarder.
9517         (-[WebView _cacheScriptDebugDelegateImplementations]): Added. Gets the
9518         method implementations for the script debug delegate. Also caches what
9519         didParseSource method to use.
9520         (WebViewGetScriptDebugDelegateImplementations): Added. Returns the
9521         WebScriptDebugDelegateImplementations structure.
9522         (-[WebView setScriptDebugDelegate:]): Call _cacheScriptDebugDelegateImplementations.
9523         (CallDelegate): Added more overloaded versions that take different arguments.
9524         (CallScriptDebugDelegate): Added overloaded versions that take different arguments.
9525         * WebView/WebViewInternal.h:
9526
9527 2009-02-03  Simon Fraser  <simon.fraser@apple.com>
9528
9529         Reviewed by Dave Hyatt
9530
9531         https://bugs.webkit.org/show_bug.cgi?id=23365
9532         
9533         Hook up accelerated compositing layers the native
9534         view system on Mac.
9535
9536         * WebCoreSupport/WebChromeClient.h:
9537         * WebCoreSupport/WebChromeClient.mm:
9538         (WebChromeClient::attachRootGraphicsLayer):
9539         (WebChromeClient::setNeedsOneShotDrawingSynchronization):
9540         New methods to hook up the root GraphicsLayer to the native
9541         view system, and to synchronize layer changes with view-based
9542         drawing when layers come and go.
9543
9544         * WebView/WebHTMLView.mm:
9545         (-[WebHTMLViewPrivate clear]):
9546         Clear the pointer to layerHostingView.
9547
9548         (-[WebHTMLView _setAsideSubviews]):
9549         (-[WebHTMLView willRemoveSubview:]):
9550         Keep the special layer-hosting view in the subviews even 
9551         when the rest of the subviews are ripped out for
9552         painting.
9553
9554         (-[WebHTMLView _isUsingAcceleratedCompositing]):
9555         New utility method for DumpRenderTree to know if we're
9556         hosting layers.
9557
9558         (-[WebHTMLView drawRect:]):
9559         Call -disableScreenUpdatesUntilFlush if we have to
9560         synchronize layer changes with painting.
9561
9562         (-[WebHTMLView attachRootLayer:]):
9563         (-[WebHTMLView detachRootLayer]):
9564         Attach and detach the root GraphicsLayer.
9565
9566         * WebView/WebViewInternal.h:
9567         * WebView/WebHTMLViewInternal.h:
9568         * WebView/WebHTMLViewPrivate.h:
9569         New method declarations.
9570         
9571         * WebView/WebView.mm:
9572         (-[WebView _needsOneShotDrawingSynchronization]):
9573         (-[WebView _setNeedsOneShotDrawingSynchronization:]):
9574         Set the flag to say if we need to synchronize layer
9575         changes and painting on the next -drawRect: call.
9576
9577         (-[WebView viewWillMoveToWindow:]):
9578         (-[WebView viewDidMoveToWindow]):
9579         Call new notifications that the view was added to or removed from
9580         the window, which are required by the layer hosting mechanism.
9581
9582 2009-02-02  Geoffrey Garen  <ggaren@apple.com>
9583
9584         Build fix.
9585
9586         * Plugins/WebPluginController.mm:
9587         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]):
9588
9589 2009-02-02  Geoffrey Garen  <ggaren@apple.com>
9590
9591         Reviewed by Sam Weinig.
9592
9593         Track redirects in global history.
9594
9595         * History/WebHistory.mm:
9596         (-[WebHistoryPrivate dealloc]):
9597         (-[WebHistoryPrivate lastVisitedEntry]):
9598         (-[WebHistoryPrivate setLastVisitedEntry:]): Remember the last global history
9599         entry in case we're asked to add redirect information to it later.
9600
9601         (-[WebHistory _visitedURL:withTitle:method:wasFailure:serverRedirectURL:isClientRedirect:]):
9602         (-[WebHistory _visitedURLForRedirectWithoutHistoryItem:]): Record redirect
9603         information in global history.
9604
9605         * History/WebHistoryInternal.h:
9606         * WebCoreSupport/WebFrameLoaderClient.h: See above and below.
9607
9608         * WebCoreSupport/WebFrameLoaderClient.mm:
9609         (WebFrameLoaderClient::updateGlobalHistory):
9610         (WebFrameLoaderClient::updateGlobalHistoryForRedirectWithoutHistoryItem): Record redirect
9611         information in global history.
9612
9613         * WebView/WebFrame.mm:
9614         (-[WebFrame loadRequest:]):
9615         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
9616         * WebView/WebFramePrivate.h: Updated for rename and extra parameter.
9617
9618 2009-02-02  Anders Carlsson  <andersca@apple.com>
9619
9620         Reviewed by Dan Bernstein.
9621
9622         Work around a limitation in MIG where two functions can't have the same name even if they're
9623         not in the same subsystem.
9624         
9625         * Plugins/Hosted/NetscapePluginHostProxy.mm:
9626         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
9627         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
9628         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
9629         * Plugins/Hosted/WebKitPluginClient.defs:
9630         * Plugins/Hosted/WebKitPluginHost.defs:
9631
9632 2009-02-02  Anders Carlsson  <andersca@apple.com>
9633
9634         Reviewed by Sam Weinig.
9635
9636         Implement WKPCGetPluginElementObject.
9637         
9638         * Plugins/Hosted/NetscapePluginHostProxy.mm:
9639         (WKPCGetPluginElementNPObject):
9640         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
9641         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
9642         (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
9643         * Plugins/Hosted/WebKitPluginClient.defs:
9644         * Plugins/WebBaseNetscapePluginView.h:
9645         * Plugins/WebBaseNetscapePluginView.mm:
9646         (-[WebBaseNetscapePluginView WebCore::]):
9647
9648 2009-02-02  Anders Carlsson  <andersca@apple.com>
9649
9650         Build fix.
9651         
9652         * WebView/WebHTMLView.mm:
9653
9654 2009-02-02  Anders Carlsson  <andersca@apple.com>
9655
9656         Reviewed by Dan Bernstein.
9657
9658         Make WebBaseNetscapePluginView hold a reference to a HTMLPlugInElement instead of a DOMElement.
9659         
9660         * Plugins/Hosted/WebHostedNetscapePluginView.h:
9661         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
9662         (-[WebHostedNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
9663         * Plugins/WebBaseNetscapePluginView.h:
9664         * Plugins/WebBaseNetscapePluginView.mm:
9665         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
9666         (-[WebBaseNetscapePluginView _windowClipRect]):        
9667         (-[WebBaseNetscapePluginView visibleRect]):
9668         (-[WebBaseNetscapePluginView dataSource]):
9669         * Plugins/WebKitPluginContainerView.h: Removed.
9670         * Plugins/WebKitPluginContainerView.mm: Removed.
9671         * Plugins/WebNetscapePluginView.h:
9672         * Plugins/WebNetscapePluginView.mm:
9673         (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
9674         (-[WebNetscapePluginView getVariable:value:]):
9675         * WebCoreSupport/WebFrameLoaderClient.mm:
9676         (WebFrameLoaderClient::createPlugin):
9677
9678 2009-02-02  Anders Carlsson  <andersca@apple.com>
9679
9680         Reviewed by Dan Bernstein.
9681
9682         Update for changes to WebCore.
9683         
9684         * WebCoreSupport/WebFrameLoaderClient.h:
9685         * WebCoreSupport/WebFrameLoaderClient.mm:
9686         (WebFrameLoaderClient::createPlugin):
9687
9688 2009-02-02  Anders Carlsson  <andersca@apple.com>
9689
9690         Reviewed by Oliver Hunt.
9691
9692         When a new Web View was not created, report back to the plug-in host.
9693         
9694         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
9695         (WebKit::NetscapePluginInstanceProxy::performRequest):
9696         * Plugins/Hosted/WebKitPluginHost.defs:
9697
9698 2009-02-02  Anders Carlsson  <andersca@apple.com>
9699
9700         Reviewed by Kevin Decker.
9701
9702         Draw the regular missing plug-in icon instead of a red rect when a plug-in has crashed.
9703         
9704         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
9705         (-[WebHostedNetscapePluginView drawRect:]):
9706
9707 2009-02-02  Holger Hans Peter Freyther  <zecke@selfish.org>
9708
9709         Reviewed by Darin Adler.
9710
9711         Move Frame::forceLayout, Frame::adjustPageHeight and Frame::forceLayoutWithPageWidthRange to FrameView
9712
9713         https://bugs.webkit.org/show_bug.cgi?id=23428
9714
9715         FrameView::forceLayout could be killed but the comment might
9716         contain a value over the the plain FrameView::layout...
9717
9718         Adjust the WebCore/WebKit consumers of these methods.
9719
9720         * WebView/WebFrame.mm:
9721         (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
9722         * WebView/WebHTMLView.mm:
9723         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
9724         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
9725
9726 2009-01-31  John Sullivan  <sullivan@apple.com>
9727
9728         https://bugs.webkit.org/show_bug.cgi?id=23665
9729
9730         Cleaned up code to add/remove NSNotification observers, to avoid performance hit
9731         of calling removeObserver with unspecified notifications, or calling removeObserver
9732         multiple times for the same notification.
9733
9734         Reviewed by Darin Adler
9735
9736         * WebView/WebHTMLView.mm:
9737         added observingMouseMovedNotifications, observingSuperviewNotifications, and 
9738         observingWindowNotifications as BOOL ivars of _private object
9739         (-[WebHTMLView _removeMouseMovedObserverUnconditionally]):
9740         moved to file-internal section of file, added leading underscore, now bails out
9741         if we aren't observing the relevant notifications, now records that we are no longer
9742         observing the relevant notifications
9743         (-[WebHTMLView _removeSuperviewObservers]):
9744         ditto, also stores [NSNoticationCenter defaultCenter] in local var to avoid objc dispatch
9745         (-[WebHTMLView _removeWindowObservers]):
9746         ditto
9747         (-[WebHTMLView close]):
9748         replace general removeObserver: call with three specific calls for all the notifications
9749         that this class actually observes
9750         (-[WebHTMLView addMouseMovedObserver]):
9751         bail out if already observing relevant notifications, now records that we are observing
9752         the relevant notifications
9753         (-[WebHTMLView removeMouseMovedObserver]):
9754         updated for name change
9755         (-[WebHTMLView addSuperviewObservers]):
9756         bail out if already observing relevant notifications, now records that we are observing
9757         the relevant notifications; also stores [NSNoticationCenter defaultCenter] in local var 
9758         to avoid objc dispatch
9759         (-[WebHTMLView addWindowObservers]):
9760         ditto
9761         (-[WebHTMLView viewWillMoveToSuperview:]):
9762         updated for name change
9763         (-[WebHTMLView viewWillMoveToWindow:]):
9764         updated for name changes
9765
9766 2009-01-31  Darin Adler  <darin@apple.com>
9767
9768         Reviewed by Mark Rowe.
9769
9770         Fix code that assumes all command selectors end in colons.
9771         rdar://problem/6545874
9772
9773         * WebView/WebHTMLView.mm:
9774         (commandNameForSelector): Don't assert, just return a null string, when
9775         the selector doesn't end in a colon.
9776
9777 2009-01-30  Adam Barth  <abarth@webkit.org>
9778
9779         Reviewed by Sam Weinig.
9780
9781         Add a pref to disable web security.
9782
9783         * WebView/WebPreferenceKeysPrivate.h:
9784         * WebView/WebPreferencesPrivate.h:
9785         * WebView/WebPreferences.mm:
9786         (+[WebPreferences initialize]):
9787         (-[WebPreferences isWebSecurityEnabled]):
9788         (-[WebPreferences setWebSecurityEnabled:]):
9789         * WebView/WebView.mm:
9790         (-[WebView _preferencesChangedNotification:]):
9791
9792 2009-01-30  Holger Hans Peter Freyther  <zecke@selfish.org>
9793
9794         Reviewed by Darin Adler.
9795
9796         Move Frame::sendResizeEvent and Frame::sendScrollEvent to EventHandler
9797
9798         Carry out the move and catch up in two call sites.
9799
9800         * WebView/WebHTMLView.mm:
9801         (-[WebHTMLView _frameOrBoundsChanged]):
9802
9803 2009-01-30  Holger Hans Peter Freyther  <zecke@selfish.org>
9804
9805         Reviewed by Darin Adler.
9806
9807         isFrameSet was moved from Frame to Document. Update the
9808         WebKit usage.
9809
9810         * WebView/WebFrame.mm:
9811         (-[WebFrame _isFrameSet]):
9812         * WebView/WebHTMLView.mm:
9813         (-[WebHTMLView knowsPageRange:]):
9814
9815 2009-01-30  Geoffrey Garen  <ggaren@apple.com>
9816
9817         Build fix.
9818
9819         * WebView/WebFramePrivate.h:
9820
9821 2009-01-30  Geoffrey Garen  <ggaren@apple.com>
9822
9823         Reviewed by Sam Weinig.
9824
9825         Split "lockHistory" into "lockHistory" and "lockBackForwardList" in
9826         preparation for setting them differently during a redirect.
9827
9828         * WebView/WebPDFView.mm:
9829         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
9830
9831 2009-01-30  Anders Carlsson  <andersca@apple.com>
9832
9833         Reviewed by Sam Weinig.
9834
9835         Fix <rdar://problem/6544048>
9836         
9837         Have NetscapePluginInstanceProxy keep track of all the ProxyInstance objects associated.
9838         
9839         When the plug-in instance is destroyed, invalidate all proxy instances.
9840         
9841         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
9842         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
9843         (WebKit::NetscapePluginInstanceProxy::destroy):
9844         (WebKit::NetscapePluginInstanceProxy::addInstance):
9845         (WebKit::NetscapePluginInstanceProxy::removeInstance):
9846         * Plugins/Hosted/ProxyInstance.h:
9847         * Plugins/Hosted/ProxyInstance.mm:
9848         (WebKit::ProxyInstance::ProxyInstance):
9849         (WebKit::ProxyInstance::~ProxyInstance):
9850         (WebKit::ProxyInstance::invalidate):
9851
9852 2009-01-30  Anders Carlsson  <andersca@apple.com>
9853
9854         Reviewed by Sam Weinig.
9855
9856         Fix <rdar://problem/6490778>.
9857         
9858         Change the NPRuntime related functions to use IdentifierRep directly, and make sure to always
9859         validate IdentifierReps before dereferencing them.
9860         
9861         * Plugins/Hosted/NetscapePluginHostProxy.mm:
9862         (WKPCEvaluate):
9863         (WKPCGetStringIdentifier):
9864         (WKPCGetIntIdentifier):
9865         (identifierFromIdentifierRep):
9866         (WKPCInvoke):
9867         (WKPCGetProperty):
9868         (WKPCSetProperty):
9869         (WKPCRemoveProperty):
9870         (WKPCHasProperty):
9871         (WKPCHasMethod):
9872         (WKPCIdentifierInfo):
9873
9874 2009-01-30  Brady Eidson  <beidson@apple.com>
9875
9876         Reviewed by Sam Weinig
9877
9878         Remove FrameLoaderClient code that is now handled by FrameLoader itself
9879
9880         * WebCoreSupport/WebFrameLoaderClient.mm:
9881         (WebFrameLoaderClient::frameLoadCompleted):
9882
9883 2009-01-29  Stephanie Lewis <slewis@apple.com>
9884
9885         RS by Oliver Hunt.
9886
9887         Update the order files.
9888
9889         * WebKit.order:
9890
9891 2009-01-29  Sam Weinig  <sam@webkit.org>
9892
9893         Reviewed by Anders Carlsson.
9894
9895         Second step in tracking the urls a HistoryItem was redirected through
9896         Add SPI to access the array of redirect urls associated with a HistoryItem.
9897
9898         * History/WebHistoryItem.mm:
9899         (-[WebHistoryItem dictionaryRepresentation]):
9900         (-[WebHistoryItem _redirectURLs]):
9901         * History/WebHistoryItemPrivate.h:
9902
9903 2009-01-29  Anders Carlsson  <andersca@apple.com>
9904
9905         Reviewed by Dan Bernstein.
9906
9907         Always activate the plug-in host process if we're in "modal mode" and are being told to activate.
9908         
9909         * Plugins/Hosted/NetscapePluginHostProxy.h:
9910         * Plugins/Hosted/NetscapePluginHostProxy.mm:
9911         (WebKit::NetscapePluginHostProxy::pluginHostDied):
9912         Call endModal here.
9913         
9914         (WebKit::NetscapePluginHostProxy::applicationDidBecomeActive):
9915         If we're modal, we should always bring the plug-in host process to the front.
9916         
9917         (WebKit::NetscapePluginHostProxy::beginModal):
9918         Add an observer for the NSApplicationWillBecomeActiveNotification callback.
9919         
9920         (WebKit::NetscapePluginHostProxy::endModal):
9921         Remove the observer.
9922
9923 2009-01-29  Sam Weinig  <sam@webkit.org>
9924
9925         Reviewed by Mark Rowe.
9926
9927         First step in tracking the urls a HistoryItem was redirected through.
9928
9929         * History/WebHistoryItem.mm:
9930         (-[WebHistoryItem initFromDictionaryRepresentation:]):
9931         (-[WebHistoryItem dictionaryRepresentation]):
9932         * Misc/WebNSDictionaryExtras.h:
9933         * Misc/WebNSDictionaryExtras.m:
9934         (-[NSDictionary _webkit_arrayForKey:]): Add helper.
9935
9936 2009-01-29  Anders Carlsson  <andersca@apple.com>
9937
9938         Reviewed by Sam Weinig.
9939
9940         Pass the PSN of the client to the host, and get the PSN of the host back when checking in.
9941         
9942         * Plugins/Hosted/NetscapePluginHostManager.h:
9943         * Plugins/Hosted/NetscapePluginHostManager.mm:
9944         (WebKit::NetscapePluginHostManager::hostForPackage):
9945         Get the current PSN and pass it to spawnPluginHost.
9946         
9947         (WebKit::NetscapePluginHostManager::spawnPluginHost):
9948         Pass the PSN to the "check in" function.
9949         
9950         * Plugins/Hosted/NetscapePluginHostProxy.h:
9951         * Plugins/Hosted/NetscapePluginHostProxy.mm:
9952         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
9953         
9954         (WebKit::NetscapePluginHostProxy::pluginHostDied):
9955         Fix a bug noticed by Julien Chaffraix. Call endModal if necessary.
9956         
9957         (WebKit::NetscapePluginHostProxy::beginModal):
9958         (WebKit::NetscapePluginHostProxy::endModal):
9959         (WebKit::NetscapePluginHostProxy::setModal):
9960         Split out the code that does all of the work into beginModal and endModal methods.
9961         
9962         * Plugins/Hosted/WebKitPluginHost.defs:
9963         * Plugins/WebNetscapePluginView.mm:
9964         (-[WebNetscapePluginView loadStream]):
9965
9966 2009-01-29  David Kilzer  <ddkilzer@apple.com>
9967
9968         Remove semi-colons from the end of ObjC method implementations
9969
9970         Rubber-stamped by Adam Roben.
9971
9972         $ find WebKit -name \*.m -o -name \*.mm -exec perl -e 'undef $/; $s = <>; while ($s =~ m/[\n\r][-+].*;[\s\r\n]+\{/g) { print "$ARGV: $&\n"; }' {} \;
9973
9974         * DefaultDelegates/WebDefaultUIDelegate.m:
9975         (-[WebDefaultUIDelegate webView:setResizable:]):
9976         (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
9977         (-[WebDefaultUIDelegate webView:dragSourceActionMaskForPoint:]):
9978         (-[WebDefaultUIDelegate webView:willPerformDragSourceAction:fromPoint:withPasteboard:]):
9979         * History/WebBackForwardList.mm:
9980         (-[WebBackForwardList addItem:]):
9981         (-[WebBackForwardList backListWithLimit:]):
9982         (-[WebBackForwardList forwardListWithLimit:]):
9983         * History/WebHistoryItem.mm:
9984         (-[WebHistoryItem alternateTitle]):
9985         (-[WebHistoryItem setViewState:]):
9986         * Misc/WebCoreStatistics.mm:
9987         (+[WebCoreStatistics garbageCollectJavaScriptObjectsOnAlternateThreadForDebugging:]):
9988         * Misc/WebKitNSStringExtras.m:
9989         (-[NSString _web_drawAtPoint:font:textColor:]):
9990         * Plugins/WebNetscapePluginView.mm:
9991         (-[WebNetscapePluginView setAttributeKeys:andValues:]):
9992         * WebCoreSupport/WebEditorClient.mm:
9993         (-[WebEditCommand command]):
9994         * WebView/WebFrame.mm:
9995         (-[WebFrame _getVisibleRect:]):
9996         * WebView/WebHTMLRepresentation.mm:
9997         (-[WebHTMLRepresentation _redirectDataToManualLoader:forPluginView:]):
9998         * WebView/WebHTMLView.mm:
9999         (-[WebHTMLView elementAtPoint:allowShadowContent:]):
10000         * WebView/WebPreferences.mm:
10001         (-[WebPreferences setAllowsAnimatedImages:]):
10002         (-[WebPreferences setAutosaves:]):
10003         (-[WebPreferences PDFDisplayMode]):
10004         * WebView/WebView.mm:
10005         (+[WebView _viewClass:andRepresentationClass:forMIMEType:]):
10006         (-[WebView _viewClass:andRepresentationClass:forMIMEType:]):
10007         (+[WebView _unregisterViewClassAndRepresentationClassForMIMEType:]):
10008         (+[WebView _registerViewClass:representationClass:forURLScheme:]):
10009         (-[WebView _shouldChangeSelectedDOMRange:toDOMRange:affinity:stillSelecting:]):
10010         (-[WebView _insertNewlineInQuotedContent]):
10011
10012 2009-01-28  Geoffrey Garen  <ggaren@apple.com>
10013
10014         Reviewed by Sam Weinig.
10015
10016         Updated for WebCore rename.
10017         
10018         * WebView/WebView.mm:
10019         (-[WebView setCustomTextEncodingName:]):
10020
10021 2009-01-28  David Kilzer  <ddkilzer@apple.com>
10022
10023         Add missing declaration for -[NSURL(WebNSURLExtras) _webkit_isFileURL]
10024
10025         Reviewed by Dan Bernstein.
10026
10027         * Misc/WebNSURLExtras.h:
10028         (-[NSURL(WebNSURLExtras) _webkit_isFileURL]): Added missing
10029         declaration after the implementation was added in r9258.
10030
10031 2009-01-28  Sam Weinig  <sam@webkit.org>
10032
10033         Reviewed by Geoff Garen.
10034
10035         Fix for <rdar://problem/6129678>
10036         REGRESSION (Safari 3-4): Local variable not accessible from Dashcode console or variables view
10037
10038         * WebView/WebScriptDebugDelegate.mm:
10039         (-[WebScriptCallFrame scopeChain]): Wrap JSActivations in DebuggerActivations.
10040
10041 2009-01-27  Anders Carlsson  <andersca@apple.com>
10042
10043         Reviewed by Oliver Hunt.
10044
10045         Fix two bugs with Core Animation based plug-ins.
10046         
10047         1. The plug-in view was marked as opaque even though it's not. 
10048            (This would leave garbage in the plug-in view).
10049         2. The plug-in layer needs to have autoresizing turned on.
10050         
10051         * Plugins/WebNetscapePluginView.mm:
10052         (-[WebNetscapePluginView setLayer:]):
10053
10054 2009-01-27  Brady Eidson  <beidson@apple.com>
10055
10056         Reviewed by Dan Bernstein
10057
10058         Rework FrameLoaderClient to work on a CachedFrame basis instead of CachedPage
10059
10060         * History/WebHistoryItem.mm:
10061
10062         * WebCoreSupport/WebFrameLoaderClient.h:
10063         * WebCoreSupport/WebFrameLoaderClient.mm:
10064         (WebFrameLoaderClient::savePlatformDataToCachedFrame):
10065         (WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
10066         * WebKit.order:
10067
10068 2009-01-26  Anders Carlsson  <andersca@apple.com>
10069
10070         Reviewed by Dan Bernstein.
10071
10072         Add the ability for plug-ins to make WebKit operate in "modal mode"
10073         
10074         * Plugins/Hosted/NetscapePluginHostProxy.h:
10075         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10076         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
10077         (WebKit::NetscapePluginHostProxy::pluginHostDied):
10078         If the plug-in crashes while we're modal, make sure to leave the modal mode.
10079         
10080         (WebKit::NetscapePluginHostProxy::setModal):
10081         (WKPCSetModal):
10082         * Plugins/Hosted/WebKitPluginClient.defs:
10083
10084 2009-01-26  John Sullivan  <sullivan@apple.com>
10085
10086         fixed <rdar://problem/6530053> REGRESSION (Leopard): Shift-tab in http authentication window gets 
10087         stuck in the Name field rather than cycling around
10088
10089         Reviewed by Dan Bernstein
10090
10091         * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
10092         * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
10093         The two static text fields and the last button all had their "next key view" outlets set to the
10094         name field, which caused shift-tab from the name field to do the wrong thing. Fixed by making each
10095         selectable view have exactly one "next key view" set to it.
10096
10097 2009-01-26  Anders Carlsson  <andersca@apple.com>
10098
10099         Reviewed by Sam Weinig.
10100
10101         Add the ability for a plug-in to show or hide the menu bar.
10102         
10103         * Plugins/Hosted/NetscapePluginHostProxy.h:
10104         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10105         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
10106         (WebKit::NetscapePluginHostProxy::pluginHostDied):
10107         (WebKit::NetscapePluginHostProxy::setMenuBarVisible):
10108         (WKPCSetMenuBarVisible):
10109         * Plugins/Hosted/WebKitPluginClient.defs:
10110
10111 2009-01-26  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
10112
10113         Reviewed by Gavin Barraclough.
10114
10115         Bug 23552: Dashcode evaluator no longer works after making ExecStates actual call frames
10116         <https://bugs.webkit.org/show_bug.cgi?id=23552>
10117         <rdar://problem/6398839>
10118
10119         Dashcode will crash when using the evaluator because it saves a global call
10120         frame, even after global code has finished executing, and then uses this as
10121         a launching pad to execute new JS in the evaluator. The fix is to detect
10122         when Dashcode is attempting to do this and execute code from a global call
10123         frame instead.        
10124
10125         * ForwardingHeaders/runtime/Protect.h: Added.
10126         * WebView/WebScriptDebugDelegate.mm:
10127         (-[WebScriptCallFrame _initWithGlobalObject:debugger:caller:debuggerCallFrame:]):
10128         Added debugger, a WebScriptDebugger* argument.
10129         (-[WebScriptCallFrame evaluateWebScript:]): Detect when Dashcode is using
10130         a stale WebScriptCallFrame to execute new JS and evaluate it starting from
10131         the global object's global call frame instead.
10132         * WebView/WebScriptDebugger.h:
10133         (WebScriptDebugger::globalObject): Added.
10134         (WebScriptDebugger::globalCallFrame): Added.
10135         * WebView/WebScriptDebugger.mm:
10136         (WebScriptDebugger::WebScriptDebugger): Initialize m_globalObject.
10137         (WebScriptDebugger::initGlobalCallFrame): Created as a clone of callEvent
10138         so that the global call frame can be saved immediately after being created.
10139         (WebScriptDebugger::callEvent): Pass 'this' as the debugger argument of
10140         WebScriptCallFrame's _initWithGlobalObject method.
10141
10142 2009-01-26  Anders Carlsson  <andersca@apple.com>
10143
10144         Reviewed by Oliver Hunt.
10145
10146         Make WKPCInvoke a simpleroutine.
10147         
10148         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10149         (WKPCInvoke):
10150         * Plugins/Hosted/WebKitPluginClient.defs:
10151
10152 2009-01-26  Anders Carlsson  <andersca@apple.com>
10153
10154         Reviewed by Sam Weinig.
10155
10156         Implement using plug-in objects as constructors, and setting and getting properties from a plug-in object.
10157         
10158         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10159         (WKPCBooleanAndDataReply):
10160         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
10161         (WebKit::NetscapePluginInstanceProxy::Reply::):
10162         (WebKit::NetscapePluginInstanceProxy::BooleanAndDataReply::BooleanAndDataReply):
10163         Rename NPObjectInvokeReply to BooleanAndDataReply.
10164         
10165         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10166         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
10167         Fix a cut and paste error.
10168         
10169         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
10170         Handle NPObjects.
10171         
10172         * Plugins/Hosted/ProxyInstance.h:
10173         * Plugins/Hosted/ProxyInstance.mm:
10174         (WebKit::ProxyField::valueFromInstance):
10175         (WebKit::ProxyField::setValueToInstance):
10176         Call the ProxyInstance method.
10177         
10178         (WebKit::ProxyInstance::~ProxyInstance):
10179         Release the NPObject.
10180         
10181         (WebKit::ProxyInstance::supportsConstruct):
10182         Ask the plug-in host if an instance supports construct.
10183         
10184         (WebKit::ProxyInstance::fieldValue):
10185         (WebKit::ProxyInstance::setFieldValue):
10186         Call the plug-in host methods.
10187         
10188         * Plugins/Hosted/WebKitPluginHostTypes.h:
10189         Rename ObjectValueType to JSObjectValueType, and add NPObjectValueType.
10190
10191 2009-01-26  Mark Rowe  <mrowe@apple.com>
10192
10193         Fix the build.
10194
10195         Remove -Wformat=2 from the warning flags as newer versions of GCC emit
10196         warnings about non-literal format strings for uses of our UI_STRING macro.
10197
10198         * Configurations/Base.xcconfig:
10199
10200 2009-01-26  Mark Rowe  <mrowe@apple.com>
10201
10202         Rubber-stamped by Sam Weinig.
10203
10204         Clean up after r40240.
10205
10206         * Configurations/Base.xcconfig: Don't dead code strip in debug builds for now as it leads to link errors.
10207         * Plugins/Hosted/HostedNetscapePluginStream.mm: Revert change that is no longer needed now that WebKitPluginHost.defs
10208         is back in the build.
10209
10210 2009-01-25  Darin Adler  <darin@apple.com>
10211
10212         * Plugins/Hosted/HostedNetscapePluginStream.mm: Added a missing extern "C".
10213
10214 2009-01-25  Darin Adler  <darin@apple.com>
10215
10216         Discussed with Mark Rowe; not sure he reviewed it.
10217
10218         * Configurations/Base.xcconfig: Add all the same warnings as in WebCore except for
10219         -Wcast-qual and -Wunused-parameter, which both need to be off at least for now.
10220
10221 2009-01-25  Mark Rowe  <mrowe@apple.com>
10222
10223         Rubber-stamped by Dan Bernstein.
10224
10225         Improve the consistency of settings in our .xcconfig files.
10226
10227         * Configurations/Base.xcconfig: Only dead code strip the normal variant.
10228         Handle all cases in GCC_GENERATE_DEBUGGING_SYMBOLS.
10229
10230 2009-01-25  Darin Adler  <darin@apple.com>
10231
10232         Reviewed by Sam Weinig.
10233
10234         Bug 23522: use checked casts for render tree
10235         https://bugs.webkit.org/show_bug.cgi?id=23522
10236
10237         Step one: RenderText.
10238
10239         * WebView/WebRenderNode.mm:
10240         (copyRenderNode): Use toRenderText.
10241
10242 2009-01-23  Brady Eidson  <beidson@apple.com>
10243
10244         Rubberstamped by Darin Adler
10245
10246         Rename CachedPagePlatformData to CachedFramePlatformData to more accurately reflect its true role.
10247
10248         * WebCoreSupport/WebCachedFramePlatformData.h: Copied from WebKit/mac/WebCoreSupport/WebCachedPagePlatformData.h.
10249         (WebCachedFramePlatformData::WebCachedFramePlatformData):
10250         * WebCoreSupport/WebCachedPagePlatformData.h: Removed.
10251
10252         * WebCoreSupport/WebFrameLoaderClient.mm:
10253         (WebFrameLoaderClient::savePlatformDataToCachedPage):
10254         (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
10255
10256         * WebKit.order:
10257
10258 2009-01-23  Adele Peterson  <adele@apple.com>
10259
10260         Build fix.
10261
10262         Use new linesBoundingBox method instead of
10263         boundingBoxWidth and boundingBoxHeight for RenderText objects.
10264
10265         * WebView/WebRenderNode.mm: (copyRenderNode):
10266
10267 2009-01-23  Anders Carlsson  <andersca@apple.com>
10268
10269         Fix 64-bit build.
10270         
10271         * Plugins/Hosted/ProxyInstance.mm:
10272         (WebKit::proxyClass):
10273
10274 2009-01-23  Anders Carlsson  <andersca@apple.com>
10275
10276         Fix GCC 4.0 build.
10277         
10278         * Configurations/Base.xcconfig:
10279
10280 2009-01-23  Anders Carlsson  <andersca@apple.com>
10281
10282         Reviewed by Sam Weinig.
10283
10284         Turn on -Wmissing-prototypes and fix the resulting warnings.
10285
10286         * Configurations/Base.xcconfig:
10287         * History/WebHistory.mm:
10288         (timeIntervalForBeginningOfDay):
10289         * History/WebHistoryItem.mm:
10290         (historyItemWrappers):
10291         * Misc/WebNSPasteboardExtras.mm:
10292         (imageFromElement):
10293         * WebView/WebFrame.mm:
10294         * WebView/WebScriptDebugger.mm:
10295         (toNSString):
10296
10297 2009-01-22  Mark Rowe  <mrowe@apple.com>
10298
10299         Rubber-stamped by Anders Carlsson.
10300
10301         Disable GCC_WARN_ABOUT_MISSING_PROTOTYPES temporarily.
10302
10303         Current versions of Xcode only respect it for C and Objective-C files,
10304         and our code doesn't currently compile if it is applied to C++ and
10305         Objective-C++ files.
10306
10307         * Configurations/Base.xcconfig:
10308
10309 2009-01-22  Anders Carlsson  <andersca@apple.com>
10310
10311         Reviewed by Sam Weinig.
10312
10313         Add support for Invoke and InvokeDefault. Clean up code.
10314         
10315         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10316         (WKPCBooleanReply):
10317         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
10318         (WebKit::NetscapePluginInstanceProxy::Reply::):
10319         (WebKit::NetscapePluginInstanceProxy::BooleanReply::BooleanReply):
10320         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10321         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
10322         * Plugins/Hosted/ProxyInstance.h:
10323         * Plugins/Hosted/ProxyInstance.mm:
10324         (WebKit::ProxyInstance::invoke):
10325         (WebKit::ProxyInstance::invokeMethod):
10326         (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
10327         (WebKit::ProxyInstance::invokeDefaultMethod):
10328         (WebKit::ProxyInstance::methodsNamed):
10329         (WebKit::ProxyInstance::fieldNamed):
10330         * Plugins/Hosted/WebKitPluginClient.defs:
10331         * Plugins/Hosted/WebKitPluginHost.defs:
10332         * Plugins/Hosted/WebKitPluginHostTypes.h:
10333
10334 2009-01-22  Eric Roman  <eroman@chromium.og>
10335
10336         Reviewed by Eric Seidel.
10337
10338         https://bugs.webkit.org/show_bug.cgi?id=20806
10339         Deprecate RSSFeedReferrer() and setRSSFeedReferrer().
10340
10341         * History/WebHistoryItem.mm:
10342         (-[WebHistoryItem RSSFeedReferrer]):
10343         (-[WebHistoryItem setRSSFeedReferrer:]):
10344
10345 2009-01-22  Anders Carlsson  <andersca@apple.com>
10346
10347         Reviewed by Kevin Decker.
10348
10349         Don't crash or hang when we fail to instantiate a plug-in.
10350         
10351         * Plugins/Hosted/NetscapePluginHostManager.mm:
10352         (WebKit::NetscapePluginHostManager::instantiatePlugin):
10353         Return 0 on failure.
10354         
10355         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
10356         (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
10357         Null check for the proxy member.
10358
10359 2009-01-21  David Hyatt  <hyatt@apple.com>
10360
10361         Devirtualize width/height/x/y on RenderObject and move the methods to RenderBox.
10362
10363         Reviewed by Eric Seidel and Darin Adler
10364
10365         * WebView/WebRenderNode.mm:
10366         (copyRenderNode):
10367
10368 2009-01-21  Anders Carlsson  <andersca@apple.com>
10369
10370         Reviewed by Sam Weinig.
10371
10372         More browser->plug-in scripting support.
10373         
10374         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10375         (WKPCNPObjectHasPropertyReply):
10376         (WKPCNPObjectHasMethodReply):
10377         (WKPCNPObjectInvokeReply):
10378         MIG reply functions.
10379         
10380         (WKPCIdentifierInfo):
10381         Return information about an identifier given its 64-bit value.
10382         
10383         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
10384         Add new reply structs.
10385         
10386         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10387         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
10388         Split out code that adds values to the arrays from marshalValue.
10389         
10390         (WebKit::NetscapePluginInstanceProxy::marshalValue):
10391         Call addValueToArray.
10392     
10393         (WebKit::NetscapePluginInstanceProxy::marshalValues):
10394         Marshal a list of values.
10395         
10396         (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
10397         Actually create a proxy instance.
10398         
10399         * Plugins/Hosted/ProxyInstance.h:
10400         * Plugins/Hosted/ProxyInstance.mm:
10401         (WebKit::ProxyClass::methodsNamed):
10402         (WebKit::ProxyClass::fieldNamed):
10403         Add a proxy ProxyClass class that just forwards everything to the ProxyInstance class.
10404         
10405         (WebKit::proxyClass):
10406         Shared proxyClass getter.
10407         
10408         (WebKit::ProxyField::ProxyField):
10409         (WebKit::ProxyField::valueFromInstance):
10410         (WebKit::ProxyField::setValueToInstance):
10411         Add a proxy ProxyField class that just forwards everything to the ProxyInstance class.
10412         
10413         (WebKit::ProxyMethod::ProxyMethod):
10414         (WebKit::ProxyMethod::serverIdentifier):
10415         (WebKit::ProxyMethod::numParameters):
10416         Add a dummy ProxyMethod class.
10417         
10418         (WebKit::ProxyInstance::invokeMethod):
10419         Call _WKPHNPObjectInvoke.
10420         
10421         (WebKit::ProxyInstance::defaultValue):
10422         (WebKit::ProxyInstance::stringValue):
10423         (WebKit::ProxyInstance::numberValue):
10424         (WebKit::ProxyInstance::booleanValue):
10425         (WebKit::ProxyInstance::valueOf):
10426         Add dummy implementations (taken from CInstance).
10427         
10428         (WebKit::ProxyInstance::methodsNamed):
10429         Call _WKPHNPObjectHasMethod to determine whether a method with the given name exists.
10430         
10431         (WebKit::ProxyInstance::fieldNamed):
10432         Call _WKPHNPObjectHasProperty to determine whether a property with the given name exists.
10433         
10434         * Plugins/Hosted/WebKitPluginClient.defs:
10435         * Plugins/Hosted/WebKitPluginHost.defs:
10436         Add new MIG definitions.
10437
10438 2009-01-21  Mark Rowe  <mrowe@apple.com>
10439
10440         Reviewed by Tim Hatcher.
10441
10442         Clean up how we force invocations of API that happened on background threads over to the main thread.
10443
10444         This was previously accomplished in a somewhat ad-hoc manner using a mutable dictionary to pass arguments
10445         and return values back from the function.  The new approach is to use a proxy object that forwards an
10446         NSInvocation over to the main thread and applies it to the target object, which leads to a much cleaner
10447         call site.
10448
10449         * Misc/WebNSObjectExtras.h:
10450         * Misc/WebNSObjectExtras.mm:
10451         (-[WebMainThreadInvoker initWithTarget:]):
10452         (-[WebMainThreadInvoker forwardInvocation:]):
10453         (-[WebMainThreadInvoker methodSignatureForSelector:]):
10454         (-[WebMainThreadInvoker handleException:]):
10455         (-[NSInvocation _webkit_invokeAndHandleException:]): Execute the invocation and forward any exception that was
10456         raised back to the WebMainThreadInvoker.
10457         (-[NSObject _webkit_invokeOnMainThread]):
10458
10459         The following methods are updated to use the proxy object to forward methods to the main thread:
10460
10461         * WebView/WebArchive.mm:
10462         (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
10463         (-[WebArchive mainResource]):
10464         (-[WebArchive subresources]):
10465         (-[WebArchive subframeArchives]):
10466         * WebView/WebResource.mm:
10467         (-[WebResource data]):
10468         (-[WebResource URL]):
10469         (-[WebResource MIMEType]):
10470         (-[WebResource textEncodingName]):
10471         (-[WebResource frameName]):
10472         (-[WebResource _ignoreWhenUnarchiving]):
10473         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
10474         (-[WebResource _initWithData:URL:response:]):
10475         (-[WebResource _suggestedFilename]):
10476         (-[WebResource _response]):
10477         (-[WebResource _stringValue]):
10478         * WebView/WebView.mm:
10479         (-[WebView initWithFrame:frameName:groupName:]):
10480         (-[WebView initWithCoder:]):
10481
10482 2009-01-20  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
10483
10484         Reviewed by George Staikos.
10485
10486         Fixes: https://bugs.webkit.org/show_bug.cgi?id=23434 (Add WML <input> element support)
10487
10488         Protect text field related WebEditorClient.mm methods against non-HTMLElement callers.
10489         WebEditorClient.mm relies on HTMLInputElement as input element. Ignore calls from non-HTMLElement elements.
10490
10491         * WebCoreSupport/WebEditorClient.mm:
10492         (WebEditorClient::textFieldDidBeginEditing):
10493         (WebEditorClient::textFieldDidEndEditing):
10494         (WebEditorClient::textDidChangeInTextField):
10495         (WebEditorClient::doTextFieldCommandFromEvent):
10496         (WebEditorClient::textWillBeDeletedInTextField):
10497         (WebEditorClient::textDidChangeInTextArea):
10498
10499 2009-01-19  Anders Carlsson  <andersca@apple.com>
10500
10501         Reviewed by Sam Weinig.
10502
10503         Add and implement GetScriptableNPObject.
10504         
10505         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10506         (WKPCGetScriptableNPObjectReply):
10507         Create a new reply struct and set it as the current reply.
10508         
10509         (WKPCEvaluate):
10510         Get rid of an unused variable.
10511         
10512         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
10513         (WebKit::NetscapePluginInstanceProxy::Reply::):
10514         (WebKit::NetscapePluginInstanceProxy::GetScriptableNPObjectReply::GetScriptableNPObjectReply):
10515         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10516         (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
10517         Call _WKPHGetScriptableNPObject and wait for a reply.
10518         
10519         * Plugins/Hosted/ProxyInstance.h: Added.
10520         * Plugins/Hosted/ProxyInstance.mm: Added.
10521         Add empty files.
10522         
10523         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
10524         (-[WebHostedNetscapePluginView JSC::Bindings::createPluginBindingsInstance:JSC::Bindings::]):
10525         Call NetscapePluginInstanceProxy::createBindingsInstance.
10526         
10527         * Plugins/Hosted/WebKitPluginClient.defs:
10528         * Plugins/Hosted/WebKitPluginHost.defs:
10529         Add new declarations.
10530
10531 2009-01-19  Sam Weinig  <sam@webkit.org>
10532
10533         Rubber-stamped by Gavin Barraclough.
10534
10535         Remove temporary operator-> from JSValuePtr.
10536
10537         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10538         (WebKit::NetscapePluginInstanceProxy::invoke):
10539         (WebKit::NetscapePluginInstanceProxy::hasMethod):
10540         (WebKit::NetscapePluginInstanceProxy::marshalValue):
10541         * WebView/WebFrame.mm:
10542         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
10543         * WebView/WebView.mm:
10544         (aeDescFromJSValue):
10545
10546 2009-01-19  Anders Carlsson  <andersca@apple.com>
10547
10548         Reviewed by Sam Weinig.
10549
10550         Make Evaluate an asynchronous method that has a reply method.
10551         
10552         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10553         (WKPCEvaluate):
10554         * Plugins/Hosted/WebKitPluginClient.defs:
10555         * Plugins/Hosted/WebKitPluginHost.defs:
10556
10557 2009-01-19  Brady Eidson  <beidson@apple.com>
10558
10559         Rubberstamped by Tim Hatcher
10560
10561         Fix long standing typo.
10562
10563         * History/WebBackForwardList.h:
10564
10565 2009-01-19  Mark Rowe  <mrowe@apple.com>
10566
10567         Fix the build!
10568
10569         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10570         (WebKit::NetscapePluginInstanceProxy::demarshalValue):
10571         (WebKit::NetscapePluginInstanceProxy::demarshalValues):
10572
10573 2009-01-18  Mark Rowe  <mrowe@apple.com>
10574
10575         Reviewed by Anders Carlsson.
10576
10577         Fix <https://bugs.webkit.org/show_bug.cgi?id=23414>.
10578         Bug 23414: Reproducible crash accessing View menu with plugins disabled
10579
10580         * WebView/WebFrame.mm:
10581         (-[WebFrame _canProvideDocumentSource]): Null-check the PluginData before using it.
10582
10583 2009-01-17  David Hyatt  <hyatt@apple.com>
10584
10585         Eliminate dependencies on "backslashAsCurrencySymbol()" from WebKit, and make sure these alterations
10586         are done in WebCore instead.
10587
10588         Reviewed by Oliver Hunt
10589
10590         * WebView/WebFrame.mm:
10591         (-[WebFrame _selectedString]):
10592         (-[WebFrame _stringForRange:]):
10593
10594 2009-01-17  Eric Carlson  <eric.carlson@apple.com>
10595
10596         Reviewed by Adele Peterson
10597
10598         Complete <rdar://problem/6293969>
10599
10600         * WebCoreSupport/WebSystemInterface.m:
10601         (InitWebCoreSystemInterface): Remove UseSharedMediaUI
10602
10603 2009-01-15  Brady Eidson  <beidson@apple.com>
10604
10605         Reviewed by Dan Bernstein
10606
10607         Fix problem where a URL visited as non-GET once is flagged as non-GET forever.
10608
10609         * History/WebHistory.mm:
10610         (-[WebHistory _visitedURL:withTitle:method:wasFailure:]): Always update the HTTPNonGet
10611           flag for all loads with an HTTP Method
10612
10613 2009-01-14  Anders Carlsson  <andersca@apple.com>
10614
10615         Reviewed by Sam Weinig.
10616
10617         Implement InvokeDefault, Construct, GetProperty and SetProperty.
10618         
10619         Fully implement marshalValue.
10620         
10621         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10622         (WKPCInvokeDefault):
10623         (WKPCConstruct):
10624         (WKPCGetProperty):
10625         (WKPCSetProperty):
10626         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
10627         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10628         (WebKit::NetscapePluginInstanceProxy::evaluate):
10629         (WebKit::NetscapePluginInstanceProxy::invoke):
10630         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
10631         (WebKit::NetscapePluginInstanceProxy::construct):
10632         (WebKit::NetscapePluginInstanceProxy::getProperty):
10633         (WebKit::NetscapePluginInstanceProxy::setProperty):
10634         (WebKit::NetscapePluginInstanceProxy::marshalValue):
10635         (WebKit::NetscapePluginInstanceProxy::demarshalValue):
10636         * Plugins/Hosted/WebKitPluginClient.defs:
10637
10638 2009-01-14  Anders Carlsson  <andersca@apple.com>
10639
10640         Reviewed by Sam Weinig.
10641
10642         Demarshal arguments and pass them to the JS call.
10643         
10644         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10645         (WKPCInvoke):
10646         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
10647         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10648         (WebKit::NetscapePluginInstanceProxy::invoke):
10649         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
10650         (WebKit::NetscapePluginInstanceProxy::demarshalValues):
10651
10652 2009-01-14  Mark Rowe  <mrowe@apple.com>
10653
10654         Reviewed by Timothy Hatcher.
10655
10656         <rdar://problem/6496520> REGRESSION: In Mail, a crash occurs when attempting to display a mail message
10657
10658         Move WebArchive and WebResource to use the same approach for initializing themselves on the main thread
10659         that WebView uses.
10660
10661         * WebView/WebArchive.mm:
10662         (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Use _webkit_performSelectorOnMainThread:withObject:.
10663         (-[WebArchive _initWithArguments:]):
10664         * WebView/WebResource.mm:
10665         (-[WebResource _initWithArguments:]): Unbox the BOOL argument.
10666
10667 2009-01-14  Darin Adler  <darin@apple.com>
10668
10669         Reviewed by Oliver Hunt.
10670
10671         Fix crash I ran into while printing. I was unable to reproduce it, but also,
10672         it's clear there's no guarantee that the frame will be non-zero in this case,
10673         so it seems fine to check it.
10674
10675         * WebView/WebHTMLView.mm: (-[WebHTMLView reapplyStyles]): Check frame for zero
10676         and don't do anything with it if it's zero.
10677
10678 2009-01-14  Dan Bernstein  <mitz@apple.com>
10679
10680         Reviewed by John Sullivan.
10681
10682         - update copyright
10683
10684         * Info.plist:
10685
10686 2009-01-12  Anders Carlsson  <andersca@apple.com>
10687
10688         Reviewed by Darin Adler.
10689
10690         Add a bunch of methods to WebKitPluginClient.defs, and implement them.
10691         
10692         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10693         (WebKit::fromUTF8WithLatin1Fallback):
10694         If the length isn't specified, get it by calling strlen.
10695         
10696         (WKPCEvaluate):
10697         Evaluate doesn't take any arguments.
10698         
10699         (WKPCGetIntIdentifier):
10700         Call _NPN_GetIntIdentifier.
10701         
10702         (identifierFromServerIdentifier):
10703         New helper function that returns a JSC Identifier from an NPIdentifier.
10704         
10705         (WKPCInvoke):
10706         Call identifierFromServerIdentifier.
10707         
10708         (WKPCRemoveProperty):
10709         (WKPCHasProperty):
10710         (WKPCHasMethod):
10711         Call NetscapePluginInstanceProxy.
10712
10713         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
10714         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10715         (WebKit::NetscapePluginInstanceProxy::removeProperty):
10716         (WebKit::NetscapePluginInstanceProxy::hasProperty):
10717         (WebKit::NetscapePluginInstanceProxy::hasMethod):
10718
10719         * Plugins/Hosted/WebKitPluginClient.defs:
10720         Add new definitions.
10721
10722 2009-01-13  Anders Carlsson  <andersca@apple.com>
10723
10724         Fix build.
10725
10726         * WebView/WebView.mm:
10727         (-[WebView _initWithArguments:]):
10728
10729 2009-01-13  Timothy Hatcher  <timothy@apple.com>
10730
10731         Adds a workaround for the flip4mac installer plugin decoding a WebView from a NIB on a secondary thread.
10732
10733         <rdar://problem/6489788> New WebKit thread checks break installation of flip4mac (thread violation)
10734
10735         Reviewed by Darin Adler.
10736
10737         * Misc/WebKitVersionChecks.h: Add WEBKIT_FIRST_VERSION_WITHOUT_WEBVIEW_INIT_THREAD_WORKAROUND.
10738         * Misc/WebNSObjectExtras.h: Add _webkit_performSelectorOnMainThread:withObject:.
10739         * Misc/WebNSObjectExtras.mm:
10740         (-[NSObject _webkit_performSelectorWithArguments:]): Renamed from _webkit_getPropertyWithArguments.
10741         Passes the optional object to the selector.
10742         (-[NSObject _webkit_performSelectorOnMainThread:withObject:]): Renamed from _webkit_getPropertyOnMainThread:.
10743         Put the optional object into the arguments dictionary.
10744         (-[NSObject _webkit_getPropertyOnMainThread:]): Call _webkit_performSelectorOnMainThread with a nil object.
10745         * WebView/WebResource.mm:
10746         (-[WebResource _ignoreWhenUnarchiving]): Use _cmd instead of making the selector again.
10747         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]): Use the new
10748         _webkit_performSelectorOnMainThread:withObject: method instead of performSelectorOnMainThread.
10749         * WebView/WebView.mm:
10750         (-[WebView _initWithArguments:]): Added. Pulls arguments out of the dictionary and calls the right init method.
10751         (needsWebViewInitThreadWorkaround): Checks if the thead is not the main thread and if we are in the Installer bundle.
10752         (-[WebView initWithFrame:frameName:groupName:]): Call needsWebViewInitThreadWorkaround and use _webkit_performSelectorOnMainThread
10753         to call _initWithArguments: passing the frame, frameName and groupName.
10754         (-[WebView initWithCoder:]): Ditto, except pass the coder to _initWithArguments:.
10755
10756 2009-01-12  Gavin Barraclough  <barraclough@apple.com>
10757
10758         Reviewed by Oliver Hunt.
10759
10760         Deprecate JSValuePtr::getNumber() - two ways to get a number should  be enough.
10761
10762         * WebView/WebView.mm:
10763         (aeDescFromJSValue):
10764
10765 2009-01-12  Brady Eidson  <beidson@apple.com>
10766
10767         Reviewed by Darin Adler
10768
10769         <rdar://problem/6468274> - Track Non-get requests in global history
10770
10771         * History/WebHistory.mm:
10772         (-[WebHistory _visitedURL:withTitle:method:wasFailure:]):
10773         * History/WebHistoryInternal.h:
10774
10775         * History/WebHistoryItem.mm:
10776         (-[WebHistoryItem initFromDictionaryRepresentation:]):
10777         (-[WebHistoryItem dictionaryRepresentation]):
10778         (-[WebHistoryItem _lastVisitWasHTTPNonGet]):
10779         * History/WebHistoryItemPrivate.h:
10780
10781         * WebCoreSupport/WebFrameLoaderClient.mm:
10782         (WebFrameLoaderClient::updateGlobalHistory): Only pass the method through if it was an HTTP load
10783
10784 2009-01-12  Anders Carlsson  <andersca@apple.com>
10785
10786         Reviewed by Sam Weinig.
10787
10788         Move marshalling into NetscapePluginInstanceProxy.
10789         
10790         Add support for marshallin strings.
10791         
10792         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10793         (WKPCEvaluate):
10794         (WKPCInvoke):
10795         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
10796         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10797         (WebKit::NetscapePluginInstanceProxy::evaluate):
10798         (WebKit::NetscapePluginInstanceProxy::invoke):
10799         (WebKit::NetscapePluginInstanceProxy::marshalValue):
10800         * Plugins/Hosted/WebKitPluginHostTypes.h:
10801
10802 2009-01-12  Anders Carlsson  <andersca@apple.com>
10803
10804         Reviewed by Sam Weinig.
10805
10806         Implement WKPCInvoke.
10807         
10808         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10809         (WKPCEvaluate):
10810         (WKPCInvoke):
10811         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
10812         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10813         (WebKit::NetscapePluginInstanceProxy::idForObject):
10814         (WebKit::NetscapePluginInstanceProxy::invoke):
10815         * Plugins/Hosted/WebKitPluginClient.defs:
10816
10817 2009-01-12  Anders Carlsson  <andersca@apple.com>
10818
10819         Reviewed by Sam Weinig.
10820
10821         Move marshalling code to NetscapePluginInstanceProxy. Add support for marshalling JS objects.
10822         
10823         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10824         (WKPCEvaluate):
10825         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
10826         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10827         (WebKit::NetscapePluginInstanceProxy::marshalValue):
10828         * Plugins/Hosted/WebKitPluginHostTypes.h:
10829
10830 2009-01-12  Julien Chaffraix  <jchaffraix@pleyo.com>
10831
10832         Reviewed by Darin Adler.
10833
10834         Bug 22861: Turn the FontCache into a singleton
10835         https://bugs.webkit.org/show_bug.cgi?id=22861
10836
10837         * Misc/WebCoreStatistics.mm:
10838         (+[WebCoreStatistics cachedFontDataCount]):
10839         (+[WebCoreStatistics cachedFontDataInactiveCount]):
10840         (+[WebCoreStatistics purgeInactiveFontData]):
10841         Redirected all the static calls to the global FontCache
10842         instance.
10843
10844 2009-01-11  Dmitry Titov  <dimich@chromium.org>
10845
10846         Reviewed by Darin Adler.
10847
10848         https://bugs.webkit.org/show_bug.cgi?id=23207
10849         Moved currentTime() to from WebCore to WTF.
10850
10851         * WebView/WebFrame.mm: a different header file included.
10852
10853 2009-01-10  Darin Adler  <darin@apple.com>
10854
10855         Reviewed by Sam Weinig.
10856
10857         <rdar://problem/5845089> REGRESSION (r30044): Mail custom stationery missing images
10858         because of change to -[HTMLObjectElement data]
10859
10860         * WebView/WebView.mm:
10861         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]): Added a thread
10862         violation check because I saw this being done off the main thread while testing Mail, and it
10863         caused problems. Put all the one time initialization under a single guard to make things just
10864         a little faster other times, and to make it clearer which things are one-time. Added a call to
10865         the new patchMailRemoveAttributesMethod function.
10866         (-[WebView initWithFrame:frameName:groupName:]): Added a thread violation check here too,
10867         because I assumed it would be slightly better to have a public method name in the violation
10868         message. This calls commonInitialization later, so it will hit that one eventually.
10869         (objectElementDataAttribute): Added. Just returns the value of the "data" attribute.
10870         (recursivelyRemoveMailAttributes): Added. Patch to an internal Mail method that in turn patches
10871         a WebKit method and removes the patch again on the way out.
10872         (patchMailRemoveAttributesMethod): Added. On Leopard only, checks the Mail version, and then
10873         applies the patch that fixes this bug.
10874
10875 2009-01-09  Dan Bernstein  <mitz@apple.com>
10876
10877         Reviewed by Darin Adler.
10878
10879         - fixed <rdar://problem/6234347> Add/change conditional key
10880           bindings for changing paragraph- and character-level writing
10881           direction (to match NSTextView)
10882
10883         * WebView/WebHTMLView.mm:
10884         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Added
10885         code to validate makeBaseWritingDirectionLeftToRight: and
10886         makeBaseWritingDirectionRightToLeft:.
10887         (writingDirectionKeyBindingsEnabled): Changed this function to
10888         always return YES, except on Tiger and Leopard.
10889         (-[WebHTMLView makeBaseWritingDirectionLeftToRight:]): Renamed
10890         changeBaseWritingDirectionToLTR: to this.
10891         (-[WebHTMLView makeBaseWritingDirectionRightToLeft:]): Renamed
10892         changeBaseWritingDirectionToRTL: to this.
10893         (-[WebHTMLView changeBaseWritingDirectionToLTR:]): Now calls
10894         makeBaseWritingDirectionLeftToRight:.
10895         (-[WebHTMLView changeBaseWritingDirectionToRTL:]): Now calls
10896         makeBaseWritingDirectionRightToLeft:.
10897         * WebView/WebView.mm: Added makeBaseWritingDirectionLeftToRight
10898         and makeBaseWritingDirectionRightToLeft to
10899         FOR_EACH_RESPONDER_SELECTOR.
10900
10901 2009-01-08  Anders Carlsson  <andersca@apple.com>
10902
10903         Reviewed by Sam Weinig.
10904
10905         Add and implement WKPCGetStringIdentifier.
10906         
10907         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10908         (WKPCGetStringIdentifier):
10909         * Plugins/Hosted/WebKitPluginClient.defs:
10910
10911 2009-01-08  Stephanie Lewis  <slewis@gmail.com>
10912
10913         Fix Tiger build.        
10914
10915         * WebView/WebTextIterator.mm:
10916
10917 2009-01-08  Anders Carlsson  <andersca@apple.com>
10918
10919         Reviewed by Sam Weinig.
10920
10921         Add basic support for evaluating scripts.
10922         
10923         * Plugins/Hosted/NetscapePluginHostProxy.mm:
10924         (WebKit::fromUTF8WithLatin1Fallback):
10925         (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
10926         (WKPCReleaseObject):
10927         (marshalValue):
10928         (WKPCEvaluate):
10929         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
10930         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10931         (WebKit::NetscapePluginInstanceProxy::releaseObject):
10932         (WebKit::NetscapePluginInstanceProxy::evaluate):
10933         * Plugins/Hosted/WebKitPluginClient.defs:
10934         * Plugins/Hosted/WebKitPluginHostTypes.h:
10935
10936 2009-01-08  David Hyatt  <hyatt@apple.com>
10937
10938         Fix for <rdar://problem/6465682> REGRESSION: In Mail, can't force a message to auto scroll
10939
10940         Add a new ChromeClient method for handling exposure of scrolled rects.
10941
10942         Reviewed by Oliver Hunt
10943
10944         * WebCoreSupport/WebChromeClient.h:
10945         * WebCoreSupport/WebChromeClient.mm:
10946         (WebChromeClient::scrollRectIntoView):
10947
10948 2009-01-08  Darin Adler  <darin@apple.com>
10949
10950         Reviewed by Tim Hatcher.
10951
10952         Bug 23185: add a currentRange method to the WebTextIterator SPI
10953         https://bugs.webkit.org/show_bug.cgi?id=23185
10954         rdar://problem/6455834
10955
10956         I also noticed a garbage-collection-related threading issue that I fixed, and
10957         that the SPI for getting text was unnecessarily inefficient, so I fixed that too.
10958
10959         * WebView/WebTextIterator.h: Moved currentNode and currentText into a "deprecated"
10960         category. Added currentTextPointer and currentTextLength.
10961
10962         * WebView/WebTextIterator.mm: Changed m_textIterator into an OwnPtr, and also
10963         used _textIterator to be consistent with ObjC rather than C++ naming.
10964         (+[WebTextIteratorPrivate initialize]): Added. Calls WebCoreObjCFinalizeOnMainThread,
10965         since the finalize method here works with main-thread only WebCore objects. 
10966         (-[WebTextIterator initWithRange:]): Changed since _textIterator is an OwnPtr now.
10967         (-[WebTextIterator advance]): Changed name of m_textIterator. Removed null assertion,
10968         since I don't think it provides much value.
10969         (-[WebTextIterator atEnd]): Ditto.
10970         (-[WebTextIterator currentRange]): Added.
10971         (-[WebTextIterator currentTextPointer]): Added.
10972         (-[WebTextIterator currentTextLength]): Added.
10973         (-[WebTextIterator currentNode]): Did same as above, but also put into new category.
10974         (-[WebTextIterator currentText]): Ditto.
10975
10976 2009-01-08  Eric Carlson  <eric.carlson@apple.com>
10977
10978         Reviewed by Adele Peterson.
10979
10980         Simplify Mac interfaces for drawing media controller elements
10981
10982         <rdar://problem/6293969>
10983
10984         * WebCoreSupport/WebSystemInterface.m:
10985         (InitWebCoreSystemInterface): Update for changes to media controller functions
10986
10987 2009-01-07  Anders Carlsson  <andersca@apple.com>
10988
10989         Reviewed by Dan Bernstein.
10990
10991         Fix build.
10992         
10993         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
10994         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
10995         (WebKit::NetscapePluginInstanceProxy::idForObject):
10996
10997 2009-01-07  Anders Carlsson  <andersca@apple.com>
10998
10999         Reviewed by Dan Bernstein.
11000
11001         Add a way for a plug-in to get a reference to the Window JS object.
11002
11003         * Plugins/Hosted/NetscapePluginHostProxy.mm:
11004         (WKPCGetWindowNPObject):
11005         Call the appropriate instance.
11006         
11007         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
11008         Add object ID counter.
11009         
11010         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
11011         (WebKit::NetscapePluginInstanceProxy::destroy):
11012         Clear the object ID map.
11013         
11014         (WebKit::NetscapePluginInstanceProxy::idForObject):
11015         New method that returns a unique ID for a given JS object.
11016         
11017         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
11018         Return the object ID for the window JS object.
11019         
11020         * Plugins/Hosted/WebKitPluginClient.defs:
11021         Add GetWindowNPObject.
11022
11023 2009-01-07  Darin Adler  <darin@apple.com>
11024
11025         Reviewed by Oliver Hunt.
11026
11027         Bug 23160: add setMemoryCacheClientCallsEnabled SPI so Safari can be faster with activity window closed
11028         https://bugs.webkit.org/show_bug.cgi?id=23160
11029
11030         * WebView/WebView.mm:
11031         (-[WebView setMemoryCacheDelegateCallsEnabled:]): Added.
11032         (-[WebView areMemoryCacheDelegateCallsEnabled]): Added
11033         * WebView/WebViewPrivate.h: Ditto.
11034
11035 2009-01-05  Gavin Barraclough  <baraclough@apple.com>
11036
11037         Rubber Stamped by Oliver Hunt.
11038
11039         Replace all uses of JSValue* with new wrapper class, JSValuePtr.
11040         See JavaScriptCore/ChangeLog for more detailed description.
11041
11042         * WebView/WebFrame.mm:
11043         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
11044         * WebView/WebScriptDebugDelegate.mm:
11045         (-[WebScriptCallFrame _convertValueToObjcValue:]):
11046         (-[WebScriptCallFrame exception]):
11047         (-[WebScriptCallFrame evaluateWebScript:]):
11048         * WebView/WebView.mm:
11049         (aeDescFromJSValue):
11050         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
11051
11052 2009-01-06  Pierre-Olivier Latour  <pol@apple.com>
11053
11054         Reviewed by Darin Adler.
11055
11056         Exposed through WebFrame private interface the new WebCore API AnimationController::numberOfActiveAnimations() to be used by DRT.
11057
11058         https://bugs.webkit.org/show_bug.cgi?id=23126
11059
11060         * WebView/WebFrame.mm:
11061         (-[WebFrame _numberOfActiveAnimations]):
11062         * WebView/WebFramePrivate.h:
11063
11064 2009-01-05  David Kilzer  <ddkilzer@apple.com>
11065
11066         Add SPI to enable, disable and check state of WebIconDatabase
11067
11068         Reviewed by Darin Adler & Timothy Hatcher.
11069
11070         Add -[WebIconDatabase isEnabled] and -[WebIconDatabase setEnabled:]
11071         SPI to make it possible to enable, disable and check the state of
11072         the icon database.
11073
11074         * Misc/WebIconDatabase.mm:
11075         (-[WebIconDatabase init]): Extracted code into -_startUpIconDatabase.
11076         (-[WebIconDatabase iconForURL:withSize:cache:]): Switched to use
11077         -isEnabled instead of -_isEnabled.
11078         (-[WebIconDatabase iconURLForURL:]): Ditto.
11079         (-[WebIconDatabase retainIconForURL:]): Ditto.
11080         (-[WebIconDatabase releaseIconForURL:]): Ditto.
11081         (-[WebIconDatabase isEnabled]): Renamed from -_isEnabled in
11082         WebInternal category.
11083         (-[WebIconDatabase setEnabled:]): Added.  Takes care of changing
11084         the enabled/disabled state of the icon database.
11085         (-[WebIconDatabase removeAllIcons]): Switched to use -isEnabled
11086         instead of -_isEnabled.
11087         (-[WebIconDatabase _startUpIconDatabase]): Added.  Extrated from
11088         -init.
11089         (-[WebIconDatabase _shutDownIconDatabase]): Added.  Remove
11090         observers when the icon database is disabled.
11091         * Misc/WebIconDatabaseInternal.h: Added declarations for
11092         -_startUpIconDatabase and -_shutDownIconDatabase.
11093         * Misc/WebIconDatabasePrivate.h: Added declarations for
11094         -isEnabled and -setEnabled:.
11095
11096 2009-01-05  Brady Eidson  <beidson@apple.com>
11097
11098         Reviewed by Jon Honeycutt
11099
11100         Expose setting the last-visit-was-failure flag on a history items in preparation for <rdar://problem/6173319>
11101
11102         * History/WebHistoryItem.mm:
11103         (-[WebHistoryItem _setLastVisitWasFailure:]):
11104         * History/WebHistoryItemPrivate.h:
11105
11106 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
11107
11108         Another blind mac build fix
11109
11110         * WebCoreSupport/WebChromeClient.mm:
11111         (WebChromeClient::contentsSizeChanged):
11112
11113 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
11114
11115         Blind mac build fix
11116
11117         * WebCoreSupport/WebChromeClient.mm:
11118
11119 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
11120
11121         Fix mac build
11122
11123         * WebCoreSupport/WebChromeClient.h:
11124
11125 2009-01-05  Adam Treat  <adam.treat@torchmobile.com>
11126
11127         Reviewed by George Staikos.
11128
11129         Build fix for contentsSizeChanged
11130
11131         * WebCoreSupport/WebChromeClient.h:
11132         * WebCoreSupport/WebChromeClient.mm:
11133         (WebChromeClient::contentsSizeChanged):
11134
11135 2009-01-02  Darin Adler  <darin@apple.com>
11136
11137         Reviewed by Sam Weinig.
11138
11139         Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears
11140         inside its web view when resizing its window
11141         https://bugs.webkit.org/show_bug.cgi?id=23072
11142         rdar://problem/6368028
11143
11144         The first attempt at fixing this did not work.
11145         This time I was able to reproduce the bug and test the fix.
11146
11147         * WebCoreSupport/WebFrameLoaderClient.mm:
11148         (applyAppleDictionaryApplicationQuirkNonInlinePart): Changed the arguments and
11149         function names around a bit to make even less code at the call site.
11150         (applyAppleDictionaryApplicationQuirk): Put the check for whether this is the
11151         Dictionary application in here.
11152         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache): Put a call to
11153         applyAppleDictionaryApplicationQuirk here. This was a case I had missed before,
11154         when the script is cached. This fixes one of the two problems with the initial
11155         patch; the other fix is in WebCore.
11156         (WebFrameLoaderClient::dispatchWillSendRequest): Changed the
11157         applyAppleDictionaryApplicationQuirk call here to work the new simpler way.
11158
11159         * WebView/WebView.mm: Had to add an include due to changes in WebCore header includes.
11160
11161 2009-01-02  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
11162
11163         Reviewed by Darin Adler.
11164
11165         Bug 23060: REGRESSION (r38629): Cannot scroll a WebHTMLView using Home/End/Page up/Page down
11166         <https://bugs.webkit.org/show_bug.cgi?id=23060>
11167         <rdar://problem/6467830>
11168
11169         After r38629, all keyboard events get sent by Editor to the EditorClient, even
11170         if the selection is not editable. If the event's command is unsupported by
11171         WebHTMLView, WebHTMLView mistakenly thinks that the event was handled when it
11172         was not. When using the page up / page down keys, the events generated are of
11173         the form scrollPageUp rather than movePageUp, so they are unsupported by
11174         WebHTMLView and cause this bug to occur.
11175
11176         * WebView/WebHTMLView.mm:
11177         (-[WebHTMLView doCommandBySelector:]):
11178
11179 2009-01-02  Darin Adler  <darin@apple.com>
11180
11181         Reviewed by Oliver Hunt.
11182
11183         Bug 23072: REGRESSION (r37371): In the Dictionary application, scroll bar appears inside its web view when resizing its window
11184         https://bugs.webkit.org/show_bug.cgi?id=23072
11185         rdar://problem/6368028
11186
11187         * WebCoreSupport/WebFrameLoaderClient.mm:
11188         (isAppleDictionaryApplication): Added.
11189         (applyAppleDictionaryApplicationQuirk): Added. Under the right conditions, sets
11190         a flag to ask HTMLFrameElementBase to ignore the scrolling attribute.
11191         (WebFrameLoaderClient::dispatchWillSendRequest): Call the two functions above to
11192         apply the quirk when the relevant script is loaded.
11193
11194 2008-12-26  Dan Bernstein  <mitz@apple.com>
11195
11196         Reviewed by Sam Weinig.
11197
11198         - fix <rdar://problem/6467608> lastVisitWasFailure flag persists in
11199           global history after a successful visit
11200
11201         * History/WebHistory.mm:
11202         (-[WebHistory _visitedURL:withTitle:wasFailure:]): Changed to always
11203         update the wasFailure flag on the HistoryItem.
11204
11205 2008-12-23  Darin Adler  <darin@apple.com>
11206
11207         Reviewed by Alexey Proskuryakov (a slightly earlier version).
11208
11209         - fix https://bugs.webkit.org/show_bug.cgi?id=22976
11210           crash due to Mail's use of WebArchive and WebResource on non-main thread
11211
11212         * Misc/WebKitLogging.h: Improved comments for ASSERT_MAIN_THREAD. Got rid of
11213         WebKitRunningOnMainThread function, which was just a cover for pthread_main_np.
11214         * Misc/WebKitLogging.m: Ditto.
11215
11216         * Misc/WebKitVersionChecks.h: Added a version after which we won't do the
11217         main thread workaround.
11218
11219         * Misc/WebNSObjectExtras.h: Added a new method, _webkit_getPropertyOnMainThread:,
11220         which performs a selector on the main thread, waits for it to complete, and then
11221         returns the value on the caller thread.
11222         * Misc/WebNSObjectExtras.mm: Added.
11223
11224         * WebView/WebArchive.mm:
11225         (-[WebArchive init]): Added WebCoreThreadViolationCheck.
11226         (-[WebArchive initWithMainResource:subresources:subframeArchives:]): Perform
11227         initialization on main thread if needMailThreadWorkaround is true.
11228         Also added WebCoreThreadViolationCheck.
11229         (-[WebArchive initWithData:]): Added WebCoreThreadViolationCheck.
11230         (-[WebArchive mainResource]): Get property on main thread if
11231         needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
11232         (-[WebArchive subresources]): Ditto.
11233         (-[WebArchive subframeArchives]): Ditto.
11234         (-[WebArchive data]): Ditto.
11235         (-[WebArchive _initWithCoreLegacyWebArchive:]): Added WebCoreThreadViolationCheck.
11236         (-[WebArchive _coreLegacyWebArchive]): Ditto.
11237         (-[WebArchive _initWithArguments:]): Added. Used to implement the cross-thread
11238         version of initWithMainResource above.
11239
11240         * WebView/WebResource.mm:
11241         (-[WebResource initWithCoder:]): Added WebCoreThreadViolationCheck.
11242         (-[WebResource data]): Get property on main thread if
11243         needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
11244         (-[WebResource URL]): Ditto.
11245         (-[WebResource MIMEType]): Ditto.
11246         (-[WebResource textEncodingName]): Ditto.
11247         (-[WebResource frameName]): Ditto.
11248         (-[WebResource _ignoreWhenUnarchiving]): Ditto.
11249         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
11250         Perform initialization on main thread if needMailThreadWorkaround is true.
11251         Also added WebCoreThreadViolationCheck.
11252         (-[WebResource _suggestedFilename]): Added. Helper for _fileWrapperRepresentation.
11253         (-[WebResource _fileWrapperRepresentation]): Rewrote to use methods instead of
11254         getting at coreResource directly.
11255         (-[WebResource _response]): Get property on main thread if
11256         needMailThreadWorkaround is true. Also added WebCoreThreadViolationCheck.
11257         (-[WebResource _stringValue]): Ditto.
11258         (+[WebResource _needMailThreadWorkaroundIfCalledOffMainThread]): Added.
11259         (-[WebResource _initWithArguments:]): Added. Used to implement the cross-thread
11260         version of _initWithData above.
11261
11262         * WebView/WebResourceInternal.h: Changed to include WebResourcePrivate.h since internal
11263         clients have access to the SPI as well as the API. Added definition of MAIL_THREAD_WORKAROUND
11264         and the needMainThreadWorkaround helper function.
11265
11266         * Misc/WebIconDatabase.mm: Removed include of now-defunct FoundationExtras.h
11267         file. This probably fixes clean builds.
11268         * WebCoreSupport/WebIconDatabaseClient.mm: Ditto.
11269
11270         * WebCoreSupport/WebFrameLoaderClient.mm: Removed include of WebResourcePrivate.h,
11271         since it's not actually used.
11272         * WebView/WebDataSource.mm: Ditto.
11273         * WebView/WebHTMLRepresentation.mm: Ditto.
11274
11275 2008-12-23  Darin Adler  <darin@apple.com>
11276
11277         Reviewed by Dan Bernstein.
11278
11279         - fix https://bugs.webkit.org/show_bug.cgi?id=22979
11280           crash seen in -[WebView drawsBackground] when quitting
11281           <rdar://problem/6464601>
11282
11283         * WebView/WebView.mm:
11284         (-[WebView drawsBackground]): Added comment and a null check for _private.
11285
11286 2008-12-22  Kevin Decker  <kdecker@apple.com>
11287
11288         Reviewed by Anders Carlsson.
11289
11290         <rdar://problem/6449588> REGRESSION (r38279-r38280): Minimize them remaximize a window with a flash plugin, plugin doesn't resume at full speed
11291         
11292         * Plugins/WebBaseNetscapePluginView.mm:
11293         (-[WebBaseNetscapePluginView windowDidDeminiaturize:]): Deminiaturizing should restart timers, not stop timers.
11294
11295 2008-12-19  Geoffrey Garen  <ggaren@apple.com>
11296
11297         Reviewed by Darin Adler, Adele Peterson, Brady Eidson.
11298         
11299         Added SPI for getting an unsorted vector of all items in history.
11300         
11301         * History/WebHistory.h:
11302         * History/WebHistory.mm:
11303         (-[WebHistory allItems]):
11304
11305 2008-12-18  Dan Bernstein  <mitz@apple.com>
11306
11307         Reviewed by Sam Weinig.
11308
11309         - implement FrameLoaderClient::shouldUseCredentialStorage() by calling
11310           a new resource load delegae method.
11311
11312         * WebCoreSupport/WebFrameLoaderClient.h:
11313         * WebCoreSupport/WebFrameLoaderClient.mm:
11314         (WebFrameLoaderClient::shouldUseCredentialStorage): Added. Calls the
11315         delegate method. If the method is unimplemented, returns true for
11316         backwards compatibility.
11317         * WebView/WebView.mm: 
11318         (-[WebView _cacheResourceLoadDelegateImplementations]): Initialize the
11319         shouldUseCredentialStorageFunc member.
11320         (CallResourceLoadDelegateReturningBoolean): Added.
11321         * WebView/WebViewInternal.h:
11322         * WebView/WebResourceLoadDelegatePrivate.h: Declared the delegate method
11323         -webView:resource:shouldUseCredentialStorageForDataSource:.
11324
11325 2008-12-18  Cameron Zwarich  <zwarich@apple.com>
11326
11327         Reviewed by Jonathan Honeycutt.
11328
11329         Fix an apparent typo in r39385 that is causing lots of crashes.
11330
11331         * WebCoreSupport/WebFrameLoaderClient.mm:
11332         (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
11333
11334 2008-12-18  Brady Eidson  <beidson@apple.com>
11335
11336         Reviewed by John Sullivan
11337
11338         Initial visit to a website creates history items that start with a visit count of
11339         zero instead of one
11340
11341         * History/WebHistory.mm:
11342         (-[WebHistoryPrivate visitedURL:withTitle:]): Set the visit count on new items
11343
11344         * History/WebHistoryItem.mm:
11345         (-[WebHistoryItem _setVisitCount:]): Call through to the WebCore item
11346         * History/WebHistoryItemInternal.h:
11347
11348 2008-12-18  Sam Weinig  <sam@webkit.org>
11349
11350         Reviewed by John Sullivan.
11351
11352         Implement FrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout() by calling
11353         a new private frame load delegate method.
11354
11355         * WebCoreSupport/WebFrameLoaderClient.h:
11356         * WebCoreSupport/WebFrameLoaderClient.mm:
11357         (WebFrameLoaderClient::dispatchDidFirstVisuallyNonEmptyLayout):
11358         * WebView/WebView.mm:
11359         (-[WebView _cacheFrameLoadDelegateImplementations]):
11360         * WebView/WebViewInternal.h:
11361         * WebView/WebViewPrivate.h:
11362
11363 2008-12-16  Antti Koivisto  <antti@apple.com>
11364
11365         Reviewed by John Sullivan.
11366         
11367         Add version check for shift-reload behavior.
11368
11369         * Misc/WebKitVersionChecks.h:
11370         * WebView/WebFrame.mm:
11371         (-[WebFrame reload]):
11372
11373 2008-12-16  Anders Carlsson  <andersca@apple.com>
11374
11375         Reviewed by Dan Bernstein.
11376
11377         Start sending keyboard events to the plug-in host.
11378         
11379         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
11380         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
11381         (WebKit::NetscapePluginInstanceProxy::keyEvent):
11382         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
11383         (-[WebHostedNetscapePluginView keyDown:]):
11384         (-[WebHostedNetscapePluginView keyUp:]):
11385         * Plugins/Hosted/WebKitPluginHost.defs:
11386
11387 2008-12-16  Anders Carlsson  <andersca@apple.com>
11388
11389         Reviewed by Kevin Decker.
11390
11391         <rdar://problem/6450538>
11392         
11393         Fix flag enumeration.
11394         
11395         * Plugins/Hosted/WebKitPluginHostTypes.h:
11396
11397 2008-12-16  Anders Carlsson  <andersca@apple.com>
11398
11399         Reviewed by Kevin Decker.
11400
11401         Instead of passing a gazillion booleans to WKPCLoadURL, pass a single set of flags.
11402         
11403         * Plugins/Hosted/NetscapePluginHostProxy.mm:
11404         (WKPCLoadURL):
11405         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
11406         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
11407         (WebKit::NetscapePluginInstanceProxy::loadURL):
11408         * Plugins/Hosted/WebKitPluginClient.defs:
11409         * Plugins/Hosted/WebKitPluginHostTypes.h:
11410
11411 2008-12-16  Anders Carlsson  <andersca@apple.com>
11412
11413         Reviewed by Kevin Decker.
11414
11415         Add trailing null to headers to avoid a crash in the plug-in host.
11416         
11417         * Plugins/Hosted/HostedNetscapePluginStream.mm:
11418         (WebKit::HostedNetscapePluginStream::didReceiveResponse):
11419
11420 2008-12-15  Mark Rowe  <mrowe@apple.com>
11421
11422         Rubber-stamped by Cameron Zwarich.
11423
11424         <rdar://problem/6289933> Change WebKit-related projects to build with GCC 4.2 on Leopard.
11425
11426         * Configurations/Base.xcconfig:
11427         * Configurations/DebugRelease.xcconfig:
11428
11429 2008-12-15  Stephanie Lewis  <slewis@apple.com>
11430
11431         Fix build.
11432
11433         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
11434
11435 2008-12-15  Anders Carlsson  <andersca@apple.com>
11436
11437         Reviewed by Sam Weinig.
11438
11439         Change InstantiatePlugin to be asynchronous so we won't deadlock if the plug-in tries to call
11440         back into us while it's being instantiated.
11441         
11442         * Plugins/Hosted/NetscapePluginHostManager.mm:
11443         (WebKit::NetscapePluginHostManager::instantiatePlugin):
11444         * Plugins/Hosted/NetscapePluginHostProxy.h:
11445         (WebKit::NetscapePluginHostProxy::clientPort):
11446         * Plugins/Hosted/NetscapePluginHostProxy.mm:
11447         (WKPCInstantiatePluginReply):
11448         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
11449         (WebKit::NetscapePluginInstanceProxy::Reply::):
11450         (WebKit::NetscapePluginInstanceProxy::Reply::Reply):
11451         (WebKit::NetscapePluginInstanceProxy::Reply::~Reply):
11452         (WebKit::NetscapePluginInstanceProxy::InstantiatePluginReply::InstantiatePluginReply):
11453         (WebKit::NetscapePluginInstanceProxy::setCurrentReply):
11454         (WebKit::NetscapePluginInstanceProxy::waitForReply):
11455         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
11456         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
11457         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply):
11458         * Plugins/Hosted/WebKitPluginClient.defs:
11459         * Plugins/Hosted/WebKitPluginHost.defs:
11460
11461 2008-12-15  Anders Carlsson  <andersca@apple.com>
11462
11463         Reviewed by Darin Adler.
11464
11465         Let WebKit generate a plug-in ID instead of having the plug-in host do it.
11466
11467         * Plugins/Hosted/NetscapePluginHostManager.mm:
11468         (WebKit::NetscapePluginHostManager::instantiatePlugin):
11469         Create the plug-in proxy before instantiating the plug-in.
11470         
11471         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
11472         (WebKit::NetscapePluginInstanceProxy::create):
11473         (WebKit::NetscapePluginInstanceProxy::setRenderContextID):
11474         (WebKit::NetscapePluginInstanceProxy::setUseSoftwareRenderer):
11475         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
11476         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
11477         * Plugins/Hosted/WebKitPluginHost.defs:
11478
11479 2008-12-15  Anders Carlsson  <andersca@apple.com>
11480
11481         Reviewed by Sam Weinig.
11482
11483         LoadURL doesn't need to be asynchronous.
11484         
11485         * Plugins/Hosted/NetscapePluginHostProxy.mm:
11486         (WKPCLoadURL):
11487         * Plugins/Hosted/WebKitPluginClient.defs:
11488         * Plugins/Hosted/WebKitPluginHost.defs:
11489
11490 2008-12-15  Antti Koivisto  <antti@apple.com>
11491
11492         Reviewed by Darin Adler.
11493         
11494         - Add [WebFrame reloadFromOrigin] for performing end-to-end reload.
11495         - Add corresponding IBAction to WebView.
11496         - Temporarily make [WebFrame reload] trigger end-to-end reload if shift modifier is pressed when it is called.
11497
11498         * WebView/WebFrame.h:
11499         * WebView/WebFrame.mm:
11500         (-[WebFrame reload]):
11501         (-[WebFrame reloadFromOrigin]): 
11502         * WebView/WebFramePrivate.h: Match the FrameLoadType enum in WebCore.
11503         * WebView/WebView.h:
11504         * WebView/WebView.mm:
11505         (-[WebView reloadFromOrigin:]):
11506
11507 2008-12-14  Dan Bernstein  <mitz@apple.com>
11508
11509         Reviewed by Darin Adler.
11510
11511         - fix <rdar://problem/3258561> WebHistoryAllItemsRemovedNotification
11512           should add items to userInfo
11513
11514         * History/WebHistory.mm:
11515         (-[WebHistoryPrivate allItems]): Added this helper method, which returns
11516         all values in the _entriesByURL dictionary.
11517         (-[WebHistory removeAllItems]): Changed to send the array of all items
11518         in the notification.
11519
11520 2008-12-13  Darin Adler  <darin@apple.com>
11521
11522         - <rdar://problem/6441035> WebTextIterator class not exported in WebKit
11523
11524         * WebKit.exp: Added the class. We forgot to export it when we added
11525         the WebTextIterator SPI.
11526
11527 2008-12-12  Darin Adler  <darin@apple.com>
11528
11529         Rubber stamped by Adam Roben.
11530
11531         - fix <rdar://problem/5648301> Can't tab around to text fields in Safari
11532           login sheet after clicking static text, due to AppKit key loop change
11533
11534         * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib: Removed.
11535         * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib: Added.
11536         * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib: Removed.
11537         * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
11538         Set nextKeyView of the selectable static texts to the editable text.
11539         Updated nib format.
11540
11541 2008-12-12  Stephanie Lewis  <slewis@apple.com>
11542
11543         Reviewed by Geoff Garen.
11544
11545         Shrink Cache Sizes.
11546
11547         * WebView/WebView.mm:
11548         (+[WebView _setCacheModel:]):
11549
11550 2008-12-12  Anders Carlsson  <andersca@apple.com>
11551
11552         Reviewed by Tim Hatcher.
11553
11554         Don't try to free the dummy "1" port state.
11555         
11556         * Plugins/WebNetscapePluginView.mm:
11557         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
11558         (-[WebNetscapePluginView updateAndSetWindow]):
11559
11560 2008-12-11  Cameron Zwarich  <zwarich@apple.com>
11561
11562         Rubber-stamped by Mark Rowe.
11563
11564         Roll out r39212 due to assertion failures during layout tests, multiple
11565         layout test failures, memory leaks, and obvious incorrectness.
11566
11567         * WebView/WebPreferenceKeysPrivate.h:
11568         * WebView/WebPreferences.mm:
11569         (-[WebPreferences fullDocumentTeardownEnabled]):
11570         * WebView/WebPreferencesPrivate.h:
11571
11572 2008-12-11  Stephanie Lewis  <slewis@apple.com>
11573
11574         Fix build.
11575
11576         * WebView/WebView.mm:
11577
11578 2008-12-11  Stephanie Lewis  <slewis@apple.com>
11579
11580         Reviewed by Oliver Hunt.
11581
11582         Empty Web cache before quitting a debug build in order
11583         to report accurate CachedResource leaks.
11584
11585         * WebView/WebView.mm:
11586         (-[WebView _close]):
11587
11588 2008-12-11  Anders Carlsson  <andersca@apple.com>
11589
11590         Fix Tiger build.
11591
11592         * Misc/WebNSDataExtras.h:
11593
11594 2008-12-11  Anders Carlsson  <andersca@apple.com>
11595
11596         Reviewed by Cameron Zwarich.
11597
11598         https://bugs.webkit.org/show_bug.cgi?id=22797
11599         REGRESSION: Crash at http://news.cnet.com/8301-17939_109-10119149-2.html
11600
11601         Make sure to protect the stream because destroyStream can otherwise cause it to be deleted.
11602         
11603         * Plugins/WebBaseNetscapePluginStream.mm:
11604         (WebNetscapePluginStream::destroyStreamWithReason):
11605
11606 2008-12-10  Glenn Wilson  <gwilson@google.com>
11607
11608         Reviewed by Adam Roben.
11609
11610         Added new methods for overriding default WebPreference values
11611         and for resetting preferences to their defaults.
11612         https://bugs.webkit.org/show_bug.cgi?id=20534
11613
11614         * WebView/WebPreferenceKeysPrivate.h:
11615         * WebView/WebPreferences.mm:
11616         (-[WebPreferences resetToDefaults]): new method
11617         (-[WebPreferences overridePreference:flag:]): new method
11618         * WebView/WebPreferencesPrivate.h: new method signatures
11619
11620 2008-12-10  Anders Carlsson  <andersca@apple.com>
11621
11622         Reviewed by Darin Adler.
11623
11624         Implement support for NPN_PostURL/NPN_PostURLNotify in WebKit.
11625         
11626         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
11627         Add stopAllStreams.
11628         
11629         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
11630         (WebKit::NetscapePluginInstanceProxy::stopAllStreams):
11631         Factored out this from ::destroy.
11632         
11633         (WebKit::NetscapePluginInstanceProxy::destroy):
11634         Call stopAllStreams().
11635         
11636         (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
11637         Ditto.
11638         
11639         (WebKit::NetscapePluginInstanceProxy::loadURL):
11640         Handle post being true. This code has been copied from WebNetscapePluginView.mm (for now).
11641
11642 2008-12-10  Anders Carlsson  <andersca@apple.com>
11643
11644         Reviewed by Darin Adler.
11645
11646         Move two NSData category methods to WebNSDataExtras.m.
11647         
11648         * Misc/WebNSDataExtras.h:
11649         * Misc/WebNSDataExtras.m:
11650         (-[NSData _web_startsWithBlankLine]):
11651         (-[NSData _web_locationAfterFirstBlankLine]):
11652         * Plugins/WebNetscapePluginView.mm:
11653
11654 2008-12-10  Alice Liu  <alice.liu@apple.com>
11655
11656         fixed https://bugs.webkit.org/show_bug.cgi?id=20685
11657
11658         Reviewed by Darin Adler.
11659
11660         * Misc/WebNSPasteboardExtras.mm:
11661         Ask image for its file extension instead of falling back on MIME type and file path.
11662         Also moved this code to before setting the pasteboard data so as not to set any if
11663         no extension can be determined.
11664         (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
11665
11666         * WebView/WebHTMLView.mm:
11667         Fixed a separate but related long-standing bug of how the filename for the promised
11668         drag data is determined by asking the image for a proper file extension. 
11669         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
11670
11671 2008-12-09  Anders Carlsson  <andersca@apple.com>
11672
11673         Reviewed by Darin Adler.
11674
11675         Fix typecast.
11676
11677         * WebView/WebHTMLView.mm:
11678         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
11679
11680 2008-12-09  Anders Carlsson  <andersca@apple.com>
11681
11682         Reviewed by Darin Adler.
11683
11684         Implement software rendering of hosted plug-ins.
11685         
11686         * Plugins/Hosted/NetscapePluginHostProxy.mm:
11687         (WKPCInvalidateRect):
11688         New MiG function. This is called by the plug-in host when it has drawn something.
11689         
11690         * Plugins/Hosted/WebHostedNetscapePluginView.h:
11691         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
11692         (-[WebHostedNetscapePluginView createPlugin]):
11693         Create a software renderer.
11694         
11695         (-[WebHostedNetscapePluginView destroyPlugin]):
11696         Destroy the software renderer.
11697         
11698         (-[WebHostedNetscapePluginView drawRect:]):
11699         Draw using the software renderer.
11700         
11701         * Plugins/Hosted/WebKitPluginClient.defs:
11702         Add InvalidateRect.
11703
11704 2008-12-09  Brett Wilson  <brettw@chromium.org>
11705
11706         Reviewed by Dave Hyatt.
11707
11708         https://bugs.webkit.org/show_bug.cgi?id=22177
11709
11710         Add a callback on ChromeClient that the state of form elements on
11711         the page has changed. This is to allow clients implementing session
11712         saving to know when the current state is dirty.
11713
11714         * WebCoreSupport/WebChromeClient.h:
11715         (WebChromeClient::formStateDidChange):
11716
11717 2008-12-09  Anders Carlsson  <andersca@apple.com>
11718
11719         Reviewed by Dan Bernstein.
11720
11721         Make sure to pause null events for hosted plug-ins as well.
11722
11723         * WebView/WebHTMLView.mm:
11724         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
11725
11726 2008-12-09  Anders Carlsson  <andersca@apple.com>
11727
11728         Reviewed by Darin Adler.
11729
11730         * Plugins/Hosted/NetscapePluginHostProxy.h:
11731         * Plugins/Hosted/NetscapePluginHostProxy.mm:
11732         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
11733         (WebKit::NetscapePluginHostProxy::~NetscapePluginHostProxy):
11734         Unfortunately we can't use a libdispatch source right now, because of <rdar://problem/6393180>.
11735
11736 2008-12-09  Timothy Hatcher  <timothy@apple.com>
11737
11738         Implement a few methods needed to keep Dictionary.app working on Leopard.
11739
11740         <rdar://problem/6002160> Internal changes to WebKit in Safari 4
11741         Developer Preview might break Dictionary
11742
11743         Reviewed by Dan Bernstein.
11744
11745         * WebView/WebFrame.mm:
11746         (-[WebFrame convertNSRangeToDOMRange:]): Added. Calls _convertNSRangeToDOMRange.
11747         (-[WebFrame convertDOMRangeToNSRange:]): Added. Calls _convertDOMRangeToNSRange.
11748         * WebView/WebHTMLView.mm:
11749         (-[WebHTMLView _bridge]): Added. Returns the WebFrame, which has the methods
11750         that Dictionary.app is using.
11751
11752 2008-12-08  Anders Carlsson  <andersca@apple.com>
11753
11754         Reviewed by Darin Adler.
11755
11756         More work towards getting NPN_GetURL working.
11757         
11758         * Plugins/Hosted/HostedNetscapePluginStream.h:
11759         Inherit from NetscapePlugInStreamLoaderClient.
11760         
11761         (WebKit::HostedNetscapePluginStream::streamID):
11762         * Plugins/Hosted/HostedNetscapePluginStream.mm:
11763         (WebKit::HostedNetscapePluginStream::startStream):
11764         Keep track of the resposne URL and the MIME type. Pass the response URL to the 
11765         plug-in host.
11766         
11767         (WebKit::HostedNetscapePluginStream::didFinishLoading):
11768         Disconnect the stream.
11769         
11770         (WebKit::HostedNetscapePluginStream::start):
11771         Create a plug-in stream loader and start loading.
11772         
11773         (WebKit::HostedNetscapePluginStream::stop):
11774         Cancel the load.
11775         
11776         * Plugins/Hosted/NetscapePluginHostProxy.mm:
11777         (WKPCLoadURL):
11778         Fix the parameter order.
11779         
11780         (WKPCCancelLoadURL):
11781         New function that cancels a load of a stream with a given reason.
11782         
11783         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
11784         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
11785         (WebKit::NetscapePluginInstanceProxy::destroy):
11786         Stop the streams.
11787         
11788         (WebKit::NetscapePluginInstanceProxy::pluginStream):
11789         Return a plug-in stream given a stream ID.
11790         
11791         (WebKit::NetscapePluginInstanceProxy::disconnectStream):
11792         Remove the stream from the streams map.
11793         
11794         (WebKit::NetscapePluginInstanceProxy::loadRequest):
11795         Create a stream and load it.
11796         
11797         * Plugins/Hosted/WebKitPluginClient.defs:
11798         Add CancelLoadURL.
11799         
11800         * Plugins/Hosted/WebKitPluginHost.defs:
11801         Add responseURL to StartStream.
11802         
11803         * Plugins/WebBaseNetscapePluginView.h:
11804         * Plugins/WebBaseNetscapePluginView.mm:
11805         (-[WebBaseNetscapePluginView pluginPackage]):
11806         Move this down to the base class from WebNetscapePluginView.
11807         
11808         * Plugins/WebNetscapePluginView.h:
11809         * Plugins/WebNetscapePluginView.mm:
11810
11811 2008-12-08  Dan Bernstein  <mitz@apple.com>
11812
11813         Reviewed by John Sullivan.
11814
11815         - WebKit/mac part of tracking the global history item for a WebView
11816
11817         * WebView/WebView.mm:
11818         (-[WebView _globalHistoryItem]): Added. Returns the page's global
11819         history item.
11820         * WebView/WebViewPrivate.h:
11821
11822 2008-12-06  Simon Fraser  <simon.fraser@apple.com>
11823
11824         Reviewed by Dave Hyatt
11825
11826         https://bugs.webkit.org/show_bug.cgi?id=15671
11827
11828         VisiblePosition::caretRect() was renaemd to absoluteCaretBounds().
11829         
11830         * WebView/WebFrame.mm:
11831         (-[WebFrame _caretRectAtNode:offset:affinity:]):
11832
11833 2008-12-06  David Kilzer  <ddkilzer@apple.com>
11834
11835         Bug 22666: Clean up data structures used when collecting URLs of subresources for webarchives
11836
11837         <https://bugs.webkit.org/show_bug.cgi?id=22666>
11838
11839         Reviewed by Darin Adler.
11840
11841         * DOM/WebDOMOperations.mm:
11842         (-[DOMNode _subresourceURLs]): Changed from using Vector<KURL> to
11843         ListHashSet<KURL> when calling WebCore::Node::getSubresourceURLs().
11844
11845 2008-12-05  Alexey Proskuryakov  <ap@webkit.org>
11846
11847         Reviewed by Darin Adler.
11848
11849         <rdar://problem/6405599> Tiger Mail crashes when using "Mail Contents of This Page"
11850         in Safari before opening a mail message in Mail
11851
11852         * Carbon/CarbonWindowAdapter.m: Removed.
11853         * Carbon/CarbonWindowAdapter.mm: Copied from WebKit/mac/Carbon/CarbonWindowAdapter.m.
11854         (+[CarbonWindowAdapter initialize]):
11855         * History/WebBackForwardList.mm:
11856         (+[WebBackForwardList initialize]):
11857         * History/WebHistoryItem.mm:
11858         (+[WebHistoryItem initialize]):
11859         * Misc/WebElementDictionary.mm:
11860         (+[WebElementDictionary initialize]):
11861         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
11862         (+[WebHostedNetscapePluginView initialize]):
11863         * Plugins/WebBaseNetscapePluginView.mm:
11864         * Plugins/WebBasePluginPackage.m: Removed.
11865         * Plugins/WebBasePluginPackage.mm: Copied from WebKit/mac/Plugins/WebBasePluginPackage.m.
11866         (+[WebBasePluginPackage initialize]):
11867         * Plugins/WebNetscapePluginView.mm:
11868         (+[WebNetscapePluginView initialize]):
11869         * WebCoreSupport/WebEditorClient.mm:
11870         (+[WebEditCommand initialize]):
11871         * WebCoreSupport/WebFrameLoaderClient.mm:
11872         * WebView/WebArchive.mm:
11873         (+[WebArchivePrivate initialize]):
11874         * WebView/WebDataSource.mm:
11875         (+[WebDataSourcePrivate initialize]):
11876         * WebView/WebHTMLView.mm:
11877         (+[WebHTMLViewPrivate initialize]):
11878         (+[WebHTMLView initialize]):
11879         * WebView/WebResource.mm:
11880         (+[WebResourcePrivate initialize]):
11881         * WebView/WebView.mm:
11882         (+[WebViewPrivate initialize]):
11883         Call JSC::initializeThreading();
11884
11885 2008-12-04  Stephanie Lewis  <slewis@apple.com>
11886
11887         Fix build.
11888
11889         * Plugins/Hosted/NetscapePluginHostProxy.mm:
11890         (WKPCLoadURL):
11891
11892 2008-12-04  Anders Carlsson  <andersca@apple.com>
11893
11894         Reviewed by Sam Weinig.
11895
11896         More work on streams.
11897         
11898         * Plugins/Hosted/HostedNetscapePluginStream.h: Added.
11899         (WebKit::HostedNetscapePluginStream::create):
11900         * Plugins/Hosted/HostedNetscapePluginStream.mm: Added.
11901         (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
11902         (WebKit::HostedNetscapePluginStream::startStreamWithResponse):
11903         (WebKit::HostedNetscapePluginStream::startStream):
11904         (WebKit::HostedNetscapePluginStream::didReceiveData):
11905         (WebKit::HostedNetscapePluginStream::didFinishLoading):
11906         (WebKit::HostedNetscapePluginStream::didReceiveResponse):
11907         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
11908         (WebKit::NetscapePluginInstanceProxy::pluginView):
11909         (WebKit::NetscapePluginInstanceProxy::hostProxy):
11910         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
11911         (WebKit::NetscapePluginInstanceProxy::PluginRequest::PluginRequest):
11912         (WebKit::NetscapePluginInstanceProxy::PluginRequest::requestID):
11913         (WebKit::NetscapePluginInstanceProxy::PluginRequest::request):
11914         (WebKit::NetscapePluginInstanceProxy::PluginRequest::frameName):
11915         (WebKit::NetscapePluginInstanceProxy::PluginRequest::didStartFromUserGesture):
11916         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
11917         (WebKit::NetscapePluginInstanceProxy::performRequest):
11918         (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
11919         (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
11920         (WebKit::NetscapePluginInstanceProxy::loadRequest):
11921         * Plugins/Hosted/WebKitPluginHost.defs:
11922
11923 2008-12-04  Anders Carlsson  <andersca@apple.com>
11924
11925         Reviewed by Sam Weinig.
11926
11927         Start implementing WKPCLoadURL. Currently this has copied a lot of code from WebNetscapePluginView
11928         but once we have a more complete implementation of NPStreams we can start refactoring things so that the
11929         implementations can share more code.
11930         
11931         * Plugins/Hosted/NetscapePluginHostProxy.mm:
11932         (WKPCLoadURL):
11933         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
11934         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
11935         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
11936         (WebKit::NetscapePluginInstanceProxy::loadURL):
11937         (WebKit::NetscapePluginInstanceProxy::performRequest):
11938         (WebKit::NetscapePluginInstanceProxy::requestTimerFired):
11939         (WebKit::NetscapePluginInstanceProxy::loadRequest):
11940         * Plugins/Hosted/WebKitPluginClient.defs:
11941         * Plugins/Hosted/WebKitPluginHost.defs:
11942
11943 2008-12-04  Anders Carlsson  <andersca@apple.com>
11944
11945         Reviewed by Dan Bernstein.
11946         
11947         Move requestWithURLCString to WebBaseNetscapePluginView.
11948         
11949         * Plugins/WebBaseNetscapePluginView.h:
11950         * Plugins/WebBaseNetscapePluginView.mm:
11951         (-[WebBaseNetscapePluginView requestWithURLCString:]):
11952         * Plugins/WebNetscapePluginView.mm:
11953
11954 2008-12-03  Anders Carlsson  <andersca@apple.com>
11955
11956         Reviewed by Sam Weinig.
11957
11958         Move WebPluginRequest to its own file.
11959         
11960         * Plugins/WebNetscapePluginView.mm:
11961         * Plugins/WebPluginRequest.h: Added.
11962         * Plugins/WebPluginRequest.m: Added.
11963         (-[WebPluginRequest initWithRequest:frameName:notifyData:sendNotification:didStartFromUserGesture:]):
11964         (-[WebPluginRequest dealloc]):
11965         (-[WebPluginRequest request]):
11966         (-[WebPluginRequest frameName]):
11967         (-[WebPluginRequest isCurrentEventUserGesture]):
11968         (-[WebPluginRequest sendNotification]):
11969         (-[WebPluginRequest notifyData]):
11970
11971 2008-12-03  Anders Carlsson  <andersca@apple.com>
11972
11973         Handle the CA model.
11974
11975         * Plugins/WebNetscapePluginView.mm:
11976         (-[WebNetscapePluginView setWindowIfNecessary]):
11977
11978 2008-12-03  Anders Carlsson  <andersca@apple.com>
11979
11980         Reviewed by Kevin Decker.
11981         
11982         <rdar://problem/6412293>
11983         Call NPP_SetWindow for CA plug-ins.
11984         
11985         * Plugins/WebNetscapePluginView.mm:
11986         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
11987         (-[WebNetscapePluginView restorePortState:]):
11988         (-[WebNetscapePluginView isNewWindowEqualToOldWindow]):
11989         (-[WebNetscapePluginView updateAndSetWindow]):
11990         (-[WebNetscapePluginView setWindowIfNecessary]):
11991
11992 2008-12-03  Anders Carlsson  <andersca@apple.com>
11993
11994         Fix the release build.
11995
11996         * Plugins/Hosted/NetscapePluginHostProxy.mm:
11997         (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
11998
11999 2008-12-03  Anders Carlsson  <andersca@apple.com>
12000
12001         Reviewed by Dan Bernstein.
12002
12003         <rdar://problem/6412234>
12004         Don't crash if we can't launch the plug-in host.
12005
12006         * Plugins/Hosted/NetscapePluginHostManager.mm:
12007         (WebKit::NetscapePluginHostManager::instantiatePlugin):
12008
12009 2008-12-02  Anders Carlsson  <andersca@apple.com>
12010
12011         Reviewed by Dan Bernstein.
12012
12013         Start processing messages sent to the client port.
12014         
12015         * Plugins/Hosted/NetscapePluginHostProxy.h:
12016         * Plugins/Hosted/NetscapePluginHostProxy.mm:
12017         Add a map from ports to plug-in proxies. Turn the set of instances into a map from
12018         pluginID to instance proxy.
12019         
12020         (WKPCStatusText):
12021         Look up the right instance proxy and call status().
12022         
12023         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
12024         (WebKit::NetscapePluginInstanceProxy::pluginID):
12025         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
12026         (WebKit::NetscapePluginInstanceProxy::status):
12027         Implement this.
12028         
12029         * Plugins/Hosted/WebKitPluginClient.defs:
12030         Add the plug-in ID to StatusText.
12031
12032 2008-12-02  Gregory Hughes  <ghughes@apple.com>
12033
12034         Reviewed by Beth Dakin.
12035
12036         Bug 22513: ZOOM: text selection does not send correct zoom bounds
12037
12038         When zoomed, text selection must send the zoom bounds in flipped
12039         screen coordinates.
12040
12041         * WebCoreSupport/WebViewFactory.mm:
12042         (-[WebViewFactory accessibilityConvertScreenRect:]):
12043
12044 2008-12-02  Anders Carlsson  <andersca@apple.com>
12045
12046         Reviewed by Dan Bernstein.
12047
12048         Create a client mach port and pass it to the plug-in host.
12049         
12050         * Plugins/Hosted/NetscapePluginHostManager.h:
12051         * Plugins/Hosted/NetscapePluginHostManager.mm:
12052         (WebKit::NetscapePluginHostManager::hostForPackage):
12053         (WebKit::NetscapePluginHostManager::spawnPluginHost):
12054         * Plugins/Hosted/NetscapePluginHostProxy.h:
12055         * Plugins/Hosted/NetscapePluginHostProxy.mm:
12056         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
12057         * Plugins/Hosted/WebKitPluginHost.defs:
12058
12059 2008-12-02  Anders Carlsson  <andersca@apple.com>
12060
12061         Reviewed by Sam Weinig.
12062
12063         Let the plug-in views know if the plug-in host crashes.
12064         
12065         * Plugins/Hosted/NetscapePluginHostManager.h:
12066         * Plugins/Hosted/NetscapePluginHostManager.mm:
12067         (WebKit::NetscapePluginHostManager::instantiatePlugin):
12068         * Plugins/Hosted/NetscapePluginHostProxy.h:
12069         * Plugins/Hosted/NetscapePluginHostProxy.mm:
12070         (WebKit::NetscapePluginHostProxy::pluginHostDied):
12071         (WebKit::NetscapePluginHostProxy::addPluginInstance):
12072         (WebKit::NetscapePluginHostProxy::removePluginInstance):
12073         
12074         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
12075         (WebKit::NetscapePluginInstanceProxy::create):
12076         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
12077         Keep a pointer to the host proxy.
12078         
12079         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
12080         Add the instance to the host set.
12081         
12082         (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
12083         Remove the instance form the host set.
12084         
12085         (WebKit::NetscapePluginInstanceProxy::pluginHostDied):
12086         Tell the plug-in view that the plug-in died.
12087
12088         * Plugins/Hosted/WebHostedNetscapePluginView.h:
12089         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
12090         (-[WebHostedNetscapePluginView createPlugin]):
12091         Pass the plug-in view to the instantiatePlugin.
12092         
12093         (-[WebHostedNetscapePluginView pluginHostDied]):
12094         Handle the plug-in host crashing.
12095         
12096         (-[WebHostedNetscapePluginView drawRect:]):
12097         Fill the plug-in view with a nice red shade if the plug-in crashes.
12098
12099 2008-12-01  Anders Carlsson  <andersca@apple.com>
12100
12101         Reviewed by Dan Bernstein.
12102
12103         Recover if the plug-in host dies and we try to instantiate another plugin before we get the port death notification
12104         
12105         * Plugins/Hosted/NetscapePluginHostManager.h:
12106         * Plugins/Hosted/NetscapePluginHostManager.mm:
12107         (WebKit::NetscapePluginHostManager::pluginHostDied):
12108         Remove the plug-in host from the map.
12109         
12110         (WebKit::NetscapePluginHostManager::instantiatePlugin):
12111         NetscapePluginHostProxy is no longer refcounted.
12112
12113         * Plugins/Hosted/NetscapePluginHostProxy.h:
12114         This is no longer refcounted. Add a set of plug-in instances (unused for now).
12115         
12116         * Plugins/Hosted/NetscapePluginHostProxy.mm:
12117         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
12118         Create a death notification port.
12119         
12120         (WebKit::NetscapePluginHostProxy::pluginHostDied):
12121         Tell the manager that we're gone and delete ourselves.
12122         
12123         (WebKit::NetscapePluginHostProxy::deathPortCallback):
12124         New CFMachPort callback.
12125
12126 2008-12-01  Anders Carlsson  <andersca@apple.com>
12127
12128         Reviewed by Dan Bernstein.
12129
12130         Move instantiatePlugin to NetscapePluginHostManager.
12131         
12132         * Plugins/Hosted/NetscapePluginHostManager.h:
12133         * Plugins/Hosted/NetscapePluginHostManager.mm:
12134         (WebKit::NetscapePluginHostManager::instantiatePlugin):
12135         * Plugins/Hosted/NetscapePluginHostProxy.h:
12136         * Plugins/Hosted/NetscapePluginHostProxy.mm:
12137         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
12138         (-[WebHostedNetscapePluginView createPlugin]):
12139
12140 2008-12-01  Anders Carlsson  <andersca@apple.com>
12141
12142         Reviewed by Dan Bernstein.
12143
12144         Pass the plug-in host port directly to the instance proxy.
12145         
12146         * Plugins/Hosted/NetscapePluginHostProxy.mm:
12147         (WebKit::NetscapePluginHostProxy::instantiatePlugin):
12148         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
12149         (WebKit::NetscapePluginInstanceProxy::create):
12150         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
12151         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
12152         (WebKit::NetscapePluginInstanceProxy::resize):
12153         (WebKit::NetscapePluginInstanceProxy::destroy):
12154         (WebKit::NetscapePluginInstanceProxy::focusChanged):
12155         (WebKit::NetscapePluginInstanceProxy::windowFocusChanged):
12156         (WebKit::NetscapePluginInstanceProxy::windowFrameChanged):
12157         (WebKit::NetscapePluginInstanceProxy::startTimers):
12158         (WebKit::NetscapePluginInstanceProxy::mouseEvent):
12159         (WebKit::NetscapePluginInstanceProxy::stopTimers):
12160
12161 2008-12-01  Anders Carlsson  <andersca@apple.com>
12162
12163         Try to fix the Tiger build.
12164
12165         * Plugins/WebNetscapePluginView.mm:
12166
12167 2008-12-01  Anders Carlsson  <andersca@apple.com>
12168
12169         Rename _layer to _pluginLayer where I forgot to do so.
12170         
12171         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
12172         (-[WebHostedNetscapePluginView destroyPlugin]):
12173         * Plugins/WebNetscapePluginView.h:
12174         * Plugins/WebNetscapePluginView.mm:
12175         (-[WebNetscapePluginView createPlugin]):
12176         (-[WebNetscapePluginView setLayer:]):
12177         (-[WebNetscapePluginView destroyPlugin]):
12178
12179 2008-12-01  Anders Carlsson  <andersca@apple.com>
12180
12181         Reviewed by Adam Roben.
12182
12183         Make sure to re-insert layers as needed so they won't be lost when the layer backed
12184         view is removed from the view hierarchy.
12185
12186         * Plugins/Hosted/WebHostedNetscapePluginView.h:
12187         Add _pluginLayer ivar.
12188         
12189         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
12190         (-[WebHostedNetscapePluginView createPlugin]):
12191         Don't add the layer here.
12192         
12193         (-[WebHostedNetscapePluginView setLayer:]):
12194         Instead, add it here.
12195         
12196         (-[WebHostedNetscapePluginView destroyPlugin]):
12197         Set _pluginLayer to 0.
12198         
12199         * Plugins/WebNetscapePluginView.mm:        
12200         (-[WebNetscapePluginView createPlugin]):
12201         Don't add the layer here.
12202         
12203         (-[WebNetscapePluginView setLayer:]):
12204         Do it here.
12205
12206 2008-11-30  Antti Koivisto  <antti@apple.com>
12207
12208         Reviewed by Mark Rowe.
12209         
12210         https://bugs.webkit.org/show_bug.cgi?id=22557
12211         
12212         Report free size in central and thread caches too.
12213
12214         * Misc/WebCoreStatistics.mm:
12215         (+[WebCoreStatistics memoryStatistics]):
12216
12217 2008-11-29  Antti Koivisto  <antti@apple.com>
12218
12219         Reviewed by Dan Bernstein.
12220
12221         https://bugs.webkit.org/show_bug.cgi?id=22557
12222         Add statistics for JavaScript GC heap.
12223
12224         * Misc/WebCoreStatistics.mm:
12225         (+[WebCoreStatistics javaScriptObjectsCount]):
12226         (+[WebCoreStatistics memoryStatistics]):
12227
12228 2008-11-29  Antti Koivisto  <antti@apple.com>
12229
12230         Reviewed by Alexey Proskuryakov.
12231         
12232         https://bugs.webkit.org/show_bug.cgi?id=22557
12233         
12234         - Add purgeable memory statistics to cache statistics.
12235         - Add method for getting fastMalloc statistics.
12236         - Add method to force returning free memory back to system.
12237
12238         * Misc/WebCache.mm:
12239         (+[WebCache statistics]):
12240         * Misc/WebCoreStatistics.h:
12241         * Misc/WebCoreStatistics.mm:
12242         (+[WebCoreStatistics stopIgnoringWebCoreNodeLeaks]):
12243         (+[WebCoreStatistics memoryStatistics]):
12244         (+[WebCoreStatistics returnFreeMemoryToSystem]):
12245
12246 2008-11-26  Mark Rowe  <mrowe@apple.com>
12247
12248         Fix the Tiger build.
12249
12250         mig.h does not always define __MigTypeCheck on Tiger, which leads to problems when the generated
12251         code is built with -Wundef.
12252
12253         * Plugins/Hosted/WebKitPluginHostTypes.h:
12254
12255 2008-11-26  Anders Carlsson  <andersca@apple.com>
12256
12257         Fix build.
12258
12259         * Configurations/Base.xcconfig:
12260
12261 2008-11-26  Anders Carlsson  <andersca@apple.com>
12262
12263         Reviewed by Mark Rowe.
12264
12265         Move WebHostedNetscapePluginView.{h|mm} to Plugins/Hosted.
12266         
12267         (-[WebHostedNetscapePluginView handleMouseMoved:]):
12268         (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
12269         Fix a leak.
12270         
12271         (-[WebHostedNetscapePluginView createPlugin]):
12272         Instantiate the plug-in, store the plug-in proxy in the _proxy ivar.
12273         
12274         (-[WebHostedNetscapePluginView loadStream]):
12275         (-[WebHostedNetscapePluginView shouldStop]):
12276         Add stubs for these.
12277         
12278         (-[WebHostedNetscapePluginView updateAndSetWindow]):
12279         (-[WebHostedNetscapePluginView windowFocusChanged:]):
12280         (-[WebHostedNetscapePluginView destroyPlugin]):
12281         (-[WebHostedNetscapePluginView startTimers]):
12282         (-[WebHostedNetscapePluginView stopTimers]):
12283         (-[WebHostedNetscapePluginView focusChanged]):
12284         (-[WebHostedNetscapePluginView windowFrameDidChange:]):
12285         (-[WebHostedNetscapePluginView mouseDown:]):
12286         (-[WebHostedNetscapePluginView mouseUp:]):
12287         (-[WebHostedNetscapePluginView mouseDragged:]):
12288         (-[WebHostedNetscapePluginView mouseEntered:]):
12289         (-[WebHostedNetscapePluginView mouseExited:]):
12290         Call the proxy.
12291         
12292         (-[WebHostedNetscapePluginView addWindowObservers]):
12293         (-[WebHostedNetscapePluginView removeWindowObservers]):
12294         Add/remove observers for when the window frame changes.
12295         
12296         * Plugins/WebHostedNetscapePluginView.h: Removed.
12297         * Plugins/WebHostedNetscapePluginView.mm: Removed.
12298
12299 2008-11-26  Anders Carlsson  <andersca@apple.com>
12300
12301         Reviewed by Mark Rowe.
12302
12303         Add the plug-in host proxy and plug-in instance proxy objects.
12304
12305         These are just simple objects that forward their calls to the plug-in host.
12306         
12307         * Plugins/Hosted/NetscapePluginHostProxy.h: Added.
12308         (WebKit::NetscapePluginHostProxy::create):
12309         (WebKit::NetscapePluginHostProxy::port):
12310         * Plugins/Hosted/NetscapePluginHostProxy.mm: Added.
12311         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
12312         (WebKit::NetscapePluginHostProxy::instantiatePlugin):
12313         * Plugins/Hosted/NetscapePluginInstanceProxy.h: Added.
12314         (WebKit::NetscapePluginInstanceProxy::create):
12315         (WebKit::NetscapePluginInstanceProxy::renderContextID):
12316         (WebKit::NetscapePluginInstanceProxy::useSoftwareRenderer):
12317         * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Added.
12318         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
12319         (WebKit::NetscapePluginInstanceProxy::resize):
12320         (WebKit::NetscapePluginInstanceProxy::destroy):
12321         (WebKit::NetscapePluginInstanceProxy::focusChanged):
12322         (WebKit::NetscapePluginInstanceProxy::windowFocusChanged):
12323         (WebKit::NetscapePluginInstanceProxy::windowFrameChanged):
12324         (WebKit::NetscapePluginInstanceProxy::startTimers):
12325         (WebKit::NetscapePluginInstanceProxy::mouseEvent):
12326         (WebKit::NetscapePluginInstanceProxy::stopTimers):
12327
12328 2008-11-26  Anders Carlsson  <andersca@apple.com>
12329
12330         Reviewed by Dan Bernstein, Mark Rowe and Kevin Decker.
12331
12332         Add the plug-in host manager singleton.
12333         
12334         * Plugins/Hosted/NetscapePluginHostManager.h: Added.
12335         * Plugins/Hosted/NetscapePluginHostManager.mm: Added.
12336         
12337         (WebKit::NetscapePluginHostManager::hostForPackage):
12338         If there's an existing host proxy available, just return it. Otherwise spawn a new plug-in host and
12339         create a new plug-in host proxy from the new plug-in host port.
12340         
12341         (WebKit::NetscapePluginHostManager::spawnPluginHost):
12342         Pass the plug-in host path and the preferred CPU type to the plug-in agent. When the plug-in host has
12343         finished launching, pass it the path to the plug-in bundle.
12344         
12345         (WebKit::NetscapePluginHostManager::initializeVendorPort):
12346         Check in with the plug-in agent and get the new plug-in vendor port back.
12347
12348 2008-11-26  Anders Carlsson  <andersca@apple.com>
12349
12350         Reviewed by Mark Rowe.
12351
12352         * Plugins/Hosted/WebKitPluginHostTypes.h:
12353         Add copyright headers and fix the spacing around the *'s.
12354
12355 2008-11-26  Anders Carlsson  <andersca@apple.com>
12356
12357         Reviewed by Dan Bernstein.
12358         
12359         * Plugins/Hosted/WebKitPluginHost.defs:
12360         Add copyright headers.
12361         
12362         * Plugins/Hosted/WebKitPluginHostTypes.h: Added.
12363         Forgot to add this.
12364
12365 2008-11-26  Anders Carlsson  <andersca@apple.com>
12366
12367         Reviewed by Dan Bernstein.
12368
12369         Add plug-in host .defs.
12370
12371         * Plugins/Hosted/WebKitPluginAgent.defs: Added.
12372         * Plugins/Hosted/WebKitPluginAgentReply.defs: Added.
12373         * Plugins/Hosted/WebKitPluginClient.defs: Added.
12374         * Plugins/Hosted/WebKitPluginHost.defs: Added.
12375         * Plugins/Hosted/WebKitPluginHostTypes.defs: Added.
12376
12377 2008-11-26  Anders Carlsson  <andersca@apple.com>
12378
12379         Reviewed by Mark Rowe and Kevin Decker.
12380
12381         Minor plug-in changes.
12382         
12383         * Plugins/WebBaseNetscapePluginView.h:
12384         Add add/remove observer method declarations.
12385         
12386         * Plugins/WebBaseNetscapePluginView.mm:
12387         (-[WebBaseNetscapePluginView isFlipped]):
12388         Move this down from WebNetscapePluginView.
12389         
12390         * Plugins/WebNetscapePluginPackage.h:
12391         * Plugins/WebNetscapePluginPackage.m:
12392         (-[WebNetscapePluginPackage pluginHostArchitecture]):
12393         Getter for the plug-in host architecture.
12394         
12395         * Plugins/WebNetscapePluginView.mm:
12396
12397 2008-11-25  Dan Bernstein  <mitz@apple.com>
12398
12399         Reviewed by Mark Rowe.
12400
12401         - include the text direction submenu in context menus when appropriate
12402
12403         * WebView/WebPreferences.mm:
12404         (+[WebPreferences initialize]): Changed the default
12405         textDirectionSubmenuInclusionBehavior to "automatically", which includes
12406         the menu when the selection is confined to a single paragraph the either
12407         has right-to-left base writing direction or contains right-to-left or
12408         embedded text. Left the default for Tiger and Leopard to be "never".
12409
12410 2008-11-24  Darin Fisher  <darin@chromium.org>
12411
12412         Fix bustage.
12413
12414         * History/WebHistory.mm:
12415
12416 2008-11-24  Glenn Wilson  <gwilson@chromium.org>
12417
12418         Reviewed by Alexey Proskuryakov.
12419
12420         http://bugs.webkit.org/show_bug.cgi?id=15643
12421
12422         Added API support for the "trailing whitespace" work-around.  This includes an APIs
12423         to get and set the state of this configuration variable.
12424
12425         * WebCoreSupport/WebEditorClient.h:
12426         * WebCoreSupport/WebEditorClient.mm:
12427         (WebEditorClient::selectTrailingWhitespaceEnabled):
12428         * WebView/WebView.mm:
12429         (-[WebView setSelectTrailingWhitespaceEnabled:]):
12430         (-[WebView isSelectTrailingWhitespaceEnabled]):
12431         (-[WebView setSmartInsertDeleteEnabled:]):
12432         * WebView/WebViewPrivate.h:
12433
12434 2008-11-24  Darin Adler  <darin@apple.com>
12435
12436         Reviewed by Dan Bernstein.
12437
12438         - https://bugs.webkit.org/show_bug.cgi?id=22470
12439           remove unneeded URL argument from FrameLoaderClient::updateGlobalHistory
12440
12441         * WebCoreSupport/WebFrameLoaderClient.h: Remove argument.
12442         * WebCoreSupport/WebFrameLoaderClient.mm:
12443         (WebFrameLoaderClient::updateGlobalHistory): Get the URL from the
12444         DocumentLoader, just as we do the title and the failure flag.
12445
12446 2008-11-24  Darin Adler  <darin@apple.com>
12447
12448         Reviewed by Dan Bernstein.
12449
12450         - finish https://bugs.webkit.org/show_bug.cgi?id=22295
12451           track which history items are from page load failures
12452
12453         Last time around I did this only for the back/forward list and missed the
12454         global history list.
12455
12456         * History/WebHistory.mm:
12457         (-[WebHistory _visitedURL:withTitle:wasFailure:]): Added wasFailure argument.
12458         Set the flag on the newly created history item. Also eliminated the use of
12459         autorelease on the added-items array.
12460         * History/WebHistoryInternal.h: Ditto.
12461
12462         * WebCoreSupport/WebFrameLoaderClient.mm:
12463         (WebFrameLoaderClient::updateGlobalHistory): Added code to check for failure
12464         and pass the argument in to WebHistory. Given that this function gets other
12465         data from the DocumentLoader, I think we should get rid of the KURL argument,
12466         but that's a separate issue so I don't do it in this patch.
12467
12468 2008-11-24  Simon Fraser  <simon.fraser@apple.com>
12469
12470         Fix call to Frame::selectionBounds in Tiger build.
12471         
12472         * WebView/WebHTMLView.mm:
12473         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
12474
12475 2008-11-24  Simon Fraser  <simon.fraser@apple.com>
12476
12477         Reviewed by Dan Bernstein
12478
12479         Via: https://bugs.webkit.org/show_bug.cgi?id=22433
12480         
12481         Rename RenderView::selectionRect() to selectionBounds(), to remove
12482         longstanding ambiguity with the base class selectionRect() method.
12483         Do the same on Frame for consistency with RenderView.
12484
12485         * WebView/WebHTMLView.mm:
12486         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
12487         (-[WebHTMLView selectionRect]):
12488         (-[WebHTMLView selectionImageRect]):
12489
12490 2008-11-20  Pierre-Olivier Latour  <pol@apple.com>
12491
12492         Reviewed by Dan Bernstein.
12493
12494         WebKit should be using Device RGB colorspace everywhere for
12495         consistency.
12496
12497         https://bugs.webkit.org/show_bug.cgi?id=22300
12498
12499         * WebView/WebHTMLView.mm:
12500         (-[WebHTMLView _dragImageForURL:withLabel:]):
12501         (-[WebHTMLView _colorAsString:]):
12502
12503 2008-11-20  Darin Adler  <darin@apple.com>
12504
12505         Earlier version reviewed by Justin Garcia.
12506
12507         - part of fix for <rdar://problem/4108572> REGRESSION: Can't extend selection with shift-arrow in read only mode
12508           Also resolves <rdar://problem/5000134>.
12509
12510         * WebView/WebHTMLView.mm: Removed some unused code, and made the Tiger workaround for bug 3789278
12511         be Tiger-only.
12512         (-[WebHTMLView resignFirstResponder]): Removed code setting unused resigningFirstResponder flag.
12513         (-[WebHTMLView _wantsKeyDownForEvent:]): Added. Returns YES.
12514         (-[WebHTMLView insertText:]): Don't try to insert text if the selection is not editable. We used
12515         to prevent even processing the input, but that's not practical since some commands need to work
12516         even in non-editable regions.
12517
12518 2008-11-20  Anders Carlsson  <andersca@apple.com>
12519
12520         Reviewed by Jon Honeycutt.
12521
12522         Move some frame/page checking code down to the base class.
12523         
12524         * Plugins/WebBaseNetscapePluginView.mm:
12525         (-[WebBaseNetscapePluginView start]):
12526         * Plugins/WebNetscapePluginView.mm:
12527         (-[WebNetscapePluginView _createPlugin]):
12528
12529 2008-11-19  Anders Carlsson  <andersca@apple.com>
12530
12531         Reviewed by Dan Bernstein.
12532
12533         Test: plugins/netscape-plugin-setwindow-size-2.html
12534         
12535         Fix bug where NPP_SetWindow wasn't getting called for some plug-ins.
12536         
12537         * Plugins/WebNetscapePluginView.mm:
12538         (-[WebNetscapePluginView updateAndSetWindow]):
12539         Don't bail if the drawing model is not the CA drawing model. Remove some code 
12540         that was doing the wrong thing.
12541
12542 2008-11-19  Darin Fisher  <darin@chromium.org>
12543
12544         Reviewed by Geoff Garen.
12545
12546         https://bugs.webkit.org/show_bug.cgi?id=22345
12547         Define ScriptValue as a thin container for a JSC::Value*.
12548
12549         * WebView/WebFrame.mm:
12550         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
12551         * WebView/WebView.mm:
12552         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
12553
12554 2008-11-19  Anders Carlsson  <andersca@apple.com>
12555
12556         Reviewed by Sam Weinig.
12557
12558         <rdar://problem/6383762> WebKit r38340 crash on key press in plugin
12559         
12560         Set the value to 0 before calling NPP_GetValue, in case the plug-in returns NPERR_NO_ERROR but does not 
12561         update the value.
12562         
12563         * Plugins/WebNetscapePluginView.mm:
12564         (-[WebNetscapePluginView createPlugin]):
12565
12566 2008-11-19  Anders Carlsson  <andersca@apple.com>
12567
12568         Reviewed by Sam Weinig.
12569
12570         Make sure to copy the MIME type.
12571         
12572         * Plugins/WebBaseNetscapePluginView.mm:
12573         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
12574
12575 2008-11-19  Geoffrey Garen  <ggaren@apple.com>
12576
12577         Reviewed by Darin Adler.
12578         
12579         First step toward fixing <rdar://problem/6263293> WebScriptDebugDelegate
12580         should use intptr_t for sourceId, not int
12581         
12582         Added a conditional typedef (currently disabled) to switch sourceId to
12583         intptr_t in non-Tiger, non-Leopard builds.
12584
12585         * DefaultDelegates/WebDefaultScriptDebugDelegate.m:
12586         (-[WebDefaultScriptDebugDelegate webView:didParseSource:fromURL:sourceId:forWebFrame:]):
12587         (-[WebDefaultScriptDebugDelegate webView:didParseSource:baseLineNumber:fromURL:sourceId:forWebFrame:]):
12588         (-[WebDefaultScriptDebugDelegate webView:didEnterCallFrame:sourceId:line:forWebFrame:]):
12589         (-[WebDefaultScriptDebugDelegate webView:willExecuteStatement:sourceId:line:forWebFrame:]):
12590         (-[WebDefaultScriptDebugDelegate webView:willLeaveCallFrame:sourceId:line:forWebFrame:]):
12591         (-[WebDefaultScriptDebugDelegate webView:exceptionWasRaised:sourceId:line:forWebFrame:]):
12592         * WebView/WebScriptDebugDelegate.h:
12593         * WebView/WebScriptDebugger.mm:
12594         (WebScriptDebugger::sourceParsed):
12595         (WebScriptDebugger::callEvent):
12596         (WebScriptDebugger::atStatement):
12597         (WebScriptDebugger::returnEvent):
12598         (WebScriptDebugger::exception):
12599
12600 2008-11-18  Dan Bernstein  <mitz@apple.com>
12601
12602         Reviewed by Mark Rowe.
12603
12604         - fix https://bugs.webkit.org/show_bug.cgi?id=22331
12605           <rdar://problem/6381657> REGRESSION: Contextual menu no longer has an "Inspect Element" item
12606
12607         * WebView/WebUIDelegatePrivate.h: Reorder new enum values after existing
12608         ones.
12609
12610 2008-11-17  Beth Dakin  <bdakin@apple.com>
12611
12612         Reviewed by Adele Peterson.
12613
12614         Fix for <rdar://problem/6373102> REGRESSION (r36919): In a new mail 
12615         message, the caret appears in message body by default
12616
12617         This fixes a regression caused by http://trac.webkit.org/changeset/36919. 
12618         That change was too sweeping; we do not want to 
12619         unconditionally set the page to be active, but we can be looser 
12620         than the original constraints. This patch set the window active if 
12621         the first responder is or is a descendant of the main frame's frame 
12622         view.
12623
12624         * WebView/WebView.mm:
12625         (-[WebView _updateFocusedAndActiveStateForFrame:]):
12626
12627 2008-11-18  Alexey Proskuryakov  <ap@webkit.org>
12628
12629         Reviewed by Darin Adler.
12630
12631         https://bugs.webkit.org/show_bug.cgi?id=22337
12632         Enable workers by default
12633
12634         * Configurations/WebKit.xcconfig: Define ENABLE_WORKERS (change from ENABLE_WORKER_THREADS,
12635         which was accidentally committed before).
12636
12637 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
12638
12639         Not reviewed.
12640         
12641         Try to fix Mac build.
12642
12643         * WebView/WebScriptDebugDelegate.mm:
12644
12645 2008-11-17  Pierre-Olivier Latour  <pol@apple.com>
12646
12647         Reviewed by Sam Weinig.
12648
12649         Added SPI to allow pausing a running CSS transition or animation
12650         at a given time for testing purposes.
12651
12652         https://bugs.webkit.org/show_bug.cgi?id=21261
12653
12654         * WebView/WebFrame.mm:
12655         (-[WebFrame _pauseAnimation:onNode:atTime:]):
12656         (-[WebFrame _pauseTransitionOfProperty:onNode:atTime:]):
12657         * WebView/WebFramePrivate.h:
12658
12659 2008-11-17  Geoffrey Garen  <ggaren@apple.com>
12660
12661         Reviewed by Sam Weinig.
12662
12663         Updated for JavaScriptCore renames.
12664
12665         * ForwardingHeaders/runtime/Completion.h: Copied from ForwardingHeaders/runtime/Interpreter.h.
12666         * ForwardingHeaders/runtime/Interpreter.h: Removed.
12667         * WebView/WebScriptDebugDelegate.mm:
12668
12669 2008-11-16  Greg Bolsinga  <bolsinga@apple.com>
12670
12671         Reviewed by Darin Adler.
12672
12673         https://bugs.webkit.org/show_bug.cgi?id=21810
12674         Remove use of static C++ objects that are destroyed at exit time (destructors)
12675
12676         Use DEFINE_STATIC_LOCAL for static RetainPtr<T>
12677
12678         * Misc/WebNSPasteboardExtras.mm: Use DEFINE_STATIC_LOCAL
12679         (+[NSPasteboard _web_writableTypesForURL]):
12680         (_createWritableTypesForImageWithoutArchive): Created so accessor has one line initialization
12681         (_writableTypesForImageWithoutArchive): Use create function for one line initialization
12682         (_createWritableTypesForImageWithArchive): Created so accessor has one line initialization
12683         (_writableTypesForImageWithArchive): Use create function for one line initialization
12684         * WebCoreSupport/WebPasteboardHelper.mm: Use DEFINE_STATIC_LOCAL
12685         (WebPasteboardHelper::insertablePasteboardTypes):
12686         * WebView/WebHTMLRepresentation.mm: Use DEFINE_STATIC_LOCAL
12687         (+[WebHTMLRepresentation supportedMIMETypes]):
12688         (+[WebHTMLRepresentation supportedNonImageMIMETypes]):
12689         (+[WebHTMLRepresentation supportedImageMIMETypes]):
12690
12691 2008-11-16  Darin Adler  <darin@apple.com>
12692
12693         Reviewed by Dan Bernstein.
12694
12695         - https://bugs.webkit.org/show_bug.cgi?id=22295
12696           track which history items are from page load failures
12697
12698         * History/WebHistoryItem.mm: Added lastVisitWasFailureKey.
12699         (-[WebHistoryItem initFromDictionaryRepresentation:]): Set the lastVisitWasFailure
12700         flag in the history item if the dictionary had lastVisitWasFailureKey true.
12701         (-[WebHistoryItem dictionaryRepresentation]): Set the lastVisitWasFailureKey boolean
12702         in the dictionary if the history item had the lastVisitWasFailure flag.
12703         (-[WebHistoryItem lastVisitWasFailure]): Added.
12704
12705         * History/WebHistoryItemInternal.h: Moved include of WebBackForwardList here from
12706         WebHistoryItemPrivate.h; removed other unneeded includes.
12707
12708         * History/WebHistoryItemPrivate.h: Added lastVisitWasFailure method.
12709         Removed unneeded includes.
12710
12711         * Misc/WebNSDictionaryExtras.h: Added _webkit_boolForKey.
12712         * Misc/WebNSDictionaryExtras.m:
12713         (-[NSDictionary _webkit_boolForKey:]): Added.
12714
12715 2008-11-14  Greg Bolsinga  <bolsinga@apple.com>
12716
12717         Reviewed by Darin Adler.
12718         
12719         https://bugs.webkit.org/show_bug.cgi?id=21810
12720         Remove use of static C++ objects that are destroyed at exit time (destructors)
12721
12722         Create DEFINE_STATIC_LOCAL macro. Change static local objects to leak to avoid 
12723         exit-time destructor. Update code that was changed to fix this issue that ran 
12724         into a gcc bug (<rdar://problem/6354696> Codegen issue with C++ static reference 
12725         in gcc build 5465). Also typdefs for template types needed to be added in some 
12726         cases so the type could make it through the macro successfully.
12727
12728         Basically code of the form:
12729         static T m;
12730         becomes:
12731         DEFINE_STATIC_LOCAL(T, m, ());
12732
12733         Also any code of the form:
12734         static T& m = *new T;
12735         also becomes:
12736         DEFINE_STATIC_LOCAL(T, m, ());
12737
12738         * ForwardingHeaders/wtf/StdLibExtras.h: Added.
12739         * History/WebBackForwardList.mm:
12740         (backForwardLists):
12741         * History/WebHistoryItem.mm:
12742         (historyItemWrappers):
12743         * Misc/WebStringTruncator.m:
12744         (fontFromNSFont):
12745         * Plugins/WebBaseNetscapePluginStream.mm:
12746         (streams):
12747         * WebView/WebView.mm:
12748         (aeDescFromJSValue):
12749
12750 2008-11-14  Dan Bernstein  <mitz@apple.com>
12751
12752         Reviewed by Darin Adler.
12753
12754         - <rdar://problem/6234333> Implement action methods for setting and clearing character-level directionality
12755         - part of <rdar://problem/6234337> Add a Text Direction menu to the default context menu when appropriate
12756
12757         * WebCoreSupport/WebViewFactory.mm:
12758         (-[WebViewFactory contextMenuItemTagTextDirectionMenu]): Added.
12759         * WebView/WebFrame.mm:
12760         (core): Added a convertor from WebTextDirectionSubmenuInclusionBehavior
12761         to WebCore::TextDirectionSubmenuInclusionBehavior.
12762         * WebView/WebFrameInternal.h:
12763         * WebView/WebHTMLView.mm:
12764         Added makeTextWritingDirectionLeftToRight:,
12765         makeTextWritingDirectionNatural: and
12766         makeTextWritingDirectionRightToLeft: using the WEBCORE_COMMAND macro.
12767         * WebView/WebPreferenceKeysPrivate.h:
12768         Added WebKitTextDirectionSubmenuInclusionBehaviorPreferenceKey.
12769         * WebView/WebPreferences.mm:
12770         (+[WebPreferences initialize]): Set the default Text Direction
12771         submenu inclusion behavior to never include.
12772         (-[WebPreferences textDirectionSubmenuInclusionBehavior]): Added this
12773         accessor.
12774         (-[WebPreferences setTextDirectionSubmenuInclusionBehavior:]): Ditto.
12775         * WebView/WebPreferencesPrivate.h: Defined the
12776         WebTextDirectionSubmenuInclusionBehavior enum and declared
12777         accessors.
12778         * WebView/WebUIDelegatePrivate.h:
12779         * WebView/WebView.mm:
12780         (-[WebView _preferencesChangedNotification:]): Added code to transfer
12781         the Text Direction submenu inclusion behavior preference to WebCore
12782         settings.
12783
12784 2008-11-14  Darin Adler  <darin@apple.com>
12785
12786         Reviewed by Mark Rowe.
12787
12788         - fix https://bugs.webkit.org/show_bug.cgi?id=22222
12789           selectKeyViewPrecedingView: with document view that can't be first responder
12790           makes WebFrameView be first responder
12791
12792         * WebView/WebFrameView.mm: (-[WebFrameView becomeFirstResponder]):
12793         Moved the acceptsFirstResponder special case inside the if statement so it won't
12794         run in the "selecting previous" case. Also removed the "just before shipping Tiger"
12795         code that doesn't need to be here any more.
12796
12797 2008-11-13  Mark Rowe  <mrowe@apple.com>
12798
12799         Fix the build.
12800
12801         Don't use NSPICTPboardType on systems where it is deprecated.  The system will take care of converting
12802         from this format to a format that we can understand.
12803
12804         * WebCoreSupport/WebPasteboardHelper.mm:
12805         (WebPasteboardHelper::insertablePasteboardTypes):
12806         * WebView/WebHTMLView.mm:
12807         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
12808         (+[WebHTMLView _insertablePasteboardTypes]):
12809         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
12810
12811 2008-11-13  John Sullivan  <sullivan@apple.com>
12812
12813         fixed <rdar://problem/6361578> Web Kit UI strings: a few edits
12814
12815         Reviewed by Tim Hatcher
12816
12817         * Misc/WebKitErrors.m:
12818         "Cannot show content with specified mime type" -> "Content with specified MIME type can't be shown"
12819         "Cannot show URL" -> "The URL can't be shown"
12820         "Cannot find plug-in" -> "The plug-in can't be found"
12821         "Cannot load plug-in" -> "The plug-in can't be loaded"
12822         
12823         * Panels/English.lproj/WebAuthenticationPanel.nib/classes.nib:
12824         * Panels/English.lproj/WebAuthenticationPanel.nib/info.nib:
12825         * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib: Added.
12826         * Panels/English.lproj/WebAuthenticationPanel.nib/objects.nib: Removed.
12827         Changed placeholder fine print in the nib to match one of the two strings it might be replaced by.
12828         This automagically updated the nib to a newer format, hence the objects -> keyedobjects change.
12829         I could have changed the placeholder fine print to be empty but this lets localizers understand
12830         the dialog layout better.
12831         
12832         * Panels/WebAuthenticationPanel.m:
12833         (-[WebAuthenticationPanel setUpForChallenge:]):
12834         "you need to log in" -> "you must log in"
12835         "Your log-in information" -> "Your login information"
12836         "The name or password entered" -> "The user name or password you entered"
12837         "Please try again." -> "Make sure you're entering them correctly, and then try again."        
12838
12839 2008-11-12  Stephanie Lewis  <slewis@apple.com>
12840
12841         Fix Mac build.        
12842
12843         * Panels/WebAuthenticationPanel.m:
12844
12845 2008-11-12  John Sullivan  <sullivan@apple.com>
12846
12847         fixed <rdar://problem/3839110> Authentication dialogs talk about passwords being sent "in the clear"
12848
12849         Reviewed by Tim Hatcher
12850
12851         * Panels/WebAuthenticationPanel.m:
12852         (-[WebAuthenticationPanel setUpForChallenge:]):
12853         use "unencrypted" instead of "in the clear". Also, use the "Your log-in information
12854         will be sent securely" version when the receiving server is https, regardless of
12855         whether it uses basic or digest authentication.
12856
12857 2008-11-12  Darin Adler  <darin@apple.com>
12858
12859         Reviewed by Mark Rowe.
12860
12861         - fix https://bugs.webkit.org/show_bug.cgi?id=22223
12862           <rdar://problem/6366864> REGRESSION(r38245): "View Source" crashes the browser
12863
12864         * WebView/WebFrameView.mm: (-[WebFrameView viewDidMoveToWindow]):
12865         Add missing null check.
12866
12867 2008-11-12  Anders Carlsson  <andersca@apple.com>
12868
12869         Reviewed by Kevin Decker.
12870
12871         Fix stupid bug.
12872         
12873         * Plugins/WebNetscapePluginView.mm:
12874         (-[WebNetscapePluginView createPlugin]):
12875
12876 2008-11-10  Tor Arne Vestbø  <tavestbo@trolltech.com>
12877
12878         Reviewed by Simon Hausmann.
12879
12880         Move _web_encodingForResource from WebKit into WebCore and change return type
12881
12882         This change is needed to implement NSAPI in WebCore for Mac, see:
12883
12884         https://bugs.webkit.org/show_bug.cgi?id=21427
12885
12886
12887         * Misc/WebKitNSStringExtras.m:
12888         (+[NSString _web_encodingForResource:]):
12889
12890 2008-11-10  Tor Arne Vestbø  <tavestbo@trolltech.com>
12891
12892         Reviewed by Simon Hausmann.
12893
12894         Moved the implementation of _webkit_isCaseInsensitiveEqualToString to
12895         WebCore's WebCoreNSStringExtras as _stringIsCaseInsensitiveEqualToString.
12896
12897         This change is needed to implement NSAPI in WebCore for Mac, see:
12898
12899         https://bugs.webkit.org/show_bug.cgi?id=21427
12900
12901         * Misc/WebKitNSStringExtras.m:
12902         (-[NSString _webkit_isCaseInsensitiveEqualToString:]):
12903
12904 2008-11-11  Dan Bernstein  <mitz@apple.com>
12905
12906         Reviewed by Adam Roben.
12907
12908         WebKit/mac part of adding a master volume control for media elements in a WebView
12909
12910         * WebView/WebView.mm:
12911         (-[WebView setMediaVolume:]): Added.
12912         (-[WebView mediaVolume]): Added.
12913         * WebView/WebViewPrivate.h:
12914
12915 2008-11-11  Aaron Golden  <agolden@apple.com>
12916
12917         Bug 22134: -[WebHistoryItem dictionaryRepresentation] accesses past the end of a vector
12918
12919         <https://bugs.webkit.org/show_bug.cgi?id=22134>
12920
12921         Reviewed by Geoff Garen.
12922
12923         * History/WebHistoryItem.mm:
12924         (-[WebHistoryItem initFromDictionaryRepresentation:]):
12925         (-[WebHistoryItem dictionaryRepresentation]):
12926
12927 2008-11-10  Anders Carlsson  <andersca@apple.com>
12928
12929         Reviewed by Kevin Decker.
12930
12931         Move renewGState to the base class.
12932         
12933         * Plugins/WebBaseNetscapePluginView.mm:
12934         (-[WebBaseNetscapePluginView renewGState]):
12935         * Plugins/WebNetscapePluginView.mm:
12936
12937 2008-11-10  Anders Carlsson  <andersca@apple.com>
12938
12939         Reviewed by Kevin Decker.
12940
12941         Move start, stop and all the related methods down to WebBaseNetscapePluginView.
12942         
12943         * Plugins/WebBaseNetscapePluginView.h:
12944         * Plugins/WebBaseNetscapePluginView.mm:
12945         (-[WebBaseNetscapePluginView updateAndSetWindow]):
12946         (-[WebBaseNetscapePluginView addWindowObservers]):
12947         (-[WebBaseNetscapePluginView removeWindowObservers]):
12948         (-[WebBaseNetscapePluginView start]):
12949         (-[WebBaseNetscapePluginView stop]):
12950         (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
12951         (-[WebBaseNetscapePluginView viewWillMoveToSuperview:]):
12952         (-[WebBaseNetscapePluginView viewDidMoveToWindow]):
12953         (-[WebBaseNetscapePluginView viewWillMoveToHostWindow:]):
12954         (-[WebBaseNetscapePluginView viewDidMoveToHostWindow]):
12955         (-[WebBaseNetscapePluginView windowWillClose:]):
12956         (-[WebBaseNetscapePluginView windowBecameKey:]):
12957         (-[WebBaseNetscapePluginView windowResignedKey:]):
12958         (-[WebBaseNetscapePluginView windowDidMiniaturize:]):
12959         (-[WebBaseNetscapePluginView windowDidDeminiaturize:]):
12960         (-[WebBaseNetscapePluginView loginWindowDidSwitchFromUser:]):
12961         (-[WebBaseNetscapePluginView loginWindowDidSwitchToUser:]):
12962         (-[WebBaseNetscapePluginView preferencesHaveChanged:]):
12963         * Plugins/WebNetscapePluginView.h:
12964         * Plugins/WebNetscapePluginView.mm:
12965
12966 2008-11-10  Anders Carlsson  <andersca@apple.com>
12967
12968         Reviewed by Kevin Decker.
12969
12970         Move rightMouseDown, rightMouseUp and sendActivateEvent to the base plugin view. 
12971         Add stubs for createPlugin, loadStream, shouldStop and destroyPlugin.
12972         
12973         * Plugins/WebBaseNetscapePluginView.h:
12974         * Plugins/WebBaseNetscapePluginView.mm:
12975         (-[WebBaseNetscapePluginView windowFocusChanged:]):
12976         (-[WebBaseNetscapePluginView createPlugin]):
12977         (-[WebBaseNetscapePluginView loadStream]):
12978         (-[WebBaseNetscapePluginView destroyPlugin]):
12979         (-[WebBaseNetscapePluginView sendActivateEvent:]):
12980         (-[WebBaseNetscapePluginView rightMouseDown:]):
12981         (-[WebBaseNetscapePluginView rightMouseUp:]):
12982         * Plugins/WebNetscapePluginView.mm:
12983         (-[WebNetscapePluginView windowFocusChanged:]):
12984
12985 2008-11-10  Anders Carlsson  <andersca@apple.com>
12986
12987         Reviewed by Kevin Decker.
12988
12989         Factor plug-in type specific code out to three new methods, createPlugin, destroyPlugin and loadStream.
12990         
12991         * Plugins/WebNetscapePluginView.mm:
12992         (-[WebNetscapePluginView createPlugin]):
12993         (-[WebNetscapePluginView loadStream]):
12994         (-[WebNetscapePluginView start]):
12995         (-[WebNetscapePluginView shouldStop]):
12996         (-[WebNetscapePluginView destroyPlugin]):
12997         (-[WebNetscapePluginView stop]):
12998
12999 2008-11-10  Anders Carlsson  <andersca@apple.com>
13000
13001         Fix Tiger build.
13002         
13003         * Plugins/WebNetscapePluginPackage.m:
13004         (-[WebNetscapePluginPackage load]):
13005
13006 2008-11-10  Anders Carlsson  <andersca@apple.com>
13007
13008         Reviewed by Sam Weinig.
13009
13010         Move even more code down to WebBaseNetscapePluginView, get rid of some unnecessary methods.
13011         
13012         * Plugins/WebBaseNetscapePluginView.h:
13013         * Plugins/WebBaseNetscapePluginView.mm:
13014         (-[WebBaseNetscapePluginView focusChanged]):
13015         (-[WebBaseNetscapePluginView visibleRect]):
13016         (-[WebBaseNetscapePluginView acceptsFirstResponder]):
13017         (-[WebBaseNetscapePluginView setHasFocus:]):
13018         (-[WebBaseNetscapePluginView becomeFirstResponder]):
13019         (-[WebBaseNetscapePluginView resignFirstResponder]):
13020         * Plugins/WebNetscapePluginView.h:
13021         * Plugins/WebNetscapePluginView.mm:
13022         (-[WebNetscapePluginView focusChanged]):
13023         (-[WebNetscapePluginView tellQuickTimeToChill]):
13024         (-[WebNetscapePluginView updateAndSetWindow]):
13025         (-[WebNetscapePluginView start]):
13026         (-[WebNetscapePluginView stop]):
13027         (-[WebNetscapePluginView viewWillMoveToWindow:]):
13028         (-[WebNetscapePluginView createPluginScriptableObject]):
13029         (-[WebNetscapePluginView pluginView:receivedData:]):
13030         (-[WebNetscapePluginView pluginView:receivedError:]):
13031         (-[WebNetscapePluginView pluginViewFinishedLoading:]):
13032         (-[WebNetscapePluginView inputContext]):
13033         (-[WebNetscapePluginView hasMarkedText]):
13034         (-[WebNetscapePluginView insertText:]):
13035         (-[WebNetscapePluginView markedRange]):
13036         (-[WebNetscapePluginView selectedRange]):
13037         (-[WebNetscapePluginView setMarkedText:selectedRange:]):
13038         (-[WebNetscapePluginView unmarkText]):
13039         (-[WebNetscapePluginView validAttributesForMarkedText]):
13040         (-[WebNetscapePluginView attributedSubstringFromRange:]):
13041         (-[WebNetscapePluginView characterIndexForPoint:]):
13042         (-[WebNetscapePluginView doCommandBySelector:]):
13043         (-[WebNetscapePluginView firstRectForCharacterRange:]):
13044         (-[WebNetscapePluginView _viewHasMoved]):
13045         (-[WebNetscapePluginView _redeliverStream]):
13046
13047 2008-11-10  Anders Carlsson  <andersca@apple.com>
13048
13049         Reviewed by Kevin Decker.
13050
13051         Move timer handling code down to WebBaseNetscapePluginView.
13052         
13053         * Plugins/WebBaseNetscapePluginView.h:
13054         * Plugins/WebBaseNetscapePluginView.mm:
13055         (-[WebBaseNetscapePluginView stopTimers]):
13056         (-[WebBaseNetscapePluginView startTimers]):
13057         (-[WebBaseNetscapePluginView restartTimers]):
13058         * Plugins/WebNetscapePluginView.h:
13059         * Plugins/WebNetscapePluginView.mm:
13060         (-[WebNetscapePluginView stopTimers]):
13061         (-[WebNetscapePluginView startTimers]):
13062         (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
13063         * WebView/WebHTMLView.mm:
13064         (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]):
13065
13066 2008-11-10  Anders Carlsson  <andersca@apple.com>
13067
13068         Reviewed by Kevin Decker.
13069
13070         Move a bunch of methods and ivars up to WebBaseNetscapePluginView.
13071         
13072         * Plugins/WebBaseNetscapePluginView.h:
13073         * Plugins/WebBaseNetscapePluginView.mm:
13074         (-[WebBaseNetscapePluginView dealloc]):
13075         (-[WebBaseNetscapePluginView finalize]):
13076         (-[WebBaseNetscapePluginView removeTrackingRect]):
13077         (-[WebBaseNetscapePluginView resetTrackingRect]):
13078         (-[WebBaseNetscapePluginView dataSource]):
13079         (-[WebBaseNetscapePluginView webFrame]):
13080         (-[WebBaseNetscapePluginView webView]):
13081         (-[WebBaseNetscapePluginView currentWindow]):
13082         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
13083         (WebNetscapePluginEventHandlerCarbon::windowFocusChanged):
13084         * Plugins/WebNetscapePluginView.h:
13085         * Plugins/WebNetscapePluginView.mm:
13086         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
13087         (-[WebNetscapePluginView sendActivateEvent:]):
13088         (-[WebNetscapePluginView restartTimers]):
13089         (-[WebNetscapePluginView setHasFocus:]):
13090         (-[WebNetscapePluginView mouseDown:]):
13091         (-[WebNetscapePluginView mouseUp:]):
13092         (-[WebNetscapePluginView mouseEntered:]):
13093         (-[WebNetscapePluginView mouseExited:]):
13094         (-[WebNetscapePluginView handleMouseMoved:]):
13095         (-[WebNetscapePluginView mouseDragged:]):
13096         (-[WebNetscapePluginView scrollWheel:]):
13097         (-[WebNetscapePluginView keyUp:]):
13098         (-[WebNetscapePluginView keyDown:]):
13099         (-[WebNetscapePluginView flagsChanged:]):
13100         (-[WebNetscapePluginView updateAndSetWindow]):
13101         (-[WebNetscapePluginView setWindowIfNecessary]):
13102         (-[WebNetscapePluginView start]):
13103         (-[WebNetscapePluginView stop]):
13104         (-[WebNetscapePluginView isStarted]):
13105         (-[WebNetscapePluginView dealloc]):
13106         (-[WebNetscapePluginView finalize]):
13107         (-[WebNetscapePluginView drawRect:]):
13108         (-[WebNetscapePluginView windowBecameKey:]):
13109         (-[WebNetscapePluginView preferencesHaveChanged:]):
13110         (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
13111         (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
13112         (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
13113         (-[WebNetscapePluginView _viewHasMoved]):
13114
13115 2008-11-10  Anders Carlsson  <andersca@apple.com>
13116
13117         Reviewed by Kevin Decker and Mark Rowe.
13118
13119         Add a WebHostedNetscapePluginView class.
13120         
13121         * Plugins/WebHostedNetscapePluginView.h: Added.
13122         * Plugins/WebHostedNetscapePluginView.mm: Added.
13123
13124         * Plugins/WebNetscapePluginPackage.h:
13125         Use the right define.
13126         
13127         * Plugins/WebPluginDatabase.mm:
13128         (-[WebPluginDatabase removePluginInstanceViewsFor:]):
13129         Check for WebBaseNetscapePluginView.
13130         
13131         (-[WebPluginDatabase destroyAllPluginInstanceViews]):
13132         Check for WebBaseNetscapePluginView.
13133         
13134         * WebCoreSupport/WebFrameLoaderClient.mm:
13135         (NetscapePluginWidget::NetscapePluginWidget):
13136         (NetscapePluginWidget::handleEvent):
13137         Use WebBaseNetscapePluginView.
13138         
13139         (netscapePluginViewClass):
13140         New function that returns the right netscape plugin view type to use.
13141         
13142         (WebFrameLoaderClient::createPlugin):
13143         Get the right class.
13144         
13145         * WebKitPrefix.h:
13146         Prefix the #define with WTF_.
13147         
13148         * WebView/WebHTMLView.mm:
13149         (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
13150         Check for WebBaseNetscapePluginView.
13151         
13152         * WebView/WebView.mm:
13153         Remove an unnecessary include.
13154
13155 2008-11-10  Anders Carlsson  <andersca@apple.com>
13156
13157         Reviewed by Sam Weinig.
13158
13159         Don't use individual ivars for each plug-in vtable function. Instead, get them from the plugin package.
13160         
13161         * Plugins/WebBaseNetscapePluginView.mm:
13162         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
13163         * Plugins/WebNetscapePluginPackage.h:
13164         * Plugins/WebNetscapePluginPackage.m:
13165         (-[WebNetscapePluginPackage load]):
13166         (-[WebNetscapePluginPackage _unloadWithShutdown:]):
13167         * Plugins/WebNetscapePluginView.h:
13168         * Plugins/WebNetscapePluginView.mm:
13169         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
13170         (-[WebNetscapePluginView setWindowIfNecessary]):
13171         (-[WebNetscapePluginView start]):
13172         (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
13173         (-[WebNetscapePluginView createPluginScriptableObject]):
13174         (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
13175         (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
13176         (-[WebNetscapePluginView loadPluginRequest:]):
13177         (-[WebNetscapePluginView _createPlugin]):
13178         (-[WebNetscapePluginView _destroyPlugin]):
13179         (-[WebNetscapePluginView _printedPluginBitmap]):
13180
13181 2008-11-10  Anders Carlsson  <andersca@apple.com>
13182
13183         Reviewed by Kevin Decker.
13184
13185         Add a new WebBaseNetscapePluginView class.
13186
13187         * Plugins/WebBaseNetscapePluginView.h: Added.
13188         * Plugins/WebBaseNetscapePluginView.mm: Added.
13189         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
13190         (-[WebBaseNetscapePluginView setAttributeKeys:andValues:]):
13191         (-[WebBaseNetscapePluginView handleMouseMoved:]):
13192         * Plugins/WebNetscapePluginView.h:
13193         * Plugins/WebNetscapePluginView.mm:
13194         (-[WebNetscapePluginView cut:]):
13195         (-[WebNetscapePluginView copy:]):
13196         (-[WebNetscapePluginView paste:]):
13197         (-[WebNetscapePluginView selectAll:]):
13198         (-[WebNetscapePluginView start]):
13199         (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
13200
13201 2008-11-10  Anders Carlsson  <andersca@apple.com>
13202
13203         Reviewed by Adam Roben.
13204         
13205         Rename WebBaseNetscapePluginView to WebNetscapePluginView.
13206
13207         * Plugins/WebBaseNetscapePluginStream.h:
13208         * Plugins/WebBaseNetscapePluginStream.mm:
13209         (WebNetscapePluginStream::WebNetscapePluginStream):
13210         (WebNetscapePluginStream::setPlugin):
13211         * Plugins/WebBaseNetscapePluginView.h: Removed.
13212         * Plugins/WebBaseNetscapePluginView.mm: Removed.
13213         * Plugins/WebNetscapePluginEventHandler.h:
13214         (WebNetscapePluginEventHandler::WebNetscapePluginEventHandler):
13215         * Plugins/WebNetscapePluginEventHandler.mm:
13216         (WebNetscapePluginEventHandler::create):
13217         * Plugins/WebNetscapePluginEventHandlerCarbon.h:
13218         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
13219         (WebNetscapePluginEventHandlerCarbon::WebNetscapePluginEventHandlerCarbon):
13220         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
13221         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
13222         (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
13223         * Plugins/WebNetscapePluginView.h: Copied from mac/Plugins/WebBaseNetscapePluginView.h.
13224         * Plugins/WebNetscapePluginView.mm: Copied from mac/Plugins/WebBaseNetscapePluginView.mm.
13225         (+[WebNetscapePluginView setCurrentPluginView:]):
13226         (+[WebNetscapePluginView currentPluginView]):
13227         (-[WebNetscapePluginView loadPluginRequest:]):
13228         * Plugins/WebPluginDatabase.mm:
13229         (-[WebPluginDatabase removePluginInstanceViewsFor:]):
13230         (-[WebPluginDatabase destroyAllPluginInstanceViews]):
13231         * Plugins/npapi.mm:
13232         (pluginViewForInstance):
13233         (NPN_MarkedTextAbandoned):
13234         (NPN_MarkedTextSelectionChanged):
13235         * WebCoreSupport/WebFrameLoaderClient.mm:
13236         (NetscapePluginWidget::NetscapePluginWidget):
13237         (NetscapePluginWidget::handleEvent):
13238         (WebFrameLoaderClient::createPlugin):
13239         * WebView/WebHTMLView.mm:
13240         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
13241         (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]):
13242         (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
13243         * WebView/WebView.mm:
13244
13245 2008-11-09  Darin Adler  <darin@apple.com>
13246
13247         Reviewed by John Sullivan.
13248
13249         - fix https://bugs.webkit.org/show_bug.cgi?id=15063
13250           <rdar://problem/5452227> REGRESSION (r25151): Switching to a tab waiting
13251           for first data does not clear the window
13252
13253         * WebCoreSupport/WebFrameLoaderClient.mm:
13254         (WebFrameLoaderClient::frameLoadCompleted): Added comments, and got rid of
13255         a local variable to make this code match the code in the function below
13256         more closely.
13257         (WebFrameLoaderClient::provisionalLoadStarted): Added comments.
13258
13259         * WebView/WebFrame.mm:
13260         (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): Improved comment.
13261
13262         * WebView/WebFrameView.mm:
13263         (-[WebFrameView _scrollView]): Tweaked formatting.
13264         (-[WebFrameView initWithFrame:]): Ditto.
13265         (-[WebFrameView setFrameSize:]): Added a comment and tweaked formatting.
13266         (-[WebFrameView viewDidMoveToWindow]): Added. This is the change that fixes
13267         the bug. Calls setDrawsBackground:YES as appropriate since moving the view
13268         out of the window to switch to another view disrupts the special technique
13269         for showing the old page during the start of loading. This is the identical
13270         reason for the setFrameSize: method above, and the code is almost the same.
13271
13272 2008-11-08  David Kilzer  <ddkilzer@apple.com>
13273
13274         Bug 22137: PLATFORM(MAC) build broken with HAVE(ACCESSIBILITY) disabled
13275
13276         <https://bugs.webkit.org/show_bug.cgi?id=22137>
13277
13278         Reviewed by Darin Adler.
13279
13280         * WebView/WebFrame.mm:
13281         (-[WebFrame _accessibilityTree]): Return nil if HAVE(ACCESSIBILITY)
13282         is false.
13283
13284 2008-11-08  Dan Bernstein  <mitz@apple.com>
13285
13286         Reviewed by Darin Adler.
13287
13288         - WebKit/mac part of adding WebPreferences for controlling databases and local storage
13289
13290         * WebView/WebPreferenceKeysPrivate.h: Added
13291         WebKitDatabasesEnabledPreferenceKey and
13292         WebKitLocalStorageEnabledPreferenceKey.
13293         * WebView/WebPreferences.mm:
13294         (+[WebPreferences initialize]): Made databases and local storage enabled
13295         by default.
13296         (-[WebPreferences databasesEnabled]): Added.
13297         (-[WebPreferences setDatabasesEnabled:]): Added.
13298         (-[WebPreferences localStorageEnabled]): Added.
13299         (-[WebPreferences setLocalStorageEnabled:]): Added.
13300         * WebView/WebPreferencesPrivate.h:
13301         * WebView/WebView.mm:
13302         (-[WebView _preferencesChangedNotification:]): Transfer the databases
13303         and local storage preferences to WebCore settings.
13304
13305 2008-11-06  Anders Carlsson  <andersca@apple.com>
13306
13307         Reviewed by Kevin Decker.
13308
13309         https://bugs.webkit.org/show_bug.cgi?id=22115
13310         NPN_HasPropertyUPP and NPN_HasMethodUPP entries in NPNetscapeFuncs are NULL
13311         
13312         Initialize the browser funcs correctly.
13313         
13314         * Plugins/WebNetscapePluginPackage.m:
13315         (-[WebNetscapePluginPackage load]):
13316
13317 2008-11-06  David Kilzer  <ddkilzer@apple.com>
13318
13319         BUILD FIX: Backed out r38189 (and r38203) for Xcode 3.0.
13320
13321         Apparently older versions of gcc have issues with this patch.
13322         Backing out a second time until the issues are resolved.
13323
13324 2008-11-06  Cameron Zwarich  <zwarich@apple.com>
13325
13326         Reviewed by Geoff Garen.
13327
13328         Move the remaining files in the kjs subdirectory of JavaScriptCore to
13329         a new parser subdirectory, and remove the kjs subdirectory entirely.
13330
13331         The header SavedBuiltins.h was removed in r32587, so it no longer needs
13332         a forwarding header.
13333
13334         * ForwardingHeaders/kjs: Removed.
13335         * ForwardingHeaders/kjs/SavedBuiltins.h: Removed.
13336
13337 2008-11-06  David Kilzer  <ddkilzer@apple.com>
13338
13339         BUILD WAS NOT BROKEN: Rolling r38189 back in.
13340
13341         Please perform a clean build if you see crashes.
13342
13343 2008-11-06  David Kilzer  <ddkilzer@apple.com>
13344
13345         BUILD FIX: Backed out r38189 since it apparently broke the world.
13346
13347 2008-11-06  John Sullivan  <sullivan@apple.com>
13348
13349         Fixed problem with switching between text-only zoom and full-content zoom
13350         
13351         There were two booleans tracking whether zoom was text-only, one in WebCore settings
13352         and one in WebViewPrivate. Fixed by eliminating the one in WebViewPrivate.
13353
13354         Reviewed by Adam Roben
13355
13356         * WebView/WebView.mm:
13357         remove declaration of zoomMultiplierIsTextOnly instance variable in WebViewPrivate
13358         (-[WebViewPrivate init]):
13359         removed initialization of zoomMultiplierIsTextOnly
13360         (-[WebView textSizeMultiplier]):
13361         call [self _realZoomMultiplierIsTextOnly] instead of accessing WebViewPrivate instance variable
13362         (-[WebView _setZoomMultiplier:isTextOnly:]):
13363         update WebCore settings rather than WebViewPrivate instance variable
13364         (-[WebView _zoomMultiplier:]):
13365         call [self _realZoomMultiplierIsTextOnly] instead of accessing WebViewPrivate instance variable
13366         (-[WebView _realZoomMultiplierIsTextOnly]):
13367         return value from WebCore settings instead of accessing WebViewPrivate instance variable
13368         (-[WebView pageSizeMultiplier]):
13369         call [self _realZoomMultiplierIsTextOnly] instead of accessing WebViewPrivate instance variable
13370
13371 2008-11-06  Greg Bolsinga  <bolsinga@apple.com>
13372
13373         Reviewed by Darin Adler.
13374         
13375         Bug 21810: Remove use of static C++ objects that are destroyed at exit time (destructors)
13376         https://bugs.webkit.org/show_bug.cgi?id=21810
13377
13378         * History/WebBackForwardList.mm:
13379         (backForwardLists): Changed to leak an object to avoid an exit-time destructor.
13380         * History/WebHistoryItem.mm:
13381         (historyItemWrappers): Ditto
13382         * Misc/WebStringTruncator.m:
13383         (fontFromNSFont): Ditto
13384         * Plugins/WebBaseNetscapePluginStream.mm:
13385         (streams): Ditto
13386         * WebView/WebView.mm:
13387         (aeDescFromJSValue): Ditto
13388
13389 2008-11-05  Anders Carlsson  <andersca@apple.com>
13390
13391         Reviewed by Mark Rowe.
13392
13393         Keep track of which plug-in host architecture would be needed for a given plug-in package.
13394         
13395         * Plugins/WebNetscapePluginPackage.h:
13396         * Plugins/WebNetscapePluginPackage.m:
13397         (-[WebNetscapePluginPackage _initWithPath:]):
13398         * WebKitPrefix.h:
13399
13400 2008-11-05  Cameron Zwarich  <zwarich@apple.com>
13401
13402         Rubber-stamped by Sam Weinig.
13403
13404         Correct forwarding headers for files moved to the runtime subdirectory
13405         of JavaScriptCore and remove unused forwarding headers.
13406
13407         * ForwardingHeaders/kjs/collector.h: Removed.
13408         * ForwardingHeaders/kjs/identifier.h: Removed.
13409         * ForwardingHeaders/kjs/interpreter.h: Removed.
13410         * ForwardingHeaders/kjs/lookup.h: Removed.
13411         * ForwardingHeaders/kjs/operations.h: Removed.
13412         * ForwardingHeaders/kjs/protect.h: Removed.
13413         * ForwardingHeaders/runtime/Interpreter.h: Copied from ForwardingHeaders/kjs/interpreter.h.
13414         * WebView/WebScriptDebugDelegate.mm:
13415
13416 2008-11-05  Anders Carlsson  <andersca@apple.com>
13417
13418         Reviewed by Kevin Decker.
13419
13420         Remove WebPlugInStreamLoaderDelegate.h
13421         
13422         * Plugins/WebBaseNetscapePluginStream.h:
13423         * Plugins/WebPlugInStreamLoaderDelegate.h: Removed.
13424
13425 2008-11-05  Dan Bernstein  <mitz@apple.com>
13426
13427         - Tiger build fix
13428
13429         * Plugins/WebBaseNetscapePluginView.mm:
13430         (-[WebBaseNetscapePluginView stop]):
13431
13432 2008-11-04  Anders Carlsson  <andersca@apple.com>
13433
13434         Reviewed by Kevin Decker.
13435
13436         Don't leak the CALayer.
13437         
13438         * Plugins/WebBaseNetscapePluginView.h:
13439         Make the layer a RetainPtr.
13440         
13441         * Plugins/WebBaseNetscapePluginView.mm:
13442         (-[WebBaseNetscapePluginView start]):
13443         
13444         (-[WebBaseNetscapePluginView stop]):
13445         Make sure to clear out the layer here.
13446
13447 2008-11-04  Cameron Zwarich  <zwarich@apple.com>
13448
13449         Rubber-stamped by Sam Weinig.
13450
13451         Remove the unused kjs/dtoa.h forwarding header.
13452
13453         * ForwardingHeaders/kjs/dtoa.h: Removed.
13454
13455 2008-11-04  Anders Carlsson  <andersca@apple.com>
13456
13457         Reviewed by Kevin Decker.
13458
13459         More cleanup. Make a bunch of instance variables RetainPtrs.
13460         
13461         * Plugins/WebBaseNetscapePluginView.h:
13462         * Plugins/WebBaseNetscapePluginView.mm:
13463         (-[WebBaseNetscapePluginView visibleRect]):
13464         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
13465         (-[WebBaseNetscapePluginView sendActivateEvent:]):
13466         (-[WebBaseNetscapePluginView sendDrawRectEvent:]):
13467         (-[WebBaseNetscapePluginView stopTimers]):
13468         (-[WebBaseNetscapePluginView restartTimers]):
13469         (-[WebBaseNetscapePluginView setHasFocus:]):
13470         (-[WebBaseNetscapePluginView mouseDown:]):
13471         (-[WebBaseNetscapePluginView mouseUp:]):
13472         (-[WebBaseNetscapePluginView mouseEntered:]):
13473         (-[WebBaseNetscapePluginView mouseExited:]):
13474         (-[WebBaseNetscapePluginView handleMouseMoved:]):
13475         (-[WebBaseNetscapePluginView mouseDragged:]):
13476         (-[WebBaseNetscapePluginView scrollWheel:]):
13477         (-[WebBaseNetscapePluginView keyUp:]):
13478         (-[WebBaseNetscapePluginView keyDown:]):
13479         (-[WebBaseNetscapePluginView flagsChanged:]):
13480         (-[WebBaseNetscapePluginView cut:]):
13481         (-[WebBaseNetscapePluginView copy:]):
13482         (-[WebBaseNetscapePluginView paste:]):
13483         (-[WebBaseNetscapePluginView selectAll:]):
13484         (-[WebBaseNetscapePluginView didStart]):
13485         (-[WebBaseNetscapePluginView start]):
13486         (-[WebBaseNetscapePluginView stop]):
13487         (-[WebBaseNetscapePluginView dataSource]):
13488         (-[WebBaseNetscapePluginView pluginPackage]):
13489         (-[WebBaseNetscapePluginView setPluginPackage:]):
13490         (-[WebBaseNetscapePluginView setAttributeKeys:andValues:]):
13491         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
13492         (-[WebBaseNetscapePluginView fini]):
13493         (-[WebBaseNetscapePluginView dealloc]):
13494         (-[WebBaseNetscapePluginView pluginView:receivedError:]):
13495         (-[WebBaseNetscapePluginView requestWithURLCString:]):
13496         (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
13497         (-[WebBaseNetscapePluginView loadPluginRequest:]):
13498         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
13499         (-[WebBaseNetscapePluginView userAgent]):
13500         (-[WebBaseNetscapePluginView getVariable:value:]):
13501         (-[WebBaseNetscapePluginView setVariable:value:]):
13502         (-[WebBaseNetscapePluginView _createPlugin]):
13503         (-[WebBaseNetscapePluginView _redeliverStream]):
13504
13505 2008-11-04  Brady Eidson  <beidson@apple.com>
13506
13507         Reviewed by John Sullivan
13508
13509         Cleanup global history a tad.  
13510
13511         Used to _addItemForURL always create a new item and merge it with a previous item if one existed.
13512
13513         It is more efficient and less complicated to update the previous item if one exists.
13514
13515         * History/WebHistory.mm:
13516         (-[WebHistoryPrivate visitedURL:withTitle:]):
13517         (-[WebHistory _visitedURL:withTitle:]):  Instead of calling the general purpose [WebHistoryPrivate addItem:]
13518           with a new history item, call the new special purposed visitedURL:withTitle:
13519         * History/WebHistoryInternal.h:
13520
13521         * History/WebHistoryItem.mm:
13522         (-[WebHistoryItem _visitedWithTitle:]): Call "visited()" on the WebCore history item with the pertinent info.
13523         * History/WebHistoryItemInternal.h:
13524
13525         * WebCoreSupport/WebFrameLoaderClient.mm:
13526         (WebFrameLoaderClient::updateGlobalHistory):
13527
13528 2008-11-04  Anders Carlsson  <andersca@apple.com>
13529
13530         Reviewed by Kevin Decker.
13531
13532         https://bugs.webkit.org/show_bug.cgi?id=22065
13533
13534         Only create the plug-in stream loader when the stream is started. 
13535         
13536         * Plugins/WebBaseNetscapePluginStream.mm:
13537         (WebNetscapePluginStream::WebNetscapePluginStream):
13538         (WebNetscapePluginStream::start):
13539
13540 2008-11-04  Anders Carlsson  <andersca@apple.com>
13541
13542         Reviewed by Kevin Decker.
13543         
13544         https://bugs.webkit.org/show_bug.cgi?id=22065
13545         
13546         Remove some old, unused plug-in code.
13547         
13548         * Plugins/WebBaseNetscapePluginView.h:
13549         * Plugins/WebBaseNetscapePluginView.mm:
13550         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
13551         (-[WebBaseNetscapePluginView start]):
13552         (-[WebBaseNetscapePluginView setVariable:value:]):
13553
13554 2008-11-04  Simon Fraser  <simon.fraser@apple.com>
13555
13556         Reviewed by Dave Hyatt
13557
13558         https://bugs.webkit.org/show_bug.cgi?id=21941
13559
13560         Rename absolutePosition() to localToAbsolute(), and add the ability
13561         to optionally take transforms into account (which will eventually be the
13562         default behavior).
13563
13564         * WebView/WebRenderNode.mm:
13565         (copyRenderNode):
13566
13567 2008-11-01  Alexey Proskuryakov  <ap@webkit.org>
13568
13569         Reviewed by Darin Adler.
13570
13571         https://bugs.webkit.org/show_bug.cgi?id=22030
13572         Make EventNames usable from multiple threads
13573
13574         * WebView/WebHTMLView.mm:
13575         * WebView/WebPDFView.mm:
13576         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
13577         Access event names via eventNames() function.
13578
13579 2008-11-04  Cameron Zwarich  <zwarich@apple.com>
13580
13581         Reviewed by Mark Rowe.
13582
13583         Delete a forwarding header for a file that no longer exists.
13584
13585         * ForwardingHeaders/kjs/string_object.h: Removed.
13586
13587 2008-11-03  Cameron Zwarich  <zwarich@apple.com>
13588
13589         Rubber-stamped by Maciej Stachowiak.
13590
13591         Move more files into the runtime subdirectory of JavaScriptCore.
13592
13593         * ForwardingHeaders/kjs/JSLock.h: Removed.
13594         * ForwardingHeaders/kjs/SymbolTable.h: Removed.
13595         * ForwardingHeaders/runtime/JSLock.h: Copied from ForwardingHeaders/kjs/JSLock.h.
13596         * ForwardingHeaders/runtime/SymbolTable.h: Copied from ForwardingHeaders/kjs/SymbolTable.h.
13597         * Misc/WebCoreStatistics.mm:
13598         * Plugins/WebBaseNetscapePluginStream.mm:
13599         * Plugins/WebBaseNetscapePluginView.mm:
13600         * Plugins/WebPluginController.mm:
13601         * WebView/WebFrame.mm:
13602         * WebView/WebScriptDebugDelegate.mm:
13603         * WebView/WebView.mm:
13604
13605 2008-11-03  Mark Rowe  <mrowe@apple.com>
13606
13607         Fix the 64-bit build.
13608
13609         Pull the frequently-made check for drawingModel == NPDrawingModelQuickDraw out into a
13610         helper function to avoid #ifdef'ing all of the new places that this check is made.
13611
13612         A few other #ifdef's are moved inside functions to allow their call sites to remain #ifdef-free,
13613         and we rely on the compiler to optimise out the check (which will always be false in 64-bit) instead.
13614
13615         * Plugins/WebBaseNetscapePluginView.mm:
13616         (isDrawingModelQuickDraw):
13617         (-[WebBaseNetscapePluginView fixWindowPort]):
13618         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
13619         (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
13620         (-[WebBaseNetscapePluginView updateAndSetWindow]):
13621         (-[WebBaseNetscapePluginView start]):
13622         (-[WebBaseNetscapePluginView tellQuickTimeToChill]):
13623         (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
13624         (-[WebBaseNetscapePluginView _viewHasMoved]):
13625
13626 2008-11-03  Maciej Stachowiak  <mjs@apple.com>
13627
13628         Reviewed by Kevin Decker.
13629         
13630         - fix release build (and unitialized variable for CG drawing model!)
13631
13632         * Plugins/WebBaseNetscapePluginView.mm:
13633         (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): initialize portState in all code paths
13634
13635 2008-11-03  Kevin Decker  <kdecker@apple.com>
13636
13637         Reviewed by Anders Carlsson.
13638
13639         https://bugs.webkit.org/show_bug.cgi?id=22053
13640         
13641         This patch adds initial support for the NPDrawingModelCoreAnimation drawing model. 
13642                 
13643         * Plugins/WebBaseNetscapePluginView.h: Added _layer ivar.
13644         * Plugins/WebBaseNetscapePluginView.mm:
13645         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): ASSERT this is not a plug-in using NPDrawingModelCoreAnimation.
13646         (-[WebBaseNetscapePluginView restorePortState:]): Ditto.
13647         (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): Slightly refactored a small block of code which with the PortState.
13648         Plug-ins using the NPDrawingModelCoreAnimation drawing model have no PortState. 
13649         (-[WebBaseNetscapePluginView isNewWindowEqualToOldWindow]): ASSERT this is not a plug-in using NPDrawingModelCoreAnimation
13650         (-[WebBaseNetscapePluginView updateAndSetWindow]):  Ditto.
13651         (-[WebBaseNetscapePluginView setWindowIfNecessary]): Ditto.
13652         (-[WebBaseNetscapePluginView start]): If the plug-in is a plug-in using the Core Animation model, request a layer from it.
13653         (-[WebBaseNetscapePluginView drawRect:]): Return early for NPDrawingModelCoreAnimation plug-ins.
13654         (-[WebBaseNetscapePluginView getVariable:value:]): Tell plug-ins running on post-Tiger systems WebKit supports
13655          NPDrawingModelCoreAnimation.
13656         (-[WebBaseNetscapePluginView setVariable:value:]): Added the new NPDrawingModelCoreAnimation case, which initializes drawingMode.
13657         (-[WebBaseNetscapePluginView _viewHasMoved]): Reworded the conditional call to updateAndSetWindow to be specific to 
13658         CoreGraphics and QuickDraw plug-ins.
13659
13660 2008-10-31  Cameron Zwarich  <zwarich@apple.com>
13661
13662         Reviewed by Darin Adler.
13663
13664         Bug 22019: Move JSC::Interpreter::shouldPrintExceptions() to WebCore::Console
13665         <https://bugs.webkit.org/show_bug.cgi?id=22019>
13666
13667         * Misc/WebCoreStatistics.mm:
13668         (+[WebCoreStatistics shouldPrintExceptions]):
13669         (+[WebCoreStatistics setShouldPrintExceptions:]):
13670
13671 2008-10-31  Dan Bernstein  <mitz@apple.com>
13672
13673         Reviewed by John Sullivan.
13674
13675         - WebKit/mac part of <rdar://problem/6334641> Add WebView SPI for disabling document.cookie
13676
13677         * WebView/WebView.mm:
13678         (-[WebView _cookieEnabled]):
13679         (-[WebView _setCookieEnabled:]):
13680         * WebView/WebViewPrivate.h:
13681
13682 2008-10-31  Brady Eidson  <beidson@apple.com>
13683
13684         Reviewed by Darin Adler
13685
13686         [WebHistory setLastVisitedTimeInterval:forItem] was internal to WebHistory.mm and 
13687         completely unused.  Nuke it!
13688
13689         * History/WebHistory.mm:
13690
13691 2008-10-31  Chris Fleizach  <cfleizach@apple.com>
13692
13693         Reviewed by Darin Adler.
13694
13695         <rdar://problem/4361197> Screen Reader's Item Chooser shows scroll area for WebKit Application window
13696
13697         If a WebFrameView does not allow scrolling, its scrollbars should not appear in the accessibility hierarchy.
13698
13699         * WebView/WebDynamicScrollBarsView.m:
13700         (-[WebDynamicScrollBarsView accessibilityIsIgnored]):
13701
13702 2008-10-30  Mark Rowe  <mrowe@apple.com>
13703
13704         Reviewed by Jon Homeycutt.
13705
13706         Explicitly default to building for only the native architecture in debug and release builds.
13707
13708         * Configurations/DebugRelease.xcconfig:
13709
13710 2008-10-30  Cameron Zwarich  <zwarich@apple.com>
13711
13712         Rubber-stamped by Sam Weinig.
13713
13714         Create a debugger directory in JavaScriptCore and move the relevant
13715         files to it.
13716
13717         * ForwardingHeaders/debugger: Added.
13718         * ForwardingHeaders/debugger/DebuggerCallFrame.h: Copied from ForwardingHeaders/kjs/DebuggerCallFrame.h.
13719         * ForwardingHeaders/kjs/DebuggerCallFrame.h: Removed.
13720         * WebView/WebScriptDebugDelegate.mm:
13721         * WebView/WebScriptDebugger.h:
13722         * WebView/WebScriptDebugger.mm:
13723
13724 2008-10-29  Anders Carlsson  <andersca@apple.com>
13725
13726         Reviewed by Kevin Decker.
13727
13728         * Plugins/WebBaseNetscapePluginStream.h:
13729         * Plugins/WebBaseNetscapePluginStream.mm:
13730         (WebNetscapePluginStream::WebNetscapePluginStream):
13731         (WebNetscapePluginStream::~WebNetscapePluginStream):
13732         (WebNetscapePluginStream::start):
13733
13734 2008-10-29  Anders Carlsson  <andersca@apple.com>
13735
13736         Reviewed by Sam Weinig.
13737
13738         Remove an unused forward class declaration.
13739         
13740         * Plugins/WebBaseNetscapePluginView.h:
13741
13742 2008-10-29  Anders Carlsson  <andersca@apple.com>
13743
13744         Reviewed by Sam Weinig.
13745
13746         Remove WebBaseNetscapePluginViewInternal.h and WebBaseNetscapePluginViewPrivate.h.
13747
13748         * Plugins/WebBaseNetscapePluginView.h:
13749         * Plugins/WebBaseNetscapePluginViewInternal.h: Removed.
13750         * Plugins/WebBaseNetscapePluginViewPrivate.h: Removed.
13751         * Plugins/WebNetscapePluginEventHandler.mm:
13752         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
13753         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
13754         * Plugins/npapi.mm:
13755         * WebView/WebHTMLView.mm:
13756
13757 2008-10-29  Anders Carlsson  <andersca@apple.com>
13758
13759         Reviewed by Sam Weinig.
13760
13761         Remove WebNetscapePluginEmbeddedView, it adds nothing extra now. 
13762         
13763         Remove WebNetscapePlugInStreamLoaderClient since WebNetscapePluginStream is the client now.
13764         
13765         * Plugins/WebBaseNetscapePluginStream.h:
13766         * Plugins/WebBaseNetscapePluginStream.mm:
13767         * Plugins/WebBaseNetscapePluginView.h:
13768         * Plugins/WebKitPluginContainerView.h:
13769         * Plugins/WebNetscapePluginEmbeddedView.h: Removed.
13770         * Plugins/WebNetscapePluginEmbeddedView.mm: Removed.
13771         * Plugins/WebNetscapePluginEventHandler.h:
13772         * WebCoreSupport/WebFrameLoaderClient.mm:
13773         (NetscapePluginWidget::NetscapePluginWidget):
13774         (NetscapePluginWidget::handleEvent):
13775         (WebFrameLoaderClient::createPlugin):
13776         * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.h: Removed.
13777         * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.mm: Removed.
13778         * WebView/WebHTMLView.mm:
13779         (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
13780
13781 2008-10-29  Anders Carlsson  <andersca@apple.com>
13782
13783         Reviewed by Sam Weinig.
13784
13785         Remove the WebBaseNetscapePluginStream Objective-C object.
13786         
13787         * Plugins/WebBaseNetscapePluginStream.h:
13788         (WebNetscapePluginStream::create):
13789         * Plugins/WebBaseNetscapePluginStream.mm:
13790         (WebNetscapePluginStream::WebNetscapePluginStream):
13791         * Plugins/WebBaseNetscapePluginView.mm:
13792         (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
13793         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
13794         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
13795
13796 2008-10-29  Brady Eidson  <beidson@apple.com>
13797
13798         Reviewed by Sam Weinig
13799
13800         https://bugs.webkit.org/show_bug.cgi?id=21952
13801         
13802         Address an outstanding FIXME by removing unused SPI
13803
13804         * History/WebHistory.mm:
13805         (-[WebHistory _addItemForURL:title:]): Fold addItem: into this method
13806
13807         * History/WebHistoryPrivate.h: Removed unused/unneccessary SPI
13808
13809 2008-10-28  Justin Garcia  <justin.garcia@apple.com>
13810
13811         Reviewed by Darin Adler.
13812         
13813         <rdar://problem/5188560> REGRESSION: Spell checker doesn't clear spelling/grammar marker after error is marked as Ignored
13814
13815         * WebView/WebHTMLView.mm: IgnoreSpelling is now a WebCore command.  That command handles
13816         calling back into WebKit to perform the cross platform work that was removed in this change.
13817
13818 2008-10-28  Cameron Zwarich  <zwarich@apple.com>
13819
13820         Reviewed by Mark Rowe.
13821
13822         Move ForwardingHeaders to their correct location after the creation of
13823         the runtime directory in JavaScriptCore.
13824
13825         * ForwardingHeaders/kjs/JSFunction.h: Removed.
13826         * ForwardingHeaders/kjs/JSObject.h: Removed.
13827         * ForwardingHeaders/kjs/JSString.h: Removed.
13828         * ForwardingHeaders/kjs/JSValue.h: Removed.
13829         * ForwardingHeaders/runtime: Added.
13830         * ForwardingHeaders/runtime/JSFunction.h: Copied from ForwardingHeaders/kjs/JSFunction.h.
13831         * ForwardingHeaders/runtime/JSObject.h: Copied from ForwardingHeaders/kjs/JSObject.h.
13832         * ForwardingHeaders/runtime/JSString.h: Copied from ForwardingHeaders/kjs/JSString.h.
13833         * ForwardingHeaders/runtime/JSValue.h: Copied from ForwardingHeaders/kjs/JSValue.h.
13834         * WebView/WebScriptDebugDelegate.mm:
13835         * WebView/WebScriptDebugger.mm:
13836         * WebView/WebView.mm:
13837
13838 2008-10-28  Adele Peterson  <adele@apple.com>
13839
13840         Reviewed by John Sullivan.
13841
13842         Fix for https://bugs.webkit.org/show_bug.cgi?id=21880
13843         "files" string for multifile uploads needs to be localized
13844
13845         * WebCoreSupport/WebViewFactory.mm: (-[WebViewFactory multipleFileUploadTextForNumberOfFiles:]):
13846         Added.
13847
13848 2008-10-28  Timothy Hatcher  <timothy@apple.com>
13849
13850         Add WebInspector methods to enable the profiler.
13851
13852         https://bugs.webkit.org/show_bug.cgi?id=21927
13853
13854         <rdar://problem/6211578> Make the JavaScript profiler opt-in, so it does
13855         not slow down JavaScript all the time
13856
13857         Reviewed by Darin Adler and Kevin McCullough.
13858
13859         * WebInspector/WebInspector.h:
13860         * WebInspector/WebInspector.mm:
13861         (-[WebInspector isJavaScriptProfilingEnabled]): Added. Calls InspectorController::profilerEnabled.
13862         (-[WebInspector setJavaScriptProfilingEnabled:]): Added. Call InspectorController's disableProfiler
13863         or enableProfiler methods.
13864
13865 2008-10-27  Timothy Hatcher  <timothy@apple.com>
13866
13867         Rename a few methods related to attaching and detaching the debugger.
13868
13869         * Rename attachDebugger to enableDebugger.
13870         * Rename detachDebugger to disableDebugger.
13871         * Rename the debuggerAttached getter to debuggerEnabled.
13872
13873         Reviewed by Darin Adler.
13874
13875         * WebInspector/WebInspector.mm:
13876         (-[WebInspector isDebuggingJavaScript]):
13877         (-[WebInspector startDebuggingJavaScript:]):
13878         (-[WebInspector stopDebuggingJavaScript:]):
13879
13880 2008-10-27  Anders Carlsson  <andersca@apple.com>
13881
13882         Reviewed by Maciej Stachowiak.
13883
13884         Use the C++ stream object for JS requests as well.
13885         
13886         * Plugins/WebBaseNetscapePluginView.mm:
13887         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
13888         (-[WebBaseNetscapePluginView destroyStream:reason:]):
13889
13890 2008-10-27  Anders Carlsson  <andersca@apple.com>
13891
13892         Reviewed by Dan Bernstein.
13893         
13894         Use the C++ stream object in WebBaseNetscapePluginView. Use a HashSet of RefPtrs to keep track of the streams.
13895         
13896         * Plugins/WebBaseNetscapePluginStream.mm:
13897         (WebNetscapePluginStream::~WebNetscapePluginStream):
13898         (WebNetscapePluginStream::setPlugin):
13899         (WebNetscapePluginStream::startStream):
13900         (WebNetscapePluginStream::destroyStream):
13901         (WebNetscapePluginStream::destroyStreamWithReason):
13902         (WebNetscapePluginStream::cancelLoadAndDestroyStreamWithError):
13903         (WebNetscapePluginStream::deliverData):
13904         * Plugins/WebBaseNetscapePluginView.h:
13905         * Plugins/WebBaseNetscapePluginView.mm:
13906         (-[WebBaseNetscapePluginView stop]):
13907         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:DOMElement:]):
13908         (-[WebBaseNetscapePluginView disconnectStream:]):
13909         (-[WebBaseNetscapePluginView dealloc]):
13910         (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
13911         (-[WebBaseNetscapePluginView pluginView:receivedData:]):
13912         (-[WebBaseNetscapePluginView pluginView:receivedError:]):
13913         (-[WebBaseNetscapePluginView pluginViewFinishedLoading:]):
13914         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
13915
13916 2008-10-27  Anders Carlsson  <andersca@apple.com>
13917
13918         Reviewed by Dan Bernstein.
13919         
13920         Move code from dealloc and finalize to the WebNetscapePluginStream destructor.
13921         
13922         * Plugins/WebBaseNetscapePluginStream.h:
13923         * Plugins/WebBaseNetscapePluginStream.mm:
13924         (WebNetscapePluginStream::~WebNetscapePluginStream):
13925         (-[WebBaseNetscapePluginStream dealloc]):
13926         (-[WebBaseNetscapePluginStream finalize]):
13927
13928 2008-10-27  Anders Carlsson  <andersca@apple.com>
13929
13930         Reviewed by Sam Weinig.
13931
13932         Get rid of WebNetscapePlugInStreamLoaderClient, the plug-in stream is its own client.
13933         
13934         * Plugins/WebBaseNetscapePluginStream.h:
13935         * Plugins/WebBaseNetscapePluginStream.mm:
13936         (WebNetscapePluginStream::WebNetscapePluginStream):
13937         (-[WebBaseNetscapePluginStream dealloc]):
13938         (-[WebBaseNetscapePluginStream finalize]):
13939         * Plugins/WebBaseNetscapePluginView.mm:
13940         (-[WebBaseNetscapePluginView pluginView:receivedError:]):
13941         (-[WebBaseNetscapePluginView pluginViewFinishedLoading:]):
13942         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
13943         (-[WebBaseNetscapePluginView destroyStream:reason:]):
13944
13945 2008-10-27  Anders Carlsson  <andersca@apple.com>
13946
13947         Reviewed by Darin Adler.
13948
13949         Change the Obj-C init methods to simply call WebNetscapePluginStream::create.
13950         
13951         * Plugins/WebBaseNetscapePluginStream.h:
13952         (WebNetscapePluginStream::create):
13953         * Plugins/WebBaseNetscapePluginStream.mm:
13954         (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
13955         (WebNetscapePluginStream::WebNetscapePluginStream):
13956         (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
13957
13958 2008-10-27  Anders Carlsson  <andersca@apple.com>
13959
13960         Reviewed by Kevin Decker.
13961
13962         Convert more code over to C++.
13963         
13964         * Plugins/WebBaseNetscapePluginStream.h:
13965         (WebNetscapePluginStream::plugin):
13966         (WebNetscapePluginStream::setRequestURL):
13967         Convert to C++.
13968
13969         * Plugins/WebBaseNetscapePluginStream.mm:
13970         (WebNetscapePluginStream::start):
13971         (WebNetscapePluginStream::stop):
13972         Ditto.
13973         
13974         (WebNetscapePluginStream::startStreamWithResponse):
13975         Ditto.
13976         
13977         (-[WebBaseNetscapePluginStream startStreamWithResponse:]):
13978         Call the C++ version.
13979         
13980         (-[WebBaseNetscapePluginStream impl]):
13981         New accessor for the C++ class.
13982         
13983         * Plugins/WebBaseNetscapePluginView.mm:
13984         (-[WebBaseNetscapePluginView pluginView:receivedData:]):
13985         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
13986         (-[WebBaseNetscapePluginView destroyStream:reason:]):
13987         Call the C++ methods.
13988
13989 2008-10-24  Sam Weinig  <sam@webkit.org>
13990
13991         Reviewed by Dan Bernstein.
13992
13993         Fix https://bugs.webkit.org/show_bug.cgi?id=21759
13994         Layering violation: FileChooser should not depend on Document/Frame/Page
13995
13996         * WebCoreSupport/WebChromeClient.h:
13997         * WebCoreSupport/WebChromeClient.mm:
13998         (WebChromeClient::runOpenPanel):
13999
14000 2008-10-24  Anders Carlsson  <andersca@apple.com>
14001
14002         Fix Tiger build.
14003         
14004         * WebView/WebUIDelegate.h:
14005
14006 2008-10-24  Anders Carlsson  <andersca@apple.com>
14007
14008         Reviewed by Sam Weinig.
14009
14010         <rdar://problem/5440917> Support NPN_Construct
14011         
14012         Set construct.
14013         
14014         * Plugins/WebNetscapePluginPackage.m:
14015         (-[WebNetscapePluginPackage load]):
14016
14017 2008-10-24  Mark Rowe  <mrowe@apple.com>
14018
14019         Rubber-stamped by Tim Hatcher.
14020
14021         <rdar://problem/6119711> Remove the dependency on Foundation's private __COCOA_FORMAL_PROTOCOLS__ define.
14022
14023         * Misc/EmptyProtocolDefinitions.h:
14024
14025 2008-10-24  Adele Peterson  <adele@apple.com>
14026
14027         Reviewed by Sam Weinig.
14028
14029         WebKit part of fix for <rdar://problem/5839256> FILE CONTROL: multi-file upload.
14030
14031         * WebCoreSupport/WebChromeClient.mm:
14032         (WebChromeClient::runOpenPanel):
14033         (-[WebOpenPanelResultListener chooseFilenames:]):
14034         * WebView/WebUIDelegate.h:
14035
14036 2008-10-24  Timothy Hatcher  <timothy@apple.com>
14037
14038         Implement new InspectorClient methods to work with Settings.
14039
14040         https://bugs.webkit.org/show_bug.cgi?id=21856
14041
14042         Reviewed by Darin Adler.
14043
14044         * WebCoreSupport/WebInspectorClient.h: Add the new methods and
14045         guard the ObjC parts of the header.
14046
14047 2008-10-24  Darin Adler  <darin@apple.com>
14048
14049         - finish rolling out https://bugs.webkit.org/show_bug.cgi?id=21732
14050
14051         * WebView/WebFrame.mm:
14052         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
14053         * WebView/WebScriptDebugDelegate.mm:
14054         (-[WebScriptCallFrame _convertValueToObjcValue:]):
14055         (-[WebScriptCallFrame exception]):
14056         (-[WebScriptCallFrame evaluateWebScript:]):
14057         * WebView/WebView.mm:
14058         (aeDescFromJSValue):
14059         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
14060         Use JSValue* instead of JSValuePtr.
14061
14062 2008-10-23  Mark Rowe  <mrowe@apple.com>
14063
14064         Build fix.
14065
14066         * Misc/WebKitErrors.m:
14067         (-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]):
14068
14069 2008-10-20  Sam Weinig  <sam@webkit.org>
14070
14071         Reviewed by Anders Carlsson.
14072
14073         Remove FrameLoaderClient::detachedFromParent4.  It is no longer used by any port.
14074
14075         * WebCoreSupport/WebFrameLoaderClient.h:
14076         * WebCoreSupport/WebFrameLoaderClient.mm:
14077
14078 2008-10-20  Alexey Proskuryakov  <ap@webkit.org>
14079
14080         Reviewed by Oliver Hunt.
14081
14082         <rdar://problem/6277777> REGRESSION (r36954): XMLHttpRequest not working when
14083         certain WebView delegate actions are taken
14084
14085         * WebView/WebFrame.mm: (-[WebFrame _attachScriptDebugger]): Don't accidentally create
14086         a window shell if there is none yet.
14087
14088 2008-10-19  Darin Adler  <darin@apple.com>
14089
14090         Reviewed by Oliver Hunt.
14091
14092         - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
14093           improve performance by eliminating JSValue as a base class for JSCell
14094
14095         Remove most uses of JSValue, which will be removed in a future patch.
14096
14097         * WebView/WebFrame.mm:
14098         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
14099         Use JSValuePtr instead of JSValue.
14100         * WebView/WebScriptDebugger.h: Removed declaration of JSValue.
14101
14102 2008-10-18  Darin Adler  <darin@apple.com>
14103
14104         Reviewed by Oliver Hunt.
14105
14106         - next step of https://bugs.webkit.org/show_bug.cgi?id=21732
14107           improve performance by eliminating JSValue as a base class for JSCell
14108
14109         Tweak a little more to get closer to where we can make JSValuePtr a class.
14110
14111         * WebView/WebScriptDebugDelegate.mm:
14112         (-[WebScriptCallFrame _convertValueToObjcValue:]): Use JSValuePtr.
14113         (-[WebScriptCallFrame exception]): Ditto.
14114         (-[WebScriptCallFrame evaluateWebScript:]): Ditto. And noValue.
14115         * WebView/WebScriptDebugger.mm:
14116         (WebScriptDebugger::WebScriptDebugger): Use new DebuggerCallFrame
14117         constructor that doesn't require explicitly passing an exception.
14118         * WebView/WebView.mm:
14119         (aeDescFromJSValue): Use JSValuePtr.
14120         (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
14121
14122 2008-10-18  Dan Bernstein  <mitz@apple.com>
14123
14124         Reviewed by Sam Weinig.
14125
14126         - WebKit/mac part of https://bugs.webkit.org/show_bug.cgi?id=21736
14127           Long-dead decoded image data make up for most of the object cache's memory use over time
14128
14129         * WebView/WebView.mm:
14130         (+[WebView _setCacheModel:]): In the primary web browser model, set the
14131         cache's dead decoded data deletion interval to 60 seconds.
14132
14133 2008-10-15  Mark Rowe  <mrowe@apple.com>
14134
14135         Reviewed by Jon Honeycutt.
14136
14137         Fix a leak of a CFStringRef reported by the build bot.
14138
14139         * Plugins/WebBaseNetscapePluginView.mm:
14140         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]): Use a autoreleased
14141         NSString rather than manually releasing a CFStringRef when we're done with it.
14142
14143 2008-10-15  Kenneth Russell  <kenneth.russell@sun.com>
14144
14145         Reviewed and landed by Anders Carlsson.
14146
14147         https://bugs.webkit.org/show_bug.cgi?id=21572
14148         
14149         Initialize pluginFunc.size to the correct size before calling NP_GetEntryPoints.
14150         
14151         * Plugins/WebNetscapePluginPackage.m:
14152         (-[WebNetscapePluginPackage load]):
14153
14154 2008-10-15  Mark Rowe  <mrowe@apple.com>
14155
14156         Reviewed by Dan Bernstein.
14157
14158         <rdar://problem/6272508> Crash occurs after loading flash content at http://www.macrumors.com/
14159
14160         Restore some code related to the CoreGraphics drawing model that was misplaced in r37131.
14161
14162         * Plugins/WebBaseNetscapePluginView.mm:
14163         (-[WebBaseNetscapePluginView invalidateRegion:]):
14164         (-[WebBaseNetscapePluginView setVariable:value:]):
14165
14166 2008-10-15  Geoffrey Garen  <ggaren@apple.com>
14167
14168         Reviewed by Cameron Zwarich.
14169
14170         Fixed https://bugs.webkit.org/show_bug.cgi?id=21345
14171         Start the debugger without reloading the inspected page
14172
14173         * WebInspector/WebInspector.mm:
14174         (-[WebInspector startDebuggingJavaScript:]): Updated for rename.
14175
14176 2008-10-14  Maxime Britto  <britto@apple.com>
14177
14178         Reviewed by Darin Adler.
14179
14180         Added SPI to use WebCore's TextIterator with WebKit.
14181
14182         * WebView/WebTextIterator.h: Added.
14183         * WebView/WebTextIterator.mm: Added.
14184         (-[WebTextIteratorPrivate dealloc]):
14185         (-[WebTextIterator dealloc]):
14186         (-[WebTextIterator initWithRange:]): Creates a TextIterator 
14187         instance
14188         (-[WebTextIterator advance]): Asks the iterator to advance() .
14189         (-[WebTextIterator currentNode]): Returns the current DOMNode from 
14190         the iterator
14191         (-[WebTextIterator currentText]): Returns the current text from the 
14192         iterator
14193         (-[WebTextIterator atEnd]): Indicated whether the iterator has 
14194         reached the end of the range.
14195         * WebView/WebView.h:
14196         * WebView/WebView.mm:
14197         (-[WebView textIteratorForRect:]): Returns a WebTextIterator with 
14198         the DOMRange contained in the rectangle given as a parameter.
14199
14200 2008-10-15  Timothy Hatcher  <timothy@apple.com>
14201
14202         Clean up user agent generation to simplify the _standardUserAgentWithApplicationName:
14203         class method to not require a WebKit version.
14204
14205         Reviewed by Darin Adler.
14206
14207         * WebView/WebView.mm:
14208         (+[WebView _standardUserAgentWithApplicationName:]): Create the WebKit version.
14209         (-[WebView WebCore::_userAgentForURL:]): Use the simplified _standardUserAgentWithApplicationName:.
14210         Remove code that created the WebKit version.
14211         * WebView/WebViewPrivate.h: Change the method name of _standardUserAgentWithApplicationName:.
14212
14213 2008-10-14  Timothy Hatcher  <timothy@apple.com>
14214
14215         Make the user agent generation method a class method and cache the WebKit
14216         version in a static to prevent generating it every time. This is needed
14217         clean up to fix <rdar://problem/6292331>. Moved all code to WebPrivate so
14218         the class method can be in the WebViewPrivate.h header.
14219
14220         Reviewed by John Sullivan.
14221
14222         * WebView/WebView.mm:
14223         (callGestalt): Moved. Same code.
14224         (createMacOSXVersionString): Moved. Same code.
14225         (createUserVisibleWebKitVersionString): Moved from _userVisibleBundleVersionFromFullVersion:
14226         and returns a copied string.
14227         (+[WebView _standardUserAgentWithApplicationName:andWebKitVersion:]): Made into a class method.
14228         (-[WebView WebCore::_userAgentForURL:]): Changed to cache the WebKit version.
14229         * WebView/WebViewPrivate.h: Added +_standardUserAgentWithApplicationName:andWebKitVersion:.
14230
14231 2008-10-13  Maciej Stachowiak  <mjs@apple.com>
14232
14233         Rubber stamped by Mark Rowe.
14234         
14235         - use gcc 4.2 when building with Xcode 3.1 or newer on Leopard, even though this is not the default
14236
14237         * Configurations/DebugRelease.xcconfig:
14238
14239 2008-10-11  Dan Bernstein  <mitz@apple.com>
14240
14241         Reviewed by Sam Weinig.
14242
14243         - rename _setAlwaysUseATSU to _setAlwaysUsesComplexTextCodePath and
14244           update it for the renamed WebCoreTextRenderer method; keep the old
14245           method around for clients that use it
14246
14247         * WebView/WebView.mm:
14248         (+[WebView _setAlwaysUseATSU:]):
14249         (+[WebView _setAlwaysUsesComplexTextCodePath:]):
14250         * WebView/WebViewPrivate.h:
14251
14252 2008-10-09  Timothy Hatcher  <timothy@apple.com>
14253
14254         Don't convert JavaScriptCore header include paths to WebKit paths. This was needed
14255         back when NPAPI and WebScriptObject migrated from JavaScriptCore. Also remove
14256         JavaScriptCore from the VPATH.
14257
14258         Reviewed by Sam Weinig.
14259
14260         * MigrateHeaders.make:
14261
14262 2008-10-08  Darin Adler  <darin@apple.com>
14263
14264         Reviewed by Cameron Zwarich.
14265
14266         - https://bugs.webkit.org/show_bug.cgi?id=21403
14267           Bug 21403: use new CallFrame class rather than Register* for call frame manipulation
14268
14269         * WebView/WebScriptDebugger.mm:
14270         (WebScriptDebugger::WebScriptDebugger): Update since DebuggerCallFrame is simpler now.
14271
14272 2008-10-08  Timothy Hatcher  <timothy@apple.com>
14273
14274         Roll out r37427 because it causes an infinite recursion loading about:blank.
14275
14276         https://bugs.webkit.org/show_bug.cgi?id=21476
14277
14278 2008-10-08  Darin Adler  <darin@apple.com>
14279
14280         Reviewed by Cameron Zwarich.
14281
14282         - https://bugs.webkit.org/show_bug.cgi?id=21403
14283           Bug 21403: use new CallFrame class rather than Register* for call frame manipulation
14284
14285         * WebView/WebScriptDebugger.mm:
14286         (WebScriptDebugger::WebScriptDebugger): Update since DebuggerCallFrame is simpler now.
14287
14288 2008-10-07  David Hyatt  <hyatt@apple.com>
14289
14290         Move viewless WebKit methods that Safari needs from WebViewInternal to WebViewPrivate.
14291
14292         Reviewed by Tim Hatcher
14293
14294         * WebView/WebView.mm:
14295         (WebKitInitializeApplicationCachePathIfNecessary):
14296         (-[WebView _registerDraggedTypes]):
14297         (-[WebView _usesDocumentViews]):
14298         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
14299         (-[WebView _initWithFrame:frameName:groupName:usesDocumentViews:]):
14300         (-[WebView isFlipped]):
14301         (-[WebView viewWillDraw]):
14302         * WebView/WebViewInternal.h:
14303         * WebView/WebViewPrivate.h:
14304
14305 2008-10-07  David Hyatt  <hyatt@apple.com>
14306
14307         Fix crash in isFlipped.  Null check _private since isFlipped can get called from within AppKit
14308         machinery during teardown of the WebView.
14309
14310         Reviewed by Adam Roben
14311
14312         * WebView/WebView.mm:
14313         (-[WebView isFlipped]):
14314
14315 2008-10-07  David Hyatt  <hyatt@apple.com>
14316
14317         Make viewless WebKit update focused and active state when the window becomes and loses key.
14318         The focus controller has been patched to understand that in viewless mode it can recur down and
14319         update all of the frames, which is why this code works now when placed just on the WebView.
14320
14321         Reviewed by Adam Roben
14322
14323         * WebView/WebView.mm:
14324         (-[WebView addWindowObservers]):
14325         (-[WebView removeWindowObservers]):
14326         (-[WebView viewWillMoveToWindow:]):
14327         (-[WebView viewDidMoveToWindow]):
14328         (-[WebView _updateFocusedAndActiveState]):
14329         (-[WebView _windowDidBecomeKey:]):
14330         (-[WebView _windowDidResignKey:]):
14331         (-[WebView _windowWillOrderOnScreen:]):
14332
14333 2008-10-07  David Hyatt  <hyatt@apple.com>
14334
14335         Make sure the parent visibility state is set up properly on the outermost ScrollView widget.
14336         This fixes the repainting issues with viewless WebKit on Mac.
14337
14338         Reviewed by Sam Weinig
14339
14340         * WebCoreSupport/WebFrameLoaderClient.mm:
14341         (WebFrameLoaderClient::transitionToCommittedForNewPage):
14342
14343 2008-10-07  David Hyatt  <hyatt@apple.com>
14344
14345         Make sure viewless Mac WebKit does a layout if needed before drawing.
14346
14347         Reviewed by Sam Weinig
14348
14349         * WebView/WebView.mm:
14350         (-[WebView viewWillDraw]):
14351
14352 2008-10-07  David Hyatt  <hyatt@apple.com>
14353
14354         Make sure observers get hooked up to watch for size changes in viewless WebKit mode.
14355
14356         Reviewed by Sam Weinig
14357
14358         * ChangeLog:
14359         * WebView/WebFrame.mm:
14360         (-[WebFrame _drawRect:contentsOnly:]):
14361         * WebView/WebView.mm:
14362         (-[WebView viewWillDraw]):
14363         (-[WebView _boundsChanged]):
14364         (-[WebView addSizeObservers]):
14365         (-[WebView viewDidMoveToWindow]):
14366         (-[WebView viewDidMoveToSuperview]):
14367
14368 2008-10-07  David Hyatt  <hyatt@apple.com>
14369
14370         Make sure WebView listens for size changes and resizes the frame view in viewless mode.
14371
14372         Reviewed by Sam Weinig
14373
14374         * WebView/WebView.mm:
14375         (-[WebView addSizeObservers]):
14376         (-[WebView viewDidMoveToWindow]):
14377         (-[WebView viewDidMoveToSuperview]):
14378
14379 2008-10-06  David Hyatt  <hyatt@apple.com>
14380
14381         Enable viewless Mac WebKit to paint some basic pages.
14382         
14383         Reviewed by Sam Weinig
14384
14385         * WebCoreSupport/WebChromeClient.mm:
14386         (WebChromeClient::windowResizerRect):
14387         (WebChromeClient::repaint):
14388         (WebChromeClient::screenToWindow):
14389         (WebChromeClient::windowToScreen):
14390         (WebChromeClient::platformWindow):
14391         * WebCoreSupport/WebFrameLoaderClient.h:
14392         * WebCoreSupport/WebFrameLoaderClient.mm:
14393         (WebFrameLoaderClient::forceLayoutForNonHTML):
14394         (WebFrameLoaderClient::dispatchDidCommitLoad):
14395         (WebFrameLoaderClient::transitionToCommittedForNewPage):
14396         (WebFrameLoaderClient::createFrame):
14397         * WebView/WebFrame.mm:
14398         (-[WebFrame _drawRect:contentsOnly:]):
14399         * WebView/WebFrameInternal.h:
14400         * WebView/WebFrameView.mm:
14401         * WebView/WebFrameViewInternal.h:
14402         * WebView/WebHTMLView.mm:
14403         (-[WebHTMLView drawSingleRect:]):
14404         (-[WebHTMLView drawRect:]):
14405         * WebView/WebView.mm:
14406         (-[WebView isFlipped]):
14407         (-[WebView _boundsChanged]):
14408         (-[WebView _mustDrawUnionedRect:singleRects:count:]):
14409         (-[WebView drawSingleRect:]):
14410         (-[WebView drawRect:]):
14411         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
14412         (-[WebView initWithFrame:frameName:groupName:]):
14413         (-[WebView _initWithFrame:frameName:groupName:usesDocumentViews:]):
14414         (-[WebView initWithCoder:]):
14415         (-[WebView removeSizeObservers]):
14416         (-[WebView viewWillMoveToWindow:]):
14417         (-[WebView viewWillMoveToSuperview:]):
14418         (-[WebView _usesDocumentViews]):
14419         * WebView/WebViewInternal.h:
14420
14421 2008-10-06  Kevin Decker  <kdecker@apple.com>
14422
14423         Rubber-stamped by Anders Carlsson.
14424
14425         Rename _webkit_applicationCacheDirectoryWithBundleIdentifier to _webkit_localCacheDirectoryWithBundleIdentifier.
14426         
14427         * Misc/WebKitNSStringExtras.h:
14428         * Misc/WebKitNSStringExtras.m:
14429         (+[NSString _webkit_localCacheDirectoryWithBundleIdentifier:]):
14430         * WebView/WebDataSource.mm:
14431         (-[WebDataSource _transferApplicationCache:]):
14432         * WebView/WebView.mm:
14433         (WebKitInitializeApplicationCachePathIfNecessary):
14434
14435 2008-10-06  Anders Carlsson  <andersca@apple.com>
14436
14437         Reviewed by Sam Weinig.
14438
14439         Make WebNetscapePluginStream a WebCore::NetscapePlugInStreamLoaderClient.
14440         
14441         * Plugins/WebBaseNetscapePluginStream.h:
14442         (WebNetscapePluginStream::~WebNetscapePluginStream):
14443         * Plugins/WebBaseNetscapePluginStream.mm:
14444         (WebNetscapePluginStream::didReceiveResponse):
14445         (-[WebBaseNetscapePluginStream startStreamWithResponse:]):
14446         (WebNetscapePluginStream::wantsAllStreams):
14447         (-[WebBaseNetscapePluginStream wantsAllStreams]):
14448         (WebNetscapePluginStream::didFail):
14449         (-[WebBaseNetscapePluginStream destroyStreamWithError:]):
14450         (WebNetscapePluginStream::didFinishLoading):
14451         (-[WebBaseNetscapePluginStream finishedLoading]):
14452         (WebNetscapePluginStream::didReceiveData):
14453         (-[WebBaseNetscapePluginStream receivedData:]):
14454
14455 2008-10-06  Anders Carlsson  <andersca@apple.com>
14456
14457         Bring back the stop method. It was called through performSelector, which
14458         is why I couldn't find any references to it.
14459
14460         * Plugins/WebBaseNetscapePluginStream.h:
14461         * Plugins/WebBaseNetscapePluginStream.mm:
14462         (-[WebBaseNetscapePluginStream stop]):
14463
14464 2008-10-06  Anders Carlsson  <andersca@apple.com>
14465
14466         Reviewed by Sam Weinig.
14467
14468         More conversion and cleanup.
14469         
14470         * Plugins/WebBaseNetscapePluginStream.h:
14471         * Plugins/WebBaseNetscapePluginStream.mm:
14472         (WebNetscapePluginStream::startStream):
14473         (-[WebBaseNetscapePluginStream startStreamWithResponse:]):
14474         * Plugins/WebBaseNetscapePluginView.mm:
14475         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
14476
14477 2008-10-06  Anders Carlsson  <andersca@apple.com>
14478
14479         Reviewed by Sam Weinig.
14480
14481         Fold initWithRequestURL into initWithRequest.
14482         
14483         * Plugins/WebBaseNetscapePluginStream.h:
14484         * Plugins/WebBaseNetscapePluginStream.mm:
14485         (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
14486
14487 2008-10-06  Anders Carlsson  <andersca@apple.com>
14488
14489         Reviewed by Sam Weinig.
14490
14491         Change the init methods not to return nil on failures. (These failures never occur anyway)
14492         
14493         Use initWithRequest as the initializer, initWithRequestURL is going to be merged with it.
14494         
14495         * Plugins/WebBaseNetscapePluginStream.mm:
14496         (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
14497         (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
14498         * Plugins/WebBaseNetscapePluginView.mm:
14499         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
14500
14501 2008-10-06  Anders Carlsson  <andersca@apple.com>
14502
14503         Reviewed by David Hyatt.
14504
14505         Convert more methods over to C++.
14506         
14507         * Plugins/WebBaseNetscapePluginStream.h:
14508         * Plugins/WebBaseNetscapePluginStream.mm:
14509         (WebNetscapePluginStream::ownerForStream):
14510         (WebNetscapePluginStream::pluginCancelledConnectionError):
14511         (WebNetscapePluginStream::errorForReason):
14512         (-[WebBaseNetscapePluginStream errorForReason:]):
14513         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
14514         (WebNetscapePluginStream::cancelLoadAndDestroyStreamWithError):
14515         (-[WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError:]):
14516         (WebNetscapePluginStream::deliverData):
14517         (WebNetscapePluginStream::deliverDataTimerFired):
14518         (WebNetscapePluginStream::deliverDataToFile):
14519         (-[WebBaseNetscapePluginStream finishedLoading]):
14520         (-[WebBaseNetscapePluginStream receivedData:]):
14521         * Plugins/WebBaseNetscapePluginView.mm:
14522         (-[WebBaseNetscapePluginView destroyStream:reason:]):
14523
14524 2008-10-06  David Hyatt  <hyatt@apple.com>
14525
14526         Add SPI for a new viewless WebKit mode.  The idea is that when this flag is set there will be no
14527         views created except for the outermost WebView.
14528
14529         Reviewed by Tim Hatcher
14530
14531         * WebView/WebView.mm:
14532         * WebView/WebViewInternal.h:
14533
14534 2008-10-06  Anders Carlsson  <andersca@apple.com>
14535
14536         Reviewed by David Hyatt.
14537
14538         Convert more methods over to C++.
14539         
14540         * Plugins/WebBaseNetscapePluginStream.h:
14541         * Plugins/WebBaseNetscapePluginStream.mm:
14542         (WebNetscapePluginStream::reasonForError):
14543         (WebNetscapePluginStream::destroyStreamWithReason):
14544         (WebNetscapePluginStream::cancelLoadWithError):
14545         (-[WebBaseNetscapePluginStream cancelLoadWithError:]):
14546         (WebNetscapePluginStream::destroyStreamWithError):
14547         (-[WebBaseNetscapePluginStream destroyStreamWithError:]):
14548         (-[WebBaseNetscapePluginStream cancelLoadAndDestroyStreamWithError:]):
14549         (-[WebBaseNetscapePluginStream _deliverDataToFile:]):
14550         (-[WebBaseNetscapePluginStream finishedLoading]):
14551         * Plugins/WebBaseNetscapePluginView.mm:
14552         (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithError:]):
14553
14554 2008-10-04  Darin Adler  <darin@apple.com>
14555
14556         Reviewed by Cameron Zwarich.
14557
14558         - https://bugs.webkit.org/show_bug.cgi?id=21295
14559           Bug 21295: Replace ExecState with a call frame Register pointer
14560
14561         * WebView/WebScriptDebugger.mm:
14562         (WebScriptDebugger::WebScriptDebugger): Remove 0 passed for ExecState.
14563
14564 2008-10-03  John Sullivan  <sullivan@apple.com>
14565
14566         Fixed Release build
14567
14568         * Plugins/WebBaseNetscapePluginStream.mm:
14569         (WebNetscapePluginStream::destroyStream):
14570         added !LOG_DISABLED guard around declaration of npErr used only in LOG
14571
14572 2008-10-03  Anders Carlsson  <andersca@apple.com>
14573
14574         Reviewed by David Hyatt.
14575         
14576         Convert destroyStream over to C++.
14577         
14578         * Plugins/WebBaseNetscapePluginStream.h:
14579         * Plugins/WebBaseNetscapePluginStream.mm:
14580         (WebNetscapePluginStream::destroyStream):
14581         (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]):
14582         (-[WebBaseNetscapePluginStream _deliverData]):
14583
14584 2008-10-03  Anders Carlsson  <andersca@apple.com>
14585
14586         Reviewed by David Hyatt.
14587
14588         Use a Timer instead of -[NSObject performSelector:withObject:afterDelay];
14589         
14590         * Plugins/WebBaseNetscapePluginStream.h:
14591         (WebNetscapePluginStream::WebNetscapePluginStream):
14592         * Plugins/WebBaseNetscapePluginStream.mm:
14593         (-[WebBaseNetscapePluginStream _destroyStream]):
14594         (-[WebBaseNetscapePluginStream _deliverData]):
14595         (WebNetscapePluginStream::deliverDataTimerFired):
14596
14597 2008-10-03  Anders Carlsson  <andersca@apple.com>
14598
14599         Reviewed by David Hyatt.
14600
14601         More plug-in stream cleanup.
14602         
14603         * Plugins/WebBaseNetscapePluginStream.h:
14604         (WebNetscapePluginStream::create):
14605         (WebNetscapePluginStream::WebNetscapePluginStream):
14606         * Plugins/WebBaseNetscapePluginStream.mm:
14607         (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
14608         (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
14609         (-[WebBaseNetscapePluginStream dealloc]):
14610         (-[WebBaseNetscapePluginStream finalize]):
14611         (-[WebBaseNetscapePluginStream setPlugin:]):
14612         (WebNetscapePluginStream::setPlugin):
14613         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
14614         (-[WebBaseNetscapePluginStream _destroyStream]):
14615
14616 2008-10-03  David Hyatt  <hyatt@apple.com>
14617
14618         Remove addToDirtyRegion.
14619         
14620         Reviewed by Oliver Hunt
14621         
14622         * WebCoreSupport/WebChromeClient.h:
14623         * WebCoreSupport/WebChromeClient.mm:
14624
14625 2008-10-02  David Hyatt  <hyatt@apple.com>
14626
14627         https://bugs.webkit.org/show_bug.cgi?id=21328
14628         
14629         Make widget invalidation more cross-platform.
14630         
14631         (1) Make invalidateRect a pure virtual function on Widget.  All leaf widgets must now implement this function.
14632         
14633         (2) Scrollbars now send invalidations through the ScrollbarClient.  windowClipRect on ScrollbarClient has been removed and replaced with this invalidation call.
14634         This allows all scrollbar invalidations to go through the render tree so that transforms and reflections will be respected.
14635         
14636         (3) Plugins now have the native window invalidation code for windowed plugins.  Windowless plugins do a repaintRectangle on the plugin's renderer.
14637         
14638         (4) FrameViews now do a repaintRectangle on their owner element's renderer.
14639
14640         Reviewed by Sam Weinig
14641
14642         * WebCoreSupport/WebFrameLoaderClient.mm:
14643         (PluginWidget::PluginWidget):
14644         (PluginWidget::invalidateRect):
14645         (NetscapePluginWidget::NetscapePluginWidget):
14646         (WebFrameLoaderClient::createPlugin):
14647
14648 2008-10-02  Darin Adler  <darin@apple.com>
14649
14650         Reviewed by Geoff Garen.
14651
14652         - https://bugs.webkit.org/show_bug.cgi?id=21321
14653           Bug 21321: speed up JavaScriptCore by inlining Heap in JSGlobalData
14654
14655         * Misc/WebCoreStatistics.mm:
14656         (+[WebCoreStatistics javaScriptObjectsCount]): Use heap. instead of heap-> to
14657         work with the heap.
14658         (+[WebCoreStatistics javaScriptGlobalObjectsCount]): Ditto.
14659         (+[WebCoreStatistics javaScriptProtectedObjectsCount]): Ditto.
14660         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]): Ditto.
14661         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]): Ditto.
14662         (+[WebCoreStatistics javaScriptReferencedObjectsCount]): Ditto.
14663
14664 2008-10-02  David Hyatt  <hyatt@apple.com>
14665
14666         https://bugs.webkit.org/show_bug.cgi?id=21314
14667         
14668         Make scrollBackingStore cross-platform.
14669
14670         Reviewed by Sam Weinig
14671
14672         * WebCoreSupport/WebChromeClient.h:
14673         * WebCoreSupport/WebChromeClient.mm:
14674         (WebChromeClient::repaint):
14675         (WebChromeClient::scroll):
14676
14677 2008-10-01  Geoffrey Garen  <ggaren@apple.com>
14678
14679         Reviewed by Darin Adler and Cameron Zwarich.
14680
14681         Updated for JavaScriptCore API changes: use a SourceCode instead of
14682         broken out parameters; treat sourceId as intptr_t.
14683         
14684         We still treat sourceId as int in some cases because of DashCode. See
14685         <rdar://problem/6263293> WebScriptDebugDelegate should use intptr_t for
14686         sourceId, not int.
14687
14688         * WebView/WebScriptDebugger.h:
14689         * WebView/WebScriptDebugger.mm:
14690         (toNSString):
14691         (WebScriptDebugger::sourceParsed):
14692         (WebScriptDebugger::callEvent):
14693         (WebScriptDebugger::atStatement):
14694         (WebScriptDebugger::returnEvent):
14695         (WebScriptDebugger::exception):
14696         (WebScriptDebugger::willExecuteProgram):
14697         (WebScriptDebugger::didExecuteProgram):
14698         (WebScriptDebugger::didReachBreakpoint):
14699
14700 2008-10-01  David Hyatt  <hyatt@apple.com>
14701
14702         Move prohibitsScrolling from the Frame to the ScrollView.
14703
14704         Reviewed by Sam Weinig
14705
14706         * WebView/WebView.mm:
14707         (-[WebView setProhibitsMainFrameScrolling:]):
14708
14709 2008-10-01  David Hyatt  <hyatt@apple.com>
14710
14711         https://bugs.webkit.org/show_bug.cgi?id=21282
14712         
14713         Make contentsToScreen/screenToContents cross-platform.  Only implemented by Mac/Win right now.
14714         
14715         Reviewed by Adam Roben
14716
14717         * WebCoreSupport/WebChromeClient.h:
14718         * WebCoreSupport/WebChromeClient.mm:
14719         (WebChromeClient::repaint):
14720         (WebChromeClient::screenToWindow):
14721         (WebChromeClient::windowToScreen):
14722
14723 2008-09-30   Dave Hyatt  <hyatt@apple.com>
14724
14725         https://bugs.webkit.org/show_bug.cgi?id=21269
14726   
14727         This patch makes the ScrollView::paint method cross-platform.  The paint method calls the base class
14728         Widget paint on platforms with native widgets (Mac and wx).  Otherwise it calls a virtual function,
14729         paintContents, to paint the ScrollView's contents, and then it paints each of the two scrollbars and
14730         the scrollbar corner.
14731         
14732         The scrollbar themes are now responsible for painting scrollbar corners.  At the moment ScrollbarThemeWin still
14733         paints white (which is incorrect), so a future patch will actually implement proper native scroll corner painting
14734         for Windows.
14735         
14736         paintContents is implemented by FrameView, and replaces Frame::paint.  All of the FramePrivate member
14737         variables used by Frame::paint have moved to FrameViewPrivate instead.  All callers of Frame::paint have
14738         been patched to use FrameView::paintContents instead.
14739        
14740         Reviewed by Darin Adler
14741
14742         * WebView/WebFrame.mm:
14743         (-[WebFrame _drawRect:]):
14744
14745 2008-09-30  Kevin Decker  <kdecker@apple.com>
14746
14747         Reviewed by Anders Carlsson.
14748
14749         Remove the NPDrawingModelOpenGL entirely. To my knowledge no shipping plug-in ever used it, and no other browser engine
14750         ever supported it.
14751                               
14752         * Plugins/WebBaseNetscapePluginView.h: Removed AGL.h import and OpenGL related ivars.
14753         * Plugins/WebBaseNetscapePluginView.mm: Removed soft linking for OpenGL and AGL frameworks. 
14754         Also removed many methods AGL/CGL support methods that are no longer necessary.
14755         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): Removed NPDrawingModelOpenGL related code.
14756         (-[WebBaseNetscapePluginView restorePortState:]): Ditto.
14757         (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]): Ditto.
14758         (-[WebBaseNetscapePluginView isNewWindowEqualToOldWindow]): Ditto.
14759         (-[WebBaseNetscapePluginView setWindowIfNecessary]): Ditto.
14760         (-[WebBaseNetscapePluginView stop]): Ditto.
14761         (-[WebBaseNetscapePluginView dealloc]): Ditto.
14762         (-[WebBaseNetscapePluginView drawRect:]): 
14763         (-[WebBaseNetscapePluginView viewWillMoveToWindow:]): Ditto.
14764         (-[WebBaseNetscapePluginView invalidateRegion:]): Ditto.
14765         (-[WebBaseNetscapePluginView getVariable:value:]): Tell plug-ins WebKit does not support NPDrawingModelOpenGL.
14766         (-[WebBaseNetscapePluginView setVariable:value:]): Removed NPDrawingModelOpenGL related code. 
14767         (-[WebBaseNetscapePluginView _viewHasMoved]): Ditto.
14768
14769 2008-09-30  Dave Hyatt  <hyatt@apple.com>
14770
14771         http://bugs.webkit.org/show_bug.cgi?id=21250
14772         
14773         Rename updateContents to repaintContentRectangle and make it cross-platform by always sending
14774         repaints up through the ChromeClient.
14775         
14776         Reviewed by Darin Adler
14777
14778         * WebCoreSupport/WebChromeClient.h:
14779         * WebCoreSupport/WebChromeClient.mm:
14780         (WebChromeClient::repaint):
14781
14782 2008-09-30  Anders Carlsson  <andersca@apple.com>
14783
14784         Reviewed by Mark Rowe and Adam Roben.
14785
14786         No need to use pointers to store C++ objects as pointers in WebViewPrivate, we can just
14787         store them directly.
14788         
14789         * Configurations/Base.xcconfig:
14790         Set GCC_OBJC_CALL_CXX_CDTORS to YES.
14791         
14792         * WebView/WebView.mm:
14793         (-[WebViewPrivate init]):
14794         (-[WebViewPrivate dealloc]):
14795         (-[WebViewPrivate finalize]):
14796         (-[WebView _preferencesChangedNotification:]):
14797         (-[WebView setApplicationNameForUserAgent:]):
14798         (-[WebView setCustomUserAgent:]):
14799         (-[WebView customUserAgent]):
14800         (-[WebView WebCore::_userAgentForURL:WebCore::]):
14801         (-[WebView _addObject:forIdentifier:]):
14802         (-[WebView _objectForIdentifier:]):
14803         (-[WebView _removeObjectForIdentifier:]):
14804
14805 2008-09-29  Thiago Macieira  <thiago.macieira@nokia.com>
14806
14807         Reviewed by Simon.
14808
14809         Changed copyright from Trolltech ASA to Nokia.
14810         
14811         Nokia acquired Trolltech ASA, assets were transferred on September 26th 2008.
14812         
14813
14814         * WebCoreSupport/WebChromeClient.h:
14815         * WebCoreSupport/WebChromeClient.mm:
14816         * WebCoreSupport/WebEditorClient.h:
14817         * WebCoreSupport/WebEditorClient.mm:
14818
14819 2008-09-28  Timothy Hatcher  <timothy@apple.com>
14820
14821         Improves the Web Inspector node highlight so it does not scroll
14822         to reveal the node in the page. This makes the highlight less
14823         invasive and causes less things to change on screen. Also makes
14824         the highlight redraw when the WebView draws, so it stays current
14825         if the node changes on the page for any reason.
14826
14827         <rdar://problem/6115804> Don't scroll when highlighting (21000)
14828         https://bugs.webkit.org/show_bug.cgi?id=21000
14829
14830         Reviewed by Dan Bernstein.
14831
14832         * WebCoreSupport/WebInspectorClient.mm:
14833         (-[WebInspectorWindowController highlightNode:]): Call setNeedsDisplay:YES
14834         if there is an existing highlight.
14835         (-[WebInspectorWindowController didAttachWebNodeHighlight:]): Set the current
14836         highlight node on the inspected WebView.
14837         (-[WebInspectorWindowController willDetachWebNodeHighlight:]): Set the current
14838         highlight node on the inspected WebView to nil.
14839         * WebInspector/WebNodeHighlight.m:
14840         (-[WebNodeHighlight setNeedsUpdateInTargetViewRect:]): Disable screen updates
14841         until flush for the inspected window. Invalidate the whole highlight view since
14842         we don't know the rect that needs updated since the highlight can be larger than
14843         the highlighted element due to the margins and other factors.
14844         * WebInspector/WebNodeHighlightView.m:
14845         * WebView/WebHTMLView.mm:
14846         (-[WebHTMLView drawSingleRect:]): Call setNeedsUpdateInTargetViewRect: on the
14847         current highlight node.
14848         * WebView/WebView.mm:
14849         (-[WebViewPrivate dealloc]): Release the current highlight node.
14850         (-[WebView setCurrentNodeHighlight:]): Set the current highlight node.
14851         (-[WebView currentNodeHighlight]): Return the current highlight node.
14852         * WebView/WebViewInternal.h:
14853
14854 2008-09-28  David Kilzer  <ddkilzer@apple.com>
14855
14856         Fix build warning in WebDefaultUIDelegate.m
14857
14858         Reviewed by Dan Bernstein.
14859
14860         This fixes a warning noticed by the clang static analyzer:
14861         .../WebDefaultUIDelegate.m: In function ‘-[WebDefaultUIDelegate webViewFirstResponder:]’:
14862         .../WebDefaultUIDelegate.m:92: warning: initialization from distinct Objective-C type
14863
14864         Note that this doesn't actually cause any change in behavior since
14865         the gcc compiler ignores the semi-colon anyway.
14866
14867         * DefaultDelegates/WebDefaultUIDelegate.m:
14868         (-[WebDefaultUIDelegate webViewFirstResponder:]): Removed semi-colon
14869         from method signature.
14870
14871 2008-09-27  David Hyatt  <hyatt@apple.com>
14872
14873         Fix for https://bugs.webkit.org/show_bug.cgi?id=21182
14874
14875         Make sure Mac null checks the view like the other platforms do now that Mac goes through WebCore
14876         to call setAllowsScrolling.
14877
14878         Reviewed by Mark Rowe
14879
14880         * WebCoreSupport/WebFrameLoaderClient.mm:
14881         (WebFrameLoaderClient::createFrame):
14882
14883 2008-09-27  Anders Carlsson  <andersca@apple.com>
14884
14885         Reviewed by Sam Weinig.
14886
14887         https://bugs.webkit.org/show_bug.cgi?id=21178
14888         <rdar://problem/6248651>
14889
14890         Check if the plug-in is allowed to load the resource. This matches Firefox.
14891         
14892         * Plugins/WebBaseNetscapePluginView.mm:
14893         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
14894
14895 2008-09-26  Matt Lilek  <webkit@mattlilek.com>
14896
14897         Reviewed by Tim Hatcher.
14898
14899         Update FEATURE_DEFINES after ENABLE_CROSS_DOCUMENT_MESSAGING was removed.
14900
14901         * Configurations/WebKit.xcconfig:
14902
14903 2008-09-26  David Hyatt  <hyatt@apple.com>
14904
14905         https://bugs.webkit.org/show_bug.cgi?id=21164
14906
14907         Rework concept of allowsScrolling/setAllowsScrolling to be cross-platform.
14908
14909         Reviewed by Sam Weinig
14910
14911         * WebCoreSupport/WebFrameLoaderClient.mm:
14912         (WebFrameLoaderClient::createFrame):
14913         * WebView/WebDynamicScrollBarsView.h:
14914         * WebView/WebDynamicScrollBarsView.m:
14915         * WebView/WebDynamicScrollBarsViewInternal.h:
14916         * WebView/WebFrameView.mm:
14917         (-[WebFrameView setAllowsScrolling:]):
14918         (-[WebFrameView allowsScrolling]):
14919
14920 2008-09-26  David Hyatt  <hyatt@apple.com>
14921
14922         https://bugs.webkit.org/show_bug.cgi?id=21149
14923
14924         More refactoring to make scrollbar modes cross-platform.  Reduce the protocol that
14925         WebDynamicScrollBarsView has to implement for communicating with WebCore to just three methods.
14926
14927         Reviewed by Sam Weinig
14928
14929         * WebView/WebDynamicScrollBarsView.m:
14930         (-[WebDynamicScrollBarsView scrollingModes:WebCore::vertical:WebCore::]):
14931         (-[WebDynamicScrollBarsView setHorizontalScrollingMode:andLock:]):
14932         (-[WebDynamicScrollBarsView setVerticalScrollingMode:andLock:]):
14933         (-[WebDynamicScrollBarsView setScrollingModes:vertical:andLock:]):
14934         * WebView/WebDynamicScrollBarsViewInternal.h:
14935         * WebView/WebFrameView.mm:
14936         (-[WebFrameView setAllowsScrolling:]):
14937         * WebView/WebView.mm:
14938         (-[WebView setAlwaysShowVerticalScroller:]):
14939         (-[WebView setAlwaysShowHorizontalScroller:]):
14940
14941 2008-09-26  David Kilzer  <ddkilzer@apple.com>
14942
14943         Fix Mac build with XSLT disabled
14944
14945         Reviewed by Alexey.
14946
14947         * Misc/WebCache.mm:
14948         (+[WebCache statistics]): Populate xslStyleSheet statistics with
14949         zeros if XSLT is disabled.
14950
14951 2008-09-25  David Hyatt  <hyatt@apple.com>
14952
14953         https://bugs.webkit.org/show_bug.cgi?id=21101
14954
14955         Fix the updating of the active state to not be dumb, so that viewless scrollbars repaint properly.
14956
14957         Reviewed by Tim Hatcher
14958
14959         * WebView/WebHTMLView.mm:
14960         (-[WebHTMLView _updateFocusedAndActiveState]):
14961
14962 2008-09-24  Darin Adler  <darin@apple.com>
14963
14964         Reviewed by Dan Bernstein.
14965
14966         - https://bugs.webkit.org/show_bug.cgi?id=21079
14967           <rdar://problem/6203938> Disallow embedding Safari-generated pages
14968           (e.g bookmarks collection) in subframes
14969
14970         * DefaultDelegates/WebDefaultPolicyDelegate.m:
14971         (-[WebDefaultPolicyDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):
14972         Use the new +[WebView _canHandleRequest:forMainFrame:] so we can give
14973         a different answer for the main frame and subframes.
14974         * WebCoreSupport/WebFrameLoaderClient.mm:
14975         (WebFrameLoaderClient::canHandleRequest): Ditto.
14976
14977         * WebView/WebView.mm:
14978         (+[WebView _canHandleRequest:forMainFrame:]): Added forMainFrame. Only look
14979         for scheme-specific representations for the main frame, not subframes. 
14980         (+[WebView _canHandleRequest:]): Give answer for main frame -- calls the
14981         method above with YES for main frame.
14982
14983         * WebView/WebViewInternal.h: Added _canHandleRequest:forMainFrame:.
14984
14985 2008-09-23  David Hyatt  <hyatt@apple.com>
14986
14987         https://bugs.webkit.org/show_bug.cgi?id=21039
14988
14989         Teach the viewless Mac scrollbar how to avoid the NSWindow resizer.
14990
14991         Reviewed by Sam Weinig
14992
14993         * WebCoreSupport/WebChromeClient.mm:
14994         (WebChromeClient::windowResizerRect):
14995
14996 2008-09-23  Dan Bernstein  <mitz@apple.com>
14997
14998         Reviewed by Beth Dakin.
14999
15000         - fix <rdar://problem/6233388> Crash beneath -[WebFrameView keyDown:]
15001
15002         Test: fast/events/keydown-remove-frame.html
15003
15004         * WebView/WebFrameView.mm:
15005         (-[WebFrameView keyDown:]): Added a null check.
15006
15007 2008-09-21  Dirk Schulze  <vbs85@gmx.de>
15008
15009         Reviewed and landed by Eric Seidel.
15010
15011         Moved CGFloat definition to WebKitPrefix so CGFloat can be used more
15012         freely throughout WebCore without worrying about breaking Tiger.
15013
15014         * Misc/WebTypesInternal.h: Removed it from here.
15015         * WebKitPrefix.h: Added it here.
15016
15017 2008-09-20  Matt Lilek  <webkit@mattlilek.com>
15018
15019         Reviewed by Tim Hatcher.
15020
15021         Revert r35688. We use a textured window on Leopard, which does not have the
15022         square corners of the standard Aqua window on Tiger.
15023
15024         * WebCoreSupport/WebInspectorClient.mm:
15025         (-[WebInspectorWindowController window]): Add back the call to WKNSWindowMakeBottomCornersSquare.
15026
15027 2008-09-19  Darin Adler  <darin@apple.com>
15028
15029         Reviewed by Dan Bernstein.
15030
15031         - speculative fix for https://bugs.webkit.org/show_bug.cgi?id=20943
15032           Assertion failure in RefCountedLeakCounter::cancelMessageSuppression() when closing a window
15033
15034         * WebView/WebView.mm:
15035         (-[WebView _commonInitializationWithFrameName:groupName:]): Moved call to
15036         RefCountedLeakCounter::suppressMessages in here.
15037         (-[WebView initWithFrame:frameName:groupName:]): Moved it out of here.
15038
15039 2008-09-18  Mark Rowe  <mrowe@apple.com>
15040
15041         Reviewed by Dan Bernstein.
15042
15043         Add SPI to WebView to allow DRT to clear the main frame's name between tests.
15044
15045         * WebView/WebView.mm:
15046         (-[WebView _clearMainFrameName]):
15047         * WebView/WebViewPrivate.h:
15048
15049 2008-09-18  Darin Adler  <darin@apple.com>
15050
15051         Reviewed by Sam Weinig.
15052
15053         - fix https://bugs.webkit.org/show_bug.cgi?id=20925
15054           LEAK messages appear every time I quit
15055
15056         * WebView/WebPreferences.mm:
15057         (-[WebPreferences setFullDocumentTeardownEnabled:]): Removed unneeded call
15058         to setLogLeakMessages.
15059         * WebView/WebView.mm:
15060         (-[WebView _closeWithFastTeardown]): Call RefCountedLeakCounter::suppressMessages,
15061         telling it that we can't track leaks because at least one WebView was closed with
15062         fast teardown.
15063         (-[WebView _close]): Removed unneeded call to setLogLeakMessages. Added a call to
15064         cancelMessageSuppression since the WebView is no longer open.
15065         Added an explicit garbage collect to help with the case where we're closing during
15066         the quit process -- the garbageCollectSoon() calls done inside WebCore won't help
15067         us in that case.
15068         (-[WebView initWithFrame:frameName:groupName:]): Call
15069         RefCountedLeakCounter::suppressMessages telling it that we can't track leaks
15070         because at least one WebView is currently open.
15071
15072 2008-09-18  Anders Carlsson  <andersca@apple.com>
15073
15074         Reviewed by Adam Roben.
15075
15076         Move the remainder of the stream ivars to the C++ object.
15077         
15078         * Plugins/WebBaseNetscapePluginStream.h:
15079         (WebNetscapePluginStream::WebNetscapePluginStream):
15080         * Plugins/WebBaseNetscapePluginStream.mm:
15081         (-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]):
15082         (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
15083         (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
15084         (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
15085         (-[WebBaseNetscapePluginStream dealloc]):
15086         (-[WebBaseNetscapePluginStream finalize]):
15087         (-[WebBaseNetscapePluginStream setPlugin:]):
15088         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
15089         (-[WebBaseNetscapePluginStream start]):
15090         (-[WebBaseNetscapePluginStream stop]):
15091         (-[WebBaseNetscapePluginStream wantsAllStreams]):
15092         (-[WebBaseNetscapePluginStream _destroyStream]):
15093         (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]):
15094         (-[WebBaseNetscapePluginStream cancelLoadWithError:]):
15095         (-[WebBaseNetscapePluginStream _deliverData]):
15096
15097 2008-09-17  David Hyatt  <hyatt@apple.com>
15098
15099         Make the notion of Widget having an underlying native widget cross-platform.
15100
15101         Reviewed by Sam Weinig
15102
15103         * WebCoreSupport/WebFrameLoaderClient.mm:
15104         (NetscapePluginWidget::handleEvent):
15105         * WebView/WebFrame.mm:
15106         (-[WebFrame _dragSourceMovedTo:]):
15107         (-[WebFrame _dragSourceEndedAt:operation:]):
15108         * WebView/WebFrameView.mm:
15109         (-[WebFrameView _install]):
15110         * WebView/WebRenderNode.mm:
15111         (copyRenderNode):
15112
15113 2008-09-16  Anders Carlsson  <andersca@apple.com>
15114
15115         Reviewed by Cameron Zwarich.
15116
15117         Move more instance variables down to the C++ class.
15118
15119         * Plugins/WebBaseNetscapePluginStream.h:
15120         (WebNetscapePluginStream::WebNetscapePluginStream):
15121         * Plugins/WebBaseNetscapePluginStream.mm:
15122         (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
15123         (-[WebBaseNetscapePluginStream dealloc]):
15124         (-[WebBaseNetscapePluginStream finalize]):
15125         (-[WebBaseNetscapePluginStream transferMode]):
15126         (-[WebBaseNetscapePluginStream plugin]):
15127         (-[WebBaseNetscapePluginStream setPlugin:]):
15128         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
15129         (-[WebBaseNetscapePluginStream wantsAllStreams]):
15130         (-[WebBaseNetscapePluginStream _destroyStream]):
15131         (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]):
15132         (-[WebBaseNetscapePluginStream _deliverData]):
15133         (-[WebBaseNetscapePluginStream _deliverDataToFile:]):
15134         (-[WebBaseNetscapePluginStream finishedLoading]):
15135         (-[WebBaseNetscapePluginStream receivedData:]):
15136
15137 2008-09-16  Anders Carlsson  <andersca@apple.com>
15138
15139         Reviewed by Dave Hyatt.
15140
15141         Move a bunch of instance variables into the C++ class.
15142         
15143         * Plugins/WebBaseNetscapePluginStream.h:
15144         * Plugins/WebBaseNetscapePluginStream.mm:
15145         (-[WebBaseNetscapePluginStream _pluginCancelledConnectionError]):
15146         (-[WebBaseNetscapePluginStream errorForReason:]):
15147         (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
15148         (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
15149         (-[WebBaseNetscapePluginStream dealloc]):
15150         (-[WebBaseNetscapePluginStream setRequestURL:]):
15151         (-[WebBaseNetscapePluginStream setResponseURL:]):
15152         (-[WebBaseNetscapePluginStream setMIMEType:]):
15153         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
15154         (-[WebBaseNetscapePluginStream _destroyStream]):
15155         (-[WebBaseNetscapePluginStream _destroyStreamWithReason:]):
15156         (-[WebBaseNetscapePluginStream _deliverData]):
15157         (-[WebBaseNetscapePluginStream receivedData:]):
15158
15159 2008-09-16  Anders Carlsson  <andersca@apple.com>
15160
15161         Reviewed by Dave Hyatt.
15162
15163         Add a new WebNetscapePluginStream C++ class. The idea is that it is supposed to replace the Obj-C 
15164         WebBaseNetscapePluginStream class. The plan is to gradually move/rewrite code from the Obj-C class to the C++ class
15165         until the C++ class can replace the Obj-C class.
15166         
15167         * Plugins/WebBaseNetscapePluginStream.h:
15168         (WebNetscapePluginStream::create):
15169         (WebNetscapePluginStream::WebNetscapePluginStream):
15170         * Plugins/WebBaseNetscapePluginStream.mm:
15171         (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
15172         (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
15173         (-[WebBaseNetscapePluginStream dealloc]):
15174         (-[WebBaseNetscapePluginStream finalize]):
15175
15176 2008-09-16  Anders Carlsson  <andersca@apple.com>
15177
15178         Reviewed by Dave Hyatt.
15179
15180         Instead of storing a pointer to NPP method individually, just store a pointer to the NPNetscapeFuncs vtable.
15181         
15182         * Plugins/WebBaseNetscapePluginStream.h:
15183         * Plugins/WebBaseNetscapePluginStream.mm:
15184         (-[WebBaseNetscapePluginStream setPlugin:]):
15185         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
15186         (-[WebBaseNetscapePluginStream wantsAllStreams]):
15187         (-[WebBaseNetscapePluginStream _destroyStream]):
15188         (-[WebBaseNetscapePluginStream _deliverData]):
15189         * Plugins/WebNetscapePluginPackage.h:
15190         * Plugins/WebNetscapePluginPackage.m:
15191         (-[WebNetscapePluginPackage pluginFuncs]):
15192
15193 2008-09-16  Anders Carlsson  <andersca@apple.com>
15194
15195         Reviewed by Dave Hyatt.
15196
15197         Remove references to WebNetscapePluginStream.
15198         
15199         * Plugins/WebBaseNetscapePluginView.h:
15200         * Plugins/WebNetscapePluginEmbeddedView.h:
15201
15202 2008-09-15  Dan Bernstein  <mitz@apple.com>
15203
15204         Reviewed by Dave Hyatt.
15205
15206         - fix https://bugs.webkit.org/show_bug.cgi?id=20860
15207           REGRESSION: Crash in RenderLayer::hasVisibleContent() loading wavy.com
15208
15209         * WebView/WebFrame.mm:
15210         (-[WebFrame _getVisibleRect:]): Changed to check if the RenderPart has
15211         layout before accessing it, instead of checking if the frame inside it
15212         has layout.
15213
15214 2008-09-15  Chris Fleizach  <cfleizach@apple.com>
15215
15216         Reviewed by Darin Adler, Beth Dakin
15217
15218         Support strings for AXLists
15219
15220         * WebCoreSupport/WebViewFactory.mm:
15221         (-[WebViewFactory AXDefinitionListTermText]):
15222         (-[WebViewFactory AXDefinitionListDefinitionText]):
15223
15224 2008-09-15  Anders Carlsson  <andersca@apple.com>
15225
15226         Reviewed by Mitz.
15227
15228         Merge WebNetscapePluginStream into WebBaseNetscapePluginStream.
15229
15230         * Plugins/WebBaseNetscapePluginStream.h:
15231         * Plugins/WebBaseNetscapePluginStream.mm:
15232         (-[WebBaseNetscapePluginStream initWithFrameLoader:]):
15233         (-[WebBaseNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
15234         (-[WebBaseNetscapePluginStream dealloc]):
15235         (-[WebBaseNetscapePluginStream finalize]):
15236         (-[WebBaseNetscapePluginStream start]):
15237         (-[WebBaseNetscapePluginStream stop]):
15238         (-[WebBaseNetscapePluginStream cancelLoadWithError:]):
15239         * Plugins/WebBaseNetscapePluginView.mm:
15240         (-[WebBaseNetscapePluginView pluginView:receivedResponse:]):
15241         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
15242         * Plugins/WebNetscapePluginEmbeddedView.mm:
15243         * Plugins/WebNetscapePluginStream.h: Removed.
15244         * Plugins/WebNetscapePluginStream.mm: Removed.
15245
15246 2008-09-12  John Sullivan  <sullivan@apple.com>
15247
15248         Fixed <rdar://problem/6110941> Clicking the print button in PDF content does nothing
15249
15250         Reviewed by Darin Adler
15251
15252         * WebView/WebPDFView.mm:
15253         (-[WebPDFView PDFViewPerformPrint:]):
15254         Implemented PDFKit delegate method that's called after a Print action in the PDF content
15255
15256 2008-09-12  Dan Bernstein  <mitz@apple.com>
15257
15258         Reviewed by John Sullivan.
15259
15260         - fix a crash in -visibleRect when it is called during WebFrameView deallocation
15261
15262         * WebView/WebFrameView.mm:
15263         (-[WebFrameView visibleRect]): Added an early return if _private is 0.
15264
15265 2008-09-11  Dan Bernstein  <mitz@apple.com>
15266
15267         Reviewed by John Sullivan.
15268
15269         - eliminate excessive repainting when a clipped iframe is moved (noticed in <rdar://problem/6204032>)
15270
15271         * WebView/WebFrame.mm:
15272         (-[WebFrame _getVisibleRect:]): Added. If the frame is in a RenderPart
15273         and has layout, gets the visible rect of the RenderPart and returns
15274         YES. Returns NO otherwise.
15275         * WebView/WebFrameInternal.h:
15276         * WebView/WebFrameView.mm:
15277         (-[WebFrameView visibleRect]): Added. Overrides this NSView method to
15278         take clipping in the render tree into account.
15279
15280 2008-09-09  Dan Bernstein  <mitz@apple.com>
15281
15282         - Tiger build fix
15283
15284         * WebCoreSupport/WebSystemInterface.m:
15285         (InitWebCoreSystemInterface):
15286
15287 2008-09-09  Dan Bernstein  <mitz@apple.com>
15288
15289         Reviewed by Darin Adler.
15290
15291         - WebKit part of <rdar://problem/6206244> Use alternate character-to-glyph interface on Leopard
15292
15293         * WebCoreSupport/WebSystemInterface.m:
15294         (InitWebCoreSystemInterface):
15295
15296 2008-09-07  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
15297
15298         Reviewed by Maciej Stachowiak.
15299
15300         Bug 20704: Replace the KJS namespace
15301         <https://bugs.webkit.org/show_bug.cgi?id=20704>
15302
15303         Rename the KJS namespace to JSC.
15304
15305         * Misc/WebCoreStatistics.mm:
15306         * Plugins/WebBaseNetscapePluginStream.mm:
15307         (-[WebBaseNetscapePluginStream wantsAllStreams]):
15308         * Plugins/WebBaseNetscapePluginView.mm:
15309         (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
15310         (-[WebBaseNetscapePluginView setWindowIfNecessary]):
15311         (-[WebBaseNetscapePluginView start]):
15312         (-[WebBaseNetscapePluginView createPluginScriptableObject]):
15313         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
15314         (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
15315         (-[WebBaseNetscapePluginView loadPluginRequest:]):
15316         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
15317         * Plugins/WebPluginController.mm:
15318         (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
15319         (-[WebPluginController startAllPlugins]):
15320         (-[WebPluginController stopAllPlugins]):
15321         (-[WebPluginController addPlugin:]):
15322         (-[WebPluginController destroyPlugin:]):
15323         (-[WebPluginController destroyAllPlugins]):
15324         * WebView/WebFrame.mm:
15325         * WebView/WebScriptDebugDelegate.mm:
15326         * WebView/WebScriptDebugger.h:
15327         * WebView/WebScriptDebugger.mm:
15328         * WebView/WebView.mm:
15329         (-[WebViewPrivate init]):
15330
15331 2008-09-05  Timothy Hatcher  <timothy@apple.com>
15332
15333         Correct a typo in the setApplicationChromeModeEnabledEnabled:
15334         method name, remove the extra "Enabled".
15335
15336         * WebView/WebPreferences.mm:
15337         * WebView/WebPreferencesPrivate.h:
15338
15339 2008-09-04  Mark Rowe  <mrowe@apple.com>
15340
15341         Reviewed by Eric Seidel.
15342
15343         Fix https://bugs.webkit.org/show_bug.cgi?id=20639.
15344         Bug 20639: ENABLE_DASHBOARD_SUPPORT does not need to be a FEATURE_DEFINE
15345
15346         * Configurations/WebKit.xcconfig: Remove ENABLE_DASHBOARD_SUPPORT from FEATURE_DEFINES.
15347
15348 2008-09-03  Eric Seidel  <eric@webkit.org>
15349
15350         Reviewed by Sam.
15351
15352         Clean up Platform.h and add PLATFORM(CHROMIUM), PLATFORM(SKIA) and USE(V8_BINDINGS)
15353
15354         * Configurations/WebKit.xcconfig:
15355         * WebKitPrefix.h: add rules for V8_BINDINGS
15356
15357 2008-09-01  Adam Barth  <abarth@webkit.org>
15358
15359         Reviewed by Sam Weinig.
15360
15361         https://bugs.webkit.org/show_bug.cgi?id=19760
15362
15363         Add a linked-on-or-after check to prevent substitute data from loading
15364         local resources on newer users of WebKit.
15365
15366         * Misc/WebKitVersionChecks.h:
15367         * WebView/WebView.mm:
15368         (-[WebView _commonInitializationWithFrameName:groupName:]):
15369
15370 2008-08-29  Brady Eidson  <beidson@apple.com>
15371
15372         Reviewed by Anders
15373
15374         Fix regression I introducted in 35946
15375         Already covered by media/video-click-dlbclick-standalone.html
15376
15377         * WebView/WebHTMLRepresentation.mm:
15378         (-[WebHTMLRepresentation receivedData:withDataSource:]): Cancel the load here after
15379           calling [WebFrame _receivedData:] which more closely follows the path taken by PluginDocuments
15380
15381 2008-08-28  Kevin McCullough  <kmccullough@apple.com>
15382
15383         Reviewed by Geoff.
15384
15385         <rdar://problem/6095949> REGRESSION (5525.8-6527.1?): "this" is null
15386         when you first hit a breakpoint in Dashcode
15387         - We wanted to reset the callframe whenever eval() was called but
15388         dashcode uses eval() when broken to evaluate the state of the current
15389         call frame.
15390
15391         * WebView/WebScriptDebugger.mm:
15392         (WebScriptDebugger::willExecuteProgram):
15393         (WebScriptDebugger::didExecuteProgram):
15394
15395 2008-08-27  Robert Kroeger  <rjkroege@liqui.org>
15396
15397         Tweaked by Sam Weinig.
15398
15399         Reviewed by Eric Seidel.
15400
15401         Fix https://bugs.webkit.org/show_bug.cgi?id=6595
15402         <rdar://problem/4432150>
15403         Right-click does not fire mouseup event
15404
15405         Adds a rightMouseUp handler to the WebHTMLView.
15406
15407         The added method generates mouseup events for button 2.  The result
15408         is that webkit will deliver mousedown and mouseup events for button
15409         2 in a fashion identical to FireFox and will retain event ordering
15410         identical to Internet Explorer.
15411
15412         Test: fast/events/mouseup-from-button2.html
15413
15414         * WebView/WebHTMLView.mm:
15415         (-[WebHTMLView rightMouseUp:]):
15416
15417 2008-08-27  Timothy Hatcher  <timothy@apple.com>
15418
15419         Add support for support for -webkit-appearance: default-button on the Mac platform.
15420
15421         <rdar://problem/6173530>
15422
15423         Reviewed by Dave Hyatt.
15424
15425         * WebCoreSupport/WebSystemInterface.m:
15426         (InitWebCoreSystemInterface): Init AdvanceDefaultButtonPulseAnimation.
15427         * WebView/WebPreferenceKeysPrivate.h: Added WebKitApplicationChromeModeEnabledPreferenceKey.
15428         * WebView/WebPreferences.mm:
15429         (+[WebPreferences initialize]): Set WebKitApplicationChromeModeEnabledPreferenceKey to NO.
15430         (-[WebPreferences applicationChromeModeEnabled]): Added.
15431         (-[WebPreferences setApplicationChromeModeEnabledEnabled:]): Added.
15432         * WebView/WebPreferencesPrivate.h:
15433         * WebView/WebView.mm:
15434         (-[WebView _preferencesChangedNotification:]): Call Settings::setApplicationChromeMode
15435         with the value of -[WebPreferences applicationChromeModeEnabled].
15436
15437 2008-08-27  Brady Eidson  <beidson@apple.com>
15438
15439         Reviewed by Anders
15440
15441         <rdar://problem/6134133> - Crash when loading large movie as a standalone document
15442
15443         * WebCoreSupport/WebFrameLoaderClient.h:
15444         * WebCoreSupport/WebFrameLoaderClient.mm:
15445         (WebFrameLoaderClient::pluginWillHandleLoadError):
15446
15447 2008-08-20  Dan Bernstein  <mitz@apple.com>
15448
15449         Rubber-stamped by John Sullivan.
15450
15451         - rename shouldUpdateWhileHidden to shouldUpdateWhileOffscreen,
15452           rename related methods and variables accordingly, and make
15453           -setShouldUpdateWhileOffscreen: and -shouldUpdateWhileOffscreen
15454           WebView API.
15455
15456         * WebCoreSupport/WebFrameLoaderClient.mm:
15457         (WebFrameLoaderClient::transitionToCommittedForNewPage):
15458         * WebView/WebFrame.mm:
15459         (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
15460         * WebView/WebFrameInternal.h:
15461         * WebView/WebHTMLView.mm:
15462         (-[WebHTMLView windowWillOrderOnScreen:]):
15463         * WebView/WebView.h:
15464         * WebView/WebView.mm:
15465         (-[WebViewPrivate init]):
15466         (-[WebView setBackgroundColor:]):
15467         (-[WebView setDrawsBackground:]):
15468         (-[WebView setShouldUpdateWhileOffscreen:]):
15469         (-[WebView shouldUpdateWhileOffscreen]):
15470         * WebView/WebViewPrivate.h:
15471
15472 2008-08-18  Mark Rowe  <mrowe@apple.com>
15473
15474         Reviewed by Darin Adler.
15475
15476         Switch to non-deprecated NSFileManager API.
15477
15478         In order to minimize #if's the new NSFileManager APIs have been implemented for
15479         Tiger and call sites updated to use the new methods.
15480
15481         * Misc/WebIconDatabase.mm:
15482         (importToWebCoreFormat):
15483         * Misc/WebKitNSStringExtras.m:
15484         (-[NSString _webkit_fixedCarbonPOSIXPath]):
15485         * Misc/WebKitSystemBits.m:
15486         * Misc/WebNSFileManagerExtras.h:
15487         * Misc/WebNSFileManagerExtras.m: Remove implementations of methods that are not used.
15488         (-[NSFileManager _webkit_backgroundRemoveFileAtPath:]):
15489         (-[NSFileManager attributesOfFileSystemForPath:error:]): Implement new API for Tiger in terms of Tiger API.
15490         (-[NSFileManager contentsOfDirectoryAtPath:error:]): Ditto.
15491         (-[NSFileManager moveItemAtPath:toPath:error:]): Ditto.
15492         (-[NSFileManager removeItemAtPath:error:]): Ditto.
15493         * Plugins/WebPluginDatabase.mm:
15494         (-[WebPluginDatabase _scanForNewPlugins]):
15495
15496 2008-08-20  Josh Aas  <joshmoz@gmail.com>
15497
15498         Reviewed and landed by Anders.
15499
15500         <rdar://problem/6163636> 
15501         rename NPCocoaEvent's "event" struct to "data" (20446)
15502
15503         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
15504         (WebNetscapePluginEventHandlerCocoa::drawRect):
15505         (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
15506         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
15507         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
15508         (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
15509         (WebNetscapePluginEventHandlerCocoa::focusChanged):
15510
15511 2008-08-20  Beth Dakin  <bdakin@apple.com>
15512
15513         Reviewed by Darin Adler.
15514
15515         Fix for <rdar://problem/6145626>
15516         Allows a WebKit client to mark a frame as not-text-searchable 
15517         through SPI.
15518
15519         * WebView/WebFrame.mm:
15520         (-[WebFrame _setExcludeFromTextSearch:]):
15521         * WebView/WebFramePrivate.h:
15522
15523 2008-08-19  Alexey Proskuryakov  <ap@webkit.org>
15524
15525         Reviewed by Geoff Garen.
15526
15527         Bring back shared JSGlobalData and implicit locking, because too many clients rely on it.
15528
15529         * ForwardingHeaders/runtime/JSLock.h: Added.
15530         * Misc/WebCoreStatistics.mm:
15531         (+[WebCoreStatistics javaScriptObjectsCount]):
15532         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
15533         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
15534         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
15535         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
15536         (+[WebCoreStatistics shouldPrintExceptions]):
15537         (+[WebCoreStatistics setShouldPrintExceptions:]):
15538         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
15539         * Plugins/WebBaseNetscapePluginStream.mm:
15540         (-[WebBaseNetscapePluginStream wantsAllStreams]):
15541         * Plugins/WebBaseNetscapePluginView.mm:
15542         (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
15543         (-[WebBaseNetscapePluginView setWindowIfNecessary]):
15544         (-[WebBaseNetscapePluginView start]):
15545         (-[WebBaseNetscapePluginView createPluginScriptableObject]):
15546         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
15547         (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
15548         (-[WebBaseNetscapePluginView loadPluginRequest:]):
15549         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
15550         * Plugins/WebPluginController.mm:
15551         (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
15552         (-[WebPluginController startAllPlugins]):
15553         (-[WebPluginController stopAllPlugins]):
15554         (-[WebPluginController addPlugin:]):
15555         (-[WebPluginController destroyPlugin:]):
15556         (-[WebPluginController destroyAllPlugins]):
15557         * WebView/WebFrame.mm:
15558         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
15559         * WebView/WebScriptDebugDelegate.mm:
15560         (-[WebScriptCallFrame evaluateWebScript:]):
15561         * WebView/WebView.mm:
15562         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
15563
15564 2008-08-19  Timothy Hatcher  <timothy@apple.com>
15565
15566         Fixes the Web Inspector flashing white while resizing after
15567         highlighting a page element. Calling disableScreenUpdatesUntilFlush
15568         when attaching and detaching the Inspector page highlight is bad,
15569         since the browser window might not flush again for a while. So screen
15570         updates could be disabled for long periods of time, causing backing store
15571         flashing while resizing. There is no need to call disableScreenUpdatesUntilFlush
15572         when attaching or detaching the child window.
15573
15574         Reviewed by John Sullivan and Kevin McCullough.
15575
15576         * WebInspector/WebNodeHighlight.m:
15577         (-[WebNodeHighlight attach]): Remove the call to disableScreenUpdatesUntilFlush.
15578         (-[WebNodeHighlight detach]): Ditto.
15579
15580 2008-08-19  Timothy Hatcher  <timothy@apple.com>
15581
15582         Correctly remembers the attached state of the Web Inspector so
15583         it opens in that state for the next window, or next launch.
15584
15585         Reviewed by Kevin McCullough.
15586
15587         * WebCoreSupport/WebInspectorClient.mm:
15588         (-[WebInspectorWindowController attach]): Set WebKitInspectorAttachedKey
15589         to YES in the user defaults.
15590         (-[WebInspectorWindowController detach]): Set WebKitInspectorAttachedKey
15591         to NO in the user defaults.
15592
15593 2008-08-18  Alexey Proskuryakov  <ap@webkit.org>
15594
15595         Reviewed by Dan Bernstein.
15596
15597         https://bugs.webkit.org/show_bug.cgi?id=19347
15598         <rdar://problem/5977562> Input methods do not work after switching to a password field
15599         and back.
15600
15601         Fix <rdar://problem/5522011> (The content of the password field of Safari is displayed by
15602         reconversion) in a different way which doesn't conflict with context caching performed
15603         by AppKit.
15604
15605         This original bug does not really occur in ToT or shipping Safari under Mac OS X 10.5.4,
15606         because input methods are disabled in password fields. Attempting to reconvert text typed
15607         with Romaji only yields a string of bullets. Still, it is probably better to match Cocoa
15608         password field behavior and disable reconversion completely.
15609
15610         * WebView/WebHTMLView.mm:
15611         (isInPasswordField): Factored out code to determine that the current selection is in
15612         a password field.
15613         (inputContext): Removed a hack that was breaking TSMGetActiveDocument().
15614         (-[WebHTMLView attributedSubstringFromRange:]): Check for password fields.
15615         (-[WebHTMLView textStorage]): Ditto.
15616
15617 2008-08-12  Darin Adler  <darin@apple.com>
15618
15619         Reviewed by Geoff.
15620
15621         - eliminate JSValue::type()
15622
15623         * WebView/WebView.mm:
15624         (aeDescFromJSValue): Rewrite to use the JSValue::is functions instead
15625         of a switch on JSValue::type().
15626
15627 2008-08-17  Geoffrey Garen  <ggaren@apple.com>
15628
15629         Reviewed by Cameron Zwarich.
15630
15631         Made room for a free word in JSCell.
15632         
15633         (Updated for JavaScriptCore changes.)
15634
15635 2008-08-15  Mark Rowe  <mrowe@apple.com>
15636
15637         Rubber-stamped by Geoff Garen.
15638
15639         <rdar://problem/6139914> Please include a _debug version of JavaScriptCore framework
15640
15641         * Configurations/Base.xcconfig: Factor out the debug-only settings so that they can shared
15642         between the Debug configuration and debug Production variant.
15643
15644 2008-08-14  Sam Weinig  <sam@webkit.org>
15645
15646         Reviewed by Geoffrey Garen and Timothy Hatcher.
15647
15648         Add WebView SPI to set HTMLTokenizer yielding parameters.
15649
15650         * WebView/WebView.mm:
15651         (-[WebView _setCustomHTMLTokenizerTimeDelay:]):
15652         (-[WebView _setCustomHTMLTokenizerChunkSize:]):
15653         * WebView/WebViewPrivate.h:
15654
15655 2008-08-13  Timothy Hatcher  <timothy@apple.com>
15656
15657         Fixes a bug where Safari's find banner would be permanently hidden
15658         when attaching or closing the Web Inspector while attached.
15659
15660         https://bugs.webkit.org/show_bug.cgi?id=20376
15661
15662         Reviewed by Kevin McCullough.
15663
15664         * WebCoreSupport/WebInspectorClient.mm:
15665         (-[WebInspectorWindowController close]):
15666         Carefully manipulate the WebFrameView's frame when closing to
15667         not assume the WebFrameView's frame fills the inspected WebView.
15668         (-[WebInspectorWindowController setAttachedWindowHeight:]):
15669         Carefully manipulate the WebFrameView's frame when docking to
15670         not assume the WebFrameView plus the Web Inspector WebViews fills
15671         the full inspected WebView.
15672
15673 2008-08-13  Stephanie Lewis  <slewis@apple.com>
15674
15675         fix 64bit build
15676
15677         * WebCoreSupport/WebInspectorClient.mm:
15678
15679 2008-08-13  Timothy Hatcher  <timothy@apple.com>
15680
15681         Remember the docked state of the Web Inspector, so it can be
15682         reopened docked if it was last docked.
15683
15684         https://bugs.webkit.org/show_bug.cgi?id=14271
15685
15686         Reviewed by Kevin McCullough.
15687
15688         * WebCoreSupport/WebInspectorClient.mm:
15689         (-[WebInspectorWindowController init]): Initialize _shouldAttach
15690         to the value stored in the user defaults. If there has never
15691         been a value stored, default to being attached.
15692         (-[WebInspectorWindowController showWindow:]): Pass the attached
15693         state to InspectorController::setWindowVisible.
15694
15695 2008-08-12  Timothy Hatcher  <timothy@apple.com>
15696
15697         Remove the Inspector's WebView for the view hierarchy when closed
15698         while attached. This prevents it from showing in the background
15699         while the page changes.
15700
15701         Reviewed by Kevin McCullough.
15702
15703         * WebCoreSupport/WebInspectorClient.mm:
15704         (-[WebInspectorWindowController close:]): Call removeFromSuperview
15705         on the Inspector's WebView if it isn't attached, so it will not
15706         be visible when navigating pages while closed.
15707
15708 2008-08-12  Timothy Hatcher  <timothy@apple.com>
15709
15710         Make the docked Web Inspector resizable.
15711
15712         https://bugs.webkit.org/show_bug.cgi?id=14282
15713
15714         Reviewed by Kevin McCullough.
15715
15716         * WebCoreSupport/WebInspectorClient.h:
15717         * WebCoreSupport/WebInspectorClient.mm:
15718         (WebInspectorClient::setAttachedWindowHeight): Call setAttachedWindowHeight:
15719         on the WebInspectorWindowController.
15720         (-[WebInspectorWindowController showWindow:]): Call setAttachedWindowHeight:.
15721         (-[WebInspectorWindowController setAttachedWindowHeight:]): Moved code
15722         from showWindow: and generalized to allow being called multiple times.
15723         Remembers the last height passed, which is used by showWindow: the next
15724         time the Inspector attaches.
15725
15726 2008-08-12  Timothy Hatcher  <timothy@apple.com>
15727
15728         Remove unneeded header imports from some Web Inspector files.
15729
15730         Reviewed by Adam Roben.
15731
15732         * WebCoreSupport/WebInspectorClient.mm:
15733         * WebInspector/WebInspector.mm:
15734         * WebInspector/WebNodeHighlightView.m:
15735
15736 2008-08-12  Timothy Hatcher  <timothy@apple.com>
15737
15738         Remove the call to WKNSWindowMakeBottomCornersSquare on the
15739         Web Inspector's window. This isn't needed anymore since the
15740         window style masks used always have square bottom corners.
15741
15742         Reviewed by Adam Roben.
15743
15744         * WebCoreSupport/WebInspectorClient.mm:
15745         (-[WebInspectorWindowController window]): Remove the call
15746         to WKNSWindowMakeBottomCornersSquare.
15747
15748 2008-08-12  Timothy Hatcher  <timothy@apple.com>
15749
15750         Make attaching and detaching the Web Inspector instantaneous.
15751         This also preserves the current view, other state, and keeps
15752         the script debugger attached.
15753
15754         https://bugs.webkit.org/show_bug.cgi?id=19301
15755
15756         Reviewed by Adam Roben.
15757
15758         * WebCoreSupport/WebInspectorClient.mm:
15759         (-[WebInspectorWindowController close]): Only call setWindowVisible(false)
15760         when not moving windows.
15761
15762 2008-08-12  Dan Bernstein  <mitz@apple.com>
15763
15764         Reviewed by John Sullivan.
15765
15766         - replace -[WebPreferences updatesWhenOffscreen] with -[WebView shouldUpdateWhileHidden]
15767
15768         * WebCoreSupport/WebFrameLoaderClient.mm:
15769         (WebFrameLoaderClient::transitionToCommittedForNewPage):
15770         * WebView/WebFrame.mm:
15771         (-[WebFrame _updateBackgroundAndUpdatesWhileHidden]):
15772         * WebView/WebFrameInternal.h:
15773         * WebView/WebHTMLView.mm:
15774         (-[WebHTMLView windowWillOrderOnScreen:]):
15775         * WebView/WebPreferenceKeysPrivate.h:
15776         * WebView/WebPreferences.mm:
15777         (+[WebPreferences initialize]):
15778         * WebView/WebPreferencesPrivate.h:
15779         * WebView/WebView.mm:
15780         (-[WebViewPrivate init]):
15781         (-[WebView _preferencesChangedNotification:]):
15782         (-[WebView setBackgroundColor:]):
15783         (-[WebView setDrawsBackground:]):
15784         (-[WebView shouldUpdateWhileHidden]):
15785         (-[WebView setShouldUpdateWhileHidden:]):
15786         * WebView/WebViewPrivate.h:
15787
15788 2008-08-08  Dan Bernstein  <mitz@apple.com>
15789
15790         Reviewed by John Sullivan.
15791
15792         - fix <rdar://problem/6130216> Exception "windowRegionBeingDrawn != nil" in NSView when caching image of a subframe
15793
15794         This change reintroduces <https://bugs.webkit.org/show_bug.cgi?id=5195> on Leopard.
15795
15796         * WebView/WebHTMLView.mm:
15797         (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]): Removed an
15798         unsuccessful workaround for <rdar://problem/5668489>, because invoking
15799         layout may change the view hierarchy during the drawing operation,
15800         which is not supported on Leopard.
15801
15802 2008-08-08  Maxime Britto  <britto@apple.com>
15803
15804         Reviewed by Adele.
15805
15806         * WebView/WebFrame.mm:
15807         (-[WebFrame _scrollDOMRangeToVisible:]):
15808
15809 2008-08-08  Brady Eidson  <beidson@apple.com>
15810
15811         Reviewed by Sam Weinig
15812
15813         Fix for <rdar://problem/5865504>
15814
15815         This bug was actually *largely* fixed by http://trac.webkit.org/changeset/35538.
15816         But with that same patch, it became possible for a WebResource to fail to initialize.  
15817         Therefore we were trying to add nil to an NSCFArray for certain situations, which is bad.
15818         Lets fix that, shall we?
15819
15820         * WebView/WebArchive.mm:
15821         (-[WebArchive subresources]): 
15822
15823 2008-08-06  Eric Seidel  <eric@webkit.org>
15824
15825         Reviewed by Cameron Zwarich.
15826
15827         Move more methods from Frame into ScriptController
15828         https://bugs.webkit.org/show_bug.cgi?id=20294
15829
15830         The WebKit side of this move.  Calls to frame() are now frame()->script()
15831
15832         * Plugins/WebBaseNetscapePluginView.mm:
15833         (-[WebBaseNetscapePluginView getVariable:value:]):
15834         (-[WebBaseNetscapePluginView _destroyPlugin]):
15835         * Plugins/WebPluginController.mm:
15836         (-[WebPluginController destroyPlugin:]):
15837         (-[WebPluginController destroyAllPlugins]):
15838         * WebCoreSupport/WebFrameLoaderClient.mm:
15839         * WebView/WebFrame.mm:
15840         (-[WebFrame windowObject]):
15841         * WebView/WebScriptDebugger.mm:
15842         (WebScriptDebugger::callEvent):
15843         * WebView/WebView.mm:
15844         (-[WebView windowScriptObject]):
15845
15846 2008-08-06  Dan Bernstein  <mitz@apple.com>
15847
15848         Reviewed by Mark Rowe.
15849
15850         - fix an assertion failure in Cache::setCapacities()
15851
15852         * Misc/WebKitSystemBits.h: Changed the return type of WebMemorySize()
15853         to uint64_t.
15854         * Misc/WebKitSystemBits.m:
15855         (WebMemorySize):
15856         * WebView/WebView.mm:
15857         (+[WebView _setCacheModel:]):
15858
15859 2008-08-05  Anders Carlsson  <andersca@apple.com>
15860
15861         Pass in the correct class here.
15862         
15863         * WebView/WebResource.mm:
15864         (-[WebResourcePrivate dealloc]):
15865
15866 2008-08-05  Anders Carlsson  <andersca@apple.com>
15867
15868         Reviewed by Darin Adler.
15869
15870         <rdar://problem/6037398>
15871         ER: Deallocate WebKit objects on the main thread, even if released on secondary thread
15872         
15873         Add calls to WebCoreObjCScheduleDeallocateOnMainThread in dealloc methods of objects we expose.
15874
15875         * Carbon/CarbonWindowAdapter.m:
15876         (-[CarbonWindowAdapter dealloc]):
15877         * History/WebBackForwardList.mm:
15878         (-[WebBackForwardList dealloc]):
15879         * History/WebHistoryItem.mm:
15880         (-[WebHistoryItem dealloc]):
15881         * Misc/WebElementDictionary.mm:
15882         (+[WebElementDictionary initialize]):
15883         (-[WebElementDictionary dealloc]):
15884         * WebCoreSupport/WebEditorClient.mm:
15885         (-[WebEditCommand dealloc]):
15886         * WebCoreSupport/WebFrameLoaderClient.mm:
15887         * WebView/WebArchive.mm:
15888         (-[WebArchivePrivate dealloc]):
15889         * WebView/WebDataSource.mm:
15890         (-[WebDataSourcePrivate dealloc]):
15891         * WebView/WebHTMLView.mm:
15892         (-[WebHTMLViewPrivate dealloc]):
15893         (-[WebHTMLView dealloc]):
15894         * WebView/WebResource.mm:
15895         (-[WebResourcePrivate dealloc]):
15896
15897 2008-08-05  Anders Carlsson  <andersca@apple.com>
15898
15899         Reviewed by Darin Adler.
15900
15901         Remove MainThreadObjectDeallocator.{h|mm}.
15902
15903         * WebView/MainThreadObjectDeallocator.h: Removed.
15904         * WebView/MainThreadObjectDeallocator.mm: Removed.
15905         
15906         * WebView/WebView.mm:
15907         (-[WebView dealloc]):
15908         Call WebCoreObjCScheduleDeallocateOnMainThread instead.
15909
15910 2008-08-05  Anders Carlsson  <andersca@apple.com>
15911
15912         Reviewed by Darin Adler.
15913
15914         Make the main thread object deallocator work with subclasses.
15915         
15916         * WebView/MainThreadObjectDeallocator.h:
15917         * WebView/MainThreadObjectDeallocator.mm:
15918         (deallocCallback):
15919         Call the correct dealloc method.
15920                 
15921         (scheduleDeallocateOnMainThread):
15922         Store both the class and the instance, so we know which dealloc method to call.
15923         
15924         * WebView/WebView.mm:
15925         (-[WebViewPrivate dealloc]):
15926         Schedule deallocation on the main thread.
15927
15928 2008-08-05  Dan Bernstein  <mitz@apple.com>
15929
15930         Reviewed by Mark Rowe and Anders Carlsson.
15931
15932         - fix WebMemorySize() reporting a value capped at 2GB
15933
15934         * misc/WebKitSystemBits.m:
15935         (WebMemorySize): Changed to return the max_mem field, which, unlike
15936         memory_size, is not capped at 2GB.
15937         * WebView/WebView.mm:
15938         (+[WebView _setCacheModel:]): Made the cache sizes for over 2GB RAM the
15939         same as for 2GB, so that behavior on machines that have more than 2GB
15940         RAM is not affected by the fix to WebMemorySize().
15941
15942 2008-08-04  Mark Rowe  <mrowe@apple.com>
15943
15944         Build fix.
15945
15946         * WebView/WebHTMLView.mm:
15947
15948 2008-08-04  Mark Rowe  <mrowe@apple.com>
15949
15950         Reviewed by Kevin Decker.
15951
15952         Adopt the formal protocols where necessary.
15953         Final part of fix for <rdar://problem/5853147>.
15954
15955         * WebCoreSupport/WebInspectorClient.mm:
15956         * WebView/WebHTMLView.mm:
15957         * WebView/WebView.mm:
15958         (-[WebView _openFrameInNewWindowFromMenu:]):
15959
15960 2008-08-04  Mark Rowe  <mrowe@apple.com>
15961
15962         Reviewed by Darin Adler.
15963
15964         Declare empty protocols when using versions of AppKit that do not use formal protocols for delegates and data sources.
15965         Part one of fix for <rdar://problem/5853147>.
15966
15967         * Misc/EmptyProtocolDefinitions.h:
15968         * WebKitPrefix.h:
15969
15970 2008-08-04  Brady Eidson  <beidson@apple.com>
15971
15972         Reviewed by Mitz Pettel
15973
15974         Fix <rdar://problem/5820157> - Saving WebArchives of Mail attachments broken.
15975
15976         This broke in r31355 when we stopped returning nil WebResources when there was nil
15977         resource data.
15978
15979         * WebView/WebResource.mm:
15980         (-[WebResource _initWithCoreResource:]): Restore previous behavior of returning nil
15981           when the resource data is null.
15982
15983 2008-08-02  Matt Lilek  <webkit@mattlilek.com>
15984
15985         Reviewed by Tim Hatcher.
15986
15987         Update the window gradient offset to match the inspector toolbar's new height.
15988
15989         * WebCoreSupport/WebInspectorClient.mm:
15990         (-[WebInspectorWindowController window]):
15991
15992 2008-08-01  Anders Carlsson  <andersca@apple.com>
15993
15994         Reviewed by Jon.
15995
15996         <rdar://problem/6120206>
15997         Crash when plug-in queries for NPPVpluginWantsAllNetworkStreams.
15998         
15999         Pass in a pointer to a void* to make sure that plug-ins don't overwrite the stack.
16000
16001         * Plugins/WebBaseNetscapePluginStream.mm:
16002         (-[WebBaseNetscapePluginStream wantsAllStreams]):
16003
16004 2008-07-31  Anders Carlsson  <andersca@apple.com>
16005
16006         Reviewed by Darin Adler.
16007
16008         <rdar://problem/5949410>
16009         Add the ability to transfer a given application cache to a new database.
16010
16011         * Misc/WebKitNSStringExtras.h:
16012         * Misc/WebKitNSStringExtras.m:
16013         (+[NSString _webkit_applicationCacheDirectoryWithBundleIdentifier:]):
16014         New method which returns the appopriate cache directory for a given bundle identifier.
16015         
16016         * WebView/WebDataSource.mm:
16017         (-[WebDataSource _transferApplicationCache:]):
16018         Transfer the application cache.
16019         
16020         * WebView/WebDataSourcePrivate.h:
16021         * WebView/WebView.mm:
16022         (WebKitInitializeApplicationCachePathIfNecessary):
16023         Change this to use _webkit_applicationCacheDirectoryWithBundleIdentifier.
16024
16025 2008-07-31  John Sullivan  <sullivan@apple.com>
16026
16027         WebKit part of <rdar://problem/6116650> Text-only zoom setting should be stored in WebKit prefs
16028
16029         Reviewed by Hyatt
16030
16031         * WebView/WebPreferenceKeysPrivate.h:
16032         added WebKitZoomsTextOnlyPreferenceKey
16033         
16034         * WebView/WebPreferences.mm:
16035         (+[WebPreferences initialize]):
16036         default value of YES for WebKitZoomsTextOnlyPreferenceKey
16037         (-[WebPreferences zoomsTextOnly]):
16038         getter for WebKitZoomsTextOnlyPreferenceKey
16039         (-[WebPreferences setZoomsTextOnly:]):
16040         setter for WebKitZoomsTextOnlyPreferenceKey
16041         
16042         * WebView/WebPreferencesPrivate.h:
16043         declare zoomsTextOnly/setZoomsTextOnly:
16044         
16045         * WebView/WebView.mm:
16046         (-[WebView _preferencesChangedNotification:]):
16047         update WebCore::Settings value for zoomsTextOnly
16048
16049 2008-07-31  David D. Kilzer  <ddkilzer@webkit.org>
16050
16051         Fix layout test results for webarchive/test-xml-stylesheet.xml
16052
16053         Reviewed by Darin Adler.
16054
16055         Needed to expose -[WebHTMLRepresentation supportedNonImageMIMETypes]
16056         for DumpRenderTree.
16057
16058         * WebView/WebHTMLRepresentationInternal.h: Added.
16059
16060 2008-07-31  Alexey Proskuryakov  <ap@webkit.org>
16061
16062         Release build fix.
16063
16064         * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView setWindowIfNecessary]):
16065         Don't define to npErr in release builds, as it is only used for logging.
16066
16067 2008-07-31  John Sullivan  <sullivan@apple.com>
16068
16069         Fixed <https://bugs.webkit.org/show_bug.cgi?id=5195>
16070         drawing with cacheDisplayInRect:toBitmapImageRep: doesn't trigger layout on Leopard
16071
16072         Reviewed by Dan
16073
16074         * WebView/WebHTMLView.mm:
16075         (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
16076         include Leopard in the #ifdef that forces a layout if needed
16077
16078 2008-07-30  Brady Eidson  <beidson@apple.com>
16079
16080         Reviewed by Adam and Hyatt
16081
16082         Fix for <rdar://problem/6099748>
16083
16084         * WebView/WebView.mm:
16085         (-[WebView _preferencesChangedNotification:]): Set the "don't enforce CSS mime type in strict mode" 
16086           quirk when running under iWeb 2
16087
16088 2008-07-31  Alexey Proskuryakov  <ap@webkit.org>
16089
16090         Rubber-stamped by Maciej.
16091
16092         Eliminate JSLock (it was already disabled, removing the stub implementaion and all
16093         call sites now).
16094
16095         * ForwardingHeaders/runtime/JSLock.h: Removed.
16096         * Misc/WebCoreStatistics.mm:
16097         (+[WebCoreStatistics javaScriptObjectsCount]):
16098         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
16099         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
16100         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
16101         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
16102         (+[WebCoreStatistics shouldPrintExceptions]):
16103         (+[WebCoreStatistics setShouldPrintExceptions:]):
16104         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
16105         * Plugins/WebBaseNetscapePluginStream.mm:
16106         (-[WebBaseNetscapePluginStream wantsAllStreams]):
16107         * Plugins/WebBaseNetscapePluginView.mm:
16108         (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
16109         (-[WebBaseNetscapePluginView setWindowIfNecessary]):
16110         (-[WebBaseNetscapePluginView start]):
16111         (-[WebBaseNetscapePluginView createPluginScriptableObject]):
16112         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
16113         (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
16114         (-[WebBaseNetscapePluginView loadPluginRequest:]):
16115         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
16116         * Plugins/WebPluginController.mm:
16117         (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
16118         (-[WebPluginController startAllPlugins]):
16119         (-[WebPluginController stopAllPlugins]):
16120         (-[WebPluginController addPlugin:]):
16121         (-[WebPluginController destroyPlugin:]):
16122         (-[WebPluginController destroyAllPlugins]):
16123         * WebView/WebFrame.mm:
16124         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
16125         * WebView/WebScriptDebugDelegate.mm:
16126         (-[WebScriptCallFrame evaluateWebScript:]):
16127         * WebView/WebView.mm:
16128         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
16129
16130 2008-07-30  Beth Dakin  <bdakin@apple.com>
16131
16132         Reviewed by Anders Carlsson.
16133
16134         Fixes <rdar://problem/6041390>
16135
16136         Adds the ability to have a frame that is "disconnected" from the 
16137         main frame from the perspective of top and parent in 
16138         Javascript.
16139
16140         * WebView/WebFrame.mm:
16141         (-[WebFrame _setIsDisconnectedFrame]):
16142         * WebView/WebFramePrivate.h:
16143
16144 2008-07-29  Mark Rowe  <mrowe@apple.com>
16145
16146         Tweak to the build fix to keep Dan happy.
16147
16148         * Plugins/WebBaseNetscapePluginView.mm:
16149         * WebView/WebHTMLView.mm:
16150
16151 2008-07-29  Mark Rowe  <mrowe@apple.com>
16152
16153         Build fix.
16154
16155         * Plugins/WebBaseNetscapePluginView.mm:
16156         (-[WebBaseNetscapePluginView inputContext]):
16157         * WebView/WebHTMLView.mm:
16158
16159 2008-07-28  Anders Carlsson  <andersca@apple.com>
16160
16161         Reviewed by Kevin Decker.
16162
16163         Based on a patch by Dimcho Balev.
16164         
16165         https://bugs.webkit.org/show_bug.cgi?id=18676
16166         <rdar://problem/6106578>
16167         Plug-In API Proposal: Enable plugins to receive response body when an HTTP error occurs
16168
16169         * Plugins/WebBaseNetscapePluginStream.h:
16170         Add NPP_GetValue pointer.
16171         
16172         * Plugins/WebBaseNetscapePluginStream.mm:
16173         (-[WebBaseNetscapePluginStream setPlugin:]):
16174         Initialize NPP_GetValue.
16175         
16176         (-[WebBaseNetscapePluginStream wantsAllStreams]):
16177         Call NPP_GetValue.
16178         
16179         * Plugins/WebPlugInStreamLoaderDelegate.h:
16180         * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.h:
16181         * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.mm:
16182         (WebNetscapePlugInStreamLoaderClient::wantsAllStreams):
16183         Implement this and call down to the stream.
16184
16185 2008-07-28  Anders Carlsson  <andersca@apple.com>
16186
16187         Reviewed by Adam.
16188
16189         <rdar://problem/6105529> 
16190         https://bugs.webkit.org/show_bug.cgi?id=19659
16191         Turning off plugins causes crash
16192         
16193         When an active page has plug-ins, and plug-ins are disabled, they will be stopped and will
16194         end up in a state where they don't have an event handler. Because of this, we need to 
16195         check that the plug-in has been started before calling the event handler.
16196         
16197         * Plugins/WebBaseNetscapePluginView.mm:
16198         (-[WebBaseNetscapePluginView sendActivateEvent:]):
16199         (-[WebBaseNetscapePluginView sendDrawRectEvent:]):
16200         (-[WebBaseNetscapePluginView setHasFocus:]):
16201         (-[WebBaseNetscapePluginView mouseDown:]):
16202         (-[WebBaseNetscapePluginView mouseUp:]):
16203         (-[WebBaseNetscapePluginView mouseEntered:]):
16204         (-[WebBaseNetscapePluginView mouseExited:]):
16205         (-[WebBaseNetscapePluginView handleMouseMoved:]):
16206         (-[WebBaseNetscapePluginView mouseDragged:]):
16207         (-[WebBaseNetscapePluginView scrollWheel:]):
16208         (-[WebBaseNetscapePluginView keyUp:]):
16209         (-[WebBaseNetscapePluginView keyDown:]):
16210         (-[WebBaseNetscapePluginView flagsChanged:]):
16211         (-[WebBaseNetscapePluginView cut:]):
16212         (-[WebBaseNetscapePluginView copy:]):
16213         (-[WebBaseNetscapePluginView paste:]):
16214         (-[WebBaseNetscapePluginView selectAll:]):
16215         (-[WebBaseNetscapePluginView drawRect:]):
16216         (-[WebBaseNetscapePluginView inputContext]):
16217
16218 2008-07-26  Daniel Jalkut  <jalkut@red-sweater.com>
16219
16220         Reviewed by Geoff Garen.
16221
16222         Changes to accommodate newly named/signatured loading methods in WebCore.
16223
16224         * Plugins/WebNetscapePluginStream.mm:
16225         (-[WebNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
16226         * Plugins/WebPluginContainerCheck.mm:
16227         (-[WebPluginContainerCheck _isForbiddenFileLoad]):
16228         * WebView/WebPDFView.mm:
16229         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
16230
16231 2008-07-21  Mark Rowe  <mrowe@apple.com>
16232
16233         Reviewed by Sam Weinig.
16234
16235         <rdar://problem/6091287> Revamp the handling of CFBundleShortVersionString to be fixed at the major component of the version number.
16236
16237         * Configurations/Version.xcconfig:
16238         * Info.plist:
16239
16240 2008-07-21  Anders Carlsson  <andersca@apple.com>
16241
16242         Reviewed by Geoff.
16243
16244         <rdar://problem/5820667> 
16245         CrashTracer: [USER] 3759 crashes in Safari at FrameLoader::activeDocumentLoader const + 6 while canceling plug-in load
16246         
16247         Don't allow URLs to be loaded in response to an NPP_DestroyStream that happens when tearing down the plug-in.
16248         
16249         * Plugins/WebBaseNetscapePluginView.mm:
16250         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
16251
16252 2008-07-21  Mark Rowe  <mrowe@apple.com>
16253
16254         Reviewed by Adam Roben.
16255
16256         <rdar://problem/5624143> WebView printing doesn't work correctly in x86_64
16257
16258         Fix the return type of an NSView method that we override so that the correct data type is used in 64-bit.
16259         This prevents a garbage value being used for the scale factor that the NSView print machinery applies.
16260
16261         * WebView/WebHTMLView.mm:
16262
16263 2008-07-21  Mark Rowe  <mrowe@apple.com>
16264
16265         Reviewed by Adam Roben.
16266
16267         Fix CallDelegateReturningFloat for x86_64.  The x86_64 Objective-C runtime
16268         only uses objc_msgSend_fpret for long double return values.  For float return
16269         values the standard objc_msgSend is used, as on ppc and ppc64.
16270
16271         * WebView/WebView.mm: Use objc_msgSend_float_return as the name of our version of
16272         objc_msgSend with the correct return type.  We can no longer call it objc_msgSend_fpret
16273         as that method is defined by the Objective-C runtime for x86_64.
16274         (CallDelegateReturningFloat):
16275
16276 2008-07-14  Dan Bernstein  <mitz@apple.com>
16277
16278         Reviewed by John Sullivan.
16279
16280         - WebKit part of fixing <rdar://problem/6071850> Subviews not drawn correctly when using -cacheDisplayInRect:toBitmapImageRep:
16281
16282         * Plugins/WebBaseNetscapePluginView.mm:
16283         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): Changed
16284         to account for the case of being drawn into a bitmap context that is not
16285         a window's backing store. In that case, there are no valid "rects being
16286         drawn" to clip to.
16287         * WebView/WebHTMLView.mm:
16288         (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
16289         Added an override of this NSView method which is used in for
16290         -cacheDisplayInRect:toBitmapImageRep:. Like two existing NSView drawing
16291         machinery overrides, it sets subviews aside before invoking the
16292         superclass implementation. On Tiger, it also updates the layout.
16293
16294 2008-07-14  Alexey Proskuryakov  <ap@webkit.org>
16295
16296         Reviewed by Geoff Garen.
16297
16298         Eliminate per-thread JavaScript global data instance support and make arbitrary
16299         global data/global object combinations possible.
16300
16301         * Misc/WebCoreStatistics.mm:
16302         (+[WebCoreStatistics javaScriptObjectsCount]):
16303         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
16304         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
16305         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
16306         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
16307         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
16308         Ask WebCore for its instance of JSGlobalData, now that it is not in per-thread storage.
16309
16310 2008-07-11  Stephanie Lewis  <slewis@apple.com>
16311
16312         Reviewed by Darin Adler.
16313
16314         Disable WTF leak messages when using fast teardown.  Use full document teardown while running in debug.
16315
16316         * WebView/WebPreferences.m: Removed.
16317         * WebView/WebPreferences.mm: Copied from http:/svn.webkit.org/repository/webkit/trunk/WebKit/mac/WebView/WebPreferences.m.
16318         (+[WebPreferences initialize]): if running in Default enable full  document teardown
16319         (-[WebPreferences editableLinkBehavior]):
16320         (-[WebPreferences setFullDocumentTeardownEnabled:]):
16321         * WebView/WebView.mm:
16322         (-[WebView _close]): disable leak messages if using fast teardown
16323
16324 2008-07-10  Mark Rowe  <mrowe@apple.com>
16325
16326         Reviewed by Sam Weinig.
16327
16328         Define WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST when building WebKit to ensure that no symbols end up with the weak_import attribute.
16329
16330         * Configurations/WebKit.xcconfig:
16331
16332 2008-07-10  Mark Rowe  <mrowe@apple.com>
16333
16334         Reviewed by Sam Weinig.
16335
16336         Fix the Tiger build by omitting annotations from methods declared in categories when using old versions of GCC.
16337
16338         * Plugins/WebPlugin.h: Wrap annotations on methods declared in categories in the WEBKIT_CATEGORY_METHOD_ANNOTATION macro.
16339         * WebView/WebFrameLoadDelegate.h: Ditto.
16340         * WebView/WebUIDelegate.h: Ditto.
16341
16342 2008-07-10  Anders Carlsson  <andersca@apple.com>
16343
16344         Reviewed by Mark.
16345         
16346         Add availability macros for the new WebPlugin methods.
16347
16348         * Plugins/WebPlugin.h:
16349         * Plugins/WebPluginViewFactory.h:
16350
16351 2008-07-09  Mark Rowe  <mrowe@apple.com>
16352
16353         Reviewed by Geoff Garen.
16354
16355         Don't warn about deprecated functions in production builds.
16356
16357         * Configurations/Base.xcconfig:
16358         * Configurations/DebugRelease.xcconfig:
16359
16360 2008-07-09  Brady Eidson  <beidson@apple.com>
16361
16362         Reviewed by Darin
16363
16364         <rdar://problem/5823684> - Crash manipulating frame tree of a new frame before the new frame
16365         has been installed in a frame tree.
16366
16367         The root of this problem was that calling init() on a new frame could end up calling arbitrary
16368         javascript that might end up removing the frame from the tree.  This opened up a small can of worms
16369         such as the frame not having yet been installed in its frame tree, and other assumed behavior while
16370         destroying the frame.
16371
16372         Note that each platforms WebKit API layer needs to make this new guarantee:
16373         "The new Frame must be installed in its FrameTree before newCoreFrame->init() is called"
16374         I am fixing Mac, and Windows and GTK already have this property.  Wx currently has subframes disabled
16375         but will need to add this guarantee when re-enabling, and Qt is currently vulnerable to this same bug.
16376
16377         Alternately, the way frames are created right now is roundabout and asinine, and this is a key
16378         architectural improvement we can make in the future so the individual platform clients are no longer
16379         vulnerable to this problem, which should really have been a WebCore issue.
16380
16381         * WebCoreSupport/WebFrameLoaderClient.mm:
16382         (WebFrameLoaderClient::createFrame):  Don't bother null checking the newCoreFrame - can't be NULL.
16383           Don't appendChild() the new frame here.
16384           Null-check the new frame's page before loading the URL into it, as it might already have been
16385           removed from the page.
16386
16387         * WebView/WebFrame.mm:
16388         (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):  If there is an ownerElement,
16389           go ahead and install the new frame in the frame tree *before* calling init() on it.
16390
16391 2008-07-09  Anders Carlsson  <andersca@apple.com>
16392
16393         Reviewed by Darin Adler.
16394
16395         Make some WebPlugin and WebPluginFactory SPI public.
16396         
16397         * Plugins/WebPlugin.h:
16398         * Plugins/WebPluginPrivate.h:
16399         * Plugins/WebPluginViewFactory.h:
16400         * Plugins/WebPluginViewFactoryPrivate.h:
16401
16402 2008-07-08  Jon Honeycutt  <jhoneycutt@apple.com>
16403
16404         Reviewed by Anders.
16405
16406         Port r34988 to Mac: don't call NPP_DestroyStream if NPP_NewStream was
16407         unsuccessful.
16408
16409         * Plugins/WebBaseNetscapePluginStream.h: Added new member,
16410         newStreamSuccessful.
16411         * Plugins/WebBaseNetscapePluginStream.mm:
16412         (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]): Initialize new member.
16413         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]): If NPP_NewStream is successful, set
16414         newStreamSuccessful to YES.
16415         (-[WebBaseNetscapePluginStream _destroyStream]): Only call
16416         NPP_DestroyStream if newStreamSuccessful is true.
16417
16418 2008-07-08  Dan Bernstein  <mitz@apple.com>
16419
16420         Reviewed by John Sullivan.
16421
16422         - WebKit part of <rdar://problem/6008409> Need a way to disable updates in offscreen views
16423
16424         * WebView/WebHTMLView.mm:
16425         (-[WebHTMLView addWindowObservers]): Added code to observe when the
16426         window goes onscreen.
16427         (-[WebHTMLView removeWindowObservers]): Added.
16428         (-[WebHTMLView windowWillOrderOnScreen:]): Added. If the view is set to
16429         not update when offscreen, calls -setNeedsDisplay: just before it comes
16430         onscreen.
16431         * WebView/WebPreferenceKeysPrivate.h: Added preference key.
16432         * WebView/WebPreferences.m:
16433         (+[WebPreferences initialize]): Made updates when offscreen on by
16434         default.
16435         (-[WebPreferences updatesWhenOffscreen]): Added.
16436         (-[WebPreferences setUpdatesWhenOffscreen:]): Added.
16437         * WebView/WebPreferencesPrivate.h:
16438         * WebView/WebView.mm:
16439         (-[WebView _preferencesChangedNotification:]): Added code to update the
16440         updatesWhenOffscreen setting in WebCore.
16441
16442 2008-07-07  Anders Carlsson  <andersca@apple.com>
16443
16444         Reviewed by Darin Adler.
16445
16446         Speculative fix for     
16447         <rdar://problem/5839800>
16448         CrashTracer: [USER] 5802 crashes in Safari at com.apple.WebKit: -[WebHTMLView(WebPrivate) _updateMouseoverWithFakeEvent] + 389
16449         
16450         Set _private->closed to YES before calling -[WebPluginController destroyAllPlugins].
16451         
16452         My theory is that the plug-in destruction callbacks could end up rescheduling timers or re-adding notifications.
16453         This is usually protected by _private->closed, but in this case it might still be false.
16454
16455         * WebView/WebHTMLView.mm:
16456         (-[WebHTMLView close]):
16457
16458 2008-07-05  Mark Rowe  <mrowe@apple.com>
16459
16460         Reviewed by John Sullivan.
16461
16462         Remove WebSearchableTextView as it has been unused for some time now.
16463
16464         * Misc/WebSearchableTextView.h: Removed.
16465         * Misc/WebSearchableTextView.m: Removed.
16466
16467 2008-07-05  Mark Rowe  <mrowe@apple.com>
16468
16469         Reviewed by John Sullivan.
16470
16471         Don't leak the result of WKCopyCFLocalizationPreferredName when running under GC.
16472
16473         * Misc/WebNSUserDefaultsExtras.m:
16474         (-[NSString _webkit_HTTPStyleLanguageCode]):
16475
16476 2008-07-02  Alexey Proskuryakov  <ap@webkit.org>
16477
16478         Inspired and reviewed by Mark Rowe.
16479
16480         Change non-API includes from JavaScriptCore/ to kjs/ and wtf/ to match prevalent style.
16481
16482         * Carbon/HIViewAdapter.m:
16483         * DOM/WebDOMOperations.mm:
16484         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
16485         * DefaultDelegates/WebDefaultPolicyDelegate.m:
16486         * History/WebBackForwardList.mm:
16487         * History/WebHistory.mm:
16488         * History/WebHistoryItem.mm:
16489         * History/WebHistoryItemInternal.h:
16490         * Misc/WebCoreStatistics.mm:
16491         * Misc/WebDownload.m:
16492         * Misc/WebGraphicsExtras.c:
16493         * Misc/WebKitLogging.h:
16494         * Misc/WebKitSystemBits.m:
16495         * Misc/WebLocalizableStrings.m:
16496         * Misc/WebNSArrayExtras.m:
16497         * Misc/WebNSDataExtras.m:
16498         * Misc/WebNSDictionaryExtras.m:
16499         * Misc/WebNSFileManagerExtras.m:
16500         * Misc/WebNSPasteboardExtras.mm:
16501         * Misc/WebNSURLExtras.mm:
16502         * Misc/WebNSUserDefaultsExtras.m:
16503         * Panels/WebAuthenticationPanel.m:
16504         * Panels/WebPanelAuthenticationHandler.m:
16505         * Plugins/WebBaseNetscapePluginView.mm:
16506         * Plugins/WebBasePluginPackage.m:
16507         * Plugins/WebNetscapePluginEmbeddedView.mm:
16508         * Plugins/WebPluginContainerCheck.mm:
16509         * Plugins/WebPluginController.mm:
16510         * Plugins/WebPluginDatabase.mm:
16511         * WebCoreSupport/WebJavaScriptTextInputPanel.m:
16512         * WebCoreSupport/WebKeyGenerator.m:
16513         * WebCoreSupport/WebViewFactory.mm:
16514         * WebKitPrefix.h:
16515         * WebView/WebHTMLRepresentation.mm:
16516         * WebView/WebPDFRepresentation.m:
16517         * WebView/WebPDFView.mm:
16518         * WebView/WebScriptDebugger.mm:
16519
16520 2008-07-01  Alexey Proskuryakov  <ap@webkit.org>
16521
16522         Reviewed by Darin Adler.
16523
16524         Disable JSLock for per-thread contexts.
16525
16526         * Misc/WebCoreStatistics.mm:
16527         (+[WebCoreStatistics javaScriptObjectsCount]):
16528         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
16529         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
16530         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
16531         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
16532         (+[WebCoreStatistics shouldPrintExceptions]):
16533         (+[WebCoreStatistics setShouldPrintExceptions:]):
16534         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
16535         * Plugins/WebBaseNetscapePluginView.mm:
16536         (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
16537         (-[WebBaseNetscapePluginView setWindowIfNecessary]):
16538         (-[WebBaseNetscapePluginView start]):
16539         (-[WebBaseNetscapePluginView createPluginScriptableObject]):
16540         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]):
16541         (-[WebBaseNetscapePluginView webFrame:didFinishLoadWithReason:]):
16542         (-[WebBaseNetscapePluginView loadPluginRequest:]):
16543         (-[WebBaseNetscapePluginView _printedPluginBitmap]):
16544         * Plugins/WebPluginController.mm:
16545         (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
16546         (-[WebPluginController startAllPlugins]):
16547         (-[WebPluginController stopAllPlugins]):
16548         (-[WebPluginController addPlugin:]):
16549         (-[WebPluginController destroyPlugin:]):
16550         (-[WebPluginController destroyAllPlugins]):
16551         * WebView/WebFrame.mm:
16552         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
16553         * WebView/WebScriptDebugDelegate.mm:
16554         (-[WebScriptCallFrame evaluateWebScript:]):
16555         * WebView/WebView.mm:
16556         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
16557         Pass a parameter (always false) to JSLock and JSLock::DropAllLocks to indicate that WebKit
16558         doesn't need locking. In the future, it may be possible to remove some of these if we
16559         establish that this won't make JSC assertions fail (and that we don't want to add such
16560         assertions either).
16561         Added includes that are now needed.
16562
16563 2008-07-01  Kevin McCullough  <kmccullough@apple.com>
16564
16565         Build fix.
16566
16567         * WebView/WebView.mm:
16568
16569 2008-07-01  Anders Carlsson  <andersca@apple.com>
16570
16571         Reviewed by Darin Adler.
16572
16573         Use the PluginMainThreadScheduler, and implement NPN_PluginThreadAsyncCall.
16574         
16575         * Plugins/WebBaseNetscapePluginView.mm:
16576         (-[WebBaseNetscapePluginView _createPlugin]):
16577         Register the plug-in instance.
16578         
16579         (-[WebBaseNetscapePluginView _destroyPlugin]):
16580         Unegister the plug-in instance.
16581         
16582         * Plugins/WebNetscapePluginPackage.m:
16583         (-[WebNetscapePluginPackage load]):
16584         Set NPN_PluginThreadAsyncCall.
16585         
16586         * Plugins/npapi.mm:
16587         (NPN_PluginThreadAsyncCall):
16588         Implement this.
16589
16590 2008-07-01  Dan Bernstein  <mitz@apple.com>
16591
16592         Reviewed by Darin Adler.
16593
16594         - WebKit part of moving the method to set the base writing direction from Frame to Editor
16595
16596         * WebView/WebHTMLView.mm:
16597         (-[WebHTMLView toggleBaseWritingDirection:]): Changed back to call the
16598         Editor method.
16599         (-[WebHTMLView changeBaseWritingDirection:]): Ditto.
16600         (-[WebHTMLView _changeBaseWritingDirectionTo:]): Ditto.
16601
16602 2008-07-01  Geoffrey Garen  <ggaren@apple.com>
16603
16604         Build fix: forgot to check in this file.
16605
16606         * WebView/WebScriptDebugger.mm:
16607         (WebScriptDebugger::WebScriptDebugger):
16608
16609 2008-06-30  Dan Bernstein  <mitz@apple.com>
16610
16611         Reviewed by Adele Peterson.
16612
16613         - WebKit/mac part of <rdar://problem/3881497> Writing direction context menu item has no effect on text typed in Safari
16614
16615         * WebView/WebHTMLView.mm:
16616         (-[WebHTMLView toggleBaseWritingDirection:]): Changed to call
16617         WebCore::Frame::setSelectionBaseWritingDirection() instead of
16618         WebCore::Editor::setBaseWritingDirection().
16619         (-[WebHTMLView changeBaseWritingDirection:]): Ditto.
16620         (-[WebHTMLView _changeBaseWritingDirectionTo:]): Ditto.
16621
16622 2008-06-28  Darin Adler  <darin@apple.com>
16623
16624         - fix build
16625
16626         * WebView/WebView.mm:
16627         (aeDescFromJSValue): Use get instead of getItem, which no longer exists.
16628
16629 2008-06-26  Anders Carlsson  <andersca@apple.com>
16630
16631         Reviewed by Darin Adler.
16632
16633         Add a new MainThreadObjectDeallocator which can schedule dealloc calls on the main thread
16634         if necessary. Use this for the WebView class. 
16635                 
16636         * WebView/MainThreadObjectDeallocator.h: Added.
16637         * WebView/MainThreadObjectDeallocator.mm: Added.
16638         (deallocCallback):
16639         (scheduleDeallocateOnMainThread):
16640         * WebView/WebView.mm:
16641         (-[WebViewPrivate dealloc]):
16642         (+[WebView initialize]):
16643
16644 2008-06-25  Anders Carlsson  <andersca@apple.com>
16645
16646         Reviewed by Mark.
16647
16648         <rdar://problem/5984270> 
16649         REGRESSION (Tiger only) : Mail crashes because message load is being processed on a secondary thread
16650         
16651         * WebView/WebView.mm:
16652         (tigerMailReleaseIMP):
16653         New method that makes sure that the final release happens on the main thread.
16654         
16655         (-[WebView release]):
16656         New method that just calls [super release];
16657         
16658         (+[WebView initialize]):
16659         When running under Tiger mail, replace the release method with tigerMailReleaseIMP.
16660
16661 2008-06-19  Alexey Proskuryakov  <ap@webkit.org>
16662
16663         Reviewed by Geoff.
16664
16665         Make Machine per-JSGlobalData.
16666
16667         * WebView/WebScriptDebugger.mm:
16668         (WebScriptDebugger::WebScriptDebugger):
16669
16670 2008-06-17  Alexey Proskuryakov  <ap@webkit.org>
16671
16672         Reviewed by Darin Adler.
16673
16674         Prepare JavaScript heap for being per-thread.
16675
16676         * Misc/WebCoreStatistics.mm:
16677         (+[WebCoreStatistics javaScriptObjectsCount]):
16678         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
16679         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
16680         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
16681         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
16682         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
16683         Use JSGlobalData::threadInstance()->heap instead of static Collector calls.
16684
16685 2008-06-17  Darin Adler  <darin@apple.com>
16686
16687         Reviewed by Sam.
16688
16689         * WebView/WebHTMLView.mm:
16690         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Use create instead of new
16691         to create a CSSMutableStyleDeclaration.
16692
16693 2008-06-16  Mark Rowe  <mrowe@apple.com>
16694
16695         Reviewed by Darin Adler.
16696
16697         <rdar://problem/5951874> WebHTMLHighlighter mistakenly gained two new methods, causing compile warnings
16698
16699         _pauseNullEventsForAllNetscapePlugins and _resumeNullEventsForAllNetscapePlugins ended up being declared both in
16700         WebHTMLViewInternal.h and as members of the WebHTMLHighlighter protocol in WebHTMLViewPrivate.h.  They don't belong
16701         in the protocol, but they do need to be available outside of WebKit so they're being moved to the correct location
16702         in WebHTMLViewPrivate.h and removed from WebHTMLViewInternal.h.
16703
16704         * WebView/WebHTMLView.mm:
16705         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]):
16706         (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]):
16707         * WebView/WebHTMLViewInternal.h:
16708         * WebView/WebHTMLViewPrivate.h:
16709
16710 2008-06-15  Darin Adler  <darin@apple.com>
16711
16712         - give Frame object functions shorter names: scriptProxy() -> script(),
16713           selectionController() -> selection(), animationController() -> animation()
16714
16715         * Plugins/WebPluginController.mm:
16716         (-[WebPluginController webPlugInContainerSelectionColor]):
16717         * WebView/WebFrame.mm:
16718         (-[WebFrame _attachScriptDebugger]):
16719         (-[WebFrame _hasSelection]):
16720         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
16721         (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
16722         (-[WebFrame _convertToNSRange:]):
16723         (-[WebFrame _convertToDOMRange:]):
16724         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
16725         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
16726         (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
16727         (-[WebFrame _selectedNSRange]):
16728         (-[WebFrame _selectNSRange:]):
16729         (-[WebFrame globalContext]):
16730         * WebView/WebHTMLView.mm:
16731         (-[WebHTMLView _selectedRange]):
16732         (-[WebHTMLView _hasSelection]):
16733         (-[WebHTMLView _hasSelectionOrInsertionPoint]):
16734         (-[WebHTMLView _hasInsertionPoint]):
16735         (-[WebHTMLView _isEditable]):
16736         (-[WebHTMLView _updateFocusedAndActiveState]):
16737         (-[WebHTMLView readSelectionFromPasteboard:]):
16738         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
16739         (-[WebHTMLView maintainsInactiveSelection]):
16740         (-[WebHTMLView paste:]):
16741         (isTextInput):
16742         (-[WebHTMLView inputContext]):
16743         (-[WebTextCompleteController doCompletion]):
16744         (-[WebHTMLView selectAll]):
16745         (-[WebHTMLView deselectAll]):
16746         (-[WebHTMLView selectedAttributedString]):
16747         * WebView/WebView.mm:
16748         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
16749         (-[WebView setSelectedDOMRange:affinity:]):
16750         (-[WebView selectedDOMRange]):
16751         (-[WebView selectionAffinity]):
16752
16753 2008-06-15  Darin Adler  <darin@apple.com>
16754
16755         - rename KJS::List to KJS::ArgList
16756
16757         * WebView/WebScriptDebugger.h:
16758
16759 2008-06-15  Darin Adler  <darin@apple.com>
16760
16761         - new names for more JavaScriptCore files
16762
16763         * WebView/WebView.mm:
16764
16765 2008-06-15  Darin Adler  <darin@apple.com>
16766
16767         - new names for a few key JavaScriptCore files
16768
16769         * ForwardingHeaders/kjs/JSFunction.h: Copied from WebKit/mac/ForwardingHeaders/kjs/function.h.
16770         * ForwardingHeaders/kjs/JSObject.h: Copied from WebKit/mac/ForwardingHeaders/kjs/object.h.
16771         * ForwardingHeaders/kjs/JSString.h: Copied from WebKit/mac/ForwardingHeaders/kjs/internal.h.
16772         * ForwardingHeaders/kjs/JSValue.h: Copied from WebKit/mac/ForwardingHeaders/kjs/value.h.
16773         * ForwardingHeaders/kjs/function.h: Removed.
16774         * ForwardingHeaders/kjs/internal.h: Removed.
16775         * ForwardingHeaders/kjs/object.h: Removed.
16776         * ForwardingHeaders/kjs/value.h: Removed.
16777         * WebView/WebScriptDebugDelegate.mm:
16778
16779 2008-06-15  Darin Adler  <darin@apple.com>
16780
16781         Rubber stamped by Sam.
16782
16783         - use JS prefix and simpler names for basic JavaScriptCore types,
16784           to complement JSValue and JSObject
16785
16786         * WebView/WebView.mm:
16787         (aeDescFromJSValue):
16788
16789 2008-06-14  Darin Adler  <darin@apple.com>
16790
16791         Rubber stamped by Sam.
16792
16793         - new names for kjs_binding.h and kjs_proxy.h
16794
16795         * WebView/WebFrame.mm:
16796         * WebView/WebScriptDebugDelegate.mm:
16797         * WebView/WebView.mm:
16798
16799 2008-06-14  Darin Adler  <darin@apple.com>
16800
16801         Rubber stamped by Sam.
16802
16803         - renamed HTMLGenericFormElement to HTMLFormControlElement
16804
16805         * WebView/WebHTMLRepresentation.mm:
16806         (-[WebHTMLRepresentation elementWithName:inForm:]):
16807         (-[WebHTMLRepresentation controlsInForm:]):
16808
16809 2008-06-14  Darin Adler  <darin@apple.com>
16810
16811         Reviewed by Sam.
16812
16813         - more of https://bugs.webkit.org/show_bug.cgi?id=17257
16814           start ref counts at 1 instead of 0 for speed
16815
16816         * WebCoreSupport/WebFrameLoaderClient.mm:
16817         (WebFrameLoaderClient::createDocumentLoader): Use create instead of new.
16818         (WebFrameLoaderClient::createFrame): Remove now-obsolete adoptRef that was balanced by
16819         a ref call inside the Frame constructor. The lifetime rules for Frame are now the
16820         conventional ones without a special case.
16821
16822         * WebView/WebDataSource.mm:
16823         (-[WebDataSource _initWithDocumentLoader:]): Changed argument to be a PassRefPtr, since
16824         this function takes ownership of the DocumentLoader.
16825         (-[WebDataSource initWithRequest:]): Use create instead of new.
16826         * WebView/WebDataSourceInternal.h: Changed _initWithDocumentLoader argument to be a
16827         PassRefPtr and also cleaned up the header a bit.
16828
16829         * WebView/WebDocumentLoaderMac.h:
16830         (WebDocumentLoaderMac::create): Added. Also made the constructor and a couple of virtual
16831         functions private.
16832
16833         * WebView/WebFrame.mm:
16834         (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Use create instead
16835         of new.
16836
16837 2008-06-14  Darin Adler  <darin@apple.com>
16838
16839         Reviewed by Sam.
16840
16841         - more work on https://bugs.webkit.org/show_bug.cgi?id=17257
16842           start ref counts at 1 instead of 0 for speed
16843
16844         * WebView/WebFrame.mm:
16845         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
16846         * WebView/WebPDFView.mm:
16847         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
16848
16849 2008-06-13  Darin Adler  <darin@apple.com>
16850
16851         Reviewed by John Sullivan.
16852
16853         - updated for addition of FormState argument to action policy functions
16854         - added WebActionFormKey
16855
16856         * WebCoreSupport/WebFrameLoaderClient.h:
16857         * WebCoreSupport/WebFrameLoaderClient.mm:
16858         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
16859         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
16860         (WebFrameLoaderClient::actionDictionary):
16861         * WebKit.exp:
16862         * WebView/WebPolicyDelegate.mm:
16863         * WebView/WebPolicyDelegatePrivate.h:
16864
16865 2008-06-12  John Sullivan  <sullivan@apple.com>
16866
16867         Reviewed by Dan and Darin
16868
16869         Clear up the confusion about _close (older private method) vs -close (newer public method).
16870
16871         * WebView/WebView.mm:
16872         (-[WebView _isClosed]):
16873         simplified style
16874         (-[WebView _close]):
16875         added a comment about how clients and subclasses should use -close instead
16876         (-[WebView dealloc]):
16877         call -close instead of _close, so subclasses that override the public method will have the intended behavior
16878         (-[WebView close]):
16879         added a comment
16880         (-[WebView _windowWillClose:]):
16881         call -close instead of _close, so subclasses that override the public method will have the intended behavior
16882
16883         * WebView/WebViewPrivate.h:
16884         added a comment about how clients and subclasses should use -close instead
16885
16886 2008-06-07  Darin Adler  <darin@apple.com>
16887
16888         Reviewed by Mitz.
16889
16890         - work on https://bugs.webkit.org/show_bug.cgi?id=17257
16891           start ref counts at 1 instead of 0 for speed
16892
16893         * History/WebHistoryItem.mm:
16894         (-[WebHistoryItem init]):
16895         (-[WebHistoryItem initWithURLString:title:lastVisitedTimeInterval:]):
16896         (-[WebHistoryItem initWithURL:target:parent:title:]):
16897         (-[WebHistoryItem initWithURLString:title:displayTitle:lastVisitedTimeInterval:]):
16898         * WebView/WebView.mm:
16899         (+[WebView _decodeData:]):
16900
16901 2008-06-03  Oliver Hunt  <oliver@apple.com>
16902
16903         Reviewed by Tim.
16904
16905         Bug 12983: Web Inspector break on the debugger keyword
16906         <https://bugs.webkit.org/show_bug.cgi?id=12983>
16907
16908         Add stubs to allow old webkit debugger interface to build.
16909
16910         * WebView/WebScriptDebugger.h:
16911         * WebView/WebScriptDebugger.mm:
16912
16913 2008-06-03  Anders Carlsson  <andersca@apple.com>
16914
16915         Reviewed by Darin Adler.
16916
16917         <rdar://problem/5980961>
16918         
16919         In 64-bit Web Kit, converting between float and double, can cause rounding errors which in turn causes
16920         newBottom to be larger than oldBottom which is illegal.
16921         
16922         * WebView/WebHTMLView.mm:
16923         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]):
16924
16925 2008-06-02  Anders Carlsson  <andersca@apple.com>
16926
16927         Reviewed by Mitz.
16928
16929         Speculative fix for <rdar://problem/5661112> 
16930         CrashTracer: [USER] 49 crashes in DashboardClient at com.apple.WebCore: WebCore::RenderPart::setWidget + 62
16931         
16932         Defer loads while calling NPP_New. Some plug-ins start a run-loop inside NPP_New and finished loads could cause
16933         layouts to be triggered.
16934         
16935         * Plugins/WebBaseNetscapePluginView.mm:
16936         (-[WebBaseNetscapePluginView _createPlugin]):
16937
16938 2008-05-29  Justin Garcia  <justin.garcia@apple.com>
16939
16940         Reviewed by Darin Adler.
16941         
16942         <rdar://problem/5949462> REGRESSION: Can't paste screen captures into Mail
16943         
16944         AppKit started putting PNG instead of PICT onto the pasteboard for screen 
16945         captures.  Added support for PNG with kUTTypePNG.  Tiger doesn't support
16946         setting and retrieving pasteboard types with UTIs, but we don't know of any
16947         applications on Tiger that put only PNG on the pasteboard.
16948
16949         * WebView/WebHTMLView.mm:
16950         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]):
16951         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
16952
16953 2008-05-29  Anders Carlsson  <andersca@apple.com>
16954
16955         Reviewed by Brady.
16956
16957         <rdar://problem/5970312> 
16958         icon file specified for stand alone web app causes crash if the icon can't be found
16959         
16960         Handle the case where iconData is null.
16961         
16962         * Misc/WebIconFetcher.mm:
16963         (WebIconFetcherClient::finishedFetchingIcon):
16964
16965 2008-05-29  Anders Carlsson  <andersca@apple.com>
16966
16967         Reviewed by Mitz.
16968
16969         <rdar://problem/5971845>
16970         https://bugs.webkit.org/show_bug.cgi?id=19313
16971         Add version member to NPCocoaEvent
16972
16973         Initialize the version member to 0 for all events.
16974         
16975         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
16976         (initializeEvent):
16977         (WebNetscapePluginEventHandlerCocoa::drawRect):
16978         (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
16979         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
16980         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
16981         (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
16982         (WebNetscapePluginEventHandlerCocoa::focusChanged):
16983
16984 2008-05-29  Dan Bernstein  <mitz@apple.com>
16985
16986         Reviewed by Jessica Kahn.
16987
16988         - fix <rdar://problem/5965013> Page 2 does not print correctly
16989
16990         When printing, _recursiveDisplayRectIfNeededIgnoringOpacity:... and
16991         _recursiveDisplayAllDirtyWithLockFocus:... can be invoked without
16992         -viewWillDraw being sent first, which could lead to painting without
16993         valid layout. The fix is to ensure up-to-date layout in those methods
16994         when printing.
16995
16996         * WebView/WebHTMLView.mm:
16997         (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
16998         (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
16999
17000 2008-05-28  Anders Carlsson  <andersca@apple.com>
17001
17002         Reviewed by Jon.
17003
17004         Remove workaround, this is no longer a problem.
17005         
17006         * WebView/WebView.mm:
17007         (-[WebView _removeObjectForIdentifier:]):
17008
17009 2008-05-27  Geoffrey Garen  <ggaren@apple.com>
17010
17011         Reviewed by Tim Hatcher.
17012         
17013         Fixed https://bugs.webkit.org/show_bug.cgi?id=19183
17014         REGRESSION (r33979): Crash in DebuggerCallFrame::functionName when
17015         clicking button in returnEvent-crash.html
17016         
17017         Added implementations for willExecuteProgram and didExecuteProgram, which
17018         take care of making sure we're not hanging on to stale data.
17019
17020 2008-05-27  Timothy Hatcher  <timothy@apple.com>
17021
17022         Fixes a bug where unplugging the monitor from a video card and
17023         moving it to another video card would no longer show OpenGL plugins
17024         until you relaunched Safari.
17025
17026         <rdar://problem/5790983> Add AllowOfflineDisplays pixel format
17027         attribute to OpenGL contexts
17028
17029         Reviewed by Kevin Decker.
17030
17031         * Plugins/WebBaseNetscapePluginView.mm:
17032         (-[WebBaseNetscapePluginView _createWindowedAGLContext]): Added
17033         AGL_ALLOW_OFFLINE_RENDERERS for non-Tiger builds.
17034         (-[WebBaseNetscapePluginView _createWindowlessAGLContext]): Ditto.
17035
17036 2008-05-25  Mark Rowe  <mrowe@apple.com>
17037
17038         Reviewed by Darin Adler.
17039
17040         <rdar://problem/5840884> _recursive_resumeNullEventsForAllNetscapePlugins and _pauseNullEvents not defined
17041
17042         Follow-up for r33052.  _recursive_resumeNullEventsForAllNetscapePlugins and _recursive_pauseNullEventsForAllNetscapePlugins
17043         need to be declared in WebFramePrivate.h rather than WebFrameInternal.h so they can be used from outside of WebKit.
17044
17045         * WebView/WebFrame.mm:
17046         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
17047         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
17048         * WebView/WebFrameInternal.h:
17049         * WebView/WebFramePrivate.h:
17050
17051 2008-05-23  Timothy Hatcher  <timothy@apple.com>
17052
17053         Fix attaching and detaching the Web Inspector. This change removes
17054         the clunky animation that never looked right and was causing issues
17055         where the inspected WebView would get into a no useable state.
17056
17057         <rdar://problem/5958812> Attaching and Detaching the Web Inspector
17058         can cause the inspected WebVIew to be unusable
17059
17060         Reviewed by Adam Roben.
17061
17062         * WebCoreSupport/WebInspectorClient.mm:
17063         (-[WebInspectorWindowController close]): Removes animation code.
17064         Sets the frame directly and does a displayIfNeeded to prevent
17065         showing the Inspector in the page and in the Inspector window.
17066         (-[WebInspectorWindowController showWindow:]): Removes animation code.
17067         Sets the frame directly.
17068         (-[WebInspectorWindowController attach]): Simplified.
17069         (-[WebInspectorWindowController detach]): Ditto.
17070
17071 2008-05-22  Dan Bernstein  <mitz@apple.com>
17072
17073         Reviewed by Darin Adler.
17074
17075         - fix broken documentation of
17076           webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:
17077
17078         * WebView/WebUIDelegate.h: Fixed method name in HeaderDoc for
17079         -webView:runBeforeUnloadConfirmPanelWithMessage:initiatedByFrame:
17080
17081 2008-05-22  Timothy Hatcher  <timothy@apple.com>
17082
17083         <rdar://problem/5956403> Update the Develop menu to match the new Inspector items
17084
17085         Reviewed by Adam Roben.
17086
17087         * WebCoreSupport/WebInspectorClient.mm:
17088         (-[WebInspectorWindowController showWebInspector:]):
17089         (-[WebInspectorWindowController showErrorConsole:]):
17090         (-[WebInspectorWindowController toggleDebuggingJavaScript:]):
17091         (-[WebInspectorWindowController toggleProfilingJavaScript:]):
17092         (-[WebInspectorWindowController validateUserInterfaceItem:]):
17093         * WebInspector/WebInspector.h:
17094         * WebInspector/WebInspector.mm:
17095         (-[WebInspector showConsole:]):
17096         (-[WebInspector showTimeline:]):
17097         (-[WebInspector isDebuggingJavaScript]):
17098         (-[WebInspector toggleDebuggingJavaScript:]):
17099         (-[WebInspector startDebuggingJavaScript:]):
17100         (-[WebInspector stopDebuggingJavaScript:]):
17101         (-[WebInspector isProfilingJavaScript]):
17102         (-[WebInspector toggleProfilingJavaScript:]):
17103         (-[WebInspector startProfilingJavaScript:]):
17104         (-[WebInspector stopProfilingJavaScript:]):
17105
17106 2008-05-22  Josh Aas  <joshmoz@gmail.com>
17107
17108         Reviewed by Anders.
17109
17110         <rdar://problem/5956429> 
17111         https://bugs.webkit.org/show_bug.cgi?id=19192
17112         remove NPNVpluginEventModel, fix example plugin
17113         
17114         * Plugins/WebBaseNetscapePluginView.mm:
17115         (-[WebBaseNetscapePluginView getVariable:value:]):
17116
17117 2008-05-21  Anders Carlsson  <andersca@apple.com>
17118
17119         Reviewed by Maciej.
17120
17121         Add WebIconFetcher.
17122         
17123         * Misc/WebIconFetcher.h: Added.
17124         * Misc/WebIconFetcher.mm: Added.
17125         (WebIconFetcherClient::WebIconFetcherClient):
17126         (WebIconFetcherClient::finishedFetchingIcon):
17127         (WebIconFetcherClient::setFetcher):
17128         (-[WebIconFetcher init]):
17129         (-[WebIconFetcher dealloc]):
17130         (-[WebIconFetcher finalize]):
17131         (-[WebIconFetcher cancel]):
17132         (-[WebIconFetcher _initWithIconFetcher:client:]):
17133         (+[WebIconFetcher _fetchApplicationIconForFrame:target:selector:]):
17134         * Misc/WebIconFetcherInternal.h: Added.
17135         * WebView/WebFrame.mm:
17136         (-[WebFrame fetchApplicationIcon:selector:]):
17137         * WebView/WebFramePrivate.h:
17138
17139 === End merge of squirrelfish ===
17140
17141 2008-05-21  Geoffrey Garen  <ggaren@apple.com>
17142
17143         Reviewed by Tim Hatcher.
17144         
17145         Updated for API changes from merging with trunk WebCore's new debugger.
17146
17147         * WebView/WebScriptDebugDelegate.mm:
17148         (-[WebScriptCallFrame evaluateWebScript:]): Explicitly check for an
17149         exception return, since the DebuggerCallFrame no longer automatically
17150         substitutes the exception for the return value.
17151
17152         * WebView/WebScriptDebugger.mm: Use the dynamic global object, not the
17153         lexical global object, since the debugger attaches based on dynamic
17154         global object.
17155
17156 2008-05-17  Geoffrey Garen  <ggaren@apple.com>
17157
17158         Reviewed by Oliver Hunt.
17159         
17160         Re-enabled previously disabled debugging functionality.
17161         
17162         There are two major changes from how the WebKit debugger used to work:
17163         
17164         (1) All the interesting bits are implemented down in JavaScriptCore. The
17165         debugger just calls through to KJS::DebuggerCallFrame for everything.
17166         
17167         (2) Instead of copyihng a pointer to an ExecState once, the debugger
17168         copies the DebuggerCallFrame passed to it in each callback. This is
17169         because the VM no longer maintains a fully transparent execution state
17170         to which you can hold a pointer, and the DebuggerCallFrames it vends
17171         are temporaries.
17172         
17173         Also, we NULL out a WebScriptCallFrame's DebuggerCallFrame upon return
17174         from its function. This is safer than the old method, which was to
17175         hold a stale ExecState* and hope for the best.
17176
17177 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
17178
17179         Reviewed by Oliver Hunt.
17180
17181         Updated for API changes in KJS::Debugger.
17182
17183         * WebView/WebFrame.mm:
17184         (-[WebFrame _attachScriptDebugger]): Changed the order of operations to
17185         fix an ASSERT that can happen when re-entering _attachScriptDebugger.
17186
17187 2008-05-13  Geoffrey Garen  <ggaren@apple.com>
17188
17189         Reviewed by Oliver Hunt.
17190         
17191         Updated WebScriptDebugger API to accept a SourceProvider instead
17192         of a WebCore::String, to avoid copying.
17193
17194         (WebScriptDebugger::sourceParsed): Updated this function not to return
17195         a value.
17196
17197 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
17198
17199         Build fix: #ifdef'd out some code that doesn't work anymore.
17200
17201 2008-04-30  Geoffrey Garen  <ggaren@apple.com>
17202
17203         Reviewed by Oliver Hunt.
17204         
17205         #ifdef'd out some debugger code that doesn't work anymore.
17206
17207         * WebView/WebScriptDebugDelegate.mm:
17208         (-[WebScriptCallFrame scopeChain]):
17209
17210 2008-04-21  Geoffrey Garen  <ggaren@apple.com>
17211
17212         Build fix.
17213
17214         * ChangeLog:
17215         * WebView/WebScriptDebugDelegate.mm:
17216         (-[WebScriptCallFrame scopeChain]):
17217
17218 2008-03-30  Geoffrey Garen  <ggaren@apple.com>
17219
17220         Reviewed by Oliver Hunt.
17221         
17222         Build fix.
17223
17224 === Start merge of squirrelfish ===
17225
17226 2008-05-21  Darin Adler  <darin@apple.com>
17227
17228         - fix build
17229
17230         * WebView/WebViewPrivate.h: Remove declaration of closeWithFastTeardown. We can add it back later
17231         if we want, but if we do, we should probably make some refinements like checking _private->closed
17232         and applicationIsTerminating.
17233
17234 2008-05-21  Darin Adler  <darin@apple.com>
17235
17236         Reviewed by Anders and Kevin Decker.
17237
17238         - fix <rdar://problem/5951130> REGRESSION: crash on quit after reopening windows from previous session
17239
17240         * WebView/WebView.mm:
17241         (-[WebViewPrivate dealloc]): Fix assertions to not complain when fast teardown is used.
17242         (-[WebView _closePluginDatabases]): Factored out some common code from both versions of close.
17243         (-[WebView _closeWithFastTeardown]): Added an underscore to this method's name, since it's internal.
17244         Streamlined the code a bit. Added a line of code to set _private->closed (this is the bug fix).
17245         (-[WebView _close]): Changed for new method name and to use _closePluginDatabases.
17246
17247 2008-05-19  Stephanie Lewis  <slewis@apple.com>
17248
17249         Reviewed by Darin Adler.
17250     
17251         more fast teardown performance work
17252
17253         * Misc/WebDownload.m:
17254         (-[WebDownloadInternal downloadDidBegin:]):
17255         (-[WebDownloadInternal downloadDidFinish:]):
17256         (-[WebDownloadInternal download:didFailWithError:]):
17257         * WebCoreSupport/WebChromeClient.h:
17258         * WebCoreSupport/WebChromeClient.mm:
17259         (WebChromeClient::disableSuddenTermination):
17260         (WebChromeClient::enableSuddenTermination):
17261
17262 2008-05-18  Dan Bernstein  <mitz@apple.com>
17263
17264         Reviewed by Sam Weinig.
17265
17266         - fix <rdar://problem/5944596> IDNs are displayed as punycode in the authentication panel
17267
17268         * Panels/WebAuthenticationPanel.m:
17269         (-[WebAuthenticationPanel setUpForChallenge:]):
17270
17271 2008-05-16  Timothy Hatcher  <timothy@apple.com>
17272
17273         Removes WebScriptDebugServer files and related calls. This removes
17274         the hooks that Drosera uses for debugging. Now that the Web Inspector
17275         has a better debugger, we don't need these anymore.
17276
17277         Reviewed by Sam Weinig.
17278
17279         * DefaultDelegates/WebScriptDebugServer.h: Removed.
17280         * DefaultDelegates/WebScriptDebugServer.m: Removed.
17281         * DefaultDelegates/WebScriptDebugServerPrivate.h: Removed.
17282         * WebCoreSupport/WebFrameLoaderClient.mm:
17283         * WebKit.exp:
17284         * WebView/WebScriptDebugDelegate.mm:
17285         * WebView/WebScriptDebugger.mm:
17286         (WebScriptDebugger::sourceParsed):
17287         (WebScriptDebugger::callEvent):
17288         (WebScriptDebugger::atStatement):
17289         (WebScriptDebugger::returnEvent):
17290         (WebScriptDebugger::exception):
17291         * WebView/WebView.mm:
17292         (-[WebView _commonInitializationWithFrameName:groupName:]):
17293         * WebView/WebViewPrivate.h:
17294
17295 2008-05-16  Brady Eidson  <beidson@apple.com>
17296
17297         Reviewed by Anders
17298
17299         <rdar://problem/5942616> - Need to standardize LocalStorage persistence path
17300
17301         Took the opportunity to touch up another pref that needs the same standardization.
17302         That pref is currently not in use on Mac.
17303
17304         * WebView/WebPreferences.m:
17305         (-[WebPreferences _setFTPDirectoryTemplatePath:]):
17306         (-[WebPreferences _localStorageDatabasePath]):
17307         (-[WebPreferences _setLocalStorageDatabasePath:]):
17308         (-[WebPreferences _ftpDirectoryTemplatePath]):
17309
17310 2008-05-16  Chris Fleizach  <cfleizach@apple.com>
17311
17312         Reviewed by Alice Liu
17313
17314         <rdar://problem/5710317> REGRESSION:Selecting ranges of text should be possible using the keyboard (15310)
17315
17316         * WebView/WebFrame.mm:
17317         (-[WebFrame _accessibilityTree]):
17318
17319 2008-05-15  Stephanie Lewis  <slewis@apple.com>
17320         
17321         fix mac build
17322
17323         * WebView/WebView.mm:
17324         (-[WebView closeWithFastTeardown]):
17325
17326 2008-05-15  Stephanie Lewis  <slewis@apple.com>
17327
17328         Reviewed by Anders.
17329
17330         Turn on fast teardown.  I added a preference for using full teardown because 
17331         the LEAKS output will be useless without a full teardown.  
17332
17333         preference for fullteardown
17334         * WebView/WebPreferenceKeysPrivate.h:
17335         * WebView/WebPreferences.m:
17336         (-[WebPreferences setFullDocumentTeardownEnabled:]):
17337         (-[WebPreferences fullDocumentTeardownEnabled]):
17338         * WebView/WebPreferencesPrivate.h:
17339         
17340         on application quit dispatch unload events and destroy plugins then exit
17341         * WebView/WebView.mm:
17342         (-[WebView closeWithFastTeardown]):
17343         (-[WebView _close]):
17344         * WebView/WebViewPrivate.h:
17345
17346 2008-05-15  Stephanie Lewis  <slewis@apple.com>
17347
17348         Reviewed by Anders.
17349
17350         get the pending frame unload count from WebCore
17351
17352         * WebView/WebFrame.mm:
17353         (-[WebFrame _pendingFrameUnloadEventCount]):
17354         * WebView/WebFramePrivate.h:
17355
17356 2008-05-15  John Sullivan  <sullivan@apple.com>
17357
17358         Reviewed by Kevin Decker
17359         
17360         - fixed <rdar://problem/5940275> Inspector highlighting moves to bottom-left corner of 
17361           screen when new tab appears
17362           
17363         The highlight should go away entirely, but this simple patch just makes it not jump away.
17364         The issue with it not going away entirely is harder to fix and covered by <rdar://problem/5322306>
17365
17366         * WebInspector/WebNodeHighlight.m:
17367         (-[WebNodeHighlight _repositionHighlightWindow]):
17368         Bail out if target view isn't in a window
17369
17370 2008-05-15  Stephanie Lewis  <slewis@apple.com>
17371
17372         Reviewed by Anders.
17373
17374         Track views that contain plugin instances so that they can be destroyed at application
17375         quit without walking the entire document tree.
17376
17377         Add/Remove Netscape plugin views from instance list.  Start/stop are when netscape
17378         plugins are created and destroyed
17379         * Plugins/WebBaseNetscapePluginView.mm:
17380         (-[WebBaseNetscapePluginView start]):
17381         (-[WebBaseNetscapePluginView stop]):
17382  
17383         Add/remove WebKit plugin views from instance list
17384         * Plugins/WebPluginController.mm:
17385         (-[WebPluginController addPlugin:]):
17386         (-[WebPluginController destroyPlugin:]):
17387         (-[WebPluginController destroyAllPlugins]):
17388
17389         Add a set of views with plugin instances to the WebPluginDatabase
17390         * Plugins/WebPluginDatabase.h:
17391         * Plugins/WebPluginDatabase.mm:
17392         (-[WebPluginDatabase init]):
17393         (-[WebPluginDatabase dealloc]):
17394         (-[WebPluginDatabase addPluginInstanceView:]):
17395         (-[WebPluginDatabase removePluginInstanceView:]):
17396         (-[WebPluginDatabase removePluginInstanceViewsFor:]):
17397         (-[WebPluginDatabase destroyAllPluginInstanceViews]):
17398         
17399         Handle cases where plugin views are detached before the plugin is destroyed.
17400         * WebCoreSupport/WebFrameLoaderClient.mm:
17401         (WebFrameLoaderClient::detachedFromParent2):
17402         (WebFrameLoaderClient::transitionToCommittedFromCachedPage):
17403         (WebFrameLoaderClient::transitionToCommittedForNewPage):
17404
17405         Add plugin instances to the set in the WebPluginDatabase by way of the WebView
17406         * WebView/WebHTMLView.mm:
17407         (-[WebHTMLView _destroyAllWebPlugins]):
17408         * WebView/WebHTMLViewInternal.h:
17409         * WebView/WebView.mm:
17410         (-[WebView addPluginInstanceView:]):
17411         (-[WebView removePluginInstanceView:]):
17412         (-[WebView removePluginInstanceViewsFor:]):
17413         * WebView/WebViewInternal.h:
17414
17415 2008-05-15  Brady Eidson  <beidson@apple.com>
17416
17417         Reviewed by Tim Hatcher
17418
17419         Until the settings/preferences equation can be reworked, we'll need to manually set the local storage path
17420         before setting the page group of the new page.
17421         
17422         * WebView/WebView.mm:
17423         (-[WebView _commonInitializationWithFrameName:groupName:]): Set the LocalStorage path 
17424           immediately after creating the page so it is in place for initializing the LocalStorageThread
17425
17426 2008-05-15  Timothy Hatcher  <timothy@apple.com>
17427
17428         Fixes the bug where the Web Inspector would flash white while resizing.
17429         This was cause by deferring the window creation.
17430
17431         <rdar://problem/5873549> REGRESSION: Inspector flickers horribly while resizing (17979)
17432
17433         Reviewed by Darin Adler.
17434
17435         * WebCoreSupport/WebInspectorClient.mm:
17436         (-[WebInspectorWindowController window]): Don't defer the window creation.
17437
17438 2008-05-15  Alexey Proskuryakov  <ap@webkit.org>
17439
17440         Tiger build fix.
17441
17442         * Misc/WebNSAttributedStringExtras.mm: Import WebTypesInternal.h for NSUInteger.
17443
17444 2008-05-15  Adele Peterson  <adele@apple.com>
17445
17446         Reviewed and landed by Alexey.
17447
17448         Use TextIterator in +[NSAttributedString _web_attributedStringFromRange:].
17449
17450         * Misc/WebNSAttributedStringExtras.mm:
17451         (+[NSAttributedString _web_attributedStringFromRange:]):
17452
17453 2008-05-14  Eric Seidel  <eric@webkit.org>
17454
17455         Reviewed by Oliver.
17456
17457         Add missing NULL check to match rest of file, this was found by the editing fuzzer.
17458
17459         * WebView/WebResource.mm:
17460         (-[WebResource data]):
17461
17462 2008-05-14  Alexey Proskuryakov  <ap@webkit.org>
17463
17464         Reviewed by Dan Bernstein.
17465
17466         NPP_ValidAttributesForMarkedText should return NSArray*, not NSArray.
17467
17468         * Plugins/nptextinput.h:
17469
17470 2008-05-13  Anders Carlsson  <andersca@apple.com>
17471
17472         Reviewed by Sam.
17473
17474         Don't empty the application cache in _setCacheModel, since it will be called during initialization.
17475         Instead, do it in [WebCache empty].
17476         
17477         * Misc/WebCache.mm:
17478         (+[WebCache empty]):
17479         * WebView/WebView.mm:
17480         (+[WebView _setCacheModel:]):
17481
17482 2008-05-13  chris fleizach  <cfleizach@apple.com>
17483
17484         Reviewed by Beth Dakin
17485
17486         <rdar://problem/4780592> WebKit application has its window announced as HTML content
17487
17488         * WebCoreSupport/WebViewFactory.mm:
17489         (-[WebViewFactory AXWebAreaText]):
17490
17491 2008-05-13  Timothy Hatcher  <timothy@apple.com>
17492
17493         Fixes a crash seen in Xcode where CallUIDelegateReturningBoolean
17494         was referencing a nil WebView under validateUserInterfaceItem.
17495         The validateUserInterfaceItem methods was being called at a time
17496         when the WebHTMLView is being torndown.
17497
17498         <rdar://problem/5806229> A crash occurs at CallUIDelegateReturningBoolean()
17499         while mousing down on menu bar after Xcode News window is opened
17500
17501         Reviewed by Ada Chan.
17502
17503         * WebView/WebHTMLView.mm:
17504         (-[WebHTMLView validateUserInterfaceItem:]): NULL check the WebView and
17505         return NO when it is nil. Adds a comment.
17506         * WebView/WebPDFView.mm:
17507         (-[WebPDFView validateUserInterfaceItem:]): Ditto.
17508
17509 2008-05-13  Mark Rowe  <mrowe@apple.com>
17510
17511         Reviewed by John Sullivan.
17512
17513         <rdar://problem/5926425> HIWebViewCreateWithClass declared as API in HIWebView.h but never exported from WebKit.framework
17514
17515         * Carbon/HIWebView.h: Remove HIWebViewCreateWithClass.
17516         * Carbon/HIWebView.m: Ditto.
17517         (HIWebViewCreate):
17518         (HIWebViewConstructor):
17519
17520 2008-05-12  Dan Bernstein  <mitz@apple.com>
17521
17522         Reviewed by Ada Chan.
17523
17524         - WebKit/mac changes for https://bugs.webkit.org/show_bug.cgi?id=17097
17525           <rdar://problem/5715471> CGFontRefs (and HFONTs on Windows) leak because FontCache grows without bound
17526
17527         Added font cache statistics and a function to purge inactive font data.
17528
17529         * Misc/WebCoreStatistics.h:
17530         * Misc/WebCoreStatistics.mm:
17531         (+[WebCoreStatistics cachedFontDataCount]):
17532         (+[WebCoreStatistics cachedFontDataInactiveCount]):
17533         (+[WebCoreStatistics purgeInactiveFontData]):
17534         (+[WebCoreStatistics glyphPageCount]):
17535
17536 2008-05-12  Mark Rowe  <mrowe@apple.com>
17537
17538         Reviewed by Tim Hatcher.
17539
17540         Decorate some deprecated delegate methods with the availability macros.
17541
17542         The compiler doesn't appear to warn if a delegate implements these methods, but using the availability
17543         macros is good for consistency and documentation.
17544
17545         * WebView/WebFrameLoadDelegate.h:
17546         * WebView/WebUIDelegate.h:
17547
17548 2008-05-12  Mark Rowe  <mrowe@apple.com>
17549
17550         Reviewed by Tim Hatcher.
17551
17552         <rdar://problem/5835604> Deprecate HIWebView
17553
17554         Use of HIWebView is deprecated in favor of embedding a WebView in a HICocoaView.
17555
17556         * Carbon/CarbonUtils.h: Include the availability macro header and decorate the functions appropriately.
17557         * Carbon/HIWebView.h: Ditto.
17558
17559 2008-05-12  Kevin Decker  <kdecker@apple.com>
17560
17561         Reviewed by Anders.
17562
17563         Fixed: <rdar://problem/5840884>_recursive_resumeNullEventsForAllNetscapePlugins and _pauseNullEvents not defined
17564         
17565         Re-added these SPI methods because they are needed by some clients. They were accidentally removed
17566         in changeset <http://trac.webkit.org/changeset/31028>
17567         
17568         * Plugins/WebBaseNetscapePluginView.h: Added stopTimers, restartTimers to the header.
17569         * WebView/WebFrame.mm:
17570         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]): Re-addd.
17571         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]): Ditto.
17572         * WebView/WebFrameInternal.h: Ditto.
17573         * WebView/WebHTMLView.mm: Ditto.
17574         (-[WebHTMLView _pauseNullEventsForAllNetscapePlugins]): Ditto.
17575         (-[WebHTMLView _resumeNullEventsForAllNetscapePlugins]): Ditto.
17576         * WebView/WebHTMLViewInternal.h: Ditto.
17577         * WebView/WebHTMLViewPrivate.h: Ditto.
17578
17579 2008-05-12  Anders Carlsson  <andersca@apple.com>
17580
17581         Reviewed by Alexey.
17582
17583         Empty the application cache when changing the cache model.
17584         
17585         * WebView/WebView.mm:
17586         (+[WebView _setCacheModel:]):
17587
17588 2008-05-12  Anders Carlsson  <andersca@apple.com>
17589
17590         Reviewed by Oliver.
17591
17592         <rdar://problem/5774495> Make Unicode text input possible in Netscape-style plug-ins
17593         
17594         * Plugins/WebBaseNetscapePluginView.h:
17595         * Plugins/WebBaseNetscapePluginView.mm:
17596         (-[WebBaseNetscapePluginView start]):
17597         Get the plug-in text input vtable pointer.
17598         
17599         (-[WebBaseNetscapePluginView stop]):
17600         Set the plug-in text input vtable pointer to 0.
17601         
17602         (-[WebBaseNetscapePluginView inputContext]):
17603         Return 0 for Carbon plug-ins since we don't want Cocoa to handle text input for them.
17604         
17605         (-[WebBaseNetscapePluginView hasMarkedText]):        
17606         (-[WebBaseNetscapePluginView insertText:]):
17607         (-[WebBaseNetscapePluginView markedRange]):
17608         (-[WebBaseNetscapePluginView selectedRange]):
17609         (-[WebBaseNetscapePluginView setMarkedText:selectedRange:]):
17610         (-[WebBaseNetscapePluginView unmarkText]):
17611         (-[WebBaseNetscapePluginView validAttributesForMarkedText]):
17612         (-[WebBaseNetscapePluginView attributedSubstringFromRange:]):
17613         (-[WebBaseNetscapePluginView characterIndexForPoint:]):
17614         (-[WebBaseNetscapePluginView doCommandBySelector:]):
17615         (-[WebBaseNetscapePluginView firstRectForCharacterRange:]):
17616         (-[WebBaseNetscapePluginView conversationIdentifier]):
17617         Implement NSTextInput and call into the plug-in text input vtable.
17618         
17619         (browserTextInputFuncs):
17620         New method which returns the browser input vtable.
17621         
17622         (-[WebBaseNetscapePluginView getVariable:value:]):
17623         Support getting the browser input vtable pointer.
17624         
17625         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
17626         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
17627         (WebNetscapePluginEventHandlerCocoa::keyDown):
17628         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
17629         If the plug-in returns 0 when a NPCocoaEventKeyDown is passed to NPP_HandleEvent,
17630         it means that the event should be passed on to the input manager.
17631          
17632         * Plugins/npapi.mm:
17633         (NPN_MarkedTextAbandoned):
17634         (NPN_MarkedTextSelectionChanged):
17635         Add implementations of browser input method methods.
17636         
17637         * Plugins/nptextinput.h: Added.
17638         Add file with new text input API.
17639
17640 2008-05-12  Alexey Proskuryakov  <ap@webkit.org>
17641
17642         Roll out recent  threading changes (r32807, r32810, r32819, r32822) to simplify
17643         SquirrelFish merging.
17644
17645         * Misc/WebCoreStatistics.mm:
17646         (+[WebCoreStatistics javaScriptObjectsCount]):
17647         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
17648         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
17649         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
17650         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
17651         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
17652         * WebView/WebScriptDebugDelegate.mm:
17653         (-[WebScriptCallFrame evaluateWebScript:]):
17654
17655 2008-05-07  Anders Carlsson  <andersca@apple.com>
17656
17657         Reviewed by Mitz.
17658
17659         REGRESSION (3.1.1-TOT): Arrow keys are sticky in Google Maps street view
17660         https://bugs.webkit.org/show_bug.cgi?id=18880
17661         <rdar://problem/5909513>
17662
17663         Stop suspending key up events before calling handleEvent.
17664         
17665         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
17666         (WebNetscapePluginEventHandlerCarbon::sendEvent):
17667
17668 2008-05-06  Stephanie Lewis  <slewis@apple.com>
17669
17670         Reviewed by Andersca.
17671
17672         prepare for plugin fast teardown work - make WebPluginDatabase a objective C++ file.
17673
17674         * Plugins/WebPluginDatabase.m: Removed.
17675         * Plugins/WebPluginDatabase.mm: Copied from WebKit/mac/Plugins/WebPluginDatabase.m.
17676         * Plugins/npapi.m: Removed.
17677         * Plugins/npapi.mm: Copied from WebKit/mac/Plugins/npapi.m.
17678
17679 2008-05-06  Anders Carlsson  <andersca@apple.com>
17680
17681         Reviewed by Darin Adler.
17682
17683         Initialize numArchs to 0.
17684         
17685         * Plugins/WebBasePluginPackage.m:
17686         (-[WebBasePluginPackage isNativeLibraryData:]):
17687
17688 2008-05-06  Anders Carlsson  <andersca@apple.com>
17689
17690         Reviewed by Darin Adler.
17691
17692         Add implementation of NPN_PopUpContextMenu.
17693         
17694         * Plugins/WebBaseNetscapePluginView.mm:
17695         (-[WebBaseNetscapePluginView popUpContextMenu:]):
17696         * Plugins/WebBaseNetscapePluginViewPrivate.h:
17697         * Plugins/WebNetscapePluginPackage.m:
17698         (-[WebNetscapePluginPackage load]):
17699         * Plugins/npapi.m:
17700         (NPN_PopUpContextMenu):
17701
17702 2008-05-06  Anders Carlsson  <andersca@apple.com>
17703
17704         Fix typo (don't read random memory).
17705         
17706         * Plugins/WebBasePluginPackage.m:
17707         (-[WebBasePluginPackage isNativeLibraryData:]):
17708
17709 2008-05-05  Anders Carlsson  <andersca@apple.com>
17710
17711         Reviewed by Darin Adler.
17712
17713         Change the isNativeLibraryData: method to handle universal binaries.
17714         
17715         * Plugins/WebBasePluginPackage.m:
17716         (swapIntsInHeader):
17717         (-[WebBasePluginPackage isNativeLibraryData:]):
17718
17719 2008-05-06  Brady Eidson  <beidson@apple.com>
17720
17721         Reviewed by Darin Adler
17722
17723         Preparation for upcoming work making LocalStorage persistent.
17724
17725         When the application terminates, all LocalStorage areas must be sync'ed out to disk first.
17726
17727         * WebView/WebView.mm:
17728         (+[WebView _applicationWillTerminate]):  Close all LocalStorage areas before quitting.
17729
17730 2008-05-05  Sam Weinig  <sam@webkit.org>
17731
17732         Reviewed by Darin Adler.
17733
17734         Fix for <rdar://problem/5884383>
17735         Escape look-a-like characters from the the entire url.
17736
17737         * Misc/WebNSURLExtras.mm:
17738         (escapeUnsafeCharacters):
17739         (-[NSURL _web_userVisibleString]):
17740
17741 2008-05-05  Justin Garcia  <justin.garcia@apple.com>
17742
17743         Reviewed by Darin Adler.
17744         
17745         <rdar://problem/5865171> REGRESSION: Creating a new quote places caret at beginning of quote instead of the end
17746
17747         * WebView/WebView.mm:
17748         (-[WebView _updateSettingsFromPreferences:]): Disable Range mutation on changes to
17749         the document for Tiger and Leopard Mail.  There is code in Mail that does it, and
17750         the two interfere.
17751
17752 2008-05-05  Sam Weinig  <sam@webkit.org>
17753
17754         Reviewed by Tim Hatcher.
17755
17756         Make the Inspector's localizable strings file match the format used by Dashboard widgets.
17757
17758         * WebCoreSupport/WebInspectorClient.mm:
17759         (WebInspectorClient::localizedStringsURL):
17760
17761 2008-05-05  Anders Carlsson  <andersca@apple.com>
17762
17763         Reviewed by Jess.
17764
17765         Apparently preflighting can cause hangs for some reason. Revert this for now.
17766         
17767         * Plugins/WebNetscapePluginPackage.m:
17768         (-[WebNetscapePluginPackage _initWithPath:]):
17769         * Plugins/WebPluginPackage.m:
17770         (-[WebPluginPackage initWithPath:]):
17771
17772 2008-05-05  Darin Adler  <darin@apple.com>
17773
17774         Reviewed by Mitz.
17775
17776         - https://bugs.webkit.org/show_bug.cgi?id=18789
17777           fix some shouldCloseWithWindow edge cases
17778
17779         * WebView/WebView.mm:
17780         (-[WebView viewWillMoveToWindow:]): Fix bug where we would stop observing the
17781         NSWindowWillCloseNotification if the view was moved out of the window but still
17782         had that window set as the host window. Also make sure this function doesn't do
17783         anything if the WebView is already closed.
17784         (-[WebView setHostWindow:]): Ditto.
17785
17786 2008-05-04  David Kilzer  <ddkilzer@apple.com>
17787
17788         Make parameters match for WebChromeClient::addMessageToConsole()
17789
17790         Reviewed by John.
17791
17792         * WebCoreSupport/WebChromeClient.h:
17793         (WebChromeClient::addMessageToConsole): Renamed sourceID parameter
17794         to sourceURL to match implementation in WebChromeClient.mm.
17795
17796 2008-05-02  Anders Carlsson  <andersca@apple.com>
17797
17798         Reviewed by Mark.
17799
17800         Various Cocoa event model and 64-bit plug-in fixes.
17801         
17802         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
17803         (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
17804         Set click count.
17805         
17806         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
17807         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
17808         Don't try to get the mouse location for keyboard events.
17809         
17810         * Plugins/WebPluginPackage.m:
17811         (-[WebPluginPackage initWithPath:]):
17812         Preflight the bundle so we won't show 32-bit WebKit plug-ins when running as 64-bit.
17813
17814 2008-05-02  Anders Carlsson  <andersca@apple.com>
17815
17816         Reviewed by Sam.
17817
17818         The event union is now named.
17819         
17820         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
17821         (WebNetscapePluginEventHandlerCocoa::drawRect):
17822         (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
17823         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
17824         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
17825         (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
17826         (WebNetscapePluginEventHandlerCocoa::focusChanged):
17827
17828 2008-05-02  Anders Carlsson  <andersca@apple.com>
17829
17830         Reviewed by Mark.
17831
17832         Make sure that 32-bit only plug-ins aren't shown when running as 64-bit.
17833         
17834         Call preflightAndReturnError on the bundle, which will check if any of the architectures
17835         in the bundle match the current architecture.
17836         
17837         * Plugins/WebNetscapePluginPackage.m:
17838         (-[WebNetscapePluginPackage _initWithPath:]):
17839
17840 2008-05-02  Alexey Proskuryakov  <ap@webkit.org>
17841
17842         Reviewed by Geoffrey Garen.
17843
17844         https://bugs.webkit.org/show_bug.cgi?id=18826
17845         Make JavaScript heap per-thread
17846
17847         * Misc/WebCoreStatistics.mm:
17848         (+[WebCoreStatistics javaScriptObjectsCount]):
17849         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
17850         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
17851         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
17852         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
17853         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
17854         Replaced static Collector calls with calls to a current thread's instance.
17855
17856         * WebView/WebScriptDebugDelegate.mm:
17857         (-[WebScriptCallFrame evaluateWebScript:]):
17858         Pass ExecState to jsString().
17859
17860 2008-05-01  Anders Carlsson  <andersca@apple.com>
17861
17862         Reviewed by Mark.
17863
17864         64-bit NPAPI plugin build fixes.
17865         
17866         * Plugins/WebBaseNetscapePluginView.mm:
17867         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
17868         (-[WebBaseNetscapePluginView updateAndSetWindow]):
17869         (-[WebBaseNetscapePluginView start]):
17870         (-[WebBaseNetscapePluginView windowBecameKey:]):
17871         * Plugins/WebNetscapeDeprecatedFunctions.c:
17872         * Plugins/WebNetscapeDeprecatedFunctions.h:
17873         * Plugins/WebNetscapePluginEventHandler.mm:
17874         (WebNetscapePluginEventHandler::create):
17875         * Plugins/WebNetscapePluginEventHandlerCarbon.h:
17876         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
17877         * Plugins/WebPluginDatabase.m:
17878         (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
17879
17880 2008-05-01  Anders Carlsson  <andersca@apple.com>
17881
17882         Reviewed by Tim.
17883
17884         Remove duplicate npfunctions.h header from WebKit.
17885
17886         * MigrateHeaders.make:
17887         Migrate npfunctions.h
17888         
17889         * Plugins/npfunctions.h: Removed.
17890
17891 2008-05-01  Anders Carlsson  <andersca@apple.com>
17892
17893         Reviewed by John.
17894         
17895         Add null checks for the event handler.
17896         
17897         * Plugins/WebBaseNetscapePluginView.mm:
17898         (-[WebBaseNetscapePluginView stopTimers]):
17899         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
17900
17901 2008-05-01  Anders Carlsson  <andersca@apple.com>
17902
17903         Fix 64-bit build.
17904         
17905         * Plugins/WebNetscapePluginEventHandlerCocoa.h:
17906         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
17907         * WebCoreSupport/WebFrameLoaderClient.mm:
17908
17909 2008-05-01  Anders Carlsson  <andersca@apple.com>
17910
17911         Fix build.
17912         
17913         * Plugins/npfunctions.h:
17914
17915 2008-05-01  Anders Carlsson  <andersca@apple.com>
17916
17917         Reviewed by Adam.
17918
17919         Forward mouse move events to the Netscape plug-in view.
17920         
17921         * Plugins/WebBaseNetscapePluginView.h:
17922         * Plugins/WebBaseNetscapePluginView.mm:
17923         (-[WebBaseNetscapePluginView handleMouseMoved:]):
17924         New method that just calls the current event handler.
17925         
17926         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
17927         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
17928         NSFlagsChanged is not a regular keyboard event and some of the NSEvent accessors
17929         don't work on it so don't call them.
17930         
17931         * WebCoreSupport/WebFrameLoaderClient.mm:
17932         (NetscapePluginWidget::NetscapePluginWidget):
17933         New Widget subclass to be used for Netscape plug-ins.
17934         
17935         (NetscapePluginWidget::handleEvent):
17936         Forward NSMouseMoved events to the plug-in.
17937         
17938         (WebFrameLoaderClient::createPlugin):
17939         Wrap the plug-in view in a NetscapePluginWidget.
17940
17941 2008-05-01  Alp Toker  <alp@nuanti.com>
17942
17943         Rubber-stamped by Anders.
17944
17945         GTK+ build fix for changes in r32752. Use int32, not int32_t types in
17946         npapi.h.
17947
17948         Additional fix to use same signedness in npapi.h and Mac for the
17949         interval parameter.
17950
17951         * Plugins/WebBaseNetscapePluginView.h:
17952         * Plugins/WebBaseNetscapePluginView.mm:
17953         (PluginTimer::PluginTimer):
17954         (-[WebBaseNetscapePluginView stopTimers]):
17955         (-[WebBaseNetscapePluginView restartTimers]):
17956         (-[WebBaseNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
17957         (-[WebBaseNetscapePluginView unscheduleTimer:]):
17958         * Plugins/WebBaseNetscapePluginViewPrivate.h:
17959         * Plugins/npapi.m:
17960         (NPN_ScheduleTimer):
17961         (NPN_UnscheduleTimer):
17962         * Plugins/npfunctions.h:
17963
17964 2008-04-30  Anders Carlsson  <andersca@apple.com>
17965
17966         Reviewed by Adam.
17967
17968         Add new Cocoa event model and the NPN_ScheduleTimer/NPN_UnscheduleTimer methods.
17969         
17970         * Plugins/WebBaseNetscapePluginView.h:
17971         * Plugins/WebBaseNetscapePluginView.mm:
17972         (PluginTimer::PluginTimer):
17973         (PluginTimer::start):
17974         (PluginTimer::fired):
17975         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
17976         (-[WebBaseNetscapePluginView stopTimers]):
17977         (-[WebBaseNetscapePluginView restartTimers]):
17978         (-[WebBaseNetscapePluginView scrollWheel:]):
17979         (-[WebBaseNetscapePluginView flagsChanged:]):
17980         (-[WebBaseNetscapePluginView start]):
17981         (-[WebBaseNetscapePluginView eventModel]):
17982         (-[WebBaseNetscapePluginView fini]):
17983         (-[WebBaseNetscapePluginView getVariable:value:]):
17984         (-[WebBaseNetscapePluginView setVariable:value:]):
17985         (-[WebBaseNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]):
17986         (-[WebBaseNetscapePluginView unscheduleTimer:]):
17987         * Plugins/WebBaseNetscapePluginViewInternal.h:
17988         * Plugins/WebBaseNetscapePluginViewPrivate.h:
17989         * Plugins/WebNetscapePluginEventHandler.h:
17990         * Plugins/WebNetscapePluginEventHandler.mm:
17991         (WebNetscapePluginEventHandler::create):
17992         * Plugins/WebNetscapePluginEventHandlerCarbon.h:
17993         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
17994         (WebNetscapePluginEventHandlerCarbon::scrollWheel):
17995         (WebNetscapePluginEventHandlerCarbon::flagsChanged):
17996         (WebNetscapePluginEventHandlerCarbon::platformWindow):
17997         * Plugins/WebNetscapePluginEventHandlerCocoa.h: Added.
17998         (WebNetscapePluginEventHandlerCocoa::startTimers):
17999         (WebNetscapePluginEventHandlerCocoa::stopTimers):
18000         * Plugins/WebNetscapePluginEventHandlerCocoa.mm: Added.
18001         (WebNetscapePluginEventHandlerCocoa::WebNetscapePluginEventHandlerCocoa):
18002         (WebNetscapePluginEventHandlerCocoa::drawRect):
18003         (WebNetscapePluginEventHandlerCocoa::mouseDown):
18004         (WebNetscapePluginEventHandlerCocoa::mouseDragged):
18005         (WebNetscapePluginEventHandlerCocoa::mouseEntered):
18006         (WebNetscapePluginEventHandlerCocoa::mouseExited):
18007         (WebNetscapePluginEventHandlerCocoa::mouseMoved):
18008         (WebNetscapePluginEventHandlerCocoa::mouseUp):
18009         (WebNetscapePluginEventHandlerCocoa::scrollWheel):
18010         (WebNetscapePluginEventHandlerCocoa::sendMouseEvent):
18011         (WebNetscapePluginEventHandlerCocoa::keyDown):
18012         (WebNetscapePluginEventHandlerCocoa::keyUp):
18013         (WebNetscapePluginEventHandlerCocoa::flagsChanged):
18014         (WebNetscapePluginEventHandlerCocoa::sendKeyEvent):
18015         (WebNetscapePluginEventHandlerCocoa::windowFocusChanged):
18016         (WebNetscapePluginEventHandlerCocoa::focusChanged):
18017         (WebNetscapePluginEventHandlerCocoa::platformWindow):
18018         (WebNetscapePluginEventHandlerCocoa::sendEvent):
18019         * Plugins/WebNetscapePluginPackage.m:
18020         (-[WebNetscapePluginPackage load]):
18021         * Plugins/npapi.m:
18022         (NPN_ScheduleTimer):
18023         (NPN_UnscheduleTimer):
18024         * Plugins/npfunctions.h:
18025
18026 2008-04-30  Brady Eidson  <beidson@apple.com>
18027
18028         Fix my WebPreferences revert check-in
18029
18030         * WebView/WebView.mm:
18031         (-[WebView _preferencesChangedNotification:]):
18032
18033 2008-04-30  Brady Eidson  <beidson@apple.com>
18034
18035         Rubberstamped by John Sullivan
18036
18037         Revert the remainder of my original preferences changes from last week.
18038         They caused a massive PLT regression (too many notifications being sent out
18039         or listened to that weren't previously) and it's not in my schedule to refine
18040         the preferences code instead of working on my feature!
18041
18042         * WebView/WebView.mm:
18043         (-[WebView _updateSettingsFromPreferences:]):
18044         (-[WebView _commonInitializationWithFrameName:groupName:]):
18045
18046 2008-04-30  Anders Carlsson  <andersca@apple.com>
18047
18048         Fix the 64-bit build.
18049         
18050         * Plugins/WebNetscapePluginEventHandler.h:
18051         * Plugins/WebNetscapePluginEventHandler.mm:
18052         * Plugins/WebNetscapePluginEventHandlerCarbon.h:
18053         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
18054
18055 2008-04-29  David D. Kilzer  <ddkilzer@apple.com>
18056
18057         BUILD FIX for Release build.
18058
18059         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
18060         (WebNetscapePluginEventHandlerCarbon::drawRect): Declare acceptedEvent
18061         separately so the compiler doesn't complain about an unused variable.
18062         (WebNetscapePluginEventHandlerCarbon::TSMEventHandler): Ditto.
18063
18064 2008-04-29  Anders Carlsson  <andersca@apple.com>
18065
18066         Reviewed by Adam.
18067
18068         Refactor the Carbon event handling code out into a separate class in preparation for adding
18069         the Cocoa event handling code.
18070         
18071         * Plugins/WebBaseNetscapePluginView.h:
18072         * Plugins/WebBaseNetscapePluginView.mm:
18073         (-[WebBaseNetscapePluginView sendEvent:isDrawRect:]):
18074         (-[WebBaseNetscapePluginView sendActivateEvent:]):
18075         (-[WebBaseNetscapePluginView sendDrawRectEvent:]):
18076         (-[WebBaseNetscapePluginView stopTimers]):
18077         (-[WebBaseNetscapePluginView restartTimers]):
18078         (-[WebBaseNetscapePluginView setHasFocus:]):
18079         (-[WebBaseNetscapePluginView mouseDown:]):
18080         (-[WebBaseNetscapePluginView mouseUp:]):
18081         (-[WebBaseNetscapePluginView mouseEntered:]):
18082         (-[WebBaseNetscapePluginView mouseExited:]):
18083         (-[WebBaseNetscapePluginView mouseDragged:]):
18084         (-[WebBaseNetscapePluginView keyUp:]):
18085         (-[WebBaseNetscapePluginView keyDown:]):
18086         (-[WebBaseNetscapePluginView cut:]):
18087         (-[WebBaseNetscapePluginView copy:]):
18088         (-[WebBaseNetscapePluginView paste:]):
18089         (-[WebBaseNetscapePluginView selectAll:]):
18090         (-[WebBaseNetscapePluginView start]):
18091         (-[WebBaseNetscapePluginView stop]):
18092         (-[WebBaseNetscapePluginView fini]):
18093         (-[WebBaseNetscapePluginView drawRect:]):
18094         (-[WebBaseNetscapePluginView viewWillMoveToWindow:]):
18095         (-[WebBaseNetscapePluginView viewDidMoveToWindow]):
18096         (-[WebBaseNetscapePluginView windowBecameKey:]):
18097         (-[WebBaseNetscapePluginView windowResignedKey:]):
18098         (-[WebBaseNetscapePluginView windowDidMiniaturize:]):
18099         (-[WebBaseNetscapePluginView windowDidDeminiaturize:]):
18100         (-[WebBaseNetscapePluginView loginWindowDidSwitchFromUser:]):
18101         (-[WebBaseNetscapePluginView loginWindowDidSwitchToUser:]):
18102         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
18103         (-[WebBaseNetscapePluginView _viewHasMoved]):
18104         * Plugins/WebBaseNetscapePluginViewInternal.h:
18105         * Plugins/WebNetscapePluginEmbeddedView.h:
18106         * Plugins/WebNetscapePluginEventHandler.h: Added.
18107         (WebNetscapePluginEventHandler::~WebNetscapePluginEventHandler):
18108         (WebNetscapePluginEventHandler::currentEventIsUserGesture):
18109         (WebNetscapePluginEventHandler::WebNetscapePluginEventHandler):
18110         * Plugins/WebNetscapePluginEventHandler.mm: Added.
18111         (WebNetscapePluginEventHandler::create):
18112         * Plugins/WebNetscapePluginEventHandlerCarbon.h: Added.
18113         * Plugins/WebNetscapePluginEventHandlerCarbon.mm: Added.
18114         (WebNetscapePluginEventHandlerCarbon::WebNetscapePluginEventHandlerCarbon):
18115         (getCarbonEvent):
18116         (modifiersForEvent):
18117         (WebNetscapePluginEventHandlerCarbon::sendNullEvent):
18118         (WebNetscapePluginEventHandlerCarbon::drawRect):
18119         (WebNetscapePluginEventHandlerCarbon::mouseDown):
18120         (WebNetscapePluginEventHandlerCarbon::mouseUp):
18121         (WebNetscapePluginEventHandlerCarbon::mouseEntered):
18122         (WebNetscapePluginEventHandlerCarbon::mouseExited):
18123         (WebNetscapePluginEventHandlerCarbon::mouseDragged):
18124         (WebNetscapePluginEventHandlerCarbon::mouseMoved):
18125         (WebNetscapePluginEventHandlerCarbon::keyDown):
18126         (keyMessageForEvent):
18127         (WebNetscapePluginEventHandlerCarbon::keyUp):
18128         (WebNetscapePluginEventHandlerCarbon::focusChanged):
18129         (WebNetscapePluginEventHandlerCarbon::windowFocusChanged):
18130         (WebNetscapePluginEventHandlerCarbon::TSMEventHandler):
18131         (WebNetscapePluginEventHandlerCarbon::installKeyEventHandler):
18132         (WebNetscapePluginEventHandlerCarbon::removeKeyEventHandler):
18133         (WebNetscapePluginEventHandlerCarbon::nullEventTimerFired):
18134         (WebNetscapePluginEventHandlerCarbon::startTimers):
18135         (WebNetscapePluginEventHandlerCarbon::stopTimers):
18136         (WebNetscapePluginEventHandlerCarbon::sendEvent):
18137
18138 2008-04-29  Mark Rowe  <mrowe@apple.com>
18139
18140         Reviewed by David Harrison.
18141
18142         Ensure that WebDynamicScrollBarsView defines WebCoreScrollbarAlwaysOn to keep Mail building.
18143
18144         * WebKit.exp:
18145         * WebView/WebDynamicScrollBarsView.h:
18146         * WebView/WebDynamicScrollBarsView.m:
18147
18148 2008-04-29  Greg Bolsinga  <bolsinga@apple.com>
18149
18150         Reviewed by Darin Adler.
18151
18152         Wrapped Dashboard code with ENABLE(DASHBOARD_SUPPORT)
18153
18154         * WebCoreSupport/WebChromeClient.h:
18155         * WebCoreSupport/WebChromeClient.mm:
18156         * WebView/WebClipView.m:
18157         (-[WebClipView scrollWheel:]):
18158         * WebView/WebHTMLView.mm:
18159         (-[WebHTMLView addMouseMovedObserver]):
18160         (-[WebHTMLView removeMouseMovedObserver]):
18161         (-[WebHTMLView acceptsFirstMouse:]):
18162         * WebView/WebUIDelegatePrivate.h:
18163         * WebView/WebView.mm:
18164         (-[WebViewPrivate init]):
18165         * WebView/WebViewPrivate.h:
18166
18167 2008-04-28  Rob Buis  <buis@kde.org>
18168
18169         Reviewed by Maciej.
18170
18171         Build fix for Tiger.
18172
18173         * WebView/WebView.mm:
18174         (WebKitInitializeApplicationCachePathIfNecessary):
18175
18176 2008-04-28  Adele Peterson  <adele@apple.com>
18177
18178         Reviewed by Dan Bernstein, Tim Hatcher, Anders Carlsson, and Darin Adler.
18179
18180         WebKit part of fix for <rdar://problem/3709505>
18181         Safari should have a way to upload bundles from the file upload control (as zip)
18182
18183         Added UIDelegate methods to let the application handle generating replacement files for uploads.
18184         In this case, Safari will create archived files for bundles so they can be uploaded properly.
18185
18186         * DefaultDelegates/WebDefaultUIDelegate.m:
18187         (-[WebDefaultUIDelegate webView:shouldReplaceUploadFile:usingGeneratedFilename:]):
18188         (-[WebDefaultUIDelegate webView:generateReplacementFile:]):
18189         * WebCoreSupport/WebChromeClient.h:
18190         * WebCoreSupport/WebChromeClient.mm:
18191         (WebChromeClient::shouldReplaceWithGeneratedFileForUpload):
18192         (WebChromeClient::generateReplacementFile):
18193         * WebView/WebUIDelegatePrivate.h:
18194
18195 2008-04-28  Anders Carlsson  <andersca@apple.com>
18196
18197         Reviewed by Sam, Mark, Adele and Darin.
18198
18199         Initialize the application cache path.
18200         
18201         * WebView/WebView.mm:
18202         (WebKitInitializeApplicationCachePathIfNecessary):
18203         (-[WebView _commonInitializationWithFrameName:groupName:]):
18204
18205 2008-04-28  Alice Liu  <alice.liu@apple.com>
18206
18207         Reviewed by Darin Adler.
18208
18209         Fix <rdar://problem/4911289> Add tabindex property to all children 
18210         of HTMLElement (7138)
18211         http://bugs.webkit.org/show_bug.cgi?id=7138
18212
18213         * MigrateHeaders.make:
18214         Removing DOMHTMLLabelElementPrivate.h and DOMHTMLLegendElementPrivate.h
18215         because now that focus() has been moved to DOMHTMLElement.h, these
18216         files are no longer needed.
18217
18218 2008-04-25  Alexey Proskuryakov  <ap@webkit.org>
18219
18220         Reviewed by Darin Adler.
18221
18222         Fix run-webkit-tests --threading
18223         and provisionally fix <https://bugs.webkit.org/show_bug.cgi?id=18661>
18224         Proxy server issue in Sunday's Nightly
18225
18226         * WebView/WebView.mm: (-[WebViewPrivate init]): Initialize threading. Previously, this was
18227         only done from icon database code, which is not robust enough.
18228
18229 2008-04-20 Adam Barth <hk9565@gmail.com>
18230
18231         Reviewed by Adam Roben and Sam Weinig.
18232
18233         Updated WebSecurityOrigin to match new SecurityOrigin API.
18234
18235         Collin Jackson <collinj-webkit@collinjackson.com> also contributed to this patch.
18236
18237         * Storage/WebSecurityOrigin.mm:
18238         (-[WebSecurityOrigin host]):
18239         (-[WebSecurityOrigin domain]):
18240         * Storage/WebSecurityOriginPrivate.h:
18241
18242 2008-04-25  Mark Rowe  <mrowe@apple.com>
18243
18244         Rubber-stamped by Sam Weinig.
18245
18246         Add some content to an empty ICU header file to prevent verification errors.
18247
18248         * icu/unicode/utf_old.h:
18249
18250 2008-04-25  Anders Carlsson  <andersca@apple.com>
18251
18252         Reviewed by Sam.
18253
18254         Add offlineWebApplicationCacheEnabled preference.
18255         
18256         * WebView/WebPreferenceKeysPrivate.h:
18257         * WebView/WebPreferences.m:
18258         (+[WebPreferences initialize]):
18259         (-[WebPreferences offlineWebApplicationCacheEnabled]):
18260         (-[WebPreferences setOfflineWebApplicationCacheEnabled:]):
18261         * WebView/WebPreferencesPrivate.h:
18262         * WebView/WebView.mm:
18263         (-[WebView _updateSettingsFromPreferences:]):
18264
18265 2008-04-24  Mark Rowe  <mrowe@apple.com>
18266
18267         Reviewed by Sam Weinig.
18268
18269         Remove code for calculating the glyph cache size.
18270
18271         * WebCoreSupport/WebSystemInterface.m:
18272         (InitWebCoreSystemInterface): Remove unused symbol.
18273
18274 2008-04-24  Mark Rowe  <mrowe@apple.com>
18275
18276         Reviewed by Sam Weinig.
18277
18278         Add a definition of BUILDING_ON_LEOPARD to complement BUILDING_ON_TIGER.
18279
18280         * WebKitPrefix.h:
18281
18282 2008-04-24  Brady Eidson  <beidson@apple.com>
18283
18284         Reviewed by Darin
18285
18286         Fix layout test regressions from my earlier preferences/settings tweak.
18287
18288         * WebView/WebView.mm:
18289         (-[WebView _commonInitializationWithFrameName:groupName:]): Even if we're not posting
18290           the notification to update the settings, each WebView still needs to register for the
18291           notification - restore that behavior.
18292
18293 2008-04-24  Dan Bernstein  <mitz@apple.com>
18294
18295         Reviewed by Darin Adler.
18296
18297         - preparation for https://bugs.webkit.org/show_bug.cgi?id=3729
18298           <rdar://problem/4036353> REGRESSION: arrow keys move insertion bar backwards in RTL text
18299
18300         * WebView/WebFrame.mm:
18301         (-[WebFrame _caretRectAtNode:offset:affinity:]): Changed to use
18302         VisiblePosition::caretRect() instead of the RenderObject method which
18303         was removed.
18304
18305 2008-04-24  Brady Eidson  <beidson@apple.com>
18306
18307         Reviewed by Darin
18308
18309         Rework the Settings population again.
18310
18311         * WebView/WebView.mm:
18312         (-[WebView _updateSettingsFromPreferences:]): This method is called both from _preferencesChangedNotification
18313           and directly from WebView's common init function.
18314         (-[WebView _preferencesChangedNotification:]):
18315         (-[WebView _commonInitializationWithFrameName:groupName:]): Call _updateSettingsFromPreferences immediately
18316           after creating the new Page
18317
18318 2008-04-24  Darin Adler  <darin@apple.com>
18319
18320         Reviewed by Geoff.
18321
18322         - fix crash in regression test where we'd ask a frame for a user agent string
18323           after the WebView was already closed
18324
18325         * WebCoreSupport/WebFrameLoaderClient.mm:
18326         (WebFrameLoaderClient::userAgent): Assert that the WebView is not nil. Also
18327         added some code to prevent the crash in release builds if this problem happens
18328         again.
18329
18330 2008-04-24  Anders Carlsson  <andersca@apple.com>
18331
18332         Reviewed by Sam.
18333
18334         Change some String arguments to be const references instead.
18335
18336         * WebCoreSupport/WebEditorClient.h:
18337         * WebCoreSupport/WebEditorClient.mm:
18338         (WebEditorClient::shouldInsertText):
18339
18340 2008-04-24  John Sullivan  <sullivan@apple.com>
18341
18342         Mac build fix
18343         
18344         * WebCoreSupport/WebViewFactory.mm:
18345         (-[WebViewFactory AXButtonActionVerb]):
18346         implement this method using the text in WebCoreLocalizedStrings.cpp
18347         (-[WebViewFactory AXRadioButtonActionVerb]):
18348         ditto
18349         (-[WebViewFactory AXTextFieldActionVerb]):
18350         ditto
18351         (-[WebViewFactory AXCheckedCheckBoxActionVerb]):
18352         ditto
18353         (-[WebViewFactory AXUncheckedCheckBoxActionVerb]):
18354         ditto
18355         (-[WebViewFactory AXLinkActionVerb]):
18356         ditto
18357
18358 2008-04-23  Brady Eidson  <beidson@apple.com>
18359
18360         Reviewed by Sam Weinig
18361
18362         In some current work I noticed that when a new Page is created, it is possible that it requires info from its Settings
18363         object before the Settings object is initialized.  It seems quite prudent to post the preferences changed notification,
18364         thereby populating the Settings object, immediately after the Page is created.
18365
18366         * WebView/WebView.mm:
18367         (-[WebView _commonInitializationWithFrameName:groupName:]): Post the notification right after the Page is created
18368
18369 2008-04-24  John Sullivan  <sullivan@apple.com>
18370
18371         Reviewed by Jess
18372         
18373         - fixed <rdar://problem/5886655> JavaScript input panel automatic resizing doesn't work right with HiDPI
18374
18375         * Misc/WebNSControlExtras.m:
18376         (-[NSControl sizeToFitAndAdjustWindowHeight]):
18377         deploy userSpaceScaleFactor when using view distances on the window
18378
18379 2008-04-22  Anders Carlsson  <andersca@apple.com>
18380
18381         Reviewed by Darin Adler.
18382
18383         Add NPN_Construct and NPN_PluginThreadAsyncCall declarations.
18384         
18385         * Plugins/npfunctions.h:
18386
18387 2008-04-20  Matt Lilek  <webkit@mattlilek.com>
18388
18389         Mysteriously reviewed by mitz|away.
18390
18391         Bug 18111: Closing a tab while dragging crashes Safari
18392         https://bugs.webkit.org/show_bug.cgi?id=18111
18393
18394         Null check the page before handling drag events.
18395
18396         * WebView/WebView.mm:
18397         (-[WebView draggingUpdated:]):
18398         (-[WebView draggingExited:]):
18399
18400 2008-04-19  Brady Eidson  <beidson@apple.com>
18401
18402         Reviewed by Tim Hatcher
18403
18404         Add a WebPreference for the path of the local storage persistent store.
18405
18406         * WebView/WebPreferenceKeysPrivate.h:
18407
18408         * WebView/WebPreferences.m:
18409         (-[WebPreferences _localStorageDatabasePath]):
18410         (-[WebPreferences _setLocalStorageDatabasePath:]):
18411         * WebView/WebPreferencesPrivate.h:
18412
18413         * WebView/WebView.mm:
18414         (-[WebView _preferencesChangedNotification:]):
18415
18416 2008-04-18  Brady Eidson  <beidson@apple.com>
18417
18418         Reviewed by Sam Weinig
18419
18420         Don't clear the PageGroup on _close, as the WebCore::Page destructor already does this.
18421         No reason to do the work twice...
18422
18423         * WebView/WebView.mm:
18424         (-[WebView _close]):
18425
18426 2008-04-17  Eric Seidel  <eric@webkit.org>
18427
18428         Reviewed by beth.
18429
18430         Rename Frame::renderer() to contentRenderer() and fix uses.
18431
18432         * Misc/WebCoreStatistics.mm:
18433         * WebView/WebRenderNode.mm:
18434         (-[WebRenderNode initWithWebFrameView:]):
18435
18436 2008-04-17  Jon Honeycutt  <jhoneycutt@apple.com>
18437
18438         Reviewed by mrowe.
18439
18440         * WebView/WebFrame.mm: Remove temporary build fix.
18441
18442 2008-04-17  Mark Rowe  <mrowe@apple.com>
18443
18444         Reviewed by Dan Bernstein.
18445
18446         Fix <rdar://problem/5863552> REGRESSION (r30741): Attachments don't appear in the iChat message window after sending
18447
18448         The order of arguments to -[NSDictionary initWithObjects:andKeys:] had been transposed accidentally during refactoring.
18449
18450         * WebCoreSupport/WebFrameLoaderClient.mm:
18451         (WebFrameLoaderClient::createPlugin): Pass the arguments in the correct order.
18452
18453 2008-04-17  Mark Rowe  <mrowe@apple.com>
18454
18455         Rubber-stamped by Dan Bernstein.
18456
18457         Fix the Mac build.
18458
18459         * WebView/WebFrame.mm: Define HAVE_ACCESSIBILITY before including AccessibilityObject.h and AXObjectCache.h to get things building
18460         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
18461         for this to live going forward.
18462
18463 2008-04-15  Kevin Decker  <kdecker@apple.com>
18464
18465         Reviewed by Anders.
18466
18467         <rdar://problem/5412759> CrashTracer: [USER] 22 crashes in Safari at com.apple.quicktime.webplugin: NPN_SetValue + 15403
18468         
18469         In certain situations, code in WebBasePluginPackage would load a plug-in only for the explicit reason of asking it to create a
18470         preference file, but wouldn't actually unload the bundle. This created problems for the QuickTime WebKit plug-in by unloading
18471         a bundle out from underneath itself.
18472
18473         * Plugins/WebBasePluginPackage.h: Added unload method.
18474         * Plugins/WebBasePluginPackage.m:
18475         (-[WebBasePluginPackage unload]): Added new method. Currently, only Netscape plug-ins support unload.
18476         (-[WebBasePluginPackage pListForPath:createFile:]): Added a call to unload.
18477         * Plugins/WebNetscapePluginPackage.m:
18478         (-[WebNetscapePluginPackage unload]): Added.
18479
18480 2008-04-15  Anders Carlsson  <andersca@apple.com>
18481
18482         Reviewed by Adam.
18483
18484         Add ENABLE_OFFLINE_WEB_APPLICATIONS to FEATURE_DEFINES.
18485
18486         * Configurations/WebKit.xcconfig:
18487
18488 2008-04-15  Brady Eidson  <beidson@apple.com>
18489
18490         Reviewed by John Sullivan
18491
18492         Do a more complete job adding the "WebArchiveDebugMode" pref
18493
18494         * WebView/WebPreferences.m: Add both getter *and* setter
18495         (-[WebPreferences webArchiveDebugModeEnabled]):
18496         (-[WebPreferences setWebArchiveDebugModeEnabled:]):
18497         * WebView/WebPreferencesPrivate.h:
18498
18499         * WebView/WebView.mm:
18500         (-[WebView _preferencesChangedNotification:]): Call the renamed getter
18501
18502 2008-04-14  Brady Eidson  <beidson@apple.com>
18503
18504         Reviewed by Anders
18505
18506         Add a hidden pref to debug WebArchive loading.  With this pref on, when loading a WebArchive,
18507         if the resource isn't in the ArchiveResourceCollection, the loader will not fall back to the 
18508         network and will instead fail the load as "cancelled."
18509
18510         * WebView/WebPreferenceKeysPrivate.h:
18511
18512         * WebView/WebPreferences.m:
18513         (+[WebPreferences initialize]):
18514         (-[WebPreferences _webArchiveDebugModeEnabled]):
18515         * WebView/WebPreferencesPrivate.h:
18516
18517         * WebView/WebView.mm:
18518         (-[WebView _preferencesChangedNotification:]):
18519
18520 2008-04-11  David Hyatt  <hyatt@apple.com>
18521
18522         Rename CachedResource ref/deref methods to addClient/removeClient.
18523
18524         Reviewed by olliej
18525
18526         * WebView/WebHTMLView.mm:
18527         (-[WebHTMLViewPrivate dealloc]):
18528         (-[WebHTMLViewPrivate finalize]):
18529         (-[WebHTMLViewPrivate clear]):
18530         (-[WebHTMLView setPromisedDragTIFFDataSource:WebCore::]):
18531
18532 2008-04-07  Brady Eidson  <beidson@apple.com>
18533
18534         Add "ENABLE_DOM_STORAGE" to keep in sync with the rest of the project
18535
18536         * Configurations/WebKit.xcconfig:
18537
18538 2008-04-04  Adam Roben  <aroben@apple.com>
18539
18540         Use WebCore's ICU headers instead of our own copy
18541
18542         Rubberstamped by Tim Hatcher.
18543
18544         * Configurations/WebKit.xcconfig: Pick up ICU headers from WebCore's
18545         PrivateHeaders.
18546
18547 2008-04-04  Adam Roben  <aroben@apple.com>
18548
18549         Fix <rdar://problem/5804776> Would like to use WebCore's
18550         ForwardingHeaders in WebKit without manually creating copies
18551
18552         Patch by Tim Hatcher, typed by me.
18553
18554         * Configurations/WebKit.xcconfig: Use the copy of ForwardingHeaders in
18555         WebCore's PrivateHeaders instead of our own copy.
18556
18557 2008-04-04  Ada Chan  <adachan@apple.com>
18558
18559         Now we pass width and height directly as integers to format
18560         the window title for a standalone image.
18561
18562         Reviewed by Dan.
18563
18564         * WebCoreSupport/WebViewFactory.mm:
18565         (-[WebViewFactory imageTitleForFilename:width:height:]):
18566
18567 2008-04-03  Nicholas Shanks  <webkit@nickshanks.com>
18568
18569         Updated by Dan Bernstein. Reviewed by Dave Hyatt.
18570
18571         - WebKit part of fixing http://bugs.webkit.org/show_bug.cgi?id=6484
18572           font-weight does not properly support graded weights
18573
18574         * WebView/WebHTMLView.mm:
18575         (-[WebHTMLView _styleFromFontAttributes:]):
18576         (-[WebHTMLView _originalFontB]):
18577         (-[WebHTMLView _addToStyle:fontA:fontB:]):
18578
18579 2008-04-02  Mark Rowe  <mrowe@apple.com>
18580
18581         Reviewed by Oliver Hunt.
18582
18583         Ensure that debug symbols are generated for x86_64 and ppc64 builds.
18584
18585         * Configurations/Base.xcconfig:
18586
18587 2008-03-31  Alice Liu  <alice.liu@apple.com>
18588
18589         Reviewed by Darin Adler.
18590
18591         * WebView/WebFrame.mm:
18592         (-[WebFrame _accessibilityTree]):
18593         The syntax for fetching an object from the AXObjectCache changed slightly
18594
18595 2008-03-31  Brady Eidson  <beidson@apple.com>
18596
18597         Reviewed by Jon Honeycutt
18598         
18599         Move a WebArchive loading check into WebCore
18600
18601         * WebView/WebHTMLRepresentation.mm:
18602         (-[WebHTMLRepresentation receivedData:withDataSource:]): Don't check "isDisplayingWebArchive" as WebCore is now
18603           responsible for checking that state
18604
18605 2008-03-31  Brady Eidson  <beidson@apple.com>
18606
18607         Reviewed by Darin and Mitz's rubber stamp
18608
18609         Remove dataForArchivedSelection(WebCore::Frame*) from the EditorClient - only usage is now directly in WebCore
18610
18611         * WebCoreSupport/WebEditorClient.mm:
18612         * WebCoreSupport/WebEditorClient.h:
18613
18614 2008-03-28  Brady Eidson  <beidson@apple.com>
18615
18616         Rubberstamped by Darin Adler
18617
18618         Remove WebArchiver.h/mm
18619
18620         * WebView/WebArchiver.h: Removed.
18621         * WebView/WebArchiver.mm: Removed.
18622
18623         * DOM/WebDOMOperations.mm:
18624         * WebCoreSupport/WebDragClient.mm:
18625         * WebCoreSupport/WebEditorClient.mm:
18626         * WebView/WebDataSource.mm:
18627         * WebView/WebHTMLView.mm:
18628
18629 2008-03-28  Brady Eidson  <beidson@apple.com>
18630
18631         Reviewed by Darin Adler
18632
18633         Now that WebCore can create archives from a frame selection directly, we don't need it in WebArchiver anymore
18634
18635         * WebCoreSupport/WebEditorClient.mm:
18636         (WebEditorClient::dataForArchivedSelection):
18637
18638         * WebView/WebArchiver.h: Nuke archiveSelectionInFrame, as there are no remaining users
18639         * WebView/WebArchiver.mm: Ditto
18640
18641         * WebView/WebHTMLView.mm:
18642         (-[WebHTMLView _writeSelectionWithPasteboardTypes:toPasteboard:cachedAttributedString:]):
18643
18644 2008-03-28  Brady Eidson  <beidson@apple.com>
18645
18646         Reviewed by Darin Adler
18647
18648         More Kit->Core WebArchive changes.
18649
18650         Create an archive from the current selection in a frame
18651
18652         * WebView/WebArchiver.mm: Remove one more *undeclared* method, the last method will drop off
18653           easily in a followup
18654
18655 2008-03-28  Brady Eidson  <beidson@apple.com>
18656
18657         Reviewed by Sam Weinig
18658
18659         WebArchive saga continues - Can now make archives from ranges in WebCore
18660
18661         * DOM/WebDOMOperations.mm:
18662         (-[DOMRange webArchive]):
18663         (-[DOMRange markupString]):
18664
18665         * WebView/WebArchiver.h: Remove newly obsolete [WebArchiver archiveRange:]
18666         * WebView/WebArchiver.mm:
18667
18668 2008-03-28  Brady Eidson  <beidson@apple.com>
18669
18670         Reviewed by Sam Weinig
18671
18672         More Kit->Core webarchive code movement
18673
18674         * DOM/WebDOMOperations.mm:
18675         (-[DOMNode markupString]): Call createFullMarkup() instead
18676
18677         * WebView/WebFrame.mm: Remove obsolete _markupStringFromNode
18678         * WebView/WebFrameInternal.h: Ditto
18679
18680 2008-03-28  Brady Eidson  <beidson@apple.com>
18681
18682         Reviewed by Sam Weinig
18683
18684         Fold [WebArchiver archiveFrame:] into WebDataSource - the last remaining caller
18685
18686         * WebView/WebArchiver.h:
18687         * WebView/WebArchiver.mm:
18688         * WebView/WebDataSource.mm:
18689         (-[WebDataSource webArchive]):
18690
18691 2008-03-28  Brady Eidson  <beidson@apple.com>
18692
18693         Reviewed by Sam Weinig
18694
18695         Remove unused [WebArchiver archiveNode:], made obsolete in r31400
18696
18697         * WebView/WebArchiver.h:
18698         * WebView/WebArchiver.mm:
18699
18700 2008-03-28  Brady Eidson  <beidson@apple.com>
18701
18702         Reviewed by Darin
18703
18704         "Yet another transitional step" to empty out WebKit-based code for archiving.
18705
18706         With this patch, the key operation of "Creating a WebArchive rooted at a single Node" takes place
18707         entirely within WebCore, and opens the door to saving WebArchives on Windows.
18708
18709         * DOM/WebDOMOperations.mm:
18710         * WebView/WebArchiver.mm:
18711         (+[WebArchiver _archiveWithMarkupString:fromFrame:nodes:]):
18712
18713 2008-03-27  Brady Eidson  <beidson@apple.com>
18714
18715         Reviewed by Adam Roben
18716
18717         Move [WebDataSource mainResource] and [WebDataSource subresources] down into WebCore
18718         as the push to core-ify WebArchives continues.
18719
18720         This patch also introduces a behavior change.  WebCore allows ArchiveResources with null or empty data.  
18721         WebKit has had the inexplicable distinction of allowing empty Data in a WebResource, but not null.  
18722         Since WebResource is API, I decided to leave it be to avoid a behavior change.  But internally created resources 
18723         (as in "while archiving a page") are accepting of null or empty data.
18724
18725         This actually fixes a bug where not all subframes are archived, and resulted in a layout test change. 
18726
18727         * WebView/WebDataSource.mm:
18728         (-[WebDataSource mainResource]): Call DocumentLoader implementation
18729         (-[WebDataSource subresources]): Ditto
18730         * WebView/WebFrame.mm: Remove [WebFrame _getAllResourceDatas:andResponses:] as its only caller is obsolete
18731         * WebView/WebFrameInternal.h:
18732
18733 2008-03-27  Brady Eidson  <beidson@apple.com>
18734
18735         Reviewed by Adam
18736
18737         Change the "init from WebCore resource" version of WebResource to take PassRefPtr
18738         (more efficient)
18739
18740         * WebView/WebResource.mm:
18741         (-[WebResource _initWithCoreResource:]):
18742         * WebView/WebResourceInternal.h:
18743
18744 2008-03-26  Brady Eidson  <beidson@apple.com>
18745
18746         Build fix - accidentally checked in this change which was work in progress
18747
18748         * DOM/WebDOMOperations.mm:
18749
18750 2008-03-26  Brady Eidson  <beidson@apple.com>
18751
18752         Reviewed by Darin
18753
18754         When we create a WebArchive, we walk every node from some starting point, asking each node
18755         along the way "What are your subresource URLs?"
18756
18757         That logic is currently in DOMNode in WebKitMac - this patch moves that ability down into
18758         WebCore::Node
18759
18760         * DOM/WebDOMOperations.mm:
18761         (-[DOMNode _subresourceURLs]): One generic DOMNode method can now handle all DOMNodes by
18762           calling into individual WebCore::Node implementations
18763         * DOM/WebDOMOperationsPrivate.h:
18764
18765 2008-03-26  Brady Eidson  <beidson@apple.com>
18766
18767         Reviewed by Mark Rowe
18768
18769         Part of the continued push to move WebArchive-related code down to WebCore, this
18770         moves [WebDataSource subresourceForURL:] down to DocumentLoader->subresource()
18771
18772         * WebView/WebDataSource.mm:
18773         (-[WebDataSource subresourceForURL:]): Call through to the DocumentLoader 
18774
18775         * WebView/WebFrame.mm: Remove [WebFrame _getData:andResponse:forURL:], as its only use
18776           has now been ported down to WebCore
18777         * WebView/WebFrameInternal.h:
18778
18779 2008-03-26  Mark Rowe  <mrowe@apple.com>
18780
18781         Rubber-stamped by Brady Eidson.
18782
18783         Update FEATURE_DEFINES to be consistent with the other locations in which it is defined.
18784
18785         * Configurations/WebKit.xcconfig:
18786
18787 2008-03-26  Mark Rowe  <mrowe@apple.com>
18788
18789         Reviewed by David Hyatt.
18790
18791         Make the Ahem font antialias correctly on Acid3 on Tiger.
18792
18793         * WebCoreSupport/WebSystemInterface.m:
18794         (InitWebCoreSystemInterface):
18795
18796 2008-03-26  Mark Rowe  <mrowe@apple.com>
18797
18798         Fix the Mac build.
18799
18800         * MigrateHeaders.make: Copy the newly generated header into the right place.
18801
18802 2008-03-25  Brady Eidson  <beidson@apple.com>
18803
18804         Reviewed by Beth Dakin
18805
18806         Remove entirely unused internal method
18807
18808         * WebView/WebArchiver.h:
18809         * WebView/WebArchiver.mm:
18810
18811 2008-03-25  Brady Eidson  <beidson@apple.com>
18812
18813         Reviewed by Adam Roben
18814
18815         <rdar://problem/5819308> - View Source is empty when view webarchives
18816
18817         * WebCore.base.exp:
18818         * loader/DocumentLoader.cpp:
18819         (WebCore::DocumentLoader::setParsedArchiveData):
18820         (WebCore::DocumentLoader::parsedArchiveData):
18821         * loader/DocumentLoader.h:
18822
18823         * loader/FrameLoader.cpp:
18824         (WebCore::FrameLoader::finishedLoadingDocument): Set the archive's MainResource data as the parsedArchiveData
18825           in the DocumentLoader
18826
18827 2008-03-25  Dan Bernstein  <mitz@apple.com>
18828
18829         Reviewed by Darin Adler.
18830
18831         - fix http://bugs.webkit.org/show_bug.cgi?id=17933
18832           Reopen All Windows From Last Session causes crash
18833
18834         * WebView/WebHTMLView.mm:
18835         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Added null
18836         check.
18837
18838 2008-03-25  Brady Eidson  <beidson@apple.com>
18839
18840         Reviewed by Jon Honeycutt's rubberstamp
18841
18842         Fix a leak with the new WebArchive setup
18843
18844         * WebView/WebArchive.mm:
18845         (-[WebArchivePrivate setCoreArchive:]): Deref() the old WebArchive
18846
18847 2008-03-25  Brady Eidson  <beidson@apple.com>
18848
18849         Reviewed by Darin
18850
18851         Removed the concept of "pending archive resources" and the "archive resources delivery timer"
18852         from WebFrameLoaderClient, as those concepts have been pushed into WebCore
18853
18854         * WebCoreSupport/WebFrameLoaderClient.h:
18855         * WebCoreSupport/WebFrameLoaderClient.mm:
18856         (WebFrameLoaderClient::WebFrameLoaderClient):
18857
18858 2008-03-25  Brady Eidson  <beidson@apple.com>
18859
18860         Reviewed by Darin
18861
18862         Remove newly obsolete FrameLoaderClient methods
18863
18864         * WebCoreSupport/WebFrameLoaderClient.h:
18865         * WebCoreSupport/WebFrameLoaderClient.mm:
18866
18867 2008-03-25  Brady Eidson  <beidson@apple.com>
18868
18869         Release build fix
18870
18871         * WebView/WebArchive.mm:
18872         (-[WebArchive subresources]):
18873         (-[WebArchive subframeArchives]):
18874
18875 2008-03-25  Brady Eidson  <beidson@apple.com>
18876
18877         Reviewed by Darin
18878
18879         <rdar://problem/4516169> - Support WebArchives on Windows
18880         And paves the way for many future WebArchive bug fixes and enhancements
18881
18882         This change moves most of the real workhorse code about WebArchives into WebCore.  It maintains 
18883         1-to-1 relationships between a few objects in WebCore and WebKit.  Such as:
18884          * WebArchive <-> LegacyWebArchive
18885          * WebResource <-> ArchiveResource
18886          * WebUnarchivingState <-> ArchiveResourceCollection
18887  
18888         The other biggest changes involve many FrameLoaderClient methods that existed soley for WebArchives 
18889         and now exist in WebCore
18890
18891         * WebCoreSupport/WebFrameLoaderClient.mm:
18892         (WebFrameLoaderClient::clearUnarchivingState): Emptied - to be removed in a followup patch
18893         (WebFrameLoaderClient::finalSetupForReplace):
18894         (WebFrameLoaderClient::setDefersLoading):
18895         (WebFrameLoaderClient::willUseArchive):
18896         (WebFrameLoaderClient::isArchiveLoadPending):
18897         (WebFrameLoaderClient::cancelPendingArchiveLoad):
18898         (WebFrameLoaderClient::clearArchivedResources):
18899         (WebFrameLoaderClient::createFrame):
18900
18901         * WebView/WebArchive.mm:
18902         (+[WebArchivePrivate initialize]):
18903         (-[WebArchivePrivate init]):
18904         (-[WebArchivePrivate initWithCoreArchive:]):
18905         (-[WebArchivePrivate coreArchive]):
18906         (-[WebArchivePrivate setCoreArchive:]):
18907         (-[WebArchivePrivate dealloc]):
18908         (-[WebArchivePrivate finalize]):
18909         (-[WebArchive init]):
18910         (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
18911         (-[WebArchive initWithData:]):
18912         (-[WebArchive initWithCoder:]):
18913         (-[WebArchive encodeWithCoder:]):
18914         (-[WebArchive mainResource]):
18915         (-[WebArchive subresources]):
18916         (-[WebArchive subframeArchives]):
18917         (-[WebArchive data]):
18918         (-[WebArchive _initWithCoreLegacyWebArchive:WebCore::]):
18919         (-[WebArchive WebCore::]):
18920         * WebView/WebArchiveInternal.h: Added.
18921
18922         * WebView/WebDataSource.mm:
18923         (-[WebDataSourcePrivate dealloc]):
18924         (-[WebDataSource _addSubframeArchives:]):
18925         (-[WebDataSource _documentFragmentWithArchive:]):
18926         (-[WebDataSource subresourceForURL:]):
18927         (-[WebDataSource addSubresource:]):
18928         * WebView/WebDataSourceInternal.h:
18929
18930         * WebView/WebFrame.mm:
18931         (-[WebFrame loadArchive:]):
18932         * WebView/WebFrameInternal.h:
18933
18934         * WebView/WebHTMLRepresentation.mm:
18935         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
18936
18937         * WebView/WebResource.mm:
18938         (+[WebResourcePrivate initialize]):
18939         (-[WebResourcePrivate init]):
18940         (-[WebResourcePrivate initWithCoreResource:]):
18941         (-[WebResourcePrivate dealloc]):
18942         (-[WebResourcePrivate finalize]):
18943         (-[WebResource initWithCoder:]):
18944         (-[WebResource encodeWithCoder:]):
18945         (-[WebResource data]):
18946         (-[WebResource URL]):
18947         (-[WebResource MIMEType]):
18948         (-[WebResource textEncodingName]):
18949         (-[WebResource frameName]):
18950         (-[WebResource _initWithCoreResource:WebCore::]):
18951         (-[WebResource WebCore::]):
18952         (-[WebResource _ignoreWhenUnarchiving]):
18953         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
18954         (-[WebResource _fileWrapperRepresentation]):
18955         (-[WebResource _response]):
18956         (-[WebResource _stringValue]):
18957         * WebView/WebResourceInternal.h: Added.
18958         * WebView/WebResourcePrivate.h:
18959
18960         * WebView/WebUnarchivingState.h: Removed.
18961         * WebView/WebUnarchivingState.m: Removed.
18962
18963 2008-03-24  Oliver Hunt  <oliver@apple.com>
18964
18965         Reviewed by Mark Rowe.
18966
18967         Bug 18030: REGRESSION(r31236): Space bar fails to scroll down page
18968         <http://bugs.webkit.org/show_bug.cgi?id=18030>
18969
18970         Rollout keyDown changes from r31236 -- fix for keyDown behaviour is
18971         tracked by Bug 18057: keyDown incorrectly propagates up the frame tree
18972         <http://bugs.webkit.org/show_bug.cgi?id=18057>
18973
18974         * WebView/WebHTMLView.mm:
18975         (-[WebHTMLView keyDown:]):
18976
18977 2008-03-24  Cameron Zwarich  <cwzwarich@uwaterloo.ca>
18978
18979         Reviewed by Maciej, landed by Brady
18980
18981         Bug 3580: iFrames Appear to be Cached
18982         <http://bugs.webkit.org/show_bug.cgi?id=3580>
18983
18984         Bug 15486: REGRESSION: Reload causes WebKit to *forget* fragment URLs
18985         <http://bugs.webkit.org/show_bug.cgi?id=15486>
18986
18987         Bug 15554: Reload causes <object> to use old data
18988         <http://bugs.webkit.org/show_bug.cgi?id=15554>
18989
18990         If a page is reloaded, a child frame's URL can not be taken from a history item.
18991
18992         * WebView/WebFrame.mm:
18993         (-[WebFrame _loadURL:referrer:intoChild:]):
18994
18995 2008-03-24  Darin Adler  <darin@apple.com>
18996
18997         Reviewed by Beth.
18998
18999         - fix <rdar://problem/5817067> -[WebDataSource unreachableURL] invokes KURL's copy constructor
19000
19001         * History/WebHistoryItem.mm:
19002         (-[WebHistoryItem URL]): Use a reference to avoid making a copy.
19003         * WebView/WebDataSource.mm:
19004         (-[WebDataSource _URL]): Ditto.
19005         (-[WebDataSource unreachableURL]): Ditto.
19006         * WebView/WebHTMLView.mm:
19007         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto.
19008
19009         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
19010         * History/WebHistory.mm:
19011         * Misc/WebElementDictionary.mm:
19012         * Misc/WebNSAttributedStringExtras.mm:
19013         Remove unneeded imports of KURL.h.
19014
19015 2008-03-24  Brady Eidson  <beidson@apple.com>
19016
19017         Reviewed by Darin's rubberstamp
19018
19019         Rename this file for upcoming work.
19020
19021         * WebView/WebArchive.m: Removed.
19022         * WebView/WebArchive.mm: Copied from WebKit/mac/WebView/WebArchive.m.
19023
19024 2008-03-24  Alexey Proskuryakov  <ap@webkit.org>
19025
19026         Build fix.
19027
19028         * MigrateHeaders.make: Added DOMSVGAltGlyphElement.h and DOMSVGAltGlyphElementInternal.h.
19029
19030 2008-03-23  Oliver Hunt  <oliver@apple.com>
19031
19032         Reviewed by Maciej.
19033
19034         Bug 17670: Key events may improperly propagate from iframe to parent frame
19035         <http://bugs.webkit.org/show_bug.cgi?id=17670>
19036         Bug 16381: REGRESSION: Shift, command, option, ctrl keys in Gmail Rich Text changes focus
19037         <http://bugs.webkit.org/show_bug.cgi?id=16381>
19038
19039         Prevent the Cocoa event system from propagating key events to the parent WebHTMLView,
19040         as that results in us dispatching the key events for each frame going up the frame
19041         tree.
19042
19043         * WebView/WebHTMLView.mm:
19044         (-[WebHTMLView keyDown:]):
19045         (-[WebHTMLView keyUp:]):
19046         (-[WebHTMLView flagsChanged:]):
19047
19048 2008-03-21  Timothy Hatcher  <timothy@apple.com>
19049
19050         Bug 17980: Regression: Inspector highlighting of webpage not cleared when going to new URL
19051         http://bugs.webkit.org/show_bug.cgi?id=17980
19052
19053         Reviewed by Adam.
19054
19055         The new highlight drawing was not honoring the fade value, so it was
19056         always drawing at full opacity. The animation code didn't match Windows
19057         and the new highlight anyway, so it has been removed. The highlight
19058         how just detaches when it is hidden.
19059
19060         * WebCoreSupport/WebInspectorClient.mm:
19061         (-[WebInspectorWindowController windowShouldClose:]): Call hideHighlight.
19062         (-[WebInspectorWindowController close]): Ditto.
19063         (-[WebInspectorWindowController highlightNode:]): Call attach.
19064         (-[WebInspectorWindowController hideHighlight]): Call detach and release _currentHighlight.
19065         * WebInspector/WebNodeHighlight.h:
19066         * WebInspector/WebNodeHighlight.m:
19067         (-[WebNodeHighlight initWithTargetView:inspectorController:]):
19068         (-[WebNodeHighlight dealloc]): Assert we have no _highlightView.
19069         (-[WebNodeHighlight attach]): Renamed from attachHighlight.
19070         (-[WebNodeHighlight detach]): Renamed from detachHighlight.
19071         (-[WebNodeHighlight setNeedsUpdateInTargetViewRect:]): Renamed from setHolesNeedUpdateInTargetViewRect:.
19072         * WebInspector/WebNodeHighlightView.h:
19073         * WebInspector/WebNodeHighlightView.m:
19074         (-[WebNodeHighlightView setNeedsDisplayInRect:]): Renamed from setHolesNeedUpdateInRect:.
19075
19076 2008-03-20  Mark Rowe  <mrowe@apple.com>
19077
19078         Reviewed by Sam Weinig.
19079
19080         Ensure that the defines in FEATURE_DEFINES are sorted so that they will match the default settings of build-webkit.
19081         This will prevent the world from being rebuilt if you happen to switch between building in Xcode and with build-webkit on the
19082         command-line.
19083
19084         * Configurations/WebKit.xcconfig:
19085
19086 2008-03-20  Adam Roben  <aroben@apple.com>
19087
19088         Make WebNodeHighlightView use InspectorController to do its painting
19089
19090         Reviewed by Tim Hatcher.
19091
19092         * WebCoreSupport/WebInspectorClient.mm:
19093         (-[WebInspectorWindowController highlightNode:]): Pass the
19094         InspectorController to the WebNodeHighlight, and don't call
19095         setHighlightedNode: (which has been removed).
19096         (-[WebInspectorWindowController hideHighlight]): Removed call to
19097         setHighlightedNode:.
19098         * WebInspector/WebNodeHighlight.h:
19099           - Replaced _highlightNode with _inspectorController
19100           - Removed _highlightedNode accessors
19101           - Added -inspectorController method
19102         * WebInspector/WebNodeHighlight.m:
19103         (-[WebNodeHighlight initWithTargetView:inspectorController:]): Now
19104         takes an InspectorController* and stores it in _inspectorController.
19105         (-[WebNodeHighlight dealloc]): Removed code dealing with
19106         _highlightedNode.
19107         (-[WebNodeHighlight inspectorController]): Added.
19108         * WebInspector/WebNodeHighlightView.m: Removed FileInternal category.
19109         (-[WebNodeHighlightView isFlipped]): Added. WebCore expects all
19110         GraphicsContexts to be based on a flipped CGContext, so we have to
19111         specify that this view is flipped.
19112         (-[WebNodeHighlightView drawRect:]): Changed to create a
19113         GraphicsContext and pass it to InspectorController::drawNodeHighlight.
19114
19115 2008-03-18  David Hyatt  <hyatt@apple.com>
19116
19117         Add support for a preference in WebKit that can be used in nightly builds to test full page
19118         zoom.
19119
19120         Reviewed by Antti
19121
19122         * WebView/WebPreferenceKeysPrivate.h:
19123         * WebView/WebView.mm:
19124         (-[WebView setTextSizeMultiplier:]):
19125         (-[WebView canMakeTextSmaller]):
19126         (-[WebView makeTextSmaller:]):
19127         (-[WebView canMakeTextLarger]):
19128         (-[WebView makeTextLarger:]):
19129         (-[WebView canMakeTextStandardSize]):
19130         (-[WebView makeTextStandardSize:]):
19131
19132 2008-03-17  Eric Seidel  <eric@webkit.org>
19133
19134         Reviewed by darin.
19135
19136         Export _NPN_IntFromIdentifier as part of our NPAPI interface
19137
19138         * Plugins/WebNetscapePluginPackage.m:
19139         (-[WebNetscapePluginPackage load]):
19140
19141 2008-03-14  Brady Eidson  <beidson@apple.com>
19142
19143         Reviewed by Brian Dash's rubberstamp
19144
19145         Remove a class declaration for a class that has never existed
19146
19147         * WebView/WebResource.h:
19148
19149 2008-03-14  David D. Kilzer  <ddkilzer@apple.com>
19150
19151         Unify concept of enabling the Mac Java bridge.
19152
19153         Reviewed by Darin and Anders.
19154
19155         * Plugins/WebPluginJava.h: Removed unused file.
19156         * WebCoreSupport/WebFrameLoaderClient.h:
19157         (WebFrameLoaderClient::javaApplet): Added #if ENABLE(MAC_JAVA_BRIDGE) guard.
19158         * WebCoreSupport/WebFrameLoaderClient.mm: Ditto for #import and NSView SPI method.
19159         (WebFrameLoaderClient::javaApplet): Ditto.
19160
19161 2008-03-13  Antti Koivisto  <antti@apple.com>
19162
19163         Reviewed by Darin Adler.
19164
19165         * ForwardingHeaders/wtf/Deque.h: Added.
19166
19167 2008-03-13  Anders Carlsson  <andersca@apple.com>
19168
19169         Reviewed by Adam.
19170
19171         Call originalRequest, not initialRequest.
19172         
19173         * WebView/WebDataSource.mm:
19174         (-[WebDataSource initialRequest]):
19175
19176 2008-03-12  Darin Adler  <darin@apple.com>
19177
19178         Reviewed by John Sullivan.
19179
19180         - cleanup after removing the bridge
19181
19182         * DOM/WebDOMOperations.mm:
19183         (-[DOMDocument URLWithAttributeString:]): Call computeURL directly.
19184
19185         * Misc/WebCoreStatistics.mm:
19186         (-[WebFrame renderTreeAsExternalRepresentation]): Call externalRepresentation directly.
19187
19188         * Plugins/WebBaseNetscapePluginView.mm:
19189         (-[WebBaseNetscapePluginView loadPluginRequest:]): Use core function instead of
19190         _frameLoader method.
19191         (-[WebBaseNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
19192         Ditto.
19193         * Plugins/WebPluginController.mm:
19194         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Ditto.
19195
19196         * WebCoreSupport/WebFrameLoaderClient.mm:
19197         (WebFrameLoaderClient::frameLoaderDestroyed): Added a call to the new _clearCoreFrame
19198         method. Without this we could leave a stale frame pointer around.
19199         (WebFrameLoaderClient::dispatchDidReceiveIcon): Rewrote assertion so it's not the single
19200         caller of the _isMainFrame method.
19201         (WebFrameLoaderClient::transitionToCommittedForNewPage): Use core function instead of
19202         _frameLoader method.
19203         (WebFrameLoaderClient::createFrame): Moved code here from _addChild.
19204
19205         * WebView/WebFrame.mm: Removed lots of methods. Some were moved elsewhere, others
19206         turned out to be unused.
19207         (core): Added overload for DocumentFragment.
19208         (kit): Ditto.
19209         (-[WebFrame _loadURL:referrer:intoChild:]): Get to Frame using _private->coreFrame and
19210         to FrameLoader with _private->coreFrame->loader().
19211         (-[WebFrame _attachScriptDebugger]): Ditto.
19212         (-[WebFrame _clearCoreFrame]): Added.
19213         (-[WebFrame _updateBackground]): More of the same.
19214         (-[WebFrame _unmarkAllBadGrammar]): Ditto.
19215         (-[WebFrame _unmarkAllMisspellings]): Ditto.
19216         (-[WebFrame _hasSelection]): Ditto.
19217         (-[WebFrame _atMostOneFrameHasSelection]): Ditto.
19218         (-[WebFrame _findFrameWithSelection]): Ditto.
19219         (-[WebFrame _dataSource]): Ditto.
19220         (-[WebFrame _addData:]): Streamlined code a bit.
19221         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto.
19222         (-[WebFrame _receivedData:textEncodingName:]): Ditto.
19223         (-[WebFrame _isDescendantOfFrame:]): Ditto.
19224         (-[WebFrame _bodyBackgroundColor]): Ditto.
19225         (-[WebFrame _isFrameSet]): Ditto.
19226         (-[WebFrame _firstLayoutDone]): Ditto.
19227         (-[WebFrame _loadType]): Ditto.
19228         (-[WebFrame _isDisplayingStandaloneImage]): Ditto.
19229         (-[WebFrame name]): Ditto.
19230         (-[WebFrame DOMDocument]): Ditto.
19231         (-[WebFrame frameElement]): Ditto.
19232         (-[WebFrame provisionalDataSource]): Ditto.
19233         (-[WebFrame dataSource]): Ditto.
19234         (-[WebFrame loadRequest:]): Ditto.
19235         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): Ditto.
19236         (-[WebFrame loadArchive:]): Ditto.
19237         (-[WebFrame stopLoading]): Ditto.
19238         (-[WebFrame reload]): Ditto.
19239         (-[WebFrame findFrameNamed:]): Ditto.
19240         (-[WebFrame parentFrame]): Ditto.
19241         (-[WebFrame childFrames]): Ditto.
19242         (-[WebFrame windowObject]): Ditto.
19243         (-[WebFrame globalContext]): Ditto.
19244
19245         * WebView/WebFrameInternal.h: Added overloads of core and kit.
19246         Removed method declarations.
19247
19248         * WebView/WebHTMLRepresentation.mm:
19249         (-[WebHTMLRepresentation documentSource]): Moved code here from WebFrame.
19250         (formElementFromDOMElement): Ditto.
19251         (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto.
19252         (inputElementFromDOMElement): Ditto.
19253         (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto.
19254         (-[WebHTMLRepresentation elementIsPassword:]): Ditto.
19255         (-[WebHTMLRepresentation formForElement:]): Ditto.
19256         (-[WebHTMLRepresentation currentForm]): Ditto.
19257         (-[WebHTMLRepresentation controlsInForm:]): Ditto.
19258         (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto.
19259         (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto.
19260
19261         * WebView/WebHTMLView.mm:
19262         (-[WebHTMLView _frameOrBoundsChanged]): Moved sendScrollEvent code here from WebFrame.
19263         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
19264         Call createFragmentFromText directly instead of via WebFrame.
19265         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]):
19266         Moved layout calls here from WebFrame.
19267         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto.
19268         (-[WebHTMLView _updateFontPanel]): Ditto, but with fontForSelection.
19269         (-[WebHTMLView _canSmartCopyOrDelete]): Ditto, but with selectionGranularity.
19270         (-[WebHTMLView markedRange]): Moved code here from _markedTextNSRange.
19271         (-[WebHTMLView attributedSubstringFromRange:]): Tweaked code a bit.
19272         (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
19273         Moved code here from WebFrame.
19274         (-[WebHTMLView elementAtPoint:allowShadowContent:]): Ditto.
19275         (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto.
19276         (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto.
19277         (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto.
19278         (-[WebHTMLView unmarkAllTextMatches]): Ditto.
19279         (-[WebHTMLView rectsForTextMatches]): Ditto.
19280
19281         * WebView/WebHTMLViewInternal.h: Removed unused method declarations.
19282
19283         * WebView/WebPDFView.mm:
19284         (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Use core function instead of
19285         _frameLoader method.
19286
19287         * WebView/WebRenderNode.mm:
19288         (copyRenderNode): Moved code here from WebFrame.
19289         (-[WebRenderNode initWithWebFrameView:]): Ditto.
19290
19291         * WebView/WebResource.mm:
19292         (-[WebResource _stringValue]): Moved code here from WebFrame.
19293
19294         * WebView/WebView.mm:
19295         (-[WebView _close]): Use core function intsead of _frameLoader method.
19296         (-[WebView setCustomTextEncodingName:]): Ditto.
19297         (-[WebView setHostWindow:]): Moved code here from WebFrame.
19298         (aeDescFromJSValue): Moved this here from WebFrame.
19299         (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Moved code here from WebFrame.
19300
19301 2008-03-12  Darin Adler  <darin@apple.com>
19302
19303         Reviewed by Anders.
19304
19305         - http://bugs.webkit.org/show_bug.cgi?id=17640
19306           eliminate WebCoreFrameBridge
19307
19308         Moved all the code from the bridge into WebFrame. This need not be the final
19309         home of these methods -- they can be moved closer to their callers and improved
19310         further -- but it eliminates the bridge without requiring a rewrite of the code.
19311         It's a fairly mechanical process (just adding underscores to method names really).
19312
19313         There's even a chance that some of the methods are unused. Those we can remove
19314         after checking if that's so.
19315
19316         * DOM/WebDOMOperations.mm:
19317         (-[DOMNode markupString]): Use WebFrame rather than bridge.
19318         (-[DOMDocument webFrame]): Changed to use the core and kit functions
19319         instead of using the bridge.
19320         (-[DOMDocument URLWithAttributeString:]): Use WebFrame rather than bridge.
19321         (-[DOMRange markupString]): Ditto.
19322         * DOM/WebDOMOperationsPrivate.h: Removed _bridge methods.
19323
19324         * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded import.
19325         * History/WebHistoryItem.mm: Ditto.
19326
19327         * MigrateHeaders.make: Added DOMDocumentFragmentInternal.h.
19328         * Misc/WebCoreStatistics.mm:
19329         (-[WebFrame renderTreeAsExternalRepresentation]): Use WebFrame rather than bridge.
19330
19331         * Misc/WebElementDictionary.mm: Removed unneeded import.
19332
19333         * Misc/WebKitStatistics.m:
19334         (+[WebKitStatistics bridgeCount]): Removed WebBridgeCount and just return 0.
19335         * Misc/WebKitStatisticsPrivate.h: Ditto.
19336
19337         * Misc/WebNSAttributedStringExtras.mm: Removed unneeded import.
19338         * Misc/WebNSPasteboardExtras.mm: Ditto.
19339
19340         * Plugins/WebBaseNetscapePluginView.mm:
19341         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Use WebFrame
19342         rather than bridge.
19343
19344         * Plugins/WebNetscapePluginEmbeddedView.mm: Removed unneeded import.
19345         * Plugins/WebNetscapePluginStream.mm: Ditto.
19346
19347         * Plugins/WebPluginContainerCheck.mm:
19348         (-[WebPluginContainerCheck _isForbiddenFileLoad]): Use WebFrame rather than
19349         bridge to get to the WebCore::Frame.
19350
19351         * Plugins/WebPluginController.h: Declare webFrame method and remove bridge method.
19352         * Plugins/WebPluginController.mm:
19353         (-[WebPluginController webPlugInContainerLoadRequest:inFrame:]): Use WebFrame
19354         rather than bridge.
19355
19356         * WebCoreSupport/WebEditorClient.mm:
19357         (selectorForKeyEvent): Tweaked comment.
19358
19359         * WebCoreSupport/WebFrameBridge.h: Removed.
19360         * WebCoreSupport/WebFrameBridge.mm: Removed.
19361
19362         * WebCoreSupport/WebFrameLoaderClient.mm:
19363         (WebFrameLoaderClient::frameLoaderDestroyed): Removed bridge assertion.
19364         (WebFrameLoaderClient::detachedFromParent4): Removed bridge teardown code.
19365         I could remove this function entirely, but it looks like the Qt port is using it.
19366
19367         * WebCoreSupport/WebViewFactory.mm: Removed unneeded import.
19368
19369         * WebView/WebArchiver.mm:
19370         (+[WebArchiver archiveRange:]): Use WebFrame rather than bridge.
19371         (+[WebArchiver archiveNode:]): Ditto.
19372         (+[WebArchiver archiveSelectionInFrame:]): Ditto.
19373
19374         * WebView/WebDataSource.mm:
19375         (-[WebDataSource _replaceSelectionWithArchive:selectReplacement:]): Ditto.
19376         (-[WebDataSource _documentFragmentWithArchive:]): Ditto.
19377         (-[WebDataSource subresources]): Ditto.
19378         (-[WebDataSource subresourceForURL:]): Ditto.
19379
19380         * WebView/WebDataSourceInternal.h: Removed _bridge method.
19381
19382         * WebView/WebFrame.mm:
19383         (-[WebFramePrivate dealloc]): Removed code to release the bridge.
19384         (core): Go directly to the core frame, not via the bridge.
19385         (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
19386         Remove the code to deal with the bridge.
19387         (-[WebFrame _initWithWebFrameView:webView:]): Ditto. Also added code to set the
19388         shouldCreateRenderers flag, formerly on the bridge.
19389         (-[WebFrame _updateBackground]): Change to call mehods on self, not bridge.
19390         (aeDescFromJSValue): Moved here from bridge.
19391         (-[WebFrame _domain]): Ditto.
19392         (-[WebFrame _addData:]): Ditto.
19393         (-[WebFrame _stringWithDocumentTypeStringAndMarkupString:]): Ditto.
19394         (-[WebFrame _nodesFromList:]): Ditto.
19395         (-[WebFrame _markupStringFromNode:nodes:]): Ditto.
19396         (-[WebFrame _markupStringFromRange:nodes:]): Ditto.
19397         (-[WebFrame _selectedString]): Ditto.
19398         (-[WebFrame _stringForRange:]): Ditto.
19399         (-[WebFrame _forceLayoutAdjustingViewSize:]): Ditto.
19400         (-[WebFrame _forceLayoutWithMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
19401         (-[WebFrame _sendScrollEvent]): Ditto.
19402         (-[WebFrame _drawRect:]): Ditto.
19403         (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]): Ditto.
19404         (-[WebFrame _adjustPageHeightNew:top:bottom:limit:]): Ditto.
19405         (-[WebFrame _copyRenderNode:copier:]): Ditto.
19406         (-[WebFrame _copyRenderTree:]): Ditto.
19407         (inputElementFromDOMElement): Ditto.
19408         (formElementFromDOMElement): Ditto.
19409         (-[WebFrame _elementWithName:inForm:]): Ditto.
19410         (-[WebFrame _elementDoesAutoComplete:]): Ditto.
19411         (-[WebFrame _elementIsPassword:]): Ditto.
19412         (-[WebFrame _formForElement:]): Ditto.
19413         (-[WebFrame _currentForm]): Ditto.
19414         (-[WebFrame _controlsInForm:]): Ditto.
19415         (-[WebFrame _searchForLabels:beforeElement:]): Ditto.
19416         (-[WebFrame _matchLabels:againstElement:]): Ditto.
19417         (-[WebFrame _URLWithAttributeString:]): Ditto.
19418         (-[WebFrame _searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
19419         (-[WebFrame _markAllMatchesForText:caseSensitive:limit:]): Ditto.
19420         (-[WebFrame _markedTextMatchesAreHighlighted]): Ditto.
19421         (-[WebFrame _setMarkedTextMatchesAreHighlighted:]): Ditto.
19422         (-[WebFrame _unmarkAllTextMatches]): Ditto.
19423         (-[WebFrame _rectsForTextMatches]): Ditto.
19424         (-[WebFrame _stringByEvaluatingJavaScriptFromString:]): Ditto.
19425         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]): Ditto.
19426         (-[WebFrame _aeDescByEvaluatingJavaScriptFromString:]): Ditto.
19427         (-[WebFrame _caretRectAtNode:offset:affinity:]): Ditto.
19428         (-[WebFrame _firstRectForDOMRange:]): Ditto.
19429         (-[WebFrame _scrollDOMRangeToVisible:]): Ditto.
19430         (-[WebFrame _baseURL]): Ditto.
19431         (-[WebFrame _stringWithData:]): Ditto.
19432         (+[WebFrame _stringWithData:textEncodingName:]): Ditto.
19433         (-[WebFrame _needsLayout]): Ditto.
19434         (-[WebFrame _renderTreeAsExternalRepresentation]): Ditto.
19435         (-[WebFrame _accessibilityTree]): Ditto.
19436         (-[WebFrame _setBaseBackgroundColor:]): Ditto.
19437         (-[WebFrame _setDrawsBackground:]): Ditto.
19438         (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:SelectionController::granularity:]):
19439         Ditto.
19440         (-[WebFrame _selectionGranularity]): Ditto.
19441         (-[WebFrame _convertToNSRange:]): Ditto.
19442         (-[WebFrame _convertToDOMRange:]): Ditto.
19443         (-[WebFrame _convertNSRangeToDOMRange:]): Ditto.
19444         (-[WebFrame _convertDOMRangeToNSRange:]): Ditto.
19445         (-[WebFrame _markDOMRange]): Ditto.
19446         (-[WebFrame _markedTextNSRange]): Ditto.
19447         (-[WebFrame _smartDeleteRangeForProposedRange:]): Ditto.
19448         (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
19449         (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]): Ditto.
19450         (-[WebFrame _documentFragmentWithText:inContext:]): Ditto.
19451         (-[WebFrame _documentFragmentWithNodesAsParagraphs:]): Ditto.
19452         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]): Ditto.
19453         (-[WebFrame _replaceSelectionWithNode:selectReplacement:smartReplace:matchStyle:]): Ditto.
19454         (-[WebFrame _replaceSelectionWithMarkupString:baseURLString:selectReplacement:smartReplace:]): Ditto.
19455         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]): Ditto.
19456         (-[WebFrame _insertParagraphSeparatorInQuotedContent]): Ditto.
19457         (-[WebFrame _visiblePositionForPoint:]): Ditto.
19458         (-[WebFrame _characterRangeAtPoint:]): Ditto.
19459         (-[WebFrame _typingStyle]): Ditto.
19460         (-[WebFrame _setTypingStyle:withUndoAction:]): Ditto.
19461         (-[WebFrame _fontForSelection:]): Ditto.
19462         (-[WebFrame _dragSourceMovedTo:]): Ditto.
19463         (-[WebFrame _dragSourceEndedAt:operation:]): Ditto.
19464         (-[WebFrame _getData:andResponse:forURL:]): Ditto.
19465         (-[WebFrame _getAllResourceDatas:andResponses:]): Ditto.
19466         (-[WebFrame _canProvideDocumentSource]): Ditto.
19467         (-[WebFrame _canSaveAsWebArchive]): Ditto.
19468         (-[WebFrame _receivedData:textEncodingName:]): Ditto.
19469         (-[WebFrame _setShouldCreateRenderers:]): Put the code from the bridge in this preexisting
19470         function. Couldn't just keep the bridge method because this was already here with the same name.
19471         (-[WebFrame _selectedNSRange]): Ditto.
19472         (-[WebFrame _selectNSRange:]): Ditto.
19473         (-[WebFrame dealloc]): Remove bridge-related code.
19474         (-[WebFrame finalize]): Ditto.
19475
19476         * WebView/WebFrameInternal.h: Added all the method declarations from the bridge.
19477         Removed the bridge parameter from the init method. Removed the #if blocks that
19478         tried to make this header work in non-C++ ObjC files -- they were broken and unused.
19479         Removed the _bridge method.
19480
19481         * WebView/WebFrameView.mm: Removed the _bridge method.
19482
19483         * WebView/WebHTMLRepresentation.mm:
19484         (-[WebHTMLRepresentation setDataSource:]): Removed the code to set up the bridge
19485         field.
19486         (-[WebHTMLRepresentation receivedData:withDataSource:]): Use WebFrame instead of bridge.
19487         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]): Ditto.
19488         (-[WebHTMLRepresentation canProvideDocumentSource]): Ditto.
19489         (-[WebHTMLRepresentation canSaveAsWebArchive]): Ditto.
19490         (-[WebHTMLRepresentation documentSource]): Ditto.
19491         (-[WebHTMLRepresentation DOMDocument]): Ditto.
19492         (-[WebHTMLRepresentation elementWithName:inForm:]): Ditto.
19493         (-[WebHTMLRepresentation elementDoesAutoComplete:]): Ditto.
19494         (-[WebHTMLRepresentation elementIsPassword:]): Ditto.
19495         (-[WebHTMLRepresentation formForElement:]): Ditto.
19496         (-[WebHTMLRepresentation currentForm]): Ditto.
19497         (-[WebHTMLRepresentation controlsInForm:]): Ditto.
19498         (-[WebHTMLRepresentation searchForLabels:beforeElement:]): Ditto.
19499         (-[WebHTMLRepresentation matchLabels:againstElement:]): Ditto.
19500
19501         * WebView/WebHTMLRepresentationPrivate.h: Removed the _bridge method.
19502
19503         * WebView/WebHTMLView.mm:
19504         (-[WebHTMLView _documentFragmentWithPaths:]): Use WebFrame instead of bridge.
19505         (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]): Ditto.
19506         (-[WebHTMLView _pasteAsPlainTextWithPasteboard:]): Ditto.
19507         (-[WebHTMLView _updateTextSizeMultiplier]): Ditto.
19508         (-[WebHTMLView _frameOrBoundsChanged]): Ditto.
19509         (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]): Ditto.
19510         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]): Ditto.
19511         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Ditto.
19512         (-[WebHTMLView drawSingleRect:]): Ditto.
19513         (-[WebHTMLView draggedImage:movedTo:]): Ditto.
19514         (-[WebHTMLView draggedImage:endedAt:operation:]): Ditto.
19515         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Ditto.
19516         (-[WebHTMLView knowsPageRange:]): Ditto.
19517         (-[WebHTMLView accessibilityAttributeValue:]): Ditto.
19518         (-[WebHTMLView accessibilityFocusedUIElement]): Ditto.
19519         (-[WebHTMLView accessibilityHitTest:]): Ditto.
19520         (-[WebHTMLView _accessibilityParentForSubview:]): Ditto.
19521         (-[WebHTMLView changeDocumentBackgroundColor:]): Ditto.
19522         (-[WebHTMLView _changeWordCaseWithSelector:]): Ditto.
19523         (-[WebHTMLView _changeSpellingToWord:]): Ditto.
19524         (-[WebHTMLView startSpeaking:]): Ditto.
19525         (-[WebHTMLView _updateFontPanel]): Ditto.
19526         (-[WebHTMLView _canSmartCopyOrDelete]): Ditto.
19527         (-[WebHTMLView _layoutIfNeeded]): Ditto.
19528         (-[WebHTMLView characterIndexForPoint:]): Ditto.
19529         (-[WebHTMLView firstRectForCharacterRange:]): Ditto.
19530         (-[WebHTMLView selectedRange]): Ditto.
19531         (-[WebHTMLView markedRange]): Ditto.
19532         (-[WebHTMLView attributedSubstringFromRange:]): Ditto.
19533         (-[WebHTMLView setMarkedText:selectedRange:]): Ditto.
19534         (-[WebHTMLView insertText:]): Ditto.
19535         (-[WebTextCompleteController _insertMatch:]): Ditto.
19536         (-[WebTextCompleteController doCompletion]): Ditto.
19537         (-[WebTextCompleteController endRevertingChange:moveLeft:]): Ditto.
19538         (-[WebHTMLView string]): Ditto.
19539         (-[WebHTMLView selectedString]): Ditto.
19540         (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]): Ditto.
19541         (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]): Ditto.
19542         (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]): Ditto.
19543         (-[WebHTMLView markedTextMatchesAreHighlighted]): Ditto.
19544         (-[WebHTMLView unmarkAllTextMatches]): Ditto.
19545         (-[WebHTMLView rectsForTextMatches]): Ditto.
19546         * WebView/WebRenderNode.mm:
19547         (-[WebRenderNode initWithWebFrameView:]): Ditto.
19548         * WebView/WebResource.mm:
19549         (-[WebResource _stringValue]): Ditto.
19550
19551         * WebView/WebScriptDebugDelegate.mm: Removed unneeded include.
19552
19553         * WebView/WebView.mm:
19554         (-[WebView _dashboardRegions]): Use WebFrame instead of bridge.
19555         (-[WebView setProhibitsMainFrameScrolling:]): Ditto.
19556         (-[WebView _setInViewSourceMode:]): Ditto.
19557         (-[WebView _inViewSourceMode]): Ditto.
19558         (-[WebView _executeCoreCommandByName:value:]): Ditto.
19559         (-[WebView stringByEvaluatingJavaScriptFromString:]): Ditto.
19560         (-[WebView aeDescByEvaluatingJavaScriptFromString:]): Ditto.
19561         (-[WebView scrollDOMRangeToVisible:]): Ditto.
19562         (-[WebView setSelectedDOMRange:affinity:]): Ditto.
19563         (-[WebView setEditable:]): Ditto.
19564         (-[WebView setTypingStyle:]): Ditto.
19565         (-[WebView typingStyle]): Ditto.
19566         (-[WebView replaceSelectionWithNode:]): Ditto.
19567         (-[WebView replaceSelectionWithText:]): Ditto.
19568         (-[WebView replaceSelectionWithMarkupString:]): Ditto.
19569         (-[WebView replaceSelectionWithArchive:]): Ditto.
19570         (-[WebView _insertNewlineInQuotedContent]): Ditto.
19571         (-[WebView _replaceSelectionWithNode:matchStyle:]): Ditto.
19572
19573 2008-03-12  David Hyatt  <hyatt@apple.com>
19574
19575         Make the zoom factor a float and not a percent.
19576
19577         Reviewed by antti
19578
19579         * WebView/WebView.mm:
19580         (-[WebView _setZoomMultiplier:isTextOnly:]):
19581
19582 2008-03-11  David Hyatt  <hyatt@apple.com>
19583
19584         This patch prepares Mac WebKit to handle two different zooming modes (full page zoom and text only zoom).
19585         New API is added that is parallel to the text zoom public API.  You can get/set a pageSizeMultiplier and you
19586         can zoom the page in, out or reset it to the standard size.
19587
19588         In the implementation only one zoom factor is stored, and setting one multiplier will shift you into that mode
19589         and set the common zoom factor.  In other words you can't combine text zoom and page zoom.  One will always
19590         win.
19591
19592         Reviewed by Tim H.
19593
19594         * WebCoreSupport/WebFrameBridge.mm:
19595         (-[WebFrameBridge finishInitializingWithPage:frameName:WebCore::frameView:ownerElement:]):
19596         * WebView/WebDocumentInternal.h:
19597         * WebView/WebHTMLView.mm:
19598         (-[WebHTMLView viewDidMoveToSuperview]):
19599         * WebView/WebPDFView.h:
19600         * WebView/WebPDFView.mm:
19601         (-[WebPDFView _zoomOut:]):
19602         (-[WebPDFView _zoomIn:]):
19603         (-[WebPDFView _resetZoom:]):
19604         (-[WebPDFView _canZoomOut]):
19605         (-[WebPDFView _canZoomIn]):
19606         (-[WebPDFView _canResetZoom]):
19607         * WebView/WebView.mm:
19608         (-[WebViewPrivate init]):
19609         (-[WebView setTextSizeMultiplier:]):
19610         (-[WebView textSizeMultiplier]):
19611         (-[WebView _setZoomMultiplier:isTextOnly:]):
19612         (-[WebView _zoomMultiplier:]):
19613         (-[WebView _realZoomMultiplier]):
19614         (-[WebView _realZoomMultiplierIsTextOnly]):
19615         (-[WebView _canZoomOut:]):
19616         (-[WebView _canZoomIn:]):
19617         (-[WebView _zoomOut:isTextOnly:]):
19618         (-[WebView _zoomIn:isTextOnly:]):
19619         (-[WebView _canResetZoom:]):
19620         (-[WebView _resetZoom:isTextOnly:]):
19621         (-[WebView canMakeTextSmaller]):
19622         (-[WebView makeTextSmaller:]):
19623         (-[WebView canMakeTextLarger]):
19624         (-[WebView makeTextLarger:]):
19625         (-[WebView canMakeTextStandardSize]):
19626         (-[WebView makeTextStandardSize:]):
19627         (-[WebView setPageSizeMultiplier:]):
19628         (-[WebView pageSizeMultiplier]):
19629         (-[WebView canZoomPageIn]):
19630         (-[WebView zoomPageIn:]):
19631         (-[WebView canZoomPageOut]):
19632         (-[WebView zoomPageOut:]):
19633         (-[WebView canResetPageZoom]):
19634         (-[WebView resetPageZoom:]):
19635         (-[WebView _searchWithSpotlightFromMenu:]):
19636         * WebView/WebViewInternal.h:
19637         * WebView/WebViewPrivate.h:
19638
19639 2008-03-12  Dan Bernstein  <mitz@apple.com>
19640
19641         Reviewed by Darin Adler and Sam Weinig.
19642
19643         - <rdar://problem/4433248> use CoreText API instead of SPI on Leopard
19644
19645         * WebCoreSupport/WebSystemInterface.m:
19646         (InitWebCoreSystemInterface): Made WKGetCGFontFromNSFont and
19647         WKGetNSFontATSUFontId Tiger-only.
19648
19649 2008-03-12  Darin Adler  <darin@apple.com>
19650
19651         - fix http://bugs.webkit.org/show_bug.cgi?id=17794
19652           REGRESSION (r30980): 23 tests hanging on the Mac buildbot
19653
19654         * WebView/WebFrame.mm:
19655         (-[WebFrame _initWithWebFrameView:webView:bridge:]): Added missing call to set
19656         up pointer from the bridge to the frame. (My next check-in removes the bridge
19657         entirely, but we need this until then.)
19658
19659 2008-03-11  Darin Adler  <darin@apple.com>
19660
19661         Reviewed by Sam.
19662
19663         - remove all bridge-related things from WebCore except the bridge itself
19664
19665         * DOM/WebDOMOperations.mm:
19666         (-[DOMNode _bridge]): Reimplemented to not use the bridgeForDOMDocument: method.
19667
19668         * DefaultDelegates/WebDefaultContextMenuDelegate.mm: Removed unneeded include.
19669
19670         * Plugins/WebPluginController.mm: Ditto.
19671
19672         * WebCoreSupport/WebFrameBridge.h: Removed unneeded things, including the
19673         init and close methods. Added a setWebFrame: method.
19674
19675         * WebCoreSupport/WebFrameBridge.mm:
19676         (-[WebFrameBridge setWebFrame:]): Added.
19677
19678         * WebCoreSupport/WebFrameLoaderClient.mm:
19679         (WebFrameLoaderClient::frameLoaderDestroyed): Added an assertion.
19680         (WebFrameLoaderClient::detachedFromParent4): Moved the call to close on the
19681         bridge here. Soon we will be able to remove this entirely!
19682         (WebFrameLoaderClient::createFrame): Rewrote this to use the method moved
19683         into WebFrame from the bridge.
19684
19685         * WebView/WebFrame.mm:
19686         (-[WebFramePrivate dealloc]): Added code to release the bridge, because it's
19687         now owned by the frame.
19688         (-[WebFramePrivate finalize]): Added this missing method. We'd leak the script
19689         debugger under GC without this!
19690         (kit): Rewrote the function that maps from a WebCore::Frame to a WebFrame to
19691         use WebFrameLoaderClient instead of the bridge.
19692         (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]): Added.
19693         This is code that used to live in the bridge's init function.
19694         (+[WebFrame _createMainFrameWithPage:frameName:frameView:]): Ditto.
19695         (+[WebFrame WebCore::_createSubframeWithOwnerElement:frameName:frameView:]): Ditto.
19696         (-[WebFrame _initWithWebFrameView:webView:bridge:]): Retain the bridge, since
19697         the WebView is now the bridge's owner.
19698         (-[WebFrame _updateBackground]): Changed this one call site that was calling the
19699         WebCore::Frame::bridge function directly to use the kit function instead.
19700         (-[WebFrame dealloc]): Added code to clear the WebFrame pointer in the bridge.
19701         This code won't last long -- we're eliminating the bridge soon.
19702         (-[WebFrame finalize]): Ditto.
19703
19704         * WebView/WebFrameInternal.h: Added a coreFrame backpointer and two new methods
19705         for creating frames.
19706
19707         * WebView/WebView.mm:
19708         (-[WebView _commonInitializationWithFrameName:groupName:]): Rewrote this to use
19709         the method moved into WebFrame from the bridge. Gets rid of the unpleasant idiom
19710         where we have to allocate a WebFrameBridge and then immediately release it.
19711
19712 2008-03-11  Darin Adler  <darin@apple.com>
19713
19714         Reviewed by Anders.
19715
19716         - remove code depending on the bridge to get from an NSView to a WebCore::Frame
19717
19718         * WebCoreSupport/WebFrameLoaderClient.mm:
19719         (WebFrameLoaderClient::transitionToCommittedForNewPage): Remove incorrect call
19720         to setView. A couple lines later, there is a call to _install, which sets the
19721         view to the scroll view.
19722
19723         * WebCoreSupport/WebViewFactory.mm: Removed bridgeForView method.
19724
19725         * WebView/WebDynamicScrollBarsView.h: Moved most of the declarations out of
19726         this file, since it's used by Safari.
19727         * WebView/WebDynamicScrollBarsViewInternal.h: Added.
19728         * WebView/WebDynamicScrollBarsView.m:
19729         (-[WebDynamicScrollBarsView updateScrollers]): Ditto.
19730         (-[WebDynamicScrollBarsView setAllowsScrolling:]): Ditto.
19731         (-[WebDynamicScrollBarsView allowsScrolling]): Ditto.
19732         (-[WebDynamicScrollBarsView setAllowsHorizontalScrolling:]): Ditto.
19733         (-[WebDynamicScrollBarsView setAllowsVerticalScrolling:]): Ditto.
19734         (-[WebDynamicScrollBarsView allowsHorizontalScrolling]): Ditto.
19735         (-[WebDynamicScrollBarsView allowsVerticalScrolling]): Ditto.
19736         (-[WebDynamicScrollBarsView horizontalScrollingMode]): Ditto.
19737         (-[WebDynamicScrollBarsView verticalScrollingMode]): Ditto.
19738         (-[WebDynamicScrollBarsView setHorizontalScrollingMode:]): Ditto.
19739         (-[WebDynamicScrollBarsView setHorizontalScrollingMode:andLock:]): Ditto.
19740         (-[WebDynamicScrollBarsView setVerticalScrollingMode:]): Ditto.
19741         (-[WebDynamicScrollBarsView setVerticalScrollingMode:andLock:]): Ditto.
19742         (-[WebDynamicScrollBarsView setScrollingMode:]): Ditto.
19743         (-[WebDynamicScrollBarsView setScrollingMode:andLock:]): Ditto.
19744
19745         * WebView/WebFrameView.mm:
19746         (-[WebFrameView _web_frame]): Added. Replaces the webCoreBridge method.
19747
19748         * WebView/WebView.mm:
19749         (-[WebView setAlwaysShowVerticalScroller:]): Updated for changes to WebCoreFrameView.h.
19750         (-[WebView alwaysShowVerticalScroller]): Ditto.
19751         (-[WebView setAlwaysShowHorizontalScroller:]): Ditto.
19752         (-[WebView alwaysShowHorizontalScroller]): Ditto.
19753
19754 2008-03-11  Darin Adler  <darin@apple.com>
19755
19756         Reviewed by Sam.
19757
19758         - eliminate the remaining parts of WebCoreBridge used for calls to WebKit from WebCore
19759
19760         * WebCoreSupport/WebChromeClient.h: Added new virtual functions that replace
19761         bridge methods.
19762         * WebCoreSupport/WebChromeClient.mm: Added lots of BEGIN_BLOCK_OBJC_EXCEPTIONS
19763         to recently-created functions.
19764         (WebChromeClient::firstResponder): Moved code here from the bridge.
19765         (WebChromeClient::makeFirstResponder): Ditto.
19766         (WebChromeClient::runOpenPanel): Ditto.
19767         (WebChromeClient::willPopUpMenu): Ditto.
19768
19769         * WebCoreSupport/WebFrameBridge.h: Removed almost everything. What's left
19770         is related to creating the bridge and connecting it to WebCore, which will
19771         go next when I eliminate use of the bridge to get to/from the Frame*.
19772         * WebCoreSupport/WebFrameBridge.mm:
19773         (-[WebFrameBridge close]): Moved the code to track the bridge count here
19774         instead of the dealloc and finalize methods.
19775
19776 2008-03-11  Darin Adler  <darin@apple.com>
19777
19778         Reviewed by Mitz.
19779
19780         - update code affected by Range changes
19781
19782         * Misc/WebNSAttributedStringExtras.mm:
19783         (+[NSAttributedString _web_attributedStringFromRange:]): Update for name changes.
19784         * WebView/WebHTMLRepresentation.mm:
19785         (-[WebHTMLRepresentation attributedStringFrom:startOffset:to:endOffset:]):
19786         Use Range::create.
19787         * WebView/WebHTMLView.mm:
19788         (-[WebHTMLView attributedString]): Ditto.
19789
19790 2008-03-10  Darin Adler  <darin@apple.com>
19791
19792         Reviewed by Sam.
19793
19794         - eliminate keyboard UI mode method from WebCoreFrameBridge
19795
19796         * WebCoreSupport/WebChromeClient.h: Added keyboardUIMode function.
19797         * WebCoreSupport/WebChromeClient.mm:
19798         (WebChromeClient::keyboardUIMode): Ditto. Calls WebView.
19799         * WebCoreSupport/WebFrameBridge.h: Removed unused things, including the
19800         fields for keyboard UI mode.
19801         * WebCoreSupport/WebFrameBridge.mm:
19802         (-[WebFrameBridge dealloc]): Removed unneeded code; eliminated the fini
19803         method.
19804         (-[WebFrameBridge finalize]): Ditto.
19805         * WebView/WebView.mm: Moved the keyboard mode code in here.
19806         (-[WebView _close]): Remove observer from the distributed notification
19807         center as well as the normal one.
19808         (-[WebView _retrieveKeyboardUIModeFromPreferences:]): Added. Code moved
19809         here from the bridge.
19810         (-[WebView _keyboardUIMode]): Ditto.
19811         * WebView/WebViewInternal.h: Added _keyboardUIMode method.
19812
19813 2008-03-10  Darin Adler  <darin@apple.com>
19814
19815         Reviewed by Sam.
19816
19817         - eliminate Java applet methods from WebCoreFrameBridge
19818
19819         * WebCoreSupport/WebChromeClient.mm: Removed unneeded headers and declarations.
19820         * WebCoreSupport/WebFrameBridge.mm: Ditto. Also removed unneeded methods, including
19821         the ones that load Java applets.
19822         * WebCoreSupport/WebFrameLoaderClient.h: Added javaApplet function.
19823         * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
19824
19825 2008-03-07  Simon Hausmann  <hausmann@webkit.org>
19826
19827         Reviewed by Darin Adler.
19828
19829         Done with Lars.
19830
19831         Simplified WebViewFactory's refreshPlugins method to only refresh the
19832         plugins and not reload the frames anymore since that's now done in a
19833         platform independent manner by WebCore::Page.
19834
19835         Also removed the now unused pluginNameForMIMEType and
19836         pluginSupportsMIMEType methods.
19837
19838         * WebCoreSupport/WebViewFactory.mm:
19839         * WebView/WebFrame.mm:
19840         * WebView/WebFrameInternal.h:
19841         * WebView/WebView.mm:
19842
19843 2008-03-08  Mark Rowe  <mrowe@apple.com>
19844
19845         Reviewed by Darin Adler.
19846
19847         Fix 64-bit build with GCC 4.2.
19848
19849         * DefaultDelegates/WebDefaultScriptDebugDelegate.m: Use NSUInteger in place of unsigned where required.
19850         * DefaultDelegates/WebDefaultUIDelegate.m: Ditto.
19851         * History/WebHistoryItem.mm: Ditto.
19852         * Misc/WebElementDictionary.mm: Ditto.
19853         * WebCoreSupport/WebFrameLoaderClient.mm:
19854         (WebFrameLoaderClient::objectContentType): Move variable declaration outside of if to avoid warning about the
19855         variable being unused in 64-bit.
19856         * WebCoreSupport/WebInspectorClient.mm: Use NSUInteger in place of unsigned where required.
19857         * WebView/WebHTMLView.mm:
19858         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Use CGFloat in place of float where required.
19859         (-[WebTextCompleteController numberOfRowsInTableView:]): Use NSInteger in place of int where required.
19860
19861 2008-03-08  Darin Adler  <darin@apple.com>
19862
19863         Reviewed by Adele.
19864
19865         - eliminate custom highlight methods from WebCoreFrameBridge
19866
19867         * WebCoreSupport/WebChromeClient.h: Added custom highlight functions.
19868         * WebCoreSupport/WebChromeClient.mm:
19869         (WebChromeClient::customHighlightRect): Moved code here from bridge.
19870         (WebChromeClient::paintCustomHighlight): Ditto.
19871         * WebCoreSupport/WebFrameBridge.mm: Removed code here.
19872
19873 2008-03-07  David D. Kilzer  <ddkilzer@apple.com>
19874
19875         Unify concept of enabling Netscape Plug-in API (NPAPI).
19876
19877         Reviewed by Darin Adler.
19878
19879         * WebKit.exp: Removed unused class export for WebBaseNetscapePluginView.
19880
19881         * WebKitPrefix.h: Removed WTF_USE_NPOBJECT since we now use
19882         ENABLE(NETSCAPE_PLUGIN_API) as defined in Platform.h.
19883
19884         * Plugins/WebBaseNetscapePluginStream.h: Replaced #ifndef __LP64__ with
19885         #if ENABLE(NETSCAPE_PLUGIN_API).
19886         * Plugins/WebBaseNetscapePluginStream.mm: Ditto.
19887         * Plugins/WebBaseNetscapePluginView.h: Ditto.
19888         * Plugins/WebBaseNetscapePluginView.mm: Ditto.
19889         * Plugins/WebBaseNetscapePluginViewInternal.h: Ditto.
19890         * Plugins/WebBaseNetscapePluginViewPrivate.h: Ditto.
19891         * Plugins/WebBasePluginPackage.h: Ditto.
19892         * Plugins/WebBasePluginPackage.m: Ditto.
19893         (+[WebBasePluginPackage pluginWithPath:]):
19894         * Plugins/WebNetscapeDeprecatedFunctions.c: Ditto.
19895         * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto.
19896         * Plugins/WebNetscapePluginEmbeddedView.h: Ditto.
19897         * Plugins/WebNetscapePluginEmbeddedView.mm: Ditto.
19898         * Plugins/WebNetscapePluginPackage.h: Ditto.
19899         * Plugins/WebNetscapePluginPackage.m: Ditto.
19900         * Plugins/WebNetscapePluginStream.h: Ditto.
19901         * Plugins/WebNetscapePluginStream.mm: Ditto.
19902         * Plugins/WebPluginDatabase.m: Ditto.
19903         (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]):
19904         * Plugins/npapi.m: Ditto.
19905         * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
19906         (WebFrameLoaderClient::objectContentType):
19907         (WebFrameLoaderClient::createPlugin):
19908         * WebView/WebHTMLView.mm: Ditto.
19909         (-[NSArray _web_makePluginViewsPerformSelector:withObject:]):
19910         * WebView/WebHTMLViewInternal.h: Ditto.
19911
19912         * WebView/WebFrame.mm: Replaced #ifndef __LP64__ with
19913         #if ENABLE(NETSCAPE_PLUGIN_API). Moved methods below from (WebPrivate)
19914         category to (WebInternal) category so we don't expose the ENABLE() macro
19915         from the private header.
19916         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
19917         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
19918         * WebView/WebFrameInternal.h: Ditto.
19919         * WebView/WebFramePrivate.h: Ditto.
19920
19921 2008-03-07  Alexey Proskuryakov  <ap@webkit.org>
19922
19923         Reviewed by Darin Adler.
19924
19925         <rdar://problem/5579292> REGRESSION: (safari 2-3): "Default default" encoding for Korean
19926         changed from Korean (Windows, DOS) to Korean (ISO 2022-KR), which breaks some sites
19927
19928         * WebView/WebPreferences.m:
19929         (+[WebPreferences _setInitialDefaultTextEncodingToSystemEncoding]): Make encoding name match
19930         the one used in Safari.
19931
19932 2008-03-07  Mark Rowe  <mrowe@apple.com>
19933
19934         Reviewed by Oliver Hunt.
19935
19936         Fix WebKit build with GCC 4.2.
19937
19938         * Plugins/WebBaseNetscapePluginView.mm: Use the correct return type in method signature.
19939
19940 2008-03-07  Darin Adler  <darin@apple.com>
19941
19942         Reviewed by Adam.
19943
19944         - eliminated WebCoreFrameBridge runOpenPanel
19945
19946         * WebCoreSupport/WebChromeClient.h: Added runOpenPanel.
19947         * WebCoreSupport/WebChromeClient.mm:
19948         (WebChromeClient::runOpenPanel): Added.
19949         (-[WebOpenPanelResultListener initWithChooser:]): Added. Used to wrap the
19950         FileChooser so it can get a result from the UI delegate.
19951         (-[WebOpenPanelResultListener dealloc]): Added.
19952         (-[WebOpenPanelResultListener finalize]): Added.
19953         (-[WebOpenPanelResultListener cancel]): Added.
19954         (-[WebOpenPanelResultListener chooseFilename:]): Added.
19955
19956 2008-03-06  Darin Adler  <darin@apple.com>
19957
19958         Reviewed by Mitz.
19959
19960         - fix regression test failures from the visited-link change
19961
19962         * History/WebHistory.mm:
19963         (+[WebHistory setOptionalSharedHistory:]): Call PageGroup::setShouldTrackVisitedLinks
19964         to turn off visited links if there is no history object. Also call
19965         removeAllVisitedLinks so we can start over from scratch with the new history.
19966
19967 2008-03-06  Dan Bernstein  <mitz@apple.com>
19968
19969         Reviewed by Darin Adler.
19970
19971         - fix a regression from r30741: a crash under
19972           WebFrameLoaderClient::createPlugin() when showing a Mail message with
19973           an attachment
19974
19975         * WebCoreSupport/WebFrameLoaderClient.mm:
19976         (WebFrameLoaderClient::createPlugin):
19977
19978 2008-03-06  Darin Adler  <darin@apple.com>
19979
19980         - fix Tiger build
19981
19982         * History/WebHistory.mm: Added include of WebTypesInternal.h.
19983
19984 2008-03-06  Darin Adler  <darin@apple.com>
19985
19986         - fix Release build
19987
19988         * History/WebHistory.mm:
19989         (-[WebHistoryPrivate setLastVisitedTimeInterval:forItem:]): Removed underscore.
19990         (-[WebHistoryPrivate loadFromURL:collectDiscardedItemsInto:error:]): Added #if.
19991         (-[WebHistoryPrivate saveToURL:error:]): Ditto.
19992
19993 2008-03-06  Darin Adler  <darin@apple.com>
19994
19995         Reviewed by Mitz.
19996
19997         - fix http://bugs.webkit.org/show_bug.cgi?id=17526
19998           REGRESSION: iframes are added to Safari's History menu
19999           by separating the visited link machinery from global history
20000
20001         * History/WebHistory.mm: Moved WebHistoryPrivate inside this file.
20002         (-[WebHistoryPrivate removeItemFromDateCaches:]): Removed the underscore from this
20003         method name, since it's on a private object.
20004         (-[WebHistoryPrivate removeItemForURLString:]): Added a call to the
20005         PageGroup::removeAllVisitedLinks function if the last URL was removed.
20006         (-[WebHistoryPrivate addItemToDateCaches:]): Removed the underscore from this
20007         method name, since it's on a private object.
20008         (-[WebHistoryPrivate removeAllItems]): Call PageGroup::removeAllVisitedLinks.
20009         (-[WebHistoryPrivate ageLimitDate]): Removed the underscore from this
20010         method name, since it's on a private object.
20011         (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]):
20012         Ditto.
20013         (-[WebHistoryPrivate saveHistoryGuts:URL:error:]): Ditto. Also changed this
20014         to correctly return the error by using the newer version of writeToURL: and
20015         removed the FIXME about that.
20016         (-[WebHistoryPrivate addVisitedLinksToPageGroup:]): Added. Calls addVisitedLink
20017         for every link in the history.
20018         (-[WebHistory saveToURL:error:]): Removed the FIXME, since we do get the error now.
20019         (-[WebHistory addItem:]): Moved into the WebPrivate category.
20020         (-[WebHistory addItemForURL:]): Ditto.
20021         (-[WebHistory _addItemForURL:title:]): Added. Used for the normal case where we
20022         create an item and already know its title.
20023         (-[WebHistory ageLimitDate]): Moved into the WebPrivate category.
20024         (-[WebHistory containsItemForURLString:]): Ditto.
20025         (-[WebHistory removeItem:]): Ditto.
20026         (-[WebHistory setLastVisitedTimeInterval:forItem:]): Ditto.
20027         (-[WebHistory _itemForURLString:]): Ditto.
20028         (-[WebHistory _addVisitedLinksToPageGroup:]): Added. For use only inside WebKit.
20029
20030         * History/WebHistoryInternal.h: Added.
20031         * History/WebHistoryItemInternal.h: Tweaked formatting and includes.
20032         * History/WebHistoryPrivate.h: Moved the WebHistoryPrivate class out of this header.
20033         Also reorganized what was left behind.
20034
20035         * WebCoreSupport/WebChromeClient.h: Added populateVisitedLinks.
20036         * WebCoreSupport/WebChromeClient.mm:
20037         (WebChromeClient::populateVisitedLinks): Added a call to the new
20038         -[WebHistory _addVisitedLinksToPageGroup:] method.
20039
20040         * WebCoreSupport/WebFrameLoaderClient.mm:
20041         (WebFrameLoaderClient::updateGlobalHistory): Changed code to use the new
20042         -[WebHistory _addItemForURL:title:] method.
20043
20044 2008-03-05  Adam Roben  <aroben@apple.com>
20045
20046         Rename WebCoreScriptDebuggerImp.{h,mm} to WebScriptDebugger.{h,mm}
20047
20048         Reviewed by Kevin M.
20049
20050         * WebView/WebFrame.mm:
20051         * WebView/WebScriptDebugDelegate.mm:
20052         * WebView/WebScriptDebugger.h: Renamed from WebKit/mac/WebView/WebCoreScriptDebuggerImp.h.
20053         * WebView/WebScriptDebugger.mm: Renamed from WebKit/mac/WebView/WebCoreScriptDebuggerImp.mm.
20054
20055 2008-03-05  Adam Roben  <aroben@apple.com>
20056
20057         Rename WebCoreScriptDebuggerImp to WebScriptDebugger
20058
20059         Reviewed by Kevin M.
20060
20061         * WebView/WebCoreScriptDebuggerImp.h:
20062         * WebView/WebCoreScriptDebuggerImp.mm:
20063         * WebView/WebFrame.mm:
20064         (-[WebFrame _attachScriptDebugger]):
20065         * WebView/WebFrameInternal.h:
20066
20067 2008-03-05  Adam Roben  <aroben@apple.com>
20068
20069         Remove WebScriptDebugger
20070
20071         Uses of WebScriptDebugger have been replaced with
20072         WebCoreScriptDebuggerImp.
20073
20074         Reviewed by Kevin M.
20075
20076         * WebView/WebFrame.mm:
20077         (-[WebFramePrivate dealloc]): Use delete instead of release since
20078         WebCoreScriptDebuggerImp is a C++ class.
20079         (-[WebFrame _attachScriptDebugger]): Updated to use early returns and
20080         WebCoreScriptDebuggerImp.
20081         (-[WebFrame _detachScriptDebugger]): Ditto.
20082         * WebView/WebFrameInternal.h:
20083         * WebView/WebScriptDebugDelegate.mm: Removed WebScriptDebugger
20084         * WebView/WebScriptDebugDelegatePrivate.h: Removed.
20085         * WebView/WebView.mm:
20086
20087 2008-03-05  Adam Roben  <aroben@apple.com>
20088
20089         Remove -webFrame and -globalObject from WebScriptDebugger
20090
20091         WebCoreScriptDebuggerImp is now unaware of WebScriptDebugger
20092
20093         Reviewed by Kevin M.
20094
20095         * WebView/WebCoreScriptDebuggerImp.h: Removed WebScriptDebugger*
20096         parameter to the constructor.
20097         * WebView/WebCoreScriptDebuggerImp.mm:
20098         (toWebFrame): Added.
20099         (WebCoreScriptDebuggerImp::sourceParsed): Call toWebFrame.
20100         (WebCoreScriptDebuggerImp::callEvent): Ditto, and get the Frame's
20101         WindowScriptObject ourselves instead of asking WebScriptDebugger for
20102         it.
20103         (WebCoreScriptDebuggerImp::atStatement): Call toWebFrame.
20104         (WebCoreScriptDebuggerImp::returnEvent): Ditto.
20105         (WebCoreScriptDebuggerImp::exception): Ditto.
20106         * WebView/WebScriptDebugDelegate.mm:
20107         (-[WebScriptDebugger initWithWebFrame:]): Updated for change to
20108         WebScriptDebuggerImp's constructor.
20109         * WebView/WebScriptDebugDelegatePrivate.h: Removed
20110         -webFrame/-globalObject.
20111
20112 2008-03-05  Adam Roben  <aroben@apple.com>
20113
20114         Remove -enterFrame: and -leaveFrame from WebScriptDebugger
20115
20116         Reviewed by Kevin M.
20117
20118         * WebView/WebCoreScriptDebuggerImp.h: Changed to store m_topCallFrame
20119         in a RetainPtr, now that WebCoreScriptDebuggerImp is in charge of its
20120         lifetime.
20121         * WebView/WebCoreScriptDebuggerImp.mm:
20122           - Added declaration of -[WebScriptCallFrame
20123             _initWithGlobalObject:caller:state:].
20124           - Changed most uses of m_topCallFrame to m_topCallFrame.get()
20125         (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp): Removed
20126         now-unnecessary initialization of m_topCallFrame.
20127         (WebCoreScriptDebuggerImp::callEvent): Replaced call to enterFrame:
20128         with its implementation. The one difference between this
20129         implementation and the old enterFrame: method is that we don't hand
20130         our reference to m_topCallFrame to _initWithGlobalObject: -- that
20131         method must now retain the passed-in WebScriptCallFrame manually.
20132         (WebCoreScriptDebuggerImp::atStatement):
20133         (WebCoreScriptDebuggerImp::returnEvent): Replaced call to leaveFrame
20134         with its implementation.
20135         (WebCoreScriptDebuggerImp::exception):
20136         * WebView/WebScriptDebugDelegate.mm: Removed declaration of
20137         -[WebScriptCallFrame _initWithGlobalObject:caller:state:].
20138         (-[WebScriptCallFrame _initWithGlobalObject:caller:state:]): Changed
20139         to retain the passed-in caller.
20140         * WebView/WebScriptDebugDelegatePrivate.h:
20141           - Removed _current ivar
20142           - Removed enterFrame:/leaveFrame declarations.
20143
20144 2008-03-05  Adam Roben  <aroben@apple.com>
20145
20146         Remove -parsedSource: from WebScriptDebugger
20147
20148         Reviewed by Kevin M.
20149
20150         * WebView/WebCoreScriptDebuggerImp.mm:
20151         (WebCoreScriptDebuggerImp::sourceParsed): Moved code here from
20152         -[WebScriptDebugger parsedSource:fromURL:sourceId:startLine:errorLine:errorMessage:]
20153         * WebView/WebScriptDebugDelegate.mm: Removed -parsedSource:.
20154         * WebView/WebScriptDebugDelegatePrivate.h: Ditto.
20155
20156 2008-03-05  Adam Roben  <aroben@apple.com>
20157
20158         Remove -enteredFrame:, -leavingFrame:, and -exceptionRaised: from WebScriptDebugger
20159
20160         Reviewed by Kevin M.
20161
20162         * WebView/WebCoreScriptDebuggerImp.mm:
20163         (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp): Changed to call
20164         trhough to callEvent instead of duplicating its code here.
20165         (WebCoreScriptDebuggerImp::callEvent): Moved code from
20166         -[WebScriptDebugger enteredFrame:sourceId:line:] here.
20167         (WebCoreScriptDebuggerImp::returnEvent): Moved code from
20168         -[WebScriptDebugger leavingFrame:sourceId:line:] here.
20169         (WebCoreScriptDebuggerImp::exception): Moved code from
20170         -[WebScriptDebugger exceptionRaised:sourceId:line:] here.
20171         * WebView/WebScriptDebugDelegate.mm: Removed -enteredFrame:,
20172         -leavingFrame:, and -exceptionRaised:.
20173         * WebView/WebScriptDebugDelegatePrivate.h: Ditto.
20174
20175 2008-03-05  Adam Roben  <aroben@apple.com>
20176
20177         Remove -[WebScriptDebugger hitStatement:sourceId:line:]
20178
20179         Reviewed by Kevin M.
20180
20181         * WebView/WebCoreScriptDebuggerImp.mm:
20182         (WebCoreScriptDebuggerImp::atStatement): Moved code here from
20183         -[WebScriptDebugger hitStatement:sourceId:line:].
20184         * WebView/WebScriptDebugDelegate.mm:
20185         (-[WebScriptDebugger webFrame]): Added.
20186         * WebView/WebScriptDebugDelegatePrivate.h:
20187
20188 2008-03-05  Adam Roben  <aroben@apple.com>
20189
20190         Remove WebCoreScriptDebugger
20191
20192         Reviewed by Kevin M.
20193
20194         * WebView/WebCoreScriptDebugger.h: Removed.
20195         * WebView/WebCoreScriptDebugger.mm: Removed.
20196         * WebView/WebCoreScriptDebuggerImp.h: Replaced WebCoreScriptDebugger
20197         with WebScriptDebugger.
20198         * WebView/WebCoreScriptDebuggerImp.mm: Ditto, and replaced [m_debugger
20199         delegate] with just m_debugger.
20200         (toNSString): Moved here from WebCoreScriptDebugger.mm.
20201         (toNSURL): Ditto.
20202         (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp):
20203         (WebCoreScriptDebuggerImp::sourceParsed):
20204         (WebCoreScriptDebuggerImp::callEvent):
20205         (WebCoreScriptDebuggerImp::atStatement):
20206         (WebCoreScriptDebuggerImp::returnEvent):
20207         (WebCoreScriptDebuggerImp::exception):
20208         * WebView/WebScriptDebugDelegate.mm:
20209         (-[WebScriptDebugger initWithWebFrame:]): _debugger now holds a
20210         WebCoreScriptDebuggerImp, so initialize it properly.
20211         * WebView/WebScriptDebugDelegatePrivate.h: Changed _debugger to hold a
20212         WebCoreScriptDebuggerImp.
20213
20214 2008-03-05  Adam Roben  <aroben@apple.com>
20215
20216         Move WebCoreScriptDebuggerImp to its own source files
20217
20218         Also changed WebCoreScriptDebuggerImp coding style to match our style
20219         guidelines.
20220
20221         Reviewed by Kevin M.
20222
20223         * WebView/WebCoreScriptDebugger.h: Added declaration of toNSURL
20224         function.
20225         * WebView/WebCoreScriptDebugger.mm: Removed WebCoreScriptDebuggerImp
20226         implementation.
20227         (toNSURL): Made no longer static.
20228         * WebView/WebCoreScriptDebuggerImp.h: Added.
20229         * WebView/WebCoreScriptDebuggerImp.mm: Added. Code was moved here from
20230         WebCoreScriptDebugger.mm and cleaned up.
20231         (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp):
20232         (WebCoreScriptDebuggerImp::sourceParsed):
20233         (WebCoreScriptDebuggerImp::callEvent):
20234         (WebCoreScriptDebuggerImp::atStatement):
20235         (WebCoreScriptDebuggerImp::returnEvent):
20236         (WebCoreScriptDebuggerImp::exception):
20237
20238 2008-03-05  Adam Roben  <aroben@apple.com>
20239
20240         Move -_enterFrame and -_leaveFrame from WebCoreScriptDebugger to WebScriptDebugger
20241
20242         Reviewed by Kevin M.
20243
20244         * WebView/WebCoreScriptDebugger.h:
20245           - Removed newFrameWithGlobalObject:caller:state: from
20246             WebScriptDebugger protocol
20247           - Added enterFrame: and leaveFrame: to WebScriptDebugger protocol
20248           - Removed _current ivar from WebCoreScriptDebugger
20249         * WebView/WebCoreScriptDebugger.mm:
20250         (WebCoreScriptDebuggerImp::callEvent): Changed to call enterFrame on
20251         the delegate.
20252         (WebCoreScriptDebuggerImp::returnEvent): Ditto for leaveFrame.
20253         * WebView/WebScriptDebugDelegate.mm:
20254         (-[WebScriptDebugger dealloc]): Added code to release _current.
20255         (-[WebScriptDebugger enterFrame:]): Added. Code came from
20256         WebCoreScriptDebugger.
20257         (-[WebScriptDebugger leaveFrame]): Ditto.
20258         * WebView/WebScriptDebugDelegatePrivate.h: Added _current ivar.
20259
20260 2008-03-05  Adam Roben  <aroben@apple.com>
20261
20262         Remove WebCoreScriptCallFrame
20263
20264         Reviewed by Tim.
20265
20266         * WebView/WebCoreScriptDebugger.h:
20267           - Replaced WebCoreScriptCallFrame with WebScriptCallFrame
20268           - Replaced -newWrapperForFrame: with
20269             -newFrameWithGlobalObject:caller:state:
20270           - Removed WebCoreScriptCallFrame interface.
20271         * WebView/WebCoreScriptDebugger.mm: Replaced WebCoreScriptCallFrame
20272         with WebScriptCallFrame.
20273         (-[WebCoreScriptDebugger _enterFrame:]): Changed to call
20274         -newFrameWithGlobalObject:caller:state.
20275         (-[WebCoreScriptDebugger _leaveFrame]):
20276         * WebView/WebScriptDebugDelegate.h: Changed WebScriptCallFrame's
20277         _private ivar to be of type WebScriptCallFramePrivate*.
20278         * WebView/WebScriptDebugDelegate.mm:
20279           - Replaced WebCoreScriptCallFrame with WebScriptCallFrame
20280           - Added WebScriptCallFramePrivate
20281         (-[WebScriptDebugger enteredFrame:sourceId:line:]):
20282         (-[WebScriptDebugger hitStatement:sourceId:line:]):
20283         (-[WebScriptDebugger leavingFrame:sourceId:line:]):
20284         (-[WebScriptDebugger exceptionRaised:sourceId:line:]):
20285         (-[WebScriptCallFramePrivate dealloc]): Added.
20286         (-[WebScriptCallFrame _initWithGlobalObject:caller:state:]): Added.
20287         Code came from WebCoreScriptCallFrame.
20288         (-[WebScriptCallFrame dealloc]): Added a call to release the _private
20289         ivar.
20290         (-[WebScriptCallFrame _convertValueToObjcValue:]): Replaced calls to
20291         _private with direct access of _private's ivars.
20292         (-[WebScriptCallFrame caller]): Ditto.
20293         (-[WebScriptCallFrame scopeChain]): Ditto.
20294         (-[WebScriptCallFrame evaluateWebScript:]): Ditto.
20295
20296 2008-03-05  Adam Roben  <aroben@apple.com>
20297
20298         Move -_convertValueToObjcValue to WebScriptCallFrame
20299
20300         Reviewed by Darin Adler.
20301
20302         * WebView/WebCoreScriptDebugger.h: Removed declaration of
20303         -_convertValueToObjcValue.
20304         * WebView/WebCoreScriptDebugger.mm: Removed -_convertValueToObjcValue.
20305         * WebView/WebScriptDebugDelegate.mm:
20306         (-[WebScriptCallFrame _convertValueToObjcValue:]): Added. Code came
20307         from -[WebCoreScriptCallFrame _convertValueToObjcValue].
20308         (-[WebScriptCallFrame scopeChain]): Changed to call
20309         -_convertValueToObjcValue on self instead of _private.
20310         (-[WebScriptCallFrame exception]): Ditto.
20311         (-[WebScriptCallFrame evaluateWebScript:]): Ditto.
20312
20313 2008-03-05  Adam Roben  <aroben@apple.com>
20314
20315         Move -exception and -evaluateWebScript: to WebScriptCallFrame
20316
20317         Reviewed by Darin Adler.
20318
20319         * WebView/WebCoreScriptDebugger.h: Removed declarations of -exception
20320         and -evaluateWebScript:.
20321         * WebView/WebCoreScriptDebugger.mm: Removed -exception and
20322         -evaluateWebScript:.
20323         * WebView/WebScriptDebugDelegate.mm:
20324         (-[WebScriptCallFrame exception]): Added. Code came from
20325         -[WebCoreScriptCallFrame exception].
20326         (-[WebScriptCallFrame evaluateWebScript:]): Added. Code came from
20327         -[WebCoreScriptCallFrame evaluateWebScript:].
20328
20329 2008-03-05  Adam Roben  <aroben@apple.com>
20330
20331         Move -scopeChain to WebScriptCallFrame
20332
20333         Reviewed by Darin Adler.
20334
20335         * WebView/WebCoreScriptDebugger.h:
20336           - Added declarations of -globalObject and -_convertValueToObjcValue:
20337             to WebCoreScriptCallFrame
20338           - Removed declaration of -scopeChain.
20339         * WebView/WebCoreScriptDebugger.mm: Moved -_convertValueToObjcValue
20340         within the main WebCoreScriptCallFrame implementation.
20341         (-[WebCoreScriptCallFrame globalObject]): Added.
20342         * WebView/WebScriptDebugDelegate.mm:
20343         (-[WebScriptCallFrame scopeChain]): Added. Code came from
20344         -[WebCoreScriptCallFrame scopeChain].
20345
20346 2008-03-05  Adam Roben  <aroben@apple.com>
20347
20348         Move -functionName from WebCoreScriptCallFrame to WebScriptCallFrame
20349
20350         Reviewed by Darin Adler.
20351
20352         * WebView/WebCoreScriptDebugger.h:
20353           - Removed #else case of #ifdef __cplusplus since this file is only
20354             ever used by C++ Objective-C files
20355           - Removed 'using KJS::ExecState' statement since we prefer not to
20356             have using statements in header files
20357           - Consequently prefixed uses of ExecState with KJS::
20358           - Added declaration of toNSString method that takes a const
20359             UString&
20360           - Added declaration of -[WebCoreScriptCallFrame state]
20361           - Removed declaration of -[WebCoreScriptCallFrame functionName]
20362         * WebView/WebCoreScriptDebugger.mm:
20363         (toNSString): Made this no longer static.
20364         (-[WebCoreScriptCallFrame state]): Added.
20365         * WebView/WebScriptDebugDelegate.mm:
20366         (-[WebScriptCallFrame functionName]): Added. Code came from
20367         -[WebCoreScriptCallFrame functionName], though I changed some nested
20368         ifs into early returns.
20369
20370 2008-03-05  Adam Roben  <aroben@apple.com>
20371
20372         Move WebCoreScriptDebugger to WebKit
20373
20374         Reviewed by Darin Adler.
20375
20376         * WebView/WebCoreScriptDebugger.h: Renamed from WebCore/page/mac/WebCoreScriptDebugger.h.
20377         * WebView/WebCoreScriptDebugger.mm: Renamed from WebCore/page/mac/WebCoreScriptDebugger.mm.
20378         (toNSString):
20379         (toNSURL):
20380         (WebCoreScriptDebuggerImp::WebCoreScriptDebuggerImp):
20381         (WebCoreScriptDebuggerImp::sourceParsed):
20382         (WebCoreScriptDebuggerImp::callEvent):
20383         (WebCoreScriptDebuggerImp::atStatement):
20384         (WebCoreScriptDebuggerImp::returnEvent):
20385         (WebCoreScriptDebuggerImp::exception):
20386         (+[WebCoreScriptDebugger initialize]):
20387         (-[WebCoreScriptDebugger initWithDelegate:]):
20388         (-[WebCoreScriptDebugger dealloc]):
20389         (-[WebCoreScriptDebugger finalize]):
20390         (-[WebCoreScriptDebugger delegate]):
20391         (-[WebCoreScriptDebugger _enterFrame:]):
20392         (-[WebCoreScriptDebugger _leaveFrame]):
20393         (-[WebCoreScriptCallFrame _initWithGlobalObject:caller:state:]):
20394         (-[WebCoreScriptCallFrame _setWrapper:]):
20395         (-[WebCoreScriptCallFrame _convertValueToObjcValue:]):
20396         (-[WebCoreScriptCallFrame dealloc]):
20397         (-[WebCoreScriptCallFrame wrapper]):
20398         (-[WebCoreScriptCallFrame caller]):
20399         (-[WebCoreScriptCallFrame scopeChain]):
20400         (-[WebCoreScriptCallFrame functionName]):
20401         (-[WebCoreScriptCallFrame exception]):
20402         (-[WebCoreScriptCallFrame evaluateWebScript:]):
20403         * WebView/WebScriptDebugDelegate.mm: Updated header path.
20404         * WebView/WebScriptDebugDelegatePrivate.h: Ditto.
20405
20406 2008-03-05  Anders Carlsson  <andersca@apple.com>
20407
20408         Reviewed by Geoff.
20409
20410         Include file changes.
20411         
20412         * Plugins/WebBaseNetscapePluginView.mm:
20413         * Plugins/WebNetscapePluginPackage.m:
20414
20415 2008-03-04  Timothy Hatcher  <timothy@apple.com>
20416
20417         Reviewed by Darin Adler.
20418
20419         <rdar://problem/5720160> Browser windows "do nothing" while modal
20420         dialog or menu is up due to run loop modes (or while scrolling)
20421
20422         Add new API that lets a WebView be scheduled with multiple runloops and modes.
20423         This lets loading continue when in a nested runloop or in a different mode.
20424
20425         * Misc/WebKitVersionChecks.h: Add a new version define:
20426         WEBKIT_FIRST_VERSION_WITH_LOADING_DURING_COMMON_RUNLOOP_MODES.
20427         * WebView/WebView.mm:
20428         (-[WebView _commonInitializationWithFrameName:groupName:]): Schedule in the main runloop and with
20429         the default runloop mode if we are linked on an earlier WebKit version, use common modes otherwise.
20430         (-[WebView scheduleInRunLoop:forMode:]): New API, that calls through to Page.
20431         (-[WebView unscheduleFromRunLoop:forMode:]): Ditto.
20432         * WebView/WebViewPrivate.h: Add the new pending API methods.
20433
20434 2008-03-04  Anders Carlsson  <andersca@apple.com>
20435
20436         Reviewed by Darin Adler.
20437
20438         Fix crash that happens when trying to load a page with a Java applet.
20439         
20440         * WebCoreSupport/WebFrameLoaderClient.mm:
20441         Don't release the names and values array - the kit method returns an autoreleased array.
20442
20443 2008-03-04  Darin Adler  <darin@apple.com>
20444
20445         Reviewed by Adam.
20446
20447         - fix 200+ failing regression tests
20448         - fix http://bugs.webkit.org/show_bug.cgi?id=17668
20449           Vertical scrollbar at slashdot.org is randomly not shown
20450
20451         * WebCoreSupport/WebFrameLoaderClient.mm:
20452         (WebFrameLoaderClient::transitionToCommittedForNewPage): Changed the refcounting
20453         code here to exactly match the way it was before it was moved from WebCore. I had
20454         introduced a storage leak and that was causing problems with scroll bars!
20455
20456 2008-03-04  Darin Adler  <darin@apple.com>
20457
20458         Reviewed by Adam.
20459
20460         - remove WebCoreFrameBridge reapplyStyles method
20461
20462         * WebView/WebHTMLView.mm:
20463         (-[WebHTMLView reapplyStyles]): Moved code to reapply styles here from the bridge.
20464
20465 2008-03-04  Darin Adler  <darin@apple.com>
20466
20467         Reviewed by Adam.
20468
20469         - eliminate WebCoreFrameBridge createFrameViewWithNSView
20470
20471         * WebCoreSupport/WebFrameLoaderClient.mm:
20472         (WebFrameLoaderClient::transitionToCommittedForNewPage):
20473         Moved code here from createFrameViewWithNSView.
20474
20475 2008-03-04  Darin Adler  <darin@apple.com>
20476
20477         Reviewed by Adam.
20478
20479         - removed WebCoreFrameBridge scrollOverflowInDirection
20480
20481         * WebView/WebFrameView.mm:
20482         (-[WebFrameView _scrollOverflowInDirection:granularity:]): Changed to call
20483         EventHandler directly instead of using the bridge.
20484         (-[WebFrameView scrollToBeginningOfDocument:]): Updated to use WebCore enums instead
20485         of the ones from the bridge.
20486         (-[WebFrameView scrollToEndOfDocument:]): Ditto.
20487         (-[WebFrameView _pageVertically:]): Ditto.
20488         (-[WebFrameView _pageHorizontally:]): Ditto.
20489         (-[WebFrameView _scrollLineVertically:]): Ditto.
20490         (-[WebFrameView _scrollLineHorizontally:]): Ditto.
20491
20492 2008-03-04  Darin Adler  <darin@apple.com>
20493
20494         Reviewed by Adam.
20495
20496         - remove WebCoreFrameBridge installInFrame: method
20497
20498         * WebCoreSupport/WebFrameLoaderClient.mm:
20499         (WebFrameLoaderClient::transitionToCommittedForNewPage): Call
20500         -[WebFrameView _install] instead of -[WebCoreFrameBridge installInFrame:].
20501         * WebView/WebFrameView.mm:
20502         (-[WebFrameView _install]): Added. Has code from -[WebCoreFrameBridge installInFrame:].
20503         (-[WebFrameView _setCustomScrollViewClass:]): Used early return idiom so the entire
20504         method isn't nested inside an if statement. Call
20505         -[WebFrameView _install] instead of -[WebCoreFrameBridge installInFrame:].
20506         * WebView/WebFrameViewInternal.h: Added declaration of _install method so it can be
20507         used in WebFrameLoaderClient.mm.
20508
20509 2008-03-04  Darin Adler  <darin@apple.com>
20510
20511         Reviewed by Adam.
20512
20513         - remove WebCoreFrameBridge window method
20514
20515         * WebCoreSupport/WebFrameBridge.mm: Removed window method.
20516
20517 2008-03-04  Darin Adler  <darin@apple.com>
20518
20519         Reviewed by Adam.
20520
20521         - move code from WebFrameBridge into WebFrameLoaderClient
20522
20523         * WebCoreSupport/WebFrameBridge.h: Removed unused fields, changed frame name parameters
20524         to use WebCore::String instead of NSString, add initSubframeWithOwnerElement declaration,
20525         removed viewForPluginWithFrame, viewForJavaAppletWithFrame, createChildFrameNamed,
20526         redirectDataToPlugin, determineObjectFromMIMEType, and windowObjectCleared methods.
20527         * WebCoreSupport/WebFrameBridge.mm:
20528         (-[WebFrameBridge finishInitializingWithPage:frameName:WebCore::frameView:ownerElement:]):
20529         Changed to use WebCore::String.
20530         (-[WebFrameBridge initMainFrameWithPage:frameName:WebCore::frameView:]): Ditto.
20531         (-[WebFrameBridge initSubframeWithOwnerElement:frameName:WebCore::frameView:]): Ditto.
20532
20533         * WebCoreSupport/WebFrameLoaderClient.mm:
20534         (WebFrameLoaderClient::setOriginalURLForDownload): Removed some dead code I found here
20535         and added a FIXME.
20536         (WebFrameLoaderClient::createFrame): Moved the code from WebFrameBridge here.
20537         (WebFrameLoaderClient::objectContentType): Ditto.
20538         (parameterValue): Added.  Helper function, based on code originally in WebFrameBridge.
20539         (pluginView): Ditto.
20540         (WebFrameLoaderClient::createPlugin): Moved the code from WebFrameBridge here.
20541
20542 2008-03-04  Darin Adler  <darin@apple.com>
20543
20544         Reviewed by Adam.
20545
20546         - remove -[WebCoreFrameBridge dashboardRegionsChanged:]
20547
20548         * WebCoreSupport/WebChromeClient.h:
20549         * WebCoreSupport/WebChromeClient.mm:
20550         (WebChromeClient::dashboardRegionsChanged): Moved code here from the bridge.
20551         The WebCore side now calls this only when there's an actual change.
20552         * WebCoreSupport/WebFrameBridge.h: Removed lastDashboardRegions.
20553         * WebCoreSupport/WebFrameBridge.mm:
20554         (-[WebFrameBridge dealloc]): Removed code to release lastDashboardRegions.
20555         Removed _compareDashboardRegions: and dashboardRegionsChanged: methods.
20556
20557 2008-03-04  Darin Adler  <darin@apple.com>
20558
20559         Reviewed by Adam.
20560
20561         - remove WebCoreFrameBridge issuePasteComand method
20562
20563         * WebCoreSupport/WebFrameBridge.mm: Removed issuePasteCommand method.
20564         * WebView/WebHTMLViewInternal.h: Removed declaration of paste: method.
20565
20566 2008-03-03  Darin Adler  <darin@apple.com>
20567
20568         Reviewed by Adam.
20569
20570         - some "cleanup" on the path to removing WebCoreFrameBridge
20571
20572         * Storage/WebDatabaseManager.mm: Tweak includes.
20573         * Storage/WebDatabaseTrackerClient.mm: Ditto.
20574         * Storage/WebSecurityOrigin.mm: Ditto.
20575         * Storage/WebSecurityOriginInternal.h: Ditto.
20576
20577         * WebView/WebFrame.mm:
20578         (core): Changed to get rid of the requirement that WebKitEditableLinkBehavior exactly
20579         match WebCore::EditableLinkBehavior.
20580         * WebView/WebFrameInternal.h: Removed unused kit function.
20581
20582         * WebView/WebHTMLView.mm: Moved WebHTMLViewPrivate class in here.
20583         * WebView/WebHTMLViewInternal.h: Moved WebHTMLVewPrivate class out of here.
20584         * WebView/WebHTMLViewPrivate.h: Tweaked formatting and removed some unneeded declarations.
20585
20586         * WebView/WebPreferencesPrivate.h: Removed a no-longer-needed comment.
20587
20588 2008-03-01  Mark Rowe  <mrowe@apple.com>
20589
20590         Reviewed by Tim Hatcher.
20591
20592         Update Xcode configuration to support building debug and release from the mysterious future.
20593
20594         * Configurations/DebugRelease.xcconfig:
20595
20596 2008-02-29  Mark Rowe  <mrowe@apple.com>
20597
20598         Reviewed by Anders Carlsson.
20599
20600         Replace use of WKPathFromFont with implementation in terms of public API.
20601
20602         * WebCoreSupport/WebSystemInterface.m:
20603         (InitWebCoreSystemInterface): Remove unused symbol.
20604
20605 2008-02-29  Mark Rowe  <mrowe@apple.com>
20606
20607         Reviewed by Oliver Hunt.
20608
20609         Fix spelling of "request" in name of WKNSURLProtocolClassForRequest.
20610
20611         * Misc/WebNSURLExtras.mm:
20612         (-[NSURL _webkit_canonicalize]):
20613         * WebKit.order:
20614
20615 2008-02-29  Mark Rowe  <mrowe@apple.com>
20616
20617         Reviewed by Oliver Hunt.
20618
20619         Don't use WKSupportsMultipartXMixedReplace on Leopard as multipart/x-mixed-replace is always handled by NSURLRequest.
20620
20621         * WebCoreSupport/WebSystemInterface.m:
20622         (InitWebCoreSystemInterface):
20623
20624 2008-02-29  Mark Rowe  <mrowe@apple.com>
20625
20626         Reviewed by Oliver Hunt.
20627
20628         Remove obsolete code that had been left intact to support users running WebKit with older versions of Safari.
20629
20630         * Misc/WebNSViewExtras.m:  Remove _web_superviewOfClass:stoppingAtClass:.
20631         * Misc/WebNSWindowExtras.m:  Remove _webkit_displayThrottledWindows.
20632         * Misc/WebSearchableTextView.m:  Remove selectionImageForcingWhiteText:.
20633         * WebCoreSupport/WebImageRendererFactory.m:  Update comment to mention the last version of Safari that
20634         requires this class.
20635         * WebInspector/WebInspector.mm:  Remove sharedWebInspector and update comments to mention the last version
20636         of Safari that calls other obsolete methods.
20637         * WebView/WebDocumentPrivate.h:  Remove selectionImageForcingWhiteText:.
20638         * WebView/WebHTMLView.mm:  Ditto.
20639         * WebView/WebPDFView.mm:  Ditto.
20640         * WebView/WebView.mm:  Update comment to mentoin the last version of Safari that requires the obsolete method.
20641
20642 2008-02-29  Mark Rowe  <mrowe@apple.com>
20643
20644         Rubber-stamped by Eric Seidel.
20645
20646         Remove unneeded includes of WebKitSystemInterface.h.
20647
20648         * History/WebHistoryItem.mm:
20649         * Misc/WebNSViewExtras.m:
20650         * WebCoreSupport/WebFrameLoaderClient.mm:
20651         * WebView/WebDataSource.mm:
20652         * WebView/WebPDFView.mm:
20653
20654 2008-02-29  Mark Rowe  <mrowe@apple.com>
20655
20656         Reviewed by Oliver Hunt and Oliver Hunt.
20657
20658         <rdar://problem/4753845> WebKit should use CGEventSourceSecondsSinceLastEventType in place of WKSecondsSinceLastInputEvent SPI.
20659
20660         * WebCoreSupport/WebSystemInterface.m:
20661         (InitWebCoreSystemInterface):  Remove unused symbol.
20662         * WebKit.order:  Ditto.
20663
20664 2008-02-28  Mark Rowe  <mrowe@apple.com>
20665
20666         Reviewed by Dave Hyatt.
20667
20668         Make use of new CGFont APIs on Leopard rather than making a WebKitSystemInterface call.
20669
20670         * WebCoreSupport/WebSystemInterface.m:
20671         (InitWebCoreSystemInterface): Only initialize wkGetFontMetrics on Tiger.
20672
20673 2008-02-27  Brady Eidson  <beidson@apple.com>
20674
20675         Reviewed by Mark Rowe (code) and Darin (concept)
20676
20677         Much better fix for <rdar://problem/4930688> (see r19549)
20678         Original fix for <rdar://problem/3947312> (and 14 dupes)
20679         
20680         Let me tell you a story:
20681         A long time ago, in a cvs repository far, far away, loader code was almost all up in WebKit.
20682         WebArchive code was intertwined with that code in bizarre and complex ways.
20683         During the months long loader re-factoring where we pushed much loader code down into WebCore,
20684         many portions of the WebKit loader were thinned out until they ceased to exist.  Others remained
20685         with a sole purpose.
20686
20687         One such section of code whose lineage traces back from WebFrameLoaderClient to WebFrameLoader
20688         to WebLoader was originally rooted in the method [WebLoader loadRequest:].  This method was the 
20689         single entry point for almost all loading (network or web archives)
20690
20691         This method would check various headers and other fields on the NSURLRequest and NSURLResponse 
20692         to make decisions about the load.  If the cache control fields were expired or other conditions 
20693         in the headers were met, the load would be forced to go out to the network.
20694
20695         As the loader was moved and tweaked repeatedly, most of this code was pruned or re-factored.  
20696         At some point, all that remained was the special cases for loading WebArchives.  
20697         
20698         Somewhere in the r16,000s, this remaining responsibility was noticed and related methods we renamed
20699         to be WebArchive specific, further cementing the assumed design.
20700
20701         Problem is, the design was bad.  A WebArchive is meant to be a static snapshot of a WebPage at a
20702         specific point in time.  Referring to the request to see if the resource should be reloaded seems
20703         nonsensical, as does referring to the response headers to see if the resource is "expired".  In the 
20704         context of loading a WebArchive, available data should *always* be loaded from the WebArchive, at least
20705         during the initial load!
20706
20707         After discovering the secret to reproducing all of these bugs is both emptying our your Foundation 
20708         cache and disconnecting your network, it was easy to reproduce the 16 individually reported cases 
20709         that were all symptoms of this bug, and easy to verify that they are fixed with this patch.
20710
20711         * WebCoreSupport/WebFrameLoaderClient.h:
20712         * WebCoreSupport/WebFrameLoaderClient.mm:
20713         (WebFrameLoaderClient::willUseArchive): Do not call either form of "canUseArchivedResource()" that
20714           inspect the request or response objects - We are loading from a WebArchive, and we should never
20715           make the decision to go out to the network when we actually have the resource available.
20716
20717         * WebCoreSupport/WebSystemInterface.m:
20718         (InitWebCoreSystemInterface):  Remove two methods that are no longer used anywhere in WebKit
20719
20720 2008-02-27  Matt Lilek  <webkit@mattlilek.com>
20721
20722         Reviewed by Adam Roben.
20723
20724         Bug 14348: Messing up the inspector by dragging an URL into it
20725         http://bugs.webkit.org/show_bug.cgi?id=14348
20726         <rdar://problem/5283620> and <rdar://problem/5712808>
20727
20728         * WebCoreSupport/WebInspectorClient.mm:
20729         (-[WebInspectorWindowController init]): Remove duplicate preference setting.
20730         (-[WebInspectorWindowController webView:dragDestinationActionMaskForDraggingInfo:]):
20731
20732 2008-02-25  Darin Adler  <darin@apple.com>
20733
20734         Reviewed by Adam.
20735
20736         * WebView/WebArchiver.mm:
20737         (+[WebArchiver archiveSelectionInFrame:]): Use blankURL.
20738         * WebView/WebFrame.mm:
20739         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]): Avoid the
20740         variable name URL to avoid clashing with the renamed KURL in the future. Also use
20741         blankURL.
20742         (-[WebFrame loadData:MIMEType:textEncodingName:baseURL:]): Ditto.
20743         (-[WebFrame _loadHTMLString:baseURL:unreachableURL:]): Ditto.
20744         (-[WebFrame loadHTMLString:baseURL:]): Ditto.
20745         (-[WebFrame loadAlternateHTMLString:baseURL:forUnreachableURL:]): Ditto.
20746
20747 2008-02-24  Darin Adler  <darin@apple.com>
20748
20749         Reviewed by Sam.
20750
20751         - remove separate client calls for "standard" and "reload' history
20752
20753         * WebCoreSupport/WebFrameLoaderClient.h:
20754         * WebCoreSupport/WebFrameLoaderClient.mm:
20755         (WebFrameLoaderClient::updateGlobalHistory):
20756
20757 2008-02-23  Alexey Proskuryakov  <ap@webkit.org>
20758
20759         Reviewed by Darin Adler.
20760
20761         Move basic threading support from WebCore to WTF.
20762
20763         * ForwardingHeaders/wtf/Threading.h: Added.
20764         * ForwardingHeaders/wtf/Locker.h: Added.
20765
20766 2008-02-23  David Kilzer  <ddkilzer@apple.com>
20767
20768         Please clarify licensing for some files
20769         <http://bugs.webkit.org/show_bug.cgi?id=14970>
20770
20771         Reviewed by Darin Adler.
20772
20773         * Plugins/WebNetscapeDeprecatedFunctions.c: Updated copyright statement
20774         and added Apple BSD-style license.
20775         * Plugins/WebNetscapeDeprecatedFunctions.h: Ditto.
20776
20777 2008-02-22  John Sullivan  <sullivan@apple.com>
20778
20779         Reviewed by Adam Roben
20780         
20781         Reverted the changed from yesterday to add pasteAndMatchStyle:, as the existing
20782         pasteAsPlainText: has the same behavior.
20783
20784         * WebView/WebHTMLView.mm:
20785         (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
20786         (-[WebHTMLView readSelectionFromPasteboard:]):
20787         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
20788         (-[WebHTMLView pasteAsRichText:]):
20789         (-[WebHTMLView paste:]):
20790         * WebView/WebView.mm:
20791         * WebView/WebViewPrivate.h:
20792
20793 2008-02-21  Anders Carlsson  <andersca@apple.com>
20794
20795         Reviewed by Sam.
20796
20797         Use BackForwardList::create instead.
20798         
20799         * History/WebBackForwardList.mm:
20800         (-[WebBackForwardList init]):
20801
20802 2008-02-21  John Sullivan  <sullivan@apple.com>
20803
20804         Reviewed by Jessica Kahn
20805         
20806         support for pasteAndMatchStyle: command (see <rdar://problem/5723952>)
20807
20808         * WebView/WebHTMLView.mm:
20809         (-[WebHTMLView _pasteWithPasteboard:allowPlainText:matchStyle:]):
20810         added matchStyle parameter, passed along to bridge (formerly always passed NO to bridge)
20811         (-[WebHTMLView readSelectionFromPasteboard:]):
20812         pass NO for new matchStyle parameter to match old behavior
20813         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
20814         validate pasteAndMatchStyle the same way as pasteAsRichText
20815         (-[WebHTMLView pasteAndMatchStyle:]):
20816         just like pasteAsRichText but passes YES for matchStyle
20817         (-[WebHTMLView pasteAsRichText:]):
20818         pass NO for new matchStyle parameter to match old behavior
20819         (-[WebHTMLView paste:]):
20820         ditto
20821         
20822         * WebView/WebView.mm:
20823         added macro(pasteAndMatchStyle)
20824         
20825         * WebView/WebViewPrivate.h:
20826         added pasteAndMatchStyle: to WebViewEditingActionsPendingPublic category
20827
20828 2008-02-20  Sam Weinig  <sam@webkit.org>
20829
20830         Reviewed by Darin and Geoff.
20831
20832         - WebKit part of <rdar://problem/5754378> work around missing video on YouTube front page with a site-specific hack
20833
20834         * WebView/WebView.mm:
20835         (-[WebView _preferencesChangedNotification:]): Added a call to Settings::setNeedsSiteSpecificQuirks.
20836         There are currently no site-specific quirks on Mac, but we will propagate the state
20837         to WebCore to avoid possible mistakes later.
20838
20839 2008-02-19  Anders Carlsson  <andersca@apple.com>
20840
20841         Reviewed by Darin Adler.
20842
20843         Move back WebKit methods that were unused in WebCore.
20844         
20845         * Misc/WebNSURLExtras.mm:
20846         (+[NSURL _web_URLWithData:]):
20847         (+[NSURL _web_URLWithData:relativeToURL:]):
20848         (-[NSURL _web_originalData]):
20849         (-[NSURL _web_originalDataAsString]):
20850         (-[NSURL _web_isEmpty]):
20851         (-[NSURL _webkit_canonicalize]):
20852         (-[NSURL _webkit_URLByRemovingComponent:]):
20853         (-[NSURL _webkit_URLByRemovingFragment]):
20854         (-[NSURL _webkit_URLByRemovingResourceSpecifier]):
20855         (-[NSURL _webkit_isFileURL]):
20856         (-[NSString _webkit_isFileURL]):
20857         * WebCoreSupport/WebFrameLoaderClient.mm:
20858         (WebFrameLoaderClient::setTitle):
20859         * WebCoreSupport/WebSystemInterface.m:
20860         (InitWebCoreSystemInterface):
20861
20862 2008-02-18  Darin Adler  <darin@apple.com>
20863
20864         Reviewed by Sam.
20865
20866         * Misc/WebNSAttributedStringExtras.mm:
20867         (+[NSAttributedString _web_attributedStringFromRange:]): Eliminate use of
20868         DeprecatedString.
20869
20870 2008-02-17  Sam Weinig  <sam@webkit.org>
20871
20872         Reviewed by Dan Bernstein.
20873
20874         Fix for http://bugs.webkit.org/show_bug.cgi?id=17365
20875         document.createEvent("MessageEvent") throws NOT_SUPPORTED_ERR
20876
20877         * MigrateHeaders.make: Migrate DOMProgressEvent.h and DOMTextPrivate.h which were
20878         mistakenly not migrated.
20879
20880 2008-02-15  Dan Bernstein  <mitz@apple.com>
20881
20882         Reviewed by Alexey Proskuryakov.
20883
20884         - WebKit part of fixing http://bugs.webkit.org/show_bug.cgi?id=17360
20885           <rdar://problem/5743131> REGRESSION: mp4 file downloaded from server is downloaded as html
20886
20887         * WebView/WebDataSource.mm:
20888         (+[WebDataSource _representationClassForMIMEType:]):
20889         (-[WebDataSource _responseMIMEType]):
20890         (-[WebDataSource subresources]):
20891         (-[WebDataSource subresourceForURL:]):
20892         * WebView/WebResource.mm:
20893         (-[WebResource _initWithData:URL:response:]):
20894         * WebView/WebResourcePrivate.h:
20895
20896 2008-02-15  Adam Roben  <aroben@apple.com>
20897
20898         Make WebKit's FEATURE_DEFINES match WebCore's
20899
20900         Reviewed by Mark.
20901
20902         * Configurations/WebKit.xcconfig:
20903
20904 2008-02-14  Darin Adler  <darin@apple.com>
20905
20906         Reviewed by Eric Seidel.
20907
20908         - updated for WebCore KURL changes
20909
20910         * History/WebHistoryItem.mm:
20911         (-[WebHistoryItem URL]): Removed getNSURL call.
20912         * Misc/WebElementDictionary.mm:
20913         (-[WebElementDictionary _absoluteImageURL]): Ditto.
20914         (-[WebElementDictionary _absoluteLinkURL]): Ditto.
20915         * Misc/WebNSAttributedStringExtras.mm:
20916         (fileWrapperForElement): Ditto.
20917         (+[NSAttributedString _web_attributedStringFromRange:]): Ditto.
20918         * Misc/WebNSURLExtras.mm:
20919         (-[NSString _webkit_stringByReplacingValidPercentEscapes]): Updated
20920         for function name change.
20921         * WebCoreSupport/WebContextMenuClient.mm:
20922         (WebContextMenuClient::downloadURL): Removed getNSURL call.
20923         * WebCoreSupport/WebDragClient.mm:
20924         (WebDragClient::createDragImageForLink): Ditto.
20925         * WebCoreSupport/WebFrameLoaderClient.mm:
20926         (WebFrameLoaderClient::dispatchWillPerformClientRedirect): Ditto.
20927         (WebFrameLoaderClient::startDownload): Ditto.
20928         (WebFrameLoaderClient::updateGlobalHistoryForStandardLoad): Ditto.
20929         (WebFrameLoaderClient::updateGlobalHistoryForReload): Ditto.
20930         (WebFrameLoaderClient::cancelledError): Ditto.
20931         (WebFrameLoaderClient::blockedError): Ditto.
20932         (WebFrameLoaderClient::cannotShowURLError): Ditto.
20933         (WebFrameLoaderClient::interruptForPolicyChangeError): Ditto.
20934         (WebFrameLoaderClient::cannotShowMIMETypeError): Ditto.
20935         (WebFrameLoaderClient::fileDoesNotExistError): Ditto.
20936         (WebFrameLoaderClient::willUseArchive): Ditto.
20937         (WebFrameLoaderClient::setTitle): Ditto.
20938         (WebFrameLoaderClient::actionDictionary): Ditto.
20939         (WebFrameLoaderClient::createFrame): Ditto.
20940         (WebFrameLoaderClient::objectContentType): Ditto.
20941         (WebFrameLoaderClient::createPlugin): Ditto.
20942         (WebFrameLoaderClient::createJavaAppletWidget): Ditto.
20943         * WebView/WebDataSource.mm:
20944         (-[WebDataSource _URL]): Ditto.
20945         (-[WebDataSource _initWithDocumentLoader:]): Ditto.
20946         (-[WebDataSource unreachableURL]): Ditto.
20947         * WebView/WebHTMLView.mm:
20948         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Ditto.
20949
20950 2008-02-14  Stephanie Lewis  <slewis@apple.com>
20951
20952         Reviewed by Geoff.
20953
20954         Update order files.
20955
20956         * WebKit.order:
20957
20958 2008-02-14  Alexey Proskuryakov  <ap@webkit.org>
20959
20960         Reviewed by Adam Roben.
20961
20962         http://bugs.webkit.org/show_bug.cgi?id=17207
20963         Database example doesn't work (requires not-yet-released Safari)
20964
20965         * WebCoreSupport/WebChromeClient.mm:
20966         (WebChromeClient::exceededDatabaseQuota): Check Safari version, and allow 5 megabytes of storage
20967         if it's too old.
20968
20969 2008-02-11  Darin Adler  <darin@apple.com>
20970
20971         - roll out fix for <rdar://problem/5726016> REGRESSION: Xcode News window renders
20972           incorrectly due to visibility fix
20973
20974         Removed the Xcode-specific quirk at the request of some folks on the Xcode team.
20975
20976         * Misc/WebKitVersionChecks.h: Removed the constant.
20977
20978         * WebView/WebView.mm:
20979         (-[WebView _needsXcodeVisibilityQuirk]): Removed.
20980         (-[WebView _preferencesChangedNotification:]): Removed call to
20981         setNeedsXcodeVisibilityQuirk.
20982
20983 2008-02-12  Anders Carlsson  <andersca@apple.com>
20984
20985         Reviewed by Mitz.
20986
20987         * WebCoreSupport/WebFrameBridge.mm:
20988         * WebCoreSupport/WebViewFactory.mm:
20989         (-[WebViewFactory imageTitleForFilename:size:]):
20990         Move implementation from WebFrameBridge to WebViewFactory.
20991
20992 2008-02-11  Darin Adler  <darin@apple.com>
20993
20994         Reviewed by Mitz.
20995
20996         - fix <rdar://problem/5726016> REGRESSION: Xcode News window renders
20997           incorrectly due to visibility fix
20998
20999         Added an Xcode-specific quirk.
21000
21001         * Misc/WebKitVersionChecks.h: Added a constant for the "linked on or after"
21002         part of the check.
21003
21004         * WebView/WebView.mm:
21005         (-[WebView _needsXcodeVisibilityQuirk]): Added.
21006         (-[WebView _preferencesChangedNotification:]): Added a call to
21007         setNeedsXcodeVisibilityQuirk based on _needsXcodeVisibilityQuirk.
21008
21009 2008-02-10  Darin Adler  <darin@apple.com>
21010
21011         - fix http://bugs.webkit.org/show_bug.cgi?id=17274
21012           REGRESSION: User Agent string broken in r30119
21013
21014         * WebView/WebView.mm:
21015         (-[WebView _userAgentWithApplicationName:andWebKitVersion:]):
21016         Fix wrong variable name. Doh!
21017
21018 2008-02-09  Darin Adler  <darin@apple.com>
21019
21020         Reviewed by Tim Hatcher.
21021
21022         - fix <rdar://problem/5725996> crash every time you open the Xcode documentation window
21023
21024         * WebView/WebView.mm:
21025         (-[WebView _userAgentWithApplicationName:andWebKitVersion:]): Work around a bug in the
21026         garbage collector's Objective C++ support by not initializing a static to an object
21027         that needs to be marked when running under GC.
21028
21029 2008-02-05  Dan Bernstein  <mitz@apple.com>
21030
21031         Reviewed by Darin Adler.
21032
21033         - WebKit part of <rdar://problem/5724303> Should implement writing direction shortcuts
21034
21035         The key bindings are Command-Control-left arrow and
21036         Command-Control-right arrow. To match AppKit, the bindings are enabled
21037         only when certain user defaults are set.
21038
21039         * WebView/WebHTMLView.mm:
21040         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
21041         (-[WebHTMLView toggleBaseWritingDirection:]): Changed to call
21042         Frame::baseWritingDirectionForSelectionStart() and
21043         Editor::setBaseWritingDirection() directly.
21044         (-[WebHTMLView changeBaseWritingDirection:]): Ditto.
21045         (writingDirectionKeyBindingsEnabled): Added.
21046         (-[WebHTMLView _changeBaseWritingDirectionTo:]): Added this helper
21047         method.
21048         (-[WebHTMLView changeBaseWritingDirectionToLTR:]): Added.
21049         (-[WebHTMLView changeBaseWritingDirectionToRTL:]): Added.
21050         * WebView/WebView.mm:
21051
21052 2008-02-05  Mark Rowe  <mrowe@apple.com>
21053
21054         Unreviewed build fix.
21055
21056         * WebView/WebView.mm: Add missing #import.
21057
21058 2008-02-05  Mark Rowe  <mrowe@apple.com>
21059
21060         Reviewed by Oliver Hunt.
21061
21062         Update versioning to support the mysterious future.
21063
21064         * Configurations/Version.xcconfig: Add SYSTEM_VERSION_PREFIX_1060.
21065
21066 2008-01-30  Justin Garcia  <justin.garcia@apple.com>
21067
21068         Reviewed by Darin Adler.
21069         
21070         <rdar://problem/5708115> REGRESSION: Words selected with a double click and copied won't paste into Mail
21071
21072         * WebView/WebHTMLView.mm:
21073         (-[WebHTMLView _smartInsertForString:replacingRange:beforeString:afterString:]): Brought 
21074         this back, it's used by Mail.
21075         (-[WebHTMLView _canSmartReplaceWithPasteboard:]): This WebInternal method is
21076         also used by Mail.  Moved to WebPrivate.
21077         * WebView/WebHTMLViewPrivate.h: Expose two methods that Mail uses here, so that we don't
21078         accidently remove them in the future.
21079
21080 2008-01-30  Mark Rowe  <mrowe@apple.com>
21081
21082         Reviewed by Oliver Hunt.
21083
21084         Move off deprecated NSTableView methods.
21085
21086         * WebView/WebHTMLView.mm:
21087         (-[WebTextCompleteController _buildUI]): Switch from -setDrawsGrid: to -setGridStyleMask:.
21088         (-[WebTextCompleteController _placePopupWindow:]): Switch from -selectRow:byExtendingSelection: to -selectRowIndexes:byExtendingSelection:.
21089         (-[WebTextCompleteController filterKeyDown:]): Ditto.
21090
21091 2008-01-26  Mark Rowe  <mrowe@apple.com>
21092
21093         Reviewed by Darin Adler.
21094
21095         Fix leaks seen after loading <http://www.funnyordie.com/videos/d70b5a11cb>.
21096
21097         * Misc/WebNSDataExtras.m:
21098         (-[NSString _web_capitalizeRFC822HeaderFieldName]): Transfer ownerhip of the allocated buffers
21099         to the new CFString so that they will be freed when no longer needed.
21100
21101 2008-01-26  Greg Bolsinga  <bolsinga@apple.com>
21102
21103         <rdar://problem/5708388> WebDashboardRegion.h duplicated between WebCore / WebKit
21104
21105         Reviewed by Darin Adler.
21106
21107         * WebCoreSupport/WebDashboardRegion.h: Removed.
21108         * WebView/WebView.mm: Updated #import to use copy of WebDashboardRegion.h from WebCore.
21109
21110 2008-01-21  Darin Adler  <darin@apple.com>
21111
21112         Reviewed by John Sullivan.
21113
21114         - fix <rdar://problem/5644324> Delegate-less WebKit clients should have no databases
21115         - add a missing export of WebDatabaseExpectedSizeKey
21116         - implement deleteOrigin: and remove deleteDatabasesWithOrigin:
21117
21118         * Storage/WebDatabaseManager.mm:
21119         (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Updated to check for a null
21120         name instead of calling isValid().
21121         (-[WebDatabaseManager deleteOrigin:]): Implemented.
21122         (WebKitInitializeDatabasesIfNecessary): Updated for name change.
21123
21124         * Storage/WebDatabaseManagerPrivate.h: Removed deleteDatabasesWithOrigin:.
21125
21126         * WebCoreSupport/WebChromeClient.h: Updated for changes to ChromeClient.
21127         * WebCoreSupport/WebChromeClient.mm:
21128         (WebChromeClient::exceededDatabaseQuota): Replaced the two different client functions
21129         we had before with a single one.
21130
21131         * WebKit.exp: Added missing export for WebDatabaseExpectedSizeKey.
21132
21133         * WebView/WebPreferenceKeysPrivate.h: Removed WebKitDefaultDatabaseQuotaKey.
21134         * WebView/WebPreferences.m:
21135         (+[WebPreferences initialize]): Removed the default for WebKitDefaultDatabaseQuotaKey.
21136         * WebView/WebPreferencesPrivate.h: Removed defaultDatabaseQuota and
21137         setDefaultDatabaseQuota:.
21138
21139         * WebView/WebUIDelegatePrivate.h: Replaced the two different database quota delegate
21140         methods we had before with a single one.
21141
21142         * WebView/WebView.mm:
21143         (-[WebView _preferencesChangedNotification:]): Removed the code to set the
21144         default database origin quota in WebCore::Settings based on WebPreferences.
21145
21146         * WebView/WebViewInternal.h: Removed delegate method dispatch functions for unusual
21147         types of parameters that the database UI delegate methods had before.
21148
21149 2008-01-20  Mark Rowe  <mrowe@apple.com>
21150
21151         Reviewed by Dan Bernstein.
21152
21153         Remove code bracketed by REMOVE_SAFARI_DOM_TREE_DEBUG_ITEM as we are no longer
21154         interested in supporting Safari 2 with TOT WebKit.
21155
21156         * WebView/WebView.mm:
21157         (+[WebView initialize]):
21158
21159 2008-01-17  Timothy Hatcher  <timothy@apple.com>
21160
21161         Reviewed by Adam Roben.
21162
21163         <rdar://problem/5693558> REGRESSION (r29581): no form field focus rings
21164         and inactive text selection after loading a page
21165         Bug 16917: REGRESSION (r29581/2): Google Maps search box loses focused appearance
21166
21167         The problem was other frames were changing the FocusController's active
21168         status to false after the first responder frame set it to true. The last
21169         frame to call _updateActiveState would win.
21170
21171         * WebView/WebHTMLView.mm:
21172         (-[WebHTMLView _updateActiveState]): Only call page->focusController()->setActive()
21173         if the first responder is the current WebHTMLView or the WebFrameView.
21174         (-[WebHTMLView _web_firstResponderCausesFocusDisplay]): Removed, inlined code in _updateActiveState.
21175
21176 2008-01-18  Adam Roben  <aroben@apple.com>
21177
21178         Rename _updateActiveState to _updateFocusedAndActiveState
21179
21180         Also renamed any related methods/members similarly.
21181
21182         Reviewed by Adele.
21183
21184         * WebView/WebHTMLView.mm:
21185         (-[WebHTMLViewPrivate dealloc]):
21186         (-[WebHTMLView _cancelUpdateFocusedAndActiveStateTimer]):
21187         (-[WebHTMLView close]):
21188         (_updateFocusedAndActiveStateTimerCallback):
21189         (-[WebHTMLView viewWillMoveToWindow:]):
21190         (-[WebHTMLView viewDidMoveToWindow]):
21191         (-[WebHTMLView windowDidBecomeKey:]):
21192         (-[WebHTMLView windowDidResignKey:]):
21193         (-[WebHTMLView becomeFirstResponder]):
21194         (-[WebHTMLView resignFirstResponder]):
21195         * WebView/WebHTMLViewInternal.h:
21196         * WebView/WebHTMLViewPrivate.h:
21197
21198 2008-01-17  John Sullivan  <sullivan@apple.com>
21199
21200         Reviewed by Darin
21201         
21202         - fixed <rdar://problem/5692068> -1 WebFrameView world leaks reported after closing view source window
21203
21204         * WebView/WebFrameView.mm:
21205         (-[WebFrameView initWithCoder:]):
21206         override to bump the global WebFrameView count
21207
21208 2008-01-16  Adam Roben  <aroben@apple.com>
21209
21210         Updated for renames/removal of WebCore methods.
21211
21212         Reviewed by Darin Adler.
21213
21214         * Plugins/WebPluginController.mm:
21215         (-[WebPluginController webPlugInContainerSelectionColor]): Changed to
21216         ask isFocusedAndActive directly, instead of going through the frame
21217         bridge.
21218         * WebView/WebHTMLView.mm:
21219         (-[WebHTMLView _updateActiveState]): Updated for method renames.
21220
21221 2008-01-16  John Sullivan  <sullivan@apple.com>
21222
21223         Reviewed by Adam and Dan
21224         
21225         - cleaned up some existing logging
21226
21227         * WebView/WebHTMLView.mm:
21228         (-[WebHTMLView setNeedsDisplay:]):
21229         add method name to log, use "YES" and "NO" instead of (int)flag
21230         (-[WebHTMLView setNeedsLayout:]):
21231         ditto
21232         (-[WebHTMLView setNeedsToApplyStyles:]):
21233         ditto
21234
21235 2008-01-15  Geoffrey Garen  <ggaren@apple.com>
21236
21237         Reviewed by Andre Boule.
21238
21239         Fixed <rdar://problem/5667627> [WebCache empty] implementation should
21240         not disable/enable the cache
21241         
21242         Toggle the cache model instead -- toggling disable/enable just causes
21243         the cache to forget about resources, not reclaim their memory.
21244
21245         * Misc/WebCache.mm:
21246         (+[WebCache empty]):
21247         * WebView/WebView.mm:
21248         * WebView/WebViewInternal.h:
21249
21250 2008-01-15  Adele Peterson  <adele@apple.com>
21251
21252         Reviewed by Adam and Antti.
21253
21254         WebKit part of fix for <rdar://problem/5619062> Add load progress indicator to video controls
21255
21256         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
21257           Removed initialization for GetMediaControlBackgroundImageData.  Added initialization for DrawMediaSliderTrack.
21258
21259 2008-01-10  Geoffrey Garen  <ggaren@apple.com>
21260
21261         Reviewed by John Sullivan.
21262
21263         Fixed some world leak reports:
21264         * <rdar://problem/5669436> PLT complains about world leak of 1 JavaScript
21265         Interpreter after running cvs-base suite
21266
21267         * <rdar://problem/5669423> PLT complains about world leak if browser
21268         window is open when PLT starts
21269         
21270         These were both bugs in the reporting mechanism, so I took the
21271         opportunity to do some house cleaning there.
21272
21273         * Misc/WebCoreStatistics.h: Did a little renaming, to match
21274         JavaScriptCore better. I kept the methods with the old names around,
21275         though, because old versions of Safari need them.
21276
21277         * Misc/WebCoreStatistics.mm: Removed dependence on
21278         WebCore::JavaScriptStatistics, which is gone now. 
21279         
21280         These two methods are now distinct, for the sake of world leak reporting:
21281         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
21282         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
21283
21284 2008-01-10  Maciej Stachowiak  <mjs@apple.com>
21285
21286         Not reviewed. Build fix.
21287         
21288         - Attempt to fix mac build.
21289
21290         * Storage/WebDatabaseManager.mm:
21291
21292 2008-01-10  Maciej Stachowiak  <mjs@apple.com>
21293
21294         Reviewed by Sam.
21295
21296         - remove SecurityOriginData and fold its functionality into SecurityOrigin
21297
21298         * Storage/WebDatabaseManager.mm:
21299         (-[WebDatabaseManager origins]):
21300         (-[WebDatabaseManager databasesWithOrigin:]):
21301         (-[WebDatabaseManager detailsForDatabase:withOrigin:]):
21302         (-[WebDatabaseManager deleteDatabasesWithOrigin:]):
21303         (-[WebDatabaseManager deleteDatabase:withOrigin:]):
21304         * Storage/WebDatabaseTrackerClient.h:
21305         * Storage/WebDatabaseTrackerClient.mm:
21306         (WebDatabaseTrackerClient::dispatchDidModifyOrigin):
21307         (WebDatabaseTrackerClient::dispatchDidModifyDatabase):
21308         * Storage/WebSecurityOrigin.mm:
21309         (-[WebSecurityOrigin initWithProtocol:domain:port:]):
21310         (-[WebSecurityOrigin protocol]):
21311         (-[WebSecurityOrigin domain]):
21312         (-[WebSecurityOrigin port]):
21313         (-[WebSecurityOrigin usage]):
21314         (-[WebSecurityOrigin quota]):
21315         (-[WebSecurityOrigin setQuota:]):
21316         (-[WebSecurityOrigin isEqual:]):
21317         (-[WebSecurityOrigin dealloc]):
21318         (-[WebSecurityOrigin finalize]):
21319         (-[WebSecurityOrigin _initWithWebCoreSecurityOrigin:]):
21320         (-[WebSecurityOrigin _core]):
21321         * Storage/WebSecurityOriginInternal.h:
21322         * WebCoreSupport/WebChromeClient.h:
21323         * WebCoreSupport/WebChromeClient.mm:
21324         (WebChromeClient::requestQuotaIncreaseForNewDatabase):
21325         (WebChromeClient::requestQuotaIncreaseForDatabaseOperation):
21326
21327 2008-01-10  Sam Weinig  <sam@webkit.org>
21328
21329         Reviewed by Anders Carlsson.
21330
21331         Fixes: http://bugs.webkit.org/show_bug.cgi?id=16522
21332         <rdar://problem/5657355>
21333
21334         * Plugins/WebBaseNetscapePluginView.mm:
21335         (-[WebBaseNetscapePluginView loadPluginRequest:]): call findFrameForNavigation
21336         to ensure the shouldAllowNavigation check is made.
21337
21338 2008-01-07  Nikolas Zimmermann  <zimmermann@kde.org>
21339
21340         Reviewed by Mark.
21341
21342         Enable SVG_FONTS by default.
21343
21344         * Configurations/WebKit.xcconfig:
21345
21346 2008-01-07  Adele Peterson  <adele@apple.com>
21347
21348         Reviewed by Antti, Adam, and Mitz.
21349
21350         WebKit part of fix for 
21351         <rdar://problem/5619073> Updated look for <video> controls
21352         <rdar://problem/5619057> Add volume control to video controls
21353
21354         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
21355
21356 2008-01-07  Dan Bernstein  <mitz@apple.com>
21357
21358         Reviewed by Dave Hyatt.
21359
21360         - <rdar://problem/5665216> Support the unicode-range property in @font-face rules
21361
21362         * Misc/WebNSAttributedStringExtras.mm:
21363
21364 2008-01-03  Alexey Proskuryakov  <ap@webkit.org>
21365
21366         Reviewed by Darin Adler.
21367
21368         <rdar://problem/5463489> A number of layout tests should be using execCommand instead of textInputController
21369
21370         * WebView/WebView.mm:
21371         (-[WebView _executeCoreCommandByName:value:]):
21372         * WebView/WebViewPrivate.h:
21373         Added an SPI to implement layoutTestController.execCommand.
21374
21375 2008-01-03  Kevin Decker  <kdecker@apple.com>
21376
21377         Reviewed by Darin Adler.
21378
21379         Fixed: <rdar://problem/4106190> Include "Where from" metadata in drag-and-dropped images
21380         
21381         * Misc/WebNSFileManagerExtras.h:
21382         * Misc/WebNSFileManagerExtras.m:
21383         (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Added new method. Uses WebKitSystemInterface to set
21384         "Where from:" metadata information.
21385         * WebView/WebHTMLView.mm:
21386         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Added "Where from:" metadata for drag and dropped images.
21387         
21388 2008-01-03  Alice Liu  <alice.liu@apple.com>
21389
21390         Reviewed by Darin Adler.
21391
21392         This fixes pageup/down in iframes.  test for this is fast/frames/iframe-scroll-page-up-down.html
21393
21394         * WebView/WebHTMLView.mm:
21395         (-[WebHTMLView doCommandBySelector:]):
21396         Have the editor handle all the commands it supports instead of just text commands.
21397         If not handled by the editor, the webview will handle the command. 
21398
21399 2008-01-02  Kevin Decker  <kdecker@apple.com>
21400
21401         Reviewed by Darin Adler.
21402         
21403         Fixed: <rdar://problem/5660603> QuickDraw plug-ins can cause a 100% reproducible assertion failure in AppKit (breaks Safari UI)
21404
21405         * Plugins/WebBaseNetscapePluginView.mm:
21406         (-[WebBaseNetscapePluginView updateAndSetWindow]): Simplified an early return for non-QuickDraw plug-ins and switched
21407         to using the more NSView friendly version of lockFocus, lockFocusIfCanDraw.
21408
21409 2008-01-01  David D. Kilzer  <ddkilzer@webkit.org>
21410
21411         Reviewed by Dan.
21412
21413         - fix http://bugs.webkit.org/show_bug.cgi?id=16700
21414           Fix -[WebDefaultPolicyDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]
21415
21416         * DefaultDelegates/WebDefaultPolicyDelegate.m: Check return value of
21417         -[NSFileManager fileExistsAtPath:isDirectory:] before using the value
21418         of isDirectory.
21419
21420 2007-12-29  Nikolas Zimmermann  <zimmermann@kde.org>
21421
21422         Reviewed by Eric.
21423
21424         Add DOMSVGFontElement/DOMSVGGlyphElement/DOMSVGMissingGlyphElement to MigrateHeaders.make
21425
21426         * MigrateHeaders.make:
21427
21428 2007-12-25  Dan Bernstein  <mitz@apple.com>
21429
21430         Reviewed by Oliver Hunt.
21431
21432         - fix an assertion failure when pressing the num lock key
21433
21434         * WebView/WebHTMLView.mm:
21435         (-[WebHTMLView flagsChanged:]): Avoid passing key code 10 down to
21436         WebCore.
21437
21438 2007-12-20  Darin Adler  <darin@apple.com>
21439
21440         Reviewed by Oliver.
21441
21442         - fix <rdar://problem/5658787> Selector -[WebView insertLineBreak:] is not implemented
21443
21444         * WebView/WebView.mm: Added all selectors implemented by WebHTMLView to the list of
21445         selectors to forward here. The new ones are: changeBaseWritingDirection:, changeSpelling:,
21446         deleteToMark:, insertLineBreak:, moveParagraphBackwardAndModifySelection:,
21447         moveParagraphForwardAndModifySelection:, pageDownAndModifySelection:, pageUpAndModifySelection:,
21448         selectToMark:, setMark:, swapWithMark:, takeFindStringFromSelection:, toggleBaseWritingDirection:,
21449         and transpose:.
21450
21451 2007-12-20  Kevin Decker  <kdecker@apple.com>
21452
21453         Reviewed by Anders.
21454         
21455         Fixed: <rdar://problem/5638288> REGRESSION: Flash movies show up in other tabs above the page (16373)
21456
21457         * Plugins/WebBaseNetscapePluginView.mm:
21458         (-[WebBaseNetscapePluginView updateAndSetWindow]): QuickDraw plug-ins must manually be told when to stop
21459          writing to the window backing store. The problem was that change-set 28400 introduced an early return 
21460          which prevented this necessary operation. The fix is to limit the scope of the early return to CG and GL
21461          plug-ins and to tweak the needsFocus check to prevent an exception from occurring in QuickDraw-based plug-ins.
21462
21463 2007-12-19  Geoffrey Garen  <ggaren@apple.com>
21464
21465         Reviewed by Oliver Hunt.
21466
21467         Build fix.
21468
21469         * ForwardingHeaders/kjs/SymbolTable.h: Added.
21470         * ForwardingHeaders/wtf/VectorTraits.h: Added.
21471
21472 2007-12-16  Mark Rowe  <mrowe@apple.com>
21473
21474         Reviewed by Maciej Stachowiak.
21475
21476         Refactor Mac plugin stream code to use the shared NetscapePlugInStreamLoader implementation.
21477
21478         * Plugins/WebBaseNetscapePluginStream.h:
21479         * Plugins/WebNetscapePluginStream.h:
21480         * Plugins/WebNetscapePluginStream.mm:
21481         (-[WebNetscapePluginStream initWithRequest:plugin:notifyData:sendNotification:]):
21482         (-[WebNetscapePluginStream dealloc]):
21483         (-[WebNetscapePluginStream finalize]):
21484         * Plugins/WebPlugInStreamLoaderDelegate.h: Moved from WebCore.
21485         * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.h: Added.
21486         (WebNetscapePlugInStreamLoaderClient::WebNetscapePlugInStreamLoaderClient):
21487         * WebCoreSupport/WebNetscapePlugInStreamLoaderClient.mm: Added.
21488         (WebNetscapePlugInStreamLoaderClient::didReceiveResponse): Call through to the equivalent WebPlugInStreamLoaderDelegate method.
21489         (WebNetscapePlugInStreamLoaderClient::didReceiveData): Ditto.
21490         (WebNetscapePlugInStreamLoaderClient::didFail): Ditto.
21491         (WebNetscapePlugInStreamLoaderClient::didFinishLoading): Ditto.
21492
21493 2007-12-16  Alexey Proskuryakov  <ap@webkit.org>
21494
21495         Reviewed by Darin Adler.
21496
21497         http://bugs.webkit.org/show_bug.cgi?id=14140
21498         <rdar://problem/5270958> REGRESSION: Complex system KeyBindings don't work properly
21499
21500         * WebView/WebHTMLView.mm:
21501         (-[WebHTMLView _interceptEditingKeyEvent:shouldSaveCommand:]): Made command replaying work
21502         when handling keypress, too.
21503         (-[WebHTMLView doCommandBySelector:]): Adapted for the new way to store commands in events.
21504         (-[WebHTMLView insertText:]): Append a command, not replace the whole existing vector. Also,
21505         restore the state for additional commands to be saved correctly.
21506
21507 2007-12-14  David D. Kilzer  <ddkilzer@apple.com>
21508
21509         <rdar://problem/5647272> Remove user agent string hack for flickr.com
21510
21511         Reviewed by Darin Adler.
21512
21513         * WebView/WebView.mm:
21514         (-[WebView _userAgentForURL:]): Removed hack.
21515
21516 2007-12-14  David D. Kilzer  <ddkilzer@apple.com>
21517
21518         <rdar://problem/5647261> Remove user agent string hack for yahoo.com
21519
21520         Reviewed by Darin Adler.
21521
21522         * WebView/WebView.mm:
21523         (-[WebView _userAgentForURL:]): Removed hack.
21524
21525 2007-12-14  Darin Adler  <darin@apple.com>
21526
21527         Reviewed by Brady.
21528
21529         - fix http://bugs.webkit.org/show_bug.cgi?id=16296
21530           <rdar://problem/5635641> -[WebFrameLoadDelegate didReceiveIcon:forFrame:] never called
21531
21532         * WebView/WebView.mm:
21533         (-[WebView setFrameLoadDelegate:]): Call [WebIconDatabase sharedIconDatabase] if the
21534         a didReceiveIcon method is present.
21535
21536 2007-12-14  Darin Adler  <darin@apple.com>
21537
21538         Reviewed by Alexey.
21539
21540         - Changed a few more editing operations to use WebCore instead of WebKit.
21541         - Removed some obsolete unused code.
21542
21543         * WebCoreSupport/WebFrameBridge.h: Moved declarations of methods that are both
21544         defined and used on the WebKit side to here. These no longer belong on the bridge
21545         and should be moved to the WebFrame class (or elsewhere).
21546         * WebCoreSupport/WebFrameBridge.mm: Removed some unused methods.
21547
21548         * WebView/WebFrameView.mm:
21549         (+[WebFrameView _viewTypesAllowImageTypeOmission:]): Fix typo in comment.
21550
21551         * WebView/WebHTMLView.mm:
21552         (-[WebHTMLViewPrivate dealloc]): Removed unused firstResponderTextViewAtMouseDownTime.
21553         (-[WebHTMLViewPrivate clear]): Ditto.
21554         (-[WebHTMLView _setMouseDownEvent:]): Ditto.
21555         (commandNameForSelector): Added special cases for pageDown:, pageDownAndModifySelection:,
21556         pageUp:, and pageUpAndModifySelection:, since those names probably aren't specific enough
21557         to be used in WebCore (what AppKit calls scrollPageDown: vs. pageDown: needs to be
21558         disambiguated with the word "Move"). Added deleteBackward:,
21559         deleteBackwardByDecomposingPreviousCharacter:, deleteForward:, deleteToBeginningOfLine:,
21560         deleteToBeginningOfParagraph:, deleteToEndOfLine:, deleteToEndOfParagraph:, pageDown:,
21561         pageDownAndModifySelection:, pageUp:, pageUpAndModifySelection:, selectLine:,
21562         selectParagraph:, selectSentence:, and selectWord: to the list of commands that are
21563         forwarded to WebCore.
21564         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Eliminated the long list of
21565         operations that we forward to WebCore. Instead, look up any command that WebCore can
21566         handle, after any that we handle specially in WebHTMLView. Also fixed a bug where
21567         an item that's not a menu item with changeBaseWritingDirection:NSWritingDirectionNatural
21568         would end up enabled instead of disabled and streamlined the logic for toggleGrammarChecking:.
21569         (-[WebHTMLView mouseDown:]): Removed unused firstResponderTextViewAtMouseDownTime.
21570         (-[WebHTMLView becomeFirstResponder]): Removed unused willBecomeFirstResponderForNodeFocus.
21571         (-[WebHTMLView resignFirstResponder]): Ditto.
21572         (-[WebHTMLView checkSpelling:]): Took unneeded extra initialization of NSSpellChecker.
21573
21574         * WebView/WebHTMLViewInternal.h: Removed unused willBecomeFirstResponderForNodeFocus,
21575         firstResponderTextViewAtMouseDownTime, _textViewWasFirstResponderAtMouseDownTime: and
21576         _willMakeFirstResponderForNodeFocus.
21577
21578 2007-12-13  Alexey Proskuryakov  <ap@webkit.org>
21579
21580         Reviewed by Darin Adler.
21581
21582         Turn on keyboard event processing quirks for feed views and old applications on Mac OS X.
21583
21584         * Misc/WebKitVersionChecks.h:
21585         * WebView/WebView.mm:
21586         (-[WebView _needsKeyboardEventHandlingQuirks]):
21587         (-[WebView _preferencesChangedNotification:]):
21588
21589 2007-12-12  Brady Eidson  <beidson@apple.com>
21590
21591         Reviewed by Sam Weinig
21592
21593         Fix for <rdar://problem/4886844> and lay groundwork for <rdar://problem/4516170> (Back/Forward Cache on Windows)
21594
21595         * WebCoreSupport/WebCachedPagePlatformData.h: Added.
21596         (WebCachedPagePlatformData::WebCachedPagePlatformData): Constructor takes a WebDocumentView for later restoration
21597         (WebCachedPagePlatformData::clear):
21598         (WebCachedPagePlatformData::webDocumentView):
21599
21600         * WebCoreSupport/WebFrameLoaderClient.h:
21601         * WebCoreSupport/WebFrameLoaderClient.mm:
21602         (WebFrameLoaderClient::savePlatformDataToCachedPage):
21603         (WebFrameLoaderClient::transitionToCommittedFromCachedPage): Don't set the DocumentLoader to the Frame here, 
21604           because that is now done in WebCore.
21605         (WebFrameLoaderClient::transitionToCommittedForNewPage):
21606
21607 2007-12-12  Mark Rowe  <mrowe@apple.com>
21608
21609         Reviewed by Dave Kilzer.
21610
21611         Remove abuse of projectDirPath from WebKit.xcodeproj to fix Production builds.
21612
21613         * Configurations/WebKit.xcconfig:
21614
21615 2007-12-11  Sam Weinig  <sam@webkit.org>
21616
21617         Reviewed by Darin Adler.
21618
21619         Scrub URL out of the tree in preparation for renaming KURL to URL.
21620
21621         * WebCoreSupport/WebFrameLoaderClient.mm:
21622         (WebFrameLoaderClient::actionDictionary):
21623         * WebView/WebDataSource.mm:
21624         (-[WebDataSource _URL]):
21625         * WebView/WebView.mm:
21626         (-[WebView _dispatchDidReceiveIconFromWebFrame:]):
21627
21628 2007-12-11  Darin Adler  <darin@apple.com>
21629
21630         Reviewed by Geoff.
21631
21632         - change more editing commands to use WebCore::Editor
21633         - change to use the new WebCore::Editor::command() function
21634
21635         * WebView/WebHTMLView.mm: Changed alignCenter, alignJustified, alignLeft,
21636         alignRight, cut, copy, deleteToMark, indent, insertNewlineIgnoringFieldEditor,
21637         insertTabIgnoringFieldEditor, outdent, selectAll, selectToMark, setMark,
21638         subscript, superscript, swapWithMark, underline, unscript, yank, and yankAndSelect
21639         to use the "forward to WebCore" macro instead of having hand-written implementations.
21640         (kit): Added function to change a TriState to an AppKit-style tri-state value.
21641         (-[WebHTMLView coreCommandBySelector:]): Added. No longer converts case of the
21642         first character or copies the selector name, since the Editor commands are not case
21643         sensitive any more. Returns a command object.
21644         (-[WebHTMLView coreCommandByName:]): Added.
21645         (-[WebHTMLView executeCoreCommandBySelector:]): Renamed from callWebCoreCommand:,
21646         and changed to use the new coreCommandBySelector: method.
21647         (-[WebHTMLView executeCoreCommandByName:]): Added.
21648         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]): Changed all the
21649         methods that call through to WebCore to also use the state() and isEnabled()
21650         functions on the commands for the menu item state and user interface item enabling.
21651         (-[WebHTMLView _handleStyleKeyEquivalent:]): Use ToggleBold and ToggleItalic by
21652         name rather than having local methods for them; no need for methods with a single
21653         call site.
21654         (-[WebHTMLView insertParagraphSeparator:]): Use executeCoreCommandByName: rather
21655         than the deprecated execCommand().
21656         (-[WebHTMLView doCommandBySelector:]): Changed to use command().execute() rather
21657         than the deprecated execCommand().
21658         * WebView/WebHTMLViewInternal.h: Removed some unneeded method declarations.
21659
21660 2007-12-07  Alexey Proskuryakov  <ap@webkit.org>
21661
21662         Reviewed by Darin Adler.
21663
21664         <rdar://problem/5535636>
21665         Have to press 4 times instead of 2 times to get the expected result of ^^ with german keyboard.
21666
21667         http://bugs.webkit.org/show_bug.cgi?id=13916
21668         JavaScript detects Tab as a character input on a textfield validation
21669
21670         * WebCoreSupport/WebEditorClient.h:
21671         Renamed handleKeypress() to handleKeyboardEvent(), as it gets both keydowns and keypresses.
21672         Renamed handleInputMethodKeypress() to handleInputMethodKeydown().
21673         * WebCoreSupport/WebEditorClient.mm:
21674         (WebEditorClient::handleKeyboardEvent): This change makes sense only remotely, but it helped
21675         to get tests working. I guess Mac keyboard event handling needs further refactoring.
21676
21677         * WebView/WebHTMLView.mm:
21678         (selectorToCommandName): Convert AppKit editing selector name to Editor command name - extracted
21679         from callWebCoreCommand:.
21680         (_interceptEditingKeyEvent:shouldSaveCommand:): Insert text from keypress.
21681
21682         * WebView/WebPDFView.mm:
21683         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
21684         Convert incoming platform KeyDown into RawKeyDown, as this is what the view is interested in.
21685
21686 2007-12-10  Brady Eidson  <beidson@apple.com>
21687
21688         Reviewed by John Sullivan
21689
21690         Fix for <rdar://problem/5640080> - Database UI delegate calls need to specify WebFrame
21691
21692         This is because a common UI case is to want to know the originating URL of a Database
21693
21694         * WebCoreSupport/WebChromeClient.mm:
21695         (WebChromeClient::requestQuotaIncreaseForNewDatabase):
21696         (WebChromeClient::requestQuotaIncreaseForDatabaseOperation):
21697
21698         * WebView/WebUIDelegatePrivate.h:
21699
21700         * WebView/WebView.mm:
21701         (CallDelegateReturningUnsignedLongLong):
21702         (CallUIDelegateReturningUnsignedLongLong):
21703         * WebView/WebViewInternal.h:
21704
21705 2007-12-10  Timothy Hatcher  <timothy@apple.com>
21706
21707         Reviewed by Mark Rowe.
21708
21709         <rdar://problem/5639463> Bundle versions on Tiger should be 4523.x not 523.x
21710
21711         * Configurations/Version.xcconfig: Some Tiger versions of Xcode don't set MAC_OS_X_VERSION_MAJOR,
21712           so assume Tiger and use a 4 for the SYSTEM_VERSION_PREFIX.
21713
21714 2007-12-10  Kevin Decker  <kdecker@apple.com>
21715
21716         Reviewed by Darin Adler.
21717
21718         Fixed: <rdar://problem/4290098> Right-mouse click on element doesn't call onmousedown handler
21719         
21720         * WebView/WebHTMLView.mm:
21721         (-[WebHTMLView menuForEvent:]): Match behavior of other browsers by sending an onmousedown event for right clicks.
21722
21723 2007-12-08  Oliver Hunt  <oliver@apple.com>
21724
21725         Reviewed by Sam W.
21726
21727         Split the ENABLE_SVG_EXPERIMENTAL_FEATURES flag into separate flags.
21728         
21729         Fixes <rdar://problem/5620249> Must disable SVG animation
21730         <rdar://problem/5612772> Disable SVG filters on Mac to match Windows behavior
21731         
21732         Minor updates to the feature flags used.
21733
21734         * Configurations/WebKit.xcconfig:
21735         * DOM/WebDOMOperations.mm:
21736
21737 2007-12-07  Darin Adler  <darin@apple.com>
21738
21739         Reviewed by Kevin Decker and Tim Hatcher.
21740
21741         - speculative fix for <rdar://problem/5400159> CrashTracer: [USER] 726 crashes
21742           in Safari at com.apple.WebKit: -[WebHTMLView(WebPrivate) _updateMouseoverWithFakeEvent] + 389
21743
21744         * WebView/WebHTMLView.mm:
21745         (-[WebHTMLView _frameOrBoundsChanged]): Only schedule the mouseover timer if we are in a window
21746         and not closed. That's because viewDidMoveToWindow and close are the entry points for cancelling.
21747         (-[WebHTMLView close]): Add code to cancel both timers. Needed for the case where the entire
21748         window goes away, and the view is never removed from the window.
21749         (-[WebHTMLView viewDidMoveToWindow]): Don't do work if the view is closed.
21750
21751 2007-12-07  Darin Adler  <darin@apple.com>
21752
21753         Reviewed by Mitz.
21754
21755         - http://bugs.webkit.org/show_bug.cgi?id=15981
21756           speed up visited-link code a bit
21757
21758         * History/WebHistory.mm: Removed unused Latin-1 code path.
21759         (-[_WebCoreHistoryProvider containsURL:length:]): Updated for method name change.
21760
21761 2007-12-07  Geoffrey Garen  <ggaren@apple.com>
21762
21763         Reviewed by Sam Weinig.
21764         
21765         Added a forwarding header, since we now #include nodes.h through some
21766         JavaScriptCore headers.
21767
21768         * ForwardingHeaders/wtf/ListRefPtr.h: Added.
21769
21770 2007-12-06  Brady Eidson  <beidson@apple.com>
21771
21772         Reviewed by Oliver's rubber stamp
21773
21774         Let's go ahead and call the correct UI Delegate method, shall we?
21775
21776         * WebCoreSupport/WebChromeClient.mm:
21777         (WebChromeClient::requestQuotaIncreaseForDatabaseOperation): Call the correct UI delegate
21778
21779 2007-12-06  Adam Roben  <aroben@apple.com>
21780
21781         Remove some assertions we know can fire and replace them with a FIXME
21782
21783         Reviewed by Anders.
21784
21785         * WebCoreSupport/WebFrameLoaderClient.mm:
21786
21787 2007-12-06  Timothy Hatcher  <timothy@apple.com>
21788
21789         Change the ASSERT added for the previous fix. The ASSERT was firing for 10.5.0.
21790         Only assert if the major version is zero, since zero is handled in the other cases.
21791
21792         * WebView/WebView.mm:
21793         (callGestalt): Remove the ASSERT.
21794         (createMacOSXVersionString): ASSERT that major is not zero.
21795
21796 2007-12-06  Darin Adler  <darin@apple.com>
21797
21798         Reviewed by Tim Hatcher.
21799
21800         - fix <rdar://problem/5513394> No way to detect Tiger vs Leopard from Safari's user agent string
21801
21802         * WebView/WebView.mm:
21803         (callGestalt): Added.
21804         (createMacOSXVersionString): Added.
21805         (-[WebView _userAgentWithApplicationName:andWebKitVersion:]): Added Mac OS X version string,
21806         right after the string "Mac OS X", but with underscores instead of dots to avoid the dreaded
21807         "4." problem (old libraries that think a "4." anywhere in the user agent means Netscape 4).
21808         (-[WebView _userAgentForURL:]): Fixed incorrect bug numbers.
21809
21810 2007-12-04  Geoffrey Garen  <ggaren@apple.com>
21811
21812         Reviewed by Darin Adler.
21813
21814         Third step in refactoring JSGlobalObject: Moved data members and data
21815         member access from Interpreter to JSGlobalObject.
21816         
21817         * WebView/WebFrame.mm:
21818         (-[WebFrame _attachScriptDebugger]):
21819
21820 2007-12-04  Kevin McCullough  <kmccullough@apple.com>
21821
21822         Reviewed by Darin Adler.
21823
21824         - <rdar://5621435>
21825         - Security Fix. Instead of having it off by default, WebKit now must
21826         explicitly turn off local-resource restriction when needed for backwards
21827         coimpatibility reasons.
21828
21829         * WebView/WebView.mm:
21830         (-[WebView _commonInitializationWithFrameName:groupName:]):
21831
21832 2007-12-05  Brady Eidson  <beidson@apple.com>
21833
21834         Reviewed by Kevin Deckers rubberstamp
21835
21836         Disclose and export the Databases Directory defaults key
21837
21838         * Storage/WebDatabaseManager.mm:
21839         * Storage/WebDatabaseManagerPrivate.h:
21840         * WebKit.exp:
21841
21842 2007-12-04  Kevin Decker  <kdecker@apple.com>
21843
21844         Reviewed by Anders.
21845
21846         <rdar://problem/5629125> PluginInfoStore needs the ability to return the name of a plug-in for a given MIME type
21847
21848         * WebCoreSupport/WebViewFactory.mm:
21849         (-[WebViewFactory pluginNameForMIMEType:]): Added.
21850
21851 2007-12-04  Brady Eidson  <beidson@apple.com>
21852
21853         Reviewed by Mark Rowe
21854
21855         Tweaked the way we typedef and cast these objc_msgSend calls
21856
21857         * WebView/WebView.mm:
21858         (CallDelegateReturningUnsignedLongLong):
21859
21860 2007-12-04  John Sullivan  <sullivan@apple.com>
21861
21862         Reviewed by Brady Eidson (with help from Mark Rowe)
21863         
21864         Fixed return values for unsigned-long-long delegate methods
21865
21866         * WebView/WebView.mm:
21867         (CallDelegateReturningUnsignedLongLong):
21868         redid the change that Brady did at home over the weekend but forgot to check in
21869
21870 2007-11-27  Adam Roben  <aroben@apple.com>
21871
21872         Remove -[WebFrameBridge setNeedsReapplyStyles]
21873
21874         This functionality is now WebCore's responsibility.
21875
21876         Reviewed by Hyatt.
21877
21878         * WebCoreSupport/WebFrameBridge.mm:
21879         * WebKit.order:
21880
21881 2007-12-04  John Sullivan  <sullivan@apple.com>
21882
21883         Reviewed by Darin
21884         
21885         Added deleteOrigin: SPI, which isn't fully implemented
21886
21887         * Storage/WebDatabaseManagerPrivate.h:
21888         * Storage/WebDatabaseManager.mm:
21889         (-[WebDatabaseManager deleteOrigin:]):
21890         just calls deleteDatabasesWithOrigin: for now, but needs to delete origin itself too
21891
21892 2007-12-04  Timothy Hatcher  <timothy@apple.com>
21893
21894         Reviewed by Mark Rowe.
21895
21896         Remove a check for early versions of Leopard CFNetwork now that
21897         Leopard has shipped.
21898
21899         * Misc/WebKitVersionChecks.h: Remove WEBKIT_FIRST_CFNETWORK_VERSION_WITH_LARGE_DISK_CACHE_FIX.
21900         * WebView/WebView.mm:
21901         (+[WebView _setCacheModel:]): Remove the early Leopard CFNetwork check.
21902
21903 2007-12-04  Kevin Decker  <kdecker@apple.com>
21904
21905         Reviewed by Darin Adler.
21906
21907         Revised fix for: <rdar://problem/5586978> REGRESSION (Safari 2-3): WebKit sometimes doesn't invoke Flash's NPP_SetWindow function and causes a hang
21908
21909         This fix is exactly the same as chageset 28359 with the exception of an added early return in
21910         updateAndSetWindow to cover the additional case of when a plug-in isn't drawable.
21911         
21912         The CG-based Flash player would sometimes hang because (for CoreGraphics-based plug-ins) our code would
21913         only call into the NPP_SetWindow() function when we tell the plug-in to draw. This created havoc with 
21914         Flash because Flash expects the browser to call NPP_SetWindow() and provide a valid graphics context 
21915         regardless of whether or not it actually needs to draw. 
21916         
21917         * Plugins/WebBaseNetscapePluginView.mm:
21918         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]): Removed an incorrect comment and toned
21919         down an ASSERT that was too strict. 
21920         (-[WebBaseNetscapePluginView updateAndSetWindow]): Removed an early return for CoreGraphics-based plug-ins
21921         which would sometimes altogether prevent updating the PortState and calling into a plug-ins NPP_SetWindow()
21922         function. Also tweaked a comment and added an early return if the plug-in can't draw.
21923
21924 2007-12-04  Darin Adler  <darin@apple.com>
21925
21926         Reviewed by Kevin Decker.
21927
21928         * WebCoreSupport/WebFrameLoaderClient.h: Removed obsolete privateBrowsingEnabled.
21929         * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
21930         * WebKit.order: Ditto.
21931
21932 2007-12-03  Dan Bernstein  <mitz@apple.com>
21933
21934         Reviewed by Dave Hyatt.
21935
21936         - fix <rdar://problem/5346452> Resize event doesn't fire on body element inside a frame
21937
21938         * WebView/WebHTMLView.mm:
21939         (-[WebHTMLView layoutToMinimumPageWidth:maximumPageWidth:adjustingViewSize:]): Removed the code
21940         that checked if the view had resized and sent the resize event, since
21941         FrameView sends resize events now.
21942         * WebView/WebHTMLViewInternal.h:
21943
21944 2007-12-03  Timothy Hatcher  <timothy@apple.com>
21945
21946         Reviewed by Darin Adler.
21947
21948         Change WebViewGetResourceLoadDelegateImplementations and WebViewGetFrameLoadDelegateImplementations
21949         to return a pointer to the implementation struct instead of a copy of the struct. This changes
21950         all of the callers to dereference the pointer to access the struct fields.
21951
21952         * Plugins/WebNullPluginView.mm:
21953         (-[WebNullPluginView reportFailure]):
21954         * WebCoreSupport/WebFrameBridge.mm:
21955         * WebCoreSupport/WebFrameLoaderClient.mm:
21956         (WebFrameLoaderClient::dispatchDidLoadResourceFromMemoryCache):
21957         (WebFrameLoaderClient::assignIdentifierToInitialRequest):
21958         (WebFrameLoaderClient::dispatchWillSendRequest):
21959         (WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge):
21960         (WebFrameLoaderClient::dispatchDidCancelAuthenticationChallenge):
21961         (WebFrameLoaderClient::dispatchDidReceiveResponse):
21962         (WebFrameLoaderClient::willCacheResponse):
21963         (WebFrameLoaderClient::dispatchDidReceiveContentLength):
21964         (WebFrameLoaderClient::dispatchDidFinishLoading):
21965         (WebFrameLoaderClient::dispatchDidFailLoading):
21966         (WebFrameLoaderClient::dispatchDidHandleOnloadEvents):
21967         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
21968         (WebFrameLoaderClient::dispatchDidCancelClientRedirect):
21969         (WebFrameLoaderClient::dispatchWillPerformClientRedirect):
21970         (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage):
21971         (WebFrameLoaderClient::dispatchWillClose):
21972         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
21973         (WebFrameLoaderClient::dispatchDidReceiveTitle):
21974         (WebFrameLoaderClient::dispatchDidCommitLoad):
21975         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
21976         (WebFrameLoaderClient::dispatchDidFailLoad):
21977         (WebFrameLoaderClient::dispatchDidFinishDocumentLoad):
21978         (WebFrameLoaderClient::dispatchDidFinishLoad):
21979         (WebFrameLoaderClient::dispatchDidFirstLayout):
21980         * WebView/WebView.mm:
21981         (WebViewGetResourceLoadDelegateImplementations):
21982         (WebViewGetFrameLoadDelegateImplementations):
21983         (-[WebView _dispatchDidReceiveIconFromWebFrame:]):
21984         * WebView/WebViewInternal.h:
21985
21986 2007-12-03  Timothy Hatcher  <timothy@apple.com>
21987
21988         Reviewed by Brady Eidson.
21989
21990         <rdar://problem/5539913> 188 crashes in WebViewGetFrameLoadDelegateImplementations
21991         <rdar://problem/5586095> CrashTracer: [USER] 5000+ crashes in Safari and Dashboard in dispatchDidFailLoading
21992         <rdar://problem/5607081> CrashTracer: [USER] 2150 crashes in Safari at com.apple.WebKit:
21993         WebViewGetResourceLoadDelegateImplementations + 28
21994
21995         * WebView/WebView.mm:
21996         (-[WebView _cacheResourceLoadDelegateImplementations]): If the delegate is nil, bzero the
21997         implementation cache. This just prevents us from calling getMethod() multiple times just to zero.
21998         (-[WebView _cacheFrameLoadDelegateImplementations]): Ditto.
21999         (WebViewGetResourceLoadDelegateImplementations): Return a zeroed implementations struct
22000         if the WebView is nil. This fixes the crashes.
22001         (WebViewGetFrameLoadDelegateImplementations): Ditto.
22002
22003 2007-12-02  Geoffrey Garen  <ggaren@apple.com>
22004
22005         Reviewed by Eric Seidel.
22006
22007         Updated to match the JavaScriptCore change to move virtual methods from
22008         Interpreter to JSGlobalObject.
22009
22010         * WebView/WebFrame.mm:
22011         (-[WebFrame globalContext]): Use the toRef function instead of manually
22012         casting.
22013
22014 2007-12-01  Brady Eidson  <beidson@apple.com>
22015
22016         Reviewed by Tim
22017
22018         Added a default database quota of 5mb to the default WebPreferences
22019
22020         * WebView/WebPreferences.m:
22021         (+[WebPreferences initialize]):
22022
22023 2007-11-30  John Sullivan  <sullivan@apple.com>
22024
22025         Reviewed by Geoff Garen
22026         
22027         Added another symbol for WebDatabaseManager clients
22028
22029         * WebKit.exp:
22030         added .objc_class_name_WebSecurityOrigin
22031
22032 2007-11-30  Brady Eidson  <beidson@apple.com>
22033
22034         Reviewed by Geoff
22035
22036         Add isEqual operator to WebSecurityOrigin
22037
22038         * Storage/WebSecurityOrigin.mm:
22039         (-[WebSecurityOrigin isEqual:]):
22040
22041 2007-11-30  John Sullivan  <sullivan@apple.com>
22042
22043         Reviewed by Darin
22044         
22045         Tweaks to newly-declared NSString * constants to make them usable from clients
22046
22047         * Storage/WebDatabaseManagerPrivate.h:
22048         * Storage/WebDatabaseManager.mm:
22049         removed "const" from new NSNotification names and userInfo keys; these generate compiler warnings when used
22050         
22051         * WebKit.exp:
22052         export new NSNotification names and userInfo keys so clients can use them
22053
22054 2007-11-29  Anders Carlsson  <andersca@apple.com>
22055
22056         Reviewed by John.
22057
22058         Rename WebKitShrinksStandaloneImagesToFitKey to WebKitShrinksStandaloneImagesToFit.
22059         
22060         This is safe to do because the preference is off by default and Safari 3, which is the only client that turns it on,
22061         is using the setter and not messing around with NSUserDefaults.
22062         
22063         * WebView/WebPreferenceKeysPrivate.h:
22064         * WebView/WebPreferences.m:
22065         (+[WebPreferences initialize]):
22066         (-[WebPreferences shrinksStandaloneImagesToFit]):
22067         (-[WebPreferences setShrinksStandaloneImagesToFit:]):
22068
22069 2007-11-29  Brady Eidson  <beidson@apple.com>
22070
22071         Reviewed by Anders
22072
22073         Support for <rdar://problem/5556381> and <rdar://problem/5556379>
22074
22075         Hook up UI Delegate calls for the database engine feature and other small tweaks
22076
22077         * Storage/WebDatabaseManager.mm:
22078         (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Renamed databaseName parameter to databaseIdentifier for clarity
22079         (-[WebDatabaseManager deleteDatabase:withOrigin:]): Renamed databaseName parameter to databaseIdentifier for clarity
22080         * Storage/WebDatabaseManagerPrivate.h:
22081
22082         * Storage/WebDatabaseTrackerClient.h:
22083         * Storage/WebDatabaseTrackerClient.mm:
22084         (WebDatabaseTrackerClient::dispatchDidModifyDatabase): Renamed databaseName parameter to databaseIdentifier for clarity
22085
22086         * WebCoreSupport/WebChromeClient.h:
22087         * WebCoreSupport/WebChromeClient.mm:
22088         (WebChromeClient::requestQuotaIncreaseForNewDatabase): Call through to the UI Delegate
22089         (WebChromeClient::requestQuotaIncreaseForDatabaseOperation): Ditto
22090
22091         * WebView/WebUIDelegatePrivate.h: Added the two UI Delegate methods
22092
22093         * WebView/WebView.mm:
22094         (CallDelegateReturningUnsignedLongLong):
22095         (CallUIDelegateReturningUnsignedLongLong):
22096         * WebView/WebViewInternal.h:
22097
22098 2007-11-28  Kevin McCullough  <kmccullough@apple.com>
22099
22100         Reviewed by Sam.
22101
22102         - Added recursive runloop guards.
22103
22104         * DefaultDelegates/WebScriptDebugServer.m:
22105         (-[WebScriptDebugServer suspendProcessIfPaused]):
22106
22107 2007-11-29  Mark Rowe  <mrowe@apple.com>
22108
22109         Reviewed by Oliver Hunt.
22110
22111         Fix an assertion failure seen on the layout tests, and when closing the window after
22112         visiting <http://www.coudal.com/losalamos/>.
22113
22114         * Plugins/WebBaseNetscapePluginStream.mm:
22115         (-[WebBaseNetscapePluginStream _destroyStream]): Unlink the file and close the file
22116         descriptor even when the stream is being destroyed without the load completing. This
22117         avoids leaking the path and file descriptor, and leaving the temporary file on disk.
22118
22119 2007-11-28  Adele Peterson  <adele@apple.com>
22120
22121         Reviewed by Darin Adler.
22122
22123         Fix for <rdar://problem/5524216> CrashTracer: [USER] 496 crashes in Safari at com.apple.WebCore: WebCore::Frame::eventHandler const + 6
22124
22125         The CrashTracer shows a variety of crashes in different methods (including keyDown and keyUp). This change adds nil checks for the frame in 
22126         WebHTMLView to prevent future problems in other methods as well.
22127
22128         * WebView/WebHTMLView.mm:
22129         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
22130         (-[WebHTMLView keyDown:]):
22131         (-[WebHTMLView keyUp:]):
22132         (-[WebHTMLView flagsChanged:]):
22133         (-[WebHTMLView _selectionStartFontAttributesAsRTF]):
22134         (-[WebHTMLView _changeCSSColorUsingSelector:inRange:]):
22135         (-[WebHTMLView checkSpelling:]):
22136         (-[WebHTMLView showGuessPanel:]):
22137         (-[WebHTMLView indent:]):
22138         (-[WebHTMLView outdent:]):
22139         (-[WebHTMLView paste:]):
22140         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
22141         (-[WebHTMLView insertText:]):
22142         (-[WebHTMLView selectionTextRects]):
22143
22144 2007-11-28  Dan Bernstein  <mitz@apple.com>
22145
22146         Reviewed by Maciej Stachowiak.
22147
22148         - fix <rdar://problem/5596160> fast/events/objc-event-api.html fails when run alone (or first)
22149
22150         * WebView/WebHTMLView.mm:
22151         (-[WebHTMLView setDataSource:]): This method calls addMouseMovedObserver
22152         because addMouseMovedObserver returns early if the dataSource
22153         is not nil. But if the dataSource is already set (which happens when
22154         a WebHTMLView is being reused) then addMouseMovedObserver must not
22155         be called again.
22156
22157 2007-11-27  Anders Carlsson  <andersca@apple.com>
22158
22159         Reviewed by Brady.
22160
22161         * Storage/WebDatabaseManager.mm:
22162         * Storage/WebDatabaseManagerPrivate.h:
22163         * Storage/WebDatabaseTrackerClient.mm:
22164         (WebDatabaseTrackerClient::dispatchDidModifyOrigin):
22165         (WebDatabaseTrackerClient::dispatchDidModifyDatabase):
22166         * Storage/WebSecurityOrigin.mm:
22167         (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:]):
22168         * Storage/WebSecurityOriginInternal.h:
22169
22170 2007-11-27  Kevin Decker  <kdecker@apple.com>
22171
22172         Reviewed by Darin, landed by Anders.
22173
22174         Fixed: <rdar://problem/4610818> CrashTracer: 1533 crashes in Safari at com.macromedia.Flash Player.plugin: native_ShockwaveFlash_TCallLabel + 271131
22175
22176         The problem was that some Leopard users were still inadvertently using the old Flash 8 plug-in, even though Leopard
22177         shipped with Flash 9. To avoid loading an older version of a plug-in when a newer version is installed, the plug-in
22178         database will compare bundle versions and always load the latest version.
22179
22180         * Plugins/WebBasePluginPackage.h:
22181         * Plugins/WebBasePluginPackage.m:
22182         (-[WebBasePluginPackage versionNumber]): New method. CFBundleGetVersionNumber doesn't work with all possible versioning schemes,
22183         but we think for now it's good enough for us.
22184         * Plugins/WebPluginDatabase.m:
22185         (considerCandidate): Added a C utility function which compares the current plug-in against a candidate plug-in's version number.
22186         If both plug-ins have the same bundle ID and the candiate is newer, the current plug-in becomes the candidate.
22187         (-[WebPluginDatabase pluginForKey:withEnumeratorSelector:]): Calls the new considerCandidate() function.
22188
22189 2007-11-26  Timothy Hatcher  <timothy@apple.com>
22190
22191         Reviewed by Dave Hyatt.
22192
22193         <rdar://problem/5569233> Add the ability to disable author and user CSS styles
22194
22195         * WebView/WebPreferenceKeysPrivate.h: Define WebKitRespectStandardStyleKeyEquivalentsPreferenceKey.
22196         * WebView/WebPreferences.m:
22197         (+[WebPreferences initialize]): Default WebKitRespectStandardStyleKeyEquivalentsPreferenceKey to YES.
22198         (-[WebPreferences authorAndUserStylesEnabled]): Return the setting's BOOL value.
22199         (-[WebPreferences setAuthorAndUserStylesEnabled:]): Set the setting's BOOL value.
22200         * WebView/WebPreferencesPrivate.h: Add authorAndUserStylesEnabled and setAuthorAndUserStylesEnabled:.
22201         * WebView/WebView.mm:
22202         (-[WebView _preferencesChangedNotification:]): Update WebCore::Settings::authorAndUserStylesEnabled.
22203
22204 2007-11-26  Brady Eidson  <beidson@apple.com>
22205
22206         Reviewed by Mark Rowe
22207
22208         Provide API for setting the default storage quota per database origin
22209
22210         * Misc/WebNSDictionaryExtras.h:
22211         * Misc/WebNSDictionaryExtras.m:
22212         (-[NSMutableDictionary _webkit_setUnsignedLongLong:forKey:]): Helper for UINT64 preferences
22213
22214         * WebView/WebPreferenceKeysPrivate.h:
22215         * WebView/WebPreferences.m:
22216         (-[WebPreferences _unsignedLongLongValueForKey:]): Helper for UINT64 prefs
22217         (-[WebPreferences _setUnsignedLongLongValue:forKey:]): Ditto
22218         (-[WebPreferences defaultDatabaseQuota]):
22219         (-[WebPreferences setDefaultDatabaseQuota:]):
22220         * WebView/WebPreferencesPrivate.h:
22221
22222         * WebView/WebView.mm:
22223         (-[WebView _preferencesChangedNotification:]): Set the WebCore Settings version of the default storage pref
22224
22225 2007-11-26  Darin Adler  <darin@apple.com>
22226
22227         Reviewed by Adele.
22228
22229         - some middle-mouse-button-related fixes
22230
22231         These don't affect Safari since it maps the middle mouse button to the command key,
22232         but that might not always be the case for future versions.
22233
22234         * WebView/WebHTMLView.mm:
22235         (-[WebHTMLView otherMouseDown:]): Pass through middle mouse down events to WebCore.
22236         (-[WebHTMLView otherMouseDragged:]): Ditto, for drag events.
22237         (-[WebHTMLView otherMouseUp:]): Ditto, for up events.
22238
22239         * WebView/WebPolicyDelegate.h: Fixed inaccurate documentation of WebActionButtonKey.
22240
22241 2007-11-26  Anders Carlsson  <andersca@apple.com>
22242
22243         Reviewed by Brady.
22244
22245         Get rid of the WebSecurityOriginPrivate object and store 
22246         the WebCore::SecurityOriginData pointer in the _private field of
22247         the WebSecurityOrigin object instead.
22248         
22249         * Storage/WebDatabaseManager.mm:
22250         (-[WebDatabaseManager databasesWithOrigin:]):
22251         (-[WebDatabaseManager detailsForDatabase:withOrigin:]):
22252         (-[WebDatabaseManager deleteDatabasesWithOrigin:]):
22253         (-[WebDatabaseManager deleteDatabase:withOrigin:]):
22254         * Storage/WebSecurityOrigin.mm:
22255         (-[WebSecurityOrigin initWithProtocol:domain:port:]):
22256         (-[WebSecurityOrigin protocol]):
22257         (-[WebSecurityOrigin domain]):
22258         (-[WebSecurityOrigin port]):
22259         (-[WebSecurityOrigin usage]):
22260         (-[WebSecurityOrigin quota]):
22261         (-[WebSecurityOrigin setQuota:]):
22262         (-[WebSecurityOrigin dealloc]):
22263         (-[WebSecurityOrigin finalize]):
22264         (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:]):
22265         (-[WebSecurityOrigin _core]):
22266         * Storage/WebSecurityOriginInternal.h:
22267
22268 2007-11-26  Timothy Hatcher  <timothy@apple.com>
22269
22270         Reviewed by Adam Roben.
22271
22272         Bug 16137: Web Inspector window on Leopard should have a unified toolbar and window title
22273         http://bugs.webkit.org/show_bug.cgi?id=16137
22274
22275         Create the Web Inspector window with the textured style. Set the content border
22276         thickness for the top of the window or the height of the toolbar. Also make the
22277         window's bottom corners square, since a normal textured window normally has
22278         rounded bottom corners.
22279
22280         * WebCoreSupport/WebInspectorClient.mm:
22281         (-[WebInspectorWindowController window]):
22282
22283 2007-11-24  Mark Rowe  <mrowe@apple.com>
22284
22285         Tiger build fix.
22286
22287         * Plugins/WebBaseNetscapePluginStream.mm:
22288         (CarbonPathFromPOSIXPath): Use WebCFAutorelease as this also works on Tiger.
22289
22290 2007-11-24  Mark Rowe  <mrowe@apple.com>
22291
22292         Reviewed by Tim Hatcher.
22293
22294         Fix <rdar://problem/5432686> 333MB RPRVT seems to leak @ www.43folders.com (1hr plug-in stream).
22295         http://bugs.webkit.org/show_bug.cgi?id=13705
22296
22297         Have NP_ASFILE and NP_ASFILEONLY streams write the data to disk as they receive it rather than
22298         dumping the data to disk in a single go when the stream has completed loading.  On a test case
22299         involving a 150MB Flash movie being streamed from a local web server this reduces memory consumption
22300         on page load from around 400MB to 22MB.
22301
22302         The only plugin I have found that uses NP_ASFILE or NP_ASFILEONLY on the Mac is our NetscapeMoviePlugin
22303         example code so the NP_ASFILE portion of this change has not had any testing with a real-world plugin.
22304
22305         * Plugins/WebBaseNetscapePluginStream.h:
22306         * Plugins/WebBaseNetscapePluginStream.mm:
22307         (-[WebBaseNetscapePluginStream initWithRequestURL:plugin:notifyData:sendNotification:]):
22308         (-[WebBaseNetscapePluginStream dealloc]):
22309         (-[WebBaseNetscapePluginStream finalize]):
22310         (-[WebBaseNetscapePluginStream startStreamResponseURL:expectedContentLength:lastModifiedDate:MIMEType:headers:]):
22311         (-[WebBaseNetscapePluginStream _destroyStream]): Update to work with paths as NSStrings.
22312         (-[WebBaseNetscapePluginStream _deliverDataToFile:]): Open the file if it is not already open, and write any data
22313         to disk.
22314         (-[WebBaseNetscapePluginStream finishedLoading]): If the stream is NP_ASFILE or NP_ASFILEONLY we need to ensure
22315         that the file exists before _destroyStream passes it to the plugin.  Simulating the arrival of an empty data block
22316         ensure that the file will be created if it has not already.
22317         (-[WebBaseNetscapePluginStream receivedData:]):
22318         (CarbonPathFromPOSIXPath):
22319         * Plugins/WebBaseNetscapePluginView.mm:
22320         (-[WebBaseNetscapePluginView pluginViewFinishedLoading:]): Data is dealt with incrementally so there's no need to pass
22321         it to finishedLoading.
22322         (-[WebBaseNetscapePluginView evaluateJavaScriptPluginRequest:]): Ditto.
22323
22324 2007-11-23  Oliver Hunt  <oliver@apple.com>
22325
22326         Reviewed by Mark Rowe.
22327         
22328         Fixed <rdar://problem/3759190> allow input methods the option of processing mouse events themselves
22329
22330         * WebView/WebHTMLView.mm:
22331         (-[WebHTMLView mouseDown:]):
22332
22333 2007-11-22  Dan Bernstein  <mitz@apple.com>
22334
22335         Reviewed by Antti Koivisto.
22336
22337         - http://bugs.webkit.org/show_bug.cgi?id=15811
22338           WebKit plug-ins can re-enter WebKit under attach()
22339           <rdar://problem/5577978>
22340
22341         * Plugins/WebNullPluginView.mm:
22342         (-[WebNullPluginView viewDidMoveToWindow]): Removed workaround for the
22343         above bug that added as part of fixing
22344         <http://bugs.webkit.org/show_bug.cgi?id=15804>.
22345
22346 2007-11-21  Mark Rowe  <mrowe@apple.com>
22347
22348         Reviewed by Eric.
22349
22350         Fix WebKit to build without warnings under GCC 4.2.
22351
22352         * Configurations/Base.xcconfig:
22353
22354 2007-11-21  Mark Rowe  <mrowe@apple.com>
22355
22356         Reviewed by Tim Hatcher.
22357
22358         Changes due to <rdar://problem/5602936> Need to resolve new GCC 4.2 warnings
22359
22360         Update format strings to use format specifiers that match the argument types.
22361
22362         * Misc/WebGraphicsExtras.c:
22363         (WebConvertBGRAToARGB):
22364
22365 2007-11-19  Brady Eidson <beidson@apple.com>
22366
22367         Reviewed by Maciej
22368
22369         Finished hooking up the WebKit API for database management.
22370         Most of the API is actually implemented in WebCore and some of those methods might
22371         only be stubs for now.
22372
22373         * Storage/WebDatabaseManager.mm:
22374         (-[WebDatabaseManager origins]): Call through to the WebCore tracker and construct an API result
22375         (-[WebDatabaseManager databasesWithOrigin:]): Ditto
22376         (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Ditto
22377
22378         * Storage/WebSecurityOrigin.mm:
22379         (-[WebSecurityOrigin usage]): Call through to WebCore
22380         (-[WebSecurityOrigin quota]): Ditto
22381         (-[WebSecurityOrigin setQuota:]): Ditto
22382         (-[WebSecurityOrigin _core]): Get WebCore version of this object
22383         * Storage/WebSecurityOriginInternal.h:
22384
22385 2007-11-17  Timothy Hatcher  <timothy@apple.com>
22386
22387         Reviewed by Mark Rowe.
22388
22389         Bug 13470: i18n: The Web Inspector is not localizable
22390         http://bugs.webkit.org/show_bug.cgi?id=13470
22391
22392         Implement the localizedStringsURL() client method to return the
22393         localized URL of InspectorLocalizedStrings.js in WebCore.
22394
22395         * WebCoreSupport/WebInspectorClient.h: Added localizedStringsURL.
22396         * WebCoreSupport/WebInspectorClient.mm:
22397         (WebInspectorClient::localizedStringsURL): Added.
22398         (WebInspectorClient::updateWindowTitle): Localized the window title.
22399         (-[WebInspectorWindowController init]): Remove a FIXME that dosen't make sense anymore.
22400         (-[WebInspectorWindowController initWithInspectedWebView:]): Code style cleanup.
22401
22402 2007-11-17  Alexey Proskuryakov  <ap@webkit.org>
22403
22404         Reviewed by Darin Adler.
22405
22406         http://bugs.webkit.org/show_bug.cgi?id=15969
22407         Eliminate Editor::deleteRange()
22408
22409         * WebView/WebHTMLView.mm:
22410         (+[WebHTMLView initialize]):
22411         (-[WebHTMLView yank:]):
22412         (-[WebHTMLView yankAndSelect:]):
22413         (-[WebHTMLView setMark:]):
22414         (-[WebHTMLView deleteToMark:]):
22415         (-[WebHTMLView selectToMark:]):
22416         (-[WebHTMLView swapWithMark:]):
22417         Pushed all kill ring methods to WebCore. They were guilty of using Editor::deleteRange()!
22418
22419 2007-11-16  Mark Rowe  <mrowe@apple.com>
22420
22421         Reviewed by Tim Hatcher.
22422
22423         Build WebCore as a sub-framework of WebKit in all configurations.
22424
22425         * Configurations/WebKit.xcconfig:
22426
22427 2007-11-16  John Sullivan  <sullivan@apple.com>
22428
22429         Reviewed by Brady
22430
22431         * WebKit.exp:
22432         Exported some new database-related symbols
22433
22434 2007-11-16  Brady Eidson  <beidson@apple.com>
22435
22436         Reviewed by John
22437
22438         Database management API tweaks
22439
22440         Fleshed out "WebSecurityOrigin" to be the API object representing an origin.  This relieves some
22441         burden off WebDatabaseManager and allows usage/quota operations on the SecurityOrigin object itself
22442
22443         Also added a new subdirectory for Storage related API - Why are we afraid to add new directories to
22444         the WebKit tree?
22445
22446         * Misc/WebSecurityOrigin.mm: Removed.
22447         * Misc/WebSecurityOriginInternal.h: Removed.
22448         * Misc/WebSecurityOriginPrivate.h: Removed.
22449
22450         * Storage/WebDatabaseManager.mm: Work in terms of WebSecurityOrigin
22451         * Storage/WebDatabaseManagerPrivate.h:
22452
22453         * Storage/WebSecurityOrigin.mm: Added.
22454         (-[WebSecurityOriginPrivate initWithProtocol:domain:port:]):
22455         (-[WebSecurityOriginPrivate initWithWebCoreSecurityOrigin:]):
22456         (-[WebSecurityOriginPrivate finalize]):
22457         (-[WebSecurityOriginPrivate dealloc]):
22458         (-[WebSecurityOrigin initWithProtocol:domain:]):
22459         (-[WebSecurityOrigin initWithProtocol:domain:port:]):
22460         (-[WebSecurityOrigin protocol]):
22461         (-[WebSecurityOrigin domain]):
22462         (-[WebSecurityOrigin port]):
22463         (-[WebSecurityOrigin usage]): 
22464         (-[WebSecurityOrigin quota]):
22465         (-[WebSecurityOrigin setQuota:]): Clients will set quotas on the WebSecurityOrigin object itself
22466         (-[WebSecurityOrigin dealloc]):
22467         (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:]):
22468         * Storage/WebSecurityOriginInternal.h: Added.
22469         * Storage/WebSecurityOriginPrivate.h: Added.
22470
22471 2007-11-15  Brady Eidson  <beidson@apple.com>
22472
22473         Reviewed by John
22474
22475         Stubbing out everything required for a WebKit API for databases
22476
22477         These interfaces seem to provide everything we need for UI and management at the browser level
22478
22479         * Misc/WebDatabaseManager.h: Removed.
22480         * Misc/WebDatabaseManager.mm: Removed.
22481         * Misc/WebDatabaseManagerPrivate.h: Removed.
22482
22483         * Misc/WebSecurityOrigin.mm: Added. Object that acts as a container for the "SecurityOrigin tuple"
22484           (protocol, domain, and port)
22485         (-[WebSecurityOriginPrivate initWithProtocol:domain:port:]):
22486         (-[WebSecurityOriginPrivate dealloc]):
22487         (-[WebSecurityOrigin initWithProtocol:domain:]):
22488         (-[WebSecurityOrigin initWithProtocol:domain:port:]):
22489         (-[WebSecurityOrigin protocol]):
22490         (-[WebSecurityOrigin domain]):
22491         (-[WebSecurityOrigin port]):
22492         (-[WebSecurityOrigin dealloc]):
22493         (-[WebSecurityOrigin _initWithWebCoreSecurityOriginData:WebCore::]):
22494         * Misc/WebSecurityOriginInternal.h: Added.
22495         * Misc/WebSecurityOriginPrivate.h: Added.
22496
22497         * Storage/WebDatabaseManager.mm: Added.
22498         (+[WebDatabaseManager sharedWebDatabaseManager]):
22499         (-[WebDatabaseManager origins]):  Get a list of all origins currently tracked
22500         (-[WebDatabaseManager detailsForOrigin:]): Get the current usage and current quota for the given origin
22501         (-[WebDatabaseManager databasesWithOrigin:]): Get all databases for a certain origin
22502         (-[WebDatabaseManager detailsForDatabase:withOrigin:]): Get all details about a specific database
22503         (-[WebDatabaseManager setQuota:forOrigin:]): Change origin-wide quota
22504         (-[WebDatabaseManager deleteAllDatabases]):
22505         (-[WebDatabaseManager deleteAllDatabasesWithOrigin:]):
22506         (-[WebDatabaseManager deleteDatabase:withOrigin:]):
22507         * Storage/WebDatabaseManagerPrivate.h: Added.
22508         * Storage/WebDatabaseManagerInternal.h: Added.
22509         (WebKitInitializeDatabasesIfNecessary): One-time initialization of database-related things
22510
22511         * Storage/WebDatabaseTrackerClient.h: Added. Stubbed out client for notifications
22512         * Storage/WebDatabaseTrackerClient.mm: Added.
22513         (WebDatabaseTrackerClient::sharedWebDatabaseTrackerClient):
22514         (WebDatabaseTrackerClient::WebDatabaseTrackerClient):
22515         (WebDatabaseTrackerClient::~WebDatabaseTrackerClient):
22516         (WebDatabaseTrackerClient::dispatchDidModifyOrigin):
22517         (WebDatabaseTrackerClient::dispatchDidModifyDatabase):
22518
22519         * WebView/WebView.mm:
22520         (-[WebView _commonInitializationWithFrameName:groupName:]): Do one-time initialization of
22521           Database-related things here
22522
22523 2007-11-13  Geoffrey Garen  <ggaren@apple.com>
22524
22525         Reviewed by Anders Carlsson.
22526         
22527         Renamed Shared to RefCounted.
22528
22529         * ForwardingHeaders/wtf/RefCounted.h: Copied from WebKit/mac/ForwardingHeaders/wtf/Shared.h.
22530         * ForwardingHeaders/wtf/Shared.h: Removed.
22531         * WebCoreSupport/WebContextMenuClient.h:
22532
22533 2007-11-13  Geoffrey Garen  <ggaren@apple.com>
22534
22535         Reviewed by Sam Weinig.
22536
22537         Moved Shared.h into wtf so it could be used in more places.
22538
22539         * ChangeLog:
22540         * WebCoreSupport/WebContextMenuClient.h:
22541
22542 2007-11-13  John Sullivan  <sullivan@apple.com>
22543
22544         Reviewed by Darin Adler.
22545
22546         removed recently-added PreferredType concept; we found a better way to do what
22547         ths was accomplishing
22548
22549         * WebCoreSupport/WebChromeClient.mm:
22550         (WebChromeClient::createWindow):
22551         removed use of PreferredType
22552
22553 2007-11-13  John Sullivan  <sullivan@apple.com>
22554
22555         Reviewed by Dan Bernstein.
22556         
22557         - fixed <rdar://problem/5567954> REGRESSION (Safari 2-3): Autofill no longer automatically fills in 
22558         form fields other than the one you're typing into
22559
22560         * WebCoreSupport/WebEditorClient.mm:
22561         (selectorForKeyEvent):
22562         correct the key identifier strings for Tab and Esc; these were updated in WebCore as part of r21445
22563         but didn't get updated here.
22564
22565 2007-11-12  Josh Aas  <joshmoz@gmail.com>
22566
22567         Reviewed by Darin Adler.
22568
22569         - http://bugs.webkit.org/show_bug.cgi?id=15946
22570           add NPPValue NPPVpluginDrawingModel (Mozilla bug 403418 compat)
22571
22572         * Plugins/WebBaseNetscapePluginView.mm:
22573         (-[WebBaseNetscapePluginView setVariable:value:]):
22574
22575 2007-11-12  Alexey Proskuryakov  <ap@webkit.org>
22576
22577         Reviewed by Darin Adler.
22578
22579         http://bugs.webkit.org/show_bug.cgi?id=15954
22580         Move DOM Selection operations out of SelectionController
22581
22582         * WebView/WebHTMLView.mm:
22583         (-[WebHTMLView _expandSelectionToGranularity:]):
22584         (-[WebHTMLView selectToMark:]):
22585         (-[WebHTMLView swapWithMark:]):
22586         * WebView/WebView.mm:
22587         (-[WebView setSelectedDOMRange:affinity:]):
22588         Adapted for SelectionController::setSelectedRange() now returning a bool.
22589
22590 2007-11-12  Oliver Hunt  <oliver@apple.com>
22591
22592         Reviewed by Darin and Geoff.
22593
22594         <rdar://problem/5522011> The content of the password field of 
22595         Safari is displayed by reconversion.
22596
22597         Some input methods (notably Kotoeri) can incorrectly provide 
22598         access to the raw text of a password field.  To work around 
22599         this we forcefully override the inputContext whenever a password
22600         field is active.
22601
22602         * WebView/WebHTMLView.mm:
22603         (-[WebHTMLView inputContext]):
22604
22605 2007-11-12  John Sullivan  <sullivan@apple.com>
22606
22607         Reviewed by Tim Hatcher
22608         
22609         - speculative fix for <rdar://problem/5509989> CrashTracer: [USER] 1 crash in Safari at com.apple.WebKit: 
22610         -[WebPDFView(FileInternal) _updatePreferencesSoon] + 56
22611         
22612         The crash is probably due to messaging a dealloc'ed dataSource ivar. The dataSource ivar isn't retained
22613         by this class, but should be. (It is retained by WebHTMLView, e.g.).
22614
22615         * WebView/WebPDFView.mm:
22616         (-[WebPDFView dealloc]):
22617         release dataSource ivar
22618         (-[WebPDFView setDataSource:]):
22619         retain dataSource ivar
22620
22621 2007-11-09  Tristan O'Tierney  <tristan@apple.com>
22622
22623         Reviewed by Timothy Hatcher.
22624         
22625         This patch is for the WebKit side of <rdar://problem/5591115>.
22626         We need a way to tell context menu navigations, such as "Open in New Window"
22627         to override any sort of browser preference for tab based navigation.
22628
22629         * WebCoreSupport/WebChromeClient.mm:
22630         (WebChromeClient::createWindow):
22631         Pass up the new preferredType parameter as a string.
22632         
22633 2007-11-09  Timothy Hatcher  <timothy@apple.com>
22634
22635         Reviewed by John.
22636
22637         <rdar://problem/5103720> REGRESSION: [WebView stringByEvaluatingJavaScriptFromString:] fails if "return" is used
22638
22639         Extend the linked on or after check to every application when a script passed to
22640         stringByEvaluatingJavaScriptFromString: has a return statement. Before the check
22641         was limited to VitalSource Bookshelf, but other developers are running into this.
22642
22643         * Misc/WebKitVersionChecks.h: Add the WEBKIT_FIRST_VERSION_WITHOUT_JAVASCRIPT_RETURN_QUIRK define.
22644         * WebView/WebDocumentLoaderMac.mm:
22645         (needsDataLoadWorkaround): Use WEBKIT_FIRST_VERSION_WITHOUT_ADOBE_INSTALLER_QUIRK sicne the
22646           WebKitLinkedOnOrAfter check here was about the Adobe installer, not VitalSource.
22647         * WebView/WebView.mm:
22648         (-[WebView stringByEvaluatingJavaScriptFromString:]): Remove the bundle ID check and use
22649           WEBKIT_FIRST_VERSION_WITHOUT_JAVASCRIPT_RETURN_QUIRK for the WebKitLinkedOnOrAfter call.
22650
22651 2007-11-08  Kevin McCullough  <kmccullough@apple.com>
22652
22653         Build Fix.
22654
22655         * WebCoreSupport/WebFrameLoaderClient.h:
22656         * WebCoreSupport/WebFrameLoaderClient.mm:
22657         (WebFrameLoaderClient::windowObjectCleared):
22658
22659 2007-11-07  Darin Adler  <darin@apple.com>
22660
22661         Reviewed by Steve.
22662
22663         - removed some unused WebCore bridge methods
22664
22665         * WebCoreSupport/WebFrameBridge.mm: Removed issueTransposeCommand and overrideMediaType.
22666
22667         * WebCoreSupport/WebFrameLoaderClient.mm:
22668         (WebFrameLoaderClient::overrideMediaType): Changed to call WebView directly instead of
22669         using the bridge object.
22670
22671 2007-11-06  Mark Rowe  <mrowe@apple.com>
22672
22673         Rubber-stamped by Dave Kilzer.
22674
22675         Move Mac files from WebKit into WebKit/mac.
22676
22677         * Carbon: Copied from WebKit/Carbon.
22678         * ChangeLog: Copied from WebKit/ChangeLog.
22679         * ChangeLog-2002-12-03: Copied from WebKit/ChangeLog-2002-12-03.
22680         * ChangeLog-2006-02-09: Copied from WebKit/ChangeLog-2006-02-09.
22681         * ChangeLog-2007-10-14: Copied from WebKit/ChangeLog-2007-10-14.
22682         * Configurations: Copied from WebKit/Configurations.
22683         * DOM: Copied from WebKit/DOM.
22684         * DefaultDelegates: Copied from WebKit/DefaultDelegates.
22685         * ForwardingHeaders: Copied from WebKit/ForwardingHeaders.
22686         * History: Copied from WebKit/History.
22687         * Info.plist: Copied from WebKit/Info.plist.
22688         * MigrateHeaders.make: Copied from WebKit/MigrateHeaders.make.
22689         * Misc: Copied from WebKit/Misc.
22690         * Panels: Copied from WebKit/Panels.
22691         * Plugins: Copied from WebKit/Plugins.
22692         * PublicHeaderChangesFromTiger.txt: Copied from WebKit/PublicHeaderChangesFromTiger.txt.
22693         * Resources: Copied from WebKit/Resources.
22694         * WebCoreSupport: Copied from WebKit/WebCoreSupport.
22695         * WebInspector: Copied from WebKit/WebInspector.
22696         * WebKit.exp: Copied from WebKit/WebKit.exp.
22697         * WebKit.order: Copied from WebKit/WebKit.order.
22698         * WebKitPrefix.h: Copied from WebKit/WebKitPrefix.h.
22699         * WebView: Copied from WebKit/WebView.
22700         * icu: Copied from WebKit/icu.
22701
22702 2007-11-06  Alexey Proskuryakov  <ap@webkit.org>
22703
22704         Reviewed by Darin Adler.
22705
22706         http://bugs.webkit.org/show_bug.cgi?id=15847
22707         Some editing cleanup
22708
22709         No change in functionality.
22710
22711         * WebView/WebHTMLView.mm:
22712         (-[WebHTMLView deleteToEndOfLine:]):
22713         (-[WebHTMLView deleteToEndOfParagraph:]):
22714         WebCore had a duplicate of the same logic already. We are passing a boundary value to
22715         a function that expects granularity, this may need to be straightened out in the future.
22716
22717 2007-11-05  John Sullivan  <sullivan@apple.com>
22718
22719         * WebView/WebView.mm:
22720         (-[WebView _searchWithSpotlightFromMenu:]):
22721
22722         Teeny style tweak to test svn access on other machine
22723
22724 2007-11-05  John Sullivan  <sullivan@apple.com>
22725
22726         * WebView/WebView.mm:
22727         (-[WebView computedStyleForElement:pseudoElement:]):
22728         
22729         Teeny style tweak to test svn access
22730
22731 2007-11-02  Tristan O'Tierney  <tristan@apple.com>
22732
22733         Reviewed by Darin Adler.
22734
22735         * DefaultDelegates/WebDefaultUIDelegate.m:
22736         (-[WebDefaultUIDelegate webView:createWebViewWithRequest:windowFeatures:]):
22737         Forward the UI delegate to call webView:createWebViewWithRequest: if
22738         this method doesn't exist.
22739         
22740         * WebCoreSupport/WebFrameLoaderClient.mm:
22741         (WebFrameLoaderClient::dispatchCreatePage):
22742         * Plugins/WebBaseNetscapePluginView.mm:
22743         (-[WebBaseNetscapePluginView loadPluginRequest:]):
22744         * WebView/WebView.mm:
22745         (-[WebView _openNewWindowWithRequest:]):
22746         Revised to use new webView:createWebViewWithRequest:windowFeatures: callback.
22747         
22748         * WebCoreSupport/WebChromeClient.h:
22749         * WebCoreSupport/WebChromeClient.mm:
22750         (WebChromeClient::createWindow):
22751         Added a new createWindow that accepts 3 parameters, so we can pass up windowFeatures to the chrome.
22752         Removed createModalDialog to use new createWindow function.
22753         
22754         * WebView/WebUIDelegatePrivate.h:
22755         Added new webView:createWebViewWithRequest:windowFeatures: method.
22756
22757 2007-11-05  Geoffrey Garen  <ggaren@apple.com>
22758
22759         Reviewed by Darin Adler.
22760         
22761         http://bugs.webkit.org/show_bug.cgi?id=15835
22762
22763         Small adaptations to new KJS::List class.
22764
22765         * ForwardingHeaders/kjs/value.h: Added.
22766
22767 2007-11-03  David D. Kilzer  <ddkilzer@webkit.org>
22768
22769         Sort files(...); sections of Xcode project files.
22770
22771         Rubber-stamped by Darin Adler.
22772
22773         * WebKit.xcodeproj/project.pbxproj:
22774
22775 2007-11-02  Antti Koivisto  <antti@apple.com>
22776
22777         Reviewed by Darin Adler.
22778         
22779         Add method to enable video composition.
22780
22781         * WebCoreSupport/WebSystemInterface.m:
22782         (InitWebCoreSystemInterface):
22783
22784 2007-11-02  Darin Adler  <darin@apple.com>
22785
22786         Reviewed by Mitz.
22787
22788         - fix problem I ran into while doing some testing on Mac for
22789           <rdar://problem/5530185> WebKit does not show <object>
22790           fallback content when both URL and MIME type is omitted
22791
22792         I don't know how to reproduce this failure in DumpRenderTree, so there is no
22793         regression test.
22794
22795         * Plugins/WebNullPluginView.h: Removed some unneeded declarations, including
22796         the didSendError local variable. Instead we just set the error to nil once
22797         we've sent it.
22798         * Plugins/WebNullPluginView.mm:
22799         (-[WebNullPluginView initWithFrame:error:DOMElement:]): Refactored so that
22800         the null plug-in image code is separate from the rest of the function and
22801         so that the whole thing is not inside an if statement. Also don't hold a
22802         reference to the DOM element if there is no error to report.
22803         (-[WebNullPluginView reportFailure]): Added. Does the actual delegate
22804         callback. Happens back at the top level of the run loop so it doesn't
22805         fire deep inside layout. Also wrote this so that it is guaranteed not to
22806         reenter and so that it can handle the case where the delegate destroys
22807         the world (including this object). NOTE: This is not a real, general
22808         solution to the problem of plug-ins that do work inside layout. We will need
22809         a more general fix that works for other plug-ins, and we'll track that with
22810         a separate bug report.
22811         (-[WebNullPluginView viewDidMoveToWindow]): Removed most of the code;
22812         changed so it just does a performSelector:afterDelay:0.
22813
22814 2007-11-02  Mark Rowe  <mrowe@apple.com>
22815
22816         Reviewed by Darin Adler.
22817
22818         Fix http://bugs.webkit.org/show_bug.cgi?id=15780
22819         Bug 15780: WebFrameLoaderClient: WebActionElementKey wrong if view is scrolled
22820
22821         * WebCoreSupport/WebFrameLoaderClient.mm:
22822         (WebFrameLoaderClient::actionDictionary): Retrieve the mouse event coordinates
22823         in the page coordinate system rather than the client area coordinate system.
22824
22825 2007-11-01  Dan Bernstein  <mitz@apple.com>
22826
22827         Reviewed by Oliver Hunt.
22828
22829         - fix an assertion failure when Command-Tabbing out of Safari
22830
22831         * WebView/WebHTMLView.mm:
22832         (-[WebHTMLView flagsChanged:]): Avoid passing key code 0 down to
22833         WebCore.
22834
22835 2007-11-01  Justin Garcia  <justin.garcia@apple.com>
22836
22837         Reviewed by Oliver Hunt.
22838         
22839         <rdar://problem/5195056> Huge plain text pastes are slow, time spent in ApplyStyleCommand::doApply
22840         
22841         No need to match style when pasting plain text, since the fragment we build for plain text
22842         won't have any style information on it.
22843
22844         * WebView/WebHTMLView.mm:
22845         (-[WebHTMLView _documentFragmentFromPasteboard:inContext:allowPlainText:]): There's no
22846         longer a need to know whether this function chosePlaintext.
22847         (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
22848         (-[WebHTMLView _documentFragmentFromPasteboard:]):
22849
22850 2007-10-31  Timothy Hatcher  <timothy@apple.com>
22851
22852         Reviewed by John Sullivan.
22853
22854         Move the developer extras preference to WebPreferences.
22855
22856         * WebView/WebPreferenceKeysPrivate.h: Add WebKitDeveloperExtrasEnabledPreferenceKey
22857         * WebView/WebPreferences.m:
22858         (+[WebPreferences initialize]): Initialize WebKitDeveloperExtrasEnabledPreferenceKey to NO.
22859         (-[WebPreferences developerExtrasEnabled]): Check DisableWebKitDeveloperExtras, WebKitDeveloperExtras
22860           and IncludeDebugMenu in addition to WebKitDeveloperExtrasEnabledPreferenceKey.
22861         (-[WebPreferences setDeveloperExtrasEnabled:]): Set WebKitDeveloperExtrasEnabledPreferenceKey.
22862         * WebView/WebPreferencesPrivate.h: Add developerExtrasEnabled and setDeveloperExtrasEnabled:.
22863         * WebView/WebView.mm:
22864         (+[WebView _developerExtrasEnabled]): Removed.
22865         (-[WebView _preferencesChangedNotification:]): Check the WebPreferences object for developerExtrasEnabled.
22866         * WebView/WebViewPrivate.h: Removed _developerExtrasEnabled.
22867
22868 2007-10-30  David D. Kilzer  <ddkilzer@webkit.org>
22869
22870         Generated files missing from WebCore's Xcode project file
22871         <http://bugs.webkit.org/show_bug.cgi?id=15406>
22872
22873         Reviewed by Darin Adler.
22874
22875         Added the following private header files to MigrateHeaders.make:
22876
22877         - DOMCSSStyleSheetPrivate.h
22878         - DOMEventPrivate.h
22879         - DOMHTMLCollectionPrivate.h
22880         - DOMHTMLEmbedElementPrivate.h
22881         - DOMHTMLIFrameElementPrivate.h
22882         - DOMHTMLObjectElementPrivate.h
22883         - DOMHTMLSelectElementPrivate.h
22884
22885         * MigrateHeaders.make:
22886
22887 2007-10-29  Antti Koivisto  <antti@apple.com>
22888
22889         Reviewed by Maciej.
22890         
22891         Some SPIs for media support.
22892
22893         * WebCoreSupport/WebSystemInterface.m:
22894         (InitWebCoreSystemInterface):
22895
22896 2007-10-29  Timothy Hatcher  <timothy@apple.com>
22897
22898         Reviewed by John Sullivan.
22899
22900         Various semi-related changes:
22901         - A WebView can now be asked for it's WebInspector. There is one
22902           WebInspector per WebView. 
22903         - Refactor the WebInspector class and move obsolete methods to
22904           a special category.
22905         - Add new WebInspector methods to show, hide and show the
22906           console/timeline panels.
22907         - Add an isDisabled method to WebCache.
22908         - Allow WebLocalizableStrings.h to be used in C files.
22909
22910         * Misc/WebCache.h: Add isDisabled.
22911         * Misc/WebCache.mm:
22912         (+[WebCache isDisabled]): New method.
22913
22914         * Misc/WebLocalizableStrings.h: Changes to allow use in plain C files.
22915
22916         * WebCoreSupport/WebInspectorClient.mm:
22917         (-[WebInspectorWindowController showWindow:]): Call super if already visible
22918           so the window will be ordered front.
22919         (-[WebInspectorWindowController showWebInspector:]): Method used by menu items,
22920           so they are enabled and work when the Inspector window is key.
22921         (-[WebInspectorWindowController showErrorConsole:]): Ditto.
22922         (-[WebInspectorWindowController showNetworkTimeline:]): Ditto.
22923
22924         * WebInspector/WebInspector.h: Add and remove methods.
22925         * WebInspector/WebInspector.mm:
22926         (-[WebInspector webViewClosed]): Called when the WebView is closed/dealloced.
22927           Clears the _webView pointer.
22928         (-[WebInspector show:]): Calls thru to the Page's InspectorController.
22929         (-[WebInspector showConsole:]): Ditto.
22930         (-[WebInspector showTimeline:]): Ditto.
22931         (-[WebInspector close:]): Ditto.
22932         (-[WebInspector attach:]): Ditto.
22933         (-[WebInspector detach:]): Ditto.
22934         (+[WebInspector sharedWebInspector]): Moved to the obsolete category.
22935         (+[WebInspector webInspector]): Ditto.
22936         (-[WebInspector setWebFrame:]): Ditto.
22937         (-[WebInspector window]): Ditto.
22938         (-[WebInspector showWindow:]): Ditto.
22939
22940         * WebView/WebView.mm:
22941         (-[WebViewPrivate dealloc]): Release the WebInspector.
22942         (-[WebView _close]): Call webViewClosed on the WebInspector.
22943         (-[WebView inspector]): Create a WebInspector if needed and return it.
22944         * WebView/WebViewPrivate.h: Add the inspector method.
22945
22946 2007-10-30  Adele Peterson  <adele@apple.com>
22947
22948         Reviewed by Darin Adler.
22949
22950         WebKit part of fix for http://bugs.webkit.org/show_bug.cgi?id=10577
22951         <rdar://problem/5103625> REGRESSION: Caps lock icon should show in password fields
22952
22953         * WebView/WebHTMLView.mm:
22954         (-[WebHTMLView flagsChanged:]): Call capsLockStateMayHaveChanged so WebCore knows it may have to update a password field.
22955         (+[WebHTMLView _postFlagsChangedEvent:]): Added a comment with a Radar number for why this isn't just in flagsChanged.
22956         (-[WebHTMLView scrollWheel:]): Instead of calling the next responder explicitly, we can just call super, which will take care of this.
22957
22958 2007-10-27  Mark Ambachtsheer  <mark.a@apple.com>
22959
22960         Reviewed by Darin Adler.
22961
22962         Fix for bug 15710, When QD plugins draw to an offscreen bitmap and the plugin is not at 
22963         (0, 0) the clipping rectangle is not correct.
22964         Added the origin to the window clip rectangle coordinates to account for plugins that
22965         don't originate at (0,0); affects code for offscreen GWorlds only.
22966
22967         * Plugins/WebBaseNetscapePluginView.mm:
22968         (-[WebBaseNetscapePluginView saveAndSetNewPortStateForUpdate:]):
22969
22970 2007-10-26  Adele Peterson  <adele@apple.com>
22971
22972         Reviewed by Oliver.
22973
22974         Adding WebKitSystemInterface support for the caps lock indicator
22975
22976         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface):
22977
22978 2007-10-25  David Hyatt  <hyatt@apple.com>
22979
22980         Fix for bug 15672, backgrounds don't tile properly inside transforms.  This patch fixes tiling
22981         of backgrounds inside CSS transforms and also of HTML content with background images inside SVG
22982         transforms.
22983
22984         Reviewed by aroben and mmitz
22985
22986         * WebCoreSupport/WebSystemInterface.m:
22987         (InitWebCoreSystemInterface):
22988         * WebKit.xcodeproj/project.pbxproj:
22989
22990 2007-10-25  John Sullivan  <sullivan@apple.com>
22991
22992         Reviewed by Tim Hatcher
22993         
22994         Removed the support for toggling whether WebKit uses the 10.5 PDFKit improvements. Now it
22995         always does, when available.
22996
22997         * WebView/WebPreferencesPrivate.h:
22998         removed _usePDFPreviewView and _setUsePDFPreviewView:. Note that these were guarded with
22999         a comment that says that they can be removed when no longer needed. That time is now.
23000
23001         * WebView/WebPreferences.m:
23002         (+[WebPreferences initialize]):
23003         removed WebKitUsePDFPreviewViewPreferenceKey
23004         (-[WebPreferences _usePDFPreviewView]):
23005         removed
23006         (-[WebPreferences _setUsePDFPreviewView:]):
23007         removed
23008
23009         * WebView/WebPDFView.mm:
23010         (-[WebPDFView initWithFrame:]):
23011         don't check _usePDFPreviewView
23012         
23013         * WebView/WebPreferenceKeysPrivate.h:
23014         removed WebKitUsePDFPreviewViewPreferenceKey
23015         
23016 2007-10-24  Timothy Hatcher  <timothy@apple.com>
23017
23018         Reviewed by Mark Rowe.
23019
23020         <rdar://problem/5069711> OpenSource version of libWebKitSystemInterface.a is Tiger only, causes issues if used on Leopard
23021
23022         Use the WebKitSystemInterface that matches the system version.
23023
23024         * Configurations/DebugRelease.xcconfig:
23025         * WebKit.xcodeproj/project.pbxproj:
23026
23027 2007-10-24  Brady Eidson  <beidson@apple.com>
23028
23029         Reviewed by Anders
23030
23031         <rdar://problem/5554130> DatabaseTracker.o has a global initializer
23032
23033         * Misc/WebDatabaseManager.mm:
23034         (WebKitSetWebDatabasesPathIfNecessary): Call the member function instead of a static one
23035
23036 2007-10-23  Mark Rowe  <mrowe@apple.com>
23037
23038         Build fix for Eric's build fix in r26916.
23039
23040         * MigrateHeaders.make:
23041
23042 2007-10-22  Eric Seidel  <eric@webkit.org>
23043
23044         Reviewed by Maciej.
23045
23046         * MigrateHeaders.make: copy over font-face related DOM headers
23047
23048 2007-10-22  Andrew Wellington  <proton@wiretapped.net>
23049
23050         Reviewed by Mark Rowe.
23051         
23052         Fix for local database support after r26879
23053         Ensure that ENABLE_DATABASE and ENABLE_ICONDATABASE are correctly set
23054
23055         * Configurations/WebKit.xcconfig:
23056
23057 2007-10-19  Brady Eidson <beidson@apple.com>
23058
23059         Reviewed by Tim Hatcher
23060
23061         Added support for Chrome prompts required by the Storage API
23062         Added support API for future managing of databases from the WebKit client
23063         Added preference and initialization for the databases path
23064
23065         * Misc/WebDatabaseManager.h: Added.  WebDatabaseManager is how a WebKit application can list and
23066           remove the current available databases
23067         * Misc/WebDatabaseManager.mm: Added.
23068         (+[WebDatabaseManager origins]):
23069         (+[WebDatabaseManager databasesWithOrigin:]):
23070         (+[WebDatabaseManager deleteAllDatabases]):
23071         (+[WebDatabaseManager deleteAllDatabasesWithOrigin:]):
23072         (+[WebDatabaseManager deleteDatabaseWithOrigin:named:]):
23073         (WebKitSetWebDatabasesPathIfNecessary): Setup the database path
23074         * Misc/WebDatabaseManagerPrivate.h: Added.
23075
23076         * WebCoreSupport/WebChromeClient.h: Support for calling the delegate to run the prompt for 
23077           an origin exceeding its size limit
23078         * WebCoreSupport/WebChromeClient.mm:
23079         (WebChromeClient::runDatabaseSizeLimitPrompt):
23080         * WebKit.xcodeproj/project.pbxproj:
23081         * WebView/WebUIDelegate.h:
23082
23083         * WebView/WebView.mm:
23084         (-[WebView _commonInitializationWithFrameName:groupName:]): Setup the database path
23085         * WebView/WebViewInternal.h:
23086
23087 2007-10-19  John Sullivan  <sullivan@apple.com>
23088
23089         Reviewed by Tim Hatcher
23090         
23091         - fixed <rdar://problem/5540325> REGRESSION (2.0.4-3): History menu looks odd after clearing history
23092
23093         * History/WebHistory.mm:
23094         (-[WebHistoryPrivate removeAllItems]):
23095         This was fallout from r25275. We need to clear the orderedLastVisitedDays cache here, in addition
23096         to the other places where it's cleared.
23097
23098 2007-10-18  Dan Bernstein  <mitz@apple.com>
23099
23100         Tiger build fix.
23101
23102         * WebView/WebDataSource.mm:
23103         (-[WebDataSource _MIMETypeOfResponse:]):
23104
23105 2007-10-18  Dan Bernstein  <mitz@apple.com>
23106
23107         Reviewed by Adam Roben.
23108
23109         - fix <rdar://problem/5313523>
23110         REGRESSION(Leopard): http/tests/incremental/slow-utf8-text.pl fails on Leopard
23111
23112         * WebCoreSupport/WebFrameLoaderClient.mm:
23113         (WebFrameLoaderClient::makeDocumentView): Changed to use _responseMIMEType.
23114         * WebView/WebDataSource.mm:
23115         (-[WebDataSource _MIMETypeOfResponse:]): Added. Works around
23116         <rdar://problem/5321972> by testing for the case of an NSHTTPURLResponse
23117         with a MIMEType of application/octet-stream and a Content-Type header
23118         starting with text/plain and returning text/plain as the MIME type in
23119         that case.
23120         (-[WebDataSource _responseMIMEType]): Added. Used to get the correct
23121         response MIME type.
23122         (-[WebDataSource _isDocumentHTML]): Changed to use _responseMIMEType.
23123         (-[WebDataSource _makeRepresentation]): Ditto.
23124         (-[WebDataSource mainResource]): Ditto.
23125         (-[WebDataSource subresources]): Changed to use _MIMETypeOfResponse and
23126         pass the MIME type explicitly.
23127         (-[WebDataSource subresourceForURL:]): Ditto.
23128         * WebView/WebDataSourcePrivate.h:
23129         * WebView/WebFrameView.mm:
23130         (-[WebFrameView _makeDocumentViewForDataSource:]): Changed to use
23131         _responseMIMEType.
23132         * WebView/WebResource.mm:
23133         (-[WebResource _initWithData:URL:response:MIMEType:]): Changed this
23134         method to take a MIME type instead of extracting it from the response,
23135         so that WebDataSource could pass the correct MIME type.
23136         * WebView/WebResourcePrivate.h:
23137
23138 2007-10-17  Darin Adler  <darin@apple.com>
23139
23140         Reviewed by Mark Rowe.
23141
23142         - fix <rdar://problem/5183775> Uninitialized memory in -[WebDynamicScrollBarsView updateScrollers]
23143
23144         * WebView/WebDynamicScrollBarsView.m: (-[WebDynamicScrollBarsView updateScrollers]):
23145         Change code path so it doesn't dispatch a method that returns an NSSize passing a nil object.
23146         It's safe to do that for functions that return integers or pointers, but not structures.
23147
23148 2007-10-16  David Kilzer  <ddkilzer@apple.com>
23149
23150         Reviewed by Timothy.
23151
23152         <rdar://problem/5544354> Wrong delegate method called in
23153         WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad()
23154
23155         * WebCoreSupport/WebFrameLoaderClient.mm:
23156         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Fixed selector name.
23157
23158 2007-10-16  Darin Adler  <darin@apple.com>
23159
23160         Reviewed by Adele.
23161
23162         - moved transpose command implementation into WebCore
23163
23164         * WebView/WebHTMLView.mm: Removed transpose: and replaced it with standard WebCore forwarding.
23165
23166 2007-10-16  Darin Adler  <darin@apple.com>
23167
23168         Reviewed by Maciej and Geoff (and looked over by Eric).
23169
23170         - http://bugs.webkit.org/show_bug.cgi?id=15519
23171           eliminate use of <ctype.h> for processing ASCII
23172
23173         * ForwardingHeaders/wtf/ASCIICType.h: Added.
23174         * ForwardingHeaders/wtf/DisallowCType.h: Added.
23175
23176         * WebKitPrefix.h: Include DisallowCType.h.
23177
23178         * Misc/WebNSURLExtras.mm: (-[NSURL _web_URLWithLowercasedScheme]): Use toASCIILower.
23179         * WebView/WebHTMLView.mm:
23180         (-[WebHTMLView callWebCoreCommand:]): Use toASCIIUpper.
23181         (-[WebTextCompleteController filterKeyDown:]): Add a list of specific character codes,
23182         instead of using ispunct.
23183
23184 2007-10-16  John Sullivan  <sullivan@apple.com>
23185
23186         Reviewed by Adam Roben
23187         
23188         Cleaned up localizable strings
23189
23190         * English.lproj/Localizable.strings:
23191         updated
23192         * StringsNotToBeLocalized.txt:
23193         updated
23194         * WebKit.xcodeproj/project.pbxproj:
23195         StringsNotToBeLocalized.txt recently moved but project file wasn't updated to match; now it is
23196
23197 2007-10-15  Kevin Decker  <kdecker@apple.com>
23198
23199         Reviewed by Darin Adler.
23200         
23201         Fixed: <rdar://problem/5520541> REGRESSION: Broken image when forwarding certain email on Tiger
23202         
23203         * WebCoreSupport/WebFrameBridge.mm: The problem was that we were loading Mail's WebKit plug-in
23204         too soon, which borked some necessary housekeeping on behalf of Mail. The fix is to add a quirk
23205         that treats Tiger Mail's WebKit plug-in like a Netscape plug-in, thus ensuring the plug-in will
23206         load during first layout and not attach time. For this plug-in, loading at first layout is 
23207         expected and is consistent with Safari 2 behavior.
23208
23209 2007-10-15  John Sullivan  <sullivan@apple.com>
23210
23211         Reviewed by Geoff Garen
23212         
23213         Replaced NS_DURING/NS_HANDLER with @try/@catch throughout WebKit
23214
23215         I made the following changes:
23216         - replaced NS_DURING with @try, and added opening brace if there wasn't one
23217         - replaced NS_HANDLER with @catch (NSException *localException), and added braces if there weren't any
23218         - removed NS_ENDHANDLER, and added a closing brace if there wasn't one
23219         - in a couple of places, fixed indentation therein
23220
23221         * Misc/WebIconDatabase.mm:
23222         (objectFromPathForKey):
23223         * WebView/WebHTMLView.mm:
23224         (-[WebHTMLView drawSingleRect:]):
23225         (-[WebHTMLView beginDocument]):
23226         (-[WebHTMLView deleteToMark:]):
23227         * WebView/WebView.mm:
23228         (-[WebView initWithCoder:]):
23229
23230 == Rolled over to ChangeLog-2007-10-14 ==