Un-roll out the roll out that was committed in r51376 because it didn't help the...
[WebKit-https.git] / WebKit / mac / ChangeLog
1 2009-11-24  Dmitry Titov  <dimich@chromium.org>
2
3         Reviewed by Eric Seidel.
4
5         Add ENABLE_SHARED_SCRIPT feature define and flag for build-webkit
6         https://bugs.webkit.org/show_bug.cgi?id=31444
7
8         * Configurations/FeatureDefines.xcconfig:
9
10 2009-11-24  Alexey Proskuryakov  <ap@apple.com>
11
12         Reviewed by Brady Eidson.
13
14         https://bugs.webkit.org/show_bug.cgi?id=31844
15         SocketStreamHandleCFNet should support CONNECT proxy credentials
16
17         * WebCoreSupport/WebSystemInterface.m: (InitWebCoreSystemInterface): Add WKSI methods.
18
19 2009-11-23  Simon Fraser  <simon.fraser@apple.com>
20
21         Reviewed by Dan Bernstein.
22
23         DocumentMarkers need to be educated about transforms
24         https://bugs.webkit.org/show_bug.cgi?id=31751
25         
26         Find highlight is incorrect with transforms
27         <rdar://problem/6358394>
28         
29         Allow callers to specify that Frame::selectionTextRects() takes transforms into account
30         when computing the set of rects that encompass a selection. For transformed elemenets, the
31         selection rect will be the bounding box of the selected content.
32         
33         Fix DocumentMarkers to cache rects in absolute coordinates, rather than painting coordinates.
34         
35         * WebView/WebHTMLView.mm:
36         (-[WebHTMLView selectionTextRects]):
37         Pass RespectTransforms to get a list of rects with transforms taken into account.
38
39 2009-11-23  Kevin Decker  <kdecker@apple.com>
40
41         Reviewed by Adam Roben.
42         
43         <rdar://problem/7401503>
44         
45         Added a workaround for plug-ins not drawing immediately.
46         
47         * Plugins/WebBaseNetscapePluginView.mm: Added new constant.
48         (-[WebBaseNetscapePluginView _clearSubstituteImage]): Added.
49         (-[WebBaseNetscapePluginView resumeFromHalt]): Call above new method.
50
51 2009-11-20  Dave Hyatt  <hyatt@apple.com>
52
53         Reviewed by Darin Adler.
54
55         Make sure to export WebSerializedJSValue.
56
57         * WebKit.exp:
58
59 2009-11-20  Dave Hyatt  <hyatt@apple.com>
60
61         Reviewed by Oliver Hunt and Jon Honeycutt.
62
63         Add support for WebSerializedJSValue to WebKit.  This object wraps the SerializedScriptValue functionality in WebCore
64         and exposes the ability to do JS value serialization/deserialization to WebKit clients.
65
66         * WebView/WebSerializedJSValue.h: Added.
67         * WebView/WebSerializedJSValue.mm: Added.
68         (-[WebSerializedJSValue initWithValue:context:]):
69         (-[WebSerializedJSValue deserialize:]):
70         (-[WebSerializedJSValue dealloc]):
71
72 2009-11-20  Chris Fleizach  <cfleizach@apple.com>
73
74         Reviewed by Beth Dakin.
75
76         WAI-ARIA: add support for 'math' role
77         https://bugs.webkit.org/show_bug.cgi?id=31706
78
79         * WebCoreSupport/WebViewFactory.mm:
80         (-[WebViewFactory AXARIAContentGroupText:]):
81
82 2009-11-19  Eric Carlson  <eric.carlson@apple.com>
83
84         Reviewed by Dan Bernstein.
85
86         <rdar://problem/7035231>
87         Support closed caption in <video> element
88
89         * WebCoreSupport/WebSystemInterface.m:
90         (InitWebCoreSystemInterface):
91             Add QTMovieHasClosedCaptions and QTMovieSetShowClosedCaptions.
92
93         * WebCoreSupport/WebViewFactory.mm:
94         (-[WebViewFactory localizedMediaControlElementString:]):
95         (-[WebViewFactory localizedMediaControlElementHelpText:]):
96             Add accessibility help strings for media controller closed caption button.
97
98 2009-11-18  Michelangelo De Simone  <micdesim@gmail.com>
99
100         Reviewed by Darin Adler.
101
102         Fix for <https://bugs.webkit.org/show_bug.cgi?id=27959>.
103         Support for validationMessage attribute, as per HTML5 specs.
104
105         * WebCoreSupport/WebViewFactory.mm:
106         (-[WebViewFactory validationMessageValueMissingText]):
107         (-[WebViewFactory validationMessageTypeMismatchText]):
108         (-[WebViewFactory validationMessagePatternMismatchText]):
109         (-[WebViewFactory validationMessageTooLongText]):
110         (-[WebViewFactory validationMessageRangeUnderflowText]):
111         (-[WebViewFactory validationMessageRangeOverflowText]):
112         (-[WebViewFactory validationMessageStepMismatchText]):
113
114 2009-11-18  Sam Weinig  <sam@webkit.org>
115
116         Reviewed by Anders Carlsson.
117
118         Make the Mac Geolocation API async.
119
120         * WebCoreSupport/WebChromeClient.mm:
121         (WebChromeClient::requestGeolocationPermissionForFrame):
122         (-[WebGeolocationPolicyListener initWithGeolocation:]):
123         (-[WebGeolocationPolicyListener allow]):
124         (-[WebGeolocationPolicyListener deny]):
125         Add WebGeolocationPolicyListener implementation of the new WebGeolocationPolicyListener
126         protocol and use if to implement requestGeolocationPermissionForFrame using the new async
127         API.
128         
129         * WebCoreSupport/WebGeolocation.mm: Removed.
130         * WebCoreSupport/WebGeolocationInternal.h: Removed.
131         * WebCoreSupport/WebGeolocationMock.mm: Remove bogus include.
132         * WebCoreSupport/WebGeolocationPrivate.h: Removed.
133         * WebView/WebUIDelegatePrivate.h: Remove requestGeolocationPermission and add
134         WebGeolocationPolicyListener protocol and decidePolicyForGeolocationRequestFromOrigin delegate
135         method.
136
137 2009-11-18  Chris Marrin  <cmarrin@apple.com>
138
139         Reviewed by Simon Fraser.
140
141         Add Preferences for WebKitShowDebugBorders and WebKitShowRepaintCounter
142         https://bugs.webkit.org/show_bug.cgi?id=31601
143
144         These are used to debug accelerated compositing layers
145
146         * WebView/WebPreferenceKeysPrivate.h:
147         * WebView/WebPreferences.mm:
148         (+[WebPreferences initialize]):
149         (-[WebPreferences showDebugBorders]):
150         (-[WebPreferences setShowDebugBorders:]):
151         (-[WebPreferences showRepaintCounter]):
152         (-[WebPreferences setShowRepaintCounter:]):
153         * WebView/WebPreferencesPrivate.h:
154         * WebView/WebView.mm:
155         (-[WebView _preferencesChangedNotification:]):
156
157 2009-11-17  Pavel Feldman  <pfeldman@chromium.org>
158
159         Reviewed by Timothy Hatcher.
160
161         Web Inspector: Make DRT show web inspector for tests in inspector/ folder.
162         - Updated DRT to show/close inspector for all tests under /inspector
163         - Introduced LayoutTestController::setTimelineProfilingEnabled and
164           WebInspector::setTimelineProfilingEnabled beside setJavaScriptProfilingEnabled
165         - Removed reload on each inspector test
166         - Renamed fast/inspector to fast/inspector-support in order not to trigger
167         inspector for those.
168         - Reimplemented timeline tests in order to get rid of reload there.
169         - Moved tests that don't require harness into the fast group.
170
171         https://bugs.webkit.org/show_bug.cgi?id=31472
172
173         * WebInspector/WebInspector.h:
174         * WebInspector/WebInspector.mm:
175         (-[WebInspector isTimelineProfilingEnabled]):
176         (-[WebInspector setTimelineProfilingEnabled:]):
177
178 2009-11-14  Chris Fleizach  <cfleizach@apple.com>
179
180         Reviewed by Darin Adler.
181
182         Need to implement ARIA role="directory"
183         https://bugs.webkit.org/show_bug.cgi?id=31516
184
185         Fix a spelling error in the comment of a localized (accessibility) string.
186
187         * WebCoreSupport/WebViewFactory.mm:
188         (-[WebViewFactory AXARIAContentGroupText:]):
189
190 2009-11-14  Eric Carlson  <eric.carlson@apple.com>
191
192         Reviewed by Oliver Hunt.
193
194         <rdar://problem/7287487> 
195         Do not use QuickTime version to detect media controller theme
196
197         * WebCoreSupport/WebSystemInterface.m:
198         (InitWebCoreSystemInterface): Initialize wkMediaControllerThemeAvailable.
199
200 2009-11-13  Adam Roben  <aroben@apple.com>
201
202         Tell the WebFrameLoadDelegate when window objects in isolated worlds
203         are cleared
204
205         Fixes <http://webkit.org/b/31124>.
206
207         Reviewed by Dave Hyatt.
208
209         * WebCoreSupport/WebFrameLoaderClient.h:
210         * WebCoreSupport/WebFrameLoaderClient.mm:
211         (WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
212         Replaced windowObjectCleared with this function. If the delegate
213         implements it, call
214         -webView:didClearWindowObjectForFrame:inScriptWorld:. Otherwise, if
215         the passed-in world is the mainThreadNormalWorld(), call
216         -webView:didClearWindowObject:forFrame:.
217
218         * WebView/WebDelegateImplementationCaching.h: Added a new entry in the
219         frame load delegate implementation cache for the new delegate method.
220
221         * WebView/WebFrameLoadDelegatePrivate.h:
222         * WebView/WebScriptWorld.mm:
223         (allWorlds): Added. Returns a HashMap of all the WebScriptWorlds in
224         existence.
225         (-[WebScriptWorld initWithWorld:]): Add ourselves to allWorlds().
226         (-[WebScriptWorld dealloc]): Remove ourselves from allWorlds().
227         (+[WebScriptWorld findOrCreateWorld:]): Returns the existing
228         WebScriptWorld for this DOMWrapperWorld, or a new one if one doesn't
229         already exist.
230
231         * WebView/WebScriptWorldInternal.h: Declared +findOrCreateWorld:.
232
233         * WebView/WebView.mm:
234         (-[WebView _cacheFrameLoadDelegateImplementations]): Cache the
235         implementation of the new frame load delegate method.
236
237 2009-11-13  Adam Roben  <aroben@apple.com>
238
239         Finish replacing worldIDs with world objects
240
241         The only remaining use of worldIDs was in a method only used by DRT
242         for the isolated worlds tests.
243
244         Fixes <http://webkit.org/b/31414> Replace worldIDs with world objects
245
246         Reviewed by Mark Rowe.
247
248         * WebView/WebFrame.mm:
249         (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
250         * WebView/WebFramePrivate.h:
251         Renamed from
252         _stringByEvaluatingJavaScriptInIsolatedWorld:WithGobalObject:FromString:.
253         Now takes a WebScriptWorld instead of a worldID, so we don't need to
254         maintain a map of worldID -> world anymore.
255
256 2009-11-12  Dan Bernstein  <mitz@apple.com>
257
258         Reviewed by Adele Peterson.
259
260         When exiting full-screen video, rather than resetting the system UI
261         mode, restore it to what it was when full-screen mode was entered.
262
263         * WebView/WebVideoFullscreenController.h: Cleaned up style, removed
264         unnecessary imports, and added _savedUIMode and _savedUIOptions ivars.
265         * WebView/WebVideoFullscreenController.mm:
266         (-[WebVideoFullscreenController delegate]): Cleaned up style.
267         (-[WebVideoFullscreenController setDelegate:]): Ditto.
268         (-[WebVideoFullscreenController windowDidExitFullscreen]): Restore the
269         system UI mode.
270         (-[WebVideoFullscreenController windowDidEnterFullscreen]): Save the
271         system UI mode.
272         * WebView/WebView.mm: Added now-necessary import.
273
274 2009-11-12  Shinichiro Hamaji  <hamaji@chromium.org>
275
276         Reviewed by Darin Adler.
277
278         externalRepresentation should take Frame as the argument
279         https://bugs.webkit.org/show_bug.cgi?id=31393
280
281         No new tests as this is just a refactoring.
282
283         * Misc/WebCoreStatistics.mm:
284         (-[WebFrame renderTreeAsExternalRepresentation]):
285
286 2009-11-12  Adam Roben  <aroben@apple.com>
287
288         Replace worldIDs with world objects
289
290         WebScriptWorld is the new object that represents a world.  The only
291         place worldID is still used is in -[WebFrame
292         _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:],
293         but that will change soon.
294
295         Part of <http://webkit.org/b/31414> Implement new SPI for dealing with
296         user scripts/stylesheets and isolated worlds
297
298         Reviewed by Sam Weinig.
299
300         * WebKit.exp: Export WebScriptWorld.
301
302         * WebView/WebFrame.mm:
303         (-[WebFrame _stringByEvaluatingJavaScriptInIsolatedWorld:WithGlobalObject:FromString:]):
304         Moved the bizarre world caching/creation logic that DRT depends on
305         here from the findWorld function in ScriptController.cpp. Updated to
306         use ScriptController::executeScriptInWorld instead of
307         ScriptController::executeScriptInIsolatedWorld.
308         (-[WebFrame _contextForWorld:]): Renamed from contextForWorldID:. Now
309         takes a WebScriptWorld.
310
311         * WebView/WebFramePrivate.h: Replaced contextForWorldID: with
312         _contextForWorld:.
313
314         * WebView/WebScriptWorld.h: Added.
315         * WebView/WebScriptWorld.mm: Added.
316         (-[WebScriptWorld initWithWorld:]): Store the passed-in world in our
317         _private member.
318         (-[WebScriptWorld init]): Create a new DOMWrapperWorld and pass it to
319         -initWithWorld:.
320         (-[WebScriptWorld dealloc]): Release _private.
321         (+[WebScriptWorld standardWorld]): Returns a shared instance that
322         represents WebCore's mainThreadNormalWorld().
323         (+[WebScriptWorld world]): Returns a new instance.
324         (core): Returns the DOMWrapperWorld for this WebScriptWorld.
325
326         * WebView/WebScriptWorldInternal.h: Added.
327
328         * WebView/WebView.mm:
329         (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:]):
330         (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:]):
331         (+[WebView _removeUserScriptFromGroup:world:url:]):
332         (+[WebView _removeUserStyleSheetFromGroup:world:url:]):
333         (+[WebView _removeUserScriptsFromGroup:world:]):
334         (+[WebView _removeUserStyleSheetsFromGroup:world:]):
335         * WebView/WebViewPrivate.h:
336         Changed these functions to take a WebScriptWorld instead of a worldID.
337
338 2009-11-12  Chris Fleizach  <cfleizach@apple.com>
339
340         Reviewed by Darin Adler.
341
342         ARIA: add alert type roles
343         https://bugs.webkit.org/show_bug.cgi?id=31392
344
345         * WebCoreSupport/WebViewFactory.mm:
346         (-[WebViewFactory AXARIAContentGroupText:]):
347
348 2009-11-10  Daniel Bates  <dbates@webkit.org>
349
350         Reviewed by Oliver Hunt.
351
352         https://bugs.webkit.org/show_bug.cgi?id=30754
353
354         Removed method draggedImage:movedTo:
355
356         * WebView/WebFrame.mm:
357         * WebView/WebFrameInternal.h:
358         * WebView/WebHTMLView.mm:
359
360 2009-11-10  Beth Dakin  <bdakin@apple.com>
361
362         Reviewed by Darin Adler.
363
364         Small WebKit part of:
365         Fix for <rdar://problem/7059710> 
366         -and corresponding-
367         https://bugs.webkit.org/show_bug.cgi?id=31196 Implement -webkit-
368         color-correction for CSS colors
369
370         * Misc/WebKitNSStringExtras.mm:
371         (-[NSString _web_drawAtPoint:font:textColor:]): setFillColor now 
372         requires callers to pass a ColorSpace.
373
374 2009-11-10  Dan Bernstein  <mitz@apple.com>
375
376         Reviewed by Eric Carlson and Darin Adler.
377
378         WebKit part of making full-screen video pause during scrubbing.
379
380         * WebView/WebVideoFullscreenHUDWindowController.h: Added _isScrubbing
381         ivar.
382         * WebView/WebVideoFullscreenHUDWindowController.mm:
383         (-[WebVideoFullscreenHUDWindowController dealloc]): Assert that
384         _isScrubbing is NO.
385         (-[WebVideoFullscreenHUDWindowController endScrubbing]): Call
386         HTMLMediaElement::endScrubbing().
387         (-[WebVideoFullscreenHUDWindowController timelinePositionChanged:]):
388         If scrubbing has just begun, call HTMLMediaElement::beginScrubbing()
389         and schedule -endScrubbing to be called when mouse tracking ends.
390
391 2009-11-09  Mark Mentovai  <mark@chromium.org>
392
393         Reviewed by Dan Bernstein.
394
395         Track "can have scrollbar" state within FrameView independently of the
396         individual scrollbar states in ScrollView.
397
398         rdar://problem/7215132, https://bugs.webkit.org/show_bug.cgi?id=29167
399         REGRESSION (r48064): mint.com loses scrollbars after coming out of
400         edit mode.
401
402         rdar://problem/7314421, https://bugs.webkit.org/show_bug.cgi?id=30517
403         REGRESSION (r48064): Extra scroll bars in GarageBand Lesson Store.
404
405         Test: fast/overflow/scrollbar-restored.html
406
407         * WebView/WebFrameView.mm:
408         (-[WebFrameView _install]):
409
410 2009-11-08  Dan Bernstein  <mitz@apple.com>
411
412         Reviewed by Eric Carlson.
413
414         Made the full-screen video HUD appear when playback stops, such as when
415         the end of the video is reached.
416
417         * WebView/WebVideoFullscreenHUDWindowController.h: Cleaned up.
418         * WebView/WebVideoFullscreenHUDWindowController.mm:
419         (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Updated
420         for the renaming of -updateRate to -updatePlayButton.
421         (-[WebVideoFullscreenHUDWindowController updatePlayButton]): Renamed
422         -updateRate to this.
423         (-[WebVideoFullscreenHUDWindowController updateRate]): This method now
424         responds to changes to the playback rate by updating the play button
425         and showing or hiding the HUD as necessary.
426         (-[WebVideoFullscreenHUDWindowController togglePlaying:]): Now only
427         toggles playing. UI updates are driven by -updateRate being called.
428         (-[WebVideoFullscreenHUDWindowController playing]): Cleaned up.
429
430 2009-11-02  Eric Carlson  <eric.carlson@apple.com>
431
432         Reviewed by John Sullivan and Mark Rowe.
433
434         <rdar://problem/7356733> Voiceover does not read correct media controller time values
435
436         * WebCoreSupport/WebViewFactory.mm:
437         (-[WebViewFactory localizedMediaTimeDescription:]):
438
439 2009-11-02  Dan Bernstein  <mitz@apple.com>
440
441         Reviewed by Anders Carlsson.
442
443         Made the remaining time display show negative zero at the end of the
444         video.
445
446         Made other cleanup.
447
448         * WebView/WebVideoFullscreenHUDWindowController.h: Reverted the types of
449         _timeline and _volumeSlider to the more generic NSControl.
450         * WebView/WebVideoFullscreenHUDWindowController.mm:
451         (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Cleaned
452         up style.
453         (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Added an
454         assertion that the cast to NSButton * is legal. Removed casts.
455         (-[WebVideoFullscreenHUDWindowController updateTime]): Use
456         -setValue:forKey: instead of an NSSlider method.
457         (timeToString): Changed to support only non-negative values and
458         simplified.
459         (-[WebVideoFullscreenHUDWindowController remainingTimeText]): Always
460         prepend a “-” to the time.
461
462 2009-11-02  Dan Bernstein  <mitz@apple.com>
463
464         Reviewed by John Sullivan.
465
466         WebKit part of making the appearance of the full-screen video HUD match
467         QuickTime Player X’s HUD.
468
469         * WebView/WebVideoFullscreenHUDWindowController.h: Removed unnecessary
470         #import statements, cleaned up style, and changed _timeline,
471         _volumeSlider and _playButton to have more specific types.
472         * WebView/WebVideoFullscreenHUDWindowController.mm: Updated #import
473         statements.
474         (webkit_CGFloor): Added this helper function.
475         (-[WebVideoFullscreenHUDWindowController init]): Cleaned up style.
476         (createTimeTextField): Changed to use the bold system font.
477         (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Changed the
478         subviews’ metrics and the text fields’ text alignment.
479         (-[WebVideoFullscreenHUDWindowController updateTime]): Avoid conversion
480         from double to float.
481         (stringToTimeTextAttributed): Removed this useless function that
482         returned an NSAttributedString masquerading as an NSString.
483         (-[WebVideoFullscreenHUDWindowController remainingTimeText]): Removed
484         call to stringToTimeTextAttributed().
485         (-[WebVideoFullscreenHUDWindowController elapsedTimeText]): Ditto.
486
487 2009-11-02  Chris Fleizach  <cfleizach@apple.com>
488
489         Reviewed by Beth Dakin.
490
491         Support ARIA "tab" roles
492         https://bugs.webkit.org/show_bug.cgi?id=30842
493
494         * WebCoreSupport/WebViewFactory.mm:
495         (-[WebViewFactory AXARIAContentGroupText:]):
496
497 2009-11-01  Dan Bernstein  <mitz@apple.com>
498
499         Reviewed by Mark Rowe.
500
501         Made the space bar toggle playing state in full-screen video when
502         modifier keys are down. Made it do so without highlighting the
503         Play/Pause button.
504
505         * WebView/WebVideoFullscreenHUDWindowController.mm:
506         (-[WebVideoFullscreenHUDWindowController keyDown:]):
507
508 2009-11-01  Dan Bernstein  <mitz@apple.com>
509
510         Reviewed by Mark Rowe.
511
512         Made the full-screen video HUD respond to the up and down arrow keys by
513         increasing and decreasing the volume by 1/10 of the range or, when
514         combined with the Option key, all the way up or down.
515
516         Made the volume buttons in the full-screen video HUD match the behavior
517         of their equivalents in the QuickTime Player HUD by turning the volume
518         all the way up or down.
519
520         Made the volume slider update immediately when the keyboard or volume
521         buttons are used to change the volume, rather than at the nearest 1/4
522         second interval.
523
524         Made the elapsed and remaining time displays update immediately when the
525         play head is dragged across the timeline, rather than at 1/4 second
526         intervals.
527
528         * WebView/WebVideoFullscreenHUDWindowController.mm:
529         (-[WebVideoFullscreenHUDWindowController keyDown:]): Handle the up and
530         down arrow keys.
531         (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Changed the
532         actions of the volume up and volume down buttons.
533         (-[WebVideoFullscreenHUDWindowController setCurrentTime:]): Call
534         -updateTime.
535         (-[WebVideoFullscreenHUDWindowController setVolumeToZero:]): Added this
536         action for the volume down button.
537         (-[WebVideoFullscreenHUDWindowController setVolumeToMaximum:]): Added
538         this action for the volume up button.
539         (-[WebVideoFullscreenHUDWindowController decrementVolume]): No longer
540         and action method.
541         (-[WebVideoFullscreenHUDWindowController incrementVolume]): Ditto.
542         (-[WebVideoFullscreenHUDWindowController setVolume:]): Call
543         -updateVolume.
544
545 2009-10-30  Evan Stade  <estade@chromium.org>
546
547         Reviewed by David Levin.
548
549         Notify the chrome when the focused node has changed.
550         https://bugs.webkit.org/show_bug.cgi?id=30832
551
552         Added stub implementation for new ChromeClient function.
553
554         * WebCoreSupport/WebChromeClient.h:
555         * WebCoreSupport/WebChromeClient.mm:
556         (WebChromeClient::focusedNodeChanged):
557
558 2009-10-30  Roland Steiner  <rolandsteiner@chromium.org>
559
560         Reviewed by Eric Seidel.
561
562         Remove ENABLE_RUBY guards as discussed with Dave Hyatt and Maciej Stachowiak.
563
564         Bug 28420 -  Implement HTML5 <ruby> rendering
565         (https://bugs.webkit.org/show_bug.cgi?id=28420)
566
567         No new tests (no functional change).
568
569         * Configurations/FeatureDefines.xcconfig:
570
571 2009-10-29  Mark Rowe  <mrowe@apple.com>
572
573         Reviewed by Oliver Hunt.
574
575         Validate the stopSpeaking: selector so that is not always enabled when a WebView is first responder.
576
577         * WebView/WebHTMLView.mm:
578         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
579
580 2009-10-29  Anders Carlsson  <andersca@apple.com>
581
582         Reviewed by Sam Weinig.
583
584         https://bugs.webkit.org/show_bug.cgi?id=30932
585         <rdar://problem/7350269>
586         
587         REGRESSION: Crash when turning on Private Browsing on site with flash.
588         
589         Null check setValue.
590         
591         * Plugins/WebNetscapePluginView.mm:
592         (-[WebNetscapePluginView privateBrowsingModeDidChange]):
593
594 2009-10-29  Eric Carlson  <eric.carlson@apple.com>
595
596         Reviewed by Kevin Decker.
597
598         Refactor some duplicate plug-in clean up code into shared functions.
599
600         * Plugins/WebPluginController.mm:
601         (-[WebPluginController stopOnePlugin:]): New, stop a plug-in.
602         (-[WebPluginController destroyOnePlugin:]): New, destroy plug-in.
603         (-[WebPluginController stopAllPlugins]): Call stopOnePlugin.
604         (-[WebPluginController destroyPlugin:]): Call stopOnePlugin and destroyOnePlugin.
605         (-[WebPluginController destroyAllPlugins]): Call destroyOnePlugin.
606
607 2009-10-28  Eric Carlson  <eric.carlson@apple.com>
608
609         Reviewed by Simon Fraser.
610
611         <rdar://problem/7303145> 
612         Can't exit full screen mode or restart movie after pressing command -R.
613
614         * WebView/WebVideoFullscreenController.mm:
615         (-[WebVideoFullscreenController _requestExit]): 
616             New, call media element's exitFullscreen method.
617         (-[WebVideoFullscreenController requestExitFullscreenWithAnimation:]): 
618             Call mediaElement->exitFullscreen() after a delay as it turns around and calls
619             WebVideoFullscreenController:exitFullscreen.
620
621         * WebView/WebVideoFullscreenHUDWindowController.h:
622         * WebView/WebVideoFullscreenHUDWindowController.mm:
623         (-[WebVideoFullscreenHUDWindow resignFirstResponder]):
624             New, don't give up responder status.
625         (-[WebVideoFullscreenHUDWindow performKeyEquivalent:]):
626             New, block all command key events.
627         (-[WebVideoFullscreenHUDWindowController exitFullscreen:]):
628             Remember when we are in the process of exiting fullscreen, don't allow recursion.
629
630         * WebView/WebView.mm:
631         (-[WebView _exitFullscreen]):
632             Early return if fullscreen controller is nil.
633
634         * WebView/WebWindowAnimation.h: 
635             Correct comment about _window retain status.
636         * WebView/WebWindowAnimation.m:
637         (-[WebWindowScaleAnimation dealloc]):
638             Don't release _window, we never reatained it.
639
640 2009-10-27  Shinichiro Hamaji  <hamaji@chromium.org>
641
642         Reviewed by Darin Adler.
643
644         Provide a way to get counter values with layoutTestContoller
645         https://bugs.webkit.org/show_bug.cgi?id=30555
646
647         Add counterValueForElement in WebFrame to call WebCore::counterValueForElement.
648
649         * Misc/WebCoreStatistics.h:
650         * Misc/WebCoreStatistics.mm:
651         (-[WebFrame counterValueForElement:]):
652
653 2009-10-27  Geoffrey Garen  <ggaren@apple.com>
654
655         Reviewed by Sam Weinig.
656
657         Updated for refactoring in the date code.
658
659         * WebView/WebView.mm:
660         (aeDescFromJSValue): Since we just want a number of milliseconds, do that
661         instead of something more complicated.
662
663 2009-10-26  Sam Weinig  <sam@webkit.org>
664
665         Reviewed by Anders Carlsson.
666
667         Move some WebView event handling code into its own file, WebViewEventHandling.mm
668
669         * WebView/WebView.mm:
670         (-[WebView _close]):
671         (-[WebView _selectedOrMainFrame]):
672         * WebView/WebViewEventHandling.mm: Added.
673         (-[WebView _closingEventHandling]):
674         (-[WebView _setMouseDownEvent:]):
675         (-[WebView mouseDown:]):
676         (-[WebView mouseUp:]):
677         (+[WebView _updateMouseoverWithEvent:]):
678         (-[WebView _updateMouseoverWithFakeEvent]):
679         (_updateMouseoverWithEvent:fakeEvent::if):
680         (-[WebView _stopAutoscrollTimer]):
681         (-[WebView _setToolTip:]):
682         * WebView/WebViewInternal.h:
683
684 2009-10-26  Simon Fraser  <simon.fraser@apple.com>
685
686         Reviewed by Sam Weinig.
687
688         <rdar://problem/6988966> Hardware layers do not show up in page snapshots
689
690         * WebView/WebHTMLViewPrivate.h:
691         * WebView/WebHTMLView.mm:
692         (-[WebHTMLView _compositingLayersHostingView]):
693         Add a private method that returns the NSView used to host compositing layers.
694         
695 2009-10-23  Mark Rowe  <mrowe@apple.com>
696
697         Fix engineering builds in the mysterious future.
698
699         * Configurations/DebugRelease.xcconfig:
700
701 2009-10-23  Gavin Barraclough  <barraclough@apple.com>
702
703         Reviewed by Geoff Garen.
704
705         https://bugs.webkit.org/show_bug.cgi?id=30729
706         Provide private API to request the global context for a specific world.
707         Used to initialize parameters on the global object.
708
709         * WebView/WebFramePrivate.h:
710         * WebView/WebFrame.mm:
711         (-[WebFrame contextForWorldID:]):
712
713 2009-10-22  Eric Carlson  <eric.carlson@apple.com>
714
715         Reviewed by John Sullivan.
716
717         <rdar://problem/7322847>
718         Pressing space bar key in full screen mode should pause movie but doesn't
719
720         * WebView/WebVideoFullscreenHUDWindowController.mm:
721         (-[WebVideoFullscreenHUDWindowController keyDown:]):  New, toggle playback on space key.
722         (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Play button action is now called togglePlaying.
723         (-[WebVideoFullscreenHUDWindowController togglePlaying:]): Rename from playingChanged.
724
725 2009-10-22  Gavin Barraclough  <barraclough@apple.com>
726
727         Reviewed by NOBODY (build fix).
728         Build fix following bug #30696.
729
730         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
731         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
732         (WebKit::NetscapePluginInstanceProxy::evaluate):
733         (WebKit::NetscapePluginInstanceProxy::invoke):
734         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
735         (WebKit::NetscapePluginInstanceProxy::construct):
736         (WebKit::NetscapePluginInstanceProxy::getProperty):
737         (WebKit::NetscapePluginInstanceProxy::setProperty):
738         (WebKit::NetscapePluginInstanceProxy::removeProperty):
739         (WebKit::NetscapePluginInstanceProxy::hasProperty):
740         (WebKit::NetscapePluginInstanceProxy::hasMethod):
741         (WebKit::NetscapePluginInstanceProxy::enumerate):
742
743 2009-10-16  Gavin Barraclough  <barraclough@apple.com>
744
745         Reviewed by Sam Weinig & Geoff Garen.
746
747         https://bugs.webkit.org/show_bug.cgi?id=30696
748         Update to incorporate support for IsolatedWorlds in JSC bindings.
749
750         * WebView/WebFrame.mm:
751         (-[WebFrame _attachScriptDebugger]):
752         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
753         (-[WebFrame globalContext]):
754         * WebView/WebScriptDebugDelegate.mm:
755         (-[WebScriptCallFrame evaluateWebScript:]):
756         * WebView/WebView.mm:
757         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
758
759 2009-10-22  Eric Carlson  <eric.carlson@apple.com>
760
761         Reviewed by Dan Bernstein & Simon Fraser.
762
763         <rdar://problem/7297717>
764         https://bugs.webkit.org/show_bug.cgi?id=30323
765         Play/pause button in full-screen video controller does not reflect current state
766
767         * WebView/WebVideoFullscreenController.mm:
768         (-[WebVideoFullscreenController setMediaElement:WebCore::]): Register for QTMovieRateDidChangeNotification
769         (-[WebVideoFullscreenController rateChanged:]): Call HUD controller when rate changes.
770
771         * WebView/WebVideoFullscreenHUDWindowController.h:
772         * WebView/WebVideoFullscreenHUDWindowController.mm:
773         (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]): Call updateRate so play button
774         reflects playback state.
775         (-[WebVideoFullscreenHUDWindowController updateRate]): New, set play button state according to
776         movie state.
777         (-[WebVideoFullscreenHUDWindowController playingChanged:]): Only call [self playing] once.
778
779 2009-10-21  John Sullivan  <sullivan@apple.com>
780
781         Rubber-stamped by Dan Bernstein.
782
783         * WebView/WebDynamicScrollBarsView.h:
784         Corrected a couple of long-obsolete comments regarding Safari's use of this class.
785
786 2009-10-20  Dan Bernstein  <mitz@apple.com>
787
788         Rubber-stamped by Mark Rowe.
789
790         <rdar://problem/7319749> REGRESSION(r49806): Contextual Menu items missing
791         https://bugs.webkit.org/show_bug.cgi?id=30568
792
793         Revert accidental change from r49806.
794
795         * WebCoreSupport/WebContextMenuClient.mm:
796         (WebContextMenuClient::getCustomMenuFromDefaultItems):
797
798 2009-10-20  Fumitoshi Ukai  <ukai@chromium.org>
799
800         Reviewed by David Levin.
801
802         Removed WebSocket runtime settings.
803         https://bugs.webkit.org/show_bug.cgi?id=29896
804
805         WebSocket runtime configuration is supported by chromium/v8 only.
806
807         * WebView/WebPreferenceKeysPrivate.h:
808         * WebView/WebPreferences.mm:
809         (+[WebPreferences initialize]):
810         * WebView/WebPreferencesPrivate.h:
811         * WebView/WebView.mm:
812         (-[WebView _preferencesChangedNotification:]):
813
814 2009-10-19  Nate Chapin  <japhet@chromium.org>
815
816         Reviewed by Alexey Proskuryakov.
817
818         Update call to loadFrameRequest to match new parameters.
819
820         * WebView/WebPDFView.mm:
821         (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Update call to loadFrameRequest.
822
823 2009-10-19  David Kilzer  <ddkilzer@apple.com>
824
825         Documentation fix for -[NSObject(WebResourceLoadDelegate) webView:resource:willSendRequest:redirectResponse:fromDataSource:]
826
827         Reviewed by Dan Bernstein.
828
829         * WebView/WebResourceLoadDelegate.h: Prepended "webView:" to the
830         @method declaration of
831         -webView:resource:willSendRequest:redirectResponse:fromDataSource:
832         which was absent before r3953 and was missed during the great
833         documentation clean up of r4269.
834
835 2009-10-19  Anders Carlsson  <andersca@apple.com>
836
837         Fix build.
838
839         * Plugins/WebNetscapePluginView.mm:
840         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
841
842 2009-10-19  Dan Bernstein  <mitz@apple.com>
843
844         Reviewed by Anders Carlsson.
845
846         Split assertions of conjunctions into separate statements or remove
847         redundant assertions.
848
849         * Plugins/Hosted/NetscapePluginHostProxy.mm:
850         (WebKit::NetscapePluginHostProxy::deadNameNotificationCallback):
851         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
852         (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
853         (-[WebHostedNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
854         * Plugins/WebBaseNetscapePluginView.mm:
855         (-[WebBaseNetscapePluginView halt]):
856         (-[WebBaseNetscapePluginView resumeFromHalt]):
857         * Plugins/WebNetscapePluginView.mm:
858         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
859         (-[WebNetscapePluginView _webPluginContainerCancelCheckIfAllowedToLoadRequest:]):
860         * WebCoreSupport/WebContextMenuClient.mm:
861         (WebContextMenuClient::getCustomMenuFromDefaultItems):
862         * WebCoreSupport/WebEditorClient.mm:
863         (WebEditorClient::checkGrammarOfString):
864         (WebEditorClient::checkTextOfParagraph):
865         * WebView/WebTextCompletionController.mm:
866         (-[WebTextCompletionController _reflectSelection]):
867
868 2009-10-18  Mark Rowe  <mrowe@apple.com>
869
870         Reviewed by Dan Bernstein.
871
872         <rdar://problem/7309062> Crashes in WebCore::DocumentLoader::isStopping below WebKit::NetscapePluginInstanceProxy::loadRequest.
873
874         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
875         (WebKit::NetscapePluginInstanceProxy::loadRequest): Null-check the DocumentLoader before deferencing it.
876
877 2009-10-16  Kevin Decker  <kdecker@apple.com>
878
879         Reviewed by Jon Honeycutt.
880
881         <rdar://problem/7304575>
882         
883         * Plugins/WebBaseNetscapePluginView.h: Added new boolean ivar and -hasBeenHalted instance method.
884         * Plugins/WebBaseNetscapePluginView.mm:
885         (-[WebBaseNetscapePluginView halt]):Update _hasBeenHalted.
886         (-[WebBaseNetscapePluginView hasBeenHalted]): Added.
887         * WebView/WebView.mm:
888         (+[WebView _hasPluginForNodeBeenHalted:]): Checks to see if a plug-in node's been halted.
889         * WebView/WebViewPrivate.h: Added -_hasPluginForNodeBeenHalted method.
890
891 2009-10-16  Kevin Decker  <kdecker@apple.com>
892
893         Reviewed by Anders Carlson.
894
895         Small code cleanup
896         
897         * Plugins/WebBaseNetscapePluginView.mm:
898         (WebHaltablePlugin::halt): Just call -[WebBaseNetscapePluginView halt].
899         (WebHaltablePlugin::restart): Just call -[WebBaseNetscapePluginView resumeFromHalt]
900         (-[WebBaseNetscapePluginView halt]): 
901         (-[WebBaseNetscapePluginView resumeFromHalt]):
902         * WebView/WebView.mm:
903         (_pluginViewForNode): Added a check if a render is a widget. This prevents a later assertion.
904
905 2009-10-16  Kevin Decker  <kdecker@apple.com>
906
907         Reviewed by Anders Carlson.
908
909         Last part of:
910         <rdar://problem/7273354>
911
912         * WebView/WebView.mm: 
913         (_pluginViewForNode): Added with code extracted from _isNodeHaltedPlugin
914         (+[WebView _isNodeHaltedPlugin:]): Made this a class method.
915         (+[WebView _restartHaltedPluginForNode:]): Added. Restarts a plug-in
916         * WebView/WebViewPrivate.h: Added +_restartHaltedPluginForNode to header.
917
918 2009-10-16  Kevin Decker  <kdecker@apple.com>
919
920         Reviewed by Anders.
921
922         <rdar://problem/7273354> 
923
924         * Plugins/WebBaseNetscapePluginView.h: Added _isHalted ivar and three new methods: -halt, -resumeFromHalt, and -isHalted
925         * Plugins/WebBaseNetscapePluginView.mm:
926         (WebHaltablePlugin::halt): Call -halt instead of -stop.  
927         (WebHaltablePlugin::restart):Call -resumeFromHalt instead of -start. 
928         (-[WebBaseNetscapePluginView halt]): Added. Stop the plug-in, update _isHalted.
929         (-[WebBaseNetscapePluginView resumeFromHalt]): Added. Start the plug-in, update _isHalted.
930         (-[WebBaseNetscapePluginView isHalted]): Added.
931         * WebView/WebView.mm:
932         (-[WebView _isNodeHaltedPlugin:]): Added. Queries a DOMNode to determine if it's a halted plug-in.
933         * WebView/WebViewPrivate.h: Added _isNodeHaltedPlugin.
934
935 2009-10-15  Eric Carlson  <eric.carlson@apple.com>
936
937         Reviewed by Adele Peterson.
938
939         <rdar://problem/7306052> Fullscreen max/min volume buttons non-functional
940
941         * WebView/WebVideoFullscreenHUDWindowController.mm:
942         (-[WebVideoFullscreenHUDWindowController windowDidLoad]): Set volume buttons target and action.
943         (-[WebVideoFullscreenHUDWindowController decrementVolume:]): New, decrement the volume by 10%.
944         (-[WebVideoFullscreenHUDWindowController incrementVolume:]): New, increment the volume by 10%.
945
946 2009-10-15  Eric Carlson  <eric.carlson@apple.com>
947
948         Reviewed by Simon Fraser.
949
950         <rdar://problem/7295738> No way to mute/unmute a movie in full screen video mode
951
952         * WebView/WebVideoFullscreenHUDWindowController.mm:
953         (-[WebVideoFullscreenHUDWindowController setVolume:]): Unmute movie before changing volume.
954
955 2009-10-14  Kevin Decker  <kdecker@apple.com>
956
957         Unbreak the world.
958         
959         * Plugins/WebBaseNetscapePluginView.mm:
960         (WebHaltablePlugin::restart):
961
962 2009-10-14  Kevin Decker  <kdecker@apple.com>
963
964         Reviewed by Anders Carlsson and Jon Honeycutt
965
966         <rdar://problem/7304295> snapshots of halted plug-ins are missing
967         
968         * Plugins/WebBaseNetscapePluginView.mm: Move bodies of WebHaltablePlugin virtual functions from WebHaltablePlugin class definition.
969         (WebHaltablePlugin::halt): Provide a substitute image to the RenderWidget for the plug-in view.
970         (WebHaltablePlugin::restart): Clear the substitute image.
971
972 2009-10-13  Dave Hyatt  <hyatt@apple.com>
973
974         Reviewed by Adam Roben.
975
976         Change the order of arguments on some methods.  Split removal for user stylesheets and script into
977         separate functions based off the type of object being removed.
978
979         * WebView/WebView.mm:
980         (+[WebView _addUserScriptToGroup:worldID:source:url:whitelist:blacklist:injectionTime:]):
981         (+[WebView _addUserStyleSheetToGroup:worldID:source:url:whitelist:blacklist:]):
982         (+[WebView _removeUserScriptFromGroup:worldID:url:]):
983         (+[WebView _removeUserStyleSheetFromGroup:worldID:url:]):
984         (+[WebView _removeUserScriptsFromGroup:worldID:]):
985         (+[WebView _removeUserStyleSheetsFromGroup:worldID:]):
986         * WebView/WebViewPrivate.h:
987
988 2009-10-13  Anders Carlsson  <andersca@apple.com>
989
990         Reviewed by Sam Weinig.
991
992         <rdar://problem/6660507> Add "privacy mode" to Netscape Plug-in API
993
994         Listen for WebPreferences notifications and update the _isPrivateBrowsingEnabled ivar 
995         when the value changes. Also call -[WebBaseNetscapePluginView privateBrowsingModeDidChange] when the
996         value changes. In process this just calls NPP_SetValue, and OOP it sends a MIG message to the plug-in host.
997         
998         * Plugins/Hosted/NetscapePluginHostManager.h:
999         * Plugins/Hosted/NetscapePluginHostManager.mm:
1000         (WebKit::NetscapePluginHostManager::instantiatePlugin):
1001         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1002         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1003         (WebKit::NetscapePluginInstanceProxy::privateBrowsingModeDidChange):
1004         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1005         (-[WebHostedNetscapePluginView createPlugin]):
1006         (-[WebHostedNetscapePluginView privateBrowsingModeDidChange]):
1007         * Plugins/Hosted/WebKitPluginHost.defs:
1008         * Plugins/WebBaseNetscapePluginView.h:
1009         * Plugins/WebBaseNetscapePluginView.mm:
1010         (-[WebBaseNetscapePluginView privateBrowsingModeDidChange]):
1011         (-[WebBaseNetscapePluginView viewDidMoveToWindow]):
1012         (-[WebBaseNetscapePluginView preferencesHaveChanged:]):
1013         * Plugins/WebNetscapePluginView.mm:
1014         (-[WebNetscapePluginView privateBrowsingModeDidChange]):
1015         (-[WebNetscapePluginView getVariable:value:]):
1016
1017 2009-10-12  Simon Fraser  <simon.fraser@apple.com>
1018
1019         Reviewed by Darin Adler.
1020
1021         Video keeps playing after going fullscreen, then closing window
1022         https://bugs.webkit.org/show_bug.cgi?id=30164
1023         
1024         Clear the QTMovie on the QTMovieView when coming out of fullscreen,
1025         to fix issue where the underlying movie keeps playing.
1026
1027         * WebView/WebVideoFullscreenController.mm:
1028         (-[WebVideoFullscreenController windowDidExitFullscreen]):
1029
1030 2009-10-11  Dan Bernstein  <mitz@apple.com>
1031
1032         Reviewed by Darin Adler.
1033
1034         <rdar://problem/7294267> REGRESSION (r48492): Gmail voice and video chat
1035         doesn’t work
1036         https://bugs.webkit.org/show_bug.cgi?id=30295
1037
1038         Test: plugins/setProperty.html
1039
1040         * Plugins/Hosted/ProxyInstance.mm:
1041         (WebKit::ProxyInstance::setFieldValue): Fixed a typo. The function
1042         should return early if m_instanceProxy is null.
1043
1044 2009-10-09  Adam Barth  <abarth@webkit.org>
1045
1046         Reviewed by Darin Adler.
1047
1048         Factor HistoryController out of FrameLoader
1049         https://bugs.webkit.org/show_bug.cgi?id=30246
1050
1051         Update API call.
1052
1053         * WebCoreSupport/WebFrameLoaderClient.mm:
1054         (WebFrameLoaderClient::restoreViewState):
1055         * WebView/WebView.mm:
1056         (-[WebView _loadBackForwardListFromOtherView:]):
1057
1058 2009-10-09  Mark Rowe  <mrowe@apple.com>
1059
1060         Reviewed by Brady Eidson.
1061
1062         <rdar://problem/7290671> Crash after navigating away from a page with subframe containing plug-in
1063
1064         At the time that -stop is called on a WebBaseNetscapePluginView that is contained within a subframe
1065         the WebFrame's data source has been zeroed out.  This was causing -[WebBaseNetscapePluginView webFrame]
1066         to return nil during -stop, preventing the plug-in view from unregistering itself from the PluginHalter.
1067         We fix this by having -webFrame retrieve the frame directly rather than retrieving it from the data source.
1068
1069         * Plugins/WebBaseNetscapePluginView.mm:
1070         (-[WebBaseNetscapePluginView dataSource]): Get the data source from the WebFrame.
1071         (-[WebBaseNetscapePluginView webFrame]): Get the Frame directly from the element's document rather
1072         than taking a windy route through the WebDataSource.
1073
1074 2009-10-09  Brady Eidson  <beidson@apple.com>
1075
1076         Reviewed by Dan Bernstein.
1077
1078         Add SPI to specifically enable visited link tracking.
1079
1080         * History/WebHistory.mm:
1081         (+[WebHistory _setVisitedLinkTrackingEnabled:]):
1082         * History/WebHistoryPrivate.h:
1083
1084 2009-10-08  Jon Honeycutt  <jhoneycutt@apple.com>
1085
1086         Remove the WebKitPluginHalterEnabledPreferenceKey in favor of checking
1087         for the existence of a PluginHalterDelegate.
1088
1089         Reviewed by Dan Bernstein.
1090
1091         * WebCoreSupport/WebPluginHalterClient.h:
1092         Add declaration for new function.
1093
1094         * WebCoreSupport/WebPluginHalterClient.mm:
1095         (WebPluginHalterClient::enabled):
1096         Check whether the UIDelegate responds to shouldHaltPlugin.
1097
1098         * WebView/WebPreferenceKeysPrivate.h:
1099         Remove the "enabled" preference key.
1100
1101         * WebView/WebPreferences.mm:
1102         (+[WebPreferences initialize]):
1103         Remove the initialization of the pref.
1104
1105         * WebView/WebPreferencesPrivate.h:
1106         Remove the getter/setter for this pref.
1107
1108         * WebView/WebView.mm:
1109         (-[WebView _preferencesChangedNotification:]):
1110         Remove propagation of the pref. 
1111
1112 2009-10-08  Adam Barth  <abarth@webkit.org>
1113
1114         Reviewed by Eric Seidel.
1115
1116         Move executeScript from FrameLoader to ScriptController
1117         https://bugs.webkit.org/show_bug.cgi?id=30200
1118
1119         Update API call.
1120
1121         * WebView/WebFrame.mm:
1122         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
1123         * WebView/WebView.mm:
1124         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
1125
1126 2009-10-08  Brady Eidson  <beidson@apple.com>
1127
1128         Reviewed by Dan Bernstein.
1129
1130         Ask the History Delegate to populate the visited links hash.
1131         <rdar://problem/7285293> and https://webkit.org/b/29904
1132
1133         * History/WebHistory.mm:
1134         (+[WebHistory _removeAllVisitedLinks]):
1135         * History/WebHistoryPrivate.h:
1136         * WebCoreSupport/WebChromeClient.mm:
1137         (WebChromeClient::populateVisitedLinks):
1138         * WebView/WebDelegateImplementationCaching.h:
1139         * WebView/WebDelegateImplementationCaching.mm:
1140         (CallHistoryDelegate):
1141         * WebView/WebHistoryDelegate.h:
1142         * WebView/WebView.mm:
1143         (-[WebView _cacheHistoryDelegateImplementations]):
1144         (-[WebView addVisitedLinks:]):
1145         * WebView/WebViewPrivate.h:
1146
1147 2009-10-08  Anders Carlsson  <andersca@apple.com>
1148
1149         Reviewed by Sam Weinig.
1150
1151         Remove the shouldLoadMediaElementURL implementation.
1152
1153         * WebCoreSupport/WebFrameLoaderClient.h:
1154         * WebCoreSupport/WebFrameLoaderClient.mm:
1155         * WebView/WebPolicyDelegatePrivate.h:
1156
1157 2009-10-07  Simon Fraser  <simon.fraser@apple.com>
1158
1159         Re-land 49269-49271 since reverting them did not fix the tests.
1160
1161         * WebView/WebHTMLView.mm:
1162         (-[WebHTMLView drawRect:]):
1163
1164 2009-10-07  Simon Fraser  <simon.fraser@apple.com>
1165
1166         Revert 49269-49271 to see if it fixes test failures on SnowLeopard that do not
1167         reproduce locally.
1168
1169         * WebView/WebHTMLView.mm:
1170         (-[WebHTMLView drawRect:]):
1171
1172 2009-10-07  Adam Barth  <abarth@webkit.org>
1173
1174         Reviewed by Darin Adler.
1175
1176         Factor PolicyChecker out of FrameLoader
1177         https://bugs.webkit.org/show_bug.cgi?id=30155
1178
1179         Move the policy callback to the policy object.
1180
1181         * WebCoreSupport/WebFrameLoaderClient.mm:
1182         (WebFrameLoaderClient::dispatchWillSubmitForm):
1183         (WebFrameLoaderClient::receivedPolicyDecison):
1184
1185 2009-10-07  Brady Eidson  <beidson@apple.com>
1186
1187         Reviewed by Darin Adler.
1188
1189         Send title changes to the global history delegate.
1190         <rdar://problem/7285293> and https://webkit.org/b/29904
1191
1192         * WebCoreSupport/WebFrameLoaderClient.mm:
1193         (WebFrameLoaderClient::setTitle):
1194         * WebView/WebDelegateImplementationCaching.h:
1195         * WebView/WebHistoryDelegate.h:
1196         * WebView/WebView.mm:
1197         (-[WebView _cacheHistoryDelegateImplementations]):
1198
1199 2009-10-07  Darin Adler  <darin@apple.com>
1200
1201         Reviewed by John Sullivan.
1202
1203         Make the setMetadataURL function foolproof by having it remove user info
1204         https://bugs.webkit.org/show_bug.cgi?id=30178
1205         rdar://problem/6544670
1206
1207         * Misc/WebNSFileManagerExtras.m:
1208         (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]):
1209         Call _web_URLByRemovingUserInfo on the passed in URL string after converting
1210         it to a URL, and then convert it back to a string.
1211
1212         * Misc/WebNSURLExtras.h: Added _web_URLByRemovingUserInfo.
1213         * Misc/WebNSURLExtras.mm: Removed unused WebKitURLComponents struct.
1214         (-[NSURL _web_URLByTruncatingOneCharacterBeforeComponent:]): Renamed to be
1215         clearer on what this does.
1216         (-[NSURL _webkit_URLByRemovingFragment]): Changed to call new name.
1217         (-[NSURL _webkit_URLByRemovingResourceSpecifier]): Ditto.
1218         (-[NSURL _web_URLByRemovingComponentAndSubsequentCharacter:]): Added.
1219         (-[NSURL _web_URLByRemovingUserInfo]): Added.
1220
1221 2009-10-07  Simon Fraser  <simon.fraser@apple.com>
1222
1223         Make Dan Bernstein happy.
1224
1225         * WebView/WebHTMLView.mm:
1226         (-[WebHTMLView drawRect:]):
1227
1228 2009-10-07  Simon Fraser  <simon.fraser@apple.com>
1229
1230         Reviewed by Dan Bernstein.
1231
1232         Avoid Obj-C message dispatch when possible by storing accessed objects
1233         in local variables.
1234
1235         * WebView/WebHTMLView.mm:
1236         (-[WebHTMLView drawRect:]):
1237
1238 2009-10-07  Simon Fraser  <simon.fraser@apple.com>
1239
1240         Reviewed by Dan Bernstein.
1241
1242         Animation stalls for a few seconds partway through
1243         https://bugs.webkit.org/show_bug.cgi?id=30182
1244         
1245         Make sure that we only call -disableScreenUpdatesUntilFlush when a window
1246         update is actually going to happen, otherwise screen updates are disabled
1247         for too long.
1248
1249         * WebView/WebHTMLView.mm:
1250         (-[WebHTMLView drawRect:]):
1251
1252 2009-10-06  Pavel Feldman  <pfeldman@chromium.org>
1253
1254         Reviewed by Timothy Hatcher.
1255
1256         Web Inspector: default to an attached inspector window on Windows (as on Mac).
1257
1258         https://bugs.webkit.org/show_bug.cgi?id=30134
1259
1260         * WebCoreSupport/WebInspectorClient.mm:
1261         (-[WebInspectorWindowController showWindow:]):
1262
1263 2009-10-06  Adam Barth  <abarth@webkit.org>
1264
1265         Reviewed by Eric Seidel.
1266
1267         Move FrameLoader::canLoad to SecurityOrigin
1268         https://bugs.webkit.org/show_bug.cgi?id=30111
1269
1270         * Plugins/Hosted/HostedNetscapePluginStream.mm:
1271         (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
1272         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1273         (WebKit::NetscapePluginInstanceProxy::loadRequest):
1274         * Plugins/WebBaseNetscapePluginStream.mm:
1275         (WebNetscapePluginStream::WebNetscapePluginStream):
1276         * Plugins/WebNetscapePluginView.mm:
1277         (-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
1278         * Plugins/WebPluginContainerCheck.mm:
1279         (-[WebPluginContainerCheck _isForbiddenFileLoad]):
1280         * WebView/WebFrame.mm:
1281         (-[WebFrame _allowsFollowingLink:]):
1282
1283 2009-10-06  Adam Barth  <abarth@webkit.org>
1284
1285         Reviewed by Eric Seidel.
1286
1287         Move setLocalLoadPolicy and friends to SecurityOrigin
1288         https://bugs.webkit.org/show_bug.cgi?id=30110
1289
1290         Call the new API.
1291
1292         * WebView/WebView.mm:
1293         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
1294
1295 2009-10-06  Simon Fraser  <simon.fraser@apple.com>
1296
1297         Reviewed by Mark Rowe.
1298
1299         accessibility/media-element.html crashes (and has incorrect result)
1300         https://bugs.webkit.org/show_bug.cgi?id=30108
1301
1302         Fix up the accessibilty label for the newly added fullscreen button,
1303         and update the test result accordingly.
1304
1305         * WebCoreSupport/WebViewFactory.mm:
1306         (-[WebViewFactory localizedMediaControlElementString:]):
1307         Handle "ControlsPanel" which is just an empty container, to avoid
1308         asserting in debug builds.
1309
1310 2009-10-06  Daniel Bates  <dbates@webkit.org>
1311
1312         Reviewed by Eric Seidel.
1313
1314         https://bugs.webkit.org/show_bug.cgi?id=30107
1315         
1316         Fixes an issue where the Mac build does return the correct drop effect
1317         with respect to the HTML 5 specification when effectAllowed == "none".
1318         
1319         Currently, when effectAllowed == "none" and dropEffect == "copy" or 
1320         dropEffect == "move" the resulting drop effect is "copy" and "move",
1321         respectively. However, the HTML 5 specification states that regardless
1322         of the specified dropEffect, when effectAllowed == "none" the resulting
1323         drop effect should be "none".
1324
1325         * WebView/WebHTMLView.mm:
1326         (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
1327
1328 2009-10-06  Pavel Feldman  <pfeldman@chromium.org>
1329
1330         Reviewed by Timothy Hatcher.
1331
1332         Web Inspector: close inspector client view on
1333         InspectorController::close API call.
1334
1335         In order to run batch web inspector layout tests (and not affect 
1336         subsequent tests) we should close inspector client's view upon
1337         InspectorController::close API call.
1338
1339         https://bugs.webkit.org/show_bug.cgi?id=30009
1340
1341         * WebCoreSupport/WebInspectorClient.mm:
1342         (WebInspectorClient::createPage):
1343
1344 2009-10-05  Dan Bernstein  <mitz@apple.com>
1345
1346         Rubber-stamped by Mark Rowe.
1347
1348         Moved a WebPluginHalterClient out of the WebCore namesapce.
1349
1350         * WebCoreSupport/WebPluginHalterClient.h:
1351
1352 2009-10-05  Kevin Decker  <kdecker@apple.com>
1353
1354         Reviewed by Dan Bernstein.
1355
1356         Added new PluginHalter client, delegate and few more WebPreferences keys.
1357
1358         * WebView/WebPreferenceKeysPrivate.h: Added two new keys.
1359         * WebView/WebPreferences.mm:
1360         (+[WebPreferences initialize]): Initialize newly added key.
1361         (-[WebPreferences pluginAllowedRunTime]): Added.
1362         (-[WebPreferences setPluginAllowedRunTime:]): Added.
1363         * WebView/WebPreferencesPrivate.h: Added above two methods.
1364         * WebView/WebUIDelegatePrivate.h: Added shouldHaltPlugin delegate.
1365         * WebView/WebView.mm:
1366         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
1367         Setup a new WebPluginHalterClient.
1368         (-[WebView _preferencesChangedNotification:]): Update WebCore settings accordingly.
1369         * WebCoreSupport/WebPluginHalterClient.h: Added.
1370         * WebCoreSupport/WebPluginHalterClient.mm: Added.
1371         (WebPluginHalterClient::WebPluginHalterClient):
1372         (WebPluginHalterClient::shouldHaltPlugin): Added, invoke the delegate.
1373
1374 2009-10-05  Simon Fraser  <simon.fraser@apple.com>
1375
1376         More build fixes for Tiger.
1377
1378         * WebView/WebVideoFullscreenController.mm:
1379
1380 2009-10-05  Simon Fraser  <simon.fraser@apple.com>
1381
1382         More build fixes for Tiger.
1383
1384         * WebView/WebVideoFullscreenController.mm:
1385         (-[WebVideoFullscreenWindow animationDidEnd:]):
1386         * WebView/WebWindowAnimation.m:
1387
1388 2009-10-05  Simon Fraser  <simon.fraser@apple.com>
1389
1390         More build fixes for Tiger.
1391
1392         * WebView/WebVideoFullscreenController.mm:
1393         * WebView/WebVideoFullscreenHUDWindowController.mm:
1394         (-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]):
1395         (-[WebVideoFullscreenHUDWindowController scheduleTimeUpdate]):
1396         (-[WebVideoFullscreenHUDWindowController fadeWindowIn]):
1397         (-[WebVideoFullscreenHUDWindowController fadeWindowOut]):
1398         (-[WebVideoFullscreenHUDWindowController closeWindow]):
1399
1400 2009-10-05  Simon Fraser  <simon.fraser@apple.com>
1401
1402         Build fixes for Tiger.
1403
1404         * WebView/WebVideoFullscreenHUDWindowController.h:
1405         * WebView/WebVideoFullscreenHUDWindowController.mm:
1406         (-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]):
1407         (-[WebVideoFullscreenHUDWindowController dealloc]):
1408         (-[WebVideoFullscreenHUDWindowController closeWindow]):
1409         (-[WebVideoFullscreenHUDWindowController windowDidLoad]):
1410
1411 2009-10-05  Simon Fraser  <simon.fraser@apple.com>
1412
1413         Build fix. If you call Node::hasTagName(), you also have to include Element.h.
1414
1415         * WebCoreSupport/WebChromeClient.mm:
1416
1417 2009-10-05  Pierre d'Herbemont  <pdherbemont@webkit.org>
1418
1419         Reviewed by Simon Fraser
1420         
1421         Support fullscreen in MediaPlayer (Mac)
1422         https://bugs.webkit.org/show_bug.cgi?id=26742
1423
1424         Add a fullscreen button to the <video> controller if the media engine,
1425         and the theme have support for fullscreen, and can show appropriate controls.
1426         Clicking the button calls through the ChromeClient to the WebVideoFullscreenController
1427         in WebKit to do a nice animation to fullscreen, with a custom controller.
1428
1429         * WebCoreSupport/WebChromeClient.h:
1430         * WebCoreSupport/WebChromeClient.mm:
1431         (WebChromeClient::supportsFullscreenForNode):
1432         (WebChromeClient::enterFullscreenForNode):
1433         (WebChromeClient::exitFullscreenForNode):
1434         New methods to ask whether fullscreen is possible for a given node, and
1435         notifications on enterying and exiting fullscreen.
1436         
1437         * WebView/WebVideoFullscreenController.h: Added.
1438         * WebView/WebVideoFullscreenController.mm: Added.
1439         WebVideoFullscreenController is responsible for creating the fullscreen window,
1440         and coordinating the various animations when going fullscreen.
1441
1442         * WebView/WebVideoFullscreenHUDWindowController.h: Added.
1443         * WebView/WebVideoFullscreenHUDWindowController.mm: Added.
1444         This class manages the heads-up display (HUD) control bar.
1445
1446         * WebView/WebView.mm:
1447         (-[WebView _close]):
1448         Make sure we come out of fullscreen if the WebView is torn down (e.g. if
1449         you close a background window).
1450
1451         (-[WebView _enterFullscreenForNode:WebCore::]):
1452         Make a WebVideoFullscreenController and tell is to start to go fullscreen.
1453         
1454         (-[WebView _exitFullscreen]):
1455         Tell the WebVideoFullscreenController to come out of fullscreen, and clean up.
1456         
1457         * WebView/WebViewData.h:
1458         * WebView/WebViewData.mm:
1459         (-[WebViewPrivate dealloc]):
1460         (-[WebViewPrivate finalize]):
1461         * WebView/WebViewInternal.h:
1462         Keep a pointer to the WebVideoFullscreenController.
1463         
1464         * WebView/WebWindowAnimation.h: Added.
1465         * WebView/WebWindowAnimation.m: Added.
1466         (WebWindowAnimationDurationFromDuration):
1467         (scaledRect):
1468         (squaredDistance):
1469         Handle the animations used during the transitition to fullscreen.
1470
1471 2009-10-05  Anders Carlsson  <andersca@apple.com>
1472
1473         Reviewed by Kevin Decker.
1474        
1475         WebKit side of <rdar://problem/7179166>
1476        
1477         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1478         Add an m_pluginIsWaitingForDraw member variable.
1479         
1480         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1481         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
1482         Initialize m_pluginIsWaitingForDraw.
1483         
1484         (WebKit::NetscapePluginInstanceProxy::invalidateRect):
1485         Set m_pluginIsWaitingForDraw to true.
1486         
1487         (WebKit::NetscapePluginInstanceProxy::didDraw):
1488         If m_pluginIsWaitingForDraw is true, call _WKPHPluginInstanceDidDraw.
1489         
1490         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1491         (-[WebHostedNetscapePluginView drawRect:]):
1492         Call didDraw.
1493         
1494         * Plugins/Hosted/WebKitPluginHost.defs:
1495         Add PHPluginInstanceDidDraw.
1496
1497 2009-10-02  Chris Marrin  <cmarrin@apple.com>
1498
1499         Reviewed by Adele Peterson.
1500
1501         Add functionality to pause/throttle CSS transitions/animations in a WebView
1502         https://bugs.webkit.org/show_bug.cgi?id=29942
1503
1504         Added both a setter and getter function
1505
1506         * WebView/WebView.mm:
1507         (-[WebView cssAnimationsSuspended]):
1508         (-[WebView setCSSAnimationsSuspended:]):
1509         * WebView/WebViewData.h:
1510         * WebView/WebViewData.mm:
1511         (-[WebViewPrivate init]):
1512         * WebView/WebViewPrivate.h:
1513
1514 2009-10-04  Kevin Decker  <kdecker@apple.com>
1515
1516         Reviewed by Sam Weinig.
1517
1518         <rdar://problem/7273363> Plug-ins should use PluginHalter
1519         
1520         * Plugins/WebBaseNetscapePluginView.h: Add WebHaltablePlugin forward declare and _haltable ivar.
1521         * Plugins/WebBaseNetscapePluginView.mm:
1522         (WebHaltablePlugin::WebHaltablePlugin): Added.
1523         (WebHaltablePlugin::halt): New method that stops a plug-in.
1524         (WebHaltablePlugin::restart): New method that starts a plug-in.
1525         (WebHaltablePlugin::node): Added. Provides the DOMNode corresponding to the plug-in in WebBaseNetscapePluginView.
1526         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
1527         Initialize new _haltable ivar.
1528         (-[WebBaseNetscapePluginView start]): Call the page's didStartPlugin() upon starting a plug-in.
1529         (-[WebBaseNetscapePluginView stop]): Call the page's didStopPlugin() upon stopping a plug-in.
1530
1531 2009-10-05  Pavel Feldman  <pfeldman@chromium.org>
1532
1533         Reviewed by Timothy Hatcher.
1534
1535         Web Inspector: add testing harness for Web Inspector.
1536
1537         https://bugs.webkit.org/show_bug.cgi?id=30010
1538
1539         * WebInspector/WebInspector.mm:
1540         (-[WebInspector evaluateInFrontend:callId:script:]):
1541         * WebInspector/WebInspectorPrivate.h: Added.
1542
1543 2009-10-04  Kevin Decker  <kdecker@apple.com>
1544
1545         Reviewed by Cameron Zwarich.
1546
1547         * WebView/WebPreferenceKeysPrivate.h: Added new key.
1548         * WebView/WebPreferences.mm:
1549         (+[WebPreferences initialize]): Leave plug-in halting disabled by default.
1550         (-[WebPreferences pluginHalterEnabled]): Added.
1551         (-[WebPreferences setPluginHalterEnabled:]): Ditto.
1552         * WebView/WebPreferencesPrivate.h: Added above new methods. 
1553
1554 2009-10-02  Dave Hyatt  <hyatt@apple.com>
1555
1556         Reviewed by Adam Roben.
1557
1558         Add support for blacklist patterns to user stylesheets and scripts in addition to whitelist patterns.
1559
1560         * WebView/WebView.mm:
1561         (toStringVector):
1562         (+[WebView _addUserScriptToGroup:source:url:worldID:whitelist:blacklist:injectionTime:]):
1563         (+[WebView _addUserStyleSheetToGroup:source:url:worldID:whitelist:blacklist:]):
1564         * WebView/WebViewPrivate.h:
1565
1566 2009-10-01  Mark Rowe  <mrowe@apple.com>
1567
1568         Fix the Tiger build.  Don't unconditionally enable 3D canvas as it is not supported on Tiger.
1569
1570         * Configurations/FeatureDefines.xcconfig:
1571
1572 2009-10-01  Chris Marrin  <cmarrin@apple.com>
1573
1574         Reviewed by Oliver Hunt.
1575
1576         Turn on ENABLE_3D_CANVAS in TOT
1577         https://bugs.webkit.org/show_bug.cgi?id=29906
1578
1579         * Configurations/FeatureDefines.xcconfig:
1580         * WebView/WebPreferenceKeysPrivate.h:
1581         * WebView/WebPreferences.mm:
1582         (+[WebPreferences initialize]):
1583         (-[WebPreferences webGLEnabled]):
1584         (-[WebPreferences setWebGLEnabled:]):
1585         * WebView/WebPreferencesPrivate.h:
1586         * WebView/WebView.mm:
1587         (-[WebView _preferencesChangedNotification:]):
1588
1589 2009-09-30  Sam Weinig  <sam@webkit.org>
1590
1591         Reviewed by Dan Bernstein.
1592
1593         Fix for <rdar://problem/7259706>
1594         Need WebKit API or SPI on Mac and Windows to test whether it's safe to load a page in a new tab/window
1595
1596         * WebView/WebFrame.mm:
1597         (-[WebFrame _allowsFollowingLink:]):
1598         * WebView/WebFramePrivate.h:
1599
1600 2009-09-30  Dave Hyatt  <hyatt@apple.com>
1601
1602         Reviewed by Adam Roben.
1603
1604         Add the ability to remove user stylesheets and scripts by URL.
1605
1606         * WebView/WebView.mm:
1607         (+[WebView _removeUserContentFromGroup:url:worldID:]):
1608         * WebView/WebViewPrivate.h:
1609
1610 2009-09-29  Brady Eidson  <beidson@apple.com>
1611
1612         Rubberstamped by Dan Bernstein.
1613
1614         Fix license and some sorting in new files.
1615
1616         * WebView/WebHistoryDelegate.h:
1617         * WebView/WebNavigationData.h:
1618         * WebView/WebNavigationData.mm:
1619
1620 2009-09-29  Brady Eidson  <beidson@apple.com>
1621
1622         Reviewed by John Sullivan.
1623
1624         WebKit Mac API should provide a delegate interface for global history.
1625         <rdar://problem/7042773> and https://webkit.org/b/29904
1626
1627         * WebView/WebHistoryDelegate.h: Added. New interface for WebKit clients to implement to manage 
1628           their own global history store.
1629
1630         Object to store all of the bits of data relevant to a page visit:
1631         * WebView/WebNavigationData.h: Added.
1632         * WebView/WebNavigationData.mm: Added.
1633         (-[WebNavigationDataPrivate dealloc]):
1634         (-[WebNavigationData initWithURLString:title:originalRequest:response:hasSubstituteData:clientRedirectSource:]):
1635         (-[WebNavigationData url]):
1636         (-[WebNavigationData title]):
1637         (-[WebNavigationData originalRequest]):
1638         (-[WebNavigationData response]):
1639         (-[WebNavigationData hasSubstituteData]):
1640         (-[WebNavigationData clientRedirectSource]):
1641         (-[WebNavigationData dealloc]):
1642
1643         * WebCoreSupport/WebFrameLoaderClient.mm:
1644         (WebFrameLoaderClient::updateGlobalHistory): If the delegate exists, don't use the built-in WebHistory.
1645           If the implementation for this method exists, call it.
1646         (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): Ditto
1647
1648         * WebView/WebDelegateImplementationCaching.h:
1649         * WebView/WebDelegateImplementationCaching.mm:
1650         (WebViewGetHistoryDelegateImplementations):
1651         (CallHistoryDelegate):
1652
1653         * WebView/WebView.mm:
1654         (-[WebView _cacheHistoryDelegateImplementations]):
1655         (-[WebView setHistoryDelegate:]):
1656         (-[WebView historyDelegate]):
1657         * WebView/WebViewData.h:
1658         * WebView/WebViewPrivate.h:
1659
1660 2009-09-29  Kenneth Russell  <kbr@google.com>
1661
1662         Reviewed by Dimitri Glazkov.
1663
1664         Add support for run-time flag for 3D canvas
1665         https://bugs.webkit.org/show_bug.cgi?id=29826
1666
1667         * WebView/WebView.mm:
1668         (-[WebView _preferencesChangedNotification:]): Enable experimental
1669         WebGL flag when 3D_CANVAS is enabled in the build.
1670
1671 2009-09-28  Fumitoshi Ukai  <ukai@chromium.org>
1672
1673         Reviewed by Eric Seidel.
1674
1675         Add experimentalWebSocketsEnabled in WebPreferences.
1676         https://bugs.webkit.org/show_bug.cgi?id=28941
1677
1678         * WebView/WebPreferenceKeysPrivate.h:
1679         * WebView/WebPreferences.mm:
1680         (+[WebPreferences initialize]):
1681         (-[WebPreferences experimentalWebSocketsEnabled]):
1682         (-[WebPreferences setExperimentalWebSocketsEnabled:]):
1683         * WebView/WebPreferencesPrivate.h:
1684         * WebView/WebView.mm:
1685         (-[WebView _preferencesChangedNotification:]):
1686
1687 2009-09-28  Dan Bernstein  <mitz@apple.com>
1688
1689         Reviewed by Anders Carlsson.
1690
1691         <rdar://problem/7240911> REGRESSION (r48586): Crash occurs when loading
1692         a PDF
1693
1694         CGPDFObjectRef is not a CFTypeRef, and cannot be retained or released.
1695         Its lifetime is managed by its container. Just use a Vector to store
1696         CGPDFObjectRefs, relying on the CGPDFDocument to keep them alive.
1697
1698         * WebView/WebPDFDocumentExtras.mm:
1699         (appendValuesInPDFNameSubtreeToVector):
1700         (getAllValuesInPDFNameTree):
1701         (web_PDFDocumentAllScripts):
1702
1703 2009-09-24  Jon Honeycutt  <jhoneycutt@apple.com>
1704
1705         Reviewed by Alice Liu.
1706
1707         * WebView/WebView.mm:
1708         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
1709         Pass 0 for new Page constructor argument.
1710
1711 2009-09-14  John Gregg  <johnnyg@google.com>
1712
1713         Reviewed by Eric Seidel.
1714
1715         isEnabled switch for notifications (experimental) in Page Settings
1716         https://bugs.webkit.org/show_bug.cgi?id=28930
1717
1718         Adds support for the experimentalNotificationsEnabled flag in Settings
1719         through WebPreferencesPrivate.
1720
1721         * WebView/WebPreferenceKeysPrivate.h:
1722         * WebView/WebPreferences.mm:
1723         (+[WebPreferences initialize]):
1724         (-[WebPreferences experimentalNotificationsEnabled]):
1725         (-[WebPreferences setExperimentalNotificationsEnabled:]):
1726         * WebView/WebPreferencesPrivate.h:
1727         * WebView/WebView.mm:
1728         (-[WebView _preferencesChangedNotification:]):
1729
1730 2009-09-23  Geoffrey Garen  <ggaren@apple.com>
1731
1732         Reviewed by Sam Weinig.
1733
1734         Updated for a WebCore rename.
1735
1736         * WebView/WebFrame.mm:
1737         (-[WebFrame _cacheabilityDictionary]):
1738
1739 2009-09-23  Darin Adler  <darin@apple.com>
1740
1741         Reviewed by Dan Bernstein.
1742
1743         Speed up access to history items by caching date computation.
1744
1745         * History/WebHistory.mm:
1746         (getDayBoundaries): Refactored from timeIntervalForBeginningOfDay.
1747         Returns the beginning of the day that the passed time is within and
1748         the beginning of the next day.
1749         (beginningOfDay): Added. Uses getDayBoundaries so it can be fast for
1750         multiple dates within the same day, which is the common case.
1751         (dateKey): Added. Calls beginningOfDay and converts to an integer.
1752         (-[WebHistoryPrivate findKey:forDay:]): Changed to call dateKey
1753         insetad of timeIntervalForBeginningOfDay.
1754
1755 2009-09-23  David Kilzer  <ddkilzer@apple.com>
1756
1757         Move definition of USE(PLUGIN_HOST_PROCESS) from WebKitPrefix.h to Platform.h
1758
1759         Reviewed by Mark Rowe.
1760
1761         * WebKitPrefix.h: Removed definition of
1762         WTF_USE_PLUGIN_HOST_PROCESS.
1763
1764 2009-09-22  Timothy Hatcher  <timothy@apple.com>
1765
1766         Prevent scrolling multiple frames during latched wheel events.
1767
1768         Reviewed by Anders Carlsson.
1769
1770         * WebView/WebDynamicScrollBarsView.h:
1771         * WebView/WebDynamicScrollBarsView.mm:
1772         (-[WebDynamicScrollBarsView scrollWheel:]):
1773
1774 2009-09-22  Dan Bernstein  <mitz@apple.com>
1775
1776         Reviewed by John Sullivan.
1777
1778         <rdar://problem/7240911> REGRESSION (r48586): Crash occurs when loading
1779         a PDF
1780
1781         * WebView/WebPDFDocumentExtras.mm:
1782         (addWebPDFDocumentExtras): Made methodList static, because
1783         class_addMethods() doesn't copy it.
1784
1785 2009-09-21  Dan Bernstein  <mitz@apple.com>
1786
1787         Attempt to fix the Tiger build
1788
1789         * WebView/WebPDFDocumentExtras.mm:
1790         (addWebPDFDocumentExtras):
1791
1792 2009-09-21  Dan Bernstein  <mitz@apple.com>
1793
1794         Attempt to fix the Tiger build
1795
1796         * WebView/WebPDFDocumentExtras.mm:
1797         (web_PDFDocumentAllScripts):
1798         (addWebPDFDocumentExtras):
1799
1800 2009-09-21  Dan Bernstein  <mitz@apple.com>
1801
1802         Attempt to fix the Tiger build
1803
1804         * WebView/WebPDFDocumentExtras.mm:
1805         * WebView/WebPDFRepresentation.mm:
1806
1807 2009-09-21  Dan Bernstein  <mitz@apple.com>
1808
1809         Attempt to fix the Leopard and Tiger builds
1810
1811         * WebView/WebPDFDocumentExtras.mm:
1812
1813 2009-09-21  Dan Bernstein  <mitz@apple.com>
1814
1815         Reviewed by Anders Carlsson.
1816
1817         <rdar://problem/4137135> iFrame with PDF not being handled correctly on
1818         usps.com
1819         https://bugs.webkit.org/show_bug.cgi?id=4151
1820
1821         * WebView/WebJSPDFDoc.h: Added.
1822         * WebView/WebJSPDFDoc.mm: Added.
1823         (jsPDFDocInitialize): Retains the WebDataSource.
1824         (jsPDFDocFinalize): Releases the WebDataSource.
1825         (jsPDFDocPrint): Call the WebUIDelegate method -webView:printFrameView:
1826         with the PDF document's view.
1827         (makeJSPDFDoc): Makes and returns a JavaScript Doc instance that wraps
1828         the WebDataSource.
1829         * WebView/WebPDFDocumentExtras.h: Added.
1830         * WebView/WebPDFDocumentExtras.mm: Added.
1831         (appendValuesInPDFNameSubtreeToArray): Traverses a subtree of a PDF name
1832         tree and adds all values in the subtree to an array.
1833         (allValuesInPDFNameTree): Returns an array with all of the values in a
1834         PDF name tree.
1835         (web_PDFDocumentAllScripts): This is the implementation of -[PDFDocument
1836         _web_allScripts]. It gets all values in the document-level "JavaScript"
1837         name tree, which are action dictionaries, and returns an array of the
1838         actions' scripts.
1839         (addWebPDFDocumentExtras): Adds the -_web_allScripts method to
1840         PDFDocument.
1841         * WebView/WebPDFRepresentation.h:
1842         * WebView/WebPDFRepresentation.m: Removed.
1843         * WebView/WebPDFRepresentation.mm: Copied from WebKit/mac/WebView/WebPDFRepresentation.m.
1844         (+[WebPDFRepresentation initialize]): Added. Calls
1845         addWebPDFDocumentExtras().
1846         (-[WebPDFRepresentation finishedLoadingWithDataSource:]): Get the
1847         scripts from the PDF document, create a JavaScript Doc object for the
1848         document, and a JavaScript execution context, then execute every script
1849         in the context, with the Doc object as "this".
1850
1851 2009-09-17  Simon Fraser  <simon.fraser@apple.com>
1852
1853         Reviewed by Dave Hyatt.
1854
1855         Compositing layers are incorrectly positioned after scrolling with position:fixed
1856         https://bugs.webkit.org/show_bug.cgi?id=29262
1857         
1858         When scrolling a page with compositing layers inside a position:fixed element,
1859         we need to update the compositing layer positions when the scroll position changes.
1860
1861         * WebView/WebHTMLView.mm:
1862         (-[WebHTMLView _frameOrBoundsChanged]):
1863         Call the new FrameView::scrollPositionChanged() method rather than sending the
1864         scroll event directly.
1865
1866 2009-09-17  Kenneth Rohde Christiansen  <kenneth@webkit.org>
1867
1868         Reviewed by Simon Hausmann.
1869
1870         Make PlatformWindow return something else than PlatformWidget
1871         https://bugs.webkit.org/show_bug.cgi?id=29085
1872
1873         Reflect the rename of platformWindow and it's return type.
1874
1875         * WebCoreSupport/WebChromeClient.h:
1876         * WebCoreSupport/WebChromeClient.mm:
1877         (WebChromeClient::platformPageClient):
1878
1879 2009-09-17  Anders Carlsson  <andersca@apple.com>
1880
1881         Reviewed by Oliver Hunt.
1882
1883         <rdar://problem/7007541> 
1884         CrashTracer: 4800+ crashes in Safari at com.apple.WebKit • WTF::HashTableIterator...
1885
1886         Add null checks for m_instanceProxy (It will be null when a plug-in has crashed).
1887         
1888         * Plugins/Hosted/ProxyInstance.mm:
1889         (WebKit::ProxyInstance::invoke):
1890         (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
1891         (WebKit::ProxyInstance::supportsConstruct):
1892         (WebKit::ProxyInstance::getPropertyNames):
1893         (WebKit::ProxyInstance::methodsNamed):
1894         (WebKit::ProxyInstance::fieldNamed):
1895         (WebKit::ProxyInstance::fieldValue):
1896         (WebKit::ProxyInstance::setFieldValue):
1897         (WebKit::ProxyInstance::invalidate):
1898
1899 2009-09-16  Simon Fraser  <simon.fraser@apple.com>
1900
1901         Reviewed by Dan Bernstein.
1902
1903         Work around a bug in AppKit on Leopard which causes compositing layers to jitter, and
1904         become misplaced when the WebHTMLView is resized or scrolled sometimes.
1905         <rdar://problem/7071636>
1906         
1907         The previous fix didn't fix the case where the layers jiggle when resizing the docked
1908         inspector when the view size is over 2048px tall, on Leopard.
1909
1910         * WebView/WebHTMLView.mm:
1911         (-[WebHTMLView _updateLayerHostingViewPosition]):
1912
1913 2009-09-16  Simon Fraser  <simon.fraser@apple.com>
1914
1915         Reviewed by Oliver Hunt.
1916
1917         Work around a bug in AppKit on Leopard which causes compositing layers to jitter, and
1918         become misplaced when the WebHTMLView is resized or scrolled sometimes.
1919         <rdar://problem/7071636>
1920         
1921         We call an internal AppKit method to make sure the layer geometry is updated correctly.
1922
1923         * WebView/WebHTMLView.mm:
1924         (-[WebHTMLView _updateLayerHostingViewPosition]):
1925
1926 2009-09-15  Simon Fraser  <simon.fraser@apple.com>
1927
1928         Reviewed by Dan Bernstein.
1929
1930         Fixed position elements flash when CSS transforms are applied on page > 2048px tall
1931         https://bugs.webkit.org/show_bug.cgi?id=27272
1932         
1933         Update the previous workaround for misplaced compositing layers, which used a 4096px
1934         threshold, to 2048px since that's the GPU max texture size on some older hardware.
1935
1936         * WebView/WebHTMLView.mm:
1937         (-[WebHTMLView _updateLayerHostingViewPosition]):
1938
1939 2009-09-15  Alex Milowski  <alex@milowski.com>
1940
1941         Reviewed by Tor Arne Vestbø.
1942
1943         Added the ENABLE_MATHML to the feaure defines
1944
1945         * Configurations/FeatureDefines.xcconfig:
1946
1947 2009-09-15  Mark Rowe  <mrowe@apple.com>
1948
1949         Reviewed by Anders Carlsson.
1950
1951         <rdar://problem/7224378> REGRESSION(r48360): Dragging a tab with a plug-in out of a window, the plug-in gets slow and confused
1952
1953         In r48360, the fix for <rdar://problem/7090444>, I neglected to consider the case where the plug-in had already been started and
1954         -start would do an early-return rather than calling -restartTimers and -addWindowObservers itself.
1955
1956         * Plugins/WebBaseNetscapePluginView.mm:
1957         (-[WebBaseNetscapePluginView viewDidMoveToWindow]): Reinstate the call to -restartTimers and -addWindowObservers, but guard them
1958         with a check that the view is still in the window.
1959
1960 2009-09-14  Brady Eidson  <beidson@apple.com>
1961
1962         Reviewed by Alexey Proskuryakov.
1963
1964         Safari 4 cannot be used to update firmware on Linksys routers.
1965         <rdar://problem/7174050> and https://bugs.webkit.org/show_bug.cgi?id=29160
1966
1967         Adopt the new WebCore::CredentialStorage in WebKit/Mac.
1968
1969         * Misc/WebDownload.mm:
1970         (-[WebDownloadInternal download:didReceiveAuthenticationChallenge:]):
1971         * Plugins/WebBaseNetscapePluginView.mm:
1972         (WebKit::getAuthenticationInfo):
1973
1974 2009-09-12  Mark Rowe  <mrowe@apple.com>
1975
1976         Reviewed by Anders Carlsson.
1977
1978         Fix <rdar://problem/7090444> Crashes in-[WebBaseNetscapePluginView stop] handling NSWindowWillCloseNotification.
1979
1980         It's not valid to call -addWindowObservers when the view is not in a window, but this can happen when -start
1981         initializes a plug-in and the plug-in removes itself from the document during initialization.  -viewDidMoveToWindow
1982         calls -start and then calls -addWindowObservers without ensuring that the view is still in a window.
1983
1984         If -[WebBaseNetscapePluginView addWindowObservers] is incorrectly called when the view is not in a window, it will
1985         observe NSWindowWillCloseNotification on all windows.  This unexpected observer registration is not balanced by an
1986         unregistration so the notification can be delivered after the view is deallocated, causing the crash seen in
1987         <rdar://problem/7090444>.
1988
1989         * Plugins/WebBaseNetscapePluginView.mm:
1990         (-[WebBaseNetscapePluginView start]): Only call -updateAndSetWindow if we still have a current window.
1991         (-[WebBaseNetscapePluginView viewDidMoveToWindow]): Remove unnecessary calls to -restartTimers and -addWindowObservers
1992         from -[WebBaseNetscapePluginView viewDidMoveToWindow].  They are already called from within -start with the extra benefit
1993         of ensuring that the view is still in a window when they are called.
1994
1995 2009-09-11  Mark Rowe  <mrowe@apple.com>
1996
1997         Reviewed by Jon Honeycutt.
1998
1999         Fix <rdar://problem/7145242> Crashes inside WTF::HashTable below NetscapePluginInstanceProxy::disconnectStream
2000
2001         * Plugins/Hosted/HostedNetscapePluginStream.mm:
2002         (WebKit::HostedNetscapePluginStream::cancelLoad): Canceling the load can result in calling through to disconnectStream.
2003         If the plug-in instance holds the last reference to the plug-in stream this will result in the stream being deallocated.
2004         This leads to HostedNetscapePluginStream::cancelLoad's call to disconnectStream being passed a deallocated stream object.
2005         Since the stream was already disconnected by the call to cancel there's no need to call disconnectStream a second time.
2006
2007 2009-09-11  Eric Seidel  <eric@webkit.org>
2008
2009         No review, rolling out r48229.
2010         http://trac.webkit.org/changeset/48229
2011
2012         * WebView/WebFrame.mm:
2013         (-[WebFrame _dragSourceMovedTo:]):
2014
2015 2009-09-10  Mark Rowe  <mrowe@apple.com>
2016
2017         Rubber-stamped by Sam Weinig.
2018
2019         Update JavaScriptCore and WebKit's FeatureDefines.xcconfig so that they are in sync with WebCore as they need to be.
2020
2021         * Configurations/FeatureDefines.xcconfig:
2022
2023 2009-09-09  Jens Alfke  <snej@chromium.org>
2024
2025         Reviewed by Eric Seidel.
2026
2027         Initialize DataTransfer's effectAllowed and dropEffect properties correctly
2028         according to HTML5 spec (sec. 7.9.2-7.9.3).
2029         https://bugs.webkit.org/show_bug.cgi?id=26700
2030
2031         * WebView/WebFrame.mm:
2032         (-[WebFrame _dragSourceMovedTo:]):
2033             Pass current drag operation (if known) to EventHandler::dragSourceMovedTo().
2034
2035 2009-09-09  Dave Hyatt  <hyatt@apple.com>
2036
2037         Reviewed by Adam Roben.
2038
2039         https://bugs.webkit.org/show_bug.cgi?id=29102, add support for user stylesheet injection.  This is similar
2040         to user script injection but allows for user stylesheets to be added.  The stylesheets are applied immediately
2041         to all Frames in the PageGroup.
2042
2043         Added userscripts/simple-stylesheet.html test case.
2044
2045         * WebView/WebView.mm:
2046         (+[WebView _addUserStyleSheetToGroup:source:url:worldID:patterns:]):
2047         * WebView/WebViewPrivate.h:
2048
2049 2009-09-07  Steve Block  <steveblock@google.com>
2050
2051         Reviewed by Adam Barth.
2052
2053         Adds a mock Geolocation service. This will be used to provide predictable behavior of the
2054         Geolocation API for use in LayoutTests. Later changes will integrate the the mock
2055         Geolocation service with DumpRenderTree.
2056         https://bugs.webkit.org/show_bug.cgi?id=28264
2057
2058         * WebCoreSupport/WebGeolocationMockPrivate.h: Added.
2059         * WebCoreSupport/WebGeolocationMock.mm: Added.
2060         (+[WebGeolocationMock setError:code:]): Added. Used by DumpRender tree to configure the mock Geolocation service.
2061         (+[WebGeolocationMock setPosition:latitude:longitude:accuracy:]): Added. Used by DumpRender tree to configure the mock Geolocation service.
2062         * WebKit.exp: Modified. Exports WebGeolocationMock.
2063
2064 2009-09-07  Drew Wilson  <atwilson@google.com>
2065
2066         Reviewed by David Levin.
2067
2068         Enable SHARED_WORKERS by default.
2069         https://bugs.webkit.org/show_bug.cgi?id=28959
2070
2071         * Configurations/FeatureDefines.xcconfig:
2072
2073 2009-09-06  Cameron McCormack  <cam@mcc.id.au>
2074
2075         Reviewed by Eric Seidel.
2076
2077         Drop <definition-src> support
2078         https://bugs.webkit.org/show_bug.cgi?id=28991
2079
2080         * MigrateHeaders.make: Remove reference to ObjC definition-src
2081         binding class.
2082
2083 2009-09-04  Mark Mentovai  <mark@chromium.org>
2084
2085         Reviewed by Dave Hyatt.
2086
2087         https://bugs.webkit.org/show_bug.cgi?id=28614
2088
2089         Account for scrollbar state changes that occur during layout.
2090
2091         * WebView/WebDynamicScrollBarsView.mm:
2092         (-[WebDynamicScrollBarsView updateScrollers]):
2093
2094         Perform a layout prior to checking whether the scrollbar modes are
2095         off, on, or automatic.  The modes may change during layout.
2096
2097         * WebView/WebFrameView.mm:
2098         (-[WebFrameView _install]):
2099
2100         Eliminate duplicated (and incorrect) scrollbar mode tracking between
2101         FrameView and ScrollView.
2102
2103 2009-09-03  Dave Hyatt  <hyatt@apple.com>
2104
2105         Reviewed by Adam Roben.
2106
2107         https://bugs.webkit.org/show_bug.cgi?id=28890, make simple user script injection work.
2108         
2109         This patch adds new API for adding and removing user scripts from page groups.  User scripts
2110         are bundled together in isolated worlds (you can have multiple scripts together in the same
2111         world).
2112
2113         Added userscripts/ directory for holding new tests (along with a simple test of script injection).
2114
2115         * WebView/WebView.mm:
2116         (+[WebView _addUserScriptToGroup:source:url:worldID:patterns:injectionTime:]):
2117         (+[WebView _removeUserContentFromGroup:worldID:]):
2118         (+[WebView _removeAllUserContentFromGroup:]):
2119         * WebView/WebViewPrivate.h:
2120
2121 2009-09-04  Adam Barth  <abarth@webkit.org>
2122
2123         Reviewed by Eric Seidel.
2124
2125         https://bugs.webkit.org/show_bug.cgi?id=24696
2126
2127         Plumb mixed content notifications to WebFrameLoadDelegatePrivate.
2128
2129         * WebCoreSupport/WebFrameLoaderClient.mm:
2130         (WebFrameLoaderClient::didDisplayInsecureContent):
2131         (WebFrameLoaderClient::didRunInsecureContent):
2132         * WebView/WebDelegateImplementationCaching.h:
2133         * WebView/WebFrameLoadDelegatePrivate.h: Added.
2134
2135 2009-09-03  Adam Barth  <abarth@webkit.org>
2136
2137         Unreviewed build fix.
2138
2139         Change notImplemented() to a FIXME.
2140
2141         * WebCoreSupport/WebFrameLoaderClient.mm:
2142         (WebFrameLoaderClient::didDisplayInsecureContent):
2143         (WebFrameLoaderClient::didRunInsecureContent):
2144
2145 2009-09-03  Adam Barth  <abarth@webkit.org>
2146
2147         Reviewed by eric@webkit.org.
2148
2149         https://bugs.webkit.org/show_bug.cgi?id=24696
2150
2151         Plumb mixed content notifications to WebFrameLoadDelegatePrivate.
2152
2153         * WebCoreSupport/WebFrameLoaderClient.mm:
2154         (WebFrameLoaderClient::didDisplayInsecureContent):
2155         (WebFrameLoaderClient::didRunInsecureContent):
2156         * WebView/WebDelegateImplementationCaching.h:
2157         * WebView/WebFrameLoadDelegatePrivate.h: Added.
2158
2159 2009-09-03  Adam Barth  <abarth@webkit.org>
2160
2161         Reviewed by Eric Seidel.
2162
2163         https://bugs.webkit.org/show_bug.cgi?id=24696
2164
2165         Stub implementations of mixed content methods of FrameLoaderClient. 
2166
2167         * WebCoreSupport/WebFrameLoaderClient.h:
2168         * WebCoreSupport/WebFrameLoaderClient.mm:
2169         (WebFrameLoaderClient::didDisplayInsecureContent):
2170         (WebFrameLoaderClient::didRunInsecureContent):
2171
2172 2009-09-02  Brady Eidson  <beidson@apple.com>
2173
2174         Reviewed by Darin Adler.
2175
2176         More partial work towards "Page Cache should support pages with Frames"
2177         https://bugs.webkit.org/show_bug.cgi?id=13631
2178
2179         * WebView/WebHTMLView.mm:
2180         (-[WebHTMLView _topHTMLView]): Rework the ASSERT in this method to reflect the
2181           reality of calling this method for pages currently in the PageCache.
2182
2183 2009-08-31  Dimitri Glazkov  <dglazkov@chromium.org>
2184
2185     Reverting http://trac.webkit.org/changeset/47904, because it caused
2186     layout test failure.
2187
2188 2009-08-31  Alexey Proskuryakov  <ap@webkit.org>
2189
2190         Reviewed by Darin Adler.
2191
2192         https://bugs.webkit.org/show_bug.cgi?id=28852
2193         Rename KURL single argument constructor to avoid confusion
2194
2195         * WebView/WebScriptDebugger.mm: (toNSURL): Adapt to the change.
2196
2197 2009-08-31  Mark Mentovai  <mark@chromium.org>
2198
2199         Reviewed by Dave Hyatt.
2200
2201         https://bugs.webkit.org/show_bug.cgi?id=28614
2202
2203         Perform a layout prior to checking whether the scrollbar modes are
2204         off, on, or automatic.  The modes may change during layout.
2205
2206         * WebView/WebDynamicScrollBarsView.mm:
2207         (-[WebDynamicScrollBarsView updateScrollers]):
2208
2209 2009-08-28  Chris Fleizach  <cfleizach@apple.com>
2210
2211         Reviewed by John Sullivan.
2212
2213         update-webkit-localizable-strings script can no longer complete
2214         https://bugs.webkit.org/show_bug.cgi?id=28792
2215
2216         * WebCoreSupport/WebViewFactory.mm:
2217         (-[WebViewFactory AXARIAContentGroupText:]):
2218
2219 2009-08-28  Gustavo Noronha Silva  <gustavo.noronha@collabora.co.uk>
2220
2221         Reviewed by Holger Freyther.
2222
2223         https://bugs.webkit.org/show_bug.cgi?id=25889
2224         [GTK] scrollbar policy for main frame is not implementable
2225
2226         Add empty implementation for new ChromeClient method.
2227
2228         * WebCoreSupport/WebChromeClient.h:
2229         (WebChromeClient::scrollbarsModeDidChange):
2230
2231 2009-08-25  Eric Carlson  <eric.carlson@apple.com>
2232
2233         Reviewed by Oliver Hunt.
2234
2235         <video> and <audio> controller should be accessible
2236         https://bugs.webkit.org/show_bug.cgi?id=28081
2237
2238         * WebCoreSupport/WebViewFactory.mm:
2239         (-[WebViewFactory localizedMediaControlElementString:]):
2240         (-[WebViewFactory localizedMediaControlElementHelpText:]):
2241         (-[WebViewFactory localizedMediaTimeDescription:]):
2242             New.
2243
2244 2009-08-24  Simon Fraser  <simon.fraser@apple.com>
2245
2246         Reviewed by NOBODY (build fix)
2247
2248         Turn off ENABLE_3D_CANVAS in the xconfig files.
2249
2250         * Configurations/FeatureDefines.xcconfig:
2251
2252 2009-08-22  Adam Barth  <abarth@webkit.org>
2253
2254         Revert 47684.  We're going to do this later once clients have had a
2255         chance to opt into the setting they like.
2256
2257         * Misc/WebKitVersionChecks.h:
2258         * WebView/WebPreferences.mm:
2259         (+[WebPreferences initialize]):
2260
2261 2009-08-22  Adam Barth  <abarth@webkit.org>
2262
2263         Reviewed by Eric Seidel.
2264
2265         Don't let local files access web URLs
2266         https://bugs.webkit.org/show_bug.cgi?id=28480
2267
2268         * Misc/WebKitVersionChecks.m:
2269         * WebView/WebPreferences.mm:
2270         (+[WebPreferences initialize]):
2271
2272 2009-08-21  Anders Carlsson  <andersca@apple.com>
2273
2274         Reviewed by Darin Adler.
2275
2276         <rdar://problem/7162480>
2277         Sometimes WebKit does not layout correctly when a WebView is embedded in an HICocoaView
2278         
2279         Add a null check for the current context when reflectScrolledClipView: is called from outside a 
2280         draw operation.
2281         
2282         * WebView/WebDynamicScrollBarsView.mm:
2283         (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
2284
2285 2009-08-20  Chris Fleizach  <cfleizach@apple.com>
2286
2287         Reviewed by Darin Adler.
2288
2289         Enable various "grouping" ARIA roles
2290         https://bugs.webkit.org/show_bug.cgi?id=28486
2291
2292         * WebCoreSupport/WebViewFactory.mm:
2293         (-[WebViewFactory AXARIAContentGroupText:]):
2294
2295 2009-08-19  Mark Rowe  <mrowe@apple.com>
2296
2297         Reviewed by Dan Bernstein.
2298
2299         Fix <http://webkit.org/b/28484> Plug-in-related leaks seen on the build bot
2300
2301         When the plug-in data is being loaded manually there is a reference cycle between the
2302         NetscapePluginInstanceProxy and the HostedNetscapePluginStream.  We need to explicitly
2303         break the reference cycle in NetscapePluginInstanceProxy::cleanup so that both objects
2304         will be destroyed.
2305
2306         Take the opportunity to add RefCountedLeakCounter support to HostedNetscapePluginStream
2307         and NetscapePluginInstanceProxy to simplify tracking down leaks of these objects in the future.
2308
2309         * Plugins/Hosted/HostedNetscapePluginStream.h:
2310         * Plugins/Hosted/HostedNetscapePluginStream.mm:
2311         (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
2312         (WebKit::HostedNetscapePluginStream::~HostedNetscapePluginStream):
2313         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2314         (WebKit::NetscapePluginInstanceProxy::NetscapePluginInstanceProxy):
2315         (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy):
2316         (WebKit::NetscapePluginInstanceProxy::cleanup): Clear m_manualStream to break the reference
2317         cycle.
2318
2319 2009-08-19  Aaron Boodman  <aa@chromium.org>
2320
2321         Reviewed by David Levin.
2322
2323         https://bugs.webkit.org/show_bug.cgi?id=24853: Provide a way for WebKit clients to
2324         specify a more granular policy for cross-origin XHR access.
2325
2326         * WebView/WebView.mm: Add SPI to manipulate origin access whitelists.
2327         (+[WebView _whiteListAccessFromOrigin:destinationProtocol:destinationHost:allowDestinationSubdomains:]): Ditto.
2328         (+[WebView _resetOriginAccessWhiteLists]): Ditto.
2329         * WebView/WebViewPrivate.h: Ditto.
2330
2331 2009-08-18  Anders Carlsson  <andersca@apple.com>
2332
2333         Reviewed by Adele Peterson.
2334
2335         Mac specific part of
2336         
2337         <rdar://problem/7135588> HTMLMediaElement should ask WebPolicyLoadDelegate before loading resource
2338
2339         * WebCoreSupport/WebFrameLoaderClient.h:
2340         * WebCoreSupport/WebFrameLoaderClient.mm:
2341         Implement shouldLoadMediaElementURL by asking the policy delegate.
2342         
2343         * WebView/WebPolicyDelegatePrivate.h:
2344         Add new delegate method, remove some unused cruft.
2345
2346 2009-08-18  Drew Wilson  <atwilson@google.com>
2347
2348         Reviewed by Eric Seidel.
2349
2350         Need to extend DumpRenderTree to expose number of worker threads.
2351         https://bugs.webkit.org/show_bug.cgi?id=28292
2352
2353         * WebKit.exp:
2354         Exported WebWorkersPrivate so DumpRenderTree can access it.
2355         * Workers/WebWorkersPrivate.h: Added.
2356         * Workers/WebWorkersPrivate.mm: Added.
2357         (+[WebWorkersPrivate workerThreadCount]):
2358         Added WebWorkersPrivate::workerThreadCount() API for DumpRenderTree.
2359
2360 2009-08-17  Darin Adler  <darin@apple.com>
2361
2362         Reviewed by Sam Weinig.
2363
2364         Use a HashMap instead of a list of if statements for the command
2365         name exception map.
2366
2367         * WebView/WebHTMLView.mm:
2368         (createSelectorExceptionMap): Added.
2369         (commandNameForSelector): Use createSelectorExceptionMap.
2370
2371 2009-08-16  David Kilzer  <ddkilzer@apple.com>
2372
2373         <http://webkit.org/b/28366> WebHTMLViewInternal.h: add @class CALayer declaration
2374
2375         Reviewed by Simon Fraser.
2376
2377         Without WebKitPrefix.h, the missing @class CALayer declaration
2378         causes a compile-time error.
2379
2380         * WebView/WebHTMLViewInternal.h: Added @class CALayer
2381         declaration with USE(ACCELERATED_COMPOSITING).
2382
2383 2009-08-16  David Kilzer  <ddkilzer@apple.com>
2384
2385         <http://webkit.org/b/28355> Replace MAX()/MIN() macros with type-safe std::max()/min() templates
2386
2387         Reviewed by Dan Bernstein.
2388
2389         * Plugins/WebBaseNetscapePluginStream.mm: Added using std::min
2390         statement.
2391         (WebNetscapePluginStream::deliverData): Changed MIN() to min().
2392         Changed C-style cast to a static_cast.
2393         * Plugins/WebNetscapePluginView.mm: Added using std::min
2394         statement.
2395         (-[WebNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]):
2396         Changed MIN() to min().  Changed C-style cast to a static_cast.
2397         * WebView/WebHTMLView.mm: Added using std::max statement.
2398         (-[WebHTMLView _dragImageForURL:withLabel:]): Changed MAX() to
2399         max().
2400         (-[WebHTMLView _scaleFactorForPrintOperation:]): Ditto.
2401         * WebView/WebTextCompletionController.mm: Added using std::max
2402         and using std::min statements.
2403         (-[WebTextCompletionController _placePopupWindow:]): Changed
2404         type of maxWidth variable from float to CGFloat to prevent a
2405         type mismatch on x86_64.  Changed MAX() to max() and MIN() to
2406         min().  Added static_cast for a constant value since CGFloat is
2407         defined as a float on i386 and as a double on x86_64.
2408
2409 2009-08-15  Adam Bergkvist  <adam.bergkvist@ericsson.com>
2410
2411         Reviewed by Sam Weinig.
2412
2413         Added ENABLE_EVENTSOURCE flag.
2414         https://bugs.webkit.org/show_bug.cgi?id=14997
2415
2416         * Configurations/FeatureDefines.xcconfig:
2417
2418 2009-08-14  Mark Rowe  <mrowe@apple.com>
2419
2420         Build fix.
2421
2422         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2423         (WebKit::NetscapePluginInstanceProxy::enumerate):  Add the necessary .get() calls.
2424
2425 2009-08-14  Brady Eidson  <beidson@apple.com>
2426
2427         Reviewed by Anders Carlsson.
2428
2429         <rdar://problem/7091546> - Assertion failure in plugins/return-error-from-new-stream-doesnt-invoke-destroy-stream.html 
2430         on 64-bit SnowLeopard
2431
2432         * Plugins/Hosted/HostedNetscapePluginStream.mm:
2433         (WebKit::HostedNetscapePluginStream::cancelLoad): Since this might be called while the FrameLoader is switching DocumentLoaders
2434           during the brief moment where there is no activeDocumentLoader(), accept and handle a validly null DocumentLoader.
2435
2436 2009-08-14  Mark Rowe  <mrowe@apple.com>
2437
2438         Reviewed by Brady Eidson.
2439
2440         Fix leaks of NSNumber and NSMutableArray objects seen during layout tests.
2441
2442         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2443         (WebKit::NetscapePluginInstanceProxy::enumerate): Don't leak an NSMutableArray that we allocate.
2444
2445 2009-08-14  Mark Rowe  <mrowe@apple.com>
2446
2447         Reviewed by Anders Carlsson.
2448
2449         Fix leaks of HostedNetscapePluginStream and NetscapePlugInStreamLoader objects seen during layout tests.
2450
2451         * Plugins/Hosted/HostedNetscapePluginStream.mm:
2452         (WebKit::HostedNetscapePluginStream::didFail): Disconnect the stream from the plug-in instance proxy
2453         when the load fails.
2454
2455 2009-08-13  Darin Adler  <darin@apple.com>
2456
2457         * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Updated includes.
2458         * WebView/WebScriptDebugger.mm: Ditto.
2459
2460 2009-08-12  Mark Rowe  <mrowe@apple.com>
2461
2462         Reviewed by Kevin Decker.
2463
2464         <rdar://problem/6017913> Replace use of HISearchWindowShow in -[WebView _searchWithSpotlightFromMenu].
2465
2466         * WebView/WebView.mm:
2467         (-[WebView _searchWithSpotlightFromMenu:]): Use -[NSWorkspace showSearchResultsForQueryString:] post-Leopard.
2468
2469 2009-08-12  Greg Bolsinga  <bolsinga@apple.com>
2470
2471         Reviewed by Eric Seidel.
2472
2473         Add delegate methods about focus and blur and state change
2474         https://bugs.webkit.org/show_bug.cgi?id=27153
2475         
2476         Have ObjC delegate methods match C++ method names in the ChromeClient.
2477
2478         * WebCoreSupport/WebChromeClient.mm:
2479         (WebChromeClient::formDidFocus):
2480         (WebChromeClient::formDidBlur):
2481         * WebView/WebUIDelegatePrivate.h:
2482
2483 2009-08-11  John Gregg  <johnnyg@google.com>
2484
2485         Reviewed by Maciej Stachowiak.
2486
2487         Desktop Notifications API
2488         https://bugs.webkit.org/show_bug.cgi?id=25643
2489
2490         Adds ENABLE_NOTIFICATION flag.
2491
2492         * Configurations/FeatureDefines.xcconfig:
2493
2494 2009-08-11  Anders Carlsson  <andersca@apple.com>
2495
2496         Reviewed by Sam Weinig.
2497
2498         Remove dead declarations.
2499         
2500         * WebView/WebViewInternal.h:
2501
2502 2009-08-11  Dmitry Titov  <dimich@chromium.org>
2503
2504         Reviewed by Adam Roben.
2505
2506         Originally implemented by Glenn Wilson <gwilson@chromium.org>.
2507
2508         Added new methods for overriding default WebPreference values
2509         and for resetting preferences to their defaults.
2510         See https://bugs.webkit.org/show_bug.cgi?id=20534
2511
2512         * WebView/WebPreferences.mm:
2513         (-[WebPreferences _setPreferenceForTestWithValue:withKey:]): added.
2514         * WebView/WebPreferencesPrivate.h: same.
2515
2516 2009-08-09  Nikolas Zimmermann  <nikolas.zimmermann@torchmobile.com>
2517
2518         Reviewed by George Staikos.
2519
2520         [WML] Deck access control is completly broken
2521         https://bugs.webkit.org/show_bug.cgi?id=27721
2522
2523         Synchronize WebFrameLoadType with FrameLoadType enum. Append 'WebFrameLoadTypeBackWMLDeckNotAccessible'.
2524
2525         * WebView/WebFramePrivate.h:
2526
2527 2009-08-07  Simon Fraser  <simon.fraser@apple.com>
2528
2529         Fix the build on 10.6.
2530
2531         * WebView/WebHTMLView.mm:
2532         (-[WebHTMLView attachRootLayer:]):
2533
2534 2009-08-07  Simon Fraser  <simon.fraser@apple.com>
2535
2536         Fix a stylistic nit related to the location of the *, which, for some
2537         ridiculous reason, WebKit style dictates to be different between Objective-C and C++.
2538         
2539         * WebView/WebDynamicScrollBarsView.mm:
2540         (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
2541
2542 2009-08-07  Simon Fraser  <simon.fraser@apple.com>
2543
2544         Reviewed by Dan Bernstein.
2545
2546         Work around an issue on Leopard where composited layers are misplaced and squished when the page
2547         gets over 4096px tall.
2548         https://bugs.webkit.org/show_bug.cgi?id=27272
2549         <rdar://problem/7067892> [Leopard] Composisted layers are misplaced and squished on on long pages
2550         <rdar://problem/7068252> [Leopard] When switching to a tab with HW layers, they fade in
2551
2552         * WebView/WebDynamicScrollBarsView.mm:
2553         (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
2554         Call -_updateLayerHostingViewPosition after scrolling.
2555         
2556         * WebView/WebHTMLView.mm:
2557         (-[WebHTMLView _frameOrBoundsChanged]):
2558         Call -_updateLayerHostingViewPosition after the view changes size.
2559
2560         (-[WebHTMLView attachRootLayer:]):
2561         Turn off default animations, to avoid animations of sublayer transform, and fading-in
2562         when tab switching.
2563         
2564         * WebView/WebHTMLViewInternal.h:
2565         (-[WebHTMLView _updateLayerHostingViewPosition]):
2566         New method that constrains the height of the layer-hosting view to a max height
2567         of 4096px, and compensates for the height restriction by placing the layer-hosting
2568         view at the top of the visible part of the WebHTMLView, and adjusting the position
2569         of the hosted layers via sublayer transform.
2570
2571 2009-08-07  Anders Carlsson  <andersca@apple.com>
2572
2573         Fix Tiger build.
2574         
2575         * WebView/WebRenderNode.mm:
2576         (-[WebRenderNode _initWithCoreFrame:]):
2577
2578 2009-08-07  Anders Carlsson  <andersca@apple.com>
2579
2580         Reviewed by Timothy Hatcher and Sam Weinig.
2581
2582         Change WebRenderNode to take a WebFrame instead of a WebFrameView.
2583         
2584         * WebView/WebRenderNode.h:
2585         * WebView/WebRenderNode.mm:
2586         (-[WebRenderNode _initWithName:position:rect:coreFrame:children:]):
2587         (copyRenderNode):
2588         (-[WebRenderNode _initWithCoreFrame:]):
2589         (-[WebRenderNode initWithWebFrame:]):
2590
2591 2009-08-06  Anders Carlsson  <andersca@apple.com>
2592
2593         Reviewed by Darin Adler and Dan Bernstein.
2594
2595         * WebCoreSupport/WebFrameLoaderClient.mm:
2596         (WebFrameLoaderClient::hasHTMLView):
2597         Always return true when we're in viewless mode.
2598
2599 2009-08-06  Anders Carlsson  <andersca@apple.com>
2600
2601         Remove WebGraphicsExtras.h include.
2602         
2603         * Plugins/WebNetscapePluginView.mm:
2604
2605 2009-08-06  Anders Carlsson  <andersca@apple.com>
2606
2607         Reviewed by Sam Weinig.
2608
2609         Remove WebGraphicsExtras, it is no longer used.
2610
2611         * Misc/WebGraphicsExtras.c: Removed.
2612         * Misc/WebGraphicsExtras.h: Removed.
2613
2614 2009-08-06  Chris Marrin  <cmarrin@apple.com>
2615
2616         Reviewed by David Hyatt.
2617
2618         Added ENABLE_3D_CANVAS flag to build, default to off
2619
2620         * Configurations/FeatureDefines.xcconfig:
2621
2622 2009-08-04  Michael Nordman  <michaeln@google.com>
2623
2624         Reviewed by Alexey Proskuryakov.
2625
2626         https://bugs.webkit.org/show_bug.cgi?id=27821
2627
2628         Mods to keep up with ApplicationCacheHost refactoring.
2629
2630         * WebView/WebDataSource.mm:
2631         (-[WebDataSource _transferApplicationCache:]):
2632
2633 2009-07-30  Darin Adler  <darin@apple.com>
2634
2635         Reviewed by David Levin.
2636
2637         Use checked casts for render tree
2638         https://bugs.webkit.org/show_bug.cgi?id=23522
2639
2640         * Misc/WebNSAttributedStringExtras.mm:
2641         (fileWrapperForElement):
2642         * Misc/WebNSPasteboardExtras.mm:
2643         (imageFromElement):
2644         (-[NSPasteboard _web_declareAndWriteDragImageForElement:URL:title:archive:source:]):
2645         * WebView/WebFrame.mm:
2646         (-[WebFrame _computePageRectsWithPrintWidthScaleFactor:printHeight:]):
2647         (-[WebFrame _accessibilityTree]):
2648         * WebView/WebRenderNode.mm:
2649         (copyRenderNode):
2650         Use checked casts.
2651
2652 2009-07-31  Simon Fraser  <simon.fraser@apple.com>
2653
2654         Reviewed by Anders Carlsson.
2655         
2656         Accelerated animations stutter on pages with lots of animations and 3d transforms
2657         https://bugs.webkit.org/show_bug.cgi?id=27884
2658         
2659         This patch changes the strategy for synchronizing painting view the view,
2660         and compositing layer updates. Previously the strategy was to disable screen
2661         updates between the time we updated the layer tree, and painted the view. That
2662         left screen updates disabled for too long (hundreds of milliseconds) in some
2663         cases, causing animation stutter.
2664         
2665         The new strategy is to batch up changes to the CA layer tree, and commit them
2666         all at once just before painting happens (referred to as a "sync" in the code).
2667         GraphicsLayerCA now keeps a bitmask of changed properties, and then migrates
2668         the values stored in GraphicsLayer into the CA layer tree at commit time.
2669         
2670         Compositing layers are then synced in FrameView::paintContents(). However, not
2671         all style/layout changes will result in painting; to deal with style changes that
2672         touch only compositing properties, we set up a runloop observer that takes care
2673         of comitting layer changes when no painting happens.
2674
2675         * WebCoreSupport/WebChromeClient.h:
2676         * WebCoreSupport/WebChromeClient.mm:
2677         (WebChromeClient::scheduleCompositingLayerSync):
2678         scheduleViewUpdate() renamed to syncCompositingStateRecursive()
2679         
2680         * WebView/WebView.mm:
2681         (-[WebView _close]):
2682         (-[WebView _clearLayerSyncLoopObserver]):
2683         "viewUpdateRunLoopObserver" is now "layerSyncLoopObserver".
2684
2685         (-[WebView _syncCompositingChanges]):
2686         Helper method that calls syncCompositingStateRecursive() on the FrameView.
2687         
2688         (layerSyncRunLoopObserverCallBack):
2689         (-[WebView _scheduleCompositingLayerSync]):
2690         This is all about layer sycning now. Also, the run loop observer is repeating,
2691         because it has to keep firing until syncCompositingStateRecursive() says that it
2692         has completed.
2693         
2694         * WebView/WebViewData.h:
2695         "viewUpdateRunLoopObserver" is now "layerSyncLoopObserver".
2696
2697         * WebView/WebViewInternal.h:
2698         _scheduleViewUpdate is now _scheduleCompositingLayerSync
2699
2700 2009-07-30  Michael Nordman  <michaeln@google.com>
2701
2702         Reviewed by Darin Fisher.
2703
2704         https://bugs.webkit.org/show_bug.cgi?id=27821
2705
2706         Mods to keep up with ApplicationCacheHost refactoring.
2707
2708         * WebView/WebDataSource.mm:
2709         (-[WebDataSource _transferApplicationCache:]):
2710
2711 2009-07-29  David Kilzer  <ddkilzer@apple.com>
2712
2713         <http://webkit.org/b/27788> Don't export WebPluginController.h as a private header
2714
2715         Reviewed by Mark Rowe.
2716
2717         * Plugins/WebPluginController.h: Changed #import of
2718         WebPluginContainerCheck.h to use a framework-style include in
2719         case other platforms wish to export WebPluginController.h as a
2720         private header.
2721
2722 2009-07-29  Kevin McCullough  <kmccullough@apple.com>
2723
2724         Reviewed by Darin Adler.
2725
2726         Added foundation work to allow a testing infrastructure for the Web
2727         Inspector.
2728
2729         * WebCoreSupport/WebInspectorClient.h:
2730         * WebCoreSupport/WebInspectorClient.mm:
2731         (WebInspectorClient::inspectorWindowObjectCleared): Send the delegate
2732         callback.
2733         * WebView/WebDelegateImplementationCaching.h:
2734         * WebView/WebView.mm:
2735         (-[WebView _cacheFrameLoadDelegateImplementations]):
2736         * WebView/WebViewPrivate.h: The delegate SPI.
2737
2738 2009-07-27  Mark Rowe  <mrowe@apple.com>
2739
2740         Reviewed by Darin Adler.
2741
2742         <rdar://problem/7091036> REGRESSION: Microsoft Messenger crashes during file send/receive due to use of WebKit on non-main thread
2743
2744         In some situations Microsoft Messenger can attempt to manipulate the DOM from a secondary thread while
2745         updating its file transfer progress bar.  This results in corruption of WebCore data structures that is
2746         quickly followed by a crash.  We can work around this by having -[WebFrame DOMDocument] return nil when
2747         called from a secondary thread by Microsoft Messenger, which has the effect of turning its attempts at
2748         DOM manipulation in to no-ops.
2749
2750         * WebView/WebFrame.mm:
2751         (needsMicrosoftMessengerDOMDocumentWorkaround):
2752         (-[WebFrame DOMDocument]):
2753
2754 2009-07-27  Alexey Proskuryakov  <ap@webkit.org>
2755
2756         Reviewed by Darin Adler.
2757
2758         https://bugs.webkit.org/show_bug.cgi?id=27735
2759         Give a helpful name to JSLock constructor argument
2760
2761         * Misc/WebCoreStatistics.mm:
2762         (+[WebCoreStatistics javaScriptObjectsCount]):
2763         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
2764         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
2765         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
2766         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
2767         (+[WebCoreStatistics shouldPrintExceptions]):
2768         (+[WebCoreStatistics setShouldPrintExceptions:]):
2769         (+[WebCoreStatistics memoryStatistics]):
2770         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
2771         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2772         (WebKit::NetscapePluginInstanceProxy::evaluate):
2773         (WebKit::NetscapePluginInstanceProxy::invoke):
2774         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
2775         (WebKit::NetscapePluginInstanceProxy::construct):
2776         (WebKit::NetscapePluginInstanceProxy::getProperty):
2777         (WebKit::NetscapePluginInstanceProxy::setProperty):
2778         (WebKit::NetscapePluginInstanceProxy::removeProperty):
2779         (WebKit::NetscapePluginInstanceProxy::hasMethod):
2780         (WebKit::NetscapePluginInstanceProxy::enumerate):
2781         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
2782         * Plugins/WebBaseNetscapePluginStream.mm:
2783         (WebNetscapePluginStream::wantsAllStreams):
2784         * Plugins/WebNetscapePluginView.mm:
2785         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
2786         (-[WebNetscapePluginView setWindowIfNecessary]):
2787         (-[WebNetscapePluginView createPluginScriptableObject]):
2788         (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
2789         (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
2790         (-[WebNetscapePluginView loadPluginRequest:]):
2791         (-[WebNetscapePluginView _printedPluginBitmap]):
2792         * Plugins/WebPluginController.mm:
2793         (+[WebPluginController plugInViewWithArguments:fromPluginPackage:]):
2794         (-[WebPluginController startAllPlugins]):
2795         (-[WebPluginController stopAllPlugins]):
2796         (-[WebPluginController addPlugin:]):
2797         (-[WebPluginController destroyPlugin:]):
2798         (-[WebPluginController destroyAllPlugins]):
2799         * WebView/WebFrame.mm:
2800         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
2801         * WebView/WebScriptDebugDelegate.mm:
2802         (-[WebScriptCallFrame scopeChain]):
2803         (-[WebScriptCallFrame evaluateWebScript:]):
2804         * WebView/WebView.mm:
2805         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
2806
2807 2009-07-24  Darin Adler  <darin@apple.com>
2808
2809         Reviewed by Mark Rowe.
2810
2811         REGRESSION (r46298): Exception after clicking on Bookmarks button in the Bookmarks Bar
2812         https://bugs.webkit.org/show_bug.cgi?id=27667
2813
2814         * WebCoreSupport/WebFrameLoaderClient.mm:
2815         (WebFrameLoaderClient::transitionToCommittedForNewPage): Moved the code to set the
2816         title here. This is late enough that both the view and representation exist.
2817
2818         * WebView/WebDataSource.mm:
2819         (-[WebDataSource _makeRepresentation]): Removed the code to set the title from here.
2820         It's a bit too early.
2821
2822 2009-07-24  Andrei Popescu  <andreip@google.com>
2823
2824         Reviewed by Anders Carlsson.
2825
2826         ApplicationCache should have size limit
2827         https://bugs.webkit.org/show_bug.cgi?id=22700
2828
2829         Adds the WebApplicationCache class that is
2830         used by the DumpRenderTree test application to
2831         configure the Application Cache maximum size.
2832
2833         * WebCoreSupport/WebApplicationCache.h: Added.
2834         * WebCoreSupport/WebApplicationCache.mm: Added.
2835         * WebCoreSupport/WebChromeClient.h:
2836         * WebCoreSupport/WebChromeClient.mm:
2837         (WebChromeClient::reachedMaxAppCacheSize):
2838         Adds empty implementation of the reachedMaxAppCacheSize callback.
2839         * WebKit.exp:
2840
2841 2009-07-23  Darin Adler  <darin@apple.com>
2842
2843         * WebView/WebDataSource.mm:
2844         (-[WebDataSource _makeRepresentation]): Landed a comment I forgot last time.
2845
2846 2009-07-23  Darin Adler  <darin@apple.com>
2847
2848         Reviewed by Brady Eidson.
2849
2850         URL appears in back/forward button menu instead of title for items with custom representation
2851         https://bugs.webkit.org/show_bug.cgi?id=27586
2852         rdar://problem/5060337
2853
2854         The problem is that DocumentLoader expects to store a title, but for custom representations
2855         it is never passed to the document loader.
2856
2857         * WebView/WebDataSource.mm:
2858         (-[WebDataSource _makeRepresentation]): Added a call to DocumentLoader::setTitle.
2859         Works as long as the title does not change during the document's lifetime, which
2860         is good enough for the simple cases in Safari.
2861
2862 2009-07-20  Darin Adler  <darin@apple.com>
2863
2864         Reviewed by Dan Bernstein.
2865
2866         REGRESSION (r39185): Safari adds ".jpeg" extension to images that already have ".JPG" extension
2867         https://bugs.webkit.org/show_bug.cgi?id=27472
2868
2869         * WebView/WebHTMLView.mm:
2870         (matchesExtensionOrEquivalent): Changed category method into a C function.
2871         Made it require the leading dot when checking for the extension and do it
2872         in a non-case-sensitive way.
2873         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]): Changed to call
2874         the function.
2875
2876 2009-07-21  Roland Steiner  <rolandsteiner@google.com>
2877
2878         Reviewed by David Levin.
2879
2880         Add ENABLE_RUBY to list of build options
2881         https://bugs.webkit.org/show_bug.cgi?id=27324
2882
2883         * Configurations/FeatureDefines.xcconfig: Added flag ENABLE_RUBY.
2884
2885 2009-07-17  Brian Weinstein  <bweinstein@apple.com>
2886
2887         Reviewed by Adam Roben.
2888
2889         Fix of <rdar://problem/5712795> Win: Cannot change the height of the docked Web Inspector (14272)
2890         https://bugs.webkit.org/show_bug.cgi?id=14272
2891         
2892         Removed size calculation code from [WebInspectorWindowController setInitialAttachedHeight] into
2893         InspectorController.cpp to make it cross platform, and use InspectorController to store the 
2894         user's preferred size for an attached window, instead of NSUserDefaults.
2895
2896         * WebCoreSupport/WebInspectorClient.mm:
2897         (-[WebInspectorWindowController showWindow:]):
2898         (-[WebInspectorWindowController setAttachedWindowHeight:]):
2899
2900 2009-07-16  Fumitoshi Ukai  <ukai@chromium.org>
2901
2902         Reviewed by David Levin.
2903
2904         Add --web-sockets flag and ENABLE_WEB_SOCKETS define.
2905         https://bugs.webkit.org/show_bug.cgi?id=27206
2906         
2907         Add ENABLE_WEB_SOCKETS
2908
2909         * Configurations/FeatureDefines.xcconfig: add ENABLE_WEB_SOCKETS
2910
2911 2009-07-16  Xiaomei Ji  <xji@chromium.org>
2912
2913         Reviewed by Darin Adler.
2914
2915         Fix tooltip does not get its directionality from its element's directionality.
2916         https://bugs.webkit.org/show_bug.cgi?id=24187
2917
2918         Per mitz's suggestion in comment #6, while getting the plain-text 
2919         title, we also get the directionality of the title. How to handle 
2920         the directionality is up to clients. Clients could ignore it, 
2921         or use attribute or unicode control characters to display the title
2922         as what they want.
2923
2924         * Misc/WebElementDictionary.mm:
2925         (-[WebElementDictionary _spellingToolTip]): Change spellingToolTip caller due to signature change.
2926         (-[WebElementDictionary _title]): Change title caller due to signature change.
2927         * WebCoreSupport/WebChromeClient.h: Add directionality as 2nd parameter to setToolTip().
2928         * WebCoreSupport/WebChromeClient.mm:
2929         (WebChromeClient::setToolTip): Add directionality as 2nd parameter to setToopTip() (without handling it yet).
2930
2931 2009-07-15  Darin Adler  <darin@apple.com>
2932
2933         Reviewed by Sam Weinig.
2934
2935         Renamed parseURL to deprecatedParseURL.
2936
2937         * DOM/WebDOMOperations.mm:
2938         (-[DOMDocument URLWithAttributeString:]): Renamed.
2939         * WebCoreSupport/WebFrameLoaderClient.mm:
2940         (WebFrameLoaderClient::createPlugin): Renamed.
2941
2942 2009-07-15  Brady Eidson  <beidson@apple.com>
2943
2944         Reviewed by Dan Bernstein.
2945
2946         https://bugs.webkit.org/show_bug.cgi?id=27304
2947         WebKit should provide usage and eligibility information about the page cache.
2948
2949         * Misc/WebCoreStatistics.h:
2950         * Misc/WebCoreStatistics.mm:
2951         (+[WebCoreStatistics numberCachedPages]):
2952         (+[WebCoreStatistics numberCachedFrames]):
2953         (+[WebCoreStatistics numberAutoreleasedPages]):
2954         * WebKit.exp:
2955
2956         * WebView/WebFrame.mm:
2957         (-[WebFrame _cacheabilityDictionary]): Returns a dictionary with all the data about
2958           why the frame is not cacheable. If the frame *is* cacheable, the dictionary is
2959           empty.
2960         * WebView/WebFramePrivate.h:
2961
2962 2009-07-13  Simon Fraser  <simon.fraser@apple.com>
2963
2964         Reviewed by Dan Bernstein, Adam Roben.
2965
2966         "Unrecognized selector" console log when the Safari 4 Welcome page navigates to Top Sites.
2967         <rdar://problem/6994893
2968
2969         attachRootGraphicsLayer() should not assume that the frameView's documentView
2970         is a WebHTMLView.
2971         
2972         * WebCoreSupport/WebChromeClient.mm:
2973         (WebChromeClient::attachRootGraphicsLayer):
2974
2975 2009-07-13  Anders Carlsson  <andersca@apple.com>
2976
2977         Reviewed by Darin Adler and Kevin Decker.
2978
2979         <rdar://problem/7053687> Core Animation plug-ins continue to grow larger and larger when opening new tabs (32 bit-only)
2980
2981         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
2982         (-[WebHostedNetscapePluginView setLayer:]):
2983         Add a FIXME.
2984         
2985         * Plugins/WebNetscapePluginView.mm:
2986         (-[WebNetscapePluginView setLayer:]):
2987         Make sure to set the size of the layer before changing the autoresizing mask so it won't grow everytime it's inserted
2988         into the layer tree.
2989
2990 2009-07-13  Greg Bolsinga  <bolsinga@apple.com>
2991
2992         Reviewed by Simon Fraser.
2993
2994         Correct these delegate methods' declarations by adding parameter names.
2995
2996         * WebView/WebUIDelegatePrivate.h:
2997
2998 2009-07-13  Drew Wilson  <atwilson@google.com>
2999
3000         Reviewed by David Levin.
3001
3002         Add ENABLE(SHARED_WORKERS) flag and define SharedWorker APIs
3003         https://bugs.webkit.org/show_bug.cgi?id=26932
3004
3005         Added ENABLE(SHARED_WORKERS) flag (disabled by default).
3006
3007         * Configurations/FeatureDefines.xcconfig:
3008
3009 2009-07-12  Keishi Hattori  <casey.hattori@gmail.com>
3010
3011         Reviewed by Timothy Hatcher.
3012
3013         Refactor ConsoleMessage to add MessageType attribute.
3014         https://bugs.webkit.org/show_bug.cgi?id=20625
3015
3016         * WebCoreSupport/WebChromeClient.h:
3017         * WebCoreSupport/WebChromeClient.mm:
3018         (WebChromeClient::addMessageToConsole):
3019
3020 2009-07-11  Simon Fraser  <simon.fraser@apple.com>
3021
3022         Enable support for accelerated compositing and 3d transforms on Leopard.
3023         <https://bugs.webkit.org/show_bug.cgi?id=20166>
3024         <rdar://problem/6120614>
3025
3026         Reviewed by Oliver Hunt.
3027
3028         * Configurations/FeatureDefines.xcconfig:
3029
3030 2009-07-10  David Kilzer  <ddkilzer@apple.com>
3031
3032         Bug 27007: Build fixes when ICONDATABASE is disabled
3033
3034         <https://bugs.webkit.org/show_bug.cgi?id=27007>
3035
3036         Reviewed by Sam Weinig.
3037
3038         * Misc/WebIconDatabase.mm:
3039         (defaultClient): Return 0 if ICONDATABASE is disabled.
3040         * WebCoreSupport/WebFrameLoaderClient.mm:
3041         (WebFrameLoaderClient::dispatchDidReceiveIcon): Commented out
3042         the body of the method if ICONDATABASE is disabled.
3043         (WebFrameLoaderClient::registerForIconNotification): Ditto.
3044         * WebCoreSupport/WebIconDatabaseClient.mm: Added #if
3045         ENABLE(ICONDATABASE)/#endif guard to source.
3046         * WebView/WebView.mm:
3047         (-[WebView setFrameLoadDelegate:]): Wrapped code that starts the
3048         icon database machinery in #if ENABLE(ICONDATABASE)/#endif.
3049         (-[WebView _registerForIconNotification:]): Wrapped method in
3050         #if ENABLE(ICONDATABASE)/#endif guard.
3051         (-[WebView _dispatchDidReceiveIconFromWebFrame:]): Ditto.
3052         * WebView/WebViewInternal.h: Wrapped methods in #if
3053         ENABLE(ICONDATABASE)/#endif guard.
3054         (-[WebView _registerForIconNotification:]):
3055         (-[WebView _dispatchDidReceiveIconFromWebFrame:]):
3056
3057 2009-07-10  Simon Fraser  <simon.fraser@apple.com>
3058
3059         Reviewed by John Sullivan.
3060
3061         Flashing as hardware layers are created and destroyed in some content
3062         <rdar://problem/7032246>
3063         
3064         There's a window of time between the end of one runloop cycle, after CA layers changes
3065         have been committed, and the window display at the start of the next cycle when 
3066         CA may push updates to the screen before AppKit has drawn the view contents. If
3067         we know that we need to do drawing synchronization (which we do when content moves
3068         between a layer and the view), then we need to call -disableScreenUpdatesUntilFlush
3069         from the existing runloop observer that is set up when layers need repainting to
3070         ensure that layer updates don't reach the screen before view-based painting does.
3071
3072         * WebView/WebHTMLView.mm:
3073         (-[WebHTMLView drawRect:]):
3074         Tweak the comments
3075         
3076         * WebView/WebView.mm:
3077         (viewUpdateRunLoopObserverCallBack):
3078         (-[WebView _scheduleViewUpdate]):
3079         Add a big comment to explain the timing of things.
3080         Call -disableScreenUpdatesUntilFlush when the view _needsOneShotDrawingSynchronization.
3081
3082  2009-07-09  Brian Weinstein  <bweinstein@apple.com>
3083  
3084          Reviewed by Tim Hatcher.
3085 2009-07-10  Adam Barth  <abarth@webkit.org>
3086
3087         Reviewed by Sam Weinig with the power of Grayskull.
3088
3089         Enable XSSAuditor by default.
3090
3091         * WebView/WebPreferences.mm:
3092         (+[WebPreferences initialize]):
3093
3094 2009-07-10  Greg Bolsinga  <bolsinga@apple.com>
3095
3096         Reviewed by Antti Koivisto.
3097
3098         Add delegate methods about focus and blur and state change
3099         https://bugs.webkit.org/show_bug.cgi?id=27153
3100
3101         Call the appropriate private delegate methods from the ChromeClient.
3102         
3103         * WebCoreSupport/WebChromeClient.h:
3104         * WebCoreSupport/WebChromeClient.mm:
3105         (WebChromeClient::formStateDidChange):
3106         (WebChromeClient::formDidFocus):
3107         (WebChromeClient::formDidBlur):
3108         * WebView/WebUIDelegatePrivate.h:
3109
3110 2009-07-09  Brian Weinstein  <bweinstein@apple.com>
3111
3112         Reviewed by Tim Hatcher.
3113
3114         https://bugs.webkit.org/show_bug.cgi?id=27141
3115         
3116         Updated WebInspectorClient to use Web Inspector Preferences to remember whether or not it should be 
3117         docked or a free window instead of NSUserDefaults it used to have.
3118
3119         * WebCoreSupport/WebInspectorClient.mm:
3120         (-[WebInspectorWindowController init]):
3121         (-[WebInspectorWindowController showWindow:]):
3122         (-[WebInspectorWindowController attach]):
3123         (-[WebInspectorWindowController detach]):
3124
3125 2009-07-09  Drew Wilson  <atwilson@google.com>
3126
3127         Reviewed by Alexey Proskuryakov.
3128
3129         https://bugs.webkit.org/show_bug.cgi?id=26903
3130
3131         Turned on CHANNEL_MESSAGING by default because the MessageChannel API
3132         can now be implemented for Web Workers and is reasonably stable.
3133
3134         * Configurations/FeatureDefines.xcconfig:
3135
3136 2009-07-09  Darin Adler  <darin@apple.com>
3137
3138         Reviewed by Adele Peterson and Dan Bernstein.
3139
3140         <rdar://problem/7024972> Cannot set font to Helvetica Neue Light in Mail compose window
3141
3142         No regression test because this only affects the font panel.
3143
3144         * WebView/WebHTMLView.mm:
3145         (-[WebHTMLView _addToStyle:fontA:fontB:]): Fix code that detects whether the font would
3146         survive a round trip by using the weight corresponding to "bold" or "normal" rather than
3147         the actual weight number.
3148
3149 2009-07-09  Beth Dakin and Jon Honeycutt <bdakin@apple.com>
3150
3151         Reviewed by Dave Hyatt.
3152
3153         Make Widget RefCounted to fix:
3154
3155         <rdar://problem/7038831> REGRESSION (TOT): In Mail, a crash occurs 
3156         at WebCore::Widget::afterMouseDown() after clicking To Do's close 
3157         box
3158         <rdar://problem/6978804> WER #16: Repro Access Violation in 
3159         WebCore::PluginView::bindingInstance (1310178023)
3160         -and-
3161         <rdar://problem/6991251> WER #13: Crash in WebKit!
3162         WebCore::PluginView::performRequest+203 (1311461169) 
3163
3164         * WebCoreSupport/WebFrameLoaderClient.h:
3165         * WebCoreSupport/WebFrameLoaderClient.mm:
3166         (WebFrameLoaderClient::createPlugin):
3167
3168 2009-07-09  Sam Weinig  <sam@webkit.org>
3169
3170         Reviewed by Steve Falkenburg.
3171
3172         Roll out r43848. The quirk is no longer necessary.
3173
3174         * WebView/WebView.mm:
3175         (-[WebView WebCore::_userAgentForURL:WebCore::]):
3176
3177 2009-07-09  Alexey Proskuryakov  <ap@webkit.org>
3178
3179         Reviewed by Geoff Garen.
3180
3181         <rdar://problem/6921671> Visit count shouldn't be incremented by redirects.
3182
3183         * WebCoreSupport/WebFrameLoaderClient.mm: (WebFrameLoaderClient::updateGlobalHistory):
3184         Do not increase visit count if there is a redirect source. As a result, only pages that were
3185         explicitly visited by the user (by typing a URL, choosing one from bookmarks, or clicking
3186         a link) will be counted.
3187
3188         * History/WebHistory.mm:
3189         (-[WebHistoryPrivate visitedURL:withTitle:increaseVisitCount:]):
3190         (-[WebHistory _visitedURL:withTitle:method:wasFailure:increaseVisitCount:]):
3191         * History/WebHistoryInternal.h:
3192         * History/WebHistoryItem.mm:
3193         (-[WebHistoryItem _visitedWithTitle:increaseVisitCount:]):
3194         * History/WebHistoryItemInternal.h:
3195         Marshal this new argument all the way down to WebCore.
3196
3197 2009-07-08  Greg Bolsinga  <bolsinga@apple.com>
3198
3199         Reviewed by Darin Adler.
3200
3201         Add -[WebView _isProcessingUserGesture]
3202         https://bugs.webkit.org/show_bug.cgi?id=27084
3203
3204         Add -_isProcessingUserGesture that calls into WebCore::FrameLoader::isProcessingUserGesture()
3205         so that WebView code can determine if a user gesture is in progress.
3206
3207         * WebView/WebView.mm:
3208         (-[WebView _isProcessingUserGesture]):
3209         * WebView/WebViewPrivate.h:
3210
3211 2009-07-07  Anders Carlsson  <andersca@apple.com>
3212
3213         Reviewed by Sam Weinig.
3214
3215         - Fix <rdar://problem/6544693>.
3216         
3217         For Flash, don't cache which methods or fields in an object are missing, since they can
3218         be added at any time.
3219         
3220         * Plugins/Hosted/NetscapePluginHostManager.mm:
3221         (WebKit::NetscapePluginHostManager::hostForPackage):
3222         * Plugins/Hosted/NetscapePluginHostProxy.h:
3223         (WebKit::NetscapePluginHostProxy::shouldCacheMissingPropertiesAndMethods):
3224         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3225         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3226         * Plugins/Hosted/ProxyInstance.mm:
3227         (WebKit::ProxyInstance::methodsNamed):
3228         (WebKit::ProxyInstance::fieldNamed):
3229
3230 2009-07-06  David Kilzer  <ddkilzer@apple.com>
3231
3232         Bug 27006: Build fix when MAC_JAVA_BRIDGE is disabled
3233
3234         <https://bugs.webkit.org/show_bug.cgi?id=27006>
3235
3236         Reviewed by Darin Adler.
3237
3238         * WebCoreSupport/WebFrameLoaderClient.mm:
3239         (WebFrameLoaderClient::createJavaAppletWidget): Wrap contents of
3240         the method in #if ENABLE(MAC_JAVA_BRIDGE)/#endif and return 0
3241         when this feature is disabled.
3242
3243 2009-07-06  David Kilzer  <ddkilzer@apple.com>
3244
3245         Bug 27005: Build fixes when NETSCAPE_PLUGIN_API is disabled
3246
3247         <https://bugs.webkit.org/show_bug.cgi?id=27005>
3248
3249         Reviewed by Geoff Garen.
3250
3251         * Plugins/WebPluginController.mm:
3252         (-[WebPluginController destroyPlugin:]): Wrap call to
3253         ScriptController::cleanupScriptObjectsForPlugin() in
3254         #if ENABLE(NETSCAPE_PLUGIN_API)/#endif macro.
3255         (-[WebPluginController destroyAllPlugins]): Ditto.
3256         * Plugins/WebPluginDatabase.mm:
3257         (-[WebPluginDatabase removePluginInstanceViewsFor:]): Wrap
3258         WebBaseNetscapePluginView class checks in
3259         #if ENABLE(NETSCAPE_PLUGIN_API)/#endif macro.
3260         (-[WebPluginDatabase destroyAllPluginInstanceViews]): Ditto.
3261
3262 2009-07-06  David Kilzer  <ddkilzer@apple.com>
3263
3264         BUILD FIX: Use ENABLE(NETSCAPE_PLUGIN_API) instead of USE(PLUGIN_HOST_PROCESS)
3265
3266         In r45579, #if/#endif macros for USE(PLUGIN_HOST_PROCESS) were
3267         used, but ENABLE(NETSCAPE_PLUGIN_API) should have been used
3268         instead.
3269
3270         * Plugins/WebNetscapeContainerCheckContextInfo.h:
3271         * Plugins/WebNetscapeContainerCheckContextInfo.mm:
3272         * Plugins/WebNetscapeContainerCheckPrivate.mm:
3273
3274 2009-07-06  David Kilzer  <ddkilzer@apple.com>
3275
3276         Bug 27004: Build fix for ENABLE(PLUGIN_PROXY_FOR_VIDEO) after r42618
3277
3278         <https://bugs.webkit.org/show_bug.cgi?id=27004>
3279
3280         Reviewed by Geoff Garen.
3281
3282         * Plugins/WebPluginController.mm:
3283         (mediaProxyClient): Use core() method to convert from
3284         DOMElement to WebCore::Element.
3285
3286 2009-07-06  David Kilzer  <ddkilzer@apple.com>
3287
3288         Bug 27003: Build fix when USE(PLUGIN_HOST_PROCESS) is disabled
3289
3290         <https://bugs.webkit.org/show_bug.cgi?id=27003>
3291
3292         Reviewed by Geoff Garen.
3293
3294         * Plugins/WebNetscapeContainerCheckContextInfo.h: Added #if
3295         USE(PLUGIN_HOST_PROCESS)/#endif guards.
3296         * Plugins/WebNetscapeContainerCheckContextInfo.mm: Ditto.
3297         * Plugins/WebNetscapeContainerCheckPrivate.mm: Ditto.
3298
3299 2009-07-06  Anders Carlsson  <andersca@apple.com>
3300
3301         Reviewed by Adele Peterson.
3302
3303         Initialize wkIsLatchingWheelEvent.
3304         
3305         * WebCoreSupport/WebSystemInterface.m:
3306         (InitWebCoreSystemInterface):
3307
3308 2009-07-03  Dan Bernstein  <mitz@apple.com>
3309
3310         Reviewed by Simon Fraser.
3311
3312         - fix <rdar://problem/6964278> REGRESSION (r42118): Scrolling redraw
3313           problem in FileMaker Pro
3314
3315         * WebView/WebHTMLView.mm:
3316         (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
3317         Perform layout if needed, even on Mac OS X versions that have
3318         -viewWillDraw. This prevents attempts to draw without layout in case
3319         -viewWillDraw was not called due to NSView issues or the client
3320         did something during the display operation that re-invalidated the
3321         layout.
3322
3323 2009-07-02  Anders Carlsson  <andersca@apple.com>
3324
3325         Reviewed by Dan Bernstein.
3326
3327         <rdar://problem/6978783> 
3328         Software-rendered plug-in does not update correctly when inside a hardware layer
3329         
3330         Replace calls to setNeedsDisplay: and setNeedsDisplayInRect: with a call to the new method
3331         invalidatePluginContentRect:. This new method will ask WebCore to do the repainting, taking
3332         transforms into account.
3333         
3334         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3335         (WebKit::NetscapePluginInstanceProxy::invalidateRect):
3336         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3337         (-[WebHostedNetscapePluginView pluginHostDied]):
3338         * Plugins/WebBaseNetscapePluginView.h:
3339         * Plugins/WebBaseNetscapePluginView.mm:
3340         (-[WebBaseNetscapePluginView windowBecameKey:]):
3341         (-[WebBaseNetscapePluginView windowResignedKey:]):
3342         (-[WebBaseNetscapePluginView preferencesHaveChanged:]):
3343         (-[WebBaseNetscapePluginView invalidatePluginContentRect:]):
3344         * Plugins/WebNetscapePluginView.mm:
3345         (-[WebNetscapePluginView invalidateRect:]):
3346         (-[WebNetscapePluginView invalidateRegion:]):
3347         (-[WebNetscapePluginView forceRedraw]):
3348
3349 2009-07-02  Adam Roben  <aroben@apple.com>
3350
3351         Fix warnings from update-webkit-localizable-strings
3352
3353         Rubber-stamped by Eric Carlson.
3354
3355         * WebCoreSupport/WebViewFactory.mm:
3356         (-[WebViewFactory mediaElementLoadingStateText]):
3357         (-[WebViewFactory mediaElementLiveBroadcastStateText]):
3358         Changed the localization comments to match the comments in the Windows
3359         version of this file, to avoid warnings about different comments for
3360         the same localized string.
3361
3362 2009-07-02  Simon Fraser  <simon.fraser@apple.com>
3363
3364         Reviewed by Dan Bernstein.
3365         
3366         Compositing-related preference methods are not public API; should move to WebPreferencesPrivate.h
3367         <rdar://problem/7027363>
3368
3369         Move accelerated-compositing pref to WebPreferencesPrivate.h
3370
3371         * WebView/WebPreferences.h:
3372         * WebView/WebPreferences.mm:
3373         (-[WebPreferences acceleratedCompositingEnabled]):
3374         (-[WebPreferences setAcceleratedCompositingEnabled:]):
3375         * WebView/WebPreferencesPrivate.h:
3376
3377 2009-07-02  Pierre d'Herbemont  <pdherbemont@apple.com>
3378
3379         Reviewed by Simon Fraser.
3380
3381         <rdar://problem/6518119>
3382
3383         Add localized strings for media controller status messages.
3384
3385         * WebCoreSupport/WebViewFactory.mm: Add new localized text.
3386         (-[WebViewFactory mediaElementLoadingStateText]):
3387         (-[WebViewFactory mediaElementLiveBroadcastStateText]):
3388
3389 2009-07-01  Brady Eidson  <beidson@apple.com>
3390
3391         Reviewed by Sam Weinig.
3392
3393         Add a preference/setting to toggle whether content sniffing is enabled for file URLs.
3394
3395         * WebView/WebPreferenceKeysPrivate.h:
3396
3397         * WebView/WebPreferences.mm:
3398         (+[WebPreferences initialize]):
3399         (-[WebPreferences localFileContentSniffingEnabled]):
3400         (-[WebPreferences setLocalFileContentSniffingEnabled:]):
3401         * WebView/WebPreferencesPrivate.h:
3402
3403         * WebView/WebView.mm:
3404         (-[WebView _preferencesChangedNotification:]):
3405
3406 2009-07-01  David Hyatt  <hyatt@apple.com>
3407
3408         Reviewed by Tim Hatcher.
3409
3410         <rdar://problem/6998524> REGRESSION (r44474): Form text field has focus ring, looks focused,
3411         even though the field is not actually focused for keyboard input
3412         
3413         Add the concept of whether or not the Page is focused by adding a boolean to the focusController.  This allows the
3414         focused frame and focused node to both be cached and changed programmatically without causing errors when the Page doesn't
3415         have focus.
3416
3417         * WebView/WebHTMLView.mm:
3418         (-[WebHTMLView becomeFirstResponder]):
3419         (-[WebHTMLView resignFirstResponder]):
3420
3421 2009-06-30  Adele Peterson  <adele@apple.com>
3422
3423         Reviewed by Dan Bernstein.
3424
3425         Fix for <rdar://problem/7014389> REGRESSION(4-TOT): Hyperlinks have no tooltips in Mail unless you first click in the message body
3426
3427         Updated these new methods (added as part of the viewless WebKit effort) that call through to WebHTMLView to use _selectedOrMainFrame, 
3428         instead of just selectedFrame.  When the selection changes, I don't think there is a situation where there's no selected frame, but
3429         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
3430         a version of _selectionChanged in WebView. 
3431
3432         * WebView/WebView.mm:
3433         (-[WebView _setToolTip:]):
3434         (-[WebView _selectionChanged]):
3435
3436 2009-06-30  Mark Rowe  <mrowe@apple.com>
3437
3438         Reviewed by Timothy Hatcher.
3439
3440         <rdar://problem/7006959> 'Save as…’ does not work in Mail
3441
3442         * WebView/WebFrameView.mm:
3443         (-[WebFrameView initWithFrame:]): Call _needMailThreadWorkaroundIfCalledOffMainThread rather than
3444         needMailThreadWorkaround, as the latter is intended to be used at the point which a workaround would
3445         be applied and thus contains a main thread check.  Since -initWithFrame: is called on the main thread,
3446         this was causing us to not switch from exception-throwing to logging for the thread violation behavior.
3447
3448 2009-06-30  Dan Bernstein  <mitz@apple.com>
3449
3450         Reviewed by Dave Hyatt.
3451
3452         - fix <rdar://problem/6946611> REGRESSION (r30673): Shade10:" D_Snap
3453           to Grid" window is clipping
3454
3455         * Misc/WebKitVersionChecks.h: Added
3456             WEBKIT_FIRST_VERSION_WITHOUT_SHADE10_QUIRK
3457         * WebView/WebView.mm:
3458         (-[WebView _needsLinkElementTextCSSQuirk]): Added. Returns YES if the
3459             client app is a version of Shade 10 earlier than 10.6 and it was
3460             linked against a version of WebKit earlier than 531.2.
3461         (-[WebView _preferencesChangedNotification:]): Added a call to
3462             Settings::setTreatsAnyTextCSSLinkAsStylesheet().
3463
3464 2009-06-29  Eric Carlson  <eric.carlson@apple.com>
3465
3466         Reviewed by Simon Fraser.
3467
3468         <rdar://problem/7014813> Ask media engine if a movie is streamed or downloaded.
3469
3470         * WebCoreSupport/WebSystemInterface.m:
3471         (InitWebCoreSystemInterface):
3472             Add QTMovieGetType.
3473
3474 2009-06-29  David Hyatt  <hyatt@apple.com>
3475
3476         Reviewed by Adam Roben.
3477
3478         Put datagrid behind an #ifdef.
3479
3480         * Configurations/FeatureDefines.xcconfig:
3481
3482 2009-06-26  John Sullivan  <sullivan@apple.com>
3483
3484         Added support for disabling Stop Speaking when there is no speaking to stop.
3485         Also fixed Stop Speaking so that it works (formerly it would throw an exception, and
3486         selecting it from the menu would perform a web search instead (!)).
3487
3488         Reviewed by Tim Hatcher.
3489
3490         * WebCoreSupport/WebContextMenuClient.h:
3491         declare isSpeaking()
3492         
3493         * WebCoreSupport/WebContextMenuClient.mm:
3494         (WebContextMenuClient::isSpeaking):
3495         implement by calling through to NSApplication
3496         (WebContextMenuClient::stopSpeaking):
3497         fixed implementation by correcting the signature of the NSApplication method
3498
3499 2009-06-26  Chris Marrin  <cmarrin@apple.com>
3500
3501         Reviewed by Simon Fraser  <simon.fraser@apple.com>.
3502
3503         Additional fix for https://bugs.webkit.org/show_bug.cgi?id=26651
3504
3505         The flag should always default to true to avoid it getting set
3506         to false in a build with accelerated compositing turned off
3507         and then disabling accelerated compositing when subsequently
3508         running a build with it turned on.
3509
3510         * WebView/WebPreferences.mm:
3511         (+[WebPreferences initialize]):
3512
3513 2009-06-26  Brady Eidson  <beidson@apple.com>
3514
3515         Fix SnowLeopard build.
3516
3517         * Plugins/Hosted/HostedNetscapePluginStream.mm:
3518         (WebKit::HostedNetscapePluginStream::didReceiveResponse):
3519
3520 2009-06-26  Brady Eidson  <beidson@apple.com>
3521
3522         Reviewed by Sam Weinig
3523
3524         <rdar://problem/6961578> REGRESSION (r43511): Opening .fdf files from Acrobat Professional fails
3525
3526         Replace all usage of the now obsolete [NSURLResponse _webcore_MIMEType].
3527
3528         * Plugins/WebBaseNetscapePluginStream.mm:
3529         (WebNetscapePluginStream::didReceiveResponse):
3530         * Plugins/WebNetscapePluginView.mm:
3531         (-[WebNetscapePluginView pluginView:receivedData:]):
3532         * Plugins/WebPluginController.mm:
3533         (-[WebPluginController pluginView:receivedResponse:]):
3534         * WebView/WebDataSource.mm:
3535         (-[WebDataSource _responseMIMEType]):
3536         * WebView/WebResource.mm:
3537         (-[WebResource _initWithData:URL:response:]):
3538
3539 2009-06-26  Alexey Proskuryakov  <ap@webkit.org>
3540
3541         Reviewed by Sam Weinig.
3542
3543         <rdar://problem/6651201> Update lookalike character list.
3544
3545         * Misc/WebNSURLExtras.mm: (isLookalikeCharacter): Added more characters to the list.
3546
3547 2009-06-25  Anders Carlsson  <andersca@apple.com>
3548
3549         Reviewed by Oliver Hunt.
3550
3551         <rdar://problem/6989017> 
3552         REGRESSION (SnowLeopard): RealPlayer content replays when opening a new tab or switching back to the RealPlayer tab
3553         
3554         If a plug-in fails in NPP_New, we would try to recreate it whenever the preferences for a web view would change. 
3555         
3556         Fix this by setting a flag when we fail to instantiate the plug-in, so we only try once.
3557         
3558         * Plugins/WebBaseNetscapePluginView.h:
3559         * Plugins/WebBaseNetscapePluginView.mm:
3560         (-[WebBaseNetscapePluginView start]):
3561
3562 2009-06-25  Chris Marrin  <cmarrin@apple.com>
3563
3564         Reviewed by Simon Fraser  <simon.fraser@apple.com>.
3565
3566         https://bugs.webkit.org/show_bug.cgi?id=26651
3567         
3568         Preference is named "WebKitAcceleratedCompositingEnabled"
3569         and is a boolean value. When false, prevents compositing layers from
3570         being created, which prevents hardware animation from running.
3571         Also forces video to do software rendering. Added a cache for
3572         the flag in RenderLayerCompositing and made it all work
3573         on-the-fly when the flag is changed while a page is loaded.
3574
3575         * WebView/WebPreferenceKeysPrivate.h:
3576         * WebView/WebPreferences.h:
3577         * WebView/WebPreferences.mm:
3578         (+[WebPreferences initialize]):
3579         (-[WebPreferences acceleratedCompositingEnabled]):
3580         (-[WebPreferences setAcceleratedCompositingEnabled:]):
3581         * WebView/WebView.mm:
3582         (-[WebView _preferencesChangedNotification:]):
3583
3584 2009-06-24  Dan Bernstein  <mitz@apple.com>
3585
3586         Reviewed by Anders Carlsson.
3587
3588         Fix the most recently seen kind of crash in <rdar://problem/5983224>
3589
3590         * WebView/WebHTMLView.mm:
3591         (-[WebHTMLView adjustPageHeightNew:top:bottom:limit:]): Null-check the
3592         Frame.
3593
3594 2009-06-24  Jeff Johnson  <opendarwin@lapcatsoftware.com>
3595
3596         Reviewed by Darin Adler.
3597
3598         https://bugs.webkit.org/show_bug.cgi?id=26638 WebKitErrors.m: _initWithPluginErrorCode: does not set localizedDescription
3599
3600         Add localized descriptions for plugin errors.
3601         The localized strings already existed but were unused; now NSLocalizedDescriptionKey is added to the NSError userInfo.
3602
3603         * Misc/WebKitErrors.m:
3604         (-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]):
3605
3606 2009-06-23  Brady Eidson  <beidson@apple.com>
3607