Expose -[WebPluginPackage bundle] as SPI
[WebKit-https.git] / Source / WebKit / mac / ChangeLog
1 2013-10-15  Andy Estes  <aestes@apple.com>
2
3         Expose -[WebPluginPackage bundle] as SPI
4         https://bugs.webkit.org/show_bug.cgi?id=122814
5
6         Reviewed by Anders Carlsson.
7
8         * Plugins/WebPluginPackage.mm:
9         (-[WebPluginPackage bundle]): Defined.
10         * Plugins/WebPluginPackagePrivate.h: Declared bundle as a method in a
11         category on NSObject.
12
13 2013-10-12  Darin Adler  <darin@apple.com>
14
15         Get rid of the toHTMLElement helper for casting FormAssociatedElement to HTMLElement
16         https://bugs.webkit.org/show_bug.cgi?id=122713
17
18         Reviewed by Sam Weinig.
19
20         * WebView/WebHTMLRepresentation.mm:
21         (-[WebHTMLRepresentation elementWithName:inForm:]): Use asHTMLElement.
22         (-[WebHTMLRepresentation controlsInForm:]): Ditto.
23
24 2013-10-12  Adam Roben  <aroben@webkit.org>
25
26         WebViews inside OS X screen savers have large caches, but should not
27         https://bugs.webkit.org/show_bug.cgi?id=122604
28
29         We use WebCacheModelDocumentViewer by default for apps linked against
30         modern WebKit, and WebCacheModelDocumentBrowser for apps linked
31         against legacy WebKit. ScreenSaverEngine.app doesn't link against
32         WebKit at all, and thus falls into the legacy case by accident because
33         NSVersionOfLinkTimeLibrary("WebKit") returns -1.
34
35         But WebViews inside screen savers are almost certainly not being used
36         as browsers, so this large-ish cache specified by
37         WebCacheModelDocumentBrowser is wasteful. This is likely true for all
38         apps that don't directly link against WebKit, so now we use
39         WebCacheModelDocumentViewer by default for those apps.
40
41         Reviewed by Darin Adler.
42
43         * WebView/WebPreferences.mm:
44         (cacheModelForMainBundle): Use WebCacheModelDocumentViewer by default
45         for apps that don't link against WebKit directly. Also converted to
46         use @autoreleasepool {} and early returns while I was in here.
47
48 2013-10-12  Alexey Proskuryakov  <ap@apple.com>
49
50         Add a feature define for SubtleCrypto
51         https://bugs.webkit.org/show_bug.cgi?id=122683
52
53         Reviewed by Anders Carlsson.
54
55         * Configurations/FeatureDefines.xcconfig:
56
57 2013-10-12  Darin Adler  <darin@apple.com>
58
59         Use unique_ptr instead of delete in a few places
60         https://bugs.webkit.org/show_bug.cgi?id=122639
61
62         Reviewed by Anders Carlsson.
63
64         * History/WebHistory.mm:
65         (-[WebHistoryPrivate init]): Use make_unique.
66         (-[WebHistoryPrivate dealloc]): Don't delete.
67         (-[WebHistoryPrivate finalize]): Don't delete.
68         (-[WebHistoryPrivate data]): Use get.
69
70         * WebCoreSupport/WebFrameNetworkingContext.mm:
71         (privateSession): Use NeverDestroyed here instead of a raw pointer.
72         (WebFrameNetworkingContext::ensurePrivateBrowsingSession): Use the
73         new function instead of direct global variable access.
74         (WebFrameNetworkingContext::destroyPrivateBrowsingSession): Ditto.
75         (WebFrameNetworkingContext::storageSession): Ditto.
76
77         * WebView/WebFrame.mm:
78         (-[WebFramePrivate dealloc]): Don't delete.
79         (-[WebFramePrivate finalize]): Don't delete.
80         (-[WebFrame _attachScriptDebugger]): Use make_unique.
81         (-[WebFrame _detachScriptDebugger]): Don't delete.
82         * WebView/WebFrameInternal.h: Use unique_ptr.
83
84 2013-10-11  Timothy Hatcher  <timothy@apple.com>
85
86         Remove preference support for picking the old Web Inspector.
87         https://bugs.webkit.org/show_bug.cgi?id=122655
88
89         Reviewed by Alexey Proskuryakov.
90
91         * WebCoreSupport/WebInspectorClient.mm:
92         (WebInspectorFrontendClient::localizedStringsURL):
93         (-[WebInspectorWindowController inspectorPagePath]):
94
95 2013-10-10  Simon Fraser  <simon.fraser@apple.com>
96
97         Always force layout before flushing compositing layers
98         https://bugs.webkit.org/show_bug.cgi?id=122626
99
100         Reviewed by Tim Horton.
101         
102         [m_webView _flushCompositingChanges] only actually flushes compositing
103         layers if the FrameView does not need layout (FrameView::flushCompositingStateForThisFrame()
104         returns in this case). In this situation, flushLayers() does actually try
105         to force a layout, but on some platforms it's possible for something else
106         to dirty layout before the runloop observer fires again. This can result
107         in flushLayers() never actually managing to flush, which stalls visual
108         updates.
109         
110         Fix by always calling -viewWillDraw (which updates layout) before flushing
111         layers. This now matches WebKit2 behavior.
112
113         * WebView/WebView.mm:
114         (LayerFlushController::flushLayers):
115
116 2013-10-10  Andy Estes  <aestes@apple.com>
117
118         Add SPI for telling WebKit to prefer pictograph glyphs over monochrome ones
119         https://bugs.webkit.org/show_bug.cgi?id=122608
120
121         Reviewed by Dan Bernstein.
122
123         Based on patches by Dan Bernstein.
124
125         * WebView/WebView.mm:
126         (-[WebView _setFontFallbackPrefersPictographs:]): Called
127         WebCore::Settings::setFontFallbackPrefersPictographs().
128         * WebView/WebViewPrivate.h:
129
130 2013-10-10  Mark Rowe  <mrowe@apple.com>
131
132         <rdar://problem/13341666> WebKit should always build against an SDK.
133
134         Have all projects default to building against the OS X Internal SDK for the Production
135         configuration. For the Debug and Release configurations, look for UseInternalSDK.xcconfig
136         to determine whether the OS X Internal SDK should be used. If not, use the normal OS X SDK.
137
138         Reviewed by Dan Bernstein.
139
140         * Configurations/Base.xcconfig:
141         * Configurations/DebugRelease.xcconfig:
142
143 2013-10-08  Darin Adler  <darin@apple.com>
144
145         WebNetscapePluginView should no longer use deleteAllValues
146         https://bugs.webkit.org/show_bug.cgi?id=122495
147
148         Reviewed by Anders Carlsson.
149
150         * Plugins/WebNetscapePluginView.h: Use unique_ptr for both the pointer to
151         the timers hash table, and for the values in the hash table.
152
153         * Plugins/WebNetscapePluginView.mm:
154         (-[WebNetscapePluginView stopTimers]): Rewrote loop so it works with unique_ptr.
155         (-[WebNetscapePluginView startTimers]): Ditto.
156         (-[WebNetscapePluginView fini]): Removed unneeded code to delete timers.
157         (-[WebNetscapePluginView scheduleTimerWithInterval:repeat:timerFunc:]): Make
158         the timers hash table with make-unique. Fixed the loop that chooses the timer
159         ID so it won't ever try to use a deleted value, although that never happens
160         in practice. Use HashMap::add instead of using both contains and set.
161         Rearranged code so we don't need to make a raw pointer for the timer.
162         (-[WebNetscapePluginView unscheduleTimer:]): Use remove instead of take/delete,
163         since remove takes care of the deletion automatically since we are using the
164         unique_ptr class.
165
166 2013-10-08  Darin Adler  <darin@apple.com>
167
168         Eliminate use of deleteAllValues in ProxyInstance
169         https://bugs.webkit.org/show_bug.cgi?id=122499
170
171         Reviewed by Anders Carlsson.
172
173         * Plugins/Hosted/ProxyInstance.h: Use unique_ptr for map values in m_fields and m_methods.
174
175         * Plugins/Hosted/ProxyInstance.mm:
176         (WebKit::ProxyInstance::~ProxyInstance): Removed calls to deleteAllValues.
177         (WebKit::ProxyInstance::methodNamed): Use make_unique and get to deal with map entries
178         that are unique_ptr. Also fixed a bug where this would do an expensive no-op if the map
179         already had an entry with a null in it. We would call the plug-in, but eventually
180         isNewEntry would be false so we would return null.
181         (WebKit::ProxyInstance::fieldNamed): Use make_unique and get to deal with map entries
182         that are unique_ptr.
183
184 2013-10-08  Darin Adler  <darin@apple.com>
185
186         Change NetscapePluginInstanceProxy::m_replies to use unique_ptr instead of deleteAllValues
187         https://bugs.webkit.org/show_bug.cgi?id=122492
188
189         Reviewed by Andreas Kling.
190
191         * Plugins/Hosted/NetscapePluginHostManager.mm:
192         (WebKit::NetscapePluginHostManager::instantiatePlugin): Use auto so this works with
193         unique_ptr instead of auto_ptr.
194         * Plugins/Hosted/NetscapePluginHostProxy.mm:
195         (WKPCGetScriptableNPObjectReply): Use make_unique instead of using new directly.
196         (WKPCBooleanReply): Ditto.
197         (WKPCBooleanAndDataReply): Ditto.
198         (WKPCInstantiatePluginReply): Ditto.
199         * Plugins/Hosted/NetscapePluginInstanceProxy.h: Changed m_replies to map to unique_ptr
200         instead of to a raw pointer.
201         (WebKit::NetscapePluginInstanceProxy::setCurrentReply): Changed to take a unique_ptr
202         instead of a raw pointer since this takes ownership of the pointer.
203         (WebKit::NetscapePluginInstanceProxy::waitForReply): Changed to return a unique_ptr
204         instead of a auto_ptr because that's better. Use unique_ptr inside the function
205         too to avoid the need for an explicit delete.
206         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
207         (WebKit::NetscapePluginInstanceProxy::~NetscapePluginInstanceProxy): Removed the call to
208         deleteAllValues.
209         (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad): Removed unneeded initialization
210         of a local variable that was already set in all code paths.
211         (WebKit::NetscapePluginInstanceProxy::wheelEvent): Use auto so this works with unique_ptr
212         instead of auto_ptr.
213         (WebKit::NetscapePluginInstanceProxy::print): Ditto.
214         (WebKit::NetscapePluginInstanceProxy::snapshot): Ditto. Ditto.
215         (WebKit::NetscapePluginInstanceProxy::processRequestsAndWaitForReply): Changed to return
216         a unique_ptr. Also removed an unneeded assertion.
217         (WebKit::NetscapePluginInstanceProxy::createBindingsInstance): Use auto so this works
218         with unique_ptr instead of auto_ptr.
219
220         * Plugins/Hosted/ProxyInstance.h: Changed return type of waitForReply to unique_ptr.
221
222         * Plugins/Hosted/ProxyInstance.mm:
223         (WebKit::ProxyInstance::invoke): Use auto so this works with unique_ptr instead of auto_ptr.
224         (WebKit::ProxyInstance::supportsInvokeDefaultMethod): Ditto.
225         (WebKit::ProxyInstance::supportsConstruct): Ditto.
226         (WebKit::ProxyInstance::getPropertyNames): Ditto.
227         (WebKit::ProxyInstance::methodNamed): Ditto.
228         (WebKit::ProxyInstance::fieldNamed): Ditto.
229         (WebKit::ProxyInstance::fieldValue): Ditto.
230         (WebKit::ProxyInstance::setFieldValue): Ditto.
231
232 2013-10-07  Sam Weinig  <sam@webkit.org>
233
234         CTTE: Use references in and around DragController
235         https://bugs.webkit.org/show_bug.cgi?id=122427
236
237         Reviewed by Andreas Kling.
238
239         * WebCoreSupport/WebDragClient.h:
240         * WebCoreSupport/WebDragClient.mm:
241         (WebDragClient::actionMaskForDrag):
242         (WebDragClient::willPerformDragDestinationAction):
243         (WebDragClient::willPerformDragSourceAction):
244         (WebDragClient::startDrag):
245         (WebDragClient::declareAndWriteDragImage):
246         * WebView/WebFrame.mm:
247         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
248         * WebView/WebHTMLView.mm:
249         (-[WebHTMLView _documentFragmentFromPasteboard:forType:inContext:subresources:]):
250         * WebView/WebView.mm:
251         (-[WebView draggingEntered:]):
252         (-[WebView draggingUpdated:]):
253         (-[WebView draggingExited:]):
254         (-[WebView performDragOperation:]):
255
256 2013-10-05  Sam Weinig  <sam@webkit.org>
257
258         CTTE: Thread references through markup.h
259         https://bugs.webkit.org/show_bug.cgi?id=122403
260
261         Reviewed by Darin Adler and Andreas Kling.
262
263         * DOM/WebDOMOperations.mm:
264         (-[DOMNode markupString]):
265         (-[DOMRange markupString]):
266         * WebView/WebFrame.mm:
267         (-[WebFrame _documentFragmentWithMarkupString:baseURLString:]):
268         (-[WebFrame _documentFragmentWithNodesAsParagraphs:]):
269
270 2013-10-05  Sam Weinig  <sam@webkit.org>
271
272         CTTE: Pass DocumentWriter around as a reference
273         https://bugs.webkit.org/show_bug.cgi?id=122396
274
275         Reviewed by Andreas Kling.
276
277         * WebView/WebFrame.mm:
278         (-[WebFrame _canProvideDocumentSource]):
279
280 2013-10-04  Alexey Proskuryakov  <ap@apple.com>
281
282         Don't preflight spell checker when calling -setContinuousSpellCheckingEnabled repeatedly
283         https://bugs.webkit.org/show_bug.cgi?id=122329
284
285         Reviewed by Darin Adler.
286
287         * WebView/WebView.mm: (-[WebView setContinuousSpellCheckingEnabled:]): Don't do any
288         work if preference didn't change (continuousSpellCheckingEnabled is a static that
289         starts with false).
290
291 2013-10-04  Anders Carlsson  <andersca@apple.com>
292
293         FramePolicyFunction should be an std::function
294         https://bugs.webkit.org/show_bug.cgi?id=122362
295
296         Reviewed by Darin Adler.
297
298         * WebCoreSupport/WebFrameLoaderClient.h:
299         * WebCoreSupport/WebFrameLoaderClient.mm:
300         (WebFrameLoaderClient::dispatchDecidePolicyForResponse):
301         (WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
302         (WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
303         (WebFrameLoaderClient::dispatchWillSubmitForm):
304
305 2013-10-04  Mark Lam  <mark.lam@apple.com>
306
307         Change ScriptDebugServer to use DebuggerCallFrame instead of JavaScriptCallFrame.
308         https://bugs.webkit.org/show_bug.cgi?id=121969.
309
310         Reviewed by Geoffrey Garen.
311
312         1. Make JavaScriptCallFrame a thin shell around the DebuggerCallFrame.
313            DebuggerCallFrame now tracks whether it is valid instead of needing
314            JavaScriptCallFrame do it.
315         2. ScriptDebugServer now only instantiates an DebuggerCallFrame when needed
316            just before it pauses and calls back to its client, and then invalidates
317            it immediately when the callback returns. Every subsequent callback to
318            the client will use a new instance of the DebuggerCallFrame.
319         3. Similarly, ScriptDebugServer now only creates a JavaScriptCallFrame when
320            it "pauses".
321         4. DebuggerCallFrame only creates its caller DebuggerCallFrame when
322            it is needed i.e. when the client calls callerFrame(). Similarly,
323            JavaScriptCallFrame only creates its caller when it's requested.
324         5. DebuggerCallFrame's line() and column() now returns a base-zero int.
325         6. WebScriptDebugDelegate now only caches the functionName of the frame
326            instead of the entire DebuggerCallFrame because that is all that is
327            needed.
328         7. Also removed evaluateInGlobalCallFrame() which is not used anywhere.
329
330         * WebView/WebScriptDebugDelegate.mm:
331         (-[WebScriptCallFramePrivate dealloc]):
332         (-[WebScriptCallFrame _initWithGlobalObject:functionName:exceptionValue:JSC::]):
333         (-[WebScriptCallFrame functionName]):
334         (-[WebScriptCallFrame exception]):
335         * WebView/WebScriptDebugger.mm:
336         (WebScriptDebugger::exception):
337
338 2013-10-04  Anders Carlsson  <andersca@apple.com>
339
340         Remove some unneeded code from WidgetMac
341         https://bugs.webkit.org/show_bug.cgi?id=122355
342
343         Reviewed by Dan Bernstein.
344
345         Remove code to handle the visible rect changing, it's not needed anymore since we always put Netscape plug-ins into their own layers now.
346
347         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
348         * Plugins/WebBaseNetscapePluginView.h:
349         * Plugins/WebBaseNetscapePluginView.mm:
350
351 2013-10-04  Daniel Bates  <dabates@apple.com>
352
353         [iOS] Upstream disk image cache
354         https://bugs.webkit.org/show_bug.cgi?id=121985
355
356         Reviewed by Joseph Pecoraro.
357
358         * Misc/WebCache.mm:
359         (+[WebCache statistics]):
360         * WebView/WebDataSource.mm:
361         (BufferMemoryMapped): Added.
362         (-[WebDataSource _setAllowToBeMemoryMapped]): Added.
363         (-[WebDataSource setDataSourceDelegate:]): Added.
364         (-[WebDataSource dataSourceDelegate]): Added.
365         (-[WebDataSource dealloc]):
366         * WebView/WebDataSourcePrivate.h: Declared private delegate
367         protocol, WebDataSourcePrivateDelegate.
368         * WebView/WebPreferenceKeysPrivate.h:
369         * WebView/WebPreferences.mm:
370         (+[WebPreferences initialize]):
371         (-[WebPreferences diskImageCacheEnabled]): Added.
372         (-[WebPreferences setDiskImageCacheEnabled:]): Added.
373         (-[WebPreferences diskImageCacheMinimumImageSize]): Added.
374         (-[WebPreferences setDiskImageCacheMinimumImageSize:]): Added.
375         (-[WebPreferences diskImageCacheMaximumCacheSize]): Added.
376         (-[WebPreferences setDiskImageCacheMaximumCacheSize:]): Added.
377         (-[WebPreferences _diskImageCacheSavedCacheDirectory]): Added.
378         (-[WebPreferences _setDiskImageCacheSavedCacheDirectory:]): Added.
379         * WebView/WebView.mm:
380         (-[WebView _commonInitializationWithFrameName:groupName:]):
381         (-[WebView _preferencesChanged:]):
382
383 2013-10-04  Anders Carlsson  <andersca@apple.com>
384
385         Remove WebAssertions.h
386         https://bugs.webkit.org/show_bug.cgi?id=122328
387
388         Reviewed by Jessie Berlin.
389
390         * Misc/WebAssertions.h: Removed.
391
392 2013-10-03  Anders Carlsson  <andersca@apple.com>
393
394         Remove WebNSNotificationCenterExtras
395         https://bugs.webkit.org/show_bug.cgi?id=122316
396
397         Reviewed by Dan Bernstein.
398
399         Use dispatch_async to ensure that notifications are posted on the main thread.
400
401         * Misc/WebIconDatabase.mm:
402         (-[WebIconDatabase _sendNotificationForURL:]):
403         (-[WebIconDatabase _sendDidRemoveAllIconsNotification]):
404         * Misc/WebNSNotificationCenterExtras.h: Removed.
405         * Misc/WebNSNotificationCenterExtras.m: Removed.
406
407 2013-10-03  Sam Weinig  <sam@webkit.org>
408
409         Remove shouldRubberBandInDirection from the WKBundlePageUIClient
410         https://bugs.webkit.org/show_bug.cgi?id=122309
411
412         Reviewed by Andreas Kling.
413
414         * WebCoreSupport/WebChromeClient.h:
415
416 2013-10-03  Anders Carlsson  <andersca@apple.com>
417
418         Ignore deprecation warnings
419         https://bugs.webkit.org/show_bug.cgi?id=122302
420
421         Reviewed by Mark Rowe.
422
423         * Misc/WebIconDatabase.mm:
424         (-[WebIconDatabase _scaleIcon:toSize:]):
425         (webGetNSImage):
426         * Misc/WebNSImageExtras.m:
427         (-[NSImage _web_scaleToMaxSize:]):
428         (-[NSImage _web_dissolveToFraction:]):
429         * Misc/WebNSViewExtras.m:
430         (-[NSView _web_DragImageForElement:rect:event:pasteboard:source:offset:]):
431         (-[NSView _web_convertRect:toView:]):
432         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
433         (WebKit::NetscapePluginInstanceProxy::mouseEvent):
434         * Plugins/Hosted/WebTextInputWindowController.m:
435         (-[WebTextInputPanel _interpretKeyEvent:string:]):
436         * Plugins/WebBaseNetscapePluginView.mm:
437         (-[WebBaseNetscapePluginView convertFromX:andY:space:toX:andY:space:]):
438         * WebCoreSupport/WebDragClient.mm:
439         (WebDragClient::startDrag):
440         * WebInspector/WebNodeHighlight.mm:
441         (-[WebNodeHighlight _computeHighlightWindowFrame]):
442         * WebView/WebFullScreenController.mm:
443         (-[WebFullScreenController _startEnterFullScreenAnimationWithDuration:]):
444         (-[WebFullScreenController _startExitFullScreenAnimationWithDuration:]):
445         * WebView/WebHTMLView.mm:
446         (+[WebHTMLView _postFlagsChangedEvent:]):
447         (-[WebHTMLView _updateMouseoverWithFakeEvent]):
448         (-[WebHTMLView _autoscroll]):
449         (-[WebHTMLView mouseDown:]):
450         (-[WebHTMLView mouseDragged:]):
451         (-[WebHTMLView mouseUp:]):
452         (-[WebHTMLView accessibilityHitTest:]):
453         (-[WebHTMLView _executeSavedKeypressCommands]):
454         (-[WebHTMLView attachRootLayer:]):
455         (-[WebHTMLView textStorage]):
456         (-[WebHTMLView _updateSelectionForInputManager]):
457         * WebView/WebTextCompletionController.mm:
458         (-[WebTextCompletionController _buildUI]):
459         (-[WebTextCompletionController _placePopupWindow:]):
460
461 2013-10-01  Sam Weinig  <sam@webkit.org>
462
463         CTTE: DOMWrapperWorlds should be passed around by reference
464         https://bugs.webkit.org/show_bug.cgi?id=122206
465
466         Reviewed by Andreas Kling.
467
468         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
469         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
470         (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
471         (WebKit::NetscapePluginInstanceProxy::evaluate):
472         * WebCoreSupport/WebFrameLoaderClient.h:
473         * WebCoreSupport/WebFrameLoaderClient.mm:
474         * WebView/WebFrame.mm:
475         (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
476         (-[WebFrame _globalContextForScriptWorld:]):
477         (-[WebFrame jsWrapperForNode:inScriptWorld:]):
478         * WebView/WebScriptWorld.mm:
479         (+[WebScriptWorld standardWorld]):
480         (+[WebScriptWorld findOrCreateWorld:]):
481         * WebView/WebScriptWorldInternal.h:
482         * WebView/WebView.mm:
483         (-[WebView _injectOutlookQuirksScript]):
484         (+[WebView _addUserScriptToGroup:world:source:url:whitelist:blacklist:injectionTime:injectedFrames:]):
485         (+[WebView _addUserStyleSheetToGroup:world:source:url:whitelist:blacklist:injectedFrames:]):
486         (+[WebView _removeUserScriptFromGroup:world:url:]):
487         (+[WebView _removeUserStyleSheetFromGroup:world:url:]):
488         (+[WebView _removeUserScriptsFromGroup:world:]):
489         (+[WebView _removeUserStyleSheetsFromGroup:world:]):
490
491 2013-09-30  Sam Weinig  <sam@webkit.org>
492
493         Remove support for DOMFileSystem
494         https://bugs.webkit.org/show_bug.cgi?id=122137
495
496         Reviewed by Anders Carlsson.
497
498         * Configurations/FeatureDefines.xcconfig:
499
500 2013-09-30  Benjamin Poulain  <benjamin@webkit.org>
501
502         Remove the code guarded by STYLE_SCOPED
503         https://bugs.webkit.org/show_bug.cgi?id=122123
504
505         Reviewed by Anders Carlsson.
506
507         * Configurations/FeatureDefines.xcconfig:
508
509 2013-09-30  Mark Rowe  <mrowe@apple.com>
510
511         Fix the build when building against an SDK.
512
513         Xcode helpfully prepends $(SDKROOT) to the paths in FRAMEWORK_SEARCH_PATHS when generating
514         the compiler command lines. It can't know to do this for the system framework search paths
515         we add manually via OTHER_CFLAGS though, so we need to prefix them with $(SDKROOT) ourself.
516
517         * Configurations/WebKit.xcconfig:
518
519 2013-09-29  Mark Rowe  <mrowe@apple.com>
520
521         Fix the Lion build.
522
523         Ensure that C++ and Objective-C++ files build with the right compiler flags.
524
525         * Configurations/WebKit.xcconfig:
526
527 2013-09-28  Mark Rowe  <mrowe@apple.com>
528
529         Fix some failures with newer versions of clang.
530
531         Some CoreGraphics headers generate warnings under newer versions of clang. Since they're system headers the warnings would
532         usually be suppressed, but we're adding the frameworks to the non-system framework search path so they're no longer treated
533         as system headers. We address this by removing the system paths from FRAMEWORK_SEARCH_PATHS and using the -iframework compiler
534         flag in OTHER_CFLAGS to add the paths to the system framework search path. We have to set OTHER_CFLAGS at the target level
535         in order for it to coexist with the ASAN-related OTHER_CFLAGS that's set in DebugRelease.xcconfig.
536
537         Reviewed by Dan Bernstein.
538
539         * Configurations/DebugRelease.xcconfig:
540         * Configurations/WebKit.xcconfig:
541
542 2013-09-28  Mark Rowe  <mrowe@apple.com>
543
544         Take Xcode's advice and enable some extra warnings.
545
546         Reviewed by Sam Weinig.
547
548         * Configurations/Base.xcconfig:
549
550 2013-09-28  Darin Adler  <darin@apple.com>
551
552         Add Frame::mainFrame and Frame::isMainFrame
553         https://bugs.webkit.org/show_bug.cgi?id=122064
554
555         Reviewed by Andreas Kling.
556
557         * WebCoreSupport/WebFrameLoaderClient.mm:
558         (WebFrameLoaderClient::canHandleRequest):
559         (WebFrameLoaderClient::transitionToCommittedForNewPage):
560         * WebView/WebFrameView.mm:
561         (-[WebFrameView _install]):
562         Call isMainFrame.
563
564 2013-09-28  Mark Rowe  <mrowe@apple.com>
565
566         WebKit fails to build with newer versions of clang.
567
568         Reviewed by Sam Weinig.
569
570         * Carbon/HIWebView.mm: Remove an unused function.
571         * History/BinaryPropertyList.cpp: #if a constant that's only used in 64-bit.
572         * Misc/WebIconDatabase.mm: Remove two unused constants.
573         * Plugins/WebBaseNetscapePluginView.mm: Remove an unused constant.
574         * WebCoreSupport/WebEditorClient.mm: Ditto.
575
576 2013-09-27  Enrica Casucci  <enrica@apple.com>
577
578         Upstream changes to Pasteboard implementation for iOS.
579         https://bugs.webkit.org/show_bug.cgi?id=121818
580
581         Reviewed by Benjamin Poulain.
582
583         * WebCoreSupport/WebPlatformStrategies.h:
584         * WebCoreSupport/WebPlatformStrategies.mm:
585         (WebPlatformStrategies::writeToPasteboard):
586         (WebPlatformStrategies::getPasteboardItemsCount):
587         (WebPlatformStrategies::readBufferFromPasteboard):
588         (WebPlatformStrategies::readURLFromPasteboard):
589         (WebPlatformStrategies::readStringFromPasteboard):
590         (WebPlatformStrategies::changeCount):
591
592 2013-09-26  Darin Adler  <darin@apple.com>
593
594         rename KURL to URL
595         https://bugs.webkit.org/show_bug.cgi?id=16214
596
597         Reviewed by Andreas Kling.
598
599         * many files: Renamed, using script.
600
601 2013-09-06  Jer Noble  <jer.noble@apple.com>
602
603         [Mac] Implement the media controls in JavaScript.
604         https://bugs.webkit.org/show_bug.cgi?id=120895
605
606         Reviewed by Dean Jackson.
607
608         Define and turn on ENABLE_MEDIA_CONTROLS_SCRIPT.
609
610         * Configurations/FeatureDefines.xcconfig:
611
612 2013-09-27  Darin Adler  <darin@apple.com>
613
614         Add empty MainFrame class
615         https://bugs.webkit.org/show_bug.cgi?id=121770
616
617         Reviewed by Andreas Kling.
618
619         * WebCoreSupport/WebDragClient.mm:
620         * WebCoreSupport/WebInspectorClient.mm:
621         * WebCoreSupport/WebPlatformStrategies.mm:
622         * WebView/WebFrame.mm:
623         * WebView/WebHTMLView.mm:
624         * WebView/WebView.mm:
625         Include MainFrame.h instead of Frame.h as needed.
626
627 2013-09-26  Eric Carlson  <eric.carlson@apple.com>
628
629         [MediaStream] make MediaStream testable
630         https://bugs.webkit.org/show_bug.cgi?id=121967
631
632         Reviewed by Dean Jackson.
633
634         * WebCoreSupport/WebUserMediaClient.h: Added.
635         * WebCoreSupport/WebUserMediaClient.mm: Added.
636
637         * WebView/WebUIDelegatePrivate.h: Declare decidePolicyForUserMediaRequestFromOrigin:listener:
638
639         * WebView/WebView.mm:
640         (-[WebView _commonInitializationWithFrameName:groupName:]): Register WebUserMediaClient.
641         (-[WebView _setUserMediaClient:]): New.
642         (-[WebView _userMediaClient]): New.
643         * WebView/WebViewData.h:
644         * WebView/WebViewPrivate.h:
645
646 2013-09-25  Sam Weinig  <sam@webkit.org>
647
648         Pass a JSC::VM& to JS bindings object creation functions, rather than a JSC::ExecState*
649         https://bugs.webkit.org/show_bug.cgi?id=121934
650
651         Reviewed by Geoffrey Garen.
652
653         * Plugins/Hosted/ProxyInstance.mm:
654         (WebKit::ProxyInstance::newRuntimeObject):
655         * Plugins/Hosted/ProxyRuntimeObject.h:
656         (WebKit::ProxyRuntimeObject::create):
657         * Plugins/Hosted/ProxyRuntimeObject.mm:
658         (WebKit::ProxyRuntimeObject::ProxyRuntimeObject):
659         (WebKit::ProxyRuntimeObject::finishCreation):
660
661 2013-09-25  Brady Eidson  <beidson@apple.com>
662
663         Enable the IndexedDB build on Mac, but leave the feature non-functional
664         https://bugs.webkit.org/show_bug.cgi?id=121918
665
666         Reviewed by Alexey Proskuryakov.
667
668         * Configurations/FeatureDefines.xcconfig:
669
670 2013-09-25  Commit Queue  <commit-queue@webkit.org>
671
672         Unreviewed, rolling out r156432.
673         http://trac.webkit.org/changeset/156432
674         https://bugs.webkit.org/show_bug.cgi?id=121932
675
676         some integer conversion things that need brady to fix
677         (Requested by thorton on #webkit).
678
679         * Configurations/FeatureDefines.xcconfig:
680
681 2013-09-25  Brady Eidson  <beidson@apple.com>
682
683         Enable the IndexedDB build on Mac, but leave the feature non-functional
684         https://bugs.webkit.org/show_bug.cgi?id=121918
685
686         Reviewed by Alexey Proskuryakov.
687
688         * Configurations/FeatureDefines.xcconfig:
689
690 2013-09-25  Brent Fulgham  <bfulgham@apple.com>
691
692         Refactor RuntimeEnabledFeatures as a Singleton.
693         https://bugs.webkit.org/show_bug.cgi?id=121883.
694
695         Reviewed by Jer Noble.
696
697         * WebView/WebView.mm:
698         (-[WebView _preferencesChanged:]): Use singleton accessor.
699         (-[WebView _setDashboardBehavior:to:]): Ditto.
700
701 2013-09-25  Brady Eidson  <beidson@apple.com>
702
703         FeatureDefine.xcconfig cleanup (They should all be identical).
704         https://bugs.webkit.org/show_bug.cgi?id=121921
705
706         Reviewed by Mark Rowe.
707
708         * Configurations/FeatureDefines.xcconfig:
709
710 2013-09-24  Mark Lam  <mark.lam@apple.com>
711
712         Change JSC debug hooks to pass a CallFrame* instead of a DebuggerCallFrame.
713         https://bugs.webkit.org/show_bug.cgi?id=121867.
714
715         Reviewed by Geoffrey Garen.
716
717         * WebView/WebScriptDebugDelegate.mm:
718         (-[WebScriptCallFrame _initWithGlobalObject:debuggerCallFrame:exceptionValue:JSC::]):
719         (-[WebScriptCallFrame exception]):
720         * WebView/WebScriptDebugger.h:
721         * WebView/WebScriptDebugger.mm:
722         (WebScriptDebugger::exception):
723
724 2013-09-24  Enrica Casucci  <enrica@apple.com>
725
726         Upstream changes to Pasteboard implementation for iOS.
727         https://bugs.webkit.org/show_bug.cgi?id=121818
728
729         Reviewed by Darin Adler.
730
731         * WebCoreSupport/WebPlatformStrategies.h:
732         * WebCoreSupport/WebPlatformStrategies.mm:
733         (WebPlatformStrategies::writeToPasteboard):
734
735 2013-09-24  Mark Rowe  <mrowe@apple.com>
736
737         <rdar://problem/14971518> WebKit should build against the Xcode default toolchain when targeting OS X 10.8
738
739         Reviewed by Dan Bernstein.
740
741         * Configurations/Base.xcconfig:
742
743 2013-09-21  Mark Lam  <mark.lam@apple.com>
744
745         Remove unused code in WebKit/mac's WebScriptDebugDelegate.
746         https://bugs.webkit.org/show_bug.cgi?id=121706.
747
748         Reviewed by Timothy Hatcher.
749
750         WebScriptDebugDelegate's didEnterCallFrame, willExecuteStatement,
751         and willLeaveCallFrame are not in use. Removed them and all methods
752         and fields used for supporting them.
753
754         * WebView/WebDelegateImplementationCaching.h:
755         * WebView/WebScriptDebugDelegate.h:
756         * WebView/WebScriptDebugDelegate.mm:
757         (-[WebScriptCallFramePrivate dealloc]):
758         (-[WebScriptCallFrame _initWithGlobalObject:debuggerCallFrame:]):
759         * WebView/WebScriptDebugger.h:
760         (WebScriptDebugger::globalObject):
761         (WebScriptDebugger::callEvent):
762         (WebScriptDebugger::atStatement):
763         (WebScriptDebugger::returnEvent):
764         (WebScriptDebugger::willExecuteProgram):
765         (WebScriptDebugger::didExecuteProgram):
766         (WebScriptDebugger::didReachBreakpoint):
767         * WebView/WebScriptDebugger.mm:
768         (WebScriptDebugger::WebScriptDebugger):
769         (WebScriptDebugger::exception):
770         * WebView/WebView.mm:
771         (-[WebView _cacheScriptDebugDelegateImplementations]):
772
773 2013-09-18  Anders Carlsson  <andersca@apple.com>
774
775         RefPtrHashMap should work with move only types
776         https://bugs.webkit.org/show_bug.cgi?id=121564
777
778         Reviewed by Andreas Kling.
779
780         * Plugins/Hosted/ProxyInstance.mm:
781         (WebKit::ProxyInstance::methodNamed):
782         (WebKit::ProxyInstance::fieldNamed):
783
784 2013-09-16  Enrica Casucci  <enrica@apple.com>
785
786         Remove unused function didSetSelectionTypesForPasteboard from EditorClient.
787         https://bugs.webkit.org/show_bug.cgi?id=121464
788
789         Reviewed by Darin Adler.
790
791         This method was only implemented in WebEditorClient.mm for Mac where it was
792         calling a private delegate that is no longer in use.
793
794         * DefaultDelegates/WebDefaultEditingDelegate.m:
795         * WebCoreSupport/WebEditorClient.h:
796         * WebCoreSupport/WebEditorClient.mm:
797         * WebView/WebEditingDelegatePrivate.h:
798
799 2013-09-13  Anders Carlsson  <andersca@apple.com>
800
801         Use nullptr instead of 0 in calls to HashMap::add
802         https://bugs.webkit.org/show_bug.cgi?id=121322
803
804         Reviewed by Sam Weinig.
805
806         * Plugins/Hosted/NetscapePluginHostManager.mm:
807         (WebKit::NetscapePluginHostManager::hostForPlugin):
808
809 2013-09-13  Dan Bernstein  <mitz@apple.com>
810
811         [mac WK1] Introduce WebViewWillCloseNotification
812         https://bugs.webkit.org/show_bug.cgi?id=121321
813
814         Reviewed by Sam Weinig.
815
816         * WebKit.exp: Exported WebViewWillCloseNotification.
817         * WebView/WebView.mm:
818         (-[WebView _close]): Send WebViewWillCloseNotification before closing the WebView.
819         * WebView/WebViewPrivate.h: Declared WebViewWillCloseNotification.
820
821 2013-09-13  Tim Horton  <timothy_horton@apple.com>
822
823         REGRESSION (r155615): Lots of reftests fail with single line or single pixel differences
824         https://bugs.webkit.org/show_bug.cgi?id=121245
825
826         Reviewed by Darin Adler.
827
828         Similar to https://bugs.webkit.org/show_bug.cgi?id=120963,
829         we need to manually ensure that some pieces of persistent
830         CoreGraphics state are restored after PDFKit changes them.
831
832         In this case, we bookend our restoration around the various
833         _recursiveDisplay... functions that we also use in WebHTMLView.
834
835         * WebView/WebPDFView.mm:
836         (-[WebPDFView _recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]):
837         (-[WebPDFView _recursiveDisplayAllDirtyWithLockFocus:visRect:]):
838         (-[WebPDFView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
839         (-[WebPDFView _recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]):
840
841 2013-09-12  Anders Carlsson  <andersca@apple.com>
842
843         SharedBuffer::createNSData should return a RetainPtr<NSData>
844         https://bugs.webkit.org/show_bug.cgi?id=121237
845
846         Reviewed by Darin Adler.
847
848         Update for WebCore changes. This also fixes a leak where we'd create an NSFileWrapper from NSData but never release the data.
849
850         * WebView/WebDataSource.mm:
851         (-[WebDataSource data]):
852         * WebView/WebHTMLRepresentation.mm:
853         (-[WebHTMLRepresentation documentSource]):
854         * WebView/WebHTMLView.mm:
855         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
856         * WebView/WebResource.mm:
857         (-[WebResource encodeWithCoder:]):
858         (-[WebResource data]):
859
860 2013-09-12  Mark Lam  <mark.lam@apple.com>
861
862         Change debug hooks to pass sourceID and position info via the DebuggerCallFrame.
863         https://bugs.webkit.org/show_bug.cgi?id=121214.
864
865         Reviewed by Geoffrey Garen.
866
867         * webview/WebScriptDebugger.h:
868         * WebView/WebScriptDebugger.mm:
869         (WebScriptDebugger::WebScriptDebugger):
870         (WebScriptDebugger::callEvent):
871         (WebScriptDebugger::atStatement):
872         (WebScriptDebugger::returnEvent):
873         (WebScriptDebugger::exception):
874         (WebScriptDebugger::willExecuteProgram):
875         (WebScriptDebugger::didExecuteProgram):
876         (WebScriptDebugger::didReachBreakpoint):
877
878 2013-09-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
879
880         Generate more HTML type checks and casting
881         https://bugs.webkit.org/show_bug.cgi?id=121080
882
883         Reviewed by Andreas Kling.
884
885         Clean-up remained functions of HTML elements using auto-generated isFooElement(),
886         and replace toFooElement() with ELEMENT_TYPE_CASTS() macro.
887
888         Besides this patch clean-up unnecessary checks which are being supported by
889         auto-generated isFooElement().
890
891         No new tests, no behavior change.
892
893         * Plugins/WebPluginController.mm:
894         * WebCoreSupport/WebChromeClient.mm:
895         (WebChromeClient::supportsFullscreenForNode):
896         * WebView/WebView.mm:
897         (-[WebView _enterFullscreenForNode:WebCore::]):
898
899 2013-09-10  Daniel Bates  <dabates@apple.com>
900
901         [iOS] Upstream text autosizing
902         https://bugs.webkit.org/show_bug.cgi?id=121111
903
904         Reviewed by Andy Estes and Sam Weinig.
905
906         * WebView/WebFrame.mm:
907         (-[WebFrame resetTextAutosizingBeforeLayout]): Added.
908         (-[WebFrame _setVisibleSize:]): Added.
909         (-[WebFrame _setTextAutosizingWidth:]): Added.
910         * WebView/WebFramePrivate.h:
911         * WebView/WebPreferenceKeysPrivate.h:
912         * WebView/WebPreferences.mm:
913         (+[WebPreferences initialize]):
914         (-[WebPreferences _setMinimumZoomFontSize:]): Added.
915         (-[WebPreferences _minimumZoomFontSize]): Added.
916
917 2013-09-09  Dean Jackson  <dino@apple.com>
918
919         [WebGL] Allow multithreaded OpenGL contexts
920         https://bugs.webkit.org/show_bug.cgi?id=121062
921
922         Reviewed by Simon Fraser.
923
924         Expose a new preference "multithreadedWebGLEnabled".
925
926         * WebView/WebPreferenceKeysPrivate.h:
927         * WebView/WebPreferences.mm:
928         (+[WebPreferences initialize]):
929         (-[WebPreferences multithreadedWebGLEnabled]):
930         (-[WebPreferences setMultithreadedWebGLEnabled:]):
931         * WebView/WebPreferencesPrivate.h:
932         * WebView/WebView.mm:
933         (-[WebView _preferencesChanged:]):
934
935 2013-09-09  Dean Jackson  <dino@apple.com>
936
937         Enable WebGL for OS X nightlies
938         https://bugs.webkit.org/show_bug.cgi?id=121040
939
940         Reviewed by Beth Dakin.
941
942         * WebView/WebPreferences.mm:
943         (+[WebPreferences initialize]): Set WebPreference to YES.
944
945 2013-09-06  Ryosuke Niwa  <rniwa@webkit.org>
946
947         Range::ownerDocument should return Document&
948         https://bugs.webkit.org/show_bug.cgi?id=120908
949
950         Reviewed by Andreas Kling.
951
952         * WebView/WebPDFView.mm:
953         (isFrameInRange):
954
955 2013-09-05  Andreas Kling  <akling@apple.com>
956
957         ScrollView::children() should return a reference.
958         <https://webkit.org/b/120795>
959
960         Reviewed by Anders Carlsson.
961
962         * WebView/WebView.mm:
963         (-[WebView _addScrollerDashboardRegionsForFrameView:dashboardRegions:]):
964
965 2013-09-04  Mark Rowe  <mrowe@apple.com>
966
967         <https://webkit.org/b/120707> Make WebKit's localizable strings mechanism usable under ARC
968
969         WebKit's localizable strings mechanism is also used outside of WebKit so it needs to work
970         both with and without ARC.
971
972         Reviewed by Anders Carlsson.
973
974         * Misc/WebLocalizableStrings.h: Mark the bundle member as unretained. This matches how the
975         member is used within WebLocalizableStrings.mm.
976
977 2013-09-02  Darin Adler  <darin@apple.com>
978
979         [Mac] No need for HardAutorelease, which is same as CFBridgingRelease
980         https://bugs.webkit.org/show_bug.cgi?id=120569
981
982         Reviewed by Andy Estes.
983
984         * Misc/WebNSFileManagerExtras.mm:
985         (-[NSFileManager _webkit_startupVolumeName]): Removed some unneeded locals.
986         Got rid of the pointless ref/leakRef/HardAutorelease dance, and replaced it
987         with a [[x copy] autorelease].
988
989         * Misc/WebNSURLExtras.mm:
990         (-[NSURL _web_URLWithLowercasedScheme]): Use CFBridgingRelease, and got rid
991         of unneeded type casts.
992
993         * Plugins/WebBasePluginPackage.mm:
994         (+[WebBasePluginPackage preferredLocalizationName]): Use CFBridgingRelease.
995         * WebView/WebPDFRepresentation.mm:
996         (-[WebPDFRepresentation convertPostScriptDataSourceToPDF:]): Ditto.
997
998         * WebView/WebView.mm:
999         (+[WebView _setCacheModel:]): Use CFBridgingRelease and got rid of unneeded
1000         type cast.
1001
1002 2013-08-30  Antti Koivisto  <antti@apple.com>
1003
1004         Remove code behind ENABLE(DIALOG_ELEMENT)
1005         https://bugs.webkit.org/show_bug.cgi?id=120467
1006
1007         Reviewed by Darin Adler.
1008
1009         * Configurations/FeatureDefines.xcconfig:
1010
1011 2013-08-29  Sam Weinig  <sam@webkit.org>
1012
1013         Add ENABLE gaurds for Promises
1014         https://bugs.webkit.org/show_bug.cgi?id=120488
1015
1016         Reviewed by Andreas Kling.
1017
1018         * Configurations/FeatureDefines.xcconfig:
1019
1020 2013-08-29  Joseph Pecoraro  <pecoraro@apple.com>
1021
1022         Web Inspector: Download Web Archive of Inspected Page
1023         https://bugs.webkit.org/show_bug.cgi?id=119774
1024
1025         Reviewed by Timothy Hatcher.
1026
1027         Update to support InspectorFrontendHost.save's new base64Encoded
1028         parameter. It means the incoming content is binary data, not a string.
1029
1030         * WebCoreSupport/WebInspectorClient.h:
1031         * WebCoreSupport/WebInspectorClient.mm:
1032         (WebInspectorFrontendClient::save):
1033
1034 2013-08-28  Chris Curtis  <chris_curtis@apple.com>
1035
1036         https://bugs.webkit.org/show_bug.cgi?id=119548
1037         Refactoring Exception throws.
1038
1039         Reviewed by Geoffrey Garen.
1040         
1041         Moved setting an exception into the vm, These functions changed to use the new functionality.
1042
1043         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1044         (WebKit::NetscapePluginInstanceProxy::moveGlobalExceptionToExecState):
1045         * Plugins/Hosted/ProxyInstance.mm:
1046         (WebKit::ProxyInstance::invokeMethod):
1047
1048 2013-08-27  Anders Carlsson  <andersca@apple.com>
1049
1050         Fix build.
1051
1052         * Plugins/Hosted/ProxyInstance.h:
1053         * Plugins/Hosted/ProxyInstance.mm:
1054         (WebKit::ProxyInstance::methodNamed):
1055         (WebKit::ProxyInstance::fieldNamed):
1056
1057 2013-08-23  Andy Estes  <aestes@apple.com>
1058
1059         Fix issues found by the Clang Static Analyzer
1060         https://bugs.webkit.org/show_bug.cgi?id=120230
1061
1062         Reviewed by Darin Adler.
1063
1064         * Misc/WebNSFileManagerExtras.mm:
1065         (-[NSFileManager _webkit_startupVolumeName]): Used HardAutorelease()
1066         instead of WebCFAutorelease().
1067         * Misc/WebNSObjectExtras.h: Removed definition of WebCFAutorelease().
1068         * Misc/WebNSURLExtras.mm:
1069         (-[NSURL _web_URLWithLowercasedScheme]): Used HardAutorelease()
1070         instead of WebCFAutorelease().
1071         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1072         (-[WebHostedNetscapePluginView createPluginLayer]): Stop leaking
1073         CGColors (CALayer retains its backgroundColor property despite the
1074         property attributes claiming otherwise).
1075         * Plugins/WebBasePluginPackage.mm:
1076         (+[WebBasePluginPackage preferredLocalizationName]): Used
1077         HardAutorelease() instead of WebCFAutorelease().
1078         * WebView/WebDeviceOrientationProviderMock.mm:
1079         (-[WebDeviceOrientationProviderMockInternal lastOrientation]): Stop
1080         leaking WebDeviceOrientations.
1081         * WebView/WebPDFRepresentation.mm:
1082         (-[WebPDFRepresentation convertPostScriptDataSourceToPDF:]): Used
1083         HardAutorelease() instead of WebCFAutorelease().
1084         * WebView/WebView.mm:
1085         (+[WebView _setCacheModel:]): Ditto.
1086         (-[WebView _removeObjectForIdentifier:]): Ditto.
1087
1088 2013-08-26  Alexey Proskuryakov  <ap@apple.com>
1089
1090         [Mac] can-read-in-dragstart-event.html and can-read-in-copy-and-cut-events.html fail
1091         https://bugs.webkit.org/show_bug.cgi?id=113094
1092
1093         Reviewed by Darin Adler.
1094
1095         Return new pasteboard change count from all functions that change it.
1096
1097         * WebCoreSupport/WebPlatformStrategies.h:
1098         * WebCoreSupport/WebPlatformStrategies.mm:
1099         (WebPlatformStrategies::copy):
1100         (WebPlatformStrategies::changeCount):
1101         (WebPlatformStrategies::addTypes):
1102         (WebPlatformStrategies::setTypes):
1103         (WebPlatformStrategies::setBufferForType):
1104         (WebPlatformStrategies::setPathnamesForType):
1105         (WebPlatformStrategies::setStringForType):
1106
1107 2013-08-26  Andreas Kling  <akling@apple.com>
1108
1109         Unreviewed build fix.
1110
1111         * WebView/WebFrame.mm:
1112         (+[WebFrame _createMainFrameWithPage:frameName:frameView:]):
1113
1114 2013-08-26  Andreas Kling  <akling@apple.com>
1115
1116         WebCore: Let Page create the main Frame.
1117         <https://webkit.org/b/119964>
1118
1119         Reviewed by Anders Carlsson.
1120
1121         * WebCoreSupport/WebFrameLoaderClient.h:
1122         (WebFrameLoaderClient::setWebFrame):
1123
1124             Make it possible to construct a WebFrameLoaderClient with a null WebFrame*.
1125             A WebFrame* is later hooked up with a call to setWebFrame().
1126
1127         * WebView/WebFrame.mm:
1128         (+[WebFrame _createMainFrameWithPage:frameName:frameView:]):
1129
1130             Customized this method to wrap the Page::mainFrame() instead of creating a
1131             new Frame.
1132
1133         * WebView/WebView.mm:
1134         (-[WebView _commonInitializationWithFrameName:groupName:]):
1135
1136             Add a WebFrameLoaderClient to the PageClients passed to Page().
1137
1138 2013-08-25  Darin Adler  <darin@apple.com>
1139
1140         Frame should not have a documentTypeString member function
1141         https://bugs.webkit.org/show_bug.cgi?id=120262
1142
1143         Reviewed by Andreas Kling.
1144
1145         * WebView/WebFrame.mm: Removed _stringWithDocumentTypeStringAndMarkupString:
1146         internal method, which was not used anywhere in WebKit. Internal methods are
1147         only for use within WebKit, as opposed to public and private methods that can
1148         be used outside.
1149         * WebView/WebFrameInternal.h: Ditto.
1150
1151 2013-08-24  Darin Adler  <darin@apple.com>
1152
1153         Frame::tree should return a reference instead of a pointer
1154         https://bugs.webkit.org/show_bug.cgi?id=120259
1155
1156         Reviewed by Andreas Kling.
1157
1158         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1159         (WebKit::NetscapePluginInstanceProxy::performRequest):
1160         * Plugins/WebBaseNetscapePluginView.mm:
1161         (-[WebBaseNetscapePluginView resolvedURLStringForURL:target:]):
1162         * Plugins/WebNetscapePluginView.mm:
1163         (-[WebNetscapePluginView loadPluginRequest:]):
1164         * WebCoreSupport/WebFrameLoaderClient.mm:
1165         (applyAppleDictionaryApplicationQuirkNonInlinePart):
1166         (WebFrameLoaderClient::prepareForDataSourceReplacement):
1167         (WebFrameLoaderClient::createFrame):
1168         * WebView/WebFrame.mm:
1169         (+[WebFrame _createFrameWithPage:frameName:frameView:ownerElement:]):
1170         (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]):
1171         (-[WebFrame _unmarkAllBadGrammar]):
1172         (-[WebFrame _unmarkAllMisspellings]):
1173         (-[WebFrame _atMostOneFrameHasSelection]):
1174         (-[WebFrame _findFrameWithSelection]):
1175         (-[WebFrame _drawRect:contentsOnly:]):
1176         (-[WebFrame _isDescendantOfFrame:]):
1177         (-[WebFrame _recursive_resumeNullEventsForAllNetscapePlugins]):
1178         (-[WebFrame _recursive_pauseNullEventsForAllNetscapePlugins]):
1179         (-[WebFrame name]):
1180         (-[WebFrame findFrameNamed:]):
1181         (-[WebFrame parentFrame]):
1182         (-[WebFrame childFrames]):
1183         * WebView/WebView.mm:
1184         (-[WebView _attachScriptDebuggerToAllFrames]):
1185         (-[WebView _detachScriptDebuggerFromAllFrames]):
1186         (-[WebView _clearMainFrameName]):
1187         (-[WebView _isUsingAcceleratedCompositing]):
1188         (-[WebView _isSoftwareRenderable]):
1189         (-[WebView setHostWindow:]):
1190         (incrementFrame):
1191         Use tree(). instead of tree()->.
1192
1193 2013-08-23  Beth Dakin  <bdakin@apple.com>
1194
1195         REGRESSION (r132545): Some PDFs generated by WebKit are blank when viewed in 
1196         Adobe Reader
1197         https://bugs.webkit.org/show_bug.cgi?id=120240
1198         -and corresponding-
1199         <rdar://problem/14634453>
1200
1201         Reviewed by Anders Carlsson.
1202
1203         Hook up new WebSystemInterface API to find out if the current context is the PDF 
1204         context.
1205
1206         * WebCoreSupport/WebSystemInterface.mm:
1207         (InitWebCoreSystemInterface):
1208
1209 2013-08-20  Pratik Solanki  <psolanki@apple.com>
1210
1211         <https://webkit.org/b/120029> Document::markers() should return a reference
1212
1213         Reviewed by Andreas Kling.
1214
1215         Document::m_markers is never NULL so return a reference from Document::markers(). Also mark
1216         m_markers as const and initialize it in member initialization.
1217
1218         * WebView/WebFrame.mm:
1219         (-[WebFrame _unmarkAllBadGrammar]):
1220         (-[WebFrame _unmarkAllMisspellings]):
1221         * WebView/WebHTMLView.mm:
1222         (-[WebHTMLView unmarkAllTextMatches]):
1223         (-[WebHTMLView rectsForTextMatches]):
1224
1225 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
1226
1227         <https://webkit.org/b/120049> Delete code for Snow Leopard
1228
1229         Reviewed by Benjamin Poulain.
1230
1231         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
1232         (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
1233         (-[WebDefaultUIDelegate webView:contextMenuItemsForElement:defaultMenuItems:]):
1234         * Misc/WebNSControlExtras.m:
1235         (-[NSControl sizeToFitAndAdjustWindowHeight]):
1236         * Misc/WebNSFileManagerExtras.mm:
1237         * WebCoreSupport/WebEditorClient.mm:
1238         (WebEditorClient::shouldEraseMarkersAfterChangeSelection):
1239         (WebEditorClient::getGuessesForWord):
1240         * WebCoreSupport/WebFrameLoaderClient.mm:
1241         (WebFrameLoaderClient::dispatchDidLayout):
1242         (WebFrameLoaderClient::provisionalLoadStarted):
1243         * WebCoreSupport/WebSystemInterface.mm:
1244         (InitWebCoreSystemInterface):
1245         * WebKitPrefix.h:
1246         * WebView/WebDynamicScrollBarsView.mm:
1247         (-[WebDynamicScrollBarsView scrollWheel:]):
1248         * WebView/WebFullScreenController.mm:
1249         (convertRectToScreen):
1250         (-[WebFullScreenController finishedEnterFullScreenAnimation:]):
1251         (-[WebFullScreenController exitFullScreen]):
1252         * WebView/WebHTMLView.mm:
1253         (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
1254         (-[WebHTMLView removeMouseMovedObserver]):
1255         (-[WebHTMLView windowDidBecomeKey:]):
1256         (-[WebHTMLView windowDidResignKey:]):
1257         * WebView/WebView.mm:
1258         (-[WebView _deviceScaleFactor]):
1259
1260 2013-08-19  Ryosuke Niwa  <rniwa@webkit.org>
1261
1262         <https://webkit.org/b/120051> Remove the Mail thread workaround
1263
1264         Reviewed by Sam Weinig.
1265
1266         Remove the workaround for a very old version of Mail added in r39455.
1267
1268         * WebView/WebArchive.mm:
1269         (-[WebArchive initWithMainResource:subresources:subframeArchives:]):
1270         (-[WebArchive mainResource]):
1271         (-[WebArchive subresources]):
1272         (-[WebArchive subframeArchives]):
1273         * WebView/WebFrameView.mm:
1274         (-[WebFrameView initWithFrame:]):
1275         * WebView/WebResource.mm:
1276         (-[WebResource data]):
1277         (-[WebResource URL]):
1278         (-[WebResource MIMEType]):
1279         (-[WebResource textEncodingName]):
1280         (-[WebResource frameName]):
1281         (-[WebResource _ignoreWhenUnarchiving]):
1282         (-[WebResource _initWithData:URL:MIMEType:textEncodingName:frameName:response:copyData:]):
1283         (-[WebResource _suggestedFilename]):
1284         (-[WebResource _response]):
1285         (-[WebResource _stringValue]):
1286
1287 2013-08-19  Pratik Solanki  <psolanki@apple.com>
1288
1289         <https://webkit.org/b/119918> Frame::selection() should return a reference
1290
1291         Reviewed by Darin Adler.
1292
1293         m_selection is never NULL so return a reference from Frame::selection(). Also removed some
1294         unnecessary null checks and assert diff ts exposed as a result.
1295
1296         * Plugins/WebPluginController.mm:
1297         * WebView/WebFrame.mm:
1298         (-[WebFrame _hasSelection]):
1299         (-[WebFrame _rangeByAlteringCurrentSelection:FrameSelection::direction:granularity:]):
1300         (-[WebFrame _selectionGranularity]):
1301         (-[WebFrame _convertToNSRange:]):
1302         (-[WebFrame _convertToDOMRange:]):
1303         (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
1304         (-[WebFrame _typingStyle]):
1305         (-[WebFrame _selectedNSRange]):
1306         (-[WebFrame _selectNSRange:]):
1307         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
1308         (-[WebFrame _replaceSelectionWithText:selectReplacement:smartReplace:]):
1309         * WebView/WebHTMLRepresentation.mm:
1310         (-[WebHTMLRepresentation currentForm]):
1311         * WebView/WebHTMLView.mm:
1312         (-[WebHTMLView readSelectionFromPasteboard:]):
1313         (-[WebHTMLView _selectedRange]):
1314         (-[WebHTMLView _hasSelection]):
1315         (-[WebHTMLView _hasSelectionOrInsertionPoint]):
1316         (-[WebHTMLView _hasInsertionPoint]):
1317         (-[WebHTMLView _isEditable]):
1318         (-[WebHTMLView jumpToSelection:]):
1319         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
1320         (-[WebHTMLView maintainsInactiveSelection]):
1321         (isTextInput):
1322         (isInPasswordField):
1323         (-[WebHTMLView centerSelectionInVisibleArea:]):
1324         (-[WebHTMLView _canSmartCopyOrDelete]):
1325         (-[WebHTMLView _lookUpInDictionaryFromMenu:]):
1326         (-[WebHTMLView _updateSelectionForInputManager]):
1327         (-[WebHTMLView selectionRect]):
1328         (-[WebHTMLView selectionTextRects]):
1329         (-[WebHTMLView selectionImageRect]):
1330         (-[WebHTMLView selectAll]):
1331         (-[WebHTMLView deselectAll]):
1332         (-[WebHTMLView selectedAttributedString]):
1333         * WebView/WebTextCompletionController.mm:
1334         (-[WebTextCompletionController doCompletion]):
1335         * WebView/WebView.mm:
1336         (-[WebView setSelectedDOMRange:affinity:]):
1337         (-[WebView selectedDOMRange]):
1338         (-[WebView selectionAffinity]):
1339         (-[WebView setEditable:]):
1340         (-[WebView _selectionIsCaret]):
1341         (-[WebView _selectionIsAll]):
1342
1343 2013-08-17  Darin Adler  <darin@apple.com>
1344
1345         <https://webkit.org/b/119941> Make Page::dragController return a reference
1346
1347         Reviewed by Andreas Kling.
1348
1349         * WebView/WebFrameView.mm:
1350         (-[WebFrameView _setDocumentView:]):
1351         * WebView/WebHTMLView.mm:
1352         (-[WebHTMLView draggingSourceOperationMaskForLocal:]):
1353         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
1354         * WebView/WebView.mm:
1355         (-[WebView _setInitiatedDrag:]):
1356         (-[WebView draggingEntered:]):
1357         (-[WebView draggingUpdated:]):
1358         (-[WebView draggingExited:]):
1359         (-[WebView performDragOperation:]):
1360         (-[WebView moveDragCaretToPoint:]):
1361         (-[WebView removeDragCaret]):
1362         Updated call sites.
1363
1364 2013-08-16  Pratik Solanki  <psolanki@apple.com>
1365
1366         <https://webkit.org/b/119852> Frame::scriptController() should return a reference
1367
1368         Reviewed by Andreas Kling.
1369
1370         m_script is never NULL so we can just return a reference. Also remove some pointless null
1371         checks as a result of doing this.
1372
1373         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1374         (WebKit::NetscapePluginInstanceProxy::cleanup):
1375         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
1376         (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
1377         (WebKit::NetscapePluginInstanceProxy::evaluate):
1378         (WebKit::NetscapePluginInstanceProxy::invoke):
1379         (WebKit::NetscapePluginInstanceProxy::invokeDefault):
1380         (WebKit::NetscapePluginInstanceProxy::construct):
1381         (WebKit::NetscapePluginInstanceProxy::getProperty):
1382         (WebKit::NetscapePluginInstanceProxy::setProperty):
1383         (WebKit::NetscapePluginInstanceProxy::removeProperty):
1384         (WebKit::NetscapePluginInstanceProxy::hasProperty):
1385         (WebKit::NetscapePluginInstanceProxy::hasMethod):
1386         (WebKit::NetscapePluginInstanceProxy::enumerate):
1387         (WebKit::NetscapePluginInstanceProxy::demarshalValueFromArray):
1388         * Plugins/WebNetscapePluginView.mm:
1389         (-[WebNetscapePluginView getVariable:value:]):
1390         (-[WebNetscapePluginView _destroyPlugin]):
1391         * Plugins/WebPluginController.mm:
1392         * WebCoreSupport/WebFrameLoaderClient.mm:
1393         * WebCoreSupport/WebInspectorClient.mm:
1394         (WebInspectorFrontendClient::save):
1395         (WebInspectorFrontendClient::append):
1396         * WebView/WebFrame.mm:
1397         (-[WebFrame _attachScriptDebugger]):
1398         (-[WebFrame _stringByEvaluatingJavaScriptFromString:forceUserGesture:]):
1399         (-[WebFrame _stringByEvaluatingJavaScriptFromString:withGlobalObject:inScriptWorld:]):
1400         (-[WebFrame _globalContextForScriptWorld:]):
1401         (-[WebFrame jsWrapperForNode:inScriptWorld:]):
1402         (-[WebFrame windowObject]):
1403         (-[WebFrame globalContext]):
1404         (-[WebFrame javaScriptContext]):
1405         * WebView/WebScriptDebugger.mm:
1406         (WebScriptDebugger::initGlobalCallFrame):
1407         (WebScriptDebugger::callEvent):
1408         * WebView/WebView.mm:
1409         (-[WebView windowScriptObject]):
1410         (-[WebView aeDescByEvaluatingJavaScriptFromString:]):
1411
1412 2013-08-15  Anders Carlsson  <andersca@apple.com>
1413
1414         <https://webkit.org/b/119859> Frame::loader() should return a reference
1415
1416         Reviewed by Andreas Kling.
1417
1418         * Plugins/Hosted/HostedNetscapePluginStream.mm:
1419         (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
1420         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1421         (WebKit::NetscapePluginInstanceProxy::performRequest):
1422         (WebKit::NetscapePluginInstanceProxy::loadRequest):
1423         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1424         (-[WebHostedNetscapePluginView pluginView:receivedResponse:]):
1425         * Plugins/WebBaseNetscapePluginView.mm:
1426         (-[WebBaseNetscapePluginView requestWithURLCString:]):
1427         * Plugins/WebNetscapePluginStream.mm:
1428         (WebNetscapePluginStream::WebNetscapePluginStream):
1429         * Plugins/WebNetscapePluginView.mm:
1430         (-[WebNetscapePluginView loadStream]):
1431         (-[WebNetscapePluginView pluginView:receivedResponse:]):
1432         (-[WebNetscapePluginView loadPluginRequest:]):
1433         (-[WebNetscapePluginView loadRequest:inTarget:withNotifyData:sendNotification:]):
1434         * Plugins/WebPluginController.mm:
1435         * WebCoreSupport/WebFrameLoaderClient.mm:
1436         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad):
1437         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad):
1438         (WebFrameLoaderClient::dispatchWillSubmitForm):
1439         (WebFrameLoaderClient::updateGlobalHistory):
1440         (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks):
1441         (WebFrameLoaderClient::restoreViewState):
1442         (WebFrameLoaderClient::transitionToCommittedForNewPage):
1443         (WebFrameLoaderClient::createFrame):
1444         * WebCoreSupport/WebFrameNetworkingContext.mm:
1445         (WebFrameNetworkingContext::blockedError):
1446         * WebCoreSupport/WebPlatformStrategies.mm:
1447         (WebPlatformStrategies::getPluginInfo):
1448         * WebView/WebFrame.mm:
1449         (kit):
1450         (-[WebFrame _dataSource]):
1451         (-[WebFrame _canProvideDocumentSource]):
1452         (-[WebFrame _commitData:]):
1453         (-[WebFrame _firstLayoutDone]):
1454         (-[WebFrame _loadType]):
1455         (-[WebFrame _cacheabilityDictionary]):
1456         (-[WebFrame _clearOpener]):
1457         (-[WebFrame provisionalDataSource]):
1458         (-[WebFrame dataSource]):
1459         (-[WebFrame loadRequest:]):
1460         (-[WebFrame _loadData:MIMEType:textEncodingName:baseURL:unreachableURL:]):
1461         (-[WebFrame loadArchive:]):
1462         (-[WebFrame stopLoading]):
1463         (-[WebFrame reload]):
1464         (-[WebFrame reloadFromOrigin]):
1465         * WebView/WebHTMLRepresentation.mm:
1466         (-[WebHTMLRepresentation receivedData:withDataSource:]):
1467         * WebView/WebHTMLView.mm:
1468         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
1469         * WebView/WebPDFView.mm:
1470         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
1471         * WebView/WebRenderLayer.mm:
1472         (-[WebRenderLayer initWithWebFrame:]):
1473         * WebView/WebRenderNode.mm:
1474         (-[WebRenderNode _initWithCoreFrame:]):
1475         * WebView/WebView.mm:
1476         (-[WebView _close]):
1477         (-[WebView _loadBackForwardListFromOtherView:]):
1478         (-[WebView _cachedResponseForURL:]):
1479         (-[WebView setCustomTextEncodingName:]):
1480         (-[WebView shouldClose]):
1481
1482 2013-08-15  Anders Carlsson  <andersca@apple.com>
1483
1484         <https://webkit.org/b/119854> REGRESSION (r153379): Serious drawing issues with WebViews
1485         <rdar://problem/14698870>
1486
1487         Reviewed by Simon Fraser.
1488
1489         Don't set aside subviews if they have already been set aside.
1490
1491         * WebView/WebHTMLView.mm:
1492         (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]):
1493
1494 2013-08-15  Eric Carlson  <eric.carlson@apple.com>
1495
1496         [Mac] Remove "legacy" media UI
1497         https://bugs.webkit.org/show_bug.cgi?id=119752
1498
1499         Reviewed by Jer Noble.
1500
1501         * WebCoreSupport/WebSystemInterface.mm:
1502         (InitWebCoreSystemInterface): Remove MediaControllerThemeAvailable.
1503
1504 2013-08-14  Tim Horton  <timothy_horton@apple.com>
1505
1506         Remotely hosted plugins don’t work in window-server-hosted WebKit1 views
1507         https://bugs.webkit.org/show_bug.cgi?id=119709
1508         <rdar://problem/14717572>
1509
1510         Reviewed by Anders Carlsson.
1511
1512         * Plugins/Hosted/NetscapePluginHostManager.h:
1513         Add hostLayersInWindowServer argument to instantiatePlugin.
1514
1515         * Plugins/Hosted/NetscapePluginHostManager.mm:
1516         (WebKit::NetscapePluginHostManager::instantiatePlugin):
1517         Add hostLayersInWindowServer argument to instantiatePlugin, and pass it through to WebKitPluginHost.
1518
1519         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1520         (WKPCLayerHostingModeChanged):
1521         Forward the notification that the plugin host changed its layer hosting mode
1522         to the instance proxy.
1523
1524         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1525         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1526         (WebKit::NetscapePluginInstanceProxy::setShouldHostLayersInWindowServer):
1527         Ask the plugin host to re-host its layers when the layer hosting mode changes.
1528
1529         (WebKit::NetscapePluginInstanceProxy::layerHostingModeChanged):
1530         Inform the WebHostedNetscapePluginView of the new layer hosting mode
1531         when it changes. Also, store the new CAContext ID.
1532
1533         * Plugins/Hosted/WebHostedNetscapePluginView.h:
1534         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1535         (-[WebHostedNetscapePluginView windowHostsLayersInWindowServer]):
1536         Determine whether the WebView's current window uses window-server hosting for its layers.
1537
1538         (-[WebHostedNetscapePluginView createPlugin]):
1539         Drive-by spelling fix.
1540         Factor _pluginLayer initialization out into createPluginLayer.
1541         Instantiate the plugin with the appropriate layer hosting mode.
1542
1543         (-[WebHostedNetscapePluginView createPluginLayer]):
1544
1545         (-[WebHostedNetscapePluginView setHostsLayersInWindowServer:]):
1546         Create a new _pluginLayer if the layer hosting mode changes.
1547         Attach the new _pluginLayer to our parent layer.
1548
1549         (-[WebHostedNetscapePluginView updateAndSetWindow]):
1550         Inform the NetscapePluginInstanceProxy if the layer hosting mode changes,
1551         so it can inform the plugin host. We will asynchronously receive a reply
1552         with the new hosting mode and renderContextID and switch to the new CAContext,
1553         in setHostsLayersInWindowServer:.
1554
1555         * Plugins/Hosted/WebKitPluginClient.defs:
1556         * Plugins/Hosted/WebKitPluginHost.defs:
1557
1558 2013-08-14  Tim Horton  <timothy_horton@apple.com>
1559
1560         REGRESSION (r153877): Plugin scanning slows creation of WebViews
1561         https://bugs.webkit.org/show_bug.cgi?id=119665
1562         <rdar://problem/14716549>
1563
1564         Reviewed by Darin Adler.
1565
1566         * Plugins/WebPluginDatabase.h:
1567         * Plugins/WebPluginDatabase.mm:
1568         (+[WebPluginDatabase sharedDatabaseIfExists]): Added.
1569
1570         * WebCoreSupport/WebPlatformStrategies.mm:
1571         (WebPlatformStrategies::refreshPlugins):
1572         Only refresh the plugin database if it's already been loaded.
1573
1574 2013-08-14  Jer Noble  <jer.noble@apple.com>
1575
1576         Revert r154019; causes >50 tests to fail on WebKit1 bots.
1577
1578         * Plugins/Hosted/NetscapePluginHostManager.h:
1579         * Plugins/Hosted/NetscapePluginHostManager.mm:
1580         (WebKit::NetscapePluginHostManager::instantiatePlugin):
1581         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1582         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1583         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1584         * Plugins/Hosted/WebHostedNetscapePluginView.h:
1585         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1586         (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
1587         (-[WebHostedNetscapePluginView createPlugin]):
1588         (-[WebHostedNetscapePluginView updateAndSetWindow]):
1589         * Plugins/Hosted/WebKitPluginClient.defs:
1590         * Plugins/Hosted/WebKitPluginHost.defs:
1591
1592 2013-08-13  Filip Pizlo  <fpizlo@apple.com>
1593
1594         Foo::s_info should be Foo::info(), so that you can change how the s_info is actually linked
1595         https://bugs.webkit.org/show_bug.cgi?id=119770
1596
1597         Reviewed by Mark Hahnenberg.
1598
1599         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1600         (WebKit::getObjectID):
1601         (WebKit::NetscapePluginInstanceProxy::retainLocalObject):
1602         (WebKit::NetscapePluginInstanceProxy::releaseLocalObject):
1603         * Plugins/Hosted/ProxyInstance.mm:
1604         (WebKit::ProxyRuntimeMethod::finishCreation):
1605         (WebKit::ProxyInstance::invokeMethod):
1606         * Plugins/Hosted/ProxyRuntimeObject.h:
1607         (WebKit::ProxyRuntimeObject::createStructure):
1608         * WebView/WebView.mm:
1609         (aeDescFromJSValue):
1610
1611 2013-08-13  Anders Carlsson  <andersca@apple.com>
1612
1613         <https://webkit.org/b/119777> Get rid of two gotos
1614
1615         Reviewed by Tim Horton.
1616
1617         * WebView/WebHTMLView.mm:
1618         (-[WebHTMLView mouseDown:]):
1619         (-[WebHTMLView namesOfPromisedFilesDroppedAtDestination:]):
1620
1621 2013-08-13  Tim Horton  <timothy_horton@apple.com>
1622
1623         Remotely hosted plugins don’t work in window-server-hosted WebKit1 views
1624         https://bugs.webkit.org/show_bug.cgi?id=119709
1625         <rdar://problem/14717572>
1626
1627         Reviewed by Anders Carlsson.
1628
1629         * Plugins/Hosted/NetscapePluginHostManager.h:
1630         Add hostLayersInWindowServer argument to instantiatePlugin.
1631
1632         * Plugins/Hosted/NetscapePluginHostManager.mm:
1633         (WebKit::NetscapePluginHostManager::instantiatePlugin):
1634         Add hostLayersInWindowServer argument to instantiatePlugin, and pass it through to WebKitPluginHost.
1635
1636         * Plugins/Hosted/NetscapePluginHostProxy.mm:
1637         (WKPCLayerHostingModeChanged):
1638         Forward the notification that the plugin host changed its layer hosting mode
1639         to the instance proxy.
1640
1641         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
1642         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
1643         (WebKit::NetscapePluginInstanceProxy::setShouldHostLayersInWindowServer):
1644         Ask the plugin host to re-host its layers when the layer hosting mode changes.
1645
1646         (WebKit::NetscapePluginInstanceProxy::layerHostingModeChanged):
1647         Inform the WebHostedNetscapePluginView of the new layer hosting mode
1648         when it changes. Also, store the new CAContext ID.
1649
1650         * Plugins/Hosted/WebHostedNetscapePluginView.h:
1651         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
1652         (-[WebHostedNetscapePluginView windowHostsLayersInWindowServer]):
1653         Determine whether the WebView's current window uses window-server hosting for its layers.
1654
1655         (-[WebHostedNetscapePluginView createPlugin]):
1656         Drive-by spelling fix.
1657         Factor _pluginLayer initialization out into createPluginLayer.
1658         Instantiate the plugin with the appropriate layer hosting mode.
1659
1660         (-[WebHostedNetscapePluginView createPluginLayer]):
1661
1662         (-[WebHostedNetscapePluginView setHostsLayersInWindowServer:]):
1663         Create a new _pluginLayer if the layer hosting mode changes.
1664         Attach the new _pluginLayer to our parent layer.
1665
1666         (-[WebHostedNetscapePluginView updateAndSetWindow]):
1667         Inform the NetscapePluginInstanceProxy if the layer hosting mode changes,
1668         so it can inform the plugin host. We will asynchronously receive a reply
1669         with the new hosting mode and renderContextID and switch to the new CAContext,
1670         in setHostsLayersInWindowServer:.
1671
1672         * Plugins/Hosted/WebKitPluginClient.defs:
1673         * Plugins/Hosted/WebKitPluginHost.defs:
1674
1675 2013-08-08  Tim Horton  <timothy_horton@apple.com>
1676
1677         navigator.plugins has plugins in it when plugins are disabled
1678         https://bugs.webkit.org/show_bug.cgi?id=119607
1679         <rdar://problem/14678030>
1680
1681         Reviewed by Anders Carlsson.
1682
1683         * WebCoreSupport/WebPlatformStrategies.mm:
1684         (WebPlatformStrategies::getPluginInfo):
1685         If plugins are disabled for the given page, give WebCore an empty list of
1686         plugins. If WebKit1 had any application plugins, we'd return just them
1687         instead.
1688
1689 2013-08-06  Stephanie Lewis  <slewis@apple.com>
1690
1691         Update Order Files for Safari
1692         <rdar://problem/14517392>
1693
1694         Unreviewed.
1695
1696         * WebKit.order:
1697
1698 2013-08-04  Sam Weinig  <sam@webkit.org>
1699
1700         Remove support for HTML5 MicroData
1701         https://bugs.webkit.org/show_bug.cgi?id=119480
1702
1703         Reviewed by Anders Carlsson.
1704
1705         * Configurations/FeatureDefines.xcconfig:
1706
1707 2013-07-23  David Farler  <dfarler@apple.com>
1708
1709         Provide optional OTHER_CFLAGS, OTHER_CPPFLAGS, OTHER_LDFLAGS additions for building with ASAN
1710         https://bugs.webkit.org/show_bug.cgi?id=117762
1711
1712         Reviewed by Mark Rowe.
1713
1714         * Configurations/DebugRelease.xcconfig:
1715         Add ASAN_OTHER_CFLAGS, CPLUSPLUSFLAGS, LDFLAGS.
1716         * Configurations/WebKit.xcconfig:
1717         Add ASAN_OTHER_LDFLAGS.
1718
1719 2013-07-26  Mark Rowe  <mrowe@apple.com>
1720
1721         Logging should be configurable using human-readable channel names rather than crazy bitmasks
1722         <http://webkit.org/b/119031>
1723
1724         Implement shared logic for initializing logging channels based on human-readable channel names in WTF,
1725         and rework the WebCore, WebKit and WebKit2 logging initialization on top of it.
1726
1727         Logging channels may now be enabled by providing a comma-separated list of channel names, with the special
1728         "all" name enabling all channels. Channel names prefixed with a leading "-" will result in the named channel
1729         being disabled. For instance, specifying "all,-history,-loading" will result in all logging channels except
1730         for history and loading being enabled.
1731
1732         For OS X developers, this also changes the name of the user defaults used to enable logging. This is done to allow
1733         the old user defaults to remain set for those people that need to switch between version of WebKit before and
1734         after this change. Where the old user default keys were WebCoreLogLevel, WebKitLogLevel and WebKit2LogLevel,
1735         the new user default keys are WebCoreLogging, WebKitLogging and WebKit2Logging.
1736
1737         For GTK developers, this changes the separator used in the WEBKIT_DEBUG environment variable to a comma for
1738         consistency with the other platforms and to enable more code sharing.
1739
1740         While doing this work I've also taken the opportunity to eliminate the need to touch multiple files when
1741         adding a new logging channel. Now only the header in the relevant project needs to be updated.
1742
1743         Reviewed by Sam Weinig.
1744
1745         * Misc/WebKitLogging.h: Declare a WEBKIT_LOG_CHANNELS macro that can be used to apply a preprocessor macro
1746         across the set of all logging channels. Use this macro to declare the logging channels.
1747         * Misc/WebKitLogging.m: Use WEBKIT_LOG_CHANNELS to define all of the channels. Pass the channels and the
1748         preference value to the new WTF function that handles the initialization.
1749         * WebView/WebPreferenceKeysPrivate.h: Remove a key that does not need to be here.
1750         * WebView/WebView.mm: Switch from WebCore's InitializeLogging.h to Logging.h.
1751
1752 2013-08-01  Ruth Fong  <ruth_fong@apple.com>
1753
1754         [Forms: color] <input type='color'> popover color well implementation
1755         <rdar://problem/14411008> and https://bugs.webkit.org/show_bug.cgi?id=119356
1756
1757         Reviewed by Benjamin Poulain.
1758
1759         * Configurations/FeatureDefines.xcconfig: Added and enabled INPUT_TYPE_COLOR_POPOVER.
1760
1761 2013-07-31  Tim Horton  <timothy_horton@apple.com>
1762
1763         Remove didFinishLoad order quirk
1764         https://bugs.webkit.org/show_bug.cgi?id=119354
1765         <rdar://problem/11510686>
1766
1767         Reviewed by Alexey Proskuryakov.
1768
1769         * Misc/WebKitVersionChecks.h:
1770         * WebView/WebView.mm:
1771         (-[WebView _preferencesChanged:]):
1772         Don't set the now-removed preference.
1773
1774 2013-07-31  Kwang Yul Seo  <skyul@company100.net>
1775
1776         Use emptyString instead of String("")
1777         https://bugs.webkit.org/show_bug.cgi?id=119335
1778
1779         Reviewed by Darin Adler.
1780
1781         Use emptyString() instead of String("") because it is better style and
1782         faster. This is a followup to r116908, removing all occurrences of
1783         String("") from WebKit.
1784
1785         * WebCoreSupport/WebFrameLoaderClient.mm:
1786         (WebFrameLoaderClient::userAgent):
1787
1788 2013-07-31  Ruth Fong  <ruth_fong@apple.com>
1789
1790         <input type=color> Mac UI behaviour
1791         <rdar://problem/10269922> and https://bugs.webkit.org/show_bug.cgi?id=61276
1792
1793         Reviewed by Brady Eidson.
1794
1795         * Configurations/FeatureDefines.xcconfig: Enabled INPUT_TYPE_COLOR.
1796         * WebCoreSupport/WebChromeClient.h:
1797         * WebCoreSupport/WebChromeClient.mm:
1798         (WebChromeClient::createColorPicker): Added stub implementation.
1799
1800 2013-07-26  Dean Jackson  <dino@apple.com>
1801
1802         Allow new transitions to run even when controller is suspended
1803         https://bugs.webkit.org/show_bug.cgi?id=119171
1804         <rdar://problem/14511404>
1805
1806         Reviewed by Simon Fraser.
1807
1808         Expose a new SPI on WebView that triggers the (buggy) old behaviour
1809         for animations, such that any newly created animations will start even
1810         when the document is supposedly suspended. It turns out that client content was
1811         unknowingly relying on this behaviour - e.g. suspending a view, loading a
1812         bunch of new content, bringing the view on screen and then unsuspending. In this
1813         situation, we were not running CSS transitions, because the page was suspended.
1814         However, JS was still triggering them, and content was expecting a transitionEnd event.
1815
1816         * WebView/WebView.mm:
1817         (-[WebView allowsNewCSSAnimationsWhileSuspended]): Calls into AnimationController.
1818         (-[WebView setAllowsNewCSSAnimationsWhileSuspended:]): Ditto.
1819         * WebView/WebViewPrivate.h: New methods listed above.
1820
1821 2013-07-26  Anders Carlsson  <andersca@apple.com>
1822
1823         Add another method that we need to set aside subviews for
1824         https://bugs.webkit.org/show_bug.cgi?id=119157
1825         <rdar://problem/14554723>
1826
1827         Reviewed by Beth Dakin.
1828
1829         * WebView/WebHTMLView.mm:
1830         (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:topView:]):
1831         (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]):
1832
1833 2013-07-25  Andreas Kling  <akling@apple.com>
1834
1835         ChromeClient::focusedNodeChanged() should be focusedElementChanged().
1836         <http://webkit.org/b/119110>
1837
1838         Reviewed by Anders Carlsson.
1839
1840         * WebCoreSupport/WebChromeClient.h:
1841         * WebCoreSupport/WebChromeClient.mm:
1842         (WebChromeClient::focusedElementChanged):
1843
1844 2013-05-05  Geoffrey Garen  <ggaren@apple.com>
1845
1846         Rolled back in r149527 with crash fixed.
1847
1848         Reviewed by Oliver Hunt.
1849
1850             Rationalized 'this' value conversion
1851             https://bugs.webkit.org/show_bug.cgi?id=115542
1852
1853 2013-07-17  Commit Queue  <commit-queue@webkit.org>
1854
1855         Unreviewed, rolling out r152701, r152703, r152739, r152754,
1856         and r152756.
1857         http://trac.webkit.org/changeset/152701
1858         http://trac.webkit.org/changeset/152703
1859         http://trac.webkit.org/changeset/152739
1860         http://trac.webkit.org/changeset/152754
1861         http://trac.webkit.org/changeset/152756
1862         https://bugs.webkit.org/show_bug.cgi?id=118821
1863
1864         this was a buggy fix and we're going to try something
1865         different (Requested by thorton on #webkit).
1866
1867         * WebCoreSupport/WebChromeClient.h:
1868         * WebCoreSupport/WebChromeClient.mm:
1869         (WebChromeClient::shouldUnavailablePluginMessageBeButton):
1870
1871 2013-07-17  Kangil Han  <kangil.han@samsung.com>
1872
1873         Use toHTMLMediaElement
1874         https://bugs.webkit.org/show_bug.cgi?id=118727
1875
1876         Reviewed by Ryosuke Niwa.
1877
1878         To avoid direct use of static_cast, this patch uses toHTMLMediaElement for code cleanup.
1879
1880         * WebView/WebView.mm:
1881         (-[WebView _enterFullscreenForNode:WebCore::]):
1882
1883 2013-07-16  Simon Fraser  <simon.fraser@apple.com>
1884
1885         Protect against the LayerFlushController being deleted inside its flushLayers() callback
1886         https://bugs.webkit.org/show_bug.cgi?id=118741
1887         <rdar://problem/14402651>
1888
1889         Reviewed by Tim Horton.
1890         
1891         It's possible (especially on iOS) for the LayerFlushController to be destroyed
1892         inside its callback, via -[WebView _close]. Protect against this by making
1893         it refcounted, and holding a ref across the callback.
1894         
1895         Due to the odd relationship in which LayerFlushController owns its LayerFlushScheduler
1896         by value, we achieve this by allowing subclasses of LayerFlushScheduler
1897         to override runLoopObserverCallback(). WebViewLayerFlushScheduler uses the
1898         override to protect the owner of the LayerFlushScheduler, which is the
1899         LayerFlushController, when the callback is firing.
1900
1901         * WebView/WebView.mm:
1902         (-[WebView _close]):
1903         * WebView/WebViewData.h:
1904         (WebViewLayerFlushScheduler::~WebViewLayerFlushScheduler):
1905         (LayerFlushController::create):
1906         * WebView/WebViewData.mm:
1907         (LayerFlushController::invalidate):
1908         (WebViewLayerFlushScheduler::WebViewLayerFlushScheduler):
1909
1910 2013-07-16  Jessie Berlin  <jberlin@apple.com>
1911
1912         Fix some NSDictionary misuse pointed out by the clang static analyzer
1913         https://bugs.webkit.org/show_bug.cgi?id=118736
1914
1915         Reviewed by Anders Carlsson.
1916
1917         * Plugins/Hosted/NetscapePluginHostManager.mm:
1918         (WebKit::NetscapePluginHostManager::spawnPluginHost):
1919         Explicitly cast the CFStringRef to an NSString *.
1920         * WebCoreSupport/WebEditorClient.mm:
1921         (WebEditorClient::documentFragmentFromAttributedString):
1922         Do not put a key with a nil value pair into the NSDictionary.
1923
1924 2013-07-15  Tim Horton  <timothy_horton@apple.com>
1925
1926         Update blocked/missing plug-in UI
1927         https://bugs.webkit.org/show_bug.cgi?id=118347
1928         <rdar://problem/14209318>
1929
1930         Reviewed by Sam Weinig.
1931         Patch by Antoine Quint, Anders Carlsson, Sam Weinig, and myself.
1932
1933         * WebCoreSupport/WebChromeClient.h:
1934         * WebCoreSupport/WebChromeClient.mm:
1935         (WebChromeClient::shouldUnavailablePluginMessageIncludeButton):
1936         Rename from shouldUnavailablePluginMessageBeButton to
1937         shouldUnavailablePluginMessageIncludeButton for accuracy.
1938
1939 2013-07-14  Jon Lee  <jonlee@apple.com>
1940
1941         [WK2] Calling Notification.requestPermission() without a callback crashes
1942         https://bugs.webkit.org/show_bug.cgi?id=118654
1943         <rdar://problem/14293352>
1944
1945         Reviewed by Alexey Proskuryakov.
1946
1947         * WebCoreSupport/WebNotificationClient.mm:
1948         (-[WebNotificationPolicyListener initWithCallback:]): The callback can be NULL, so remove the ASSERT.
1949         (-[WebNotificationPolicyListener allow]): Check for the callback before asking it to handle the event.
1950         (-[WebNotificationPolicyListener deny]): Ditto.
1951
1952 2013-07-12  Jessie Berlin  <jberlin@apple.com>
1953
1954         Remove some dead stores pointed out by the clang static analyzer.
1955         https://bugs.webkit.org/show_bug.cgi?id=118608
1956
1957         Reviewed by Anders Carlsson.
1958
1959         * Plugins/Hosted/NetscapePluginHostManager.mm:
1960         (WebKit::NetscapePluginHostManager::instantiatePlugin):
1961         kr is never read after this point, so there is no reason to assign to it.
1962
1963         * Plugins/WebBasePluginPackage.mm:
1964         (-[WebBasePluginPackage getPluginInfoFromPLists]):
1965         The extensions array is only used in the while loop. Move the declaration to the first place
1966         it is used in the while loop. Since it is always reassigned at that location, and since it
1967         is never read after the subsequent for loop, the assignment to an array containing the empty
1968         string is never used. Remove it.
1969         Similarly, the value of the description is always overwritten before used to assign to
1970         mimeClassInfo.desc or to pluginInfo.desc, so the code to assign it to the empty string is
1971         never used. Remove it.
1972
1973         * WebView/WebTextCompletionController.mm:
1974         (-[WebTextCompletionController _placePopupWindow:]):
1975         maxWidth is never read (and never was since it was added in r7311) after it is used on the
1976         line above to set windowFrame.size.width.
1977
1978 2013-07-11  Dan Bernstein  <mitz@apple.com>
1979
1980         [mac] No API for getting the page visibility state of a WebView
1981         https://bugs.webkit.org/show_bug.cgi?id=118578
1982
1983         Reviewed by Simon Fraser.
1984
1985         * WebView/WebView.mm:
1986         (kit): Added. Converts from WebCore::PageVisibilityState to WebPageVisibilityState.
1987         (-[WebView _visibilityState]): Added.
1988         * WebView/WebViewPrivate.h: Declared -_visibilityState.
1989
1990 2013-07-11  Timothy Hatcher  <timothy@apple.com>
1991
1992         Revert r152267 and soft link WebInspectorUI.framework again.
1993
1994         https://bugs.webkit.org/show_bug.cgi?id=118544
1995
1996         Reviewed by David Kilzer.
1997
1998         * Configurations/WebKit.xcconfig:
1999         * WebCoreSupport/WebInspectorClient.mm:
2000         (useWebKitWebInspector):
2001
2002 2013-07-10  Jessie Berlin  <jberlin@apple.com>
2003
2004         Remove some dead code from WebNSURLExtras _web_hostString
2005         https://bugs.webkit.org/show_bug.cgi?id=118519
2006
2007         Reviewed by Anders Carlsson.
2008
2009         * Misc/WebNSURLExtras.mm:
2010         (-[NSURL _web_hostString]):
2011         NSString initWithData:encoding: does not throw an exception when passing nil for the data, so
2012         just delete the code that wasn't being run.
2013
2014 2013-07-09  Jeremy Noble  <jer.noble@apple.com>
2015
2016         Reviewed by Simon Fraser.
2017
2018         Remember the scroll position and restore after exiting full-screen mode.
2019         https://bugs.webkit.org/show_bug.cgi?id=61956
2020         <rdar://problem/9544461>
2021
2022         Call into the main FrameView to save the scroll position before swapping the
2023         WebView into the full-screen window, and restore the scroll position after 
2024         swapping the WebView back into the browser window.
2025
2026         * WebView/WebFullScreenController.h:
2027         * WebView/WebFullScreenController.mm:
2028         (-[WebFullScreenController windowDidEnterFullscreen:]): Save the scroll position.
2029         (-[WebFullScreenController exitFullscreen]): Restore the scroll position.
2030
2031 2013-07-04  Yongjun Zhang  <yongjun_zhang@apple.com>
2032
2033         Add a method to get unreachable URL from WebFrame.
2034         https://bugs.webkit.org/show_bug.cgi?id=118399
2035
2036         Normally we could use [[WebFrame dataSource] unreachableURL] to get the failed URL.  However, if the frame has not
2037         loaded (FrameLoader::frameHasLoaded() is false), we will get a nil dataSource and we won't be able to get unreachableURL.
2038         We can add a method to always return the unreachableURL regardless if the frame has loaded or not.
2039
2040         Reviewed by Dan Bernstein.
2041
2042         * WebView/WebFrame.mm:
2043         (-[WebFrame _unreachableURL]):
2044         * WebView/WebFramePrivate.h:
2045
2046 2013-07-03  Zalan Bujtas  <zalan@apple.com>
2047
2048         H&R Block 2010 Help window can not be reopened.
2049         https://bugs.webkit.org/show_bug.cgi?id=118342
2050
2051         Reviewed by Antti Koivisto.
2052
2053         http://trac.webkit.org/changeset/118916 changed the window.focus() behaviour so that
2054         only the opener can (re)focus() a particular window.
2055         H&R Block app relies on the relaxed window.focus() rules.
2056
2057         * WebView/WebView.mm:
2058         (shouldRestrictWindowFocus):
2059         (-[WebView _preferencesChanged:]):
2060
2061 2013-07-01  Timothy Hatcher  <timothy@apple.com>
2062
2063         Link to WebInspectorUI.framework at build time instead of soft linking.
2064
2065         https://bugs.webkit.org/show_bug.cgi?id=118261
2066
2067         Reviewed by Joseph Pecoraro.
2068
2069         * Configurations/WebKit.xcconfig:
2070         * WebCoreSupport/WebInspectorClient.mm:
2071         (useWebKitWebInspector):
2072
2073 2013-07-01  Jochen Eisinger  <jochen@chromium.org>
2074
2075         Remove support for consumable user gestures
2076         https://bugs.webkit.org/show_bug.cgi?id=118247
2077
2078         Reviewed by Geoffrey Garen.
2079
2080         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2081         (WebKit::NetscapePluginInstanceProxy::evaluate):
2082         * Plugins/WebNetscapePluginView.mm:
2083         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
2084
2085 2013-06-27  Jer Noble  <jer.noble@apple.com>
2086
2087         Audio in apps which embed WebViews is corrupted.
2088         https://bugs.webkit.org/show_bug.cgi?id=118163
2089
2090         Reviewed by Maciej Stachowiak.
2091
2092         Expose the WebCore lowPowerVideoAudioBufferSizeEnabled setting to WebKit clients.
2093
2094         * WebView/WebPreferenceKeysPrivate.h:
2095         * WebView/WebPreferences.mm:
2096         (+[WebPreferences initialize]):
2097         (-[WebPreferences lowPowerVideoAudioBufferSizeEnabled]):
2098         (-[WebPreferences setLowPowerVideoAudioBufferSizeEnabled:]):
2099         * WebView/WebPreferencesPrivate.h:
2100         * WebView/WebView.mm:
2101         (-[WebView _preferencesChanged:]):
2102
2103 2013-07-01  Kangil Han  <kangil.han@samsung.com>
2104
2105         Adopt toHTMLTextAreaElement for code cleanup
2106         https://bugs.webkit.org/show_bug.cgi?id=118226
2107
2108         Reviewed by Andreas Kling.
2109
2110         To enhance readability, this patch adopts toHTMLTextAreaElement.
2111         This also helps out to reduce duplicated use of static_cast.
2112
2113         * WebCoreSupport/WebEditorClient.mm:
2114         (WebEditorClient::textDidChangeInTextArea):
2115
2116 2013-06-27  Kangil Han  <kangil.han@samsung.com>
2117
2118         Adopt is/toHTMLInputElement for code cleanup
2119         https://bugs.webkit.org/show_bug.cgi?id=118130
2120
2121         Reviewed by Antti Koivisto.
2122
2123         To enhance readability, this patch adopts is/toHTMLInputElement.
2124         This also helps out to reduce duplicated use of static_cast.
2125
2126         * DOM/WebDOMOperations.mm:
2127         (-[DOMHTMLInputElement _setAutofilled:]):
2128         * WebCoreSupport/WebChromeClient.mm:
2129         (WebChromeClient::focusedNodeChanged):
2130         * WebCoreSupport/WebEditorClient.mm:
2131         (WebEditorClient::textFieldDidBeginEditing):
2132         (WebEditorClient::textFieldDidEndEditing):
2133         (WebEditorClient::textDidChangeInTextField):
2134         (WebEditorClient::doTextFieldCommandFromEvent):
2135         (WebEditorClient::textWillBeDeletedInTextField):
2136         * WebView/WebHTMLRepresentation.mm:
2137         (inputElementFromDOMElement):
2138
2139 2013-06-26  Kangil Han  <kangil.han@samsung.com>
2140
2141         Adopt is/toHTMLAudioElement for code cleanup
2142         https://bugs.webkit.org/show_bug.cgi?id=117985
2143
2144         Reviewed by Jer Noble.
2145
2146         To enhance readibility, this patch adopts is/toHTMLAudioElement.
2147         This also helps out to reduce duplicated use of static_cast.
2148
2149         * Plugins/WebPluginController.mm:
2150
2151 2013-06-24  Simon Fraser  <simon.fraser@apple.com>
2152
2153         Move displayID stuff from Widget to Chrome
2154         https://bugs.webkit.org/show_bug.cgi?id=117944
2155
2156         Reviewed by Anders Carlsson.
2157
2158         In r151877 I polluted Widget with displayID-related stuff. This would
2159         be better on HostWindow, so move it there. This is a net code reduction,
2160         and eliminates PlatformScreenMac.h, and the NSScreen category.
2161
2162         * WebView/WebView.mm:
2163         (-[WebView doWindowDidChangeScreen]): Go via chrome().
2164
2165 2013-06-21  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2166
2167         REGRESSION (r150663): Using webkitAudioContext in Inspector makes it undefined everywhere
2168         https://bugs.webkit.org/show_bug.cgi?id=117825
2169
2170         Reviewed by Kentaro Hara.
2171
2172         Use Settings to enable Web Audio instead of RuntimeEnabledFeatures.
2173
2174         * WebView/WebView.mm:
2175         (-[WebView _preferencesChanged:]):
2176
2177 2013-06-20  Simon Fraser  <simon.fraser@apple.com>
2178
2179         FrameView needs to initialize paintsEntireContents on creation
2180         https://bugs.webkit.org/show_bug.cgi?id=117844
2181
2182         Reviewed by Anders Carlsson.
2183         
2184         In WebKit1, if the WebView is layer-backed, WebHTMLView gets a layer.
2185         In this mode, FrameView::paintsEntireContents() is true. However,
2186         we would only call setPaintsEntireContents(true) on the FrameView
2187         when the view's layer-backed status changes. FrameView also needs
2188         to fetch this state when it is initialized, because we may be creating
2189         a new FrameView for an already layer-backed WebHTMLView.
2190
2191         * WebCoreSupport/WebChromeClient.h:
2192         * WebCoreSupport/WebChromeClient.mm:
2193         (WebChromeClient::shouldPaintEntireContents):
2194
2195 2013-06-19  Benjamin Poulain  <bpoulain@apple.com>
2196
2197         Use the PlatformEvent timestamp when creating a DOM Event
2198         https://bugs.webkit.org/show_bug.cgi?id=117179
2199
2200         Reviewed by Darin Adler.
2201
2202         * WebView/WebPDFView.mm:
2203         (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
2204
2205 2013-06-18  Roger Fong  <roger_fong@apple.com>
2206
2207         Unreviewed. Build fix for Mac.
2208
2209         * WebCoreSupport/WebFrameNetworkingContext.h:
2210         (WebFrameNetworkingContext::create):
2211         (WebFrameNetworkingContext::WebFrameNetworkingContext):
2212
2213 2013-06-18  Roger Fong  <roger_fong@apple.com>
2214
2215         Re-implement WebFrameNetworkingContext.
2216         <rdar://problem/13174821>.
2217
2218         Reviewed by Alexey Proskuryakov.
2219
2220         * WebCoreSupport/WebFrameNetworkingContext.h: Added.
2221         (WebFrameNetworkingContext::create):
2222         (WebFrameNetworkingContext::WebFrameNetworkingContext):
2223         (WebFrameNetworkingContext::userAgent):
2224         * WebCoreSupport/WebFrameNetworkingContext.mm: Added.
2225         (WebFrameNetworkingContext::ensurePrivateBrowsingSession):
2226         (WebFrameNetworkingContext::destroyPrivateBrowsingSession):
2227         (WebFrameNetworkingContext::needsSiteSpecificQuirks):
2228         (WebFrameNetworkingContext::localFileContentSniffingEnabled):
2229         (WebFrameNetworkingContext::scheduledRunLoopPairs):
2230         (WebFrameNetworkingContext::sourceApplicationAuditData):
2231         (WebFrameNetworkingContext::blockedError):
2232         (WebFrameNetworkingContext::storageSession):
2233
2234 2013-06-18  Alexey Proskuryakov  <ap@apple.com>
2235
2236         <rdar://problem/13174821> Remove files with an incorrect license.
2237
2238         Rubber-stamped by Maciej Stachowiak.
2239
2240         This will break the build, stay tuned for a fix coming soon.
2241
2242         * WebCoreSupport/WebFrameNetworkingContext.h: Removed.
2243         * WebCoreSupport/WebFrameNetworkingContext.mm: Removed.
2244
2245 2013-06-17  Michael Brüning  <michael.bruning@digia.com>
2246
2247         [Qt] Remove Qt specific QTKIT flagged code.
2248         https://bugs.webkit.org/show_bug.cgi?id=117635
2249
2250         Reviewed by Simon Hausmann.
2251
2252         Due to disabling QTKIT for Qt in r151546, the
2253         code the flags that are not taken into account
2254         anymore and the code that has been rendered
2255         unreachable by this are removed.
2256
2257         * WebView/WebView.mm:
2258         (-[WebView _preferencesChanged:]):
2259
2260 2013-06-17  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2261
2262         Unreviewed, rolling out r151632.
2263         http://trac.webkit.org/changeset/151632
2264         https://bugs.webkit.org/show_bug.cgi?id=117585
2265
2266         Debug build error ASSERT(WTF_USE_GRAMMAR_CHECKING) for non MAC
2267         platforms
2268
2269         * WebCoreSupport/WebContextMenuClient.mm:
2270         (fixMenusReceivedFromOldClients):
2271
2272 2013-06-14  Grzegorz Czajkowski  <g.czajkowski@samsung.com>
2273
2274         Context menu grammar checking items are available when GRAMMAR_CHECKING macro is off
2275         https://bugs.webkit.org/show_bug.cgi?id=117585
2276
2277         Reviewed by Anders Carlsson.
2278
2279         Add GRAMMAR_CHECKING guard to the context menu grammar items.
2280
2281         * WebCoreSupport/WebContextMenuClient.mm:
2282         (fixMenusReceivedFromOldClients):
2283
2284 2013-06-13  Jer Noble  <jer.noble@apple.com>
2285
2286         Add support for AVFoundation-backed HTMLMediaElements in the WebVideoFullScreenController.
2287         https://bugs.webkit.org/show_bug.cgi?id=117597
2288
2289         Reviewed by Eric Carlson.
2290
2291         Allow AVFoundation to be enabled even when the FullScreen API is disabled.
2292
2293         * WebView/WebView.mm:
2294         (-[WebView _preferencesChanged:]): 
2295
2296 2013-06-12  Anders Carlsson  <andersca@apple.com>
2297
2298         Remove the notion of inactive plug-ins
2299         https://bugs.webkit.org/show_bug.cgi?id=117570
2300         <rdar://problem/13484213>
2301
2302         Reviewed by Tim Horton.
2303
2304         Remove code that deals with inactive plug-ins.
2305
2306         * WebCoreSupport/WebChromeClient.mm:
2307         (WebChromeClient::shouldUnavailablePluginMessageBeButton):
2308         (WebChromeClient::unavailablePluginButtonClicked):
2309         * WebCoreSupport/WebFrameLoaderClient.mm:
2310         (WebFrameLoaderClient::createPlugin):
2311
2312 2013-06-12  Zan Dobersek  <zdobersek@igalia.com>
2313
2314         Remove memoryInfoEnabled, quantizedMemoryInfoEnabled settings
2315         https://bugs.webkit.org/show_bug.cgi?id=117512
2316
2317         Reviewed by Darin Adler.
2318
2319         * WebKit.order: Remove the memoryInfoEnabled entry.
2320         * WebView/WebPreferenceKeysPrivate.h: Remove WebKitMemoryInfoEnabledPreferenceKey.
2321         * WebView/WebPreferences.mm: Remove memoryInfoEnabled, setMemoryInfoEnabled methods.
2322         (+[WebPreferences initialize]): Don't set the default value for the WebKitMemoryInfoEnabledPreferenceKey, the preference is being removed.
2323         * WebView/WebPreferencesPrivate.h: Remove memoryInfoEnabled, setMemoryInfoEnabled method declarations.
2324         * WebView/WebView.mm:
2325         (-[WebView _preferencesChanged:]): Remove the call to Settings::setMemoryInfoEnabled, the setting is being removed.
2326
2327 2013-06-06  Timothy Hatcher  <timothy@apple.com>
2328
2329         Update the framework bundle identifier for the Web Inspector.
2330
2331         Reviewed by Mark Rowe.
2332
2333         * WebCoreSupport/WebInspectorClient.mm:
2334         (useWebKitWebInspector):
2335         (WebInspectorFrontendClient::localizedStringsURL):
2336         (-[WebInspectorWindowController inspectorPagePath]):
2337
2338 2013-06-05  Bear Travis  <betravis@adobe.com>
2339
2340         [CSS Exclusions][CSS Shapes] Split CSS Exclusions & Shapes compile & runtime flags
2341         https://bugs.webkit.org/show_bug.cgi?id=117172
2342
2343         Reviewed by Alexandru Chiculita.
2344
2345         Adding the CSS_SHAPES compile flag.
2346
2347         * Configurations/FeatureDefines.xcconfig:
2348
2349 2013-06-01  Andreas Kling  <akling@apple.com>
2350
2351         Remove unnused WebDOMNodeOperationsInternal category.
2352         <http://webkit.org/b/117105>
2353
2354         Reviewed by Ryosuke Niwa.
2355
2356         _subresourceURLs had no clients.
2357
2358         * DOM/WebDOMOperations.mm:
2359
2360 2013-06-01  Andreas Kling  <akling@apple.com>
2361
2362         Move Node::hasID() and hasClass() to Element.
2363         <http://webkit.org/b/117104>
2364
2365         Reviewed by Ryosuke Niwa.
2366
2367         * WebView/WebRenderLayer.mm:
2368         (+[WebRenderLayer nameForLayer:]):
2369
2370 2013-05-31  Stephanie Lewis  <slewis@apple.com>
2371
2372         Update low memory handler to use new memory pressure notifications on new OS versions.
2373         <rdar://problem/14027095> 
2374
2375         Reviewed by Mark Rowe.
2376
2377         * WebCoreSupport/WebSystemInterface.mm:
2378         (InitWebCoreSystemInterface):
2379
2380 2013-05-29  Jeffrey Pfau  <jpfau@apple.com>
2381
2382         [Mac] Enable cache partitioning and the public suffix list on 10.8
2383         <rdar://problem/13679019>
2384
2385         Rubber-stamped by David Kilzer.
2386
2387         * Configurations/FeatureDefines.xcconfig:
2388
2389 2013-05-29  Joseph Pecoraro  <pecoraro@apple.com>
2390
2391         Web Inspector: get rid of obsolete InspectorFrontendHost.hiddenPanels()
2392         https://bugs.webkit.org/show_bug.cgi?id=60152
2393
2394         Reviewed by Andreas Kling.
2395
2396         * WebCoreSupport/WebInspectorClient.mm:
2397
2398 2013-05-28  Joseph Pecoraro  <pecoraro@apple.com>
2399
2400         Drag to move DOM nodes does not work
2401         https://bugs.webkit.org/show_bug.cgi?id=116865
2402
2403         Do not block drag events on the WebKit 1 Web Inspector WebView.
2404
2405         Reviewed by Timothy Hatcher.
2406
2407         * WebCoreSupport/WebInspectorClient.mm:
2408
2409 2013-05-28  Andreas Kling  <akling@apple.com>
2410
2411         Document::setFocusedNode() should be setFocusedElement().
2412         <http://webkit.org/b/116857>
2413
2414         Reviewed by Antti Koivisto.
2415
2416         * WebView/WebHTMLView.mm:
2417         (-[WebHTMLView clearFocus]):
2418         (-[WebHTMLView becomeFirstResponder]):
2419
2420 2013-05-25  Andreas Kling  <akling@apple.com>
2421
2422         Remove Document::getFocusableNodes().
2423         <http://webkit.org/b/116773>
2424
2425         Reviewed by Joseph Pecoraro.
2426
2427         Remove the private _focusableNodes API on DOMDocument, it has no clients.
2428
2429         * DOM/WebDOMOperations.mm:
2430         * DOM/WebDOMOperationsPrivate.h:
2431
2432 2013-05-25  Simon Fraser  <simon.fraser@apple.com>
2433
2434         Unprefix Page Visibility API
2435         https://bugs.webkit.org/show_bug.cgi?id=102340
2436
2437         Reviewed by Tim Horton.
2438
2439         Renaming of the "preview" state to "unloaded".
2440
2441         * WebView/WebView.mm:
2442         * WebView/WebViewPrivate.h:
2443
2444 2013-05-25  Dan Bernstein  <mitz@apple.com>
2445
2446         <rdar://problem/13924889> -webView:didPerformClientRedirectFromURL:toURL:inFrame: should be given the redirecting URL as the “from” URL
2447         https://bugs.webkit.org/show_bug.cgi?id=116733
2448
2449         Reviewed by Adele Peterson.
2450
2451         By the time the history controller calls updateGlobalHistoryRedirectLinks(), the document
2452         loader already reflects the destination URL. In order to be able to provide the immediate
2453         source URL to the delegate, we make WebFrame track a URL and provisional URL, updating them
2454         in response to FrameLoader callbacks in exactly the same way WebFrameProxy maintains its
2455         m_url and m_provisionalURL member variables.
2456
2457         * WebCoreSupport/WebFrameLoaderClient.mm:
2458         (WebFrameLoaderClient::dispatchDidReceiveServerRedirectForProvisionalLoad): Update
2459         provisionalURL.
2460         (WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): Update url.
2461         (WebFrameLoaderClient::dispatchDidPushStateWithinPage): Ditto.
2462         (WebFrameLoaderClient::dispatchDidReplaceStateWithinPage): Ditto.
2463         (WebFrameLoaderClient::dispatchDidPopStateWithinPage): Ditto.
2464         (WebFrameLoaderClient::dispatchDidStartProvisionalLoad): Update provisionalURL.
2465         (WebFrameLoaderClient::dispatchDidCommitLoad): Update URL and provisionalURL.
2466         (WebFrameLoaderClient::dispatchDidFailProvisionalLoad): Clear provisionalURL.
2467         (WebFrameLoaderClient::dispatchDidFailLoad): Added an assertion.
2468         (WebFrameLoaderClient::dispatchDidFinishLoad): Ditto.
2469         (WebFrameLoaderClient::updateGlobalHistoryRedirectLinks): Pass the last committed URL as the
2470         source, rather than clientRedirectSourceForHistory().
2471         * WebView/WebFrameInternal.h: Added url and provisionalURL ivars to WebFramePrivate.
2472
2473 2013-05-24  Anders Carlsson  <andersca@apple.com>
2474
2475         Remove using namespace std from Mac WebKit1
2476         https://bugs.webkit.org/show_bug.cgi?id=116747
2477
2478         Reviewed by Sam Weinig.
2479
2480         Use explicit std:: qualifiers instead.
2481
2482         * History/BinaryPropertyList.cpp:
2483         (IntegerArray::deletedValueSize):
2484         (BinaryPropertyListPlan::invalidObjectReference):
2485         (bytesNeeded):
2486         * History/WebHistory.mm:
2487         (-[WebHistoryPrivate orderedLastVisitedDays]):
2488         (WebHistoryWriter::WebHistoryWriter):
2489         * History/WebHistoryItem.mm:
2490         (-[WebHistoryItem initFromDictionaryRepresentation:]):
2491         * Plugins/Hosted/NetscapePluginHostManager.mm:
2492         (WebKit::NetscapePluginHostManager::instantiatePlugin):
2493         * Plugins/Hosted/NetscapePluginHostProxy.mm:
2494         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
2495         (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::idForObject):
2496         (WebKit::NetscapePluginInstanceProxy::wheelEvent):
2497         (WebKit::NetscapePluginInstanceProxy::print):
2498         (WebKit::NetscapePluginInstanceProxy::snapshot):
2499         (WebKit::NetscapePluginInstanceProxy::loadURL):
2500         (WebKit::NetscapePluginInstanceProxy::createBindingsInstance):
2501         * Plugins/Hosted/ProxyInstance.mm:
2502         (WebKit::ProxyInstance::invoke):
2503         (WebKit::ProxyInstance::supportsInvokeDefaultMethod):
2504         (WebKit::ProxyInstance::supportsConstruct):
2505         (WebKit::ProxyInstance::getPropertyNames):
2506         (WebKit::ProxyInstance::methodNamed):
2507         (WebKit::ProxyInstance::fieldNamed):
2508         (WebKit::ProxyInstance::fieldValue):
2509         (WebKit::ProxyInstance::setFieldValue):
2510         * Plugins/WebBasePluginPackage.mm:
2511         (-[WebBasePluginPackage supportsExtension:]):
2512         (-[WebBasePluginPackage MIMETypeForExtension:]):
2513         * Plugins/WebNetscapePluginStream.mm:
2514         (WebNetscapePluginStream::deliverData):
2515         * Plugins/WebNetscapePluginView.mm:
2516         (PluginTimer::start):
2517         (-[WebNetscapePluginView _postURL:target:len:buf:file:notifyData:sendNotification:allowHeaders:]):
2518         * WebCoreSupport/WebFrameLoaderClient.mm:
2519         * WebView/WebFrame.mm:
2520         * WebView/WebHTMLView.mm:
2521         (-[WebHTMLView _adjustedBottomOfPageWithTop:bottom:limit:]):
2522         * WebView/WebTextCompletionController.mm:
2523         (-[WebTextCompletionController _placePopupWindow:]):
2524
2525 2013-05-24  Anders Carlsson  <andersca@apple.com>
2526
2527         Move history property list writer to WebKit
2528         https://bugs.webkit.org/show_bug.cgi?id=116746
2529
2530         Reviewed by Tim Horton.
2531
2532         Move WebCore history files to WebKit since they're only used by WebKit now.
2533
2534         * History/BinaryPropertyList.cpp: Renamed from Source/WebCore/platform/cf/BinaryPropertyList.cpp.
2535         * History/BinaryPropertyList.h: Renamed from Source/WebCore/platform/cf/BinaryPropertyList.h.
2536         * History/HistoryPropertyList.cpp: Renamed from Source/WebCore/history/cf/HistoryPropertyList.cpp.
2537         * History/HistoryPropertyList.h: Renamed from Source/WebCore/history/cf/HistoryPropertyList.h.
2538         * History/WebHistory.mm:
2539
2540 2013-05-24  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2541
2542         Remove custom code for webkitAudioContext global constructor getter
2543         https://bugs.webkit.org/show_bug.cgi?id=116530
2544
2545         Reviewed by Geoffrey Garen.
2546
2547         Use RuntimeEnabledFeatures instead of Settings to toggle Web Audio support.
2548
2549         * WebView/WebView.mm:
2550         (-[WebView _preferencesChanged:]):
2551
2552 2013-05-23  Anders Carlsson  <andersca@apple.com>
2553
2554         Crash in convertMainResourceLoadToDownload when downloading file by option-return
2555         https://bugs.webkit.org/show_bug.cgi?id=116451
2556
2557         Reviewed by Andreas Kling.
2558
2559         If the main resource loader is null, create a new download instead since there's no existing loader to convert.
2560
2561         * WebCoreSupport/WebFrameLoaderClient.mm:
2562         (WebFrameLoaderClient::convertMainResourceLoadToDownload):
2563
2564 2013-05-22  Simon Fraser  <simon.fraser@apple.com>
2565
2566         Fix issues with focus rings on search fields
2567         https://bugs.webkit.org/show_bug.cgi?id=116591
2568
2569         Reviewed by Darin Adler.
2570         
2571         In WebKit1, focus rings didn't render correctly on some OSes until
2572         some other control drew a focus ring, which changes internal AppKit state
2573         on the focused view. Fix by overriding an internal AppKit method to always
2574         disable AppKit's "automatic" focus ring drawing.
2575
2576         * WebView/WebHTMLView.mm:
2577         (-[WebHTMLView _automaticFocusRingDisabled]):
2578
2579 2013-05-20  David Kilzer  <ddkilzer@apple.com>
2580
2581         Synchronize FeatureDefines.xcconfig
2582
2583         * Configurations/FeatureDefines.xcconfig: Add a newline to the
2584         end of the file.
2585
2586 2013-05-19  Anders Carlsson  <andersca@apple.com>
2587
2588         Remove link prerendering code
2589         https://bugs.webkit.org/show_bug.cgi?id=116415
2590
2591         Reviewed by Darin Adler.
2592
2593         This code was only used by Chromium and is dead now.
2594
2595         * Configurations/FeatureDefines.xcconfig:
2596
2597 2013-05-19  Anders Carlsson  <andersca@apple.com>
2598
2599         Remove ChromeClient::webView()
2600         https://bugs.webkit.org/show_bug.cgi?id=116054
2601
2602         Reviewed by Darin Adler.
2603
2604         This blatantly horrible layer violation was only used to know if a ChromeClient is an empty
2605         client or not. We already have a (slightly less horrible) way to do that.
2606
2607         * WebCoreSupport/WebChromeClient.h:
2608         (WebChromeClient):
2609
2610 2013-05-17  Anders Carlsson  <andersca@apple.com>
2611
2612         Accessing null function pointers is bad.
2613
2614         * WebCoreSupport/WebFrameLoaderClient.mm:
2615
2616 2013-05-17  Anders Carlsson  <andersca@apple.com>
2617
2618         Make kit(Frame*) more robust
2619         https://bugs.webkit.org/show_bug.cgi?id=116324
2620
2621         Reviewed by Darin Adler.
2622
2623         Check that the frame loader's client isn't the EmptyFrameLoaderClient (or a subclass thereof)
2624         before casting to WebFrameLoaderClient.
2625
2626         * WebView/WebFrame.mm:
2627         (kit):
2628
2629 2013-05-17  Anders Carlsson  <andersca@apple.com>
2630
2631         Move the policy function to WebFramePolicyListener
2632         https://bugs.webkit.org/show_bug.cgi?id=116323
2633
2634         Reviewed by Darin Adler.
2635
2636         There's no need for the WebFrameLoaaderClient to hold on to the policy function,
2637         so move it to WebFramePolicyListener. This gets rid of another WebFrameLoaderClient cast.
2638
2639         * WebCoreSupport/WebFrameLoaderClient.mm:
2640         (WebFrameLoaderClient::setUpPolicyListener):
2641         Pass the policy function when creating the WebFramePolicyListener object.
2642
2643 2013-05-17  Anders Carlsson  <andersca@apple.com>
2644
2645         WebFramePolicyListener should keep its Frame in a RefPtr
2646         https://bugs.webkit.org/show_bug.cgi?id=116322
2647
2648         Reviewed by Darin Adler.
2649
2650         * WebCoreSupport/WebFrameLoaderClient.mm:
2651         (-[WebFramePolicyListener initWithWebCoreFrame:]):
2652         No need to ref the frame, the RefPtr does that for us.
2653
2654         (-[WebFramePolicyListener invalidate]):
2655         Just set the frame to null.
2656
2657         (-[WebFramePolicyListener dealloc]):
2658         Remove call to deref, that's done automatically now.
2659
2660         (-[WebFramePolicyListener finalize]):
2661         Remove this method. (We could have kept it just for the assertion but I didn't think that was necessary).
2662
2663         (-[WebFramePolicyListener receivedPolicyDecision:):
2664         Use release() to transfer ownership.
2665
2666 2013-05-17  Anders Carlsson  <andersca@apple.com>
2667
2668         Reduce number of WebFrameLoaderClient static casts in WebKit
2669         https://bugs.webkit.org/show_bug.cgi?id=116320
2670
2671         Reviewed by Antti Koivisto.
2672
2673         We already have a function to return a WebFrame from a WebCore::Frame, use it.
2674
2675         * DOM/WebDOMOperations.mm:
2676         (WebFrameFilter::shouldIncludeSubframe):
2677         * WebView/WebDataSource.mm:
2678         (-[WebDataSource webFrame]):
2679
2680 2013-05-16  Commit Queue  <commit-queue@webkit.org>
2681
2682         Unreviewed, rolling out r150034.
2683         http://trac.webkit.org/changeset/150034
2684         https://bugs.webkit.org/show_bug.cgi?id=116257
2685
2686         This work around doesn't work due to another bug NSUndoManager
2687         has (Requested by rniwa on #webkit).
2688
2689         * WebCoreSupport/WebEditorClient.mm:
2690         (WebEditorClient::registerUndoOrRedoStep):
2691
2692 2013-05-16  Tim Horton  <timothy_horton@apple.com>
2693
2694         PDFPlugins don't load when plugins are disabled, but they should
2695         https://bugs.webkit.org/show_bug.cgi?id=75790
2696         <rdar://problem/11650197>
2697
2698         Reviewed by Anders Carlsson.
2699
2700         * Plugins/WebBasePluginPackage.mm:
2701         (-[WebBasePluginPackage getPluginInfoFromPLists]):
2702         * Plugins/WebNetscapePluginPackage.mm:
2703         (-[WebNetscapePluginPackage getPluginInfoFromResources]):
2704         Nothing loaded via WebBasePluginPackage or WebNetscapePluginPackage
2705         is an application plugin.
2706
2707         * WebView/WebFrame.mm:
2708         (-[WebFrame _canProvideDocumentSource]):
2709         Previously, this caller depended on pluginData() returning null if
2710         plug-ins were disabled. Since that is no longer the case, we have to
2711         check if we can use plug-ins, and otherwise ignore non-application-plug-ins.
2712
2713 2013-05-16  Andreas Kling  <akling@apple.com>
2714
2715         Page::chrome() should return a reference.
2716         <http://webkit.org/b/116185>
2717
2718         Reviewed by Anders Carlsson.
2719
2720 2013-05-16  Dan Bernstein  <mitz@apple.com>
2721
2722         -webView:updateHistoryTitle:forURL: does not pass a frame to the delegate
2723         https://bugs.webkit.org/show_bug.cgi?id=116243
2724
2725         Reviewed by Anders Carlsson.
2726
2727         Added a WebFrame parameter to the delegate method.
2728
2729         * WebCoreSupport/WebFrameLoaderClient.mm:
2730         (WebFrameLoaderClient::setTitle): Pass the frame to the delegate. Maintain
2731         compatibility with clients that implement the old delegate method that
2732         doesn’t take a frame.
2733         * WebView/WebDelegateImplementationCaching.h:
2734         (WebHistoryDelegateImplementationCache): Added a field to cache the
2735         implementation of the old delegate method.
2736         * WebView/WebHistoryDelegate.h: Changed the signature of the delegate method.
2737         * WebView/WebView.mm:
2738         (-[WebView _cacheHistoryDelegateImplementations]): Cache the implementation
2739         of the new delegate method, but also check for the old one.
2740
2741 2013-05-16  Simon Fraser  <simon.fraser@apple.com>
2742
2743         Re-land r150168 with some OS version guards.
2744
2745         * WebView/WebFrameView.mm:
2746         (-[WebFrameView drawRect:]):
2747         (-[WebFrameView wantsUpdateLayer]):
2748         (-[WebFrameView updateLayer]):
2749
2750 2013-05-16  Commit Queue  <commit-queue@webkit.org>
2751
2752         Unreviewed, rolling out r150168.
2753         http://trac.webkit.org/changeset/150168
2754         https://bugs.webkit.org/show_bug.cgi?id=116214
2755
2756         broke the world on Mountain Lion (Requested by thorton on
2757         #webkit).
2758
2759         * WebView/WebFrameView.mm:
2760         (-[WebFrameView drawRect:]):
2761
2762 2013-05-15  Simon Fraser  <simon.fraser@apple.com>
2763
2764         Avoid backing store for the WebFrameView's layer when the WebView is layer-backed
2765         https://bugs.webkit.org/show_bug.cgi?id=116172
2766
2767         Reviewed by Tim Horton.
2768
2769         When the WebView is layer-backed, AppKit will create a layer with backing store for
2770         the WebFrameView because it implements drawRect:. However, this method only paints
2771         when there is no documentView, so this layer’s backing store is wasteful.
2772
2773         We can avoid allocation of this backing store by implementing -wantsUpdateLayer
2774         and -updateLayer, and setting the view’s backgroundColor.
2775
2776         * WebView/WebFrameView.mm:
2777         (-[WebFrameView wantsUpdateLayer]):
2778         (-[WebFrameView updateLayer]):
2779
2780 2013-05-13  Anders Carlsson  <andersca@apple.com>
2781
2782         Frame::editor() should return a reference
2783         https://bugs.webkit.org/show_bug.cgi?id=116037
2784
2785         Reviewed by Darin Adler.
2786
2787         * WebView/WebFrame.mm:
2788         (-[WebFrame _selectedString]):
2789         (-[WebFrame _firstRectForDOMRange:]):
2790         (-[WebFrame _markDOMRange]):
2791         (-[WebFrame _insertParagraphSeparatorInQuotedContent]):
2792         (-[WebFrame _setTypingStyle:withUndoAction:]):
2793         (-[WebFrame _replaceSelectionWithFragment:selectReplacement:smartReplace:matchStyle:]):
2794         * WebView/WebHTMLRepresentation.mm:
2795         (-[WebHTMLRepresentation finishedLoadingWithDataSource:]):
2796         * WebView/WebHTMLView.mm:
2797         (-[WebHTMLView _pasteWithPasteboard:allowPlainText:]):
2798         (-[WebHTMLView _shouldDeleteRange:]):
2799         (-[WebHTMLView _canEdit]):
2800         (-[WebHTMLView _canEditRichly]):
2801         (-[WebHTMLView _insertOrderedList]):
2802         (-[WebHTMLView _insertUnorderedList]):
2803         (-[WebHTMLView _canIncreaseSelectionListLevel]):
2804         (-[WebHTMLView _canDecreaseSelectionListLevel]):
2805         (-[WebHTMLView _increaseSelectionListLevel]):
2806         (-[WebHTMLView _increaseSelectionListLevelOrdered]):
2807         (-[WebHTMLView _increaseSelectionListLevelUnordered]):
2808         (-[WebHTMLView _decreaseSelectionListLevel]):
2809         (-[WebHTMLView Editor::coreCommandBySelector:]):
2810         (-[WebHTMLView Editor::coreCommandByName:]):
2811         (-[WebHTMLView validateUserInterfaceItemWithoutDelegate:]):
2812         (-[WebHTMLView becomeFirstResponder]):
2813         (-[WebHTMLView _selectionStartFontAttributesAsRTF]):
2814         (-[WebHTMLView _applyStyleToSelection:withUndoAction:]):
2815         (-[WebHTMLView _changeCSSColorUsingSelector:inRange:]):
2816         (-[WebHTMLView checkSpelling:]):
2817         (-[WebHTMLView showGuessPanel:]):
2818         (-[WebHTMLView toggleBaseWritingDirection:]):
2819         (-[WebHTMLView changeBaseWritingDirection:]):
2820         (-[WebHTMLView _changeBaseWritingDirectionTo:]):
2821         (-[WebHTMLView _updateFontPanel]):
2822         (-[WebHTMLView markedRange]):
2823         (-[WebHTMLView hasMarkedText]):
2824         (-[WebHTMLView unmarkText]):
2825         (-[WebHTMLView setMarkedText:selectedRange:]):
2826         (-[WebHTMLView doCommandBySelector:]):
2827         (-[WebHTMLView insertText:]):
2828         (-[WebHTMLView _updateSelectionForInputManager]):
2829         (-[WebHTMLView countMatchesForText:inDOMRange:options:limit:markMatches:]):
2830         (-[WebHTMLView setMarkedTextMatchesAreHighlighted:]):
2831         (-[WebHTMLView markedTextMatchesAreHighlighted]):
2832         (-[WebHTMLView _findString:options:]):
2833         * WebView/WebView.mm:
2834         (-[WebView _executeCoreCommandByName:value:]):
2835         (-[WebView editableDOMRangeForPoint:]):
2836         (-[WebView setEditable:]):
2837         (-[WebView deleteSelection]):
2838         (-[WebView applyStyle:]):
2839         (-[WebView typingAttributes]):
2840         (-[WebView _simplifyMarkup:endNode:]):
2841         (-[WebView handleAcceptedAlternativeText:]):
2842
2843 2013-05-15  Darin Adler  <darin@apple.com>
2844
2845         [Mac] Remove the ClipboardMac class and header file
2846         https://bugs.webkit.org/show_bug.cgi?id=116165
2847
2848         Reviewed by Anders Carlsson.
2849
2850         * WebCoreSupport/WebDragClient.mm: Import Clipboard.h instead of ClipboardMac.h.
2851
2852 2013-05-15  Darin Adler  <darin@apple.com>
2853
2854         [Mac] Thin out the ClipboardMac class and header file to prepare for deleting them
2855         https://bugs.webkit.org/show_bug.cgi?id=116159
2856
2857         Reviewed by Andreas Kling.
2858
2859         * WebCoreSupport/WebDragClient.mm:
2860         (WebDragClient::willPerformDragSourceAction): Changed to get the pasteboard name
2861         without going through the ClipboardMac class.
2862         (WebDragClient::startDrag): Ditto.
2863
2864 2013-05-14  Beth Dakin  <bdakin@apple.com>
2865
2866         Printing in 1Password app is broken with screen fonts disabled
2867         https://bugs.webkit.org/show_bug.cgi?id=116133
2868         -and corresponding-
2869         <rdar://problem/13162981>
2870
2871         Reviewed by Anders Carlsson.
2872
2873         Return YES from [WebPreferences screenFontSubstitutionEnabled] for versions of the 
2874         1Password app that were linked on or before MountainLion.
2875
2876         * WebView/WebPreferences.mm:
2877         (needsScreenFontsEnabledQuirk):
2878         (-[WebPreferences screenFontSubstitutionEnabled]):
2879
2880 2013-05-13  Dan Bernstein  <mitz@apple.com>
2881
2882         Make -[WebNavigationData url] the destination of the navigation
2883         https://bugs.webkit.org/show_bug.cgi?id=114904
2884
2885         Reviewed by Dave Kilzer.
2886
2887         * WebCoreSupport/WebFrameLoaderClient.mm:
2888         (WebFrameLoaderClient::updateGlobalHistory): Initialize the WebNavigationData with the
2889         current URL, not the original request URL.
2890
2891 2013-05-13  Anders Carlsson  <andersca@apple.com>
2892
2893         Remove ChromeClient::willPopupMenu
2894         https://bugs.webkit.org/show_bug.cgi?id=116063
2895
2896         Reviewed by Andreas Kling.
2897
2898         ChromeClient::willPopupMenu is only called in one place from WebKit, so just move the function to the call site.
2899
2900         * WebCoreSupport/PopupMenuMac.mm:
2901         (PopupMenuMac::show):
2902         * WebCoreSupport/WebChromeClient.h:
2903         * WebCoreSupport/WebChromeClient.mm:
2904
2905 2013-05-12  Timothy Hatcher  <timothy@apple.com>
2906
2907         Add support for updating the Web Inspector toolbar height.
2908
2909         https://bugs.webkit.org/show_bug.cgi?id=115996
2910
2911         Reviewed by Joseph Pecoraro and Benjamin Poulain.
2912
2913         * WebCoreSupport/WebInspectorClient.h:
2914         * WebCoreSupport/WebInspectorClient.mm:
2915         (WebInspectorFrontendClient::setToolbarHeight):
2916
2917 2013-05-13  Ryosuke Niwa  <rniwa@webkit.org>
2918
2919         Sometimes NSUndoManager can get into an inconsistent state
2920         https://bugs.webkit.org/show_bug.cgi?id=116050
2921
2922         Reviewed by Enrica Casucci.
2923
2924         Always group undo items to work around a bug in NSUndoManager that manifests
2925         when we call removeAllActionsWithTarget.
2926
2927         * WebCoreSupport/WebEditorClient.mm:
2928         (WebEditorClient::registerUndoOrRedoStep):
2929
2930 2013-05-13  Zalan Bujtas  <zalan@apple.com>
2931
2932         WebProcess consuming very high CPU on linkedin.com
2933         https://bugs.webkit.org/show_bug.cgi?id=115601
2934
2935         Reviewed by Andreas Kling.
2936
2937         Disable WEB_TIMING_MINIMAL.
2938         Turn off window.performance and performance.now(). Some JS frameworks expect
2939         additional Web Timing APIs, when performance.now() is available.
2940
2941         * Configurations/FeatureDefines.xcconfig:
2942
2943 2013-05-13  Darin Adler  <darin@apple.com>
2944
2945         [Mac] Layer-backed WebViews draw their background color even when setDrawsBackground:NO was called
2946         https://bugs.webkit.org/show_bug.cgi?id=116014
2947         <rdar://problem/12781227>
2948
2949         Reviewed by Dan Bernstein.
2950
2951         * WebView/WebFrame.mm:
2952         (-[WebFrame _updateBackgroundAndUpdatesWhileOffscreen]): Remove calls to setBackgroundColor: and
2953         setDrawsBackground: on the document view. These were added to support a hypothetical document view
2954         that wanted to draw its background like WebHTMLView does, but this was never communicated as a
2955         document view protocol, formal or informal, and it's unlikely that it was ever used. The bug was
2956         caused because there is an -[NSView setDrawsBackground:] method, probably an internal one, and we
2957         were calling it unintentionally on a WebHTMLView.
2958
2959 2013-05-12  Anders Carlsson  <andersca@apple.com>
2960
2961         Stop including UnusedParam.h
2962         https://bugs.webkit.org/show_bug.cgi?id=116003
2963
2964         Reviewed by Sam Weinig.
2965
2966         UnusedParam.h is empty now so there's no need to include it anymore.
2967
2968         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
2969         * WebView/WebDashboardRegion.mm:
2970         * WebView/WebFullScreenController.mm:
2971
2972 2013-05-12  Andreas Kling  <akling@apple.com>
2973
2974         Unload event listeners should prevent Safari from insta-killing the web process on last tab close.
2975         <http://webkit.org/b/115988>
2976         <rdar://problem/13870943>
2977
2978         Reviewed by Anders Carlsson.
2979
2980         * WebCoreSupport/WebChromeClient.h:
2981         * WebCoreSupport/WebChromeClient.mm:
2982         (WebChromeClient::enableSuddenTermination):
2983         (WebChromeClient::disableSuddenTermination):
2984
2985 2013-05-10  Brian J. Burg  <burg@cs.washington.edu>
2986
2987         Web Inspector: Implement WK2 version of WebInspectorFrontendClient::save
2988         https://bugs.webkit.org/show_bug.cgi?id=115564
2989
2990         Reviewed by Benjamin Poulain.
2991
2992         Clean up save() and append() implementations.
2993
2994         * WebCoreSupport/WebInspectorClient.h:
2995         * WebCoreSupport/WebInspectorClient.mm:
2996         (WebInspectorFrontendClient::save):
2997         (WebInspectorFrontendClient::append):
2998
2999 2013-05-10  Laszlo Gombos  <l.gombos@samsung.com>
3000
3001         Remove Mac OS X Leopard (10.5) support
3002         https://bugs.webkit.org/show_bug.cgi?id=107964
3003
3004         Reviewed by Ryosuke Niwa.
3005
3006         Removed the code for 10.5 and removed if-def for 10.6.
3007
3008         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
3009         * Misc/WebKitErrors.m:
3010         (-[NSError _initWithPluginErrorCode:contentURL:pluginPageURL:pluginName:MIMEType:]):
3011         * WebCoreSupport/WebSystemInterface.mm:
3012         (InitWebCoreSystemInterface):
3013         * WebView/WebClipView.mm:
3014         (-[WebClipView _immediateScrollToPoint:]):
3015         * WebView/WebFrameView.mm:
3016         (-[WebFrameView initWithFrame:]):
3017         * WebView/WebView.mm:
3018
3019 2013-05-07  Mark Rowe  <mrowe@apple.com>
3020
3021         <rdar://problem/13633007> WebKit and others fail to build headers due to build root dependency
3022
3023         Reviewed by Sam Weinig.
3024
3025         * Configurations/WebKit.xcconfig: Look for WebCore's headers within the SDK if we're building against one.
3026
3027 2013-05-07  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
3028
3029         HashTraits<RefPtr<P> >::PeekType should be raw pointer for better performance
3030         https://bugs.webkit.org/show_bug.cgi?id=115646
3031
3032         Reviewed by Darin Adler.
3033
3034         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3035         (WebKit::NetscapePluginHostProxy::pluginInstance):
3036         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3037         (WebKit::NetscapePluginInstanceProxy::cancelStreamLoad):
3038             Updated accordingly to new HashMap<.., RefPtr>::get() semantics.
3039
3040 2013-05-04  Dean Jackson  <dino@apple.com>
3041
3042         Animations and Transitions should not start when globally suspended
3043         https://bugs.webkit.org/show_bug.cgi?id=114915
3044
3045         Reviewed by Sam Weinig.
3046
3047         The WebView private API cssAnimationsSuspended did not necessarily
3048         reflect the reality of the Frame's AnimationController value because it
3049         was caching rather than asking directly. While the WebCore part of this
3050         patch ensured loading the Document wouldn't resume all animations, it
3051         is still better to ask directly.
3052
3053         * WebView/WebView.mm:
3054         (-[WebView cssAnimationsSuspended]): Call into AnimationController.
3055         (-[WebView setCSSAnimationsSuspended:]): Ditto.
3056         * WebView/WebViewData.h: Remove cssAnimationsSuspended boolean.
3057         * WebView/WebViewData.mm: Ditto.
3058         (-[WebViewPrivate init]):
3059
3060 2013-05-04  Sam Weinig  <sam@webkit.org>
3061
3062         Move PopupMenuMac and SearchPopupMenuMac to Source/WebKit/mac
3063         matching where they are in WebKit2.
3064
3065         Reviewed by Anders Carlsson.
3066
3067         * WebCoreSupport/PopupMenuMac.h: Copied from WebCore/platform/mac/PopupMenuMac.h.
3068         * WebCoreSupport/PopupMenuMac.mm: Copied from WebCore/platform/mac/PopupMenuMac.mm.
3069         * WebCoreSupport/SearchPopupMenuMac.h: Copied from WebCore/platform/mac/SearchPopupMenuMac.h.
3070         * WebCoreSupport/SearchPopupMenuMac.mm: Copied from WebCore/platform/mac/SearchPopupMenuMac.mm.
3071         * WebCoreSupport/WebChromeClient.mm:
3072
3073 2013-05-04  Anders Carlsson  <andersca@apple.com>
3074
3075         Get rid of -[NSMutableDictionary _webkit_setObject:forUncopiedKey:]
3076         https://bugs.webkit.org/show_bug.cgi?id=115592
3077
3078         Reviewed by Beth Dakin.
3079
3080         Using CFDictionarySetValue to set a key without having to copy it is not supported. Use NSMapTable with strong pointers instead.
3081
3082         * Misc/WebNSDictionaryExtras.h:
3083         * Misc/WebNSDictionaryExtras.m:
3084         * Panels/WebPanelAuthenticationHandler.h:
3085         (NSURLAuthenticationChallenge):
3086         * Panels/WebPanelAuthenticationHandler.m:
3087         (-[WebPanelAuthenticationHandler init]):
3088         (-[WebPanelAuthenticationHandler enqueueChallenge:forWindow:]):
3089         (-[WebPanelAuthenticationHandler tryNextChallengeForWindow:]):
3090         (-[WebPanelAuthenticationHandler startAuthentication:window:]):
3091         (-[WebPanelAuthenticationHandler cancelAuthentication:]):
3092         * Plugins/WebNetscapePluginView.h:
3093         * Plugins/WebNetscapePluginView.mm:
3094         (-[WebNetscapePluginView destroyPlugin]):
3095         (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
3096         (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
3097         (-[WebNetscapePluginView loadPluginRequest:]):
3098
3099 2011-05-01  Ryosuke Niwa  <rniwa@webkit.org>
3100
3101         [Mac] WebKit doesn't enable or disable autocorrections when system preferences are changed
3102         https://bugs.webkit.org/show_bug.cgi?id=115463
3103
3104         Reviewed by Darin Adler.
3105
3106         Observe the default notification center for changes to autocorrection preferences.
3107         Note system preferences may also update WebAutomatic* defaults.
3108
3109         * WebView/WebView.mm:
3110         (+[WebView initialize]):
3111         (+[WebView _shouldAutomaticTextReplacementBeEnabled]):
3112         (+[WebView _didChangeAutomaticTextReplacementEnabled:]):
3113         (+[WebView _shouldAutomaticSpellingCorrectionBeEnabled]):
3114         (+[WebView _didChangeAutomaticSpellingCorrectionEnabled:]):
3115         (+[WebView _shouldAutomaticQuoteSubstitutionBeEnabled]):
3116         (+[WebView _shouldAutomaticDashSubstitutionBeEnabled]):
3117         (+[WebView _didChangeAutomaticQuoteSubstitutionEnabled:]):
3118         (+[WebView _didChangeAutomaticDashSubstitutionEnabled:]):
3119
3120 2013-05-01  Benjamin Poulain  <bpoulain@apple.com>
3121
3122         Fix the function names of r149453
3123
3124         Unreviewed.
3125
3126         I forgot to follow one of Darin's review comment. This patch
3127         fixes the function names to follow CF naming conventions.
3128
3129         * WebView/WebHTMLRepresentation.mm:
3130         (newArrayWithStrings):
3131         (newArrayByConcatenatingArrays):
3132         (+[WebHTMLRepresentation supportedMIMETypes]):
3133         (+[WebHTMLRepresentation supportedNonImageMIMETypes]):
3134         (+[WebHTMLRepresentation supportedImageMIMETypes]):
3135         (+[WebHTMLRepresentation unsupportedTextMIMETypes]):
3136
3137 2013-05-01  Benjamin Poulain  <benjamin@webkit.org>
3138
3139         Simplify WebHTMLRepresentation supportedMIMETypes methods
3140         https://bugs.webkit.org/show_bug.cgi?id=115314
3141
3142         Reviewed by Darin Adler.
3143
3144         The initialization was surprisingly complex because of DEFINE_STATIC_LOCAL.
3145         First, a new pointer was allocated on the heap with fast malloc (for RetainPtr<NSArray>).
3146         Then a new NSMutableArray was allocated but immediately put on the autorelease pool.
3147         Finally, that array was retained by the RetainPtr.
3148
3149         This patch changes the code to only leak the NSMutableArray memory. There
3150         is no fastMalloc, nor any use of the autorelease pool.
3151
3152         * WebView/WebHTMLRepresentation.mm:
3153         (createArrayWithStrings):
3154         (createArrayByConcatenatingArrays):
3155         (+[WebHTMLRepresentation supportedMIMETypes]):
3156         (+[WebHTMLRepresentation supportedNonImageMIMETypes]):
3157         (+[WebHTMLRepresentation supportedImageMIMETypes]):
3158         (+[WebHTMLRepresentation unsupportedTextMIMETypes]):
3159
3160 2013-04-30  Darin Adler  <darin@apple.com>
3161
3162         [Mac] Remove adoptNS/retain pairs, since the two cancel each other out
3163         https://bugs.webkit.org/show_bug.cgi?id=115426
3164
3165         Reviewed by Anders Carlsson.
3166
3167         * Plugins/WebNetscapePluginStream.mm:
3168         (WebNetscapePluginStream::deliverDataToFile): Remove adoptNS and release.
3169
3170 2013-04-30  Geoffrey Garen  <ggaren@apple.com>
3171
3172         Objective-C JavaScriptCore API should publicly support bridging to C
3173         https://bugs.webkit.org/show_bug.cgi?id=115447
3174
3175         Reviewed by Mark Hahnenberg.
3176
3177         * WebView/WebFrame.mm:
3178         (-[WebFrame _javaScriptContextForScriptWorld:]):
3179         * WebView/WebScriptWorld.mm:
3180         (+[WebScriptWorld scriptWorldForJavaScriptContext:]):
3181
3182 2013-04-30  Anders Carlsson  <andersca@apple.com>
3183
3184         More StorageTracker cleanup
3185         https://bugs.webkit.org/show_bug.cgi?id=115429
3186
3187         Reviewed by Andreas Kling.
3188
3189         Call PageGroup::syncLocalStorage directly.
3190
3191         * Storage/WebStorageManager.mm:
3192         (-[WebStorageManager syncLocalStorage]):
3193
3194 2013-04-30  Zalan Bujtas  <zalan@apple.com>
3195
3196         Animations fail to start on http://www.google.com/insidesearch/howsearchworks/thestory/
3197         https://bugs.webkit.org/show_bug.cgi?id=111244
3198
3199         Reviewed by David Kilzer.
3200         
3201         Enable performance.now() as a minimal subset of Web Timing API. 
3202         It returns DOMHighResTimeStamp, a monotonically increasing value representing the 
3203         number of milliseconds from the start of the navigation of the current document.
3204         JS libraries use this API to check against the requestAnimationFrame() timestamp.
3205
3206         * Configurations/FeatureDefines.xcconfig:
3207
3208 2013-04-29  Chris Fleizach  <cfleizach@apple.com>
3209
3210         WEB SPEECH: need to identify the default voice per language
3211         https://bugs.webkit.org/show_bug.cgi?id=115366
3212
3213         Reviewed by Tim Horton.
3214
3215         * WebCoreSupport/WebSystemInterface.mm:
3216         (InitWebCoreSystemInterface):
3217
3218 2013-04-28  Dean Jackson  <dino@apple.com>
3219
3220         [Mac] Disable canvas backing store scaling (HIGH_DPI_CANVAS)
3221         https://bugs.webkit.org/show_bug.cgi?id=115310
3222
3223         Reviewed by Simon Fraser.
3224
3225         Remove ENABLE_HIGH_DPI_CANVAS_macosx.
3226
3227         * Configurations/FeatureDefines.xcconfig:
3228
3229 2013-04-27  Darin Adler  <darin@apple.com>
3230
3231         Move from constructor and member function adoptCF/NS to free function adoptCF/NS.
3232         https://bugs.webkit.org/show_bug.cgi?id=115307
3233
3234         Reviewed by Geoffrey Garen.
3235
3236         This change was done by a global replace followed by compiling and inspecting for
3237         cases that needed to be tweaked by hand.
3238
3239         * DefaultDelegates/WebDefaultContextMenuDelegate.mm:
3240         (-[WebDefaultUIDelegate menuItemWithTag:target:representedObject:]):
3241         * Misc/WebNSFileManagerExtras.mm:
3242         (-[NSFileManager _webkit_startupVolumeName]):
3243         * Plugins/Hosted/HostedNetscapePluginStream.mm:
3244         (WebKit::HostedNetscapePluginStream::HostedNetscapePluginStream):
3245         * Plugins/Hosted/NetscapePluginHostManager.mm:
3246         (WebKit::NetscapePluginHostManager::spawnPluginHost):
3247         (WebKit::NetscapePluginHostManager::instantiatePlugin):
3248         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3249         (WebKit::NetscapePluginHostProxy::NetscapePluginHostProxy):
3250         (WebKit::NetscapePluginHostProxy::beginModal):
3251         (WKPCBooleanAndDataReply):
3252         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3253         (WebKit::NetscapePluginInstanceProxy::print):
3254         (WebKit::NetscapePluginInstanceProxy::snapshot):
3255         (WebKit::NetscapePluginInstanceProxy::status):
3256         (WebKit::NetscapePluginInstanceProxy::loadURL):
3257         (WebKit::NetscapePluginInstanceProxy::evaluateJavaScript):
3258         (WebKit::NetscapePluginInstanceProxy::enumerate):
3259         (WebKit::NetscapePluginInstanceProxy::marshalValue):
3260         (WebKit::NetscapePluginInstanceProxy::marshalValues):
3261         (WebKit::NetscapePluginInstanceProxy::demarshalValue):
3262         (WebKit::NetscapePluginInstanceProxy::demarshalValues):
3263         * Plugins/Hosted/WebHostedNetscapePluginView.mm:
3264         (-[WebHostedNetscapePluginView setAttributeKeys:andValues:]):
3265         (-[WebHostedNetscapePluginView createPlugin]):
3266         * Plugins/WebBaseNetscapePluginView.mm:
3267         (-[WebBaseNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
3268         (-[WebBaseNetscapePluginView cacheSnapshot]):
3269         (WebKit::getAuthenticationInfo):
3270         * Plugins/WebBasePluginPackage.mm:
3271         (-[WebBasePluginPackage initWithPath:]):
3272         * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
3273         (WebNetscapePluginEventHandlerCarbon::startTimers):
3274         * Plugins/WebNetscapePluginEventHandlerCocoa.mm:
3275         (WebNetscapePluginEventHandlerCocoa::syntheticKeyDownWithCommandModifier):
3276         (WebNetscapePluginEventHandlerCocoa::handleTSMEvent):
3277         * Plugins/WebNetscapePluginPackage.mm:
3278         (-[WebNetscapePluginPackage _initWithPath:]):
3279         * Plugins/WebNetscapePluginStream.mm:
3280         (WebNetscapePluginStream::WebNetscapePluginStream):
3281         (WebNetscapePluginStream::deliverData):
3282         (WebNetscapePluginStream::deliverDataToFile):
3283         (WebNetscapePluginStream::didReceiveData):
3284         * Plugins/WebNetscapePluginView.mm:
3285         (-[WebNetscapePluginView createPlugin]):
3286         (-[WebNetscapePluginView initWithFrame:pluginPackage:URL:baseURL:MIMEType:attributeKeys:attributeValues:loadManually:element:WebCore::]):
3287         (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
3288         * Storage/WebDatabaseManagerClient.mm:
3289         (WebDatabaseManagerClient::dispatchDidModifyOrigin):
3290         (WebDatabaseManagerClient::dispatchDidModifyDatabase):
3291         * Storage/WebStorageTrackerClient.mm:
3292         (WebStorageTrackerClient::dispatchDidModifyOrigin):
3293         * WebCoreSupport/CorrectionPanel.mm:
3294         (CorrectionPanel::handleAcceptedReplacement):
3295         * WebCoreSupport/WebApplicationCache.mm:
3296         (+[WebApplicationCache originsWithCache]):
3297         * WebCoreSupport/WebFrameLoaderClient.mm:
3298         (WebFrameLoaderClient::didRunInsecureContent):
3299         * WebCoreSupport/WebInspectorClient.mm:
3300         (WebInspectorClient::WebInspectorClient):
3301         (WebInspectorClient::openInspectorFrontend):
3302         * WebView/WebFullScreenController.mm:
3303         (-[WebFullScreenController enterFullScreen:]):
3304         * WebView/WebPDFDocumentExtras.mm:
3305         (allScriptsInPDFDocument):
3306         * WebView/WebPreferences.mm:
3307         (-[WebPreferences initWithIdentifier:]):
3308         (-[WebPreferences initWithCoder:]):
3309         * WebView/WebScriptDebugger.mm:
3310         (WebScriptDebugger::initGlobalCallFrame):
3311         (WebScriptDebugger::callEvent):
3312         * WebView/WebView.mm:
3313         (-[WebView previousValidKeyView]):
3314         Use adoptNS and adoptCF free functions.
3315
3316 2013-04-25  Roger Fong  <roger_fong@apple.com>
3317
3318         Disable sub-pixel layout on mac.
3319         https://bugs.webkit.org/show_bug.cgi?id=114999.
3320
3321         Reviewed by Simon Fraser.
3322
3323         * Configurations/FeatureDefines.xcconfig:
3324
3325 2013-04-26  Simon Fraser  <simon.fraser@apple.com>
3326
3327         Layer-backed WebViews don't repaint content outside the visible area
3328         https://bugs.webkit.org/show_bug.cgi?id=115275
3329
3330         Reviewed by Beth Dakin.
3331
3332         When a client of WebView makes the WebView be layer-backed, then
3333         AppKit propagaes the layer-backing down to the WebHTMLView (but
3334         no further).
3335         
3336         In this situation, we had a bug where content that was not
3337         in the visible content rect would not get repainted, because
3338         WebCore clips repaints to the visible rect.
3339         
3340         Fix by calling ScrollView::setPaintsEntireContents(bool) from
3341         -[WebHTMLView setLayer:], saying that we need
3342         to paint the entire contents if we have a layer.
3343
3344         * WebView/WebHTMLView.mm:
3345         (-[WebHTMLView setLayer:]):
3346
3347 2013-04-25  Chris Fleizach  <cfleizach@apple.com>
3348
3349         WEB SPEECH: language support does not work as expected
3350         https://bugs.webkit.org/show_bug.cgi?id=115119
3351
3352         Reviewed by Alexey Proskuryakov.
3353
3354         * WebCoreSupport/WebSystemInterface.mm:
3355         (InitWebCoreSystemInterface):
3356
3357 2013-04-25  Simon Fraser  <simon.fraser@apple.com>
3358
3359         Build fix for smart compliers.
3360
3361         Reviewed by Tim Horton.
3362         
3363         [NSDictionary dictionaryWithObjectsAndKeys:] returns an NSDictionary,
3364         not a NSMutableDictionary.
3365
3366         * WebCoreSupport/WebEditorClient.mm:
3367         (WebEditorClient::updateSpellingUIWithGrammarString):
3368
3369 2013-04-25  Joseph Pecoraro  <pecoraro@apple.com>
3370
3371         Web Inspector: ConsoleMessage should include line and column number where possible
3372         https://bugs.webkit.org/show_bug.cgi?id=114929
3373
3374         Reviewed by Timothy Hatcher.
3375
3376         * WebCoreSupport/WebChromeClient.h:
3377         * WebCoreSupport/WebChromeClient.mm:
3378         (WebChromeClient::addMessageToConsole):
3379
3380 2013-04-24  Jessie Berlin  <jberlin@apple.com>
3381
3382         Assertion failure (crash in release) attempting to delete database storage in WK1 without
3383         creating a WebView first
3384         https://bugs.webkit.org/show_bug.cgi?id=115065
3385
3386         Reviewed by Brady Eidson.
3387
3388         Make sure the WebPlatformStrategies is initialized before using the WebDatabaseManager.
3389
3390         * Storage/WebDatabaseManager.mm:
3391         (-[WebDatabaseManager init]):
3392         Move the logic from WebKitInitializeDatabasesIfNecessary here, and add a call to
3393         WebPlatformStrategies::initializeIfNecessary.
3394
3395         * Storage/WebDatabaseManagerInternal.h: Removed.
3396
3397         * WebCoreSupport/WebPlatformStrategies.h:
3398         (WebPlatformStrategies):
3399         Change "initialize" to "initalizeIfNecessary".
3400         * WebCoreSupport/WebPlatformStrategies.mm:
3401         (WebPlatformStrategies::initializeIfNecessary):
3402         Only call setPlatformStrategies once.
3403
3404         * WebView/WebView.mm:
3405         (-[WebView _commonInitializationWithFrameName:groupName:]):
3406         Updated for the name change from initialize to initializeIfNecessary.
3407         Instead of calling WebKitInitializeDatabasesIfNecessary, call [WebDatabaseManager
3408         sharedWebDatabaseManager].
3409         (+[WebView _setLoadResourcesSerially:]):
3410         Updated for the name change from initialize to initializeIfNecessary.
3411
3412 2013-04-23  Antoine Quint  <graouts@apple.com>
3413
3414         Initial advance of text runs should be taken into account
3415         https://bugs.webkit.org/show_bug.cgi?id=114949
3416
3417         Reviewed by Darin Adler.
3418
3419         Adding support for new method CTRunGetInitialAdvance in WebKitSystemInterface.
3420
3421         * WebCoreSupport/WebSystemInterface.mm:
3422         (InitWebCoreSystemInterface):
3423
3424 2013-04-22  Benjamin Poulain  <benjamin@webkit.org>
3425
3426         Remove the memory instrumentation code
3427         https://bugs.webkit.org/show_bug.cgi?id=114931
3428
3429         Reviewed by Andreas Kling.
3430
3431         * WebView/WebRenderLayer.mm:
3432
3433 2013-04-18  Andy Estes  <aestes@apple.com>
3434
3435         REGRESSION (r116645): Versions app's UI is munged in HiDPI due to background-size being reset to 'auto' when background short-hand is also specified
3436         https://bugs.webkit.org/show_bug.cgi?id=114833
3437
3438         Reviewed by David Kilzer.
3439
3440         The Versions app specifies both a background-size and a background
3441         shorthand CSS property, and its UI is broken after r116645 which resets
3442         background-size to 'auto' if the background shorthand property is
3443         specified.
3444
3445         This patch enables the useLegacyBackgroundSizeShorthandBehavior setting
3446         added in r147034 to restore the expected behavior if the embedder is
3447         Versions.app and it was linked against a version of WebKit that had the
3448         legacy behavior.
3449
3450         * Misc/WebKitVersionChecks.h:
3451         * WebView/WebView.mm:
3452         (shouldUseLegacyBackgroundSizeShorthandBehavior):
3453         (-[WebView _commonInitializationWithFrameName:groupName:]):
3454
3455 2013-04-18  Sam Weinig  <sam@webkit.org>
3456
3457         Network Process crashing trying to read in IDNScriptWhiteList.txt
3458         https://bugs.webkit.org/show_bug.cgi?id=114827
3459
3460         Reviewed by Anders Carlsson.
3461
3462         Move IDNScriptWhiteList.txt from WebKit to WebCore, so that the NetworkProcess does not have to link against
3463         WebKit. It was a layering violation for WebCore to be trying to access WebKit resources anyway.
3464
3465         * Resources/IDNScriptWhiteList.txt: Removed.
3466
3467 2013-04-17  Geoffrey Garen  <ggaren@apple.com>
3468
3469         Renamed JSGlobalData to VM
3470         https://bugs.webkit.org/show_bug.cgi?id=114777
3471
3472         Reviewed by Phil Pizlo.
3473
3474         * Misc/WebCoreStatistics.mm:
3475         (+[WebCoreStatistics javaScriptObjectsCount]):
3476         (+[WebCoreStatistics javaScriptGlobalObjectsCount]):
3477         (+[WebCoreStatistics javaScriptProtectedObjectsCount]):
3478         (+[WebCoreStatistics javaScriptProtectedGlobalObjectsCount]):
3479         (+[WebCoreStatistics javaScriptProtectedObjectTypeCounts]):
3480         (+[WebCoreStatistics javaScriptObjectTypeCounts]):
3481         (+[WebCoreStatistics shouldPrintExceptions]):
3482         (+[WebCoreStatistics setShouldPrintExceptions:]):
3483         (+[WebCoreStatistics memoryStatistics]):
3484         (+[WebCoreStatistics javaScriptReferencedObjectsCount]):
3485         * Plugins/Hosted/NetscapePluginHostProxy.mm:
3486         (identifierFromIdentifierRep):
3487         * Plugins/Hosted/NetscapePluginInstanceProxy.h:
3488         (LocalObjectMap):
3489         * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
3490         (WebKit::NetscapePluginInstanceProxy::LocalObjectMap::idForObject):
3491         (WebKit::NetscapePluginInstanceProxy::getWindowNPObject):
3492         (WebKit::NetscapePluginInstanceProxy::getPluginElementNPObject):
3493         (WebKit::NetscapePluginInstanceProxy::evaluate):
3494         (WebKit::NetscapePluginInstanceProxy::addValueToArray):
3495         * Plugins/Hosted/ProxyInstance.mm:
3496         (WebKit::ProxyRuntimeMethod::create):
3497         (WebKit::ProxyRuntimeMethod::createStructure):
3498         (WebKit::ProxyRuntimeMethod::finishCreation):
3499         (WebKit::ProxyInstance::getPropertyNames):
3500         * Plugins/Hosted/ProxyRuntimeObject.h:
3501         (WebKit::ProxyRuntimeObject::create):
3502         (WebKit::ProxyRuntimeObject::createStructure):
3503         * Plugins/WebNetscapePluginStream.mm:
3504         (WebNetscapePluginStream::wantsAllStreams):
3505         * Plugins/WebNetscapePluginView.mm:
3506         (-[WebNetscapePluginView sendEvent:isDrawRect:]):
3507         (-[WebNetscapePluginView privateBrowsingModeDidChange]):
3508         (-[WebNetscapePluginView setWindowIfNecessary]):
3509         (-[WebNetscapePluginView createPluginScriptableObject]):
3510         (-[WebNetscapePluginView getFormValue:]):
3511         (-[WebNetscapePluginView evaluateJavaScriptPluginRequest:]):
3512         (-[WebNetscapePluginView webFrame:didFinishLoadWithReason:]):
3513         (-[WebNetscapePluginView loadPluginRequest:]):