[iOS] Crash long pressing on <input type=file>
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-06-15  Jon Honeycutt  <jhoneycutt@apple.com>
2
3         [iOS] Crash long pressing on <input type=file>
4         https://bugs.webkit.org/show_bug.cgi?id=146009
5         <rdar://problem/21234453>
6
7         Reviewed by Ryosuke Niwa.
8
9         * dom/Position.cpp:
10         (WebCore::Position::atStartOfTree):
11         (WebCore::Position::atEndOfTree):
12         Null check the container node before passing it to findParent().
13
14 2015-06-15  Chris Fleizach  <cfleizach@apple.com>
15
16         AX:  iOS accessibility tests are not running because we need WKTR support
17         https://bugs.webkit.org/show_bug.cgi?id=145991
18
19         Reviewed by Daniel Bates.
20
21         Make some minor modifications to support notification handling in WKTR.
22
23         * accessibility/ios/AXObjectCacheIOS.mm:
24         (WebCore::AXObjectCache::postPlatformNotification):
25         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
26         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
27         (-[WebAccessibilityObjectWrapper accessibilityClickPoint]):
28         (-[WebAccessibilityObjectWrapper description]):
29         (-[WebAccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:withContext:]): Deleted.
30         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]): Deleted.
31
32 2015-06-16  Mark Lam  <mark.lam@apple.com>
33
34         Use NakedPtr<Exception>& to return exception results.
35         https://bugs.webkit.org/show_bug.cgi?id=145870
36
37         Reviewed by Anders Carlsson and Filip Pizlo.
38
39         No new WebCore tests because this functionality is already covered by existing tests.
40         API tests added for WTF::NakedPtr.
41
42         * bindings/js/JSCallbackData.cpp:
43         (WebCore::JSCallbackData::invokeCallback):
44         * bindings/js/JSCustomXPathNSResolver.cpp:
45         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
46         * bindings/js/JSErrorHandler.cpp:
47         (WebCore::JSErrorHandler::handleEvent):
48         * bindings/js/JSEventListener.cpp:
49         (WebCore::JSEventListener::handleEvent):
50         * bindings/js/JSMainThreadExecState.cpp:
51         (WebCore::JSMainThreadExecState::didLeaveScriptContext):
52         (WebCore::functionCallHandlerFromAnyThread):
53         (WebCore::evaluateHandlerFromAnyThread):
54         * bindings/js/JSMainThreadExecState.h:
55         (WebCore::JSMainThreadExecState::currentState):
56         (WebCore::JSMainThreadExecState::call):
57         (WebCore::JSMainThreadExecState::evaluate):
58         * bindings/js/JSMutationCallback.cpp:
59         (WebCore::JSMutationCallback::call):
60         * bindings/js/ScheduledAction.cpp:
61         (WebCore::ScheduledAction::executeFunctionInContext):
62         * bindings/js/ScriptController.cpp:
63         (WebCore::ScriptController::evaluateInWorld):
64         * bindings/js/WorkerScriptController.cpp:
65         (WebCore::WorkerScriptController::evaluate):
66         (WebCore::WorkerScriptController::setException):
67         * bindings/js/WorkerScriptController.h:
68         (WebCore::WorkerScriptController::workerGlobalScopeWrapper):
69         * bindings/objc/WebScriptObject.mm:
70         (-[WebScriptObject callWebScriptMethod:withArguments:]):
71         * workers/WorkerGlobalScope.cpp:
72         (WebCore::WorkerGlobalScope::importScripts):
73
74 2015-06-16  Brent Fulgham  <bfulgham@apple.com>
75
76         CSS Scroll Snap - support snapping to nested elements
77         https://bugs.webkit.org/show_bug.cgi?id=145843
78         <rdar://problem/21339581>
79
80         Reviewed by Darin Adler.
81
82         Tested by css3/scroll-snap/nested-elements.html
83
84         The Scroll Snap Point implementation was not properly handling nested elements.
85         This could be resolved by recursively calling 'appendChildSnapOffsets', but this
86         seemed like an inefficient approach, especially considering how often this method
87         is called during various scaling and other operations.
88         
89         Instead, do the following:
90         (1) Add a new HashSet to RenderView that holds a collection of RenderElements that
91             have scroll-snap-coordinates.
92         (2) During RenderElement::styleWillChange, register all elements that have the
93             scroll-snap-coordinates style with the RenderView.
94         (3) When performing 'appendChildSnapOffsets', refer to the HashSet of elements, select the
95             subset of these entries relevant to the current scrolling container, and build up the
96             set of scroll-snap-coordinates needed for the current scrolling container.
97
98         * page/scrolling/AxisScrollSnapOffsets.cpp:
99         (WebCore::appendChildSnapOffsets): Check the scroll-snap-coordinate RenderElement HashSet
100         for the RenderView to find all elements that are children of the current scrolling container.
101         Add the scroll-snap-coordinates for these RenderElements to the current set of snap points.
102         * rendering/RenderElement.cpp:
103         (WebCore::findEnclosingScrollableContainer): New helper function.
104         (WebCore::RenderElement::styleWillChange): If the current element has scroll-snap-coordinate
105         defined, remember it for later so we can use it with the relevant scrolling container
106         after layout completes.
107         (WebCore::RenderElement::willBeRemovedFromTree): Unregister the current element from the
108         RenderView.
109         (WebCore::RenderElement::findEnclosingScrollableContainer): Added. Locate the relevant
110         scrolling container for the current object.
111         * rendering/RenderElement.h:
112         * rendering/RenderView.cpp:
113         (WebCore::Document::registerRenderElementWithScrollSnapCoordinates): Added.
114         (WebCore::Document::unregisterRenderElementWithScrollSnapCoordinates): Added.
115         * rendering/RenderView.h:
116
117 2015-06-16  Brady Eidson  <beidson@apple.com>
118
119         [IndexedDB] array index keys are concatenated across cursor lifetime
120         <rdar://problem/19684902> and https://bugs.webkit.org/show_bug.cgi?id=138504
121
122         Reviewed by Brady Eidson, patch by Mark Dixon <mark@lowla.io>
123
124         Tested by:
125         storage/indexeddb/keypath-arrays.html
126
127         IDBKeyData and IDBKeyPath need to clear any existing array values before calling
128         decodeObjects to update the value of an existing object.
129         
130         * Modules/indexeddb/IDBKeyData.cpp:
131         (WebCore::IDBKeyData::decode):
132         * Modules/indexeddb/IDBKeyPath.cpp:
133         (WebCore::IDBKeyPath::decode):
134
135 2015-06-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
136
137         Canvas dimensions should be limited to 4096x4096 pixels on iOS devices.
138         https://bugs.webkit.org/show_bug.cgi?id=145998
139
140         Reviewed by Darin Adler.
141
142         The value of MaxCanvasArea should depend on the platform. If the platform
143         is iOS, the limit should be 64M. Otherwise the limit should be 1G.
144
145         Test: fast/canvas/pattern-too-large-to-create-2.html
146
147         * html/HTMLCanvasElement.cpp: Change MaxCanvasArea value based on the platform. 
148         
149         * rendering/svg/RenderSVGShape.h:
150         (WebCore::RenderSVGShape::graphicsElement): Remove un-implemented constructor.
151
152 2015-06-16  Chris Dumez  <cdumez@apple.com>
153
154         REGRESSION(r185012): chat frame in Gmail now says "Something's not right"
155         https://bugs.webkit.org/show_bug.cgi?id=146025
156         <rdar://problem/21391412>
157
158         Reviewed by Darin Adler.
159
160         Only throttle timers in non-visible iframes once they've reached the
161         max nesting level to avoid throttling critical one-shot timers. This is
162         consistent with the default DOMTimer throttling behavior that is
163         defined in the specification.
164
165         Power-wise, we are mostly interested in DOMTimers that fire frequently
166         and cause high CPU usage over an extended period of time anyway.
167
168         * dom/Document.cpp:
169         (WebCore::Document::setTimerThrottlingEnabled):
170         (WebCore::Document::timerAlignmentInterval):
171         * dom/Document.h:
172         * dom/ScriptExecutionContext.cpp:
173         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
174         * dom/ScriptExecutionContext.h:
175         * page/DOMTimer.cpp:
176         (WebCore::DOMTimer::alignedFireTime):
177
178 2015-06-16  sylvain-galineau  <galineau@adobe.com>
179
180         Incorrect order of arguments in initial-letter property
181         https://bugs.webkit.org/show_bug.cgi?id=139667
182
183         Reviewed by Sam Weinig.
184
185         The CSS specification swapped the order of the initial-letters numeric values.
186         The drop cap's height now comes first, followed by its optional vertical position.
187         See http://www.w3.org/TR/css-inline/#sizing-drop-initials.
188          
189         No new tests. Existing tests updated.
190
191         * css/CSSParser.cpp:
192         (WebCore::CSSParser::parseValue): swap arguments to reflect new spec order.
193
194 2015-06-16  Alex Christensen  <achristensen@webkit.org>
195
196         Remove some unused values.
197         https://bugs.webkit.org/show_bug.cgi?id=145997
198
199         Reviewed by Gyuyoung Kim.
200
201         This patch should have no change in behavior.
202
203         * accessibility/AccessibilityObject.cpp:
204         (WebCore::computeBestScrollOffset):
205         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
206         (WebCore::AccessibilityObject::scrollToGlobalPoint):
207         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
208         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
209         * html/canvas/WebGL2RenderingContext.cpp:
210         (WebCore::WebGL2RenderingContext::validateTexFuncData):
211         * html/canvas/WebGLRenderingContext.cpp:
212         (WebCore::WebGLRenderingContext::validateTexFuncData):
213         * platform/graphics/StringTruncator.cpp:
214         (WebCore::leftTruncateToBuffer):
215         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
216         (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
217         * rendering/InlineTextBox.cpp:
218         (WebCore::InlineTextBox::localSelectionRect):
219         * rendering/RenderElement.cpp:
220         (WebCore::RenderElement::anchorRect):
221         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
222         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
223         * rendering/svg/SVGTextQuery.cpp:
224         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
225         Remove unused values.
226
227 2015-06-16  Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>
228
229         [Streams API] Calling controller.error() should trigger storing an undefined error
230         https://bugs.webkit.org/show_bug.cgi?id=145976
231
232         Reviewed by Darin Adler.
233
234         Covered by rebased test.
235
236         * bindings/js/JSReadableStreamControllerCustom.cpp:
237         (WebCore::JSReadableStreamController::error): Storing undefined if no error value passed.
238         * bindings/js/ReadableJSStream.cpp: Removed storeError(ExecState*).
239         (WebCore::ReadableJSStream::ReadableJSStream):
240
241 2015-06-16  Chris Dumez  <cdumez@apple.com>
242
243         Purge StyledElement's presentation attribute cache on memory pressure
244         https://bugs.webkit.org/show_bug.cgi?id=145999
245         <rdar://problem/21359252>
246
247         Reviewed by Andreas Kling.
248
249         Purge StyledElement's presentation attribute cache on memory pressure.
250
251         * dom/StyledElement.cpp:
252         (WebCore::presentationAttributeCache):
253         (WebCore::presentationAttributeCacheCleaner):
254         (WebCore::StyledElement::clearPresentationAttributeCache):
255         * dom/StyledElement.h:
256         * platform/MemoryPressureHandler.cpp:
257         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
258
259 2015-06-15  Brent Fulgham  <bfulgham@apple.com>
260
261         REGRESSION(r175251, Mavericks Only): Playback may stall
262         https://bugs.webkit.org/show_bug.cgi?id=145989
263         <rdar://problem/21271919>
264
265         Unreviewed post-review correction.
266
267         Dave Kilzer pointed out that the macro around the waitForVideoOutputMediaDataWillChange
268         call was incorrect. This patch corrects this error.
269
270         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
271         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Correct the
272         macro definition.
273
274 2015-06-15  Chris Fleizach  <cfleizach@apple.com>
275
276         AX: Changing state of radio buttons causes VoiceOver to go busy for a short time.
277         https://bugs.webkit.org/show_bug.cgi?id=145933
278
279         Reviewed by Dean Jackson.
280
281         When radio buttons animate the new focus selection state, the thread activity looks a lot like short burst of
282         activity to draw, then wait on CoreAnimation to apply those changes.
283
284         Since those periods of activity during animation are so short, VoiceOver is not able to query for all the
285         attributes it needs, and gets stuck in the queue behind rendering.
286
287         The fix here is to turn off button state animations while VoiceOver is running.
288
289         * platform/mac/ThemeMac.mm:
290         (WebCore::updateStates):
291
292 2015-06-15  Zalan Bujtas  <zalan@apple.com>
293
294         RootInlineBox::m_lineBreakObj becomes invalid when a child renderer is removed and the line does not get marked dirty.
295         https://bugs.webkit.org/show_bug.cgi?id=145988
296         rdar://problem/20959137
297
298         Reviewed by David Hyatt.
299
300         This patch ensures that we find the right first inline box so that we can dirty the
301         the appropriate line boxes.
302         With marking the right line boxes dirty, now we can update RootInlineBox::m_lineBreakObj at the next layout.
303
304         Test: fast/inline/crash-when-child-renderer-is-removed-and-line-stays-clean.html
305
306         * rendering/RenderInline.cpp:
307         (WebCore::RenderInline::culledInlineFirstLineBox):
308         (WebCore::RenderInline::culledInlineLastLineBox):
309         * rendering/RootInlineBox.cpp:
310         (WebCore::RootInlineBox::setLineBreakInfo): Deleted. Remove misleading assert and comment.
311
312 2015-06-15  Matt Rajca  <mrajca@apple.com>
313
314         Media Session: Improve the safety of playback toggling
315         https://bugs.webkit.org/show_bug.cgi?id=145986
316
317         Reviewed by Darin Adler.
318
319         * Modules/mediasession/MediaSession.cpp:
320         (WebCore::MediaSession::togglePlayback): Improved the safety of the loop so that we don't re-visit elements that
321           may have been deleted underneath us.
322         * Modules/mediasession/MediaSession.h: Added a pointer to the set of iterated active participating elements so
323           we can remove any elements that are deleted from the underlying "real" set.
324
325 2015-06-15  Brent Fulgham  <bfulgham@apple.com>
326
327         REGRESSION(r175251, Mavericks Only): Playback may stall
328         https://bugs.webkit.org/show_bug.cgi?id=145989
329         <rdar://problem/21271919>
330
331         Reviewed by Dean Jackson.
332
333         Revert r175251 for Mavericks build targets.
334
335         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
336         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
337         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
338         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
339
340 2015-06-15  Darin Adler  <darin@apple.com>
341
342         REGRESSION (r182215): Reproducible crash at drawsvg.org due to reentrant layout
343         https://bugs.webkit.org/show_bug.cgi?id=145964
344
345         Reviewed by Simon Fraser.
346
347         Test: svg/as-object/mutate-on-load.html
348
349         * page/FrameView.cpp:
350         (WebCore::FrameView::forceLayoutParentViewIfNeeded): Don't do a synchronous layout here,
351         because it can lead indirectly to unwanted layout reentrancy. Instead schedule a layout.
352
353 2015-06-15  Matt Rajca  <mrajca@apple.com>
354
355         Media Session: Active participating elements can change while being iterated 
356         https://bugs.webkit.org/show_bug.cgi?id=145978
357
358         Reviewed by Alex Christensen.
359
360         * Modules/mediasession/MediaSession.cpp:
361         (WebCore::MediaSession::togglePlayback): Iterate through a copy of m_activeParticipatingElements since its contents
362           can be modified in the loop.
363
364 2015-06-15  Chris Fleizach  <cfleizach@apple.com>
365
366         AX: no accessibility support for details element
367         https://bugs.webkit.org/show_bug.cgi?id=131111
368
369         Reviewed by Darin Adler.
370
371         Add accessibility support for Mac for details element by:
372            1) Returning new subroles for <details> and <summary>
373            2) Exposing isExpanded property for <details> element.
374
375         Test: platform/mac/accessibility/details-summary.html
376
377         * accessibility/AccessibilityObject.cpp:
378         (WebCore::AccessibilityObject::supportsARIAPressed):
379         (WebCore::AccessibilityObject::supportsExpanded):
380         (WebCore::AccessibilityObject::isExpanded):
381         (WebCore::AccessibilityObject::supportsARIAExpanded): Deleted.
382         * accessibility/AccessibilityObject.h:
383         (WebCore::AccessibilityObject::canvasHasFallbackContent):
384         * accessibility/AccessibilityRenderObject.cpp:
385         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
386         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
387         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
388         (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
389         (-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):
390         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
391         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
392         (createAccessibilityRoleMap):
393         (-[WebAccessibilityObjectWrapper subrole]):
394         * html/HTMLDetailsElement.h:
395         * inspector/InspectorDOMAgent.cpp:
396         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
397
398 2015-06-15  Alex Christensen  <achristensen@webkit.org>
399
400         [Content Extensions] Limit number of rules.
401         https://bugs.webkit.org/show_bug.cgi?id=145663
402
403         Reviewed by Benjamin Poulain.
404
405         Added an API test to make sure that parsing fails when there are too many rules.
406
407         * contentextensions/ContentExtensionError.cpp:
408         (WebCore::ContentExtensions::contentExtensionErrorCategory):
409         * contentextensions/ContentExtensionError.h:
410         * contentextensions/ContentExtensionParser.cpp:
411         (WebCore::ContentExtensions::loadEncodedRules):
412         Fail to parse a content extension with more than 50000 rules.
413
414 2015-06-12  Alexey Proskuryakov  <ap@apple.com>
415
416         -[WKWebView evaluateJavaScript] provides a misleading error when the return cannot be serialized
417         https://bugs.webkit.org/show_bug.cgi?id=145900
418
419         Reviewed by Sam Weinig.
420
421         * English.lproj/Localizable.strings:
422
423 2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>
424
425         [SOUP] Custom URI schemes don't work for requests containing a fragment identifier
426         https://bugs.webkit.org/show_bug.cgi?id=145969
427
428         Reviewed by Sergio Villar Senin.
429
430         For URIs like foo:bar#baz, what the custom protocol manager
431         receives in the UI process is foo:bar, so the user can't handle fragments.
432
433         * platform/network/soup/ResourceRequestSoup.cpp:
434         (WebCore::ResourceRequest::updateSoupRequest): If the SoupRequest
435         is a WebKitSoupRequestGeneric, call
436         webkitSoupRequestGenericSetRequest with the ResourceRequest.
437         * platform/network/soup/WebKitSoupRequestGeneric.cpp:
438         (webkitSoupRequestGenericSetRequest):
439         (webkitSoupRequestGenericGetRequest):
440         * platform/network/soup/WebKitSoupRequestGeneric.h:
441
442 2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>
443
444         [SOUP] Move WebKitSoupRequestGeneric to platform layer
445         https://bugs.webkit.org/show_bug.cgi?id=145968
446
447         Reviewed by Sergio Villar Senin.
448
449         * PlatformEfl.cmake:
450         * PlatformGTK.cmake:
451         * platform/network/soup/WebKitSoupRequestGeneric.cpp: Renamed from Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp.
452         (webkitSoupRequestGenericFinalize):
453         (webkit_soup_request_generic_init):
454         (webkitSoupRequestGenericSendAsync):
455         (webkitSoupRequestGenericSendFinish):
456         (webkitSoupRequestGenericGetContentLength):
457         (webkitSoupRequestGenericGetContentType):
458         (webkit_soup_request_generic_class_init):
459         (webkitSoupRequestGenericSetContentLength):
460         (webkitSoupRequestGenericSetContentType):
461         * platform/network/soup/WebKitSoupRequestGeneric.h: Renamed from Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.h.
462         * platform/network/soup/WebKitSoupRequestGenericClient.h: Renamed from Source/WebKit2/WebProcess/soup/WebKitSoupRequestGenericClient.h.
463
464 2015-06-13  Chris Dumez  <cdumez@apple.com>
465
466         [WK2] API::Navigation objects are leaked on history navigation to HistoryItems in PageCache
467         https://bugs.webkit.org/show_bug.cgi?id=145948
468
469         Reviewed by Darin Adler.
470
471         API::Navigation objects were leaked on history navigation to
472         HistoryItems in PageCache. In such case, we would create 2 Navigation
473         objects instead of 1 and the first one would be leaked. The reason
474         we create the second one is because we fail to pass along the
475         navigationID from the UIProcess to the WebProcess and then back to the
476         UIProcess. On the IPC back to the UIProcess, the navigationID ends up
477         being 0 so the UIProcess creates a new Navigation object, thinking that
478         the load was triggered by the WebContent process.
479
480         We now pass along the navigationID, even if the HistoryItem is in the
481         PageCache and we end up reusing the cached DocumentLoader, instead of
482         creating a new one. A new updateCachedDocumentLoader() delegate is
483         added to the FrameLoaderClient, similarly to the pre-existing
484         createDocumentLoader() but for the case where the DocumentLoader gets
485         reused.
486
487         * loader/EmptyClients.h:
488         * loader/FrameLoader.cpp:
489         (WebCore::FrameLoader::loadDifferentDocumentItem):
490         * loader/FrameLoaderClient.h:
491
492 2015-06-13  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
493
494         [Streams API] ReadableJSStream should handle promises returned by JS source start callback
495         https://bugs.webkit.org/show_bug.cgi?id=145792
496
497         Reviewed by Darin Adler.
498
499         Covered by rebased tests.
500
501         When calling start callback, the returned value is checked.
502         If it is not a promise, we do as if it is a resolved promise.
503         If it is a promise, we call its then() method with two resolve/reject JS functions.
504
505         * Modules/streams/ReadableStream.cpp:
506         * bindings/js/ReadableJSStream.cpp:
507         (WebCore::ReadableJSStream::invoke): Returns a JSPromise* if any is returned by the JS source callback.
508         (WebCore::thenPromise): Utility method to call the promise.
509         (WebCore::createStartResultFulfilledFunction): The promise resolve callback.
510         (WebCore::ReadableJSStream::doStart): Calls thenPromise if a JSPromise* is returned by invoke.
511         (WebCore::ReadableJSStream::ReadableJSStream):
512         * bindings/js/ReadableJSStream.h:
513
514 2015-06-13  Andres Gonzalez  <agonzalez334@nc.rr.com>
515
516         AX: WebKit exposes all Ruby Text as Unknown (Japanese EPUB accessibility blocker)
517         https://bugs.webkit.org/show_bug.cgi?id=141303
518
519         Reviewed by Chris Fleizach.
520
521         Test: accessibility/ruby-hierarchy-roles.html
522
523         * accessibility/AccessibilityObject.h:
524         * accessibility/AccessibilityRenderObject.cpp:
525         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
526         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
527         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
528         (createAccessibilityRoleMap):
529         (-[WebAccessibilityObjectWrapper subrole]):
530
531 2015-06-12  Chris Fleizach  <cfleizach@apple.com>
532
533         AX: iOS: after updating control, VoiceOver speaks aria-expanded states reversed (says "collapsed" when "expanded")
534         https://bugs.webkit.org/show_bug.cgi?id=145943
535
536         Reviewed by Darin Adler.
537
538         iOS Accessibility platform needs to be notified of when aria expanded changes.
539
540         * accessibility/ios/AXObjectCacheIOS.mm:
541         (WebCore::AXObjectCache::postPlatformNotification):
542         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
543         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
544         (-[WebAccessibilityObjectWrapper postValueChangedNotification]):
545         (-[WebAccessibilityObjectWrapper postExpandedChangedNotification]):
546         (-[WebAccessibilityObjectWrapper postScrollStatusChangeNotification]):
547
548 2015-06-12  Chris Fleizach  <cfleizach@apple.com>
549
550         AX:ARIA Toggle buttons aren't properly conveyed on iOS using VoiceOver
551         https://bugs.webkit.org/show_bug.cgi?id=145949
552
553         Reviewed by Darin Adler.
554
555         Expose pressed state information to the iOS platform AX API.
556
557         Test: Updated inspector-protocol/dom/getAccessibilityPropertiesForNode.html 
558               There was a FIXME for this issue in that test: https://bugs.webkit.org/show_bug.cgi?id=129830
559
560         * accessibility/AccessibilityNodeObject.cpp:
561         (WebCore::AccessibilityNodeObject::isPressed):
562         * accessibility/AccessibilityObject.cpp:
563         (WebCore::AccessibilityObject::classList):
564         (WebCore::AccessibilityObject::supportsARIAPressed):
565         (WebCore::AccessibilityObject::supportsARIAExpanded):
566         * accessibility/AccessibilityObject.h:
567         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
568         (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]):
569         (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAPressed]):
570         (-[WebAccessibilityObjectWrapper accessibilityIsPressed]):
571         (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
572
573 2015-06-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
574
575         Purge PassRefPtr in JavaScriptCore - 2
576         https://bugs.webkit.org/show_bug.cgi?id=145834
577
578         Reviewed by Darin Adler.
579
580         Fix call sites depends on changing of JSC.
581
582         * html/canvas/WebGL2RenderingContext.cpp:
583         (WebCore::WebGL2RenderingContext::getParameter):
584         * html/canvas/WebGLRenderingContext.cpp:
585         (WebCore::WebGLRenderingContext::getParameter):
586         * html/canvas/WebGLRenderingContextBase.cpp:
587         (WebCore::WebGLRenderingContextBase::getUniform):
588         (WebCore::WebGLRenderingContextBase::getVertexAttrib):
589         (WebCore::WebGLRenderingContextBase::getWebGLFloatArrayParameter):
590         (WebCore::WebGLRenderingContextBase::getWebGLIntArrayParameter):
591
592 2015-06-12  Zalan Bujtas  <zalan@apple.com>
593
594         Be more defensive at renderer type checking when initializing flow segments.
595         https://bugs.webkit.org/show_bug.cgi?id=145942
596
597         Reviewed by Simon Fraser.
598
599         FlowContents::initializeSegments should ignore unsupported renderers so that when we miss
600         a simple line layout path invalidation, we don't downcast the unsupported renderer to RenderText.
601
602         I have not reproduced this issue (but related to rdar://problem/21312452)
603
604         * rendering/SimpleLineLayoutFlowContents.cpp:
605         (WebCore::SimpleLineLayout::initializeSegments):
606
607 2015-06-12  Anders Carlsson  <andersca@apple.com>
608
609         deleteEmptyDirectory should delete .DS_Store files on OS X
610         https://bugs.webkit.org/show_bug.cgi?id=145944
611
612         Reviewed by Dan Bernstein.
613
614         deleteEmptyDirectory is often used when clearing website data, so we should
615         take extra care to delete empty directories so the user won't think that clearing
616         website data didn't do anything because it would leave directories with .DS_Store 
617         files behind.
618
619         * platform/mac/FileSystemMac.mm:
620         (WebCore::deleteEmptyDirectory):
621         * platform/posix/FileSystemPOSIX.cpp:
622
623 2015-06-12  Manuel Rego Casasnovas  <rego@igalia.com>
624
625         [CSS Grid Layout] Fix grid-template-areas parsing to avoid spaces
626         https://bugs.webkit.org/show_bug.cgi?id=145860
627
628         Reviewed by Sergio Villar Senin.
629
630         The spec doesn't require to have spaces between unnamed and named areas
631         in grid-template-areas syntax. But spaces are currently required in our
632         code.
633
634         This was confirmed in the CSS WG mailing list:
635         https://lists.w3.org/Archives/Public/www-style/2015May/0239.html
636
637         This patch updates grid-template-areas parsing to allow the possibility
638         of removing spaces between unnamed and named areas.
639
640         Added new cases to fast/css-grid-layout/grid-template-areas-get-set.html.
641
642         * css/CSSParser.cpp:
643         (WebCore::parseGridTemplateAreasColumnNames): New helper method to
644         determine the column names split by white spaces or dots.
645         (WebCore::CSSParser::parseGridTemplateAreasRow): Use the new helper
646         method to get the column names.
647         (WebCore::containsOnlyDots): Deleted. Not needed anymore as
648         parseGridTemplateAreasColumnNames() is using a single dot for unnamed
649         grid areas (despite of being defined with 1 or more dots).
650
651 2015-06-12  Eric Carlson  <eric.carlson@apple.com>
652
653         [Mac] AirPlay menu button doesn't always show on page load
654         https://bugs.webkit.org/show_bug.cgi?id=145936
655
656         Reviewed by Brent Fulgham.
657
658         * Modules/mediasession/WebMediaSessionManager.cpp:
659         (WebCore::mediaProducerStateString): New, return a string representing MediaStateFlags.
660         (WebCore::WebMediaSessionManager::clientStateDidChange): Log the states as strings.
661         (WebCore::WebMediaSessionManager::toString): New, return a string representing ConfigurationTasks.
662         (WebCore::WebMediaSessionManager::scheduleDelayedTask): Add logging.
663         (WebCore::WebMediaSessionManager::taskTimerFired): Add logging.
664         * Modules/mediasession/WebMediaSessionManager.h:
665
666         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: Override wirelessVideoPlaybackDisabled
667           so it is possible to activate route monitoring for a movie loaded with this engine.
668         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Ditto.
669
670 2015-06-12  Zan Dobersek  <zdobersek@igalia.com>
671
672         Add the remaining missing override specifiers under Source/WebCore/
673         https://bugs.webkit.org/show_bug.cgi?id=145907
674
675         Reviewed by Darin Adler.
676
677         Fix the remaining compiler warnings about missing override specifiers
678         for overriding method declarations in classes under Source/WebCore/.
679
680         Where the addition had to be performed on all virtual methods of the
681         class, the virtual specifier was removed so now only the override
682         specifier is in use.
683
684         * Modules/indexeddb/IDBOpenDBRequest.h:
685         * Modules/indexeddb/IDBRequest.h:
686         * Modules/webdatabase/DatabaseServer.h:
687         * bindings/js/ReadableJSStream.h:
688         * editing/InsertTextCommand.h:
689         * mathml/MathMLInlineContainerElement.h:
690         * platform/audio/EqualPowerPanner.h:
691         (WebCore::EqualPowerPanner::reset):
692         * platform/graphics/MediaPlayer.cpp:
693         (WebCore::NullMediaPlayerPrivate::load):
694         (WebCore::NullMediaPlayerPrivate::cancelLoad):
695         (WebCore::NullMediaPlayerPrivate::prepareToPlay):
696         (WebCore::NullMediaPlayerPrivate::play):
697         (WebCore::NullMediaPlayerPrivate::pause):
698         (WebCore::NullMediaPlayerPrivate::platformMedia):
699         (WebCore::NullMediaPlayerPrivate::platformLayer):
700         (WebCore::NullMediaPlayerPrivate::naturalSize):
701         (WebCore::NullMediaPlayerPrivate::hasVideo):
702         (WebCore::NullMediaPlayerPrivate::hasAudio):
703         (WebCore::NullMediaPlayerPrivate::setVisible):
704         (WebCore::NullMediaPlayerPrivate::durationDouble):
705         (WebCore::NullMediaPlayerPrivate::currentTimeDouble):
706         (WebCore::NullMediaPlayerPrivate::seekDouble):
707         (WebCore::NullMediaPlayerPrivate::seeking):
708         (WebCore::NullMediaPlayerPrivate::setRateDouble):
709         (WebCore::NullMediaPlayerPrivate::setPreservesPitch):
710         (WebCore::NullMediaPlayerPrivate::paused):
711         (WebCore::NullMediaPlayerPrivate::setVolumeDouble):
712         (WebCore::NullMediaPlayerPrivate::supportsMuting):
713         (WebCore::NullMediaPlayerPrivate::setMuted):
714         (WebCore::NullMediaPlayerPrivate::hasClosedCaptions):
715         (WebCore::NullMediaPlayerPrivate::setClosedCaptionsVisible):
716         (WebCore::NullMediaPlayerPrivate::networkState):
717         (WebCore::NullMediaPlayerPrivate::readyState):
718         (WebCore::NullMediaPlayerPrivate::maxTimeSeekableDouble):
719         (WebCore::NullMediaPlayerPrivate::minTimeSeekable):
720         (WebCore::NullMediaPlayerPrivate::buffered):
721         (WebCore::NullMediaPlayerPrivate::totalBytes):
722         (WebCore::NullMediaPlayerPrivate::didLoadingProgress):
723         (WebCore::NullMediaPlayerPrivate::setSize):
724         (WebCore::NullMediaPlayerPrivate::canLoadPoster):
725         (WebCore::NullMediaPlayerPrivate::setPoster):
726         (WebCore::NullMediaPlayerPrivate::hasSingleSecurityOrigin):
727         * platform/graphics/filters/DistantLightSource.h:
728         * platform/graphics/filters/FEComposite.h:
729         * platform/graphics/filters/FEDisplacementMap.h:
730         (WebCore::FEDisplacementMap::determineAbsolutePaintRect):
731         * platform/graphics/filters/FEFlood.h:
732         (WebCore::FEFlood::determineAbsolutePaintRect):
733         * platform/graphics/filters/PointLightSource.h:
734         * platform/graphics/filters/SpotLightSource.h:
735         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
736         (WebCore::MediaPlayerPrivateGStreamer::hasVideo):
737         (WebCore::MediaPlayerPrivateGStreamer::hasAudio):
738         (WebCore::MediaPlayerPrivateGStreamer::audioSourceProvider):
739         (WebCore::MediaPlayerPrivateGStreamer::engineDescription):
740         (WebCore::MediaPlayerPrivateGStreamer::isLiveStream):
741         (WebCore::MediaPlayerPrivateGStreamer::totalVideoFrames):
742         (WebCore::MediaPlayerPrivateGStreamer::droppedVideoFrames):
743         (WebCore::MediaPlayerPrivateGStreamer::corruptedVideoFrames):
744         (WebCore::MediaPlayerPrivateGStreamer::totalFrameDelay):
745         * platform/graphics/texmap/BitmapTextureGL.h:
746         (WebCore::BitmapTextureGL::isBackedByOpenGL):
747         * platform/graphics/transforms/Matrix3DTransformOperation.h:
748         * platform/graphics/transforms/MatrixTransformOperation.h:
749         * platform/graphics/transforms/PerspectiveTransformOperation.h:
750         * platform/graphics/transforms/RotateTransformOperation.h:
751         * platform/graphics/transforms/ScaleTransformOperation.h:
752         * platform/graphics/transforms/SkewTransformOperation.h:
753         * platform/image-decoders/png/PNGImageDecoder.h:
754         (WebCore::PNGImageDecoder::filenameExtension):
755         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
756         * platform/mock/MockRealtimeMediaSourceCenter.h:
757
758 2015-06-12  Commit Queue  <commit-queue@webkit.org>
759
760         Unreviewed, rolling out r185512.
761         https://bugs.webkit.org/show_bug.cgi?id=145932
762
763         Many asserts on layout tests and on API tests (Requested by
764         ap_ on #webkit).
765
766         Reverted changeset:
767
768         "Use modern for-loops in WebCore/rendering - 1"
769         https://bugs.webkit.org/show_bug.cgi?id=145831
770         http://trac.webkit.org/changeset/185512
771
772 2015-06-12  Simon Fraser  <simon.fraser@apple.com>
773
774         OpenGLESSPI.h doesn't need to include UIKit.h
775         https://bugs.webkit.org/show_bug.cgi?id=145931
776
777         Reviewed by Darin Adler.
778
779         No need to suck in all of UIKit from OpenGLESSPI.h.
780
781         * platform/spi/ios/OpenGLESSPI.h:
782
783 2015-06-12  Matt Rajca  <mrajca@apple.com>
784
785         Add barebones implementation of media session invocation algorithm.
786         https://bugs.webkit.org/show_bug.cgi?id=145847
787
788         Reviewed by Darin Adler.
789
790         * Modules/mediasession/MediaSession.cpp:
791         (WebCore::MediaSession::invoke): Move the media session to an active state.
792         * Modules/mediasession/MediaSession.h:
793         * html/HTMLMediaElement.cpp:
794         (WebCore::HTMLMediaElement::playInternal): Call the media session invocation algorithm as described in the
795           Media Session spec.
796
797 2015-06-12  Hunseop Jeong  <hs85.jeong@samsung.com>
798
799         Use modern for-loops in WebCore/rendering - 1
800         https://bugs.webkit.org/show_bug.cgi?id=145831
801
802         Reviewed by Darin Adler.
803
804         No new tests because there is no behavior change.
805
806         * rendering/AutoTableLayout.cpp:
807         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
808         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
809         * rendering/FilterEffectRenderer.cpp:
810         (WebCore::FilterEffectRenderer::build):
811         (WebCore::FilterEffectRenderer::clearIntermediateResults):
812         * rendering/FilterEffectRenderer.h:
813         * rendering/FloatingObjects.cpp:
814         (WebCore::FloatingObjects::clearLineBoxTreePointers):
815         (WebCore::FloatingObjects::moveAllToFloatInfoMap):
816         (WebCore::FloatingObjects::computePlacedFloatsTree):
817         * rendering/FlowThreadController.cpp:
818         (WebCore::FlowThreadController::collectFixedPositionedLayers):
819         * rendering/HitTestResult.cpp:
820         (WebCore::HitTestResult::append):
821         * rendering/ImageQualityController.cpp:
822         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
823         * rendering/InlineTextBox.cpp:
824         (WebCore::InlineTextBox::paint):
825         * rendering/RenderBlock.cpp:
826         (WebCore::removeBlockFromDescendantAndContainerMaps):
827         (WebCore::RenderBlock::addOverflowFromPositionedObjects):
828         (WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):
829         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
830         (WebCore::RenderBlock::layoutPositionedObjects):
831         (WebCore::RenderBlock::markPositionedObjectsForLayout):
832         (WebCore::RenderBlock::paintContinuationOutlines):
833         (WebCore::clipOutPositionedObjects):
834         (WebCore::RenderBlock::removeFromTrackedRendererMaps):
835         (WebCore::RenderBlock::removePositionedObjects):
836         (WebCore::RenderBlock::checkPositionedObjectsNeedLayout):
837         * rendering/RenderBlockFlow.cpp:
838         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
839         (WebCore::RenderBlockFlow::styleDidChange):
840         (WebCore::RenderBlockFlow::moveFloatsTo):
841         (WebCore::RenderBlockFlow::addOverflowFromFloats):
842         (WebCore::RenderBlockFlow::repaintOverhangingFloats):
843         (WebCore::RenderBlockFlow::paintFloats):
844         (WebCore::RenderBlockFlow::clipOutFloatingObjects):
845         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
846         (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom):
847         (WebCore::RenderBlockFlow::addOverhangingFloats):
848         (WebCore::RenderBlockFlow::addIntrudingFloats):
849         (WebCore::RenderBlockFlow::markSiblingsWithFloatsForLayout):
850         (WebCore::RenderBlockFlow::adjustForBorderFit):
851         * rendering/RenderBlockLineLayout.cpp:
852         (WebCore::setLogicalWidthForTextRun):
853         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
854         (WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
855         (WebCore::RenderBlockFlow::repaintDirtyFloats):
856         (WebCore::RenderBlockFlow::layoutLineBoxes):
857         (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
858         (WebCore::RenderBlockFlow::determineStartPosition):
859         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
860         * rendering/RenderCounter.cpp:
861         (WebCore::RenderCounter::destroyCounterNodes):
862         (WebCore::updateCounters):
863         (WebCore::RenderCounter::rendererStyleChanged):
864         * rendering/RenderFlexibleBox.cpp:
865         (WebCore::RenderFlexibleBox::autoMarginOffsetInMainAxis):
866         (WebCore::RenderFlexibleBox::freezeViolations):
867         (WebCore::RenderFlexibleBox::resolveFlexibleLengths):
868         (WebCore::RenderFlexibleBox::numberOfInFlowPositionedChildren):
869         (WebCore::RenderFlexibleBox::layoutColumnReverse):
870         (WebCore::RenderFlexibleBox::alignFlexLines):
871         (WebCore::RenderFlexibleBox::alignChildren):
872         (WebCore::RenderFlexibleBox::flipForWrapReverse):
873         * rendering/RenderFlowThread.cpp:
874         (WebCore::RenderFlowThread::updateAllLayerToRegionMappings):
875         * rendering/RenderInline.cpp:
876         (WebCore::RenderInline::addAnnotatedRegions):
877         * rendering/RenderLayer.cpp:
878         (WebCore::RenderLayer::updateDescendantsAreContiguousInStackingOrder):
879         (WebCore::RenderLayer::updateDescendantDependentFlags):
880         * rendering/RenderLayerBacking.cpp:
881         (WebCore::descendantLayerPaintsIntoAncestor):
882         (WebCore::RenderLayerBacking::startAnimation):
883         * rendering/RenderLineBoxList.cpp:
884         (WebCore::RenderLineBoxList::paint):
885         * rendering/RenderListBox.cpp:
886         (WebCore::RenderListBox::updateFromElement):
887         * rendering/RenderMenuList.cpp:
888         (WebCore::selectedOptionCount):
889         (RenderMenuList::updateOptionsWidth):
890         * rendering/RenderMultiColumnSet.cpp:
891         (WebCore::RenderMultiColumnSet::distributeImplicitBreaks):
892
893 2015-06-12  Csaba Osztrogonác  <ossy@webkit.org>
894
895         Fix unused private field warning in ResourceHandleSoup.cpp
896         https://bugs.webkit.org/show_bug.cgi?id=145910
897
898         Reviewed by Darin Adler.
899
900         * platform/network/soup/ResourceHandleSoup.cpp:
901
902 2015-06-12  Joseph Pecoraro  <pecoraro@apple.com>
903
904         Web Inspector: CRASH trying to inspect text that was removed/replaced
905         https://bugs.webkit.org/show_bug.cgi?id=145898
906
907         Reviewed by Darin Adler.
908
909         * inspector/InspectorDOMAgent.cpp:
910         (WebCore::InspectorDOMAgent::inspect):
911         (WebCore::InspectorDOMAgent::focusNode):
912         Ensure we only cause focusNode with a node to focus. If the original
913         node that was provided is no longer in the document, then we won't
914         actually find a node to inspect.
915
916 2015-06-12  KwangHyuk Kim  <hyuki.kim@samsung.com>
917
918         [EFL] canvas/philip/tests/toDataURL.jpeg.foo tests have been failed since r185417.
919         https://bugs.webkit.org/show_bug.cgi?id=145878
920
921         Reviewed by Gyuyoung Kim.
922
923         Fix input buffer alignment issue.
924
925         No new tests, canvas/philip/tests/toDataURL.jpeg.foo can be used.
926
927         * platform/graphics/efl/ImageBufferEfl.cpp:
928         (WebCore::encodeImagePNG):
929         (WebCore::encodeImageJPEG):
930         (WebCore::ImageBuffer::toDataURL):
931
932 2015-06-12  Zan Dobersek  <zdobersek@igalia.com>
933
934         Add missing override specifiers under Source/WebCore/svg/
935         https://bugs.webkit.org/show_bug.cgi?id=145841
936
937         Reviewed by Darin Adler.
938
939         Add missing override specifiers to virtual method overrides for classes
940         under Source/WebCore/svg/, suppressing a bunch of warnings when compiling
941         with Clang 3.6.
942
943         Add the BEGIN_DECLARE_ANIMATED_PROPERTIES_BASE() macro that doesn't
944         override the localAttributeToPropertyMap() method declaration, and
945         have the BEGIN_DECLARE_ANIMATED_PROPERTIES() macro add the override
946         specifier. The new macro is used in SVGElement.
947
948         Change the DECLARE_ANIMATED_PROPERTY() to accept the optional override
949         specifier as the fifth parameter. Current DECLARE_ANIMATED_*() macros
950         are modified to just pass an empty argument, not adding any specifier.
951         DECLARE_ANIMATED_BOOLEAN_OVERRIDE() and DECLARE_ANIMATED_STRING_OVERRIDE()
952         macros are added to override the methods for the externalResourcesRequired
953         and href animated properties, where required.
954
955         * svg/SVGAElement.h:
956         * svg/SVGAltGlyphElement.h:
957         * svg/SVGAnimatedAngle.h:
958         * svg/SVGAnimatedBoolean.h:
959         * svg/SVGAnimatedEnumeration.h:
960         * svg/SVGAnimatedInteger.h:
961         * svg/SVGAnimatedLength.h:
962         * svg/SVGAnimatedNumber.h:
963         * svg/SVGAnimatedPreserveAspectRatio.h:
964         * svg/SVGAnimatedRect.h:
965         * svg/SVGAnimatedString.h:
966         * svg/SVGAnimationElement.h:
967         * svg/SVGCircleElement.h:
968         * svg/SVGClipPathElement.h:
969         * svg/SVGCursorElement.h:
970         * svg/SVGDefsElement.h:
971         * svg/SVGElement.h:
972         * svg/SVGEllipseElement.h:
973         * svg/SVGFEImageElement.h:
974         * svg/SVGFilterElement.h:
975         * svg/SVGFontElement.h:
976         * svg/SVGForeignObjectElement.h:
977         * svg/SVGGElement.h:
978         * svg/SVGGlyphRefElement.h:
979         * svg/SVGGradientElement.h:
980         * svg/SVGImageElement.h:
981         * svg/SVGLineElement.h:
982         * svg/SVGMPathElement.h:
983         * svg/SVGMarkerElement.h:
984         * svg/SVGMaskElement.h:
985         * svg/SVGPathElement.h:
986         * svg/SVGPatternElement.h:
987         * svg/SVGPolyElement.h:
988         * svg/SVGRectElement.h:
989         * svg/SVGSVGElement.h:
990         * svg/SVGScriptElement.h:
991         * svg/SVGSwitchElement.h:
992         * svg/SVGSymbolElement.h:
993         * svg/SVGTRefElement.h:
994         * svg/SVGTextContentElement.h:
995         * svg/SVGTextPathElement.h:
996         * svg/SVGURIReference.h: Add the hrefBaseValue() pure virtual method
997         so it can be overridden by any class that also overrides the
998         corresponding setHrefBaseValue() method.
999         * svg/SVGUseElement.h:
1000         * svg/SVGViewElement.h:
1001         * svg/properties/SVGAnimatedPropertyMacros.h:
1002         * svg/properties/SVGMatrixTearOff.h:
1003         (WebCore::SVGMatrixTearOff::commitChange):
1004
1005 2015-06-12  Zan Dobersek  <zdobersek@igalia.com>
1006
1007         [GLib] Move files under Source/WTF/wtf/gobject to Source/WTF/wtf/glib
1008         https://bugs.webkit.org/show_bug.cgi?id=145799
1009
1010         Reviewed by Carlos Garcia Campos.
1011
1012         Update header inclusions for headers that have been moved
1013         to Source/WTF/wtf/glib/.
1014
1015         * accessibility/atk/AXObjectCacheAtk.cpp:
1016         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
1017         * bindings/gobject/DOMObjectCache.cpp:
1018         * bindings/gobject/GObjectEventListener.h:
1019         * bindings/gobject/GObjectNodeFilterCondition.h:
1020         * bindings/gobject/GObjectXPathNSResolver.h:
1021         * bindings/gobject/WebKitDOMEventTarget.cpp:
1022         * platform/Pasteboard.h:
1023         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
1024         * platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
1025         * platform/audio/gstreamer/AudioSourceProviderGStreamer.cpp:
1026         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1027         * platform/audio/gtk/AudioBusGtk.cpp:
1028         * platform/geoclue/GeolocationProviderGeoclue.h:
1029         * platform/geoclue/GeolocationProviderGeoclue2.cpp:
1030         * platform/glib/BatteryProviderUPower.cpp:
1031         * platform/glib/BatteryProviderUPower.h:
1032         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
1033         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
1034         * platform/graphics/gstreamer/GUniquePtrGStreamer.h:
1035         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
1036         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1037         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1038         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1039         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1040         * platform/graphics/gstreamer/MediaSourceGStreamer.cpp:
1041         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1042         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
1043         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1044         * platform/graphics/gstreamer/WebKitMediaSourceGStreamer.cpp:
1045         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1046         * platform/graphics/gtk/ImageBufferGtk.cpp:
1047         * platform/graphics/gtk/ImageGtk.cpp:
1048         * platform/gtk/ContextMenuGtk.cpp:
1049         * platform/gtk/ContextMenuItemGtk.cpp:
1050         * platform/gtk/DataObjectGtk.cpp:
1051         * platform/gtk/DataObjectGtk.h:
1052         * platform/gtk/FileSystemGtk.cpp:
1053         * platform/gtk/GRefPtrGtk.h:
1054         * platform/gtk/GUniquePtrGtk.h:
1055         * platform/gtk/GamepadsGtk.cpp:
1056         * platform/gtk/GtkUtilities.cpp:
1057         * platform/gtk/LanguageGtk.cpp:
1058         * platform/gtk/LocalizedStringsGtk.cpp:
1059         * platform/gtk/PasteboardHelper.cpp:
1060         * platform/gtk/ScrollbarThemeGtk.cpp:
1061         * platform/gtk/SharedBufferGtk.cpp:
1062         * platform/gtk/SharedTimerGtk.cpp:
1063         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
1064         * platform/network/ResourceHandleInternal.h:
1065         * platform/network/gtk/CredentialBackingStore.cpp:
1066         * platform/network/soup/CertificateInfo.h:
1067         * platform/network/soup/CookieJarSoup.cpp:
1068         * platform/network/soup/DNSSoup.cpp:
1069         * platform/network/soup/GRefPtrSoup.h:
1070         * platform/network/soup/GUniquePtrSoup.h:
1071         * platform/network/soup/ResourceError.h:
1072         * platform/network/soup/ResourceErrorSoup.cpp:
1073         * platform/network/soup/ResourceHandleSoup.cpp:
1074         * platform/network/soup/ResourceResponse.h:
1075         * platform/network/soup/SocketStreamHandle.h:
1076         * platform/network/soup/SocketStreamHandleSoup.cpp:
1077         * platform/network/soup/SoupNetworkSession.h:
1078         * platform/text/gtk/HyphenationLibHyphen.cpp:
1079         * rendering/RenderThemeGtk.cpp:
1080
1081 2015-06-12  Yoav Weiss  <yoav@yoav.ws>
1082
1083         Fix the build when the PICTURE_SIZES flag is off
1084         https://bugs.webkit.org/show_bug.cgi?id=145926
1085
1086         Reviewed by Csaba Osztrogonác.
1087
1088         No new tests since there's no functionality change.
1089
1090         * html/parser/HTMLPreloadScanner.cpp: Remove the guard around the definition of m_sizesAttribute.
1091
1092 2015-06-12  Commit Queue  <commit-queue@webkit.org>
1093
1094         Unreviewed, rolling out r185492.
1095         https://bugs.webkit.org/show_bug.cgi?id=145927
1096
1097         Causes crashes on debug (Requested by rego on #webkit).
1098
1099         Reverted changeset:
1100
1101         "[CSS Grid Layout] Fix grid-template-areas parsing to avoid
1102         spaces"
1103         https://bugs.webkit.org/show_bug.cgi?id=145860
1104         http://trac.webkit.org/changeset/185492
1105
1106 2015-06-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1107
1108         Bindings generator should generate code for Promise-based APIs
1109         https://bugs.webkit.org/show_bug.cgi?id=145833
1110
1111         Reviewed by Darin Adler.
1112
1113         Covered by existing tests.
1114
1115         * Modules/webaudio/AudioContext.idl: Removing custom binding for resume, suspend and close.
1116         * bindings/js/JSAudioContextCustom.cpp: Ditto.
1117         * bindings/scripts/CodeGeneratorJS.pm:
1118         (GenerateHeader): Refactoring to use IsReturningPromise.
1119         (GenerateImplementation): Disabling include for return type if it is a promise.
1120         (GenerateParametersCheck): Adding DeferredWrapper() as argument to the DOM method if JS method returns a promise.
1121         (GenerateImplementationFunctionCall): Added support for promise-returning API.
1122         (IsReturningPromise): Checking whether function is returning a promise.
1123         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1124         (webkit_dom_test_obj_test_promise_function):
1125         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1126         * bindings/scripts/test/JS/JSTestObj.cpp:
1127         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
1128         * bindings/scripts/test/ObjC/DOMTestObj.h:
1129         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1130         (-[DOMTestObj testPromiseFunction]):
1131         * bindings/scripts/test/TestObj.idl: Adding promise returning function.
1132
1133
1134 2015-06-12  Manuel Rego Casasnovas  <rego@igalia.com>
1135
1136         [CSS Grid Layout] Fix grid-template-areas parsing to avoid spaces
1137         https://bugs.webkit.org/show_bug.cgi?id=145860
1138
1139         Reviewed by Sergio Villar Senin.
1140
1141         The spec doesn't require to have spaces between unnamed and named areas
1142         in grid-template-areas syntax. But spaces are currently required in our
1143         code.
1144
1145         This was confirmed in the CSS WG mailing list:
1146         https://lists.w3.org/Archives/Public/www-style/2015May/0239.html
1147
1148         This patch updates grid-template-areas parsing to allow the possibility
1149         of removing spaces between unnamed and named areas.
1150
1151         Added new cases to fast/css-grid-layout/grid-template-areas-get-set.html.
1152
1153         * css/CSSParser.cpp:
1154         (WebCore::parseGridTemplateAreasColumnNames): New helper method to
1155         determine the column names split by white spaces or dots.
1156         (WebCore::CSSParser::parseGridTemplateAreasRow): Use the new helper
1157         method to get the column names.
1158         (WebCore::containsOnlyDots): Deleted. Not needed anymore as
1159         parseGridTemplateAreasColumnNames() is using a single dot for unnamed
1160         grid areas (despite of being defined with 1 or more dots).
1161
1162 2015-06-11  Mark Lam  <mark.lam@apple.com>
1163
1164         WebCore::reportException() needs to be able to accept a raw thrown value in addition to Exception objects.
1165         https://bugs.webkit.org/show_bug.cgi?id=145872
1166
1167         Reviewed by Michael Saboff.
1168
1169         API test added: WebKit1.ReportExceptionTest.
1170
1171         * bindings/js/JSDOMBinding.cpp:
1172         (WebCore::reportException):
1173         - Added a version of reportException() that takes a JSValue instead of an Exception
1174           object.  This version will ensure that we have an Exception object before calling
1175           into the original reportException() as follows:
1176
1177           1. If the JSValue is already an Exception object, we're good to go.
1178
1179           2. Else, if VM::lastException() is available, use that as the exception.
1180              This is how the old code use to behave (in terms of where it gets the exception
1181              stack trace).  The assumption is that reportException() will be called in
1182              a timely manner before the exception stack trace has been purged.
1183
1184           3. Else, create an Exception object with no stack trace.  This is the fall back
1185              in case the client did not call reportException() in a timely manner.
1186
1187         - Also clear the last exception after we've reported it.  This is how the old code
1188           before r185259 behave (in terms of the lifecycle of the last exception stack
1189           trace).  We're restoring that behavior here.
1190
1191         * bindings/js/JSDOMBinding.h:
1192
1193 2015-06-11  Zalan Bujtas  <zalan@apple.com>
1194
1195         Do not crash when the descendant frame tree is destroyed during layout.
1196         https://bugs.webkit.org/show_bug.cgi?id=144540
1197         rdar://problem/20793184
1198
1199         Reviewed by Andreas Kling.
1200
1201         Widget::setFrameRect(), through WebHTMLView layout, could trigger a style recalc, which in turn
1202         could initiate an onBeforeLoad callback.
1203         If javascript happens to destroy the current iframe in the onBeforeLoad callback, we lose the descendant
1204         render tree, including the child FrameView (the iframe element's view). However the RenderIFrame
1205         object stays protected until after the layout is done. (see protectRenderWidgetUntilLayoutIsDone())
1206
1207         Climbing back on the callstack, we need to make sure that
1208         1. the root widget of the descendant render tree (FrameView) stays valid as long as it is needed.
1209         2. RenderFrameBase::layoutWithFlattening() can handle the case when the associated widget (child FrameView) is set to nullptr.
1210         (see RenderWidget::willBeDestroyed() -> setWidget(nullptr))
1211
1212         (and later, when layout is finished this (RenderIFrame) object gets destroyed too.)
1213
1214         Covered by fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html.
1215
1216         * page/FrameView.cpp:
1217         (WebCore::FrameView::setFrameRect):
1218         (WebCore::FrameView::updateEmbeddedObject):
1219         (WebCore::FrameView::updateWidgetPositions):
1220         * platform/ScrollView.cpp:
1221         (WebCore::ScrollView::setFrameRect):
1222         * platform/mac/WidgetMac.mm:
1223         (WebCore::Widget::setFrameRect):
1224         * rendering/RenderFrameBase.cpp:
1225         (WebCore::RenderFrameBase::layoutWithFlattening):
1226         (WebCore::RenderFrameBase::childRenderView):
1227         (WebCore::RenderFrameBase::peformLayoutWithFlattening):
1228         * rendering/RenderFrameBase.h:
1229         * rendering/RenderWidget.cpp:
1230         (WebCore::RenderWidget::updateWidgetPosition):
1231         * rendering/RenderWidget.h:
1232
1233 2015-06-11  Commit Queue  <commit-queue@webkit.org>
1234
1235         Unreviewed, rolling out r185470.
1236         https://bugs.webkit.org/show_bug.cgi?id=145902
1237
1238         Caused ASan violations (Requested by ap on #webkit).
1239
1240         Reverted changeset:
1241
1242         "Add an appearance keyword for wireless playback / airplay
1243         icon"
1244         https://bugs.webkit.org/show_bug.cgi?id=145892
1245         http://trac.webkit.org/changeset/185470
1246
1247 2015-06-11  Brady Eidson  <beidson@apple.com>
1248
1249         IndexedDB onupgradeneeded event has incorrect value for oldVersion.
1250         <rdar://problem/18309792> and https://bugs.webkit.org/show_bug.cgi?id=136888
1251
1252         Reviewed by Sam Weinig.
1253
1254         Test: storage/indexeddb/version-change-event-basic.html
1255
1256         "NoIntVersion" is an internal bookkeeping concept that we never should've been passing to Javascript.
1257         
1258         This cleans up things by:
1259         - Adjusting an old version of "NoIntVersion" to "0" before making the version change callback.
1260         - Removing the VersionNullness parameter from almost everywhere.
1261         - Removing the nullability of the newVersion parameter from the IDL.
1262
1263         * Modules/indexeddb/IDBDatabase.cpp:
1264         (WebCore::IDBDatabase::onVersionChange):
1265         * Modules/indexeddb/IDBDatabase.h:
1266         
1267         * Modules/indexeddb/IDBDatabaseBackend.cpp:
1268         (WebCore::IDBDatabaseBackend::runIntVersionChangeTransaction):
1269         (WebCore::IDBDatabaseBackend::deleteDatabase):
1270         
1271         * Modules/indexeddb/IDBDatabaseCallbacks.h:
1272         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
1273         (WebCore::IDBDatabaseCallbacksImpl::onVersionChange):
1274         * Modules/indexeddb/IDBDatabaseCallbacksImpl.h:
1275         
1276         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1277         (WebCore::IDBOpenDBRequest::onBlocked):
1278         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
1279         
1280         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
1281         (WebCore::IDBDatabaseBackend::VersionChangeOperation::perform):
1282         
1283         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
1284         (WebCore::IDBVersionChangeEvent::IDBVersionChangeEvent):
1285         * Modules/indexeddb/IDBVersionChangeEvent.h:
1286         (WebCore::IDBVersionChangeEvent::create):
1287         (WebCore::IDBVersionChangeEvent::newVersion):
1288         * Modules/indexeddb/IDBVersionChangeEvent.idl:
1289
1290 2015-06-11  Matt Rajca  <mrajca@apple.com>
1291
1292         Media Session: Add plumbing for media control event delivery.
1293         https://bugs.webkit.org/show_bug.cgi?id=145859
1294
1295         Reviewed by Anders Carlsson.
1296
1297         * Modules/mediasession/MediaEventTypes.h: Added.
1298         * WebCore.xcodeproj/project.pbxproj:
1299         * page/Page.cpp:
1300         (WebCore::Page::handleMediaEvent): Toggle media playback upon receiving the PlayPause event as described in the spec.
1301         * page/Page.h:
1302
1303 2015-06-11  Jon Lee  <jonlee@apple.com>
1304
1305         Update media controls JS and CSS to use picture-in-picture
1306         https://bugs.webkit.org/show_bug.cgi?id=145827
1307         <rdar://problem/21311576>
1308
1309         Reviewed by Dean Jackson.
1310
1311         * English.lproj/mediaControlsLocalizedStrings.js: Update localized strings.
1312         Add a string for the placeholder text, and for the aria-label of the
1313         placard.
1314
1315         * Modules/mediacontrols/MediaControlsHost.idl: Remove uncalled functions.
1316         * Modules/mediacontrols/MediaControlsHost.h: Also remove optimizedFullscreenSupported(),
1317         which was never used.
1318         * Modules/mediacontrols/MediaControlsHost.cpp: Remove uncalled functions and media part IDs.
1319         (WebCore::MediaControlsHost::enterFullscreenOptimized): Deleted.
1320         (WebCore::MediaControlsHost::mediaUIImageData): Deleted.
1321
1322         * Modules/mediacontrols/mediaControlsApple.css:
1323         (audio::-webkit-media-controls-picture-in-picture-button): Update pseudo-element name.
1324         (audio::-webkit-media-controls-optimized-fullscreen-button): Deleted.
1325         * Modules/mediacontrols/mediaControlsApple.js: Update global variable name, and classes.
1326         (Controller.prototype.createControls): Update button name. Add aria-label to the placeholder.
1327         (Controller.prototype.updateFullscreenButtons):
1328         (Controller.prototype.updateLayoutForDisplayedWidth):
1329         (Controller.prototype.handlePictureInPictureButtonClicked): Update handler names.
1330         (Controller.prototype.handleOptimizedFullscreenButtonClicked): Deleted.
1331
1332         * Modules/mediacontrols/mediaControlsiOS.css: Rename pseudo-element.
1333         (audio::-webkit-media-controls-picture-in-picture-button): Add mask images.
1334         (audio::-webkit-media-controls-picture-in-picture-button:active):
1335         (video::-webkit-media-controls-picture-in-picture-button):
1336         (video::-webkit-media-controls-picture-in-picture-button.return-from-picture-in-picture):
1337         (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
1338         (audio::-webkit-media-controls-wireless-playback-text-top.picture-in-picture):
1339         (audio::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture):
1340         (audio::-webkit-media-controls-optimized-fullscreen-button): Deleted.
1341         (audio::-webkit-media-controls-optimized-fullscreen-button:active): Deleted.
1342         (video::-webkit-media-controls-optimized-fullscreen-button): Deleted.
1343         (audio::-webkit-media-controls-wireless-playback-status.optimized): Deleted. The placard
1344         pseudo-element should be updated from wireless-playback-status to just playback-status
1345         since it serves both for pip and AirPlay.
1346         (audio::-webkit-media-controls-wireless-playback-text-top.optimized): Deleted.
1347         (audio::-webkit-media-controls-wireless-playback-text-bottom.optimized): Deleted.
1348         * Modules/mediacontrols/mediaControlsiOS.js:
1349         (ControllerIOS.prototype.createControls): Update button names.
1350         (ControllerIOS.prototype.configureInlineControls):
1351         (ControllerIOS.prototype.handlePictureInPictureButtonClicked): Update handler name.
1352         (ControllerIOS.prototype.handlePictureInPictureTouchStart):
1353         (ControllerIOS.prototype.handlePictureInPictureTouchEnd):
1354         (ControllerIOS.prototype.handlePictureInPictureTouchCancel):
1355         (ControllerIOS.prototype.handlePresentationModeChange): Remove changes to the inline bg
1356         image style, and rely on the CSS to fill those in. Use localized strings for the placard.
1357         Move the aria-label to createControls().
1358         (ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked): Deleted.
1359         (ControllerIOS.prototype.handleOptimizedFullscreenTouchStart): Deleted.
1360         (ControllerIOS.prototype.handleOptimizedFullscreenTouchEnd): Deleted.
1361         (ControllerIOS.prototype.handleOptimizedFullscreenTouchCancel): Deleted.
1362
1363         * html/HTMLMediaElement.cpp: Remove enterFullscreenOptimized since it is never called.
1364         (WebCore::HTMLMediaElement::enterFullscreenOptimized): Deleted.
1365         * html/HTMLMediaElement.h:
1366         * platform/ios/WebCoreSystemInterfaceIOS.h: Remove wkGetMediaUIImageData.
1367         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1368         * rendering/RenderThemeIOS.mm:
1369         (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Remove calls to wkGetMediaUIImageData.
1370
1371 2015-06-11  Dean Jackson  <dino@apple.com>
1372
1373         Add an appearance keyword for wireless playback / airplay icon
1374         https://bugs.webkit.org/show_bug.cgi?id=145892
1375         <rdar://problem/21344872>
1376
1377         Reviewed by Simon Fraser.
1378
1379         Add a new "-webkit-appearance" value named "-apple-airplay"
1380         which will be used to render an icon. This change simply
1381         adds support for the value, and puts in hooks for drawing.
1382
1383         At the moment this is only going to be used by Airplay, so
1384         the public-facing name is "-apple-airplay". However, the
1385         implementation in Theme has a more generic name, in case
1386         we hook it up for other ports later.
1387
1388         Test: fast/css/appearance-airplay.html
1389
1390         * css/CSSParser.cpp:
1391         (WebCore::cssValueKeywordID): This new keyword should not get
1392         translated into having a -webkit prefix.
1393         * css/CSSPrimitiveValueMappings.h:
1394         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): New mapping from
1395         the Theme to the CSS value.
1396         * css/CSSValueKeywords.in: Add "-apple-airplay".
1397         * platform/ThemeTypes.h: New ControlPart.
1398         * rendering/RenderTheme.cpp: Stub implementation of the rendering and
1399         style update for the new appearance.
1400         (WebCore::RenderTheme::adjustStyle):
1401         (WebCore::RenderTheme::paint):
1402         (WebCore::RenderTheme::adjustWirelessPlaybackIconStyle):
1403         (WebCore::RenderTheme::paintWirelessPlaybackIcon):
1404         * rendering/RenderTheme.h:
1405         * rendering/RenderThemeMac.h:
1406         * rendering/RenderThemeMac.mm:
1407         (WebCore::RenderThemeMac::adjustWirelessPlaybackIconStyle):
1408         (WebCore::RenderThemeMac::paintWirelessPlaybackIcon):
1409
1410 2015-06-11  Commit Queue  <commit-queue@webkit.org>
1411
1412         Unreviewed, rolling out r185464.
1413         https://bugs.webkit.org/show_bug.cgi?id=145894
1414
1415         "This patch is breaking binding tests" (Requested by youenn on
1416         #webkit).
1417
1418         Reverted changeset:
1419
1420         "Bindings generator should generate code for Promise-based
1421         APIs"
1422         https://bugs.webkit.org/show_bug.cgi?id=145833
1423         http://trac.webkit.org/changeset/185464
1424
1425 2015-06-11  Commit Queue  <commit-queue@webkit.org>
1426
1427         Unreviewed, rolling out r185465.
1428         https://bugs.webkit.org/show_bug.cgi?id=145893
1429
1430         "This patch is breaking 32bit mac build" (Requested by youenn
1431         on #webkit).
1432
1433         Reverted changeset:
1434
1435         "[Streams API] ReadableJSStream should handle promises
1436         returned by JS source start callback"
1437         https://bugs.webkit.org/show_bug.cgi?id=145792
1438         http://trac.webkit.org/changeset/185465
1439
1440 2015-06-11  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
1441
1442         [Streams API] ReadableJSStream should handle promises returned by JS source start callback
1443         https://bugs.webkit.org/show_bug.cgi?id=145792
1444
1445         Reviewed by Darin Adler.
1446
1447         Covered by rebased tests.
1448
1449         When calling start callback, the returned value is checked.
1450         If it is not a promise, we do as if it is a resolved promise.
1451         If it is a promise, we call its then() method with two resolve/reject JS functions.
1452
1453         * Modules/streams/ReadableStream.cpp:
1454         * bindings/js/ReadableJSStream.cpp:
1455         (WebCore::ReadableJSStream::invoke): Returns a JSPromise* if any is returned by the JS source callback.
1456         (WebCore::thenPromise): Utility method to call the promise.
1457         (WebCore::createStartResultFulfilledFunction): The promise resolve callback.
1458         (WebCore::ReadableJSStream::doStart): Calls thenPromise if a JSPromise* is returned by invoke.
1459         (WebCore::ReadableJSStream::ReadableJSStream):
1460         * bindings/js/ReadableJSStream.h:
1461
1462 2015-06-11  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1463
1464         Bindings generator should generate code for Promise-based APIs
1465         https://bugs.webkit.org/show_bug.cgi?id=145833
1466
1467         Reviewed by Darin Adler.
1468
1469         Covered by existing tests.
1470
1471         * Modules/webaudio/AudioContext.idl: Removing custom binding for resume, suspend and close.
1472         * bindings/js/JSAudioContextCustom.cpp: Ditto.
1473         * bindings/scripts/CodeGeneratorJS.pm:
1474         (GenerateHeader): Refactoring to use IsReturningPromise.
1475         (GenerateImplementation): Disabling include for return type if it is a promise.
1476         (GenerateParametersCheck): Adding DeferredWrapper() as argument to the DOM method if JS method returns a promise.
1477         (GenerateImplementationFunctionCall): Added support for promise-returning API.
1478         (IsReturningPromise): Checking whether function is returning a promise.
1479         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1480         (webkit_dom_test_obj_test_promise_function):
1481         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1482         * bindings/scripts/test/JS/JSTestObj.cpp:
1483         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
1484         * bindings/scripts/test/ObjC/DOMTestObj.h:
1485         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1486         (-[DOMTestObj testPromiseFunction]):
1487         * bindings/scripts/test/TestObj.idl: Adding promise returning function.
1488
1489
1490 2015-06-08  Simon Fraser  <simon.fraser@apple.com>
1491
1492         Missing content in UIWebView snapshots sometimes
1493         https://bugs.webkit.org/show_bug.cgi?id=145779
1494         rdar://problem/20744708
1495
1496         Reviewed by Darin Adler.
1497         
1498         When expanding collapsed parts of quoted text on iOS, sometimes the "concertina"
1499         images would be blank. This happened because we'd fail to create tiles for regions
1500         outside the LegacyTileCache's visibleRect.
1501         
1502         Fix by giving LegacyTileCache an optional override visibleRect, which is set
1503         and cleared during -renderInContext: using the context clip rect.
1504
1505         * platform/ios/LegacyTileCache.h:
1506         * platform/ios/LegacyTileCache.mm:
1507         (WebCore::LegacyTileCache::visibleRectInLayer):
1508         (WebCore::LegacyTileCache::setOverrideVisibleRect):
1509         * platform/ios/LegacyTileLayer.mm:
1510         (-[LegacyTileHostLayer renderInContext:]):
1511
1512 2015-06-11  Daniel Bates  <dabates@apple.com>
1513
1514         Simplify event handling logic for search cancel button
1515         https://bugs.webkit.org/show_bug.cgi?id=145780
1516
1517         Reviewed by Darin Adler.
1518
1519         Following the patch for <https://bugs.webkit.org/show_bug.cgi?id=145774> we can take advantage
1520         of the DOM click event to simplify the event handling logic for the search cancel button.
1521         It is sufficient to listen for mousedown and click events instead of listening for mousedown
1522         and mouseup events, capturing all events during drag, and using the hover state of the button
1523         on mouse release together with a instance variable set on mouse press to determine whether
1524         the cancel button was clicked.
1525
1526         As a side effect of removing the requirement that the search cancel button be hovered (a
1527         workaround to ensure that the mouse was pressed and released on the button in absence of
1528         listening for an explicit DOM click event) we can remove the accessibility-specific class,
1529         AccessibilitySearchFieldCancelButton, that was primarily used to fake the hover state of
1530         the button so that the accessibility machinery could simulate a click on it. Instead we
1531         can add use the default accessibility machinery for clicking on an element.
1532
1533         No new tests since no functionality was changed.
1534
1535         * CMakeLists.txt: Remove reference to file AccessibilitySearchFieldButtons.cpp.
1536         * WebCore.vcxproj/WebCore.vcxproj: Remove reference to files AccessibilitySearchFieldButtons.{cpp, h}.
1537         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
1538         * WebCore.xcodeproj/project.pbxproj: Ditto.
1539         * accessibility/AXObjectCache.cpp:
1540         (WebCore::createFromRenderer): Remove special-purpose logic that instantiated
1541         AccessibilitySearchFieldCancelButton for the search cancel button. Instead we can make
1542         use of the existing accessibility machinery to handle this button.
1543         * accessibility/AccessibilityAllInOne.cpp: Remove #include of AccessibilitySearchFieldButtons.cpp
1544         since the file is no longer needed.
1545         * accessibility/AccessibilitySearchFieldButtons.cpp: Removed.
1546         * accessibility/AccessibilitySearchFieldButtons.h: Removed.
1547         * dom/Element.h:
1548         (WebCore::Element::isSearchFieldCancelButtonElement): Deleted.
1549         * html/shadow/TextControlInnerElements.cpp:
1550         (WebCore::SearchFieldCancelButtonElement::SearchFieldCancelButtonElement): Set the ARIA role
1551         and label attributes so that the accessibility system identifies the search cancel button as
1552         a button and shows a description for the button, respectively.
1553         (WebCore::SearchFieldCancelButtonElement::defaultEventHandler): Simplify the event handling logic
1554         such that we clear the field when we receive a DOM click event (i.e. the mouse was pressed
1555         and released on the button). Remove unused variable, oldValue. Substitute emptyString() for the
1556         empty string literal in the call to HTMLInputElement::setValueForUser() to avoid an implicit
1557         conversion to String. Also remove out-of-date comment that repeated what the code does.
1558         (WebCore::SearchFieldCancelButtonElement::willDetachRenderers): Deleted. We no longer need to use
1559         custom style resolve callbacks to reset the state of the EventHandler since we no longer need to
1560         have the EventHandler dispatch all mouse events to us on mouse press.
1561         * html/shadow/TextControlInnerElements.h:
1562
1563 2015-06-11  Commit Queue  <commit-queue@webkit.org>
1564
1565         Unreviewed, rolling out r185453.
1566         https://bugs.webkit.org/show_bug.cgi?id=145881
1567
1568         it broke the 32-bit build (Requested by clopez on #webkit).
1569
1570         Reverted changeset:
1571
1572         "[GTK] [Wayland] Should be possible to build with support for
1573         both X11 and Wayland."
1574         https://bugs.webkit.org/show_bug.cgi?id=145701
1575         http://trac.webkit.org/changeset/185453
1576
1577 2015-06-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>
1578
1579         [GTK] [Wayland] Should be possible to build with support for both X11 and Wayland.
1580         https://bugs.webkit.org/show_bug.cgi?id=145701
1581
1582         Reviewed by Žan Doberšek.
1583
1584         No new tests, no behavior changes.
1585
1586         When building both targets, we have to include the wayland-egl
1587         headers in order to build the Wayland target. This causes that
1588         EGLNativePixmapType and EGLNativeWindowType get defined as
1589         different types than when building only the X11 target.
1590
1591         By type casting them to the ones that are expected, we are able
1592         to build both targets at the same time.
1593
1594         I have done tests (building each target alone as also both targets
1595         at the same time), and everything seems to works as expected.
1596
1597         Once built for both targets, if you try to launch the MiniBrowser
1598         from inside a Wayland compositor (Weston on top of X for example),
1599         it will trigger the X11 target if the DISPLAY environment variable
1600         is set and the environment variable GDK_BACKEND is not set to wayland,
1601         otherwise it will trigger the Wayland target.
1602
1603         * platform/graphics/GLContext.cpp:
1604         (WebCore::GLContext::createContextForWindow): Add type cast.
1605         * platform/graphics/egl/GLContextEGL.cpp: Add missing include when
1606         building both targets that is required for defining DefaultRootWindow().
1607         (WebCore::GLContextEGL::createPixmapContext): Add type cast.
1608
1609 2015-06-11  Hunseop Jeong  <hs85.jeong@samsung.com>
1610
1611         [EFL] Fix the debug build after r185417.
1612         https://bugs.webkit.org/show_bug.cgi?id=145876 
1613
1614         Reviewed by Gyuyoung Kim.
1615
1616         * platform/graphics/efl/ImageBufferEfl.cpp: added the missing "MIMETypeRegistry.h".
1617
1618 2015-06-11  Myles C. Maxfield  <mmaxfield@apple.com>
1619
1620         [iOS] Tahoma isn't installed on iOS, so there is no need to blacklist it
1621         https://bugs.webkit.org/show_bug.cgi?id=145865
1622
1623         Reviewed by Dan Bernstein.
1624
1625         No new tests because I can't copy Tahoma into our open source repository.
1626
1627         * platform/graphics/cocoa/FontCocoa.mm:
1628         (WebCore::fontFamilyShouldNotBeUsedForArabic):
1629
1630 2015-06-10  Commit Queue  <commit-queue@webkit.org>
1631
1632         Unreviewed, rolling out r185442.
1633         https://bugs.webkit.org/show_bug.cgi?id=145871
1634
1635         seems to have broken WTF.StringOperators test (Requested by
1636         alexchristensen on #webkit).
1637
1638         Reverted changeset:
1639
1640         "[Content Extensions] Limit number of rules."
1641         https://bugs.webkit.org/show_bug.cgi?id=145663
1642         http://trac.webkit.org/changeset/185442
1643
1644 2015-06-10  Jon Lee  <jonlee@apple.com>
1645
1646         Update presentation mode JS API to using 'picture-in-picture'
1647         https://bugs.webkit.org/show_bug.cgi?id=145826
1648         rdar://problem/2131153
1649
1650         Reviewed by Anders Carlsson.
1651
1652         Update presentation modes to use 'picture-in-picture' in lieu of 'optimized'.
1653
1654         * html/HTMLVideoElement.idl: Update to "picture-in-picture".
1655         * html/HTMLVideoElement.cpp:
1656         (WebCore::presentationModePictureInPicture): Rename static function returning string.
1657         (WebCore::presentationModeOptimized): Deleted.
1658         (WebCore::HTMLVideoElement::webkitSupportsPresentationMode): Use the new static function name.
1659         (WebCore::HTMLVideoElement::webkitSetPresentationMode): Ditto.
1660         (WebCore::HTMLVideoElement::webkitPresentationMode): Ditto.
1661
1662         * Modules/mediacontrols/mediaControlsiOS.js: Update to 'picture-in-picture'.
1663         (ControllerIOS.prototype.configureInlineControls): 
1664         (ControllerIOS.prototype.isFullScreen):
1665         (ControllerIOS.prototype.handleOptimizedFullscreenButtonClicked):
1666         (ControllerIOS.prototype.handlePresentationModeChange):
1667         (ControllerIOS.prototype.controlsAlwaysVisible):
1668
1669 2015-06-10  Boris Smus  <boris@smus.com>
1670
1671         [Mobile Safari, WKWebView] increase DeviceOrientationEvent events emission frequency
1672         https://bugs.webkit.org/show_bug.cgi?id=145814
1673
1674         Reviewed by Benjamin Poulain.
1675
1676         Increased the sampling rate of DeviceOrientationEvent from 20 Hz to 60
1677         Hz to make good head tracking possible.
1678
1679         * platform/ios/WebCoreMotionManager.h:
1680
1681 2015-06-10  Alex Christensen  <achristensen@webkit.org>
1682
1683         [Content Extensions] Limit number of rules.
1684         https://bugs.webkit.org/show_bug.cgi?id=145663
1685         rdar://problem/21242407
1686
1687         Reviewed by Benjamin Poulain.
1688
1689         Added an API test to make sure that parsing fails when there are too many rules.
1690
1691         * contentextensions/ContentExtensionError.cpp:
1692         (WebCore::ContentExtensions::contentExtensionErrorCategory):
1693         * contentextensions/ContentExtensionError.h:
1694         * contentextensions/ContentExtensionParser.cpp:
1695         (WebCore::ContentExtensions::loadEncodedRules):
1696         Fail to parse a content extension with more than 50000 rules.
1697
1698 2015-06-10  Said Abou-Hallawa  <sabouhallawa@apple.com>
1699
1700         REGRESSION (r184895): Vertical border elements ([-webkit]-border-image set to 'repeat') that used to render perfectly are now rendering incorrectly.
1701         https://bugs.webkit.org/show_bug.cgi?id=145801
1702
1703         Reviewed by Simon Fraser.
1704
1705         When using the tiling to draw the sides of an image-border, the image slice
1706         is repeated only in one direction. For top and bottom sides, the slice is
1707         repeated horizontally and for left and right sides, it's repeated vertically.
1708         The tile might be scaled in the other direction of the tiling if the border
1709         extent and the slice extent are different in this direction.
1710         
1711         The bug happens because we were scaling the tile in the tiling direction.
1712
1713         Test: fast/borders/border-image-repeat-stretch.html
1714
1715         * rendering/style/NinePieceImage.cpp:
1716         (WebCore::NinePieceImage::scaleSlicesIfNeeded): Fix the type and the name
1717         of deviceScaleFactor.
1718         
1719         (WebCore::NinePieceImage::computeIntrinsicSideTileScale): Fix the scaling
1720         direction of the border image side tiling.
1721         
1722         * rendering/style/NinePieceImage.h:
1723
1724 2015-06-10  Chris Dumez  <cdumez@apple.com>
1725
1726         ASSERT_WITH_SECURITY_IMPLICATION in WebCore::DocumentOrderedMap::getElementById
1727         https://bugs.webkit.org/show_bug.cgi?id=145857
1728         <rdar://problem/16798440>
1729
1730         Reviewed by Darin Adler.
1731
1732         Make sure Node::insertedInto() gets called on the inserted node and its
1733         descendants after its insertion into the tree but *before*
1734         ContainerNode::childrenChanged() is called on the parent node. This is
1735         needed so that the descendants know they've been inserted into the tree
1736         (and their InDocumentFlag flag gets set) before the parent node does
1737         anything with them in childrenChanged().
1738
1739         In the case of <rdar://problem/16798440>, executing HTMLScriptElement's
1740         childrenChanged() after appending a child to a script element was causing
1741         the script to be executed. The script would call getElementBy() which
1742         would traverse the DOM tree and find a matching Element in the newly
1743         inserted subtree. However, the matching Element's InDocumentFlag flag was
1744         not set yet because the element's insertedInto() method has not been called
1745         yet at this point. This would cause us to hit an assertion as
1746         DocumentOrderedMap::getElementById() is only supposed to return elements
1747         that are in a Document.
1748
1749         This patch is based on Blink r178976 by <esprehn@chromium.org>:
1750         https://src.chromium.org/viewvc/blink?view=rev&revision=178976
1751
1752         Tests: fast/dom/script-getElementById-during-insertion.html
1753                fast/dom/script-remove-child-id-map.html
1754
1755         * dom/ContainerNode.cpp:
1756         (WebCore::ContainerNode::notifyChildInserted):
1757         (WebCore::ContainerNode::notifyChildRemoved):
1758         (WebCore::ContainerNode::removeChildren):
1759         (WebCore::ContainerNode::parserInsertBefore): Deleted.
1760         (WebCore::ContainerNode::removeChild): Deleted.
1761         (WebCore::ContainerNode::parserRemoveChild): Deleted.
1762         (WebCore::ContainerNode::parserAppendChild): Deleted.
1763         (WebCore::ContainerNode::childrenChanged): Deleted.
1764         (WebCore::ContainerNode::setAttributeEventListener): Deleted.
1765         (WebCore::ContainerNode::querySelector): Deleted.
1766         * dom/ContainerNodeAlgorithms.cpp:
1767         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoDocument):
1768         (WebCore::ChildNodeInsertionNotifier::notifyDescendantInsertedIntoTree):
1769         * dom/ContainerNodeAlgorithms.h:
1770         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
1771         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
1772         (WebCore::ChildNodeInsertionNotifier::notify):
1773         (WebCore::ChildNodeRemovalNotifier::notifyNodeRemovedFromDocument): Deleted.
1774         * dom/Element.cpp:
1775         (WebCore::Element::addShadowRoot):
1776
1777 2015-06-10  Alex Christensen  <achristensen@webkit.org>
1778
1779         [Web Timing] Fix flaky test.
1780         https://bugs.webkit.org/show_bug.cgi?id=145846
1781
1782         Reviewed by Alexey Proskuryakov.
1783
1784         The timing data is gathered in ResourceHandle::getConnectionTimingData as 
1785         millisecond deltas from the fetch start time, not the navigation start time.
1786         The difference between navigation and fetch start time is usually so small that 
1787         it only caused one flaky test, but this should fix that flakiness. This patch 
1788         corrects how the millisecond deltas are used.
1789
1790         * page/PerformanceTiming.cpp:
1791         (WebCore::PerformanceTiming::domainLookupStart):
1792         (WebCore::PerformanceTiming::domainLookupEnd):
1793         (WebCore::PerformanceTiming::connectStart):
1794         (WebCore::PerformanceTiming::connectEnd):
1795         (WebCore::PerformanceTiming::secureConnectionStart):
1796         (WebCore::PerformanceTiming::requestStart):
1797         (WebCore::PerformanceTiming::responseStart):
1798         (WebCore::PerformanceTiming::responseEnd):
1799         (WebCore::PerformanceTiming::documentLoadTiming):
1800         (WebCore::PerformanceTiming::resourceLoadTimeRelativeToFetchStart):
1801         (WebCore::PerformanceTiming::monotonicTimeToIntegerMilliseconds):
1802         (WebCore::PerformanceTiming::resourceLoadTimeRelativeToAbsolute): Deleted.
1803         * page/PerformanceTiming.h:
1804
1805 2015-06-10  Beth Dakin  <bdakin@apple.com>
1806
1807         Overriding the overlay scrollbar style on WKView doesn't take effect immediately
1808         https://bugs.webkit.org/show_bug.cgi?id=145855
1809         -and corresponding-
1810         rdar://problem/20948706
1811
1812         Reviewed by Simon Fraser.
1813
1814         Since we opt into layer-per-part scrollbars in order to move the knob on the 
1815         secondary thread, AppKit is creating its own layers for the knob and track. To 
1816         invalidate them, we need to call into the ScrollbarPainter’s setNeedsDisplay.
1817
1818         New virtual function on ScrollAnimator to call into ScrollbarPainter’s 
1819         setNeedsDispay.
1820         * platform/ScrollAnimator.h:
1821
1822         Call the new function when setting the overlay style.
1823         * platform/ScrollableArea.cpp:
1824         (WebCore::ScrollableArea::setScrollbarOverlayStyle):
1825
1826         Add setNeedsDisplay to the list of ScrollbarPainter methods.
1827         * platform/mac/NSScrollerImpDetails.h:
1828
1829         Implement invalidateScrollbarPartLayers.
1830         * platform/mac/ScrollAnimatorMac.h:
1831         * platform/mac/ScrollAnimatorMac.mm:
1832         (WebCore::ScrollAnimatorMac::invalidateScrollbarPartLayers):
1833
1834 2015-06-10  Matt Rajca  <mrajca@apple.com>
1835
1836         MediaRemoteControls should be marked JSGenerateToJSObject.
1837         https://bugs.webkit.org/show_bug.cgi?id=145849
1838
1839         Reviewed by Eric Carlson.
1840
1841         Since MediaRemoteControls has a parent interface, we need to add the JSGenerateToJSObject attribute so the
1842         toJS(...) function gets generated. This is required for event handling to work.
1843
1844         * Modules/mediasession/MediaRemoteControls.idl:
1845
1846 2015-06-10  Dean Jackson  <dino@apple.com>
1847
1848         User can not scroll on page when dragging inside video
1849         https://bugs.webkit.org/show_bug.cgi?id=145848
1850         <rdar://problem/20997158>
1851
1852         Reviewed by Brent Fulgham.
1853
1854         Revert the change made in http://trac.webkit.org/changeset/183797
1855         which breaks panning on pages if the touch starts inside the video.
1856
1857         * Modules/mediacontrols/mediaControlsiOS.js:
1858         (ControllerIOS.prototype.handleWrapperTouchStart): Do not return true, which stops
1859         the handleEvent call in the superclass from preventing the default action.
1860
1861 2015-06-10  Matt Rajca  <mrajca@apple.com>
1862
1863         Explicitly keep track of active HTMLMediaElements in MediaSessions.
1864         https://bugs.webkit.org/show_bug.cgi?id=145829
1865
1866         Reviewed by Eric Carlson.
1867
1868         * Modules/mediasession/MediaSession.cpp: Add support for keeping track of active media elements.
1869         (WebCore::MediaSession::addActiveMediaElement):
1870         * Modules/mediasession/MediaSession.h:
1871         * html/HTMLMediaElement.cpp:
1872         (WebCore::HTMLMediaElement::playInternal): If the paused attribute is true and the readyState attribute has the
1873           value HAVE_FUTURE_DATA or HAVE_ENOUGH_DATA, the media element becomes an active participating element of the
1874           media session.
1875
1876 2015-06-10  Chris Dumez  <cdumez@apple.com>
1877
1878         Drop unused argument for Node::didNotifySubtreeInsertions()
1879         https://bugs.webkit.org/show_bug.cgi?id=145845
1880
1881         Reviewed by Andreas Kling.
1882
1883         * dom/ContainerNodeAlgorithms.h:
1884         (WebCore::ChildNodeInsertionNotifier::notify):
1885         * dom/Node.h:
1886         (WebCore::Node::didNotifySubtreeInsertions):
1887         * html/HTMLFrameElementBase.cpp:
1888         (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions):
1889         * html/HTMLFrameElementBase.h:
1890         * svg/SVGFEImageElement.cpp:
1891         (WebCore::SVGFEImageElement::didNotifySubtreeInsertions):
1892         * svg/SVGFEImageElement.h:
1893         * svg/SVGMPathElement.cpp:
1894         (WebCore::SVGMPathElement::didNotifySubtreeInsertions):
1895         * svg/SVGMPathElement.h:
1896         * svg/SVGTRefElement.cpp:
1897         (WebCore::SVGTRefElement::didNotifySubtreeInsertions):
1898         * svg/SVGTRefElement.h:
1899         * svg/SVGTextPathElement.cpp:
1900         (WebCore::SVGTextPathElement::didNotifySubtreeInsertions):
1901         * svg/SVGTextPathElement.h:
1902         * svg/animation/SVGSMILElement.cpp:
1903         (WebCore::SVGSMILElement::didNotifySubtreeInsertions):
1904         * svg/animation/SVGSMILElement.h:
1905
1906 2015-06-10  KwangHyuk Kim  <hyuki.kim@samsung.com>
1907
1908         [EFL] Jpeg image export implementation for Canvas.
1909         https://bugs.webkit.org/show_bug.cgi?id=145457
1910
1911         Reviewed by Gyuyoung Kim.
1912
1913         Add implementation of jpeg image export on Webkit EFL by using JPEGImageEncoder.
1914
1915         No new tests, fast/canvas/toDataURL-supportedTypes.html can be reused.
1916
1917         * PlatformEfl.cmake:
1918         * platform/MIMETypeRegistry.cpp:
1919         (WebCore::initializeSupportedImageMIMETypesForEncoding):
1920         * platform/graphics/cairo/ImageBufferCairo.cpp:
1921         * platform/graphics/efl/ImageBufferEfl.cpp: Added.
1922         (WebCore::writeFunction):
1923         (WebCore::encodeImage):
1924         (WebCore::ImageBuffer::toDataURL):
1925         * platform/image-encoders/JPEGImageEncoder.cpp:
1926         (WebCore::compressRGBABigEndianToJPEG):
1927
1928 2015-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1929
1930         [GTK] Move KeyBindingTranslator from platform to WebKit2 layer
1931         https://bugs.webkit.org/show_bug.cgi?id=145840
1932
1933         Reviewed by Martin Robinson.
1934
1935         It's currently used only by WebKit2 in the UI process and it's
1936         another file built twice because of the GTK2 plugin process.
1937
1938         * PlatformGTK.cmake:
1939
1940 2015-06-10  Carlos Garcia Campos  <cgarcia@igalia.com>
1941
1942         [GTK] Get rid of GetEditorCommandsForKeyEvent sync message
1943         https://bugs.webkit.org/show_bug.cgi?id=145598
1944
1945         Reviewed by Žan Doberšek.
1946
1947         * platform/PlatformKeyboardEvent.h:
1948         (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
1949         (WebCore::PlatformKeyboardEvent::commands):
1950         * platform/gtk/KeyBindingTranslator.cpp: Use a single list of
1951         custom key bindings. We don't need to distinguish between key down and
1952         key press commands, since the web editor client already does that
1953         when executing the commands.
1954         (WebCore::KeyBindingTranslator::commandsForKeyEvent): This is
1955         getEditorCommandsForKeyEvent() renamed as commandsForKeyEvent(),
1956         since it now returns the list of commands to simplify the
1957         code. Also simplify the custom key bindings handling, by using the
1958         global list instead of moving it to a HashMap.
1959         (WebCore::KeyBindingTranslator::getEditorCommandsForKeyEvent): Deleted.
1960         * platform/gtk/KeyBindingTranslator.h:
1961
1962 2015-06-10  Per Arne Vollan  <peavo@outlook.com>
1963
1964         [WinCairo] Crash on exit when terminating egl
1965         https://bugs.webkit.org/show_bug.cgi?id=145832
1966
1967         Reviewed by Carlos Garcia Campos.
1968
1969         Avoid terminating egl on exit for WinCairo.
1970
1971         * platform/graphics/PlatformDisplay.cpp:
1972         (WebCore::PlatformDisplay::~PlatformDisplay):
1973
1974 2015-06-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1975
1976         Refactor AudioContext implementation to enable automatic binding generation of promise-based methods
1977         https://bugs.webkit.org/show_bug.cgi?id=145223
1978
1979         Reviewed by Darin Adler.
1980
1981         Introducing DOMPromise as a typed wrapper above DeferredWrapper.
1982         This DOMPromise allows constraining Promise resolution/rejection to a single resolution type and rejection type. 
1983         This might be useful for typed callback usage of promise based APIs, like getUserMedia() or ReadableStreamReader.read().
1984
1985         Applying DOMPromise to AudioContext close, suspend and resume.
1986         Changed binding code to represent what could be automatically generated by binding generator.
1987         Fixing unneeded copies of std::function callbacks.
1988
1989         Disabling DOMPromise copy constructors to lower chances that resolution/rejection is done twice on the same object.
1990
1991         Covered by existing tests.
1992
1993         * Modules/webaudio/AudioContext.cpp:
1994         (WebCore::AudioContext::addReaction):
1995         (WebCore::AudioContext::setState):
1996         (WebCore::AudioContext::suspend):
1997         (WebCore::AudioContext::resume):
1998         (WebCore::AudioContext::close):
1999         * Modules/webaudio/AudioContext.h:
2000         * bindings/js/JSAudioContextCustom.cpp:
2001         (WebCore::JSAudioContext::suspend):
2002         (WebCore::JSAudioContext::resume):
2003         (WebCore::JSAudioContext::close):
2004         * bindings/js/JSDOMPromise.cpp:
2005         (WebCore::DeferredWrapper::callFunction):
2006         * bindings/js/JSDOMPromise.h:
2007         (WebCore::DeferredWrapper::resolve):
2008         (WebCore::DeferredWrapper::reject):
2009         (WebCore::DOMPromise::DOMPromise):
2010         (WebCore::DOMPromise::resolve):
2011         (WebCore::DOMPromise::reject):
2012
2013 2015-06-10  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2014
2015         [Streams API] Implement pulling of a source by a ReadableStream
2016         https://bugs.webkit.org/show_bug.cgi?id=145262
2017
2018         Reviewed by Darin Adler
2019
2020         Introduced abstract ReadableStream::doPull() which is overriden in ReadableJSStream.
2021         Added support to call the "pull" JS callback in ReadableJSStream::doPull().
2022         Added calls to pull as requested by the spec (when resolving a read callback, at start time...).
2023
2024         Fixed issue in ReadableStreamReader::read() (use of successCallback(JSValue()) in lieu of endCallback())
2025
2026         Covered by rebased tests.
2027
2028         * Modules/streams/ReadableStream.cpp:
2029         (WebCore::ReadableStream::start): calling pull() once start.
2030         (WebCore::ReadableStream::pull): calling doPull() if readableStream states requires to.
2031         (WebCore::ReadableStream::read): calling pull() after resolving a read callback.
2032         * Modules/streams/ReadableStream.h:
2033         * Modules/streams/ReadableStreamReader.cpp:
2034         (WebCore::ReadableStreamReader::read): fixed JSValue() bug.
2035         * bindings/js/ReadableJSStream.cpp:
2036         (WebCore::ReadableJSStream::doPull): calling of JS callback.
2037         (WebCore::ReadableJSStream::storeException): catches exception and store them.
2038         (WebCore::ReadableJSStream::storeError): refactoring for checkForException.
2039         (WebCore::ReadableJSStream::enqueue):
2040         * bindings/js/ReadableJSStream.h:
2041
2042 2015-06-09  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2043
2044         DeferredWrapper should clear its JS strong references once its promise is resolved/rejected
2045         https://bugs.webkit.org/show_bug.cgi?id=145753
2046
2047         Reviewed by Darin Adler.
2048
2049         Clear strong references at the end of DeferredWrapper::resolve and DeferredWrapper::reject.
2050         Added assertions to check that resolve or reject is called only once.
2051
2052         Removed DeferredWrapper constructor that creates internally its promise.
2053         Reason is DeferredWrapper can be resolved synchronously and promise
2054         will be lost when returning it at the end of the binding promise function.
2055         Updated all custom bindings accordingly.
2056
2057         Covered by existing tests.
2058
2059         * bindings/js/JSAudioContextCustom.cpp:
2060         (WebCore::JSAudioContext::suspend): Updated DeferredWrapper constructor to properly return the promise.
2061         (WebCore::JSAudioContext::resume): Ditto.
2062         (WebCore::JSAudioContext::close): Ditto.
2063         * bindings/js/JSDOMPromise.cpp:
2064         (WebCore::DeferredWrapper::resolve): Cleared strong references after promise resolution.
2065         (WebCore::DeferredWrapper::reject): Cleared strong references after promise rejection.
2066         * bindings/js/JSDOMPromise.h:
2067         (WebCore::DeferredWrapper::resolve): Added ASSERT to check promise is not yet rejected/resolved.
2068         (WebCore::DeferredWrapper::reject): Ditto.
2069         (WebCore::DeferredWrapper::reject<ExceptionCode>): Ditto.
2070         (WebCore::DeferredWrapper::resolve<String>): Ditto.
2071         (WebCore::DeferredWrapper::resolve<bool>): Ditto.
2072         (WebCore::DeferredWrapper::resolve<JSC::JSValue>): Ditto.
2073         (WebCore::char>>):
2074         (WebCore::DeferredWrapper::reject<String>): Ditto.
2075         * bindings/js/JSMediaDevicesCustom.cpp:
2076         (WebCore::JSMediaDevices::getUserMedia): Updated DeferredWrapper constructor to properly return the promise.
2077         * bindings/js/JSReadableStreamReaderCustom.cpp:
2078         (WebCore::JSReadableStreamReader::read): Ditto.
2079         (WebCore::JSReadableStreamReader::closed): Ditto.
2080         * bindings/js/JSSubtleCryptoCustom.cpp:
2081         (WebCore::JSSubtleCrypto::encrypt): Ditto.
2082         (WebCore::JSSubtleCrypto::decrypt): Ditto.
2083         (WebCore::JSSubtleCrypto::sign): Ditto.
2084         (WebCore::JSSubtleCrypto::verify): Ditto.
2085         (WebCore::JSSubtleCrypto::digest): Ditto.
2086         (WebCore::JSSubtleCrypto::generateKey): Ditto.
2087         (WebCore::JSSubtleCrypto::importKey): Ditto.
2088         (WebCore::JSSubtleCrypto::exportKey): Ditto.
2089         (WebCore::JSSubtleCrypto::wrapKey): Ditto.
2090         (WebCore::JSSubtleCrypto::unwrapKey): Ditto.
2091
2092 2015-06-09  Zalan Bujtas  <zalan@apple.com>
2093
2094         Protect FrameView from being destroyed in Document::recalcStyle()
2095         https://bugs.webkit.org/show_bug.cgi?id=143033
2096         rdar://problem/20326871
2097
2098         Reviewed by Andreas Kling.
2099
2100         This patch ensures that FrameView stays valid in Document::recalcStyle().
2101         It follows the defensive pattern we use to deal with the refcounted FrameView (see EventDispatcher::dispatchEvent)
2102
2103         When the iframe destroys itself in the onBeforeLoad callback (as the result of
2104         PostResolutionCallbackDisabler -> HTMLObjectElement::updateWidget -> guardedDispatchBeforeLoadEvent),
2105         we detach the frame and release the FrameView. However Document::recalcStyle() expects
2106         the FrameView to stay valid.
2107
2108         Covered by fast/frames/flattening/crash-remove-iframe-during-object-beforeload.html.
2109
2110         * dom/Document.cpp:
2111         (WebCore::Document::recalcStyle):
2112
2113 2015-06-09  Daegyu Lee  <daegyu.lee@navercorp.com>
2114
2115         3D-transformed video does not display on platforms without accelerated video rendering
2116         https://bugs.webkit.org/show_bug.cgi?id=144782
2117
2118         Reviewed by Simon Fraser.
2119
2120         Video element does not get GraphicsLayer when MediaPlayerPrivate::supportsAcceleratedRendering() returns false
2121         which means not using accelerated video decoding.
2122         Although the video element gets GraphicsLayer by changing the CSS style of video element by javascript,
2123         there is no way to set GraphicsLayer::setDrawsContent(true) for updating the video content.
2124         As a result, after changing the CSS style, the video content does not show.
2125         To avoid missing setDrawsContent(true), add conditions(!supportsAcceleratedRendering() && m_requiresOwnBackingStore).
2126
2127         Test: media/video-transformed-by-javascript.html
2128               media/video-transformed-by-javascript-expected.html
2129
2130         * rendering/RenderLayerBacking.cpp:
2131         (WebCore::RenderLayerBacking::containsPaintedContent):
2132
2133 2015-06-09  Ryosuke Niwa  <rniwa@webkit.org>
2134
2135         REGRESSION(r180867): Tabbing to login field on iCloud.com doesn't have highlight for text
2136         https://bugs.webkit.org/show_bug.cgi?id=145830
2137
2138         Reviewed by Darin Adler.
2139
2140         The bug was caused by setSelection not updating RenderView when there is a style recalc scheduled
2141         that doesn't trigger a layout. Fixed the bug by explicitly updating the selection in
2142         Document::recalcStyle in that case.
2143
2144         Test: editing/selection/update-selection-by-style-change.html
2145
2146         * dom/Document.cpp:
2147         (WebCore::Document::recalcStyle):
2148         * editing/FrameSelection.cpp:
2149         (WebCore::FrameSelection::updateAppearanceAfterLayout): Renamed from didLayout.
2150         * editing/FrameSelection.h:
2151         * page/FrameView.cpp:
2152         (WebCore::FrameView::performPostLayoutTasks):
2153
2154 2015-06-09  Dean Jackson  <dino@apple.com>
2155
2156         MediaControls: Reenable resize of controls on pinch zoom
2157         https://bugs.webkit.org/show_bug.cgi?id=145824
2158         <rdar://problem/21212778>
2159
2160         Reviewed by Darin Adler.
2161
2162         Reinstate the code that updated the scaling of the
2163         controls in response to changes in page scale.
2164         This time around we have to change both the controls
2165         panel, and its blurry background.
2166
2167         * Modules/mediacontrols/mediaControlsApple.js:
2168         (Controller.prototype.set pageScaleFactor): Deleted a comment.
2169         * Modules/mediacontrols/mediaControlsiOS.css:
2170         (video::-webkit-media-controls-panel-background): Set the background to pin
2171         to the bottom of its view.
2172         * Modules/mediacontrols/mediaControlsiOS.js:
2173         (ControllerIOS.prototype.get pageScaleFactor): Basic getter, copied from mediaControlsApple.
2174         (ControllerIOS.prototype.set pageScaleFactor): The setter that reacts to the page scale
2175         and applies an inverse scaling on the control panel using a transform, and adjusts the
2176         height on the background similarly.
2177
2178 2015-06-09  Andreas Kling  <akling@apple.com>
2179
2180         GraphicsContext state stack wasting lots of memory when empty.
2181         <https://webkit.org/b/145817>
2182
2183         Reviewed by Geoffrey Garen.
2184
2185         Give the GraphicsContextState stack an inline capacity of 1, and make sure
2186         to free any heap-allocated backing store when the stack goes empty.
2187
2188         The 1 is because HTMLCanvasElement keeps one "save" on the underlying
2189         GraphicsContext at all times, and this prevents those canvases from always
2190         sitting on an empty stack with 16 capacity.
2191
2192         This saves ~520 kB on cnet.com video pages.
2193
2194         * platform/graphics/GraphicsContext.cpp:
2195         (WebCore::GraphicsContext::restore):
2196         * platform/graphics/GraphicsContext.h:
2197
2198 2015-06-09  Said Abou-Hallawa  <sabouhallawa@apple.com>
2199
2200         SVG Fragment is not rendered if it is the css background image of an HTML element
2201         https://bugs.webkit.org/show_bug.cgi?id=91790
2202
2203         Reviewed by Darin Adler.
2204
2205         To show an SVG fragment, the SVGImage has to scrollToFragment() using
2206         the resource url. The changes http://trac.webkit.org/changeset/164804
2207         and http://trac.webkit.org/changeset/164983 set the url of SVGImage to
2208         to be used later in SVGImage::draw(). The problem is the SVGImage url
2209         is only set when it is the src of an <img> tag. We did not do the same
2210         thing when the SVGImage is the css background image of an HTML element.
2211         
2212         The fix is to set the url of the SVGImage always when it's created by 
2213         the CachedImage. The CachedImage must have a valid url when the SVGImage
2214         is created.
2215
2216         Test: svg/css/svg-resource-fragment-identifier-background.html
2217
2218         * loader/cache/CachedImage.cpp:
2219         (WebCore::CachedImage::load):
2220         (WebCore::CachedImage::checkShouldPaintBrokenImage):
2221         Replace the calls resourceRequest().url() and m_resourceRequest.url() by
2222         calling url() since they are all the same.
2223         
2224         (WebCore::CachedImage::createImage): Pass the resource url to SVGImage
2225         and change ImageObserver& by ImageObserver*, since null is not legal.
2226         
2227         * svg/graphics/SVGImage.cpp:
2228         (WebCore::SVGImage::SVGImage):
2229         * svg/graphics/SVGImage.h: Add a url parameter to SVGImage constructor.
2230         
2231         * svg/graphics/SVGImageCache.cpp:
2232         (WebCore::SVGImageCache::findImageForRenderer): Add a new helper function.
2233         
2234         (WebCore::SVGImageCache::imageSizeForRenderer):
2235         (WebCore::SVGImageCache::imageForRenderer): Code clean up.
2236         
2237         * svg/graphics/SVGImageCache.h: Make imageForRenderer() const.
2238
2239         * svg/graphics/SVGImageForContainer.cpp: Remove unneeded header file.
2240
2241 2015-06-09  Matt Rajca  <mrajca@apple.com>
2242
2243         Add support for toggling playback in MediaSessions and MediaSessionManagers.
2244         https://bugs.webkit.org/show_bug.cgi?id=145822
2245
2246         Reviewed by Eric Carlson.
2247
2248         * Modules/mediasession/MediaSession.cpp: Toggle playback of all active media elements.
2249         (WebCore::MediaSession::togglePlayback):
2250         * Modules/mediasession/MediaSession.h:
2251         * Modules/mediasession/MediaSessionManager.cpp: Toggle playback of all media sessions as described in the
2252           Media Session spec.
2253         (WebCore::MediaSessionManager::togglePlayback):
2254         * Modules/mediasession/MediaSessionManager.h:
2255
2256 2015-06-09  Darin Adler  <darin@apple.com>
2257
2258         Takes two delete key presses to delete pasted emoji up-pointing index finger with skin tone
2259         https://bugs.webkit.org/show_bug.cgi?id=145823
2260
2261         Reviewed by Anders Carlsson.
2262
2263         Tests: editing/deleting/delete-emoji.html
2264
2265         * rendering/RenderText.cpp:
2266         (WebCore::isHangulLVT): Use constants instead of macros. Also changed to take a UChar since
2267         the Hangul processing can work on UTF-16 code unit at a time and doesn't have to handle
2268         surrogate pairs.
2269         (WebCore::isMark): Use U_GC_M_MASK instead of writing the algorithm out another way.
2270         (WebCore::isInArmenianToLimbuRange): Added.
2271         (WebCore::RenderText::previousOffsetForBackwardDeletion): Refactored for clarity and to use
2272         the U16_PREV macro instead of doing what it does in a sloppier way. Added code to allow a
2273         variation selector before an emoji modifier to fix the bug. Changed Hangul logic to work a
2274         code unit at a time, since it can, to use an enum class, and to use constants rather than
2275         all capital macros. Also changed the "dumb" case to use a more appropriate ICU macro.
2276
2277 2015-06-09  Said Abou-Hallawa  <sabouhallawa@apple.com>
2278
2279         feComposite filter does not clip the paint rect to its effect rect when the operator is 'in' or 'atop'
2280         https://bugs.webkit.org/show_bug.cgi?id=137856
2281
2282         Reviewed by Darin Adler.
2283
2284         There was bug in calculating the absolutePaintRect of the feComposite filter
2285         when the operator is equal to 'in' or 'atop'. The absolutePaintRect was set
2286         to the absolutePaintRect of the background FilterEffect which is correct.
2287         What was missing is clipping this rectangle to the maxEffectRect of the
2288         filter which we do for other operators.
2289
2290         Tests: svg/filters/feComposite-background-rect-control-operators.svg
2291
2292         * platform/graphics/IntRect.h:
2293         (WebCore::operator-=):
2294         (WebCore::operator-): Add new operators to IntRect.
2295
2296         * platform/graphics/filters/FEComposite.cpp:
2297         (WebCore::FEComposite::determineAbsolutePaintRect): Make sure the filter
2298         absolutePaintRect is clipped to maxEffectRect for all operators.
2299         
2300         (WebCore::FEComposite::platformApplySoftware): Code clean-up.
2301         
2302         * platform/graphics/filters/FilterEffect.cpp:
2303         (WebCore::FilterEffect::determineAbsolutePaintRect): Move the clipping
2304         part to a separate function.
2305         
2306         (WebCore::FilterEffect::clipAbsolutePaintRect): Clip the absolutePaintRect
2307         to the maxEffectRect of the filter.
2308         
2309         * platform/graphics/filters/FilterEffect.h:
2310
2311 2015-06-09  Matt Rajca  <mrajca@apple.com>
2312
2313         Implement MediaSessionManager to keep track of all MediaSessions.
2314         https://bugs.webkit.org/show_bug.cgi?id=145806
2315
2316         Reviewed by Eric Carlson.
2317
2318         * Modules/mediasession/MediaSession.cpp:
2319         (WebCore::MediaSession::MediaSession): Add ourselves to the MediaSessionManager upon construction.
2320         (WebCore::MediaSession::~MediaSession): Remove ourselves from the MediaSessionManager before destruction.
2321         * Modules/mediasession/MediaSessionManager.cpp: Added to keep track of all living MediaSessions.
2322         (WebCore::MediaSessionManager::singleton):
2323         (WebCore::MediaSessionManager::addMediaSession):
2324         (WebCore::MediaSessionManager::removeMediaSession):
2325         * Modules/mediasession/MediaSessionManager.h: Added.
2326         * WebCore.xcodeproj/project.pbxproj: Added new MediaSessionManager sources.
2327
2328 2015-06-09  Ryuan Choi  <ryuan.choi@navercorp.com>
2329
2330         [CoordinatedGraphics] Remove RefCounted from Tile
2331         https://bugs.webkit.org/show_bug.cgi?id=145788
2332
2333         Reviewed by Darin Adler.
2334
2335         Since r185140, Tile does not need to be RefCounted.
2336
2337         No new tests, no behavior changes.
2338
2339         * platform/graphics/texmap/coordinated/Tile.cpp:
2340         (WebCore::Tile::create): Deleted.
2341         * platform/graphics/texmap/coordinated/Tile.h:
2342         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
2343         (WebCore::TiledBackingStore::invalidate):
2344         (WebCore::TiledBackingStore::updateTileBuffers): Simplifies not to use unnecessary Vector.
2345         (WebCore::TiledBackingStore::coverageRatio):
2346         (WebCore::TiledBackingStore::createTiles):
2347         (WebCore::TiledBackingStore::resizeEdgeTiles):
2348         (WebCore::TiledBackingStore::setKeepRect):
2349         (WebCore::TiledBackingStore::tileAt): Deleted one line wrapper.
2350         (WebCore::TiledBackingStore::setTile): Ditto.
2351         (WebCore::TiledBackingStore::removeTile): Ditto.
2352         * platform/graphics/texmap/coordinated/TiledBackingStore.h:
2353
2354 2015-06-09  Chris Dumez  <cdumez@apple.com>
2355
2356         Allow one sync GC per gcTimer interval on critical memory pressure warning
2357         https://bugs.webkit.org/show_bug.cgi?id=145773
2358
2359         Reviewed by Geoffrey Garen.
2360
2361         * bindings/js/GCController.cpp:
2362         (WebCore::GCController::garbageCollectNowIfNotDoneRecently):
2363
2364         Add new GCController::garbageCollectNowIfNotDoneRecently() API that
2365         allows one synchronous GC per full GC timer interval. If called more
2366         than once per interval, it becomes equivalent to garbageCollectSoon()
2367         and merely accelerates the next collection.
2368
2369         * bindings/js/GCController.h:
2370         * platform/MemoryPressureHandler.cpp:
2371         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2372
2373         Call the new GCController::garbageCollectNowIfNotDoneRecently() on
2374         critical memory pressure instead of garbageCollectionSoon() to try
2375         as do a synchronous GC if one wasn't already done recently.
2376         Also drop call to fullSweep() as GCController::garbageCollectNow*()
2377         already do a sweep after the collection.
2378
2379 2015-06-09  Darin Adler  <darin@apple.com>
2380
2381         Follow-up fix for:
2382         JavaScript bindings are unnecessarily checking for impossible empty JSValue arguments
2383         https://bugs.webkit.org/show_bug.cgi?id=145811
2384
2385         There was one unusual case in the bindings generator that was depending on this.
2386
2387         * bindings/js/JSDOMBinding.h:
2388         (WebCore::argumentOrNull): Deleted.
2389         * bindings/scripts/CodeGeneratorJS.pm:
2390         (GenerateParametersCheck): Stop using argumentOrNull.
2391         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Updated.
2392         * bindings/scripts/test/JS/JSTestObj.cpp: Updated.
2393
2394 2015-06-09  Darin Adler  <darin@apple.com>
2395
2396         JavaScript bindings are unnecessarily checking for impossible empty JSValue arguments
2397         https://bugs.webkit.org/show_bug.cgi?id=145811
2398
2399         Reviewed by Antti Koivisto.
2400
2401         At some point, someone who didn't understand JSValue very well added checks for
2402         isEmpty (and the function isEmpty itself) in JavaScript bindings. But the engine
2403         never would pass an empty JSValue to a binding; that's used only inside the
2404         engine itself. I think this was done by some Google V8 experts a while back, so
2405         it's not entirely surprising they didn't understand this. But we don't want to
2406         keep all that unneeded code.
2407
2408         * bindings/js/JSAudioTrackCustom.cpp:
2409         (WebCore::JSAudioTrack::setKind): Removed the isEmpty clause here. I presume this
2410         was copied and pasted from script-generated bindings. While I was at it, I used a
2411         slightly more efficient code path that avoids doing a ref/deref on the string by
2412         using auto&. That's trickier to do correctly for functions with more than one
2413         argument, so I didn't do it in the bindings generator yet.
2414         (WebCore::JSAudioTrack::setLanguage): Ditto.
2415         * bindings/js/JSTextTrackCustom.cpp:
2416         (WebCore::JSTextTrack::setKind): Ditto.
2417         (WebCore::JSTextTrack::setLanguage): Ditto.
2418         * bindings/js/JSVideoTrackCustom.cpp:
2419         (WebCore::JSVideoTrack::setKind): Ditto.
2420         (WebCore::JSVideoTrack::setLanguage): Ditto.
2421
2422         * bindings/scripts/CodeGeneratorJS.pm:
2423         (GenerateImplementation): Use "=" syntax instead of constructor style syntax for
2424         the argument processing. I think this is more readable.
2425         (GenerateParametersCheck): For the enum code path, did the more efficient auto&
2426         idiom to avoid ref/deref on a string. For the toExistingAtomicString path,
2427         restructured so we don't have to check the flag indicating that something is atomic.
2428         Later we could also avoid the ref/deref; added a FIXME about that.
2429         (GetNativeType): Use String, not const String, for local variables. Sure, the
2430         string is const, but so is every other local variable type we use! No need to be
2431         wordy about it.
2432         (JSValueToNative): Removed the uneeded calls to isEmpty. Since the call sites no
2433         longer use construction syntax, used initializer syntax style for a couple classes
2434         that are constructed with multiple arguments.
2435
2436         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: Updated.
2437         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: Ditto.
2438         * bindings/scripts/test/JS/JSTestEventTarget.cpp: Ditto.
2439         * bindings/scripts/test/JS/JSTestInterface.cpp: Ditto.
2440         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: Ditto.
2441         * bindings/scripts/test/JS/JSTestNondeterministic.cpp: Ditto.
2442         * bindings/scripts/test/JS/JSTestObj.cpp: Ditto.
2443         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: Ditto.
2444         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: Ditto.
2445         * bindings/scripts/test/JS/JSTestTypedefs.cpp: Ditto.
2446
2447 2015-06-09  Csaba Osztrogonác  <ossy@webkit.org>
2448
2449         Fix unused private field warning in GraphicsLayerUpdater.h
2450         https://bugs.webkit.org/show_bug.cgi?id=145757
2451
2452         Reviewed by Darin Adler.
2453
2454         * platform/graphics/GraphicsLayerUpdater.cpp:
2455         (WebCore::GraphicsLayerUpdater::GraphicsLayerUpdater):
2456         * platform/graphics/GraphicsLayerUpdater.h:
2457
2458 2015-06-09  Yusuke Suzuki  <utatane.tea@gmail.com>
2459
2460         Crash when passing Symbol to NPAPI plugin objects
2461         https://bugs.webkit.org/show_bug.cgi?id=145798
2462
2463         Reviewed by Darin Adler.
2464
2465         Test: plugins/npruntime/script-object-with-symbols.html
2466
2467         For C bridge APIs, we add guards for symbols.
2468         This is the same to the existing guards in Objective-C APIs.
2469
2470         * bridge/c/c_class.cpp:
2471         (JSC::Bindings::CClass::methodNamed):
2472         (JSC::Bindings::CClass::fieldNamed):
2473         * bridge/objc/objc_class.mm:
2474         (JSC::Bindings::ObjcClass::methodNamed):
2475         (JSC::Bindings::ObjcClass::fieldNamed):
2476         (JSC::Bindings::ObjcClass::fallbackObject):
2477
2478 2015-06-09  Csaba Osztrogonác  <ossy@webkit.org>
2479
2480         [cmake] Fix the style issues in cmake project files
2481         https://bugs.webkit.org/show_bug.cgi?id=145755
2482
2483         Reviewed by Darin Adler.
2484
2485         * CMakeLists.txt:
2486         * PlatformEfl.cmake:
2487         * PlatformGTK.cmake:
2488         * PlatformMac.cmake:
2489         * PlatformWin.cmake:
2490         * PlatformWinCairo.cmake:
2491
2492 2015-06-09  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2493
2494         [Streams API] ReadableJSStream should handle JS source getters that throw
2495         https://bugs.webkit.org/show_bug.cgi?id=145600
2496
2497         Reviewed by Darin Adler.
2498
2499         Checking whether there is an exception when trying to access to a source method.
2500         If so, rethrowing it in case of "start".
2501
2502         Refactoring of code to prepare pulling, cancelling and additional parameter handling in ReadableStream construtor.
2503
2504         Fixed the case of ReadableStream constructor called with an undefined parameter.
2505
2506         Covered by rebased test expectation.
2507
2508         * bindings/js/JSReadableStreamCustom.cpp:
2509         (WebCore::constructJSReadableStream): Refactoring to group all parameter check and exception handling in ReadableJSStream::create.
2510         * bindings/js/ReadableJSStream.cpp:
2511         (WebCore::getPropertyFromObject):
2512         (WebCore::callFunction):
2513         (WebCore::ReadableJSStream::invoke): Added method to be used also for pulling and cancelling.
2514         (WebCore::ReadableJSStream::doStart):
2515         (WebCore::ReadableJSStream::create):
2516         * bindings/js/ReadableJSStream.h:
2517
2518 2015-06-08  Dan Bernstein  <mitz@apple.com>
2519
2520         Made MicroTask.h a project header.
2521
2522         Rubber-stamped by Anders Carlsson.
2523
2524         * WebCore.xcodeproj/project.pbxproj: Demoted MicroTask.h from Public to Project. WebCore
2525         doesn’t have public headers, and this header isn’t used by WebKit.
2526
2527 2015-06-08  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2528
2529         Purge PassRefPtr in JavaScriptCore
2530         https://bugs.webkit.org/show_bug.cgi?id=145750
2531
2532         Reviewed by Darin Adler.
2533
2534         As a step to purge PassRefPtr, this patch replaces PassRefPtr with Ref or RefPtr.
2535
2536         No new tests, no behavior changes.
2537
2538         * bindings/js/JSDOMWindowBase.cpp:
2539         (WebCore::JSDOMWindowBase::commonVM):
2540
2541 2015-06-08  Zalan Bujtas  <zalan@apple.com>
2542
2543         Subpixel rendering: Clip-path does not work properly on subpixel positions.
2544         https://bugs.webkit.org/show_bug.cgi?id=145749
2545         rdar://problem/20824305
2546
2547         Reviewed by Simon Fraser.
2548
2549         This patch ensures that clip-path is device pixel snapped both for composited and
2550         non-composited content.
2551
2552         Tests: compositing/masks/compositing-clip-path-on-subpixel-position.html
2553                fast/masking/clip-path-on-subpixel-position.html
2554
2555         * rendering/RenderLayer.cpp:
2556         (WebCore::RenderLayer::setupClipPath):
2557         * rendering/RenderLayerBacking.cpp:
2558         (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
2559
2560 2015-06-08  Chris Dumez  <cdumez@apple.com>
2561
2562         Access GCController instance via GCController::singleton() instead of a free function
2563         https://bugs.webkit.org/show_bug.cgi?id=145776
2564
2565         Reviewed by Darin Adler.
2566
2567         Access GCController instance via GCController::singleton() instead of a
2568         free function as per coding style and for consistency with other
2569         singleton classes in the codebase.
2570
2571         * bindings/js/GCController.cpp:
2572         (WebCore::GCController::singleton):
2573         (WebCore::gcController): Deleted.
2574         * bindings/js/GCController.h:
2575         * bindings/js/JSDOMWindowShell.cpp:
2576         (WebCore::JSDOMWindowShell::setWindow):
2577         * bindings/js/ScriptCachedFrameData.cpp:
2578         (WebCore::ScriptCachedFrameData::clear):
2579         * bindings/js/ScriptController.cpp:
2580         (WebCore::collectGarbageAfterWindowShellDestruction):
2581         * platform/MemoryPressureHandler.cpp:
2582         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2583
2584 2015-06-08  Daniel Bates  <dabates@apple.com>
2585
2586         Mouse release on AutoFill button activates it; should only activate on click
2587         https://bugs.webkit.org/show_bug.cgi?id=145774
2588         <rdar://problem/21069245>
2589
2590         Reviewed by Ryosuke Niwa.
2591
2592         Fixes an issue where a click event was dispatched to a shadow tree node regardless of whether
2593         both the mouse press and mouse release were targeted at it. In particular, releasing the mouse
2594         on the AutoFill button activates it regardless of whether the mouse was pressed on it.
2595
2596         Currently we always dispatch a click event to a node n where the mouse was released when n is
2597         in a shadow tree regardless of whether the mouse was pressed on n. Instead we should only
2598         dispatch a click event to n if the mouse was pressed and released on n. If n is a shadow tree
2599         descendant, the mouse was released on n, and n never received a mouse press then we should
2600         dispatch the click event at the shadow host element of n to preserve the illusion to web
2601         developers that the shadow host element is a single element.
2602
2603         Test: fast/forms/auto-fill-button/mouse-down-input-mouse-release-auto-fill-button.html
2604
2605         * page/EventHandler.cpp:
2606         (WebCore::targetNodeForClickEvent): Added; returns the target node for the DOM click event.
2607         (WebCore::EventHandler::handleMouseReleaseEvent): Modified to use dispatch the DOM click event
2608         at the node returned by targetNodeForClickEvent().
2609         (WebCore::mouseIsReleasedOnPressedElement): Deleted.
2610
2611 2015-06-08  Chris Dumez  <cdumez@apple.com>
2612
2613         WebContent crash in WebCore::Page::sessionID() const + 0 (Page.cpp:1660)
2614         https://bugs.webkit.org/show_bug.cgi?id=145748
2615         <rdar://problem/21226577>
2616
2617         Reviewed by Brady Eidson.
2618
2619         We would sometimes crash when pruning the PageCache because it was
2620         possible for frames to still be loading while in the PageCache and
2621         we would try to stop the load when the CachedFrame is destroyed. This
2622         code path was not supposed to be exercised as we were not supposed to
2623         have pages still loading inside the PageCache.
2624
2625         r185017 made sure we don't insert into the PageCache pages that are
2626         still loading. However, nothing was preventing content from starting
2627         new loads in their 'pagehide' event handlers, *after* the decision
2628         to put the page in the PageCache was made.
2629
2630         This patch prevents content from starting loads from a 'pagehide'
2631         event handler so that we can no longer have content that is loading
2632         inside the PageCache. 'ping' image loads still go through though as
2633         these are specially handled and use PingLoaders.
2634
2635         Tests: http/tests/navigation/image-load-in-pagehide-handler.html
2636                http/tests/navigation/subframe-pagehide-handler-starts-load.html
2637                http/tests/navigation/subframe-pagehide-handler-starts-load2.html
2638
2639         * loader/FrameLoader.cpp:
2640         (WebCore::FrameLoader::FrameLoader):
2641         (WebCore::FrameLoader::stopLoading):
2642         (WebCore::FrameLoader::loadURL):
2643         (WebCore::FrameLoader::loadWithDocumentLoader):
2644         (WebCore::FrameLoader::stopAllLoaders):
2645         (WebCore::FrameLoader::handleBeforeUnloadEvent):
2646         * loader/FrameLoader.h:
2647         (WebCore::FrameLoader::pageDismissalEventBeingDispatched):
2648         (WebCore::FrameLoader::PageDismissalEventType::PageDismissalEventType):
2649         (WebCore::FrameLoader::PageDismissalEventType::operator Page::DismissalType):
2650
2651         Add wrapper class for m_pageDismissalEventBeingDispatched member type.
2652         The wrapper takes care of updating the m_dismissalEventBeingDispatched
2653         member on the Page every time the member on FrameLoader is updated. We
2654         now cache this information on the Page so that clients can cheaply
2655         query if a dismissal event is being dispatched in any of the Page's
2656         frame, without having to traverse the frame tree.
2657
2658         * loader/ImageLoader.cpp:
2659         (WebCore::pageIsBeingDismissed):
2660
2661         * loader/cache/CachedResource.cpp:
2662         (WebCore::CachedResource::load):
2663
2664         Abort the load early if we are currently dispatching a 'pagehide'
2665         event. We don't allow new loads at such point because we've already
2666         made the decision to add the Page to the PageCache.
2667
2668         * loader/cache/CachedResourceLoader.cpp:
2669         (WebCore::CachedResourceLoader::requestImage):
2670
2671         * page/Chrome.cpp:
2672         (WebCore::Chrome::runModal): Deleted.
2673         (WebCore::Chrome::setToolbarsVisible): Deleted.
2674         (WebCore::Chrome::toolbarsVisible): Deleted.
2675         (WebCore::Chrome::runJavaScriptConfirm): Deleted.
2676         (WebCore::Chrome::runJavaScriptPrompt): Deleted.
2677         (WebCore::Chrome::shouldInterruptJavaScript): Deleted.
2678         * page/Chrome.h:
2679         * page/ChromeClient.h:
2680         * page/DOMWindow.cpp:
2681         (WebCore::DOMWindow::canShowModalDialogNow):
2682
2683         Drop ChromeClient::shouldRunModalDialogDuringPageDismissal() and code
2684         using it as it is unused and I did not think it was worth updating
2685         this code.
2686
2687         * page/Page.h:
2688         (WebCore::Page::dismissalEventBeingDispatched):
2689         (WebCore::Page::setDismissalEventBeingDispatched):
2690
2691         Add a m_dismissalEventBeingDispatched member to the Page so that we can
2692         easily query if a dismissal event is being dispatched in any of the
2693         frames, without having to traverse the frame tree. I suspect more call
2694         sites of FrameLoader::pageDismissalEventBeingDispatched() may actually
2695         want this but I did not make such change in this patch. It is important
2696         to check all the frames and not simply the current one because a frame's
2697         pagehide event handler may trigger a load in another frame.
2698
2699 2015-06-08  Hunseop Jeong  <hs85.jeong@samsung.com>
2700
2701         Replaced 0 with nullptr in WebCore/Modules.
2702         https://bugs.webkit.org/show_bug.cgi?id=145758
2703
2704         Reviewed by Darin Adler.
2705
2706         No new tests, no behavior changes.
2707
2708         * Modules/battery/BatteryManager.cpp:
2709         (WebCore::BatteryManager::BatteryManager):
2710         * Modules/encryptedmedia/CDM.cpp:
2711         (WebCore::CDM::CDM):
2712         * Modules/encryptedmedia/MediaKeys.cpp:
2713         (WebCore::MediaKeys::MediaKeys):
2714         (WebCore::MediaKeys::~MediaKeys):
2715         * Modules/indexeddb/IDBCursor.h:
2716         (WebCore::IDBCursor::continueFunction):
2717         * Modules/indexeddb/IDBCursorBackendOperations.cpp:
2718         (WebCore::CursorAdvanceOperation::perform):
2719         (WebCore::CursorIterationOperation::perform):
2720         * Modules/indexeddb/IDBDatabase.cpp:
2721         (WebCore::IDBDatabase::transactionFinished):
2722         * Modules/indexeddb/IDBDatabaseCallbacksImpl.cpp:
2723         (WebCore::IDBDatabaseCallbacksImpl::IDBDatabaseCallbacksImpl):
2724         * Modules/indexeddb/IDBEventDispatcher.cpp:
2725         (WebCore::IDBEventDispatcher::dispatch):
2726         * Modules/indexeddb/IDBIndex.h:
2727         (WebCore::IDBIndex::openCursor):
2728         (WebCore::IDBIndex::count):
2729         (WebCore::IDBIndex::openKeyCursor):
2730         * Modules/indexeddb/IDBObjectStore.cpp:
2731         (WebCore::IDBObjectStore::add):
2732         (WebCore::IDBObjectStore::put):
2733         (WebCore::IDBObjectStore::index):
2734         (WebCore::IDBObjectStore::openCursor):
2735         * Modules/indexeddb/IDBObjectStore.h:
2736         (WebCore::IDBObjectStore::count):
2737         * Modules/indexeddb/IDBOpenDBRequest.cpp:
2738         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
2739         (WebCore::IDBOpenDBRequest::onSuccess):
2740         * Modules/indexeddb/IDBRequest.cpp:
2741         (WebCore::IDBRequest::IDBRequest):
2742         * Modules/indexeddb/IDBTransaction.cpp:
2743         (WebCore::IDBTransaction::OpenCursorNotifier::cursorFinished):
2744         * Modules/indexeddb/IDBTransactionBackend.cpp:
2745         (WebCore::IDBTransactionBackend::commit):
2746         * Modules/indexeddb/IDBTransactionBackendOperations.cpp:
2747         (WebCore::OpenCursorOperation::perform):
2748         * Modules/indieui/UIRequestEvent.cpp:
2749         (WebCore::UIRequestEventInit::UIRequestEventInit):
2750         (WebCore::UIRequestEvent::UIRequestEvent):
2751         * Modules/mediasource/MediaSource.cpp:
2752         (WebCore::MediaSource::MediaSource):
2753         (WebCore::MediaSource::setReadyState):
2754         (WebCore::MediaSource::removeSourceBuffer):
2755         * Modules/mediasource/SourceBuffer.cpp:
2756         (WebCore::SourceBuffer::~SourceBuffer):
2757         (WebCore::SourceBuffer::removedFromMediaSource):
2758         * Modules/mediastream/MediaStream.cpp:
2759         (WebCore::MediaStream::~MediaStream):
2760         * Modules/mediastream/MediaStreamEvent.cpp:
2761         (WebCore::MediaStreamEventInit::MediaStreamEventInit):
2762         * Modules/mediastream/MediaStreamTrackEvent.cpp:
2763         (WebCore::MediaStreamTrackEventInit::MediaStreamTrackEventInit):
2764         * Modules/mediastream/RTCDataChannel.cpp:
2765         (WebCore::RTCDataChannel::stop):
2766         * Modules/mediastream/UserMediaRequest.cpp:
2767         (WebCore::UserMediaRequest::contextDestroyed):
2768         * Modules/notifications/Notification.cpp:
2769         (WebCore::Notification::Notification):
2770         * Modules/notifications/Notification.h:
2771         * Modules/speech/SpeechSynthesis.cpp:
2772         (WebCore::SpeechSynthesis::SpeechSynthesis):
2773         (WebCore::SpeechSynthesis::setPlatformSynthesizer):
2774         (WebCore::SpeechSynthesis::cancel):
2775         (WebCore::SpeechSynthesis::handleSpeakingCompleted):
2776         * Modules/speech/SpeechSynthesisUtterance.cpp:
2777         (WebCore::SpeechSynthesisUtterance::~SpeechSynthesisUtterance):
2778         * Modules/webaudio/AudioBufferSourceNode.cpp:
2779         (WebCore::AudioBufferSourceNode::AudioBufferSourceNode):
2780         (WebCore::AudioBufferSourceNode::clearPannerNode):
2781         * Modules/webaudio/AudioContext.cpp:
2782         (WebCore::AudioContext::createMediaStreamSource):
2783         * Modules/webaudio/MediaElementAudioSourceNode.cpp:
2784         (WebCore::MediaElementAudioSourceNode::~MediaElementAudioSourceNode):
2785         * Modules/webaudio/OscillatorNode.cpp:
2786         (WebCore::OscillatorNode::setType):
2787         (WebCore::OscillatorNode::process):
2788         * Modules/webdatabase/DatabaseManager.cpp:
2789         (WebCore::DatabaseManager::DatabaseManager):
2790         * Modules/webdatabase/DatabaseThread.cpp:
2791         (WebCore::DatabaseThread::DatabaseThread):
2792         (WebCore::DatabaseThread::databaseThread):
2793         * Modules/webdatabase/DatabaseThread.h:
2794         * Modules/webdatabase/DatabaseTracker.cpp:
2795         (WebCore::DatabaseTracker::DatabaseTracker):
2796         * Modules/webdatabase/SQLCallbackWrapper.h:
2797         (WebCore::SQLCallbackWrapper::clear):
2798         (WebCore::SQLCallbackWrapper::unwrap):
2799         * Modules/webdatabase/SQLStatementBackend.cpp:
2800         (WebCore::SQLStatementBackend::clearFailureDueToQuota):
2801         * Modules/webdatabase/SQLTransaction.cpp:
2802         (WebCore::SQLTransaction::deliverTransactionErrorCallback):
2803         * Modules/webdatabase/SQLTransactionBackend.cpp:
2804         (WebCore::SQLTransactionBackend::doCleanup):
2805         (WebCore::SQLTransactionBackend::getNextStatement):
2806         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
2807         (WebCore::SQLTransactionCoordinator::releaseLock):
2808         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
2809         (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
2810         (WebCore::ThreadableWebSocketChannelClientWrapper::clearPeer):
2811         (WebCore::ThreadableWebSocketChannelClientWrapper::clearClient):
2812         * Modules/websockets/WebSocket.cpp:
2813         (WebCore::WebSocket::stop):
2814         * Modules/websockets/WebSocketChannel.cpp:
2815         (WebCore::WebSocketChannel::disconnect):
2816         (WebCore::WebSocketChannel::didCloseSocketStream):
2817         * Modules/websockets/WebSocketFrame.h:
2818         * Modules/websockets/WebSocketHandshake.cpp:
2819         (WebCore::WebSocketHandshake::clearScriptExecutionContext):
2820         (WebCore::WebSocketHandshake::readStatusLine):
2821         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
2822         (WebCore::WorkerThreadableWebSocketChannel::Peer::disconnect):
2823         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose):
2824         (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
2825
2826 2015-06-08  Chris Fleizach  <cfleizach@apple.com>
2827
2828         AX: improve list heuristics (presentational use versus actual lists)
2829        ​https://bugs.webkit.org/show_bug.cgi?id=134187
2830
2831         Unreviewed. Rolling this change out temporarily.
2832
2833         * accessibility/AccessibilityList.cpp:
2834         (WebCore::AccessibilityList::isDescriptionList):
2835         (WebCore::AccessibilityList::determineAccessibilityRole):
2836         (WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers): Deleted.
2837         * accessibility/AccessibilityList.h:
2838
2839 2015-06-08  Eric Carlson  <eric.carlson@apple.com>
2840
2841         [Mac] Enable AVFoundation by default when QTKit is disabled by default
2842         https://bugs.webkit.org/show_bug.cgi?id=145760
2843
2844         Reviewed by Alexey Proskuryakov.
2845
2846         No new tests, this change makes existing tests pass.
2847
2848         Settings::gAVFoundationEnabled defaults to true.
2849
2850         * page/Settings.cpp:
2851         (WebCore::invalidateAfterGenericFamilyChange):
2852
2853 2015-06-08  Ryosuke Niwa  <rniwa@webkit.org>
2854
2855         Explicitly dismiss correction panel when user types a new character
2856         https://bugs.webkit.org/show_bug.cgi?id=145732
2857         <rdar://problem/19596892>
2858
2859         Reviewed by Darin Adler.
2860
2861         Explicitly dismiss the correction panel when the user types a new character.
2862         This patch shouldn't change any behavior we're currently relying on AppKit to do the same.
2863
2864         Manually ran tests in ManualTests/autocorrection.
2865
2866         * editing/AlternativeTextController.cpp:
2867         (WebCore::AlternativeTextController::respondToAppliedEditing):
2868
2869 2015-06-08  Javier Fernandez  <jfernandez@igalia.com>
2870
2871         [CSS Grid Layout] Setting height on a grid item doesn't have any effect
2872         https://bugs.webkit.org/show_bug.cgi?id=145604
2873
2874         Reviewed by Sergio Villar Senin.
2875
2876         Box Alignment spec states that stretch is only possible when height is
2877         'auto' and no 'auto' margins are used.
2878
2879         It might be the case that style changes so that stretching is not allowed,
2880         hence we need to detect it and clear the override height the stretching
2881         algorithm previously set. The new layout triggered by the style change
2882         will then set grid item's height according to the new style rules.
2883
2884         Test: fast/css-grid-layout/grid-item-should-not-be-stretched-when-height-or-margin-change.html
2885
2886         * rendering/RenderGrid.cpp:
2887         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
2888
2889 2015-06-08  Brady Eidson  <beidson@apple.com>
2890
2891         Completely remove all IDB properties/constructors when it is disabled at runtime.
2892         rdar://problem/18429374 and https://bugs.webkit.org/show_bug.cgi?id=137034
2893
2894         Reviewed by Geoffrey Garen.
2895
2896         Test: storage/indexeddb/properties-disabled-at-runtime.html
2897
2898         - Make constructors all runtime enabled.
2899         - Remove autogeneration of the window.(webkit)indexedDB accessors.
2900         - Add manual overrides for the (webkit)indexedDB accessors at runtime.
2901         
2902         * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
2903         * Modules/indexeddb/IDBAny.idl:
2904         * Modules/indexeddb/IDBCursor.idl:
2905         * Modules/indexeddb/IDBCursorWithValue.idl:
2906         * Modules/indexeddb/IDBDatabase.idl:
2907         * Modules/indexeddb/IDBFactory.idl:
2908         * Modules/indexeddb/IDBIndex.idl:
2909         * Modules/indexeddb/IDBKeyRange.idl:
2910         * Modules/indexeddb/IDBObjectStore.idl:
2911         * Modules/indexeddb/IDBOpenDBRequest.idl:
2912         * Modules/indexeddb/IDBRequest.idl:
2913         * Modules/indexeddb/IDBTransaction.idl:
2914         * Modules/indexeddb/IDBVersionChangeEvent.idl:
2915         * page/DOMWindow.idl:
2916
2917         * bindings/js/JSDOMWindowCustom.cpp:
2918         (WebCore::jsDOMWindowIndexedDB):
2919         (WebCore::JSDOMWindow::getOwnPropertySlot):
2920
2921 2015-06-08  Michael Catanzaro  <mcatanzaro@igalia.com>
2922
2923         [SOUP] Performs DNS prefetch when a proxy is configured (information leak)
2924         https://bugs.webkit.org/show_bug.cgi?id=145542
2925
2926         Reviewed by Alexey Proskuryakov.
2927
2928         No new tests, because it's hard to test whether a DNS request has been sent. We could do
2929         this by adding new API to modify the GProxyResolver and GResolver used by the SoupSession in
2930         the network process, but even if such API were desirable, it would be a big job. Tests
2931         should not be allowed to dictate our public API.
2932
2933         * platform/network/DNSResolveQueue.cpp:
2934         (WebCore::DNSResolveQueue::add): Do not check whether the system is using a proxy, since
2935         this can't be determined for all ports here.
2936         (WebCore::DNSResolveQueue::timerFired): Do not check whether the system is using a proxy,
2937         since this can't be determined for all ports here.
2938         (WebCore::DNSResolveQueue::DNSResolveQueue): Remove member variables and member functions
2939         that are only needed by the CF backend. Rename platformResolve to
2940         platformMaybeResolveHost.
2941         (WebCore::DNSResolveQueue::isUsingProxy): Moved to DNSCFNet.cpp.
2942         * platform/network/DNSResolveQueue.h: Remove member variables that are only needed by the
2943         CF backend.
2944         * platform/network/cf/DNSCFNet.cpp:
2945         (WebCore::proxyIsEnabledInSystemPreferences): Renamed from
2946         platformProxyIsEnabledInSystemPreferences.
2947         (WebCore::isUsingProxy): Moved from DNSResolveQueue.cpp. The member variables removed from
2948         DNSResolveQueue are not static here. This is safe since it's a singleton.
2949         (WebCore::DNSResolveQueue::platformMaybeResolveHost): Renamed from platformResolve.
2950         Bail early from here if a proxy is configured.
2951         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Renamed to
2952         proxyIsEnabledInSystemPreferences.
2953         (WebCore::DNSResolveQueue::platformResolve): Renamed to platformMaybeResolveHost.
2954         * platform/network/soup/DNSSoup.cpp:
2955         (WebCore::gotProxySettingsCallback): Added. Call soup_session_prefetch_dns from here only
2956         if a proxy would not be used to resolve the host.
2957         (WebCore::DNSResolveQueue::platformMaybeResolveHost): Renamed from platformResolve.
2958         Look up proxy settings using g_proxy_resolver_lookup_async rather than calling
2959         soup_session_prefetch_dns directly.
2960         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences): Deleted.
2961         (WebCore::DNSResolveQueue::platformResolve): Renamed to platformMaybeResolveHost.
2962
2963 2015-06-08  Hunseop Jeong  <hs85.jeong@samsung.com>
2964
2965         Use modern for-loops in WebCore/Modules - 2
2966         https://bugs.webkit.org/show_bug.cgi?id=145541
2967
2968         Reviewed by Darin Adler.
2969
2970         No new tests, no behavior changes.
2971
2972         * Modules/mediastream/RTCConfiguration.h:
2973         (WebCore::RTCConfiguration::iceServers):
2974         * Modules/mediastream/RTCDTMFSender.cpp:
2975         (WebCore::RTCDTMFSender::scheduledEventTimerFired):
2976         * Modules/mediastream/RTCDataChannel.cpp:
2977         (WebCore::RTCDataChannel::scheduledEventTimerFired):
2978         * Modules/mediastream/RTCPeerConnection.cpp:
2979         (WebCore::processIceServer):
2980         (WebCore::RTCPeerConnection::~RTCPeerConnection):
2981         (WebCore::RTCPeerConnection::getStreamById):
2982         (WebCore::RTCPeerConnection::hasLocalStreamWithTrackId):
2983         (WebCore::RTCPeerConnection::stop):
2984         (WebCore::RTCPeerConnection::scheduledEventTimerFired):
2985         * Modules/mediastream/RTCStatsReport.cpp:
2986         (WebCore::RTCStatsReport::names):
2987         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
2988         (WebCore::initProtocolHandlerWhitelist):
2989         * Modules/speech/SpeechSynthesis.cpp:
2990         (WebCore::SpeechSynthesis::getVoices):
2991         * Modules/webaudio/AudioBuffer.cpp:
2992         (WebCore::AudioBuffer::memoryCost):
2993         * Modules/webaudio/AudioContext.cpp:
2994         (WebCore::AudioContext::createMediaStreamSource):
2995         (WebCore::AudioContext::derefFinishedSourceNodes):
2996         (WebCore::AudioContext::derefUnfinishedSourceNodes):
2997         (WebCore::AudioContext::handleDeferredFinishDerefs):
2998         (WebCore::AudioContext::handleDirtyAudioSummingJunctions):
2999         (WebCore::AudioContext::handleDirtyAudioNodeOutputs):
3000         (WebCore::AudioContext::updateAutomaticPullNodes):
3001         (WebCore::AudioContext::processAutomaticPullNodes):
3002         * Modules/webaudio/AudioNode.cpp:
3003         (WebCore::AudioNode::updateChannelsForInputs):
3004         (WebCore::AudioNode::checkNumberOfChannelsForInput):
3005         (WebCore::AudioNode::pullInputs):
3006         (WebCore::AudioNode::inputsAreSilent):
3007         (WebCore::AudioNode::silenceOutputs):
3008         (WebCore::AudioNode::unsilenceOutputs):
3009         (WebCore::AudioNode::enableOutputsIfNecessary):
3010         (WebCore::AudioNode::disableOutputsIfNecessary):
3011         (WebCore::AudioNode::finishDeref):
3012         * Modules/webaudio/AudioNodeInput.cpp:
3013         (WebCore::AudioNodeInput::numberOfChannels):
3014         (WebCore::AudioNodeInput::sumAllConnections):
3015         * Modules/webaudio/AudioNodeOutput.cpp:
3016         (WebCore::AudioNodeOutput::propagateChannelCount):
3017         (WebCore::AudioNodeOutput::disable):
3018         (WebCore::AudioNodeOutput::enable):
3019         * Modules/webaudio/AudioParam.cpp:
3020         (WebCore::AudioParam::calculateFinalValues):
3021         * Modules/webaudio/AudioParamTimeline.cpp:
3022         (WebCore::AudioParamTimeline::insertEvent):
3023         * Modules/webaudio/AudioSummingJunction.cpp:
3024         (WebCore::AudioSummingJunction::updateRenderingState):
3025         * Modules/webaudio/MediaStreamAudioSource.cpp:
3026         (WebCore::MediaStreamAudioSource::setAudioFormat):
3027         (WebCore::MediaStreamAudioSource::consumeAudio):
3028         * Modules/webaudio/WaveShaperProcessor.cpp:
3029         (WebCore::WaveShaperProcessor::setOversample):
3030         * Modules/webdatabase/DatabaseThread.cpp:
3031         (WebCore::DatabaseThread::handlePausedQueue):
3032         (WebCore::DatabaseThread::databaseThread):
3033         * Modules/webdatabase/DatabaseTracker.cpp:
3034         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
3035         (WebCore::DatabaseTracker::databaseNamesForOrigin):
3036         (WebCore::DatabaseTracker::getOpenDatabases):
3037         (WebCore::DatabaseTracker::usageForOrigin):
3038         (WebCore::DatabaseTracker::deleteAllDatabases):
3039         (WebCore::DatabaseTracker::deleteOrigin):
3040         (WebCore::DatabaseTracker::deleteDatabaseFile):
3041         (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
3042         (WebCore::DatabaseTracker::setDatabasesPaused):
3043         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
3044         (WebCore::SQLTransactionCoordinator::shutdown):
3045         * Modules/websockets/WebSocket.cpp:
3046         (WebCore::WebSocket::connect):
3047         * Modules/websockets/WebSocketExtensionDispatcher.cpp:
3048         (WebCore::WebSocketExtensionDispatcher::addProcessor):
3049         (WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
3050         (WebCore::WebSocketExtensionDispatcher::processHeaderValue):
3051         * Modules/websockets/WebSocketHandshake.cpp:
3052         (WebCore::WebSocketHandshake::clientHandshakeMessage):
3053
3054 2015-06-07  Darin Adler  <darin@apple.com>
3055
3056         REGRESSION (r181720): Unnecessary layout triggered any time animated GIF advances to a new frame
3057         https://bugs.webkit.org/show_bug.cgi?id=145733
3058
3059         Reviewed by Andreas Kling.
3060
3061         Test: fast/images/animated-gif-no-layout.html
3062
3063         * rendering/RenderImage.cpp:
3064         (WebCore::RenderImage::styleDidChange): Correctly pass ImageSizeChangeNone in cases
3065         where we don't need to report a change in intrinsic size that happened outside the
3066         repaintOrMarkForLayout function.
3067         (WebCore::RenderImage::repaintOrMarkForLayout): Move work that should only be done
3068         when size changed inside the if statement.
3069
3070         * testing/Internals.cpp:
3071         (WebCore::Internals::layoutCount): Added.
3072         * testing/Internals.h: Added layoutCount.
3073         * testing/Internals.idl: Ditto.
3074
3075 2015-06-07  Michael Catanzaro  <mcatanzaro@igalia.com>
3076
3077         Fix strncpy use in WebCore::Text::formatForDebugger
3078         https://bugs.webkit.org/show_bug.cgi?id=145608
3079
3080         Reviewed by Darin Adler.
3081
3082         r185137 replaced a call to strncpy with a call to strlcpy, which broke the build on Linux
3083         since strlcpy does not exist there. r185148 reverted this to use strncpy again, but got the
3084         size argument off by one, "introducing" a buffer overrun. But this code has always been
3085         wrong, since it used strncpy without ensuring that the buffer is null-terminated after the
3086         call to strncpy. Fix this as well.
3087
3088         * dom/Text.cpp:
3089         (WebCore::Text::formatForDebugger):
3090
3091 2015-06-07  Antti Koivisto  <antti@apple.com>
3092
3093         CrashTracer: [USER] com.apple.WebKit.WebContent.Development at com.apple.WebCore: WebCore::FrameLoader::subresourceCachePolicy const + 11
3094         https://bugs.webkit.org/show_bug.cgi?id=145736
3095         rdar://problem/21246971
3096
3097         Reviewed by David Kilzer.
3098
3099         No repro, no test.
3100
3101         * html/HTMLLinkElement.cpp:
3102         (WebCore::HTMLLinkElement::setCSSStyleSheet):
3103
3104             Null check frame. It may be null during frame teardown.
3105
3106 2015-06-06  Anders Carlsson  <andersca@apple.com>
3107
3108         Remove support from getting plug-in information from Carbon resources
3109         https://bugs.webkit.org/show_bug.cgi?id=145730
3110
3111         Reviewed by Dan Bernstein.
3112
3113         Remove a now unused function.
3114
3115         * platform/mac/WebCoreNSStringExtras.h:
3116         * platform/mac/WebCoreNSStringExtras.mm:
3117         (stringEncodingForResource): Deleted.
3118
3119 2015-06-06  Commit Queue  <commit-queue@webkit.org>
3120
3121         Unreviewed, rolling out r185284.
3122         https://bugs.webkit.org/show_bug.cgi?id=145723
3123
3124         it needs some discussion before landing (Requested by dino on
3125         #webkit).
3126
3127         Reverted changeset:
3128
3129         "[iOS] Don't force compositing layers for no-op 3D transforms
3130         on low-memory devices."
3131         https://bugs.webkit.org/show_bug.cgi?id=145719
3132         http://trac.webkit.org/changeset/185284
3133
3134 2015-06-06  Ryosuke Niwa  <rniwa@webkit.org>
3135
3136         Typing is slow in Gmail on iPads
3137         https://bugs.webkit.org/show_bug.cgi?id=145686
3138
3139         Reviewed by Enrica Casucci.
3140
3141         The bug was caused by nextCandidate and nextVisuallyDistinctCandidate traversing through each character
3142         in a text node without a renderer. Skip any node that doesn't have a renderer in both of those functions
3143         and corresponding previous* functions.
3144
3145         It's fine to skip unrendered nodes in PositionIterator because only other clients of PositionIterator
3146         are Position::upstream and Position::downstream and they don't care about un-rendered nodes either.
3147
3148         * dom/PositionIterator.cpp:
3149         (WebCore::PositionIterator::increment):
3150         (WebCore::PositionIterator::decrement):
3151         * editing/htmlediting.cpp:
3152         (WebCore::nextVisuallyDistinctCandidate):
3153         (WebCore::previousVisuallyDistinctCandidate):
3154
3155 2015-06-06  Mark Lam  <mark.lam@apple.com>
3156
3157         Returned Exception* values need to be initialized to nullptr when no exceptions are thrown.
3158         https://bugs.webkit.org/show_bug.cgi?id=145720
3159
3160         Reviewed by Dan Bernstein.
3161
3162         No new tests because this issue is already covered by the existing inspector-protocol tests.
3163
3164         * bindings/js/WorkerScriptController.cpp:
3165         (WebCore::WorkerScriptController::evaluate):
3166
3167 2015-06-05  Andreas Kling  <akling@apple.com>
3168
3169         [iOS] Don't force compositing layers for no-op 3D transforms on low-memory devices.
3170         <https://webkit.org/b/145719>
3171         <rdar://problem/19973042>
3172
3173         Reviewed by Geoffrey Garen.
3174
3175         We put elements with 3D identity transforms onto compositing layers because
3176         we anticipate that they will somehow animate in the future.
3177
3178         This can get extremely expensive, especially on low-memory devices.
3179         This patch makes WebKit stop handing out compositing layers for this kinda thing:
3180
3181             -webkit-transform: translate3d(0,0,0)
3182
3183         ..on devices with 512MB or less. This dramatically improves stability on some
3184         web pages.
3185
3186         * rendering/RenderLayerCompositor.cpp:
3187         (WebCore::RenderLayerCompositor::requiresCompositingForTransform):
3188
3189 2015-06-05  Matt Baker  <mattbaker@apple.com>
3190
3191         Web Inspector: "Other" time in the framerate table is often negative
3192         https://bugs.webkit.org/show_bug.cgi?id=145712
3193
3194         Reviewed by Timothy Hatcher.
3195
3196         The Inspector frontend flattens the timeline event tree it receives from the backend, which can contain nested
3197         paint records. The nested records represent a single paint event, but were being interpreted as two separate
3198         events for purposes of calculating total layout time. This caused the calculated "other" time to be less than
3199         it should be (and in some cases negative).
3200
3201         * inspector/InspectorTimelineAgent.cpp:
3202         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
3203         Paint records are no longer nested, we simply drop the child paint event.
3204
3205 2015-06-05  Chris Dumez  <cdumez@apple.com>
3206
3207         Unreviewed, speculative Windows build fix after r185273.
3208
3209         * platform/VNodeTracker.h:
3210
3211 2015-06-05  Chris Dumez  <cdumez@apple.com>
3212
3213         [WK2][iOS] Limit the number of vnodes used by the WebContent processes
3214         https://bugs.webkit.org/show_bug.cgi?id=145672
3215         <rdar://problem/21126637>
3216
3217         Reviewed by Antti Koivisto.
3218
3219         Limit the number of vnodes used by the WebContent processes to reduce
3220         the chance of getting killed due to the system running out of vnodes.
3221         We sometimes see the WebContent process use up to 50% of the system's
3222         vnode limit on some tests on iOS, which seems excessive. Most vnodes
3223         are due to CachedResources which are mmap'd from the WebKit disk cache
3224         and kept alive due to caches such as the Memory Cache / PageCache.
3225
3226         This patch adds tracking for the number of SharedBuffer objects that are
3227         backed by a CFDataRef as this should track most of the vnodes used by
3228         the process. The WebContent process registers a vnode pressure handler
3229         upon initialization (likely it already does for memory pressure
3230         handling). This handler gets called when the process uses over 15% of
3231         of system's vnode limit and the "critical" flag is set if it uses over
3232         20% of the system limit. The vnode pressure handler currently calls the
3233         memory pressure handler as freeing our caches (especially PageCache,
3234         MemoryCache) and doing a JS GC frees up vnodes.
3235
3236         On iPhone 6 Plus, the system limit is at 3000, which would lead to the
3237         following limits being used:
3238         soft: 450 / hard: 600
3239
3240         However, on older hardware, the system limit can be as low as 2000,
3241         which would lead to the following limits being used:
3242         soft: 300 / hard: 400
3243
3244         vnode tracking is currently only enabled on iOS because system vnode
3245         limits are usually much higher on Mac (e.g. 473695 on Mac Pro, 9984
3246         on a 2011 MacBook Air) and we normally don't get killed.
3247
3248         * WebCore.xcodeproj/project.pbxproj:
3249
3250         Add new files to the XCode project.
3251
3252         * platform/SharedBuffer.h:
3253
3254         Add a VNodeTracker::Token member next to the CFDataRef member that we
3255         initialize if the SharedBuffer is constructed from a CFDataRef.
3256
3257         * platform/VNodeTracker.cpp: Added.
3258         (WebCore::VNodeTracker::singleton):
3259         (WebCore::VNodeTracker::VNodeTracker):
3260         (WebCore::VNodeTracker::checkPressureState):
3261         (WebCore::VNodeTracker::pressureWarningTimerFired):
3262         (WebCore::VNodeTracker::nextPressureWarningInterval):
3263         (WebCore::VNodeTracker::platformInitialize):
3264         * platform/VNodeTracker.h: Added.
3265         (WebCore::VNodeTracker::setPressureHandler):
3266
3267         Add a new VNodeTracker singleton to keep track the number of vnodes
3268         used by the process since the system does not issue warnings before
3269         reaching its vnode limit. Call sites should request Tokens for
3270         every vnode they use for tracking purposes. Each process can then
3271         set a vnode pressure handler function that will be called when the
3272         process is over the designated limits.
3273
3274         * platform/cf/SharedBufferCF.cpp:
3275         (WebCore::SharedBuffer::SharedBuffer):
3276
3277         Take a VNodeToken from the VNodeTracker when constructing the
3278         SharedBuffer from a CFDataRef as these usually use mmap.
3279
3280         * platform/cocoa/VNodeTrackerCocoa.cpp: Added.
3281         (WebCore::VNodeTracker::platformInitialize):
3282
3283         Get the system's vnode limit and uses 15% of that value as soft
3284         limit for the process and 20% of that value as hard limit.
3285
3286 2015-06-05  Dean Jackson  <dino@apple.com>
3287
3288         Lingering checkbox animations when rapidly switching between views on WK1
3289         https://bugs.webkit.org/show_bug.cgi?id=145715
3290         <rdar://problem/17381121>
3291
3292         Reviewed by Simon Fraser.
3293
3294         On WK1, the NSView we use for NSButtonCells is parented in the ScrollView.
3295         Our checkbox and radiobutton animations cause AppKit to create a CALayer which
3296         is parented into that view. As we render the animations, we see the CALayer getting
3297         drawn also.
3298
3299         The fix was to use an unparented layer on WK1 when drawing these controls, the same
3300         way WK2 does. This technique may apply to all controls, but restricting it
3301         to just the buttons at the moment is less risky.
3302
3303         This only happens during the swap between a checked and non-checked state,
3304         and we have no way to test it :(
3305
3306         * platform/mac/ThemeMac.h: New optional parameter to ensuredView.
3307         * platform/mac/ThemeMac.mm:
3308         (WebCore::paintToggleButton): If we're on Yosemite or highter, use an unparented view.
3309         (WebCore::ThemeMac::ensuredView): Return either a parented or unparented view.
3310
3311 2015-06-05  Matt Rajca  <mrajca@apple.com>
3312
3313         MediaSessions should keep track of their participating media elements.
3314         https://bugs.webkit.org/show_bug.cgi?id=145703
3315
3316         Reviewed by Eric Carlson.
3317
3318         * Modules/mediasession/MediaSession.cpp:
3319         (WebCore::MediaSession::addMediaElement): Add the given media element to the media session.
3320         (WebCore::MediaSession::removeMediaElement): Remove the given media element from the media session.
3321         (WebCore::MediaSession::activeParticipatingElements): Dynamically build a vector of actively-playing media
3322           elements.
3323         * Modules/mediasession/MediaSession.h:
3324         * html/HTMLMediaElement.cpp:
3325         (WebCore::HTMLMediaElement::~HTMLMediaElement): Ensure the element is removed from its media session.
3326         (WebCore::HTMLMediaElement::setSession): Update sessions' references to their media elements.
3327
3328 2015-06-05  Chris Dumez  <cdumez@apple.com>
3329
3330         Regression(r176212): Broke app switching on iCloud.com
3331         https://bugs.webkit.org/show_bug.cgi?id=145708
3332         <rdar://problem/21235277>
3333
3334         Reviewed by Simon Fraser.
3335
3336         Roll out r176212 and follow-up fixes for now, to fix iCloud.com.
3337         We can reconsider later how to do this in a safer way.
3338
3339         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
3340         (WebCore::JSCSSStyleDeclaration::putDelegate): Deleted.
3341         (WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Deleted.
3342         * dom/Element.cpp:
3343         * dom/Element.h:
3344         * dom/ElementRareData.cpp:
3345         * dom/ElementRareData.h:
3346         (WebCore::ElementRareData::ElementRareData):
3347         (WebCore::ElementRareData::~ElementRareData): Deleted.
3348         * dom/Node.cpp:
3349         (WebCore::Node::materializeRareData):
3350         * html/HTMLCanvasElement.cpp:
3351         (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged): Deleted.
3352         * page/DOMTimer.cpp:
3353         (WebCore::DOMTimerFireState::scriptMadeNonUserObservableChanges): Deleted.
3354         (WebCore::DOMTimerFireState::scriptMadeUserObservableChanges): Deleted.
3355         (WebCore::NestedTimersMap::instanceForContext): Deleted.
3356         (WebCore::DOMTimer::install): Deleted.
3357         (WebCore::DOMTimer::fired): Deleted.
3358         (WebCore::DOMTimer::alignedFireTime): Deleted.
3359         (WebCore::DOMTimer::activeDOMObjectName): Deleted.
3360         * page/DOMTimer.h:
3361         * page/FrameView.cpp:
3362         (WebCore::FrameView::reset): Deleted.
3363         (WebCore::FrameView::viewportContentsChanged): Deleted.
3364         (WebCore::FrameView::autoSizeIfEnabled): Deleted.
3365         * page/FrameView.h:
3366
3367 2015-06-05  Myles C. Maxfield  <mmaxfield@apple.com>
3368
3369         [iOS] Emoji overlap preceeding lines
3370         https://bugs.webkit.org/show_bug.cgi?id=145678
3371         <rdar://problem/10684914>
3372
3373         Reviewed by Enrica Casucci.
3374
3375         In WebKit, we first lay out lines, and then we lay out text inside those lines. Text is vertically centered in
3376         its containing line. If the author has not specified a particular line-height, the height of a line comes from
3377         the font metrics for the primary font of the line.
3378
3379         In iOS, we were specifically hardcoding the line height metric of Apple Color Emoji to be 0. This means that,
3380         if Apple Color Emoji is the primary font for a line, and an explicit line-height was not specified, the lines
3381         are laid out with 0 height. Then, when we vertically center the text inside the line, the top half of the text
3382         overlaps the preceeding line.
3383
3384         I'm not sure exactly why were were hardcoding this value to 0, as it is surely wrong. I'm going to ask Enrica
3385         to review this patch; hopefully she knows the answer.
3386
3387         Test: fast/text/emoji.html
3388
3389         * platform/graphics/cocoa/FontCocoa.mm:
3390         (WebCore::Font::platformInit):
3391
3392 2015-06-05  Alex Christensen  <achristensen@webkit.org>
3393
3394         [Web Timing] Use new SPI to enable data collection.
3395         https://bugs.webkit.org/show_bug.cgi?id=145650
3396         rdar://problem/21203358
3397
3398         Reviewed by Chris Dumez.
3399
3400         * platform/network/cf/ResourceHandleCFNet.cpp:
3401         (WebCore::ResourceHandle::createCFURLConnection):
3402         Gather web timing data on iOS.
3403         * platform/network/mac/ResourceHandleMac.mm:
3404         (WebCore::ResourceHandle::createNSURLConnection):
3405         (WebCore::ResourceHandle::setCollectsTimingData):
3406         Gather web timing data on Mac.
3407
3408 2015-06-05  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3409
3410         [Streams API] ReadableStream should store callbacks as a Deque
3411         https://bugs.webkit.org/show_bug.cgi?id=145641
3412
3413         Reviewed by Darin Adler.
3414