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