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