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