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