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