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