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