Tag WebGL layers with sRGB colorspace
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-07-15  Sam Weinig  <sam@webkit.org>
2
3         Color match plug-ins
4         <rdar://problem/21758722>
5         https://bugs.webkit.org/show_bug.cgi?id=146987
6
7         Reviewed by Dean Jackson.
8
9         * platform/spi/cocoa/QuartzCoreSPI.h:
10         Add colorMatchUntaggedContent property.
11
12 2015-07-15  Brent Fulgham  <bfulgham@apple.com>
13
14         [Win] Another build fix after r186858.
15
16         * html/canvas/DOMPath.h: Don't use WEBCORE_EXPORT on the
17         overall class and the destructor declaration.
18
19 2015-07-15  Dean Jackson  <dino@apple.com>
20
21         Tag WebGL layers with sRGB colorspace
22         https://bugs.webkit.org/show_bug.cgi?id=146986
23         <rdar://problem/21758704>
24
25         Fix the build on older El Capitan releases.
26
27         * platform/graphics/mac/WebGLLayer.mm:
28         (-[WebGLLayer initWithGraphicsContext3D:]):
29         * platform/spi/cocoa/QuartzCoreSPI.h:
30
31 2015-07-15  Dean Jackson  <dino@apple.com>
32
33         Tag WebGL layers with sRGB colorspace
34         https://bugs.webkit.org/show_bug.cgi?id=146986
35         <rdar://problem/21758704>
36
37         Reviewed by Simon Fraser.
38
39         Label a CAOpenGLLayer as using the sRGB colorspace,
40         like the rest of our page content.
41
42         Test: fast/canvas/webgl/match-page-color-space.html
43
44         * platform/graphics/mac/WebGLLayer.mm:
45         (-[WebGLLayer initWithGraphicsContext3D:]): Set the colorspace property on the layer.
46         (-[WebGLLayer copyCGLPixelFormatForDisplayMask:]):
47         (-[WebGLLayer drawInCGLContext:pixelFormat:forLayerTime:displayTime:]):
48         (-[WebGLLayer copyImageSnapshotWithColorSpace:]):
49
50 2015-07-15  Brent Fulgham  <bfulgham@apple.com>
51
52         [Win] Unreviewed build fix after r186858.
53
54         Add missing DOMPath and PathUtilities files to project.
55
56         * WebCore.vcxproj/WebCore.vcxproj:
57         * WebCore.vcxproj/WebCore.vcxproj.filters:
58
59 2015-07-15  Anders Carlsson  <andersca@apple.com>
60
61         Headers that look for NSGEOMETRY_TYPES_SAME_AS_CGGEOMETRY_TYPES should import NSGeometry.h
62         https://bugs.webkit.org/show_bug.cgi?id=146982
63
64         Reviewed by Tim Horton.
65
66         * platform/graphics/FloatPoint.h:
67         * platform/graphics/IntPoint.h:
68         * platform/graphics/IntSize.h:
69
70 2015-07-15  Wenson Hsieh  <wenson_hsieh@apple.com>
71
72         Scroll snapping to elements is broken for main frame scrolling
73         https://bugs.webkit.org/show_bug.cgi?id=146957
74
75         Reviewed by Brent Fulgham.
76
77         Fixes the case of elements with scroll snap coordinates in a scroll snapping mainframe by changing
78         RenderBox::findEnclosingScrollableContainer to return the body's RenderBox when all enclosing elements
79         are not overflow scrollable but the mainframe can scroll.
80
81         Test: css3/scroll-snap/scroll-snap-coordinate-mainframe.html
82
83         * page/FrameView.h: Export isScrollable so that the Internals API can use it.
84         * rendering/RenderBox.cpp: Include MainFrame.h.
85         (WebCore::RenderBox::findEnclosingScrollableContainer): Changed to return the body's RenderBox if
86             none of its parent elements are overflow scrolling.
87         * testing/Internals.cpp:
88         (WebCore::Internals::scrollSnapOffsets): Updated to return snap offsets for the body element,
89             allowing us to call window.internals.scrollSnapOffsets(document.body).
90
91 2015-07-15  Brady Eidson  <beidson@apple.com>
92
93         WebKit document.cookie mis-parsing.
94         rdar://problem/21715050 and https://bugs.webkit.org/show_bug.cgi?id=146976
95
96         Reviewed by Sam Weinig.
97
98         * platform/network/mac/CookieJarMac.mm:
99         (WebCore::setCookiesFromDOM): Use new CFNetwork SPI when available.
100
101 2015-07-15  Jinyoung Hur  <hur.ims@navercorp.com>
102
103         [WinCairo] font fallback not working
104         https://bugs.webkit.org/show_bug.cgi?id=146595
105
106         Reviewed by Myles C. Maxfield.
107
108         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.
109
110         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.
111
112         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
113         (WebCore::GlyphPage::fill):
114
115 2015-07-15  Tim Horton  <timothy_horton@apple.com>
116
117         Factor rect shrink-wrapping code out of RenderThemeMac for future reuse
118         https://bugs.webkit.org/show_bug.cgi?id=146973
119         <rdar://problem/21643094>
120
121         Reviewed by Anders Carlsson.
122
123         Test: fast/shrink-wrap/rect-shrink-wrap.html
124
125         * WebCore.xcodeproj/project.pbxproj:
126         Add DOMPath.cpp and PathUtilities.{h, cpp}.
127
128         * bindings/js/JSDOMBinding.h:
129         (WebCore::NativeValueTraits<double>::nativeValue):
130         Make it possible to use sequence<double> in IDL files.
131
132         * bindings/scripts/CodeGeneratorJS.pm:
133         Export JSDOMPath for use in Internals.
134
135         * html/canvas/DOMPath.cpp: Added.
136         (WebCore::DOMPath::~DOMPath):
137         * html/canvas/DOMPath.h:
138         Out-of-line the DOMPath destructor so as not to anger the bindings
139         integrity checker (otherwise, the address of the DOMPath destructor
140         is different in WebCoreTestSupport and WebCore, causing us to fail
141         the vtable equality test).
142
143         * platform/graphics/Path.h:
144         Forward declare FloatRect instead of including it unnecessarily.
145         Export ensurePlatformPath().
146
147         * platform/graphics/PathUtilities.cpp: Added.
148         (WebCore::addShrinkWrapRightCorner):
149         (WebCore::addShrinkWrapLeftCorner):
150         (WebCore::addShrinkWrappedPathForRects):
151         These parts are extracted from RenderThemeMac, with two changes:
152             + support for arbitrarily-aligned rects
153               (the other version assumed they were horizontally center-aligned)
154             + support for overlapping rects
155               (the other version assumed they touched but did not overlap)
156
157         There are still things missing:
158             + support for a fallback when the shape is too hard to shrink-wrap
159
160         And things broken:
161             + if the distance between two edges is smaller than the corner radius,
162               we'll end up with a sharp edge in the path
163
164         Both of these cases are covered in the layout test and can be improved.
165
166         (WebCore::rectsIntersectOrTouch):
167         Rect intersection with <= instead of <.
168
169         (WebCore::contiguousRectGroupsFromRects):
170         Given a set of rects, find all of the contiguous regions. We'll
171         shrink-wrap each region independently.
172
173         (WebCore::PathUtilities::pathWithShrinkWrappedRects):
174         * platform/graphics/PathUtilities.h: Added.
175         Add PathUtilities, where the shrink-wrapping code lives.
176
177         * rendering/RenderThemeMac.mm:
178         (WebCore::paintAttachmentTitleBackground):
179         (WebCore::addAttachmentTitleBackgroundRightCorner): Deleted.
180         (WebCore::addAttachmentTitleBackgroundLeftCorner): Deleted.
181         Remove shrink-wrapping implementation and make use of the one in PathUtilities.
182
183         * testing/Internals.cpp:
184         (WebCore::Internals::pathWithShrinkWrappedRects):
185         * testing/Internals.h:
186         * testing/Internals.idl:
187         Expose pathWithShrinkWrappedRects to tests via Internals.
188         It takes a sequence<double> where every four values are the x, y, w, h
189         of a rect, and returns a DOMPath which can be used with Canvas.
190
191 2015-07-15  Enrica Casucci  <enrica@apple.com>
192
193         [iOS] Should look for RTF and RTFD pasteboard types before plain text.
194         https://bugs.webkit.org/show_bug.cgi?id=146971
195         rdar://problem/21840845
196
197         Reviewed by Sam Weinig.
198
199         The list of pasteboard types returned by supportedPasteboardTypes
200         determines the order in which WebKit looks for data in the pasteboard
201         to create a fragment. The incorrect order could make plain text to
202         be preferred over rich format.
203
204         * platform/ios/PasteboardIOS.mm:
205         (WebCore::Pasteboard::supportedPasteboardTypes):
206
207 2015-07-15  Anders Carlsson  <andersca@apple.com>
208
209         Private headers that include project headers should also be project headers
210         https://bugs.webkit.org/show_bug.cgi?id=146974
211
212         Reviewed by Dan Bernstein.
213
214         Since these headers can't be included by WebKit anyway they shouldn't be installed.
215
216         * WebCore.xcodeproj/project.pbxproj:
217
218 2015-07-15  Eric Carlson  <eric.carlson@apple.com>
219
220         [Mac] AirPlay route is not always set automatically
221         https://bugs.webkit.org/show_bug.cgi?id=146969
222
223         Reviewed by Jer Noble.
224
225         * Modules/mediasession/WebMediaSessionManager.cpp:
226         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Return early if there are
227           no clients. Make the first client in the vector automatically play to the target if there
228           is no other match and there is an active route.
229         (WebCore::WebMediaSessionManager::watchdogTimerFired): Call picker.invalidatePlaybackTargets,
230           not stopMonitoringPlaybackTargets.
231
232         * platform/graphics/MediaPlaybackTargetPicker.cpp:
233         (WebCore::MediaPlaybackTargetPicker::invalidatePlaybackTargets): New.
234         * platform/graphics/MediaPlaybackTargetPicker.h:
235
236         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
237         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
238         (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets): Do nothing, AirPlay
239           automatically stops monitoring when appropriate and release the picker also releases
240           the output context, which drops the route.
241         (WebCore::MediaPlaybackTargetPickerMac::invalidatePlaybackTargets): New.
242
243 2015-07-15  Anders Carlsson  <andersca@apple.com>
244
245         Remove forwarding headers that no longer point to valid headers
246         https://bugs.webkit.org/show_bug.cgi?id=146972
247
248         Reviewed by Tim Horton.
249
250         * ForwardingHeaders/heap/AllocationSpace.h: Removed.
251         * ForwardingHeaders/runtime/IntegralTypedArrayBase.h: Removed.
252         * ForwardingHeaders/runtime/PrototypeFunction.h: Removed.
253         * ForwardingHeaders/runtime/StorageBarrier.h: Removed.
254         * ForwardingHeaders/runtime/TypedArrayBase.h: Removed.
255
256 2015-07-15  Wenson Hsieh  <wenson_hsieh@apple.com>
257
258         Negative scroll snap repeat values cause web process to hang indefinitely
259         https://bugs.webkit.org/show_bug.cgi?id=146953
260         <rdar://problem/21823681>
261
262         Reviewed by Simon Fraser.
263
264         Fixed dangerous behavior caused by setting -scroll-snap-points-x or -y to negative or very small
265         positive values. In the case of negative or 0 repeats, the web process would hang indefinitely. In
266         the case of very small positive values, a massive amount of memory could potentially be allocated
267         just to store snap offsets.
268
269         Tests: css3/scroll-snap/scroll-snap-negative-repeat.html
270                css3/scroll-snap/scroll-snap-subpixel-repeat.html
271
272         * css/CSSParser.cpp:
273         (WebCore::CSSParser::parseNonElementSnapPoints): Changed to consider negative snap repeat values as invalid CSS.
274         * page/scrolling/AxisScrollSnapOffsets.cpp:
275         (WebCore::updateFromStyle): Changed to threshold non-negative snap repeat values to 1px.
276
277 2015-07-14  Dean Jackson  <dino@apple.com>
278
279         Placeholder colors should be system grays
280         https://bugs.webkit.org/show_bug.cgi?id=146955
281         <rdar://problem/21774358>
282
283         Reviewed by Sam Weinig.
284
285         Update the PiP and Airplay placards to use the correct shades
286         of gray.
287
288         * Modules/mediacontrols/mediaControlsApple.css: No need to specify the
289         font here, nor have rules for Picture in Picture, which isn't available
290         on OS X.
291         (audio::-webkit-media-controls-time-remaining-display): We should specify
292         font style here.
293         (video:-webkit-full-screen::-webkit-media-controls-panel): Drive-by cleanup.
294         (audio::-webkit-media-controls-wireless-playback-status): Use a gray background
295         and system gray for text and artwork.
296         (audio::-webkit-media-controls-wireless-playback-status.small): Ditto.
297         (audio::-webkit-media-controls-picture-in-picture-button): Deleted (not on OS X).
298         (audio::-webkit-media-controls-wireless-playback-text-top): Deleted use of background color.
299         (audio::-webkit-media-controls-wireless-playback-text-bottom): Ditto..
300
301         * Modules/mediacontrols/mediaControlsiOS.css: Use a gray background
302         and system gray for text and artwork.
303         (audio::-webkit-media-controls-wireless-playback-status):
304         (audio::-webkit-media-controls-wireless-playback-text-top):
305         (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
306
307 2015-07-14  Hunseop Jeong  <hs85.jeong@samsung.com>
308
309         [EFL] Scrollbar is not drawn on MiniBrowser.
310         https://bugs.webkit.org/show_bug.cgi?id=143566
311
312         Reviewed by Gyuyoung Kim.
313
314         Implement the ScrollbarThemeEfl to draw the scrollbar on EFL port.
315
316         * PlatformEfl.cmake: Removed the ScrollbarEfl.cpp.
317
318         * platform/Scrollbar.cpp: Removed the !PLATFORM(EFL) guard to use the createNativeScrollbar().
319
320         * platform/efl/DefaultTheme/CMakeLists.txt: Replaced the image files with new ones.
321
322         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar.edc:
323         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_horizontal.png: Added.
324         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_bg_vertical.png: Added.
325         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_h.png: Removed.
326         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_h.png: Removed.
327         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_knob_v.png: Removed.
328         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_horizontal.png: Added.
329         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_thumb_vertical.png: Added.
330         * platform/efl/DefaultTheme/widget/scrollbar/scrollbar_v.png: Removed.
331         * platform/efl/RenderThemeEfl.cpp:
332         (WebCore::toEdjeGroup):
333         (WebCore::RenderThemeEfl::paintThemePart): Added the new function to draw the scrollbar
334           using the RenderThemeEfl.
335
336         * platform/efl/RenderThemeEfl.h:
337         * platform/efl/ScrollbarEfl.cpp: Removed.
338         * platform/efl/ScrollbarEfl.h: Removed.
339         * platform/efl/ScrollbarThemeEfl.cpp: Implemented the default functions to draw the
340           scrollbar.
341         (WebCore::scrollbarMap):
342         (WebCore::ScrollbarThemeEfl::~ScrollbarThemeEfl):
343         (WebCore::ScrollbarThemeEfl::scrollbarThickness):
344         (WebCore::ScrollbarThemeEfl::hasThumb):
345         (WebCore::ScrollbarThemeEfl::backButtonRect):
346         (WebCore::ScrollbarThemeEfl::forwardButtonRect):
347         (WebCore::ScrollbarThemeEfl::trackRect):
348         (WebCore::ScrollbarThemeEfl::minimumThumbLength):
349         (WebCore::ScrollbarThemeEfl::paintTrackBackground):
350         (WebCore::ScrollbarThemeEfl::paintThumb):
351         (WebCore::ScrollbarThemeEfl::registerScrollbar):
352         (WebCore::ScrollbarThemeEfl::unregisterScrollbar):
353         (WebCore::ScrollbarThemeEfl::loadThemeIfNeeded):
354         * platform/efl/ScrollbarThemeEfl.h:
355         (WebCore::ScrollbarThemeEfl::usesOverlayScrollbars):
356
357 2015-07-14  Andreas Kling  <akling@apple.com>
358
359         Don't persist history item tree for subframes across reloads.
360         <https://webkit.org/b/146937>
361         <rdar://problem/19925709>
362
363         Reviewed by Brady Eidson.
364
365         Throw away the subframe history items when reloading a page. This ensures that we
366         don't accumulate outdated frame metadata when subframes change name across page loads.
367         Since the history item tree is encoded in the UA session state and gets serialized to
368         disk, it's important that we don't let it grow unbounded.
369
370         * loader/HistoryController.cpp:
371         (WebCore::HistoryController::updateForReload):
372
373 2015-07-14  Antti Koivisto  <antti@apple.com>
374
375         REGRESSION (r177876): store.apple.com profile and cart icons are missing
376         https://bugs.webkit.org/show_bug.cgi?id=146894
377
378         Reviewed by Myles C. Maxfield.
379
380         If we had several @font-face rules for the same face covering overlapping ranges we
381         would only try to get glyphs from the first one. If it didn't have the glyph we wouldn't
382         try the other ones.
383
384         Test: fast/css/font-face-multiple-missing-glyphs.html
385
386         * platform/graphics/FontCascadeFonts.cpp:
387         (WebCore::FontCascadeFonts::glyphDataForVariant):
388         (WebCore::FontCascadeFonts::glyphDataForNormalVariant):
389
390             Get GlyphData with one call.
391
392         * platform/graphics/FontRanges.cpp:
393         (WebCore::FontRanges::~FontRanges):
394         (WebCore::FontRanges::glyphDataForCharacter):
395
396             Check that we actually have a glyph in the font for the character before returning it.
397
398         (WebCore::FontRanges::fontForCharacter):
399         (WebCore::FontRanges::fontForFirstRange):
400         * platform/graphics/FontRanges.h:
401         (WebCore::FontRanges::size):
402         (WebCore::FontRanges::rangeAt):
403
404 2015-07-14  Wenson Hsieh  <wenson_hsieh@apple.com>
405
406         Fix the 32 bit build after r186817
407         https://bugs.webkit.org/show_bug.cgi?id=146947
408
409         Changed CGRect to NSRect.
410
411         Reviewed by Simon Fraser.
412
413         * platform/mac/ThemeMac.mm:
414         (WebCore::paintButton):
415
416 2015-07-14  Anders Carlsson  <andersca@apple.com>
417
418         Remove wkPopupMenu from WebCoreSystemInterface; it's not called from WebCore
419         https://bugs.webkit.org/show_bug.cgi?id=146945
420
421         Reviewed by Tim Horton.
422
423         * platform/mac/WebCoreSystemInterface.h:
424
425 2015-07-14  Wenson Hsieh  <wenson_hsieh@apple.com>
426
427         Input buttons rendered at the wrong size when pinching-to-zoom
428         https://bugs.webkit.org/show_bug.cgi?id=146916
429
430         Reviewed by Dean Jackson.
431
432         Scales buttons and their focus rects up when pinching to zoom by painting to an offscreen ImageBuffer which is
433         then scaled and painted onto the display.
434
435         * platform/Theme.h: Modified signature of Theme::paint.
436         (WebCore::Theme::paint): Added plumbing necessary to send the device and page scale factors to paintButton.
437         * platform/mac/ThemeMac.h: Modified signature of paintButton.
438         * platform/mac/ThemeMac.mm: Added ImageBuffer.h header.
439         (WebCore::buttonFocusRectOutlineWidth): Represents the width of the focus rect of a button. Used by paintButton
440             to determine the size of the ImageBuffer required to draw a focus rect.
441         (WebCore::paintButton): Changed to paint button cells and the focus rect, if applicable, to a temporary ImageBuffer
442             before painting the ImageBuffer onto the view. Refactored to receive a deviceScaleFactor and page scale factor,
443             used when painting to the ImageBuffer.
444         (WebCore::ThemeMac::paint): Added plumbing necessary to send the device and page scale factors to paintButton.
445         * rendering/RenderTheme.cpp: Modified signature of RenderTheme::paint.
446         (WebCore::RenderTheme::paint): Added plumbing necessary to send the device and page scale factors to paintButton.
447
448 2015-07-14  Commit Queue  <commit-queue@webkit.org>
449
450         Unreviewed, rolling out r186809.
451         https://bugs.webkit.org/show_bug.cgi?id=146943
452
453         Caused about 190 layout test failures. (Requested by mlam_ on
454         #webkit).
455
456         Reverted changeset:
457
458         "REGRESSION (r177876): store.apple.com profile and cart icons
459         are missing"
460         https://bugs.webkit.org/show_bug.cgi?id=146894
461         http://trac.webkit.org/changeset/186809
462
463 2015-07-14  Antti Koivisto  <antti@apple.com>
464
465         REGRESSION (r177876): store.apple.com profile and cart icons are missing
466         https://bugs.webkit.org/show_bug.cgi?id=146894
467
468         Reviewed by Myles C. Maxfield.
469
470         If we had several @font-face rules for the same face covering overlapping ranges we
471         would only try to get glyphs from the first one. If it didn't have the glyph we wouldn't
472         try the other ones.
473
474         Test: fast/css/font-face-multiple-missing-glyphs.html
475
476         * platform/graphics/FontCascadeFonts.cpp:
477         (WebCore::FontCascadeFonts::glyphDataForVariant):
478         (WebCore::FontCascadeFonts::glyphDataForNormalVariant):
479
480             Get GlyphData with one call.
481
482         * platform/graphics/FontRanges.cpp:
483         (WebCore::FontRanges::~FontRanges):
484         (WebCore::FontRanges::glyphDataForCharacter):
485
486             Check that we actually have a glyph in the font for the character before returning it.
487
488         (WebCore::FontRanges::fontForCharacter):
489         (WebCore::FontRanges::fontForFirstRange):
490         * platform/graphics/FontRanges.h:
491         (WebCore::FontRanges::size):
492         (WebCore::FontRanges::rangeAt):
493
494 2015-07-14  Alex Christensen  <achristensen@webkit.org>
495
496         [Content Extensions] Fix if-domain and unless-domain when loading main documents.
497         https://bugs.webkit.org/show_bug.cgi?id=146868
498
499         Reviewed by Benjamin Poulain.
500
501         Tests: http/tests/contentextensions/block-everything-if-domain.html
502                http/tests/contentextensions/block-everything-unless-domain-iframe.html
503                http/tests/contentextensions/block-everything-unless-domain-redirect.php
504                http/tests/contentextensions/block-everything-unless-domain.html
505
506         * contentextensions/ContentExtensionsBackend.cpp:
507         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
508         If we are loading a new main document, use that main document url as the main document url for domain comparison.
509
510 2015-07-05  Sam Weinig  <sam@webkit.org>
511
512         DOM4: prepend, append, before, after & replace
513         https://bugs.webkit.org/show_bug.cgi?id=74648
514
515         Reviewed by Darin Adler.
516
517         - Adds support for ChildNode.before/after/replaceWith and ParentNode.prepend/append
518           which are new functions in https://dom.spec.whatwg.org
519         - Uses custom bindings rather than implementing support for union types in the code
520           generator as their uses seems isolated to just this spec at the moment. If more
521           uses come along, we should implement proper support for them in the generator and
522           remove the custom bindings added here.
523
524         Tests: fast/dom/ChildNode-after.html
525                fast/dom/ChildNode-before.html
526                fast/dom/ChildNode-replaceWith.html
527                fast/dom/ParentNode-append.html
528                fast/dom/ParentNode-prepend.html
529
530         * CMakeLists.txt:
531         * WebCore.vcxproj/WebCore.vcxproj:
532         * WebCore.xcodeproj/project.pbxproj:
533         * bindings/js/JSBindingsAllInOne.cpp:
534         Add new files.
535
536         * bindings/js/JSCharacterDataCustom.cpp: Added.
537         (WebCore::JSCharacterData::before):
538         (WebCore::JSCharacterData::after):
539         (WebCore::JSCharacterData::replaceWith):
540         * bindings/js/JSDocumentCustom.cpp:
541         (WebCore::JSDocument::prepend):
542         (WebCore::JSDocument::append):
543         (WebCore::JSDocument::createTouchList):
544         * bindings/js/JSDocumentFragmentCustom.cpp: Added.
545         (WebCore::JSDocumentFragment::prepend):
546         (WebCore::JSDocumentFragment::append):
547         * bindings/js/JSDocumentTypeCustom.cpp: Added.
548         (WebCore::JSDocumentType::before):
549         (WebCore::JSDocumentType::after):
550         (WebCore::JSDocumentType::replaceWith):
551         * bindings/js/JSElementCustom.cpp:
552         (WebCore::toJSNewlyCreated):
553         (WebCore::JSElement::before):
554         (WebCore::JSElement::after):
555         (WebCore::JSElement::replaceWith):
556         (WebCore::JSElement::prepend):
557         (WebCore::JSElement::append):
558         Add custom bindings to implement the use of variadic union types.
559
560         * bindings/js/JSNodeOrString.cpp: Added.
561         (WebCore::toNodeOrStringVector):
562         * bindings/js/JSNodeOrString.h: Added.
563         Adds a help function for converting an JS argument list into a Vector
564         of NodeOrString objects.
565
566         * dom/ChildNode.idl:
567         Expose before/after/replaceWith to JavaScript.
568
569         * dom/ContainerNode.cpp:
570         (WebCore::ContainerNode::append):
571         (WebCore::ContainerNode::prepend):
572         * dom/ContainerNode.h:
573         Add implementations of append and prepend.
574
575         * dom/Node.h:
576         * dom/Node.cpp:
577         (WebCore::nodeSetPreTransformedFromNodeOrStringVector):
578         (WebCore::firstPrecedingSiblingNotInNodeSet):
579         (WebCore::firstFollowingSiblingNotInNodeSet):
580         Helper functions for before, after and removeWith.
581
582         (WebCore::Node::before):
583         (WebCore::Node::after):
584         (WebCore::Node::replaceWith):
585         Add implementations of before, after and removeWith.
586
587         * dom/NodeOrString.cpp: Added.
588         (WebCore::convertNodesOrStringsIntoNode):
589         * dom/NodeOrString.h: Added.
590         (WebCore::NodeOrString::NodeOrString):
591         (WebCore::NodeOrString::~NodeOrString):
592         (WebCore::NodeOrString::type):
593         (WebCore::NodeOrString::node):
594         (WebCore::NodeOrString::string):
595         Custom union type representing the (Node or DOMString) IDL type.
596
597         * dom/ParentNode.idl:
598         Expose append/prepend to JavaScript.
599
600 2015-07-13  Brent Fulgham  <bfulgham@apple.com>
601
602         [Win] Unreviewed build fix.
603
604         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
605         (WebCore::InbandTextTrackPrivateAVCF::readNativeSampleBuffer): Don't try to build
606         the new Legible Output API features if they aren't available in the build
607         environment.
608
609 2015-07-13  Brent Fulgham  <bfulgham@apple.com>
610
611         [Win] Update Media Player logic for new Legible Output API
612         https://bugs.webkit.org/show_bug.cgi?id=146922
613         <rdar://problem/20542574>
614
615         Reviewed by Eric Carlson.
616
617         * AVFoundationSupport.py: Check for updated AVFCF feature.
618         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
619         (WebCore::InbandTextTrackPrivateAVF::processNativeSamples): Update to call the
620         new 'readNativeSampleBuffer' method.
621         (WebCore::InbandTextTrackPrivateAVF::readNativeSampleBuffer): Added. This is a no-op
622         on Windows if it has the new AVCF API. Otherwise, it contains the same implementation
623         that has always been used in 'processNativeSamples'.
624         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
625         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
626         (WebCore::InbandTextTrackPrivateAVCF::readNativeSampleBuffer): Added. Use the new
627         Legible Output API instead of the old CoreMedia solution if it is available.
628         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.h:
629         (WebCore::InbandTextTrackPrivateAVCF::mediaSelectionOption):
630         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp:
631         (WebCore::InbandTextTrackPrivateLegacyAVCF::readNativeSampleBuffer): Add a stub implementation.
632         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.h:
633         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
634         (WebCore::AVFWrapper::createPlayerItem): Use the new Legible Output API if it is available.
635
636 2015-07-13  Matt Rajca  <mrajca@apple.com>
637
638         Media Session: add plumbing for delivering start/end-of-interruption events
639         https://bugs.webkit.org/show_bug.cgi?id=146837
640
641         Reviewed by Tim Horton.
642
643         * Modules/mediasession/MediaSessionEvents.h: Renamed from MediaEventTypes.h and added new constants for
644           interruption events.
645         * WebCore.xcodeproj/project.pbxproj: Renamed MediaEventTypes.h.
646         * page/Page.h: Added stub.
647         * page/Page.cpp: Added stub.
648
649 2015-07-13  Simon Fraser  <simon.fraser@apple.com>
650
651         [iOS WK2] When choosing an initial viewport scale, take overflow on the <body> into account
652         https://bugs.webkit.org/show_bug.cgi?id=146918
653         rdar://problem/9222837
654
655         Reviewed by Tim Horton.
656
657         Use as input to the viewport scaling algorithm a contents size from the FrameView
658         that takes overflow on the viewport renderer into account. This prevents unexpected
659         viewports scaling on pages that have content that overflows their expressed contents size,
660         but apply overflow to the <body>.
661
662         * page/FrameView.cpp:
663         (WebCore::FrameView::contentsSizeRespectingOverflow): Look for overflow:hidden on each axis of
664         the m_viewportRenderer, which is computed post-layout by calculateScrollbarModesForLayout()
665         and is used for scrollbar logic on OS X. Clip unscaledDocumentRect on each axis, and then
666         apply page scale.
667         * page/FrameView.h:
668
669 2015-07-13  Brent Fulgham  <bfulgham@apple.com>
670
671         Update WebCore Features.json
672         https://bugs.webkit.org/show_bug.cgi?id=146914
673
674         Reviewed by Benjamin Poulain.
675
676         * features.json: Update with notes for CSS Scroll Snap Points, Filter Effects,
677         backdrop-filters, and initial-letter.
678
679 2015-07-13  Matthew Daiter  <mdaiter@apple.com>
680
681         Change MediaPlayer Media Stream method signatures to use references
682         https://bugs.webkit.org/show_bug.cgi?id=146839
683         <rdar://problem/21769035>
684
685         Reviewed by Darin Adler.
686
687         * platform/graphics/MediaPlayer.cpp:
688         (WebCore::MediaPlayer::loadWithNextMediaEngine):
689         * platform/graphics/MediaPlayerPrivate.h: Changed to references
690         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
691         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
692         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
693         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load): Ditto
694         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
695         (WebCore::MediaPlayerPrivateGStreamer::load): Ditto
696         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
697         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
698         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
699
700 2015-07-13  Carlos Alberto Lopez Perez  <clopez@igalia.com>
701
702         GTK] Build race with -DENABLE_WAYLAND_TARGET=ON
703         https://bugs.webkit.org/show_bug.cgi?id=146740
704
705         Reviewed by Martin Robinson.
706
707         No new tests, no behavior changes.
708
709         * PlatformGTK.cmake: platform/graphics/wayland sources should be
710         included into WebCore source list instead of WebCorePlatformGTK.
711         Also move the add_custom_command() block into if(ENABLE_WAYLAND_TARGET),
712         this is not strictly needed to fix this bug, but it seems cleaner.
713
714 2015-07-13  Matthew Daiter  <mdaiter@apple.com>
715
716         Adding MediaStream Engine building blocks to the code repo
717         https://bugs.webkit.org/show_bug.cgi?id=146789
718         <rdar://problem/21747025>
719
720         Reviewed by Brent Fulgham.
721
722         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h: Added.
723         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setLoadingProgresssed):
724         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setHasAvailableVideoFrame):
725         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createWeakPtr):
726         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: Added.
727         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::MediaPlayerPrivateMediaStreamAVFObjC):
728         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):
729         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::registerMediaEngine):
730         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::isAvailable):
731         (WebCore::mimeTypeCache):
732         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::getSupportedTypes):
733         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsType):
734         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::load):
735         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::cancelLoad):
736         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareToPlay):
737         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformMedia):
738         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::platformLayer):
739         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::play):
740         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::playInternal):
741         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pause):
742         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::pauseInternal):
743         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paused):
744         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVolume):
745         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsScanning):
746         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setMuted):
747         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::naturalSize):
748         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasVideo):
749         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasAudio):
750         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setVisible):
751         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::durationMediaTime):
752         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seeking):
753         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setRateDouble):
754         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setPreservesPitch):
755         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::networkState):
756         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::readyState):
757         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::seekable):
758         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::maxMediaTimeSeekable):
759         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::minMediaTimeSeekable):
760         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::buffered):
761         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::didLoadingProgress):
762         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::setSize):
763         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::hasAvailableVideoFrame):
764         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::supportsAcceleratedRendering):
765         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::movieLoadType):
766         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::prepareForRendering):
767         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::engineDescription):
768         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::languageOfPrimaryAudioTrack):
769         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::shouldBePlaying):
770         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::addDisplayLayer):
771         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::removeDisplayLayer):
772         * platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.h: Added.
773         * platform/graphics/avfoundation/objc/MediaStreamPrivateAVFObjC.mm: Added.
774         (WebCore::MediaStreamPrivateAVFObjC::create):
775         (WebCore::MediaStreamPrivateAVFObjC::MediaStreamPrivateAVFObjC):
776         (WebCore::MediaStreamPrivateAVFObjC::~MediaStreamPrivateAVFObjC):
777         (WebCore::MediaStreamPrivateAVFObjC::duration):
778         (WebCore::MediaStreamPrivateAVFObjC::buffered):
779         (WebCore::MediaStreamPrivateAVFObjC::readyState):
780         (WebCore::MediaStreamPrivateAVFObjC::hasAudio):
781         (WebCore::MediaStreamPrivateAVFObjC::hasVideo):
782         (WebCore::MediaStreamPrivateAVFObjC::naturalSize):
783         * platform/mediastream/MediaStreamPrivate.h: 
784         (WebCore::MediaStreamPrivate::MediaStreamPrivate): Added constructor.
785
786 2015-07-13  Eric Carlson  <eric.carlson@apple.com>
787
788         [iOS] Cancel AirPlay explicitly when exiting from full screen
789         https://bugs.webkit.org/show_bug.cgi?id=146902
790         <rdar://problem/20923632>
791
792         Reviewed by Brent Fulgham.
793
794         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
795         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
796         (WebVideoFullscreenInterfaceAVKit::~WebVideoFullscreenInterfaceAVKit): Call setExternalPlayback(false)
797           if playing to an external screen.
798
799 2015-07-12  Chris Fleizach  <cfleizach@apple.com>
800
801         AX: WEB: VoiceOver for iOS does not read <iframe> elements during linear (swipe) navigation.
802         https://bugs.webkit.org/show_bug.cgi?id=146861
803
804         Reviewed by Darin Adler.
805
806         AttachmentViews exist only on WK1 so we need account for both platforms.
807
808         Test: platform/ios-simulator/accessibility/iframe-access.html
809
810         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
811         (-[WebAccessibilityObjectWrapper accessibilityElementAtIndex:]):
812
813 2015-07-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>
814
815         [Streams API] Templating ReadableJSStream
816         https://bugs.webkit.org/show_bug.cgi?id=146802
817
818         Reviewed by Darin Adler.
819
820         Introducing ReadableStream::clearValues to clear queued values when cancelling and going into error state.
821
822         Introducing ReadableEnqueuingStream to handle the stream queue, as a class template.
823         Specialized ReadableEnqueuingStream for the purpose of ReadableJSStream (storage of JSValue with variable size).
824
825         Updated some static functions to accept a ReadableStream in lieu of the more specialized ReadableJSStream.
826
827         Covered by existing tests.
828
829         * Modules/streams/ReadableStream.cpp:
830         (WebCore::ReadableStream::changeStateToErrored):
831         (WebCore::ReadableStream::cancelNoCheck):
832         * Modules/streams/ReadableStream.h:
833         (WebCore::ReadableEnqueuingStream::ReadableEnqueuingStream):
834         (WebCore::ReadableEnqueuingStream::enqueueChunk):
835         (WebCore::ReadableEnqueuingStream<ChunkType>::read):
836         * bindings/js/ReadableJSStream.cpp:
837         (WebCore::ReadableEnqueuingStream<ReadableJSStreamValue>::read):
838         (WebCore::ReadableEnqueuingStream<ReadableJSStreamValue>::enqueueChunk):
839         (WebCore::createPullResultFulfilledFunction):
840         (WebCore::createCancelResultFulfilledFunction):
841         (WebCore::ReadableJSStream::ReadableJSStream):
842         (WebCore::ReadableJSStream::enqueue):
843         * bindings/js/ReadableJSStream.h:
844         (WebCore::ReadableJSStreamValue::create):
845         (WebCore::ReadableEnqueuingStream<ReadableJSStreamValue>::desiredSize):
846         (WebCore::ReadableEnqueuingStream<ReadableJSStreamValue>::ReadableEnqueuingStream):
847
848 2015-07-11  Babak Shafiei  <bshafiei@apple.com>
849
850         Unreviewed build fix.
851
852         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
853         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::load):
854         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cancelLoad):
855
856 2015-07-11  Nikita Vasilyev  <nvasilyev@apple.com>
857
858         Web Inspector: Inspector should be able to be docked to the bottom of a narrow window
859         https://bugs.webkit.org/show_bug.cgi?id=146871
860
861         Reviewed by Timothy Hatcher.
862
863         * inspector/InspectorFrontendClientLocal.cpp:
864
865 2015-07-11  Joseph Pecoraro  <pecoraro@apple.com>
866
867         Update default link action sheets for app links
868         https://bugs.webkit.org/show_bug.cgi?id=146658
869         <rdar://problem/21221902>
870
871         Reviewed by Dan Bernstein.
872
873         * English.lproj/Localizable.strings:
874         * platform/spi/ios/LaunchServicesSPI.h:
875
876 2015-07-11  Benjamin Poulain  <benjamin@webkit.org>
877
878         Fix CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING
879         https://bugs.webkit.org/show_bug.cgi?id=146879
880
881         Reviewed by Andreas Kling.
882
883         Some of my recent changes broke CONTENT_EXTENSIONS_STATE_MACHINE_DEBUGGING :(
884
885         * contentextensions/CombinedURLFilters.cpp:
886         (WebCore::ContentExtensions::prefixTreeVertexToString):
887         (WebCore::ContentExtensions::recursivePrint):
888         (WebCore::ContentExtensions::CombinedURLFilters::print):
889         * contentextensions/ContentExtensionsDebugging.h:
890         * contentextensions/DFA.cpp:
891         (WebCore::ContentExtensions::DFA::debugPrintDot):
892
893 2015-07-10  Simon Fraser  <simon.fraser@apple.com>
894
895         [iOS WK2] Scrolling issues on horizontally scrollable RTL pages
896         https://bugs.webkit.org/show_bug.cgi?id=146872
897         rdar://problem/7569416
898
899         Reviewed by Sam Weinig.
900
901         Horizontally scrollable RTL pages in WebKit2 had a variety of issues: they had
902         a gap down the right edge, and unreachable content on the left side, focussing
903         form fields scrolled to the wrong location, and programmatic scrolls scrolled
904         to the wrong place.
905         
906         Fix by plumbing the WebCore notion of scrollOrigin through to the UI process,
907         and using it in various places. There are three main aspects to the patch:
908         
909         1. scroll origin is included in RemoteLayerTreeTransaction, and plumbed through
910            to -[WKWebView _scrollToContentOffset:] for correct programmatic scrolling,
911            including zooming to focussed form elements.
912         2. WebPageProxy::computeCustomFixedPositionRect() uses the actual documentRect()
913            rather than just conjuring up a rect with a zero origin, which makes position:fixed
914            work correctly.
915         3. _interactionViewsContainerView (which hosts tap highlights) is positioned to 
916            coincide with the origin of the documentRect (i.e. at the scroll origin, which
917            may not be top-left). This allows tap highlights to show in the correct location.
918         4. ScrollView::unobscuredContentRect() is fixed to take scroll origin into account;
919            if the returned rect is wrong, RenderLayer::hitTest() incorrectly clips the hit
920            testing area.
921
922         * platform/ios/ScrollViewIOS.mm:
923         (WebCore::ScrollView::unobscuredContentRect):
924
925 2015-07-10  Chris Dumez  <cdumez@apple.com>
926
927         [WK2] Diagnostic logging messages are causing too much IPC
928         https://bugs.webkit.org/show_bug.cgi?id=146873
929         <rdar://problem/21779205>
930
931         Reviewed by Ryosuke Niwa.
932
933         Move shouldLogAfterSampling() utility function to DiagnosticLoggingClient
934         so it can be easily reused.
935
936         * page/DiagnosticLoggingClient.h:
937         (WebCore::DiagnosticLoggingClient::shouldLogAfterSampling):
938
939 2015-07-10  Daniel Bates  <dabates@apple.com>
940
941         Cleanup: Remove default constructor for WebCore::Pair()
942         https://bugs.webkit.org/show_bug.cgi?id=146856
943         <rdar://problem/21773212>
944
945         Reviewed by Darin Adler.
946
947         Remove default constructor for WebCore::Pair() and the setters Pair::set{First, Second}()
948         since they are not used and it seems weird to keep the latter after the removal of the former.
949         Should it turn out that we find a use for having a default constructor and/or setters then
950         we can revert this change.
951
952         * css/Pair.h:
953         (WebCore::Pair::create): Deleted.
954         (WebCore::Pair::setFirst): Deleted.
955         (WebCore::Pair::setSecond): Deleted.
956         (WebCore::Pair::Pair): Deleted.
957
958 2015-07-10  Ryuan Choi  <ryuan.choi@navercorp.com>
959
960         [CoordinatedGraphics] Override primaryLayerID in CoordinatedGraphicsLayer
961         https://bugs.webkit.org/show_bug.cgi?id=146826
962
963         Reviewed by Gyuyoung Kim.
964
965         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
966         (WebCore::CoordinatedGraphicsLayer::id): Moved id as inline function.
967         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
968         (WebCore::CoordinatedGraphicsLayer::id):
969
970 2015-07-10  Matthew Daiter  <mdaiter@apple.com>
971
972         Exposing webkitMediaStream as MediaStream
973         https://bugs.webkit.org/show_bug.cgi?id=146813
974         <rdar://problem/21754383>
975
976         Reviewed by Eric Carlson.
977
978         * Modules/mediastream/MediaStream.idl: Changed interface
979         name from webkitMediaStream to MediaStream
980
981 2015-07-10  Nan Wang  <n_wang@apple.com>
982
983         Added ARIA 1.1 "cell" and "table" roles.
984         https://bugs.webkit.org/show_bug.cgi?id=146011
985         <rdar://problem/21398946>
986
987         Reviewed by Chris Fleizach.
988
989         Created a new role called GridCellRole to match the gridcell role, 
990         so the previous CellRole and TableRole will match to cell and table role.
991         Made the changes to make sure that both GridRole and TableRole have same
992         behavior, as well as the circumstance for GridCellRole and CellRole.
993
994         Test: accessibility/roles-table-and-cell.html
995
996         * accessibility/AXObjectCache.cpp:
997         (WebCore::createFromRenderer):
998         * accessibility/AccessibilityNodeObject.cpp:
999         (WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
1000         (WebCore::AccessibilityNodeObject::canSetSelectedAttribute):
1001         * accessibility/AccessibilityObject.cpp:
1002         (WebCore::initializeRoleMap):
1003         * accessibility/AccessibilityObject.h:
1004         * accessibility/AccessibilityRenderObject.cpp:
1005         (WebCore::AccessibilityRenderObject::setSelectedRows):
1006         (WebCore::AccessibilityRenderObject::inheritsPresentationalRole):
1007         (WebCore::AccessibilityRenderObject::selectedChildren):
1008         * accessibility/AccessibilityTable.cpp:
1009         (WebCore::AccessibilityTable::roleValue):
1010         * accessibility/AccessibilityTableCell.cpp:
1011         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
1012         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1013         (-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
1014         (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
1015         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
1016         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1017         (createAccessibilityRoleMap):
1018
1019 2015-07-10  Daniel Bates  <dabates@apple.com>
1020
1021         Serialized declaration for background-size/-webkit-mask-size should preserve identical
1022         values instead of coalescing them
1023         https://bugs.webkit.org/show_bug.cgi?id=143191
1024         <rdar://problem/21759393>
1025
1026         Reviewed by Darin Adler.
1027
1028         Inspired by Blink r157745:
1029         <http://src.chromium.org/viewvc/blink?view=revision&revision=157745>
1030         And Blink r172548:
1031         <http://src.chromium.org/viewvc/blink?view=revision&revision=172548>
1032
1033         Fixes an issue where identical values in a CSS declaration for properties background-size
1034         and -webkit-mask-size would be coalesced when serialized.
1035
1036         * css/CSSParser.cpp:
1037         (WebCore::CSSParser::parseFillSize): Modified to create a Pair object with the appropriate
1038         identical value encoding strategy. We only coalesce identical values when serializing the
1039         declaration of property -webkit-background-size.
1040         * css/Pair.h:
1041         (WebCore::Pair::create): Added variant that takes an encoding.
1042         (WebCore::Pair::cssText): Moved implementation of Pair::generateCSSString() to here and
1043         modified to conditionally coalesce identical values during serialization.
1044         (WebCore::Pair::Pair): Added variant that takes an encoding.
1045         (WebCore::Pair::generateCSSString): Deleted; moved implementation into Pair::cssText().
1046
1047 2015-07-10  Myles C. Maxfield  <mmaxfield@apple.com>
1048
1049         Bidi-Isolate inlines break layout with collapsed whitespace
1050         https://bugs.webkit.org/show_bug.cgi?id=109624
1051         <rdar://problem/21752834>
1052
1053         Reviewed by David Hyatt.
1054
1055         This patch changes the logic in constructBidiRunsForSegment() when it encounters an
1056         isolate. It already has logic to create a BidiResolver for the isolated text;
1057         however, that logic doesn't handle setting up the MidpointState at all.
1058         Specifically, we can set the MidpointState's cursor to point to the context which
1059         we can remember from addPlaceholderRunForIsolatedInline(). This information is
1060         remembered in a HashMap in BidiResolver.
1061
1062         This patch is a partial port of Blink patch
1063         https://src.chromium.org/viewvc/blink?view=rev&revision=159203
1064
1065         Here is some explanatory text regarding how we collapse spaces:
1066
1067         Collapsing whitespace happens in a series of phases. The first phase occurs when
1068         we perform line breaking. Here, we keep track of sequences of whitespace which
1069         should be collapsed, in the form of a vector of pairs of InlineIterators. We put
1070         this knowledge into a MidpointState object.
1071
1072         Then, once we have a line, we run the bidi algorithm on the line (including the
1073         whitespace). As output, the bidi algorithm calls the BidiResolver::appendRun()
1074         callback with two InlineIterators each time it wants to create a run. Because
1075         each renderer that we create has to be owned by exactly one DOM node,
1076         BidiResolver::appendRun() iterates between its two InlineIterator arguments,
1077         calling RenderBlockFlow::appendRunsForObject() on each interstitial DOM node.
1078
1079         This is the function where whitespace collapsing happens. The MidpointState object
1080         keeps a cursor into its remembered whitespace sequences. Here, we simply make a
1081         bidi run for each region in between adjacent whitespace pairs in the MidpointState
1082         object. These bidi runs eventually get turned into leaf InlineBoxes.
1083
1084         The problem is that the BidiResolver::appendRun() callbacks don't occur in
1085         string-order, but the Midpoint InlineIterator pairs are in string-order. In
1086         particular, within a particular isolate, appendRun() gets called in string
1087         order, but callbacks that occur for inner isolates are deferred. This means that
1088         RenderBlockFlow::appendRunsForObject() gets confused when it looks for relevant
1089         whitespace to skip.
1090
1091         Test: fast/text/bidi-isolate-whitespace-collapse.html
1092
1093         * platform/text/BidiResolver.h:
1094         (WebCore::MidpointState::numMidpoints): Returning a const unsigned& is silly.
1095         (WebCore::MidpointState::currentMidpoint): Ditto.
1096         (WebCore::MidpointState::setCurrentMidpoint): The isolated MidpointState object
1097         needs to be able to set its current midpoint to point to the first one inside
1098         the isolate.
1099         (WebCore::MidpointState::decrementNumMidpoints): Renamed from "decrease"
1100         (WebCore::MidpointState::betweenMidpoints): This function is true iff
1101         currentMidpoint() % 2. Instead of keeping a member variable, we can just compute
1102         that.
1103         (WebCore::MidpointState::reset): Deleted.
1104         (WebCore::MidpointState::decreaseNumMidpoints): Deleted.
1105         (WebCore::MidpointState::setBetweenMidpoints): Deleted.
1106         * rendering/InlineIterator.h:
1107         (WebCore::IsolateTracker::addFakeRunIfNecessary): Call
1108         RenderBlockFlow::appendRunsForObject() to keep our MidpointState object in sync
1109         when we pop out of the isolated object. However, we pass in a null run list,
1110         because we don't want to append just yet (that happens when we process the
1111         isolate).
1112         (WebCore::InlineBidiResolver::appendRun): Update for new signature of
1113         appendRunsForObject().
1114         * rendering/RenderBlock.h:
1115         (WebCore::RenderBlock::shouldSkipCreatingRunsForObject): Take a reference instead
1116         of a pointer.
1117         * rendering/RenderBlockFlow.h:
1118         * rendering/RenderBlockLineLayout.cpp:
1119         (WebCore::createRun): Ditto.
1120         (WebCore::RenderBlockFlow::appendRunsForObject): Allow someone passing us a null
1121         BidiRunList. In this case, we will keep the resolver's midpointState() up to date,
1122         but won't actually emit any runs.
1123         (WebCore::notifyResolverToResumeInIsolate): Renamed from setUp.
1124         (WebCore::isolatedResolversMidpointState): Calculate the midpoint state for the
1125         isolated resolver.
1126         (WebCore::setUpResolverToResumeInIsolate): Call isolatedResolversMidpointState().
1127         (WebCore::constructBidiRunsForSegment): Pass in the topResolver, which is
1128         necessary for isolatedResolversMidpointState().
1129         * rendering/line/BreakingContext.h:
1130         (WebCore::checkMidpoints):
1131
1132 2015-07-10  Daniel Bates  <dabates@apple.com>
1133
1134         Cleanup: WebCore::Pair class should use RefPtr&& instead of PassRefPtr
1135         https://bugs.webkit.org/show_bug.cgi?id=146852
1136
1137         Reviewed by Anders Carlsson.
1138
1139         * css/CSSParser.cpp:
1140         (WebCore::createPrimitiveValuePair): Write using a variadic template that forwards its
1141         arguments to the appropriate Pair::create constructor.
1142         (WebCore::CSSParser::parse4ValuesFillPosition): Use RefPtr&& instead of PassRefPtr. 
1143         (WebCore::CSSParser::parse3ValuesFillPosition): Ditto.
1144         (WebCore::CSSParser::parseFillPosition): Use WTF::move() instead of RefPtr::release()
1145         so that we pass a rvalue reference to RefPtr.
1146         (WebCore::CSSParser::parseFillSize): Ditto.
1147         (WebCore::CSSParser::parseBorderImageRepeat): Ditto.
1148         * css/CSSParser.h:
1149         * css/Pair.h:
1150         (WebCore::Pair::create): Use RefPtr&& instead of PassRefPtr. 
1151         (WebCore::Pair::setFirst): Ditto.
1152         (WebCore::Pair::setSecond): Ditto.
1153         (WebCore::Pair::Pair): Ditto. Also substitute nullptr for 0 in the member initialization
1154         list of the default constructor.
1155
1156 2015-07-10  Zalan Bujtas  <zalan@apple.com>
1157
1158         Crash at WebCore::WebPage::innerFrameQuad.
1159         https://bugs.webkit.org/show_bug.cgi?id=146843
1160         rdar://problem/21501819
1161
1162         Reviewed by Andreas Kling.
1163
1164         We may end up with a null rootEditableElement() after calling Document::updateLayout().
1165
1166         Speculative fix. Not reproducible.
1167
1168         * page/Frame.cpp: Some const cleanup.
1169         (WebCore::Frame::visiblePositionForPoint):
1170         * page/Frame.h:
1171
1172 2015-07-10  Brady Eidson  <beidson@apple.com>
1173
1174         Crash in HistoryController::updateForCommit dereferencing a null HistoryItem.
1175         <rdar://problem/21371589> and https://bugs.webkit.org/show_bug.cgi?id=146842
1176
1177         Reviewed by Chris Dumez.
1178
1179         No new tests (Unknown how to reproduce).
1180         
1181         This patch basically rolls back part of http://trac.webkit.org/changeset/179472.
1182         
1183         r179472 changed HistoryController::setCurrentItem() to take a reference instead of a pointer.
1184         Unfortunately, we sometimes call setCurrentItem(nullptr).
1185         
1186         We'd like to *not* do that, and there are assertions in place to try to catch when we do,
1187         but in the meantime it is not valid to dereference nullptr.
1188
1189         * loader/FrameLoader.cpp:
1190         (WebCore::FrameLoader::loadSameDocumentItem):
1191         
1192         * loader/HistoryController.cpp:
1193         (WebCore::HistoryController::updateForCommit):
1194         (WebCore::HistoryController::recursiveUpdateForCommit):
1195         (WebCore::HistoryController::recursiveUpdateForSameDocumentNavigation):
1196         (WebCore::HistoryController::setCurrentItem): Take a ptr instead of a ref.
1197         (WebCore::HistoryController::createItem):
1198         * loader/HistoryController.h:
1199
1200 2015-07-10  Javier Fernandez  <jfernandez@igalia.com>
1201
1202         [CSS Grid Layout] Grid item's auto-margins are not applied correctly
1203         https://bugs.webkit.org/show_bug.cgi?id=146581
1204
1205         Reviewed by Darin Adler.
1206
1207         Grid Layout specification states that auto-margins must prevent to apply
1208         any Box Alignment property in that dimension. Instead, auto-margin is
1209         applied as described in the spec.
1210
1211         http://dev.w3.org/csswg/css-grid/#auto-margins
1212
1213         Only Flexbox and Grid Layout implement vertical auto-margin alignment;
1214         for other layout modes, auto-margin should compute as 0.
1215
1216         Tests: fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-lr.html
1217                fast/css-grid-layout/grid-item-auto-margins-alignment-vertical-rl.html
1218                fast/css-grid-layout/grid-item-auto-margins-alignment.html
1219
1220         * rendering/RenderBox.cpp:
1221         (WebCore::RenderBox::styleDidChange):
1222         (WebCore::RenderBox::updateGridAlignmentAfterStyleChange):
1223         * rendering/RenderBox.h:
1224         * rendering/RenderGrid.cpp:
1225         (WebCore::RenderGrid::layoutGridItems):
1226         (WebCore::RenderGrid::hasAutoMarginsInColumnAxis):
1227         (WebCore::RenderGrid::hasAutoMarginsInRowAxis):
1228         (WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded):
1229         (WebCore::RenderGrid::rowPositionForChild):
1230         (WebCore::RenderGrid::columnPositionForChild):
1231         * rendering/RenderGrid.h:
1232
1233 2015-07-10  Csaba Osztrogonác  <ossy@webkit.org>
1234
1235         Fix overloaded virtual function warning in ScrollbarThemeGtk.h
1236         https://bugs.webkit.org/show_bug.cgi?id=145920
1237
1238         Reviewed by Darin Adler.
1239
1240         * platform/gtk/ScrollbarThemeGtk.h:
1241
1242 2015-07-10  Chris Fleizach  <cfleizach@apple.com>
1243
1244         AX: <details> element should allow expand/close through AX API
1245         https://bugs.webkit.org/show_bug.cgi?id=146549
1246
1247         Apply review comments from Daniel Bates.
1248
1249         * accessibility/AccessibilityNodeObject.cpp:
1250         (WebCore::AccessibilityNodeObject::setIsExpanded):
1251
1252 2015-07-10  Brady Eidson  <beidson@apple.com>
1253
1254         ASSERT restoring from page cache as DocumentLoader reattaches to its Frame.
1255         <rdar://problem/21766282> and https://bugs.webkit.org/show_bug.cgi?id=146786
1256
1257         Reviewed by NOBODY (Fixing obvious boneheaded mistake in r186642)
1258
1259         No new tests (Covered by existing)
1260
1261         * loader/DocumentLoader.cpp:
1262         (WebCore::DocumentLoader::attachToFrame): Bail if reattaching to the current Frame,
1263           which happens when restoring from the page cache.
1264
1265 2015-07-09  Zalan Bujtas  <zalan@apple.com>
1266
1267         Plugin create can end up destroying its renderer.
1268         https://bugs.webkit.org/show_bug.cgi?id=146824
1269         rdar://problem/18921429
1270
1271         Reviewed by Andreas Kling.
1272
1273         Plugins can run arbitrary code during initialization. If the plugin
1274         happens to destroy the associated node, its renderer becomes invalid.
1275         This patch checks whether the renderer survived the createPlugin() call.
1276         (This WeakPtr pattern is also used in RenderWidget to avoid dangling pointers.)
1277
1278         Speculative fix. Not reproducible.
1279
1280         * loader/SubframeLoader.cpp:
1281         (WebCore::SubframeLoader::loadPlugin):
1282
1283 2015-07-09  Dan Bernstein  <mitz@apple.com>
1284
1285         WebCore part of Track and expose policies for external URL schemes and App Links separately
1286         https://bugs.webkit.org/show_bug.cgi?id=146822
1287
1288         Reviewed by Anders Carlsson.
1289
1290         * loader/FrameLoaderTypes.h: Added ShouldOpenExternalURLsPolicy::ShouldAllowExternalSchemes,
1291         meaning external schemes are allowed but App Links are not. The opposite state doesn’t
1292         exist.
1293
1294         * page/ContextMenuController.cpp:
1295         (WebCore::ContextMenuController::contextMenuItemSelected): Opening a link in a new window
1296         or in the current window should never open it as an App Link.
1297
1298 2015-07-09  Daniel Bates  <dabates@apple.com>
1299
1300         Fetching Content Security Policy report URL should respect same origin policy
1301         https://bugs.webkit.org/show_bug.cgi?id=146754
1302         <rdar://problem/18860259>
1303
1304         Reviewed by Brady Eidson.
1305
1306         Inspired by Blink r149791 (by Mike West <mkwst@chromium.org>):
1307         <https://src.chromium.org/viewvc/blink?revision=149791&view=revision>
1308
1309         As per <http://www.w3.org/TR/2015/CR-CSP2-20150219/#send-violation-reports>, fetching the
1310         Content Security Policy report URL should include cookies if and only if the origin of
1311         the protected resource is equal to the origin of the report URL.
1312
1313         Tests: http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-enabled.html
1314                http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies-when-private-browsing-toggled.html
1315                http/tests/security/contentSecurityPolicy/report-cross-origin-no-cookies.html
1316                http/tests/security/contentSecurityPolicy/report-same-origin-no-cookies-when-private-browsing-toggled.html
1317                http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies-when-private-browsing-enabled.html
1318                http/tests/security/contentSecurityPolicy/report-same-origin-with-cookies.html
1319
1320         * loader/PingLoader.cpp:
1321         (WebCore::PingLoader::sendViolationReport):
1322
1323 2015-07-09  Timothy Horton  <timothy_horton@apple.com>
1324
1325         Use CoreAnimation fences instead of synchronous IPC to synchronize resize
1326         https://bugs.webkit.org/show_bug.cgi?id=146294
1327         <rdar://problem/21090193>
1328
1329         Reviewed by Anders Carlsson.
1330
1331         * platform/cocoa/MachSendRight.h:
1332         Export some constructors.
1333
1334         * platform/spi/cocoa/QuartzCoreSPI.h:
1335         Add some SPI.
1336
1337 2015-07-09  Brady Eidson  <beidson@apple.com>
1338
1339         Followup to r186647
1340
1341         Reviewed by NOBODY.
1342
1343         Thanks, EWS and commit-queue, for not catching this!
1344
1345         * loader/DocumentLoader.h: Add a semi-colon.
1346
1347 2015-07-09  Dean Jackson  <dino@apple.com>
1348
1349         REGRESSION: Inline media scrubbing always pauses the video
1350         https://bugs.webkit.org/show_bug.cgi?id=146819
1351         <rdar://problem/21572027>
1352
1353         Reviewed by Eric Carlson. Joseph Pecoraro also was really
1354         helpful in diagnosing the problem.
1355
1356         When we moved some code from a getter/setter in the child
1357         class to the base class, it was no longer being called due
1358         to the bad way we were implementing inheritance. The solution
1359         was to have the child class explicitly call into the base
1360         class.
1361
1362         The much better solution would have been to rewrite everything
1363         to use ES6 classes or, as a smaller change, assign the __proto__
1364         directly on the child prototype. But I felt that was a bit
1365         too risky at this point.
1366
1367         * Modules/mediacontrols/mediaControlsApple.js:
1368         (Controller.prototype.extend): Describe in a comment why the extend function
1369         is not suitable.
1370         * Modules/mediacontrols/mediaControlsiOS.js: Add a getter/setter for
1371         scrubbing that calls into the base Controller.
1372
1373 2015-07-09  Chris Fleizach  <cfleizach@apple.com>
1374
1375         AX: <details> element should allow expand/close through AX API
1376         https://bugs.webkit.org/show_bug.cgi?id=146549
1377
1378         Reviewed by Mario Sanchez Prada.
1379
1380         Forgot this file with the original commit.
1381
1382         * html/HTMLDetailsElement.cpp:
1383         (WebCore::HTMLDetailsElement::toggleOpen):
1384
1385 2015-07-09  Alex Christensen  <achristensen@webkit.org>
1386
1387         [Content Extensions] Add 3 byte jump size.
1388         https://bugs.webkit.org/show_bug.cgi?id=146425
1389
1390         Reviewed by Darin Adler.
1391
1392         * contentextensions/DFABytecode.h:
1393         (WebCore::ContentExtensions::smallestPossibleJumpSize):
1394         * contentextensions/DFABytecodeCompiler.cpp:
1395         (WebCore::ContentExtensions::appendZeroes):
1396         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
1397         * contentextensions/DFABytecodeInterpreter.cpp:
1398         (WebCore::ContentExtensions::jumpSizeInBytes):
1399         (WebCore::ContentExtensions::getJumpSize):
1400         (WebCore::ContentExtensions::getJumpDistance):
1401         Added DFABytecodeJumpSize::Int24.
1402
1403 2015-07-09  Brady Eidson  <beidson@apple.com>
1404
1405         Add better ASSERTs to learn more about what is going wrong in DocumentLoader::detachFromFrame()
1406         https://bugs.webkit.org/show_bug.cgi?id=146816
1407
1408         Reviewed by Alex Christensen.
1409
1410         * loader/DocumentLoader.cpp:
1411         (WebCore::DocumentLoader::attachToFrame): Set the "has ever been attached" flag to true.
1412         (WebCore::DocumentLoader::detachFromFrame): ASSERT m_frame is non-null, but with a message 
1413           depending on the value of the "has ever been attached" flag.
1414         * loader/DocumentLoader.h:
1415
1416 2015-07-09  Brent Fulgham  <bfulgham@apple.com>
1417
1418         [Mac, iOS] The mimeTypeCache should return a reference
1419         https://bugs.webkit.org/show_bug.cgi?id=146809
1420
1421         Reviewed by Eric Carlson.
1422
1423         No new tests: No change in functionality.
1424
1425         Don't copy the mime type cache every time someone asks it a question. Return
1426         by reference instead.
1427
1428         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1429         (WebCore::mimeTypeCache):
1430         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1431         (WebCore::mimeTypeCache):
1432         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1433         (WebCore::mimeTypeCache):
1434
1435 2015-07-09  Wenson Hsieh  <whsieh@berkeley.edu>
1436
1437         Rubber banding is broken when using a Mighty Mouse
1438         https://bugs.webkit.org/show_bug.cgi?id=146693
1439
1440         Reviewed by Tim Horton.
1441
1442         Sets the "constrain content edge scrolling" flag to true by default, causing scrolling
1443         with a Mighty Mouse to not extend beyond the container's edges.
1444
1445         Test: platform/mac-wk2/tiled-drawing/scrolling/stateless-scrolling-no-rubber-band.html
1446
1447         * rendering/RenderLayer.cpp: Remove code that defaulted the flag to false.
1448         (WebCore::RenderLayer::RenderLayer): Deleted.
1449         * rendering/RenderMarquee.cpp: Added special case for marquees that allows content to scroll.
1450         (WebCore::RenderMarquee::RenderMarquee): See above.
1451
1452 2015-07-09  Brady Eidson  <beidson@apple.com>
1453
1454         DocumentLoader::detachFromFrame() is being called with no current Frame set.
1455         <rdar://problem/21293082> and https://bugs.webkit.org/show_bug.cgi?id=146786 
1456
1457         Reviewed by Sam Weinig.
1458
1459         No new tests (Unknown how to reproduce).
1460
1461         * loader/DocumentLoader.cpp:
1462         (WebCore::DocumentLoader::attachToFrame):
1463         (WebCore::DocumentLoader::detachFromFrame): Null check m_frame before dereferencing it.
1464         (WebCore::DocumentLoader::setFrame): Deleted, renamed to attachToFrame(), and take's
1465           a Frame& instead of a Frame*.
1466         * loader/DocumentLoader.h:
1467         
1468         * loader/FrameLoader.cpp:
1469         (WebCore::FrameLoader::initForSynthesizedDocument): setFrame is now attachToFrame.
1470         (WebCore::FrameLoader::setPolicyDocumentLoader): Ditto.
1471         (WebCore::FrameLoader::transitionToCommitted): Ditto.
1472
1473 2015-07-09  Matthew Daiter  <mdaiter@apple.com>
1474
1475         Expose MediaStream methods to be used in the MediaStream Engine
1476         https://bugs.webkit.org/show_bug.cgi?id=146791
1477         <rdar://problem/21747589>
1478
1479         Reviewed by Brent Fulgham.
1480
1481         * Modules/mediastream/MediaStream.cpp: 
1482         (WebCore::MediaStream::getAudioTracks): Removed const
1483         (WebCore::MediaStream::getVideoTracks): Ditto
1484         * Modules/mediastream/MediaStream.h: Needed to change functions to
1485         override
1486         * platform/mediastream/MediaStreamPrivate.h: Added certain calls to
1487         PrivateClient that exposes methods to be used in the engine
1488
1489 2015-07-09  Devin Rousso  <drousso@apple.com>
1490
1491         Web Inspector: Fix shape-highlight layout tests
1492         https://bugs.webkit.org/show_bug.cgi?id=146080
1493
1494         Reviewed by Joseph Pecoraro.
1495
1496         * inspector/InspectorOverlay.cpp:
1497         (WebCore::buildObjectForShapeOutside): Now properly returns the shape margin.
1498
1499 2015-07-09  Eric Carlson  <eric.carlson@apple.com>
1500
1501         [Mac] AirPlay to password protected AppleTV fails
1502         https://bugs.webkit.org/show_bug.cgi?id=146812
1503
1504         Reviewed by Dean Jackson.
1505
1506         * Modules/mediasession/WebMediaSessionManager.cpp:
1507         (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Initialize previouslyRequestedPicker.
1508         (WebCore::WebMediaSessionManager::clientStateDidChange): Cleanup the logic and add a comment
1509           to make it slightly easier to follow. Don't begin playing to a device unless playback
1510           has just started (don't switch in mid-play).
1511         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Use the last client to
1512           request the device picker as a fallback in case no other client is a canditate. Add more
1513           logging to make it possible to debug the selection logic.
1514         (WebCore::WebMediaSessionManager::scheduleDelayedTask): Fiddle with the logging.
1515
1516 2015-07-09  Matthew Daiter  <mdaiter@apple.com>
1517
1518         Implementing platform-specific section of enumerateDevices
1519         https://bugs.webkit.org/show_bug.cgi?id=146461
1520         <rdar://problem/21614466>
1521
1522         Reviewed by Darin Adler.
1523
1524         * Modules/mediastream/MediaDeviceInfo.cpp: Changed access methods
1525         (WebCore::MediaDeviceInfo::audioInputType): Added AtomicString
1526         permanent refs
1527         (WebCore::MediaDeviceInfo::audioOutputType): Ditto
1528         (WebCore::MediaDeviceInfo::videoInputType): Ditto
1529         * Modules/mediastream/MediaDeviceInfo.h: Changed String refs to values
1530         (WebCore::MediaDeviceInfo::label): Ditto
1531         (WebCore::MediaDeviceInfo::deviceId): Ditto
1532         (WebCore::MediaDeviceInfo::groupId): Ditto
1533         (WebCore::MediaDeviceInfo::kind): Ditto
1534         * platform/mediastream/MediaDevicesPrivate.cpp: Implemented query for
1535         available devices
1536         (WebCore::MediaDevicesPrivate::MediaDevicesPrivate):
1537         (WebCore::MediaDevicesPrivate::create):
1538         (WebCore::MediaDevicesPrivate::availableMediaDevices):
1539         * platform/mediastream/MediaDevicesPrivate.h:
1540         (WebCore::MediaDevicesPrivate::~MediaDevicesPrivate):
1541         * WebCore.xcodeproj/project.pbxproj:
1542         * platform/mediastream/MediaStreamTrackSourcesRequestClient.h: Needed
1543         to tack on extra fields to hold data
1544         (WebCore::TrackSourceInfo::create):
1545         (WebCore::TrackSourceInfo::groupId):
1546         (WebCore::TrackSourceInfo::deviceId):
1547         (WebCore::TrackSourceInfo::TrackSourceInfo):
1548         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
1549         (WebCore::AVCaptureDeviceManager::getSourcesInfo):
1550
1551 2015-07-09  Per Arne Vollan  <peavo@outlook.com>
1552
1553         [Win] Add memory pressure handler.
1554         https://bugs.webkit.org/show_bug.cgi?id=146685
1555
1556         Reviewed by Brent Fulgham.
1557
1558         Add memory pressure handler implementation on Windows.
1559         We check the memory usage at regular intervals with a timer.
1560
1561         * WebCore.vcxproj/WebCore.vcxproj:
1562         * WebCore.vcxproj/WebCore.vcxproj.filters:
1563         * platform/MemoryPressureHandler.cpp:
1564         (WebCore::MemoryPressureHandler::releaseMemory):
1565         (WebCore::MemoryPressureHandler::install):
1566         (WebCore::MemoryPressureHandler::uninstall):
1567         (WebCore::MemoryPressureHandler::holdOff):
1568         * platform/win/MemoryPressureHandlerWin.cpp: Added.
1569         (WebCore::CheckMemoryTimer::CheckMemoryTimer):
1570         (WebCore::CheckMemoryTimer::fired):
1571         (WebCore::CheckMemoryTimer::handleMemoryLow):
1572         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1573         (WebCore::memCheckTimer):
1574         (WebCore::MemoryPressureHandler::install):
1575         (WebCore::MemoryPressureHandler::uninstall):
1576         (WebCore::MemoryPressureHandler::holdOff):
1577         (WebCore::MemoryPressureHandler::respondToMemoryPressure):
1578         (WebCore::MemoryPressureHandler::ReliefLogger::platformMemoryUsage):
1579         (WebCore::MemoryPressureHandler::ReliefLogger::platformLog):
1580         * platform/win/Win32Handle.h:
1581         (WebCore::Win32Handle::operator=):
1582
1583 2015-07-09  Matthew Daiter  <mdaiter@apple.com>
1584
1585         Exposed AVVideoCaptureSource's bounds
1586         https://bugs.webkit.org/show_bug.cgi?id=146760
1587         <rdar://problem/21736772>
1588
1589         Reviewed by Brent Fulgham.
1590
1591         * platform/mediastream/mac/AVVideoCaptureSource.h:
1592         (WebCore::AVVideoCaptureSource::width): Needed access to video width
1593         (WebCore::AVVideoCaptureSource::height): Needed access to video height
1594
1595 2015-07-09  Karlen Simonyan  <szkarlen@gmail.com>
1596
1597         [WinCairo] ClearType should be enabled on Cairo port
1598         https://bugs.webkit.org/show_bug.cgi?id=145492
1599
1600         Reviewed by Brent Fulgham.
1601
1602         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
1603         (WebCore::FontPlatformData::FontPlatformData):
1604         Use CAIRO_ANTIALIAS_BEST instead of CAIRO_ANTIALIAS_GRAY.
1605
1606 2015-07-02  Chris Fleizach  <cfleizach@apple.com>
1607
1608         AX: <details> element should allow expand/close through AX API
1609         https://bugs.webkit.org/show_bug.cgi?id=146549
1610
1611         Reviewed by Mario Sanchez Prada.
1612
1613         Allow AXExpanded to be writeable for <details> element, which, when set
1614         will toggle the opening and closing of the element. 
1615         Post a notification when that happens as well.
1616
1617         Modified test: platform/mac/accessibility/details-summary.html
1618
1619         * accessibility/AccessibilityNodeObject.cpp:
1620         (WebCore::AccessibilityNodeObject::hierarchicalLevel):
1621         (WebCore::AccessibilityNodeObject::setIsExpanded):
1622         (WebCore::shouldUseAccessibilityObjectInnerText):
1623         * accessibility/AccessibilityNodeObject.h:
1624         * accessibility/AccessibilityObject.cpp:
1625         (WebCore::AccessibilityObject::supportsPressAction):
1626         * accessibility/AccessibilityRenderObject.cpp:
1627         (WebCore::AccessibilityRenderObject::canSetExpandedAttribute):
1628         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1629         (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
1630         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
1631         * html/HTMLDetailsElement.cpp:
1632         (WebCore::HTMLDetailsElement::toggleOpen):
1633
1634 2015-07-09  Alex Christensen  <achristensen@webkit.org>
1635
1636         [Content Extensions] Prevent crashes with plugins.
1637         https://bugs.webkit.org/show_bug.cgi?id=146705
1638         rdar://problem/20855444
1639
1640         Reviewed by Brady Eidson.
1641
1642         * loader/NetscapePlugInStreamLoader.cpp:
1643         (WebCore::NetscapePlugInStreamLoader::create):
1644         Call addPlugInStreamLoader in ResourceLoader::willSendRequest to always add blocked loads.
1645         * loader/NetscapePlugInStreamLoader.h:
1646         * loader/ResourceLoader.cpp:
1647         (WebCore::ResourceLoader::willSendRequest):
1648         Removed unnecessary early returns.
1649         * loader/ResourceLoader.h:
1650         (WebCore::ResourceLoader::isPlugInStreamLoader):
1651
1652 2015-07-09  Brent Fulgham  <bfulgham@apple.com>
1653
1654         [Win] Honor CACFLayer content scale factor
1655         https://bugs.webkit.org/show_bug.cgi?id=146792
1656
1657         Reviewed by Dean Jackson.
1658
1659         * AVFoundationSupport.py: Check for the CACFLayerSet/GetContentsScale
1660         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1661         (PlatformCALayerWin::PlatformCALayerWin): Use owner's scale factor (if
1662         present).
1663         (PlatformCALayerWin::contentsScale): Use CACFLayer API if present.
1664         (PlatformCALayerWin::setContentsScale): Ditto.
1665         * platform/graphics/ca/win/PlatformCALayerWinInternal.cpp:
1666         (PlatformCALayerWinInternal::PlatformCALayerWinInternal): Use owner's scale
1667         factor (if present).
1668         (PlatformCALayerWinInternal::addTile): Use tile parent's scale factor.
1669
1670 2015-07-08  Matt Rajca  <mrajca@apple.com>
1671
1672         Media Session: report to chrome client 'hasActiveMediaElements' changes
1673         https://bugs.webkit.org/show_bug.cgi?id=146745
1674
1675         Reviewed by Eric Carlson.
1676
1677         * Modules/mediasession/MediaSession.cpp: All updates to active media elements are now funneled through a helper
1678           method that will invoke the 'hasMediaSessionWithActiveMediaElementsDidChange' callback when necessary.
1679         (WebCore::MediaSession::removeMediaElement):
1680         (WebCore::MediaSession::changeActiveMediaElements):
1681         (WebCore::MediaSession::addActiveMediaElement):
1682         (WebCore::MediaSession::releaseSession):
1683         * Modules/mediasession/MediaSession.h:
1684         * Modules/mediasession/MediaSessionManager.cpp:
1685         (WebCore::MediaSessionManager::hasActiveMediaElements):
1686         * Modules/mediasession/MediaSessionManager.h:
1687
1688 2015-07-09  Darin Adler  <darin@apple.com>
1689
1690         REGRESSION (r182866): repeated prompts for password on internal Apple website using workers
1691         https://bugs.webkit.org/show_bug.cgi?id=146769
1692
1693         Reviewed by Sam Weinig.
1694
1695         Not sure how to make a regression test for this. Sure would be nice to have one though.
1696
1697         * loader/ThreadableLoader.cpp:
1698         (WebCore::ThreadableLoaderOptions::ThreadableLoaderOptions): Added. Calls through to the
1699         base class copy constructor to copy data members of the base class (the lack of this was
1700         the bug). Also initializes all the data members of this class.
1701         (WebCore::ThreadableLoaderOptions::isolatedCopy): Changed to call the constructor above.
1702
1703         * loader/ThreadableLoader.h: Added new constructor.
1704
1705 2015-07-09  Chris Fleizach  <cfleizach@apple.com>
1706
1707         AX: VoiceOver cannot get to any content in Yahoo Mail messages table
1708         https://bugs.webkit.org/show_bug.cgi?id=146674
1709
1710         Reviewed by Darin Adler.
1711
1712         A table row could have any number of parent elements in the render tree, but for the purposes
1713         of accessibility we only want to report the AXTable as the parent so that it looks like a sane
1714         data table.
1715
1716         Test: accessibility/aria-table-with-presentational-elements.html
1717
1718         * accessibility/AccessibilityARIAGridRow.cpp:
1719         (WebCore::AccessibilityARIAGridRow::disclosedByRow):
1720         (WebCore::AccessibilityARIAGridRow::parentObjectUnignored):
1721         (WebCore::AccessibilityARIAGridRow::parentTable):
1722         * accessibility/AccessibilityARIAGridRow.h:
1723
1724 2015-07-08  Sungmann Cho  <sungmann.cho@navercorp.com>
1725
1726         [GTK] The "Missing Plug-in" buttons are not showing up on some flash contents.
1727         https://bugs.webkit.org/show_bug.cgi?id=146707
1728
1729         Reviewed by Martin Robinson.
1730
1731         Currently, WebKitGTK+ doesn't show the "Missing Plug-in" buttons if the plugin-related tags
1732         don't have a "type" attribute. In such a case, WebCore tries to guess the MIME type from
1733         the extensions by using MIMETypeRegistry::getMIMETypeForExtension(). For WebKitGTK+,
1734         MIMETypeRegistry::getMIMETypeForExtension() goes through |extensionMap|, which is a simple
1735         array of <extension, mime type>, looking for the mime type for the given extension.
1736         But |extensionMap| in MIMETypeRegistryGtk.cpp doesn't have the information for ".swf",
1737         so WebCore fails to guess the MIME type and regard the content type as ObjectContentFrame,
1738         not ObjectContentNetscapePlugin.
1739
1740         * platform/gtk/MIMETypeRegistryGtk.cpp:
1741
1742 2015-07-08  Brady Eidson  <beidson@apple.com>
1743
1744         Crash calling [WebView close] in didFinishLoadForFrame callback.
1745         <rdar://problem/21690765> and https://bugs.webkit.org/show_bug.cgi?id=146773
1746
1747         Reviewed by David Kilzer.
1748
1749         Added API Test "WebViewCloseInsideDidFinishLoadForFrame"
1750
1751         * loader/FrameLoader.cpp:
1752         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): After the delegate callback,
1753           don't use the local Page* variable from earlier, but instead refetch it from m_frame.
1754
1755 2015-07-08  Daniel Bates  <dabates@apple.com>
1756
1757         Cleanup: Make ContentSecurityPolicy::ReportingStatus an enum class
1758         https://bugs.webkit.org/show_bug.cgi?id=146670
1759
1760         Reviewed by Darin Adler.
1761
1762         Make calling the ContentSecurityPolicy::allow* functions less error prone by making
1763         ContentSecurityPolicy::ReportingStatus an enum class. Among other benefits this will
1764         prevent a caller from inadvertently passing an enumerator of ContentSecurityPolicy::ReportingStatus
1765         as the boolean argument overridingContentSecurityPolicy, which is taken by the various
1766         ContentSecurityPolicy::allow* functions, by causing a compile-time error (since an enum class
1767         enumerator cannot be implicitly converted to an integral type).
1768
1769         * bindings/js/ScriptController.cpp:
1770         (WebCore::ScriptController::initScript):
1771         * page/ContentSecurityPolicy.cpp:
1772         (WebCore::CSPDirectiveList::allowJavaScriptURLs):
1773         (WebCore::CSPDirectiveList::allowInlineEventHandlers):
1774         (WebCore::CSPDirectiveList::allowInlineScript):
1775         (WebCore::CSPDirectiveList::allowInlineStyle):
1776         (WebCore::CSPDirectiveList::allowEval):
1777         (WebCore::CSPDirectiveList::allowPluginType):
1778         (WebCore::CSPDirectiveList::allowScriptFromSource):
1779         (WebCore::CSPDirectiveList::allowObjectFromSource):
1780         (WebCore::CSPDirectiveList::allowChildFrameFromSource):
1781         (WebCore::CSPDirectiveList::allowImageFromSource):
1782         (WebCore::CSPDirectiveList::allowStyleFromSource):
1783         (WebCore::CSPDirectiveList::allowFontFromSource):
1784         (WebCore::CSPDirectiveList::allowMediaFromSource):
1785         (WebCore::CSPDirectiveList::allowConnectToSource):
1786         (WebCore::CSPDirectiveList::allowFormAction):
1787         (WebCore::CSPDirectiveList::allowBaseURI):
1788         (WebCore::ContentSecurityPolicy::didReceiveHeader):
1789         (WebCore::ContentSecurityPolicy::evalDisabledErrorMessage):
1790         * page/ContentSecurityPolicy.h:
1791         * page/DOMSecurityPolicy.cpp:
1792         (WebCore::DOMSecurityPolicy::allowsEval):
1793
1794 2015-07-08  Matthew Daiter  <mdaiter@apple.com>
1795
1796         Activate DOMURLMediaStream
1797         https://bugs.webkit.org/show_bug.cgi?id=146764
1798         <rdar://problem/21738101>
1799
1800         Reviewed by Eric Carlson.
1801
1802         * DerivedSources.make: Added DOMURLMediaStream.idl to list
1803         * WebCore.xcodeproj/project.pbxproj: Added DOMURLMediaStream.cpp and
1804         DOMURLMediaStream.h to compile
1805
1806 2015-07-08  Matthew Daiter  <mdaiter@apple.com>
1807
1808         Make sure MediaStream uses blob protocol
1809         https://bugs.webkit.org/show_bug.cgi?id=146752
1810         <rdar://problem/21736057>
1811
1812         Reviewed by Eric Carlson.
1813
1814         * html/HTMLMediaElement.cpp:
1815         (WebCore::HTMLMediaElement::selectNextSourceChild): Added MediaStream
1816         blob protocol
1817
1818 2015-07-08  Andreas Kling  <akling@apple.com>
1819
1820         Videos on apple.com don't show up when restored from page cache.
1821         <https://webkit.org/b/146766>
1822         <rdar://problem/21712311>
1823
1824         Reviewed by Darin Adler.
1825
1826         Break out most of HTMLMediaElement::stop() (override of ActiveDOMObject::stop(), to be clear)
1827         into a stopWithoutDestroyingMediaPlayer() function that both stop() and suspend() can call.
1828
1829         Before this change, suspend() would call stop() when moving into the page cache, killing the
1830         internal MediaPlayer object which caused the video to disappear from the page.
1831
1832         Test: LayoutTests/media/restore-from-page-cache.html (amended)
1833
1834         * html/HTMLMediaElement.cpp:
1835         (WebCore::HTMLMediaElement::stopWithoutDestroyingMediaPlayer):
1836         (WebCore::HTMLMediaElement::stop):
1837         (WebCore::HTMLMediaElement::suspend):
1838         * html/HTMLMediaElement.h:
1839
1840 2015-07-08  Matthew Daiter  <mdaiter@apple.com>
1841
1842         Make MediaStream conform to its private client like MediaSource does
1843         https://bugs.webkit.org/show_bug.cgi?id=146756
1844         <rdar://problem/21736457>
1845
1846         Reviewed by Brent Fulgham.
1847
1848         MediaStream should be inheriting its PrivateClient's getters and
1849         setters for RefCounted, not inheriting its own.
1850
1851         * Modules/mediastream/MediaStream.h: Changed MediaStream's inherit
1852         statements
1853         * platform/mediastream/MediaStreamPrivate.h: Changed
1854         MediaStreamPrivateClient to inherit RefCounted<MediaStreamPrivateClient>
1855
1856 2015-07-08  Matthew Daiter  <mdaiter@apple.com>
1857
1858         Made AVMediaCaptureSource's session accessor public
1859         https://bugs.webkit.org/show_bug.cgi?id=146758
1860         <rdar://problem/21736651>
1861
1862         Reviewed by Brent Fulgham.
1863
1864         * platform/mediastream/mac/AVMediaCaptureSource.h:
1865         (WebCore::AVMediaCaptureSource::session): Changed to public
1866
1867 2015-07-08  Matthew Daiter  <mdaiter@apple.com>
1868
1869         Make sure MediaStream engine loaded for interpreting MediaStreams
1870         https://bugs.webkit.org/show_bug.cgi?id=146748
1871         <rdar://problem/21735416>
1872
1873         Reviewed by Brent Fulgham.
1874
1875         Prevent the MediaSource engine from being used to process
1876         MediaStreams, since they are not compatible
1877
1878         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 
1879         (WebCore::MediaPlayerPrivateAVFoundationObjC::supportsType):
1880         Changed MediaStream to never be loaded
1881         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1882         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1883         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsType): 
1884         Changed MediaStream to never be loaded
1885
1886
1887 2015-07-08  Benjamin Poulain  <bpoulain@apple.com>
1888
1889         [Content Extensions] Fuse undistinguishable actions as much as possible
1890         https://bugs.webkit.org/show_bug.cgi?id=146762
1891
1892         Reviewed by Alex Christensen.
1893
1894         Our previous code that fused actions was based on test lists that were
1895         grouping similar actions in the input.
1896
1897         The input we get from developers is more distributed. It is very common to
1898         have trigger flags all over the place, and "css-display-none" mixed with "block".
1899
1900         This patch refines the merging code to merge those cases as much as possible.
1901
1902         The size taken by the actions is negligible, but having different actions make
1903         nodes unkillable by the Minimizer. By merging many more actions, the minimizer
1904         no longer see those subtrees as distinguishable and can do a better job.
1905
1906         On a large test list, this cuts the bytecode size by 2 megabytes.
1907
1908         Tests: http/tests/contentextensions/css-display-none-after-ignore-previous-rules.html
1909                http/tests/contentextensions/single-css-display-none.html
1910
1911         * contentextensions/ContentExtensionCompiler.cpp:
1912         (WebCore::ContentExtensions::resolvePendingDisplayNoneActions):
1913         (WebCore::ContentExtensions::serializeActions):
1914
1915 2015-07-08  Matthew Daiter  <mdaiter@apple.com>
1916
1917         Cleared contentMIMETypes for MediaStreams
1918         https://bugs.webkit.org/show_bug.cgi?id=146750
1919         <rdar://problem/21735678>
1920
1921         Reviewed by Brent Fulgham.
1922
1923         * platform/graphics/MediaPlayer.cpp:
1924         (WebCore::MediaPlayer::load): Needed to clear contentMIMETypes
1925
1926 2015-07-08  Dean Jackson  <dino@apple.com>
1927
1928         Audio elements with controls force their enclosing stacking context to composite
1929         https://bugs.webkit.org/show_bug.cgi?id=146751
1930         <rdar://problem/21466572>
1931
1932         Reviewed by Simon Fraser.
1933
1934         There were a number of issues with audio controls, on both iOS and OS X.
1935
1936         - they used a blurry background which was not the intended design
1937         - they cause the page to composite, which causes a degradation in
1938           text rendering quality
1939         - they inserted 20px of padding above every audio element, which
1940           could break existing page designs.
1941
1942         Removing the need for compositing and blending means that the
1943         colors used for control tints need to be adjusted for the non-blended
1944         case. Wherever I could, I kept as much as possible in a shared
1945         rule and made specific changes for audio or video.
1946
1947         The controls were also unintentionally relying on the compositing
1948         to create stacking contexts and control the rendering order. Without
1949         them, I needed to add some explicit stacking.
1950
1951         I also made some drive-by whitespace clean-ups.
1952
1953         * Modules/mediacontrols/mediaControlsApple.css: Remove as much compositing
1954         as possible in audio controls.
1955
1956         * Modules/mediacontrols/mediaControlsApple.js:
1957         (Controller.prototype.drawTimelineBackground): Use specific colors for audio.
1958
1959         * Modules/mediacontrols/mediaControlsiOS.css: Remove as much need for compositing
1960         as possible.
1961
1962 2015-07-08  Said Abou-Hallawa  <sabouhallawa@apple.com>
1963
1964         Crash when appending an SVG <use> element dynamically which has animated SVG <path> element
1965         https://bugs.webkit.org/show_bug.cgi?id=146690
1966         <rdar://problem/20790376>
1967
1968         Reviewed by Dean Jackson.
1969
1970         Test: svg/animations/insert-animate-use-path-while-animation.svg
1971
1972         The crashing call stack shows that
1973         SVGAnimatedListPropertyTearOff<SVGPathSegList>::m_animVal is null when
1974         trying to access it in synchronizeWrappersIfNeeded(). This happens because
1975         animationStarted() was not called for this animatedType.
1976         
1977         SVGAnimateElementBase::resetAnimatedType() calls
1978         SVGAnimatedPathAnimator::startAnimValAnimation() at the beginning of the
1979         animation. For the target element and all its instances, this function calls
1980         SVGAnimatedPathSegListPropertyTearOff::animationStarted() which calls
1981         SVGAnimatedListPropertyTearOff<SVGPathSegList>::animationStarted(). This
1982         last function allocates the member m_animVal when calling
1983         SVGAnimatedListPropertyTearOff<SVGPathSegList>::animVal(). 
1984         
1985         When adding a new instance of the same animating target element, 
1986         SVGAnimateElementBase::resetAnimatedType() just keeps calling
1987         SVGAnimatedPathAnimator::animValDidChange() for all the instances of the
1988         targetElement without ensuring that all of them have started their
1989         animations.
1990         
1991         The fix is to make SVGAnimatedPathAnimator::resetAnimValToBaseVal() ensure
1992         that animationStarted() is called for the targetElement and all its instances.
1993
1994         * svg/SVGAnimatedPath.cpp:
1995         (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation): Move resetting
1996         the animation value and starting the animatedTypes code to a new overriding
1997         function which is named resetAnimValToBaseVal().
1998         
1999         (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal): Call the overriding
2000         function which calls buildSVGPathByteStreamFromSVGPathSegList() as before
2001         and ensure that all the animatedTypes have started their animations.
2002         
2003         * svg/SVGAnimatedPath.h:
2004
2005 2015-07-08  Brady Eidson  <beidson@apple.com>
2006
2007         Move PingLoaders to the NetworkingProcess.
2008         <rdar://problem/18860263> and https://bugs.webkit.org/show_bug.cgi?id=146710
2009
2010         Reviewed by Tim Horton.
2011
2012         No new tests.
2013         There's no current solution for communicating back to a page that a ping load has reached its target.
2014         Until we have such a solution, any attempt at a layout test will be fragile at best.
2015
2016         * WebCore.xcodeproj/project.pbxproj:
2017         
2018         * loader/LoaderStrategy.cpp:
2019         (WebCore::LoaderStrategy::createPingHandle): Default implementation is create the PingHandle directly.
2020         * loader/LoaderStrategy.h:
2021
2022         PingLoader becomes a static class for now that crafts the ResourceRequest then passes it off
2023         to the LoaderStrategy:        
2024         * loader/PingLoader.cpp:
2025         (WebCore::PingLoader::loadImage):
2026         (WebCore::PingLoader::sendPing):
2027         (WebCore::PingLoader::sendViolationReport):
2028         (WebCore::PingLoader::startPingLoad):
2029         (WebCore::PingLoader::createPingLoader): Deleted.
2030         (WebCore::PingLoader::PingLoader): Deleted.
2031         (WebCore::PingLoader::~PingLoader): Deleted.
2032         * loader/PingLoader.h:
2033         (WebCore::PingLoader::timeoutTimerFired): Deleted.
2034
2035         PingHandle does what PingLoader used to - It's a basic ResourceHandleClient that simply waits
2036         for any response/completion/failure and then deletes itself.
2037         * platform/network/PingHandle.h: Added.
2038         (WebCore::PingHandle::PingHandle):
2039         (WebCore::PingHandle::usesAsyncCallbacks):
2040         (WebCore::PingHandle::timeoutTimerFired):
2041         (WebCore::PingHandle::~PingHandle):
2042
2043 2015-07-08  Csaba Osztrogonác  <ossy@webkit.org>
2044
2045         Add new sources to StyleAllInOne.cpp
2046         https://bugs.webkit.org/show_bug.cgi?id=146584
2047
2048         Reviewed by Brent Fulgham.
2049
2050         * WebCore.vcxproj/WebCore.vcxproj:
2051         * rendering/style/StyleAllInOne.cpp:
2052
2053 2015-07-08  Csaba Osztrogonác  <ossy@webkit.org>
2054
2055         Add new sources to DOMAllInOne.cpp
2056         https://bugs.webkit.org/show_bug.cgi?id=146587
2057
2058         Reviewed by Brent Fulgham.
2059
2060         * WebCore.vcxproj/WebCore.vcxproj:
2061         * dom/DOMAllInOne.cpp:
2062
2063 2015-07-08  Csaba Osztrogonác  <ossy@webkit.org>
2064
2065         Add new sources to AccessibilityAllInOne.cpp
2066         https://bugs.webkit.org/show_bug.cgi?id=146582
2067
2068         Reviewed by Brent Fulgham.
2069
2070         * WebCore.vcxproj/WebCore.vcxproj:
2071         * accessibility/AccessibilityAllInOne.cpp:
2072
2073 2015-07-08  Eric Carlson  <eric.carlson@apple.com>
2074
2075         [Mac] Two clicks required to enable AirPlay at youtube.com
2076         https://bugs.webkit.org/show_bug.cgi?id=146733
2077         <rdar://problem/21556356>
2078
2079         Reviewed by Brent Fulgham.
2080
2081         * Modules/mediasession/WebMediaSessionManager.cpp:
2082         (WebCore::WebMediaSessionManager::clientStateDidChange): Only log when state has changed.
2083           Don't steal the route if another client is actively playing to the device.
2084         (WebCore::WebMediaSessionManager::setPlaybackTarget): Set m_targetChanged.
2085         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Don't consider the
2086           requestedPicker flag until after a target change.
2087         * Modules/mediasession/WebMediaSessionManager.h:
2088
2089         * html/HTMLMediaElement.cpp:
2090         (WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker): Add logging.
2091         (WebCore::HTMLMediaElement::setShouldPlayToPlaybackTarget): Ditto.
2092
2093         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2094         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Always log.
2095
2096 2015-07-08  Zalan Bujtas  <zalan@apple.com>
2097
2098         Do not waste window server memory for placeholder windows initiated by ThemeMac.
2099         https://bugs.webkit.org/show_bug.cgi?id=146730
2100         rdar://problem/20321222
2101
2102         Using defer:YES prevents us from wasting any window server resources for WebCoreThemeWindow(s).
2103
2104         Patch by Darin Adler.
2105         Reviewed by Zalan Bujtas.
2106
2107         Not testable.
2108
2109         * platform/mac/ThemeMac.mm:
2110         (-[WebCoreThemeView window]):
2111
2112 2015-07-08  Xabier Rodriguez Calvar  <calvaris@igalia.com>
2113
2114         [GTK] Deactivate GObject bindings for static methods
2115         https://bugs.webkit.org/show_bug.cgi?id=146717
2116
2117         Reviewed by Carlos Garcia Campos.
2118
2119         Static methods are currently not supported by GObject bindings so we deactivate them from the generation.
2120
2121         Current tests suffice. Expectations updated.
2122
2123         * bindings/scripts/CodeGeneratorGObject.pm:
2124         (SkipFunction): Skip isStatic functions.
2125         * bindings/scripts/test/GObject/WebKitDOMTestInterface.h:
2126         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
2127         (webkit_dom_test_interface_implements_method4): Deleted.
2128         (webkit_dom_test_interface_supplemental_method4): Deleted.
2129         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2130         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2131         (webkit_dom_test_obj_class_method): Deleted.
2132         (webkit_dom_test_obj_class_method_with_optional): Deleted.
2133         (webkit_dom_test_obj_overloaded_method1): Deleted.
2134
2135 2015-07-07  Benjamin Poulain  <bpoulain@apple.com>
2136
2137         Remove the overflow checks from the important vectors used by the content extensions machines
2138         https://bugs.webkit.org/show_bug.cgi?id=146703
2139
2140         Reviewed by Andreas Kling.
2141
2142         Most of the overflow checks cannot be eliminated by clang. Removing them
2143         explicitly removes 400 ms from the compile time of a very large test list.
2144
2145         * contentextensions/ContentExtensionsDebugging.h:
2146         * contentextensions/DFA.h:
2147         * contentextensions/DFACombiner.cpp:
2148         * contentextensions/DFAMinimizer.cpp:
2149         * contentextensions/ImmutableNFA.h:
2150         * contentextensions/MutableRangeList.h:
2151         * contentextensions/NFAToDFA.cpp:
2152         (WebCore::ContentExtensions::epsilonClosureExcludingSelf):
2153         (WebCore::ContentExtensions::resolveEpsilonClosures):
2154         (WebCore::ContentExtensions::extendSetWithClosure):
2155         (WebCore::ContentExtensions::DataConverterWithEpsilonClosure::convert):
2156         (WebCore::ContentExtensions::DataConverterWithEpsilonClosure::extend):
2157         (WebCore::ContentExtensions::createCombinedTransition):
2158         (WebCore::ContentExtensions::getOrCreateDFANode):
2159         (WebCore::ContentExtensions::NFAToDFA::convert):
2160
2161 2015-07-07  Dean Jackson  <dino@apple.com>
2162
2163         [iOS] MediaControls: Start Play and Can't Play buttons need to be cutout and blurred
2164         https://bugs.webkit.org/show_bug.cgi?id=146226
2165
2166         Reviewed by Simon Fraser.
2167
2168         This patch takes what Said Abou-Hallawa posted in an earlier revision and
2169         makes a few tweaks to workaround the bugs he's listed.
2170
2171         Replicate the iOS System blur backdrop in pure CSS, so that the large
2172         start button looks more correct. Also add artwork for a failure state.
2173
2174         * Modules/mediacontrols/mediaControlsiOS.css: New style rules for the start
2175         button, which now is a collection of elements rather than a <button>.
2176         (video::-webkit-media-controls-start-playback-button):
2177         (video::-webkit-media-controls-start-playback-background):
2178         (video::-webkit-media-controls-start-playback-tint):
2179
2180         * Modules/mediacontrols/mediaControlsiOS.js:
2181         (ControllerIOS.prototype.createBase): Replace the <button> with the hierarchy of
2182         elements to replicate the blur. Give some of them a class attribute, so they
2183         can match selectors (see the bugs Said filed in the original bugzilla).
2184         (ControllerIOS.prototype.handleStartPlaybackButtonTouchStart): Toggle classes on
2185         the hierarchy as needed.
2186         (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Ditto.
2187         (ControllerIOS.prototype.updateStatusDisplay): Ditto.
2188
2189 2015-07-07  Zalan Bujtas  <zalan@apple.com>
2190
2191         Crash when parent iframe is set to display none and the child frame is mutated the same time.
2192         https://bugs.webkit.org/show_bug.cgi?id=146699
2193         rdar://problem/16207881
2194
2195         Reviewed by Andreas Kling.
2196
2197         When the parent iframe is set to display: none, we destroy the associated renderer (RenderIFrame).
2198         However if the child frame is mutated the same time, during layout we try to access this RenderIFrame
2199         to check whether it needs frame flattening.
2200         This patch checks whether the parent render widget is still valid.
2201
2202         Test: fast/frames/crash-display-none-iframe-during-onbeforeload.html
2203
2204         * page/FrameView.cpp:
2205         (WebCore::FrameView::isInChildFrameWithFrameFlattening): rearrange early returns.
2206
2207 2015-07-06  Matt Rajca  <mrajca@apple.com>
2208
2209         Media Session: remove seek forward/backward attributes
2210         https://bugs.webkit.org/show_bug.cgi?id=146645
2211
2212         Reviewed by Eric Carlson.
2213
2214         * Modules/mediasession/MediaRemoteControls.h:
2215         * Modules/mediasession/MediaRemoteControls.idl:
2216
2217 2015-07-07  Brent Fulgham  <bfulgham@apple.com>
2218
2219         REGRESSION (r183133-r183138): Secondary clicking in whitespace selects preceding word
2220         https://bugs.webkit.org/show_bug.cgi?id=146695
2221         <rdar://problem/21441466>
2222
2223         Reviewed by Tim Horton.
2224
2225         When we would currently use dictionary lookup to decide on our text selection, first check if we
2226         are targeting an editable field. If we are, use the original selection behavior. Otherwise, use
2227         the new "dictionary lookup" selection.
2228
2229         * page/EventHandler.cpp:
2230         (WebCore::EventHandler::selectClosestContextualWordOrLinkFromMouseEvent): Only use dictionary lookup
2231         when our target node is not editable.
2232         
2233
2234 2015-07-07  Brady Eidson  <beidson@apple.com>
2235
2236         Another attempt to fix CURL/Soup builds after r186476
2237
2238         Reviewed by NOBODY.
2239
2240         * platform/network/curl/SocketStreamHandle.h:
2241
2242         * platform/network/soup/SocketStreamHandle.h:
2243
2244 2015-07-07  Brady Eidson  <beidson@apple.com>
2245
2246         Attempt to fix CURL/Soup builds after r186476
2247
2248         Reviewed by NOBODY.
2249
2250         * platform/network/curl/SocketStreamHandle.h:
2251         (WebCore::SocketStreamHandle::create):
2252
2253         * platform/network/soup/SocketStreamHandle.h:
2254         (WebCore::SocketStreamHandle::create):
2255
2256 2015-07-07  Brady Eidson  <beidson@apple.com>
2257
2258         HTTP Auth cached after disabling private browsing/reset.
2259         <rdar://problem/8293055> and https://bugs.webkit.org/show_bug.cgi?id=146654
2260
2261         Reviewed by Tim Horton.
2262
2263         Test: http/tests/security/private-browsing-http-auth.html
2264
2265         - Change most static CredentialStorage methods to be instance methods instead.
2266         - Make a CredentialStorage objects be per-NetworkStorageSession.
2267
2268         * Modules/websockets/WebSocketChannel.cpp:
2269         (WebCore::WebSocketChannel::WebSocketChannel):
2270         (WebCore::WebSocketChannel::connect): Only start the web socket load if a networking
2271           context is available.
2272
2273         * platform/network/CredentialStorage.cpp:
2274         (WebCore::CredentialStorage::defaultCredentialStorage): Returns the credential storage
2275           from the default NetworkStorageSession.
2276         (WebCore::CredentialStorage::set):
2277         (WebCore::CredentialStorage::get):
2278         (WebCore::CredentialStorage::remove):
2279         (WebCore::CredentialStorage::findDefaultProtectionSpaceForURL):
2280         (WebCore::CredentialStorage::clearCredentials):
2281         (WebCore::protectionSpaceToCredentialMap): Deleted.
2282         (WebCore::originsWithCredentials): Deleted.
2283         (WebCore::pathToDefaultProtectionSpaceMap): Deleted.
2284         (WebCore::findDefaultProtectionSpaceForURL): Deleted.
2285         (WebCore::CredentialStorage::setPrivateMode): Deleted. Was a no-op anyways.
2286         * platform/network/CredentialStorage.h:
2287         
2288         * platform/network/NetworkStorageSession.h:
2289         (WebCore::NetworkStorageSession::credentialStorage):
2290         
2291         * platform/network/cf/ResourceHandleCFNet.cpp:
2292         (WebCore::ResourceHandle::createCFURLConnection):
2293         (WebCore::ResourceHandle::willSendRequest):
2294         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2295         (WebCore::ResourceHandle::receivedCredential):
2296         
2297         * platform/network/cf/SocketStreamHandle.h:
2298         (WebCore::SocketStreamHandle::create):
2299         * platform/network/cf/SocketStreamHandleCFNet.cpp:
2300         (WebCore::SocketStreamHandle::SocketStreamHandle):
2301         (WebCore::SocketStreamHandle::getStoredCONNECTProxyCredentials):
2302         (WebCore::getStoredCONNECTProxyCredentials): Deleted.
2303         
2304         * platform/network/curl/ResourceHandleCurl.cpp:
2305         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2306         (WebCore::ResourceHandle::receivedCredential):
2307         * platform/network/curl/ResourceHandleManager.cpp:
2308         (WebCore::ResourceHandleManager::applyAuthenticationToRequest):
2309         
2310         * platform/network/mac/ResourceHandleMac.mm:
2311         (WebCore::ResourceHandle::createNSURLConnection):
2312         (WebCore::ResourceHandle::willSendRequest):
2313         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2314         (WebCore::ResourceHandle::receivedCredential):
2315         
2316         * platform/network/soup/ResourceHandleSoup.cpp:
2317         (WebCore::applyAuthenticationToRequest):
2318         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
2319         (WebCore::ResourceHandle::receivedCredential):
2320         
2321 2015-07-07  Zalan Bujtas  <zalan@apple.com>
2322
2323         REGRESSION(169105): CSS Regions: renderer returns wrong selection root when it is inside a column flow.
2324         https://bugs.webkit.org/show_bug.cgi?id=146529
2325         rdar://problem/21613670
2326
2327         Reviewed by Mihnea Ovidenie and David Kilzer.
2328
2329         This patch ensures that RenderObject::selectionRoot() handles column flows properly while searching for the associated
2330         selection root.
2331         When the renderer is inside a column flow and the column flow is part of a named flow, we stop
2332         traversing the ancestor chain, searching for the selection root, when we reach the column flow.
2333         Since the column flow is not a selection root, we mistakenly fall back to the RenderView as selection root.
2334         Instead, we should check if the column is inside a named flow and return the selection root accordingly.
2335         Returning the wrong selection root confuses RenderView::splitSelectionBetweenSubtrees() logic and this particular
2336         RenderObject could end up in multiple selection trees.
2337
2338         Test: fast/regions/selection/crash-when-element-is-inside-column-and-the-containing-block-is-inside-flow.html
2339
2340         * rendering/RenderObject.cpp:
2341         (WebCore::RenderObject::selectionRoot):
2342
2343 2015-07-07  Brent Fulgham  <bfulgham@apple.com>
2344
2345         [Mac] REGRESSION (r184794): Play/Pause control doesn't update state in full screen
2346         https://bugs.webkit.org/show_bug.cgi?id=146689
2347         <rdar://problem/21393490>
2348
2349         Reviewed by Dean Jackson.
2350
2351         The changes in r184794 did not take full screen mode into account. This needed to be corrected.
2352
2353         * Modules/mediacontrols/mediaControlsApple.js:
2354         (Controller.prototype.handlePanelTransitionEnd):
2355         (Controller.prototype.setPlaying):
2356         (Controller.prototype.showControls):
2357
2358 2015-07-07  Wenson Hsieh  <whsieh@berkeley.edu>
2359         
2360         Snap point regions containing X and Y snap points should do a better job animating
2361         https://bugs.webkit.org/show_bug.cgi?id=142523
2362         <rdar://problem/20100753>
2363
2364         Reviewed by Brent Fulgham.
2365
2366         Reimplemented snap point animations to use a single timer for both horizontal and
2367         vertical axes to better support 2D snap scrolling. Instead of making velocity
2368         dependent on progress to the snap point and handling 2D snapping with different
2369         timer update functions, this implementation uses a fixed animation time to coordinate
2370         the snapping animation across both axes.
2371
2372         Test: platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-2d-overflow.html
2373
2374         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Refactored to use a single scroll snap timer.
2375         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm: See above.
2376         (WebCore::ScrollingTreeFrameScrollingNodeMac::startScrollSnapTimer): See above.
2377         (WebCore::ScrollingTreeFrameScrollingNodeMac::stopScrollSnapTimer): See above.
2378         * platform/cocoa/ScrollController.h: Refactored to use a single scroll snap timer and update function to handle
2379             snapping in both axes. This entails removing the ScrollEventAxis parameter from various functions below. Also
2380             removed methods that computed "snap" and "glide" offsets.
2381         (WebCore::ScrollControllerClient::startScrollSnapTimer): See above.
2382         (WebCore::ScrollControllerClient::stopScrollSnapTimer): See above.
2383         * platform/cocoa/ScrollController.mm: See above.
2384         (WebCore::ScrollController::ScrollController): Added new constants used to compute animation offsets.
2385         (WebCore::ScrollController::snapRubberBandTimerFired):  Added a check to prevent the rubber band timer from firing
2386             alongside the scroll snap timer. This results in scroll snapping taking precedence over rubber banding when
2387             scrolling against the edge of a container in the case of 2D scrolling. We didn't run into this issue before
2388             because snapping wasn't working properly at the edges of a 2D scrolling container. In the future, we may want
2389             to unify both snap scrolling and rubber banding timers to solve this issue.
2390         (WebCore::ScrollController::isScrollSnapInProgress): Refactored to use a single scroll snap timer.
2391         (WebCore::ScrollController::processWheelEventForScrollSnapOnAxis): Fixed an issue where wheel deltas were being pushed
2392             to the snap state incorrectly.
2393         (WebCore::ScrollController::processWheelEventForScrollSnap): Fixed an issue with 2D snapping where scrolling in 2 axes
2394             simultaneously would cause the vertical axis to override the horizontal axis. This is more like a sub-issue of fixing
2395             2D scrolling, and is required for 2D snap animations to work properly.
2396         (WebCore::ScrollController::startScrollSnapTimer): Refactored to use a single scroll snap timer.
2397         (WebCore::ScrollController::stopScrollSnapTimer): See above.
2398         (WebCore::ScrollController::scrollSnapTimerFired): This new method handles snap scroll updates on both axes.
2399         (WebCore::ScrollController::beginScrollSnapAnimation): Refactored to account for single scroll snap timer.
2400         (WebCore::ScrollController::endScrollSnapAnimation): See above.
2401         (WebCore::ScrollController::initializeScrollSnapAnimationParameters): New method that initializes parameters used to
2402             coordinate the animation state across horizontal and vertical axes.
2403         (WebCore::ScrollController::isSnappingOnAxis):  Checks whether or not a given axis is currently scroll snapping. This will
2404             return true in the case of active 2D scroll snapping.
2405         (WebCore::ScrollController::hasActiveScrollSnapTimerForAxis): Deleted.
2406         (WebCore::ScrollController::horizontalScrollSnapTimerFired): Deleted.
2407         (WebCore::ScrollController::verticalScrollSnapTimerFired): Deleted.
2408         (WebCore::ScrollController::scrollSnapAnimationUpdate): Deleted.
2409         (WebCore::ScrollController::initializeGlideParameters): Deleted.
2410         (WebCore::snapProgress): Deleted.
2411         (WebCore::clampedSnapMagnitude): Deleted.
2412         (WebCore::ScrollController::computeSnapDelta): Deleted.
2413         (WebCore::snapGlide): Deleted.
2414         (WebCore::ScrollController::computeGlideDelta): Deleted.
2415         * platform/cocoa/ScrollSnapAnimatorState.h:  Added a new datastructure, ScrollSnapAnimationCurveState, which tracks
2416             the scroll snap animation state across both axes.
2417         * platform/cocoa/ScrollSnapAnimatorState.mm: Removed fields relevant to the former "gliding" model and renamed the
2418             initial wheel delta variable to reflect this.
2419         (WebCore::ScrollSnapAnimatorState::averageInitialWheelDelta): Fixed an issue where wheel deltas were being pushed
2420             to the snap state incorrectly.
2421         (WebCore::ScrollSnapAnimatorState::clearInitialWheelDeltaWindow): Tiny for loop incrementor style fix.
2422         (WebCore::ScrollSnapAnimatorState::isSnapping): Checks whether this state is in either snapping or gliding mode.
2423         (WebCore::ScrollSnapAnimatorState::canReachTargetWithCurrentInitialScrollDelta): Checks whether the scroll velocity is
2424             consistent with the initial and target offsets.
2425         (WebCore::ScrollSnapAnimatorState::interpolatedOffsetAtProgress): Interpolates the offset for a given progress value.
2426         (WebCore::ScrollSnapAnimationCurveState::ScrollSnapAnimationCurveState): New constants.
2427         (WebCore::ScrollSnapAnimationCurveState::initializeSnapProgressCurve): Abstracts out part of the initialization process.
2428         (WebCore::ScrollSnapAnimationCurveState::initializeInterpolationCoefficientsIfNecessary): Abstracts out part of the
2429             initialization process.
2430         (WebCore::ScrollSnapAnimationCurveState::interpolatedPositionAtProgress): Abstracts out curve interpolation.
2431         (WebCore::ScrollSnapAnimationCurveState::shouldCompleteSnapAnimationImmediatelyAtTime): Added.
2432         (WebCore::ScrollSnapAnimationCurveState::animationProgressAtTime): Added.
2433         
2434 2015-07-07  Chris Dumez  <cdumez@apple.com>
2435
2436         Unreviewed, attempt to fix iOS build.
2437
2438         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2439         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
2440
2441 2015-07-07  Andreas Kling  <akling@apple.com>
2442
2443         REGRESSION(r183706): HTMLImageElement sometimes fails to register as document named item.
2444         <https://webkit.org/b/146679>
2445         <rdar://problem/21613839>
2446
2447         Reviewed by Antti Koivisto.
2448
2449         After r183706, Element::hasName() no longer returns outdated information when called
2450         inside a parseAttribute() override. HTMLImageElement was relying on this to check
2451         if it *used* to have a name attribute before the currently parsing one was set.
2452
2453         Since parseAttribute() only shows subclasses the new attribute value, I'm adding a
2454         flag to HTMLImageElement that remembers whether we had a name attribute or not.
2455
2456         Test: fast/dom/HTMLImageElement/remove-img-with-name-from-document-crash.html
2457
2458         * html/HTMLImageElement.cpp:
2459         (WebCore::HTMLImageElement::parseAttribute):
2460         * html/HTMLImageElement.h:
2461
2462 2015-07-07  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2463
2464         [Streams API] Remove ReadableStreamReader.read() custom binding
2465         https://bugs.webkit.org/show_bug.cgi?id=146643
2466
2467         Reviewed by Darin Adler.
2468
2469         Moved ReadableStreamReader.read handling from callbacks to promises.
2470         Introduced DOMPromiseIteratorWithCallback for that purpose: it takes resolve() to resolve a promise with a not-ending iterator value,
2471         resolveEnd() to resolve a promise with a terminating iterator value and reject().
2472         Added template helper routine to convert typed values to JS iterator wrapping the value.
2473         Removed ReadableStreamReader.read custom binding.
2474
2475         Covered by rebased tests.
2476
2477         * Modules/streams/ReadableStream.cpp: Updated code to use DOMPromiseIteratorWithCallback API.
2478         (WebCore::ReadableStream::releaseReader):
2479         (WebCore::ReadableStream::changeStateToErrored):
2480         (WebCore::ReadableStream::read):
2481         (WebCore::ReadableStream::resolveReadCallback):
2482         * Modules/streams/ReadableStream.h:
2483         * Modules/streams/ReadableStreamReader.cpp:
2484         (WebCore::ReadableStreamReader::read):
2485         * Modules/streams/ReadableStreamReader.h:
2486         * Modules/streams/ReadableStreamReader.idl: Removed custom binding.
2487         * bindings/js/JSDOMBinding.h:
2488         (WebCore::toJSIterator): create JS iterator from typed value.
2489         (WebCore::toJSIteratorEnd): create JS end iterator.
2490         * bindings/js/JSDOMPromise.cpp:
2491         (WebCore::DeferredWrapper::globalObject): Added globaObject getter and removed promise getter.
2492         * bindings/js/JSDOMPromise.h:
2493         (WebCore::DOMPromiseIteratorWithCallback::DOMPromiseIteratorWithCallback):
2494         (WebCore::Error>::resolve):
2495         (WebCore::Error>::resolveEnd):
2496         (WebCore::Error>::reject):
2497         * bindings/js/JSReadableStreamReaderCustom.cpp: Removed custom binding.
2498
2499 2015-07-06  Zalan Bujtas  <zalan@apple.com>
2500
2501         REGRESSION: Slider thumb does not render properly (image tests with <input type="range">)
2502         https://bugs.webkit.org/show_bug.cgi?id=146669
2503         rdar://problem/21677831
2504
2505         Reviewed by Simon Fraser.
2506
2507         Draw NSSliderCell's knob only when slider's thumb paint is requested.
2508
2509         Covered by existing tests.
2510
2511         * rendering/RenderThemeMac.mm:
2512         (WebCore::RenderThemeMac::paintSliderThumb):
2513
2514 2015-07-06  Csaba Osztrogonác  <ossy@webkit.org>
2515
2516         Move shouldIgnoreAttributeCase inline function to Element.h
2517         https://bugs.webkit.org/show_bug.cgi?id=146588
2518
2519         Reviewed by Andreas Kling.
2520
2521         * dom/Element.cpp:
2522         (WebCore::shouldIgnoreAttributeCase): Deleted.
2523         * dom/Element.h:
2524         (WebCore::shouldIgnoreAttributeCase):
2525         * dom/NamedNodeMap.cpp:
2526         (WebCore::shouldIgnoreAttributeCase): Deleted.
2527
2528 2015-07-06  Brent Fulgham  <bfulgham@apple.com>
2529
2530         Ensure media playback is stopped during page close
2531         https://bugs.webkit.org/show_bug.cgi?id=146554
2532         <rdar://problem/18033944>
2533
2534         Reviewed by Brady Eidson.
2535
2536         * Modules/webaudio/AudioContext.cpp:
2537         (WebCore::WebAudio::hostingDocument): Added.
2538         * Modules/webaudio/AudioContext.h:
2539         * html/HTMLMediaElement.h:
2540         (WebCore::HTMLMediaElement::hostingDocument): Added.
2541         * dom/Document.cpp:
2542         (WebCore::Document::~Document): Call new 'stopAllMediaPlaybackForDocument' at destruction time.
2543         * platform/audio/PlatformMediaSession.h:
2544         Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
2545         Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
2546         * platform/audio/PlatformMediaSessionManager.cpp:
2547         (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
2548         playback on elements that match the provided document.
2549         (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess): Added. Pauses playback
2550         on all elements in the current process.
2551         * platform/audio/PlatformMediaSessionManager.h:
2552
2553 2015-07-06  Daniel Bates  <dabates@apple.com>
2554
2555         Isolated worlds should respect Content Security Policy; User Agent Shadow DOM
2556         should be exempt from Content Security Policy
2557         https://bugs.webkit.org/show_bug.cgi?id=144830
2558         <rdar://problem/18860261>
2559
2560         Inadvertently omitted argument overrideContentSecurityPolicy in calls to ContentSecurityPolicy::allowEval()
2561         that explicitly specified a report status. And the report status, which is an enum, was being implicitly
2562         converted to bool.
2563
2564         * bindings/js/ScriptController.cpp:
2565         (WebCore::ScriptController::initScript):
2566         * page/DOMSecurityPolicy.cpp:
2567         (WebCore::DOMSecurityPolicy::allowsEval):
2568
2569 2015-07-06  Commit Queue  <commit-queue@webkit.org>
2570
2571         Unreviewed, rolling out r186385.
2572         https://bugs.webkit.org/show_bug.cgi?id=146668
2573
2574         crashes 3 webaudio tests in debug builds (Requested by
2575         alexchristensen on #webkit).
2576
2577         Reverted changeset:
2578
2579         "Ensure media playback is stopped during page close"
2580         https://bugs.webkit.org/show_bug.cgi?id=146554
2581         http://trac.webkit.org/changeset/186385
2582
2583 2015-07-06  Andreas Kling  <akling@apple.com>
2584
2585         Crash when setting text direction via MakeTextWritingDirection* editing commands.
2586         <https://webkit.org/b/146665>
2587         <rdar://problem/20835477>
2588
2589         Reviewed by Ryosuke Niwa.
2590
2591         Fix two buggy clients of enclosingBlock(node) that would fail if the returned
2592         element is the same as the node passed in.
2593
2594         Test: editing/style/change-text-direction-crash.html
2595
2596         * editing/ApplyStyleCommand.cpp:
2597         (WebCore::ApplyStyleCommand::splitAncestorsWithUnicodeBidi):
2598         (WebCore::ApplyStyleCommand::removeEmbeddingUpToEnclosingBlock):
2599
2600 2015-07-06  Simon Fraser  <simon.fraser@apple.com>
2601
2602         Revert use of  SVG <mask> elements for -webkit-mask-image (r176798, r177494)
2603         https://bugs.webkit.org/show_bug.cgi?id=146653
2604
2605         Reviewed by Dean Jackson.
2606
2607         Fixes rdar://problem/21435233.
2608
2609         r177494 caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
2610         was not being maintained, so revert it.
2611
2612         This patch reverts r176798.
2613
2614         * CMakeLists.txt:
2615         * WebCore.vcxproj/WebCore.vcxproj:
2616         * WebCore.vcxproj/WebCore.vcxproj.filters:
2617         * WebCore.xcodeproj/project.pbxproj:
2618         * css/CSSValue.cpp:
2619         (WebCore::CSSValue::cssText): Deleted.
2620         (WebCore::CSSValue::destroy): Deleted.
2621         * css/CSSValue.h:
2622         (WebCore::CSSValue::isWebKitCSSResourceValue): Deleted.
2623         * css/StyleBuilderConverter.h:
2624         (WebCore::maskImageValueFromIterator): Deleted.
2625         * css/StyleResolver.cpp:
2626         (WebCore::StyleResolver::State::clear): Deleted.
2627         * css/StyleResolver.h:
2628         (WebCore::StyleResolver::State::maskImagesWithPendingSVGDocuments): Deleted.
2629         * css/WebKitCSSResourceValue.cpp: Removed.
2630         * css/WebKitCSSResourceValue.h: Removed.
2631         * loader/cache/CachedResourceLoader.cpp:
2632         (WebCore::CachedResourceLoader::addCachedResource): Deleted.
2633         * loader/cache/CachedResourceLoader.h:
2634         * loader/cache/CachedSVGDocument.cpp:
2635         (WebCore::CachedSVGDocument::finishLoading):
2636         (WebCore::CachedSVGDocument::CachedSVGDocument): Deleted.
2637         * loader/cache/CachedSVGDocument.h:
2638         * loader/cache/CachedSVGDocumentReference.cpp:
2639         (WebCore::CachedSVGDocumentReference::CachedSVGDocumentReference):
2640         (WebCore::CachedSVGDocumentReference::~CachedSVGDocumentReference):
2641         (WebCore::CachedSVGDocumentReference::load):
2642         * loader/cache/CachedSVGDocumentReference.h:
2643         * page/FrameView.cpp:
2644         (WebCore::FrameView::containsSVGDocument): Deleted.
2645         * page/FrameView.h:
2646         * page/Page.cpp:
2647         (WebCore::Page::createPageFromBuffer): Deleted.
2648         * page/Page.h:
2649         * platform/ScrollView.h:
2650         (WebCore::ScrollView::containsSVGDocument): Deleted.
2651         * platform/graphics/MaskImageOperation.cpp: Removed.
2652         * platform/graphics/MaskImageOperation.h: Removed.
2653         * rendering/RenderLayer.cpp:
2654         (WebCore::RenderLayer::RenderLayer): Deleted.
2655         * rendering/RenderLayer.h:
2656         * rendering/RenderLayerFilterInfo.cpp:
2657         * rendering/RenderLayerFilterInfo.h:
2658         * rendering/RenderLayerMaskImageInfo.h: Removed.
2659         * rendering/style/FillLayer.cpp:
2660         (WebCore::FillLayer::operator==):
2661         (WebCore::FillLayer::cullEmptyLayers):
2662         (WebCore::layerImagesIdentical):
2663         (WebCore::FillLayer::FillLayer): Deleted.
2664         (WebCore::FillLayer::operator=): Deleted.
2665         (WebCore::FillLayer::hasNonEmptyMaskImage): Deleted.
2666         (WebCore::FillLayer::imagesAreLoaded): Deleted.
2667         * rendering/style/FillLayer.h:
2668         (WebCore::FillLayer::maskImage): Deleted.
2669         (WebCore::FillLayer::imageOrMaskImage): Deleted.
2670         (WebCore::FillLayer::setMaskImage): Deleted.
2671         (WebCore::FillLayer::clearMaskImage): Deleted.
2672         (WebCore::FillLayer::hasMaskImage): Deleted.
2673         * rendering/svg/RenderSVGResourceMasker.cpp:
2674         (WebCore::RenderSVGResourceMasker::applyResource):
2675         (WebCore::RenderSVGResourceMasker::applySVGMask): Deleted.
2676         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer): Deleted.
2677         * rendering/svg/RenderSVGResourceMasker.h:
2678         * svg/SVGMaskElement.cpp:
2679         (WebCore::SVGMaskElement::createElementRenderer):
2680         (WebCore::SVGMaskElement::addClientRenderLayer): Deleted.
2681         (WebCore::SVGMaskElement::removeClientRenderLayer): Deleted.
2682         * svg/SVGMaskElement.h:
2683         * svg/SVGUseElement.cpp:
2684         (WebCore::SVGUseElement::updateExternalDocument):
2685         * svg/graphics/SVGImage.cpp:
2686         (WebCore::SVGImage::dataChanged):
2687
2688 2015-07-06  Simon Fraser  <simon.fraser@apple.com>
2689
2690         Revert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494, r186180)
2691         https://bugs.webkit.org/show_bug.cgi?id=146653
2692
2693         Reviewed by Dean Jackson.
2694
2695         Fixes rdar://problem/21435233.
2696
2697         r177494 caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
2698         was not being maintained, so revert it.
2699
2700         This patch reverts r177494.
2701
2702         * WebCore.xcodeproj/project.pbxproj:
2703         * css/CSSComputedStyleDeclaration.cpp:
2704         (WebCore::ComputedStyleExtractor::propertyValue):
2705         * css/CSSParser.cpp:
2706         (WebCore::CSSParser::parseFillProperty):
2707         (WebCore::CSSParser::parseMaskImage): Deleted.
2708         * css/CSSParser.h:
2709         * css/CSSPropertyNames.in:
2710         * css/CSSValue.h:
2711         * css/StyleBuilderConverter.h:
2712         (WebCore::StyleBuilderConverter::convertMaskImageOperations): Deleted.
2713         * css/StyleResolver.cpp:
2714         (WebCore::StyleResolver::loadPendingSVGDocuments):
2715         (WebCore::StyleResolver::loadPendingImages):
2716         (WebCore::StyleResolver::adjustStyleForMaskImages): Deleted.
2717         (WebCore::StyleResolver::applyMatchedProperties): Deleted.
2718         * css/StyleResolver.h:
2719         * page/FrameView.cpp:
2720         (WebCore::FrameView::containsSVGDocument):
2721         * page/FrameView.h:
2722         * page/animation/CSSPropertyAnimation.cpp:
2723         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2724         (WebCore::blendFunc): Deleted.
2725         (WebCore::MaskImagePropertyWrapper::MaskImagePropertyWrapper): Deleted.
2726         (WebCore::MaskImagePropertyWrapper::equals): Deleted.
2727         * platform/ScrollView.h:
2728         (WebCore::ScrollView::containsSVGDocument):
2729         * platform/graphics/MaskImageOperation.cpp:
2730         (WebCore::MaskImageOperation::~MaskImageOperation): Deleted.
2731         (WebCore::MaskImageOperation::operator==): Deleted.
2732         * platform/graphics/MaskImageOperation.h:
2733         * rendering/RenderBox.cpp:
2734         (WebCore::RenderBox::maskClipRect):
2735         * rendering/RenderBoxModelObject.cpp:
2736         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2737         * rendering/RenderElement.cpp:
2738         (WebCore::RenderElement::updateFillImages):
2739         (WebCore::RenderElement::~RenderElement): Deleted.
2740         * rendering/RenderLayer.cpp:
2741         (WebCore::RenderLayer::~RenderLayer): Deleted.
2742         (WebCore::RenderLayer::calculateClipRects): Deleted.
2743         * rendering/RenderLayer.h:
2744         * rendering/RenderLayerMaskImageInfo.cpp: Removed.
2745         * rendering/style/FillLayer.h:
2746         (WebCore::FillLayer::image):
2747         (WebCore::FillLayer::imageOrMaskImage):
2748         * rendering/style/RenderStyle.cpp:
2749         (WebCore::RenderStyle::setMaskImage): Deleted.
2750         * rendering/style/RenderStyle.h:
2751
2752 2015-07-06  Simon Fraser  <simon.fraser@apple.com>
2753
2754         Revert use of SVG <mask> elements for -webkit-mask-image (r176798, r177494, r186180)
2755         https://bugs.webkit.org/show_bug.cgi?id=146653
2756         
2757         Fixes rdar://problem/21435233.
2758
2759         This patch reverts r186180, but keeps the layout test.
2760
2761         This feature caused a number of regressions (bugs 141857, 146509, 146561), added new layering violations, and
2762         was not being maintained, so revert it.
2763         
2764         * loader/cache/CachedResourceLoader.cpp:
2765         (WebCore::CachedResourceLoader::requestResource): Deleted.
2766         * loader/cache/CachedResourceRequest.h:
2767         (WebCore::CachedResourceRequest::acceptOverride): Deleted.
2768         (WebCore::CachedResourceRequest::setAcceptOverride): Deleted.
2769         * loader/cache/CachedSVGDocumentReference.cpp:
2770         (WebCore::CachedSVGDocumentReference::load): Deleted.
2771         * loader/cache/CachedSVGDocumentReference.h:
2772         (WebCore::CachedSVGDocumentReference::setAcceptsAnyImageType): Deleted.
2773         * platform/graphics/MaskImageOperation.cpp:
2774         (WebCore::MaskImageOperation::ensureCachedSVGDocumentReference):
2775         (WebCore::MaskImageOperation::notifyFinished):
2776
2777 2015-07-06  Daniel Bates  <dabates@apple.com>
2778
2779         Fix the Windows build following <https://trac.webkit.org/changeset/186388>
2780         (https://bugs.webkit.org/show_bug.cgi?id=144830)
2781
2782         As we for for Mac in WebCoreAVFResourceLoader::startLoading(), instantiate ResourceLoaderOptions
2783         with ContentSecurityPolicyImposition::DoPolicyCheck.
2784
2785         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
2786         (WebCore::WebCoreAVCFResourceLoader::startLoading):
2787
2788 2015-07-06  Daniel Bates  <dabates@apple.com>
2789
2790         Isolated worlds should respect Content Security Policy; User Agent Shadow DOM
2791         should be exempt from Content Security Policy
2792         https://bugs.webkit.org/show_bug.cgi?id=144830
2793         <rdar://problem/18860261>
2794
2795         Reviewed by Geoffrey Garen.
2796
2797         Make scripts that run in an isolated world be subject to the Content Security Policy (CSP) of the page
2798         and exempt features implemented using a user agent shadow DOM. As a side effect of this change,
2799         Safari Content Extensions will respect the CSP policy of the page when loading subresources (e.g. an image).
2800
2801         Tests: http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
2802                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-background.html
2803                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-cursor.html
2804                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-filter-on-image.html
2805                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-css-webkit-image-set.html
2806                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-embed-plugin.html
2807                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-external-script.html
2808                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-iframe.html
2809                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image-after-redirect.html
2810                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-image.html
2811                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-script.html
2812                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-style.html
2813                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-inline-stylesheet.html
2814                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object-plugin.html
2815                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-object.html
2816                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-feimage-element.html
2817                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-font.html
2818                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-svg-use-element.html
2819                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-track.html
2820                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-video.html
2821                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/block-loading-user-agent-image-from-non-user-agent-content.html
2822                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-allowed.html
2823                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked.html
2824                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked2.html
2825                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/default-src-object-data-url-blocked3.html
2826                http/tests/security/contentSecurityPolicy/userAgentShadowDOM/video-controls-allowed.html
2827                http/tests/security/isolatedWorld/image-load-should-not-bypass-main-world-csp.html
2828
2829         * Modules/websockets/WebSocket.cpp:
2830         (WebCore::WebSocket::connect): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().
2831         * css/CSSCanvasValue.h:
2832         (WebCore::CSSCanvasValue::loadSubimages): Modified to take argument ResourceLoaderOptions (unused).
2833         * css/CSSCrossfadeValue.cpp:
2834         (WebCore::CSSCrossfadeValue::fixedSize): Explicitly instantiate default ResourceLoaderOptions and pass
2835         pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
2836         the cross fade is applied to an element in a user agent shadow tree.
2837         (WebCore::CSSCrossfadeValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
2838         as appropriate.
2839         (WebCore::CSSCrossfadeValue::image): Explicitly instantiate default ResourceLoaderOptions and pass it
2840         when requesting a cached image. Added FIXME comment to skip Content Security Policy check when the cross
2841         fade is applied to an element in a user agent shadow tree.
2842         * css/CSSCrossfadeValue.h:
2843         * css/CSSCursorImageValue.cpp:
2844         (WebCore::CSSCursorImageValue::cachedImage): Take a ResourceLoaderOptions as an argument and passes it
2845         as appropriate.
2846         * css/CSSCursorImageValue.h:
2847         * css/CSSFilterImageValue.cpp:
2848         (WebCore::CSSFilterImageValue::fixedSize): Explicitly instantiate default ResourceLoaderOptions and pass
2849         pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
2850         the cross fade is applied to an element in a user agent shadow tree.
2851         (WebCore::CSSFilterImageValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
2852         as appropriate.
2853         (WebCore::CSSFilterImageValue::loadSubimages): Explicitly instantiate default ResourceLoaderOptions and pass
2854         pass it when requesting a cached image. Added FIXME comment to skip Content Security Policy check when
2855         the cross fade is applied to an element in a user agent shadow tree.
2856         (WebCore::CSSFilterImageValue::image):
2857         * css/CSSFilterImageValue.h:
2858         * css/CSSFontFaceSrcValue.cpp:
2859         (WebCore::CSSFontFaceSrcValue::cachedFont): Take a boolean, isInitiatingElementInUserAgentShadowTree,
2860         so as to determine the appropriate CSP imposition. In particular, we skip the CSP check when the initiating element
2861         (e.g. SVG font-face element) is in a user agent shadow tree.
2862         * css/CSSFontFaceSrcValue.h:
2863         * css/CSSFontSelector.cpp:
2864         (WebCore::CSSFontSelector::addFontFaceRule): Take a boolean, isInitiatingElementInUserAgentShadowTree, and passes
2865         it as appropriate.
2866         * css/CSSFontSelector.h:
2867         * css/CSSGradientValue.h:
2868         (WebCore::CSSGradientValue::loadSubimages): Take a ResourceLoaderOptions as an argument and passes it
2869         as appropriate.
2870         * css/CSSImageGeneratorValue.cpp:
2871         (WebCore::CSSImageGeneratorValue::loadSubimages): Ditto.
2872         (WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto.
2873         * css/CSSImageGeneratorValue.h:
2874         * css/CSSImageSetValue.cpp:
2875         (WebCore::CSSImageSetValue::cachedImageSet): Deleted.
2876         * css/CSSImageSetValue.h:
2877         * css/CSSImageValue.cpp:
2878         (WebCore::CSSImageValue::cachedImage): Deleted.
2879         * css/CSSImageValue.h:
2880         * css/RuleSet.cpp:
2881         (WebCore::RuleSet::addChildRules): Take a boolean, isInitiatingElementInUserAgentShadowTree, and passes
2882         it as appropriate.
2883         (WebCore::RuleSet::addRulesFromSheet): Added FIXME comment to skip Content Security Policy check when
2884         when stylesheet is in a user agent shadow tree.
2885         * css/RuleSet.h:
2886         * css/StyleResolver.cpp:
2887         (WebCore::StyleResolver::StyleResolver): Determine whether the SVG font-face element is in a user agent shadow tree
2888         and pass the appropriate value when calling CSSFontSelector::addFontFaceRule(). Also, modernized code; used C++11 range
2889         -based for-loop instead of const_iterator idiom.
2890         (WebCore::StyleResolver::loadPendingSVGDocuments): Skip CSP check when requesting subresources as a byproduct of
2891         resolving style for an element in a user agent shadow tree.
2892         (WebCore::StyleResolver::loadPendingImage): Ditto.
2893         (WebCore::StyleResolver::loadPendingShapeImage): Ditto.
2894         * css/StyleRuleImport.cpp:
2895         (WebCore::StyleRuleImport::requestStyleSheet): Added FIXME comment to skip Content Security Policy check when
2896         when stylesheet is in a user agent shadow tree.
2897         * dom/Element.h:
2898         * dom/InlineStyleSheetOwner.cpp:
2899         (WebCore::InlineStyleSheetOwner::createSheet): Skip CSP check for an inline <style> that is in a user agent shadow tree.
2900         * dom/Node.cpp:
2901         (WebCore::Node::isInUserAgentShadowTree): Added.
2902         * dom/Node.h:
2903         * dom/ScriptElement.cpp:
2904         (WebCore::ScriptElement::requestScript): Skip CSP check for an external JavaScript script in a user agent shadow tree.
2905         (WebCore::ScriptElement::executeScript): Skip CSP check for an inline JavaScript script that is in a user agent shadow tree.
2906         * dom/StyledElement.cpp:
2907         (WebCore::StyledElement::styleAttributeChanged): Skip CSP check when modifying the inline style of an element in a user
2908         agent shadow tree.
2909         * html/HTMLMediaElement.cpp:
2910         (WebCore::HTMLMediaElement::isSafeToLoadURL): Skip CSP check for a <audio>, <video> in a user agent shadow tree.
2911         (WebCore::HTMLMediaElement::outOfBandTrackSources): Ditto.
2912         * html/HTMLTrackElement.cpp:
2913         (WebCore::HTMLTrackElement::canLoadURL): Ditto.
2914         * html/track/LoadableTextTrack.cpp:
2915         (WebCore::LoadableTextTrack::loadTimerFired): Determine whether the <track> is in a user agent shadow tree
2916         and pass the appropriate value when calling TextTrackLoader::load().
2917         * loader/DocumentLoader.cpp:
2918         (WebCore::DocumentLoader::startLoadingMainResource): Do CSP check when loading a resource by default.
2919         * loader/ImageLoader.cpp:
2920         (WebCore::ImageLoader::updateFromElement): Skip CSP check for an image that is in a user agent shadow tree.
2921         * loader/MediaResourceLoader.cpp:
2922         (WebCore::MediaResourceLoader::start): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
2923         This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
2924         * loader/NetscapePlugInStreamLoader.cpp:
2925         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader): Added FIXME comment to skip Content Security Policy check
2926         when when associated plugin element is in a user agent shadow tree.
2927         * loader/PolicyChecker.cpp:
2928         (WebCore::PolicyChecker::checkNavigationPolicy): Skip CSP check for a <iframe> in a user agent shadow tree.
2929         * loader/ResourceLoaderOptions.h: Defined enum class ContentSecurityPolicyImposition with explicit type uint8_t so
2930         as to provide a hint to the compiler (for better packing) when it computes the memory layout for struct that
2931         contains an instance of this class.
2932         (WebCore::ResourceLoaderOptions::ResourceLoaderOptions): Added argument contentSecurityPolicyImposition.
2933         (WebCore::ResourceLoaderOptions::contentSecurityPolicyImposition): Added.
2934         (WebCore::ResourceLoaderOptions::setContentSecurityPolicyImposition): Added.
2935         * loader/SubframeLoader.cpp:
2936         (WebCore::SubframeLoader::pluginIsLoadable): Skip CSP check for a plugin element that is in a user agent shadow tree.
2937         (WebCore::SubframeLoader::createJavaAppletWidget): Skip CSP check for an applet element that is in a user agent shadow tree.
2938         * loader/TextTrackLoader.cpp:
2939         (WebCore::TextTrackLoader::load): Take a boolean, isInitiatingElementInUserAgentShadowTree, and sets the appropriate
2940         Content Security Policy imposition for the text track request.
2941         * loader/TextTrackLoader.h:
2942         * loader/cache/CachedResourceLoader.cpp:
2943         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet): Skip CSP check for a user-specified stylesheet.
2944         (WebCore::CachedResourceLoader::canRequest): Only check the CSP of the page if specified in the resource loader options for the request.
2945         (WebCore::CachedResourceLoader::defaultCachedResourceOptions): Add ContentSecurityPolicyImposition::DoPolicyCheck to the default
2946         resource loader options so that do check the CSP policy of the page before performing a resource request by default.
2947         * loader/cache/CachedSVGDocumentReference.cpp:
2948         (WebCore::CachedSVGDocumentReference::load): Take a ResourceLoaderOptions as an argument and passes it as appropriate.
2949         * loader/cache/CachedSVGDocumentReference.h:
2950         * loader/icon/IconLoader.cpp:
2951         (WebCore::IconLoader::startLoading): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
2952         This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
2953         * page/ContentSecurityPolicy.cpp:
2954         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs): Take an argument called overrideContentSecurityPolicy (defaults to false). When
2955         overrideContentSecurityPolicy := true, this function unconditionally returns true.
2956         (WebCore::ContentSecurityPolicy::allowInlineEventHandlers): Ditto.
2957         (WebCore::ContentSecurityPolicy::allowInlineScript): Ditto.
2958         (WebCore::ContentSecurityPolicy::allowInlineStyle): Ditto.
2959         (WebCore::ContentSecurityPolicy::allowEval): Ditto.
2960         (WebCore::ContentSecurityPolicy::allowPluginType): Ditto.
2961         (WebCore::ContentSecurityPolicy::allowScriptFromSource): Ditto.
2962         (WebCore::ContentSecurityPolicy::allowObjectFromSource): Ditto.
2963         (WebCore::ContentSecurityPolicy::allowChildFrameFromSource): Ditto.
2964         (WebCore::ContentSecurityPolicy::allowImageFromSource): Ditto.
2965         (WebCore::ContentSecurityPolicy::allowStyleFromSource): Ditto.
2966         (WebCore::ContentSecurityPolicy::allowFontFromSource): Ditto.
2967         (WebCore::ContentSecurityPolicy::allowMediaFromSource): Ditto.
2968         (WebCore::ContentSecurityPolicy::allowConnectToSource): Ditto.
2969         (WebCore::ContentSecurityPolicy::allowFormAction): Ditto.
2970         (WebCore::ContentSecurityPolicy::allowBaseURI): Ditto.
2971         * page/ContentSecurityPolicy.h:
2972         * page/DOMSecurityPolicy.cpp:
2973         * page/EventSource.cpp:
2974         (WebCore::EventSource::create): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().
2975         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
2976         (WebCore::WebCoreAVFResourceLoader::startLoading): Instantiate ResourceLoaderOptions passing placeholder value ContentSecurityPolicyImposition::DoPolicyCheck.
2977         This value does not affect the request because we do not check the Content Security Policy for raw resource requests.
2978         * svg/SVGFEImageElement.cpp:
2979         (WebCore::SVGFEImageElement::requestImageResource): Skip CSP check for a SVG FEImage element in a user agent shadow tree.
2980         * svg/SVGFontFaceUriElement.cpp:
2981         (WebCore::SVGFontFaceUriElement::loadFont): Skip CSP check for a SVG font-face-uri element in a user agent shadow tree.
2982         * svg/SVGUseElement.cpp:
2983         (WebCore::SVGUseElement::updateExternalDocument): Skip CSP check for a SVG use element in a user agent shadow tree.
2984         * testing/Internals.cpp:
2985         (WebCore::Internals::ensureUserAgentShadowRoot): Added.
2986         * testing/Internals.h:
2987         * testing/Internals.idl: Added declaration for ensureUserAgentShadowRoot().
2988         * xml/XMLHttpRequest.cpp:
2989         (WebCore::XMLHttpRequest::open): Pass shouldBypassMainWorldContentSecurityPolicy to ContentSecurityPolicy::allowConnectToSource().
2990
2991 2015-07-06  Brent Fulgham  <bfulgham@apple.com>
2992
2993         Ensure media playback is stopped during page close
2994         https://bugs.webkit.org/show_bug.cgi?id=146554
2995         <rdar://problem/18033944>
2996
2997         Reviewed by Brady Eidson.
2998
2999         * Modules/webaudio/AudioContext.h:
3000         (WebCore::WebAudio::hostingDocument): Added.
3001         * html/HTMLMediaElement.h:
3002         (WebCore::HTMLMediaElement::hostingDocument): Added.
3003         * dom/Document.cpp:
3004         (WebCore::Document::~Document): Call new 'stopAllMediaPlaybackForDocument' at destruction time.
3005         * platform/audio/PlatformMediaSession.h:
3006         Made PlatformMediaSessionManager a friend so it can access the protected 'client' accessor.
3007         Updated PlatformMediaSessionClient to require clients to have a "hostingDocument" member.
3008         * platform/audio/PlatformMediaSessionManager.cpp:
3009         (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForDocument): Added. Only pauses
3010         playback on elements that match the provided document.
3011         (WebCore::PlatformMediaSessionManager::stopAllMediaPlaybackForProcess): Added. Pauses playback
3012         on all elements in the current process.
3013         * platform/audio/PlatformMediaSessionManager.h:
3014
3015 2015-07-06  Alex Christensen  <achristensen@webkit.org>
3016
3017         [Content Extensions] Remove memory page reporting
3018         https://bugs.webkit.org/show_bug.cgi?id=146659
3019
3020         Reviewed by Benjamin Poulain.
3021
3022         * contentextensions/CompiledContentExtension.cpp:
3023         (WebCore::ContentExtensions::CompiledContentExtension::~CompiledContentExtension):
3024         (WebCore::ContentExtensions::CompiledContentExtension::globalDisplayNoneSelectors):
3025         * contentextensions/CompiledContentExtension.h:
3026         * contentextensions/ContentExtension.cpp:
3027         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
3028         * contentextensions/ContentExtension.h:
3029         (WebCore::ContentExtensions::ContentExtension::compiledExtension):
3030         * contentextensions/ContentExtensionsBackend.cpp:
3031         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
3032         * contentextensions/DFABytecodeInterpreter.cpp:
3033         (WebCore::ContentExtensions::getBits):
3034         (WebCore::ContentExtensions::getInstruction):
3035         (WebCore::ContentExtensions::jumpSizeInBytes):
3036         (WebCore::ContentExtensions::getJumpSize):
3037         (WebCore::ContentExtensions::getJumpDistance):
3038         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretAppendAction):
3039         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpretTestFlagsAndAppendAction):
3040         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsForDefaultStylesheetFromDFARoot):
3041         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
3042         * contentextensions/DFABytecodeInterpreter.h:
3043         Don't keep track of memory page usage.  It wasn't even correct anyways.
3044
3045 2015-07-06  Alex Christensen  <achristensen@webkit.org>
3046
3047         [Content Extensions] Increase maxNFASize
3048         https://bugs.webkit.org/show_bug.cgi?id=146656
3049
3050         Reviewed by Benjamin Poulain.
3051
3052         Because of memory improvements in r186375, r186374, and r186079,
3053         we can now increase the maximum number of NFA nodes in order to avoid
3054         long compile times of some large, complicated content blockers.
3055         This also improves the interpreting time of content blockers.
3056
3057         * contentextensions/ContentExtensionCompiler.cpp:
3058         (WebCore::ContentExtensions::compileRuleList):
3059         Increase maxNFASize to 75000 to avoid long compile times.
3060
3061 2015-07-06  Dean Jackson  <dino@apple.com>
3062
3063         Memory corruption in WebGLRenderingContext::simulateVertexAttrib0
3064         https://bugs.webkit.org/show_bug.cgi?id=146652
3065         <rdar://problem/21567767>
3066
3067         Follow-up fix.
3068
3069         * html/canvas/WebGLRenderingContextBase.cpp:
3070         (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0):
3071
3072 2015-07-06  Dean Jackson  <dino@apple.com>
3073
3074         Memory corruption in WebGLRenderingContext::simulateVertexAttrib0
3075         https://bugs.webkit.org/show_bug.cgi?id=146652
3076         <rdar://problem/21567767>
3077
3078         Reviewed by Brent Fulgham.
3079
3080         The expression "(numVertex + 1) * 4 * sizeof(GC3Dfloat)" could potentially
3081         overflow. Make it use checked arithmetic.
3082
3083         I couldn't make a test case that reliably exercised this.
3084
3085         * html/canvas/WebGLRenderingContextBase.cpp:
3086         (WebCore::WebGLRenderingContextBase::simulateVertexAttrib0): Used Checked<GC3Dsizeiptr>
3087         for calculating the size of the buffer.
3088
3089 2015-07-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
3090
3091         [Mac] REGRESSION: (r181403) Enter/Exit full screen on 1x secondary display plugged into 2x Mac displays WebView as 1/4 size during transition
3092         https://bugs.webkit.org/show_bug.cgi?id=146651
3093
3094         Reviewed by Simon Fraser.
3095
3096         * platform/mac/WebCoreFullScreenPlaceholderView.mm: set layerContentsPlacement
3097         to NSViewLayerContentsPlacementScaleProportionallyToFit so AppKit resizes the
3098         content CALayer to fit in the WebView.
3099
3100 2015-07-06  Benjamin Poulain  <benjamin@webkit.org>
3101
3102         Reduce the memory usage of the prefix tree
3103         https://bugs.webkit.org/show_bug.cgi?id=146615
3104
3105         Reviewed by Sam Weinig.
3106
3107         This patch introduces two little changes that reduces the size
3108         of the prefix tree by about 40%.
3109
3110         First, the Terms are interned. The new class CombinedFiltersAlphabet
3111         takes care of keeping a unique version of each term for use
3112         by the CombinedURLFilters.
3113
3114         Since each Term is fairly big but we have a small number of
3115         unique term, we significantly reduce the edge size.
3116
3117         Second, the actions are no longer stored on each Vertex.
3118         They are now stored on the side, in a HashMap indexed by
3119         their Vertex.
3120
3121         This works well because the Actions are sparse over the tree.
3122         Typically, only the leaves have actions. Internal vertices
3123         sometime get actions but that's uncommon.
3124
3125         ---
3126
3127         The next step to reduce the memory footprint would be to
3128         make PrefixTreeVertex into a custom packed structure instead
3129         of using a Vector.
3130
3131         Such change is very invasive and more error prone so I decided
3132         against it for this patch.
3133
3134         * WebCore.xcodeproj/project.pbxproj:
3135         * contentextensions/CombinedFiltersAlphabet.cpp: Copied from Source/WebCore/contentextensions/CombinedURLFilters.h.
3136         (WebCore::ContentExtensions::TermCreatorTranslator::hash):
3137         (WebCore::ContentExtensions::TermCreatorTranslator::equal):
3138         (WebCore::ContentExtensions::TermCreatorTranslator::translate):
3139         (WebCore::ContentExtensions::CombinedFiltersAlphabet::interned):
3140         (WebCore::ContentExtensions::CombinedFiltersAlphabet::memoryUsed):
3141         * contentextensions/CombinedFiltersAlphabet.h: Copied from Source/WebCore/contentextensions/CombinedURLFilters.h.
3142         (WebCore::ContentExtensions::CombinedFiltersAlphabet::TermPointerHash::hash):
3143         (WebCore::ContentExtensions::CombinedFiltersAlphabet::TermPointerHash::equal):
3144         * contentextensions/CombinedURLFilters.cpp:
3145         (WebCore::ContentExtensions::recursiveMemoryUsed):
3146         (WebCore::ContentExtensions::CombinedURLFilters::memoryUsed):
3147         (WebCore::ContentExtensions::prefixTreeVertexToString):
3148         (WebCore::ContentExtensions::recursivePrint):
3149         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
3150         (WebCore::ContentExtensions::generateNFAForSubtree):
3151         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
3152         * contentextensions/CombinedURLFilters.h:
3153         * contentextensions/ContentExtensionsDebugging.h:
3154         * contentextensions/Term.h:
3155         (WebCore::ContentExtensions::Term::isValid):
3156         (WebCore::ContentExtensions::Term::destroy):
3157         (WebCore::ContentExtensions::Term::memoryUsed):
3158         (WebCore::ContentExtensions::Term::toString): Deleted.
3159         (WebCore::ContentExtensions::TermHash::hash): Deleted.
3160         (WebCore::ContentExtensions::TermHash::equal): Deleted.
3161         (WebCore::ContentExtensions::Term::Term): Deleted.
3162         (WebCore::ContentExtensions::Term::isKnownToMatchAnyString): Deleted.
3163         (WebCore::ContentExtensions::Term::hasFixedLength): Deleted.
3164         (WebCore::ContentExtensions::Term::operator==): Deleted.
3165         (WebCore::ContentExtensions::Term::hash): Deleted.
3166         (WebCore::ContentExtensions::Term::isDeletedValue): Deleted.
3167         (WebCore::ContentExtensions::Term::isUniversalTransition): Deleted.
3168         (WebCore::ContentExtensions::Term::generateSubgraphForAtom): Deleted.
3169
3170 2015-07-06  Benjamin Poulain  <benjamin@webkit.org>
3171
3172         [Content Extensions] Make the DFA transitions ranges instead of characters
3173         https://bugs.webkit.org/show_bug.cgi?id=146575
3174
3175         Reviewed by Alex Christensen.
3176
3177         This patch changes the DFA and code using the DFA to use ranges
3178         to represent the transitions between any two nodes.
3179
3180         This patch builds on top of the tools introduced in r186079.
3181
3182         The DFA structure is basically the same as ImmutableNFA but without
3183         any epsilon transitions.
3184
3185         This patch introduces a transition iterator to make the DFA
3186         compatible with the existing algorithms.
3187
3188         ---
3189
3190         The DFA combiner is rebuilt on top of MutableRangeList. Combining the transitions
3191         of two nodes is one by merging the range list of each not into a common
3192         MutableRangeList.
3193         The data converter takes care of creating the signature of the combination.
3194
3195         The code got simpler since MutableRangeList does most of the work now. It is also
3196         much faster.
3197
3198         ---
3199
3200         The minimizer is more intersting.
3201
3202         With the current algorithm, we cannot resolve overlaps between ranges. On the other
3203         hand, the minimizer does not care about the symbol of the transitions if we are careful
3204         to partition transitions of the same symbol together.
3205
3206         What I did was to turn the minimizer into a pure transition based one, BUT each
3207         "symbol" is actually an unbreakable range.
3208
3209         The first step is to go over all the transitions of all the nodes and find the largest
3210         ranges such that the alphabet of interest is covered but there is not a single intersection
3211         between any two nodes (what I called "singular transitions" in the code). 
3212
3213         This can be done efficiently with MutableRangeList.
3214         A little trick there is that I also used the converter to count how many real transition
3215         overlaps any singular transition.
3216
3217         Those singular transitions become the alphabet of our minimizer. The "symbol" of our alphabet
3218         is simply the position of the singular transition in the list.
3219
3220         The partition of transition is created by populating each set with all the transition that
3221         overlaps the symbols.
3222         Note that since the partition is created on the fly, the Transition structure used for
3223         repartitioning only contains the source of the transitions.
3224
3225         Once our transition parition has been carefuly created, we can completely forget about
3226         the symbols and only work with subsets.
3227
3228         Since the singular transitions have no overlap (unlike fallback transitions), this new minimizer
3229         will find the minimial solution for well formed input.
3230
3231         * WebCore.xcodeproj/project.pbxproj:
3232         * contentextensions/DFA.cpp:
3233         (WebCore::ContentExtensions::DFA::memoryUsed):
3234         (WebCore::ContentExtensions::printTransitions):
3235         (WebCore::ContentExtensions::DFANode::actions): Deleted.
3236         (WebCore::ContentExtensions::DFANode::transitions): Deleted.
3237         (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination): Deleted.
3238         (WebCore::ContentExtensions::DFANode::changeFallbackTransition): Deleted.
3239         (WebCore::ContentExtensions::DFANode::addFallbackTransition): Deleted.
3240         (WebCore::ContentExtensions::DFANode::containsTransition): Deleted.
3241         (WebCore::ContentExtensions::DFANode::kill): Deleted.
3242         (WebCore::ContentExtensions::DFA::debugPrintDot): Deleted.
3243         * contentextensions/DFA.h:
3244         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::range):
3245         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::target):
3246         (WebCore::ContentExtensions::DFANode::RangeIterator::range):
3247         (WebCore::ContentExtensions::DFANode::RangeIterator::target):
3248         (WebCore::ContentExtensions::DFANode::RangeIterator::resetTarget):
3249         * contentextensions/DFABytecodeCompiler.cpp:
3250         (WebCore::ContentExtensions::DFABytecodeCompiler::ranges):
3251         (WebCore::ContentExtensions::DFABytecodeCompiler::nodeTransitionsMaxBytecodeSize):
3252         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
3253         * contentextensions/DFACombiner.cpp:
3254         (WebCore::ContentExtensions::DFAMerger::TargetConverter::convert):
3255         (WebCore::ContentExtensions::DFAMerger::TargetConverter::extend):
3256         (WebCore::ContentExtensions::DFAMerger::TargetConverter::setHalfSignature):
3257         (WebCore::ContentExtensions::DFAMerger::merge):
3258         (WebCore::ContentExtensions::DFAMerger::getOrCreateCombinedNode):
3259         (WebCore::ContentExtensions::DFAMerger::setHalfSignature): Deleted.
3260         (WebCore::ContentExtensions::DFAMerger::populateTransitions): Deleted.
3261         (WebCore::ContentExtensions::DFAMerger::populateFromFallbackTransitions): Deleted.
3262         (WebCore::ContentExtensions::DFAMerger::createTransitions): Deleted.
3263         (WebCore::ContentExtensions::DFAMerger::createFallbackTransitionIfNeeded): Deleted.
3264         * contentextensions/DFAMinimizer.cpp:
3265         (WebCore::ContentExtensions::DFAMinimizer::minimize):
3266         * contentextensions/DFANode.cpp: Added.
3267         (WebCore::ContentExtensions::DFANode::actions):
3268         (WebCore::ContentExtensions::DFANode::containsTransition):
3269         (WebCore::ContentExtensions::DFANode::kill):
3270         (WebCore::ContentExtensions::DFANode::canUseFallbackTransition):
3271         (WebCore::ContentExtensions::DFANode::bestFallbackTarget):
3272         * contentextensions/DFANode.h:
3273         (WebCore::ContentExtensions::CharRange::size):
3274         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator*):
3275         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator==):
3276         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator!=):
3277         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::operator++):
3278         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::first):
3279         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::last):
3280         (WebCore::ContentExtensions::DFANode::ConstRangeIterator::data):
3281         (WebCore::ContentExtensions::DFANode::IterableConstRange::begin):
3282         (WebCore::ContentExtensions::DFANode::IterableConstRange::end):
3283         (WebCore::ContentExtensions::DFANode::transitions):
3284         (WebCore::ContentExtensions::DFANode::RangeIterator::operator*):
3285         (WebCore::ContentExtensions::DFANode::RangeIterator::operator==):
3286         (WebCore::ContentExtensions::DFANode::RangeIterator::operator!=):
3287         (WebCore::ContentExtensions::DFANode::RangeIterator::operator++):
3288         (WebCore::ContentExtensions::DFANode::RangeIterator::first):
3289         (WebCore::ContentExtensions::DFANode::RangeIterator::last):
3290         (WebCore::ContentExtensions::DFANode::RangeIterator::data):
3291         (WebCore::ContentExtensions::DFANode::IterableRange::begin):
3292         (WebCore::ContentExtensions::DFANode::IterableRange::end):
3293         (WebCore::ContentExtensions::DFANode::hasFallbackTransition): Deleted.
3294         (WebCore::ContentExtensions::DFANode::transitionsLength): Deleted.
3295         (WebCore::ContentExtensions::DFANode::transitionsStart): Deleted.
3296         (WebCore::ContentExtensions::DFANode::resetTransitions): Deleted.
3297         (WebCore::ContentExtensions::DFANode::setHasFallbackTransitionWithoutChangingDFA): Deleted.
3298         * contentextensions/ImmutableNFA.h:
3299         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::first):
3300         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::last):
3301         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::data):
3302         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::range):
3303         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator*): Deleted.
3304         (WebCore::ContentExtensions::ImmutableNFA::ConstRangeIterator::operator->): Deleted.
3305         * contentextensions/ImmutableNFANodeBuilder.h:
3306         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::first):
3307         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::last):
3308         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator*): Deleted.
3309         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::FakeRangeIterator::operator->): Deleted.
3310         * contentextensions/MutableRange.h:
3311         (WebCore::ContentExtensions::MutableRange::size): Deleted.
3312         * contentextensions/MutableRangeList.h:
3313         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::first):
3314         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::last):
3315         (WebCore::ContentExtensions::MutableRangeList::ConstIterator::data):
3316         (WebCore::ContentExtensions::MutableRangeList::extend):
3317         (WebCore::ContentExtensions::MutableRangeList::size):
3318         (WebCore::ContentExtensions::MutableRangeList::initializeFrom):
3319         * contentextensions/NFAToDFA.cpp:
3320         (WebCore::ContentExtensions::NFAToDFA::convert):
3321         (WebCore::ContentExtensions::canUseFallbackTransition): Deleted.
3322         (WebCore::ContentExtensions::findBestFallbackTarget): Deleted.
3323
3324 2015-07-06  Timothy Hatcher  <timothy@apple.com>
3325
3326         Fix ASSERT causing crashes in Inspector tests on the bots.
3327
3328         * inspector/InspectorPageAgent.cpp:
3329         (WebCore::InspectorPageAgent::enable): Reset stopwatch before starting it.
3330
3331 2015-07-06  Brady Eidson  <beidson@apple.com>
3332
3333         Remove unused "m_isPrivate" flag on NetworkStorageSession.
3334         https://bugs.webkit.org/show_bug.cgi?id=146648
3335
3336         Reviewed by Alex Christensen.
3337
3338         No new tests (No behavior change).
3339
3340         * platform/network/NetworkStorageSession.h:
3341         (WebCore::NetworkStorageSession::isPrivateBrowsingSession): Deleted.
3342
3343         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
3344         (WebCore::NetworkStorageSession::NetworkStorageSession): Deleted.
3345         (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Deleted.
3346
3347         * platform/network/soup/NetworkStorageSessionSoup.cpp:
3348         (WebCore::NetworkStorageSession::NetworkStorageSession): Deleted.
3349         (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Deleted.
3350
3351 2015-07-04  Timothy Hatcher  <timothy@apple.com>
3352
3353         Web Inspector: Add a dedicated Network tab that is always live
3354         https://bugs.webkit.org/show_bug.cgi?id=146568
3355
3356         Make sure the executionStopwatch is always started and never stops so resource loads
3357         always get timestamps, even when Timeline is not recording.
3358
3359         Reviewed by Joseph Pecoraro.
3360
3361         * inspector/InspectorPageAgent.cpp:
3362         (WebCore::InspectorPageAgent::enable): Start executionStopwatch.
3363         (WebCore::InspectorPageAgent::frameStartedLoading): Reset and start executionStopwatch.
3364         * inspector/InspectorTimelineAgent.cpp:
3365         (WebCore::InspectorTimelineAgent::internalStart): Removed executionStopwatch code.
3366         (WebCore::InspectorTimelineAgent::internalStop): Ditto.
3367
3368 2015-07-02  Timothy Hatcher  <timothy@apple.com>
3369
3370         Update the localized strings file.
3371
3372         * English.lproj/Localizable.strings: Updated with the script.
3373
3374 2015-07-06  Zalan Bujtas  <zalan@apple.com>
3375
3376         Crash: LayoutState root's container is nullptr when the layout root is detached.
3377         https://bugs.webkit.org/show_bug.cgi?id=146646
3378         rdar://problem/21371544
3379
3380         Reviewed by Simon Fraser.
3381
3382         This is a speculative fix to ensure that when the root of the LayoutState is detached
3383         we don't try to access its container (nullptr).
3384         This is related to trac.webkit.org/r185484.
3385
3386         Not reproducible.
3387
3388         * rendering/LayoutState.cpp:
3389         (WebCore::LayoutState::LayoutState):
3390         * rendering/LayoutState.h:
3391         (WebCore::LayoutState::La