efad438163a2bb389d9524c2184ed2cd7ef8fea3
[WebKit.git] / Source / WebKit / mac / ChangeLog
1 2011-01-22  Alexey Proskuryakov  <ap@apple.com>
2
3         Reviewed by Darin Adler.
4
5         https://bugs.webkit.org/show_bug.cgi?id=52473
6         Auto-scaling to avoid orphans is broken, remove dysfunctional code
7
8         * WebView/WebHTMLView.mm:
9         (-[WebHTMLView _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:paginateScreenContent:]):
10         (-[WebHTMLView _scaleFactorForPrintOperation:]):
11         (-[WebHTMLView knowsPageRange:]):
12
13 2011-01-21  Mark Rowe  <mrowe@apple.com>
14
15         Rubber-stamped by Jon Honeycutt.
16
17         Fix the build when using Clang by removing some unused variables.
18
19         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
20         (-[WebHostedNetscapePluginView updateAndSetWindow]):
21         * WebView/WebFullScreenController.mm:
22         (-[WebFullScreenController enterFullscreen:]):
23         (-[WebFullScreenController exitFullscreen]):
24
25 2011-01-21  Chris Rogers  <crogers@google.com>
26
27         Reviewed by Darin Fisher.
28
29         Add run-time enable support for the web audio API
30         https://bugs.webkit.org/show_bug.cgi?id=52741
31
32         * WebView/WebPreferenceKeysPrivate.h:
33         * WebView/WebPreferences.mm:
34         (-[WebPreferences webAudioEnabled]):
35         (-[WebPreferences setWebAudioEnabled:]):
36         * WebView/WebPreferencesPrivate.h:
37         * WebView/WebView.mm:
38         (-[WebView _preferencesChangedNotification:]):
39
40 2011-01-20  John Sullivan  <sullivan@apple.com>
41
42         Reviewed by Mark Rowe.
43
44         Shift-tab doesn't cycle through fields in http authentication panel
45         https://bugs.webkit.org/show_bug.cgi?id=52850
46
47         * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
48         * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
49         Re-wired the key loop so that there aren't two views with the same nextKeyView.
50
51 2011-01-20  Beth Dakin  <bdakin@apple.com>
52
53         Reviewed by Geoffrey Garen.
54
55         Fix for <rdar://problem/8890255>
56
57         Allow WebKitSystemInterface to draw scrollbars 
58         when appropriate.
59         * WebCoreSupport/WebSystemInterface.mm:
60         (InitWebCoreSystemInterface):
61
62 2011-01-19  Simon Fraser  <simon.fraser@apple.com>
63
64         Reviewed by Sam Weinig.
65
66         GraphicsLayers in subframes can get sync'd multiple times
67         https://bugs.webkit.org/show_bug.cgi?id=52489
68
69         * WebView/WebView.mm:
70         (-[WebView _syncCompositingChanges]): syncCompositingStateRecursive()
71         was renamed to syncCompositingStateIncludingSubframes().
72
73 2011-01-19  Darin Adler  <darin@apple.com>
74
75         Reviewed by Sam Weinig.
76
77         Would like script debugging protocol method to differentiate between caught and uncaught exceptions
78         https://bugs.webkit.org/show_bug.cgi?id=52104
79         rdar://problem/8704226
80
81         * WebView/WebDelegateImplementationCaching.h:
82         Fix type of second integer in CallScriptDebugDelegate function overload
83         to be int to match the actual Objective-C method. Added a new overload
84         that includes a BOOL in the right place. Added a boolean named
85         exceptionWasRaisedExpectsHasHandlerFlag.
86
87         * WebView/WebDelegateImplementationCaching.mm:
88         (CallDelegate): Added overloads as above.
89         (CallScriptDebugDelegate): Ditto.
90
91         * WebView/WebScriptDebugDelegate.h: Added new method with the additional
92         boolean argument. Marked the old method informally deprecated.
93
94         * WebView/WebScriptDebugger.mm:
95         (WebScriptDebugger::exception): Added code to call with or without the
96         boolean depending on exceptionWasRaisedExpectsHasHandlerFlag.
97
98         * WebView/WebView.mm:
99         (-[WebView _cacheScriptDebugDelegateImplementations]): Set up the
100         exceptionWasRaisedExpectsHasHandlerFlag. Also fixed old code that was not
101         guaranteed to set didParseSourceExpectsBaseLineNumber to NO.
102
103 2011-01-19  Tony Gentilcore  <tonyg@chromium.org>
104
105         Reviewed by Mihai Parparita.
106
107         Perform some forward declaration
108         https://bugs.webkit.org/show_bug.cgi?id=52522
109
110         * Misc/WebKitNSStringExtras.mm:
111
112 2011-01-19  Pavel Podivilov  <podivilov@chromium.org>
113
114         Reviewed by Yury Semikhatsky.
115
116         Web Inspector: [JSC] scripts have incorrect starting line (always 1).
117         https://bugs.webkit.org/show_bug.cgi?id=52721
118
119         * WebView/WebScriptDebugger.h:
120         * WebView/WebScriptDebugger.mm:
121         (toNSString):
122         (WebScriptDebugger::sourceParsed):
123
124 2011-01-19  Levi Weintraub  <leviw@google.com>
125
126         Reviewed by Ryosuke Niwa.
127
128         Updating to use Position::parentAnchoredEquivalent instead of
129         the old htmlediting rangeCompliantEquivalent.
130
131         remove rangeCompliantEquivalent and replace it with Position methods
132         https://bugs.webkit.org/show_bug.cgi?id=25057
133
134         * WebView/WebFrame.mm:
135         (-[WebFrame _smartDeleteRangeForProposedRange:]):
136
137 2011-01-18  Chris Fleizach  <cfleizach@apple.com>
138
139         Reviewed by Darin Adler.
140
141         REGRESSION: A problem with Voiceover and finding links
142         https://bugs.webkit.org/show_bug.cgi?id=52324
143
144         * WebView/WebDynamicScrollBarsView.mm:
145         (-[WebDynamicScrollBarsView accessibilityIsIgnored]):
146
147 2011-01-17  David Kilzer  <ddkilzer@apple.com>
148
149         <http://webkit.org/b/52596> Add missing DOMDocument/DOMDocumentFragment headers to Xcode project
150
151         Reviewed by Dan Bernstein.
152
153         * MigrateHeaders.make: Copy DOMDocumentFragmentPrivate.h and
154         DOMDocumentPrivate.h to the PrivateHeaders directory.
155
156 2011-01-17  Enrica Casucci  <enrica@apple.com>
157
158         Reviewed by Alexey Proskuryakov.
159
160         Drag and drop support: refactoring of image from link and image from selection
161         https://bugs.webkit.org/show_bug.cgi?id=52496
162
163         This work cleans up the Mac code and makes it more similar to the Windows implementation,
164         avoiding the use of an NSView when the FrameView can be used.
165         The refactoring is a necessary step towards the complete support of drag and drop
166         in WebKit2.
167
168         * WebCoreSupport/WebDragClient.mm:
169         (WebDragClient::createDragImageForLink): Added.
170         * WebView/WebHTMLView.mm: Removed dragImageFromLink and dragImageFromURL.
171         * WebView/WebHTMLViewPrivate.h: Removed dragImageFromLink and dragImageFromURL.
172
173 2011-01-17  Pavel Feldman  <pfeldman@chromium.org>
174
175         Reviewed by Yury Semikhatsky.
176
177         Web Inspector: simplify debugger enabling routine.
178         https://bugs.webkit.org/show_bug.cgi?id=52472
179
180         * WebInspector/WebInspector.mm:
181         (-[WebInspector startDebuggingJavaScript:]):
182
183 2011-01-16  Dan Bernstein  <mitz@apple.com>
184
185         Reviewed by Simon Fraser.
186
187         Assertion failure (!inSetWindow) with in-process plug-in in plugins/destroy-on-setwindow.html
188         https://bugs.webkit.org/show_bug.cgi?id=52550
189
190         * Plugins/WebNetscapePluginView.mm:
191         (-[WebNetscapePluginView setWindowIfNecessary]): Removed the assertion, making sure
192         that inSetWindow remains YES until we exit the top-level setWindowIfNecessary.
193
194 2011-01-16  Simon Fraser  <simon.fraser@apple.com>
195
196         Reviewed by Dan Bernstein.
197
198         Issues with iframes and plugins when the WebView is scaled.
199         <rdar://problem/6213380>
200         
201         When _scaleWebView has been called on a WebView, iframes
202         in WebKit1 render and hit-test incorrectly, and plug-ins don't scale up.
203         This is caused by AppKit NSViews not playing nicely with the scale
204         applied through style.
205         
206         Work around most of these issues by adjusting the bounds size
207         of widgets to allow iframe contents to paint with the correct scale,
208         and fix various places in the code where we relied on coordinate
209         transforms via NSViews (which ignore CSS transforms).
210
211         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
212         (-[WebHostedNetscapePluginView updateAndSetWindow]):
213         * WebView/WebFrameView.mm:
214         (-[WebFrameView setBoundsSize:]):
215
216 2011-01-16  Beth Dakin  <bdakin@apple.com>
217
218         Reviewed by Kevin Decker.
219
220         Fix for <rdar://problem/8871204>
221
222         Don't try to save elasticity state. Just rely on
223         NSScrollElasticityAutomatic to restore the correct state.
224         * WebCoreSupport/WebFrameLoaderClient.h:
225         * WebCoreSupport/WebFrameLoaderClient.mm:
226         (WebFrameLoaderClient::WebFrameLoaderClient):
227         (WebFrameLoaderClient::dispatchDidFirstLayout):
228         (WebFrameLoaderClient::provisionalLoadStarted):
229
230 2011-01-14  Simon Fraser  <simon.fraser@apple.com>
231
232         Reviewed by Dan Bernstein.
233
234         Plugins render incorrectly with transformed ancestors
235         https://bugs.webkit.org/show_bug.cgi?id=52507
236         
237         -[NSView visibleRect] gives the wrong answer if there are CSS transforms
238         in the ancestor chain of a plugin.
239         
240         So use of this method with calls to -actualVisibleRectInWindow, which
241         maps rects through the render tree to compute the correct rect,
242         clipping via windowClipRect() if necessary.
243         
244         Not testable, because doing so relies on the behavior of some
245         plugins, which stop rendering if setWindow passes an empty rect.
246
247         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
248         (-[WebHostedNetscapePluginView updateAndSetWindow]):
249         * Plugins/WebBaseNetscapePluginView.h:
250         * Plugins/WebBaseNetscapePluginView.mm:
251         (-[WebBaseNetscapePluginView actualVisibleRectInWindow]):
252         * Plugins/WebNetscapePluginView.mm:
253         (-[WebNetscapePluginView saveAndSetNewPortStateForUpdate:]):
254
255 2011-01-14  Yuzo Fujishima  <yuzo@google.com>
256
257         Reviewed by Antti Koivisto.
258
259         Rename cache() to memoryCache()
260         https://bugs.webkit.org/show_bug.cgi?id=52433
261
262         * Misc/WebCache.mm:
263         (+[WebCache statistics]):
264         (+[WebCache setDisabled:]):
265         (+[WebCache isDisabled]):
266         * WebView/WebView.mm:
267         (+[WebView _setCacheModel:]):
268
269 2011-01-13  Geoffrey Garen  <ggaren@apple.com>
270
271         Reviewed by Oliver Hunt.
272
273         Split out a MarkedSpace strategy object from Heap.
274         https://bugs.webkit.org/show_bug.cgi?id=52421
275
276         * Misc/WebCoreStatistics.mm:
277         (+[WebCoreStatistics memoryStatistics]): Updated for class move.
278
279 2011-01-14  Dan Bernstein  <mitz@apple.com>
280
281         Reviewed by Simon Fraser.
282
283         WebKit/mac part of <rdar://problem/8441312> Crash in -[NSView _invalidateGStatesForTree]
284
285         * WebView/WebHTMLView.mm:
286         (-[WebHTMLView _invalidateGStatesForTree]): Override this NSView method, and bracket the call
287         to the superclass implementation with suspending WebCore Widget hierarchy updates. This ensures
288         that the NSView tree doesn’t change from under AppKit as it traverses it.
289
290 2011-01-14  Beth Dakin  <bdakin@apple.com>
291
292         Reviewed by Mark Rowe.
293
294         Fix for <rdar://problem/7793902> Artifacts when scrolling
295         page in Safari while page is loading
296
297         Call setDrawsBackground:YES on the scrollView in 
298         dispatchDidFirstLayout() rather than waiting until
299         frameLoadCompleted(). Also suspend scrolling elasticity
300         between provisionalLoadStarted() and dispatchDidFirstLayout()
301         * WebCoreSupport/WebFrameLoaderClient.h:
302         * WebCoreSupport/WebFrameLoaderClient.mm:
303         (WebFrameLoaderClient::WebFrameLoaderClient):
304         (WebFrameLoaderClient::dispatchDidFirstLayout):
305         (WebFrameLoaderClient::provisionalLoadStarted):
306
307 2011-01-12  Enrica Casucci  <enrica@apple.com>
308
309         Reviewed by Darin Adler.
310
311         WebKit2: Add support for drag and drop
312         https://bugs.webkit.org/show_bug.cgi?id=52343
313         <rdar://problem/7660558>
314         
315         The DragData class has been extended to provide
316         additional context from the application (keyboard state, modal windows, etc.)
317         as well as information of the drag pasteboard being used.
318         These are the changes to align the behavior for WebKit.
319
320         * WebView/WebView.mm:
321         (-[WebView applicationFlags:]): Added.
322         (-[WebView draggingEntered:]): Added parameter to the DragData constructor.
323         (-[WebView draggingUpdated:]): Added parameter to the DragData constructor.
324         (-[WebView draggingExited:]): Added parameter to the DragData constructor.
325         (-[WebView performDragOperation:]): Added parameter to the DragData constructor.
326
327 2011-01-12  Beth Dakin  <bdakin@apple.com>
328
329         Reviewed by Anders Carlsson.
330
331         Add-on for https://bugs.webkit.org/show_bug.cgi?id=52309 
332         Expose fixed layout through WebKit SPI
333         -and corresponding-
334         <rdar://problem/8844464>
335
336         And now with getters!
337         * WebView/WebView.mm:
338         (-[WebView _useFixedLayout]):
339         (-[WebView _fixedLayoutSize]):
340         * WebView/WebViewPrivate.h:
341
342 2011-01-12  Beth Dakin  <bdakin@apple.com>
343
344         Reviewed by Anders Carlsson.
345
346         Fix for https://bugs.webkit.org/show_bug.cgi?id=52309 Expose
347         fixed layout through WebKit SPI
348         -and corresponding-
349         <rdar://problem/8844464>
350
351         * WebView/WebView.mm:
352         (-[WebView _setUseFixedLayout:]):
353         (-[WebView _setFixedLayoutSize:]):
354         * WebView/WebViewPrivate.h:
355
356 2011-01-07  Enrica Casucci  <enrica@apple.com>
357
358         Reviewed by Alexey Proskuryakov.
359
360         Paste and drag and drop use different code paths to interact with the pasteboard.
361         https://bugs.webkit.org/show_bug.cgi?id=52093
362         The change consists in a refactoring of the code to have only one class that
363         deals with the pasteboard on Mac.
364
365         * WebCoreSupport/WebEditorClient.h:
366         * WebCoreSupport/WebEditorClient.mm: Added two methods to provide to WebCore functionality
367         exposed by NSURLExtras.
368         (WebEditorClient::canonicalizeURL):
369         (WebEditorClient::canonicalizeURLString):
370         * WebCoreSupport/WebPasteboardHelper.h: Removed.
371         * WebCoreSupport/WebPasteboardHelper.mm: Removed.
372         * WebView/WebHTMLView.mm: Removed comment.
373         * WebView/WebView.mm: The following methods have been changed to use the new DragData
374         constructor that doesn't use the WebPasteboardHelper reference.
375         (-[WebView draggingEntered:]):
376         (-[WebView draggingUpdated:]):
377         (-[WebView draggingExited:]):
378         (-[WebView performDragOperation:]):
379
380 2011-01-09  Tony Gentilcore  <tonyg@chromium.org>
381
382         Reviewed by Alexey Proskuryakov.
383
384         Forward declare some headers where possible
385         https://bugs.webkit.org/show_bug.cgi?id=52133
386
387         * WebView/WebFrame.mm:
388
389 2011-01-09  Xianzhu Wang <phnixwxz@gmail.com>
390
391         Reviewed by Darin Fisher.
392
393         https://bugs.webkit.org/show_bug.cgi?id=41441
394         createWindow method should only do window-creating without URL navigation
395
396         * WebCoreSupport/WebChromeClient.mm:
397         (WebChromeClient::createWindow):
398
399 2011-01-08  Dan Bernstein  <mitz@apple.com>
400
401         Try to fix the Leopard build.
402
403         * WebView/WebFullScreenController.mm:
404
405 2011-01-07  Jer Noble  <jer.noble@apple.com>
406
407         Yet another Leopard build fix: NSRect and CGRect are not inter-
408         changable in 32-bit.  
409         
410         * WebView/WebFullScreenController.mm:
411         (-[WebFullScreenController exitFullscreen]):
412
413 2011-01-07  Jer Noble  <jer.noble@apple.com>
414
415         Fix the Leopard build: Replace CoreAnimation SL-only functions
416         with Leopard equivalents.
417
418         * WebView/WebFullScreenController.mm:
419         (+[CATransaction setDisableActions:]):
420         (+[CATransaction setAnimationDuration:]):
421         (-[WebFullScreenController _animationDuration]):
422         (-[WebFullscreenWindow initWithContentRect:styleMask:backing:defer:]):
423
424 2010-12-21  Jer Noble  <jer.noble@apple.com>
425
426         Reviewed by Simon Fraser.
427
428         Implement WebKit Full Screen support.
429         https://bugs.webkit.org/show_bug.cgi?id=49481
430         rdar://problem/8247444
431
432         Support the new fullscreen Chrome client requests.  WebView will pass
433         through these requests to a WebFullscreenController.
434
435         * WebCoreSupport/WebChromeClient.h: Add fullScreenRendererChanged().
436         * WebView/WebView.mm:
437         (-[WebView _supportsFullScreenForElement:WebCore::]): Check to see if the fullscreen pref has been enabled.
438         (-[WebView _enterFullScreenForElement:WebCore::]): Create a WebFullScreenController.
439         (-[WebView _exitFullScreenForElement:WebCore::]): Request that the WebFullScreenController exit fullscreen.
440         (-[WebView _fullScreenRendererChanged:WebCore::]): Notify the WebFullScreenController that its renderer has changed.
441         * WebView/WebViewData.h: Add ivar newFullscreenController.
442
443 2010-12-17  Jer Noble  <jer@kokode.apple.com>
444
445         Reviewed by Simon Fraser.
446
447         Implement WebKit Full Screen support.
448         https://bugs.webkit.org/show_bug.cgi?id=49481
449         rdar://problem/8247444
450         
451         This patch implements the FullScreen APIs using the new RenderFullScreen renderer and the new
452         Document client APIs. The RenderFullScreen renderer's CALayer is hosted in a new, fullscreen
453         window, and a custom CAAnimation animates that layer between the initial screen rect of the
454         full screen element, to its final value. WebFullscreenController will swap the WebView out of
455         its original window, and into the fullscreen window. The controller will replace the WebView
456         with a placeholder view, so that if the placeholder moves or resized while the WebView is
457         absent, the WebView will move back to the correct location when exiting fullscreen.
458
459         * WebView/WebFullscreenController.h: Added.
460         * WebView/WebFullscreenController.mm: Added.
461         (-[WebFullscreenController windowDidExitFullscreen:]):  Close the fullscreen window.
462         (-[WebFullscreenController windowDidEnterFullscreen:]): Swap the webView back into the fullscreen window. 
463         (-[WebFullscreenController animationDidStop:finished:]): Call windowDid{Exit|Enter}FullScreen as appropriate.
464         (-[WebFullscreenController applicationDidResignActive:]):
465         (-[WebFullscreenController applicationDidChangeScreenParameters:]): Resize the fullscreen window to match
466             the new screen parameters.
467         (-[WebFullscreenController enterFullscreen:]):  Set up the animation that will take the fullscreen element
468             from its original screen rect into fullscreen.
469         (-[WebFullscreenController exitFullscreen]): Swap the webView back into its original window.
470             Set up the animation that will take the fullscreen element back into its original screen
471             rect.
472         (-[WebFullscreenController _updatePowerAssertions]): Now checks _isAnyMoviePlaying to determine 
473             whether to disable screensaver and sleep.
474         (-[WebFullscreenController _isAnyMoviePlaying]): Walks through the sub-tree starting at the fullscreen element
475             looking for HTMLVideoElements; returns whether any are found to be playing.
476         (-[WebFullscreenController _animationDuration]): Returns the current animation duration, affected by control
477             and shift keys.
478         (-[WebFullscreenWindow canBecomeKeyWindow]): Allow the window to become key.
479         (-[WebFullscreenWindow keyDown:]): Handle the 'Esc' key.
480         (-[WebFullscreenWindow cancelOperation:]): Request to exit fullscreen.
481         (-[WebFullscreenWindow rendererLayer]): Convenience accessor.
482         (-[WebFullscreenWindow setRendererLayer:]): Ditto.
483         (-[WebFullscreenWindow backgroundLayer]): Ditto.
484         (-[WebFullscreenWindow animationView]): Ditto.
485         (MediaEventListener::MediaEventListener): Implements the EventListener protocol.
486         (MediaEventListener::handleEvent): Tells its delegate to _updatePowerAssertions.
487         
488 2011-01-07  James Robinson  <jamesr@chromium.org>
489
490         Revert "Implement mozilla's animationTime property"
491         https://bugs.webkit.org/show_bug.cgi?id=51952
492
493         This approach isn't quite right.
494
495         * WebView/WebHTMLView.mm:
496         (-[WebHTMLView drawRect:]):
497         * WebView/WebView.mm:
498         (layerSyncRunLoopObserverCallBack):
499
500 2011-01-06  Gavin Barraclough  <barraclough@apple.com>
501
502         Reviewed by Geoff Garen.
503
504         Bug 52035 - Unregistering DOMWrapperWorlds is unsafe
505
506         The method DOMWrapperWorld::unregisterWorld() effectively calls the DOMWrapperWorld's
507         destructor early, in order to release wrappers once we know we no longer intend to use them.
508         Whilst it is okay to have a method to throw away wrappers (assuming we know we're willing to
509         lose any state stored on them) it is not okay to deregister the world from the JSGlobalData.
510         A sequence of events that triggers the bug would look like this:
511
512         (1) Create a DOMWrapperWorld.
513         (2) Register a timer in the world.
514         (3) Call unregisterWorld() on the world.
515         (4) Timer goes off, code is executed in the world, creates a Node not attached to a Document.
516         (5) We attempt to lookup a wrapper map for the world on the JSGlobalData, but because we've
517             called forgetWorld() none exists.
518         (6) Attempt to add a wrapper to a NULL map.
519
520         Fix the problem by not removing the JSGlobalData's wrapper map until the world really goes away.
521
522         * WebView/WebScriptWorld.mm:
523         (-[WebScriptWorld unregisterWorld]):
524
525 2011-01-04  Chris Fleizach  <cfleizach@apple.com>
526
527         Reviewed by Sam Weinig.
528
529         WK2: Support Accessibility
530         https://bugs.webkit.org/show_bug.cgi?id=51859
531
532         Use rootObject() method to get top of AX tree.
533
534         * WebCoreSupport/WebFrameLoaderClient.h:
535         (WebFrameLoaderClient::accessibilityRemoteObject):
536         * WebView/WebFrame.mm:
537         (-[WebFrame setAccessibleName:]):
538         (-[WebFrame accessibilityRoot]):
539         * WebView/WebFrameInternal.h:
540         * WebView/WebFramePrivate.h:
541         * WebView/WebHTMLView.mm:
542         (-[WebHTMLView accessibilityAttributeValue:]):
543         (-[WebHTMLView accessibilityFocusedUIElement]):
544         (-[WebHTMLView accessibilityHitTest:]):
545         (-[WebHTMLView _accessibilityParentForSubview:]):
546
547 2011-01-04  David Kilzer  <ddkilzer@apple.com>
548
549         <http://webkit.org/b/51889> WebFrameLoaderClient::createMediaPlayerProxyPlugin() should use WebCore::PluginInfo.name
550
551         Reviewed by Eric Carlson.
552
553         This originally broke in r61581.  It is inside an
554         ENABLE(PLUGIN_PROXY_FOR_VIDEO) macro, so it didn't break the Mac
555         build then.
556
557         * WebCoreSupport/WebFrameLoaderClient.mm: Call
558         (WebFrameLoaderClient::createMediaPlayerProxyPlugin): Updated to
559         use WebCore::PluginInfo.name instead of
560         -[WebBasePluginPackage name].
561
562 2011-01-02  Dan Bernstein  <mitz@apple.com>
563
564         Rubber-stamped by Simon Fraser.
565
566         <rdar://problem/8812159> Update copyright strings
567
568         * Info.plist:
569
570 2010-12-29  Dan Bernstein  <mitz@apple.com>
571
572         Reviewed by Ada Chan.
573
574         <rdar://problem/8758191> REGRESSION (r72887): Mail crashes when doing searches in a message due to method name conflict
575         https://bugs.webkit.org/show_bug.cgi?id=51717
576
577         Renamed -findString:options: to -_findString:options: in the WebDocumentOptionsSearching
578         protocol to avoid conflict with -[WebHTMLView(MailExtras) findString:options:] which Mail defines.
579
580         * WebView/WebDocumentInternal.h:
581         * WebView/WebHTMLView.mm:
582         (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
583         (-[WebHTMLView _findString:options:]):
584         * WebView/WebView.mm:
585         (findString):
586
587 2010-12-28  Daniel Bates  <dbates@rim.com>
588
589         Reviewed by Sam Weinig.
590
591         Substitute // MARK: for compiler-specific #pragma mark
592         https://bugs.webkit.org/show_bug.cgi?id=51657
593
594         For consistency, we should substitute "// MARK:" for compiler-
595         specific "#pragma mark" in the source files for the Mac port.
596
597         * History/WebHistory.mm:
598         * Plugins/WebBaseNetscapePluginView.mm:
599         * Plugins/WebNetscapePluginView.mm:
600         * WebCoreSupport/WebInspectorClient.mm:
601         * WebCoreSupport/WebSecurityOrigin.mm:
602         * WebView/WebPDFView.mm:
603         * WebView/WebVideoFullscreenController.mm:
604         * WebView/WebVideoFullscreenHUDWindowController.mm:
605
606 2010-12-23  Yongjun Zhang  <yongjun_zhang@apple.com>
607
608         Reviewed by Darin Adler.
609
610         WebKit crashes at DebuggerCallFrame::functionName() if m_callFrame is the top global callframe.
611         https://bugs.webkit.org/show_bug.cgi?id=38535
612
613         WebScriptDebugger in WebKit has empty implementations for willExecuteProgram and didExecuteProgram.  As a result,
614         if the top call frame is from a program, WebKitScriptDebugger doesn't record that callframe as the top frame, and
615         WebScriptDebugger's callframe stack is wrong from this point.  That could cause crash if we trying to access the top
616         call frame from this stack when an exception throws because the saved top frame could be invalid.
617
618         To fix that, we need to maintain the call frame stack in willExecuteProgram and didExecuteProgram, as we did in
619         callEvent and returnEvent.
620
621         * WebView/WebScriptDebugger.mm:
622         (WebScriptDebugger::willExecuteProgram):
623         (WebScriptDebugger::didExecuteProgram):
624
625 2010-12-22  Sam Weinig  <sam@webkit.org>
626
627         Reviewed by Darin Adler.
628
629         WebKit2 needs to mirror the frame tree in the UIProcess
630         https://bugs.webkit.org/show_bug.cgi?id=51546
631
632         - Add client functions to notify that a frame has been added or
633           removed from the page cache.
634
635         * WebCoreSupport/WebFrameLoaderClient.h:
636         * WebCoreSupport/WebFrameLoaderClient.mm:
637         (WebFrameLoaderClient::didSaveToPageCache):
638         (WebFrameLoaderClient::didRestoreFromPageCache):
639
640 2010-12-22  Ryosuke Niwa  <rniwa@webkit.org>
641
642         Reviewed by Eric Seidel.
643
644         Editor.h doesn't need to include SelectionController.h
645         https://bugs.webkit.org/show_bug.cgi?id=51441
646
647         Renamed SelectionController::EDirection to SelectionDirection.
648
649         * WebView/WebFrame.mm:
650         (-[WebFrame _rangeByAlteringCurrentSelection:SelectionController::direction:granularity:]):
651         Takes SelectionDirection instead of SelectionController::EDirection.
652         * WebView/WebFrameInternal.h:
653         * WebView/WebTextCompletionController.mm:
654         (-[WebTextCompletionController doCompletion]): Calls _rangeByAlteringCurrentSelection:SelectionController.
655
656 2010-12-22  Simon Fraser  <simon.fraser@apple.com>
657
658         Reviewed by Darin Adler.
659
660         Cache snapshots of plug-ins before painting, to avoid script running during painting
661         https://bugs.webkit.org/show_bug.cgi?id=51493
662
663         When FrameView is asked to do a flattening paint (e.g. when Safari snapshots,
664         or when printing), plug-ins which otherwise use the CA rendering model
665         are sent a paint event. Some plug-ins may run script while handling this event,
666         or out of process plug-ins may process queued requests at this time. Running
667         script while inside layout or painting can have bad consequences, because it
668         can result in arbitrary changes to the render tree.
669         
670         This patch avoids sending plug-ins paint events inside of painting. Instead,
671         we ask the plug-ins to cache a snapshot before we paint, and then the software
672         paint simply draws that snapshot.
673
674         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
675         (-[WebHostedNetscapePluginView drawRect:]): If we have a cached snapshot,
676         draw it. Also only send the snapshot message to the plugin proxy if we
677         know we're snapshotting, since even if creating the snapshot image failed,
678         we still don't want to call to the plug-in.
679
680         * Plugins/WebBaseNetscapePluginView.h: Add a retained NSImage member for the snapshot.
681         * Plugins/WebBaseNetscapePluginView.mm:
682         (-[WebBaseNetscapePluginView cacheSnapshot]): Create an image and draw the snapshot into it.
683         (-[WebBaseNetscapePluginView clearCachedSnapshot]): Clear the snapshot.
684
685         * Plugins/WebNetscapePluginView.mm:
686         (-[WebNetscapePluginView drawRect:]): If we have a cached snapshot, use it.
687         * WebCoreSupport/WebFrameLoaderClient.mm:
688         (NetscapePluginWidget::notifyWidget): Implement notifyWidget() and use it
689         to cache and clear the snapshots.
690
691 2010-12-21  Cameron Zwarich  <zwarich@apple.com>
692
693         Reviewed by Darin Adler.
694
695         -[WebBasePluginPackage isNativeLibraryData:] integer underflows on zero-sized data
696         https://bugs.webkit.org/show_bug.cgi?id=51431
697         <rdar://problem/8791757>
698
699         * Plugins/WebBasePluginPackage.mm:
700         (-[WebBasePluginPackage isNativeLibraryData:]): Change an arithmetic expression so
701         it doesn't underflow.
702
703 2010-12-16  Ryosuke Niwa  <rniwa@webkit.org>
704
705         Reviewed by Cameron Zwarich.
706
707         REGRESSION(r74172): 125 java tests fail on Mac
708         https://bugs.webkit.org/show_bug.cgi?id=51214
709
710         The regression was caused by an incorrectly adding sizeof(struct fat_header)
711         to a pointer for uint32_t as supposed to uint8_t.
712
713         Fixed the bug by explicitly casting it to uint8_t* before the addition.
714
715         * Plugins/WebBasePluginPackage.mm:
716         (-[WebBasePluginPackage isNativeLibraryData:]):
717
718 2010-12-15  Cameron Zwarich  <zwarich@apple.com>
719
720         Reviewed by Darin Adler.
721
722         Clang -Wcast-align gives an error in WebBasePluginPackage.mm
723         https://bugs.webkit.org/show_bug.cgi?id=51144
724
725         Fix an alignment issue. OSSwapInt32 takes data that is 32-bit aligned on ARM, but
726         we were calling it on a byte array 32 bits at a time. While this is okay in practice,
727         since TCMalloc won't give us a non-32-bit aligned block array of bytes and Vector's
728         inline storage is at the beginning of the Vector, it is still better to fix this
729         and silence the warning.
730
731         * Plugins/WebBasePluginPackage.mm:
732         (swapIntsInHeader):
733         (-[WebBasePluginPackage isNativeLibraryData:]):
734
735 2010-12-14  Mark Rowe  <mrowe@apple.com>
736
737         Reviewed by Sam Weinig.
738
739         <http://webkit.org/b/51064> Reproducible crash inside WebCore::MediaPlayerPrivateQTKit::createQTMovie when loading <video>
740
741         * History/WebHistoryItem.mm:
742         (-[WebHistoryItem description]): Test whether the string is empty rather than incorrectly
743         always including the target in the output.
744
745 2010-12-13  Alexey Proskuryakov  <ap@apple.com>
746
747         Reviewed by Adam Barth.
748
749         https://bugs.webkit.org/show_bug.cgi?id=50953
750         DNS Prefetch should be an opt-in feature
751
752         * WebView/WebPreferences.mm: (+[WebPreferences initialize]): Changed default to false.
753
754 2010-12-13  Mike Thole  <mthole@apple.com>
755
756         Rubber-stamped by John Sullivan.
757
758         https://bugs.webkit.org/show_bug.cgi?id=50956
759         WebAuthenticationPanel.nib appears to have a cut-off sentence
760         
761         Replace the sentence fragment in the sheet layout with "<-- do not localize -->" style text.
762         The contents of this text field are updated dynamically before the sheet is displayed.
763
764         * Panels/English.lproj/WebAuthenticationPanel.nib/designable.nib:
765         * Panels/English.lproj/WebAuthenticationPanel.nib/keyedobjects.nib:
766
767 2010-12-13  Antti Koivisto  <antti@apple.com>
768
769         Reviewed by Alexey Proskuryakov.
770
771         https://bugs.webkit.org/show_bug.cgi?id=50758
772         <rdar://problem/8722094> 
773         Defer loading print stylesheets
774         
775         Expose SPI for DRT for making resources load serially. This is useful for testing resource load order.
776
777         * WebView/WebView.mm:
778         (+[WebView _setLoadResourcesSerially:forHost:]):
779         * WebView/WebViewPrivate.h:
780
781 2010-12-09  Matthew Delaney  <mdelaney@apple.com>
782
783         Reviewed by Simon Fraser.
784
785         Adopt new CG API for canvas
786         https://bugs.webkit.org/show_bug.cgi?id=50591
787
788         * WebCoreSupport/WebSystemInterface.mm:
789
790 2010-10-28  MORITA Hajime  <morrita@google.com>
791
792         Reviewed by Ojan Vafai.
793
794         spellcheck does not check pasted text
795         https://bugs.webkit.org/show_bug.cgi?id=40092
796
797         Added asynchronous spell checking API to WebEditorClient using
798         -[NSSpellChecker requestCheckingOfString].
799         Note that WebEditorSpellCheckResponder is a small class to receive
800         requested spell-checking result. Note that this feature is
801         disabled at default.
802         
803         Also added [WebPreferences setAsynchronousSpellCheckingEnabled:] to 
804         enable the feature from LayoutTestController.
805
806         * WebCoreSupport/WebEditorClient.h:
807         * WebCoreSupport/WebEditorClient.mm:
808         (-[WebEditorSpellCheckResponder initWithSender:WebCore::sequence:results:]):
809         (-[WebEditorSpellCheckResponder perform]):
810         (toCoreSpellingResult):
811         (-[WebEditorSpellCheckResponder WTF::WebCore::]):
812         (WebEditorClient::requestCheckingOfString):
813         * WebView/WebPreferenceKeysPrivate.h:
814         * WebView/WebPreferences.mm:
815         (+[WebPreferences initialize]):
816         (-[WebPreferences setAsynchronousSpellCheckingEnabled:]):
817         (-[WebPreferences asynchronousSpellCheckingEnabled]):
818         * WebView/WebPreferencesPrivate.h:
819         * WebView/WebView.mm:
820         (-[WebView _preferencesChangedNotification:]):
821
822 2010-12-09  Anders Carlsson  <andersca@apple.com>
823
824         Fix a bug uncovered by clang++.
825
826         * WebView/WebHTMLView.mm:
827         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
828
829 2010-12-09  Anders Carlsson  <andersca@apple.com>
830
831         Clang++ build fixes.
832
833         Silence a couple of warnings.
834
835         * WebView/WebFrame.mm:
836         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
837         (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
838         * WebView/WebTextCompletionController.mm:
839         (-[WebTextCompletionController filterKeyDown:]):
840
841 2010-12-09  David Hyatt  <hyatt@apple.com>
842
843         Reviewed by Dan Bernstein.
844
845         https://bugs.webkit.org/show_bug.cgi?id=48545, Home/End, PgUp, PgDown should respect
846         writing-mode.  This first part of the patch just patches Mac WebKit 1 views.
847
848         * WebView/WebFrameView.mm:
849         (-[WebFrameView _isVerticalDocument]):
850         (-[WebFrameView _isFlippedDocument]):
851         (-[WebFrameView _scrollToEndOfDocument]):
852         (-[WebFrameView _pageInBlockProgressionDirection:]):
853         (-[WebFrameView scrollPageUp:]):
854         (-[WebFrameView scrollPageDown:]):
855
856 2010-12-08  Andy Estes  <aestes@apple.com>
857
858         Reviewed by Darin Adler.
859
860         Enable pre-HTML5 parser quirks for Apple Mail.app
861         https://bugs.webkit.org/show_bug.cgi?id=50727
862
863         * WebView/WebView.mm:
864         (-[WebView _needsPreHTML5ParserQuirks]): Return true if the embedding
865         application is Mail.app.
866
867 2010-12-08  Brian Weinstein  <bweinstein@apple.com>
868
869         Reviewed by John Sullivan.
870
871         REGRESSION: r73429-r73490: Some Contextual menu items non-functional, such as Open Link in New Tab
872         https://bugs.webkit.org/show_bug.cgi?id=50683
873         
874         If our context menu item already has an action, don't overwrite the action with the context menu
875         forwarder.
876
877         * WebView/WebHTMLView.mm:
878         (setMenuItemTarget):
879
880 2010-12-08  Anders Carlsson  <andersca@apple.com>
881
882         Remove an unused variable.
883
884         * WebView/WebDynamicScrollBarsView.mm:
885         (-[WebDynamicScrollBarsView setScrollOrigin:updatePosition:]):
886
887 2010-12-07  Brian Weinstein  <bweinstein@apple.com>
888
889         Reviewed by John Sullivan.
890
891         Layering Violation in ContextMenu - member variable of type HitTestResult
892         https://bugs.webkit.org/show_bug.cgi?id=50586
893         
894         Update users of ContextMenu and ContextMenuController to match where the new functions 
895         are located.
896
897         * WebCoreSupport/WebContextMenuClient.mm:
898         (WebContextMenuClient::getCustomMenuFromDefaultItems):
899         (WebContextMenuClient::contextMenuItemSelected):
900         * WebView/WebHTMLView.mm:
901         (-[WebMenuTarget validateMenuItem:]):
902
903 2010-12-07  Brian Weinstein  <bweinstein@apple.com>
904
905         Reviewed by John Sullivan.
906
907         Part of Layering Violation in ContextMenu
908         https://bugs.webkit.org/show_bug.cgi?id=50586
909         
910         Move WebMenuTarget from ContextMenuMac to here, because having it in ContextMenuMac
911         was a layering violation. Also, make sure we set the menu item targets for all menu
912         items before showing them, because the ContextMenu constructor doesn't do that anymore.
913
914         * WebView/WebHTMLView.mm:
915         (+[WebMenuTarget sharedMenuTarget]): Moved from ContextMenuMac.mm.
916         (-[WebMenuTarget WebCore::]): Ditto.
917         (-[WebMenuTarget setMenuController:WebCore::]): Ditto.
918         (-[WebMenuTarget forwardContextMenuAction:]): Ditto.
919         (-[WebMenuTarget validateMenuItem:]): Ditto.
920
921         (setMenuItemTarget): Sets the target of the NSMenuItem to the shared WebMenuTarget.
922         (setMenuTargets): Recursively iterates over all NSMenuItems in an NSMenu (including
923             submenus), and calls setMenuItemTarget on them.
924         (-[WebHTMLView menuForEvent:]): Call setMenuTarget on all the menu items before adding
925             them to the menu.
926
927 2010-12-06  Darin Adler  <darin@apple.com>
928
929         Reviewed by Sam Weinig.
930
931         Pass security origin to make local file decision correctly
932         https://bugs.webkit.org/show_bug.cgi?id=48603
933
934         * WebView/WebPDFView.mm:
935         (-[WebPDFView PDFViewWillClickOnLink:withURL:]): Pass security origin.
936
937 2010-12-07  Martin Robinson  <mrobinson@igalia.com>
938
939         Unreviewed, rolling out r73392.
940         http://trac.webkit.org/changeset/73392
941         https://bugs.webkit.org/show_bug.cgi?id=50489
942
943         This commit caused crashes on the GTK+ bots
944
945         * WebView/WebFrame.mm:
946         (-[WebFrame _canProvideDocumentSource]):
947
948 2010-12-07  Kenichi Ishibashi  <bashi@google.com>
949
950         Reviewed by Kent Tamura.
951
952         Let HTMLObjectElement be a form associated element
953         https://bugs.webkit.org/show_bug.cgi?id=48821
954
955         Modified to use FormAssociatedElement instead of HTMLFormControlElement.
956
957         * WebView/WebHTMLRepresentation.mm:
958         (-[WebHTMLRepresentation elementWithName:inForm:]): Modified to use
959         FormAssociatedElement instead of HTMLFormControlElement.
960         (-[WebHTMLRepresentation controlsInForm:]): Ditto.
961
962 2010-12-06  Nate Chapin  <japhet@chromium.org>
963
964         Reviewed by Adam Barth.
965
966         Update calls to DocumentWriter.
967         https://bugs.webkit.org/show_bug.cgi?id=50489
968
969         * WebView/WebFrame.mm:
970         (-[WebFrame _canProvideDocumentSource]):
971
972 2010-12-06  Chris Marrin  <cmarrin@apple.com>
973
974         Reviewed by Simon Fraser.
975
976         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
977         https://bugs.webkit.org/show_bug.cgi?id=49388
978
979         Got rid of GraphicsLayer::nativeLayer() call, replacing it with 
980         GraphicsLayer::platformLayer().
981
982         * WebCoreSupport/WebChromeClient.mm:
983         (WebChromeClient::attachRootGraphicsLayer):
984
985 2010-12-04  Dan Bernstein  <mitz@apple.com>
986
987         Reviewed by Sam Weinig.
988
989         WebKit part of <rdar://problem/8145955> Add text search API for counting/marking/highlighting matches in a range
990         https://bugs.webkit.org/show_bug.cgi?id=50530
991
992         * WebView/WebDocumentInternal.h: Added a DOMRange parameter to -countMatchesForText:options:limit:markMatches:
993         * WebView/WebHTMLView.mm:
994         (-[WebHTMLView countMatchesForText:inDOMRange:options:limit:markMatches:]): Added DOMRange parameter,
995         which is passed through to WebCore.
996         * WebView/WebPDFView.mm:
997         (isFrameInRange): Added this helper function.
998         (-[WebPDFView countMatchesForText:inDOMRange:options:limit:markMatches:]): Added DOMRange parameter and
999         a check if the frame is in the range.
1000         * WebView/WebView.mm:
1001         (-[WebView countMatchesForText:options:highlight:limit:markMatches:]): Now calls the inDOMRange: version.
1002         (-[WebView countMatchesForText:inDOMRange:options:highlight:limit:markMatches:]): Added DOMRange
1003         parameter, which is passed to document views' -countMatchesForText:inDOMRange:options:limit:markMatches:.
1004         * WebView/WebViewPrivate.h:
1005
1006 2010-12-03  Sam Weinig  <sam@webkit.org>
1007
1008         Reviewed by Maciej Stachowiak.
1009
1010         Enable <a ping> for Mac/Windows/WebKit2 builds
1011         <rdar://problem/8504473>
1012         https://bugs.webkit.org/show_bug.cgi?id=50488
1013
1014         * WebView/WebPreferences.mm:
1015         (+[WebPreferences initialize]): Enable "HyperlinkAuditing" by default.
1016
1017 2010-12-03  Jia Pu  <jpu@apple.com>
1018
1019         Reviewed by Darin Adler.
1020
1021         Need to move all code that applies correction into correction panel callback.
1022         https://bugs.webkit.org/show_bug.cgi?id=50426
1023         <rdar://problem/8720832>
1024
1025         * WebCoreSupport/WebEditorClient.h: Adopted new signature of dismissCorrectionPanel.
1026
1027         * WebCoreSupport/WebEditorClient.mm:
1028         (WebEditorClient::~WebEditorClient): Adopted new signature of dismissCorrectionPanel.
1029         (WebEditorClient::showCorrectionPanel): Added more user dictionary learning code.
1030         (WebEditorClient::dismissCorrectionPanel): Adopted new signature of dismissCorrectionPanel.
1031
1032 2010-12-02  Simon Fraser  <simon.fraser@apple.com>
1033
1034         Revert r73217 and r73227 because of continued bustage.
1035
1036         * WebCoreSupport/WebChromeClient.mm:
1037         (WebChromeClient::attachRootGraphicsLayer):
1038
1039 2010-12-02  Chris Marrin  <cmarrin@apple.com>
1040
1041         Reviewed by Simon Fraser.
1042
1043         Share code between Mac (CA) and Windows (CACF) GraphicsLayer implementations
1044         https://bugs.webkit.org/show_bug.cgi?id=49388
1045
1046         Got rid of GraphicsLayer::nativeLayer() call, replacing it with 
1047         GraphicsLayer::platformLayer().
1048
1049         * WebCoreSupport/WebChromeClient.mm:
1050         (WebChromeClient::attachRootGraphicsLayer):
1051
1052 2010-12-02  Mark Rowe  <mrowe@apple.com>
1053
1054         Reviewed by Beth Dakin.
1055
1056         <rdar://problem/8708730> Objects reported as being leaked due to lack of autorelease pool
1057
1058         * Misc/WebNSFileManagerExtras.m:
1059         (setMetaData): Create an autorelease pool for the duration of the thread body.
1060
1061 2010-12-02  John Knottenbelt  <jknotten@chromium.org>
1062
1063         Reviewed by Steve Block.
1064
1065         Move requestGeolocationPermissionForFrame to GeolocationClient
1066         https://bugs.webkit.org/show_bug.cgi?id=50061
1067
1068         This change facilitates client-based geolocation implementation by
1069         bringing together permission control into the geolocation client
1070         interface.
1071
1072         Move method ChromeClient::requestGeolocationPermissionForFrame to
1073         GeolocationClient::requestPermission, and supporting class
1074         WebGeolocationPolicyListener. The moved code is unchanged except
1075         that requestPermission now takes only one argument (Geolocation*)
1076         and the Frame parameter is retrieved from the Geolocation object.
1077
1078         * WebCoreSupport/WebChromeClient.h:
1079         * WebCoreSupport/WebChromeClient.mm:
1080         * WebCoreSupport/WebGeolocationClient.h:
1081         (WebGeolocationClient::cancelPermissionRequest):
1082         * WebCoreSupport/WebGeolocationClient.mm:
1083         (WebGeolocationClient::requestPermission):
1084         (-[WebGeolocationPolicyListener initWithGeolocation:]):
1085         (-[WebGeolocationPolicyListener allow]):
1086         (-[WebGeolocationPolicyListener deny]):
1087
1088 2010-12-02  Joseph Pecoraro  <joepeck@webkit.org>
1089
1090         Reviewed by Eric Carlson.
1091
1092         Style Fixes in WebPluginController
1093         https://bugs.webkit.org/show_bug.cgi?id=50397
1094
1095         * Plugins/WebPluginController.mm:
1096         (-[WebPluginController startAllPlugins]):
1097         (-[WebPluginController stopAllPlugins]):
1098
1099 2010-12-02  John Sullivan  <sullivan@apple.com>
1100
1101         Reviewed by Adam Roben.
1102         
1103         Slightly speculative fix for:
1104
1105         <rdar://problem/8712674>
1106         <https://bugs.webkit.org/show_bug.cgi?id=50393>
1107         setStringValue: sometimes called with nil in [WebAuthenticationPanel setUpForChallenge]        
1108
1109         * Panels/WebAuthenticationPanel.m:
1110         (-[WebAuthenticationPanel setUpForChallenge:]):
1111         If the realm is nil, use @"" instead.
1112
1113 2010-12-01  Jia Pu  <jpu@apple.com>
1114
1115         Reviewed by Darin Adler.
1116
1117         Support multiple correction candidates panel for misspelled word on Mac OS X.
1118         https://bugs.webkit.org/show_bug.cgi?id=50137
1119         <rdar://problem/8568059>
1120
1121         This patch is for supporting multiple correction suggestion panel on Mac OS X.
1122         The behavior and implementation is similar to that of reversion candiate panel.
1123
1124         * WebCoreSupport/WebEditorClient.h: Adopted new signatures defined in base class.
1125
1126         * WebCoreSupport/WebEditorClient.mm:  Adopted new signatures defined in base class.
1127           Added code to handle new multiple suggestion canidate panel type.
1128         (WebEditorClient::showCorrectionPanel):
1129         (WebEditorClient::getGuessesForWord):
1130
1131 2010-12-01  David Hyatt  <hyatt@apple.com>
1132
1133         Reviewed by Darin Adler.
1134
1135         https://bugs.webkit.org/show_bug.cgi?id=46645
1136         
1137         Part 1 of making scrolling work with vertical text. This patch generalizes the scrollOriginX concept
1138         recently added for horizontal RTL documents and applies it to writing modes as well.  Now the
1139         scrollOrigin is a point, since you can start off locked to the bottom or locked to the right.
1140         
1141         This patch also fixes numerous bugs with the scrollOrigin code using native Mac NSScrollViews and
1142         makes them behave the same as the cross-platform code (allowing for cross-platform results to be
1143         landed).
1144
1145         * WebView/WebDynamicScrollBarsView.mm:
1146         (-[WebDynamicScrollBarsView adjustForScrollOriginChange]):
1147         (-[WebDynamicScrollBarsView updateScrollers]):
1148         (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
1149         (-[WebDynamicScrollBarsView setScrollOrigin:updatePosition:]):
1150         (-[WebDynamicScrollBarsView scrollOrigin]):
1151         * WebView/WebFrameView.mm:
1152         (-[WebFrameView _scrollToBeginningOfDocument]):
1153         (-[WebFrameView _scrollToEndOfDocument]):
1154
1155 2010-11-29  Dan Bernstein  <mitz@apple.com>
1156
1157         Reviewed by Darin Adler.
1158
1159         WebKit Mac part of <rdar://problem/8650085> adding word-prefix search options to the text search API.
1160         https://bugs.webkit.org/show_bug.cgi?id=50038
1161         Based on a patch from Darin Adler.
1162
1163         * WebView/WebDocumentInternal.h: Removed -markAllMatchesForText:caseSensitive:limit: and
1164         replaced -countMatchesForText:caseSensitive:limit:markMatches: with a WebFindOptions-based
1165         method. Declared a WebDocumentOptionsSearching protocol with a new -findString:options:
1166         method. Made WebHTMLView conform to the new protocol.
1167         * WebView/WebHTMLView.mm:
1168         (coreOptions): Added. Converts WebFindOptions to WebCore FindOptions.
1169         (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]): Changed to use
1170         -findString:options:.
1171         (-[WebHTMLView countMatchesForText:options:limit:markMatches:]): Changed to use WebFindOptions.
1172         (-[WebHTMLView findString:options:]): Added. Calls through to WebCore::Editor::findString().
1173         * WebView/WebPDFView.mm:
1174         (-[WebPDFView countMatchesForText:options:limit:markMatches:]): Changed to use WebFindOptions.
1175         * WebView/WebView.mm:
1176         (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]): Now calls through to
1177         -countMatchesForText:options:highlight:limit:markMatches.
1178         (-[WebView countMatchesForText:caseSensitive:highlight:limit:markMatches:]): Ditto.
1179         (-[WebView searchFor:direction:caseSensitive:wrap:startInSelection:]): Now calls through to
1180         -findString:options:.
1181         (incrementFrame): Changed to use WebFindOptions.
1182         (findString): Added this helper method that performs the search using the best supported
1183         method for the document view.
1184         (-[WebView findString:options:]): Changed -searchFor::::: into this.
1185         (-[WebView canMarkAllTextMatches]):
1186         (-[WebView countMatchesForText:options:highlight:limit:markMatches:]): Updated to use
1187         WebFindOptions.
1188         (-[WebView unmarkAllTextMatches]): Updated for change to incrementFrame.
1189         (-[WebView rectsForTextMatches]): Ditto.
1190         * WebView/WebViewPrivate.h: Added WebFindOptions, -findString:options:, and WebFindOptions version
1191         of countMatchesForText:.
1192
1193 2010-11-29  Jeremy Moskovich  <jeremy@chromium.org>
1194
1195         Reviewed by David Hyatt.
1196
1197         Right-to-left pages should be scrollable to reveal left overflow.
1198         https://bugs.webkit.org/show_bug.cgi?id=23556
1199
1200         Set and get the original x-axis scroll position and reset scroll position on HOME/END key press.
1201         Modify WebFrameView to support setting the initial horizontal scroller's thumb position to the right for
1202         pages with a left overflow.
1203
1204         * WebView/WebDynamicScrollBarsView.h:
1205         * WebView/WebDynamicScrollBarsView.mm:
1206         (-[WebDynamicScrollBarsView inProgramaticScroll]):
1207         (-[WebDynamicScrollBarsView refreshInitialScrollbarPosition]):
1208         (-[WebDynamicScrollBarsView updateScrollers]):
1209         (-[WebDynamicScrollBarsView reflectScrolledClipView:]):
1210         (-[WebDynamicScrollBarsView setScrollOriginX:]):
1211         (-[WebDynamicScrollBarsView scrollOriginX]):
1212         * WebView/WebFrameView.mm:
1213         (-[WebFrameView _scrollToBeginningOfDocument]):
1214         (-[WebFrameView _scrollToEndOfDocument]):
1215         * WebView/WebHTMLView.mm:
1216         (-[WebHTMLView _frameOrBoundsChanged]):
1217
1218 2010-11-22  Ryosuke Niwa  <rniwa@webkit.org>
1219
1220         Reviewed by Tony Chang.
1221
1222         SelectionController::typingStyle() should return EditingStyle*
1223         https://bugs.webkit.org/show_bug.cgi?id=49813
1224
1225         Changed the return value of SelectionController::typingStyle() to EditingStyle*.
1226         Also added SelectionController::copyTypingStyle() to copy the typing style
1227         as an instance of CSSMutableStyleDeclaration.
1228
1229         No tests are added since this is no behavioral change.
1230
1231         * WebView/WebFrame.mm:
1232         (-[WebFrame _typingStyle]): Calls SelectionController::copyTypingStyle()
1233
1234 2010-11-19  Michael Saboff  <msaboff@apple.com>
1235
1236         Reviewed by Sam Weinig
1237
1238         Remove DOMSVGAnimatedPathData.h from all: target to fix build.
1239
1240         * MigrateHeaders.make:
1241
1242 2010-11-19  Nikolas Zimmermann  <nzimmermann@rim.com>
1243
1244         Reviewed by Dirk Schulze.
1245
1246         Convert SVGPathSeg/SVGPathSegList to the new SVGPropertyTearOff concept
1247         https://bugs.webkit.org/show_bug.cgi?id=49580
1248
1249         * WebView/WebRenderLayer.mm: Add missing StyledElement.h include.
1250
1251 2010-11-18  Mark Rowe  <mrowe@apple.com>
1252
1253         Rubber-stamped by Adam Roben.
1254
1255         <rdar://problem/8602509&8602717&8602724> Enable compaction support.
1256
1257         * Configurations/WebKit.xcconfig:
1258
1259 2010-11-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1260
1261         Unreviewed, rolling out r72288.
1262         http://trac.webkit.org/changeset/72288
1263         https://bugs.webkit.org/show_bug.cgi?id=49730
1264
1265         'krit attempted to do that, but revert got stuck' (Requested
1266         by antonm on #webkit).
1267
1268         * WebView/WebRenderLayer.mm:
1269
1270 2010-11-17  Nikolas Zimmermann  <nzimmermann@rim.com>
1271
1272         Reviewed by Dirk Schulze.
1273
1274         Convert SVGPathSeg/SVGPathSegList to the new SVGPropertyTearOff concept
1275         https://bugs.webkit.org/show_bug.cgi?id=49580
1276
1277         * WebView/WebRenderLayer.mm: Add missing StyledElement.h include.
1278
1279 2010-11-16  Stephanie Lewis  <slewis@apple.com>
1280
1281         Reviewed by Geoff Garen.
1282
1283         <rdar://problem/8624267> Leak creating offscreen webview running fast/dom tests
1284
1285         Make a static provider for WebDeviceOrientationProviderMock.  The old code allocated a new WebDeviceOrientationProviderMock for 
1286         every WebView, and the WebKit API doesn't support that ownership model.
1287
1288         * WebView/WebDeviceOrientationProviderMock.h:
1289         * WebView/WebDeviceOrientationProviderMock.mm:
1290         (+[WebDeviceOrientationProviderMock shared]):
1291
1292 2010-11-16  Dave Hyatt  <hyatt@apple.com>
1293
1294         Reviewed by Dan Bernstein.
1295
1296         https://bugs.webkit.org/show_bug.cgi?id=11004
1297         
1298         font-size:0 is ignored.  Remove the minimum font size of 1 in CSSStyleSelector.
1299         Change the pref value for minimum font size from 1 to 0.  Make sure to never use the NSFont's size,
1300         since it doesn't honor a size of 0.  Instead pass the size in to the FontPlatformData(NSFont*) version
1301         of the constructor rather than using [NSFont pointSize].
1302
1303         https://bugs.webkit.org/show_bug.cgi?id=49582
1304         
1305         Negative leading is not handled correctly.  There are two bugs here.  The first is that
1306         maxAscent and maxDescent can be negative, so we need a notion of whether or not we have
1307         set them before so that we can allow them to be < 0.
1308         
1309         The second issue is that we should understand where fonts will end up relative to
1310         our baseline (excluding line height), and only allow those boxes to impact ascent and
1311         descent if the actual font box (without factoring in line height) is above or below the
1312         root line box baseline.
1313
1314         Added fast/css/negative-leading.html
1315         
1316         These two bug fixes have to land together to keep the Acid 3 test rendering correctly.
1317
1318         * Misc/WebKitNSStringExtras.mm:
1319         (-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]):
1320         (-[NSString _web_widthWithFont:]):
1321         * Misc/WebStringTruncator.mm:
1322         (fontFromNSFont):
1323         * WebView/WebPreferences.mm:
1324         (+[WebPreferences initialize]):
1325
1326 2010-11-16  Anders Carlsson  <andersca@apple.com>
1327
1328         Fix clang++ build.
1329
1330         * WebCoreSupport/WebFrameLoaderClient.mm:
1331
1332 2010-11-14  Kent Tamura  <tkent@chromium.org>
1333
1334         Reviewed by Andreas Kling.
1335
1336         KeyboardEvent::keyIdentifier() should return "const String&"
1337         https://bugs.webkit.org/show_bug.cgi?id=49426
1338
1339         * WebCoreSupport/WebEditorClient.mm:
1340         (selectorForKeyEvent):
1341           Change the type of a variable to have keyIdentifier(); String -> const String&
1342
1343 2010-11-12  John Knottenbelt  <jknotten@chromium.org>
1344
1345         Reviewed by Steve Block.
1346
1347         Rename GeolocationControllerClient to GeolocationClient.
1348         https://bugs.webkit.org/show_bug.cgi?id=49259
1349
1350         * WebCoreSupport/WebGeolocationClient.h: Renamed from WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.h.
1351         (WebGeolocationClient::webView):
1352         (WebGeolocationClient::setEnableHighAccuracy):
1353         * WebCoreSupport/WebGeolocationClient.mm: Renamed from WebKit/mac/WebCoreSupport/WebGeolocationControllerClient.mm.
1354         (WebGeolocationClient::WebGeolocationClient):
1355         (WebGeolocationClient::geolocationDestroyed):
1356         (WebGeolocationClient::startUpdating):
1357         (WebGeolocationClient::stopUpdating):
1358         (WebGeolocationClient::lastPosition):
1359         * WebKit.order:
1360         * WebView/WebView.mm:
1361         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
1362
1363 2010-11-10  Beth Dakin  <bdakin@apple.com>
1364
1365         Reviewed by Simon Fraser.
1366
1367         Fix for https://bugs.webkit.org/show_bug.cgi?id=49356 
1368         -[WebView _scaleWebView:] should take and origin and scroll the 
1369         document
1370         -and corresponding-
1371         <rdar://problem/8643921>
1372
1373         * WebView/WebView.mm:
1374         (-[WebView _scaleWebView:atOrigin:]):
1375         * WebView/WebViewPrivate.h:
1376
1377 2010-11-10  Csaba Osztrogonác  <ossy@webkit.org>
1378
1379         Reviewed by David Hyatt.
1380
1381         HTML5 Ruby support should be mandatory feature
1382         https://bugs.webkit.org/show_bug.cgi?id=49272
1383
1384         Remove Ruby as optional feature.
1385
1386         * Configurations/FeatureDefines.xcconfig:
1387
1388 2010-11-08  Ned Holbrook  <nholbrook@apple.com>
1389
1390         Reviewed by Adam Barth.
1391
1392         Avoid CFAttributedString creation in ComplexTextController by adopting UniChar provider SPI.
1393         https://bugs.webkit.org/show_bug.cgi?id=48886
1394
1395         * WebCoreSupport/WebSystemInterface.mm:
1396         (InitWebCoreSystemInterface):
1397
1398 2010-11-08  Nate Chapin  <japhet@chromium.org>
1399
1400         Unreviewed, build fix.
1401
1402         Clumsy typo in r71562.
1403
1404         * Plugins/Hosted/HostedNetscapePluginStream.mm:
1405         (WebKit::HostedNetscapePluginStream::start):
1406
1407 2010-11-08  Nate Chapin  <japhet@chromium.org>
1408
1409         Reviewed by Alexey Proskuryakov.
1410
1411         Interface changes in https://bugs.webkit.org/show_bug.cgi?id=27165
1412
1413         * Plugins/Hosted/HostedNetscapePluginStream.mm:
1414         (WebKit::HostedNetscapePluginStream::start): Move duplicate code into NetscapePluginStreamLoader
1415         * Plugins/WebNetscapePluginStream.mm:
1416         (WebNetscapePluginStream::start): Move duplicate code into NetscapePluginStreamLoader
1417         * WebView/WebView.mm:
1418         (-[WebView _dispatchPendingLoadRequests]): Use resourceLoadScheduler() instead of cache()->loader().
1419
1420 2010-11-08  Anders Carlsson  <andersca@apple.com>
1421
1422         Reviewed by Dan Bernstein.
1423
1424         Plug-in views should not assume that plugins are RenderEmbeddedObjects
1425         https://bugs.webkit.org/show_bug.cgi?id=49196
1426         <rdar://problem/8638467>
1427
1428         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1429         (-[WebHostedNetscapePluginView pluginHostDied]):
1430
1431 2010-11-08  Alexey Proskuryakov  <ap@apple.com>
1432
1433         Reviewed by Darin Adler.
1434
1435         https://bugs.webkit.org/show_bug.cgi?id=48685
1436         Notify UI process about focused frame
1437
1438         Added an empty implementation of the new ChromeClient method.
1439
1440         * WebCoreSupport/WebChromeClient.h:
1441         * WebCoreSupport/WebChromeClient.mm:
1442         (WebChromeClient::focusedFrameChanged):
1443
1444 2010-11-08  Anders Carlsson  <andersca@apple.com>
1445
1446         Build fix.
1447
1448         * MigrateHeaders.make:
1449
1450 2010-11-08  Anders Carlsson  <andersca@apple.com>
1451
1452         Reviewed by Adam Roben.
1453
1454         Remove use of HIGetScaleFactor
1455         https://bugs.webkit.org/show_bug.cgi?id=49186
1456         <rdar://problem/8618410>
1457
1458         Scale factors can vary on a display-by-display basis and it doesn't make sense
1459         to compute scale factor event coordinates like this.
1460
1461         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
1462         (getCarbonEvent):
1463
1464 2010-11-08  Simon Fraser  <simon.fraser@apple.com>
1465
1466         Reviewed by Sam Weinig.
1467
1468         Allow applets to participate in accelerated compositing
1469         https://bugs.webkit.org/show_bug.cgi?id=49117
1470         <rdar://problem/8625819>
1471         
1472         If Java is being loaded via the Netscape Plugin API, create a
1473         NetscapePluginWidget so that it has an implementation of platformLayer().
1474         
1475         Also clean up by using early returns.
1476
1477         * WebCoreSupport/WebFrameLoaderClient.mm:
1478
1479 2010-11-07  Adam Barth  <abarth@webkit.org>
1480
1481         Reviewed by Eric Seidel.
1482
1483         Rename Cache to MemoryCache
1484         https://bugs.webkit.org/show_bug.cgi?id=49159
1485
1486         * Misc/WebCache.mm:
1487         (+[WebCache statistics]):
1488         * WebCoreSupport/WebDeviceOrientationClient.mm:
1489         (WebDeviceOrientationClient::setController):
1490         * WebView/WebView.mm:
1491
1492 2010-11-05  Alexey Proskuryakov  <ap@apple.com>
1493
1494         Reviewed by Darin Adler.
1495
1496         https://bugs.webkit.org/show_bug.cgi?id=49100
1497         ASSERT([self window]) fails in -[WebBaseNetscapePluginView restartTimers]
1498
1499         * Plugins/WebBaseNetscapePluginView.mm: (-[WebBaseNetscapePluginView restartTimers]):
1500         Removed the assertion. Multiple callers provide no guarantee that the plug-in is still alive
1501         (see bug comments), and there seems to be no harm in executing this function in that case.
1502
1503 2010-11-05  Chris Marrin  <cmarrin@apple.com>
1504
1505         Reviewed by Simon Fraser.
1506
1507         Move resumeAnimations/suspendAnimations from Frame to AnimationController.
1508         https://bugs.webkit.org/show_bug.cgi?id=49073
1509
1510         * WebView/WebFrame.mm:
1511         (-[WebFrame _suspendAnimations]):
1512         (-[WebFrame _resumeAnimations]):
1513
1514 2010-11-04  Alexey Proskuryakov  <ap@apple.com>
1515
1516         Reviewed by Darin Adler.
1517
1518         https://bugs.webkit.org/show_bug.cgi?id=49008
1519         <rdar://problem/7906226> Frequent crashes on mail.yahoo.co.jp
1520
1521         Callers of NetscapePluginInstanceProxy::waitForReply() are not prepared to be deleted during
1522         the call, unless it returns 0. There are two reasons for NetscapePluginInstanceProxy to be
1523         deleted during wait:
1524         - plugin crashed;
1525         - plugin was stopped (e.g. due to a DOM modification performed by another reply that came in
1526         while waiting).
1527
1528         We didn't recognize the latter.
1529
1530         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1531         (WebKit::PluginDestroyDeferrer::~PluginDestroyDeferrer):
1532         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1533         (WebKit::NetscapePluginInstanceProxy::waitForReply):
1534         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1535         (WebKit::NetscapePluginInstanceProxy::didCallPluginFunction):
1536
1537 2010-11-05  Chris Marrin  <cmarrin@apple.com>
1538
1539         Reviewed by Simon Fraser.
1540
1541         Make suspendAnimations/resumeAnimations and setCSSAnimations traverse through subframes and remember state
1542         https://bugs.webkit.org/show_bug.cgi?id=46945
1543
1544         * WebView/WebFrame.mm:
1545         (-[WebFrame _suspendAnimations]):
1546         (-[WebFrame _resumeAnimations]):
1547
1548 2010-11-04  Jia Pu  <jpu@apple.com>
1549
1550         Reviewed by Dan Bernstein.
1551
1552         reversion bubble in WebViews
1553         https://bugs.webkit.org/show_bug.cgi?id=47630
1554         <rdar://problem/8530960>
1555
1556         This patch is to add reversion to correction panel. Please see WebCore/ChangeLog for detail.
1557
1558         * WebCoreSupport/WebEditorClient.h: Adopted new signature of base class method.
1559         * WebCoreSupport/WebEditorClient.mm: Adopted new signature of base class method. And code
1560           change to use new reversion API in AppKit.
1561         (WebEditorClient::WebEditorClient):
1562         (WebEditorClient::~WebEditorClient):
1563         (WebEditorClient::respondToChangedSelection):
1564         (WebEditorClient::showCorrectionPanel):
1565         (WebEditorClient::dismissCorrectionPanel):
1566         (WebEditorClient::isShowingCorrectionPanel):
1567
1568 2010-11-04  Mike Thole  <mthole@apple.com>
1569
1570         Reviewed by Dan Bernstein.
1571
1572         Title for images should use localized numerals
1573         https://bugs.webkit.org/show_bug.cgi?id=49017
1574
1575         * WebCoreSupport/WebPlatformStrategies.mm:
1576         (WebPlatformStrategies::imageTitle): Use localized numerals on Snow Leopard or newer.
1577
1578 2010-11-02  Daniel Bates  <dbates@rim.com>
1579
1580         Reviewed by Adam Barth.
1581
1582         For unnamed frames, window.name returns a generated name
1583         https://bugs.webkit.org/show_bug.cgi?id=6751
1584
1585         Part 1 of 2.
1586
1587         Substitute FrameTree::uniqueName() for FrameTree::name() in the Mac port. 
1588
1589         * WebView/WebFrame.mm:
1590         (-[WebFrame name]):
1591
1592 2010-11-01  Brady Eidson  <beidson@apple.com>
1593
1594         Reviewed by Anders Carlsson.
1595
1596         <rdar://problem/7660547> and https://bugs.webkit.org/show_bug.cgi?id=48699
1597         Context menu support for WebKit 2.
1598
1599         * WebCoreSupport/WebChromeClient.h:
1600         (WebChromeClient::showContextMenu):
1601
1602 2010-10-29  Daniel Bates  <dbates@rim.com>
1603
1604         No review, rolling out 70971.
1605         http://trac.webkit.org/changeset/70971
1606         https://bugs.webkit.org/show_bug.cgi?id=6751
1607
1608         Rolling out changeset 70971 <http://trac.webkit.org/changeset/70971> since
1609         it caused layout test failures on all bots. In particular, the
1610         child count in a generated frame name differs after this patch. We need
1611         to look into this further.
1612
1613         * WebView/WebFrame.mm:
1614         (-[WebFrame name]):
1615
1616 2010-10-28  Antonio Gomes  <agomes@rim.com>
1617
1618         Reviewed by Ojan Vafai.
1619
1620         Needs a "LinuxEditingBehavior", perhaps with a better name
1621         https://bugs.webkit.org/show_bug.cgi?id=36627
1622
1623         Added the corresponding GTK+ setting to WebCore's EditingUnixBehavior: WebKitEditingUnixBehavior.
1624
1625         * WebView/WebFrame.mm:
1626         (core):
1627         * WebView/WebPreferencesPrivate.h:
1628
1629 2010-10-29  Daniel Bates  <dbates@rim.com>
1630
1631         Reviewed by Adam Barth.
1632
1633         For unnamed frames, window.name returns a generated name
1634         https://bugs.webkit.org/show_bug.cgi?id=6751
1635
1636         Modified Mac-port to use FrameTree::uniqueName().
1637
1638         * WebView/WebFrame.mm:
1639         (-[WebFrame name]):
1640
1641 2010-10-29  Darin Adler  <darin@apple.com>
1642
1643         Reviewed by Sam Weinig.
1644
1645         Change BackForwardList clients to use BackForwardListImpl to prepare for further refactoring
1646         https://bugs.webkit.org/show_bug.cgi?id=48574
1647
1648         * History/WebBackForwardList.mm:
1649         Use BackForwardListImpl.
1650
1651 2010-10-29  Alexey Proskuryakov  <ap@apple.com>
1652
1653         Rubber-stamped by Sam Weinig.
1654
1655         Comment for usesDocumentViews explains it backwards. This flag is true in ToT, and we do
1656         create views for subframes.
1657
1658         * WebView/WebViewData.h: Double negation is better than a lie.
1659
1660 2010-10-27  Jer Noble  <jer.noble@apple.com>
1661
1662         Reviewed by Darin Adler.
1663
1664         Full screen video in Safari (still) exits full-screen if you switch to another 
1665         app on a multi-display system.
1666         https://bugs.webkit.org/show_bug.cgi?id=47364
1667         <rdar://problem/8382299>
1668         
1669         The FullScreen window does not technically close when it deactivates, but the 
1670         two NSWindows that make up the FullScreen feature should not hide when deactivated.
1671         
1672         * WebView/WebVideoFullscreenController.mm:
1673         (createBackgroundFullscreenWindow): Do not set hidesOnDeactivate.
1674         (-[WebVideoFullscreenWindow initWithContentRect:styleMask:backing:defer:]): Ditto.
1675         * WebView/WebVideoFullscreenHUDWindowController.mm:
1676         (-[WebVideoFullscreenHUDWindow initWithContentRect:styleMask:backing:defer:]): Ditto.
1677
1678 2010-10-29  Alexey Proskuryakov  <ap@apple.com>
1679
1680         Reviewed by Darin Adler.
1681
1682         https://bugs.webkit.org/show_bug.cgi?id=48576
1683         Let WebKit2 client know when a frame is a frameset
1684
1685         Added a blank implementation of the new FrameLoaderClient method.
1686
1687         * WebCoreSupport/WebFrameLoaderClient.h:
1688         * WebCoreSupport/WebFrameLoaderClient.mm:
1689         (WebFrameLoaderClient::dispatchDidBecomeFrameset):
1690
1691 2010-10-29  Csaba Osztrogonác  <ossy@webkit.org>
1692
1693         Reviewed by Adam Roben and David Kilzer.
1694
1695         Fix and cleanup of build systems
1696         https://bugs.webkit.org/show_bug.cgi?id=48342
1697
1698         * Configurations/FeatureDefines.xcconfig: Remove unnecessary ENABLE_SANDBOX.
1699
1700 2010-10-28  Dan Bernstein  <mitz@apple.com>
1701
1702         Reviewed by Mark Rowe.
1703
1704         LLVM compiler build fix
1705
1706         * Misc/WebDownload.mm:
1707         (-[WebDownload initWithRequest:delegate:]): Changed the delegate type from id to
1708         id<NSURLDownloadDelegate> to match the method signature in NSURLDownload.
1709
1710 2010-10-28  Ivan Krstić  <ike@apple.com>
1711
1712         Reviewed by Mark Rowe.
1713
1714         Remove unused experimental proxied panel interface.
1715         <rdar://problem/7237059>
1716
1717         * Plugins/Hosted/NetscapePluginHostManager.h:
1718         * Plugins/Hosted/NetscapePluginHostManager.mm:
1719         (WebKit::NetscapePluginHostManager::hostForPlugin):
1720         (WebKit::NetscapePluginHostManager::spawnPluginHost):
1721         (WebKit::NetscapePluginHostManager::instantiatePlugin):
1722         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1723         * Plugins/Hosted/WebKitPluginClient.defs:
1724         * Plugins/Hosted/WebKitPluginHost.defs:
1725         * WebCoreSupport/WebSystemInterface.mm:
1726         (InitWebCoreSystemInterface):
1727         * WebView/WebPreferenceKeysPrivate.h:
1728         * WebView/WebPreferences.mm:
1729         (+[WebPreferences initialize]):
1730         * WebView/WebPreferencesPrivate.h:
1731
1732 2010-10-27  Pratik Solanki  <psolanki@apple.com>
1733
1734         Reviewed by Darin Adler.
1735
1736         Improve memSize calculation in [WebView _setCacheModel]
1737         https://bugs.webkit.org/show_bug.cgi?id=48484
1738
1739         * WebView/WebView.mm:
1740         (roundUpToPowerOf2): Added. Utility function to calculate the nearest power of 2.
1741         (+[WebView _setCacheModel:]): Update memSize calculation to set it to the next
1742         bigger power of 2. Also update WebCore cache settings.
1743
1744 2010-10-26  Darin Adler  <darin@apple.com>
1745
1746         Reviewed by Sam Weinig.
1747
1748         WebKitTestRunner needs to support layoutTestController.dumpBackForwardList
1749         https://bugs.webkit.org/show_bug.cgi?id=42322
1750         rdar://problem/8193631
1751
1752         WebKitTestRunner needs to support layoutTestController.clearBackForwardList
1753         https://bugs.webkit.org/show_bug.cgi?id=42333
1754         rdar://problem/8193643
1755
1756         * History/WebBackForwardList.mm:
1757         (core): Return BackForwardListImpl.
1758         (kit): Take BackForwardListImpl.
1759         (-[WebBackForwardList initWithBackForwardList:]): Use BackForwardListImpl.
1760         (-[WebBackForwardList dealloc]): Ditto.
1761         (-[WebBackForwardList finalize]): Ditto.
1762         (-[WebBackForwardList description]): Ditto.
1763         (-[WebBackForwardList setPageCacheSize:]): Ditto.
1764         (-[WebBackForwardList pageCacheSize]): Ditto.
1765         * History/WebBackForwardListInternal.h: Ditto.
1766         * WebView/WebFrameView.mm:
1767         (-[WebFrameView keyDown:]): Ditto.
1768         * WebView/WebView.mm:
1769         (-[WebView initWithCoder:]): Ditto.
1770         (-[WebView encodeWithCoder:]): Ditto.
1771         (-[WebView backForwardList]): Ditto.
1772         (-[WebView setMaintainsBackForwardList:]): Ditto.
1773
1774 2010-10-27  Chris Rogers  <crogers@google.com>
1775
1776         Reviewed by Chris Marrin.
1777
1778         Add ENABLE_WEB_AUDIO feature enable flag (initially disabled) to build-webkit
1779         https://bugs.webkit.org/show_bug.cgi?id=48279
1780
1781         * Configurations/FeatureDefines.xcconfig:
1782
1783 2010-10-27  Beth Dakin  <bdakin@apple.com>
1784
1785         Reviewed by Darin Adler.
1786
1787         Fix for https://bugs.webkit.org/show_bug.cgi?id=48385 Add WebKit 
1788         SPI to scale a WebView
1789         -and corresponding-
1790         <rdar://problem/8107667>
1791
1792         This patch adds SPI to Mac WebKit that scales the page by the given 
1793         scale factor.
1794
1795         * WebView/WebView.mm:
1796         (-[WebView _scaleWebView:]):
1797         (-[WebView _viewScaleFactor]):
1798         * WebView/WebViewPrivate.h:
1799
1800 2010-10-27  Dan Bernstein  <mitz@apple.com>
1801
1802         Reviewed by Darin Adler.
1803
1804         REGRESSION (r70335): Incorrect article layout in Safari Reader
1805         https://bugs.webkit.org/show_bug.cgi?id=48436
1806
1807         * Misc/WebKitVersionChecks.h: Added WEBKIT_FIRST_VERSION_WITH_GET_MATCHED_CSS_RULES_RESTRICTIONS.
1808         * WebView/WebView.mm:
1809         (-[WebView _needsUnrestrictedGetMatchedCSSRules]): Added. Returns YES for Safari linked against
1810         versions of WebKit that did not have the cross-origin restrictions in getMatchedCSSRules().
1811         (-[WebView _preferencesChangedNotification:]): Call Settings::setCrossOriginCheckInGetMatchedCSSRulesDisabled()
1812         based on the above.
1813
1814 2010-10-18  Jer Noble  <jer.noble@apple.com>
1815
1816         Reviewed by Eric Carlson.
1817
1818         Safari fullscreen media element tickles when it should not.
1819         
1820         https://bugs.webkit.org/show_bug.cgi?id=47861
1821
1822         * WebView/WebVideoFullscreenController.mm:
1823         (-[WebVideoFullscreenController updatePowerAssertions]):
1824
1825 2010-10-26  Jenn Braithwaite  <jennb@chromium.org>
1826
1827         Reviewed by Dmitry Titov.
1828
1829         Resource tracking failure when trying to move a frame between documents
1830         https://bugs.webkit.org/show_bug.cgi?id=44713
1831
1832         * WebCoreSupport/WebFrameLoaderClient.h:
1833         * WebCoreSupport/WebFrameLoaderClient.mm:
1834         (WebFrameLoaderClient::didTransferChildFrameToNewDocument):
1835         Empty method.
1836         (WebFrameLoaderClient::transferLoadingResourceFromPage):
1837         Update resource tracking for a resource load that has been transferred
1838         to a new page.
1839
1840 2010-10-25  Oliver Hunt  <oliver@apple.com>
1841
1842         Reviewed by Gavin Barraclough.
1843
1844         Remove exec and globalData arguments from jsNumber
1845         https://bugs.webkit.org/show_bug.cgi?id=48270
1846
1847         Mechanical removal of exec parameter to jsNumber
1848
1849         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1850         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
1851         * Plugins/Hosted/ProxyInstance.mm:
1852         (WebKit::ProxyInstance::numberValue):
1853
1854 2010-10-24  Dan Bernstein  <mitz@apple.com>
1855
1856         Reviewed by Anders Carlsson.
1857
1858         Expose HitTestResult::absoluteMediaURL() via WebKit API
1859         https://bugs.webkit.org/show_bug.cgi?id=48219
1860
1861         * Misc/WebElementDictionary.mm:
1862         (+[WebElementDictionary initializeLookupTable]): Map WebElementMediaURLKey to
1863         _absoluteMediaURL.
1864         (-[WebElementDictionary _absoluteMediaURL]): Added. Returns absoluteMediaURL().
1865         * WebKit.exp: Export WebElementMediaURLKey.
1866         * WebView/WebView.mm: Define WebElementMediaURLKey.
1867         * WebView/WebViewPrivate.h: Declare WebElementMediaURLKey.
1868
1869 2010-10-24  Dan Bernstein  <mitz@apple.com>
1870
1871         Reviewed by Simon Fraser.
1872
1873         Removed deprecated methods from the WebHTMLHighlighter private protocol.
1874
1875         * WebCoreSupport/WebChromeClient.mm:
1876         (WebChromeClient::customHighlightRect): Call -highlightRectForLine:representedNode:
1877         unconditionally.
1878         (WebChromeClient::paintCustomHighlight): Call
1879         -paintHighlightForBox:onLine:behindText:entireLine:representedNode: unconditionally.
1880         * WebView/WebHTMLViewPrivate.h:
1881
1882 2010-10-23  Xan Lopez  <xlopez@igalia.com>
1883
1884         Reviewed by Sam Weinig.
1885
1886         Unify globalData APIs
1887         https://bugs.webkit.org/show_bug.cgi?id=47969
1888
1889         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1890         (WebKit::NetscapePluginInstanceProxy::evaluate):
1891         (WebKit::NetscapePluginInstanceProxy::invoke):
1892         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
1893         (WebKit::NetscapePluginInstanceProxy::construct):
1894         * WebView/WebScriptDebugDelegate.mm:
1895         (-[WebScriptCallFrame evaluateWebScript:]):
1896
1897 2010-10-23  David Kilzer  <ddkilzer@apple.com>
1898
1899         <http://webkit.org/b/48186> Remove unneeded WebHTMLRepresentationInternal.h header
1900
1901         Reviewed by Sam Weinig.
1902
1903         The only method defined in WebHTMLRepresentationInternal.h is
1904         also defined in WebHTMLRepresentation.h, so use that instead.
1905
1906         * WebView/WebHTMLRepresentationInternal.h: Removed.
1907
1908 2010-10-23  Alexey Proskuryakov  <ap@apple.com>
1909
1910         Reviewed by Anders Carlsson.
1911
1912         https://bugs.webkit.org/show_bug.cgi?id=48083
1913         <rdar://problem/8489082> Need WebKit2 API for private browsing (48083)
1914
1915         * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): Initialize the new method.
1916
1917 2010-10-22  Sam Weinig  <sam@webkit.org>
1918
1919         Reviewed by Anders Carlsson.
1920
1921         WebKit2 needs to pass the current event modifier flags when requesting a new window
1922         https://bugs.webkit.org/show_bug.cgi?id=48140
1923
1924         * WebCoreSupport/WebChromeClient.h:
1925         * WebCoreSupport/WebChromeClient.mm:
1926         (WebChromeClient::createWindow):
1927         * WebCoreSupport/WebFrameLoaderClient.h:
1928         * WebCoreSupport/WebFrameLoaderClient.mm:
1929         (WebFrameLoaderClient::dispatchCreatePage):
1930         Add NavigationAction parameter.
1931
1932 2010-10-21  Andy Estes  <aestes@apple.com>
1933
1934         Reviewed by Eric Carlson.
1935
1936         WebKit shouldn't load a plug-in based on file extension if a MIME type
1937         is specified.
1938         https://bugs.webkit.org/show_bug.cgi?id=48046
1939
1940         If a MIME type is specified in an object or embed element, and that MIME
1941         type isn't supported by an installed plug-in, WebKit shouldn't attempt
1942         to find a plug-in based on the file extension of the url attribute.
1943         Doing so can lead to cases where a plug-in is loaded that can't handle
1944         resources of the MIME type specified by the author.
1945
1946         * WebCoreSupport/WebFrameLoaderClient.mm:
1947         (WebFrameLoaderClient::createPlugin): Only check for a pluginPackage by
1948         extension if MIME type is the empty string.
1949
1950 2010-10-20  Simon Fraser  <simon.fraser@apple.com>
1951
1952         Reviewed by Dan Bernstein.
1953
1954         Composited elements drawn twice when WebView is layer-backed
1955         https://bugs.webkit.org/show_bug.cgi?id=48024
1956         <rdar://problem/7916580>
1957         
1958         When drawing content in a layer-backed WebView, WebFrame's test
1959         for drawing to a bitmap succeeded, causing us to paint flattened
1960         compositing layers into the view. They would also be rendered
1961         by the normal compositing path, resulting in double rendering.
1962         
1963         Fix this by detecting when the WebHTMLView is being drawn into
1964         a layer, and avoiding flattening in that case.
1965
1966         * WebView/WebFrame.mm:
1967         (-[WebFrame _showFlattenedCompositingLayers:]):
1968         (-[WebFrame _drawRect:contentsOnly:]):
1969         * WebView/WebHTMLView.mm:
1970         (-[WebHTMLView drawLayer:inContext:]):
1971         (-[WebHTMLView _web_isDrawingIntoLayer]):
1972         * WebView/WebHTMLViewInternal.h:
1973
1974 2010-10-20  Dumitru Daniliuc  <dumi@chromium.org>
1975
1976         Reviewed by David Levin.
1977
1978         Repost the DatabaseTracker notifications to the main thread, if needed.
1979         https://bugs.webkit.org/show_bug.cgi?id=40655
1980
1981         * Storage/WebDatabaseTrackerClient.mm:
1982         (DidModifyOriginData::dispatchToMainThread):
1983         (DidModifyOriginData::DidModifyOriginData):
1984         (DidModifyOriginData::dispatchDidModifyOriginOnMainThread):
1985         (WebDatabaseTrackerClient::dispatchDidModifyOrigin):
1986         (WebDatabaseTrackerClient::dispatchDidModifyDatabase):
1987
1988 2010-10-20  Simon Fraser  <simon.fraser@apple.com>
1989
1990         Reviewed by Darin Adler.
1991
1992         REGRESSION(r67568-r67643): Some HTML/CSS renders upside down and backwards on Leopard
1993         https://bugs.webkit.org/show_bug.cgi?id=47369
1994         
1995         r46947 added code that limits the size of the layer-backed view on Leopard when
1996         the page height exceeds 4096px (later adjusted to 2048px in r48401).
1997         
1998         Later, r67576 altered the geometry flipping behavior to push the geometry flipping
1999         down into WebKit. However, the code that adjusts the hosting layer's sublayer transform
2000         to account for layer-backed view size-limiting was not fixed at the same time.
2001         This change corrects that.
2002
2003         * WebView/WebHTMLView.mm:
2004         (-[WebHTMLView _updateLayerHostingViewPosition]):
2005
2006 2010-10-19  Simon Fraser  <simon.fraser@apple.com>
2007
2008         Reviewed by Dan Bernstein.
2009
2010         <rdar://problem/8508422> Compositing layers aren't always displayed correctly in layer-backed WebViews
2011         
2012         AppKit has some special code to prevent it meddling with view's layers
2013         under layer-backed WebViews. When a layer-backed WebView became composited,
2014         this caused our layer to remain zero-sized. Fix this by manually
2015         setting the geometry for our layer, if the WebHTMLView has a layer.
2016         
2017         This does not seem to be a problem if the WebView becomes layer-backed, or
2018         stops being layer-backed after the WebView starts using compositing.
2019
2020         * WebView/WebHTMLView.mm:
2021         (-[WebHTMLView attachRootLayer:]):
2022
2023 2010-10-20  Dirk Schulze  <krit@webkit.org>
2024
2025         Reviewed by Nikolas Zimmermann.
2026
2027         Merge ColorSpace and ImageColorSpace enums
2028         https://bugs.webkit.org/show_bug.cgi?id=47922
2029
2030         Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
2031         to follow webkit style rules.
2032
2033         * Misc/WebKitNSStringExtras.mm:
2034         (-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]):
2035
2036 2010-10-19  Alexey Proskuryakov  <ap@apple.com>
2037
2038         Reviewed by Anders Carlsson.
2039
2040         https://bugs.webkit.org/show_bug.cgi?id=47933
2041         <rdar://problem/8494337> navigator.language doesn't work in WebKit2
2042
2043         * Misc/WebNSUserDefaultsExtras.mm: Moved code for computing default language to WebCore.
2044         We need to keep _webkit_preferredLanguageCode for Safari.
2045
2046         * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface):
2047         Initialize wkCopyCFLocalizationPreferredName.
2048
2049         * WebCoreSupport/WebViewFactory.mm: Removed defaultLanguage. WebCore was the only caller.
2050
2051 2010-10-18  Alexey Proskuryakov  <ap@apple.com>
2052
2053         Reviewed by David Kilzer.
2054
2055         https://bugs.webkit.org/show_bug.cgi?id=47864
2056         Convert WebNSUserDefaultsExtras.m to .mm
2057
2058         Also, fixed some issues in the process:
2059         - removed locking, which was only necessary when this code was in Foundation;
2060         - fixed notification center observer to actually work (previously, it picked up changes
2061         when application preferences changed, not when system language did);
2062         - removed unused NSString category;
2063         - updated style.
2064
2065         * Misc/WebNSUserDefaultsExtras.m: Removed.
2066         * Misc/WebNSUserDefaultsExtras.mm: Copied from WebKit/mac/Misc/WebNSUserDefaultsExtras.m.
2067         (createHTTPStyleLanguageCode):
2068         (+[NSUserDefaults _webkit_defaultsDidChange]):
2069         (addLanguageChangeObserver):
2070         (+[NSUserDefaults _webkit_preferredLanguageCode]):
2071
2072 2010-10-18  Stuart Morgan  <stuartmorgan@chromium.org>
2073
2074         Reviewed by Eric Seidel.
2075
2076         Switch to using the new Carbon NPAPI event declarations, and remove
2077         the old ones.
2078
2079         https://bugs.webkit.org/show_bug.cgi?id=40784
2080
2081         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
2082         (WebNetscapePluginEventHandlerCarbon::mouseEntered):
2083         (WebNetscapePluginEventHandlerCarbon::mouseExited):
2084         (WebNetscapePluginEventHandlerCarbon::mouseMoved):
2085         (WebNetscapePluginEventHandlerCarbon::focusChanged):
2086
2087 2010-10-18  Pavel Podivilov  <podivilov@chromium.org>
2088
2089         Reviewed by Timothy Hatcher.
2090
2091         Web Inspector: disable private browsing for inspector
2092         https://bugs.webkit.org/show_bug.cgi?id=47827
2093
2094         * WebCoreSupport/WebInspectorClient.mm:
2095         (-[WebInspectorWindowController init]):
2096
2097 2010-10-14  Ilya Tikhonovsky  <loislo@chromium.org>
2098
2099         Reviewed by Pavel Feldman.
2100
2101         Web Inspector: inspector settings/properties/states management
2102         should be extracted into separate class.
2103
2104         We have a lot of flags/values in InspectorController.
2105         Some flags are persisting into profile.
2106         Others are part of inspector state for frontend.
2107         All these flags should keep their values after navigation.
2108         It'd be better to extract these flags/values into separate
2109         class which will care about theirs lifetime.
2110
2111         https://bugs.webkit.org/show_bug.cgi?id=47275
2112
2113         * WebCoreSupport/WebInspectorClient.mm:
2114         (-[WebInspectorWindowController showWindow:]):
2115         (-[WebInspectorWindowController attach]):
2116         (-[WebInspectorWindowController detach]):
2117
2118 2010-10-13  Gavin Barraclough  <barraclough@apple.com>
2119
2120         Reviewed by Oliver Hunt.
2121
2122         https://bugs.webkit.org/show_bug.cgi?id=43987
2123         Switch XMLHttpRequest, FileReader, and FileReaderSync to use a Stringbuilder
2124         to construct their internal result string.  Remove ScriptString (this is now
2125         redundant).
2126
2127         * WebCoreSupport/WebFrameLoaderClient.mm:
2128
2129 2010-10-12  Andy Estes  <aestes@apple.com>
2130
2131         Rubber-stamped by Darin Adler.
2132
2133         Check in some cleanup from the previous commit.
2134
2135         * WebView/WebView.mm:
2136         (leakMailQuirksUserScriptPath): Renamed to indicate that this function
2137         leaks an NSString.
2138         (-[WebView _injectMailQuirksScript]): Moved a static initialization from
2139         a separate class method into the only method that used it and removed
2140         the now-unnecessary class method.
2141
2142 2010-10-12  Eric Seidel  <eric@webkit.org>
2143
2144         Reviewed by Darin Adler.
2145
2146         REGRESSION (new parser): Leopard/Tiger Mail <head>/<body> quirk is gone
2147         https://bugs.webkit.org/show_bug.cgi?id=45693
2148
2149         Re-implement this former WebCore parser quirk as a
2150         Mac-only userscript-based quirk.  As far as I can tell
2151         from Darin's description this should satisfy Mail's needs.
2152
2153         * Misc/MailQuirksUserScript.js: Added.
2154         * WebView/WebView.mm:
2155         (+[WebView _mailQuirksUserScript]):
2156         (-[WebView _injectMailQuirksScript]):
2157         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
2158
2159 2010-10-12  Simon Fraser  <simon.fraser@apple.com>
2160
2161         Reviewed by Sam Weinig.
2162
2163         Add 'didDraw' callback for framerate tracking
2164         https://bugs.webkit.org/show_bug.cgi?id=47478
2165
2166         Add a callback at the end of -[WebHTMLView drawRect:] so
2167         a delegate can get notified when a draw happens.
2168         
2169         * WebView/WebHTMLView.mm:
2170         (-[WebHTMLView drawRect:]):
2171         * WebView/WebUIDelegatePrivate.h:
2172
2173 2010-10-11  Anders Carlsson  <andersca@apple.com>
2174
2175         Reviewed by Darin Adler.
2176
2177         Remove WebIconFetcher from WebKit and IconFetcher from WebCore
2178         https://bugs.webkit.org/show_bug.cgi?id=47523
2179
2180         Remove all traces of the WebKit WebIconFetcher class. It's SPI that nobody uses.
2181
2182         * Misc/WebIconFetcher.h: Removed.
2183         * Misc/WebIconFetcher.mm: Removed.
2184         * Misc/WebIconFetcherInternal.h: Removed.
2185         * WebView/WebFrame.mm:
2186         * WebView/WebFramePrivate.h:
2187
2188 2010-10-11  Jessie Berlin  <jberlin@apple.com>
2189
2190         Reviewed by Darin Adler.
2191
2192         Add Private API for creating a WebKit2 WebSerializedScriptValue from the internal
2193         representation of a WebKit1 WebSerializedJSValue.
2194         https://bugs.webkit.org/show_bug.cgi?id=47439
2195
2196         * WebView/WebSerializedJSValue.mm:
2197         (-[WebSerializedJSValue internalRepresentation]):
2198         * WebView/WebSerializedJSValuePrivate.h:
2199
2200 2010-10-07  Jessie Berlin  <jberlin@apple.com>
2201
2202         Reviewed by Sam Weinig.
2203
2204         Add Private API for creating a WebKit1 WebSerializedJSValue from the internal
2205         representation of a WebKit2 WebSerializedScriptValue.
2206         https://bugs.webkit.org/show_bug.cgi?id=47390
2207
2208         * WebView/WebSerializedJSValue.mm:
2209         (-[WebSerializedJSValue initWithInternalRepresentation:]):
2210         Set the WebSerializedJSValuePrivate's WebCore::SerializedScriptValue to be the passed in
2211         internal representation.
2212         * WebView/WebSerializedJSValuePrivate.h: Added.
2213
2214 2010-10-07  Antonio Gomes  <agomes@rim.com>
2215
2216         Reviewed by Simon Fraser.
2217
2218         [Mac] [DRT] implement setSpatialNavigationEnabled
2219         https://bugs.webkit.org/show_bug.cgi?id=47291
2220
2221         Added the needed bits to make it possible to enabled spatial navigation
2222         for the Mac port. For now it is being only used by DRT.
2223
2224         * WebView/WebPreferenceKeysPrivate.h:
2225         * WebView/WebPreferences.mm:
2226         (+[WebPreferences initialize]):
2227         (-[WebPreferences isSpatialNavigationEnabled]):
2228         (-[WebPreferences setSpatialNavigationEnabled:]):
2229         * WebView/WebPreferencesPrivate.h:
2230         * WebView/WebView.mm:
2231         (-[WebView _preferencesChangedNotification:]):
2232
2233 2010-10-07  Jer Noble  <jer.noble@apple.com>
2234
2235         Fix the Leopard 64-bit build.
2236
2237         * Configurations/WebKit.xcconfig: Add CoreServices.framework/Frameworks to the 
2238             framework search path.
2239         * WebView/WebVideoFullscreenController.mm: Explicitly import <OSStatus/Power.h>.
2240
2241 2010-10-06  Jer Noble  <jer.noble@apple.com>
2242
2243         Reviewed by Darin Adler.
2244
2245         Screensaver starts while watching fullscreen playback.
2246         https://bugs.webkit.org/show_bug.cgi?id=47299
2247         <rdar://problem/8478956>
2248
2249         To disable the Screen Saver, we need to periodically call UpdateSystemActivity().  
2250
2251         * WebView/WebVideoFullscreenController.h: Added _tickleTimer.
2252         * WebView/WebVideoFullscreenController.mm:
2253         (-[WebVideoFullscreenController dealloc]): Invalidate _tickleTimer.
2254         (-[WebVideoFullscreenController _enableTickleTimer]): Create _tickleTimer. 
2255         (-[WebVideoFullscreenController _disableTickleTimer]): Invalidate _tickleTimer.
2256         (-[WebVideoFullscreenController _tickleTimerFired]): Call UpdateSystemActivity().
2257         (-[WebVideoFullscreenController updatePowerAssertions]): Call _enableTickleTimer 
2258             or _disableTickleTimer.
2259
2260 2010-10-05  Philippe Normand  <pnormand@igalia.com>
2261
2262         Reviewed by Martin Robinson.
2263
2264         check for ENABLE(GLIB_SUPPORT) in WebView
2265         https://bugs.webkit.org/show_bug.cgi?id=46788
2266
2267         Use ENABLE(GLIB_SUPPORT) in WebView to guard the glib runloop observer.
2268
2269         * WebView/WebView.mm:
2270         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
2271         (-[WebView _close]):
2272         * WebView/WebViewData.h:
2273         * WebView/WebViewInternal.h:
2274
2275 2010-10-01  Anders Carlsson  <andersca@apple.com>
2276
2277         Fix Snow Leopard build.
2278
2279         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2280         (WebKit::NetscapePluginInstanceProxy::getProxy):
2281
2282 2010-10-01  Anders Carlsson  <andersca@apple.com>
2283
2284         Reviewed by Dan Bernstein.
2285
2286         Add proxy server query function proxyServersForURL and change the Mac plug-in code to use it
2287         https://bugs.webkit.org/show_bug.cgi?id=47022
2288         <rdar://problem/8504712>
2289
2290         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2291         (WebKit::NetscapePluginInstanceProxy::getProxy):
2292         * Plugins/WebBaseNetscapePluginView.h:
2293         * Plugins/WebBaseNetscapePluginView.mm:
2294         * Plugins/WebNetscapePluginView.mm:
2295         (-[WebNetscapePluginView getVariable:forURL:value:length:]):
2296
2297 2010-09-30  Darin Adler  <darin@apple.com>
2298
2299         Reviewed by Sam Weinig.
2300
2301         Remove remaining calls to deprecatedParseURL
2302         https://bugs.webkit.org/show_bug.cgi?id=26599
2303
2304         * DOM/WebDOMOperations.mm:
2305         (-[DOMDocument URLWithAttributeString:]):
2306         * WebCoreSupport/WebFrameLoaderClient.mm:
2307         (WebFrameLoaderClient::createPlugin):
2308         Call stripLeadingAndTrailingHTMLSpaces instead of deprecatedParseURL.
2309
2310 2010-09-30  Anders Carlsson  <andersca@apple.com>
2311
2312         Reviewed by Darin Adler.
2313
2314         -[DOMDocument _documentRange] throws an exception if there is no document element
2315         https://bugs.webkit.org/show_bug.cgi?id=46934
2316         <rdar://problem/8169260>
2317
2318         If there is no document element, just return an empty range. Otherwise we'll try to call
2319         Range::selectNode with a null Node which will throw a NOT_FOUND exception.
2320
2321         * DOM/WebDOMOperations.mm:
2322         (-[DOMDocument _documentRange]):
2323
2324 2010-09-30  Chris Marrin  <cmarrin@apple.com>
2325
2326         Reviewed by Simon Fraser.
2327
2328         Make 2D accelerated canvas rendering build on Mac
2329         https://bugs.webkit.org/show_bug.cgi?id=46007
2330         
2331         Added ACCELERATED_2D_CANVAS to FeatureDefines
2332
2333         * Configurations/FeatureDefines.xcconfig:
2334
2335 2010-09-30  Dan Bernstein  <mitz@apple.com>
2336
2337         Reviewed by John Sullivan.
2338
2339         Add printing SPI allowing full control over shrink-to-fit
2340         https://bugs.webkit.org/show_bug.cgi?id=46877
2341
2342         * WebView/WebHTMLView.mm:
2343         (-[WebHTMLView _beginPrintModeWithMinimumPageWidth:height:maximumPageWidth:]): Added.
2344         * WebView/WebHTMLViewPrivate.h:
2345
2346 2010-09-28  Johnny Ding  <jnd@chromium.org>
2347
2348         Reviewed by Adam Barth.
2349
2350         https://bugs.webkit.org/show_bug.cgi?id=41292
2351         Some windowed plugins did not handle events through EventHandler, so we
2352         never set right gesture state for those events.
2353         This change is to set right allowPopupsFromPlugin flag to current
2354         execution frame, so WeKit can always get right gesture state on Mac.
2355         From Mac Snow Leopard, the plugin is run under "WebKitPluginHost,app"
2356         process, that process passes the allowPopupsFromPlugin flag to
2357         WKPCEvaluate(in NetscapePluginHostProxy.mm), then flag is set in
2358         NetscapePluginInstanceProxy::evaluate.
2359
2360         * Plugins/WebNetscapePluginView.mm:
2361         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
2362
2363 2010-09-28  Jenn Braithwaite  <jennb@chromium.org>
2364
2365         Reviewed by Dmitry Titov.
2366
2367         Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument.
2368         https://bugs.webkit.org/show_bug.cgi?id=46663
2369
2370         * WebCoreSupport/WebFrameLoaderClient.h:
2371         * WebCoreSupport/WebFrameLoaderClient.mm:
2372         (WebFrameLoaderClient::didTransferChildFrameToNewDocument):
2373
2374 2010-09-26  Antonio Gomes  <agomes@rim.com>
2375
2376         Reviewed by Kenneth Rohde Christiansen.
2377
2378         DRT/Mac nodesFromRect support
2379
2380         [Mac][DRT] Implement LayoutTestController::nodesFromRect
2381         https://bugs.webkit.org/show_bug.cgi?id=46580
2382
2383         Implement nodesFromRect as a private method to access non-exposed Document
2384         methods, similarly to computedStyleIncludingVisitedInfo.
2385
2386         * WebView/WebView.mm: Added JSDocument.h and JSNodeList.h to the include list.
2387         These headers makes it possible to:
2388         1) Get a Document off of a JSDocument;
2389         2) Call toJS function, defined in JSNodeList.cpp|h so we can convert RefPtr<NodeList>
2390         gotten from Document::nodesFromRect to JS bindings.
2391         (-[WebView _nodesFromRect:forDocument:x:y:hPadding:vPadding:ignoreClipping:]):
2392         * WebView/WebViewPrivate.h: Added nodesFromRect method to access methods of the
2393         Document class not exposed to JavaScript. It works similarly to computedStyleIncludingVisitedInfo.
2394
2395 2010-09-24  Jia Pu  <jpu@apple.com>
2396
2397         Reviewed by Dan Bernstein.
2398
2399         automaticSpellingCorrectionEnabled isn't updated.
2400         https://bugs.webkit.org/show_bug.cgi?id=46486
2401         <rdar://problem/8475212>
2402
2403         * WebView/WebView.mm:
2404         (+[WebView initialize]): Should update "automaticSpellingCorrectionEnabled"
2405           instead of "automaticTextReplacementEnabled".
2406
2407 2010-09-23  Alexey Proskuryakov  <ap@apple.com>
2408
2409         Reviewed by Darin Adler.
2410
2411         https://bugs.webkit.org/show_bug.cgi?id=46380
2412         REGRESSION: Crash when downloading a file
2413
2414         Downloading cannot be tested in DRT.
2415
2416         * Misc/WebNSFileManagerExtras.m: (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]):
2417         Don't copy null strings.
2418
2419 2010-09-24  Ilya Tikhonovsky  <loislo@chromium.org>
2420
2421         Reviewed by Yury Semikhatsky.
2422
2423         Web Inspector: CRASH at node highlight on MAC Safari.
2424         1) run-safari --debug
2425         2) open inspector
2426         3) open elements panel
2427         4) hover mouse over elements panel items multiple times
2428         5) CRASH
2429         Looks like it is a race condition. WebNodeHighlightView doesn't check
2430         the pointer to WebNodeHighligh object and it can be nil.
2431
2432         https://bugs.webkit.org/show_bug.cgi?id=46261
2433
2434         * WebInspector/WebNodeHighlightView.mm:
2435         (-[WebNodeHighlightView drawRect:]):
2436
2437 2010-09-23  Andy Estes  <aestes@apple.com>
2438
2439         Reviewed by Darin Adler.
2440
2441         REGRESSION (r61285): some Dashboard widgets are always invisible due to
2442         HTML parser changes.
2443         https://bugs.webkit.org/show_bug.cgi?id=46435
2444
2445         Enable pre-HTML5 parser quirks if Dashboard is in backward compatibility
2446         mode.
2447
2448         * WebView/WebView.mm:
2449         (-[WebView _needsPreHTML5ParserQuirks]): Renamed from
2450         shouldUsePreHTML5ParserQuirks(). Return true if
2451         WebCore::Settings::usesDashboardCompatibilityMode() is true.
2452         (-[WebView _preferencesChangedNotification:]):
2453         (-[WebView _setDashboardBehavior:to:]): Enable pre-HTML5 parser quirks
2454         if Dashboard behavior is set to backward compatibility mode.
2455
2456 2010-09-23  Matthew Delaney  <mdelaney@apple.com>
2457
2458         Reviewed by Simon Fraser.
2459
2460         Reduce minimum DOMTimer interval
2461         https://bugs.webkit.org/show_bug.cgi?id=45362
2462
2463         * WebView/WebView.mm:
2464         Updating set interval call to use Settings' static version inside
2465         one time init block.
2466
2467 2010-09-22  Andy Estes  <aestes@apple.com>
2468
2469         Reviewed by Darin Adler.
2470
2471         REGRESSION (r61285): Microsoft Entourage 2008 does not invoke My Day window
2472         https://bugs.webkit.org/show_bug.cgi?id=46334
2473
2474         Microsoft My Day loads scripts using self-closing script tags, markup
2475         which is incompatible with the HTML5 parser. Enable parser quirks for
2476         this application.
2477
2478         * WebView/WebView.mm:
2479         (shouldUsePreHTML5ParserQuirks): Return true if the application is
2480         Microsoft My Day and was linked against a version of WebKit prior to the
2481         introduction of the HTML5 parser.
2482
2483 2010-09-23  Nate Chapin  <japhet@chromium.org>
2484
2485         Reviewed by Darin Fisher.
2486
2487         Add hyperlink auditing settings (i.e., <a ping>).
2488         https://bugs.webkit.org/show_bug.cgi?id=30458
2489
2490         * WebView/WebPreferenceKeysPrivate.h:
2491         * WebView/WebPreferences.mm:
2492         (+[WebPreferences initialize]):
2493         (-[WebPreferences setMemoryInfoEnabled:]):
2494         (-[WebPreferences hyperlinkAuditingEnabled]):
2495         (-[WebPreferences setHyperlinkAuditingEnabled:]):
2496         * WebView/WebPreferencesPrivate.h:
2497         * WebView/WebView.mm:
2498         (-[WebView _preferencesChangedNotification:]):
2499
2500 2010-09-22  Alexey Proskuryakov  <ap@apple.com>
2501
2502         Reviewed by Anders Carlsson.
2503
2504         https://bugs.webkit.org/show_bug.cgi?id=43667
2505         ASSERT failure in NetscapePluginInstanceProxy::disconnectStream
2506
2507         Test: plugins/get-javascript-url.html
2508
2509         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2510         (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript): Add the stream to m_streams, just
2511         like any other one.
2512
2513 2010-09-21  Darin Adler  <darin@apple.com>
2514
2515         Reviewed by Anders Carlsson.
2516
2517         Fix some Objective-C GC problems and use RetainPtr instead of HardRetain/Release
2518         https://bugs.webkit.org/show_bug.cgi?id=46220
2519
2520         * Misc/WebNSFileManagerExtras.m:
2521         (setMetaData): Use CFRelease instead of HardRelease.
2522         (-[NSFileManager _webkit_setMetadataURL:referrer:atPath:]): Use CFStringCreateCopy
2523         instead of -[NSObject copy] combined with HardRetainWithNSRelease.
2524
2525 2010-09-22  Balazs Kelemen  <kb@inf.u-szeged.hu>
2526
2527         Reviewed by Kenneth Rohde Christiansen.
2528
2529         PluginStrategy should satisfy the needs of Qt
2530         https://bugs.webkit.org/show_bug.cgi?id=45857
2531         No new functionality so no new tests.
2532
2533         * WebCoreSupport/WebPlatformStrategies.h:
2534         * WebCoreSupport/WebPlatformStrategies.mm:
2535         (WebPlatformStrategies::getPluginInfo):
2536
2537 2010-09-22  Paul Knight  <pknight@apple.com>
2538
2539         Reviewed by Simon Fraser.
2540
2541         -[WebView _scheduleCompositingLayerSync] should wake the run loop
2542         https://bugs.webkit.org/show_bug.cgi?id=46226
2543
2544         Call CFRunLoopWakeUp to make sure the run loop is not sleeping, which could delay layer painting.
2545
2546         * WebView/WebView.mm:
2547         (-[WebView _scheduleCompositingLayerSync]):
2548
2549 2010-09-21  Andy Estes  <aestes@apple.com>
2550
2551         Reviewed by Darin Adler.
2552
2553         REGRESSION (r61285): AIM 2.1.296: Code rendered as text in Welcome screen
2554         https://bugs.webkit.org/show_bug.cgi?id=46134
2555
2556         AIM clients linked against versions of WebKit prior to the introduction
2557         of the HTML5 parser contain markup incompatible with the new parser.
2558         Enable parser quirks in this case to remain compatible with these
2559         clients.
2560
2561         * WebView/WebView.mm:
2562         (shouldUsePreHTML5ParserQuirks): Returns true if the embedding
2563         application is AIM and was linked against a version of WebKit prior to
2564         the introduction of the HTML5 parser, or if the
2565         WebKitPreHTML5ParserQuirks WebPreference is enabled.
2566         (-[WebView _preferencesChangedNotification:]): Call
2567         WebCore::Settings::setUsePreHTML5ParserQuirks().
2568
2569 2010-09-21  Steve Block  <steveblock@google.com>
2570
2571         Reviewed by Jeremy Orlow.
2572
2573         DeviceOrientationClient and DeviceMotionClient should have controllerDestroyed() methods
2574         https://bugs.webkit.org/show_bug.cgi?id=45891
2575
2576         Implements WebDeviceOrientationClient::deviceOrientationControllerDestroyed to delete the client.
2577
2578         * WebCoreSupport/WebDeviceOrientationClient.h:
2579         * WebCoreSupport/WebDeviceOrientationClient.mm:
2580         (WebDeviceOrientationClient::deviceOrientationControllerDestroyed):
2581
2582 2010-09-20  Philippe Normand  <pnormand@igalia.com>
2583
2584         Reviewed by Eric Carlson.
2585
2586         [GTK] enhanced context menu for media elements
2587         https://bugs.webkit.org/show_bug.cgi?id=45021
2588
2589         New localized strings for the media element context-menu.
2590
2591         * WebCoreSupport/WebPlatformStrategies.h:
2592         * WebCoreSupport/WebPlatformStrategies.mm:
2593         (WebPlatformStrategies::contextMenuItemTagOpenVideoInNewWindow):
2594         (WebPlatformStrategies::contextMenuItemTagOpenAudioInNewWindow):
2595         (WebPlatformStrategies::contextMenuItemTagCopyVideoLinkToClipboard):
2596         (WebPlatformStrategies::contextMenuItemTagCopyAudioLinkToClipboard):
2597         (WebPlatformStrategies::contextMenuItemTagToggleMediaControls):
2598         (WebPlatformStrategies::contextMenuItemTagToggleMediaLoop):
2599         (WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen):
2600         (WebPlatformStrategies::contextMenuItemTagMediaPlay):
2601         (WebPlatformStrategies::contextMenuItemTagMediaPause):
2602         (WebPlatformStrategies::contextMenuItemTagMediaMute):
2603
2604 2010-09-20  Andy Estes  <aestes@apple.com>
2605
2606         Reviewed by Adam Barth.
2607
2608         REGRESSION (HTML5 Parser): Pages broken due to <tag<tag> parsing changes
2609         https://bugs.webkit.org/show_bug.cgi?id=40961
2610
2611         Implement WebKitUsePreHTML5ParserQuirks preference.
2612
2613         * WebView/WebPreferenceKeysPrivate.h:
2614         * WebView/WebPreferences.mm:
2615         (+[WebPreferences initialize]): Default WebKitUsePreHTML5ParserQuirks to
2616         false.
2617         (-[WebPreferences usePreHTML5ParserQuirks]):
2618         (-[WebPreferences setUsePreHTML5ParserQuirks:]):
2619         * WebView/WebPreferencesPrivate.h:
2620         * WebView/WebView.mm:
2621         (-[WebView _preferencesChangedNotification:]): Update WebCore::Settings
2622         with the value of WebKitUsePreHTML5ParserQuirks when a preference
2623         changes.
2624
2625 2010-09-20  Enrica Casucci  <enrica@apple.com>
2626
2627         Reviewed by Sam Weinig.
2628
2629         Pasteboard doesn't work in WebKit2.
2630         https://bugs.webkit.org/show_bug.cgi?id=42317
2631         <rdar://problem/7660537>
2632
2633         Some changes to fix style inconsistencies.
2634         Added OBJC 2.0 style enumeration.
2635         
2636         * WebCoreSupport/WebEditorClient.h:
2637         * WebCoreSupport/WebEditorClient.mm:
2638         (WebEditorClient::userVisibleString):
2639         (createExcludedElementsForAttributedStringConversion):
2640         (WebEditorClient::documentFragmentFromAttributedString): Changed parameter to be
2641         a Vector of RefPtr.
2642         (WebEditorClient::setInsertionPasteboard):
2643         (WebEditorClient::pasteboardTypesForSelection):
2644
2645 2010-09-17  David Hyatt  <hyatt@apple.com>
2646
2647         Reviewed by Simon Fraser.
2648
2649         https://bugs.webkit.org/show_bug.cgi?id=45993, convert printing to the new pagination model.
2650
2651         Make printing store the page height in the RenderView and push that into the layout state to
2652         use the new pagination model.  The old pagination model is retained because it is still used
2653         for embedded WebViews.
2654
2655         * WebView/WebHTMLView.mm:
2656         (-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]):
2657
2658 2010-09-17  Darin Adler  <darin@apple.com>
2659
2660         Reviewed by Sam Weinig.
2661
2662         REGRESSION (r60104): Zoom level is unexpectedly reset on page reload
2663         https://bugs.webkit.org/show_bug.cgi?id=42863
2664
2665         * WebView/WebView.mm:
2666         (-[WebView _setZoomMultiplier:isTextOnly:]):
2667         Call functions on Frame instead of FrameView.
2668
2669 2010-09-17  Matthew Delaney  <mdelaney@apple.com>
2670
2671         Reviewed by Simon Fraser.
2672
2673         Reduce minimum DOMTimer interval
2674         https://bugs.webkit.org/show_bug.cgi?id=45362
2675
2676         * WebView/WebView.mm: Added in a call to set the mimimum allowed DOMTimer to 4ms.
2677
2678 2010-09-17  Chris Marrin  <cmarrin@apple.com>
2679
2680         Reviewed by Simon Fraser.
2681
2682         Add WebKitAccelerated2dCanvasEnabled flag to WebKit for Mac
2683         https://bugs.webkit.org/show_bug.cgi?id=45911
2684
2685         * WebView/WebPreferenceKeysPrivate.h:
2686         * WebView/WebPreferences.mm:
2687         (+[WebPreferences initialize]):
2688         (-[WebPreferences accelerated2dCanvasEnabled]):
2689         (-[WebPreferences setAccelerated2dCanvasEnabled:]):
2690         * WebView/WebPreferencesPrivate.h:
2691         * WebView/WebView.mm:
2692         (-[WebView _preferencesChangedNotification:]):
2693
2694 2010-09-17  Jia Pu  <jpu@apple.com>
2695
2696         Reviewed by Dan Bernstein.
2697
2698         WebKit should use system wide spell checking preference when application specific one isn't set.
2699         https://bugs.webkit.org/show_bug.cgi?id=45789
2700         <rdar://problem/8416041>
2701
2702         * WebView/WebView.mm:
2703         (+[WebView initialize]): Use system wide autocorrection and text substitution preferences
2704           when the application level preferences are not set.
2705
2706 2010-09-16  John Sullivan  <sullivan@apple.com>
2707
2708         Reviewed by Darin Adler.
2709
2710         <rdar://problem/8395558>
2711         https://bugs.webkit.org/show_bug.cgi?id=45938
2712         _web_makePluginViewsPerformSelector:: mutates subviews array while iterating it
2713
2714         * WebView/WebHTMLView.mm:
2715         (-[WebHTMLView _web_makePluginSubviewsPerformSelector:withObject:]):
2716         Converted from -[NSArray _web_makePluginViewsPerformSelector:withObject:]. The old method
2717         was only ever called on the result of -[WebHTMLView subviews]. By moving that knowledge into
2718         this helper method, it can't be used incorrectly. Now it makes a copy of [WebHTMLView subviews]
2719         before enumerating it, to ensure that the selector can't mutate the array being enumerated.
2720         (-[WebHTMLView viewWillMoveToHostWindow:]):
2721         Updated for _web_makePluginSubviewsPerformSelector:: signature change.
2722         (-[WebHTMLView viewDidMoveToHostWindow]):
2723         Ditto.
2724
2725 2010-09-16  Darin Adler  <darin@apple.com>
2726
2727         Reviewed by Andreas Kling.
2728
2729         Reduce use of HTMLInputElement::inputType so we can remove it later
2730         https://bugs.webkit.org/show_bug.cgi?id=45903
2731
2732         * WebView/WebHTMLRepresentation.mm:
2733         (-[WebHTMLRepresentation elementDoesAutoComplete:]): Use isPasswordField.
2734         (-[WebHTMLRepresentation elementIsPassword:]): Use isPasswordField.
2735
2736 2010-09-16  Patrick Gansterer  <paroga@paroga.com>
2737
2738         Reviewed by Darin Adler.
2739
2740         Always use a valid string when setting WebKitUserStyleSheetLocationPreferenceKey.
2741         https://bugs.webkit.org/show_bug.cgi?id=41510
2742
2743         This prevents usage of nil value, which would cause an uncaught exception.
2744
2745         * WebView/WebPreferences.mm:
2746         (-[WebPreferences setUserStyleSheetLocation:]):
2747
2748 2010-09-16  Dan Bernstein  <mitz@apple.com>
2749
2750         Reverted the previous change because r67628 has been reverted.
2751
2752         * WebCoreSupport/WebPlatformStrategies.h:
2753         * WebCoreSupport/WebPlatformStrategies.mm:
2754
2755 2010-09-16  Dan Bernstein  <mitz@apple.com>
2756
2757         Build fix after r67628. Added context menu item localizable strings for the items
2758         added in r67628, following equivalent menu items in Mac OS X when possible. However,
2759         this set of menu items does not make much sense for Mac OS X, and this should be
2760         addressed separately.
2761
2762         * WebCoreSupport/WebPlatformStrategies.h:
2763         * WebCoreSupport/WebPlatformStrategies.mm:
2764         (WebPlatformStrategies::contextMenuItemTagOpenMediaInNewWindow):
2765         (WebPlatformStrategies::contextMenuItemTagCopyMediaLinkToClipboard):
2766         (WebPlatformStrategies::contextMenuItemTagToggleMediaControls):
2767         (WebPlatformStrategies::contextMenuItemTagToggleMediaLoop):
2768         (WebPlatformStrategies::contextMenuItemTagEnterVideoFullscreen):
2769         (WebPlatformStrategies::contextMenuItemTagMediaPlay):
2770         (WebPlatformStrategies::contextMenuItemTagMediaPause):
2771         (WebPlatformStrategies::contextMenuItemTagMediaMute):
2772         (WebPlatformStrategies::contextMenuItemTagMediaUnMute):
2773
2774 2010-09-16  Eric Uhrhane  <ericu@chromium.org>
2775
2776         Reviewed by Jian Li.
2777
2778         Unify FILE_SYSTEM and FILE_WRITER enables under the name FILE_SYSTEM.
2779         https://bugs.webkit.org/show_bug.cgi?id=45798
2780
2781         * Configurations/FeatureDefines.xcconfig:
2782
2783 2010-09-15  Simon Fraser  <simon.fraser@apple.com>
2784
2785         Reviewed by Adam Roben.
2786
2787         https://bugs.webkit.org/show_bug.cgi?id=44715
2788         maps.google.com flips upside down when zooming map using trackpad in WebKit2 on Mac
2789
2790         Move geometry flipping to platform-specific code.
2791
2792         * WebView/WebHTMLView.mm:
2793         (-[WebHTMLView attachRootLayer:]):
2794
2795 2010-09-14  Jia Pu  <jpu@apple.com>
2796
2797         Reviewed by Dan Bernstein.
2798
2799         Only intercept ESC key press when autocorrection UI is visible.
2800         https://bugs.webkit.org/show_bug.cgi?id=45071
2801
2802         * WebCoreSupport/WebEditorClient.h: Added declaration of isShowingCorrectionPanel(),
2803           which provides an inteface to query whether autocorrection panel is shown.
2804
2805         * WebCoreSupport/WebEditorClient.mm:
2806         (WebEditorClient::WebEditorClient): Defined a constant, InvalidCorrectionPanelTag,
2807           for invalid correction panel tag. Replaced -1 with this constant.
2808         (WebEditorClient::dismissCorrectionPanel): Ditto
2809         (WebEditorClient::isShowingCorrectionPanel): Query whether autocorrection panel is shown.
2810
2811 2010-09-14  Mark Rowe  <mrowe@apple.com>
2812
2813         Reviewed by John Sullivan.
2814
2815         Part of <rdar://problem/8420003>.  Make it possible to override the version number used in linked-in-or-after checks.
2816
2817         * Misc/WebKitVersionChecks.h: Remove two unused functions from the header and add a method to set the overriden version.
2818         * Misc/WebKitVersionChecks.m:
2819         (WebKitLinkedOnOrAfter):
2820         (setWebKitLinkTimeVersion): Set the overridden version.
2821         (WebKitLinkTimeVersion): Return the overridden version if set, otherwise do the old thing.
2822         * WebView/WebPreferences.mm:
2823         (+[WebPreferences setWebKitLinkTimeVersion:]): Call through to set the overridden version.
2824         * WebView/WebPreferencesPrivate.h:
2825
2826 2010-09-14  Eric Seidel  <eric@webkit.org>
2827
2828         Unreviewed, reverting changes r67451 and r67451.
2829         Broke lots of builders.
2830
2831         Only intercept ESC key press when autocorrection UI is visible.
2832         https://bugs.webkit.org/show_bug.cgi?id=45071
2833
2834         * WebCoreSupport/WebEditorClient.h:
2835         * WebCoreSupport/WebEditorClient.mm:
2836         (WebEditorClient::WebEditorClient):
2837         (WebEditorClient::dismissCorrectionPanel):
2838
2839 2010-09-14  Jia Pu  <jpu@apple.com>
2840
2841         Reviewed by Dan Bernstein.
2842
2843         Only intercept ESC key press when autocorrection UI is visible.
2844         https://bugs.webkit.org/show_bug.cgi?id=45071
2845
2846         * WebCoreSupport/WebEditorClient.h: Added declaration of isShowingCorrectionPanel(),
2847           which provides an inteface to query whether autocorrection panel is shown.
2848
2849         * WebCoreSupport/WebEditorClient.mm:
2850         (WebEditorClient::WebEditorClient): Defined a constant, InvalidCorrectionPanelTag,
2851           for invalid correction panel tag. Replaced -1 with this constant.
2852         (WebEditorClient::dismissCorrectionPanel): Ditto
2853         (WebEditorClient::isShowingCorrectionPanel): Query whether autocorrection panel is shown.
2854
2855 2010-09-13  Darin Adler  <darin@apple.com>
2856
2857         Reviewed by Adam Barth.
2858
2859         Preparation for eliminating deprecatedParseURL
2860         https://bugs.webkit.org/show_bug.cgi?id=45695
2861
2862         * DOM/WebDOMOperations.mm:
2863         (-[DOMDocument webFrame]): Get rid of unneeded local variable.
2864         (-[DOMDocument URLWithAttributeString:]): Remove unhelpful comment.
2865
2866 2010-09-13  Enrica Casucci  <enrica@apple.com>
2867
2868         Reviewed by Sam Weinig.
2869
2870         Paste should be implemented in WebCore like Copy and Cut for Mac also.
2871         https://bugs.webkit.org/show_bug.cgi?id=45494
2872         <rdar://problem/7660537>
2873
2874         On the Mac platform, the implementation of the paste operation is all done
2875         at the WebKit level. In order to support it on WebKit2 it is necessary to
2876         refactor the code and move this functionality at the level of WebCore like
2877         we already have on Windows.
2878         The original code relies on some in AppKit functions that call back into
2879         WebKit causing problems in WebKit2. All this functionality has been moved
2880         at the level of the editor client where it can be dealt with appropriately.
2881
2882         * WebCoreSupport/WebEditorClient.h:
2883         * WebCoreSupport/WebEditorClient.mm:
2884         (excludedElementsForAttributedStringConversion):
2885         (WebEditorClient::documentFragmentFromAttributedString): Added.
2886         (WebEditorClient::setInsertionPasteboard):
2887         * WebCoreSupport/WebFrameLoaderClient.h:
2888         * WebCoreSupport/WebFrameLoaderClient.mm:
2889         (WebFrameLoaderClient::canShowMIMETypeAsHTML): Re-implemented at the level
2890         of the editor client.
2891         * WebView/WebHTMLView.mm: Removed paste method.
2892
2893 2010-09-13  John Sullivan  <sullivan@apple.com>
2894
2895         Reviewed by Adam Roben.
2896
2897         https://bugs.webkit.org/show_bug.cgi?id=45677
2898         [WebView canMarkAllTextMatches] can crash if called after [WebView close]
2899         
2900         <rdar://problem/8404890>
2901
2902         * WebView/WebView.mm:
2903         (-[WebView canMarkAllTextMatches]):
2904         Return NO immediately if the webview has already been closed. This was an overlooked
2905         case from the fix for 45175.
2906
2907 2010-09-10  MORITA Hajime  <morrita@google.com>
2908
2909         Reviewed by Tony Chang.
2910
2911         [Chromium] Implement textInputController.hasSpellingMarker() for Chromium
2912         https://bugs.webkit.org/show_bug.cgi?id=45441
2913
2914         Moved the actual logic of hasSpellingMarker into WebCore to share
2915         it with other ports.
2916
2917         * WebView/WebFrame.mm:
2918         (-[WebFrame hasSpellingMarker:length:]):
2919
2920 2010-09-11  Adam Barth  <abarth@webkit.org>
2921
2922         Reviewed by Sam Weinig.
2923
2924         Make SecurityOrigin::canDisplay an instance function
2925         https://bugs.webkit.org/show_bug.cgi?id=45219
2926
2927         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2928         (WebKit::NetscapePluginInstanceProxy::loadRequest):
2929         * Plugins/WebNetscapePluginStream.mm:
2930         (WebNetscapePluginStream::WebNetscapePluginStream):
2931         * Plugins/WebNetscapePluginView.mm:
2932         (-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
2933         * Plugins/WebPluginContainerCheck.mm:
2934         (-[WebPluginContainerCheck _isForbiddenFileLoad]):
2935         * WebView/WebFrame.mm:
2936         (-[WebFrame _allowsFollowingLink:]):
2937
2938 2010-09-10  Sam Weinig  <sam@webkit.org>
2939
2940         Reviewed by Darin Adler.
2941
2942         Remove unnecessary constraint in WebCore of choosing either text zoom or full page zoom.
2943         Precursor to <rdar://problem/7660657>
2944         https://bugs.webkit.org/show_bug.cgi?id=45522
2945
2946         * WebView/WebView.mm:
2947         (-[WebView _preferencesChangedNotification:]):
2948         (-[WebView _setZoomMultiplier:isTextOnly:]):
2949         (-[WebView _realZoomMultiplierIsTextOnly]):
2950         * WebView/WebViewData.h:
2951         * WebView/WebViewData.mm:
2952         (-[WebViewPrivate init]):
2953         Move tracking of text only zoom here from WebCore.
2954
2955 2010-09-10  Stephanie Lewis  <slewis@apple.com>
2956
2957         Reviewed by Alexey Proskuryakov.
2958
2959         Refactor JavaScriptCore memory statistics so that WebKit doesn't need to know about the JIT and
2960         other implementation details of JavaScriptCore.  Necessary to fix PPC build.
2961         
2962         https://bugs.webkit.org/show_bug.cgi?id=45528
2963
2964         * Misc/WebCoreStatistics.mm:
2965         (+[WebCoreStatistics memoryStatistics]):
2966
2967 2010-09-10  Darin Adler  <darin@apple.com>
2968
2969         Reviewed by Sam Weinig.
2970
2971         Move some Dashboard stuff from WebCore to WebKit along with a bit more FrameMac cleanup
2972         https://bugs.webkit.org/show_bug.cgi?id=45582
2973
2974         * MigrateHeaders.make: Removed WebDashboardRegion.h from the set of header to copy.
2975
2976         * WebCoreSupport/WebChromeClient.mm:
2977         (WebChromeClient::dashboardRegionsChanged): Changed this to call
2978         -[WebView _dashboardRegions] so we don't have two copies of that code.
2979
2980         * WebView/WebDashboardRegion.h: Copied from WebCore/page/mac/WebDashboardRegion.h.
2981         * WebView/WebDashboardRegion.mm: Copied from WebCore/page/mac/WebDashboardRegion.m.
2982
2983         * WebView/WebView.mm:
2984         (-[WebView _dashboardRegions]): Moved the code from Frame::dashboardRegions here.
2985
2986 2010-09-10  Adam Barth  <abarth@webkit.org>
2987
2988         Reviewed by Darin Fisher.
2989
2990         Move code from WebKit-layer to DocumentLoader
2991         https://bugs.webkit.org/show_bug.cgi?id=45569
2992
2993         This code is the most confused, but now should be a bit cleaner.
2994         There's still a magical fake-setting for creating renderers that needs
2995         to be cleaned up, but we can do that in a separate patch.
2996
2997         * WebView/WebFrame.mm:
2998         (-[WebFrame _commitData:]):
2999         * WebView/WebFrameInternal.h:
3000         * WebView/WebHTMLRepresentation.mm:
3001         (-[WebHTMLRepresentation receivedData:withDataSource:]):
3002         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
3003
3004 2010-09-09  Darin Adler  <darin@apple.com>
3005
3006         Reviewed by Adam Barth.
3007
3008         Move functions from Frame to SelectionController as planned
3009         https://bugs.webkit.org/show_bug.cgi?id=45508
3010
3011         * WebView/WebFrame.mm:
3012         (-[WebFrame _selectionGranularity]):
3013         (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
3014         (-[WebFrame _typingStyle]):
3015         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
3016         * WebView/WebHTMLRepresentation.mm:
3017         (-[WebHTMLRepresentation currentForm]):
3018         * WebView/WebHTMLView.mm:
3019         (-[WebHTMLView jumpToSelection:]):
3020         (-[WebHTMLView centerSelectionInVisibleArea:]):
3021         (-[WebHTMLView _canSmartCopyOrDelete]):
3022         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
3023         (-[WebHTMLView selectionRect]):
3024         (-[WebHTMLView selectionTextRects]):
3025         (-[WebHTMLView selectionImageRect]):
3026         * WebView/WebView.mm:
3027         (-[WebView setEditable:]):
3028         Call functions on selection().
3029
3030 2010-09-10  Adam Barth  <abarth@webkit.org>
3031
3032         Reviewed by Eric Seidel.
3033
3034         Main resource bytes shouldn't bounce through FrameLoader
3035         https://bugs.webkit.org/show_bug.cgi?id=45496
3036
3037         Now return the bytes to the DocumentLoader.
3038
3039         Previously, we were checking the document for null.  However, Frame can
3040         never have a null document, so this check is no longer needed.
3041
3042         * WebView/WebFrame.mm:
3043         (-[WebFrame _addData:]):
3044
3045 2010-09-09  John Therrell  <jtherrell@apple.com>
3046
3047         Reviewed by Alexey Proskuryakov.
3048
3049         Added statistics sampling and reporting for JavaScriptCore's RegisterFile and ExecutableAllocator classes
3050         https://bugs.webkit.org/show_bug.cgi?id=45134
3051
3052         Added ability to enable new JavaScriptCore statistics sampling and reporting for RegisterFile 
3053         and ExecutableAllocator classes. Added reporting of JavaScriptCore's stack committed memory 
3054         and JIT code committed memory statistics to WebCoreStatistics memoryStatistics.
3055
3056         * Misc/WebCoreStatistics.mm:
3057         (+[WebCoreStatistics memoryStatistics]):
3058         Added statistics reporting for JSC RegisterFile and ExecutableAllocator.
3059
3060 2010-09-09  Jer Noble  <jer.noble@apple.com>
3061
3062         Reviewed by Mark Rowe.
3063
3064         Use of ENABLE macro in WebUIDelegatePrivate.h breaks use from outside WebKit
3065         <rdar://problem/8412657>
3066
3067         * WebView/WebUIDelegatePrivate.h: Use ENABLE_FULLSCREEN_API instead of ENABLE(FULLSCREEN_API)
3068
3069 2010-09-08  Darin Adler  <darin@apple.com>
3070
3071         Reviewed by Adam Barth.
3072
3073         Move functions from Frame to Editor as planned
3074         https://bugs.webkit.org/show_bug.cgi?id=45218
3075
3076         * WebView/WebFrame.mm:
3077         (-[WebFrame _selectedString]):
3078         (-[WebFrame _firstRectForDOMRange:]):
3079         (-[WebFrame _markDOMRange]):
3080         (-[WebFrame _setTypingStyle:withUndoAction:]):
3081         * WebView/WebHTMLRepresentation.mm:
3082         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
3083         * WebView/WebHTMLView.mm:
3084         (-[WebHTMLView _selectionStartFontAttributesAsRTF]):
3085         (-[WebHTMLView toggleBaseWritingDirection:]):
3086         (-[WebHTMLView searchFor:direction:caseSensitive:wrap:startInSelection:]):
3087         (-[WebHTMLView countMatchesForText:caseSensitive:limit:markMatches:]):
3088         (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]):
3089         (-[WebHTMLView markedTextMatchesAreHighlighted]):
3090         * WebView/WebView.mm:
3091         (-[WebView setEditable:]):
3092         Changed call sites to use editor().
3093
3094 2010-09-08  MORITA Hajime  <morrita@google.com>
3095
3096         Reviewed by Ojan Vafai.
3097
3098         spellcheck does not check pasted text
3099         https://bugs.webkit.org/show_bug.cgi?id=40092
3100
3101         Implemented async spell-check APIs on WebEditorClient.
3102         The implementations are using [NSSpellChecker requestCheckingOfString]
3103         which is available only on Mac OS 10.6 or later.
3104         
3105         Note that [NSSpellChecker requestCheckingOfString] could invoke
3106         the callback block on on of their worker thread, so we need to
3107         return the result to the main thread where WebCore is running.
3108         For that purpose, we made WebEditorSpellCheckResponder class.
3109         
3110         Test: editing/spelling/spellcheck-pasted-text-001.html
3111         
3112         * WebCoreSupport/WebEditorClient.h:
3113         * WebCoreSupport/WebEditorClient.mm:
3114         (WebEditorClient::isAsynchronousSpellCheckingEnabled): Added.
3115         (-[WebEditorSpellCheckResponder initWithSender:WebCore::sequence:results:]): Added.
3116         (-[WebEditorSpellCheckResponder perform]): Added.
3117         (WebEditorClient::requestCheckingOfString): Added.
3118         * WebView/WebFramePrivate.h:
3119
3120 2010-09-08  MORITA Hajime  <morrita@google.com>
3121
3122         Reviewed by Tony Chang.
3123
3124         spelling underline gets lost on backspace
3125         https://bugs.webkit.org/show_bug.cgi?id=41423
3126
3127         Switched to use a anchorNode of the selection instead of a focused
3128         node for finer control of node selection in spellingNode():
3129         With the focused node, we cannot select other nodes but the first
3130         child of that node. In some case, we need to inspect these.
3131
3132         The API is only for LayoutTests, and the change is compatible for
3133         existing test cases.
3134         
3135         * WebView/WebFrame.mm:
3136         (spellingNode):
3137
3138 2010-09-08  Adam Barth  <abarth@webkit.org>
3139
3140         Rubber-stamped by Eric Seidel.
3141
3142         Rename DocLoader to CachedResourceLoader because that's what it does.
3143
3144         * WebView/WebFrame.mm:
3145
3146 2010-09-07  Anders Carlsson  <andersca@apple.com>
3147
3148         Reviewed by Oliver Hunt.
3149
3150         Fix clang++ build.
3151
3152         * Misc/WebLocalizableStrings.h:
3153         Fix a struct/tag mismatch.
3154
3155         * WebView/WebDeviceOrientationProviderMock.mm:
3156         (-[WebDeviceOrientationProviderMock init]):
3157         Remove stray semicolon.
3158
3159         * WebView/WebViewData.h:
3160         Remove unused class forward declaration.
3161
3162 2010-09-07  Anders Carlsson  <andersca@apple.com>
3163
3164         Reviewed by Darin Adler.
3165
3166         <rdar://problem/8381749> -Wcast-align warning emitted when building with clang
3167
3168         Remove the -Wcast-align-warning since it isn't really useful, and clang is more aggressive about warning than gcc.
3169         
3170         * Configurations/Base.xcconfig:
3171
3172 2010-09-06  Adam Barth  <abarth@webkit.org>
3173
3174         Reviewed by Darin Adler.
3175
3176         Rename SecurityOrigin::canLoad to canDisplay
3177         https://bugs.webkit.org/show_bug.cgi?id=45214
3178
3179         Propagate name change.
3180
3181         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3182         (WebKit::NetscapePluginInstanceProxy::loadRequest):
3183         * Plugins/WebNetscapePluginStream.mm:
3184         (WebNetscapePluginStream::WebNetscapePluginStream):
3185         * Plugins/WebNetscapePluginView.mm:
3186         (-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
3187         * Plugins/WebPluginContainerCheck.mm:
3188         (-[WebPluginContainerCheck _isForbiddenFileLoad]):
3189         * WebView/WebFrame.mm:
3190         (-[WebFrame _allowsFollowingLink:]):
3191
3192 2010-09-03  Jesus Sanchez-Palencia  <jesus.palencia@openbossa.org>
3193
3194         Reviewed by Darin Adler.
3195
3196         Add NetworkingContext to avoid layer violations
3197         https://bugs.webkit.org/show_bug.cgi?id=42292
3198
3199         Add Mac's specific implementation of FrameNetworkingContext.
3200
3201         * WebCoreSupport/WebFrameLoaderClient.h:
3202         * WebCoreSupport/WebFrameLoaderClient.mm:
3203         * WebCoreSupport/WebFrameNetworkingContext.mm:
3204         (WebFrameNetworkingContext::needsSiteSpecificQuirks):
3205         (WebFrameNetworkingContext::localFileContentSniffingEnabled):
3206         (WebFrameNetworkingContext::scheduledRunLoopPairs):
3207         (WebFrameNetworkingContext::blockedError):
3208
3209 2010-09-03  John Sullivan  <sullivan@apple.com>
3210
3211         Reviewed by Dan Bernstein.
3212         
3213         https://bugs.webkit.org/show_bug.cgi?id=45175
3214         [WebView unmarkAllTextMatches] will crash if the webview is already closed
3215
3216         Made this and related methods robust against being called when the WebView is closed.
3217
3218         * WebView/WebView.mm:
3219         (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
3220         Bail out if the WebView is closed.
3221         (-[WebView countMatchesForText:caseSensitive:highlight:limit:markMatches:]):
3222         Ditto.
3223         (-[WebView unmarkAllTextMatches]):
3224         Ditto.
3225         (-[WebView rectsForTextMatches]):
3226         Ditto.
3227
3228 2010-09-03  Hironori Bono  <hbono@chromium.org>
3229
3230         Reviewed by Kent Tamura.
3231
3232         Adds textInputController.hasSpellingMarker() to avoid using pixel tests for spellchecking tests
3233         and implements it for Mac.
3234         https://bugs.webkit.org/show_bug.cgi?id=41832
3235
3236         * WebView/WebFrame.mm: Implemented [WebFrame hasSpellingMarker:length:].
3237         (spellingNode):
3238         (-[WebFrame hasSpellingMarker:length:]):
3239         * WebView/WebFramePrivate.h: Added [WebFrame hasSpellingMarker:length:] so TextInputController can use it.
3240
3241 2010-09-02  Yury Semikhatsky  <yurys@chromium.org>
3242
3243         Reviewed by Pavel Feldman.
3244
3245         REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
3246         https://bugs.webkit.org/show_bug.cgi?id=44230
3247
3248         * WebCoreSupport/WebInspectorClient.h:
3249         * WebCoreSupport/WebInspectorClient.mm:
3250         (WebInspectorFrontendClient::closeWindow):
3251         (WebInspectorFrontendClient::disconnectFromBackend):
3252         (-[WebInspectorWindowController windowShouldClose:]):
3253         (-[WebInspectorWindowController destroyInspectorView:]):
3254
3255 2010-09-02  Steve Block  <steveblock@google.com>
3256
3257         Reviewed by Adam Barth.
3258
3259         Hook up LayoutTestController.setMockDeviceOrientation() on Mac.
3260         https://bugs.webkit.org/show_bug.cgi?id=43181
3261
3262         This patch hooks up the mock device orientation client on Mac for use
3263         in DumpRenderTree.
3264
3265         The patch adds a new WebDeviceOrientationClient for Mac. This client acts
3266         as a proxy to either a real or mock device orientation provider, both of
3267         which implement a new WebDeviceOrientationProvider interface.
3268
3269         The provider is created by the embedder and passed to the WebView, from
3270         where WebDeviceOrientationClient can access it.
3271
3272         The mock provider, WebDeviceOrientationProviderMock, is a wrapper around
3273         the existing WebCore mock.
3274
3275         * WebCoreSupport/WebDeviceOrientationClient.h: Added.
3276         * WebCoreSupport/WebDeviceOrientationClient.mm: Added.
3277         (WebDeviceOrientationClient::WebDeviceOrientationClient):
3278         (WebDeviceOrientationClient::setController):
3279         (WebDeviceOrientationClient::startUpdating):
3280         (WebDeviceOrientationClient::stopUpdating):
3281         (WebDeviceOrientationClient::lastOrientation):
3282         * WebKit.exp:
3283         * WebView/WebDeviceOrientation.h: Added.
3284         * WebView/WebDeviceOrientation.mm: Added.
3285         (-[WebDeviceOrientation initWithCoreDeviceOrientation:WebCore::]):
3286         (core):
3287         (-[WebDeviceOrientation initWithCanProvideAlpha:alpha:canProvideBeta:beta:canProvideGamma:gamma:]):
3288         (-[WebDeviceOrientation dealloc]):
3289         * WebView/WebDeviceOrientationInternal.h: Added.
3290         * WebView/WebDeviceOrientationProvider.h: Added.
3291         * WebView/WebDeviceOrientationProviderMock.h: Added.
3292         * WebView/WebDeviceOrientationProviderMock.mm: Added.
3293         (-[WebDeviceOrientationProviderMockInternal setOrientation:]):
3294         (-[WebDeviceOrientationProviderMockInternal setController:]):
3295         (-[WebDeviceOrientationProviderMockInternal startUpdating]):
3296         (-[WebDeviceOrientationProviderMockInternal stopUpdating]):
3297         (-[WebDeviceOrientationProviderMockInternal lastOrientation]):
3298         (-[WebDeviceOrientationProviderMock init]):
3299         (-[WebDeviceOrientationProviderMock dealloc]):
3300         (-[WebDeviceOrientationProviderMock setOrientation:]):
3301         (-[WebDeviceOrientationProviderMock setController:]):
3302         (-[WebDeviceOrientationProviderMock startUpdating]):
3303         (-[WebDeviceOrientationProviderMock stopUpdating]):
3304         (-[WebDeviceOrientationProviderMock lastOrientation]):
3305         * WebView/WebDeviceOrientationProviderMockInternal.h: Added.
3306         * WebView/WebView.mm:
3307         (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
3308         (-[WebView _setDeviceOrientationProvider:]):
3309         (-[WebView _deviceOrientationProvider]):
3310         * WebView/WebViewData.h:
3311         * WebView/WebViewPrivate.h:
3312
3313 2010-09-01  Jia Pu  <jpu@apple.com>
3314
3315         Reviewed by Dan Bernstein.
3316
3317         Add support for autocorrection UI on Mac OS X.
3318         https://bugs.webkit.org/show_bug.cgi?id=44958
3319         <rdar://problem/7326847>
3320
3321         See detailed high level description in WebCore/ChangeLog.
3322
3323         * WebCoreSupport/WebEditorClient.h: Added new member methods declared in
3324           EditorClient. Added m_correctionPanelTag to store the ID of current autocorrection UI object.
3325
3326         * WebCoreSupport/WebEditorClient.mm:
3327         (WebEditorClient::WebEditorClient): Initialize m_correctionPanelTag.
3328         (WebEditorClient::~WebEditorClient): Make sure the autocorrection UI is
3329           dismissed before destroying the object.
3330         (WebEditorClient::respondToChangedSelection): Dismiss autocorrection UI whenever the selection changes.
3331         (WebEditorClient::showCorrectionPanel): Show autocorrection UI.
3332         (WebEditorClient::dismissCorrectionPanel): Dismiss autocorrection UI.
3333
3334 2010-09-01  Mark Rowe  <mrowe@apple.com>
3335
3336         Reviewed by Adam Roben.
3337
3338         <rdar://problem/8374711> WebKit needs to compile without access to QuickDraw private headers.
3339
3340         * Carbon/HIViewAdapter.m:
3341         * Carbon/HIWebView.mm:
3342         * Misc/QuickDrawCompatibility.h: Added.
3343         * Plugins/WebNetscapePluginView.mm:
3344
3345 2010-08-31  Dave Hyatt  <hyatt@apple.com>
3346
3347         Reviewed by Sam Weinig.
3348
3349         https://bugs.webkit.org/show_bug.cgi?id=44863, disentangle style recalc from layout, so that
3350         the former can occur in more places without having to do the latter.
3351
3352         Eliminate Mac-specific code for style re-application and recursive layout/style updating in 
3353         favor of the cross-platform code that all the other ports use.
3354
3355         * Carbon/HIWebView.mm:
3356         (Draw):
3357         * WebCoreSupport/WebFrameLoaderClient.mm:
3358         (WebFrameLoaderClient::forceLayout):
3359         * WebView/WebHTMLView.mm:
3360         (-[WebHTMLView _propagateDirtyRectsToOpaqueAncestors]):
3361         (-[WebHTMLView viewWillDraw]):
3362         (-[WebHTMLView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
3363         (-[WebHTMLView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
3364         (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
3365         (-[WebHTMLView reapplyStyles]):
3366         (-[WebHTMLView layoutToMinimumPageWidth:height:maximumPageWidth:adjustingViewSize:]):
3367         (-[WebHTMLView setNeedsToApplyStyles:]):
3368         (-[WebHTMLView _setPrinting:minimumPageWidth:height:maximumPageWidth:adjustViewSize:paginateScreenContent:]):
3369         (-[WebHTMLView _layoutIfNeeded]):
3370         (-[WebHTMLView _web_updateLayoutAndStyleIfNeededRecursive]):
3371         * WebView/WebHTMLViewInternal.h:
3372         * WebView/WebView.mm:
3373         (-[WebView _viewWillDrawInternal]):
3374
3375 2010-08-31  Sam Weinig  <sam@webkit.org>
3376
3377         Reviewed by Darin Adler.
3378
3379         Add ability to count text matches without marking
3380         https://bugs.webkit.org/show_bug.cgi?id=43996
3381
3382         Safari needs to be able to count text matches without triggering lots of repainting.
3383         Rename markAllMatchesForText: to countMatchesForText: and add a markMatches:
3384         parameter.  For backwards compatibility markAllMatchesForText: calls
3385         countMatchesForText: and passes YES for markMatches:.
3386
3387         * WebView/WebDocumentInternal.h:
3388         * WebView/WebHTMLView.mm:
3389         (-[WebHTMLView markAllMatchesForText:caseSensitive:limit:]):
3390         (-[WebHTMLView countMatchesForText:caseSensitive:limit:markMatches:]):
3391         * WebView/WebPDFView.mm:
3392         (-[WebPDFView markAllMatchesForText:caseSensitive:limit:]):
3393         (-[WebPDFView countMatchesForText:caseSensitive:limit:markMatches:]):
3394         * WebView/WebView.mm:
3395         (-[WebView markAllMatchesForText:caseSensitive:highlight:limit:]):
3396         (-[WebView countMatchesForText:caseSensitive:highlight:limit:markMatches:]):
3397         * WebView/WebViewPrivate.h:
3398
3399 2010-08-31  Darin Adler  <darin@apple.com>
3400
3401         Reviewed by Anders Carlsson.
3402
3403         * WebInspector/WebInspectorFrontend.mm:
3404         (-[WebInspectorFrontend initWithFrontendClient:]): Remove a stray semicolon.
3405
3406 2010-08-30  Mark Rowe  <mrowe@apple.com>
3407
3408         Reviewed by Darin Adler.
3409
3410         <rdar://problem/8369736> WebKit build fails.
3411
3412         Temporarily add some extra includes in order to get things building again until <rdar://problem/8374711> is addressed.
3413
3414         * Carbon/HIViewAdapter.m:
3415         * Carbon/HIWebView.mm:
3416         * Plugins/WebNetscapePluginView.mm:
3417
3418 2010-08-30  Andy Estes  <aestes@apple.com>
3419
3420         Reviewed by Darin Adler.
3421
3422         REGRESSION (r66156): Sites using AppleConnect for authentication fail to log in.
3423         https://bugs.webkit.org/show_bug.cgi?id=44865
3424
3425         After http://trac.webkit.org/changeset/66156, sites using the AppleConnect plug-in
3426         for authentication fail to log in. This is due to a bug in AppleConnect that r66156
3427         exposed, but since this will have a significant impact on users of WebKit nightly
3428         builds, a plugin-specific hack should be added while the underlying issue is being
3429         addressed.
3430
3431         * WebCoreSupport/WebFrameLoaderClient.mm:
3432         (WebFrameLoaderClient::createPlugin): Convert plug-in parameter names to lowercase
3433         if the plugin is of type 'application/x-snkp'.
3434
3435 2010-08-27  Jer Noble  <jer.noble@apple.com>
3436
3437         Reviewed by Eric Carlson.
3438
3439         text/plain non-video files cause <video> to hang (while reading them?)
3440         https://bugs.webkit.org/show_bug.cgi?id=44212
3441         
3442         Add the new WebKitSystemInterface function WKQTMovieDisableComponent to
3443         the initialization routine.
3444
3445         * WebCoreSupport/WebSystemInterface.mm:
3446         (InitWebCoreSystemInterface): Initialize WKQTMovieDisableComponent.
3447
3448 2010-08-30  Sheriff Bot  <webkit.review.bot@gmail.com>
3449
3450         Unreviewed, rolling out r66198.
3451         http://trac.webkit.org/changeset/66198
3452         https://bugs.webkit.org/show_bug.cgi?id=44856
3453
3454         It made tests crash on Qt bot (Requested by Ossy_ on #webkit).
3455
3456         * WebCoreSupport/WebInspectorClient.h:
3457         * WebCoreSupport/WebInspectorClient.mm:
3458         (WebInspectorFrontendClient::closeWindow):
3459         (-[WebInspectorWindowController windowShouldClose:]):
3460         (-[WebInspectorWindowController destroyInspectorView]):
3461
3462 2010-08-28  Darin Adler  <darin@apple.com>
3463
3464         Reviewed by Sam Weinig.
3465
3466         Make an internal method used by Apple Mail into SPI
3467         https://bugs.webkit.org/show_bug.cgi?id=44832
3468         rdar://problem/5748951
3469
3470         * WebView/WebFrame.mm:
3471         (-[WebFrame _smartInsertForString:replacingRange:beforeString:afterString:]): Moved this method
3472         from the internal section to the private section.
3473         * WebView/WebFrameInternal.h: Moved the method declaration out of here.
3474         * WebView/WebFramePrivate.h: Moved the method declaration in here.
3475
3476 2010-08-27  Jer Noble  <jer.noble@apple.com>
3477
3478         Reviewed by Eric Carlson.
3479
3480         Add JavaScript API to allow a page to go fullscreen.
3481         rdar://problem/6867795
3482
3483         Added chrome client overrides which support entering and exiting full screen.  A new preference has
3484         been added (setFullScreenEnabled:) to control at runtime whether full screen support is enabled 
3485         (defaults to disabled).  Added a new WebKitFullScreenListener callback object which notifies WebCore
3486         when the chrome has started/finished its full screen animation.
3487
3488         * Configurations/FeatureDefines.xcconfig:
3489         * WebCoreSupport/WebChromeClient.h:
3490         * WebCoreSupport/WebChromeClient.mm:
3491         (WebChromeClient::supportsFullscreenForElement):
3492         (WebChromeClient::enterFullscreenForElement):
3493         (WebChromeClient::exitFullscreenForElement):
3494         (-[WebKitFullScreenListener initWithElement:]):
3495         (-[WebKitFullScreenListener webkitWillEnterFullScreen]):
3496         (-[WebKitFullScreenListener webkitDidEnterFullScreen]):
3497         (-[WebKitFullScreenListener webkitWillExitFullScreen]):
3498         (-[WebKitFullScreenListener webkitDidExitFullScreen]):
3499         * WebView/WebPreferenceKeysPrivate.h:
3500         * WebView/WebPreferences.h:
3501         * WebView/WebPreferences.mm:
3502         (+[WebPreferences initialize]):
3503         (-[WebPreferences setFullScreenEnabled:]):
3504         (-[WebPreferences fullScreenEnabled]):
3505         * WebView/WebUIDelegatePrivate.h:
3506         * WebView/WebView.mm:
3507         (-[WebView _preferencesChangedNotification:]):
3508
3509 2010-08-27  David Hyatt  <hyatt@apple.com>
3510
3511         Reviewed by Simon Fraser.
3512
3513         https://bugs.webkit.org/show_bug.cgi?id=44788, implement HTML5-compliant doctype switching.
3514
3515         Rename the various modes to match the HTML5 specification:
3516             ParseMode -> CompatibilityMode
3517             CompatMode -> QuirksMode
3518             AlmostStrictMode -> LimitedQuirksMode
3519             StrictMode -> NoQuirksMode
3520             
3521         Remove the htmlHacks() accessor from RenderStyle and make rendering code just go to the document
3522         instead.  This makes switching modes avoid forcing all RenderStyles to detect as changed.
3523         
3524         Clean up user stylesheets to minimize style recalculation when the mode is switched.
3525         
3526         Fix bugs with the propagation of correct modes in the HTML5 parser.  Make sure the
3527         dummy document created for fragment parsing properly inherits the real document's CompatibilityMode.
3528         Make sure the tree builder properly changes the insertion mode to "BeforeHTML" after handling
3529         a doctype token.
3530         
3531         determineParseMode -> setCompatibilityModeFromDoctype, and it now implements the HTML5 algorithm
3532         precisely.
3533
3534         * WebView/WebView.mm:
3535         (-[WebView _preferencesChangedNotification:]):
3536
3537 2010-08-27  Yury Semikhatsky  <yurys@chromium.org>
3538
3539         Reviewed by Pavel Feldman.
3540
3541         REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
3542         https://bugs.webkit.org/show_bug.cgi?id=44230
3543
3544         * WebCoreSupport/WebInspectorClient.h:
3545         * WebCoreSupport/WebInspectorClient.mm:
3546         (WebInspectorFrontendClient::closeWindow):
3547         (WebInspectorFrontendClient::disconnectFromBackend):
3548         (-[WebInspectorWindowController windowShouldClose:]):
3549         (-[WebInspectorWindowController destroyInspectorView:]):
3550
3551 2010-08-26  Yury Semikhatsky  <yurys@chromium.org>
3552
3553         Unreviewed. Revert r66103 since Qt tests are failing.
3554
3555         * WebCoreSupport/WebInspectorClient.h:
3556         * WebCoreSupport/WebInspectorClient.mm:
3557         (WebInspectorFrontendClient::closeWindow):
3558         (-[WebInspectorWindowController windowShouldClose:]):
3559         (-[WebInspectorWindowController destroyInspectorView]):
3560
3561 2010-08-26  Yury Semikhatsky  <yurys@chromium.org>
3562
3563         Reviewed by Pavel Feldman.
3564
3565         REGRESSION: Crash occurs at objc_msgSend when closing a window that is displaying the web inspector
3566         https://bugs.webkit.org/show_bug.cgi?id=44230
3567
3568         * WebCoreSupport/WebInspectorClient.h:
3569         * WebCoreSupport/WebInspectorClient.mm:
3570         (WebInspectorFrontendClient::closeWindow):
3571         (WebInspectorFrontendClient::disconnectFromBackend):
3572         (-[WebInspectorWindowController windowShouldClose:]):
3573         (-[WebInspectorWindowController destroyInspectorView:]):
3574
3575 2010-08-24  Eric Seidel  <eric@webkit.org>
3576
3577         Reviewed by Adam Barth.
3578
3579         Remove HTML5 parser testing infrastructure now that we don't need it
3580         https://bugs.webkit.org/show_bug.cgi?id=44581
3581
3582         * WebView/WebPreferenceKeysPrivate.h:
3583         * WebView/WebPreferences.mm:
3584         (+[WebPreferences initialize]):
3585         * WebView/WebPreferencesPrivate.h:
3586         * WebView/WebView.mm:
3587         (-[WebView _preferencesChangedNotification:]):
3588