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