Try to fix the iOS EWS build.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-06-25  Tim Horton  <timothy_horton@apple.com>
2
3         Try to fix the iOS EWS build.
4
5         * platform/spi/cocoa/SecuritySPI.h:
6
7 2015-06-25  Carlos Garcia Campos  <cgarcia@igalia.com>
8
9         [GTK] Empty gtk-font-name setting causes WebProcess crash rendering pages
10         https://bugs.webkit.org/show_bug.cgi?id=146246
11
12         Reviewed by Sergio Villar Senin.
13
14         Return early if system font is empty.
15
16         * rendering/RenderThemeGtk.cpp:
17         (WebCore::RenderThemeGtk::updateCachedSystemFontDescription):
18
19 2015-06-24  Chris Dumez  <cdumez@apple.com>
20
21         Unreviewed, EFL build fix after r185940.
22
23         Members were initialized in wrong order.
24
25         * Modules/mediastream/MediaDeviceInfo.cpp:
26         (WebCore::MediaDeviceInfo::MediaDeviceInfo):
27
28 2015-06-24  Chris Dumez  <cdumez@apple.com>
29
30         Unreviewed, Build fix after r185940.
31
32         Move implementation inside WebCore namespace.
33
34         * Modules/mediastream/MediaDeviceInfo.cpp:
35
36 2015-06-24  Chris Dumez  <cdumez@apple.com>
37
38         Unreviewed, speculative GTK build fix after 185940.
39
40         Add new cpp file to CMakeLists.txt.
41
42         * CMakeLists.txt:
43
44 2015-06-24  Matt Daiter  <mdaiter@apple.com>
45
46         Building MediaDeviceInfo for enumerateDevices
47         https://bugs.webkit.org/show_bug.cgi?id=146257
48         <rdar://problem/21513462>
49
50         Reviewed by Eric Carlson.
51
52         MediaDeviceInfo necessary for enumerateDevices
53
54         * CMakeLists.txt: Added MediaDevicesInfo.idl
55         * DerivedSources.make: Added MediaDevicesInfo.idl
56         * Modules/mediastream/MediaDeviceInfo.h: Created class for MediaDevicesInfo
57         (WebCore::MediaDeviceInfo::create): Allocates class
58         (WebCore::MediaDeviceInfo::MediaDeviceInfo): Creates class for public
59         (WebCore::MediaDeviceInfo::~MediaDeviceInfo): 
60         (WebCore::MediaDeviceInfo::label):
61         (WebCore::MediaDeviceInfo::deviceId):
62         (WebCore::MediaDeviceInfo::groupId):
63         (WebCore::MediaDeviceInfo::kind):
64         * Modules/mediastream/MediaDeviceInfo.idl:
65         * WebCore.xcodeproj/project.pbxproj:
66
67 2015-06-24  Anders Carlsson  <andersca@apple.com>
68
69         Detect view services by using the "com.apple.UIKit.vends-view-services" entitlement
70         https://bugs.webkit.org/show_bug.cgi?id=146301
71
72         Reviewed by Tim Horton.
73
74         * WebCore.xcodeproj/project.pbxproj:
75         * platform/spi/cocoa/SecuritySPI.h:
76
77 2015-06-24  Said Abou-Hallawa  <sabouhallawa@apple.com>
78
79         Add a new color -apple-wireless-playback-target-active
80         https://bugs.webkit.org/show_bug.cgi?id=146269
81         <rdar://problem/21465189>
82
83         Reviewed by Dean Jackson.
84
85         At the moment we use -apple-system-blue to indicate an Airplay route is
86         active. This might not always be blue, so we need to add another system
87         color with a name that will allow us to change the underlying color.
88         Initially -apple-wireless-playback-target-active will be an alias to
89         -apple-system-blue.
90
91         Existing tests are modified to include the new color value.
92
93         * Modules/mediacontrols/mediaControlsApple.js:
94         (Controller.prototype.updateWirelessTargetPickerButton):
95         * Modules/mediacontrols/mediaControlsiOS.css:
96         (video::-webkit-media-controls-wireless-playback-picker-button.playing):
97         Use the new color value in the media controls.
98         
99         * css/CSSParser.cpp:
100         (WebCore::isAppleLegacyCssValueKeyword): Returns true if the value keyword
101         has an '-apple' prefix which has to be replaced by '-webkit'
102         
103         (WebCore::cssValueKeywordID): Call a new function which handles all the
104         '-apple' legacy keywords.
105         
106         * css/CSSValueKeywords.in: Define the new color keyword.
107         
108         * rendering/RenderThemeIOS.mm:
109         (WebCore::RenderThemeIOS::systemColor):
110         * rendering/RenderThemeMac.mm:
111         (WebCore::RenderThemeMac::systemColor):
112         Define the value of the new color keyword to be an alias of systemBlueColor.
113
114 2015-06-24  Matt Rajca  <mrajca@apple.com>
115
116         MediaSession: propagate MediaSessionMetadata to WebPageProxy
117         https://bugs.webkit.org/show_bug.cgi?id=146282
118
119         Reviewed by Darin Adler and Tim Horton.
120
121         * Modules/mediasession/MediaSession.cpp:
122         (WebCore::MediaSession::setMetadata):
123
124 2015-06-24  Chris Dumez  <cdumez@apple.com>
125
126         Null dereference in DocumentLoader::areAllLoadersPageCacheAcceptable()
127         https://bugs.webkit.org/show_bug.cgi?id=146286
128         <rdar://problem/21523788>
129
130         Reviewed by Sam Weinig.
131
132         Add null check for the Page in areAllLoadersPageCacheAcceptable()
133         to fix this top crasher until I can investigate how this can happen.
134
135         * loader/DocumentLoader.cpp:
136         (WebCore::areAllLoadersPageCacheAcceptable):
137
138 2015-06-24  Anders Carlsson  <andersca@apple.com>
139
140         Move PluginMainThreadScheduler to WebKit/win
141         https://bugs.webkit.org/show_bug.cgi?id=146289
142
143         Reviewed by Tim Horton.
144
145         * CMakeLists.txt:
146         * Configurations/WebCore.xcconfig:
147         * WebCore.vcxproj/WebCore.vcxproj:
148         * WebCore.vcxproj/WebCore.vcxproj.filters:
149         * WebCore.xcodeproj/project.pbxproj:
150         * plugins/PluginMainThreadScheduler.cpp:
151         (WebCore::PluginMainThreadScheduler::scheduler): Deleted.
152         (WebCore::PluginMainThreadScheduler::PluginMainThreadScheduler): Deleted.
153         (WebCore::PluginMainThreadScheduler::scheduleCall): Deleted.
154         (WebCore::PluginMainThreadScheduler::registerPlugin): Deleted.
155         (WebCore::PluginMainThreadScheduler::unregisterPlugin): Deleted.
156         (WebCore::PluginMainThreadScheduler::dispatchCallsForPlugin): Deleted.
157         (WebCore::PluginMainThreadScheduler::dispatchCalls): Deleted.
158         (WebCore::PluginMainThreadScheduler::mainThreadCallback): Deleted.
159         * plugins/PluginMainThreadScheduler.h:
160         (WebCore::PluginMainThreadScheduler::Call::Call): Deleted.
161         (WebCore::PluginMainThreadScheduler::Call::performCall): Deleted.
162
163 2015-06-24  Dean Jackson  <dino@apple.com>
164
165         Better fix for Element with blur backdrop-filter shows edge duplication and dark edges
166         https://bugs.webkit.org/show_bug.cgi?id=146287
167         <rdar://problem/21530437>
168
169         Reviewed by Simon Fraser.
170
171         There is no need to carry around a bit in FilterOperations indicating what
172         type of source property the object came from. Whether or not to clip to the
173         bounds of the filter region is purely a property of the type of CALayer
174         we are applying the filter to.
175
176         This basically reverts r185846.
177
178         Covered by the test for the previous commit.
179
180         * css/CSSPropertyNames.in:
181         * css/StyleBuilderConverter.h:
182         (WebCore::StyleBuilderConverter::convertBackdropFilterOperations): Deleted.
183         * page/animation/CSSPropertyAnimation.cpp:
184         (WebCore::blendFilterOperations): Deleted.
185         * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Set the normalized
186         edges property if we are a CABackdropLayer.
187         * platform/graphics/filters/FilterOperations.cpp:
188         (WebCore::FilterOperations::operator==):
189         (WebCore::FilterOperations::operationsMatch):
190         (WebCore::FilterOperations::operator=): Deleted.
191         * platform/graphics/filters/FilterOperations.h:
192         (WebCore::FilterOperations::isUsedForBackdropFilters): Deleted.
193         (WebCore::FilterOperations::setUsedForBackdropFilters): Deleted.
194
195 2015-06-24  Doug Russell  <d_russell@apple.com>
196
197         Bug 146177 - AX: AXObjectCache should try to use an unignored accessibilityObject 
198         when posting a selection notification when on the border between two accessibilityObjects
199         https://bugs.webkit.org/show_bug.cgi?id=146177
200
201         Reviewed by Darin Adler.
202
203         Add support for position to be passed for selection changes to allow checking.
204         for boundaries in the case of ignored elements.
205         Add support for searching for unignored siblings of AccessibilityObjects.
206         Include AccessibilityObject wrappers in notifications for tests.
207
208         Test: platform/mac/accessibility/selection-element-tabbing-to-link.html
209
210         * accessibility/AXObjectCache.cpp:
211         (WebCore::AXObjectCache::postTextStateChangeNotification):
212         * accessibility/AXObjectCache.h:
213         * accessibility/AccessibilityObject.cpp:
214         (WebCore::AccessibilityObject::previousSiblingUnignored):
215         (WebCore::AccessibilityObject::nextSiblingUnignored):
216         * accessibility/AccessibilityObject.h:
217         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
218         (isValueTypeSupported):
219         (arrayRemovingNonSupportedTypes):
220         (dictionaryRemovingNonSupportedTypes):
221         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
222         * editing/mac/FrameSelectionMac.mm:
223         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
224
225 2015-06-24  Anders Carlsson  <andersca@apple.com>
226
227         Enable -Winconsistent-missing-override when building with Xcode
228         https://bugs.webkit.org/show_bug.cgi?id=146288
229
230         Reviewed by Sam Weinig.
231
232         * Configurations/Base.xcconfig:
233         * Modules/encryptedmedia/MediaKeySession.h:
234         * Modules/webdatabase/DatabaseTask.h:
235         * html/DateTimeLocalInputType.h:
236         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
237         * page/scrolling/mac/ScrollingCoordinatorMac.h:
238         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
239         (WebCore::MediaPlayerPrivateAVFoundation::platformLayer): Deleted.
240         (WebCore::MediaPlayerPrivateAVFoundation::supportsScanning): Deleted.
241         (WebCore::MediaPlayerPrivateAVFoundation::fileSize): Deleted.
242         (WebCore::MediaPlayerPrivateAVFoundation::engineDescription): Deleted.
243         (WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode): Deleted.
244         (WebCore::MediaPlayerPrivateAVFoundation::notifyTrackModeChanged): Deleted.
245         * platform/graphics/avfoundation/VideoTrackPrivateAVF.h:
246         (WebCore::VideoTrackPrivateAVF::trackIndex): Deleted.
247         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
248         (WebCore::CDMSessionAVFoundationObjC::type): Deleted.
249         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
250         (WebCore::CDMSessionMediaSourceAVFObjC::type): Deleted.
251         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
252         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsAcceleratedRendering): Deleted.
253         (WebCore::MediaPlayerPrivateAVFoundationObjC::canPlayToWirelessPlaybackTarget): Deleted.
254         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
255         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCredential): Deleted.
256         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToContinueWithoutCredential): Deleted.
257         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedCancellation): Deleted.
258         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedRequestToPerformDefaultHandling): Deleted.
259         (WebCore::WebCoreNSURLAuthenticationChallengeClient::receivedChallengeRejection): Deleted.
260         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
261         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Deleted.
262         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
263         (WebCore::MediaPlayerPrivateQTKit::supportsScanning): Deleted.
264         (WebCore::MediaPlayerPrivateQTKit::networkState): Deleted.
265         (WebCore::MediaPlayerPrivateQTKit::readyState): Deleted.
266         (WebCore::MediaPlayerPrivateQTKit::maximumDurationToCacheMediaTime): Deleted.
267         (WebCore::MediaPlayerPrivateQTKit::engineDescription): Deleted.
268         * platform/mac/ScrollAnimatorMac.h:
269         * platform/mac/SerializedPlatformRepresentationMac.h:
270         (WebCore::SerializedPlatformRepresentationMac::platformType): Deleted.
271         * platform/mac/ThemeMac.h:
272         (WebCore::ThemeMac::controlRequiresPreWhiteSpace): Deleted.
273         * testing/MockCDM.cpp:
274         (WebCore::MockCDMSession::setClient): Deleted.
275
276 2015-06-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
277
278         Improve JSDOMPromise callPromiseFunction naming
279         https://bugs.webkit.org/show_bug.cgi?id=146280
280
281         Unreviewed.
282
283         No change in behavior.
284
285         * bindings/js/JSDOMPromise.h:
286         (WebCore::callPromiseFunction):
287
288 2015-06-24  Tim Horton  <timothy_horton@apple.com>
289
290         REGRESSION (r185804): Crash selecting time in the form on https://backup.brighthorizons.com/BackupCareRequest.aspx
291         <rdar://problem/21525376>
292
293         Reviewed by Sam Weinig.
294
295         * page/TextIndicator.cpp:
296         (WebCore::TextIndicator::createWithRange):
297         Null check.
298
299 2015-06-24  Zalan Bujtas  <zalan@apple.com>
300
301         Subpixel rendering: roundToDevicePixel() snaps to wrong value.
302         https://bugs.webkit.org/show_bug.cgi?id=146273
303         rdar://problem/18509840
304
305         Reviewed by Simon Fraser.
306
307         Due to the floating point approximate representation, we can't always produce
308         the correct snap value. This patch addresses the issue by removing redundant kFixedPointDenominator multiplication
309         and by changing the rounding in roundToDevicePixel() from float to double.
310
311         API test is added.
312
313         * platform/LayoutUnit.h:
314         (WebCore::roundToDevicePixel):
315
316 2015-06-23  Matt Rajca  <mrajca@apple.com>
317
318         MediaSession: Support setting of metadata
319         https://bugs.webkit.org/show_bug.cgi?id=146253
320
321         Reviewed by Eric Carlson.
322
323         * Modules/mediasession/MediaSession.cpp:
324         (WebCore::MediaSession::MediaSession): Store a reference to the document so we can use it in setMetadata.
325         (WebCore::MediaSession::setMetadata): Implemented as described in the Media Session spec.
326         * Modules/mediasession/MediaSession.h:
327         * Modules/mediasession/MediaSession.idl: Added the setMetadata method.
328         * Modules/mediasession/MediaSessionMetadata.h:
329         (WebCore::MediaSessionMetadata::MediaSessionMetadata): Added to keep track of media session metadata.
330         (WebCore::MediaSessionMetadata::title):
331         (WebCore::MediaSessionMetadata::artist):
332         (WebCore::MediaSessionMetadata::album):
333         (WebCore::MediaSessionMetadata::artworkURL):
334         * WebCore.xcodeproj/project.pbxproj: Added MediaSessionMetadata.h.
335
336 2015-06-24  Daniel Bates  <dabates@apple.com>
337
338         Content Security Policy error message when frame load is blocked does not read well
339         https://bugs.webkit.org/show_bug.cgi?id=146279
340
341         Reviewed by Csaba Osztrogonác.
342
343         Substitute "Refused to load frame" for "Refused to frame" as the prefix of the error message
344         emitted when the Content Security Policy of the page blocks a frame load.
345
346         * page/ContentSecurityPolicy.cpp:
347         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
348
349 2015-06-11  Sergio Villar Senin  <svillar@igalia.com>
350
351         intrinsic size keywords don't work for heights
352         https://bugs.webkit.org/show_bug.cgi?id=113610
353
354         Reviewed by Darin Adler.
355
356         Based on Blink's r148314 & r150355 by <cbiesinger@chromium.org>.
357
358         Adds intrinsic values support to heigh & min/max-height. This involves the
359         following changes:
360         - RenderBox needs to pass the content height through to computeLogicalHeight and
361         related functions, which needs it to resolve max-content, et. al.
362         - Make the callers pass the content height to this function. Some callers pass
363         logicalHeight() (adjusted for border/padding) which works because if
364         logicalHeight is not the content height, then it is the height we ended up using,
365         so the constrain* functions will just constrain to that value again.
366         - Parsing code needs to be adjusted to support intrinsic values for heights.
367
368         Tests: fast/css-intrinsic-dimensions/height-css-tables-collapsed.html
369                fast/css-intrinsic-dimensions/height-css-tables.html
370                fast/css-intrinsic-dimensions/height-flexbox.html
371                fast/css-intrinsic-dimensions/height-positioned-replaced.html
372                fast/css-intrinsic-dimensions/height-positioned.html
373                fast/css-intrinsic-dimensions/height-replaced.html
374                fast/css-intrinsic-dimensions/height-tables-collapsed.html
375                fast/css-intrinsic-dimensions/height-tables.html
376                fast/css-intrinsic-dimensions/height.html
377
378         * css/CSSParser.cpp:
379         (WebCore::CSSParser::isValidSize): Refactored from validateWidth and
380         validateHeight.
381         (WebCore::CSSParser::parseValue):
382         (WebCore::CSSParser::validateWidth): Deleted.
383         (WebCore::CSSParser::validateHeight): Deleted.
384         * css/CSSParser.h:
385         * platform/Length.h:
386         (WebCore::Length::isFillAvailable):
387         (WebCore::Length::isFitContent):
388         * rendering/RenderBox.cpp:
389         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
390         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
391         (WebCore::RenderBox::computeLogicalHeight):
392         (WebCore::RenderBox::computeLogicalHeightUsing):
393         (WebCore::RenderBox::computeContentLogicalHeight):
394         (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
395         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
396         (WebCore::RenderBox::computePercentageLogicalHeight):
397         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
398         (WebCore::RenderBox::availableLogicalHeight):
399         (WebCore::RenderBox::availableLogicalHeightUsing):
400         (WebCore::RenderBox::computePositionedLogicalHeight):
401         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
402         * rendering/RenderBox.h:
403         * rendering/RenderFlexibleBox.cpp:
404         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
405         (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
406         * rendering/RenderFlowThread.cpp:
407         (WebCore::RenderFlowThread::addForcedRegionBreak):
408         * rendering/RenderGrid.cpp:
409         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
410         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
411         * rendering/RenderMultiColumnSet.cpp:
412         (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
413         * rendering/RenderReplaced.cpp:
414         (WebCore::RenderReplaced::hasReplacedLogicalHeight):
415         * rendering/RenderTable.cpp:
416         (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
417         (WebCore::RenderTable::layout):
418
419 2015-06-24  Commit Queue  <commit-queue@webkit.org>
420
421         Unreviewed, rolling out r185906.
422         https://bugs.webkit.org/show_bug.cgi?id=146276
423
424         MSVC doesn't yet provide a const-qualified std::array<T,
425         N>::size(), failing to compile the static_assert (Requested by
426         zdobersek on #webkit).
427
428         Reverted changeset:
429
430         "Improve the source code generated by make_names.pl"
431         https://bugs.webkit.org/show_bug.cgi?id=146208
432         http://trac.webkit.org/changeset/185906
433
434 2015-06-24  Zan Dobersek  <zdobersek@igalia.com>
435
436         Improve the source code generated by make_names.pl
437         https://bugs.webkit.org/show_bug.cgi?id=146208
438
439         Reviewed by Darin Adler.
440
441         Clean up and optimize the output that's generated by the make_names.pl script
442         when generating large sets of DOM names for attributes and tags.
443
444         The GenerateStrings() function in the StaticString.pm module is split into
445         GenerateStringData() and GenerateASCIILiteral() so that the two new functions
446         can be used independently, with the original function still being called when
447         generating font names.
448
449         Tags and attributes have the corresponding static QualifiedName globals defined
450         as before. After that, two static const std::array<> objects are defined for
451         both types -- the first is an ordered array of addresses of the QualifiedName
452         objects (corresponding to the C array that was defined in getHTMLTags(),
453         getSVGAttrs() etc.), and the second is an ordered array of StringImpl::StaticASCIILiteral
454         objects that replaces separately defined StringImpl::StaticASCIILiteral objects
455         and the additional tables that contained pairs of QualifiedName object addresses
456         and the corresponding StaticASCIILiteral object references in the init() function.
457         This is all generated by the printStaticData() function in make_names.pl.
458
459         The printQualifiedNameCreation() function generates a static_assert() that ensures
460         that the corresponding std::array<QualifiedName*> and std::array<StaticASCIILiteral>
461         objects have the same amount of items, and then sets up a loop that walks through
462         the two arrays and properly constructs the QualifiedName objects from the static
463         literal data.
464
465         On the GTK port, this shaves off ~54kB from the final stripped shared library
466         on a 64-bit build, and ~21kB on a 32-bit build.
467
468         * bindings/scripts/StaticString.pm:
469         (GenerateStringData):
470         (GenerateASCIILiteral):
471         (GenerateStrings):
472         * dom/make_names.pl:
473         (printCppHead):
474         (printNamesCppFile):
475         (printStaticData):
476         (printQualifiedNameCreation):
477         (printInit): Deleted.
478         (printDefinitions): Deleted.
479
480 2015-06-24  Youenn Fablet  <youenn.fablet@crf.canon.fr>
481
482         Refactor UserMediaRequest to share more codes between MediaDevices.getUserMedia and legacy webkitGetUserMedia
483         https://bugs.webkit.org/show_bug.cgi?id=146237
484
485         Reviewed by Darin Adler.
486
487         Covered by existing tests, no change in behavior.
488
489         * Modules/mediastream/MediaConstraintsImpl.cpp:
490         (WebCore::MediaConstraintsImpl::create): Simplified error handling by removing exception code parameter.
491         * Modules/mediastream/MediaConstraintsImpl.h: Ditto.
492         * Modules/mediastream/MediaDevices.cpp:
493         (WebCore::MediaDevices::getUserMedia): Removed code now in UserMediaRequest::start.
494         * Modules/mediastream/NavigatorUserMedia.cpp:
495         (WebCore::NavigatorUserMedia::webkitGetUserMedia): Ditto.
496         * Modules/mediastream/UserMediaRequest.cpp:
497         (WebCore::parseOptions): Simplified error handling by removing exception code parameter.
498         (WebCore::UserMediaRequest::start): Renamed create in start and added common code.
499         * Modules/mediastream/UserMediaRequest.h:
500
501 2015-06-23  Andreas Kling  <akling@apple.com>
502
503         Should reduce tile coverage for the first paint after a tab switch.
504         <https://webkit.org/b/146252>
505         <rdar://problem/19821583>
506
507         Reviewed by Darin Adler.
508
509         Reduce the number of tiles we need to paint after switching tabs,
510         to shorten the time it takes before we can flush pixels to screen.
511
512         We accomplish this by piggybacking on the "speculative tiling enabled"
513         mode of FrameView, which was previously only used to throttle painting
514         and layer flushes during page load.
515
516         When a FrameView becomes visible, which is what happens when you
517         switch to its tab, we revert the speculative tiling optimization to
518         its initial state, and reset the "scrolled by user" flag.
519
520         In practice this means that after switching tabs, we only generate
521         enough tiles to fill the viewport. Then, after 500ms has passed
522         or the user scrolls the page, we go back to the usual speculative
523         tiling mode.
524
525         * page/FrameView.cpp:
526         (WebCore::FrameView::show):
527
528 2015-06-23  Anders Carlsson  <andersca@apple.com>
529
530         Remove windowResizerRect code, nobody is using it anymore
531         https://bugs.webkit.org/show_bug.cgi?id=146265
532
533         Reviewed by Beth Dakin.
534
535         * loader/EmptyClients.h:
536         * page/Chrome.cpp:
537         (WebCore::Chrome::windowResizerRect): Deleted.
538         * page/Chrome.h:
539         * page/ChromeClient.h:
540         * page/FrameView.cpp:
541         (WebCore::FrameView::windowResizerRect): Deleted.
542         * page/FrameView.h:
543         * platform/ScrollView.cpp:
544         (WebCore::ScrollView::ScrollView): Deleted.
545         (WebCore::ScrollView::windowResizerRectChanged): Deleted.
546         (WebCore::ScrollView::containsScrollbarsAvoidingResizer): Deleted.
547         (WebCore::ScrollView::adjustScrollbarsAvoidingResizerCount): Deleted.
548         (WebCore::ScrollView::setParent): Deleted.
549         * platform/ScrollView.h:
550         (WebCore::ScrollView::windowResizerRect): Deleted.
551         * platform/Scrollbar.cpp:
552         (WebCore::Scrollbar::Scrollbar): Deleted.
553         (WebCore::Scrollbar::setFrameRect): Deleted.
554         (WebCore::Scrollbar::setParent): Deleted.
555         * platform/Scrollbar.h:
556
557 2015-06-23  Dean Jackson  <dino@apple.com>
558
559         Media controls are missing the white backdrop in UIWebViews
560         https://bugs.webkit.org/show_bug.cgi?id=146251
561         <rdar://problem/20181345>
562
563         Reviewed by Simon Fraser.
564
565         Implement two new CALayer subclasses that explicitly set
566         something that resembles the system appearance for
567         media-controls-dark-bar-background and media-controls-light-bar-background.
568         This way, WebKit1 clients get a visible result.
569
570         Creating the actual system recipes is tracked by:
571         https://bugs.webkit.org/show_bug.cgi?id=146250
572
573         * WebCore.xcodeproj/project.pbxproj: Add new files.
574         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
575         (PlatformCALayerCocoa::PlatformCALayerCocoa): Use the new CALayer subclasses for
576         the appropriate layer types.
577         * platform/graphics/ca/cocoa/WebSystemBackdropLayer.h: Added.
578         * platform/graphics/ca/cocoa/WebSystemBackdropLayer.mm: Added.
579         (-[WebLightSystemBackdropLayer init]):
580         (-[WebLightSystemBackdropLayer setBackgroundColor:]): Only set to a light grey.
581         (-[WebDarkSystemBackdropLayer init]):
582         (-[WebDarkSystemBackdropLayer setBackgroundColor:]): Only set to a dark grey.
583
584 2015-06-18  Matt Rajca  <mrajca@apple.com>
585
586         Support releasing media sessions
587         https://bugs.webkit.org/show_bug.cgi?id=146132
588
589         Reviewed by Darin Adler.
590
591         * Modules/mediasession/MediaSession.cpp: Implemented as described in the Media Session spec.
592         (WebCore::MediaSession::releaseSession):
593         (WebCore::MediaSession::releaseInternal):
594         * Modules/mediasession/MediaSession.h:
595
596 2015-06-23  Chris Fleizach  <cfleizach@apple.com>
597
598         AX: iOS: VoiceOver and ARIA: has popup property not announced
599         https://bugs.webkit.org/show_bug.cgi?id=146188
600
601         Reviewed by Darin Adler.
602
603         Expose the existing "has popup" property to the iOS Accessibility API.
604
605         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
606         (-[WebAccessibilityObjectWrapper accessibilityHasPopup]):
607
608 2015-06-23  Javier Fernandez  <jfernandez@igalia.com>
609
610         [CSS Grid Layout] Performance optimization: avoid computing overflow alignment if not needed
611         https://bugs.webkit.org/show_bug.cgi?id=146231
612
613         Reviewed by Sergio Villar Senin.
614
615         We don't need to apply any overflow handling if alignment value don't have a potential
616         risk of data loss, as it's the case of 'start' value.
617
618         This patch avoid computing the overflow in all the cases, since it adds an unneeded
619         overhead which affects performance.
620
621         New code improves performance around 3%-8%, depending on the grid tests.
622
623         No new tests, no new funcitonality.
624
625         * rendering/RenderGrid.cpp:
626         (WebCore::RenderGrid::rowPositionForChild):
627         (WebCore::RenderGrid::columnPositionForChild):
628
629 2015-06-23  Youenn Fablet  <youenn.fablet@crf.canon.fr>
630
631         MediaDevices.getUserMedia should migrate from callbacks to DOMPromise
632         https://bugs.webkit.org/show_bug.cgi?id=146200
633
634         Reviewed by Darin Adler.
635
636         Introduced DOMPromiseWithCallback to resolve/reject promises while allowing promise clients to use a typed callback approach.
637         Migrated MediaDevices.getUserMedia from callbacks to DOMPromiseWithCallback.
638         Removed MediaDevices.getUserMedia custom binding.
639
640         Covered by existing tests.
641
642         * CMakeLists.txt: Removing custom binding.
643         * Modules/mediastream/MediaDevices.cpp:
644         (WebCore::MediaDevices::getUserMedia): Moving from callback to promise.
645         * Modules/mediastream/MediaDevices.h: Ditto.
646         * Modules/mediastream/MediaDevices.idl: Removing custom binding.
647         * Modules/mediastream/NavigatorUserMedia.cpp:
648         (WebCore::NavigatorUserMedia::webkitGetUserMedia): Converting from promise callback to API callbacks.
649         * Modules/mediastream/UserMediaRequest.cpp:
650         (WebCore::UserMediaRequest::create): Moving from callback to promise.
651         (WebCore::UserMediaRequest::UserMediaRequest): Ditto.
652         (WebCore::UserMediaRequest::didCreateStream): Ditto.
653         (WebCore::UserMediaRequest::failedToCreateStreamWithConstraintsError): Ditto.
654         (WebCore::UserMediaRequest::failedToCreateStreamWithPermissionError): Ditto.
655         * Modules/mediastream/UserMediaRequest.h: Ditto.
656         * bindings/js/JSDOMPromise.h: Introducing DOMPromiseWithCallback and removing crypto specific header.
657         (WebCore::DOMPromiseWithCallback::DOMPromiseWithCallback):
658         (WebCore::Error>::resolve):
659         (WebCore::Error>::reject):
660         * bindings/js/JSMediaDevicesCustom.cpp: Removed.
661         * bindings/js/JSSubtleCryptoCustom.cpp: Updating headers.
662
663 2015-06-23  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
664
665         [Streams API] Implement ReadableStream js source "'cancel" callback
666         https://bugs.webkit.org/show_bug.cgi?id=146204
667
668         Reviewed by Darin Adler.
669
670         Calling "cancel" JS function when web app is cancelling a JS readable stream.
671         Handling of promise returned value in case of async cancel.
672
673         Covered by rebased tests.
674
675         * bindings/js/ReadableJSStream.cpp:
676         (WebCore::ReadableJSStream::invoke): Refactoring to pass cancel reason or controller to the JS function.
677         (WebCore::ReadableJSStream::doStart): Ditto.
678         (WebCore::startReadableStreamAsync): Renaming readableStream as protectedStream.
679         (WebCore::createPullResultFulfilledFunction): Ditto.
680         (WebCore::ReadableJSStream::doPull): Refactoring to pass cancel reason or controller to the JS function.
681         (WebCore::createCancelResultFulfilledFunction): Cancel promise fullfil callback.
682         (WebCore::createCancelResultRejectedFunction): Cancel promise reject callback.
683         (WebCore::ReadableJSStream::doCancel): Calling cancel JS callback and handling promise returned value.
684         * bindings/js/ReadableJSStream.h: Refactoring to pass cancel reason or controller to the JS function.
685
686 2015-06-22  Ryuan Choi  <ryuan.choi@navercorp.com>
687
688         [EFL] Hyphenation is not supported
689         https://bugs.webkit.org/show_bug.cgi?id=89830
690
691         Reviewed by Gyuyoung Kim.
692
693         Share libHyphen backend of GTK port.
694
695         Rebased fast/text/hyphenate-*.html
696
697         * PlatformEfl.cmake:
698         * PlatformGTK.cmake:
699         * platform/efl/FileSystemEfl.cpp:
700         (WebCore::listDirectory): Deleted because of lack of functionality.
701         eina_file_ls returns full directory path so fnmatch fails to check dict file.
702         This patch reuse Posix implementation instead of EFL port specific function.
703         * platform/posix/FileSystemPOSIX.cpp: Ditto.
704         * platform/text/gtk/HyphenationLibHyphen.cpp: Moved to platform/text/hyphen
705         * platform/text/hyphen/HyphenationLibHyphen.cpp:
706         Renamed from Source/WebCore/platform/text/gtk/HyphenationLibHyphen.cpp.
707         (WebCore::scanTestDictionariesDirectoryIfNecessary):
708         Added PLATFORM guard and EFL implementation for the test directory
709
710 2015-06-22  Chris Dumez  <cdumez@apple.com>
711
712         [WK1] WebAllowDenyPolicyListener.denyOnlyThisRequest() should not start a new permission request
713         https://bugs.webkit.org/show_bug.cgi?id=146228
714         <rdar://problem/15179262>
715
716         Reviewed by Daniel Bates.
717
718         Add Geolocation::resetIsAllowed() API that merely resets
719         m_allowGeolocation to Unknown, so that we will request the permission
720         again the next time a position is requested.
721
722         * Modules/geolocation/Geolocation.h:
723         (WebCore::Geolocation::resetIsAllowed):
724
725 2015-06-22  Simon Fraser  <simon.fraser@apple.com>
726
727         ASSERT(!m_zOrderListsDirty) when mousing over web view with incremental rendering suppressed
728         https://bugs.webkit.org/show_bug.cgi?id=146225
729
730         Reviewed by Zalan Bujtas.
731
732         Update RenderLayer's z-order lists when hit testing. There's no guarantee that they've
733         been updated; this happens to work most of the time because painting updates them,
734         but if incremental rendering is suppressed, we may not have painted yet.
735         
736         Easy to hit on webkit.org in MiniBrowser, but I wasn't able to make a reduced testcase.
737
738         * rendering/RenderLayer.cpp:
739         (WebCore::RenderLayer::hitTest):
740         (WebCore::RenderLayer::updateLayerListsIfNeeded): Flip the order of the tests, since checking
741         dirty bits is cheaper than calling isStackingContext().
742
743 2015-06-22  Dean Jackson  <dino@apple.com>
744
745         Rename PlatformCA*Mac to PlatformCA*Cocoa
746         https://bugs.webkit.org/show_bug.cgi?id=146224
747         <rdar://problem/21497182>
748
749         Reviewed by Simon Fraser.
750
751         Rename PlatformCALayerMac and related files in platform/graphics/ca/mac
752         to the more accurate Cocoa suffix.
753
754         * WebCore.xcodeproj/project.pbxproj:
755         * page/mac/ServicesOverlayController.mm:
756         * platform/graphics/ca/GraphicsLayerCA.cpp:
757         * platform/graphics/ca/PlatformCAAnimation.h:
758         * platform/graphics/ca/PlatformCALayer.h:
759         * platform/graphics/ca/cocoa/LayerFlushSchedulerMac.cpp: Renamed from Source/WebCore/platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp.
760         * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.h.
761         * platform/graphics/ca/cocoa/PlatformCAAnimationCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAAnimationMac.mm.
762         * platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCAFiltersMac.mm.
763         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.h.
764         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/PlatformCALayerMac.mm.
765         * platform/graphics/ca/cocoa/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.h.
766         * platform/graphics/ca/cocoa/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTiledBackingLayer.mm.
767         * platform/graphics/ca/mac/LayerFlushSchedulerMac.cpp:
768         * platform/graphics/ca/mac/PlatformCAAnimationMac.mm:
769         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm:
770         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
771         * platform/graphics/ca/mac/WebTiledBackingLayer.mm:
772
773 2015-06-22  Alex Christensen  <achristensen@webkit.org>
774
775         [cssjit] Disable compiling scrollbar pseudoclass selectors
776         https://bugs.webkit.org/show_bug.cgi?id=146220
777
778         Reviewed by Benjamin Poulain.
779
780         * cssjit/SelectorCompiler.cpp:
781         (WebCore::SelectorCompiler::addScrollbarPseudoClassType):
782         Don't compile selectors with scrollbar pseudoclasses.
783
784 2015-06-22  Simon Fraser  <simon.fraser@apple.com>
785
786         -webkit-clip-path clips incorrectly if the element bounds go beyond the top edge of the page
787         https://bugs.webkit.org/show_bug.cgi?id=146218
788         rdar://problem/21127840
789
790         Reviewed by Zalan Bujtas.
791
792         The clip path is computed using the RenderLayer's bounding box, so needs to be offset
793         by the offsetFromRenderer when set on the mask layer.
794
795         Test: compositing/masks/compositing-clip-path-origin.html
796
797         * rendering/RenderLayerBacking.cpp:
798         (WebCore::RenderLayerBacking::updateMaskingLayerGeometry):
799
800 2015-06-22  Michael Catanzaro  <mcatanzaro@igalia.com>
801
802         Web sockets should be treated as active mixed content
803         https://bugs.webkit.org/show_bug.cgi?id=140624
804
805         Reviewed by Sam Weinig.
806
807         Tests: http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
808                http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame.html
809
810         * Modules/websockets/WebSocket.cpp:
811         (WebCore::WebSocket::connect): Block ws:// WebSocket connections from https:// pages, and
812         emit the onerror event after doing so.
813         * platform/SchemeRegistry.cpp:
814         (WebCore::secureSchemes): Add wss:// to the list of secure schemes.
815
816 2015-06-22  Dean Jackson  <dino@apple.com>
817
818         Element with blur backdrop-filter shows edge duplication and dark edges
819         https://bugs.webkit.org/show_bug.cgi?id=146215
820         <rdar://problem/20367695>
821
822         Reviewed by Tim Horton.
823
824         The input images to backdrop filters should duplicate their edge pixels
825         outwards, rather than using transparent pixels. This is a flag we
826         set on the Gaussian blur, but means we have to remember if the
827         FilterOperations list came from a regular filter or a backdrop filter.
828
829         Test: css3/filters/backdrop/blur-input-bounds.html
830
831         * css/CSSPropertyNames.in: New custom convertor for backdrop-filter.
832         * css/StyleBuilderConverter.h:
833         (WebCore::StyleBuilderConverter::convertBackdropFilterOperations): New convertor
834         that sets the backdrop flag, but is otherwise the same as a normal filter
835         convertor.
836         * page/animation/CSSPropertyAnimation.cpp:
837         (WebCore::blendFilterOperations): Inherit the backdrop flag if either of our
838         inputs has it.
839         * platform/graphics/ca/mac/PlatformCAFiltersMac.mm: Set the inputNormalizeEdges
840         key on the CAFilter if necessary.
841         * platform/graphics/filters/FilterOperations.cpp: Add a new flag indicating if
842         these operations are intended for backdrops.
843         (WebCore::FilterOperations::operator=):
844         (WebCore::FilterOperations::operator==):
845         * platform/graphics/filters/FilterOperations.h:
846         (WebCore::FilterOperations::isUsedForBackdropFilters):
847         (WebCore::FilterOperations::setUsedForBackdropFilters):
848
849 2015-06-22  Tim Horton  <timothy_horton@apple.com>
850
851         [TextIndicator] Text shifts one pixel to the left when I force click to bring up Lookup in Mail messages
852         https://bugs.webkit.org/show_bug.cgi?id=146214
853         <rdar://problem/20782970>
854
855         Reviewed by Dean Jackson.
856
857         * page/mac/TextIndicatorWindow.mm:
858         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
859         (WebCore::TextIndicatorWindow::setTextIndicator):
860         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]): Deleted.
861         When the WebView is at a nonintegral position, we can end up needing a TextIndicator
862         with a nonintegral position. We need to round the window position, so we need to apply
863         the fractional part to the indicator layers inside, not to the window.
864
865 2015-06-22  Myles C. Maxfield  <mmaxfield@apple.com>
866
867         [iOS] Arabic text styled with Georgia is rendered as boxes
868         https://bugs.webkit.org/show_bug.cgi?id=145681
869         <rdar://problem/21169844>
870
871         Reviewed by Darin Adler.
872
873         Georgia doesn't support Arabic, so we ask CoreText what font does support Arabic. It returns
874         TimesNewRomanPSMT. However, WebKit explicitly disallows this font on iOS. Therefore, instead
875         of using TimesNewRomanPSMT, we will simply just use GeezaPro.
876
877         Test: fast/text/arabic-times-new-roman.html
878
879         * platform/graphics/ios/FontCacheIOS.mm:
880         (WebCore::FontCache::systemFallbackForCharacters):
881         * platform/graphics/Font.h: Let FontCacheIOS call fontFamilyShouldNotBeUsedForArabic()
882         * platform/graphics/cocoa/FontCocoa.mm:
883         (WebCore::fontFamilyShouldNotBeUsedForArabic):
884
885 2015-06-22  Alex Christensen  <achristensen@webkit.org>
886
887         Unreviewed non-mac debug build fix after r185840.
888
889         * loader/ResourceLoader.cpp:
890         (WebCore::ResourceLoader::willSendRequest):
891         Added enable flag around assertion.
892
893 2015-06-20  Alex Christensen  <achristensen@webkit.org>
894
895         [Content Extensions] Add SPI to reload without content blocking.
896         https://bugs.webkit.org/show_bug.cgi?id=146128
897         rdar://problem/20351903
898
899         Reviewed by Sam Weinig.
900
901         * html/HTMLMediaElement.cpp:
902         (WebCore::HTMLMediaElement::loadResource):
903         * loader/ResourceLoader.cpp:
904         (WebCore::ResourceLoader::willSendRequest):
905         * loader/cache/CachedResourceLoader.cpp:
906         (WebCore::CachedResourceLoader::requestResource):
907         * page/DOMWindow.cpp:
908         (WebCore::DOMWindow::open):
909         * page/Page.h:
910         (WebCore::Page::userContentController):
911         (WebCore::Page::userContentExtensionsEnabled):
912         (WebCore::Page::setUserContentExtensionsEnabled):
913         (WebCore::Page::group):
914         * page/UserContentController.cpp:
915         (WebCore::UserContentController::removeAllUserContentExtensions):
916         (WebCore::UserContentController::processContentExtensionRulesForLoad):
917         (WebCore::UserContentController::actionsForResourceLoad):
918         * page/UserContentController.h:
919
920 2015-06-22  Zalan Bujtas  <zalan@apple.com>
921
922         REGRESSION(r169105) Dangling renderer pointer in SelectionSubtreeRoot::SelectionSubtreeData.
923         https://bugs.webkit.org/show_bug.cgi?id=146116
924         rdar://problem/20959369
925
926         Reviewed by Brent Fulgham.
927
928         This patch ensures that we don't adjust the selection unless the visual selection still matches this subtree root.
929
930         When multiple selection roots are present we need to ensure that a RenderObject
931         only shows up in one of them.
932         RenderView::splitSelectionBetweenSubtrees(), as the name implies, splits the
933         selection and sets the selection range (start/end) on each selection root.
934         However, SelectionSubtreeRoot::adjustForVisibleSelection() later recomputes the range
935         based on visible selection and that could end up collecting renderers as selection start/end
936         from another selection subtree.
937         RenderObject's holds the last selection state (RenderObject::setSelectionState).
938         If we set a renderer first as "on selection border" and later "inside" using multiple selection roots,
939         we can't clean up selections properly when this object gets destroyed.
940         One of the roots ends up with a dangling RenderObject pointer.
941
942         Test: fast/regions/crash-when-renderer-is-in-multiple-selection-subtrees.html
943
944         * rendering/SelectionSubtreeRoot.cpp:
945         (WebCore::SelectionSubtreeRoot::adjustForVisibleSelection):
946
947 2015-06-22  Jeremy Jones  <jeremyj@apple.com>
948
949         Do not exit fullscreen when starting PiP since this is done automatically.
950         https://bugs.webkit.org/show_bug.cgi?id=144871
951
952         Reviewed by Darin Adler.
953
954         Since we don't explicitly exit fullscreen, update state in shouldExitFullscreenWithReason()
955
956         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Declare shouldExitFullscreenWithReason().
957         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
958         (-[WebAVPlayerController playerViewController:shouldExitFullScreenWithReason:]): Forward to WebVideoFullscreenInterfaceAVKit.
959         (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Added.
960         (WebVideoFullscreenInterfaceAVKit::willStartPictureInPicture): Remove enter fullscreen code.
961         * platform/spi/cocoa/AVKitSPI.h: Add missing enums.
962
963 2015-06-22  Daniel Bates  <dabates@apple.com>
964
965         AX: UI Automation cannot find AutoFill or search cancel buttons
966         https://bugs.webkit.org/show_bug.cgi?id=145241
967         <rdar://problem/21051411>
968
969         Reviewed by Chris Fleizach.
970
971         Add support for hit testing the search cancel button and AutoFill button so that
972         they can be accessed by UI Automation.
973
974         Currently the accessibility hit test machinery ignores nodes in a shadow tree.
975         So, it neither finds the <input type="search"> cancel button nor the AutoFill button
976         when it performs a hit test. Therefore these buttons cannot be accessed using
977         UI Automation.
978
979         Tests: accessibility/hit-test-input-auto-fill-button.html
980                accessibility/hit-test-input-search-cancel-button.html
981                accessibility/input-search-cancel-button.html
982
983         * accessibility/AccessibilityRenderObject.cpp:
984         (WebCore::AccessibilityRenderObject::accessibilityTextFieldDecorationHitTest): Added; returns
985         the AccessibilityObject for the search cancel button or AutoFill text field decoration as applicable.
986         (WebCore::AccessibilityRenderObject::accessibilityHitTest): Check whether the hit node
987         is a text field decoration.
988
989 2015-06-22  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
990
991         [Streams API] Implement ReadableStream cancel (abstract part)
992         https://bugs.webkit.org/show_bug.cgi?id=146111
993
994         Reviewed by Darin Adler.
995
996         This patch implements ReadableStream and ReadableStreamReader cancel.
997         The reader delegates cancellation to its stream.
998
999         This patch also ensures that controller.close() will not throw in case cancellation is on-going.
1000
1001         A follow-up patch will implement the calling of 'cancel' JS callback for JS sources.
1002
1003         Covered by rebased tests.
1004
1005         * Modules/streams/ReadableStream.cpp:
1006         (WebCore::ReadableStream::cancel): Checks whether locked or not before cancelling.
1007         (WebCore::ReadableStream::cancelNoCheck): Cancel without lock check.
1008         (WebCore::ReadableStream::notifyCancelSucceeded): Async cancel callback.
1009         (WebCore::ReadableStream::notifyCancelFailed): Ditto.
1010         * Modules/streams/ReadableStream.h:
1011         * Modules/streams/ReadableStream.idl: Cleaned up IDL.
1012         * Modules/streams/ReadableStreamReader.cpp:
1013         (WebCore::ReadableStreamReader::cancel):
1014         * Modules/streams/ReadableStreamReader.h:
1015         * Modules/streams/ReadableStreamReader.idl: Cleaned up IDL
1016         * bindings/js/JSReadableStreamControllerCustom.cpp:
1017         (WebCore::JSReadableStreamController::close):
1018         * bindings/js/JSReadableStreamCustom.cpp:
1019         (WebCore::JSReadableStream::cancel):
1020         * bindings/js/JSReadableStreamReaderCustom.cpp:
1021         (WebCore::JSReadableStreamReader::cancel):
1022         * bindings/js/ReadableJSStream.cpp:
1023         (WebCore::ReadableJSStream::doCancel):
1024         * bindings/js/ReadableJSStream.h:
1025
1026 2015-06-22  Adam Bergkvist  <adam.bergkvist@ericsson.com>
1027
1028         WebRTC: Navigator.webkitGetUserMedia() requires three arguments
1029         https://bugs.webkit.org/show_bug.cgi?id=146022
1030
1031         Reviewed by Eric Carlson.
1032
1033         Updated custom binding to make the third error callback argument
1034         mandatory. Updated and unskipped three tests (for the GTK+ port).
1035
1036         * bindings/js/JSNavigatorCustom.cpp:
1037         (WebCore::JSNavigator::webkitGetUserMedia):
1038
1039 2015-06-22  Carlos Garcia Campos  <cgarcia@igalia.com>
1040
1041         Unreviewed. Fix GTK+ build after r185818.
1042
1043         Actually rollout r185320.
1044
1045         * platform/network/soup/DNSSoup.cpp:
1046         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
1047         (WebCore::DNSResolveQueue::platformResolve):
1048         (WebCore::gotProxySettingsCallback): Deleted.
1049         (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
1050
1051 2015-06-16  Gavin Barraclough  <barraclough@apple.com>
1052
1053         Page load performance regression due to bugs.webkit.org/show_bug.cgi?id=145542
1054         https://bugs.webkit.org/show_bug.cgi?id=146198
1055
1056         Unreviewed rollout.
1057
1058         * platform/network/DNSResolveQueue.cpp:
1059         (WebCore::DNSResolveQueue::DNSResolveQueue):
1060         (WebCore::DNSResolveQueue::isUsingProxy):
1061         (WebCore::DNSResolveQueue::add):
1062         (WebCore::DNSResolveQueue::timerFired):
1063         * platform/network/DNSResolveQueue.h:
1064         * platform/network/cf/DNSCFNet.cpp:
1065         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
1066         (WebCore::clientCallback):
1067         (WebCore::DNSResolveQueue::platformResolve):
1068         (WebCore::proxyIsEnabledInSystemPreferences): Deleted.
1069         (WebCore::isUsingProxy): Deleted.
1070         (WebCore::DNSResolveQueue::platformMaybeResolveHost): Deleted.
1071         * platform/network/soup/DNSSoup.cpp:
1072
1073 2015-06-21  Alexey Proskuryakov  <ap@apple.com>
1074
1075         REGRESSION (r172975): navigator.language unable to tell region for Traditional Chinese users
1076         https://bugs.webkit.org/show_bug.cgi?id=146121
1077         rdar://problem/21395180
1078
1079         Reviewed by Darin Adler.
1080
1081         Revert to previous behavior, which is wrong in many ways, but not as wrong as the new one.
1082
1083         * platform/mac/Language.mm:
1084         (WebCore::httpStyleLanguageCode):
1085         (WebCore::platformUserPreferredLanguages):
1086         * platform/spi/cf/CFBundleSPI.h:
1087
1088 2015-06-19  Andy Estes  <aestes@apple.com>
1089
1090         Give Node::didNotifySubtreeInsertions() a better name
1091         https://bugs.webkit.org/show_bug.cgi?id=146170
1092
1093         Reviewed by Darin Adler.
1094
1095         didNotifySubtreeInsertions() is not a good name. It sounds like we are notifying the subtree insertions, which doesn't make sense.
1096
1097         This function is really about notifying the Node that the subtree it's a part of has finished being inserted into the DOM
1098         (i.e. all nodes have received their call to insertedInto()). Change the name to finishedInsertingSubtree() to better reflect this.
1099
1100         * dom/ContainerNode.cpp:
1101         (WebCore::ContainerNode::notifyChildInserted):
1102         * dom/ContainerNodeAlgorithms.h:
1103         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoDocument):
1104         (WebCore::ChildNodeInsertionNotifier::notifyNodeInsertedIntoTree):
1105         * dom/Element.cpp:
1106         (WebCore::Element::addShadowRoot):
1107         * dom/Node.h:
1108         (WebCore::Node::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1109         (WebCore::Node::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1110         * dom/ScriptElement.cpp:
1111         (WebCore::ScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1112         (WebCore::ScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1113         * dom/ScriptElement.h:
1114         * html/HTMLFrameElementBase.cpp:
1115         (WebCore::HTMLFrameElementBase::insertedInto):
1116         (WebCore::HTMLFrameElementBase::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1117         (WebCore::HTMLFrameElementBase::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1118         * html/HTMLFrameElementBase.h:
1119         * html/HTMLScriptElement.cpp:
1120         (WebCore::HTMLScriptElement::insertedInto):
1121         (WebCore::HTMLScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1122         (WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1123         * html/HTMLScriptElement.h:
1124         * svg/SVGFEImageElement.cpp:
1125         (WebCore::SVGFEImageElement::insertedInto):
1126         (WebCore::SVGFEImageElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1127         (WebCore::SVGFEImageElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1128         * svg/SVGFEImageElement.h:
1129         * svg/SVGMPathElement.cpp:
1130         (WebCore::SVGMPathElement::insertedInto):
1131         (WebCore::SVGMPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1132         (WebCore::SVGMPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1133         * svg/SVGMPathElement.h:
1134         * svg/SVGScriptElement.cpp:
1135         (WebCore::SVGScriptElement::insertedInto):
1136         (WebCore::SVGScriptElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1137         (WebCore::SVGScriptElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1138         * svg/SVGScriptElement.h:
1139         * svg/SVGTRefElement.cpp:
1140         (WebCore::SVGTRefElement::insertedInto):
1141         (WebCore::SVGTRefElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1142         (WebCore::SVGTRefElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1143         * svg/SVGTRefElement.h:
1144         * svg/SVGTextPathElement.cpp:
1145         (WebCore::SVGTextPathElement::insertedInto):
1146         (WebCore::SVGTextPathElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1147         (WebCore::SVGTextPathElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1148         * svg/SVGTextPathElement.h:
1149         * svg/animation/SVGSMILElement.cpp:
1150         (WebCore::SVGSMILElement::insertedInto):
1151         (WebCore::SVGSMILElement::finishedInsertingSubtree): Renamed from didNotifySubtreeInsertions.
1152         (WebCore::SVGSMILElement::didNotifySubtreeInsertions): Renamed to finishedInsertingSubtree.
1153         * svg/animation/SVGSMILElement.h:
1154
1155 2015-06-21  Philip Chimento  <philip.chimento@gmail.com>
1156
1157         libwebkit2gtk fails to link without opengl
1158         https://bugs.webkit.org/show_bug.cgi?id=138332
1159
1160         Reviewed by Carlos Garcia Campos.
1161
1162         * CMakeLists.txt: The third-party ANGLE directories need to be
1163         included even if ENABLE(GRAPHICS_CONTEXT_3D) is false. They must
1164         be included after the OpenGL headers as the comment says.
1165         * platform/graphics/texmap/BitmapTexturePool.cpp: Remove
1166         reference to no longer existent header file.
1167
1168 2015-06-20  Tim Horton  <timothy_horton@apple.com>
1169
1170         Deselection of text causes a noticeable jump on force touch machines
1171         https://bugs.webkit.org/show_bug.cgi?id=146173
1172         <rdar://problem/20992842>
1173
1174         Reviewed by Sam Weinig.
1175
1176         When we have a TextIndicator of type Crossfade, we end up putting
1177         a layer with the blue highlight + text painted into it on top of the
1178         content, and cross-fading that layer to the yellow-highlighted text.
1179
1180         This is necessary for BounceAndCrossfade TextIndicators, because the
1181         blue highlight has to bounce, but is not necessary for Crossfade-only
1182         ones; we can just fade in the yellow highlight on top of the
1183         existing blue page highlight, and all is well.
1184
1185         So, get rid of the Crossfade TextIndicator type and use FadeIn, separately
1186         keeping track of whether or not we can add a margin (we still can't
1187         add a margin to TextIndicators that indicate the page's current selection,
1188         because the blue highlight cannot have the margin applied to it, and we
1189         want the bounds to match exactly).
1190
1191         * page/TextIndicator.cpp:
1192         (WebCore::TextIndicator::createWithRange):
1193         If the range is the same as the selection, turn off the margin.
1194         We were previously doing this based on the presentation transition, but now
1195         there's no difference in presentation transition in this case.
1196
1197         (WebCore::TextIndicator::createWithSelectionInFrame):
1198         (WebCore::TextIndicator::wantsBounce):
1199         (WebCore::TextIndicator::wantsContentCrossfade):
1200         (WebCore::TextIndicator::wantsFadeIn):
1201         (WebCore::TextIndicator::wantsManualAnimation):
1202         * page/TextIndicator.h:
1203         Get rid of TextIndicatorPresentationTransition::Crossfade.
1204
1205         (WebCore::TextIndicator::setWantsMargin):
1206         (WebCore::TextIndicator::wantsMargin):
1207         Keep track of whether we want a margin.
1208
1209         * page/mac/TextIndicatorWindow.mm:
1210         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:]):
1211         Determine if we should use a margin based on wantsMargin instead of the
1212         presentation transition.
1213
1214 2015-06-20  Ryuan Choi  <ryuan.choi@navercorp.com>
1215
1216         [EFL] Do not consider test directories when DEVELOPER_MODE is OFF
1217         https://bugs.webkit.org/show_bug.cgi?id=146171
1218
1219         Reviewed by Gyuyoung Kim.
1220
1221         * platform/efl/EflInspectorUtilities.cpp:
1222         (WebCore::inspectorResourcePath): Only used WEB_INSPECTOR_DIR which CMake decides properly.
1223
1224 2015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>
1225
1226         Fix absolute value warning in LocalizedStringsGtk.cpp
1227         https://bugs.webkit.org/show_bug.cgi?id=145919
1228
1229         Reviewed by Martin Robinson.
1230
1231         Use abs(static_cast<int>(time)) rather than static_cast<int>(abs(time)) to avoid clang's
1232         warnings about passing a float to abs() instead of std::abs(). Also, because casting an int
1233         to an int is silly.
1234
1235         * platform/gtk/LocalizedStringsGtk.cpp:
1236         (WebCore::localizedMediaTimeDescription):
1237
1238 2015-06-19  Devin Rousso  <drousso@apple.com>
1239
1240         Web Inspector: Highlight currently edited CSS selector
1241         https://bugs.webkit.org/show_bug.cgi?id=145658
1242
1243         Reviewed by Joseph Pecoraro.
1244
1245         Test: inspector/dom/highlight-multiple-shapes.html
1246
1247         * inspector/InspectorController.cpp:
1248         (WebCore::InspectorController::buildObjectForHighlightedNode):
1249         * inspector/InspectorController.h:
1250         * inspector/InspectorDOMAgent.cpp:
1251         (WebCore::InspectorDOMAgent::highlightSelector): Gets a list of all nodes matching a given selector string and highlights each of them.
1252         * inspector/InspectorDOMAgent.h:
1253         * inspector/InspectorOverlay.cpp:
1254         (WebCore::InspectorOverlay::hideHighlight):
1255         (WebCore::InspectorOverlay::highlightNodeList): Loops through a given NodeList to create highlightObjects for each of them.
1256         (WebCore::InspectorOverlay::shouldShowOverlay):
1257         (WebCore::buildObjectForElementData): Don't show flow fragments when highlighting multiple nodes.
1258         (WebCore::InspectorOverlay::buildHighlightObjectForNode):
1259         (WebCore::InspectorOverlay::buildObjectForHighlightedNode): Now returns an array containing the highlightObject for each highligthed node.
1260         (WebCore::InspectorOverlay::drawNodeHighlight): Now sends an array to the InspectorOverlayPage.js to provide support for highlighting multiple nodes.
1261         * inspector/InspectorOverlay.h:
1262         * inspector/InspectorOverlayPage.js: Now expects an array as its parameter and loops through it to highlight each node given.
1263         If the parameter array contains more than one element, do not draw the textbox containing info on that node.
1264         (drawNodeHighlight):
1265
1266 2015-06-19  Joseph Pecoraro  <pecoraro@apple.com>
1267
1268         Crash under WebCore::PageConsoleClient::addMessage attempting to log insecure content message in ImageDocument
1269         https://bugs.webkit.org/show_bug.cgi?id=146096
1270
1271         Reviewed by Timothy Hatcher.
1272
1273         Was able to reproduce this using a user stylesheet with an http css font
1274         on a pdf (ImageDocument) main document loaded over https. Was unable to
1275         create a reliable test for this scenario.
1276
1277         * page/PageConsoleClient.cpp:
1278         (WebCore::getParserLocationForConsoleMessage):
1279         The scriptableDocumentParser could be null, such as in an ImageDocument.
1280
1281 2015-06-19  Dean Jackson  <dino@apple.com>
1282
1283         Extremely large canvas crashes on pre-El Capitan machines
1284         https://bugs.webkit.org/show_bug.cgi?id=146169
1285         <rdar://problem/21410046>
1286
1287         Reviewed by Tim Horton.
1288
1289         On machines before El Capitan, make the maximum canvas size
1290         8k by 8k.
1291
1292         Covered by existing tests.
1293
1294         * html/HTMLCanvasElement.cpp:
1295
1296 2015-06-19  Tim Horton  <timothy_horton@apple.com>
1297
1298         Selection services cannot be invoked when force click is enabled
1299         https://bugs.webkit.org/show_bug.cgi?id=146166
1300         <rdar://problem/21468362>
1301
1302         Reviewed by Darin Adler.
1303
1304         * page/mac/ServicesOverlayController.h:
1305         Turn Highlight::Type into something we can use for dirty flags.
1306
1307         * page/mac/ServicesOverlayController.mm:
1308         (WebCore::ServicesOverlayController::Highlight::createForSelection):
1309         (WebCore::ServicesOverlayController::Highlight::createForTelephoneNumber):
1310         (WebCore::ServicesOverlayController::ServicesOverlayController):
1311         (WebCore::ServicesOverlayController::selectionRectsDidChange):
1312         (WebCore::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
1313         (WebCore::ServicesOverlayController::invalidateHighlightsOfType):
1314         (WebCore::ServicesOverlayController::buildPotentialHighlightsIfNeeded):
1315         (WebCore::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
1316         (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
1317         (WebCore::ServicesOverlayController::buildSelectionHighlight):
1318         (WebCore::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight):
1319         (WebCore::ServicesOverlayController::determineActiveHighlight):
1320         (WebCore::ServicesOverlayController::didScrollFrame):
1321         (WebCore::ServicesOverlayController::handleClick):
1322         Coalesce highlight rebuilding so that things (like TextIndicator creation)
1323         that change the selection and then reset it immediately don't cause us
1324         to lose the active highlight.
1325
1326         This also means that if the selection changes multiple times in a runloop
1327         (easily possible from script), we won't waste a lot of time rebuilding highlights.
1328
1329         (WebCore::ServicesOverlayController::didRebuildPotentialHighlights):
1330         Merged into buildPotentialHighlightsIfNeeded.
1331
1332 2015-06-19  Matt Baker  <mattbaker@apple.com>
1333
1334         Web Inspector: TimelineAgent needs to handle nested runloops
1335         https://bugs.webkit.org/show_bug.cgi?id=145090
1336
1337         Reviewed by Joseph Pecoraro.
1338
1339         Previously nested run loops caused InspectorTimelineAgent to prematurely pop the current run loop record. This
1340         patch adds a counter to track the run loop nesting level, and rendering frame records are only pushed/popped
1341         when the nesting level is zero. Run loop entry/exit notifications received while the debugger is paused do not
1342         affect the nesting level.
1343
1344         * inspector/InspectorTimelineAgent.cpp:
1345         (WebCore::InspectorTimelineAgent::internalStart):
1346         (WebCore::InspectorTimelineAgent::internalStop):
1347         (WebCore::InspectorTimelineAgent::InspectorTimelineAgent):
1348         * inspector/InspectorTimelineAgent.h:
1349
1350 2015-06-19  Brent Fulgham  <bfulgham@apple.com>
1351
1352         Follow-up fix to r185766.
1353         https://bugs.webkit.org/show_bug.cgi?id=22132
1354
1355         Reviewed by Zalan Bujtas.
1356
1357         Suggested by Darin Adler in the bug.
1358
1359         * platform/graphics/filters/FETile.cpp:
1360         (WebCore::FETile::platformApplySoftware): Use WTF::move when passing
1361         the new tileImageCopy RefPtr.
1362
1363 2015-06-19  Michael Catanzaro  <mcatanzaro@igalia.com>
1364
1365         [SOUP] Fix return-type-c-linkage warning after r185553
1366         https://bugs.webkit.org/show_bug.cgi?id=146014
1367
1368         Reviewed by Martin Robinson.
1369
1370         * platform/network/soup/WebKitSoupRequestGeneric.cpp:
1371         (webkitSoupRequestGenericGetRequest): Return a pointer rather than a reference.
1372         * platform/network/soup/WebKitSoupRequestGeneric.h: webkitSoupRequestGenericGetRequest now
1373         returns a pointer rather than a reference.
1374
1375 2015-06-19  Dean Jackson  <dino@apple.com>
1376
1377         Played <audio> looks invisible against the gray background
1378         https://bugs.webkit.org/show_bug.cgi?id=146164
1379         <rdar://problem/21014284>
1380
1381         Reviewed by Brent Fulgham.
1382
1383         The plus-darker blend mode was not allowing any white to
1384         show through in the rendering. We don't need this for
1385         audio controls, where we draw on an opaque grey background.
1386
1387         * Modules/mediacontrols/mediaControlsiOS.css:
1388         (audio::-webkit-media-controls-panel): Darken the color of the controls a
1389         little to make white stand out more.
1390         (audio::-webkit-media-controls-timeline): Remove the plus-darker blending.
1391         (video::-webkit-media-controls-timeline): Apply blending only to video.
1392
1393 2015-06-19  Andy Estes  <aestes@apple.com>
1394
1395         Various assertion failures occur when executing script in the midst of DOM insertion
1396         https://bugs.webkit.org/show_bug.cgi?id=132482
1397
1398         Reviewed by Darin Adler.
1399
1400         Prior to this change, when an element containing a <script> child was inserted into a document, the script was
1401         executed in ScriptElement::insertedInto(). That script can access nodes that follow it in the newly-inserted
1402         hierarchy but are not yet fully inserted, leading to at least the following problems:
1403
1404             - The script could remove a node that is not yet marked as in the document.
1405             - The script could remove a named <map> that has yet to be added to TreeScope::m_imageMapsByName.
1406             - The script could remove a form control that has yet to be added to FormController::m_formElementsWithState.
1407
1408         These scenarios all result in assertion failures. This change ensures that each node in the newly-inserted
1409         hierarchy is fully inserted before executing any scripts.
1410
1411         Tests: fast/dom/element-removed-while-inserting-parent-crash.html
1412                fast/dom/named-map-removed-while-inserting-parent-crash.html
1413                fast/forms/form-control-removed-while-inserting-parent-crash.html
1414                svg/dom/element-removed-while-inserting-parent-crash.html
1415
1416         * dom/ScriptElement.cpp:
1417         (WebCore::ScriptElement::shouldNotifySubtreeInsertions): Renamed from insertedInto().
1418         Returned true in the case where insertedInto() would've called prepareScript().
1419         (WebCore::ScriptElement::didNotifySubtreeInsertions): Called prepareScript().
1420         (WebCore::ScriptElement::insertedInto): Renamed to shouldNotifySubtreeInsertions().
1421         * dom/ScriptElement.h:
1422         * html/HTMLScriptElement.cpp:
1423         (WebCore::HTMLScriptElement::insertedInto): If shouldNotifySubtreeInsertions() is true, returned InsertionShouldCallDidNotifySubtreeInsertions.
1424         Otherwise, returned InsertionDone.
1425         (WebCore::HTMLScriptElement::didNotifySubtreeInsertions): Called ScriptElement::didNotifySubtreeInsertions().
1426         * html/HTMLScriptElement.h:
1427         * svg/SVGScriptElement.cpp:
1428         (WebCore::SVGScriptElement::insertedInto): Did the same as HTMLScriptElement::insertedInto().
1429         (WebCore::SVGScriptElement::didNotifySubtreeInsertions): Called ScriptElement::didNotifySubtreeInsertions().
1430         * svg/SVGScriptElement.h:
1431
1432 2015-06-19  Brent Fulgham  <bfulgham@apple.com>
1433
1434         All calls of ImageBuffer::create should null check the return value
1435         https://bugs.webkit.org/show_bug.cgi?id=22132
1436
1437         Reviewed by Zalan Bujtas.
1438
1439         ImageBuffer::create returns nullptr for a number of reasons, and should be
1440         expected to do so. We missed this check in a few places, resulting in
1441         crashes on some systems. Likewise, ImageBuffer::copyImage may return nullptr
1442         in normal use and should be checked.
1443
1444         * platform/graphics/BitmapImage.cpp:
1445         (WebCore::BitmapImage::drawPattern): Add nullptr check for create and copyImage. Remove
1446         extra call to 'setImageObserver'.
1447         * platform/graphics/cairo/ImageBufferCairo.cpp:
1448         (WebCore::ImageBuffer::drawPattern): Add nullptr check for copyImage.
1449         * platform/graphics/cg/ImageBufferCG.cpp:
1450         (WebCore::ImageBuffer::drawPattern): Add nullptr checks for copyImage.
1451         * platform/graphics/filters/FETile.cpp:
1452         (WebCore::FETile::platformApplySoftware): Add nullptr check for copyImage.
1453         * platform/graphics/filters/FilterEffect.cpp:
1454         (WebCore::FilterEffect::asImageBuffer): Add nullptr check for create.
1455         (WebCore::FilterEffect::openCLImageToImageBuffer): Ditto.
1456         * platform/graphics/texmap/BitmapTexture.cpp:
1457         (WebCore::BitmapTexture::updateContents): Add nullptr checks for create and copyImage.
1458         * svg/graphics/SVGImage.cpp:
1459         (WebCore::SVGImage::drawPatternForContainer): Add nullptr check for copyImage.
1460
1461 2015-06-19  Jeremy Jones  <jeremyj@apple.com>
1462
1463         Get CAContext directly for CALayer instead of walking the layer tree.
1464         https://bugs.webkit.org/show_bug.cgi?id=146138
1465         <rdar://problem/21455974>
1466
1467         Reviewed by Darin Adler.
1468
1469         This will get the context directly from the CALayer instead of getting all CAContexts, walking the layer tree 
1470         to the root and comparing that against each CAContext's root layer.
1471
1472         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1473         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
1474
1475 2015-06-18  Brent Fulgham  <bfulgham@apple.com>
1476
1477         [iOS] scrollIntoViewIfNeeded is not working with scroll-snap points
1478         https://bugs.webkit.org/show_bug.cgi?id=145318
1479         <rdar://problem/21081501>
1480
1481         Reviewed by Simon Fraser.
1482
1483         Use the ScrollController in iOS to track the scroll snap point state.
1484         We do not need the animation implementation or timers since the actual
1485         animation is handled by UIKit.
1486
1487         This change lets us communicate the current offset into the scroll snap
1488         offset vector between the WebProcess and RemoteScrollingTree so that
1489         both sides stay in sync regardless of whether user gestures or style
1490         updates have caused us to shift to a different snap point.
1491
1492         * page/scrolling/AsyncScrollingCoordinator.cpp:
1493         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Set the
1494         current horizontal and vertical scroll snap offset indices.
1495         (WebCore::AsyncScrollingCoordinator::updateOverflowScrollingNode): Ditto.
1496         * page/scrolling/AsyncScrollingCoordinator.h: Mark the setActiveScrollSnapIndices
1497         for export so that it can be reached by the UIProcess.
1498         * page/scrolling/ScrollingCoordinator.h: Keep track of horizontal and
1499         vertical scroll snap offset indices.
1500         * page/scrolling/ScrollingStateScrollingNode.cpp:
1501         (WebCore::ScrollingStateScrollingNode::setCurrentHorizontalSnapPointIndex): Added.
1502         (WebCore::ScrollingStateScrollingNode::setCurrentVerticalSnapPointIndex): Added.
1503         * page/scrolling/ScrollingStateScrollingNode.h:
1504         (WebCore::ScrollingStateScrollingNode::currentHorizontalSnapPointIndex): Added.
1505         (WebCore::ScrollingStateScrollingNode::currentVerticalSnapPointIndex): Added.
1506         * page/scrolling/ScrollingTree.h:
1507         * page/scrolling/ScrollingTreeScrollingNode.cpp:
1508         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren): Update the scroll snap
1509         point offset indices if either has changed.
1510         * page/scrolling/ScrollingTreeScrollingNode.h:
1511         (WebCore::ScrollingTreeScrollingNode::currentHorizontalSnapPointIndex): Added.
1512         (WebCore::ScrollingTreeScrollingNode::currentVerticalSnapPointIndex): Added.
1513         (WebCore::ScrollingTreeScrollingNode::setCurrentHorizontalSnapPointIndex): Added.
1514         (WebCore::ScrollingTreeScrollingNode::setCurrentVerticalSnapPointIndex): Added.
1515         * page/scrolling/ThreadedScrollingTree.cpp:
1516         (WebCore::ThreadedScrollingTree::currentSnapPointIndicesDidChange): New method
1517         to handle notifications about scroll snap index changes from the UIProcess.
1518         * page/scrolling/ThreadedScrollingTree.h:
1519         * page/scrolling/ios/ScrollingTreeIOS.cpp:
1520         (WebCore::ScrollingTreeIOS::currentSnapPointIndicesDidChange): New method
1521         to handle notifications about scroll snap index changes from the UIProcess.
1522         * page/scrolling/ios/ScrollingTreeIOS.h:
1523         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1524         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Update scroll
1525         snap point current offset indices if they have changed.
1526         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Remove unneeded
1527         PLATFORM(MAC) macro.
1528         * platform/ScrollAnimator.cpp:
1529         (WebCore::ScrollAnimator::ScrollAnimator): We have a ScrollController if we are
1530         supporting scroll snap points or rubber banding.
1531         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): This method is not needed
1532         for iOS builds.
1533         (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset): Enable this on iOS.
1534         (WebCore::ScrollAnimator::updateScrollSnapState): Renamed from 'updateScrollAnimatorsAndTimers'
1535         and enabled on iOS.
1536         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Deleted.
1537         * platform/ScrollAnimator.h: Enable some scroll snap methods on iOS.
1538         * platform/ScrollableArea.cpp:
1539         (WebCore::ScrollableArea::handleWheelEvent): Enable scroll snap index bookkeeping on iOS, too.
1540         (WebCore::ScrollableArea::updateScrollSnapState): Revise to call 'updateScrollSnapState' instead
1541         of 'updateScrollAnimatorsAndTimers'.
1542         * platform/cocoa/ScrollController.h: Enable some methods on iOS. Reorder methods to
1543         reduce the number of macros needed to do so.
1544         * platform/cocoa/ScrollController.mm:
1545         (systemUptime): Only build for Mac.
1546         (WebCore::ScrollController::ScrollController): Disable rubber band-specific members on iOS.
1547         (WebCore::ScrollController::handleWheelEvent): Only build this on Mac.
1548         (WebCore::ScrollController::isRubberBandInProgress): Always return 'false' on iOS.
1549         (WebCore::ScrollController::startSnapRubberbandTimer): Only build this on Mac.
1550         (WebCore::ScrollController::shouldRubberBandInHorizontalDirection): Ditto.
1551         (WebCore::ScrollController::scrollSnapPointState): Enable on iOS.
1552         (WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Only build on Mac.
1553         (WebCore::ScrollController::updateScrollSnapState): renamed from 'updateScrollAnimatorsAndTimers'
1554         (WebCore::ScrollController::startScrollSnapTimer): Only build on Mac.
1555         (WebCore::ScrollController::initializeGlideParameters): Ditto.
1556         (WebCore::ScrollController::activeScrollSnapIndexForAxis): Enable on iOS.
1557         (WebCore::ScrollController::setActiveScrollSnapIndicesForOffset): Ditto.
1558         (WebCore::ScrollController::beginScrollSnapAnimation): Only build on Mac.
1559         (WebCore::ScrollController::computeGlideDelta): Ditto.
1560         (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Deleted.
1561         * rendering/RenderLayerCompositor.cpp:
1562         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer): Capture any changes in scroll
1563         snap offset indices.
1564
1565 2015-06-19  Jeremy Jones  <jeremyj@apple.com>
1566
1567         Fullscreen view should not update bounds of video when in PiP.
1568         https://bugs.webkit.org/show_bug.cgi?id=146134
1569
1570         Reviewed by Darin Adler.
1571
1572         Don't update bounds on video layer when it is not a child.
1573
1574         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1575         (-[WebAVVideoLayer setBounds:]):
1576
1577 2015-06-19  Zalan Bujtas  <zalan@apple.com>
1578
1579         RenderRubyText requires RenderRubyRun parent.
1580         https://bugs.webkit.org/show_bug.cgi?id=146148
1581         rdar://problem/21423319
1582
1583         Reviewed by Simon Fraser.
1584
1585         RenderRubyText expects its parent to be RenderRubyRun and since a
1586         a non-block <rt> requires anonymous wrapper, we should check whether
1587         the display type is actually block.
1588
1589         Test: fast/ruby/crash-when-ruby-rt-is-non-block.html
1590
1591         * html/RubyTextElement.cpp:
1592         (WebCore::RubyTextElement::createElementRenderer):
1593
1594 2015-06-19  Jeremy Jones  <jeremyj@apple.com>
1595
1596         cancelPreviousPerformRequestsWithTarget for -resolveBounds in wrong class.
1597         https://bugs.webkit.org/show_bug.cgi?id=146140
1598
1599         Reviewed by Eric Carlson.
1600
1601         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1602         (-[WebCALayerHostWrapper dealloc]): Added.
1603         (-[WebAVVideoLayer dealloc]): Deleted.
1604
1605 2015-06-19  Per Arne Vollan  <peavo@outlook.com>
1606
1607         [WinCairo] Null pointer crash in BitmapTexture::updateContents.
1608         https://bugs.webkit.org/show_bug.cgi?id=146147
1609
1610         Reviewed by Brent Fulgham.
1611
1612         Added null pointer check.
1613
1614         * platform/graphics/texmap/BitmapTexture.cpp:
1615         (WebCore::BitmapTexture::updateContents):
1616
1617 2015-06-19  Anders Carlsson  <andersca@apple.com>
1618
1619         Spintracer treats the web process as hung when it's showing JavaScript dialogs in the UI process
1620         https://bugs.webkit.org/show_bug.cgi?id=146124
1621         rdar://problem/21449395
1622
1623         Reviewed by Geoffrey Garen.
1624
1625         * platform/spi/cg/CoreGraphicsSPI.h:
1626
1627 2015-06-19  Csaba Osztrogonác  <ossy@webkit.org>
1628
1629         Remove unnecessary svn:executable flags
1630         https://bugs.webkit.org/show_bug.cgi?id=146107
1631
1632         Reviewed by Alexey Proskuryakov.
1633
1634         * html/canvas/CanvasRenderingContext2D.cpp: Removed property svn:executable.
1635         * mathml/MathMLMencloseElement.cpp: Removed property svn:executable.
1636         * mathml/MathMLMencloseElement.h: Removed property svn:executable.
1637         * platform/efl/RenderThemeEfl.cpp: Removed property svn:executable.
1638         * rendering/mathml/RenderMathMLMenclose.cpp: Removed property svn:executable.
1639         * rendering/mathml/RenderMathMLMenclose.h: Removed property svn:executable.
1640
1641 2015-06-19  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1642
1643         Bindings generator should generate code to catch exception and reject promises for Promise-based APIs
1644         https://bugs.webkit.org/show_bug.cgi?id=146060
1645
1646         Reviewed by Darin Adler.
1647
1648         The binding generator splits the function that binds JS to the DOM class implementation in two for functions returning promise.
1649         The first function, called from JS, is responsible of casting this to the expected JSXXX class.
1650         If casting fails, an exception is raised. Otherwise, it calls the second function.
1651         After calling the second function, it checks whether an exception is raised, in which case it returns a rejected promise.
1652         The second function is responsible of argument conversion and calling the DOM class function.
1653
1654         Covered by expectations and AudioContext promise still working.
1655         A test case is added for a promise returning function taking a typed argument as input (if argument value cannot be typed, the promise is rejected).
1656         A second test case is a promise-returning function that can raise an exception. In that case the DOMException is used as rejection value.
1657
1658         As can be seen from generated code, this generalized code adds a mandatory check (is there an exception?) at the end of the function.
1659         This check is done even in cases we know there will be no exception.
1660         This may be covered by another patch if this optimization is thought useful enough.
1661
1662         * bindings/js/JSDOMPromise.cpp:
1663         (WebCore::rejectPromiseWithExceptionIfAny): Utility method for the binding code.
1664         (WebCore::callPromiseFunction): Ditto.
1665         * bindings/js/JSDOMPromise.h:
1666         * bindings/scripts/CodeGeneratorJS.pm:
1667         (GenerateImplementation):
1668         (GenerateFunctionCastedThis): Extracted from GenerateImplementationFunctionCall to reuse it in case of promise-returning functions.
1669         (GenerateImplementationFunctionCall):
1670         (GenerateCallbackImplementation): Deleted.
1671         * bindings/scripts/test/JS/JSTestObj.cpp:
1672         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunction):
1673         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionPromise):
1674         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgument):
1675         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithFloatArgumentPromise):
1676         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithException):
1677         (WebCore::jsTestObjPrototypeFunctionTestPromiseFunctionWithExceptionPromise):
1678         * bindings/scripts/test/TestObj.idl:
1679
1680 2015-06-18  Jeremy Jones  <jeremyj@apple.com>
1681
1682         Disable UIWindow for fullscreen video for selected clients.
1683         https://bugs.webkit.org/show_bug.cgi?id=145852
1684
1685         Reviewed by Simon Fraser.
1686
1687         Disable UIWindow for fullscreen video doesn't work everywhere (rdar://problem/21315993), so just disable it when creating a UIWindow won't work.
1688         Fix some interface hiding and layout problems that showed up in the non UIWindow code path.
1689
1690         * platform/RuntimeApplicationChecksIOS.h:
1691         * platform/RuntimeApplicationChecksIOS.mm: Remove iAD bundle identifier.
1692         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1693         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Opt out of UIWindow when hosted in another process. And fix view parenting for non-window case.
1694         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Fix for AVKit exit fullscreen complaining about -needsLayout.
1695
1696         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen):
1697         (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
1698         (WebVideoFullscreenInterfaceAVKit::willStartOptimizedFullscreen):
1699         (WebVideoFullscreenInterfaceAVKit::didStartOptimizedFullscreen):
1700         (WebVideoFullscreenInterfaceAVKit::willStopOptimizedFullscreen):
1701         (WebVideoFullscreenInterfaceAVKit::didStopOptimizedFullscreen):
1702         These hide and show the view controller where we hide and show the window.
1703
1704 2015-06-18  Dean Jackson  <dino@apple.com>
1705
1706         Provide a way for web developers to draw a Theme-specific Wireless Playback icon
1707         https://bugs.webkit.org/show_bug.cgi?id=146123
1708         <rdar://problem/21119287>
1709
1710         Reviewed by Simon Fraser.
1711
1712         Implement a -webkit-named-image() CSS <image> generator that allows a site to
1713         request artwork by name and get the platform variant. At the moment
1714         we only support "wireless-playback" which returns a generic image everywhere
1715         but Cocoa platforms, where we render the AirPlay icon.
1716
1717         In order to do this I added a ThemeCocoa to share any Theme code between
1718         Mac and iOS.
1719
1720         Test: fast/css/named-icons.html
1721
1722         * WebCore.xcodeproj/project.pbxproj: Add new files CSSNamedImageValue, NamedImageGeneratedImage and ThemeCocoa.
1723
1724         * css/CSSImageGeneratorValue.cpp: Handle the new NamedImageClass in the switch statements for downcasting.
1725         (WebCore::CSSImageGeneratorValue::image):
1726         (WebCore::CSSImageGeneratorValue::isFixedSize):
1727         (WebCore::CSSImageGeneratorValue::isPending):
1728         (WebCore::CSSImageGeneratorValue::knownToBeOpaque):
1729
1730         * css/CSSNamedImageValue.cpp: New class. Just holds a name String.
1731         (WebCore::CSSNamedImageValue::customCSSText):
1732         (WebCore::CSSNamedImageValue::image):
1733         (WebCore::CSSNamedImageValue::equals):
1734         * css/CSSNamedImageValue.h:
1735         (WebCore::CSSNamedImageValue::create):
1736         (WebCore::CSSNamedImageValue::isFixedSize):
1737         (WebCore::CSSNamedImageValue::isPending):
1738         (WebCore::CSSNamedImageValue::CSSNamedImageValue):
1739
1740         * css/CSSParser.cpp:
1741         (WebCore::CSSParser::isGeneratedImageValue): Allow "-webkit-named-image(".
1742         (WebCore::CSSParser::parseGeneratedImage): Call parseNamedImage if we hit named-icon.
1743         (WebCore::CSSParser::parseNamedImage): Parse the function looking for a CSS ident.
1744         * css/CSSParser.h:
1745
1746         * css/CSSValue.cpp: Handle NamedImageClass in the various switch statements.
1747         (WebCore::CSSValue::equals):
1748         (WebCore::CSSValue::cssText):
1749         (WebCore::CSSValue::destroy):
1750         * css/CSSValue.h:
1751         (WebCore::CSSValue::isNamedImageValue): Helper to detect the correct CSSValue subclass.
1752
1753         * platform/Theme.cpp:
1754         (WebCore::Theme::drawNamedImage): Draw a generic wireless playback icon.
1755         * platform/Theme.h: Add drawNamedImage.
1756
1757         * platform/cocoa/ThemeCocoa.cpp: New shared base class for ThemeMac and ThemeIOS.
1758         (WebCore::fitContextToBox):
1759         (WebCore::ThemeCocoa::drawNamedImage): Draw an AirPlay icon for wireless playback.
1760         * platform/cocoa/ThemeCocoa.h:
1761
1762         * platform/graphics/CrossfadeGeneratedImage.h: Drive-by removal of unnecessary forward class definition.
1763
1764         * platform/graphics/ImageBuffer.h: Add NamedImageGeneratedImage as a friend class.
1765
1766         * platform/graphics/NamedImageGeneratedImage.cpp: New class. Calls into the Theme to render the artwork.
1767         (WebCore::NamedImageGeneratedImage::NamedImageGeneratedImage):
1768         (WebCore::NamedImageGeneratedImage::draw):
1769         (WebCore::NamedImageGeneratedImage::drawPattern):
1770         * platform/graphics/NamedImageGeneratedImage.h:
1771
1772         * platform/ios/ThemeIOS.h: Inherit from ThemeCocoa.
1773         * platform/mac/ThemeMac.h: Ditto.
1774
1775 2015-06-18  KyungTae Kim  <ktf.kim@samsung.com> and Myles C. Maxfield  <mmaxfield@apple.com>
1776
1777         [CSS3] Add support for the word-break:keep-all CSS property
1778         https://bugs.webkit.org/show_bug.cgi?id=123782
1779
1780         Reviewed by Darin Adler.
1781
1782         Add support for word-break:keep-all CSS property by CSS3 spec:
1783         http://www.w3.org/TR/2013/WD-css-text-3-20131010/#word-break-property
1784
1785         Test: fast/text/word-break-keep-all.html
1786
1787         * css/CSSParser.cpp:
1788         (WebCore::isValidKeywordPropertyAndValue):
1789         * css/CSSPrimitiveValueMappings.h:
1790         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1791         (WebCore::CSSPrimitiveValue::operator EWordBreak):
1792         * css/CSSValueKeywords.in:
1793         * rendering/RenderText.cpp:
1794         (WebCore::RenderText::computePreferredLogicalWidths):
1795         * rendering/break_lines.h:
1796         (WebCore::nextBreakablePositionKeepingAllWords):
1797         (WebCore::nextBreakablePositionKeepingAllWordsIgnoringNBSP):
1798         (WebCore::isBreakable):
1799         * rendering/line/BreakingContext.h:
1800         (WebCore::BreakingContext::handleText):
1801         (WebCore::BreakingContext::optimalLineBreakLocationForTrailingWord):
1802         * rendering/style/RenderStyleConstants.h:
1803
1804 2015-06-18  Jon Lee  <jonlee@apple.com>
1805
1806         Update AVKit usage of pip
1807         https://bugs.webkit.org/show_bug.cgi?id=146095
1808         <rdar://problem/21386853>
1809
1810         Reviewed by Eric Carlson.
1811
1812         - Rename enum VideoFullscreenModeOptimized to VideoFullscreenModePictureInPicture
1813         - Rename MediaElementSession::allowsAlternateFullscreen to allowsPictureInPicture
1814         - Rename Settings::allowsAlternateFullscreen to allowsPictureInPictureMediaPlayback
1815         - Update AVKit calls and AVKitSPI.h
1816         - Rename WebVideoFullscreenInterfaceAVKit delegate functions and member variables
1817
1818         * html/HTMLMediaElement.cpp:
1819         * html/HTMLVideoElement.cpp:
1820         * html/MediaElementSession.cpp:
1821         (WebCore::MediaElementSession::allowsPictureInPicture): Renamed.
1822         (WebCore::MediaElementSession::allowsAlternateFullscreen): Deleted.
1823         * html/MediaElementSession.h:
1824         * page/Settings.cpp:
1825         * page/Settings.in:
1826         * platform/graphics/MediaPlayerEnums.h:
1827         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1828         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1829         * platform/ios/WebVideoFullscreenInterfaceAVKit.h: Remove unused setIsOptimized.
1830         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1831         * platform/spi/cocoa/AVKitSPI.h: Remove unused typedef.
1832         * platform/spi/mac/AVFoundationSPI.h:
1833
1834 2015-06-18  Jeremy Jones  <jeremyj@apple.com>
1835
1836         Fix crash when entering fullscreen during exit fullscreen animation.
1837         https://bugs.webkit.org/show_bug.cgi?id=146117
1838
1839         Reviewed by Simon Fraser.
1840
1841         Because enterFullscreen can be called during exitFullscreen animation, the exit fullscreen teardown
1842         should not imply a fullscreen state change on video element.
1843
1844         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1845         (WebVideoFullscreenControllerContext::exitFullscreen): May be called from mainThread
1846         (-[WebVideoFullscreenController exitFullscreen]): May be called from mainThread
1847         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
1848         (WebVideoFullscreenModelVideoElement::setVideoElement): 
1849         Changing associated video element does not imply fullscreen mode change.
1850
1851 2015-06-18  Brian J. Burg  <burg@cs.washington.edu>
1852
1853         Web Inspector: improve generated types for objects passed to backend commands
1854         https://bugs.webkit.org/show_bug.cgi?id=146091
1855
1856         Reviewed by Joseph Pecoraro.
1857
1858         Update type signatures for backend command implementations. In a few cases, clean
1859         up relevant helper function signatures and copy data out of parameter objects where
1860         the code previously held onto a reference.
1861
1862         No new tests, no behavior changed.
1863
1864         * inspector/InspectorCSSAgent.cpp:
1865         (WebCore::computePseudoClassMask):
1866         (WebCore::InspectorCSSAgent::setStyleText):
1867         (WebCore::InspectorCSSAgent::setRuleSelector):
1868         (WebCore::InspectorCSSAgent::forcePseudoState):
1869         * inspector/InspectorCSSAgent.h:
1870         * inspector/InspectorDOMAgent.cpp:
1871         (WebCore::parseColor):
1872         (WebCore::parseConfigColor):
1873         (WebCore::parseQuad):
1874         (WebCore::InspectorDOMAgent::performSearch):
1875         (WebCore::InspectorDOMAgent::setSearchingForNode):
1876         (WebCore::InspectorDOMAgent::highlightConfigFromInspectorObject):
1877         (WebCore::InspectorDOMAgent::setInspectModeEnabled):
1878         (WebCore::InspectorDOMAgent::highlightRect):
1879         (WebCore::InspectorDOMAgent::highlightQuad):
1880         (WebCore::InspectorDOMAgent::innerHighlightQuad):
1881         (WebCore::InspectorDOMAgent::highlightNode):
1882         (WebCore::InspectorDOMAgent::highlightFrame):
1883         * inspector/InspectorDOMAgent.h:
1884         * inspector/InspectorDOMStorageAgent.cpp:
1885         (WebCore::InspectorDOMStorageAgent::getDOMStorageItems):
1886         (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
1887         (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
1888         (WebCore::InspectorDOMStorageAgent::findStorageArea):
1889         * inspector/InspectorDOMStorageAgent.h:
1890         * inspector/InspectorIndexedDBAgent.cpp:
1891         (WebCore::InspectorIndexedDBAgent::requestData):
1892         * inspector/InspectorIndexedDBAgent.h:
1893         * inspector/InspectorReplayAgent.cpp:
1894         (WebCore::InspectorReplayAgent::replayToPosition):
1895         * inspector/InspectorReplayAgent.h:
1896         * inspector/InspectorResourceAgent.cpp:
1897         (WebCore::InspectorResourceAgent::willSendRequest):
1898         (WebCore::InspectorResourceAgent::setExtraHTTPHeaders):
1899         Clean up extraHTTPHeaders to copy header key/values out of the InspectorObject, rather
1900         than retaining the protocol object indefinitely. This matches the ownership scheme used
1901         everywhere else.
1902
1903         * inspector/InspectorResourceAgent.h:
1904         * inspector/InspectorStyleSheet.h:
1905         (WebCore::InspectorCSSId::InspectorCSSId):
1906         * inspector/InspectorWorkerAgent.cpp:
1907         (WebCore::InspectorWorkerAgent::sendMessageToWorker):
1908         * inspector/InspectorWorkerAgent.h:
1909
1910 2015-06-18  Anders Carlsson  <andersca@apple.com>
1911
1912         Remove shouldInterruptJavaScript
1913         https://bugs.webkit.org/show_bug.cgi?id=146118
1914
1915         Reviewed by Antti Koivisto.
1916
1917         The WebKit SPI methods for deciding whether JavaScript execution should be interrupted hasn't been used
1918         for many releases. Furthermore, they don't make sense in the multi-process architecture since it's still possible
1919         to interrupt execution (by closing the browser tab or window) from the UI process.
1920
1921         * bindings/js/JSDOMWindowBase.cpp:
1922         (WebCore::JSDOMWindowBase::shouldInterruptScript):
1923         * loader/EmptyClients.h:
1924         * page/Chrome.cpp:
1925         (WebCore::Chrome::shouldInterruptJavaScript): Deleted.
1926         * page/Chrome.h:
1927         * page/ChromeClient.h:
1928
1929 2015-06-18  Benjamin Poulain  <bpoulain@apple.com>
1930
1931         [CSS JIT][ARMv7] The pseudo element early exit trashes r6
1932         https://bugs.webkit.org/show_bug.cgi?id=146078
1933
1934         Reviewed by Alex Christensen.
1935
1936         The pseudo element early failure runs before we generate the prologue.
1937         The reason is that we can often exit immediately on function entry, before
1938         we even touch any memory.
1939
1940         On ARMv7, we don't have many spare registers so the MacroAssembler
1941         uses r6 as a scratch register and the client code is expected to save
1942         it.
1943
1944         In the early failure case, we were not pushing r6 before using the MacroAssembler
1945         and its value could be trashed.
1946
1947         This patch push the macro assembler registers separately from the prologue.
1948
1949         For restoring the registers, a new function generateFunctionEnding() encapsulate
1950         the pop() and ret().
1951
1952         * cssjit/SelectorCompiler.cpp:
1953         (WebCore::SelectorCompiler::SelectorCodeGenerator::pushMacroAssemblerRegisters):
1954         (WebCore::SelectorCompiler::SelectorCodeGenerator::popMacroAssemblerRegisters):
1955         (WebCore::SelectorCompiler::SelectorCodeGenerator::generatePrologue):
1956         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateEpilogue):
1957         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateSelectorChecker):
1958
1959         * cssjit/StackAllocator.h:
1960         (WebCore::StackAllocator::operator=):
1961         We have a new case for the stack allocator: some stack changes are conditional
1962         at compile time instead of runtime. This is easy to deal with by overriding
1963         the stack if a path is not taken at compile time.
1964
1965 2015-06-17  Conrad Shultz  <conrad_shultz@apple.com>
1966
1967         REGRESSION: js/dom/navigator-plugins-crash.html asserts a lot
1968         https://bugs.webkit.org/show_bug.cgi?id=144399
1969
1970         Reviewed by Darin Adler.
1971
1972         Earlier work made the array of web-visible plug-ins dynamic, but allowed DOMPlugin (and, indirectly by extension,
1973         DOMMimeType) to continue keeping a reference to a plug-in in terms of an index into that array. This superficially
1974         appeared correct since DOMPlugin immutably holds onto a PluginData instance, which in turn immutably holds onto a
1975         Page instance. PluginStrategy::getWebVisiblePluginInfo() is passed this Page, which is used to determine the contents
1976         of the plugin array. The expectation was that keeping an index would still be safe since the Page is not changing,
1977         but this is not strictly correct since relevant attributes of the Page and/or the available plugins may still change.
1978
1979         It's not entirely clear why the test failures are intermittent and occur only on certain configurations, but address
1980         them by eliminating the incorrect storage of indexes in favor of keeping copies of the relevant plugin info itself.
1981
1982         * plugins/DOMMimeType.cpp:
1983         (WebCore::DOMMimeType::DOMMimeType):
1984         Instead of storing the MIME type index, retrieve and store the MIME class info and plugin info.
1985         (WebCore::DOMMimeType::type):
1986         Directly access the m_mimeClassInfo member.
1987         (WebCore::DOMMimeType::suffixes):
1988         Ditto.
1989         (WebCore::DOMMimeType::description):
1990         Ditto.
1991         (WebCore::DOMMimeType::enabledPlugin):
1992         Directly access the m_pluginInfo member.
1993         (WebCore::DOMMimeType::mimeClassInfo): Deleted.
1994
1995         * plugins/DOMMimeType.h:
1996         Update member variables.
1997
1998         * plugins/DOMPlugin.cpp:
1999         (WebCore::DOMPlugin::DOMPlugin):
2000         Instead of storing the plugin index, store the plugin info directly.
2001         (WebCore::DOMPlugin::name):
2002         Directly access m_pluginInfo.
2003         (WebCore::DOMPlugin::filename):
2004         Ditto.
2005         (WebCore::DOMPlugin::description):
2006         Ditto.
2007         (WebCore::DOMPlugin::length):
2008         Ditto.
2009         (WebCore::DOMPlugin::item):
2010         Access m_pluginInfo directly; find the matching plug-in based on matching PluginInfo (for which an overloaded
2011         comparator is supplied below).
2012         (WebCore::DOMPlugin::pluginInfo): Deleted.
2013
2014         * plugins/DOMPlugin.h:
2015         Update member variables.
2016         (WebCore::DOMPlugin::create):
2017         Accept a PluginInfo instead of a plugin index.
2018
2019         * plugins/DOMPluginArray.cpp:
2020         (WebCore::DOMPluginArray::item):
2021         (WebCore::DOMPluginArray::namedItem):
2022
2023         * plugins/PluginData.h:
2024         (WebCore::operator==):
2025         Added; compare PluginInfo structs on the basis of member equality.
2026
2027 2015-06-17  Alex Christensen  <achristensen@webkit.org>
2028
2029         [Content Extensions] Log blocked loads to the WebInspector console
2030         https://bugs.webkit.org/show_bug.cgi?id=146089
2031
2032         Reviewed by Joseph Pecoraro.
2033
2034         * contentextensions/ContentExtensionsBackend.cpp:
2035         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
2036         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
2037         Log which URLs are blocked and the URL of the page they are blocked from.
2038
2039 2015-06-18  Joseph Pecoraro  <pecoraro@apple.com>
2040
2041         Crash under WebCore::DOMWindow::dispatchMessageEventWithOriginCheck attempting to log console message
2042         https://bugs.webkit.org/show_bug.cgi?id=146093
2043
2044         Reviewed by Timothy Hatcher.
2045
2046         * page/DOMWindow.cpp:
2047         (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
2048         The console could be null so null check its use.
2049
2050 2015-06-18  Csaba Osztrogonác  <ossy@webkit.org>
2051
2052         Suppress null-conversion warnings in ANGLE
2053         https://bugs.webkit.org/show_bug.cgi?id=145125
2054
2055         Reviewed by Alex Christensen.
2056
2057         * CMakeLists.txt:
2058
2059 2015-06-18  Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>
2060
2061         [Streams API] Implement ReadableStreamReader.releaseLock
2062         https://bugs.webkit.org/show_bug.cgi?id=145299
2063
2064         Reviewed by Darin Adler.
2065
2066         Covered by rebased tests.
2067
2068         * Modules/streams/ReadableStream.cpp:
2069         (WebCore::ReadableStream::close): Moving some close code to newly added releaseReader.
2070         (WebCore::ReadableStream::releaseReader): Implements reader release and callbacks finalization.
2071         (WebCore::ReadableStream::changeStateToErrored): Calls releaseReader.
2072         * Modules/streams/ReadableStream.h:
2073         (WebCore::ReadableStream::hasReadPendingRequests): Added to enable reader.releaseLock throwing if read requests are pending.
2074         * Modules/streams/ReadableStreamReader.cpp:
2075         (WebCore::ReadableStreamReader::releaseLock): Implementation of releaseLock
2076         * Modules/streams/ReadableStreamReader.h:
2077         * Modules/streams/ReadableStreamReader.idl:
2078         (WebCore::releaseLock): Deleted.
2079
2080 2015-06-18  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2081
2082         GObject and ObjC bindings generator should not generate code for promise-based APIs
2083         https://bugs.webkit.org/show_bug.cgi?id=146059
2084
2085         Reviewed by Darin Adler.
2086
2087         Covered by rebased expectations.
2088
2089         * bindings/scripts/CodeGeneratorGObject.pm:
2090         (SkipFunction): Disabling GObject DOM binding for functions returning promises.
2091         * bindings/scripts/CodeGeneratorObjC.pm:
2092         (SkipFunction): Disabling ObjC DOM binding for functions returning promises.
2093         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Rebasing expectation.
2094         (webkit_dom_test_obj_get_read_only_long_attr): Deleted.
2095         (webkit_dom_test_obj_get_read_only_string_attr): Deleted.
2096         * bindings/scripts/test/GObject/WebKitDOMTestObj.h: Rebasing expectation.
2097         * bindings/scripts/test/ObjC/DOMTestObj.h: Ditto.
2098         * bindings/scripts/test/ObjC/DOMTestObj.mm: Ditto.
2099         (core): Deleted.
2100
2101 2015-06-17  Ryuan Choi  <ryuan.choi@navercorp.com>
2102
2103         [EFL] test_ewk2_context_url_scheme_register has been crashed since r185553
2104         https://bugs.webkit.org/show_bug.cgi?id=146075
2105
2106         Reviewed by Carlos Garcia Campos.
2107
2108         Since r185553, CustomProtocolManager sends StartLoading message to UIProcess
2109         with request of SoupGenericRequest instead of request itself.
2110         But, request of SoupGenericRequest is nullptr in EFL port because EFL port
2111         does not use m_initiatingPageID.
2112
2113         This patch updates request of SoupGenericRequest although m_initiatingPageID is null.
2114
2115         * platform/network/soup/ResourceRequestSoup.cpp: 
2116         (WebCore::ResourceRequest::updateSoupRequest):
2117
2118 2015-06-17  Daniel Bates  <dabates@apple.com>
2119
2120         Client may receive began editing callback for already focused text field
2121         https://bugs.webkit.org/show_bug.cgi?id=146074
2122         <rdar://problem/21293562>
2123
2124         Reviewed by Darin Adler.
2125
2126         Fixes an issue where the client would be notified that began editing in a text field
2127         for each programmatic DOM focus event dispatched at the text field regardless of
2128         whether the field was focused. The client should only be notified that began editing
2129         exactly once when a text field becomes focused (either programmatically or by user interaction).
2130
2131         * html/TextFieldInputType.cpp:
2132         (WebCore::TextFieldInputType::forwardEvent): Move logic to dispatch editing began callback from here...
2133         (WebCore::TextFieldInputType::handleFocusEvent): to here. This function is called when the
2134         text field becomes newly focused.
2135         * html/TextFieldInputType.h:
2136
2137 2015-06-17  Alex Christensen  <achristensen@webkit.org>
2138
2139         [Content Extensions] Fail to parse invalid arrays
2140         https://bugs.webkit.org/show_bug.cgi?id=146079
2141         rdar://problem/21422649
2142
2143         Reviewed by Benjamin Poulain.
2144
2145         Covered by new and corrected API tests.
2146
2147         * contentextensions/ContentExtensionParser.cpp:
2148         (WebCore::ContentExtensions::loadTrigger):
2149         Fail to parse invalid arrays for if-domain, unless-domain, resource-type, and load-type arrays.
2150
2151 2015-06-16  Jon Honeycutt  <jhoneycutt@apple.com>
2152
2153         Position::findParent() should take a reference
2154         https://bugs.webkit.org/show_bug.cgi?id=146038
2155
2156         Reviewed by Darin Adler.
2157
2158         * dom/Position.cpp:
2159         (WebCore::Position::containerNode):
2160         (WebCore::Position::parentAnchoredEquivalent):
2161         Pass a reference; there is already a null check.
2162         (WebCore::Position::previous):
2163         Add a missing null check. Code below this expects that node is non-null.
2164         (WebCore::Position::next):
2165         Ditto.
2166         (WebCore::Position::atStartOfTree):
2167         (WebCore::Position::atEndOfTree):
2168         Pass a reference.
2169         (WebCore::Position::findParent):
2170         Changed to take a reference.
2171
2172         * dom/Position.h:
2173         Ditto.
2174
2175 2015-06-17  Brent Fulgham  <bfulgham@apple.com>
2176
2177         Overflow regions with scroll snap points are not reliably rubber banding
2178         https://bugs.webkit.org/show_bug.cgi?id=142522
2179         <rdar://problem/20100726>
2180
2181         Reviewed by Darin Adler.
2182
2183         When computing the target scroll destination, update the nearest snap point index
2184         and other bookkeeping, but keep the original gesture target if it would have taken
2185         us beyond either limit of the scroll container.
2186
2187         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
2188         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
2189         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollExtents): Add new method
2190         to support client API.
2191         * platform/ScrollAnimator.cpp:
2192         (WebCore::ScrollAnimator::scrollExtents): Add new method to support client API.
2193         * platform/ScrollAnimator.h:
2194         * platform/cocoa/ScrollController.h:
2195         (WebCore::ScrollControllerClient::scrollExtents): Added new pure virtual method to API.
2196         * platform/cocoa/ScrollController.mm:
2197         (WebCore::ScrollController::beginScrollSnapAnimation): Hold onto original user gesture
2198         target, and use that instead of our nearest snap point if the gesture takes us past
2199         either extreme of the scroll container.
2200
2201 2015-06-17  Tim Horton  <timothy_horton@apple.com>
2202
2203         Swipe gesture can get stuck, preventing scrolling and other gestures
2204         https://bugs.webkit.org/show_bug.cgi?id=146088
2205         <rdar://problem/16056087>
2206
2207         Reviewed by Darin Adler.
2208
2209         * WebCore.xcodeproj/project.pbxproj:
2210         * platform/spi/mac/NSEventSPI.h: Added.
2211         Add an SPI header.
2212
2213 2015-06-16  Matt Rajca  <mrajca@apple.com>
2214
2215         MediaSession: handle MediaEventTrackNext and MediaEventTrackPrevious events
2216         https://bugs.webkit.org/show_bug.cgi?id=146028
2217
2218         Reviewed by Darin Adler.
2219
2220         * Modules/mediasession/MediaRemoteControls.idl: Added nexttrack/previoustrack event handlers.
2221         * Modules/mediasession/MediaSession.cpp: Dispatch the nexttrack/previoustrack events.
2222         (WebCore::MediaSession::skipToNextTrack):
2223         (WebCore::MediaSession::skipToPreviousTrack):
2224         * Modules/mediasession/MediaSession.h:
2225         * Modules/mediasession/MediaSessionManager.cpp: Skip to the next/previous track as described in the media session spec.
2226         (WebCore::MediaSessionManager::skipToNextTrack):
2227         (WebCore::MediaSessionManager::skipToPreviousTrack):
2228         * Modules/mediasession/MediaSessionManager.h:
2229         * dom/EventNames.h: Added the nexttrack/previoustrack event names.
2230         * page/Page.cpp: Tell MediaSessionManager to handle the new track-skipping events.
2231         (WebCore::Page::handleMediaEvent):
2232
2233 2015-06-17  Chris Fleizach  <cfleizach@apple.com>
2234
2235         AX: VoiceOver in iOS not announcing generic WAI-ARIA region, even if labelled properly
2236         https://bugs.webkit.org/show_bug.cgi?id=146066
2237
2238         Reviewed by Darin Adler.
2239
2240         Allow the region role to identify as a landmark type.
2241
2242         Updated test: platform/ios-simulator/accessibility/landmark-types.html
2243
2244         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2245         (-[WebAccessibilityObjectWrapper _accessibilityIsLandmarkRole:]):
2246
2247 2015-06-17  Simon Fraser  <simon.fraser@apple.com>
2248
2249         REGRESSION (r173283-r173296): Amazon.com front page has no caret in the search field
2250         https://bugs.webkit.org/show_bug.cgi?id=146073
2251         rdar://problem/21022203
2252
2253         Reviewed by Tim Horton.
2254
2255         Text controls (text inputs and textareas) need backing store even when empty, because
2256         they need to be able to paint a caret.
2257
2258         Test: compositing/backing/form-controls-backing.html
2259
2260         * rendering/RenderLayerBacking.cpp:
2261         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
2262
2263 2015-06-17  Zalan Bujtas  <zalan@apple.com>
2264
2265         Selection cache produces invalid result when ancestor has float element.
2266         https://bugs.webkit.org/show_bug.cgi?id=146042
2267         rdar://problem/20604592
2268
2269         Reviewed by Ryosuke Niwa.
2270
2271         Selection cache already takes floats into account, however it's not enough to check current
2272         block against floats. Any of the ancestor's float starting from the selection root block
2273         can impact the selection offsets.
2274
2275         Test: fast/block/selection-cache-is-incorrect-when-non-direct-parent-has-float.html
2276
2277         * rendering/LogicalSelectionOffsetCaches.h:
2278         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::ContainingBlockInfo):
2279         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock):
2280         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::block):
2281         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::cache):
2282         (WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::hasFloatsOrFlowThreads):
2283         (WebCore::LogicalSelectionOffsetCaches::LogicalSelectionOffsetCaches):
2284
2285 2015-06-17  Joanmarie Diggs  <jdiggs@igalia.com>
2286
2287         AX: [ATK] Expose element tag name as an object attribute
2288         https://bugs.webkit.org/show_bug.cgi?id=146062
2289
2290         Reviewed by Mario Sanchez Prada.
2291
2292         Expose the element tag name as an object attribute with name "tag" and
2293         value being the lowercase tag name, both being what Gecko does for ATK.
2294
2295         No new tests. We already have sufficient coverage for AtkObject attributes.
2296         These tests have been updated to reflect the addition of the new attribute.
2297
2298         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2299         (webkitAccessibleGetAttributes):
2300
2301 2015-06-17  Antti Koivisto  <antti@apple.com>
2302
2303         iOS WebKit1: [LegacyTileLayer drawInContext:] should ensure it has web lock
2304         https://bugs.webkit.org/show_bug.cgi?id=146072
2305         rdar://problem/21149759
2306
2307         Reviewed by Simon Fraser
2308
2309         There are some scenarios where we end up drawing without web lock due to client or system issues.
2310         This can cause crashes.
2311
2312         * platform/ios/LegacyTileLayer.mm:
2313         (-[LegacyTileLayer setNeedsDisplayInRect:]):
2314         (-[LegacyTileLayer drawInContext:]):
2315
2316             Ensure we have the web lock when called in main thread (even though we should have it already).
2317
2318 2015-06-17  Brent Fulgham  <bfulgham@apple.com>
2319
2320         CSS scroll snap: defining snap points on axis that does not scroll does not work properly
2321         https://bugs.webkit.org/show_bug.cgi?id=146043
2322         <rdar://problem/20125511>
2323
2324         Reviewed by Simon Fraser.
2325
2326         Tested by css3/scroll-snap/scroll-snap-mismatch.html
2327
2328         We always seed the set of scroll snap points with the start and end of the scroll container. This is not
2329         the right behavior if there are no scroll points defined, because we end up creating a snap for the start
2330         and end of the container, and any scroll gesture just takes us across the entire element.
2331         
2332         Instead, when we do not find any scroll snap points, we should clear the snap point state for the container.
2333
2334         * page/scrolling/AxisScrollSnapOffsets.cpp:
2335         (WebCore::updateFromStyle): If we did not find any snap points (i.e., the snapOffsets container
2336         only holds '0', return an empty Vector. 
2337         (WebCore::updateSnapOffsetsForScrollableArea): If the set of snap points produced by 'updateFromStyle' is empty,
2338         clear the horizontal (or vertical) snap offsets for the scroll area.
2339         
2340
2341 2015-06-17  Chris Fleizach  <cfleizach@apple.com>
2342
2343         AX: input role="spinbutton" gets skipped in voiceover
2344         https://bugs.webkit.org/show_bug.cgi?id=145514
2345
2346         Reviewed by Mario Sanchez Prada.
2347
2348         SpinButton role was added, but left out of iOS.
2349         To prevent this from happening again, explicitly list every role in the switch statement that
2350         determines accessible visibility.
2351
2352         Test: platform/ios-simulator/accessibility/spinbutton.html
2353
2354         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2355         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
2356         (-[WebAccessibilityObjectWrapper isAccessibilityElement]):
2357
2358 2015-06-17  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
2359
2360         [Streams API] ReadableJSStream should handle promises returned by JS source pull callback
2361         https://bugs.webkit.org/show_bug.cgi?id=145965
2362
2363         Reviewed by Darin Adler.
2364
2365         Implemented asynchronous pulling.
2366         In particular, ensuring that doPull is not called as long as previous call to doPull is finished.
2367         Storing whether to pull automatically when the current pull is finished. 
2368
2369         Covered by rebased tests.
2370
2371         * Modules/streams/ReadableStream.cpp:
2372         (WebCore::ReadableStream::pull): stores whether to pull again.
2373         (WebCore::ReadableStream::finishPulling): called when pulling finishes.
2374         * Modules/streams/ReadableStream.h:
2375         * bindings/js/ReadableJSStream.cpp:
2376         (WebCore::createPullResultFulfilledFunction): The promise resolve callback.
2377         (WebCore::ReadableJSStream::doPull): Handling of promise.
2378         * bindings/js/ReadableJSStream.h:
2379
2380 2015-06-16  Carlos Garcia Campos  <cgarcia@igalia.com>
2381
2382         WebProcess crashes after too many redirect error when there's an active NPAPI plugin
2383         https://bugs.webkit.org/show_bug.cgi?id=146019
2384
2385         Reviewed by Darin Adler.
2386
2387         This happens with the GTK+ port after a navigation action ends up
2388         in an infinite redirection and the ResourceHandle fails with too
2389         many redirections error. I should actually happen after any error
2390         is reported by the ResourceHnalder before the load is
2391         committed. But tt only happens if there's an active NPAPI
2392         plugin. The problem is that FrameLoader::receivedMainResourceError()
2393         is called recursively because DocumentLoader::stopLoading() ends up
2394         calling mainReceivedError() that calls FrameLoader::receivedMainResourceError()
2395         again. DocumentLoader::stopLoading() checks if the document is
2396         still loading, which can happen if the main resource is loading,
2397         if there's any subresource loading or if there's a plugin
2398         loading. So, in case of being loading, those cases are handled
2399         individually to cancel the main resource, or set an error in the
2400         document loader and cancel subresources and plugins, except for
2401         this case of plugins, that mainReceivedError is called instead of
2402         setting cancelled error on the document loader.
2403
2404         * loader/DocumentLoader.cpp:
2405         (WebCore::DocumentLoader::stopLoading): If the document is still
2406         loading because there are active plugins, set the cancelled error
2407         on the document instead of calling mainReceivedError again.
2408
2409 2015-06-16  Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>
2410
2411         [Streams API] Implement ReadableStream locked property
2412         https://bugs.webkit.org/show_bug.cgi?id=146023
2413
2414         Reviewed by Darin Adler.
2415
2416         Covered by rebased tests.
2417
2418         * Modules/streams/ReadableStream.h:
2419         (WebCore::ReadableStream::locked): Renamed isLocked by locked.
2420         * Modules/streams/ReadableStream.idl: Adding locked.
2421         * bindings/js/JSReadableStreamCustom.cpp:
2422         (WebCore::JSReadableStream::getReader): Using isLocked.
2423         * bindings/js/JSReadableStreamReaderCustom.cpp:
2424         (WebCore::constructJSReadableStreamReader): Using isLocked.
2425
2426 2015-06-16  Myles C. Maxfield  <mmaxfield@apple.com>
2427
2428         REGRESSION(r184899): [Cocoa] font-variant: small-caps is not honored with web fonts
2429         https://bugs.webkit.org/show_bug.cgi?id=145873
2430         <rdar://problem/21314282>
2431
2432         Reviewed by Dean Jackson.
2433
2434         When font-variant: small-caps is applied, we create a smaller version of the original font
2435         and draw capital characters in that smaller font. CGFontRefs do not have an intrinsic size,
2436         and web fonts historically only had a CGFontRef, which means that there was no need to
2437         convert the CGFontRef to be smaller (as opposed to regular fonts, which had a CTFontRef and
2438         therefore needed the conversion). Instead, we just changed m_size, which represents
2439         the size that the text should be drawn in.
2440
2441         However, r184899 gave CTFontRefs to web fonts. This means that now the FontPlatformData's
2442         m_size variable disagreed with the CTFontRef member. The solution here is to unify the web
2443         font and regular font codepaths, and treat them the same throughout.
2444
2445         Note that this patch removes the last use of the m_isCustomFont variable. As soon as we
2446         entirely migrate to CORETEXT_WEB_FONTS, we should delete this variable.
2447
2448         Test: fast/text/small-caps-web-font.html
2449
2450         * platform/graphics/cocoa/FontCocoa.mm:
2451         (WebCore::Font::platformCreateScaledFont): Treat web fonts the same as regular fonts.
2452         * platform/text/TextFlags.h: Add a comment regarding teh deletion of m_isCustomFont.
2453
2454 2015-06-16  Alex Christensen  <achristensen@webkit.org>
2455
2456         [Content Extensions] Implement branch compaction for DFA bytecode.
2457         https://bugs.webkit.org/show_bug.cgi?id=145619
2458
2459         Reviewed by Benjamin Poulain.
2460
2461         This patch adds another pass to the DFABytecodeCompiler which finds where the bytecode from each node
2462         would be if it were compiled with no branch compaction, then uses that as a worst-case value to determine
2463         how many bytes are needed to store the relative jump distance.  Then when linking, it will fill in the 
2464         value as it already did, but with a variable size jump.  The jumps are also now signed distances relative to
2465         where the jump is stored.
2466
2467         This patch is covered by existing tests, which have many jumps that are near the -128/127 byte boundary,
2468         and the switch from 16-bit jumps to 32-bit jumps near the -65536/65535 byte boundary is analogous.
2469
2470         * contentextensions/ContentExtensionCompiler.cpp:
2471         (WebCore::ContentExtensions::compileRuleList):
2472         * contentextensions/DFABytecode.h:
2473         (WebCore::ContentExtensions::smallestPossibleJumpSize):
2474         (WebCore::ContentExtensions::instructionSizeWithArguments):
2475         * contentextensions/DFABytecodeCompiler.cpp:
2476         (WebCore::ContentExtensions::append):
2477         (WebCore::ContentExtensions::appendZeroes):
2478         (WebCore::ContentExtensions::setBits):
2479         (WebCore::ContentExtensions::appendActionBytecodeSize):
2480         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
2481         (WebCore::ContentExtensions::DFABytecodeCompiler::longestPossibleJump):
2482         (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
2483         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
2484         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
2485         (WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
2486         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
2487         (WebCore::ContentExtensions::DFABytecodeCompiler::compiledNodeMaxBytecodeSize):
2488         (WebCore::ContentExtensions::DFABytecodeCompiler::ranges):
2489         (WebCore::ContentExtensions::DFABytecodeCompiler::checkForRangeMaxBytecodeSize):
2490         (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
2491         (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize):
2492         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
2493         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
2494         (WebCore::ContentExtensions::set32Bits): Deleted.
2495         * contentextensions/DFABytecodeCompiler.h:
2496         * contentextensions/DFABytecodeInterpreter.cpp:
2497         (WebCore::ContentExtensions::getBits):
2498         (WebCore::ContentExtensions::getInstruction):
2499         (WebCore::ContentExtensions::jumpSizeInBytes):
2500         (WebCore::ContentExtensions::getJumpSize):
2501         (WebCore::ContentExtensions::getJumpDistance):
2502         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
2503         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
2504         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
2505         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2506         * loader/ResourceLoadInfo.h:
2507
2508 2015-06-16  Carlos Alberto Lopez Perez  <clopez@igalia.com>
2509
2510         [GTK] [Wayland] Should be possible to build with support for both X11 and Wayland.
2511         https://bugs.webkit.org/show_bug.cgi?id=145701
2512
2513         Reviewed by Darin Adler.
2514
2515         No new tests, no behavior changes.
2516
2517         When building both targets, we have to include the wayland-egl
2518         headers in order to build the Wayland target. This causes that
2519         EGLNativePixmapType and EGLNativeWindowType get defined as
2520         different types than when building only the X11 target.
2521
2522         By type casting them to the ones that are expected, we are able
2523         to build both targets at the same time.
2524
2525         I have done tests (building each target alone as also both targets
2526         at the same time), and everything seems to works as expected.
2527
2528         Once built for both targets, if you try to launch the MiniBrowser
2529         from inside a Wayland compositor (Weston on top of X for example),
2530         it will trigger the X11 target if the DISPLAY environment variable
2531         is set and the environment variable GDK_BACKEND is not set to wayland,
2532         otherwise it will trigger the Wayland target.
2533
2534         * platform/graphics/GLContext.cpp:
2535         (WebCore::GLContext::createContextForWindow): Add type casts. We have
2536         to consider here two different type casts depending on the type of
2537         GLNativeWindowType to avoid a build failure on 32-bits platforms.
2538         The static_cast one was already beeing done as an implicit cast
2539         (from uint64_t to XID), the reinterpret_cast is the new one that
2540         we need to do only when building on both platforms.
2541         * platform/graphics/egl/GLContextEGL.cpp: Add missing include when
2542         building both targets that is required for defining DefaultRootWindow().
2543         (WebCore::GLContextEGL::createPixmapContext): Add type cast.
2544
2545 2015-06-15  Jon Honeycutt  <jhoneycutt@apple.com>
2546
2547         [iOS] Crash long pressing on <input type=file>
2548         https://bugs.webkit.org/show_bug.cgi?id=146009
2549         <rdar://problem/21234453>
2550
2551         Reviewed by Ryosuke Niwa.
2552
2553         * dom/Position.cpp:
2554         (WebCore::Position::atStartOfTree):
2555         (WebCore::Position::atEndOfTree):
2556         Null check the container node before passing it to findParent().
2557
2558 2015-06-15  Chris Fleizach  <cfleizach@apple.com>
2559
2560         AX:  iOS accessibility tests are not running because we need WKTR support
2561         https://bugs.webkit.org/show_bug.cgi?id=145991
2562
2563         Reviewed by Daniel Bates.
2564
2565         Make some minor modifications to support notification handling in WKTR.
2566
2567         * accessibility/ios/AXObjectCacheIOS.mm:
2568         (WebCore::AXObjectCache::postPlatformNotification):
2569         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2570         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2571         (-[WebAccessibilityObjectWrapper accessibilityClickPoint]):
2572         (-[WebAccessibilityObjectWrapper description]):
2573         (-[WebAccessibilityObjectWrapper accessibilitySetPostedNotificationCallback:withContext:]): Deleted.
2574         (-[WebAccessibilityObjectWrapper accessibilityPostedNotification:]): Deleted.
2575
2576 2015-06-16  Mark Lam  <mark.lam@apple.com>
2577
2578         Use NakedPtr<Exception>& to return exception results.
2579         https://bugs.webkit.org/show_bug.cgi?id=145870
2580
2581         Reviewed by Anders Carlsson and Filip Pizlo.
2582
2583         No new WebCore tests because this functionality is already covered by existing tests.
2584         API tests added for WTF::NakedPtr.
2585
2586         * bindings/js/JSCallbackData.cpp:
2587         (WebCore::JSCallbackData::invokeCallback):
2588         * bindings/js/JSCustomXPathNSResolver.cpp:
2589         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
2590         * bindings/js/JSErrorHandler.cpp:
2591         (WebCore::JSErrorHandler::handleEvent):
2592         * bindings/js/JSEventListener.cpp:
2593         (WebCore::JSEventListener::handleEvent):
2594         * bindings/js/JSMainThreadExecState.cpp:
2595         (WebCore::JSMainThreadExecState::didLeaveScriptContext):
2596         (WebCore::functionCallHandlerFromAnyThread):
2597         (WebCore::evaluateHandlerFromAnyThread):
2598         * bindings/js/JSMainThreadExecState.h:
2599         (WebCore::JSMainThreadExecState::currentState):
2600         (WebCore::JSMainThreadExecState::call):
2601         (WebCore::JSMainThreadExecState::evaluate):
2602         * bindings/js/JSMutationCallback.cpp:
2603         (WebCore::JSMutationCallback::call):
2604         * bindings/js/ScheduledAction.cpp:
2605         (WebCore::ScheduledAction::executeFunctionInContext):
2606         * bindings/js/ScriptController.cpp:
2607         (WebCore::ScriptController::evaluateInWorld):
2608         * bindings/js/WorkerScriptController.cpp:
2609         (WebCore::WorkerScriptController::evaluate):
2610         (WebCore::WorkerScriptController::setException):
2611         * bindings/js/WorkerScriptController.h:
2612         (WebCore::WorkerScriptController::workerGlobalScopeWrapper):
2613         * bindings/objc/WebScriptObject.mm:
2614         (-[WebScriptObject callWebScriptMethod:withArguments:]):
2615         * workers/WorkerGlobalScope.cpp:
2616         (WebCore::WorkerGlobalScope::importScripts):
2617
2618 2015-06-16  Brent Fulgham  <bfulgham@apple.com>
2619
2620         CSS Scroll Snap - support snapping to nested elements
2621         https://bugs.webkit.org/show_bug.cgi?id=145843
2622         <rdar://problem/21339581>
2623
2624         Reviewed by Darin Adler.
2625
2626         Tested by css3/scroll-snap/nested-elements.html
2627
2628         The Scroll Snap Point implementation was not properly handling nested elements.
2629         This could be resolved by recursively calling 'appendChildSnapOffsets', but this
2630         seemed like an inefficient approach, especially considering how often this method
2631         is called during various scaling and other operations.
2632         
2633         Instead, do the following:
2634         (1) Add a new HashSet to RenderView that holds a collection of RenderElements that
2635             have scroll-snap-coordinates.
2636         (2) During RenderElement::styleWillChange, register all elements that have the
2637             scroll-snap-coordinates style with the RenderView.
2638         (3) When performing 'appendChildSnapOffsets', refer to the HashSet of elements, select the
2639             subset of these entries relevant to the current scrolling container, and build up the
2640             set of scroll-snap-coordinates needed for the current scrolling container.
2641
2642         * page/scrolling/AxisScrollSnapOffsets.cpp:
2643         (WebCore::appendChildSnapOffsets): Check the scroll-snap-coordinate RenderElement HashSet
2644         for the RenderView to find all elements that are children of the current scrolling container.
2645         Add the scroll-snap-coordinates for these RenderElements to the current set of snap points.
2646         * rendering/RenderElement.cpp:
2647         (WebCore::findEnclosingScrollableContainer): New helper function.
2648         (WebCore::RenderElement::styleWillChange): If the current element has scroll-snap-coordinate
2649         defined, remember it for later so we can use it with the relevant scrolling container
2650         after layout completes.
2651         (WebCore::RenderElement::willBeRemovedFromTree): Unregister the current element from the
2652         RenderView.
2653         (WebCore::RenderElement::findEnclosingScrollableContainer): Added. Locate the relevant
2654         scrolling container for the current object.
2655         * rendering/RenderElement.h:
2656         * rendering/RenderView.cpp:
2657         (WebCore::Document::registerRenderElementWithScrollSnapCoordinates): Added.
2658         (WebCore::Document::unregisterRenderElementWithScrollSnapCoordinates): Added.
2659         * rendering/RenderView.h:
2660
2661 2015-06-16  Brady Eidson  <beidson@apple.com>
2662
2663         [IndexedDB] array index keys are concatenated across cursor lifetime
2664         <rdar://problem/19684902> and https://bugs.webkit.org/show_bug.cgi?id=138504
2665
2666         Reviewed by Brady Eidson, patch by Mark Dixon <mark@lowla.io>
2667
2668         Tested by:
2669         storage/indexeddb/keypath-arrays.html
2670
2671         IDBKeyData and IDBKeyPath need to clear any existing array values before calling
2672         decodeObjects to update the value of an existing object.
2673         
2674         * Modules/indexeddb/IDBKeyData.cpp:
2675         (WebCore::IDBKeyData::decode):
2676         * Modules/indexeddb/IDBKeyPath.cpp:
2677         (WebCore::IDBKeyPath::decode):
2678
2679 2015-06-16  Said Abou-Hallawa  <sabouhallawa@apple.com>
2680
2681         Canvas dimensions should be limited to 4096x4096 pixels on iOS devices.
2682         https://bugs.webkit.org/show_bug.cgi?id=145998
2683
2684         Reviewed by Darin Adler.
2685
2686         The value of MaxCanvasArea should depend on the platform. If the platform
2687         is iOS, the limit should be 64M. Otherwise the limit should be 1G.
2688
2689         Test: fast/canvas/pattern-too-large-to-create-2.html
2690
2691         * html/HTMLCanvasElement.cpp: Change MaxCanvasArea value based on the platform. 
2692         
2693         * rendering/svg/RenderSVGShape.h:
2694         (WebCore::RenderSVGShape::graphicsElement): Remove un-implemented constructor.
2695
2696 2015-06-16  Chris Dumez  <cdumez@apple.com>
2697
2698         REGRESSION(r185012): chat frame in Gmail now says "Something's not right"
2699         https://bugs.webkit.org/show_bug.cgi?id=146025
2700         <rdar://problem/21391412>
2701
2702         Reviewed by Darin Adler.
2703
2704         Only throttle timers in non-visible iframes once they've reached the
2705         max nesting level to avoid throttling critical one-shot timers. This is
2706         consistent with the default DOMTimer throttling behavior that is
2707         defined in the specification.
2708
2709         Power-wise, we are mostly interested in DOMTimers that fire frequently
2710         and cause high CPU usage over an extended period of time anyway.
2711
2712         * dom/Document.cpp:
2713         (WebCore::Document::setTimerThrottlingEnabled):
2714         (WebCore::Document::timerAlignmentInterval):
2715         * dom/Document.h:
2716         * dom/ScriptExecutionContext.cpp:
2717         (WebCore::ScriptExecutionContext::timerAlignmentInterval):
2718         * dom/ScriptExecutionContext.h:
2719         * page/DOMTimer.cpp:
2720         (WebCore::DOMTimer::alignedFireTime):
2721
2722 2015-06-16  sylvain-galineau  <galineau@adobe.com>
2723
2724         Incorrect order of arguments in initial-letter property
2725         https://bugs.webkit.org/show_bug.cgi?id=139667
2726
2727         Reviewed by Sam Weinig.
2728
2729         The CSS specification swapped the order of the initial-letters numeric values.
2730         The drop cap's height now comes first, followed by its optional vertical position.
2731         See http://www.w3.org/TR/css-inline/#sizing-drop-initials.
2732          
2733         No new tests. Existing tests updated.
2734
2735         * css/CSSParser.cpp:
2736         (WebCore::CSSParser::parseValue): swap arguments to reflect new spec order.
2737
2738 2015-06-16  Alex Christensen  <achristensen@webkit.org>
2739
2740         Remove some unused values.
2741         https://bugs.webkit.org/show_bug.cgi?id=145997
2742
2743         Reviewed by Gyuyoung Kim.
2744
2745         This patch should have no change in behavior.
2746
2747         * accessibility/AccessibilityObject.cpp:
2748         (WebCore::computeBestScrollOffset):
2749         (WebCore::AccessibilityObject::scrollToMakeVisibleWithSubFocus):
2750         (WebCore::AccessibilityObject::scrollToGlobalPoint):
2751         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2752         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
2753         * html/canvas/WebGL2RenderingContext.cpp:
2754         (WebCore::WebGL2RenderingContext::validateTexFuncData):
2755         * html/canvas/WebGLRenderingContext.cpp:
2756         (WebCore::WebGLRenderingContext::validateTexFuncData):
2757         * platform/graphics/StringTruncator.cpp:
2758         (WebCore::leftTruncateToBuffer):
2759         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2760         (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
2761         * rendering/InlineTextBox.cpp:
2762         (WebCore::InlineTextBox::localSelectionRect):
2763         * rendering/RenderElement.cpp:
2764         (WebCore::RenderElement::anchorRect):
2765         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
2766         (WebCore::SimpleLineLayout::TextFragmentIterator::skipToNextPosition):
2767         * rendering/svg/SVGTextQuery.cpp:
2768         (WebCore::SVGTextQuery::modifyStartEndPositionsRespectingLigatures):
2769         Remove unused values.
2770
2771 2015-06-16  Youenn Fablet <youenn.fablet@crf.canon.fr> and Xabier Rodriguez Calvar  <calvaris@igalia.com>
2772
2773         [Streams API] Calling controller.error() should trigger storing an undefined error
2774         https://bugs.webkit.org/show_bug.cgi?id=145976
2775
2776         Reviewed by Darin Adler.
2777
2778         Covered by rebased test.
2779
2780         * bindings/js/JSReadableStreamControllerCustom.cpp:
2781         (WebCore::JSReadableStreamController::error): Storing undefined if no error value passed.
2782         * bindings/js/ReadableJSStream.cpp: Removed storeError(ExecState*).
2783         (WebCore::ReadableJSStream::ReadableJSStream):
2784
2785 2015-06-16  Chris Dumez  <cdumez@apple.com>
2786
2787         Purge StyledElement's presentation attribute cache on memory pressure
2788         https://bugs.webkit.org/show_bug.cgi?id=145999
2789         <rdar://problem/21359252>
2790
2791         Reviewed by Andreas Kling.
2792
2793         Purge StyledElement's presentation attribute cache on memory pressure.
2794
2795         * dom/StyledElement.cpp:
2796         (WebCore::presentationAttributeCache):
2797         (WebCore::presentationAttributeCacheCleaner):
2798         (WebCore::StyledElement::clearPresentationAttributeCache):
2799         * dom/StyledElement.h:
2800         * platform/MemoryPressureHandler.cpp:
2801         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
2802
2803 2015-06-15  Brent Fulgham  <bfulgham@apple.com>
2804
2805         REGRESSION(r175251, Mavericks Only): Playback may stall
2806         https://bugs.webkit.org/show_bug.cgi?id=145989
2807         <rdar://problem/21271919>
2808
2809         Unreviewed post-review correction.
2810
2811         Dave Kilzer pointed out that the macro around the waitForVideoOutputMediaDataWillChange
2812         call was incorrect. This patch corrects this error.
2813
2814         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2815         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Correct the
2816         macro definition.
2817
2818 2015-06-15  Chris Fleizach  <cfleizach@apple.com>
2819
2820         AX: Changing state of radio buttons causes VoiceOver to go busy for a short time.
2821         https://bugs.webkit.org/show_bug.cgi?id=145933
2822
2823         Reviewed by Dean Jackson.
2824
2825         When radio buttons animate the new focus selection state, the thread activity looks a lot like short burst of
2826         activity to draw, then wait on CoreAnimation to apply those changes.
2827
2828         Since those periods of activity during animation are so short, VoiceOver is not able to query for all the
2829         attributes it needs, and gets stuck in the queue behind rendering.
2830
2831         The fix here is to turn off button state animations while VoiceOver is running.
2832
2833         * platform/mac/ThemeMac.mm:
2834         (WebCore::updateStates):
2835
2836 2015-06-15  Zalan Bujtas  <zalan@apple.com>
2837
2838         RootInlineBox::m_lineBreakObj becomes invalid when a child renderer is removed and the line does not get marked dirty.
2839         https://bugs.webkit.org/show_bug.cgi?id=145988
2840         rdar://problem/20959137
2841
2842         Reviewed by David Hyatt.
2843
2844         This patch ensures that we find the right first inline box so that we can dirty the
2845         the appropriate line boxes.
2846         With marking the right line boxes dirty, now we can update RootInlineBox::m_lineBreakObj at the next layout.
2847
2848         Test: fast/inline/crash-when-child-renderer-is-removed-and-line-stays-clean.html
2849
2850         * rendering/RenderInline.cpp:
2851         (WebCore::RenderInline::culledInlineFirstLineBox):
2852         (WebCore::RenderInline::culledInlineLastLineBox):
2853         * rendering/RootInlineBox.cpp:
2854         (WebCore::RootInlineBox::setLineBreakInfo): Deleted. Remove misleading assert and comment.
2855
2856 2015-06-15  Matt Rajca  <mrajca@apple.com>
2857
2858         Media Session: Improve the safety of playback toggling
2859         https://bugs.webkit.org/show_bug.cgi?id=145986
2860
2861         Reviewed by Darin Adler.
2862
2863         * Modules/mediasession/MediaSession.cpp:
2864         (WebCore::MediaSession::togglePlayback): Improved the safety of the loop so that we don't re-visit elements that
2865           may have been deleted underneath us.
2866         * Modules/mediasession/MediaSession.h: Added a pointer to the set of iterated active participating elements so
2867           we can remove any elements that are deleted from the underlying "real" set.
2868
2869 2015-06-15  Brent Fulgham  <bfulgham@apple.com>
2870
2871         REGRESSION(r175251, Mavericks Only): Playback may stall
2872         https://bugs.webkit.org/show_bug.cgi?id=145989
2873         <rdar://problem/21271919>
2874
2875         Reviewed by Dean Jackson.
2876
2877         Revert r175251 for Mavericks build targets.
2878
2879         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2880         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoLayer):
2881         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput):
2882         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2883
2884 2015-06-15  Darin Adler  <darin@apple.com>
2885
2886         REGRESSION (r182215): Reproducible crash at drawsvg.org due to reentrant layout
2887         https://bugs.webkit.org/show_bug.cgi?id=145964
2888
2889         Reviewed by Simon Fraser.
2890
2891         Test: svg/as-object/mutate-on-load.html
2892
2893         * page/FrameView.cpp:
2894         (WebCore::FrameView::forceLayoutParentViewIfNeeded): Don't do a synchronous layout here,
2895         because it can lead indirectly to unwanted layout reentrancy. Instead schedule a layout.
2896
2897 2015-06-15  Matt Rajca  <mrajca@apple.com>
2898
2899         Media Session: Active participating elements can change while being iterated 
2900         https://bugs.webkit.org/show_bug.cgi?id=145978
2901
2902         Reviewed by Alex Christensen.
2903
2904         * Modules/mediasession/MediaSession.cpp:
2905         (WebCore::MediaSession::togglePlayback): Iterate through a copy of m_activeParticipatingElements since its contents
2906           can be modified in the loop.
2907
2908 2015-06-15  Chris Fleizach  <cfleizach@apple.com>
2909
2910         AX: no accessibility support for details element
2911         https://bugs.webkit.org/show_bug.cgi?id=131111
2912
2913         Reviewed by Darin Adler.
2914
2915         Add accessibility support for Mac for details element by:
2916            1) Returning new subroles for <details> and <summary>
2917            2) Exposing isExpanded property for <details> element.
2918
2919         Test: platform/mac/accessibility/details-summary.html
2920
2921         * accessibility/AccessibilityObject.cpp:
2922         (WebCore::AccessibilityObject::supportsARIAPressed):
2923         (WebCore::AccessibilityObject::supportsExpanded):
2924         (WebCore::AccessibilityObject::isExpanded):
2925         (WebCore::AccessibilityObject::supportsARIAExpanded): Deleted.
2926         * accessibility/AccessibilityObject.h:
2927         (WebCore::AccessibilityObject::canvasHasFallbackContent):
2928         * accessibility/AccessibilityRenderObject.cpp:
2929         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
2930         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2931         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2932         (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
2933         (-[WebAccessibilityObjectWrapper accessibilityIsExpanded]):
2934         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2935         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
2936         (createAccessibilityRoleMap):
2937         (-[WebAccessibilityObjectWrapper subrole]):
2938         * html/HTMLDetailsElement.h:
2939         * inspector/InspectorDOMAgent.cpp:
2940         (WebCore::InspectorDOMAgent::buildObjectForAccessibilityProperties):
2941
2942 2015-06-15  Alex Christensen  <achristensen@webkit.org>
2943
2944         [Content Extensions] Limit number of rules.
2945         https://bugs.webkit.org/show_bug.cgi?id=145663
2946
2947         Reviewed by Benjamin Poulain.
2948
2949         Added an API test to make sure that parsing fails when there are too many rules.
2950
2951         * contentextensions/ContentExtensionError.cpp:
2952         (WebCore::ContentExtensions::contentExtensionErrorCategory):
2953         * contentextensions/ContentExtensionError.h:
2954         * contentextensions/ContentExtensionParser.cpp:
2955         (WebCore::ContentExtensions::loadEncodedRules):
2956         Fail to parse a content extension with more than 50000 rules.
2957
2958 2015-06-12  Alexey Proskuryakov  <ap@apple.com>
2959
2960         -[WKWebView evaluateJavaScript] provides a misleading error when the return cannot be serialized
2961         https://bugs.webkit.org/show_bug.cgi?id=145900
2962
2963         Reviewed by Sam Weinig.
2964
2965         * English.lproj/Localizable.strings:
2966
2967 2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2968
2969         [SOUP] Custom URI schemes don't work for requests containing a fragment identifier
2970         https://bugs.webkit.org/show_bug.cgi?id=145969
2971
2972         Reviewed by Sergio Villar Senin.
2973
2974         For URIs like foo:bar#baz, what the custom protocol manager
2975         receives in the UI process is foo:bar, so the user can't handle fragments.
2976
2977         * platform/network/soup/ResourceRequestSoup.cpp:
2978         (WebCore::ResourceRequest::updateSoupRequest): If the SoupRequest
2979         is a WebKitSoupRequestGeneric, call
2980         webkitSoupRequestGenericSetRequest with the ResourceRequest.
2981         * platform/network/soup/WebKitSoupRequestGeneric.cpp:
2982         (webkitSoupRequestGenericSetRequest):
2983         (webkitSoupRequestGenericGetRequest):
2984         * platform/network/soup/WebKitSoupRequestGeneric.h:
2985
2986 2015-06-15  Carlos Garcia Campos  <cgarcia@igalia.com>
2987
2988         [SOUP] Move WebKitSoupRequestGeneric to platform layer
2989         https://bugs.webkit.org/show_bug.cgi?id=145968
2990
2991         Reviewed by Sergio Villar Senin.
2992
2993         * PlatformEfl.cmake:
2994         * PlatformGTK.cmake:
2995         * platform/network/soup/WebKitSoupRequestGeneric.cpp: Renamed from Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.cpp.
2996         (webkitSoupRequestGenericFinalize):
2997         (webkit_soup_request_generic_init):
2998         (webkitSoupRequestGenericSendAsync):
2999         (webkitSoupRequestGenericSendFinish):
3000         (webkitSoupRequestGenericGetContentLength):
3001         (webkitSoupRequestGenericGetContentType):
3002         (webkit_soup_request_generic_class_init):
3003         (webkitSoupRequestGenericSetContentLength):
3004         (webkitSoupRequestGenericSetContentType):
3005         * platform/network/soup/WebKitSoupRequestGeneric.h: Renamed from Source/WebKit2/WebProcess/soup/WebKitSoupRequestGeneric.h.
3006         * platform/network/soup/WebKitSoupRequestGenericClient.h: Renamed from Source/WebKit2/WebProcess/soup/WebKitSoupRequestGenericClient.h.
3007
3008 2015-06-13  Chris Dumez  <cdumez@apple.com>
3009
3010         [WK2] API::Navigation objects are leaked on history navigation to HistoryItems in PageCache
3011         https://bugs.webkit.org/show_bug.cgi?id=145948
3012
3013         Reviewed by Darin Adler.
3014
3015         API::Navigation objects were leaked on history navigation to
3016         HistoryItems in PageCache. In such case, we would create 2 Navigation
3017         objects instead of 1 and the first one would be leaked. The reason
3018         we create the second one is because we fail to pass along the
3019         navigationID from the UIProcess to the WebProcess and then back to the
3020         UIProcess. On the IPC back to the UIProcess, the navigationID ends up
3021         being 0 so the UIProcess creates a new Navigation object, thinking that
3022         the load was triggered by the WebContent process.
3023
3024         We now pass along the navigationID, even if the HistoryItem is in the
3025         PageCache and we end up reusing the cached DocumentLoader, instead of
3026         creating a new one. A new updateCachedDocumentLoader() delegate is
3027         added to the FrameLoaderClient, similarly to the pre-existing
3028         createDocumentLoader() but for the case where the DocumentLoader gets
3029         reused.
3030
3031         * loader/EmptyClients.h:
3032         * loader/FrameLoader.cpp:
3033         (WebCore::FrameLoader::loadDifferentDocumentItem):
3034         * loader/FrameLoaderClient.h:
3035
3036 2015-06-13  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
3037
3038         [Streams API] ReadableJSStream should handle promises returned by JS source start callback
3039         https://bugs.webkit.org/show_bug.cgi?id=145792
3040
3041         Reviewed by Darin Adler.
3042
3043         Covered by rebased tests.
3044
3045         When calling start callback, the returned value is checked.
3046         If it is not a promise, we do as if it is a resolved promise.
3047         If it is a promise, we call its then() method with two resolve/reject JS functions.
3048
3049         * Modules/streams/ReadableStream.cpp:
3050         * bindings/js/ReadableJSStream.cpp:
3051         (WebCore::ReadableJSStream::invoke): Returns a JSPromise* if any is returned by the JS source callback.
3052         (WebCore::thenPromise): Utility method to call the promise.
3053         (WebCore::createStartResultFulfilledFunction): The promise resolve callback.
3054         (WebCore::ReadableJSStream::doStart): Calls thenPromise if a JSPromise* is returned by invoke.
3055         (WebCore::ReadableJSStream::ReadableJSStream):
3056         * bindings/js/ReadableJSStream.h:
3057
3058 2015-06-13  Andres Gonzalez  <agonzalez334@nc.rr.com>
3059
3060         AX: WebKit exposes all Ruby Text as Unknown (Japanese EPUB accessibility blocker)
3061         https://bugs.webkit.org/show_bug.cgi?id=141303
3062
3063         Reviewed by Chris Fleizach.
3064
3065         Test: accessibility/ruby-hierarchy-roles.html
3066
3067         * accessibility/AccessibilityObject.h:
3068         * accessibility/AccessibilityRenderObject.cpp:
3069         (WebCore::AccessibilityRenderObject::computeAccessibilityIsIgnored):
3070         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3071         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3072         (createAccessibilityRoleMap):
3073         (-[WebAccessibilityObjectWrapper subrole]):
3074
3075 2015-06-12  Chris Fleizach  <cfleizach@apple.com>
3076
3077         AX: iOS: after updating control, VoiceOver speaks aria-expanded states reversed (says "collapsed" when "expanded")
3078         https://bugs.webkit.org/show_bug.cgi?id=145943
3079
3080         Reviewed by Darin Adler.
3081
3082         iOS Accessibility platform needs to be notified of when aria expanded changes.
3083
3084         * accessibility/ios/AXObjectCacheIOS.mm:
3085         (WebCore::AXObjectCache::postPlatformNotification):
3086         * accessibility/ios/WebAccessibilityObjectWrapperIOS.h:
3087         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3088         (-[WebAccessibilityObjectWrapper postValueChangedNotification]):
3089         (-[WebAccessibilityObjectWrapper postExpandedChangedNotification]):
3090         (-[WebAccessibilityObjectWrapper postScrollStatusChangeNotification]):
3091
3092 2015-06-12  Chris Fleizach  <cfleizach@apple.com>
3093
3094         AX:ARIA Toggle buttons aren't properly conveyed on iOS using VoiceOver
3095         https://bugs.webkit.org/show_bug.cgi?id=145949
3096
3097         Reviewed by Darin Adler.
3098
3099         Expose pressed state information to the iOS platform AX API.
3100
3101         Test: Updated inspector-protocol/dom/getAccessibilityPropertiesForNode.html 
3102               There was a FIXME for this issue in that test: https://bugs.webkit.org/show_bug.cgi?id=129830
3103
3104         * accessibility/AccessibilityNodeObject.cpp:
3105         (WebCore::AccessibilityNodeObject::isPressed):
3106         * accessibility/AccessibilityObject.cpp:
3107         (WebCore::AccessibilityObject::classList):
3108         (WebCore::AccessibilityObject::supportsARIAPressed):
3109         (WebCore::AccessibilityObject::supportsARIAExpanded):
3110         * accessibility/AccessibilityObject.h:
3111         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3112         (-[WebAccessibilityObjectWrapper accessibilityARIALiveRegionIsAtomic]):
3113         (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAPressed]):
3114         (-[WebAccessibilityObjectWrapper accessibilityIsPressed]):
3115         (-[WebAccessibilityObjectWrapper accessibilitySupportsARIAExpanded]):
3116
3117 2015-06-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3118
3119         Purge PassRefPtr in JavaScriptCore - 2
3120         https://bugs.webkit.org/show_bug.cgi?id=145834
3121
3122         Reviewed by Darin Adler.
3123
3124         Fix call sites depends on changing of JSC.
3125
3126         * html/canvas/WebGL2RenderingContext.cpp:
3127         (WebCore::WebGL2RenderingContext::getParameter):
3128         * html/canvas/WebGLRenderingContext.cpp:
3129         (WebCore::WebGLRenderingContext::getParameter):
3130         * html/canvas/WebGLRenderingContextBase.cpp:
3131         (WebCore::WebGLRenderingContextBase::getUniform):
3132         (WebCore::WebGLRenderingContextBase::getVertexAttrib):
3133         (WebCore::WebGLRenderingContextBase::getWebGLFloatArrayParameter):
3134         (WebCore::WebGLRenderingContextBase::getWebGLIntArrayParameter):
3135
3136 2015-06-12  Zalan Bujtas  <zalan@apple.com>
3137
3138         Be more defensive at renderer type checking when initializing flow segments.
3139         https://bugs.webkit.org/show_bug.cgi?id=145942
3140
3141         Reviewed by Simon Fraser.
3142
3143         FlowContents::initializeSegments should ignore unsupported renderers so that when we miss
3144         a simple line layout path invalidation, we don't downcast the unsupported renderer to RenderText.
3145
3146         I have not reproduced this issue (but related to rdar://problem/21312452)
3147
3148         * rendering/SimpleLineLayoutFlowContents.cpp:
3149         (WebCore::SimpleLineLayout::initializeSegments):
3150
3151 2015-06-12  Anders Carlsson  <andersca@apple.com>
3152
3153         deleteEmptyDirectory should delete .DS_Store files on OS X
3154         https://bugs.webkit.org/show_bug.cgi?id=145944
3155
3156         Reviewed by Dan Bernstein.
3157
3158         deleteEmptyDirectory is often used when clearing website data, so we should
3159         take extra care to delete empty directories so the user won't think that clearing
3160         website data didn't do anything because it would leave directories with .DS_Store 
3161         files behind.
3162
3163         * platform/mac/FileSystemMac.mm:
3164         (WebCore::deleteEmptyDirectory):
3165         * platform/posix/FileSystemPOSIX.cpp:
3166
3167 2015-06-12  Manuel Rego Casasnovas  <rego@igalia.com>
3168
3169         [CSS Grid Layout] Fix grid-template-areas parsing to avoid spaces
3170         https://bugs.webkit.org/show_bug.cgi?id=145860
3171
3172         Reviewed by Sergio Villar Senin.
3173
3174         The spec doesn't require to have spaces between unnamed and named areas
3175         in grid-template-areas syntax. But spaces are currently required in our
3176         code.
3177
3178         This was confirmed in the CSS WG mailing list:
3179         https://lists.w3.org/Archives/Public/www-style/2015May/0239.html
3180
3181         This patch updates grid-template-areas parsing to allow the possibility
3182         of removing spaces between unnamed and named areas.
3183
3184         Added new cases to fast/css-grid-layout/grid-template-areas-get-set.html.
3185
3186         * css/CSSParser.cpp:
3187         (WebCore::parseGridTemplateAreasColumnNames): New helper method to
3188         determine the column names split by white spaces or dots.
3189         (WebCore::CSSParser::parseGridTemplateAreasRow): Use the new helper
3190         method to get the column names.
3191         (WebCore::containsOnlyDots): Deleted. Not needed anymore as
3192         parseGridTemplateAreasColumnNames() is using a single dot for unnamed
3193         grid areas (despite of being defined with 1 or more dots).
3194
3195 2015-06-12  Eric Carlson  <eric.carlson@apple.com>
3196
3197         [Mac] AirPlay menu button doesn't always show on page load
3198         https://bugs.webkit.org/show_bug.cgi?id=145936
3199
3200         Reviewed by Brent Fulgham.
3201
3202         * Modules/mediasession/WebMediaSessionManager.cpp:
3203         (WebCore::mediaProducerStateString): New, return a string representing MediaStateFlags.
3204         (WebCore::WebMediaSessionManager::clientStateDidChange): Log the states as strings.
3205         (WebCore::WebMediaSessionManager::toString): New, return a string representing ConfigurationTasks.
3206         (WebCore::WebMediaSessionManager::scheduleDelayedTask): Add logging.
3207         (WebCore::WebMediaSessionManager::taskTimerFired): Add logging.
3208         * Modules/mediasession/WebMediaSessionManager.h:
3209
3210         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h: Override wirelessVideoPlaybackDisabled
3211           so it is possible to activate route monitoring for a movie loaded with this engine.
3212         * platform/graphics/mac/MediaPlayerPrivateQTKit.h: Ditto.
3213
3214 2015-06-12  Zan Dobersek  <zdobersek@igalia.com>
3215
3216         Add the remaining missing override specifiers under Source/WebCore/
3217         https://bugs.webkit.org/show_bug.cgi?id=145907
3218
3219         Reviewed by Darin Adler.
3220
3221         Fix the remaining compiler warnings about missing override specifiers
3222         for overriding method declarations in classes under Source/WebCore/.
3223
3224         Where the addition had to be performed on all virtual methods of the
3225         class, the virtual specifier was removed so now only the override
3226         specifier is in use.
3227
3228         * Modules/indexeddb/IDBOpenDBRequest.h:
3229         * Modules/indexeddb/IDBRequest.h:
3230         * Modules/webdatabase/DatabaseServer.h:
3231         * bindings/js/ReadableJSStream.h:
3232         * editing/InsertTextCommand.h:
3233         * mathml/MathMLInlineContainerElement.h:
3234         * platform/audio/EqualPowerPanner.h:
3235         (WebCore::EqualPowerPanner::reset):
3236         * platform/graphics/MediaPlayer.cpp:
3237         (WebCore::NullMediaPlayerPrivate::load):
3238         (WebCore::NullMediaPlayerPrivate::cancelLoad):
3239         (WebCore::NullMediaPlayerPrivate::prepareToPlay):
3240         (WebCore::NullMediaPlayerPrivate::play):
3241         (WebCore::NullMediaPlayerPrivate::pause):
3242         (WebCore::NullMediaPlayerPrivate::platformMedia):
3243         (WebCore::NullMediaPlayerPrivate::platformLayer):
3244         (WebCore::NullMediaPlayerPrivate::naturalSize):
3245         (WebCore::NullMediaPlayerPrivate::hasVideo):
3246         (WebCore::NullMediaPlayerPrivate::hasAudio):
3247         (WebCore::NullMediaPlayerPrivate::setVisible):
3248         (WebCore::NullMediaPlayerPrivate::durationDouble):
3249         (WebCore::NullMediaPlayerPrivate::currentTimeDouble):
3250         (WebCore::NullMediaPlayerPrivate::seekDouble):
3251         (WebCore::NullMediaPlayerPrivate::seeking):
3252         (WebCore::NullMediaPlayerPrivate::setRateDouble):
3253         (WebCore::NullMediaPlayerPrivate::setPreservesPitch):
3254         (WebCore::NullMediaPlayerPrivate::paused):
3255         (WebCore::NullMediaPlayerPrivate::setVolumeDouble):
3256         (WebCore::NullMediaPlayerPrivate::supportsMuting):
3257         (WebCore::NullMediaPlayerPrivate::setMuted):
3258         (WebCore::NullMediaPlayerPrivate::hasClosedCaptions):
3259         (WebCore::NullMediaPlayerPrivate::setClosedCaptionsVisible):
3260         (WebCore::NullMediaPlayerPrivate::networkState):
3261         (WebCore::NullMediaPlayerPrivate::readyState):
3262         (WebCore::NullMediaPlayerPrivate::maxTimeSeekableDouble):
3263         (WebCore::NullMediaPlayerPrivate::minTimeSeekable):
3264         (WebCore::NullMediaPlayerPrivate::buffered):
3265         (WebCore::NullMediaPlayerPrivate::totalBytes):
3266         (WebCore::NullMediaPlayerPrivate::didLoadingProgress):
3267         (WebCore::NullMediaPlayerPrivate::setSize):
3268         (WebCore::NullMediaPlayerPrivate::canLoadPoster):
3269         (WebCore::NullMediaPlayerPrivate::setPoster):
3270         (WebCore::NullMediaPlayerPrivate::hasSingleSecurityOrigin):
3271         * platform/graphics/filters/DistantLightSource.h:
3272         * platform/graphics/filters/FEComposite.h:
3273         * platform/graphics/filters/FEDisplacementMap.h:
3274         (WebCore::FEDisplacementMap::determineAbsolutePaintRect):
3275         * platform/graphics/filters/FEFlood.h:
3276         (WebCore::FEFlood::determineAbsolutePaintRect):
3277         * platform/graphics/filters/PointLightSource.h:
3278         * platform/graphics/filters/SpotLightSource.h:
3279         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3280         (WebCore::MediaPlayerPrivateGStreamer::hasVideo):
3281         (WebCore::MediaPlayerPrivateGStreamer::hasAudio):
3282         (WebCore::MediaPlayerPrivateGStreamer::audioSourceProvider):
3283         (WebCore::MediaPlayerPrivateGStreamer::engineDescription):
3284         (WebCore::MediaPlayerPrivateGStreamer::isLiveStream):
3285         (WebCore::MediaPlayerPrivateGStreamer::totalVideoFrames):
3286         (WebCore::MediaPlayerPrivateGStreamer::droppedVideoFrames):
3287         (WebCore::MediaPlayerPrivateGStreamer::corruptedVideoFrames):
3288         (WebCore::MediaPlayerPrivateGStreamer::totalFrameDelay):
3289         * platform/graphics/texmap/BitmapTextureGL.h:
3290         (WebCore::BitmapTextureGL::isBackedByOpenGL):
3291         * platform/graphics/transforms/Matrix3DTransformOperation.h:
3292         * platform/graphics/transforms/MatrixTransformOperation.h:
3293         * platform/graphics/transforms/PerspectiveTransformOperation.h:
3294         * platform/graphics/transforms/RotateTransformOperation.h:
3295         * platform/graphics/transforms/ScaleTransformOperation.h:
3296         * platform/graphics/transforms/SkewTransformOperation.h:
3297         * platform/image-decoders/png/PNGImageDecoder.h:
3298         (WebCore::PNGImageDecoder::filenameExtension):
3299         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h:
3300         * platform/mock/MockRealtimeMediaSourceCenter.h:
3301
3302 2015-06-12  Commit Queue  <commit-queue@webkit.org>
3303
3304         Unreviewed, rolling out r185512.
3305         https://bugs.webkit.org/show_bug.cgi?id=145932
3306
3307         Many asserts on layout tests and on API tests (Requested by
3308         ap_ on #webkit).
3309
3310         Reverted changeset:
3311
3312         "Use modern for-loops in WebCore/rendering - 1"
3313         https://bugs.webkit.org/show_bug.cgi?id=145831
3314         http://trac.webkit.org/changeset/185512
3315
3316 2015-06-12  Simon Fraser  <simon.fraser@apple.com>
3317
3318         OpenGLESSPI.h doesn't need to include UIKit.h
3319         https://bugs.webkit.org/show_bug.cgi?id=145931
3320
3321         Reviewed by Darin Adler.
3322
3323         No need to suck in all of UIKit from OpenGLESSPI.h.
3324
3325         * platform/spi/ios/OpenGLESSPI.h:
3326
3327 2015-06-12  Matt Rajca  <mrajca@apple.com>
3328
3329         Add barebones implementation of media session invocation algorithm.
3330         https://bugs.webkit.org/show_bug.cgi?id=145847
3331
3332         Reviewed by Darin Adler.
3333
3334         * Modules/mediasession/MediaSession.cpp:
3335         (WebCore::MediaSession::invoke): Move the media session to an active state.
3336         * Modules/mediasession/MediaSession.h:
3337         * html/HTMLMediaElement.cpp:
3338         (WebCore::HTMLMediaElement::playInternal): Call the media session invocation algorithm as described in the
3339           Media Session spec.
3340
3341 2015-06-12  Hunseop Jeong  <hs85.jeong@samsung.com>
3342
3343         Use modern for-loops in WebCore/rendering - 1
3344         https://bugs.webkit.org/show_bug.cgi?id=145831
3345
3346         Reviewed by Darin Adler.
3347
3348         No new tests because there is no behavior change.
3349
3350         * rendering/AutoTableLayout.cpp:
3351         (WebCore::AutoTableLayout::computeIntrinsicLogicalWidths):
3352         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
3353         * rendering/FilterEffectRenderer.cpp:
3354         (WebCore::FilterEffectRenderer::build):
3355         (WebCore::FilterEffectRenderer::clearIntermediateResults):
3356         * rendering/FilterEffectRenderer.h:
3357         * rendering/FloatingObjects.cpp:
3358         (WebCore::FloatingObjects::clearLineBoxTreePointers):
3359         (WebCore::FloatingObjects::moveAllToFloatInfoMap):
3360         (WebCore::FloatingObjects::computePlacedFloatsTree):
3361         * rendering/FlowThreadController.cpp:
3362         (WebCore::FlowThreadController::collectFixedPositionedLayers):
3363         * rendering/HitTestResult.cpp:
3364         (WebCore::HitTestResult::append):
3365         * rendering/ImageQualityController.cpp:
3366         (WebCore::ImageQualityController::highQualityRepaintTimerFired):
3367         * rendering/InlineTextBox.cpp:
3368         (WebCore::InlineTextBox::paint):
3369         * rendering/RenderBlock.cpp:
3370         (WebCore::removeBlockFromDescendantAndContainerMaps):
3371         (WebCore::RenderBlock::addOverflowFromPositionedObjects):
3372         (WebCore::RenderBlock::dirtyForLayoutFromPercentageHeightDescendants):
3373         (WebCore::RenderBlock::simplifiedNormalFlowLayout):
3374         (WebCore::RenderBlock::layoutPositionedObjects):
3375         (WebCore::RenderBlock::markPositionedObjectsForLayout):
3376         (WebCore::RenderBlock::paintContinuationOutlines):
3377         (WebCore::clipOutPositionedObjects):
3378         (WebCore::RenderBlock::removeFromTrackedRendererMaps):
3379         (WebCore::RenderBlock::removePositionedObjects):
3380         (WebCore::RenderBlock::checkPositionedObjectsNeedLayout):
3381         * rendering/RenderBlockFlow.cpp:
3382         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
3383         (WebCore::RenderBlockFlow::styleDidChange):
3384         (WebCore::RenderBlockFlow::moveFloatsTo):
3385         (WebCore::RenderBlockFlow::addOverflowFromFloats):
3386         (WebCore::RenderBlockFlow::repaintOverhangingFloats):
3387         (WebCore::RenderBlockFlow::paintFloats):
3388         (WebCore::RenderBlockFlow::clipOutFloatingObjects):
3389         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom):
3390         (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom):
3391         (WebCore::RenderBlockFlow::addOverhangingFloats):
3392         (WebCore::RenderBlockFlow::addIntrudingFloats):
3393         (WebCore::RenderBlockFlow::markSiblingsWithFloatsForLayout):
3394         (WebCore::RenderBlockFlow::adjustForBorderFit):
3395         * rendering/RenderBlockLineLayout.cpp:
3396         (WebCore::setLogicalWidthForTextRun):
3397         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
3398         (WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
3399         (WebCore::RenderBlockFlow::repaintDirtyFloats):
3400         (WebCore::RenderBlockFlow::layoutLineBoxes):
3401         (WebCore::RenderBlockFlow::checkFloatsInCleanLine):
3402         (WebCore::RenderBlockFlow::determineStartPosition):
3403         (WebCore::RenderBlockFlow::checkPaginationAndFloatsAtEndLine):
3404         * rendering/RenderCounter.cpp:
3405         (WebCore::RenderCounter::destroyCounterNodes):
3406         (WebCore::updateCounters):
3407         (WebCore::RenderCounter::rendererStyleChanged):
3408         * rendering/RenderFlexibleBox.cpp:
3409         (WebCore::RenderFlexibl