720231bc365bcec98de685b5727e29e8fbbb8150
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-07-23  Jon Davis  <jond@apple.com>
2
3         Adding Web Components to feature status page.
4         https://bugs.webkit.org/show_bug.cgi?id=147209
5
6         Reviewed by Timothy Hatcher.
7
8         * features.json:
9
10 2015-07-21  Jer Noble  <jer.noble@apple.com>
11
12         Notify the UI delegate when a MediaDocument's natural size changes
13         https://bugs.webkit.org/show_bug.cgi?id=147182
14
15         Reviewed by Simon Fraser.
16
17         Notify the MediaDocument that it's underlying media element has changed its natural size, either when
18         the media engine notifies us that the size changed, or when the ready state progresses to HAVE_METADATA.
19
20         * html/HTMLMediaElement.cpp:
21         (WebCore::HTMLMediaElement::setReadyState): Notify the media document.
22         (WebCore::HTMLMediaElement::mediaPlayerSizeChanged): Ditto.
23         * html/MediaDocument.cpp:
24         (WebCore::MediaDocument::mediaElementNaturalSizeChanged): Pass to the chrome client.
25         * html/MediaDocument.h:
26         * page/ChromeClient.h:
27
28 2015-07-22  Simon Fraser  <simon.fraser@apple.com>
29
30         Layer z-ordering is incorrect when scrolling on page witih position:fixed
31         https://bugs.webkit.org/show_bug.cgi?id=147220
32         rdar://problem/15849697&21929247
33
34         Reviewed by Dean Jackson.
35
36         Overlap testing for compositing uses the currently laid out position of fixed
37         elements, without taking into account the fact that async scrolling can move
38         them around, and possibly under other non-composited elements. This manifested
39         as position:fixed elements moving over other elements on some pages when
40         scrolling, when they should have moved behind.
41         
42         Fix by expanding the overlap map entry for position:fixed elements to create
43         an rect for the area they cover at all scroll locations, taking min and max
44         scroll offsets into account.
45         
46         Also add a couple more LOG(Compositing) statements.
47
48         Tests: compositing/layer-creation/fixed-overlap-extent-rtl.html
49                compositing/layer-creation/fixed-overlap-extent.html
50
51         * rendering/RenderLayerCompositor.cpp:
52         (WebCore::fixedPositionOffset):
53         (WebCore::RenderLayerCompositor::computeExtent):
54         (WebCore::RenderLayerCompositor::needsFixedRootBackgroundLayer):
55         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
56
57 2015-07-23  Jer Noble  <jer.noble@apple.com>
58
59         Relax media playback restrictions if the allowsMediaDocumentInlinePlayback property is set.
60         https://bugs.webkit.org/show_bug.cgi?id=147234
61
62         Reviewed by Darin Adler.
63
64         * html/HTMLMediaElement.cpp:
65         (WebCore::HTMLMediaElement::prepareForLoad): Moved restriction check into MediaElementSession.
66         * html/MediaElementSession.cpp:
67         (WebCore::MediaElementSession::playbackPermitted): Check if is a top-level media document and if
68             allowsMediaDocumentInilnePlayback is set, and return early.
69         (WebCore::MediaElementSession::effectivePreloadForElement): Ditto.
70         (WebCore::MediaElementSession::allowsAutomaticMediaDataLoading): Ditto.
71         * html/MediaElementSession.h:
72
73 2015-07-23  Matthew Daiter  <mdaiter@apple.com>
74
75         Bridged passing lists of devices between the UIProcess and the WebProcess
76         https://bugs.webkit.org/show_bug.cgi?id=147056
77         <rdar://problem/21883094>
78
79         Reviewed by Brent Fulgham.
80
81         * Modules/mediastream/UserMediaRequest.h: Added fields to store and
82         retrieve lists of devices
83         (WebCore::UserMediaRequest::deviceUIDsVideo):
84         (WebCore::UserMediaRequest::deviceUIDsAudio):
85
86 2015-07-19  Matt Rajca  <mrajca@apple.com>
87
88         Media Session: add support for ducking media elements
89         https://bugs.webkit.org/show_bug.cgi?id=147089
90
91         Reviewed by Eric Carlson.
92
93         Test: media/session/transient-interruptions.html
94
95         * Modules/mediasession/MediaSession.cpp:
96         (WebCore::MediaSession::handleDuckInterruption): Duck the active media elements.
97         (WebCore::MediaSession::handleUnduckInterruption): Unduck the active media elements.
98         * html/HTMLMediaElement.cpp:
99         (WebCore::HTMLMediaElement::updateVolume): Lower the volume of media elements to 25% when ducked (constant determined empirically).
100         (WebCore::HTMLMediaElement::setShouldDuck): Call updateVolume to change the volume of the underlying media player.
101         * html/HTMLMediaElement.h:
102
103 2015-07-23  Matt Rajca  <mrajca@apple.com>
104
105         Media Session: add infrastructure for testing ducking https://bugs.webkit.org/show_bug.cgi?id=147080
106
107         Reviewed by Jer Noble.
108
109         We need to expose a media element's underlying media player's volume to tests so we can test ducking.
110
111         * html/HTMLMediaElement.cpp:
112         (WebCore::HTMLMediaElement::playerVolume):
113         * html/HTMLMediaElement.h:
114         * testing/Internals.cpp:
115         (WebCore::Internals::mediaElementPlayerVolume):
116         * testing/Internals.h:
117         * testing/Internals.idl:
118
119 2015-07-21  Jer Noble  <jer.noble@apple.com>
120
121         [iOS] Add an explicit API to allow media documents to (temporarily) play inline
122         https://bugs.webkit.org/show_bug.cgi?id=147181
123
124         Reviewed by Beth Dakin.
125
126         Add listeners for the new allowsMediaDocumentInlinePlayback API. When this value becomes
127         NO, force any playing MediaDocuments to enter fullscreen mode.
128
129         * dom/Document.cpp:
130         (WebCore::Document::registerForAllowsMediaDocumentInlinePlaybackChangedCallbacks): Added registration method.
131         (WebCore::Document::unregisterForAllowsMediaDocumentInlinePlaybackChangedCallbacks): Added deregistration method.
132         (WebCore::Document::allowsMediaDocumentInlinePlaybackChanged): Notify all listeners.
133         * dom/Document.h:
134         * html/HTMLMediaElement.cpp:
135         (WebCore::HTMLMediaElement::registerWithDocument): Listen for allowsMediaDocumentInlinePlayback changes.
136         (WebCore::HTMLMediaElement::unregisterWithDocument): Stop listening to same.
137         (WebCore::HTMLMediaElement::allowsMediaDocumentInlinePlaybackChanged): Enter fullscreen mode if the value
138             changes to false during playback.
139         * html/HTMLMediaElement.h:
140         * html/MediaElementSession.cpp:
141         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback): Early true if the override value is set.
142         * page/Page.cpp:
143         (WebCore::Page::setAllowsMediaDocumentInlinePlayback): Notify all documents of the changed value.
144         * page/Page.h:
145         (WebCore::Page::allowsMediaDocumentInlinePlayback): Simple getter.
146
147 2015-07-23  Devin Rousso  <drousso@apple.com>
148
149         Web Inspector: Add a function to CSSCompletions to get a list of supported system fonts
150         https://bugs.webkit.org/show_bug.cgi?id=147009
151
152         Reviewed by Joseph Pecoraro.
153
154         Test: inspector/css/get-system-fonts.html
155
156         * inspector/InspectorCSSAgent.cpp:
157         (WebCore::InspectorCSSAgent::getSupportedSystemFontFamilyNames):
158         Gets the list of system fonts (implemented in each platform) and returns that list.
159         * inspector/InspectorCSSAgent.h:
160         * platform/graphics/FontCache.h:
161         * platform/graphics/freetype/FontCacheFreeType.cpp:
162         (WebCore::FontCache::systemFontFamilies):
163         * platform/graphics/ios/FontCacheIOS.mm:
164         (WebCore::FontCache::systemFontFamilies):
165         * platform/graphics/mac/FontCacheMac.mm:
166         (WebCore::FontCache::systemFontFamilies):
167         * platform/graphics/win/FontCacheWin.cpp:
168         (WebCore::FontCache::systemFontFamilies):
169
170 2015-07-23  Brent Fulgham  <bfulgham@apple.com>
171
172         [Win] Implement High DPI support features
173         https://bugs.webkit.org/show_bug.cgi?id=146335
174         <rdar://problem/21558269>
175
176         Reviewed by Alex Christensen.
177
178         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
179         (WebCore::PlatformCALayerWinInternal::drawTile): Don't translate the CGContext to the position
180         of the CACFLayerRef; the underlying context is already in the right position.
181         * platform/win/PlatformMouseEventWin.cpp: Update class to adjust mouse
182         event coordinates based on scaling factor.
183         (WebCore::deviceScaleFactor):
184         (WebCore::positionForEvent):
185         * platform/win/ScrollbarThemeWin.cpp:
186         (WebCore::scrollbarThicknessInPixels):
187         (WebCore::ScrollbarThemeWin::scrollbarThickness):
188         (WebCore::ScrollbarThemeWin::themeChanged):
189         * platform/win/WheelEventWin.cpp: Update class to adjust wheel event
190         coordinates based on scaling factor.
191         (WebCore::deviceScaleFactor):
192         (WebCore::positionForEvent):
193         (WebCore::globalPositionForEvent):
194         (WebCore::PlatformWheelEvent::PlatformWheelEvent):
195
196 2015-07-23  Myles C. Maxfield  <mmaxfield@apple.com>
197
198         REGRESSION(r182236): Justified Arabic text does not expand
199         https://bugs.webkit.org/show_bug.cgi?id=147217
200
201         Reviewed by Simon Fraser.
202
203         When I was writing r182236, I got confused between the levels of the string hierarchy in ComplexTextController.
204         I've added a comment in the header which should make it easier to get it right.
205
206         Test: fast/text/international/arabic-justify.html
207
208         * platform/graphics/mac/ComplexTextController.cpp:
209         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
210         * platform/graphics/mac/ComplexTextController.h:
211
212 2015-07-23  Tim Horton  <timothy_horton@apple.com>
213
214         Fix the build for __IPHONE_OS_VERSION_MIN_REQUIRED <= 80200 || !HAVE(AVKIT)
215
216         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
217         (elementRectInWindow):
218         This helper is only used in the #else block, so move it there.
219
220 2015-07-23  Timothy Horton  <timothy_horton@apple.com>
221
222         Try to fix the build
223
224         * platform/spi/cocoa/QuartzCoreSPI.h:
225
226 2015-07-22  Sukolsak Sakshuwong  <sukolsak@gmail.com>
227
228         Add ENABLE_WEBASSEMBLY feature flag for WebAssembly
229         https://bugs.webkit.org/show_bug.cgi?id=147212
230
231         Reviewed by Filip Pizlo.
232
233         No new tests.
234
235         * Configurations/FeatureDefines.xcconfig:
236
237 2015-07-22  Tim Horton  <timothy_horton@apple.com>
238
239         Try to fix the build
240
241         * platform/spi/cocoa/QuartzCoreSPI.h:
242
243 2015-07-22  James Savage  <james.savage@apple.com>
244
245         Use updated CoreAnimation snapshot SPI.
246         https://bugs.webkit.org/show_bug.cgi?id=147197
247         <rdar://problem/21032083>
248
249         Reviewed by Tim Horton.
250         Patch by James Savage.
251
252         * platform/spi/cocoa/QuartzCoreSPI.h:
253
254 2015-07-22  Joseph Pecoraro  <pecoraro@apple.com>
255
256         Web Inspector: Timeline should immediately start moving play head when starting a new recording
257         https://bugs.webkit.org/show_bug.cgi?id=147210
258
259         Reviewed by Timothy Hatcher.
260
261         Test: inspector/timeline/recording-start-stop-timestamps.html
262
263         * inspector/InspectorTimelineAgent.cpp:
264         (WebCore::InspectorTimelineAgent::internalStart):
265         (WebCore::InspectorTimelineAgent::internalStop):
266         Include the current timestamp when starting / stopping a recording.
267
268 2015-07-22  Wenson Hsieh  <wenson_hsieh@apple.com>
269
270         Coordinates-based snap offsets don't update correctly when container is scrolled
271         https://bugs.webkit.org/show_bug.cgi?id=147215
272
273         Reviewed by Brent Fulgham.
274
275         Fixes the way we append the snap offsets of child elements with coordinates. We
276         now consider the scroll offset of the parent scroll snapping container, so snap
277         offset recomputations don't fail on scroll snapping containers.
278
279         Test: css3/scroll-snap/scroll-snap-coordinate-overflow-resize.html
280
281         * page/scrolling/AxisScrollSnapOffsets.cpp:
282         (WebCore::appendChildSnapOffsets): Fixed to consider the scroll offset of the
283             parent container.
284
285 2015-07-22  Matthew Daiter  <mdaiter@apple.com>
286
287         Needed to add methods to get PreviewCaptureLayers from Video
288         https://bugs.webkit.org/show_bug.cgi?id=147011
289         <rdar://problem/21861999>
290
291         Reviewed by Jer Noble.
292
293         * platform/mediastream/mac/AVVideoCaptureSource.h: Added in preview
294         layer to class
295         (WebCore::AVVideoCaptureSource::previewLayer):
296         * platform/mediastream/mac/AVVideoCaptureSource.mm: Instantiate
297         previewLayer on load
298         (WebCore::AVVideoCaptureSource::setupCaptureSession):
299
300 2015-07-22  Sungmann Cho  <sungmann.cho@navercorp.com>
301
302         [EFL] The "Missing Plug-in" buttons are not showing up on some flash contents
303         https://bugs.webkit.org/show_bug.cgi?id=147191
304
305         Reviewed by Gyuyoung Kim.
306
307         Currently, WebKitEFL doesn't show the "Missing Plug-in" buttons if the plugin-related tags
308         don't have a "type" attribute. In such a case, WebCore tries to guess the MIME type from
309         the extensions by using MIMETypeRegistry::getMIMETypeForExtension(). For WebKitEFL,
310         MIMETypeRegistry::getMIMETypeForExtension() goes through |extensionMap|, which is a simple
311         array of <extension, mime type>, looking for the mime type for the given extension.
312         But |extensionMap| in MIMETypeRegistryEfl.cpp doesn't have the information for ".swf",
313         so WebCore fails to guess the MIME type and regard the content type as ObjectContentFrame,
314         not ObjectContentNetscapePlugin.
315
316         * platform/efl/MIMETypeRegistryEfl.cpp:
317
318 2015-07-22  Matthew Daiter  <mdaiter@apple.com>
319
320         Rank sources for fitness for UIDs in bestSourcesForTypeAndConstraints
321         https://bugs.webkit.org/show_bug.cgi?id=147206
322         <rdar://problem/21950653>
323
324         Reviewed by Jer Noble.
325
326         * platform/mediastream/RealtimeMediaSource.cpp:
327         (WebCore::RealtimeMediaSource::RealtimeMediaSource):
328         * platform/mediastream/RealtimeMediaSource.h:
329         (WebCore::RealtimeMediaSource::fitnessScore):
330         (WebCore::RealtimeMediaSource::setFitnessScore):
331         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
332         (WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints):
333
334 2015-07-22  Dean Jackson  <dino@apple.com>
335
336         Video controls, though hidden, are still interactive when in PiP
337         https://bugs.webkit.org/show_bug.cgi?id=147216
338         <rdar://problem/21012688>
339
340         Reviewed by Simon Fraser.
341
342         Explicitly add the PiP class to the controls container so that
343         we can hang a pointer-events: none off it.
344
345         * Modules/mediacontrols/mediaControlsiOS.css:
346         (video::-webkit-media-controls-panel.picture-in-picture): Add a pointer-events: none.
347         * Modules/mediacontrols/mediaControlsiOS.js:
348         (ControllerIOS.prototype.handlePresentationModeChange): Add/remove a PiP class
349         to the controls panel when necessary.
350
351 2015-07-22  Commit Queue  <commit-queue@webkit.org>
352
353         Unreviewed, rolling out r187196.
354         https://bugs.webkit.org/show_bug.cgi?id=147213
355
356         broke all the iOS builds (Requested by thorton on #webkit).
357
358         Reverted changeset:
359
360         "Use updated CoreAnimation snapshot SPI."
361         https://bugs.webkit.org/show_bug.cgi?id=147197
362         http://trac.webkit.org/changeset/187196
363
364 2015-07-22  James Savage  <james.savage@apple.com>
365
366         Use updated CoreAnimation snapshot SPI.
367         https://bugs.webkit.org/show_bug.cgi?id=147197
368
369         Reviewed by Tim Horton.
370
371         * platform/spi/cocoa/QuartzCoreSPI.h:
372
373 2015-07-22  Dean Jackson  <dino@apple.com>
374
375         Out of bounds in WebGLRenderingContext::simulateVertexAttrib0
376         https://bugs.webkit.org/show_bug.cgi?id=147176
377         <rdar://problem/21567767>
378
379         Reviewed by Oliver Hunt.
380
381         Test: fast/canvas/webgl/out-of-bounds-simulated-vertexAttrib0-drawArrays.html
382
383         Add overflow checking for the drawing calls, specifically the way
384         they may simulate vertexAttrib0.
385
386         * html/canvas/WebGLRenderingContextBase.cpp:
387         (WebCore::WebGLRenderingContextBase::validateDrawArrays): Call new validation method.
388         (WebCore::WebGLRenderingContextBase::validateDrawElements): Ditto.
389         (WebCore::WebGLRenderingContextBase::validateSimulatedVertexAttrib0): New method that
390         validates the parameters used to create the simulated attribute.
391         (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0): No need to do overflow
392         checking here now that the validation method does it for us.
393         (WebCore::WebGLRenderingContextBase::validateVertexAttributes): Deleted.
394         * html/canvas/WebGLRenderingContextBase.h: Add new validation method.
395
396 2015-07-22  Joseph Pecoraro  <pecoraro@apple.com>
397
398         Web Inspector: AppCache manifest 404 doesn't produce errors in console, manifest resource request always loading indicator
399         https://bugs.webkit.org/show_bug.cgi?id=147135
400
401         Reviewed by Alexey Proskuryakov.
402
403         * loader/appcache/ApplicationCacheGroup.cpp:
404         (WebCore::ApplicationCacheGroup::didReceiveResponse):
405         Always pass a document loader instead of passing null for the manifest request.
406
407         (WebCore::ApplicationCacheGroup::didReceiveManifestResponse):
408         Since we will be cancelling the resource handle ourselves in didReceiveResponse
409         before receiving the didFail resource handle delegates, we should update the
410         inspector about this resource load failing due to a cancel.
411
412         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
413         (WebCore::ApplicationCacheGroup::checkIfLoadIsComplete):
414         Update the MessageSource from "Other" to "AppCache".
415
416 2015-07-22  Jeremy Jones  <jeremyj@apple.com>
417
418         Fix fullscreen and PiP video animation and sizing regressions.
419         https://bugs.webkit.org/show_bug.cgi?id=147189
420         <rdar://problem/21930899>
421
422         Reviewed by Jer Noble.
423
424         Fixes WK1 specific regressions introduced by r187044. Flicker when entering fullscreen,
425         wrong animation and missing initial animation rects.
426
427         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
428         (elementRectInWindow): Added.
429         (WebVideoFullscreenControllerContext::didSetupFullscreen): Clear background decreases flash.
430         (WebVideoFullscreenControllerContext::fullscreenMayReturnToInline): Use consistent inline rect.
431         (WebVideoFullscreenControllerContext::setVideoLayerFrame): 
432         Clear the transform on the web thread instead of on the UI thread.
433         (WebVideoFullscreenControllerContext::setUpFullscreen): Use consistent inline rect.
434         (WebVideoFullscreenControllerContext::exitFullscreen): Use consistent inline rect.
435         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: 
436         (-[WebAVPlayerLayer resolveBounds]): Clear transform after setting frame.
437
438 2015-07-22  Jeremy Jones  <jeremyj@apple.com>
439
440         Adopt AVKit's AVSimplePlayerLayerView change for PiP.
441         https://bugs.webkit.org/show_bug.cgi?id=147186
442         <rdar://problem/21928170>
443
444         Reviewed by Jer Noble.
445
446         Adopt AVKit changes by inheriting from UIView instead of from AVPictureInPicturePlayerLayerView.
447
448         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
449         (WebAVPlayerLayerView_layerClass): Style.
450         (WebAVPlayerLayerView_playerController): Style.
451         (WebAVPlayerLayerView_videoView): Style.
452         (getWebAVPictureInPicturePlayerLayerViewClass): Inherit from UIView.
453
454 2015-07-22  Beth Dakin  <bdakin@apple.com>
455
456         Animated images should animate in previews
457         https://bugs.webkit.org/show_bug.cgi?id=147173
458         -and corresponding-
459         rdar://problem/21637698
460
461         Reviewed by Dan Bernstein.
462
463         New virtual function to indicate whether or not the image is animated.
464         * platform/graphics/BitmapImage.h:
465         * platform/graphics/Image.h:
466         (WebCore::Image::isAnimated):
467
468 2015-07-22  Jinyoung Hur  <hur.ims@navercorp.com>
469
470         [WinCairo] SVG path not rendered with all-zero dasharray
471         https://bugs.webkit.org/show_bug.cgi?id=146997
472
473         Reviewed by Martin Robinson.
474
475         All-zero dash array should not be passed to cairo_set_dash() as an argument, because it will cause an internal Cairo error.
476         Rather call cairo_set_dash() with num_dashes=0 to disable dash line.
477
478         Tests: fast/canvas/canvas-lineDash.html
479                svg/custom/zero-dasharray.html
480
481         * platform/graphics/cairo/GraphicsContextCairo.cpp:
482         (WebCore::GraphicsContext::setLineDash):
483
484 2015-07-22  Wenson Hsieh  <wenson_hsieh@apple.com>
485
486         Search fields render placeholder text improperly.
487         https://bugs.webkit.org/show_bug.cgi?id=147192
488         <rdar://problem/21901076>
489
490         Reviewed by Alexey Proskuryakov.
491
492         Due to changes in the way AppKit renders search inputs, we must now explicitly
493         set the placeholder text of a search input rendered using the Mac theme to be
494         an empty string when rendering the search input box (not including the actual
495         placeholder text).
496
497         * rendering/RenderThemeMac.mm:
498         (WebCore::RenderThemeMac::setSearchCellState): Force the placeholder text of
499             the NSSearchFieldCell for the Mac theme to be an empty string.
500
501 2015-07-22  Matthew Daiter  <mdaiter@apple.com>
502
503         Need the ability to give only best source UIDs to UserMedia request
504         https://bugs.webkit.org/show_bug.cgi?id=147171
505         <rdar://problem/21931121>
506
507         Reviewed by Eric Carlson.
508
509         * Modules/mediastream/UserMediaRequest.cpp:
510         (WebCore::UserMediaRequest::constraintsValidated):
511         * Modules/mediastream/UserMediaRequest.h:
512         (WebCore::UserMediaRequest::videoDeviceUIDs):
513         (WebCore::UserMediaRequest::audioDeviceUIDs):
514         * platform/mediastream/MediaStreamCreationClient.h:
515         * platform/mediastream/mac/AVCaptureDeviceManager.h:
516         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
517         (WebCore::AVCaptureDeviceManager::bestSourcesForTypeAndConstraints):
518         (WebCore::AVCaptureDeviceManager::bestSourceForTypeAndConstraints): Deleted.
519         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
520         (WebCore::RealtimeMediaSourceCenterMac::validateRequestConstraints):
521         (WebCore::RealtimeMediaSourceCenterMac::createMediaStream):
522         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
523         (WebCore::MockRealtimeMediaSourceCenter::validateRequestConstraints):
524
525 2015-07-22  Mark Dittmer  <mark.s.dittmer@gmail.com>
526
527         Fix toJSDOMWindow() in the case of an object that has the actual JS DOM window in its prototype chain.
528         https://bugs.webkit.org/show_bug.cgi?id=146785
529
530         Reviewed by Mark Lam.
531
532         * bindings/js/JSDOMWindowBase.cpp: toJSDOMWindow(): Walk the prototype chain of the given JSValue until a JSDOMWindow or JSDOMWindowShell is found.
533
534 2015-07-22  Matthew Daiter  <mdaiter@apple.com>
535
536         Remove revealing getVideoTracks() and getAudioTracks()
537         https://bugs.webkit.org/show_bug.cgi?id=147126
538         <rdar://problem/21908723>
539
540         Reviewed by Eric Carlson.
541
542         * Modules/mediastream/MediaStream.h:
543         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
544         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
545         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
546         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load): Modded to use
547         tracks() instead of getVideo/AudioTracks()
548         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer): Ditto
549         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::playInternal): Ditto
550         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pauseInternal): Ditto
551         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setMuted): Ditto
552         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::naturalSize): Ditto
553         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasVideo): Ditto
554         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasAudio): Ditto
555         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::currentMediaTime):
556         Changed to a FIXME
557         * platform/mediastream/MediaStreamPrivate.h:
558
559 2015-07-22  Matthew Daiter  <mdaiter@apple.com>
560
561         Ensure MediaPlayerPrivateAVFoundation doesn't load MediaStreams
562         https://bugs.webkit.org/show_bug.cgi?id=147119
563         <rdar://problem/21904955>
564
565         Reviewed by Eric Carlson.
566
567         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h: Set
568         networkstate to error when loading MediaStreams
569
570 2015-07-22  Alex Christensen  <achristensen@webkit.org>
571
572         Fix quirks in CMake build on Mac and Windows
573         https://bugs.webkit.org/show_bug.cgi?id=147174
574
575         Reviewed by Gyuyoung Kim.
576
577         * PlatformMac.cmake:
578         Removed files that don't exist any more.
579         * platform/win/WindowsTouch.h:
580         Only use definitions of touch structures when compiling with VS2012.
581
582 2015-07-22  Csaba Osztrogonác  <ossy@webkit.org>
583
584         Fix cast-align warning in NetworkStateNotifierEfl.cpp
585         https://bugs.webkit.org/show_bug.cgi?id=145915
586
587         Reviewed by Gyuyoung Kim.
588
589         * platform/network/efl/NetworkStateNotifierEfl.cpp:
590         (WebCore::NetworkStateNotifier::readSocketCallback):
591
592 2015-07-22  Ryuan Choi  <ryuan.choi@navercorp.com>
593
594         [GTK][EFL] Remove dead functions in LocalizedStrings
595         https://bugs.webkit.org/show_bug.cgi?id=147188
596
597         Reviewed by Csaba Osztrogonác.
598
599         * platform/efl/LocalizedStringsEfl.cpp:
600         (WebCore::contextMenuItemTagHideMediaControls):
601         (WebCore::contextMenuitemTagHideMediaControls): Fixed typo since r152117.
602         (WebCore::inactivePluginText): Deleted since r151530.
603         (WebCore::textTrackClosedCaptionsText): Deleted since r141864.
604         * platform/gtk/LocalizedStringsGtk.cpp:
605         (WebCore::inactivePluginText): Deleted since r151530.
606         (WebCore::textTrackClosedCaptionsText): Deleted since r141864.
607
608 2015-07-21  Benjamin Poulain  <bpoulain@apple.com>
609
610         [CSS Selectors Level 4] Add #ifdefs to the new '>>' descendant combinator
611         https://bugs.webkit.org/show_bug.cgi?id=147184
612
613         Reviewed by Anders Carlsson.
614
615         Now that '>>>' is dead, the combinator '>>' is at risk.
616
617         This patch #ifdef all that code with the other experimental
618         features from Level 4.
619
620         * css/CSSGrammar.y.in:
621         * css/CSSParserValues.cpp:
622         (WebCore::CSSParserSelector::appendTagHistory):
623         * css/CSSParserValues.h:
624         * css/CSSSelector.cpp:
625         (WebCore::CSSSelector::CSSSelector):
626         (WebCore::CSSSelector::selectorText):
627         * css/CSSSelector.h:
628         (WebCore::CSSSelector::CSSSelector):
629
630 2015-07-21  Joseph Pecoraro  <pecoraro@apple.com>
631
632         Web Inspector: Node highlights are wrong when the page is zoomed
633         https://bugs.webkit.org/show_bug.cgi?id=147177
634
635         Reviewed by Simon Fraser.
636
637         * inspector/InspectorOverlay.cpp:
638         (WebCore::InspectorOverlay::update):
639         Remove scaling that appears to no longer be needed, it was double
640         scaling the overlay content and misplacing it in the process.
641
642 2015-07-21  Dean Jackson  <dino@apple.com>
643
644         Default media controls use a serif font, which seems wrong
645         https://bugs.webkit.org/show_bug.cgi?id=147179
646         <rdar://problem/21931728>
647
648         Reviewed by Simon Fraser.
649
650         The captions menu (and other text) should use a system style,
651         -webkit-small-control.
652
653         * Modules/mediacontrols/mediaControlsApple.css:
654         (::-webkit-media-controls):
655
656 2015-07-21  Matthew Daiter  <mdaiter@apple.com>
657
658         Exposed method to query device by UID
659         https://bugs.webkit.org/show_bug.cgi?id=147117
660         <rdar://problem/21904678>
661
662         Reviewed by Eric Carlson.
663
664         * platform/mediastream/mac/AVCaptureDeviceManager.h: Added method to
665         query device by UID
666         * platform/mediastream/mac/AVCaptureDeviceManager.mm: Ditto
667         (WebCore::AVCaptureDeviceManager::sourceWithUID): Ditto
668
669 2015-07-21  Benjamin Poulain  <benjamin@webkit.org>
670
671         [Content Extensions] Use a jump table when consecutive transitions have different targets
672         https://bugs.webkit.org/show_bug.cgi?id=147099
673
674         Reviewed by Alex Christensen.
675
676         When handling consecutive single transitions, merge them into
677         a jump table instead of creating many individual CheckValue.
678
679         From local testing on x86_64, it reduces the bytecode size by about 5%
680         and improve the runtime by about 10%.
681
682         * contentextensions/DFABytecode.h:
683         (WebCore::ContentExtensions::instructionSizeWithArguments):
684         * contentextensions/DFABytecodeCompiler.cpp:
685         (WebCore::ContentExtensions::DFABytecodeCompiler::extractJumpTable):
686         (WebCore::ContentExtensions::DFABytecodeCompiler::transitions):
687         (WebCore::ContentExtensions::DFABytecodeCompiler::checkForJumpTableMaxBytecodeSize):
688         (WebCore::ContentExtensions::DFABytecodeCompiler::compileJumpTable):
689         (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize):
690         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
691         (WebCore::ContentExtensions::DFABytecodeCompiler::ranges): Deleted.
692         * contentextensions/DFABytecodeCompiler.h:
693         * contentextensions/DFABytecodeInterpreter.cpp:
694         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpetJumpTable):
695         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
696         * contentextensions/DFABytecodeInterpreter.h:
697
698 2015-07-21  Simon Fraser  <simon.fraser@apple.com>
699
700         Add a logging channel for Layout, remove the LiveConnect channel
701         https://bugs.webkit.org/show_bug.cgi?id=147170
702
703         Reviewed by Zalan Bujtas.
704
705         Add a layout logging channel to WebCore, and remove the LiveConnect channel.
706
707         * page/FrameView.cpp:
708         (WebCore::FrameView::adjustViewSize):
709         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
710         (WebCore::FrameView::layout):
711         (WebCore::FrameView::performPostLayoutTasks):
712         (WebCore::FrameView::autoSizeIfEnabled):
713         * platform/Logging.h:
714
715 2015-07-21  Benjamin Poulain  <bpoulain@apple.com>
716
717         StyleSheetContents::wrapperInsertRule() can create rules that overflow RuleData's selector index
718         https://bugs.webkit.org/show_bug.cgi?id=147144
719
720         Reviewed by Alex Christensen.
721
722         RuleData identifies selectors by the index in a large array. The index only has 13 bits
723         so rules with more than 8192 selectors should be split.
724
725         One of the paths was not splitting the rule: StyleSheetContents::wrapperInsertRule().
726         When rules with too many selectors were added, the index would overflow and
727         some RuleData would point to selectors in the middle of selector chains. The resulting
728         behavior is random based on the selectors and the DOM.
729
730         We cannot easily fix that because the CSS OM API do not expect to create
731         several rules in response to calls to the API.
732         In this patch, I don't do anything fancy and just let the calls fail
733         if we cannot use the rules safely.
734
735
736         Content Extensions were also running into this problem. Large Selector lists are
737         pretty common, and ContentExtensionStyleSheet::addDisplayNoneSelector() was
738         overflowing the RuleData, creating broken page.
739
740         Unlike CSSOM, there is no problem with splitting rules coming from Content Extensions.
741         Instead of creating new APIs for that case, I rely on the parser to extend the StyleSheetContents.
742         That code already knows how to break rules correctly.
743
744         Tests: fast/css/insert-rule-overflow-rule-data.html
745                http/tests/contentextensions/css-display-none-overflows-rule-data-1.html
746                http/tests/contentextensions/css-display-none-overflows-rule-data-2.html
747
748         * contentextensions/ContentExtensionStyleSheet.cpp:
749         (WebCore::ContentExtensions::ContentExtensionStyleSheet::addDisplayNoneSelector):
750         * css/StyleSheetContents.cpp:
751         (WebCore::StyleSheetContents::wrapperInsertRule):
752
753 2015-07-21  Jon Honeycutt  <jhoneycutt@apple.com>
754
755         [iOS] Keyboard bold/italic/underline keys don't highlight after being
756         tapped to style a selection
757         https://bugs.webkit.org/show_bug.cgi?id=147164
758         <rdar://problem/21630806>
759
760         Reviewed by Ryosuke Niwa.
761
762         * editing/cocoa/EditorCocoa.mm:
763         (WebCore::Editor::styleForSelectionStart):
764         Use adjustedSelectionStartForStyleComputation(), which will ensure that
765         we're at the start of the selected node, not at the end of the node
766         before the selection.
767
768 2015-07-21  Tim Horton  <timothy_horton@apple.com>
769
770         Placing video in fullscreen caused WebKit crash at WebCore::Range::textQuads
771         https://bugs.webkit.org/show_bug.cgi?id=147166
772         <rdar://problem/21928558>
773
774         Reviewed by Simon Fraser.
775
776         * editing/FrameSelection.cpp:
777         (WebCore::FrameSelection::getClippedVisibleTextRectangles):
778         Check the Range, as always.
779
780 2015-07-21  Simon Fraser  <simon.fraser@apple.com>
781
782         Safari mis-applies "animation-fill-mode: forwards" when using fractional iteration count
783         https://bugs.webkit.org/show_bug.cgi?id=146996
784
785         Reviewed by Dean Jackson.
786
787         animation-fill-mode: forwards with fractional iteration counts always snapped to
788         1 or 0, depending on direction. Fix to compute the fill-forward state from the
789         correct keyframes.
790         
791         If filling forwards, AnimationBase::progress() sets the elapsed time to the duration,
792         then uses fractionalTime() to handle animation direction mapping. If the fractionalTime
793         is integral, we can return early, avoiding the cost of mapping through timing functions.
794
795         Tested by existing tests.
796
797         * page/animation/AnimationBase.cpp:
798         (WebCore::AnimationBase::progress):
799         (WebCore::AnimationBase::getElapsedTime):
800         * page/animation/KeyframeAnimation.cpp:
801         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty): It was possible
802         to end up with prevIndex == nextIndex with reverse animations, which resulted
803         in divide-by-zero when computing scale. Fix by picking a nextIndex that is different
804         from prevIndex.
805
806 2015-07-21  David Hyatt  <hyatt@apple.com>
807
808         Fix failing WK1 layout tests. Make sure to reset the text zoom scale
809         in Internals::resetToConsistentState.
810
811         Reviewed by Anders Carlsson
812
813         * testing/Internals.cpp:
814         (WebCore::Internals::resetToConsistentState):
815
816 2015-07-21  Said Abou-Hallawa  <sabouhallawa@apple.com>
817
818         REGRESSION (r172417, r184065): Multiple rendering issues with fixed attached background-image
819         https://bugs.webkit.org/show_bug.cgi?id=147049
820         <rdar://problem/21110936>
821
822         Reviewed by Simon Fraser.
823
824         The fixed-attached background-image rendering is special. In general, to
825         display it, the destinationSize should be set to visibleContentSize. The
826         destinationLocation should be set such that the background-image does
827         not move with scrolling. The topContentInset should be subtracted from
828         the destinationLocation such that background-image can be rendered blurred
829         in the topContentArea. However there are cases in which these rules have to
830         be changed.
831         
832         -- destinationSize: In the case of fixed layout size, the fixedLayoutSize
833         is bigger than the visibleContentSize. In this case, if the background-image
834         belongs to the root element, the destinationSize has to be set to fixedLayoutSize.
835         Otherwise it has to be set to the borderBoxSize unless the overflow is
836         hidden.
837         
838         -- destinationLocation: If the background-image belongs to the root element, no
839         scroll offset to added to destinationLocation. For non-root element case,
840         FrameView::documentScrollOffsetRelativeToViewOrigin() should be used if no page
841         scaling is applied. Otherwise FrameView::scrollOffsetForFixedPosition() should be
842         used instead.
843         
844         Tests: platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-cover.html
845                platform/mac-wk2/tiled-drawing/fixed-layout-size-fixed-attachment-local.html
846
847         * rendering/RenderBoxModelObject.cpp:
848         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry): Ensure
849         the geometry for the fixed-attached background-image is calculated correctly.
850         
851         * rendering/RenderLayerBacking.cpp:
852         (WebCore::RenderLayerBacking::updateGeometry): Ensure the background layer
853         gets the correct size for the fixedLayoutSize mode.
854
855 2015-07-21  Csaba Osztrogonác  <ossy@webkit.org>
856
857         Fix the !ENABLE(DETAILS_ELEMENT) build after r186598
858         https://bugs.webkit.org/show_bug.cgi?id=147115
859
860         Reviewed by Chris Fleizach.
861
862         * accessibility/AccessibilityNodeObject.cpp:
863         (WebCore::AccessibilityNodeObject::setIsExpanded):
864
865 2015-07-21  David Hyatt  <hyatt@apple.com>
866
867         Need a way to ignore text-zoom in a Web page.
868         https://bugs.webkit.org/show_bug.cgi?id=27092
869         rdar://problem/7037987
870
871         Reviewed by Simon Fraser.
872
873         This patch adds a new property, -webkit-text-zoom, with values of normal and reset. The reset
874         keyword, just as with the zoom property, can be used to ignore any inherited zoom from the
875         document.
876
877         Added new test in fast/text.
878
879         * Modules/mediacontrols/mediaControlsApple.css:
880         (audio::-webkit-media-controls-panel):
881         (video::-webkit-media-controls-panel):
882         * css/CSSComputedStyleDeclaration.cpp:
883         (WebCore::ComputedStyleExtractor::propertyValue):
884         * css/CSSParser.cpp:
885         (WebCore::CSSParser::parseValue):
886         * css/CSSPrimitiveValueMappings.h:
887         (WebCore::CSSPrimitiveValue::operator ContentDistributionType):
888         (WebCore::CSSPrimitiveValue::operator TextZoom):
889         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
890         * css/CSSPropertyNames.in:
891         * css/StyleBuilderConverter.h:
892         (WebCore::StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
893         * css/StyleBuilderCustom.h:
894         (WebCore::StyleBuilderCustom::applyValueWebkitTextSizeAdjust):
895         (WebCore::StyleBuilderCustom::applyValueWebkitTextZoom):
896         (WebCore::StyleBuilderCustom::applyTextOrBoxShadowValue):
897         * css/StyleResolver.cpp:
898         (WebCore::StyleResolver::checkForZoomChange):
899         * rendering/style/RenderStyle.cpp:
900         (WebCore::RenderStyle::changeRequiresLayout):
901         * rendering/style/RenderStyle.h:
902         * rendering/style/RenderStyleConstants.h:
903         * rendering/style/StyleRareInheritedData.cpp:
904         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
905         (WebCore::StyleRareInheritedData::operator==):
906         * rendering/style/StyleRareInheritedData.h:
907         * style/StyleFontSizeFunctions.cpp:
908         (WebCore::Style::computedFontSizeFromSpecifiedSize):
909         * testing/Internals.cpp:
910         (WebCore::Internals::setPageZoomFactor):
911         (WebCore::Internals::setTextZoomFactor):
912         (WebCore::Internals::setUseFixedLayout):
913         * testing/Internals.h:
914         * testing/Internals.idl:
915
916 2015-07-21  Per Arne Vollan  <peavo@outlook.com>
917
918         WinLauncher does not start on WinXP.
919         https://bugs.webkit.org/show_bug.cgi?id=147147
920
921         Reviewed by Alex Christensen.
922
923         Calling GetProcessMemoryInfo() on WinXP requires that PSAPI_VERSION is set to 1,
924         see https://msdn.microsoft.com/en-us/library/windows/desktop/ms683219(v=vs.85).aspx.
925
926         * WebCore.vcxproj/WebCoreCommon.props:
927
928 2015-07-20  Michael Catanzaro  <mcatanzaro@igalia.com>
929
930         REGRESSION(r184376): [SOUP] Multiple assertions when downloading files
931         https://bugs.webkit.org/show_bug.cgi?id=147039
932
933         Reviewed by Darin Adler.
934
935         No new tests; this will be covered once we enable the network process for API tests.
936
937         * platform/network/soup/ResourceHandleSoup.cpp:
938         (WebCore::ResourceHandle::releaseForDownload): Call RefPtrBase::relaxAdoptionRequirement so
939         that we don't assert when storing the non-adopted ResourceHandle in a RefPtr. The ref will
940         be dropped in ResourceHandle::cleanupSoupOperation, which as the comment says should always
941         run. HOPEFULLY.
942         (WebCore::ResourceHandle::continueWillSendRequest): Don't assert that client() is nonnull,
943         because the code clearly expects and handles the case where it is null.
944         (WebCore::ResourceHandle::continueDidReceiveResponse): Ditto; note that here client() will
945         always be null for a download.
946
947 2015-07-20  Ada Chan  <adachan@apple.com>
948
949         Follow-up to my earlier fix for r147085
950         https://bugs.webkit.org/show_bug.cgi?id=147085
951
952         Reviewed by Eric Carlson.
953
954         * Modules/webaudio/AudioContext.cpp:
955         (WebCore::AudioContext::isPlayingAudioDidChange):
956         Null-check document() before dereferencing it in case the audio context's document is destroyed
957         by the time the code block is called on the main thread.
958
959 2015-07-20  Carlos Garcia Campos  <cgarcia@igalia.com>
960
961         Remove RenderTheme::shouldShowPlaceholderWhenFocused()
962         https://bugs.webkit.org/show_bug.cgi?id=147104
963
964         Reviewed by Martin Robinson.
965
966         GTK+ is the only port that returns false in
967         shouldShowPlaceholderWhenFocused(). That's inconsistent with all
968         other browsers that show the placeholder text even for focused
969         entries in all platforms. We should change the GTK+ port
970         behaviour, but that would leave all implementations of
971         shouldShowPlaceholderWhenFocused returning true, so let's just
972         remove it.
973
974         * html/HTMLTextFormControlElement.cpp:
975         (WebCore::HTMLTextFormControlElement::placeholderShouldBeVisible):
976         Do not consider whether the entry is focused or not.
977         * platform/efl/RenderThemeEfl.h:
978         * rendering/RenderTheme.h:
979         (WebCore::RenderTheme::shouldShowPlaceholderWhenFocused): Deleted.
980         * rendering/RenderThemeIOS.h:
981         * rendering/RenderThemeIOS.mm:
982         (WebCore::RenderThemeIOS::shouldShowPlaceholderWhenFocused): Deleted.
983         * rendering/RenderThemeMac.h:
984         * rendering/RenderThemeMac.mm:
985         (WebCore::RenderThemeMac::shouldShowPlaceholderWhenFocused): Deleted.
986         * rendering/RenderThemeSafari.h:
987         (WebCore::RenderThemeSafari::shouldShowPlaceholderWhenFocused): Deleted.
988         * rendering/RenderThemeWin.h:
989
990 2015-07-20  Zan Dobersek  <zdobersek@igalia.com>
991
992         [CoordinatedGraphics] CoordinatedGraphicsLayer::setContentsToImage() should avoid scheduling unnecessary flushes
993         https://bugs.webkit.org/show_bug.cgi?id=147118
994
995         Reviewed by Martin Robinson.
996
997         Have CoordinatedGraphicsLayer::setContentsToImage() return early if the new
998         passed-in Image and the corresponding native image pointer are equal to the
999         currently set values.
1000
1001         This specifically avoids scheduling unnecessary flushes when setContentsToImage()
1002         is repeatedly called with a null Image pointer, which in previous code would
1003         unconditionally result in a scheduled flush even if there was no Image assigned
1004         as the content of this layer before. Until now the layer flush scheduling was only
1005         avoided if the two non-null native image pointers were equal.
1006
1007         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1008         (WebCore::CoordinatedGraphicsLayer::setContentsToImage):
1009
1010 2015-07-20  Nan Wang  <n_wang@apple.com>
1011
1012         AX: Selection change as a result of focusing an element may cause Safari to crash
1013         https://bugs.webkit.org/show_bug.cgi?id=147052
1014         <rdar://problem/21778212>
1015
1016         Reviewed by Chris Fleizach.
1017
1018         When focusing an element, it may trigger a deferred layout that invalidates the render 
1019         element, which will cause axObjectCache() to be a nullptr, and lead to a crash. Fix that
1020         by using a RefPtr to hold the object and also caching the axObjectCache().
1021
1022         Test: platform/mac/accessibility/focus-crash.html
1023
1024         * accessibility/AccessibilityRenderObject.cpp:
1025         (WebCore::AccessibilityRenderObject::setFocused):
1026         (WebCore::AccessibilityRenderObject::setSelectedRows):
1027
1028 2015-07-20  Alex Christensen  <achristensen@webkit.org>
1029
1030         Unreviewed build fix after r187049.
1031
1032         * contentextensions/ContentExtension.cpp:
1033         (WebCore::ContentExtensions::ContentExtension::populateDomainCacheIfNeeded):
1034         Can't shrinkToFit HashSets.
1035
1036 2015-07-20  Alex Christensen  <achristensen@webkit.org>
1037
1038         [Content Extensions] Cache actions with domains that match everything
1039         https://bugs.webkit.org/show_bug.cgi?id=147050
1040
1041         Reviewed by Benjamin Poulain.
1042
1043         If you have lots of rules with triggers like {"url-filter":".*","if-domain":["*webkit.org"]}
1044         we will spend a lot of time adding unnecessary actions to HashSets when you are not on webkit.org.
1045         Caching all the rules and only adding them to a collection once when the domain changes saves a lot of URL interpreting time.
1046
1047         We already had an optimization for the css-display-none actions with triggers that matched everything using a special bytecode operation.
1048         This removes the need for a special bytecode operation by caching the triggers that match everything with and without domains,
1049         then from those cached actions we compile a stylesheet, and create cached actions for every new domain we visit.
1050
1051         All functionality is covered by existing API tests.
1052
1053         * contentextensions/CompiledContentExtension.cpp:
1054         (WebCore::ContentExtensions::CompiledContentExtension::~CompiledContentExtension):
1055         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors): Deleted.
1056         * contentextensions/CompiledContentExtension.h:
1057         * contentextensions/ContentExtension.cpp:
1058         (WebCore::ContentExtensions::ContentExtension::ContentExtension):
1059         (WebCore::ContentExtensions::ContentExtension::findFirstIgnorePreviousRules):
1060         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
1061         (WebCore::ContentExtensions::ContentExtension::compileGlobalDisplayNoneStyleSheet):
1062         (WebCore::ContentExtensions::ContentExtension::populateDomainCacheIfNeeded):
1063         (WebCore::ContentExtensions::ContentExtension::cachedDomainActions):
1064         (WebCore::ContentExtensions::ContentExtension::universalActionsWithDomains):
1065         * contentextensions/ContentExtension.h:
1066         (WebCore::ContentExtensions::ContentExtension::compiledExtension):
1067         (WebCore::ContentExtensions::ContentExtension::universalActionsWithoutDomains):
1068         * contentextensions/ContentExtensionCompiler.cpp:
1069         (WebCore::ContentExtensions::compileRuleList):
1070         * contentextensions/ContentExtensionRule.cpp:
1071         (WebCore::ContentExtensions::ContentExtensionRule::ContentExtensionRule):
1072         (WebCore::ContentExtensions::Action::deserialize):
1073         (WebCore::ContentExtensions::Action::deserializeType):
1074         (WebCore::ContentExtensions::Action::serializedLength):
1075         * contentextensions/ContentExtensionRule.h:
1076         (WebCore::ContentExtensions::Action::operator==):
1077         (WebCore::ContentExtensions::Action::setExtensionIdentifier):
1078         (WebCore::ContentExtensions::Action::extensionIdentifier):
1079         * contentextensions/ContentExtensionsBackend.cpp:
1080         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1081         * contentextensions/DFABytecode.h:
1082         (WebCore::ContentExtensions::instructionSizeWithArguments):
1083         * contentextensions/DFABytecodeCompiler.cpp:
1084         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
1085         * contentextensions/DFABytecodeInterpreter.cpp:
1086         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
1087         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
1088         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsMatchingEverything):
1089         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1090         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot): Deleted.
1091         * contentextensions/DFABytecodeInterpreter.h:
1092         * loader/ResourceLoadInfo.h:
1093
1094 2015-07-20  Jeremy Jones  <jeremyj@apple.com>
1095
1096         Adopt AVPlayerLayerView
1097         https://bugs.webkit.org/show_bug.cgi?id=146862
1098
1099         Reviewed by Jer Noble.
1100
1101         The CALayerHost is replaced with WebLayerHostView to be compatible with UIView animations.
1102         Some animation is improved in the conversion.
1103
1104         WebAVPlayerLayerView and WebAVPictureInPicturePlayerLayerView derive from AVKit and UIKit respectively.
1105         Because these frameworks are loaded at runtime, these classes must be generate using objc/runtime.h to
1106         register them from c functions at runtime. The most important part of these UIViews is that their
1107         backing layer is a WebAVPlayerLayer.
1108
1109         WebCALayerHostWrapper and WebAVVideoLayer are combined into WebAVPlayerLayer to simplify the hierarchy.
1110         WebAVPlayerLayer is a stand-in for an AVPlayerLayer.
1111
1112         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1113         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): -removeFromSuperlayer is redundant.
1114         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenGravity): syncTextTrackBounds on change.
1115         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame):
1116         We never want animation here, since all animation will happen in UIViews. 
1117         This is just for going into the final size after a transform based animation.
1118
1119         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1120         (WebVideoFullscreenControllerContext::didSetupFullscreen): layer -> view
1121         (WebVideoFullscreenControllerContext::didCleanupFullscreen): layer -> view
1122         (WebVideoFullscreenControllerContext::setUpFullscreen): layer -> view
1123
1124         (WebVideoFullscreenControllerContext::setVideoLayerFrame): layer -> view
1125         Use fence port to synchronize between the UIThread and the WebThread,
1126         the same way WebKit2 uses a fence port to synchronize between processes.
1127
1128         (WebVideoFullscreenControllerContext::setVideoLayerGravity):
1129         No longer necessary to cache videoGravity at this level.
1130
1131         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1132         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1133
1134         (-[WebAVPlayerLayer init]):
1135         (-[WebAVPlayerLayer dealloc]):
1136         (-[WebAVPlayerLayer playerController]):
1137         (-[WebAVPlayerLayer setBounds:]):
1138         (-[WebAVPlayerLayer resolveBounds]):
1139         (-[WebAVPlayerLayer setVideoGravity:]):
1140         (-[WebAVPlayerLayer videoGravity]):
1141         (-[WebAVPlayerLayer videoRect]):
1142         (+[WebAVPlayerLayer keyPathsForValuesAffectingVideoRect]):
1143         Added class WebAVPlayerLayer, replacing WebAVVideoLayer and WebCALayerHostWrapper.
1144
1145         (WebAVPictureInPicturePlayerLayerView_layerClass):
1146         (getWebAVPictureInPicturePlayerLayerViewClass):
1147         Added runtime class WebAVPictureInPicturePlayerLayerView
1148
1149         (WebAVPlayerLayerView_layerClass):
1150         (WebAVPlayerLayerView_playerController):
1151         (WebAVPlayerLayerView_setPlayerController):
1152         (WebAVPlayerLayerView_videoView):
1153         (WebAVPlayerLayerView_setVideoView):
1154         (WebAVPlayerLayerView_startRoutingVideoToPictureInPicturePlayerLayerView):
1155         (WebAVPlayerLayerView_stopRoutingVideoToPictureInPicturePlayerLayerView):
1156         (WebAVPlayerLayerView_pictureInPicturePlayerLayerView):
1157         (getWebAVPlayerLayerViewClass):
1158         Added runtime class WebAVPlayerLayerView
1159
1160         (WebVideoFullscreenInterfaceAVKit::setVideoDimensions):
1161         Dimensions are also stored in WebAVPlayerLayer so it can make decisions about
1162         animating the video layer.
1163
1164         (WebVideoFullscreenInterfaceAVKit::setExternalPlayback):
1165         (WebVideoFullscreenInterfaceAVKit::enterFullscreen): 
1166         (WebVideoFullscreenInterfaceAVKit::didStopPictureInPicture):
1167         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreen):
1168         Straightforward layer to view conversion.
1169
1170         (WebVideoFullscreenInterfaceAVKit::preparedToReturnToInline):
1171         Set view frame using the view hierarchy instead of assuming it is directly in a window.
1172
1173         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
1174         Set view frame using the view hierarchy instead of assuming it is directly in a window.
1175         dispatch_async before calling didExitFullscreen() to allows CATransactions to complete.
1176
1177         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
1178         Set view frame using the view hierarchy instead of assuming it is directly in a window.
1179         dispatch_async before calling didSetupFullscreen() to allows CATransactions to complete.
1180
1181         (-[WebCALayerHostWrapper dealloc]): Deleted.
1182         (-[WebCALayerHostWrapper setVideoSublayer:]): Deleted.
1183         (-[WebCALayerHostWrapper videoSublayer]): Deleted.
1184         (-[WebCALayerHostWrapper setBounds:]): Deleted.
1185         (-[WebCALayerHostWrapper resolveBounds]): Deleted.
1186         Class WebCALayerHostWrapper deleted. Functionality rolled into WebAVPlayerLayer.
1187
1188         (+[WebAVVideoLayer videoLayer]): Deleted.
1189         (-[WebAVVideoLayer init]): Deleted.
1190         (-[WebAVVideoLayer setPlayerViewController:]): Deleted.
1191         (-[WebAVVideoLayer setVideoSublayer:]): Deleted.
1192         (-[WebAVVideoLayer setBounds:]): Deleted.
1193         (-[WebAVVideoLayer setVideoLayerGravity:]): Deleted.
1194         (-[WebAVVideoLayer videoLayerGravity]): Deleted.
1195         (-[WebAVVideoLayer enterPIPModeRedirectingVideoToLayer:]): Deleted.
1196         (-[WebAVVideoLayer leavePIPMode]): Deleted.
1197         Class WebAVVideoLayer deleted. Functionality rolled into WebAVPlayerLayer.
1198
1199         * platform/ios/WebVideoFullscreenModel.h:
1200         * platform/ios/WebVideoFullscreenModelVideoElement.h:
1201         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
1202         No need to store frame and gravity in the model. It is stored in the UI where it is used.
1203
1204         (WebVideoFullscreenModelVideoElement::videoLayerFrame): Deleted.
1205         (WebVideoFullscreenModelVideoElement::videoLayerGravity): Deleted.
1206         * platform/spi/cocoa/AVKitSPI.h: Add AVPlayerLayerView.
1207
1208 2015-07-20  Anders Carlsson  <andersca@apple.com>
1209
1210         Add PLATFORM #ifdefs for Mac SPI headers
1211         https://bugs.webkit.org/show_bug.cgi?id=147129
1212
1213         Reviewed by Tim Horton.
1214
1215         * Configurations/WebCore.xcconfig:
1216         Skip NPAPI headers on iOS.
1217
1218         * platform/mac/WebVideoFullscreenController.h:
1219         * platform/spi/mac/DataDetectorsSPI.h:
1220         * platform/spi/mac/NSEventSPI.h:
1221         * platform/spi/mac/NSFontSPI.h:
1222         * platform/spi/mac/NSMenuSPI.h:
1223
1224 2015-07-20  Tim Horton  <timothy_horton@apple.com>
1225
1226         REGRESSION (r174287): Flash of black when opening a new web view or navigating to a new page
1227         https://bugs.webkit.org/show_bug.cgi?id=147127
1228         <rdar://problem/21474317>
1229
1230         Reviewed by Simon Fraser.
1231
1232         * rendering/RenderView.cpp:
1233         (WebCore::RenderView::paintBoxDecorations):
1234         Avoid using an invalid documentBackgroundColor, fall back to baseBackgroundColor
1235         like we did before r174287.
1236
1237 2015-07-20  Alex Christensen  <achristensen@webkit.org>
1238
1239         [Win] Unreviewed build fix after r187022.
1240
1241         * platform/win/WindowsTouch.h:
1242         Undid changes from r187022
1243
1244 2015-07-20  Jeremy Jones  <jeremyj@apple.com>
1245
1246         Allow video to rotate when app doesnt allow rotation.
1247         https://bugs.webkit.org/show_bug.cgi?id=147121
1248
1249         Reviewed by Jer Noble.
1250
1251         Set an SPI bool on the fullscreen video root view controller to allow it to override app rotation restrictions. 
1252         This allows video to be played in landscape in portrait only apps.
1253
1254         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1255         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
1256
1257 2015-07-20  Andreas Kling  <akling@apple.com>
1258
1259         Unreviewed assertion fix following r187031.
1260
1261         Just have GenericEventQueue::resume() return early if the queue isn't suspended.
1262         Suspend/Resume calls are not always symmetrical in HTMLMediaElement.
1263
1264         * dom/GenericEventQueue.cpp:
1265         (WebCore::GenericEventQueue::resume):
1266
1267 2015-07-20  David Kilzer  <ddkilzer@apple.com>
1268
1269         Unexpected ABI diffference between armv7 and armv7s in WebCore::GraphicsLayerCA::~GraphicsLayerCA()
1270         <http://webkit.org/b/147101>
1271
1272         Reviewed by Michael Saboff.
1273
1274         * platform/graphics/transforms/TransformationMatrix.h: Align
1275         Matrix4 on both armv7 and armv7s.
1276
1277 2015-07-20  Anders Carlsson  <andersca@apple.com>
1278
1279         Add the necessary platform checks to iOS SPI headers
1280         https://bugs.webkit.org/show_bug.cgi?id=147120
1281
1282         Reviewed by Tim Horton.
1283
1284         * platform/spi/ios/GraphicsServicesSPI.h:
1285         * platform/spi/ios/MediaPlayerSPI.h:
1286         * platform/spi/ios/MobileGestaltSPI.h:
1287
1288 2015-07-20  Andreas Kling  <akling@apple.com>
1289
1290         Improve behavior of media elements in page cache.
1291         <https://webkit.org/b/147020>
1292         <rdar://problem/21712311>
1293
1294         Reviewed by Chris Dumez.
1295
1296         Make improvements for media elements when transitioning in/out of page cache:
1297
1298         - Events that were scheduled when going into cache will now be delivered
1299           when the page is restored from cache.
1300
1301         - Data buffering is turned off while in the cache. This reduces the memory
1302           cost of cached pages with media elements on iOS (where mediaserverd would
1303           keep upcoming video frames in memory for cached pages.)
1304
1305         Test: media/restore-from-page-cache.html (amended)
1306
1307         * dom/GenericEventQueue.h:
1308         * dom/GenericEventQueue.cpp:
1309         (WebCore::GenericEventQueue::enqueueEvent):
1310         (WebCore::GenericEventQueue::suspend):
1311         (WebCore::GenericEventQueue::resume):
1312
1313             Add a simple suspend/resume mechanism to GenericEventQueue that can
1314             be used to support page caching.
1315
1316         * html/HTMLMediaElement.cpp:
1317         (WebCore::HTMLMediaElement::stop):
1318         (WebCore::HTMLMediaElement::suspend):
1319         (WebCore::HTMLMediaElement::resume):
1320         (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
1321
1322             Adapt to event queueing changes and add calls to setShouldBufferData().
1323
1324         * html/HTMLSourceElement.h:
1325         * html/HTMLSourceElement.cpp:
1326         (WebCore::HTMLSourceElement::HTMLSourceElement):
1327         (WebCore::HTMLSourceElement::create):
1328         (WebCore::HTMLSourceElement::activeDOMObjectName):
1329         (WebCore::HTMLSourceElement::canSuspendForPageCache):
1330         (WebCore::HTMLSourceElement::suspend):
1331         (WebCore::HTMLSourceElement::resume):
1332         (WebCore::HTMLSourceElement::stop):
1333
1334             Turn HTMLSourceElement into an ActiveDOMObject so it gets all the
1335             appropriate page cache notifications directly. Suspend the delayed
1336             error event delivery timer when cached.
1337
1338 2015-07-20  Mark Lam  <mark.lam@apple.com>
1339
1340         Rollout r187020 and r187021: breaks JSC API tests on debug builds.
1341         https://bugs.webkit.org/show_bug.cgi?id=147110
1342
1343         * bindings/js/JSDOMWindowBase.cpp:
1344         (WebCore::JSDOMWindowBase::commonVM):
1345
1346 2015-07-18  Ada Chan  <adachan@apple.com>
1347
1348         Fix deadlock between -[AVPlayerItem currentTime] and -[AVPlayer isExternalPlaybackActive]
1349         https://bugs.webkit.org/show_bug.cgi?id=147085
1350         <rdar://problem/21878275>
1351
1352         Reviewed by Jer Noble.
1353
1354         * Modules/webaudio/AudioContext.cpp:
1355         (WebCore::AudioContext::isPlayingAudioDidChange):
1356         Call Document::updateIsPlayingMedia() on the main thread, since we could be on the audio I/O
1357         thread here and the Document::updateIsPlayingMedia() call could block, causing a deadlock.
1358
1359 2015-07-20  Alex Christensen  <achristensen@webkit.org>
1360
1361         Resurrect CMake build on Windows.
1362         https://bugs.webkit.org/show_bug.cgi?id=147083
1363
1364         Reviewed by Gyuyoung Kim.
1365
1366         * CMakeLists.txt:
1367         * PlatformWin.cmake:
1368         * dom/Document.cpp:
1369         (WebCore::Document::~Document):
1370         * dom/Range.cpp:
1371         * dom/Text.cpp:
1372         * editing/CompositeEditCommand.cpp:
1373         * platform/graphics/texmap/BitmapTexturePool.cpp:
1374         (WebCore::BitmapTexturePool::createTexture):
1375         * platform/win/WindowsTouch.h:
1376         * rendering/RenderThemeWin.h:
1377         Fixed some including and compiling quirks needed for different configurations.
1378
1379 2015-07-20  Per Arne Vollan  <peavo@outlook.com>
1380
1381         JavaScriptCore performance is very bad on Windows
1382         https://bugs.webkit.org/show_bug.cgi?id=146448
1383
1384         Reviewed by Mark Lam.
1385
1386         * bindings/js/JSDOMWindowBase.cpp:
1387         (WebCore::JSDOMWindowBase::commonVM): Compile fix.
1388
1389 2015-07-19  Tim Horton  <timothy_horton@apple.com>
1390
1391         Make shrink-wrapping test a ref-test instead of pixel-test
1392         https://bugs.webkit.org/show_bug.cgi?id=147081
1393
1394         Reviewed by Sam Weinig.
1395
1396         Nobody runs pixel tests.
1397
1398         * svg/SVGPathUtilities.cpp:
1399         (WebCore::pathIteratorForBuildingString):
1400         (WebCore::buildStringFromPath):
1401         * svg/SVGPathUtilities.h:
1402         Add a helper that turns a Path into a SVG path string.
1403
1404         * testing/Internals.cpp:
1405         (WebCore::Internals::pathStringWithShrinkWrappedRects):
1406         * testing/Internals.h:
1407         * testing/Internals.idl:
1408         Have the internals shrink-wrap method return an SVG path instead of a DOMPath.
1409
1410 2015-07-19  David Kilzer  <ddkilzer@apple.com>
1411
1412         REGRESSION (r187008): CGPathCreateMutableCopyByTransformingPath() is not available on Windows
1413         <https://bugs.webkit.org/show_bug.cgi?id=147077>
1414
1415         * platform/graphics/cg/PathCG.cpp:
1416         (WebCore::Path::transform): Restore less efficient code path
1417         for Windows.
1418
1419 2015-07-18  Tim Horton  <timothy_horton@apple.com>
1420
1421         Simplify Path(CG)::transform/translate
1422         https://bugs.webkit.org/show_bug.cgi?id=147077
1423
1424         Reviewed by Simon Fraser.
1425
1426         No new tests; no behavior change.
1427
1428         * platform/graphics/cg/PathCG.cpp:
1429         (WebCore::Path::translate):
1430         (WebCore::Path::transform):
1431         Use CGPathCreateMutableCopyByTransformingPath to do the copy and transform
1432         in a single call instead of two.
1433
1434         Make use of transform() to implement translate() instead of duplicating the code.
1435         Move the two functions near each other.
1436
1437         (WebCore::Path::boundingRect):
1438         Remove irrelevant reference to Snow Leopard.
1439
1440 2015-07-17  Matt Rajca  <mrajca@apple.com>
1441
1442         Media Session: Add support for 'Content' interruption types
1443         https://bugs.webkit.org/show_bug.cgi?id=147042
1444
1445         Reviewed by Eric Carlson.
1446
1447         Tests: Added media/session/content-interruptions
1448
1449         * Modules/mediasession/MediaSession.cpp:
1450         (WebCore::MediaSession::handleIndefinitePauseInterruption): Indefinitely pause the session by pausing media
1451          elements and removing them from the set of active participating elements.
1452         * Modules/mediasession/MediaSession.h:
1453         * Modules/mediasession/MediaSessionManager.cpp:
1454         (WebCore::MediaSessionManager::didReceiveStartOfInterruptionNotification): Implemented support for 'Content'
1455          interruption types as described in 4.5.2.
1456
1457 2015-07-16  Matt Rajca  <mrajca@apple.com>
1458
1459         Media Session: add support for telephony interruptions
1460         https://bugs.webkit.org/show_bug.cgi?id=147016
1461
1462         Reviewed by Eric Carlson.
1463
1464         * platform/audio/mac/MediaSessionInterruptionProviderMac.mm:
1465         (WebCore::callDidBeginRinging): Forward this event to media sessions as a 'Transient' interruption.
1466         (WebCore::MediaSessionInterruptionProviderMac::beginListeningForInterruptions):
1467         (WebCore::MediaSessionInterruptionProviderMac::stopListeningForInterruptions):
1468
1469 2015-07-17  Matt Rajca  <mrajca@apple.com>
1470
1471         Media Session: add infrastructure for testing interruptions
1472         https://bugs.webkit.org/show_bug.cgi?id=147060
1473
1474         Reviewed by Eric Carlson.
1475
1476         * Modules/mediasession/MediaSession.h: Export methods to be used with tests.
1477         * Modules/mediasession/MediaSessionManager.h: Ditto.
1478         * bindings/scripts/CodeGeneratorJS.pm: JSMediaSession needs to be marked with WEBCORE_EXPORT so it works with JSInternals.
1479         * testing/Internals.cpp:
1480         (WebCore::Internals::sendMediaSessionStartOfInterruptionNotification): Let tests send interruptions to MediaSessionManager.
1481         (WebCore::Internals::sendMediaSessionEndOfInterruptionNotification): Ditto.
1482         (WebCore::Internals::mediaSessionCurrentState): Expose the current state of media sessions to tests.
1483         * testing/Internals.h:
1484         * testing/Internals.idl: Add interfaces for sending interruptions from JS tests.
1485
1486 2015-07-18  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1487
1488         Reduce PassRefPtr in WebKit2 - 3
1489         https://bugs.webkit.org/show_bug.cgi?id=146995
1490
1491         Reviewed by Daniel Bates.
1492
1493         To remove PassRefPtr, this patch reduces use of PassRefPtr in WebKit2.
1494         Because some uses depend on WebCore, WebCore, WK1 ports are modified as well.
1495
1496         * loader/EmptyClients.cpp:
1497         (WebCore::EmptyChromeClient::createPopupMenu):
1498         (WebCore::EmptyChromeClient::createSearchPopupMenu):
1499         (WebCore::EmptyFrameLoaderClient::createDocumentLoader):
1500         (WebCore::EmptyFrameLoaderClient::createFrame):
1501         (WebCore::EmptyFrameLoaderClient::createPlugin):
1502         * loader/EmptyClients.h:
1503         * loader/FrameLoader.cpp:
1504         (WebCore::FrameLoader::init):
1505         (WebCore::FrameLoader::load):
1506         (WebCore::FrameLoader::loadWithNavigationAction):
1507         (WebCore::FrameLoader::reloadWithOverrideEncoding):
1508         (WebCore::FrameLoader::reload):
1509         * loader/FrameLoaderClient.h:
1510         * loader/ResourceLoadScheduler.cpp:
1511         (WebCore::ResourceLoadScheduler::scheduleSubresourceLoad):
1512         (WebCore::ResourceLoadScheduler::schedulePluginStreamLoad):
1513         * loader/ResourceLoadScheduler.h:
1514         * loader/SubresourceLoader.cpp:
1515         (WebCore::SubresourceLoader::create):
1516         * loader/SubresourceLoader.h:
1517         * page/ChromeClient.h:
1518         * platform/graphics/texmap/TextureMapperBackingStore.h:
1519         * platform/graphics/texmap/TextureMapperLayer.h:
1520         (WebCore::TextureMapperLayer::texture):
1521         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp:
1522         (WebCore::TextureMapperSurfaceBackingStore::texture):
1523         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h:
1524         * platform/graphics/texmap/TextureMapperTile.h:
1525         (WebCore::TextureMapperTile::texture):
1526         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
1527         (WebCore::TextureMapperTiledBackingStore::texture):
1528         * platform/graphics/texmap/TextureMapperTiledBackingStore.h:
1529         * storage/StorageNamespace.h:
1530
1531 2015-07-18  David Kilzer  <ddkilzer@apple.com>
1532
1533         REGRESSION (r186976): Use piFloat instead of M_PI
1534
1535         Attempt to fix the following build failure:
1536
1537             PathUtilities.cpp(183): error C2065: 'M_PI' : undeclared identifier [...\Source\WebCore\WebCore.vcxproj\WebCore.vcxproj]
1538
1539         * platform/graphics/PathUtilities.cpp:
1540         (WebCore::walkGraphAndExtractPolygon): Use piFloat since M_PI is
1541         not defined on Windows.
1542
1543 2015-07-18  David Kilzer  <ddkilzer@apple.com>
1544
1545         REGRESSION (r186976): Windows build broke due to missing definition of M_PI
1546
1547         Attempt to fix the following build failure:
1548
1549             PathUtilities.cpp(182): error C2065: 'M_PI' : undeclared identifier [...\Source\WebCore\WebCore.vcxproj\WebCore.vcxproj]
1550
1551         * platform/graphics/PathUtilities.cpp: Include <wtf/MathExtras.h>.
1552
1553 2015-07-17  Zalan Bujtas  <zalan@apple.com>
1554
1555         REGRESSION (r169105): Do not assign a renderer to multiple selection subtrees.
1556         https://bugs.webkit.org/show_bug.cgi?id=147038
1557         rdar://problem/21819351
1558
1559         Reviewed by David Kilzer.
1560
1561         A renderer should never be assigned to multiple selection subtrees. (Currently RenderObject maintains the last selection state.)
1562         RenderView::applySubtreeSelection() loops from the start to the end of the selection to find renderers that are inside the selection.
1563         However, in case of regions (when multiple selection roots are present) traversing the renderer tree by calling RenderObject::nextInPreOrder() could
1564         end up going across selection roots.
1565         This patch ensures that we assign renderers to a specific selection only when the current selection root and the renderer's selection root match.
1566
1567         Test: fast/regions/crash-when-renderer-is-in-multiple-selection-subtrees2.html
1568
1569         * rendering/RenderView.cpp:
1570         (WebCore::SelectionIterator::SelectionIterator):
1571         (WebCore::SelectionIterator::current):
1572         (WebCore::SelectionIterator::checkForSpanner):
1573         (WebCore::RenderView::applySubtreeSelection):
1574
1575 2015-07-17  Andy Estes  <aestes@apple.com>
1576
1577         [iOS] Further tighten the sandbox around pages fetched with Content-Disposition: attachment
1578         https://bugs.webkit.org/show_bug.cgi?id=147044
1579         rdar://problem/21567820
1580
1581         Reviewed by Brady Eidson.
1582
1583         In addition to placing resources fetched with 'Content-Disposition: attachment' in a unique origin,
1584         this change does the following:
1585
1586         - Switches the sandbox type from SandboxOrigin to SandboxAll, which enforces the same restrictions as <iframe sandbox>.
1587         - Disables processing of <meta http-equiv> elements.
1588         - Disables loading of cross-origin subframes.
1589
1590         Tests: http/tests/contentdispositionattachmentsandbox/cross-origin-frames-disabled.html
1591                http/tests/contentdispositionattachmentsandbox/form-submission-disabled.html
1592                http/tests/contentdispositionattachmentsandbox/http-equiv-disabled.html
1593                http/tests/contentdispositionattachmentsandbox/plugins-disabled.html
1594                http/tests/contentdispositionattachmentsandbox/scripts-disabled.html
1595
1596         * dom/Document.cpp:
1597         (WebCore::Document::processHttpEquiv): Switched to calling Document::httpEquivPolicy(). Logged an error to the console for policies other than Enabled.
1598         (WebCore::Document::initSecurityContext): Switched sandbox enforcement from SandboxOrigin to SandboxAll.
1599         (WebCore::Document::httpEquivPolicy): Returned a HttpEquivPolicy based on shouldEnforceContentDispositionAttachmentSandbox() and Settings::httpEquivEnabled().
1600         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Returned true if Settings::contentDispositionAttachmentSandboxEnabled()
1601         and the document was fetched as an attachment.
1602         * dom/Document.h:
1603         * loader/cache/CachedResourceLoader.cpp: 
1604         (WebCore::CachedResourceLoader::canRequest): When requesting a subframe main resource when the parent frame enforces an attachment sandbox,
1605         only continue if the parent frame's SecurityOrigin allows the request.
1606         * page/Settings.in: Added contentDispositionAttachmentSandboxEnabled with an initial value of false.
1607
1608 2015-07-17  Zalan Bujtas  <zalan@apple.com>
1609
1610         (display: block)input range's thumb disappears when moved.
1611         https://bugs.webkit.org/show_bug.cgi?id=146896
1612         <rdar://problem/21787807>
1613
1614         Reviewed by Simon Fraser.
1615
1616         Since the thumb is positioned after the layout for the input (shadow) subtree is finished, the repaint rects
1617         issued during the layout will not cover the re-positioned thumb.
1618         We need to issue a repaint soon after the thumb is re-positioned.
1619
1620         Test: fast/repaint/block-inputrange-repaint.html
1621
1622         * html/shadow/SliderThumbElement.cpp:
1623         (WebCore::RenderSliderContainer::layout):
1624
1625 2015-07-17  Simon Fraser  <simon.fraser@apple.com>
1626
1627         Attempt to fix the build.
1628
1629         * html/HTMLMediaElement.cpp:
1630         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsWireless):
1631         * html/HTMLMediaElement.h:
1632
1633 2015-07-17  Dean Jackson  <dino@apple.com>
1634
1635         Picture in Picture interacts poorly with AirPlay/HDMI
1636         https://bugs.webkit.org/show_bug.cgi?id=147061
1637         <rdar://problem/19192076>
1638
1639         Reviewed by Tim Horton.
1640
1641         When we are actively playing to an external target, the
1642         picture in picture button should be hidden.
1643
1644         Also, the availability of picture in picture is also
1645         dependent on AirPlay, so that we don't auto-pip when
1646         we're displaying on a TV.
1647
1648         * Modules/mediacontrols/mediaControlsiOS.js:
1649         (ControllerIOS.prototype.configureInlineControls): Call the update function.
1650         (ControllerIOS.prototype.updatePictureInPictureButton): Add or remove a hidden class.
1651         * html/MediaElementSession.cpp:
1652         (WebCore::MediaElementSession::allowsPictureInPicture): Check Airplay status.
1653
1654 2015-07-17  Tim Horton  <timothy_horton@apple.com>
1655
1656         [iOS] TextIndicator has a large forehead when line-height > 1
1657         https://bugs.webkit.org/show_bug.cgi?id=147058
1658         <rdar://problem/21643094>
1659
1660         Reviewed by Dean Jackson.
1661
1662         * editing/FrameSelection.cpp:
1663         (WebCore::FrameSelection::getClippedVisibleTextRectangles):
1664         * editing/FrameSelection.h:
1665         Add a parameter controlling whether getClippedVisibleTextRectangles
1666         returns selection-height rects (including extra line-height) or text-height
1667         rects (including only the text height). Plumb it down.
1668
1669         * page/TextIndicator.cpp:
1670         (WebCore::TextIndicator::createWithRange):
1671         (WebCore::TextIndicator::createWithSelectionInFrame):
1672         Use the tighter text-height rects on iOS, where there's no selection highlight to cover up.
1673         Remove an assertion that is no longer always true, and which is mostly obsoleted by the
1674         fact that we don't let FrameSnapshotting code arbitrarily decide the rect to snapshot anymore.
1675
1676 2015-07-17  Tim Horton  <timothy_horton@apple.com>
1677
1678         Improve rect shrink-wrapping algorithm
1679         https://bugs.webkit.org/show_bug.cgi?id=147037
1680         <rdar://problem/21643094>
1681
1682         Reviewed by Simon Fraser.
1683
1684         * platform/graphics/FloatPoint.h:
1685         (WebCore::areEssentiallyEqual):
1686         Added; implementation is the same as FloatSize's.
1687
1688         * platform/graphics/PathUtilities.cpp:
1689         (WebCore::FloatPointGraph::FloatPointGraph):
1690         (WebCore::FloatPointGraph::~FloatPointGraph):
1691         (WebCore::FloatPointGraph::Node::Node):
1692         (WebCore::FloatPointGraph::Node::nextPoints):
1693         (WebCore::FloatPointGraph::Node::addNextPoint):
1694         (WebCore::FloatPointGraph::Node::isVisited):
1695         (WebCore::FloatPointGraph::Node::visit):
1696         (WebCore::FloatPointGraph::Node::reset):
1697         (WebCore::FloatPointGraph::reset):
1698         (WebCore::FloatPointGraph::findOrCreateNode):
1699         (WebCore::findLineSegmentIntersection):
1700         (WebCore::addIntersectionPoints):
1701         (WebCore::walkGraphAndExtractPolygon):
1702         (WebCore::findUnvisitedPolygonStartPoint):
1703         (WebCore::unitePolygons):
1704         (WebCore::edgesForRect):
1705         (WebCore::PathUtilities::pathWithShrinkWrappedRects):
1706         (WebCore::addShrinkWrapRightCorner): Deleted.
1707         (WebCore::addShrinkWrapLeftCorner): Deleted.
1708         (WebCore::addShrinkWrappedPathForRects): Deleted.
1709         (WebCore::rectsIntersectOrTouch): Deleted.
1710         (WebCore::findSetContainingRect): Deleted.
1711         Add a new implementation of shrink-wrap, which is significantly more
1712         generic than the old one, which assumed a top-down progression of rects.
1713
1714         This version uses polygon intersection to find the path around the
1715         set of rects, and then follows said path and adds appropriately-sized
1716         arcs for the corners.
1717
1718         The polygon intersection algorithm first finds all the intersection points
1719         between all of the rects, then builds a graph of edges outward from one point.
1720         It then traverses the graph, choosing at each point the next edge which
1721         has not been visited and has the greatest interior angle, recording the polygon as it goes.
1722
1723         If at the end of the traversal we have not returned to the initial node,
1724         we give up on shrink-wrapping and just use a bounding box around the rects.
1725
1726         If any of the original rects have not been visited at all, we repeat the traversal
1727         starting with that rect, making an additional polygon (since we removed completely contained
1728         rects before we started, having not visited the rect at all means that it's not connected
1729         to the others).
1730
1731         Once we have a set of united polygons, we follow each one, determining the ideal (always
1732         equal in width and height, never more than half the length of either edge, so that we always
1733         have a smooth curve) arc radius and projecting it onto the edge, and then
1734         adding an arc between the end of the previous path and beginning of the next.
1735
1736         Because the shrink-wrap algorithm is fairly expensive, if there are more than 20 rects,
1737         we fall back to a bounding box. Given the current use cases, this is more than enough
1738         rects, but can certainly be adjusted in the future if needed.
1739
1740         * testing/Internals.cpp:
1741         (WebCore::Internals::pathWithShrinkWrappedRects):
1742         * testing/Internals.h:
1743         * testing/Internals.idl:
1744         Add a radius parameter.
1745
1746 2015-07-17  Nan Wang  <n_wang@apple.com>
1747
1748         AX: iframe within table cell is inaccessible to VoiceOver
1749         https://bugs.webkit.org/show_bug.cgi?id=147001
1750         <rdar://problem/21106945>
1751
1752         Reviewed by Chris Fleizach.
1753
1754         When a table cell is created before its parent table determines if it should be ignored or not,
1755         the table cell may cache the wrong role. Fix that by allowing each table cell to update its role
1756         after the table makes this determination.
1757
1758         Test: accessibility/iframe-within-cell.html
1759
1760         * accessibility/AccessibilityTable.cpp:
1761         (WebCore::AccessibilityTable::addChildren):
1762         (WebCore::AccessibilityTable::addChildrenFromSection):
1763
1764 2015-07-17  Myles C. Maxfield  <mmaxfield@apple.com>
1765
1766         style.fontFamily accessor crashes on unstyled node created from DOMParser().parseFromString()
1767         https://bugs.webkit.org/show_bug.cgi?id=147026
1768         <rdar://problem/21864487>
1769
1770         Reviewed by Andreas Kling.
1771
1772         Font CSS properties are a little special because they are used as indices into caches.
1773         Normally, StyleResolver gives all nodes a default font family, so our cache works correctly.
1774         However, if the document doesn't have a Settings object, StyleResolver wasn't doing this.
1775         Documents created from DOMParser().parseFromString() don't have a Settings object.
1776
1777         Test: fast/text/crash-font-family-parsed.html
1778
1779         * css/StyleResolver.cpp:
1780         (WebCore::StyleResolver::defaultStyleForElement):
1781         (WebCore::StyleResolver::initializeFontStyle): Set a font family even if we don't have a
1782         Settings object.
1783
1784 2015-07-17  Myles C. Maxfield  <mmaxfield@apple.com>
1785
1786         Video posters disappear once media has loaded
1787         https://bugs.webkit.org/show_bug.cgi?id=147045
1788
1789         Reviewed by Simon Fraser.
1790
1791         After r184932, all video elements are composited. However, there is logic in
1792         RenderLayerBacking::updateConfiguration() which adds the video layer to the page
1793         if the video is composited, without checking first to see if it should actually
1794         do so.
1795
1796         Test: compositing/video/poster.html
1797
1798         * rendering/RenderLayerBacking.cpp:
1799         (WebCore::RenderLayerBacking::updateConfiguration):
1800
1801 2015-07-17  Benjamin Poulain  <bpoulain@apple.com>
1802
1803         [Content Extensions] Term::isUniversalTransition() incorrectly expects the end-of-line assertion in character sets
1804         https://bugs.webkit.org/show_bug.cgi?id=147032
1805
1806         Reviewed by Alex Christensen.
1807
1808         * contentextensions/Term.h:
1809         (WebCore::ContentExtensions::Term::isUniversalTransition):
1810         The universal transition is not supposed to account for the end-of-line assertion,
1811         it should be a transition matching any character.
1812
1813         Here, we were counting 128 transitions, the 127 characters plus the
1814         transition on zero we are using for EOL.
1815
1816         The end result is Term::isUniversalTransition() was completely useless.
1817         The only code using it is the pattern simplificaton phase. That part
1818         was not working correclty and was allowing useless ".*" in the patterns.
1819
1820 2015-07-17  Dan Bernstein  <mitz@apple.com>
1821
1822         WebCore part of <rdar://problem/21803781> The external URL policy is not reported correctly in navigation actions that create new windows
1823         https://bugs.webkit.org/show_bug.cgi?id=147040
1824
1825         Reviewed by Dean Jackson.
1826
1827         Test: TestWebKitAPI/Tests/WebKit2Cocoa/ShouldOpenExternalURLsInNewWindowActions.mm
1828
1829         * loader/FrameLoader.cpp:
1830         (WebCore::shouldOpenExternalURLsPolicyToApply): Pulled the logic out of
1831         applyShouldOpenExternalURLsPolicyToNewDocumentLoader into this new helper.
1832         (WebCore::FrameLoader::loadURL): When targeting a new frame, apply the external URLs policy
1833         to the action passed to checkNewWindowPolicy.
1834         (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader): Call the new
1835         helper function.
1836         (WebCore::createWindow): Include the external URL policy in the action passed to
1837         createWindow.
1838
1839 2015-07-17  Anders Carlsson  <andersca@apple.com>
1840
1841         ScrollView.h should be self-contained
1842         https://bugs.webkit.org/show_bug.cgi?id=147004
1843
1844         Reviewed by Sam Weinig.
1845
1846         * platform/ScrollView.h:
1847
1848 2015-07-17  Brady Eidson  <beidson@apple.com>
1849
1850         Rolling r186895 back in, in its entirety.
1851         https://bugs.webkit.org/show_bug.cgi?id=146976
1852
1853         Rubberstamped by Tim Horton.
1854
1855         * platform/network/cf/CookieJarCFNet.cpp:
1856         (WebCore::createCookies): Use new CFNetwork SPI.
1857
1858 2015-07-17  Benjamin Poulain  <bpoulain@apple.com>
1859
1860         [Content Extensions] CSS-display-none rules are not working properly
1861         https://bugs.webkit.org/show_bug.cgi?id=147024
1862
1863         Reviewed by Sam Weinig.
1864
1865         There were 2 bugs prevening rules with css-display-none and a url-filter from working
1866         correctly.
1867
1868         First, ContentExtensions::serializeActions() was merging selectors regardless of their
1869         trigger. All the CSS Selectors would be grouped together and applied regardless of which
1870         rule apply.
1871
1872         That problem was fixed by grouping CSS rules by trigger. We want all the undistinguishable
1873         CSS rules to be merged. The trigger makes 2 rules dinstinguishable as one rule can apply
1874         on a page while the next rule does not. The simplest approach is to group by trigger.
1875
1876         The second problem had to do with rules added before the document is created.
1877         When accumulating those rules, we were only keeping the last one. The reason was that
1878         DocumentLoader::addPendingContentExtensionDisplayNoneSelector() would only keep a single
1879         selector list by extension.
1880
1881         This is fixed by keeping a vector of all the rules that apply.
1882
1883         Tests: http/tests/contentextensions/css-display-none-with-different-case-sensitivity-are-not-merged.html
1884                http/tests/contentextensions/css-display-none-with-different-triggers-are-not-merged.html
1885                http/tests/contentextensions/two-distinguishable-css-display-none-rules-on-main-resource.html
1886
1887         * contentextensions/ContentExtensionCompiler.cpp:
1888         (WebCore::ContentExtensions::serializeActions):
1889         * contentextensions/ContentExtensionRule.h:
1890         (WebCore::ContentExtensions::Trigger::isEmpty):
1891         (WebCore::ContentExtensions::TriggerHash::hash):
1892         (WebCore::ContentExtensions::TriggerHash::equal):
1893         (WebCore::ContentExtensions::TriggerHashTraits::constructDeletedValue):
1894         (WebCore::ContentExtensions::TriggerHashTraits::isDeletedValue):
1895         (WebCore::ContentExtensions::TriggerHashTraits::emptyValue):
1896         (WebCore::ContentExtensions::TriggerHashTraits::isEmptyValue):
1897         * contentextensions/ContentExtensionsBackend.cpp:
1898         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad): Deleted.
1899         * loader/DocumentLoader.cpp:
1900         (WebCore::DocumentLoader::commitData):
1901         (WebCore::DocumentLoader::addPendingContentExtensionDisplayNoneSelector):
1902         * loader/DocumentLoader.h:
1903
1904 2015-07-17  Tim Horton  <timothy_horton@apple.com>
1905
1906         iOS TextIndicators include text that is not supposed to be indicated
1907         https://bugs.webkit.org/show_bug.cgi?id=147028
1908         <rdar://problem/21643094>
1909
1910         Reviewed by Sam Weinig.
1911
1912         Paint the selection and background, but not other foregrounds, for iOS TextIndicators.
1913
1914         * page/FrameSnapshotting.cpp:
1915         (WebCore::snapshotFrameRect):
1916         * page/FrameSnapshotting.h:
1917         Add a new snapshot option where we'll paint backgrounds and the selected
1918         foreground and nothing else.
1919         Pass the new snapshot option through as a paint behavior.
1920
1921         * page/TextIndicator.cpp:
1922         (WebCore::TextIndicator::createWithRange):
1923         Implement the incantations necessary to make a temporary selection
1924         change not get sent to the UI process and actually have WebCore know about it
1925         and accurately respond to questions about it.
1926
1927         (WebCore::TextIndicator::createWithSelectionInFrame):
1928         Paint selection and backgrounds on iOS.
1929
1930         * rendering/PaintPhase.h:
1931         * rendering/RenderLayer.cpp:
1932         (WebCore::RenderLayer::paintLayerContents):
1933         * rendering/RenderElement.cpp:
1934         (WebCore::RenderElement::selectionColor):
1935         Add a new paint behavior, SelectionAndBackgroundsOnly, which behaves
1936         the same as selection only except it allows backgrounds to paint.
1937
1938 2015-07-17  Mark Lam  <mark.lam@apple.com>
1939
1940         Remove leak of objects between isolated worlds on custom events, message events, and pop state events.
1941         https://bugs.webkit.org/show_bug.cgi?id=118884
1942
1943         Reviewed by Filip Pizlo and Mark Lam.
1944         Patch by Keith Miller  <keith_miller@apple.com>.
1945
1946         Tests: fast/events/event-leak-objects.html
1947                fast/events/event-properties-gc.html
1948
1949         Fixes an issue where objects passed as certain properties of events could cross isolated worlds. This
1950         was fixed by checking that any object passed by an event must be serializable or originate from the same
1951         isolated world as the one it is currently being accessed in. In the case of MessageEvents and PopStateEvents we
1952         cache the values of the data and state properties, respectively, as they may be a deserialized object. In case
1953         an object was deserialized in a world with elevated privileges we also check the cached value is from the same
1954         world, if it is from a different world we recompute it. For testing purposes, I added a new function to Internals
1955         that determines whether a JSObject originated in the current world.
1956
1957         * CMakeLists.txt:
1958         * WebCore.xcodeproj/project.pbxproj:
1959         * bindings/js/DOMWrapperWorld.h:
1960         (WebCore::worldForDOMObject):
1961         * bindings/js/JSBindingsAllInOne.cpp:
1962         * bindings/js/JSCustomEventCustom.cpp: Copied from Source/WebCore/dom/CustomEvent.cpp.
1963         (WebCore::JSCustomEvent::detail):
1964         * bindings/js/JSMessageEventCustom.cpp:
1965         (WebCore::JSMessageEvent::data):
1966         * bindings/js/JSPopStateEventCustom.cpp:
1967         (WebCore::JSPopStateEvent::state):
1968         * dom/CustomEvent.cpp:
1969         (WebCore::CustomEvent::initCustomEvent):
1970         (WebCore::CustomEvent::trySerializeDetail):
1971         * dom/CustomEvent.h:
1972         * dom/CustomEvent.idl:
1973         * dom/MessageEvent.cpp:
1974         (WebCore::MessageEvent::initMessageEvent):
1975         (WebCore::MessageEvent::trySerializeData):
1976         * dom/MessageEvent.h:
1977         * dom/PopStateEvent.cpp:
1978         (WebCore::PopStateEvent::trySerializeState):
1979         * dom/PopStateEvent.h:
1980         * testing/Internals.cpp:
1981         (WebCore::Internals::isFromCurrentWorld):
1982         * testing/Internals.h:
1983         * testing/Internals.idl:
1984
1985 2015-07-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1986
1987         [GTK] Cleanup PasteboardHelper
1988         https://bugs.webkit.org/show_bug.cgi?id=147035
1989
1990         Reviewed by Žan Doberšek.
1991
1992         It's actually a singleton, but the API suggests you can create
1993         your own or use the default one, but the default one should be the
1994         only one. Rename PasteboardHelper::defaultPasteboardHelper() as
1995         PasteboardHelper::singleton() and make it non-copyable and never
1996         destroyed.
1997
1998         * platform/gtk/PasteboardGtk.cpp:
1999         (WebCore::Pasteboard::writePlainText): Use PasteboardHelper::singleton().
2000         (WebCore::Pasteboard::write): Ditto.
2001         (WebCore::Pasteboard::writePasteboard): Ditto.
2002         (WebCore::Pasteboard::clear): Ditto.
2003         (WebCore::Pasteboard::canSmartReplace): Ditto.
2004         (WebCore::Pasteboard::read): Ditto.
2005         (WebCore::Pasteboard::hasData): Ditto.
2006         (WebCore::Pasteboard::types): Ditto.
2007         (WebCore::Pasteboard::readString): Ditto.
2008         (WebCore::Pasteboard::readFilenames): Ditto.
2009         * platform/gtk/PasteboardHelper.cpp:
2010         (WebCore::PasteboardHelper::singleton): Renamed as singleton, also
2011         use NeverDestroyed and return a reference instead of a pointer.
2012         (WebCore::PasteboardHelper::PasteboardHelper): Do all
2013         initializations here and remove the initialization static flag,
2014         since this is a real singleton now. Also use
2015         gdk_atom_intern_static_string() to initialize the atoms instead of
2016         gdk_atom_intern().
2017         (WebCore::PasteboardHelper::targetList):
2018         (WebCore::PasteboardHelper::targetListForDataObject):
2019         (WebCore::getClipboardContentsCallback):
2020         * platform/gtk/PasteboardHelper.h:
2021
2022 2015-07-16  Matt Rajca  <mrajca@apple.com>
2023
2024         Media Session: handle 'Transient' and 'Transient Solo' interruption events
2025         https://bugs.webkit.org/show_bug.cgi?id=146840
2026
2027         Reviewed by Eric Carlson.
2028
2029         * Modules/mediasession/MediaSession.cpp:
2030         (WebCore::MediaSession::handleDuckInterruption): Added stub.
2031         (WebCore::MediaSession::handleUnduckInterruption): Added stub.
2032         (WebCore::MediaSession::handlePauseInterruption): Pause active media elements. We use our helper method to do this
2033           "safely" since pausing a media element can change the collection we're iterating.
2034         (WebCore::MediaSession::handleUnpauseInterruption): Unpause active media elements. We use our helper method to do this
2035           "safely" since unpausing a media element can change the collection we're iterating.
2036         (WebCore::MediaSession::togglePlayback): Factored out "safe" iteration into a helper method elsewhere.
2037         (WebCore::MediaSession::safelyIterateActiveMediaElements): Safely iterate through the collection of active media
2038           elements.
2039         * Modules/mediasession/MediaSession.h:
2040         * Modules/mediasession/MediaSessionManager.cpp:
2041         (WebCore::MediaSessionManager::MediaSessionManager): On Mac, register for platform-specific interruptions.
2042         (WebCore::MediaSessionManager::didReceiveStartOfInterruptionNotification): Implemented section 4.5.2 of Media Session spec.
2043         (WebCore::MediaSessionManager::didReceiveEndOfInterruptionNotification): Ditto.
2044         * Modules/mediasession/MediaSessionManager.h:
2045
2046 2015-07-16  Matt Rajca  <mrajca@apple.com>
2047
2048         Media Session: add support for platform-specific interruption providers
2049         https://bugs.webkit.org/show_bug.cgi?id=147008
2050
2051         Reviewed by Eric Carlson.
2052
2053         * WebCore.xcodeproj/project.pbxproj: Include new source files.
2054         * platform/mediasession/MediaSessionInterruptionProvider.cpp: Added base class to be used by MediaSessionManager
2055           to listen for interruption notifications.
2056         (WebCore::MediaSessionInterruptionProvider::MediaSessionInterruptionProvider): Begin listening for interruptions
2057           upon construction.
2058         (WebCore::MediaSessionInterruptionProvider::~MediaSessionInterruptionProvider): Stop listening for interruptions
2059           before destruction.
2060         (WebCore::MediaSessionInterruptionProvider::beginListeningForInterruptions): To be overridden by subclasses.
2061         (WebCore::MediaSessionInterruptionProvider::stopListeningForInterruptions): To be overridden by subclasses.
2062         * platform/mediasession/MediaSessionInterruptionProvider.h: Added.
2063         (WebCore::MediaSessionInterruptionProviderClient::~MediaSessionInterruptionProviderClient):
2064         (WebCore::MediaSessionInterruptionProvider::client):
2065         * platform/mediasession/mac/MediaSessionInterruptionProviderMac.h: Added for providing Mac-specific interruptions.
2066         (WebCore::MediaSessionInterruptionProviderMac::~MediaSessionInterruptionProviderMac):
2067         * platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm: Added stubs.
2068         (WebCore::MediaSessionInterruptionProviderMac::beginListeningForInterruptions):
2069         (WebCore::MediaSessionInterruptionProviderMac::stopListeningForInterruptions):
2070
2071 2015-07-16  Tim Horton  <timothy_horton@apple.com>
2072
2073         Add shrink-wrapped link highlights
2074         https://bugs.webkit.org/show_bug.cgi?id=147021
2075         <rdar://problem/21643094>
2076
2077         Reviewed by Enrica Casucci.
2078
2079         * WebCore.xcodeproj/project.pbxproj:
2080         * page/TextIndicator.cpp:
2081         (WebCore::TextIndicator::createWithRange):
2082         (WebCore::TextIndicator::createWithSelectionInFrame):
2083         * page/TextIndicator.h:
2084         Add a margin parameter to TextIndicator; this inflates each text rect
2085         by the given amount.
2086
2087         Use snapshotFrameRect instead of snapshotSelection because we really
2088         want an image that exactly fits textBoundingRectInDocumentCoordinates,
2089         and snapshotSelection comes up with selection rects in different ways,
2090         especially on iOS (where it comes up with nothing!).
2091
2092         For now, avoid forcing black text or painting only the selection on iOS.
2093         Eventually, we should have TextIndicator options for these things that
2094         are then respected at the presentation layer.
2095
2096 2015-07-16  Matt Rajca  <mrajca@apple.com>
2097
2098         Media Session: remove plumbing for delivering start/end-of-interruption events
2099         https://bugs.webkit.org/show_bug.cgi?id=147005
2100
2101         Reviewed by Eric Carlson.
2102
2103         Instead of receiving interruptions through WebKit, we will provide platform-specific implementations in WebCore
2104         so the same behavior is available to all clients.
2105
2106         * Modules/mediasession/MediaSessionEvents.h:
2107         * page/Page.cpp:
2108         * page/Page.h:
2109
2110 2015-07-16  Alex Christensen  <achristensen@webkit.org>
2111
2112         [Content Extensions] Cache domain actions
2113         https://bugs.webkit.org/show_bug.cgi?id=146817
2114
2115         Reviewed by Benjamin Poulain.
2116
2117         Right now we run regular expressions on the domain every time we have any rules that match with if-domain or unless-domain.  
2118         This caches the results of running regular expressions on the domain of the main document's url so we only need to 
2119         run those regular expressions when the main document changes domain.  We also spend less time adding unused actions into HashSets.
2120
2121         All behavior is covered by existing api tests, but I added some to explicitly test if-domain and unless-domain with multiple load types.
2122
2123         * contentextensions/ContentExtension.cpp:
2124         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
2125         (WebCore::ContentExtensions::ContentExtension::cachedDomainActions):
2126         * contentextensions/ContentExtension.h:
2127         (WebCore::ContentExtensions::ContentExtension::identifier):
2128         (WebCore::ContentExtensions::ContentExtension::compiledExtension):
2129         * contentextensions/ContentExtensionsBackend.cpp:
2130         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2131         * contentextensions/DFABytecodeInterpreter.cpp:
2132         (WebCore::ContentExtensions::getJumpDistance):
2133         (WebCore::ContentExtensions::matchesDomain):
2134         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
2135         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
2136         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
2137         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretWithDomains):
2138         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2139         * contentextensions/DFABytecodeInterpreter.h:
2140
2141 2015-07-16  Simon Fraser  <simon.fraser@apple.com>
2142
2143         Fix disappearing position:fixed elements in fixed layout mode
2144         https://bugs.webkit.org/show_bug.cgi?id=147019
2145
2146         Reviewed by Tim Horton.
2147
2148         Test: compositing/fixed-with-fixed-layout.html
2149         
2150         When in fixed layout mode, and being scaled down, viewportConstrainedVisibleContentRect() is
2151         the wrong thing to use to determine if position:fixed elements are clipped out. In this case,
2152         use the simpler document bounds (before scaling).
2153         
2154         In the long term,  there needs to be an equivalent of viewportConstrainedVisibleContentRect()
2155         that gives an appropriate rect that can be used here.
2156
2157         * rendering/RenderLayerCompositor.cpp:
2158         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
2159
2160 2015-07-16  Benjamin Poulain  <bpoulain@apple.com>
2161
2162         [Content extensions] Combine suffixes when generating NFAs
2163         https://bugs.webkit.org/show_bug.cgi?id=146961
2164
2165         Reviewed by Alex Christensen.
2166
2167         In this patch, I add a mechanism very similar to the prefix tree
2168         but for the suffix (called a reverse suffix tree here).
2169
2170         The idea is here is to reuse the existing NFA nodes when generating
2171         a chain of suffix Term that were already generated previously.
2172         When generating a disjunction ending with the same suffix, we now
2173         have the same trailing NFA nodes for both sides of the disjunction.
2174
2175         Mixing the prefix and suffix generation can be tricky, we do not want
2176         transitions from a pattern to creep into the suffix of an other.
2177
2178         To avoid any conflict, the rules here are very simple:
2179         -Only use the reverse suffix tree for terms without actions
2180          up to a leaf term with actions.
2181
2182          This rule ensure that no action will accidentally make its way
2183          to an other rule by resuing a vertex of the reverse suffix tree.
2184
2185         -Only use the reverse suffix tree for chains of terms in which
2186          each term only has zero or one following term.
2187
2188          With this condition, when taking any vertex of the reverse suffix
2189          tree, there is only one edge that move out of that vertex when reading
2190          from left to right.
2191          For any vertex, there is only one possible string generated
2192          left-to-right, a single suffix.
2193
2194         This is overly restrictive but it is fast, easier to verify, and it works
2195         well in practice.
2196         For all the more complicated cases, we can count on the Minimizer to
2197         find a better solution.
2198
2199
2200         With all the simple suffixes merged, our NFAs are smaller, which
2201         let us combine more patterns.
2202         The DFAs are also smaller and faster to produce since their size
2203         is relative to the NFA sizes.
2204
2205         Overall, I get the following gains:
2206         -Chris's test case:
2207             compile time -40%.
2208             bytecode size -14%.
2209         -Armand's test case:
2210             compile time -53%.
2211             bytecode size -13%.
2212
2213         * WebCore.xcodeproj/project.pbxproj:
2214         * contentextensions/CombinedURLFilters.cpp:
2215         (WebCore::ContentExtensions::ActiveSubtree::ActiveSubtree):
2216         (WebCore::ContentExtensions::generateInfixUnsuitableForReverseSuffixTree):
2217         (WebCore::ContentExtensions::generateSuffixWithReverseSuffixTree):
2218         (WebCore::ContentExtensions::clearReverseSuffixTree):
2219         (WebCore::ContentExtensions::generateNFAForSubtree):
2220         * contentextensions/DFA.cpp:
2221         (WebCore::ContentExtensions::DFA::debugPrintDot):
2222         Forgot to close a tag, dot was not happy.
2223
2224         * contentextensions/HashableActionList.h: Added.
2225         (WebCore::ContentExtensions::HashableActionList::HashableActionList):
2226         (WebCore::ContentExtensions::HashableActionList::isEmptyValue):
2227         (WebCore::ContentExtensions::HashableActionList::isDeletedValue):
2228         (WebCore::ContentExtensions::HashableActionList::operator==):
2229         (WebCore::ContentExtensions::HashableActionList::operator!=):
2230         (WebCore::ContentExtensions::HashableActionListHash::hash):
2231         (WebCore::ContentExtensions::HashableActionListHash::equal):
2232         We need a way to group reverse suffix tree by their terminal actions.
2233         This new hash structure lets us find unique vertex for a list of actions
2234         in any order.
2235
2236         * contentextensions/ImmutableNFANodeBuilder.h:
2237         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::isValid):
2238         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::nodeId):
2239         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::addTransition):
2240         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::addEpsilonTransition):
2241         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::ImmutableNFANodeBuilder): Deleted.
2242         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::~ImmutableNFANodeBuilder): Deleted.
2243         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::operator=): Deleted.
2244         * contentextensions/Term.h:
2245         (WebCore::ContentExtensions::Term::generateGraph):
2246         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
2247         Node building changes a bit.
2248
2249         Previously, it was assumed nodes are always built from left to right.
2250         Getting the node on the right was done by providing the left node and the term
2251         doing the transition.
2252
2253         Now we have both left to right and right to left generation.
2254
2255         The right-to-left has a specific property: no edge can be added after
2256         it's initial term (rule 2 of our reverse suffix tree). This simplifies
2257         things a bit since we can finalize all the nodes in the suffix tree.
2258         All we need is to keep their ID to be able to link new nodes
2259         to the reverse suffix tree.
2260
2261 2015-07-16  Brady Eidson  <beidson@apple.com>
2262
2263         Rolling out part of r186895 until rdar://problem/21861167 is resolved.
2264         https://bugs.webkit.org/show_bug.cgi?id=146976
2265
2266         * platform/network/cf/CookieJarCFNet.cpp:
2267         (WebCore::createCookies): Don’t use this new SPI quite yet.
2268
2269 2015-07-16  Filip Pizlo  <fpizlo@apple.com>
2270
2271         Unreviewed, roll out http://trac.webkit.org/changeset/186903. It broke the build.
2272
2273         * CMakeLists.txt:
2274         * WebCore.xcodeproj/project.pbxproj:
2275         * bindings/js/DOMWrapperWorld.h:
2276         (WebCore::currentWorld):
2277         (WebCore::worldForDOMObject): Deleted.
2278         * bindings/js/JSBindingsAllInOne.cpp:
2279         * bindings/js/JSCustomEventCustom.cpp:
2280         (WebCore::JSCustomEvent::detail): Deleted.
2281         * bindings/js/JSMessageEventCustom.cpp:
2282         (WebCore::JSMessageEvent::data):
2283         * bindings/js/JSPopStateEventCustom.cpp:
2284         (WebCore::JSPopStateEvent::state):
2285         * dom/CustomEvent.cpp:
2286         (WebCore::CustomEvent::initCustomEvent):
2287         (WebCore::CustomEvent::eventInterface):
2288         (WebCore::CustomEvent::trySerializeDetail): Deleted.
2289         * dom/CustomEvent.h:
2290         * dom/CustomEvent.idl:
2291         * dom/MessageEvent.cpp:
2292         (WebCore::MessageEvent::initMessageEvent):
2293         (WebCore::MessageEvent::data):
2294         (WebCore::MessageEvent::trySerializeData): Deleted.
2295         * dom/MessageEvent.h:
2296         * dom/PopStateEvent.cpp:
2297         (WebCore::PopStateEvent::create):
2298         (WebCore::PopStateEvent::eventInterface):
2299         (WebCore::PopStateEvent::trySerializeState): Deleted.
2300         * dom/PopStateEvent.h:
2301         * testing/Internals.cpp:
2302         (WebCore::Internals::deserializeBuffer):
2303         (WebCore::Internals::setUsesOverlayScrollbars):
2304         (WebCore::Internals::isFromCurrentWorld): Deleted.
2305         * testing/Internals.h:
2306         * testing/Internals.idl:
2307
2308 2015-07-16  Keith Miller  <keith_miller@apple.com>
2309
2310         Remove leak of objects between isolated worlds on custom events, message events, and pop state events.
2311         https://bugs.webkit.org/show_bug.cgi?id=118884
2312
2313         Reviewed by Filip Pizlo.
2314
2315         Tests: fast/events/event-leak-objects.html
2316                fast/events/event-properties-gc.html
2317
2318         Fixes an issue where objects passed as certain properties of events could cross isolated worlds. This
2319         was fixed by checking that any object passed by an event must be serializable or originate from the same
2320         isolated world as the one it is currently being accessed in. In the case of MessageEvents and PopStateEvents we
2321         cache the values of the data and state properties, respectively, as they may be a deserialized object. In case
2322         an object was deserialized in a world with elevated privileges we also check the cached value is from the same
2323         world, if it is from a different world we recompute it. For testing purposes, I added a new function to Internals
2324         that determines whether a JSObject originated in the current world.
2325
2326         * CMakeLists.txt:
2327         * WebCore.xcodeproj/project.pbxproj:
2328         * bindings/js/DOMWrapperWorld.h:
2329         (WebCore::worldForDOMObject):
2330         * bindings/js/JSBindingsAllInOne.cpp:
2331         * bindings/js/JSCustomEventCustom.cpp: Copied from Source/WebCore/dom/CustomEvent.cpp.
2332         (WebCore::JSCustomEvent::detail):
2333         * bindings/js/JSMessageEventCustom.cpp:
2334         (WebCore::JSMessageEvent::data):
2335         * bindings/js/JSPopStateEventCustom.cpp:
2336         (WebCore::JSPopStateEvent::state):
2337         * dom/CustomEvent.cpp:
2338         (WebCore::CustomEvent::initCustomEvent):
2339         (WebCore::CustomEvent::trySerializeDetail):
2340         * dom/CustomEvent.h:
2341         * dom/CustomEvent.idl:
2342         * dom/MessageEvent.cpp:
2343         (WebCore::MessageEvent::initMessageEvent):
2344         (WebCore::MessageEvent::trySerializeData):
2345         * dom/MessageEvent.h:
2346         * dom/PopStateEvent.cpp:
2347         (WebCore::PopStateEvent::trySerializeState):
2348         * dom/PopStateEvent.h:
2349         * testing/Internals.cpp:
2350         (WebCore::Internals::isFromCurrentWorld):
2351         * testing/Internals.h:
2352         * testing/Internals.idl:
2353
2354 2015-07-16  Brady Eidson  <beidson@apple.com>
2355
2356         WebKit document.cookie mis-parsing.
2357         rdar://problem/21715050 and https://bugs.webkit.org/show_bug.cgi?id=146976
2358
2359         Reviewed by Sam Weinig.
2360
2361         * platform/network/cf/CookieJarCFNet.cpp:
2362         (WebCore::createCookies): Use new SPI if available.
2363         (WebCore::setCookiesFromDOM):
2364         * platform/spi/cf/CFNetworkSPI.h:
2365
2366 2015-07-15  Anders Carlsson  <andersca@apple.com>
2367
2368         Headers that use WEBCORE_EXPORT should include PlatformExportMacros.h
2369         https://bugs.webkit.org/show_bug.cgi?id=146984
2370
2371         Reviewed by Daniel Bates.
2372
2373         * contentextensions/DFA.h:
2374         * dom/ContextDestructionObserver.h:
2375         * dom/DeviceOrientationData.h:
2376         * dom/ExceptionCodePlaceholder.h:
2377         * editing/cocoa/HTMLConverter.h:
2378         * html/track/AudioTrack.h:
2379         * loader/FrameLoaderStateMachine.h:
2380         * loader/appcache/ApplicationCacheHost.h:
2381         * loader/cache/CachedResourceHandle.h:
2382         * platform/URL.h:
2383         * platform/animation/Animation.h:
2384         * platform/audio/AudioHardwareListener.h:
2385         * platform/audio/AudioSession.h:
2386         * platform/graphics/transforms/AffineTransform.h:
2387         * platform/network/Credential.h:
2388         * platform/network/CredentialBase.h:
2389         * platform/network/ResourceHandleClient.h:
2390         * platform/network/mac/AuthenticationMac.h:
2391
2392 2015-07-16  Joseph Pecoraro  <pecoraro@apple.com>
2393
2394         Web Inspector: update $$() to return an Array
2395         https://bugs.webkit.org/show_bug.cgi?id=146964
2396
2397         Reviewed by Brian Burg.
2398
2399         Test: inspector/console/command-line-api.html
2400
2401         * inspector/CommandLineAPIModuleSource.js:
2402         Update $$(...) to return an array.
2403         Also InjectedScriptHost.type was renamed to subtype
2404         a while ago.
2405
2406 2015-07-15  Tim Horton  <timothy_horton@apple.com>
2407
2408         Move indicator rect uniting code to TextIndicatorWindow instead of TextIndicator
2409         https://bugs.webkit.org/show_bug.cgi?id=146992
2410         <rdar://problem/21643094>
2411
2412         Reviewed by Daniel Bates.
2413
2414         Having to unite all the rects if any overlap is an implementation
2415         detail of the Mac TextIndicatorWindow presentation, not a fundamental
2416         property of TextIndicator.
2417
2418         Other TextIndicator presentations might be able to handle overlapping
2419         rects more effectively, so we shouldn't lose information unless we need to.
2420
2421         This also avoids having a second copy of some constants!
2422
2423         * page/TextIndicator.cpp:
2424         (WebCore::outsetIndicatorRectIncludingShadow): Deleted.
2425         (WebCore::textIndicatorsForTextRectsOverlap): Deleted.
2426         (WebCore::TextIndicator::TextIndicator): Deleted.
2427         * page/mac/TextIndicatorWindow.mm:
2428         (outsetIndicatorRectIncludingShadow):
2429         (textIndicatorsForTextRectsOverlap):
2430         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
2431
2432 2015-07-15  Ryuan Choi  <ryuan.choi@navercorp.com>
2433
2434         [CoordinatedGraphics] Remove setContentsScale from TiledBackingStore
2435         https://bugs.webkit.org/show_bug.cgi?id=146921
2436
2437         Reviewed by Gyuyoung Kim.
2438
2439         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2440         (WebCore::CoordinatedGraphicsLayer::createBackingStore):
2441         (WebCore::CoordinatedGraphicsLayer::updateContentBuffers):
2442         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
2443         (WebCore::TiledBackingStore::TiledBackingStore):
2444         (WebCore::TiledBackingStore::setContentsScale): Deleted.
2445         * platform/graphics/texmap/coordinated/TiledBackingStore.h:
2446
2447 2015-07-15  Sam Weinig  <sam@webkit.org>
2448
2449         Color match plug-ins
2450         <rdar://problem/21758722>
2451         https://bugs.webkit.org/show_bug.cgi?id=146987
2452
2453         Reviewed by Dean Jackson.
2454
2455         * platform/spi/cocoa/QuartzCoreSPI.h:
2456         Add colorMatchUntaggedContent property.
2457
2458 2015-07-15  Brent Fulgham  <bfulgham@apple.com>
2459
2460         [Win] Another build fix after r186858.
2461
2462         * html/canvas/DOMPath.h: Don't use WEBCORE_EXPORT on the
2463         overall class and the destructor declaration.
2464
2465 2015-07-15  Dean Jackson  <dino@apple.com>
2466
2467         Tag WebGL layers with sRGB colorspace
2468         https://bugs.webkit.org/show_bug.cgi?id=146986
2469         <rdar://problem/21758704>
2470
2471         Fix the build on older El Capitan releases.
2472
2473         * platform/graphics/mac/WebGLLayer.mm:
2474         (-[WebGLLayer initWithGraphicsContext3D:]):
2475         * platform/spi/cocoa/QuartzCoreSPI.h:
2476
2477 2015-07-15  Dean Jackson  <dino@apple.com>
2478
2479         Tag WebGL layers with sRGB colorspace
2480         https://bugs.webkit.org/show_bug.cgi?id=146986
2481         <rdar://problem/21758704>
2482
2483         Reviewed by Simon Fraser.
2484
2485         Label a CAOpenGLLayer as using the sRGB colorspace,
2486         like the rest of our page content.
2487
2488         Test: fast/canvas/webgl/match-page-color-space.html
2489
2490         * platform/graphics/mac/WebGLLayer.mm:
2491         (-[WebGLLayer initWithGraphicsContext3D:]): Set the colorspace property on the layer.
2492         (-[WebGLLayer copyCGLPixelFormatForDisplayMask:]):
2493         (-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]):
2494         (-[WebGLLayer copyImageSnapshotWithColorSpace:]):
2495
2496 2015-07-15  Brent Fulgham  <bfulgham@apple.com>
2497
2498         [Win] Unreviewed build fix after r186858.
2499
2500         Add missing DOMPath and PathUtilities files to project.
2501
2502         * WebCore.vcxproj/WebCore.vcxproj:
2503         * WebCore.vcxproj/WebCore.vcxproj.filters:
2504
2505 2015-07-15  Anders Carlsson  <andersca@apple.com>
2506
2507         Headers that look for NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES should import NSGeometry.h
2508         https://bugs.webkit.org/show_bug.cgi?id=146982
2509
2510         Reviewed by Tim Horton.
2511
2512         * platform/graphics/FloatPoint.h:
2513         * platform/graphics/IntPoint.h:
2514         * platform/graphics/IntSize.h:
2515
2516 2015-07-15  Wenson Hsieh  <wenson_hsieh@apple.com>
2517
2518         Scroll snapping to elements is broken for main frame scrolling
2519         https://bugs.webkit.org/show_bug.cgi?id=146957
2520
2521         Reviewed by Brent Fulgham.
2522
2523         Fixes the case of elements with scroll snap coordinates in a scroll snapping mainframe by changing
2524         RenderBox::findEnclosingScrollableContainer to return the body's RenderBox when all enclosing elements
2525         are not overflow scrollable but the mainframe can scroll.
2526
2527         Test: css3/scroll-snap/scroll-snap-coordinate-mainframe.html
2528
2529         * page/FrameView.h: Export isScrollable so that the Internals API can use it.
2530         * rendering/RenderBox.cpp: Include MainFrame.h.
2531         (WebCore::RenderBox::findEnclosingScrollableContainer): Changed to return the body's RenderBox if
2532             none of its parent elements are overflow scrolling.
2533         * testing/Internals.cpp:
2534         (WebCore::Internals::scrollSnapOffsets): Updated to return snap offsets for the body element,
2535             allowing us to call window.internals.scrollSnapOffsets(document.body).
2536
2537 2015-07-15  Brady Eidson  <beidson@apple.com>
2538
2539         WebKit document.cookie mis-parsing.
2540         rdar://problem/21715050 and https://bugs.webkit.org/show_bug.cgi?id=146976
2541
2542         Reviewed by Sam Weinig.
2543
2544         * platform/network/mac/CookieJarMac.mm:
2545         (WebCore::setCookiesFromDOM): Use new CFNetwork SPI when available.
2546
2547 2015-07-15  Jinyoung Hur  <hur.ims@navercorp.com>
2548
2549         [WinCairo] font fallback not working
2550         https://bugs.webkit.org/show_bug.cgi?id=146595
2551
2552         Reviewed by Myles C. Maxfield.
2553
2554         A Win32 API, GetGlyphIndices(), is not used properly, so any glyphs are considered existing in a font and it prevents the font fall back mechanism from working.
2555
2556         I think a specific font should be newly installed on the test machine to test this case but I have no idea how can it be done.
2557
2558         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
2559         (WebCore::GlyphPage::fill):
2560
2561 2015-07-15  Tim Horton  <timothy_horton@apple.com>
2562
2563         Factor rect shrink-wrapping code out of RenderThemeMac for future reuse
2564         https://bugs.webkit.org/show_bug.cgi?id=146973
2565         <rdar://problem/21643094>
2566
2567         Reviewed by Anders Carlsson.
2568
2569         Test: fast/shrink-wrap/rect-shrink-wrap.html
2570
2571         * WebCore.xcodeproj/project.pbxproj:
2572         Add DOMPath.cpp and PathUtilities.{h, cpp}.
2573
2574         * bindings/js/JSDOMBinding.h:
2575         (WebCore::NativeValueTraits<double>::nativeValue):
2576         Make it possible to use sequence<double> in IDL files.
2577
2578         * bindings/scripts/CodeGeneratorJS.pm:
2579         Export JSDOMPath for use in Internals.
2580
2581         * html/canvas/DOMPath.cpp: Added.
2582         (WebCore::DOMPath::~DOMPath):
2583         * html/canvas/DOMPath.h:
2584         Out-of-line the DOMPath destructor so as not to anger the bindings
2585         integrity checker (otherwise, the address of the DOMPath destructor
2586         is different in WebCoreTestSupport and WebCore, causing us to fail
2587         the vtable equality test).
2588
2589         * platform/graphics/Path.h:
2590         Forward declare FloatRect instead of including it unnecessarily.
2591         Export ensurePlatformPath().
2592
2593         * platform/graphics/PathUtilities.cpp: Added.
2594         (WebCore::addShrinkWrapRightCorner):
2595         (WebCore::addShrinkWrapLeftCorner):
2596         (WebCore::addShrinkWrappedPathForRects):
2597         These parts are extracted from RenderThemeMac, with two changes:
2598             + support for arbitrarily-aligned rects
2599               (the other version assumed they were horizontally center-aligned)
2600             + support for overlapping rects
2601               (the other version assumed they touched but did not overlap)
2602
2603         There are still things missing:
2604             + support for a fallback when the shape is too hard to shrink-wrap
2605
2606         And things broken:
2607             + if the distance between two edges is smaller than the corner radius,
2608               we'll end up with a sharp edge in the path
2609
2610         Both of these cases are covered in the layout test and can be improved.
2611
2612         (WebCore::rectsIntersectOrTouch):
2613         Rect intersection with <= instead of <.
2614
2615         (WebCore::contiguousRectGroupsFromRects):
2616         Given a set of rects, find all of the contiguous regions. We'll
2617         shrink-wrap each region independently.
2618
2619         (WebCore::PathUtilities::pathWithShrinkWrappedRects):
2620         * platform/graphics/PathUtilities.h: Added.
2621         Add PathUtilities, where the shrink-wrapping code lives.
2622
2623         * rendering/RenderThemeMac.mm:
2624         (WebCore::paintAttachmentTitleBackground):
2625         (WebCore::addAttachmentTitleBackgroundRightCorner): Deleted.
2626         (WebCore::addAttachmentTitleBackgroundLeftCorner): Deleted.
2627         Remove shrink-wrapping implementation and make use of the one in PathUtilities.
2628
2629         * testing/Internals.cpp:
2630         (WebCore::Internals::pathWithShrinkWrappedRects):
2631         * testing/Internals.h:
2632         * testing/Internals.idl:
2633         Expose pathWithShrinkWrappedRects to tests via Internals.
2634         It takes a sequence<double> where every four values are the x, y, w, h
2635         of a rect, and returns a DOMPath which can be used with Canvas.
2636
2637 2015-07-15  Enrica Casucci  <enrica@apple.com>
2638
2639         [iOS] Should look for RTF and RTFD pasteboard types before plain text.
2640         https://bugs.webkit.org/show_bug.cgi?id=146971
2641         rdar://problem/21840845
2642
2643         Reviewed by Sam Weinig.
2644
2645         The list of pasteboard types returned by supportedPasteboardTypes
2646         determines the order in which WebKit looks for data in the pasteboard
2647         to create a fragment. The incorrect order could make plain text to
2648         be preferred over rich format.
2649
2650         * platform/ios/PasteboardIOS.mm:
2651         (WebCore::Pasteboard::supportedPasteboardTypes):
2652
2653 2015-07-15  Anders Carlsson  <andersca@apple.com>
2654
2655         Private headers that include project headers should also be project headers
2656         https://bugs.webkit.org/show_bug.cgi?id=146974
2657
2658         Reviewed by Dan Bernstein.
2659
2660         Since these headers can't be included by WebKit anyway they shouldn't be installed.
2661
2662         * WebCore.xcodeproj/project.pbxproj:
2663
2664 2015-07-15  Eric Carlson  <eric.carlson@apple.com>
2665
2666         [Mac] AirPlay route is not always set automatically
2667         https://bugs.webkit.org/show_bug.cgi?id=146969
2668
2669         Reviewed by Jer Noble.
2670
2671         * Modules/mediasession/WebMediaSessionManager.cpp:
2672         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Return early if there are
2673           no clients. Make the first client in the vector automatically play to the target if there
2674           is no other match and there is an active route.
2675         (WebCore::WebMediaSessionManager::watchdogTimerFired): Call picker.invalidatePlaybackTargets,
2676           not stopMonitoringPlaybackTargets.
2677
2678         * platform/graphics/MediaPlaybackTargetPicker.cpp:
2679         (WebCore::MediaPlaybackTargetPicker::invalidatePlaybackTargets): New.
2680         * platform/graphics/MediaPlaybackTargetPicker.h:
2681
2682         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
2683         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2684         (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets): Do nothing, AirPlay
2685           automatically stops monitoring when appropriate and release the picker also releases
2686           the output context, which drops the route.
2687         (WebCore::MediaPlaybackTargetPickerMac::invalidatePlaybackTargets): New.
2688
2689 2015-07-15  Anders Carlsson  <andersca@apple.com>
2690
2691         Remove forwarding headers that no longer point to valid headers
2692         https://bugs.webkit.org/show_bug.cgi?id=146972
2693
2694         Reviewed by Tim Horton.
2695
2696         * ForwardingHeaders/heap/AllocationSpace.h: Removed.
2697         * ForwardingHeaders/runtime/IntegralTypedArrayBase.h: Removed.
2698         * ForwardingHeaders/runtime/PrototypeFunction.h: Removed.
2699         * ForwardingHeaders/runtime/StorageBarrier.h: Removed.
2700         * ForwardingHeaders/runtime/TypedArrayBase.h: Removed.
2701
2702 2015-07-15  Wenson Hsieh  <wenson_hsieh@apple.com>
2703
2704         Negative scroll snap repeat values cause web process to hang indefinitely
2705         https://bugs.webkit.org/show_bug.cgi?id=146953
2706         <rdar://problem/21823681>
2707
2708         Reviewed by Simon Fraser.
2709
2710         Fixed dangerous behavior caused by setting -scroll-snap-points-x or -y to negative or very small
2711         positive values. In the case of negative or 0 repeats, the web process would hang indefinitely. In
2712         the case of very small positive values, a massive amount of memory could potentially be allocated
2713         just to store snap offsets.
2714
2715         Tests: css3/scroll-snap/scroll-snap-negative-repeat.html
2716                css3/scroll-snap/scroll-snap-subpixel-repeat.html
2717
2718         * css/CSSParser.cpp:
2719         (WebCore::CSSParser::parseNonElementSnapPoints): Changed to consider negative snap repeat values as invalid CSS.
2720         * page/scrolling/AxisScrollSnapOffsets.cpp:
2721         (WebCore::updateFromStyle): Changed to threshold non-negative snap repeat values to 1px.
2722
2723 2015-07-14  Dean Jackson  <dino@apple.com>
2724
2725         Placeholder colors should be system grays
2726         https://bugs.webkit.org/show_bug.cgi?id=146955
2727         <rdar://problem/21774358>
2728
2729         Reviewed by Sam Weinig.
2730
2731         Update the PiP and Airplay placards to use the correct shades
2732         of gray.
2733
2734         * Modules/mediacontrols/mediaControlsApple.css: No need to specify the
2735         font here, nor have rules for Picture in Picture, which isn't available
2736         on OS X.
2737         (audio::-webkit-media-controls-time-remaining-display): We should specify
2738         font style here.
2739         (video:-webkit-full-screen::-webkit-media-controls-panel): Drive-by cleanup.
2740         (audio::-webkit-media-controls-wireless-playback-status): Use a gray background
2741         and system gray for text and artwork.
2742         (audio::-webkit-media-controls-wireless-playback-status.small): Ditto.
2743         (audio::-webkit-media-controls-picture-in-picture-button): Deleted (not on OS X).
2744         (audio::-webkit-media-controls-wireless-playback-text-top): Deleted use of background color.
2745         (audio::-webkit-media-controls-wireless-playback-text-bottom): Ditto..
2746
2747         * Modules/mediacontrols/mediaControlsiOS.css: Use a gray background
2748         and system gray for text and artwork.
2749         (audio::-webkit-media-controls-wireless-playback-status):
2750         (audio::-webkit-media-controls-wireless-playback-text-top):
2751         (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
2752
2753 2015-07-14  Hunseop Jeong  <hs85.jeong@samsung.com>
2754
2755         [EFL] Scrollbar is not drawn on MiniBrowser.
2756         https://bugs.webkit.org/show_bug.cgi?id=143566
2757
2758         Reviewed by Gyuyoung Kim.
2759
2760         Implement the ScrollbarThemeEfl to draw the scrollbar on EFL port.
2761
2762         * PlatformEfl.cmake: Removed the ScrollbarEfl.cpp.
2763
2764         * platform/Scrollbar.cpp: Removed the !PLATFORM(EFL) guard to use the createNativeScrollbar().
2765
2766         * platform/efl/DefaultTheme/CMakeLists.txt: Replaced the image files with new ones.
2767
2768         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar.edc:
2769         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_horizontal.png: Added.
2770         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_vertical.png: Added.
2771         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png: Removed.
2772         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png: Removed.
2773         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png: Removed.
2774         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_horizontal.png: Added.
2775         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_vertical.png: Added.
2776         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png: Removed.
2777         * platform/efl/RenderThemeEfl.cpp:
2778         (WebCore::toEdjeGroup):
2779         (WebCore::RenderThemeEfl::paintThemePart): Added the new function to draw the scrollbar
2780           using the RenderThemeEfl.
2781
2782         * platform/efl/RenderThemeEfl.h:
2783         * platform/efl/ScrollbarEfl.cpp: Removed.
2784         * platform/efl/ScrollbarEfl.h: Removed.
2785         * platform/efl/ScrollbarThemeEfl.cpp: Implemented the default functions to draw the
2786           scrollbar.
2787         (WebCore::scrollbarMap):
2788         (WebCore::ScrollbarThemeEfl::~ScrollbarThemeEfl):
2789         (WebCore::ScrollbarThemeEfl::scrollbarThickness):
2790         (WebCore::ScrollbarThemeEfl::hasThumb):
2791         (WebCore::ScrollbarThemeEfl::backButtonRect):
2792         (WebCore::ScrollbarThemeEfl::forwardButtonRect):
2793         (WebCore::ScrollbarThemeEfl::trackRect):
2794         (WebCore::ScrollbarThemeEfl::minimumThumbLength):
2795         (WebCore::ScrollbarThemeEfl::paintTrackBackground):
2796         (WebCore::ScrollbarThemeEfl::paintThumb):
2797         (WebCore::ScrollbarThemeEfl::registerScrollbar):
2798         (WebCore::ScrollbarThemeEfl::unregisterScrollbar):
2799         (WebCore::ScrollbarThemeEfl::loadThemeIfNeeded):
2800         * platform/efl/ScrollbarThemeEfl.h:
2801         (WebCore::ScrollbarThemeEfl::usesOverlayScrollbars):
2802
2803 2015-07-14  Andreas Kling  <akling@apple.com>
2804
2805         Don't persist history item tree for subframes across reloads.
2806         <https://webkit.org/b/146937>
2807         <rdar://problem/19925709>
2808
2809         Reviewed by Brady Eidson.
2810
2811         Throw away the subframe history items when reloading a page. This ensures that we
2812         don't accumulate outdated frame metadata when subframes change name across page loads.
2813         Since the history item tree is encoded in the UA session state and gets serialized to
2814         disk, it's important that we don't let it grow unbounded.
2815
2816         * loader/HistoryController.cpp:
2817         (WebCore::HistoryController::updateForReload):
2818
2819 2015-07-14  Antti Koivisto  <antti@apple.com>
2820
2821         REGRESSION (r177876): store.apple.com profile and cart icons are missing
2822         https://bugs.webkit.org/show_bug.cgi?id=146894
2823
2824         Reviewed by Myles C. Maxfield.
2825
2826         If we had several @font-face rules for the same face covering overlapping ranges we
2827         would only try to get glyphs from the first one. If it didn't have the glyph we wouldn't
2828         try the other ones.
2829
2830         Test: fast/css/font-face-multiple-missing-glyphs.html
2831
2832         * platform/graphics/FontCascadeFonts.cpp:
2833         (WebCore::FontCascadeFonts::glyphDataForVariant):
2834         (WebCore::FontCascadeFonts::glyphDataForNormalVariant):
2835
2836             Get GlyphData with one call.
2837
2838         * platform/graphics/FontRanges.cpp:
2839         (WebCore::FontRanges::~FontRanges):
2840         (WebCore::FontRanges::glyphDataForCharacter):
2841
2842             Check that we actually have a glyph in the font for the character before returning it.
2843
2844         (WebCore::FontRanges::fontForCharacter):
2845         (WebCore::FontRanges::fontForFirstRange):
2846         * platform/graphics/FontRanges.h:
2847         (WebCore::FontRanges::size):
2848         (WebCore::FontRanges::rangeAt):
2849
2850 2015-07-14  Wenson Hsieh  <wenson_hsieh@apple.com>
2851
2852         Fix the 32 bit build after r186817
2853         https://bugs.webkit.org/show_bug.cgi?id=146947
2854
2855         Changed CGRect to NSRect.
2856
2857         Reviewed by Simon Fraser.
2858
2859         * platform/mac/ThemeMac.mm:
2860         (WebCore::paintButton):
2861
2862 2015-07-14  Anders Carlsson  <andersca@apple.com>
2863
2864         Remove wkPopupMenu from WebCoreSystemInterface; it's not called from WebCore
2865         https://bugs.webkit.org/show_bug.cgi?id=146945
2866
2867         Reviewed by Tim Horton.
2868
2869         * platform/mac/WebCoreSystemInterface.h:
2870
2871 2015-07-14  Wenson Hsieh  <wenson_hsieh@apple.com>
2872
2873         Input buttons rendered at the wrong size when pinching-to-zoom
2874         https://bugs.webkit.org/show_bug.cgi?id=146916
2875
2876         Reviewed by Dean Jackson.
2877
2878         Scales buttons and their focus rects up when pinching to zoom by painting to an offscreen ImageBuffer which is
2879         then scaled and painted onto the display.
2880
2881         * platform/Theme.h: Modified signature of Theme::paint.
2882         (WebCore::Theme::paint): Added plumbing necessary to send the device and page scale factors to paintButton.
2883         * platform/mac/ThemeMac.h: Modified signature of paintButton.
2884         * platform/mac/ThemeMac.mm: Added ImageBuffer.h header.
2885         (WebCore::buttonFocusRectOutlineWidth): Represents the width of the focus rect of a button. Used by paintButton
2886             to determine the size of the ImageBuffer required to draw a focus rect.
2887         (WebCore::paintButton): Changed to paint button cells and the focus rect, if applicable, to a temporary ImageBuffer
2888             before painting the ImageBuffer onto the view. Refactored to receive a deviceScaleFactor and page scale factor,
2889             used when painting to the ImageBuffer.
2890         (WebCore::ThemeMac::paint): Added plumbing necessary to send the device and page scale factors to paintButton.
2891         * rendering/RenderTheme.cpp: Modified signature of RenderTheme::paint.
2892         (WebCore::RenderTheme::paint): Added plumbing necessary to send the device and page scale factors to paintButton.
2893
2894 2015-07-14  Commit Queue  <commit-queue@webkit.org>
2895
2896         Unreviewed, rolling out r186809.
2897         https://bugs.webkit.org/show_bug.cgi?id=146943
2898
2899         Caused about 190 layout test failures. (Requested by mlam_ on
2900         #webkit).
2901
2902         Reverted changeset:
2903
2904         "REGRESSION (r177876): store.apple.com profile and cart icons
2905         are missing"
2906         https://bugs.webkit.org/show_bug.cgi?id=146894
2907         http://trac.webkit.org/changeset/186809
2908
2909 2015-07-14  Antti Koivisto  <antti@apple.com>
2910
2911         REGRESSION (r177876): store.apple.com profile and cart icons are missing
2912         https://bugs.webkit.org/show_bug.cgi?id=146894
2913
2914         Reviewed by Myles C. Maxfield.
2915
2916         If we had several @font-face rules for the same face covering overlapping ranges we
2917         would only try to get glyphs from the first one. If it didn't have the glyph we wouldn't
2918         try the other ones.
2919
2920         Test: fast/css/font-face-multiple-missing-glyphs.html
2921
2922         * platform/graphics/FontCascadeFonts.cpp:
2923         (WebCore::FontCascadeFonts::glyphDataForVariant):
2924         (WebCore::FontCascadeFonts::glyphDataForNormalVariant):
2925
2926             Get GlyphData with one call.
2927
2928         * platform/graphics/FontRanges.cpp:
2929         (WebCore::FontRanges::~FontRanges):
2930         (WebCore::FontRanges::glyphDataForCharacter):
2931
2932             Check that we actually have a glyph in the font for the character before returning it.
2933
2934         (WebCore::FontRanges::fontForCharacter):
2935         (WebCore::FontRanges::fontForFirstRange):
2936         * platform/graphics/FontRanges.h:
2937         (WebCore::FontRanges::size):
2938         (WebCore::FontRanges::rangeAt):
2939
2940 2015-07-14  Alex Christensen  <achristensen@webkit.org>
2941
2942         [Content Extensions] Fix if-domain and unless-domain when loading main documents.
2943         https://bugs.webkit.org/show_bug.cgi?id=146868
2944
2945         Reviewed by Benjamin Poulain.
2946
2947         Tests: http/tests/contentextensions/block-everything-if-domain.html
2948                http/tests/contentextensions/block-everything-unless-domain-iframe.html
2949                http/tests/contentextensions/block-everything-unless-domain-redirect.php
2950                http/tests/contentextensions/block-everything-unless-domain.html
2951
2952         * contentextensions/ContentExtensionsBackend.cpp:
2953         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
2954         If we are loading a new main document, use that main document url as the main document url for domain comparison.
2955
2956 2015-07-05  Sam Weinig  <sam@webkit.org>
2957
2958         DOM4: prepend, append, before, after & replace
2959         https://bugs.webkit.org/show_bug.cgi?id=74648
2960
2961         Reviewed by Darin Adler.
2962
2963         - Adds support for ChildNode.before/after/replaceWith and ParentNode.prepend/append
2964           which are new functions in https://dom.spec.whatwg.org
2965         - Uses custom bindings rather than implementing support for union types in the code
2966           generator as their uses seems isolated to just this spec at the moment. If more
2967           uses come along, we should implement proper support for them in the generator and
2968           remove the custom bindings added here.
2969
2970         Tests: fast/dom/ChildNode-after.html
2971                fast/dom/ChildNode-before.html
2972                fast/dom/ChildNode-replaceWith.html
2973                fast/dom/ParentNode-append.html
2974                fast/dom/ParentNode-prepend.html
2975
2976         * CMakeLists.txt:
2977         * WebCore.vcxproj/WebCore.vcxproj:
2978         * WebCore.xcodeproj/project.pbxproj:
2979         * bindings/js/JSBindingsAllInOne.cpp:
2980         Add new files.
2981
2982         * bindings/js/JSCharacterDataCustom.cpp: Added.
2983         (WebCore::JSCharacterData::before):
2984         (WebCore::JSCharacterData::after):
2985         (WebCore::JSCharacterData::replaceWith):
2986         * bindings/js/JSDocumentCustom.cpp:
2987         (WebCore::JSDocument::prepend):
2988         (WebCore::JSDocument::append):
2989         (WebCore::JSDocument::createTouchList):
2990         * bindings/js/JSDocumentFragmentCustom.cpp: Added.
2991         (WebCore::JSDocumentFragment::prepend):
2992         (WebCore::JSDocumentFragment::append):
2993         * bindings/js/JSDocumentTypeCustom.cpp: Added.
2994         (WebCore::JSDocumentType::before):
2995         (WebCore::JSDocumentType::after):
2996         (WebCore::JSDocumentType::replaceWith):
2997         * bindings/js/JSElementCustom.cpp:
2998         (WebCore::toJSNewlyCreated):
2999         (WebCore::JSElement::before):
3000         (WebCore::JSElement::after):
3001         (WebCore::JSElement::replaceWith):
3002         (WebCore::JSElement::prepend):
3003         (WebCore::JSElement::append):
3004         Add custom bindings to implement the use of variadic union types.
3005
3006         * bindings/js/JSNodeOrString.cpp: Added.
3007         (WebCore::toNodeOrStringVector):
3008         * bindings/js/JSNodeOrString.h: Added.
3009         Adds a help function for converting an JS argument list into a Vector
3010         of NodeOrString objects.
3011
3012         * dom/ChildNode.idl:
3013         Expose before/after/replaceWith to JavaScript.
3014
3015         * dom/ContainerNode.cpp:
3016         (WebCore::ContainerNode::append):
3017         (WebCore::ContainerNode::prepend):
3018         * dom/ContainerNode.h:
3019         Add implementations of append and prepend.
3020
3021         * dom/Node.h:
3022         * dom/Node.cpp:
3023         (WebCore::nodeSetPreTransformedFromNodeOrStringVector):
3024         (WebCore::firstPrecedingSiblingNotInNodeSet):
3025         (WebCore::firstFollowingSiblingNotInNodeSet):
3026         Helper functions for before, after and removeWith.
3027
3028         (WebCore::Node::before):
3029         (WebCore::Node::after):
3030         (WebCore::Node::replaceWith):
3031         Add implementations of before, after and removeWith.
3032
3033         * dom/NodeOrString.cpp: Added.
3034         (WebCore::convertNodesOrStringsIntoNode):
3035         * dom/NodeOrString.h: Added.
3036         (WebCore::NodeOrString::NodeOrString):
3037         (WebCore::NodeOrString::~NodeOrString):
3038         (WebCore::NodeOrString::type):
3039         (WebCore::NodeOrString::node):
3040         (WebCore::NodeOrString::string):
3041         Custom union type representing the (Node or DOMString) IDL type.
3042
3043         * dom/ParentNode.idl:
3044         Expose append/prepend to JavaScript.
3045
3046 2015-07-13  Brent Fulgham  <bfulgham@apple.com>
3047
3048         [Win] Unreviewed build fix.
3049
3050         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
3051         (WebCore::InbandTextTrackPrivateAVCF::readNativeSampleBuffer): Don't try to build
3052         the new Legible Output API features if they aren't available in the build
3053         environment.
3054
3055 2015-07-13  Brent Fulgham  <bfulgham@apple.com>
3056
3057         [Win] Update Media Player logic for new Legible Output API
3058         https://bugs.webkit.org/show_bug.cgi?id=146922
3059         <rdar://problem/20542574>
3060
3061         Reviewed by Eric Carlson.
3062
3063         * AVFoundationSupport.py: Check for updated AVFCF feature.
3064         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
3065         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Update to call the
3066         new 'readNativeSampleBuffer' method.
3067         (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): Added. This is a no-op
3068         on Windows if it has the new AVCF API. Otherwise, it contains the same implementation
3069         that has always been used in 'processNativeSamples'.
3070         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
3071         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
3072         (WebCore::InbandTextTrackPrivateAVCF::readNativeSampleBuffer): Added. Use the new
3073         Legible Output API instead of the old CoreMedia solution if it is available.
3074         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:
3075         (WebCore::InbandTextTrackPrivateAVCF::mediaSelectionOption):
3076         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp:
3077         (WebCore::InbandTextTrackPrivateLegacyAVCF::readNativeSampleBuffer): Add a stub implementation.
3078         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.h:
3079         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3080         (WebCore::AVFWrapper::createPlayerItem): Use the new Legible Output API if it is available.
3081
3082 2015-07-13  Matt Rajca  <mrajca@apple.com>
3083
3084         Media Session: add plumbing for delivering start/end-of-interruption events
3085         https://bugs.webkit.org/show_bug.cgi?id=146837
3086
3087         Reviewed by Tim Horton.
3088
3089         * Modules/mediasession/MediaSessionEvents.h: Renamed from MediaEventTypes.h and added new constants for
3090           interruption events.
3091         * WebCore.xcodeproj/project.pbxproj: Renamed MediaEventTypes.h.
3092         * page/Page.h: Added stub.
3093         * page/Page.cpp: Added stub.
3094
3095 2015-07-13  Simon Fraser  <simon.fraser@apple.com>
3096
3097         [iOS WK2] When choosing an initial viewport scale, take overflow on the <body> into account
3098         https://bugs.webkit.org/show_bug.cgi?id=146918
3099         rdar://problem/9222837
3100
3101         Reviewed by Tim Horton.
3102
3103         Use as input to the viewport scaling algorithm a contents size from the FrameView
3104         that takes overflow on the viewport renderer into account. This prevents unexpected
3105         viewports scaling on pages that have content that overflows their expressed contents size,
3106         but apply overflow to the <body>.
3107
3108         * page/FrameView.cpp:
3109         (WebCore::FrameView::contentsSizeRespectingOverflow): Look for overflow:hidden on each axis of
3110         the m_viewportRenderer, which is computed post-layout by calculateScrollbarModesForLayout()
3111         and is used for scrollbar logic on OS X. Clip unscaledDocumentRect on each axis, and then
3112         apply page scale.
3113         * page/FrameView.h:
3114
3115 2015-07-13  Brent Fulgham  <bfulgham@apple.com>
3116
3117         Update WebCore Features.json
3118         https://bugs.webkit.org/show_bug.cgi?id=146914
3119
3120         Reviewed by Benjamin Poulain.
3121
3122         * features.json: Update with notes for CSS Scroll Snap Points, Filter Effects,
3123         backdrop-filters, and initial-letter.
3124
3125 2015-07-13  Matthew Daiter  <mdaiter@apple.com>
3126
3127         Change MediaPlayer Media Stream method signatures to use references
3128         https://bugs.webkit.org/show_bug.cgi?id=146839
3129         <rdar://problem/21769035>
3130
3131         Reviewed by Darin Adler.
3132
3133         * platform/graphics/MediaPlayer.cpp:
3134         (WebCore::MediaPlayer::loadWithNextMediaEngine):
3135         * platform/graphics/MediaPlayerPrivate.h: Changed to references
3136         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
3137         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3138         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3139         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): Ditto
3140         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3141         (WebCore::MediaPlayerPrivateGStreamer::load): Ditto
3142         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3143         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3144         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
3145
3146 2015-07-13  Carlos Alberto Lopez Perez  <clopez@igalia.com>
3147
3148         GTK] Build race with -DENABLE_WAYLAND_TARGET=ON
3149         https://bugs.webkit.org/show_bug.cgi?id=146740
3150
3151         Reviewed by Martin Robinson.
3152
3153         No new tests, no behavior changes.
3154
3155         * PlatformGTK.cmake: platform/graphics/wayland sources should be
3156         included into WebCore source list instead of WebCorePlatformGTK.
3157         Also move the add_custom_command() block into if(ENABLE_WAYLAND_TARGET),
3158         this is not strictly needed to fix this bug, but it seems cleaner.
3159
3160 2015-07-13  Matthew Daiter  <mdaiter@apple.com>
3161
3162         Adding MediaStream Engine building blocks to the code repo
3163         https://bugs.webkit.org/show_bug.cgi?id=146789
3164         <rdar://problem/21747025>
3165
3166         Reviewed by Brent Fulgham.
3167
3168         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: Added.
3169         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setLoadingProgresssed):
3170         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setHasAvailableVideoFrame):
3171         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createWeakPtr):
3172         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: Added.
3173         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
3174         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
3175         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::registerMediaEngine):
3176         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
3177         (WebCore::mimeTypeCache):
3178         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::getSupportedTypes):
3179         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsType):
3180         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load):
3181         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::cancelLoad):
3182         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareToPlay):
3183         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformMedia):
3184         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer):
3185         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play):
3186         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::playInternal):
3187         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause):
3188         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pauseInternal):
3189         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paused):
3190         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVolume):
3191         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsScanning):
3192         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setMuted):
3193         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::naturalSize):
3194         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasVideo):
3195         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasAudio):
3196         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVisible):
3197         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::durationMediaTime):
3198         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seeking):
3199         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setRateDouble):
3200         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setPreservesPitch):
3201         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::networkState):
3202         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::readyState):
3203         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seekable):
3204         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::maxMediaTimeSeekable):
3205         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::minMediaTimeSeekable):
3206         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::buffered):
3207         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::didLoadingProgress):
3208         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setSize):
3209         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasAvailableVideoFrame):
3210         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsAcceleratedRendering):
3211         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::movieLoadType):
3212         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareForRendering):
3213         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::engineDescription):
3214         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::languageOfPrimaryAudioTrack):
3215         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::shouldBePlaying):
3216         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::addDisplayLayer):
3217         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::removeDisplayLayer):
3218         * platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.h: Added.
3219         * platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.mm: Added.
3220         (WebCore::MediaStreamPrivateAVFObjC::create):
3221         (WebCore::MediaStreamPrivateAVFObjC::MediaStreamPrivateAVFObjC):
3222         (WebCore::MediaStreamPrivateAVFObjC::~MediaStreamPrivateAVFObjC):
3223         (WebCore::MediaStreamPrivateAVFObjC::duration):
3224         (WebCore::MediaStreamPrivateAVFObjC::buffered):
3225         (WebCore::MediaStreamPrivateAVFObjC::readyState):
3226         (WebCore::MediaStreamPrivateAVFObjC::hasAudio):
3227         (WebCore::MediaStreamPrivateAVFObjC::hasVideo):
3228         (WebCore::MediaStreamPrivateAVFObjC::naturalSize):
3229         * platform/mediastream/MediaStreamPrivate.h: 
3230         (WebCore::MediaStreamPrivate::MediaStreamPrivate): Added constructor.
3231
3232 2015-07-13  Eric Carlson  <eric.carlson@apple.com>
3233
3234         [iOS] Cancel AirPlay explicitly when exiting from full screen
3235         https://bugs.webkit.org/show_bug.cgi?id=146902
3236         <rdar://problem/20923632>
3237
3238         Reviewed by Brent Fulgham.
3239
3240         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3241         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3242         (WebVideoFullscreenInterfaceAVKit::~WebVideoFullscreenInterfaceAVKit): Call setExternalPlayback(false)
3243           if playing to an external screen.
3244
3245 2015-07-12  Chris Fleizach  <cfleizach@apple.com>
3246
3247         AX: WEB: VoiceOver for iOS does not read <iframe> elements during linear (swipe) navigation.
3248         https://bugs.webkit.org/show_bug.cgi?id=146861
3249
3250         Reviewed by Darin Adler.
3251
3252         AttachmentViews exist only on WK1 so we need account for both platforms.
3253
3254         Test: platform/ios-simulator/accessibility/iframe-access.html
3255
3256         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3257         (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
3258
3259 2015-07-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3260
3261         [Streams API] Templating ReadableJSStream
3262         https://bugs.webkit.org/show_bug.cgi?id=146802
3263
3264         Reviewed by Darin Adler.
3265
3266         Introducing ReadableStream::clearValues to clear queued values when cancelling and going into error state.
3267
3268         Introducing ReadableEnqueuingStream to handle the stream queue, as a class template.
3269         Specialized ReadableEnqueuingStream for the purpose of ReadableJSStream (storage of JSValue with variable size).
3270
3271         Updated some static functions to accept a ReadableStream in lieu of the more specialized ReadableJSStream.
3272
3273         Covered by existing tests.
3274
3275         * Modules/streams/ReadableStream.cpp:
3276         (WebCore::ReadableStream::changeStateToErrored):
3277         (WebCore::ReadableStream::cancelNoCheck):
3278         * Modules/streams/ReadableStream.h:
3279         (WebCore::ReadableEnqueuingStream::ReadableEnqueuingStream):
3280         (WebCore::ReadableEnqueuingStream::enqueueChunk):
3281         (WebCore::ReadableEnqueuingStream<ChunkType>::read):
3282         * bindings/js/ReadableJSStream.cpp:
3283         (WebCore::ReadableEnqueuingStream<ReadableJSStreamValue>::read):
3284         (WebCore::ReadableEnqueuingStream<ReadableJSStreamValue>::enqueueChunk):
3285         (WebCore::createPullResultFulfilledFunction):
3286         (WebCore::createCancelResultFulfilledFunction):
3287         (WebCore::ReadableJSStream::ReadableJSStream):
3288         (WebCore::ReadableJSStream::enqueue):
3289         * bindings/js/ReadableJSStream.h:
3290         (WebCore::ReadableJSStreamValue::create):
3291         (WebCore::ReadableEnqueuingStream<ReadableJSStreamValue>::desiredSize):
3292         (WebCore::ReadableEnqueuingStream<ReadableJSStreamValue>::ReadableEnqueuingStream):
3293
3294 2015-07-11  Babak Shafiei  <bshafiei@apple.com>
3295
3296         Unreviewed build fix.
3297
3298         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3299         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
3300         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cancelLoad):
3301
3302 2015-07-11  Nikita Vasilyev  <nvasilyev@apple.com>
3303
3304         Web Inspector: Inspector should be able to be docked to the bottom of a narrow window
3305         https://bugs.webkit.org/show_bug.cgi?id=146871
3306
3307         Reviewed by Timothy Hatcher.
3308
3309         * inspector/InspectorFrontendClientLocal.cpp:
3310
3311 2015-07-11  Joseph Pecoraro  <pecoraro@apple.com>
3312
3313         Update default link action sheets for app links
3314         https://bugs.webkit.org/show_bug.cgi?id=146658
3315         <rdar://problem/21221902>
3316
3317         Reviewed by Dan Bernstein.
3318
3319         * English.lproj/Localizable.strings:
3320         * platform/spi/ios/LaunchServicesSPI.h:
3321
3322 2015-07-11  Benjamin Poulain  <benjamin@webkit.org>
3323
3324         Fix CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
3325         https://bugs.webkit.org/show_bug.cgi?id=146879
3326
3327         Reviewed by Andreas Kling.
3328
3329         Some of my recent changes broke CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING :(
3330
3331         * contentextensions/CombinedURLFilters.cpp:
3332         (WebCore::ContentExtensions::prefixTreeVertexToString):
3333         (WebCore::ContentExtensions::recursivePrint):
3334         (WebCore::ContentExtensions::CombinedURLFilters::print):
3335         * contentextensions/ContentExtensionsDebugging.h:
3336         * contentextensions/DFA.cpp:
3337         (WebCore::ContentExtensions::DFA::debugPrintDot):
3338
3339 2015-07-10  Simon Fraser  <simon.fraser@apple.com>
3340
3341         [iOS WK2] Scrolling issues on horizontally scrollable RTL pages
3342         https://bugs.webkit.org/show_bug.cgi?id=146872
3343         rdar://problem/7569416
3344
3345         Reviewed by Sam Weinig.
3346
3347         Horizontally scrollable RTL pages in WebKit2 had a variety of issues: they had
3348         a gap down the right edge, and unreachable content on the left side, focussing
3349         form fields scrolled to the wrong location, and programmatic scrolls scrolled
3350         to the wrong place.
3351         
3352         Fix by plumbing the WebCore notion of scrollOrigin through to the UI process,
3353         and using it in various places. There are three main aspects to the patch:
3354         
3355         1. scroll origin is included in RemoteLayerTreeTransaction, and plumbed through
3356            to -[WKWebView _scrollToContentOffset:] for correct programmatic scrolling,
3357            including zooming to focussed form elements.
3358         2. WebPageProxy::computeCustomFixedPositionRect() uses the actual documentRect()
3359            rather than just conjuring up a rect with a zero origin, which makes position:fixed
3360            work correctly.
3361         3. _interactionViewsContainerView (which hosts tap highlights) is positioned to 
3362            coincide with the origin of the documentRect (i.e. at the scroll origin, which
3363            may not be top-left). This allows tap highlights to show in the correct location.
3364         4. ScrollView::unobscuredContentRect() is fixed to take scroll origin into account;
3365            if the returned rect is wrong, RenderLayer::hitTest() incorrectly clips the hit
3366            testing area.
3367
3368         * platform/ios/ScrollViewIOS.mm:
3369         (WebCore::ScrollView::unobscuredContentRect):
3370
3371 2015-07-10  Chris Dumez  <cdumez@apple.com>
3372
3373         [WK2] Diagnostic logging messages are causing too much IPC
3374         https://bugs.webkit.org/show_bug.cgi?id=146873
3375         <rdar://problem/21779205>
3376
3377         Reviewed by Ryosuke Niwa.
3378
3379         Move shouldLogAfterSampling() utility function to DiagnosticLoggingClient
3380         so it can be easily reused.
3381
3382         * page/DiagnosticLoggingClient.h:
3383         (WebCore::DiagnosticLoggingClient::shouldLogAfterSampling):
3384
3385 2015-07-10  Daniel Bates  <dabates@apple.com>
3386
3387         Cleanup: Remove default constructor for WebCore::Pair()
3388         https://bugs.webkit.org/show_bug.cgi?id=146856
3389         <rdar://problem/21773212>
3390
3391         Reviewed by Darin Adler.
3392
3393         Remove default constructor for WebCore::Pair() and the setters Pair::set{First, Second}()
3394         since they are not used and it seems weird to keep the latter after the removal of the former.
3395         Should it turn out that we find a use for having a default constructor and/or setters then
3396         we can revert this change.
3397
3398         * css/Pair.h:
3399         (WebCore::Pair::create): Deleted.
3400         (WebCore::Pair::setFirst): Deleted.
3401         (WebCore::Pair::setSecond): Deleted.
3402         (WebCore::Pair::Pair): Deleted.
3403
3404 2015-07-10  Ryuan Choi  <ryuan.choi@navercorp.com>
3405
3406         [CoordinatedGraphics] Override primaryLayerID in CoordinatedGraphicsLayer
3407         https://bugs.webkit.org/show_bug.cgi?id=146826
3408
3409         Reviewed by Gyuyoung Kim.
3410
3411         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3412         (WebCore::CoordinatedGraphicsLayer::id): Moved id as inline function.
3413         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
3414         (WebCore::CoordinatedGraphicsLayer::id):
3415
3416 2015-07-10  Matthew Daiter  <mdaiter@apple.com>
3417
3418         Exposing webkitMediaStream as MediaStream
3419         https://bugs.webkit.org/show_bug.cgi?id=146813
3420         <rdar://problem/21754383>
3421
3422         Reviewed by Eric Carlson.
3423
3424         * Modules/mediastream/MediaStream.idl: Changed interface
3425         name from webkitMediaStream to MediaStream
3426
3427 2015-07-10  Nan Wang  <n_wang@apple.com>
3428
3429         Added ARIA 1.1 "cell" and "table" roles.
3430         https://bugs.webkit.org/show_bug.cgi?id=146011
3431         <rdar://problem/21398946>
3432
3433         Reviewed by Chris Fleizach.
3434
3435         Created a new role called GridCellRole to match the gridcell role, 
3436         so the previous CellRole and TableRole will match to cell and table role.
3437         Made the changes to make sure that both GridRole and TableRole have same
3438         behavior, as well as the circumstance for GridCellRole and CellRole.
3439
3440         Test: accessibility/roles-table-and-cell.html
3441
3442         * accessibility/AXObjectCache.cpp:
3443         (WebCore::createFromRenderer):
3444         * accessibility/AccessibilityNodeObject.cpp:
3445     &nbs