[Mac] Playback target clients do not unregister on page reload
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-05-08  Eric Carlson  <eric.carlson@apple.com>
2
3         [Mac] Playback target clients do not unregister on page reload
4         https://bugs.webkit.org/show_bug.cgi?id=144761
5
6         Reviewed by Brady Eidson.
7
8         * dom/Document.cpp:
9         (WebCore::Document::prepareForDestruction): Unregister all target picker clients.
10
11         * html/HTMLMediaElement.cpp:
12         (WebCore::HTMLMediaElement::registerWithDocument): Register for page cache callback.
13         (WebCore::HTMLMediaElement::unregisterWithDocument): Unregister for page cache callback.
14         (WebCore::HTMLMediaElement::documentWillSuspendForPageCache): New.
15         (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): New.
16
17 2015-05-08  Chris Dumez  <cdumez@apple.com>
18
19         Throttle RequestAnimationFrame in subframes that are outside the viewport
20         https://bugs.webkit.org/show_bug.cgi?id=144718
21         <rdar://problem/20688782>
22
23         Reviewed by Simon Fraser.
24
25         Throttle RequestAnimationFrame in subframes that are outside the
26         viewport or have "display: none" for performance and power.
27
28         Tests: fast/animation/request-animation-frame-throttle-subframe-display-none.html
29                fast/animation/request-animation-frame-throttle-subframe.html
30
31         * dom/Document.h:
32         (WebCore::Document::scriptedAnimationController):
33         * dom/ScriptedAnimationController.cpp:
34         (WebCore::ScriptedAnimationController::setThrottled):
35         (WebCore::ScriptedAnimationController::isThrottled):
36         * dom/ScriptedAnimationController.h:
37         * loader/FrameLoader.cpp:
38         (WebCore::FrameLoader::open):
39         Call FrameView::setFrameRect() only *after* the view has been
40         set on the Frame. Otherwise, setFrameRect() ends up calling
41         viewportContentsChanged() and we hit the
42         ASSERT(frame().view() == this) assertion in windowClipRect()
43         because the Frame still has its old FrameView. This is covered
44         by loader/go-back-to-different-window-size.html layout test.
45
46         * page/FrameView.cpp:
47         (WebCore::FrameView::viewportContentsChanged):
48         (WebCore::FrameView::applyRecursivelyWithVisibleRect):
49         (WebCore::FrameView::resumeVisibleImageAnimations):
50         (WebCore::FrameView::updateScriptedAnimationsThrottlingState):
51         (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
52         (WebCore::FrameView::updateThrottledDOMTimersState):
53         (WebCore::FrameView::scrollPositionChanged): Deleted.
54         (WebCore::FrameView::sendResizeEventIfNeeded): Deleted.
55         * page/FrameView.h:
56         * testing/Internals.cpp:
57         (WebCore::Internals::isRequestAnimationFrameThrottled):
58         (WebCore::Internals::isTimerThrottled): Deleted.
59         * testing/Internals.h:
60         * testing/Internals.idl:
61
62 2015-05-08  Daniel Bates  <dabates@apple.com>
63
64         Fix the iOS Simulator external SDK build following <http://trac.webkit.org/changeset/181918>
65
66         Remove unused iOS Simulator-variant of CARenderServerRenderLayerWithTransform(). Also guard
67         IOSurfaceRef-variant of CARenderServerRenderLayerWithTransform() with USE(IOSURFACE)
68         since it is only applicable on platforms that use IOSurface.
69
70         * platform/spi/cocoa/QuartzCoreSPI.h:
71
72 2015-05-08  Myles C. Maxfield  <mmaxfield@apple.com>
73
74         Remove convenience constructors for TextRun
75         https://bugs.webkit.org/show_bug.cgi?id=144752
76
77         These convenience constructors are unnecessary. Moving the code that makes the StringView
78         back to the call site will also help us make things more elegant in future refactoring.
79
80         Reviewed by Darin Adler.
81
82         No new tests because there is no behavior change.
83
84         * css/CSSPrimitiveValue.cpp:
85         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Remove ambiguous call.
86         * platform/graphics/StringTruncator.cpp:
87         (WebCore::stringWidth):
88         * platform/graphics/TextRun.h:
89         (WebCore::TextRun::TextRun):
90         * platform/mac/DragImageMac.mm:
91         (WebCore::widthWithFont):
92         (WebCore::drawAtPoint):
93         * rendering/SimpleLineLayout.cpp:
94         (WebCore::SimpleLineLayout::canUseFor):
95         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
96         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
97         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
98         * rendering/TextPainter.cpp:
99         (WebCore::TextPainter::paintText):
100
101 2015-05-08  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
102
103         [Streams API] ReadableStream constructor start function should be able to error the stream
104         https://bugs.webkit.org/show_bug.cgi?id=141162
105
106         Reviewed by Darin Adler.
107
108         This patch implements the functionality of the ReadableStreamController error function.
109         It basically changes the state of the stream to errored, resolves the ready promise and rejects the closed promise.
110         Adding support to reject promise with any JSValue.
111
112         Support for storing the error is added to both reader and stream.
113
114         Test: streams/readable-stream-controller-error.html and rebased tests
115
116         * Modules/streams/ReadableStream.cpp:
117         (WebCore::ReadableStream::changeStateToErrored):
118         * Modules/streams/ReadableStream.h:
119         * Modules/streams/ReadableStreamReader.cpp:
120         (WebCore::ReadableStreamReader::initialize):
121         (WebCore::ReadableStreamReader::closed):
122         (WebCore::ReadableStreamReader::changeStateToClosed):
123         (WebCore::ReadableStreamReader::changeStateToErrored):
124         * Modules/streams/ReadableStreamReader.h:
125         * bindings/js/JSDOMPromise.h:
126         (WebCore::DeferredWrapper::reject):
127         * bindings/js/JSReadableStreamControllerCustom.cpp:
128         (WebCore::JSReadableStreamController::error):
129         * bindings/js/JSReadableStreamReaderCustom.cpp:
130         (WebCore::JSReadableStreamReader::closed):
131         * bindings/js/ReadableJSStream.cpp:
132         (WebCore::ReadableJSStream::createReader):
133         (WebCore::ReadableJSStream::storeError):
134         (WebCore::ReadableJSStream::Reader::storeError):
135         (WebCore::ReadableJSStream::jsController): Deleted.
136         * bindings/js/ReadableJSStream.h:
137
138 2015-05-08  Commit Queue  <commit-queue@webkit.org>
139
140         Unreviewed, rolling out r183985.
141         https://bugs.webkit.org/show_bug.cgi?id=144796
142
143         broke loader/go-back-to-different-window-size.html (Requested
144         by kling on #webkit).
145
146         Reverted changeset:
147
148         "Throttle RequestAnimationFrame in subframes that are outside
149         the viewport"
150         https://bugs.webkit.org/show_bug.cgi?id=144718
151         http://trac.webkit.org/changeset/183985
152
153 2015-05-08  Youenn Fablet  <youenn.fablet@crf.canon.fr>
154
155         SharedBuffer::m_size should be initialized to 0 when defining it
156         https://bugs.webkit.org/show_bug.cgi?id=144740
157
158         Reviewed by Darin Adler.
159
160         Setting m_size to 0 when declaring it and updating constructor definitions.
161
162         No change in behaviour.
163
164         * platform/SharedBuffer.cpp:
165         (WebCore::SharedBuffer::SharedBuffer):
166         * platform/SharedBuffer.h:
167         * platform/cf/SharedBufferCF.cpp:
168         (WebCore::SharedBuffer::SharedBuffer):
169         * platform/soup/SharedBufferSoup.cpp:
170         (WebCore::SharedBuffer::SharedBuffer):
171
172 2015-05-08  Commit Queue  <commit-queue@webkit.org>
173
174         Unreviewed, rolling out r183945.
175         https://bugs.webkit.org/show_bug.cgi?id=144789
176
177         "It broke all the GTK+ tests" (Requested by KaL on #webkit).
178
179         Reverted changeset:
180
181         "[GTK] Checks for DEVELOPMENT_BUILD are all wrong"
182         https://bugs.webkit.org/show_bug.cgi?id=144746
183         http://trac.webkit.org/changeset/183945
184
185 2015-05-07  Chris Dumez  <cdumez@apple.com>
186
187         Throttle RequestAnimationFrame in subframes that are outside the viewport
188         https://bugs.webkit.org/show_bug.cgi?id=144718
189         <rdar://problem/20688782>
190
191         Reviewed by Simon Fraser.
192
193         Throttle RequestAnimationFrame in subframes that are outside the
194         viewport or have "display: none" for performance and power.
195
196         Tests: fast/animation/request-animation-frame-throttle-subframe-display-none.html
197                fast/animation/request-animation-frame-throttle-subframe.html
198
199         * dom/Document.h:
200         (WebCore::Document::scriptedAnimationController):
201         * dom/ScriptedAnimationController.cpp:
202         (WebCore::ScriptedAnimationController::setThrottled):
203         (WebCore::ScriptedAnimationController::isThrottled):
204         * dom/ScriptedAnimationController.h:
205         * page/FrameView.cpp:
206         (WebCore::FrameView::viewportContentsChanged):
207         (WebCore::FrameView::applyRecursivelyWithVisibleRect):
208         (WebCore::FrameView::resumeVisibleImageAnimations):
209         (WebCore::FrameView::updateScriptedAnimationsThrottlingState):
210         (WebCore::FrameView::resumeVisibleImageAnimationsIncludingSubframes):
211         (WebCore::FrameView::updateThrottledDOMTimersState):
212         (WebCore::FrameView::scrollPositionChanged): Deleted.
213         (WebCore::FrameView::sendResizeEventIfNeeded): Deleted.
214         * page/FrameView.h:
215         * testing/Internals.cpp:
216         (WebCore::Internals::isRequestAnimationFrameThrottled):
217         (WebCore::Internals::isTimerThrottled): Deleted.
218         * testing/Internals.h:
219         * testing/Internals.idl:
220
221 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
222
223         Calculate source-size length as a float
224         https://bugs.webkit.org/show_bug.cgi?id=144766
225
226         Reviewed by Dean Jackson.
227
228         Make sure that the source-size length is calculated as a float,
229         to align with the spec.
230
231         Test: fast/dom/HTMLImageElement/sizes/image-sizes-1x.html
232               fast/dom/HTMLImageElement/sizes/image-sizes-2x.html
233
234         * css/SourceSizeList.cpp:
235         (WebCore::parseSizesAttribute):
236         (WebCore::defaultLength):
237         (WebCore::computeLength):
238         * css/SourceSizeList.h:
239         * html/HTMLImageElement.cpp:
240         (WebCore::HTMLImageElement::parseAttribute):
241         * html/parser/HTMLPreloadScanner.cpp:
242         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
243         * html/parser/HTMLSrcsetParser.cpp:
244         (WebCore::pickBestImageCandidate):
245         (WebCore::bestFitSourceForImageAttributes):
246         * html/parser/HTMLSrcsetParser.h:
247
248 2015-05-07  Commit Queue  <commit-queue@webkit.org>
249
250         Unreviewed, rolling out r183895.
251         https://bugs.webkit.org/show_bug.cgi?id=144786
252
253         Many tests became flaky (Requested by ap on #webkit).
254
255         Reverted changeset:
256
257         "Expose more font weights for -apple-system"
258         https://bugs.webkit.org/show_bug.cgi?id=144707
259         http://trac.webkit.org/changeset/183895
260
261 2015-05-07  Hyungwook Lee  <hyungwook.lee@navercorp.com>
262
263         Add first-letter assert exception in RenderButton::setupInnerStyle().
264         https://bugs.webkit.org/show_bug.cgi?id=140517OB
265
266         Reviewed by Darin Adler.
267
268         StyleResolver references inner block's render style temporary in
269         RenderBlock::styleDidChange() when we have first-letter css pseudo
270         element.
271
272         * rendering/RenderButton.cpp:
273         (WebCore::RenderButton::setupInnerStyle):
274
275 2015-05-07  Chris Dumez  <cdumez@apple.com>
276
277         Unreviewed, fix build after r183970.
278
279         WEBCORE_EXPORT should not be used on inlined functions.
280
281         * platform/graphics/ca/GraphicsLayerCA.h:
282
283 2015-05-07  Anders Carlsson  <andersca@apple.com>
284
285         Build fixes.
286
287         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
288         (-[WebAccessibilityObjectWrapper doAXRTFForRange:]):
289         * editing/cocoa/HTMLConverter.mm:
290         (HTMLConverter::_addMarkersToList):
291         * platform/mac/PasteboardMac.mm:
292         (WebCore::writeFileWrapperAsRTFDAttachment):
293         * platform/mac/PlatformPasteboardMac.mm:
294         (WebCore::PlatformPasteboard::setTypes):
295         Pass empty arrays and dictionaries instead of nil.
296
297         * rendering/RenderThemeMac.mm:
298         (WebCore::RenderThemeMac::paintSliderThumb):
299         Pass the document view to the AppKit paint method.
300
301 2015-05-07  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
302
303         Purge PassRefPtr in WebCore/html - 3
304         https://bugs.webkit.org/show_bug.cgi?id=144686
305
306         Reviewed by Andreas Kling.
307
308         Replace PassRefPtr with Ref in create() factory functions, because
309         it doesn't have to change to be null.
310
311         No new tests, no behavior changes.
312
313         * html/FTPDirectoryDocument.h:
314         * html/HTMLDetailsElement.cpp:
315         (WebCore::DetailsContentElement::create):
316         * html/HTMLKeygenElement.cpp:
317         * html/HTMLSummaryElement.cpp:
318         (WebCore::SummaryContentElement::create):
319         * html/TimeRanges.cpp:
320         (WebCore::TimeRanges::create):
321         * html/shadow/SliderThumbElement.cpp:
322         (WebCore::SliderContainerElement::create):
323         * html/shadow/SliderThumbElement.h:
324         (WebCore::SliderThumbElement::create):
325         * html/shadow/SpinButtonElement.cpp:
326         (WebCore::SpinButtonElement::create):
327         * html/shadow/SpinButtonElement.h:
328         * html/shadow/TextControlInnerElements.cpp:
329         (WebCore::TextControlInnerContainer::create):
330         (WebCore::TextControlInnerElement::create):
331         (WebCore::TextControlInnerTextElement::create):
332         (WebCore::SearchFieldResultsButtonElement::create):
333         (WebCore::SearchFieldCancelButtonElement::create):
334         * html/shadow/TextControlInnerElements.h:
335         * html/shadow/YouTubeEmbedShadowElement.cpp:
336         (WebCore::YouTubeEmbedShadowElement::create):
337         * html/track/InbandDataTextTrack.cpp:
338         (WebCore::InbandDataTextTrack::create):
339         * html/track/InbandDataTextTrack.h:
340         * html/track/InbandGenericTextTrack.cpp:
341         (WebCore::InbandGenericTextTrack::create):
342         * html/track/InbandGenericTextTrack.h:
343         * html/track/InbandWebVTTTextTrack.cpp:
344         (WebCore::InbandWebVTTTextTrack::create):
345         * html/track/InbandWebVTTTextTrack.h:
346         * html/track/LoadableTextTrack.h:
347         * html/track/TextTrack.h:
348         (WebCore::TextTrack::create):
349         * html/track/TextTrackCueGeneric.cpp:
350         * html/track/TextTrackCueGeneric.h:
351         * html/track/TextTrackList.h:
352         * html/track/VTTRegionList.h:
353         (WebCore::VTTRegionList::create):
354
355 2015-05-07  Dean Jackson  <dino@apple.com>
356
357         [iOS] MediaControls: disappear while scrubbing
358         https://bugs.webkit.org/show_bug.cgi?id=144777
359         <rdar://problem/20065572>
360
361         Reviewed by Eric Carlson.
362
363         If we are scrubbing we shouldn't hide the controls.
364
365         * Modules/mediacontrols/mediaControlsApple.js:
366         (Controller.prototype.hideControls): Return early if we are scrubbing.
367         * Modules/mediacontrols/mediaControlsiOS.js:
368         (ControllerIOS.prototype): Add initial value for _potentiallyScrubbing and
369         rename from non-underscored value throughout the file.
370         (ControllerIOS.prototype.handleTimelineTouchEnd): When we finish scrubbing, reset
371         the timer to hide the controls.
372
373 2015-05-07  Simon Fraser  <simon.fraser@apple.com>
374
375         REGRESSION (r183300): Fixed elements flash when scrolling
376         https://bugs.webkit.org/show_bug.cgi?id=144778
377         rdar://problem/20769741
378
379         Reviewed by Dean Jackson.
380
381         After r183300 we can detached layer backing store when outside the coverage region.
382         However, position:fixed layers are moved around by the ScrollingCoordinator behind
383         GraphicsLayer's back, so we can do layer flushes with stale information about layer
384         geometry.
385         
386         To avoid dropping backing store for layers in this situation, prevent backing
387         store detachment on layers registered with the ScrollingCoordinator as viewport-constrained
388         layers. Preventing detachment on a layer also prevents detachment on all descendant
389         layers.
390
391         * platform/graphics/GraphicsLayer.h:
392         (WebCore::GraphicsLayer::setAllowsBackingStoreDetachment):
393         (WebCore::GraphicsLayer::allowsBackingStoreDetachment):
394         * platform/graphics/ca/GraphicsLayerCA.cpp:
395         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
396         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): Set m_intersectsCoverageRect to true
397         if backing store detachment is prevented.
398         (WebCore::GraphicsLayerCA::recursiveCommitChanges): Set a bit in the CommitState to 
399         communicate to descendants that detachment is prevented.
400         * platform/graphics/ca/GraphicsLayerCA.h:
401         (WebCore::GraphicsLayerCA::CommitState::CommitState): Deleted.
402         * rendering/RenderLayerBacking.cpp:
403         (WebCore::RenderLayerBacking::setIsScrollCoordinatedWithViewportConstrainedRole):
404         * rendering/RenderLayerBacking.h:
405         (WebCore::RenderLayerBacking::setScrollingNodeIDForRole): If registering with a non-zero
406         nodeID for the ViewportConstrained role, turn off backing store detachment.
407
408 2015-05-07  Sam Weinig  <sam@webkit.org>
409
410         Consider implementing Document.scrollingElement
411         <rdar://problem/20845213>
412         https://bugs.webkit.org/show_bug.cgi?id=143609
413
414         Reviewed by Simon Fraser.
415
416         Add the non-compliant implementation of Document.scrollingElement that the spec,
417         found at http://dev.w3.org/csswg/cssom-view/#dom-document-scrollingelement, 
418         says we should have while we have non-compliant implementations of Element.scrollTop
419         and Element.scrollLeft (fixing that is tracked by https://bugs.webkit.org/show_bug.cgi?id=106133).
420
421         Tests: fast/dom/Document/scrollingElement-quirks-mode.html
422                fast/dom/Document/scrollingElement-standards-mode.html
423
424         * dom/Document.cpp:
425         (WebCore::Document::scrollingElement):
426         * dom/Document.h:
427         * dom/Document.idl:
428
429 2015-05-07  Dean Jackson  <dino@apple.com>
430
431         [iOS] While scrubbing and holding down, video continues to play
432         https://bugs.webkit.org/show_bug.cgi?id=144776
433         <rdar://problem/20863757>
434
435         Reviewed by Simon Fraser.
436
437         When we are scrubbing a video, we should pause playback. As we
438         let go of the scrubber playback can resume (but only if it was
439         playing originally).
440
441         * Modules/mediacontrols/mediaControlsiOS.js:
442         (ControllerIOS.prototype.createControls): Listen for touchstart on the scrubber.
443         (ControllerIOS.prototype.handleTimelineInput): Call the prototype, but pause if necessary.
444         (ControllerIOS.prototype.handleTimelineChange): Just moved this to be with the other timeline functions.
445         (ControllerIOS.prototype.handleTimelineTouchStart): Add the listeners for end and cancel. Remember that we are
446         potentially about to scrub.
447         (ControllerIOS.prototype.handleTimelineTouchEnd): Remove the listeners.
448
449 2015-05-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
450
451         Applying a filter on an SVG element, which is larger than 4096 pixels, causes this element to be rendered shifted to the left
452         https://bugs.webkit.org/show_bug.cgi?id=144335
453
454         Reviewed by Daniel Bates.
455
456         Address comments raised by Darin Adler in review.
457
458         * platform/graphics/ImageBuffer.cpp:
459         (WebCore::ImageBuffer::sizeNeedsClamping):
460         (WebCore::ImageBuffer::clampedSize):
461         (WebCore::ImageBuffer::isSizeClamped): Deleted.
462         * platform/graphics/ImageBuffer.h:
463         The condition for the negative width/height in isSizeClamped() was wrong. Use
464         FloatSize::isEmpty() instead and rename the function to sizeNeedsClamping().
465         The new function should return the opposite of the old function return value.
466         
467         * platform/graphics/filters/FilterEffect.cpp:
468         (WebCore::FilterEffect::apply):
469         (WebCore::FilterEffect::asUnmultipliedImage):
470         (WebCore::FilterEffect::asPremultipliedImage):
471         (WebCore::FilterEffect::copyUnmultipliedImage):
472         (WebCore::FilterEffect::copyPremultipliedImage):
473         (WebCore::FilterEffect::createUnmultipliedImageResult):
474         (WebCore::FilterEffect::createPremultipliedImageResult):
475         * rendering/FilterEffectRenderer.cpp:
476         (WebCore::FilterEffectRenderer::updateBackingStoreRect):
477         (WebCore::FilterEffectRendererHelper::beginFilterEffect):
478         * rendering/svg/RenderSVGResourceFilter.cpp:
479         (WebCore::RenderSVGResourceFilter::applyResource):
480         Call the new function and negate the condition for the return value.
481
482 2015-05-07  Anders Carlsson  <andersca@apple.com>
483
484         Build fix.
485
486         * editing/mac/EditorMac.mm:
487         (WebCore::dataInRTFDFormat):
488         (WebCore::dataInRTFFormat):
489
490 2015-05-07  Said Abou-Hallawa  <sabouhallawa@apple.com>
491
492         Applying a filter on an SVG element, which is larger than 4096 pixels, causes this element to be rendered shifted to the left
493         https://bugs.webkit.org/show_bug.cgi?id=144335
494
495         Reviewed by Darin Adler.
496
497         When the SVG element is larger than 4096x4096 pixels and it has a filter,
498         a clipper or a masker, the ImageBuffer which is created for drawing the
499         sourceGraphicBuffer has to be clamped to this size. The reason for this
500         clamping is the FilterEffect simply ignores processing any ImageBuffer
501         larger than this size.
502         
503         The bug was happening because we did not propagate the clamping logic to
504         the FilterEffect. The FilterEffect result ImageBuffer was not clamped as
505         what we do for drawing the sourceGraphicBuffer. If only the destination
506         point is specified, the GraphicsContext::drawImageBuffer() assumes the
507         source and the destination images have the same size which is not true
508         with the clamping.
509         
510         The fix is to add the clamping logic to the FilterEffect. Two places we
511         need to change. (1) FilterEffect::createImageBufferResult() has to apply
512         the same clamping we do in SVGRenderingContext::createImageBuffer(). (2)
513         FilterEffect::drawingRegionOfInputImage() has to consider the clamping 
514         when mapping from absolute coordinates to the ImageBuffer coordinates.
515         
516         Tests: svg/filters/big-sized-off-viewport-filter.svg
517
518         * platform/graphics/ImageBuffer.cpp:
519         (WebCore::ImageBuffer::isSizeClamped):
520         (WebCore::ImageBuffer::clampedSize):
521         (WebCore::ImageBuffer::clampedRect):
522         * platform/graphics/ImageBuffer.h:
523         (WebCore::ImageBuffer::setSpaceSize): Move all the clamping helper methods
524         from SVGRenderingContext and RenderSVGResourceFilter to the ImageBuffer.
525
526         * platform/graphics/filters/FEColorMatrix.cpp:
527         (WebCore::FEColorMatrix::platformApplySoftware): Use logicalSize() of the
528         result image instead of using absolutePaintRect(). The later returns the
529         rectangle of the element without clamping.
530         
531         * platform/graphics/filters/FETile.cpp:
532         (WebCore::FETile::platformApplySoftware):
533         * rendering/svg/RenderSVGResourceClipper.cpp:
534         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
535         * rendering/svg/RenderSVGResourceFilter.cpp:
536         (WebCore::RenderSVGResourceFilter::applyResource):
537         (WebCore::RenderSVGResourceFilter::fitsInMaximumImageSize): Deleted.
538         * rendering/svg/RenderSVGResourceFilter.h:
539         * rendering/svg/RenderSVGResourceGradient.cpp:
540         (WebCore::createMaskAndSwapContextForTextGradient):
541         (WebCore::clipToTextMask):
542         * rendering/svg/RenderSVGResourceMasker.cpp:
543         (WebCore::RenderSVGResourceMasker::applySVGMask):
544         * rendering/svg/RenderSVGResourcePattern.cpp:
545         (WebCore::RenderSVGResourcePattern::buildPattern):
546         (WebCore::RenderSVGResourcePattern::createTileImage): Make the modifications
547         which are needed because of moving the clamping helper methods to ImageBuffer
548         and because of changing the prototype of SVGRenderingContext methods.
549
550         * platform/graphics/filters/FilterEffect.cpp:
551         (WebCore::FilterEffect::drawingRegionOfInputImage): Consider the clamping
552         when mapping from absolute coordinates to the ImageBuffer coordinates.
553
554         (WebCore::FilterEffect::createImageBufferResult): Apply the same clamping
555         we do in SVGRenderingContext::createImageBuffer() when creating the 
556         FilterEffect result ImageBuffer.
557         
558         (WebCore::FilterEffect::apply):
559         (WebCore::FilterEffect::asUnmultipliedImage):
560         (WebCore::FilterEffect::asPremultipliedImage):
561         (WebCore::FilterEffect::copyUnmultipliedImage):
562         (WebCore::FilterEffect::copyPremultipliedImage):
563         (WebCore::FilterEffect::createUnmultipliedImageResult):
564         (WebCore::FilterEffect::createPremultipliedImageResult):
565         (WebCore::FilterEffect::maxFilterArea): Deleted.
566         (WebCore::FilterEffect::isFilterSizeValid): Deleted.
567         * platform/graphics/filters/FilterEffect.h: Use the new ImageBuffer clamping
568         helper methods and delete the local ones.
569
570         * platform/graphics/transforms/AffineTransform.cpp:
571         (WebCore::AffineTransform::scaleNonUniform):
572         (WebCore::AffineTransform::scale):
573         (WebCore::AffineTransform::translate):
574         * platform/graphics/transforms/AffineTransform.h: Add new scale and translate
575         overloads to AffineTransform.
576         
577         * rendering/FilterEffectRenderer.cpp:
578         (WebCore::FilterEffectRenderer::updateBackingStoreRect):
579         (WebCore::FilterEffectRendererHelper::beginFilterEffect): Code clean up.
580         
581         * rendering/svg/SVGRenderingContext.cpp:
582         (WebCore::SVGRenderingContext::calculateScreenFontSizeScalingFactor):
583         (WebCore::SVGRenderingContext::calculateTransformationToOutermostCoordinateSystem):
584         Return the AffineTransform instead of passing it through the reference of
585         an argument.
586         
587         (WebCore::SVGRenderingContext::createImageBuffer):
588         (WebCore::SVGRenderingContext::createImageBufferForPattern): Deleted.
589         Code clean up and method rename.
590         
591         (WebCore::SVGRenderingContext::clampedAbsoluteTargetRect): Deleted.
592         (WebCore::SVGRenderingContext::clampedAbsoluteSize): Deleted.
593         * rendering/svg/SVGRenderingContext.h: Move the clamping helper methods to
594         the ImageBuffer class.
595     
596 2015-05-07  Beth Dakin  <bdakin@apple.com>
597
598         New force-related DOM events should fire in WK1 views
599         https://bugs.webkit.org/show_bug.cgi?id=144663
600         -and corresponding-
601         rdar://problem/20281886
602
603         Reviewed by Sam Weinig.
604
605         All of the WK1 mouse events need to take the correspondingPressureEvent.
606         * page/EventHandler.h:
607
608         Make correspondingPressureEvent a part of CurrentEventScope. This is needed to 
609         have accurate pressure information for all of the mouse events in subframes.
610         * page/mac/EventHandlerMac.mm:
611         (WebCore::correspondingPressureEventSlot):
612         (WebCore::EventHandler::correspondingPressureEvent):
613         (WebCore::CurrentEventScope::CurrentEventScope):
614         (WebCore::CurrentEventScope::~CurrentEventScope):
615
616         These events don’t have an associated pressure, so send nil for the 
617         correspondingPressureEvent.
618         (WebCore::EventHandler::wheelEvent):
619         (WebCore::EventHandler::keyEvent):
620
621         Pipe through correspondingPressureEvent.
622         (WebCore::EventHandler::mouseDown):
623         (WebCore::EventHandler::mouseDragged):
624         (WebCore::EventHandler::mouseUp):
625         (WebCore::EventHandler::mouseMoved):
626
627         New function to handle pressure change events.
628         (WebCore::EventHandler::pressureChange):
629
630         Pipe through correspondingPressureEvent.
631         (WebCore::EventHandler::passMouseMovedEventToScrollbars):
632         (WebCore::EventHandler::currentPlatformMouseEvent):
633
634         Take the correspondingPressureEvent in order to build a PlatformMouseEvent with 
635         the correct pressure information.
636         * platform/mac/PlatformEventFactoryMac.h:
637         * platform/mac/PlatformEventFactoryMac.mm:
638         (WebCore::globalPointForEvent):
639         (WebCore::pointForEvent):
640         (WebCore::mouseButtonForEvent):
641         (WebCore::PlatformMouseEventBuilder::PlatformMouseEventBuilder):
642         (WebCore::PlatformEventFactory::createPlatformMouseEvent):
643
644 2015-05-06  Roger Fong  <roger_fong@apple.com>
645
646         Media Controls: Scrubber should be independent of actual video time, causes scrubber to be jumpy.
647         https://bugs.webkit.org/show_bug.cgi?id=144700.
648         <rdar://problem/19997548>
649
650         Reviewed by Jer Noble.
651
652         Update time and timeline during the timeline input event instead of the wrapper's mousemove.
653         (Controller.prototype.handleWrapperMouseMove):
654         (Controller.prototype.handleTimelineMouseMove):
655         (Controller.prototype.drawTimelineBackground): 
656
657         (Controller.prototype.updateControlsWhileScrubbing): 
658         Updates time and scrubber to reflect timeline user input.
659
660 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
661
662         Handle meta viewport in HTMLPreloadScanner
663         https://bugs.webkit.org/show_bug.cgi?id=144640
664
665         Reviewed by Dean Jackson.
666
667         Add support for the <meta> tag to the HTMLPreloadScanner
668         and when the meta tag's name is viewport, get the document
669         to process the tag's attribute value, and set its ViewportArgument.
670
671         Tests: fast/dom/HTMLMetaElement/meta-preloader.html
672
673         * html/parser/HTMLPreloadScanner.cpp:
674         (WebCore::TokenPreloadScanner::tagIdFor): Added meta.
675         (WebCore::TokenPreloadScanner::initiatorFor): Added meta.
676         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner): Call document.processViewport is meta viewport encountered.
677         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
678         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute): Keep track of meta viewport tags.
679         (WebCore::testPreloadScannerViewportSupport): Testing function that makes sure this functionality is working.
680         * html/parser/HTMLPreloadScanner.h:
681         * testing/Internals.cpp:
682         (WebCore::Internals::testPreloaderSettingViewport): Calls the testing function.
683         * testing/Internals.h:
684         * testing/Internals.idl:
685
686 2015-05-07  Zalan Bujtas  <zalan@apple.com>
687
688         REGRESSION (r164449): Subpixel rendering: http://www.apple.com/iphone-6/ "Faster wireless." image displays vertical black line on 1x displays at specific window width.
689         https://bugs.webkit.org/show_bug.cgi?id=144723
690         rdar://problem/18307094
691
692         Reviewed by Simon Fraser.
693
694         This patch ensures that the backing store's graphics layer is always positioned on a device pixel boundary.
695
696         While calculating the backing store's graphics layer location, its ancestor layer's compositing bounds is taken into account.
697         However the compositing bounds is an unsnapped value, so in order to place the graphics layer properly,
698         we need to pixel align the ancestor compositing bounds before using it to adjust the child's graphics layer position.
699
700         Test: compositing/ancestor-compositing-layer-is-on-subpixel-position.html
701
702         * rendering/RenderLayerBacking.cpp:
703         (WebCore::RenderLayerBacking::updateGeometry):
704
705 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
706
707         Fix sizes crash and add invalid value tests.
708         https://bugs.webkit.org/show_bug.cgi?id=144739
709
710         Reviewed by Darin Adler.
711
712         Make sure that only CSS length are allowed when the sizes parser is calling computeLength.
713         Also make sure that for invalid lengths, the 100vw default is used instead.
714
715         Test: fast/dom/HTMLImageElement/sizes/image-sizes-invalids.html
716
717         * css/SourceSizeList.cpp:
718         (WebCore::computeLength):
719         (WebCore::defaultLength):
720         (WebCore::parseSizesAttribute):
721
722 2015-05-07  Michael Catanzaro  <mcatanzaro@igalia.com>
723
724         [GTK] Checks for DEVELOPMENT_BUILD are all wrong
725         https://bugs.webkit.org/show_bug.cgi?id=144746
726
727         Reviewed by Martin Robinson.
728
729         Use DEVELOPER_MODE rather than DEVELOPMENT_BUILD.
730
731         * platform/gtk/GtkUtilities.cpp:
732         * platform/gtk/GtkUtilities.h:
733         * platform/text/gtk/HyphenationLibHyphen.cpp:
734         (WebCore::availableLocales):
735
736 2015-05-07  Simon Fraser  <simon.fraser@apple.com>
737
738         Remove the WK1-only code path for independently composited iframes
739         https://bugs.webkit.org/show_bug.cgi?id=144722
740
741         Reviewed by Dean Jackson.
742
743         In WebKit1 on Mac, we allowed iframes to be composited independently of their
744         parent document, relying on the fact that the frame's platform view can host
745         a layer-backed view. However, this ran into bugs (rdar://problem/18862298),
746         and triggers the assertion at the end of FrameView::updateLayoutAndStyleIfNeededRecursive(),
747         because the compositing update after a layout can dirty style in notifyIFramesOfCompositingChange().
748         
749         Removing the WK1-only code path solves these problems. It also eliminates the need
750         to do compositing-specific frame overlap testing.
751
752         * page/FrameView.cpp:
753         (WebCore::FrameView::setIsOverlapped): No need to do compositing-related things here.
754         Any iframe that gets composited will participate in the normal compositing overlap
755         testing in its parent frame.
756         (WebCore::FrameView::hasCompositedContentIncludingDescendants): Deleted.
757         (WebCore::FrameView::hasCompositingAncestor): Deleted.
758         * page/FrameView.h:
759         * rendering/RenderLayerCompositor.cpp: Replace ownerElement() checks in this file
760         with an isMainFrameCompositor() for readability. Some 0->nullptr.
761         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
762         (WebCore::RenderLayerCompositor::chromeClient):
763         (WebCore::RenderLayerCompositor::enclosingCompositorFlushingLayers):
764         (WebCore::RenderLayerCompositor::updateCompositingLayers):
765         (WebCore::RenderLayerCompositor::appendDocumentOverlayLayers):
766         (WebCore::RenderLayerCompositor::updateBacking):
767         (WebCore::RenderLayerCompositor::layerTreeAsText):
768         (WebCore::RenderLayerCompositor::frameContentsCompositor):
769         (WebCore::RenderLayerCompositor::setIsInWindow):
770         (WebCore::RenderLayerCompositor::requiresCompositingForScrollableFrame):
771         (WebCore::RenderLayerCompositor::requiresCompositingForFrame): frameRenderer.requiresAcceleratedCompositing()
772         already bails on no content RenderView, so the shouldPropagateCompositingToEnclosingFrame() check does
773         nothing and is removed.
774         (WebCore::RenderLayerCompositor::isAsyncScrollableStickyLayer):
775         (WebCore::RenderLayerCompositor::requiresScrollLayer):
776         (WebCore::RenderLayerCompositor::documentUsesTiledBacking):
777         (WebCore::RenderLayerCompositor::isMainFrameCompositor):
778         (WebCore::RenderLayerCompositor::shouldCompositeOverflowControls):
779         (WebCore::RenderLayerCompositor::requiresOverhangAreasLayer):
780         (WebCore::RenderLayerCompositor::requiresContentShadowLayer):
781         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
782         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
783         (WebCore::RenderLayerCompositor::updateLayerForHeader):
784         (WebCore::RenderLayerCompositor::updateLayerForFooter):
785         (WebCore::RenderLayerCompositor::ensureRootLayer): Main frame attaches via ChromeClient,
786         all other frames attach via parent frame.
787         (WebCore::RenderLayerCompositor::notifyIFramesOfCompositingChange): This call to
788         scheduleSetNeedsStyleRecalc(SyntheticStyleChange) was the source of dirtying style after
789         layout, but is no longer needed so remove it.
790         (WebCore::RenderLayerCompositor::registerAllViewportConstrainedLayers):
791         (WebCore::RenderLayerCompositor::unregisterAllViewportConstrainedLayers):
792         (WebCore::RenderLayerCompositor::scrollingCoordinator):
793         (WebCore::RenderLayerCompositor::graphicsLayerFactory):
794         (WebCore::RenderLayerCompositor::allowsIndependentlyCompositedFrames): Deleted.
795         (WebCore::RenderLayerCompositor::shouldPropagateCompositingToEnclosingFrame): Deleted.
796         (WebCore::RenderLayerCompositor::mainFrameBackingIsTiled): Deleted. This was mis-named;
797         it really asks whether the document uses tiled backing, but does not check for main frame.
798         * rendering/RenderLayerCompositor.h:
799         * rendering/RenderWidget.cpp:
800         (WebCore::RenderWidget::paintContents): No need to do frame overlap testing for
801         compositing now.
802
803 2015-05-06  Dean Jackson  <dino@apple.com>
804
805         Handle backdrop views that have to tile
806         https://bugs.webkit.org/show_bug.cgi?id=142317
807         <rdar://problem/20049088>
808
809         Reviewed by Simon Fraser.
810
811         Take 2 - this was rolled out because Mavericks was crashing.
812
813         Make sure backdrop layers don't tile. If they are big
814         enough, we'll leave it to the platform compositor to handle.
815
816         This also fixes a bug where if a layer changed from a backdrop
817         type to a tiled type, it would still retain its custom appearance
818         and we'd try to add children to the wrong layer.
819
820         Test: compositing/media-controls-bar-appearance-big.html
821
822         * platform/graphics/ca/GraphicsLayerCA.cpp:
823         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
824         a layer needs a backdrop before checking if it needs to tile.
825
826 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
827
828         Revert "Introducing the Platform Abstraction Layer (PAL)"
829         https://bugs.webkit.org/show_bug.cgi?id=144751
830
831         Unreviewed.
832
833         PAL should be a new target inside WebCore, rather than a top-level folder.
834
835         * WebCore.xcodeproj/project.pbxproj:
836         * Configurations/FeatureDefines.xcconfig:
837
838 2015-05-07  Dan Bernstein  <mitz@apple.com>
839
840         Tried to fix the build.
841
842         * Configurations/WebCoreTestSupport.xcconfig:
843
844 2015-05-07  Joanmarie Diggs  <jdiggs@igalia.com>
845
846         AX: [ATK] The pre element should be mapped to ATK_ROLE_SECTION; not ATK_ROLE_PANEL
847         https://bugs.webkit.org/show_bug.cgi?id=144702
848
849         Reviewed by Chris Fleizach.
850
851         Add a new PreRole AccessibilityRole so that per-platform mapping is possible.
852         Map PreRole to ATK_ROLE_SECTION for Efl and Gtk; to NSAccessibilityGroupRole
853         for the Mac. Add PreRole to the list of "text type" ATK roles.
854
855         No new tests. Existing tests were updated to reflect the corrected mapping.
856
857         * accessibility/AccessibilityObject.h:
858         * accessibility/AccessibilityRenderObject.cpp:
859         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
860         * accessibility/atk/AccessibilityObjectAtk.cpp:
861         (WebCore::AccessibilityObject::allowsTextRanges):
862         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
863         (atkRole):
864         (roleIsTextType):
865         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
866         (createAccessibilityRoleMap):
867
868 2015-05-07  Dan Bernstein  <mitz@apple.com>
869
870         <rdar://problem/19317140> [Xcode] Remove usage of AspenFamily.xcconfig in Source/
871         https://bugs.webkit.org/show_bug.cgi?id=144727
872
873         Reviewed by Darin Adler.
874
875         * Configurations/Base.xcconfig: Don’t include AspenFamily.xcconfig.
876         * Configurations/WebCore.xcconfig: For iOS, define INSTALL_PATH in terms of
877         INSTALL_PATH_PREFIX, and set INSTALL_PATH_PREFIX for the iOS 8.x Simulator.
878         * Configurations/WebCoreTestSupport.xcconfig: Define INSTALL_PATH in terms of
879         INSTALL_PATH_PREFIX and INSTALL_PATH_ACTUAL, and define INSTALL_PATH_PREFIX for the iOS 8.x
880         Simulator.
881
882 2015-05-07  Eric Carlson  <eric.carlson@apple.com>
883
884         [Mac] Playback target isn't set on new element
885         https://bugs.webkit.org/show_bug.cgi?id=144724
886
887         Reviewed by Jer Noble.
888
889         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
890         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
891         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Call setShouldPlayToPlaybackTarget
892         if necessary.
893         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Remember
894         the setting in case we don't have an AVPlayer yet.
895
896 2015-05-07  Yoav Weiss  <yoav@yoav.ws>
897
898         Fix <script srcset> being loaded by the preloader.
899         https://bugs.webkit.org/show_bug.cgi?id=144675
900
901         Reviewed by Darin Adler.
902
903         Fix HTMLPreloadScanner to make sure that srcset is only loaded
904         when it is present on an <img>.
905
906         Tests: http/tests/loading/preload-script-src.html
907                http/tests/loading/preload-script-srcset-ignored.html
908
909         * html/parser/HTMLPreloadScanner.cpp:
910         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
911
912 2015-05-07  Žan Doberšek  <zdobersek@igalia.com>
913
914         Add missing type traits specialization for PlatformDisplayWayland
915         https://bugs.webkit.org/show_bug.cgi?id=144671
916
917         Reviewed by Carlos Garcia Campos.
918
919         * platform/graphics/wayland/PlatformDisplayWayland.h:
920         Add missing type traits specialization for the PlatformDisplayWayland
921         class via the SPECIALIZE_TYPE_TRAITS_PLATFORM_DISPLAY macro.
922
923 2015-05-06  Manuel Rego Casasnovas  <rego@igalia.com>
924
925         [CSS Grid Layout] Mark grid shorthands as layout dependent
926         https://bugs.webkit.org/show_bug.cgi?id=144687
927
928         Reviewed by Darin Adler.
929
930         grid-template and grid shorthands were not marked us layout dependent,
931         so you can end up calling them before the grid has been laid out and
932         you'll get a crash at valueForGridTrackList() because of trackPositions
933         won't be initialized yet.
934
935         Tests: fast/css-grid-layout/grid-shorthand-computed-style-crash.html
936                fast/css-grid-layout/grid-template-shorthand-computed-style-crash.html
937
938         * css/CSSComputedStyleDeclaration.cpp:
939         (WebCore::isLayoutDependent): Add the grid shorthands only if the object
940         is a RenderGrid as otherwise it's not needed (using the same condition
941         for grid-template-columns and grid-template-rows properties too).
942
943 2015-05-06  Daniel Bates  <dabates@apple.com>
944
945         [iOS][WK2] Pause/resume database thread when UIProcess enters/leaves the background
946         https://bugs.webkit.org/show_bug.cgi?id=144657
947         <rdar://problem/18894598>
948
949         Reviewed by Andy Estes.
950
951         Export WebCore functionality to pause and resume the database thread so that we can
952         make use of this functionality from WebKit2.
953
954         * Modules/webdatabase/AbstractDatabaseServer.h:
955         * Modules/webdatabase/DatabaseManager.cpp:
956         (WebCore::DatabaseManager::setPauseAllDatabases): Added; turns around and calls DatabaseServer::setPauseAllDatabases().
957         * Modules/webdatabase/DatabaseManager.h:
958         * Modules/webdatabase/DatabaseServer.cpp:
959         (WebCore::DatabaseServer::setPauseAllDatabases): Added; turns around and calls
960         DatabaseTracker::tracker().setDatabasesPaused() to pause or resume the database thread.
961         For now, we guard this call with PLATFORM(IOS). We'll look to remove this guard once
962         we fix <https://bugs.webkit.org/show_bug.cgi?id=144660>.
963         * Modules/webdatabase/DatabaseServer.h:
964
965 2015-05-06  Brent Fulgham  <bfulgham@apple.com>
966
967         Scroll-snap points do not handle margins and padding propertly
968         https://bugs.webkit.org/show_bug.cgi?id=144647
969         <rdar://problem/20829473>
970
971         Reviewed by Simon Fraser.
972
973         The calculation of scroll snap points was incorrect because it did not account for margins or padding.
974         This was fixed by using the "paddingBoxRect" to represent the overall size of the view area, and
975         subtracting the relevant padding when computing the size of the scroll snap offsets.
976
977         Extend testing internals with accessor methods to retrieve string representations of the scroll snap
978         offsets and scroll snap coordinates computed during layout. These values are used in the new
979         'css3/scroll-snap/scroll-snap-offsets-and-coordinates.html' test.
980
981         New tests:
982         * css3/scroll-snap/scroll-snap-offsets-and-coordinates.html: Added.
983         * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-borders.html: Added.
984         * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-padding.html: Added.
985         * platform/mac-wk2/tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-rotated.html: Added.
986
987         * css/LengthFunctions.h: Expose the 'valueForLength' method so we can use it in WebCoreTestSupport.
988         * dom/Node.h: Expose the 'renderBox' method so we can use it in WebCoreTestSupport.
989         * page/scrolling/AxisScrollSnapOffsets.cpp:
990         (WebCore::appendChildSnapOffsets): Use 'contentBoxRect' for overall size, so that we don't use padding
991         as part of our offset calculations.
992         (WebCore::updateSnapOffsetsForScrollableArea): Ditto.
993         * rendering/RenderBox.h: Expose 'canBeScrolledAndHasScrollableArea' for use in WebCoreTestSupport.
994         * rendering/style/RenderStyle.h: Expose 'scrollSnapCoordinates' for use in WebCoreTestSupport.
995         * testing/Internals.cpp:
996         (WebCore::appendOffsets): Helper function.
997         (WebCore::Internals::scrollSnapOffsets): Added.
998         * testing/Internals.h:
999         * testing/Internals.idl:
1000
1001 2015-05-06  Myles C. Maxfield  <mmaxfield@apple.com>
1002
1003         Clean up TextRun constructors
1004         https://bugs.webkit.org/show_bug.cgi?id=144712
1005
1006         Reviewed by Zalan Bujtas.
1007
1008         This patch uses constructor forwarding to make TextRun's constructors much simpler. It then
1009         updates the implementations of RenderBlock::constructTextRun() to be more consistent with
1010         TextRun (via using StringViews).
1011
1012         No new tests because there is no behavior change.
1013
1014         * mathml/MathMLMencloseElement.cpp:
1015         (WebCore::MathMLMencloseElement::longDivLeftPadding):
1016         * platform/graphics/TextRun.h:
1017         (WebCore::TextRun::TextRun):
1018         * rendering/RenderBlock.cpp:
1019         (WebCore::RenderBlock::constructTextRun):
1020         (WebCore::constructTextRunInternal): Deleted.
1021         * rendering/RenderBlock.h:
1022         * rendering/RenderEmbeddedObject.cpp:
1023         (WebCore::RenderEmbeddedObject::paintReplaced):
1024         (WebCore::RenderEmbeddedObject::unavailablePluginIndicatorBounds):
1025         (WebCore::RenderEmbeddedObject::isInUnavailablePluginIndicator):
1026         * rendering/svg/SVGTextMetricsBuilder.cpp:
1027         (WebCore::SVGTextMetricsBuilder::SVGTextMetricsBuilder):
1028         * platform/win/DragImageWin.cpp:
1029         (WebCore::createDragImageForLink):
1030
1031 2015-05-06  Sungmann Cho  <sungmann.cho@navercorp.com>
1032
1033         Rename URL::copy() to URL::isolatedCopy() to match String.
1034         https://bugs.webkit.org/show_bug.cgi?id=144684
1035
1036         Reviewed by Darin Adler.
1037
1038         No new tests, no behavior change.
1039
1040         * Modules/websockets/WebSocketHandshake.cpp:
1041         (WebCore::WebSocketHandshake::setURL):
1042         (WebCore::WebSocketHandshake::httpURLForAuthenticationAndCookies):
1043         * fileapi/ThreadableBlobRegistry.cpp:
1044         (WebCore::BlobRegistryContext::BlobRegistryContext):
1045         * html/parser/HTMLPreloadScanner.cpp:
1046         (WebCore::TokenPreloadScanner::updatePredictedBaseURL):
1047         * html/parser/HTMLResourcePreloader.h:
1048         (WebCore::PreloadRequest::PreloadRequest):
1049         * html/parser/XSSAuditor.cpp:
1050         (WebCore::XSSAuditor::init):
1051         * platform/CrossThreadCopier.cpp:
1052         (WebCore::URL>::copy):
1053         * platform/URL.cpp:
1054         (WebCore::URL::isolatedCopy):
1055         (WebCore::URL::copy): Deleted.
1056         * platform/URL.h:
1057         (WebCore::URLCapture::URLCapture):
1058         * platform/network/BlobPart.h:
1059         (WebCore::BlobPart::detachFromCurrentThread):
1060         * platform/network/ResourceRequestBase.cpp:
1061         (WebCore::ResourceRequestBase::copyData):
1062         * platform/network/ResourceResponseBase.cpp:
1063         (WebCore::ResourceResponseBase::copyData):
1064         * workers/WorkerThread.cpp:
1065         (WebCore::WorkerThreadStartupData::WorkerThreadStartupData):
1066
1067 2015-05-06  Commit Queue  <commit-queue@webkit.org>
1068
1069         Unreviewed, rolling out r183894.
1070         https://bugs.webkit.org/show_bug.cgi?id=144719
1071
1072         crashes on mavericks (Requested by dino on #webkit).
1073
1074         Reverted changeset:
1075
1076         "Handle backdrop views that have to tile"
1077         https://bugs.webkit.org/show_bug.cgi?id=142317
1078         http://trac.webkit.org/changeset/183894
1079
1080 2015-05-06  Jon Lee  <jonlee@apple.com>
1081
1082         CoreTextSPI.h uses wrong version number to denote Yosemite
1083         https://bugs.webkit.org/show_bug.cgi?id=144701
1084
1085         Reviewed by Dean Jackson.
1086
1087         * platform/spi/cocoa/CoreTextSPI.h: Should 101000 not 10100.
1088
1089 2015-05-06  Jon Lee  <jonlee@apple.com>
1090
1091         Expose more font weights for -apple-system
1092         https://bugs.webkit.org/show_bug.cgi?id=144707
1093
1094         Reviewed by Dean Jackson.
1095
1096         Update to platform/mac/fast/text/systemFont.html
1097
1098         * platform/graphics/mac/FontCacheMac.mm:
1099         (WebCore::toNSFontWeight): New static method to map font weights to NSFontWeight constants available on
1100         Yosemite and later.
1101         (WebCore::fontWithFamily): Request the system font with a mapped weight on Yosemite and later.
1102         * platform/spi/mac/NSFontSPI.h: Add [NSFont systemFontWithSize:weight:], and the proper NSFontWeight
1103         constants.
1104
1105 2015-05-06  Dean Jackson  <dino@apple.com>
1106
1107         Handle backdrop views that have to tile
1108         https://bugs.webkit.org/show_bug.cgi?id=142317
1109         <rdar://problem/20049088>
1110
1111         Reviewed by Simon Fraser.
1112
1113         Make sure backdrop layers don't tile. If they are big
1114         enough, we'll leave it to the platform compositor to handle.
1115
1116         This also fixes a bug where if a layer changed from a backdrop
1117         type to a tiled type, it would still retain its custom appearance
1118         and we'd try to add children to the wrong layer.
1119
1120         Test: compositing/media-controls-bar-appearance-big.html
1121
1122         * platform/graphics/ca/GraphicsLayerCA.cpp:
1123         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Check if
1124         a layer needs a backdrop before checking if it needs to tile.
1125
1126 2015-05-06  Carlos Garcia Campos  <cgarcia@igalia.com> and Per Arne Vollan  <peavo@outlook.com>
1127
1128         [WinCairo] Compile error due to undefined symbols after r183868
1129         https://bugs.webkit.org/show_bug.cgi?id=144692
1130
1131         Reviewed by Alex Christensen.
1132
1133         Speculative build fix. Add dummy PlatformDisplayWin.
1134
1135         * PlatformWinCairo.cmake: Add PlatformDisplay.cpp to compilation.
1136         * platform/graphics/PlatformDisplay.cpp:
1137         (WebCore::PlatformDisplay::createPlatformDisplay):
1138         * platform/graphics/PlatformDisplay.h:
1139         * platform/graphics/win/PlatformDisplayWin.h:
1140         Add stubs to compile.
1141         * WebCore.vcxproj/WebCore.vcxproj
1142         * WebCore.vcxproj/WebCore.vcxproj.filters
1143         Add new files to Windows build.
1144
1145 2015-05-06  David Hyatt  <hyatt@apple.com>
1146
1147         Avoid copies in scrollOffsetForFixedPosition() and inline it.
1148         https://bugs.webkit.org/show_bug.cgi?id=144709
1149
1150         Reviewed by Simon Fraser.
1151
1152         * page/FrameView.cpp:
1153         (WebCore::FrameView::frameScaleFactor):
1154         Added so that scrollOffsetForFixedPosition() can be inlined without having to
1155         reference Frame's implementation.
1156
1157         (WebCore::FrameView::scrollOffsetForFixedPosition): Deleted.
1158         Moved this to the header.
1159
1160         * page/FrameView.h:
1161         Inline scrollOffsetForFixedPosition() and get rid of all the copying
1162         it was doing.
1163
1164 2015-05-06  David Hyatt  <hyatt@apple.com>
1165
1166         RenderLayer::currentTransform computes a pixel snapped rect it doesn't use.
1167         https://bugs.webkit.org/show_bug.cgi?id=144708
1168
1169         Reviewed by Simon Fraser.
1170
1171         * rendering/RenderLayer.cpp:
1172         (WebCore::RenderLayer::currentTransform):
1173
1174         Only compute a pixel snapped rect if we actually end up needing it. The common case
1175         is that this rect is not needed, so pushing it inside the two if statements
1176         speeds up the common case.
1177
1178 2015-05-06  Timothy Horton  <timothy_horton@apple.com>
1179
1180         Fix the build.
1181
1182         * platform/spi/cocoa/QuartzCoreSPI.h:
1183
1184 2015-05-06  David Hyatt  <hyatt@apple.com>
1185
1186         Optimize topLeftLocationOffset() addition in updateLayerPosition
1187         https://bugs.webkit.org/show_bug.cgi?id=144704
1188
1189         Reviewed by Dean Jackson.
1190
1191         * page/FrameView.cpp:
1192         (WebCore::FrameView::FrameView):
1193         * page/FrameView.h:
1194         Move the hasFlippedBlocks bit to FrameView instead of RenderView. Works better for inlining
1195         the check in any renderer header, and it also makes more sense conceptually, since the RenderView
1196         itself could be a flipped block.
1197
1198         * rendering/RenderBox.cpp:
1199         (WebCore::RenderBox::layoutOverflowRectForPropagation):
1200         Change over to the FrameView bit.
1201
1202         * rendering/RenderBox.h:
1203         (WebCore::RenderBox::applyTopLeftLocationOffset):
1204         Add a new inlined function that can apply the top left location offset to a point without
1205         multiple LayoutSize creations and copies. It invokes a helper for flipping that is not
1206         inlined only in the case where actual flipped blocks exist in the render tree.
1207
1208         * rendering/RenderBoxModelObject.cpp:
1209         (WebCore::RenderBoxModelObject::updateFromStyle):
1210         Set the bit on the FrameView now instead of the RenderView.
1211
1212         * rendering/RenderLayer.cpp:
1213         (WebCore::RenderLayer::updateLayerPosition):
1214         Call the new applyTopLeftLocationOffset function so that the point can have offsets added
1215         in without any extra copies.
1216
1217         (WebCore::RenderLayer::calculateClipRects):
1218         * rendering/RenderLineBoxList.cpp:
1219         (WebCore::RenderLineBoxList::rangeIntersectsRect):
1220         Switch over to the bit on the FrameView.
1221
1222         * rendering/RenderView.cpp:
1223         (WebCore::RenderView::RenderView):
1224         * rendering/RenderView.h:
1225         Get rid of the bit on the RenderView.
1226
1227 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
1228
1229         Introducing the Platform Abstraction Layer (PAL)
1230         https://bugs.webkit.org/show_bug.cgi?id=143358
1231
1232         Reviewed by Simon Fraser.
1233
1234         * WebCore.xcodeproj/project.pbxproj: Let the project know about the .a
1235         * Configurations/FeatureDefines.xcconfig: Updated
1236
1237 2015-05-06  Eric Carlson  <eric.carlson@apple.com>
1238
1239         [iOS] remove some unnecessary iOS-only media code
1240         https://bugs.webkit.org/show_bug.cgi?id=144697
1241         <rdar://problem/20229914>
1242
1243         Reviewed by Jer Noble.
1244
1245         * html/HTMLAttributeNames.in: Remove data-youtube-id.
1246
1247         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1248         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem): Remove dataYouTubeID.
1249
1250 2015-05-06  David Hyatt  <hyatt@apple.com>
1251
1252         Optimize relativePositionOffset() to avoid doing unnecessary work
1253         https://bugs.webkit.org/show_bug.cgi?id=144698
1254
1255         Reviewed by Simon Fraser.
1256
1257         * rendering/RenderBoxModelObject.cpp:
1258         (WebCore::RenderBoxModelObject::relativePositionOffset):
1259
1260         Patch relativePositionOffset to avoid doing unnecessary work in the common case where
1261         all values of top/left/right/bottom are either auto or fixed. We no longer fetch
1262         containingBlock() into a local always, but instead just invoke the function only
1263         when necessary.
1264
1265         Also avoid computing the percentage-relative maximum for the top/right/bottom/left lengths
1266         when they are fixed values, since that maximum won't be examined at all.
1267
1268 2015-05-06  Martin Robinson  <mrobinson@igalia.com>
1269
1270         [FreeType] Vertical CJK glyphs should not be rendered with synthetic oblique
1271         https://bugs.webkit.org/show_bug.cgi?id=144612
1272
1273         Reviewed by Darin Adler.
1274
1275         No new tests. This causes fast/text/international/synthesized-italic-vertical.html to pass.
1276
1277         * platform/graphics/Font.cpp:
1278         (WebCore::Font::nonSyntheticItalicFont): Compile this method for Cairo as well.
1279         * platform/graphics/FontCascadeFonts.cpp:
1280         (WebCore::FontCascadeFonts::glyphDataForSystemFallback): When searching for the system fallback,
1281         ensure that we do not use synthetic oblique when rendering vertical CJK glyphs.
1282         (WebCore::FontCascadeFonts::glyphDataForNormalVariant): Extend the CJK fix to Cairo ports.
1283         * platform/graphics/FontPlatformData.h:
1284         (WebCore::FontPlatformData::setSyntheticOblique): Added this helper method, because
1285         Freetype/Cairo ports needs to be able to recreate the scaled font matrix when the
1286         synthetic oblique settings changes.
1287         * platform/graphics/freetype/FontPlatformData.h: Rename initializeWithFontFace to buildScaledFont.
1288         Remove the now unused m_horizontalOrientationMatrix member.
1289         (WebCore::FontPlatformData::setSyntheticOblique): Added the helper here as well.
1290         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1291         (WebCore::FontPlatformData::FontPlatformData): Calculate whether or not to use synthetic oblique here,
1292         before buildScaledFont is called. Call buildScaledFont instead of initializeWithFontFace.
1293         (WebCore::FontPlatformData::operator=):
1294         (WebCore::FontPlatformData::buildScaledFont): Renamed from initializeWithFontFace, does
1295         the same thing, except calculate whether or not to use synthetic oblique. Instead just
1296         reads the value.
1297         (WebCore::FontPlatformData::setOrientation): Instead of adjusting the font matrix, recreate
1298         the entire font.
1299         (WebCore::FontPlatformData::setSyntheticOblique): Added.
1300         (WebCore::rotateCairoMatrixForVerticalOrientation): Deleted.
1301         (WebCore::FontPlatformData::initializeWithFontFace): Deleted.
1302
1303 2015-05-06  Alex Christensen  <achristensen@webkit.org>
1304
1305         [Content Extensions] Test splitting NFAs by max NFA size.
1306         https://bugs.webkit.org/show_bug.cgi?id=144659
1307
1308         Reviewed by Darin Adler.
1309
1310         * WebCore.xcodeproj/project.pbxproj:
1311         * contentextensions/CombinedURLFilters.cpp:
1312         (WebCore::ContentExtensions::generateNFAForSubtree):
1313         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
1314         * contentextensions/CombinedURLFilters.h:
1315         * contentextensions/ContentExtensionCompiler.cpp:
1316         (WebCore::ContentExtensions::compileRuleList):
1317         * contentextensions/DFABytecodeCompiler.h:
1318         * contentextensions/DFABytecodeInterpreter.h:
1319         Make maxNFASize a parameter so we can test it with small values.
1320
1321 2015-05-06  Antti Koivisto  <antti@apple.com>
1322
1323         REGRESSION (r183467): Unable to start downloads in private browsing mode
1324         https://bugs.webkit.org/show_bug.cgi?id=144533
1325
1326         Reviewed by Darin Adler.
1327
1328         If willSendRequest delegate mutated the request we would lose the requester field value from the original.
1329
1330         No test runner support for mutating requests.
1331
1332         * platform/network/cf/ResourceRequestCFNet.cpp:
1333         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties):
1334
1335             This needs to keep the requester too.
1336
1337         * platform/network/cocoa/ResourceRequestCocoa.mm:
1338         (WebCore::ResourceRequest::updateFromDelegatePreservingOldProperties): Deleted.
1339
1340             Share implementations.
1341
1342 2015-05-06  Ryosuke Niwa  <rniwa@webkit.org>
1343
1344         Toggling underline on font panel removes strike through
1345         https://bugs.webkit.org/show_bug.cgi?id=144670
1346         <rdar://problem/3790443>
1347
1348         Reviewed by Darin Adler.
1349
1350         * editing/EditingStyle.cpp:
1351         (WebCore::EditingStyle::EditingStyle): Added a variant that takes CSSStyleDeclaration.
1352         * editing/EditingStyle.h:
1353         (WebCore::EditingStyle::create): Ditto.
1354         * editing/Editor.cpp:
1355         (WebCore::Editor::applyStyleToSelection): Takes Ref<EditingStyle>&& instead of RefPtr<EditingStyle>&&.
1356         * editing/Editor.h:
1357         * editing/EditorCommand.cpp:
1358         (WebCore::applyCommandToFrame): Ditto.
1359         (WebCore::executeStrikethrough):
1360         (WebCore::executeUnderline):
1361
1362 2015-05-06  Jessie Berlin  <jberlin@webkit.org>
1363
1364         More build fixing.
1365
1366         * page/mac/TextIndicatorWindow.mm:
1367
1368 2015-05-06  Jessie Berlin  <jberlin@webkit.org>
1369
1370         32-bit build fix after r183859 and r183860.
1371
1372         * page/mac/TextIndicatorWindow.mm:
1373         Autosynthesis isn't available for our 32-bit builds.
1374
1375 2015-05-06  Carlos Garcia Campos  <cgarcia@igalia.com>
1376
1377         [EGL] Move EGLDisplay handling to PlatformDisplay and remove PlatformDisplay definition from GLDefs.h
1378         https://bugs.webkit.org/show_bug.cgi?id=144685
1379
1380         Reviewed by Martin Robinson.
1381
1382         The EGL display is also initialized in multiple places, and could
1383         be unified in PlatformDisplay. Remove the PlatformDisplay
1384         definition from platform/graphics/opengl/GLDefs.h to avoid conflicts.
1385
1386         * platform/graphics/PlatformDisplay.cpp:
1387         (WebCore::PlatformDisplay::PlatformDisplay): Initialize m_eglDisplay.
1388         (WebCore::PlatformDisplay::~PlatformDisplay): Call terminateEGLDisplay().
1389         (WebCore::PlatformDisplay::eglDisplay): Lazy intialize the EGL
1390         display and return it.
1391         (WebCore::PlatformDisplay::initializeEGLDisplay):
1392         (WebCore::PlatformDisplay::terminateEGLDisplay):
1393         * platform/graphics/PlatformDisplay.h:
1394         * platform/graphics/egl/GLContextEGL.cpp:
1395         (WebCore::sharedEGLDisplay): Use PlatformDisplay::eglDisplay().
1396         * platform/graphics/opengl/GLDefs.h: Remove unneeded definitions.
1397         * platform/graphics/opengl/GLPlatformSurface.cpp:
1398         (WebCore::GLPlatformSurface::GLPlatformSurface): Remove
1399         m_sharedDisplay member, PlatformDisplay::sharedDisplay() can be used instead.
1400         (WebCore::GLPlatformSurface::sharedDisplay): Deleted.
1401         * platform/graphics/opengl/GLPlatformSurface.h:
1402         * platform/graphics/surfaces/egl/EGLConfigSelector.h: Use
1403         EGLDisplay instead of PlatformDisplay.
1404         * platform/graphics/surfaces/egl/EGLContext.cpp:
1405         (WebCore::EGLOffScreenContext::initialize): Use PlatformDisplay::eglDisplay().
1406         * platform/graphics/surfaces/egl/EGLHelper.cpp: Remove the
1407         EGLDisplayConnection clas and use PlatformDisplay instead.
1408         (WebCore::EGLHelper::eglDisplay):
1409         (WebCore::EGLHelper::currentDisplay):
1410         (WebCore::EGLDisplayConnection::EGLDisplayConnection): Deleted.
1411         (WebCore::EGLDisplayConnection::~EGLDisplayConnection): Deleted.
1412         (WebCore::EGLDisplayConnection::display): Deleted.
1413         (WebCore::EGLDisplayConnection::terminate): Deleted.
1414         * platform/graphics/surfaces/egl/EGLHelper.h:
1415         * platform/graphics/surfaces/egl/EGLSurface.cpp:
1416         (WebCore::EGLTransportSurface::EGLTransportSurface): Use EGLHelper::eglDisplay().
1417         (WebCore::EGLTransportSurface::destroy): Ditto.
1418         (WebCore::EGLOffScreenSurface::EGLOffScreenSurface): Ditto.
1419         (WebCore::EGLOffScreenSurface::destroy): Ditto.
1420         * platform/graphics/surfaces/egl/EGLXSurface.cpp:
1421         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
1422         Use PlatformDisplay::eglDisplay().
1423         (WebCore::EGLWindowTransportSurface::swapBuffers): Ditto.
1424         (WebCore::EGLPixmapSurface::EGLPixmapSurface): Ditto.
1425         * platform/graphics/surfaces/glx/GLXContext.cpp:
1426         (WebCore::GLXOffScreenContext::initialize): Use X11Helper::nativeDisplay().
1427         * platform/graphics/surfaces/glx/GLXSurface.cpp:
1428         (WebCore::GLXTransportSurface::GLXTransportSurface): Do not use m_sharedDisplay.
1429         (WebCore::GLXOffScreenSurface::initialize): Ditto.
1430         * platform/graphics/wayland/PlatformDisplayWayland.cpp:
1431         (WebCore::PlatformDisplayWayland::PlatformDisplayWayland): Call
1432         PlatformDisplay::initializeEGLDisplay() to insialize the EGL display.
1433         * platform/graphics/wayland/PlatformDisplayWayland.h:
1434         * platform/graphics/x11/PlatformDisplayX11.cpp:
1435         (WebCore::PlatformDisplayX11::initializeEGLDisplay): Override
1436         PlatformDisplay::initializeEGLDisplay() to initialize the
1437         m_eglDisplay member.
1438         * platform/graphics/x11/PlatformDisplayX11.h:
1439
1440 2015-05-06  Joseph Pecoraro  <pecoraro@apple.com>
1441
1442         Web Inspector: DOMStorage exception and issue with sessionStorage
1443         https://bugs.webkit.org/show_bug.cgi?id=144646
1444
1445         Reviewed by Timothy Hatcher.
1446
1447         * inspector/InspectorDOMStorageAgent.cpp:
1448         (WebCore::InspectorDOMStorageAgent::findStorageArea):
1449         Return session storage if the identifier says not local storage.
1450
1451 2015-05-06  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1452
1453         Move ReadableStreamJSSource.h/.cpp to ReadableJSStream.h/.cpp
1454         https://bugs.webkit.org/show_bug.cgi?id=144567
1455
1456         Reviewed by Darin Adler.
1457
1458         In addition to renaming ReadableStreamJSSource.h/.cpp, ReadableStreamJSSource is now made a private class of
1459         ReadableJSStream, called ReadableJSStream::Source.
1460         Made some minor refactoring (passing some ExecState by ref and not by pointer).
1461         No functional change, existing tests cover the changes.
1462
1463         * bindings/js/JSReadableStreamCustom.cpp:
1464         * bindings/js/ReadableJSStream.cpp:
1465         (WebCore::ReadableJSStream::Source::create):
1466         (WebCore::ReadableJSStream::Source::Source):
1467         (WebCore::ReadableJSStream::Source::~Source):
1468         (WebCore::ReadableJSStream::Source::globalObject):
1469         (WebCore::ReadableJSStream::Source::start):
1470         (WebCore::ReadableJSStream::create):
1471         (WebCore::ReadableJSStream::ReadableJSStream):
1472         * bindings/js/ReadableJSStream.h:
1473
1474 2015-05-05  Tim Horton  <timothy_horton@apple.com>
1475
1476         REGRESSION (r183517): Yellow find-in-page highlight gets stuck forever
1477         https://bugs.webkit.org/show_bug.cgi?id=144651
1478         <rdar://problem/20755722>
1479
1480         * page/mac/TextIndicatorWindow.mm:
1481         Fix an incorrectly-applied review comment.
1482
1483 2015-05-05  Timothy Horton  <timothy_horton@apple.com>
1484
1485         REGRESSION (r183517): Yellow find-in-page highlight gets stuck forever
1486         https://bugs.webkit.org/show_bug.cgi?id=144651
1487         <rdar://problem/20755722>
1488
1489         Reviewed by Dan Bernstein.
1490
1491         * page/mac/TextIndicatorWindow.h:
1492         * page/mac/TextIndicatorWindow.mm:
1493         (WebCore::TextIndicatorWindow::clearTextIndicator):
1494         (WebCore::TextIndicatorWindow::setTextIndicator):
1495         (WebCore::TextIndicatorWindow::closeWindow):
1496         (WebCore::TextIndicatorWindow::startFadeOut):
1497         We can't keep m_fadingOut on TextIndicatorWindow, since it is reused.
1498         Keep it on the WebTextIndicatorView instead.
1499
1500 2015-05-05  Žan Doberšek  <zdobersek@igalia.com>
1501
1502         Add missing vtable override specifiers under Source/WebCore/html
1503         https://bugs.webkit.org/show_bug.cgi?id=144578
1504
1505         Reviewed by Daniel Bates.
1506
1507         Update virtual method overrides under Source/WebCore/html
1508         which are missing the override specifier.
1509
1510         * html/canvas/WebGL2RenderingContext.h:
1511         * html/canvas/WebGLRenderingContext.h:
1512         * html/track/InbandTextTrack.h:
1513         * html/track/TrackListBase.h:
1514
1515 2015-05-05  Žan Doberšek  <zdobersek@igalia.com>
1516
1517         Add missing vtable override specifiers under Source/WebCore/rendering
1518         https://bugs.webkit.org/show_bug.cgi?id=144570
1519
1520         Reviewed by Darin Adler.
1521
1522         Update virtual method overrides under Source/WebCore/rendering
1523         which are missing the override specifiers.
1524
1525         * rendering/InlineTextBox.h:
1526         (WebCore::InlineTextBox::calculateBoundaries): Deleted.
1527         * rendering/RenderFlowThread.h:
1528         * rendering/RenderMedia.h:
1529         (WebCore::RenderMedia::shadowControlsNeedCustomLayoutMetrics): Deleted.
1530         * rendering/RenderMultiColumnSet.h:
1531         * rendering/RenderRegion.h:
1532         * rendering/RenderRegionSet.h:
1533         * rendering/RenderThemeGtk.h:
1534         * rendering/mathml/RenderMathMLOperator.h:
1535         * rendering/svg/RenderSVGBlock.h:
1536
1537 2015-05-05  Žan Doberšek  <zdobersek@igalia.com>
1538
1539         Add missing vtable override specifiers under Source/WebCore/Modules
1540         https://bugs.webkit.org/show_bug.cgi?id=144569
1541
1542         Reviewed by Darin Adler.
1543
1544         Update virtual method overrides under Source/WebCore/Modules
1545         which are missing the override specifier.
1546
1547         * Modules/mediasource/SourceBuffer.h:
1548         * Modules/mediastream/MediaStreamTrack.h:
1549         * Modules/mediastream/RTCVoidRequestImpl.h:
1550         * Modules/webaudio/AudioContext.h:
1551         (WebCore::AudioContext::mediaType): Deleted.
1552         (WebCore::AudioContext::presentationType): Deleted.
1553         (WebCore::AudioContext::canReceiveRemoteControlCommands): Deleted.
1554         (WebCore::AudioContext::didReceiveRemoteControlCommand): Deleted.
1555         (WebCore::AudioContext::overrideBackgroundPlaybackRestriction): Deleted.
1556         * Modules/webaudio/MediaStreamAudioDestinationNode.h:
1557         * Modules/webaudio/MediaStreamAudioSourceNode.h:
1558         * Modules/webaudio/WaveShaperDSPKernel.h:
1559         * Modules/websockets/WebSocketChannel.h:
1560         (WebCore::WebSocketChannel::refThreadableWebSocketChannel): Deleted.
1561         (WebCore::WebSocketChannel::derefThreadableWebSocketChannel): Deleted.
1562         * Modules/websockets/WorkerThreadableWebSocketChannel.h:
1563         (WebCore::WorkerThreadableWebSocketChannel::refThreadableWebSocketChannel): Deleted.
1564         (WebCore::WorkerThreadableWebSocketChannel::derefThreadableWebSocketChannel): Deleted.
1565
1566 2015-05-05  Žan Doberšek  <zdobersek@igalia.com>
1567
1568         EventHandler::m_eventHandlerWillResetCapturingMouseEventsElement is incorrectly initialized
1569         https://bugs.webkit.org/show_bug.cgi?id=144583
1570
1571         Reviewed by Daniel Bates.
1572
1573         * page/EventHandler.cpp:
1574         (WebCore::EventHandler::EventHandler): The
1575         m_eventHandlerWillResetCapturingMouseEventsElement is a boolean,
1576         so initialize it to false, instead of to nullptr.
1577
1578 2015-05-05  Manuel Rego Casasnovas  <rego@igalia.com>
1579
1580         [CSS Grid Layout] grid-template-areas should accept none value
1581         https://bugs.webkit.org/show_bug.cgi?id=144624
1582
1583         Reviewed by Darin Adler.
1584
1585         Default value for grid-template-areas property is "none":
1586         http://dev.w3.org/csswg/css-grid/#propdef-grid-template-areas
1587
1588         Currently if you set the property to "none" from JavaScript, the value
1589         doesn't get reseted and it keeps the old value.
1590
1591         Update fast/css-grid-layout/grid-template-areas-get-set.html adding a
1592         new test case.
1593
1594         * css/CSSParser.cpp:
1595         (WebCore::CSSParser::parseGridTemplateAreas): Add support to parse
1596         "none" successfully.
1597
1598 2015-05-05  Zalan Bujtas  <zalan@apple.com>
1599
1600         Remove unused RenderLayerBacking::hasContentsLayer().
1601         https://bugs.webkit.org/show_bug.cgi?id=144658
1602
1603         Reviewed by Simon Fraser.
1604
1605         No change in functionality.
1606
1607         * rendering/RenderLayerBacking.h:
1608
1609 2015-05-05  Alex Christensen  <achristensen@webkit.org>
1610
1611         [Content Extensions] Limit NFA size.
1612         https://bugs.webkit.org/show_bug.cgi?id=144649
1613
1614         Reviewed by Benjamin Poulain.
1615
1616         * contentextensions/CombinedURLFilters.cpp:
1617         (WebCore::ContentExtensions::generateNFAForSubtree):
1618         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
1619         Add a maximum NFA size to ensure that we do not use too much memory when compiling.
1620         * contentextensions/ContentExtensionCompiler.cpp:
1621         (WebCore::ContentExtensions::compileRuleList):
1622         Remove debugging code that doesn't compile any more.
1623
1624 2015-05-05  Roger Fong  <roger_fong@apple.com>
1625
1626         Unreviewed. Some assertion failures in compositing code after r183820.
1627         https://bugs.webkit.org/show_bug.cgi?id=144630.
1628
1629         * rendering/RenderLayerCompositor.cpp:
1630         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1631
1632 2015-05-05  Timothy Horton  <timothy_horton@apple.com>
1633
1634         Add a layout mode for computing fixed layout size from a minimum size
1635         https://bugs.webkit.org/show_bug.cgi?id=144610
1636         <rdar://problem/19790341>
1637
1638         Reviewed by Simon Fraser.
1639
1640         * platform/spi/cocoa/QuartzCoreSPI.h:
1641         Add some SPI.
1642
1643 2015-05-05  Brent Fulgham  <bfulgham@apple.com>
1644
1645         iOS] Scroll snap points trigger reentrant layout
1646         https://bugs.webkit.org/show_bug.cgi?id=144644
1647         <rdar://problem/20366547>
1648
1649         Reviewed by Simon Fraser.
1650
1651         Covered by scroll-snap-mandatory.html test.
1652
1653         We had an iOS code path in 'appendChildSnapOffsets' that used offsetLeft and offsetTop. This code
1654         was sometimes called during layout, which triggered a reentrant layout call, resulting in a debug
1655         assertion.
1656
1657         * page/scrolling/AxisScrollSnapOffsets.cpp:
1658         (WebCore::appendChildSnapOffsets): Remove iOS codepath.
1659
1660 2015-05-05  Roger Fong  <roger_fong@apple.com>
1661
1662         Blurry media control icons on non retina displays.
1663         https://bugs.webkit.org/show_bug.cgi?id=144638.
1664         <rdar://problem/20526166>
1665
1666         Reviewed by Dean Jackson.
1667
1668         * Modules/mediacontrols/mediaControlsApple.css:
1669         Adjust fullscreen buttons so that they look good on both 1x and 2x displays.
1670         (audio::-webkit-media-controls-fullscreen-button):
1671         (audio::-webkit-media-controls-fullscreen-button.exit):
1672         (audio::-webkit-media-controls-fullscreen-button:active):
1673         (audio::-webkit-media-controls-panel button.exit:active):
1674         Handle wireless playback picker button background in mediaControlsApple.js
1675         (audio::-webkit-media-controls-wireless-playback-picker-button):
1676         (audio::-webkit-media-controls-wireless-playback-picker-button.playing): Deleted.
1677
1678         * Modules/mediacontrols/mediaControlsApple.js:
1679         Update wireless playback picker button based on display type.
1680         (Controller.prototype.UIString):
1681         (Controller.prototype.handleReadyStateChange):
1682         (Controller.prototype.updateWirelessTargetPickerButton):
1683         (Controller.prototype.updateWirelessPlaybackStatus):
1684
1685 2015-05-05  Joseph Pecoraro  <pecoraro@apple.com>
1686
1687         Web Inspector: Crash under WebCore::domWindowFromExecState reloading page with inspector open
1688         https://bugs.webkit.org/show_bug.cgi?id=144636
1689
1690         Reviewed by Mark Lam.
1691
1692         This ensures we create an InjectedScript for the execution context
1693         (frame) preventing the global object / exec state from getting garbage
1694         collected before we remove it from our map.
1695
1696         * inspector/PageRuntimeAgent.cpp:
1697         (WebCore::PageRuntimeAgent::notifyContextCreated):
1698
1699 2015-05-05  Dean Jackson  <dino@apple.com>
1700
1701         [iOS] AirPlay placeholder in inline videos uses Helvetica or Times, should be system font
1702         https://bugs.webkit.org/show_bug.cgi?id=144643
1703
1704         Reviewed by Brent Fulgham.
1705
1706         The Airplay placard should use "-apple-system" as a font-family.
1707
1708         * Modules/mediacontrols/mediaControlsiOS.css:
1709         (audio::-webkit-media-controls-wireless-playback-status):
1710
1711 2015-05-05  Zalan Bujtas  <zalan@apple.com>
1712
1713         Navigating to www.apple.com hits assertion in WebCore::TextIteratorCopyableText::set()
1714         https://bugs.webkit.org/show_bug.cgi?id=144629
1715         rdar://problem/20689877
1716
1717         Reviewed by Andreas Kling.
1718
1719         This patch ensures that we don't emit empty text for the text iterator.
1720         In TextIterator::handleTextNode before emitting a string, certain characters (\n \t) need to
1721         be replaced with space. When such character is found, we emit the string we've processed so far and
1722         handle the replacement during the next callback.
1723         When the first character in the string needs replacing, there's nothing to emit. However if we don't
1724         handle at least one character, TextIterator::advance believes that processing is done and never calls  
1725         TextIterator::handleTextNode back with the rest of the string. 
1726
1727         Test: fast/text/simple-line-layout-innerText-with-newline.html
1728
1729         * editing/TextIterator.cpp:
1730         (WebCore::isNewLineOrTabCharacter):
1731         (WebCore::TextIterator::handleTextNode):
1732
1733 2015-05-05  Alex Christensen  <achristensen@webkit.org>
1734
1735         [Content Extensions] Use less memory to store the json input.
1736         https://bugs.webkit.org/show_bug.cgi?id=144604
1737
1738         Reviewed by Benjamin Poulain.
1739
1740         * contentextensions/ContentExtensionCompiler.cpp:
1741         (WebCore::ContentExtensions::compileRuleList):
1742         * contentextensions/ContentExtensionCompiler.h:
1743         (WebCore::ContentExtensions::loadEncodedRules):
1744         Don't copy strings as much or keep them alive after done using them.
1745
1746 2015-05-05  Eric Carlson  <eric.carlson@apple.com>
1747
1748         Prevent recursive calls to show target picker menu.
1749         https://bugs.webkit.org/show_bug.cgi?id=144637
1750         <rdar://problem/20824726>
1751
1752         Reviewed by Jer Noble.
1753
1754         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h: Add m_showingMenu.
1755         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
1756         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Do nothing if the menu
1757         is already showing.
1758
1759 2015-05-05  Dean Jackson  <dino@apple.com>
1760
1761         Use system blue for Airplay Glyph
1762         https://bugs.webkit.org/show_bug.cgi?id=144614
1763
1764         There was a typo in the last commit.
1765
1766         * Modules/mediacontrols/mediaControlsiOS.css:
1767         (audio::-webkit-media-controls-optimized-fullscreen-button): Transition duration should be 250ms.
1768
1769 2015-05-04  Dean Jackson  <dino@apple.com>
1770
1771         [iOS] Use system blue for Airplay Glyph
1772         https://bugs.webkit.org/show_bug.cgi?id=144614
1773
1774         Reviewed by Eric Carlson.
1775
1776         Revert to using masks for the glyphs in the media controls,
1777         which allows us to:
1778         - use the system blue color when Airplay is active <rdar://problem/20245297>
1779         - fade out from the active state <rdar://problem/20245487>
1780         - allow the play button to give touch feedback <rdar://problem/17849930>
1781
1782         While those are three separate bugs, they all get addressed by
1783         this single change.
1784
1785         * Modules/mediacontrols/mediaControlsiOS.css:
1786         (audio::-webkit-media-controls-optimized-fullscreen-button):
1787         (audio::-webkit-media-controls-optimized-fullscreen-button:active):
1788         (video::-webkit-media-controls-play-button):
1789         (video::-webkit-media-controls-play-button.paused):
1790         (video::-webkit-media-controls-fullscreen-button):
1791         (video::-webkit-media-controls-wireless-playback-picker-button):
1792         (video::-webkit-media-controls-wireless-playback-picker-button.playing):
1793         (video::-webkit-media-controls-optimized-fullscreen-button):
1794         (video::-webkit-media-controls-play-button:active): Deleted.
1795         (video::-webkit-media-controls-play-button.paused:active): Deleted.
1796         (video::-webkit-media-controls-fullscreen-button:active): Deleted.
1797         (video::-webkit-media-controls-wireless-playback-picker-button:active): Deleted.
1798
1799 2015-05-05  Eric Carlson  <eric.carlson@apple.com>
1800
1801         Only autoplay videos should not automatically play to playback target
1802         https://bugs.webkit.org/show_bug.cgi?id=144633
1803
1804         Reviewed by Jer Noble.
1805
1806         * html/HTMLMediaElement.cpp:
1807         (WebCore::HTMLMediaElement::HTMLMediaElement): Set RequireUserGestureToAutoplayToExternalDevice.
1808         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Remove
1809         RequireUserGestureToAutoplayToExternalDevice.
1810         (WebCore::HTMLMediaElement::mediaState): Set ExternalDeviceAutoPlayCandidate if playback
1811         was started from a user gesture, even if the video loops and/or doesn't have audio.
1812
1813         * html/HTMLMediaSession.h: Define RequireUserGestureToAutoplayToExternalDevice.
1814         (WebCore::HTMLMediaSession::hasBehaviorRestriction): New.
1815
1816 2015-05-05  Brent Fulgham  <bfulgham@apple.com>
1817
1818         Unreviewed logging fix.
1819
1820         * page/WheelEventTestTrigger.cpp:
1821         (WebCore::WheelEventTestTrigger::triggerTestTimerFired): Fix typo in logging channel.
1822
1823 2015-05-04  Roger Fong  <roger_fong@apple.com>
1824
1825         Media control volume slider is opaque.
1826         https://bugs.webkit.org/show_bug.cgi?id=144470.
1827         <rdar://problem/20770350>
1828
1829         Rubberstamped by Simon Fraser.
1830
1831         * Modules/mediacontrols/mediaControlsApple.css:
1832         (audio::-webkit-media-controls-panel): 
1833         Don't create a stacking context just for the controls.
1834         Doing so causes the mix-blend-mode on the volume box to fail.
1835
1836 2015-05-05  Alex Christensen  <achristensen@webkit.org>
1837
1838         [Content Extensions] Combine NFAs properly and free memory as we compile.
1839         https://bugs.webkit.org/show_bug.cgi?id=144485
1840
1841         Reviewed by Benjamin Poulain.
1842
1843         This patch correctly combines all regular expressions with a common prefix up to
1844         the last quantified term into the same NFA.  It also deletes the prefix tree as it 
1845         creates NFAs, thus reducing the maximum memory used when compiling.
1846
1847         * contentextensions/CombinedURLFilters.cpp:
1848         (WebCore::ContentExtensions::CombinedURLFilters::isEmpty):
1849         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
1850         (WebCore::ContentExtensions::generateNFAForSubtree):
1851         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
1852         (WebCore::ContentExtensions::CombinedURLFilters::clear): Deleted.
1853         * contentextensions/CombinedURLFilters.h:
1854         * contentextensions/ContentExtensionCompiler.cpp:
1855         (WebCore::ContentExtensions::compileRuleList):
1856         * contentextensions/ContentExtensionsDebugging.h:
1857
1858 2015-05-04  Alex Christensen  <achristensen@webkit.org>
1859
1860         [Content Extensions] Use less memory when writing byte code to file
1861         https://bugs.webkit.org/show_bug.cgi?id=144602
1862
1863         Reviewed by Darin Adler.
1864
1865         * contentextensions/ContentExtensionCompiler.cpp:
1866         (WebCore::ContentExtensions::compileRuleList):
1867         * contentextensions/ContentExtensionCompiler.h:
1868         Compile one DFA at a time so we don't need to keep all the bytecode in memory at the same time.
1869         * contentextensions/DFABytecodeInterpreter.cpp:
1870         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1871         Jumps are now relative to the current DFA because we don't know about other DFAs that
1872         have been compiling when linking the DFA bytecode.  This will also make the DFA bytecode
1873         easier to minimize because more of the values are small in the DFAs after the first DFA.
1874         * platform/FileSystem.h:
1875
1876 2015-05-05  Csaba Osztrogonác  <ossy@webkit.org>
1877
1878         Unreviewed, speculative WinCairo buildfix after r183807.
1879
1880         * WebCore.vcxproj/WebCore.vcxproj:
1881         * WebCore.vcxproj/WebCore.vcxproj.filters:
1882
1883 2015-05-05  Csaba Osztrogonác  <ossy@webkit.org>
1884
1885         Remove TextureMapperImageBuffer
1886         https://bugs.webkit.org/show_bug.cgi?id=143561
1887
1888         Reviewed by Žan Doberšek.
1889
1890         * CMakeLists.txt:
1891         * PlatformEfl.cmake:
1892         * PlatformGTK.cmake:
1893         * PlatformWinCairo.cmake:
1894         * platform/graphics/GraphicsContext3DPrivate.cpp:
1895         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
1896         * platform/graphics/cairo/ImageBufferCairo.cpp:
1897         (WebCore::ImageBufferData::paintToTextureMapper):
1898         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1899         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
1900         * platform/graphics/texmap/BitmapTextureImageBuffer.cpp: Removed.
1901         * platform/graphics/texmap/BitmapTextureImageBuffer.h: Removed.
1902         * platform/graphics/texmap/BitmapTexturePool.cpp:
1903         (WebCore::BitmapTexturePool::createTexture):
1904         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
1905         (WebCore::GraphicsLayerTextureMapper::setFilters):
1906         * platform/graphics/texmap/TextureMapper.cpp:
1907         (WebCore::TextureMapper::create):
1908         (WebCore::TextureMapper::TextureMapper):
1909         * platform/graphics/texmap/TextureMapper.h:
1910         (WebCore::TextureMapper::accelerationMode): Deleted.
1911         * platform/graphics/texmap/TextureMapperGL.cpp:
1912         (WebCore::TextureMapperGL::TextureMapperGL):
1913         * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Removed.
1914         * platform/graphics/texmap/TextureMapperImageBuffer.h: Removed.
1915         * platform/graphics/texmap/coordinated/CompositingCoordinator.cpp:
1916         (WebCore::CompositingCoordinator::CompositingCoordinator):
1917         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1918         (WebCore::GraphicsLayer::supportsContentsTiling):
1919         (WebCore::CoordinatedGraphicsLayer::setShouldSupportContentsTiling): Deleted.
1920         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1921
1922 2015-05-05  Javier Fernandez  <jfernandez@igalia.com>
1923
1924         [CSS Box Alignment] Upgrade align-content parsing to CSS3 Box Alignment spec
1925         https://bugs.webkit.org/show_bug.cgi?id=144443
1926
1927         Reviewed by Darin Adler.
1928
1929         Upgrade the align-content property to the last CSS3 Box
1930         Alignment specification. As it uses a different enumeration for
1931         Positional and Distribution alignment, it implies some changes in
1932         the FlexibleBox implementation.
1933
1934         Test: css3/parse-align-content.html
1935
1936         * css/CSSComputedStyleDeclaration.cpp:
1937         (WebCore::resolveContentAlignmentAuto):
1938         (WebCore::ComputedStyleExtractor::propertyValue):
1939         * css/CSSParser.cpp:
1940         (WebCore::isValidKeywordPropertyAndValue):
1941         (WebCore::isKeywordPropertyID):
1942         (WebCore::CSSParser::parseValue):
1943         * css/CSSPropertyNames.in:
1944         * rendering/RenderFlexibleBox.cpp:
1945         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
1946         (WebCore::RenderFlexibleBox::layoutColumnReverse):
1947         (WebCore::initialAlignContentOffset):
1948         (WebCore::alignContentSpaceBetweenChildren):
1949         (WebCore::RenderFlexibleBox::alignFlexLines):
1950         * rendering/style/RenderStyle.cpp:
1951         (WebCore::RenderStyle::resolveContentAlignment):
1952         (WebCore::RenderStyle::resolveContentJustification):
1953         * rendering/style/RenderStyle.h:
1954         * rendering/style/StyleRareNonInheritedData.cpp:
1955         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1956         (WebCore::StyleRareNonInheritedData::operator==):
1957         * rendering/style/StyleRareNonInheritedData.h:
1958
1959 2015-05-05  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1960
1961         streams/readable-stream.html is very flaky
1962         https://bugs.webkit.org/show_bug.cgi?id=144455
1963
1964         Reviewed by Darin Adler.
1965
1966         Changed the link between readadable stream and controller.
1967         Controller ref()/deref() now increments/decrements its stream ref counter.
1968         This ensures that even if JS scripts do not keep track of the readable stream,
1969         the readable stream will not be disposed as long as the JS script has access to its controller.
1970
1971         Test: streams/readable-stream-gc.html
1972
1973         * Modules/streams/ReadableStreamController.h:
1974         (WebCore::ReadableStreamController::ReadableStreamController):
1975         (WebCore::ReadableStreamController::ref):
1976         (WebCore::ReadableStreamController::deref):
1977         (WebCore::ReadableStreamController::create): Deleted.
1978         (WebCore::ReadableStreamController::stream): Deleted.
1979         * bindings/js/JSReadableStreamControllerCustom.cpp:
1980         (WebCore::JSReadableStreamController::close):
1981         (WebCore::JSReadableStreamController::enqueue):
1982         (WebCore::JSReadableStreamController::error):
1983         * bindings/js/ReadableStreamJSSource.cpp:
1984         (WebCore::ReadableStreamJSSource::~ReadableStreamJSSource):
1985         (WebCore::ReadableStreamJSSource::start):
1986         (WebCore::ReadableJSStream::jsController):
1987         * bindings/js/ReadableStreamJSSource.h:
1988
1989 2015-05-05  Myles C. Maxfield  <mmaxfield@apple.com>
1990
1991         Small cleanup in RenderText::computePreferredLogicalWidths()
1992         https://bugs.webkit.org/show_bug.cgi?id=144615
1993
1994         Reviewed by Simon Fraser.
1995
1996         A little bit of cleanup before I tackle dependent widths in this function.
1997
1998         No new tests because there is no behavior change.
1999
2000         * rendering/RenderText.cpp:
2001         (WebCore::RenderText::computePreferredLogicalWidths):
2002
2003 2015-05-05  Joanmarie Diggs  <jdiggs@igalia.com>
2004
2005         [ATK] AX: figure out platform difference for ATK to make accessibility/table-cell-display-block.html work
2006         https://bugs.webkit.org/show_bug.cgi?id=143083
2007
2008         Reviewed by Chris Fleizach.
2009
2010         The main platform difference was that ATK was mapping the td element to
2011         the accessible table cell, and the render block resulting from the style
2012         wound up being the cell parent. In contrast, AX API was mapping the cell
2013         element to an AXGroup which was a child of the AXCell. Rather than try to
2014         bend yet another case to the will of our individual platforms' table needs,
2015         it made more sense to clean up the code that is competing and move toward
2016         more platform-unified handling. This is the first step in that direction,
2017         with ATK moving closer toward the WebCore/AX API mapping.
2018
2019         No new tests. Instead, modified and fixed the test which was being skipped
2020         for GTK, and also updated the expectations of some Mac tests whose FIXMEs
2021         should now be fixed.
2022
2023         * accessibility/AccessibilityNodeObject.cpp:
2024         (WebCore::AccessibilityNodeObject::supportsRequiredAttribute):
2025         * accessibility/AccessibilityRenderObject.cpp:
2026         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2027         * accessibility/AccessibilityTable.cpp:
2028         (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
2029         * accessibility/AccessibilityTableCell.cpp:
2030         (WebCore::AccessibilityTableCell::determineAccessibilityRole):
2031         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2032         (createAccessibilityRoleMap):
2033
2034 2015-05-04  Jer Noble  <jer.noble@apple.com>
2035
2036         [iOS] Videos on apple.com flash when touching to show or hide the controls
2037         https://bugs.webkit.org/show_bug.cgi?id=144598
2038
2039         Reviewed by Eric Carlson.
2040
2041         The apple.com site will add a "selection" rectangle atop a playing video when it recieves a touchstart
2042         event. The default media controls use touchstart to signal the controls to become visible. Stop the touch
2043         from propagating down to the page in this case.
2044
2045         * Modules/mediacontrols/mediaControlsiOS.js:
2046         (ControllerIOS.prototype.handleWrapperTouchStart):
2047
2048 2015-05-04  Andreas Kling  <akling@apple.com>
2049
2050         Record the reference time when Performance is constructed.
2051         <https://webkit.org/b/144616>
2052
2053         Reviewed by Geoffrey Garen.
2054
2055         This is a merge of Blink's r156613 by simonjam@chromium.org.
2056
2057         Cache a copy of the DocumentLoader's reference timestamp when constructing
2058         the Performance object. That way we don't have to jump through a bunch of scary
2059         hoops to access it when now() is called later on.
2060
2061         * page/Performance.cpp:
2062         (WebCore::Performance::Performance):
2063         (WebCore::Performance::now): Deleted.
2064         * page/Performance.h:
2065
2066 2015-05-04  Simon Fraser  <simon.fraser@apple.com>
2067
2068         Fix assertions in WK1 tests after r183777.
2069         
2070         Two issues with the original change:
2071         
2072         If not in compositing mode, we shouldn't schedule layer flushes, since
2073         Document::documentWillSuspendForPageCache() only only calls cancelCompositingLayerUpdate()
2074         if in compositing mode.
2075         
2076         Second, RenderLayerCompositor::rootBackgroundTransparencyChanged() never stored the
2077         new color, resulting in too many triggered compositing updates.
2078
2079         * rendering/RenderLayerCompositor.cpp:
2080         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged):
2081
2082 2015-05-04  Zalan Bujtas  <zalan@apple.com>
2083
2084         RenderWidget::setWidgetGeometry() can end up destroying *this*.
2085         https://bugs.webkit.org/show_bug.cgi?id=144601
2086
2087         Reviewed by Andreas Kling.
2088
2089         This is a speculative fix to ensure we don't crash on an invalid *this* renderer
2090         while flattening the current iframe.
2091         Calling RenderWidget::setWidgetGeometry() can result in destroying the current renderer.
2092         While it is not a issue in case of normal layout flow as widget positions are updated at post layout,
2093         frame flattening initiates this action in the middle of layout.
2094         This patch re-introduces refcount model for RenderWidgets so that the renderer is protected during layout
2095         when frame flattening is in use.
2096
2097         * rendering/RenderFrameBase.cpp:
2098         (WebCore::RenderFrameBase::layoutWithFlattening): Let's be paranoid about child view.
2099         * rendering/RenderObject.cpp:
2100         (WebCore::RenderObject::destroy):
2101         * rendering/FrameView.cpp:
2102         (WebCore::FrameView::layout):
2103         * rendering/RenderView.h:
2104         * rendering/RenderWidget.cpp:
2105         (WebCore::RenderWidget::~RenderWidget):
2106         * rendering/RenderWidget.h:
2107         (WebCore::RenderWidget::ref):
2108         (WebCore::RenderWidget::deref):
2109
2110 2015-05-04  Doug Russell  <d_russell@apple.com>
2111
2112         AX: setting focus via accessibility object needs to set isSynchronizing in resulting selection intent
2113         https://bugs.webkit.org/show_bug.cgi?id=144489
2114
2115         Reviewed by Chris Fleizach.
2116
2117         Resolves infinite looping when navigating rapidly between controls with the search API and then focusing
2118         on the returned control.
2119         Remove isSynchronizing flag from AXTextStateChangeIntent and put it on AXObjectCache.
2120         Move AXTextStateChangeIntent logic in AccessibilityRenderObject into a helper method.
2121         Call new AXTextStateChangeIntent helper from AccessibilityRenderObject::setFocus().
2122         Add support for setSelectedVisibleTextRange() in accessibility tests.
2123
2124         Test: platform/mac/accessibility/selection-sync.html
2125
2126         * accessibility/AXObjectCache.cpp:
2127         (WebCore::AXObjectCache::showIntent):
2128         (WebCore::AXObjectCache::setTextSelectionIntent):
2129         (WebCore::AXObjectCache::setIsSynchronizingSelection):
2130         (WebCore::AXObjectCache::postTextStateChangeNotification):
2131         * accessibility/AXObjectCache.h:
2132         * accessibility/AXTextStateChangeIntent.h:
2133         (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
2134         * accessibility/AccessibilityRenderObject.cpp:
2135         (WebCore::setTextSelectionIntent):
2136         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2137         (WebCore::AccessibilityRenderObject::setFocused):
2138         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
2139         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange): Deleted.
2140         * accessibility/mac/AXObjectCacheMac.mm:
2141         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2142
2143 2015-05-04  Eric Carlson  <eric.carlson@apple.com>
2144
2145         [Mac] Audio-only files should not have a device picker
2146         https://bugs.webkit.org/show_bug.cgi?id=144606
2147         <rdar://problem/20806387>
2148
2149         Reviewed by Dean Jackson.
2150
2151         * Modules/mediacontrols/mediaControlsApple.js:
2152         (Controller.prototype.hasVideo): New.
2153         (Controller.prototype.updateFullscreenButtons): Use hasVideo.
2154         (Controller.prototype.updateHasVideo): Ditto.
2155         (Controller.prototype.updateWirelessTargetAvailable): Don't show the target picker button
2156         unless a file has video.
2157
2158 2015-05-04  Chris Dumez  <cdumez@apple.com>
2159
2160         Crash at com.apple.WebKit.WebContent at com.apple.WebCore: WebCore::createWindow + 185
2161         https://bugs.webkit.org/show_bug.cgi?id=144597
2162         <rdar://problem/20361579>
2163
2164         Reviewed by Andreas Kling.
2165
2166         Test: fast/dom/Window/window-open-activeWindow-null-frame.html
2167
2168         In our implementation of window.open(), we make sure that the window
2169         which window.open() is called has a frame. However, we did not have the
2170         same check for the activeDOMWindow (i.e. the lexicalGlobalObject) causing
2171         us to crash in WebCore::createWindow() when dereferencing it.
2172
2173         This patch updates WebCore::createWindow() takes a reference to the
2174         openerFrame instead of a pointer to make it clear the implementation
2175         expects it to be non-null. A null check is then added for the frame
2176         at the call site: DOMWindow::createWindow().
2177
2178         * inspector/InspectorFrontendClientLocal.cpp:
2179         (WebCore::InspectorFrontendClientLocal::openInNewTab):
2180         * loader/FrameLoader.cpp:
2181         (WebCore::isDocumentSandboxed):
2182         (WebCore::FrameLoader::submitForm):
2183         (WebCore::createWindow):
2184         Take a reference to openerFrame instead of a pointer as the
2185         implementation expects it to be non-null.
2186
2187         * loader/FrameLoader.h:
2188         * page/DOMWindow.cpp:
2189         (WebCore::DOMWindow::createWindow):
2190         Add null check for activeFrame before passing it to
2191         WebCore::createWindow().
2192
2193 2015-05-04  Dean Jackson  <dino@apple.com>
2194
2195         Create a named CSS property for system colors
2196         https://bugs.webkit.org/show_bug.cgi?id=144423
2197
2198         Follow-up comments from Darin Adler.
2199
2200         * rendering/RenderThemeIOS.h: Cache a Color rather than an RGBA32.
2201         * rendering/RenderThemeIOS.mm:
2202         (WebCore::RenderThemeIOS::systemColor): Use "add" to avoid multiple hits on the HashMap, and
2203         cache invalid responses so that we don't have to keep looking for non-existent colors.
2204         * rendering/RenderThemeMac.h: Same as iOS.
2205         * rendering/RenderThemeMac.mm:
2206         (WebCore::RenderThemeMac::systemColor):
2207
2208 2015-05-04  Simon Fraser  <simon.fraser@apple.com>
2209
2210         display:none iframes cause repeated compositing flushing
2211         https://bugs.webkit.org/show_bug.cgi?id=144529
2212
2213         Reviewed by Darin Adler.
2214         
2215         FrameView::updateLayoutAndStyleIfNeededRecursive() only forces layout on rendered
2216         frames, by virtue of using its Widget children which are FrameViews.
2217         
2218         However, FrameView::flushCompositingStateIncludingSubframes() iterated over
2219         all frames, and return false if any subframe needed layout. Thus, if it saw
2220         non-rendered frames (which are never laid out), it would return false,
2221         which causes the CFRunLoopObserver that drives flushing to run again.
2222         
2223         Fix by having FrameView::flushCompositingStateIncludingSubframes() only check
2224         rendered frames, using FrameTree::traverseNextRendered() (which needs to be public).
2225         
2226         Also change FrameView::needsStyleRecalcOrLayout() and FrameView::updateLayoutAndStyleIfNeededRecursive()
2227         to fetch the list of FrameViews using FrameTree's nextRenderedSibling(), rather than using
2228         the Widget tree, since we'd like to eventually remove Widgets, and using the Frame
2229         tree matches flushCompositingStateIncludingSubframes() and other code.
2230
2231         Test: compositing/iframes/display-none-subframe.html
2232
2233         * page/FrameTree.h:
2234         * page/FrameView.cpp:
2235         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
2236         (WebCore::FrameView::needsStyleRecalcOrLayout):
2237         (WebCore::FrameView::renderedChildFrameViews): Helper that returns a vector
2238         of Ref<FrameView>s for rendered frames only.
2239         (WebCore::FrameView::updateLayoutAndStyleIfNeededRecursive):
2240         * page/FrameView.h:
2241
2242 2015-05-04  Chris Dumez  <cdumez@apple.com>
2243
2244         Unreviewed. Fix build with SECURITY_ASSERTIONS enabled.
2245         <rdar://problem/20653104>
2246
2247         * dom/ScriptExecutionContext.cpp:
2248         (WebCore::ScriptExecutionContext::ScriptExecutionContext):
2249         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForPageCache):
2250         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects):
2251         (WebCore::ScriptExecutionContext::resumeActiveDOMObjects):
2252         * dom/ScriptExecutionContext.h:
2253
2254 2015-05-04  Simon Fraser  <simon.fraser@apple.com>
2255
2256         Fix updating of tiled backing opaquenss when the page background color changes
2257         https://bugs.webkit.org/show_bug.cgi?id=144600
2258         rdar://problem/20723035
2259
2260         Reviewed by Tim Horton.
2261
2262         RenderLayerCompositor makes the page tiles opaque or not based on the result of
2263         viewHasTransparentBackground(), which consults the view transparency, and
2264         FrameView::documentBackgroundColor(). documentBackgroundColor() in turn is based
2265         on the root and/or body background colors.
2266
2267         We thus need to re-evaluate whether page tiles are opaque when any of these inputs
2268         change, but were failing to do so for the FrameView's baseBackgroundColor, and
2269         the page root background color.
2270         
2271         Fix by having FrameView::setBaseBackgroundColor(), and RenderBox::styleDidChange()
2272         (for the root) trigger a compositing update when necessary.
2273
2274         Added setViewBaseBackgroundColor() on Internals for testing.
2275
2276         Test: platform/mac-wk2/tiled-drawing/background-transparency-toggle.html
2277
2278         * page/FrameView.cpp:
2279         (WebCore::FrameView::setTransparent): Use the isViewForDocumentInFrame() helper.
2280         (WebCore::FrameView::setBaseBackgroundColor): Bail if we're not the view for the 
2281         frame's document, and trigger a compositing update check if the alpha changed.
2282         (WebCore::FrameView::isViewForDocumentInFrame): Helper that checks to see if
2283         this FrameView is associated with the Document being displayed in the FrameView's
2284         Frame. This returns false when we're setting up a new FrameView (its Frame still
2285         points to the old document, so renderView() returns the RenderView for the Frame's
2286         existing Document).
2287         * page/FrameView.h:
2288         * rendering/RenderBox.cpp:
2289         (WebCore::RenderBox::styleDidChange): Have the compositor check to see if it needs
2290         to do an update.
2291         * rendering/RenderLayerCompositor.cpp:
2292         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): If the result
2293         of documentBackgroundColor() changed in alpha since the last time, trigger a compositing
2294         update.
2295         * rendering/RenderLayerCompositor.h:
2296         * testing/Internals.cpp:
2297         (WebCore::Internals::setViewBaseBackgroundColor):
2298         * testing/Internals.h:
2299         * testing/Internals.idl:
2300
2301 2015-05-04  Jer Noble  <jer.noble@apple.com>
2302
2303         [iOS] Crash in -[WebCALayerHostWrapper resolveBounds]
2304         https://bugs.webkit.org/show_bug.cgi?id=144595
2305
2306         Reviewed by Eric Carlson.
2307
2308         It is possible for a WebCALayorHostWrapper to outlive the WebVideoFullscreenModel to which it refers,
2309         since the model pointer is bare, rather than a RefPtr. The reference to the model must be invalidated
2310         before the model is destroyed.
2311
2312         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2313         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal):
2314
2315 2015-05-04  Ryosuke Niwa  <rniwa@webkit.org>
2316
2317         Toggling underline or strike through affects each other
2318         https://bugs.webkit.org/show_bug.cgi?id=27818
2319
2320         Reviewed by Darin Adler.
2321
2322         This patch introduces a new mechanism to apply and remove text decorations. This is necessary because text
2323         decorations are always additive and we can't differentiate whether we're adding or removing a text decoration.
2324         Conceptually, we need four values for text decorations: adding underline, removing underline, adding
2325         line-through, and removing line-through but we have only three: underline, line-through, none.
2326
2327         After this patch, there are three mechanism by which text decorations states are kept tracked. While applying
2328         or removing text decorations, we use newly added m_underlineChange and m_strikeThroughChange in EditingStyle.
2329         For the typing style, we use -webkit-text-decorations-in-effect to store the state since we need to preserve
2330         every type of text decorations such as overline in addition to underline and line-through. Once applied, all
2331         text decorations should be expressed in terms of the standard text-decoration property.
2332
2333         Test: editing/execCommand/toggle-mixed-text-decorations.html
2334
2335         * editing/ApplyStyleCommand.cpp:
2336         (WebCore::ApplyStyleCommand::applyBlockStyle):
2337         (WebCore::ApplyStyleCommand::removeCSSStyle): conflictsWithInlineStyleOfElement now creates a new inline style
2338         instead of a list of properties to remove.
2339         (WebCore::ApplyStyleCommand::addBlockStyle):
2340         (WebCore::ApplyStyleCommand::applyInlineStyleChange): Merge inline styles instead of adding as string.
2341         Otherwise it would generate style content attribute with multiple text-decoration properties.
2342
2343         * editing/EditingStyle.cpp:
2344         (WebCore::HTMLElementEquivalent::matches):
2345         (WebCore::HTMLElementEquivalent::propertyExistsInStyle): Takes an EditingStyle instead of StyleProperties.
2346         (WebCore::HTMLElementEquivalent::valueIsPresentInStyle):
2347         (WebCore::HTMLTextDecorationEquivalent::HTMLTextDecorationEquivalent): 
2348         (WebCore::HTMLTextDecorationEquivalent::propertyExistsInStyle): Respect newly added m_strikeThroughChange and
2349         m_underlineChange in EditingStyle.
2350         (WebCore::HTMLTextDecorationEquivalent::valueIsPresentInStyle): Ditto.
2351         (WebCore::HTMLTextDecorationEquivalent::changeInStyle): Added. Retrieves the change enum for the associated
2352         type of text-decoration (underline or strike through).
2353         (WebCore::HTMLAttributeEquivalent::matches):
2354         (WebCore::HTMLAttributeEquivalent::valueIsPresentInStyle):
2355         (WebCore::EditingStyle::EditingStyle): Initialize m_underlineChange and m_strikeThroughChange. Also use the
2356         delegating constructor elsewhere. Also added the missing call to extractFontSizeDelta() in the variant that
2357         takes CSSPropertyID and String, and added a variant that takes CSSPropertyID and CSSValueID.
2358         (WebCore::EditingStyle::isEmpty): Return false when m_underlineChange and m_strikeThroughChange are not "none".
2359         (WebCore::applyTextDecorationChangeToValueList): Added.
2360         (WebCore::EditingStyle::overrideTypingStyleAt): Added. Used by Editor::computeAndSetTypingStyle to set a new
2361         typing style. Resolve m_underlineChange and m_strikeThroughChange into -webkit-text-decorations-in-effect.
2362         (WebCore::EditingStyle::clear): Clear m_underlineChange and m_strikeThroughChange.
2363         (WebCore::EditingStyle::copy): Copy m_underlineChange and m_strikeThroughChange.
2364         (WebCore::textDecorationValueList): Added.
2365         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement): Now takes a pointer to MutableStyleProperties
2366         instead of a vector. This was necessary we can't simply remove text-decoration property in ApplyStyleCommand's
2367         removeCSSStyle as that would result in unrelated text decorations also getting removed. Also added the code
2368         for m_underlineChange and m_strikeThroughChange. Only removing text decoration changes can cause a conflict
2369         since text decorations are always additive.
2370         (WebCore::EditingStyle::conflictsWithImplicitStyleOfElement): Check isEmpty() instead of the nullity of
2371         m_mutableStyle to respect m_underlineChange and m_strikeThroughChange.
2372         (WebCore::EditingStyle::conflictsWithImplicitStyleOfAttributes):
2373         (WebCore::EditingStyle::extractConflictingImplicitStyleOfAttributes):
2374         (WebCore::EditingStyle::styleIsPresentInComputedStyleOfNode): Respect the values of m_underlineChange and
2375         m_strikeThroughChange. Here, the style is considered present if it has text decorations that are being added.
2376         (WebCore::EditingStyle::elementIsStyledSpanOrHTMLEquivalent):
2377         (WebCore::elementMatchesAndPropertyIsNotInInlineStyleDecl): Takes EditingStyle instead of StyleProperties to
2378         respect m_underlineChange and m_strikeThroughChange.
2379         (WebCore::EditingStyle::mergeInlineAndImplicitStyleOfElement):
2380         (WebCore::mergeTextDecorationValues):
2381         (WebCore::EditingStyle::mergeStyle): Make a copy of CSSValueList before modifying it since CSSValueList's are
2382         shared with other immutable StyleProperties.
2383         (WebCore::StyleChange::StyleChange): Set m_applyUnderline, m_applyLineThrough, and m_cssStyle if either
2384         m_underlineChange or m_strikeThroughChange are TextDecorationChange::Add in EditingStyle if the current position
2385         doesn't already have the matching style.
2386         (WebCore::StyleChange::operator==): Moved from the header file. Also added the logic to compare m_cssStyle now
2387         that it's a StyleProperties instead of String.
2388
2389         * editing/EditingStyle.h: Added TextDecorationChange.
2390         (WebCore::EditingStyle::create): Added a variant that takes CSSPropertyID and CSSValueID.
2391         (WebCore::EditingStyle::conflictsWithInlineStyleOfElement):
2392         (WebCore::EditingStyle::setUnderlineChange): Added.
2393         (WebCore::EditingStyle::underlineChange): Added.
2394         (WebCore::EditingStyle::setStrikeThroughChange): Added.
2395         (WebCore::EditingStyle::strikeThroughChange): Added.
2396         (WebCore::StyleChange::cssStyle): Now returns StyleProperties* instead of String so that ApplyStyleCommand's
2397         applyInlineStyleChange could merge inline styles instead of just appending it to the end.
2398         (WebCore::StyleChange::operator==): Moved into the cpp file.
2399
2400         * editing/Editor.cpp:
2401         (WebCore::Editor::applyStyle): Added. This variant takes EditingStyle instead of StyleProperties.
2402         (WebCore::Editor::applyStyleToSelection): Ditto.
2403         (WebCore::Editor::computeAndSetTypingStyle): Added a variant for EditingStyle. Also use overrideTypingStyleAt
2404         to set -webkit-text-decorations-in-effect based on m_underlineChange and m_strikeThroughChange 
2405
2406         * editing/Editor.h:
2407         * editing/EditorCommand.cpp:
2408         (WebCore::applyCommandToFrame):
2409         (WebCore::isStylePresent): Extracted from executeToggleStyle.
2410         (WebCore::executeApplyStyle):
2411         (WebCore::executeToggleStyle):
2412         (WebCore::executeToggleStyleInList): Deleted.
2413         (WebCore::textDecorationChangeForToggling): Added. Used in executeStrikethrough and executeUnderline.
2414         (WebCore::executeStrikethrough):
2415         (WebCore::executeUnderline):
2416
2417 2015-05-04  Eric Carlson  <eric.carlson@apple.com>
2418
2419         [Mac] Fix build breakage caused by API deprecation
2420         https://bugs.webkit.org/show_bug.cgi?id=144593
2421
2422         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2423         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Suppress warnings.
2424
2425 2015-05-04  Chris Dumez  <cdumez@apple.com>
2426
2427         REGRESSION (r178156): CSS Parser incorrectly rejects valid calc() in padding-right property
2428         https://bugs.webkit.org/show_bug.cgi?id=144584
2429         <rdar://problem/20796829>
2430
2431         Reviewed by Darin Adler.
2432
2433         The CSS parser was rejecting calculated values at parsing time if it
2434         considered the value was negative and the CSS property did not allow
2435         negative values. However, doing so at this point will not always work
2436         because we don't necessarily know the font-size yet (for e.g. for
2437         calc(0.5em - 2px). Also, rejecting negative calculated values is not
2438         the right behavior as the the specification. The specification says
2439         we should clamp:
2440         http://dev.w3.org/csswg/css-values-3/#calc-range
2441
2442         This patch updates validateCalculationUnit() to stop marking the value
2443         as invalid if it is negative. Instead, let the CSSCalcValue's permitted
2444         range clamp the value as needed.
2445
2446         This bug was causing the bottom graphic on aldentrio.com to not be
2447         rendered properly.
2448
2449         Test: fast/css/negative-calc-values.html
2450               fast/css/padding-calc-value.html
2451
2452         * css/CSSParser.cpp:
2453         (WebCore::CSSParser::validateCalculationUnit):
2454
2455 2015-05-04  Eric Carlson  <eric.carlson@apple.com>
2456
2457         [Mac] Show wireless playback placard even when an element has custom controls
2458         https://bugs.webkit.org/show_bug.cgi?id=144548
2459
2460         Reviewed by Brent Fulgham.
2461
2462         * Modules/mediacontrols/mediaControlsApple.js:
2463         (Controller.prototype.shouldHaveAnyUI): Return true when playing to wireless target.
2464         (Controller.prototype.reconnectControls): Add controls when playing to wireless target.
2465         (Controller.prototype.setPlaying): Return early when there is no 'controls' attribute.
2466         (Controller.prototype.showControls): Ditto.
2467         (Controller.prototype.updateWirelessPlaybackStatus): Call updateBase when playing to wireless
2468         target to ensure that controls have been set up.
2469         (Controller.prototype.handleWirelessPlaybackChange): Call reconnectControls when playing
2470         to wireless target when there is no 'controls' attribute.
2471         (Controller.prototype.showInlinePlaybackPlaceholderOnly): New.
2472
2473         * html/HTMLMediaElement.cpp:
2474         (WebCore::HTMLMediaElement::mediaPlayerCurrentPlaybackTargetIsWirelessChanged): Call configureMediaControls.
2475         (WebCore::HTMLMediaElement::configureMediaControls): Require controls when playing
2476         to wireless target.
2477         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Remove some unhelpful, noisy, logging.
2478
2479 2015-05-04  Dan Bernstein  <mitz@apple.com>
2480
2481         Fixed the build.
2482
2483         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2484         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Moved off of a deprecated
2485         method to a non-deprecated equivalent.
2486
2487 2015-05-04  Javier Fernandez  <jfernandez@igalia.com>
2488
2489         [CSS Box Alignment] Upgrade justify-content parsing to CSS3 Box Alignment spec.
2490         https://bugs.webkit.org/show_bug.cgi?id=144442
2491
2492         Reviewed by David Hyatt.
2493
2494         Upgrade the justify-content property to the last CSS3 Box
2495         Alignment specification. It defines a different enumeration for
2496         Positional and Distribution alignment, which requires changes in
2497         the FlexibleBox implementation.
2498
2499         A new parsing function has been implemented to replace the basic
2500         keyword IDs validation. Because of the complexity of the new
2501         values, a new CSSPrimitiveValue derived class has been defined
2502         which simplifies considerably the parsing logic.
2503
2504         We will follow the same approach than for Self Alignment, defining
2505         a single class to hold all the related alignment data. This makes
2506         possible to use a StyleBuilderConverter function instead of custom
2507         builder functions for these properties.
2508
2509         Test: css3/parse-justify-content.html
2510
2511         * CMakeLists.txt:
2512         * WebCore.xcodeproj/project.pbxproj:
2513         * css/CSSComputedStyleDeclaration.cpp:
2514         (WebCore::resolveContentAlignmentAuto):
2515         (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
2516         (WebCore::ComputedStyleExtractor::propertyValue):
2517         (WebCore::valueForItemPositionWithOverflowAlignment): Deleted.
2518         * css/CSSContentDistributionValue.cpp: Added.
2519         (WebCore::CSSContentDistributionValue::CSSContentDistributionValue):
2520         (WebCore::CSSContentDistributionValue::~CSSContentDistributionValue):
2521         (WebCore::CSSContentDistributionValue::customCSSText):
2522         (WebCore::CSSContentDistributionValue::equals):
2523         * css/CSSContentDistributionValue.h: Added.
2524         (WebCore::CSSContentDistributionValue::create):
2525         (WebCore::CSSContentDistributionValue::distribution):
2526         (WebCore::CSSContentDistributionValue::position):
2527         (WebCore::CSSContentDistributionValue::overflow):
2528         * css/CSSParser.cpp:
2529         (WebCore::isValidKeywordPropertyAndValue):
2530         (WebCore::isKeywordPropertyID):
2531         (WebCore::CSSParser::parseValue):
2532         (WebCore::isContentDistributionKeyword):
2533         (WebCore::isContentPositionKeyword):
2534         (WebCore::isAlignmentOverflowKeyword):
2535         (WebCore::CSSParser::parseContentDistributionOverflowPosition):
2536         (WebCore::CSSParser::parseItemPositionOverflowPosition):
2537         (WebCore::CSSParser::parseLegacyPosition): Deleted.
2538         * css/CSSParser.h:
2539         * css/CSSPrimitiveValueMappings.h:
2540         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2541         (WebCore::CSSPrimitiveValue::operator ContentPosition):
2542         (WebCore::CSSPrimitiveValue::operator ContentDistributionType):
2543         (WebCore::CSSPrimitiveValue::operator EFlexDirection): Deleted.
2544         * css/CSSPropertyNames.in:
2545         * css/CSSValue.cpp:
2546         (WebCore::CSSValue::equals):
2547         (WebCore::CSSValue::cssText):
2548         (WebCore::CSSValue::destroy):
2549         * css/CSSValue.h:
2550         (WebCore::CSSValue::isContentDistributionValue):
2551         (WebCore::CSSValue::isWebKitCSSFilterValue): Deleted.
2552         * css/CSSValueKeywords.in:
2553         * css/StyleBuilderConverter.h:
2554         (WebCore::StyleBuilderConverter::convertContentAlignmentData):
2555         (WebCore::StyleBuilderConverter::convertSelfOrDefaultAlignmentData): Deleted.
2556         * rendering/RenderFlexibleBox.cpp:
2557         (WebCore::initialJustifyContentOffset):
2558         (WebCore::justifyContentSpaceBetweenChildren):
2559         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren):
2560         (WebCore::RenderFlexibleBox::layoutColumnReverse):
2561         * rendering/RenderFullScreen.cpp:
2562         (WebCore::createFullScreenStyle):
2563         * rendering/mathml/RenderMathMLScripts.cpp:
2564         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair):
2565         (WebCore::RenderMathMLScripts::fixAnonymousStyles):
2566         * rendering/style/RenderStyle.h:
2567         * rendering/style/RenderStyleConstants.h:
2568         * rendering/style/StyleContentAlignmentData.h: Added.
2569         (WebCore::StyleContentAlignmentData::StyleContentAlignmentData):
2570         (WebCore::StyleContentAlignmentData::setPosition):
2571         (WebCore::StyleContentAlignmentData::setDistribution):
2572         (WebCore::StyleContentAlignmentData::setOverflow):
2573         (WebCore::StyleContentAlignmentData::position):
2574         (WebCore::StyleContentAlignmentData::distribution):
2575         (WebCore::StyleContentAlignmentData::overflow):
2576         (WebCore::StyleContentAlignmentData::operator==):
2577         (WebCore::StyleContentAlignmentData::operator!=):
2578         * rendering/style/StyleRareNonInheritedData.cpp:
2579         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
2580         (WebCore::StyleRareNonInheritedData::operator==):
2581         * rendering/style/StyleRareNonInheritedData.h:
2582
2583 2015-05-04  Per Arne Vollan  <peavo@outlook.com>
2584
2585         [WinCairo] Compile error in sharedEGLDisplay() method.
2586         https://bugs.webkit.org/show_bug.cgi?id=144563
2587
2588         Reviewed by Alex Christensen.
2589
2590         The PlatformDisplay type is undefined.
2591
2592         * platform/graphics/egl/GLContextEGL.cpp:
2593         (WebCore::sharedEGLDisplay):
2594
2595 2015-05-04  Zan Dobersek  <zdobersek@igalia.com>
2596
2597         [WTF] Remove Functional.h inclusions
2598         https://bugs.webkit.org/show_bug.cgi?id=144400
2599
2600         Reviewed by Darin Adler.
2601
2602         Remove unnecessary inclusions of the <wtf/Functional.h> header in WebCore.
2603
2604         * Modules/mediastream/MediaStreamTrack.cpp:
2605         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp:
2606         * Modules/mediastream/UserMediaRequest.cpp:
2607         * page/scrolling/ScrollingTree.h:
2608         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
2609         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2610         * platform/MemoryPressureHandler.cpp:
2611         * platform/UserActivity.h: Include the <objc/objc.h> header that was previously
2612         indirectly included through Functional.h.
2613         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2614         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2615         * platform/mac/SoftLinking.h: Unconditionally include the <objc/runtime.h> header
2616         that was previously included for the Mac port through Functional.h.
2617
2618 2015-05-04  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2619
2620         [Streams API] Refactor ReadableJSStream and ReadableStreamJSSource
2621         https://bugs.webkit.org/show_bug.cgi?id=144387
2622
2623         Reviewed by Darin Adler.
2624
2625         Made ReadableStreamReader a private class of ReadableJSStream.
2626         Simplified ReadableJSStream construction so that binding constructor does not need to know about ReadableStreamJSSource. 
2627
2628         No functional change, existing tests cover the changes.
2629
2630         * Modules/streams/ReadableStream.h:
2631         (WebCore::ReadableStream::source): Added to implement jsSource(), needed by ReadableJSStream.
2632         * bindings/js/JSReadableStreamCustom.cpp:
2633         (WebCore::constructJSReadableStream): Simplified to not have to handle source creation.
2634         * bindings/js/ReadableStreamJSSource.cpp:
2635         (WebCore::ReadableStreamJSSource::globalObject): Helper function to be used in other future methods.
2636         (WebCore::ReadableStreamJSSource::start):
2637         (WebCore::ReadableJSStream::create):
2638         (WebCore::ReadableJSStream::createReader):
2639         (WebCore::ReadableJSStream::jsSource):
2640         (WebCore::ReadableJSStream::Reader::create):
2641         (WebCore::ReadableJSStream::Reader::Reader):
2642         * bindings/js/ReadableStreamJSSource.h:
2643
2644 2015-05-04  Csaba Osztrogonác  <ossy@webkit.org>
2645
2646         Remove move-js-headers.sh
2647         https://bugs.webkit.org/show_bug.cgi?id=144323
2648
2649         Reviewed by Daniel Bates.
2650
2651         move-js-headers.sh was only used by the Wx port, which has been removed from trunk long ago.
2652
2653         * move-js-headers.sh: Removed.
2654
2655 2015-05-04  Csaba Osztrogonác  <ossy@webkit.org>
2656
2657         [ARM] Don't compare unsigned chars to EOF (-1)
2658         https://bugs.webkit.org/show_bug.cgi?id=144439
2659
2660         Reviewed by Geoffrey Garen.
2661
2662         * platform/linux/MemoryPressureHandlerLinux.cpp:
2663         (WebKit::nextToken): Don't cast return value of fgetc() to char.
2664
2665 2015-05-04  Manuel Rego Casasnovas  <rego@igalia.com>
2666
2667         [CSS Grid Layout] Wrong computed style for named grid lines in implicit tracks
2668         https://bugs.webkit.org/show_bug.cgi?id=144449
2669
2670         Reviewed by Sergio Villar Senin.
2671
2672         If there're implicit tracks then trackPositions is bigger than
2673         trackSizes, so we need to use the proper index to append the trailing
2674         <ident>s in valueForGridTrackList().
2675
2676         Test: fast/css-grid-layout/named-grid-lines-computed-style-implicit-tracks.html
2677
2678         * css/CSSComputedStyleDeclaration.cpp:
2679         (WebCore::valueForGridTrackList):
2680
2681 2015-05-03  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2682
2683         Purge PassRefPtr in WebCore/html
2684         https://bugs.webkit.org/show_bug.cgi?id=144543
2685
2686         Reviewed by Andreas Kling.
2687
2688         Change PassRefPtr in create() factory functions with Ref. In some functions,
2689         it returns RefPtr when it might have a chance to return nullptr.
2690
2691         No new tests, no behavior changes.
2692
2693         * Modules/encryptedmedia/MediaKeySession.cpp:
2694         (WebCore::MediaKeySession::sendError):
2695         * html/DOMFormData.h:
2696         (WebCore::DOMFormData::create):
2697         * html/HTMLMediaElement.cpp:
2698         (WebCore::HTMLMediaElement::mediaPlayerCreateResourceLoader):
2699         * html/HTMLMediaElement.h:
2700         * html/MediaError.h:
2701         (WebCore::MediaError::create):
2702         * html/MediaKeyError.h:
2703         (WebCore::MediaKeyError::create):
2704         * html/canvas/CanvasGradient.h:
2705         * html/canvas/CanvasProxy.cpp:
2706         (WebCore::CanvasProxy::create):
2707         * html/canvas/CanvasProxy.h:
2708         * html/canvas/WebGLActiveInfo.h:
2709         (WebCore::WebGLActiveInfo::create):
2710         * html/canvas/WebGLContextAttributes.h:
2711         * html/canvas/WebGLContextGroup.h:
2712         * html/canvas/WebGLProgram.h:
2713         * html/canvas/WebGLQuery.h:
2714         * html/canvas/WebGLRenderbuffer.h:
2715         * html/canvas/WebGLSampler.h:
2716         * html/canvas/WebGLShader.h:
2717         * html/canvas/WebGLShaderPrecisionFormat.h:
2718         * html/canvas/WebGLSync.h:
2719         * html/canvas/WebGLTexture.h:
2720         * html/canvas/WebGLTransformFeedback.h:
2721         * html/canvas/WebGLUniformLocation.h:
2722         * html/canvas/WebGLVertexArrayObjectOES.h:
2723         * html/shadow/ImageControlsRootElement.cpp:
2724         (WebCore::ImageControlsRootElement::maybeCreate):
2725         * html/shadow/ImageControlsRootElement.h:
2726         * html/shadow/MediaControlElements.cpp:
2727         (WebCore::MediaControlPanelElement::create):
2728         (WebCore::MediaControlPanelEnclosureElement::create):
2729         (WebCore::MediaControlOverlayEnclosureElement::create):
2730         (WebCore::MediaControlTimelineContainerElement::create):
2731         (WebCore::MediaControlVolumeSliderContainerElement::create):
2732         (WebCore::MediaControlStatusDisplayElement::create):
2733         (WebCore::MediaControlPanelMuteButtonElement::create):
2734         (WebCore::MediaControlVolumeSliderMuteButtonElement::create):
2735         (WebCore::MediaControlPlayButtonElement::create):
2736         (WebCore::MediaControlOverlayPlayButtonElement::create):
2737         (WebCore::MediaControlSeekForwardButtonElement::create):
2738         (WebCore::MediaControlSeekBackButtonElement::create):
2739         (WebCore::MediaControlRewindButtonElement::create):
2740         (WebCore::MediaControlReturnToRealtimeButtonElement::create):
2741         (WebCore::MediaControlToggleClosedCaptionsButtonElement::create):
2742         (WebCore::MediaControlClosedCaptionsContainerElement::create):
2743         (WebCore::MediaControlClosedCaptionsTrackListElement::create):
2744         (WebCore::MediaControlTimelineElement::create):
2745         (WebCore::MediaControlPanelVolumeSliderElement::create):
2746         (WebCore::MediaControlFullscreenVolumeSliderElement::create):
2747         (WebCore::MediaControlFullscreenButtonElement::create):
2748         (WebCore::MediaControlFullscreenVolumeMinButtonElement::create):
2749         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::create):
2750         (WebCore::MediaControlTimeRemainingDisplayElement::create):
2751         (WebCore::MediaControlCurrentTimeDisplayElement::create):
2752         * html/shadow/MediaControlElements.h:
2753         * html/shadow/MediaControlsApple.h:
2754         (WebCore::MediaControlsAppleEventListener::create):
2755         * html/shadow/MeterShadowElement.h:
2756         (WebCore::MeterInnerElement::create):
2757         (WebCore::MeterBarElement::create):
2758         (WebCore::MeterValueElement::create):
2759         * html/shadow/ProgressShadowElement.h:
2760         (WebCore::ProgressInnerElement::create):
2761         (WebCore::ProgressBarElement::create):
2762         (WebCore::ProgressValueElement::create):
2763         * html/shadow/mac/ImageControlsRootElementMac.cpp:
2764         (WebCore::ImageControlsRootElement::maybeCreate):
2765         * html/track/TextTrackCueList.h:
2766         (WebCore::TextTrackCueList::create):
2767         * html/track/VTTCue.cpp:
2768         (WebCore::VTTCue::create):
2769         * html/track/VTTCue.h:
2770         (WebCore::VTTCue::create):
2771         * html/track/VTTRegion.h:
2772         * html/track/VideoTrack.h:
2773         * html/track/VideoTrackList.h:
2774         * html/track/WebVTTElement.cpp:
2775         (WebCore::WebVTTElement::create):
2776         * html/track/WebVTTElement.h:
2777         * html/track/WebVTTParser.h:
2778         * platform/graphics/MediaPlayer.h:
2779         (WebCore::MediaPlayerClient::mediaPlayerCreateResourceLoader):
2780
2781 2015-05-03  Simon Fraser  <simon.fraser@apple.com>
2782
2783         Make some static data const
2784         https://bugs.webkit.org/show_bug.cgi?id=144552
2785
2786         Reviewed by Andreas Kling.
2787
2788         Turn baseTable and shiftTable into const data.
2789
2790         * platform/graphics/FormatConverter.cpp:
2791
2792 2015-05-02  Simon Fraser  <simon.fraser@apple.com>
2793
2794         Assertion failure (!needsLayout()) loading inkedmag.com
2795         https://bugs.webkit.org/show_bug.cgi?id=144528
2796         rdar://problem/20788681
2797
2798         Reviewed by Darin Adler.
2799         
2800         When animated GIFs get into catch-up mode, which is common on inkedmag.com,
2801         BitmapImage::advanceAnimation() can synchronously call it's observer's
2802         animationAdvanced(). This could cause RenderImage::repaintOrMarkForLayout()
2803         to repaint or mark itself as needing layout in the middle of painting.
2804         If painting multiple tiles, this could occur when painting the first tile,
2805         and then painting the second tile would assert in RenderView::paint().
2806         
2807         It's always wrong to synchronously call the observer when advancing
2808         the animation, since this happens when painting, and you can't repaint
2809         when painting. The long comment and call to startAnimation(DoNotCatchUp)
2810         was required to explain and work around this, but it's simpler to just
2811         advance the animation on a zero-delay timer.
2812         
2813         Special handling is required for the case where internalAdvanceAnimation()
2814         is catching up, and reaches the end of a non-repeating image; there, we
2815         have to set a flag and do the notify on a zero-delay timer.
2816         
2817         Lots of comment cleanup.
2818
2819         Test: fast/images/set-needs-layout-in-painting.html
2820
2821         * platform/graphics/BitmapImage.cpp:
2822         (WebCore::BitmapImage::BitmapImage):
2823         (WebCore::BitmapImage::startTimer): Utility to create and start the timer.
2824         (WebCore::BitmapImage::repetitionCount):
2825         (WebCore::BitmapImage::startAnimation): Early return in the DoNotCatchUp clause.
2826         If skipping, and internalAdvanceAnimation() returns false (meaning it must have
2827         reached the end), then queue up a notify. Change the normal behavior to just
2828         start the timer.
2829         (WebCore::BitmapImage::stopAnimation):
2830         (WebCore::BitmapImage::internalAdvanceAnimation): Notify if the flag is set.
2831         * platform/graphics/BitmapImage.h:
2832         * rendering/RenderReplaced.cpp:
2833         (WebCore::RenderReplaced::paint): Add a SetLayoutNeededForbiddenScope to
2834         detect setNeedsLayouts when painting replaced elements, including images.
2835
2836 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2837
2838         [GTK][EFL] Unify platform display handling
2839         https://bugs.webkit.org/show_bug.cgi?id=144517
2840
2841         Reviewed by Martin Robinson.
2842
2843         There are several places were we are handling the X display
2844         connection:
2845
2846         - GLContext::sharedX11Display() creates a new connection.
2847         - X11Helper::nativeDisplay() creates a new connection.
2848         - BackingStoreBackendCairoX11 uses the GTK+ shared connection.
2849         - NetscapePlugin::x11HostDisplay() uses the GTK+/ecore shared connection
2850         - The rest of the GTK+ code uses the shared GTK+ connection
2851
2852         And then we also have WaylandDisplay and the code to check if the
2853         current display is wayland or X11.
2854         We could unify all these to share the same connection to reduce
2855         the amount of ifdefs and ensure a single connection. That will
2856         also allow us to use "smart pointers" for the X resources that
2857         need a Display* to be freed.
2858
2859         * PlatformEfl.cmake: Add new files to compilation.
2860         * PlatformGTK.cmake: Move some files to WebCore_SOURCES sinc ethey
2861         don't use GTK+ anymore, and add new files to compilation.
2862         * platform/graphics/GLContext.cpp:
2863         (WebCore::GLContext::cleanupActiveContextsAtExit): Remove the
2864         custom X11 connection.
2865         (WebCore::GLContext::createContextForWindow): Check if the shared
2866         display is Wayland to create a EGL context in such case.
2867         * platform/graphics/PlatformDisplay.cpp: Added.
2868         (WebCore::PlatformDisplay::createPlatformDisplay): Creates the
2869         shared display, using the GTK+/ecore shared connection.
2870         (WebCore::PlatformDisplay::sharedDisplay): Return the shared display.
2871         * platform/graphics/PlatformDisplay.h: Added.
2872         * platform/graphics/egl/GLContextEGL.cpp:
2873         (WebCore::sharedEGLDisplay): Use PlatformDisplay::sharedDisplay()
2874         to get the native display.
2875         (WebCore::GLContextEGL::createPixmapContext): Ditto.
2876         * platform/graphics/glx/GLContextGLX.cpp:
2877         (WebCore::GLContextGLX::createWindowContext): Ditto.
2878         (WebCore::GLContextGLX::createPbufferContext): Ditto.
2879         (WebCore::GLContextGLX::createPixmapContext): Ditto.
2880         (WebCore::GLContextGLX::createContext): Ditto.
2881         (WebCore::GLContextGLX::~GLContextGLX): Ditto.
2882         (WebCore::GLContextGLX::defaultFrameBufferSize): Ditto.
2883         (WebCore::GLContextGLX::makeContextCurrent): Ditto.
2884         (WebCore::GLContextGLX::swapBuffers): Ditto.
2885         (WebCore::GLContextGLX::cairoDevice): Ditto.
2886         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2887         (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext): Ditto.
2888         * platform/graphics/surfaces/glx/X11Helper.cpp:
2889         (WebCore::X11Helper::nativeDisplay): Ditto.
2890         * platform/graphics/wayland/PlatformDisplayWayland.cpp: Renamed from Source/WebCore/platform/graphics/wayland/WaylandDisplay.cpp.
2891         (WebCore::PlatformDisplayWayland::globalCallback):
2892         (WebCore::PlatformDisplayWayland::globalRemoveCallback):
2893         (WebCore::PlatformDisplayWayland::create): Renamed instance() as
2894         create() since the single instance is now handled by PlatformDisplay.
2895         (WebCore::PlatformDisplayWayland::PlatformDisplayWayland):
2896         (WebCore::PlatformDisplayWayland::createSurface):
2897         (WebCore::PlatformDisplayWayland::createSharingGLContext):
2898         * platform/graphics/wayland/PlatformDisplayWayland.h: Renamed from Source/WebCore/platform/graphics/wayland/WaylandDisplay.h.
2899         * platform/graphics/x11/PlatformDisplayX11.cpp: Added.
2900         (WebCore::PlatformDisplayX11::PlatformDisplayX11):
2901         (WebCore::PlatformDisplayX11::~PlatformDisplayX11):
2902         * platform/graphics/x11/PlatformDisplayX11.h: Added.
2903         * platform/gtk/GtkUtilities.cpp:
2904         (WebCore::getDisplaySystemType): Deleted.
2905         * platform/gtk/GtkUtilities.h:
2906
2907 2015-05-03  Carlos Garcia Campos  <cgarcia@igalia.com>
2908
2909         [GTK] API tests crashing on debug builds due to extra unref
2910         https://bugs.webkit.org/show_bug.cgi?id=144508
2911
2912         Reviewed by Mario Sanchez Prada.
2913
2914         The problem is that we were assuming that when a new DOMWindow is
2915         created, the DOM object cache was notified about the previous
2916         DOMWindow being destroyed before objects for the new DOMWindow are
2917         added to the cache. However, that's not always the case and we
2918         only create a DOMWindowObserver for the first DOMWindow. We need
2919         to keep a pointer to the DOMWindow being observed to clear() the
2920         cache and create a new DOMWindowObserver when it changes in the
2921         Frame.
2922
2923         Fixes crashes in several unit tests in debug builds.
2924
2925         * bindings/gobject/DOMObjectCache.cpp:
2926
2927 2015-05-03  Alexey Proskuryakov  <ap@apple.com>
2928
2929         Remove timer alignment logging that I added earler today.
2930
2931         * page/Settings.cpp: (WebCore::Settings::setDOMTimerAlignmentInterval):
2932
2933 2015-05-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2934
2935         Purge PassRefPtr create() factory functions in html 
2936         https://bugs.webkit.org/show_bug.cgi?id=144522
2937
2938         Reviewed by Darin Adler.
2939
2940         Return Ref instead of PassRefPtr in create() factory functions in html, because the factory
2941         can't return null. This patch is a first step to purge in html. Following patch is going to
2942         be uploaded.
2943
2944         No new tests, no behavior changes.
2945
2946         * html/FileInputType.cpp:
2947         (WebCore::UploadButtonElement::create):
2948         (WebCore::UploadButtonElement::createForMultiple):
2949         * html/MediaController.cpp:
2950         (MediaController::create):
2951         * html/MediaController.h:
2952         * html/canvas/WebGLBuffer.cpp:
2953         (WebCore::WebGLBuffer::create):
2954         * html/canvas/WebGLBuffer.h:
2955         * html/canvas/WebGLContextAttributes.cpp:
2956         (WebCore::WebGLContextAttributes::create):
2957         * html/canvas/WebGLContextAttributes.h:
2958         * html/canvas/WebGLContextGroup.cpp:
2959         (WebCore::WebGLContextGroup::create):
2960         * html/canvas/WebGLContextGroup.h:
2961         * html/canvas/WebGLFramebuffer.cpp:
2962         (WebCore::WebGLFramebuffer::create):
2963         * html/canvas/WebGLFramebuffer.h:
2964         * html/canvas/WebGLProgram.cpp:
2965         (WebCore::WebGLProgram::create):
2966         * html/canvas/WebGLProgram.h:
2967         * html/canvas/WebGLQuery.cpp:
2968         (WebCore::WebGLQuery::create):
2969         * html/canvas/WebGLQuery.h:
2970         * html/canvas/WebGLRenderbuffer.cpp:
2971         (WebCore::WebGLRenderbuffer::create):
2972         * html/canvas/WebGLRenderbuffer.h:
2973         * html/canvas/WebGLSampler.cpp:
2974         (WebCore::WebGLSampler::create):
2975         * html/canvas/WebGLSampler.h:
2976         * html/canvas/WebGLShader.cpp:
2977         (WebCore::WebGLShader::create):
2978         * html/canvas/WebGLShader.h:
2979         * html/canvas/WebGLShaderPrecisionFormat.cpp:
2980         (WebCore::WebGLShaderPrecisionFormat::create):
2981         * html/canvas/WebGLShaderPrecisionFormat.h:
2982         * html/canvas/WebGLSync.cpp:
2983         (WebCore::WebGLSync::create):
2984         * html/canvas/WebGLSync.h:
2985         * html/canvas/WebGLTexture.cpp:
2986         (WebCore::WebGLTexture::create):
2987         * html/canvas/WebGLTexture.h:
2988         * html/canvas/WebGLTransformFeedback.cpp:
2989         (WebCore::WebGLTransformFeedback::create):
2990         * html/canvas/WebGLTransformFeedback.h:
2991         * html/canvas/WebGLUniformLocation.cpp:
2992         (WebCore::WebGLUniformLocation::create):
2993         * html/canvas/WebGLUniformLocation.h:
2994         * html/canvas/WebGLVertexArrayObject.cpp:
2995         (WebCore::WebGLVertexArrayObject::create):
2996         * html/canvas/WebGLVertexArrayObject.h:
2997         * html/canvas/WebGLVertexArrayObjectOES.cpp:
2998         (WebCore::WebGLVertexArrayObjectOES::create):
2999         * html/canvas/WebGLVertexArrayObjectOES.h:
3000
3001 2015-05-02  Andreas Kling  <akling@apple.com>
3002
3003         Style recalc always causes detach from shared StyleRareNonInheritedData.
3004         <https://webkit.org/b/144530>
3005
3006         Reviewed by Darin Adler.
3007
3008         StyleResolver::adjustStyleForMaskImages() was always calling RenderStyle::ensureMaskLayers()
3009         when we were in style recalc. This caused the RenderStyle to COW off from the previously
3010         shared StyleRareNonInheritedData even if nothing actually changes.
3011
3012         This patch adds an early return to adjustStyleForMaskImages() when the previous style had
3013         no mask images. Further refinements could be made, but this covers the most common case where
3014         we don't have any mask images at all.
3015
3016         * css/StyleResolver.cpp:
3017         (WebCore::StyleResolver::adjustStyleForMaskImages):
3018
3019 2015-05-02  Alexey Proskuryakov  <ap@apple.com>
3020
3021         fast/frames/flattening/iframe-flattening-resize-event-count.html times out on Yosemite WK2
3022         https://bugs.webkit.org/show_bug.cgi?id=144155
3023
3024         Unreviewed, will roll out soon.
3025
3026         Added some temporary logging to better see if alignment is indeed the culprit.
3027
3028         * page/Settings.cpp: (WebCore::Settings::setDOMTimerAlignmentInterval):
3029
3030 2015-05-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3031
3032         Use Ref instead of PassRefPtr in WebCore/svg 
3033         https://bugs.webkit.org/show_bug.cgi?id=144479
3034
3035         Reviewed by Darin Adler.
3036
3037         Remove remained PassRefPtr in svg.
3038
3039         No new tests, no behavior changes.
3040
3041         * svg/SVGFontFaceSrcElement.cpp:
3042         (WebCore::SVGFontFaceSrcElement::srcValue):
3043         * svg/SVGFontFaceSrcElement.h:
3044         * svg/properties/SVGPropertyInfo.h:
3045
3046 2015-05-02  Simon Fraser  <simon.fraser@apple.com>
3047
3048         Small cleanup in BitmapImage
3049         https://bugs.webkit.org/show_bug.cgi?id=144515
3050
3051         Reviewed by Darin Adler.
3052
3053         Use an enum for the internalAdvanceAnimation() argument, with a default.
3054         
3055         Wrap the clearing of the timer in a clearTimer() function, called from
3056         stopAnimation(). This fixes the jarring reading of BitmapImage::internalAdvanceAnimation(),
3057         which used to start by calling stopAnimation().
3058
3059         * platform/graphics/BitmapImage.cpp:
3060         (WebCore::BitmapImage::clearTimer):
3061         (WebCore::BitmapImage::startAnimation):
3062         (WebCore::BitmapImage::stopAnimation):
3063         (WebCore::BitmapImage::advanceAnimation):
3064         (WebCore::BitmapImage::internalAdvanceAnimation):
3065         * platform/graphics/BitmapImage.h:
3066         * platform/graphics/Image.h:
3067
3068 2015-05-01  Simon Fraser  <simon.fraser@apple.com>
3069
3070         Avoid compositing updates after style recalcs which have no compositing implications
3071         https://bugs.webkit.org/show_bug.cgi?id=144502
3072
3073         Reviewed by Darin Adler.
3074         
3075         After r183461, we have reliable information about whether a style change with zero
3076         diff can be reliably ignored. Use that information to track whether a given
3077         recalcStyle() does anything which should force a compositing update.
3078         
3079         This eliminates up to 40% of the post-recalcStyle compositing updates on some pages.
3080         
3081         Add Internals API to test.
3082
3083         Test: compositing/updates/no-style-change-updates.html
3084
3085         * dom/Document.cpp:
3086         (WebCore::Document::recalcStyle): Tell the FrameView we're going to recalc style.
3087         * page/FrameView.cpp:
3088         (WebCore::FrameView::willRecalcStyle): Pass it on to the compositor.
3089         (WebCore::FrameView::updateCompositingLayersAfterStyleChange): Move the code
3090         that was here into RenderLayerCompositor::didRecalcStyleWithNoPendingLayout().
3091         * page/FrameView.h:
3092         * rendering/RenderLayerCompositor.cpp:
3093         (WebCore::RenderLayerCompositor::willRecalcStyle): Reset the m_layerNeedsCompositingUpdate flag.
3094         (WebCore::RenderLayerCompositor::didRecalcStyleWithNoPendingLayout): Bail on the update if
3095         no layers changed.
3096         (WebCore::RenderLayerCompositor::updateCompositingLayers): Logging. Increment m_compositingUpdateCount,
3097         which is used for testing.
3098         (WebCore::RenderLayerCompositor::layerStyleChanged): Set the m_layerNeedsCompositingUpdate flag.
3099         (WebCore::RenderLayerCompositor::startTrackingCompositingUpdates): Reset the counter.
3100         (WebCore::RenderLayerCompositor::compositingUpdateCount):
3101         * rendering/RenderLayerCompositor.h:
3102         * testing/Internals.cpp:
3103         (WebCore::Internals::startTrackingCompositingUpdates):
3104         (WebCore::Internals::compositingUpdateCount):
3105         * testing/Internals.h:
3106         * testing/Internals.idl:
3107
3108 2015-05-01  Andreas Kling  <akling@apple.com>
3109
3110         Reproducible crash removing name attribute from <img> node
3111         <https://webkit.org/b/144371>
3112         <rdar://problem/17198583>
3113
3114         Reviewed by Darin Adler.
3115
3116         The problem here was with HTMLImageElement::getNameAttribute(), which relies
3117         on Element::hasName() to avoid slow attribute lookups when the attribute
3118         is already known not to be present. Unfortunately hasName() uses an ElementData
3119         flag that wasn't getting updated until after the call to parseAttribute().
3120
3121         This patch fixes the issue by moving the code that updates the hasName() flag
3122         before the parseAttribute() virtual dispatch.
3123
3124         Test: fast/dom/HTMLImageElement/remove-name-id-attribute-from-image.html
3125
3126         * dom/Element.cpp:
3127         (WebCore::Element::attributeChanged):
3128
3129 2015-05-01  Eric Carlson  <eric.carlson@apple.com>
3130
3131         Postpone caption style sheet creation
3132         https://bugs.webkit.org/show_bug.cgi?id=144499
3133
3134         Reviewed by Simon Fraser.
3135         
3136         Generating and inserting the caption user style sheet is expensive so don't do it until
3137         we see a text track, and only do it for the first video element in a PageGroup.
3138
3139         Test: media/track/track-user-stylesheet.html
3140
3141         * html/HTMLMediaElement.cpp:
3142         (WebCore::HTMLMediaElement::registerWithDocument): Only register for caption preferences
3143         changes if we have done so before.
3144         (WebCore::HTMLMediaElement::unregisterWithDocument): Only unregister for caption preferences
3145         changes if we registered for them.
3146         (WebCore::HTMLMediaElement::addTextTrack): Register for caption preference changes.
3147         * html/HTMLMediaElement.h:
3148
3149         * page/CaptionUserPreferencesMediaAF.cpp:
3150         (WebCore::CaptionUserPreferencesMediaAF::setInterestedInCaptionPreferenceChanges): Only
3151         generate the style sheet when called for the first time.
3152
3153 2015-05-01  Dean Jackson  <dino@apple.com>
3154
3155         [iOS] Scrubber display is broken if the buffered range is empty
3156         https://bugs.webkit.org/show_bug.cgi?id=144511
3157
3158         Reviewed by Eric Carlson.
3159
3160         Make sure that if video.buffered returns an empty list, we
3161         still draw the scrubber background correctly.
3162
3163         * Modules/mediacontrols/mediaControlsiOS.js:
3164         (ControllerIOS.prototype.drawTimelineBackground): Ensure that buffered
3165         is always at least as big as the current time.
3166
3167 2015-05-01  Roger Fong  <roger_fong@apple.com>
3168
3169         Media control volume slider should be vertical to avoid flickering issues.
3170         https://bugs.webkit.org/show_bug.cgi?id=144496.
3171         <rdar://problem/20451328>
3172
3173         Reviewed by Darin Adler.
3174
3175         * Modules/mediacontrols/mediaControlsApple.css:
3176         Resize and reposition the volume box so that it does not have to rotated via a transform.
3177         (audio::-webkit-media-controls-panel):
3178         (audio::-webkit-media-controls-panel .volume-box): Also set overflow: hidden so we can't interact
3179              with the volume slider while the volume box is hidden.
3180         (audio::-webkit-media-controls-panel .volume-box:active):
3181         Rotate and position the volume slider via transforms. Make sure it's not transformed in the fullscreen controls.
3182         (video::-webkit-media-controls-volume-slider):
3183         (video:-webkit-full-screen::-webkit-media-controls-volume-slider):
3184
3185 2015-05-01  Brent Fulgham  <bfulgham@apple.com>
3186
3187         Expand test infrastructure to support scrolling tests (Part 4): Scroll Snap Support
3188         https://bugs.webkit.org/show_bug.cgi?id=144482
3189
3190         Reviewed by Simon Fraser.
3191
3192         New tests will be landed in a second patch.
3193
3194         The new WheelEventTestTriggers do not work properly with scroll snap points, because some test deferral notifications
3195         need to be triggered for state changes on the scrolling thread. This required the following changes:
3196         1. A flag indicating that we want to know about WheelEvent state changes needed to be propagated to the scrolling thread,
3197            so that tests could be deferred until Scrolling thread rubberband or scroll-snap animations had completed.
3198         2. The ScrollingNodeID needed to be used for registering and clearing deferrals.
3199         3. The scrolling thread needed a way to dispatch messages to the main thread indicating that we should (or should not)
3200            defer tests due to scrolling actions.
3201
3202         Note that a future patch will extend this support to include the RemoteScrollingTree.
3203
3204         * page/WheelEventTestTrigger.cpp:
3205         (WebCore::WheelEventTestTrigger::deferTestsForReason): Added some logging features.
3206         (WebCore::WheelEventTestTrigger::removeTestDeferralForReason): Ditto.
3207         (WebCore::dumpState): Helper function for logging test deferral state.
3208         (WebCore::WheelEventTestTrigger::triggerTestTimerFired): Added some logging features.
3209         * page/scrolling/AsyncScrollingCoordinator.cpp:
3210         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated): Make sure that the scrolling thread is
3211         told that it needs to send scrolling state back to the main thread. Only do this if we are in testing mode.
3212         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll): The scrollingNodeID should be
3213         used as the identifier for this operation, not the page address.
3214         (WebCore::AsyncScrollingCoordinator::deferTestsForReason): Added. receives messages from the scrolling thread
3215         and notifies the testing infrastructure.
3216         (WebCore::AsyncScrollingCoordinator::removeTestDeferralForReason): Ditto.
3217         * page/scrolling/AsyncScrollingCoordinator.h:
3218         * page/scrolling/ScrollingStateScrollingNode.cpp:
3219         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode): When cloning the ScrollingStateScrollingNode,
3220         include the testing mode state.
3221         (WebCore::ScrollingStateScrollingNode::setExpectsWheelEventTestTrigger): Added.
3222         * page/scrolling/ScrollingStateScrollingNode.h:
3223         (WebCore::ScrollingStateScrollingNode::expectsWheelEventTestTrigger): Added.
3224         * page/scrolling/ScrollingTree.h:
3225         (WebCore::ScrollingTree::deferTestsForReason): Added stub.
3226         (WebCore::ScrollingTree::removeTestDeferralForReason): Ditto.
3227         * page/scrolling/ThreadedScrollingTree.cpp:
3228         (WebCore::ThreadedScrollingTree::deferTestsForReason): Added. Dispatches messages from the scrolling thread to the
3229         main thread.
3230         (WebCore::ThreadedScrollingTree::removeTestDeferralForReason): Ditto.
3231         * page/scrolling/ThreadedScrollingTree.h:
3232         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3233         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3234         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac): Initialize testing state flag.
3235         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): If the 'ExpectsWheelEventTestTrigger' flag is
3236         set, update local state.
3237         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent): If we are testing, and the wheel event should be handled
3238         asynchronously, tell the testing infrastructure we need to wait for the thread state to sync.
3239         (WebCore::ScrollingTreeFrameScrollingNodeMac::deferTestsForReason): Added. Notifies test system we need to defer tests
3240         until we notify them. Also used by the ScrollController during animations.
3241         (WebCore::ScrollingTreeFrameScrollingNodeMac::removeTestDeferralForReason): Ditto.
3242         * platform/Logging.h:
3243         * platform/ScrollAnimator.cpp:
3244         (WebCore::ScrollAnimator::deferTestsForReason): Added. Used by ScrollController during animation. This updates the
3245         testing infrastructure directly, since it is running in the same process and main thread.
3246         (WebCore::ScrollAnimator::removeTestDeferralForReason): Ditto.
3247         * platform/ScrollAnimator.h:
3248         * platform/cocoa/ScrollController.h:
3249         (WebCore::ScrollControllerClient::deferTestsForReason): Change client API.
3250         (WebCore::ScrollControllerClient::removeTestDeferralForReason): Ditto.
3251         (WebCore::ScrollControllerClient::testTrigger): Deleted.
3252         * platform/cocoa/ScrollController.mm:
3253         (WebCore::ScrollController::startSnapRubberbandTimer): Use new client API.
3254         (WebCore::ScrollController::stopSnapRubberbandTimer): Ditto.
3255         (WebCore::ScrollController::startScrollSnapTimer): Ditto.
3256         (WebCore::ScrollController::stopScrollSnapTimer): Ditto.
3257
3258 2015-05-01  Joseph Pecoraro  <pecoraro@apple.com>
3259
3260         Inline some small methods instead of them being EXPORT'd and out of line
3261         https://bugs.webkit.org/show_bug.cgi?id=144498
3262
3263         Reviewed by Darin Adler.
3264
3265         * page/Page.cpp:
3266         (WebCore::Page::testTrigger): Deleted.
3267         (WebCore::Page::clearTrigger): Deleted.
3268         (WebCore::Page::expectsWheelEventTriggers): Deleted.
3269         * page/Page.h:
3270         (WebCore::Page::testTrigger):
3271         (WebCore::Page::clearTrigger):
3272         (WebCore::Page::expectsWheelEventTriggers):
3273
3274 2015-05-01  Dan Bernstein  <mitz@apple.com>
3275
3276         WebCore part of <rdar://problem/8636045> Back/forward navigation to an error page in Safari breaks the back-forward list
3277         https://bugs.webkit.org/show_bug.cgi?id=144501
3278
3279         Reviewed by Darin Adler.
3280
3281         Test: TestWebKitAPI/Tests/WebKit2Cocoa/LoadAlternateHTMLString.mm
3282
3283         Normally, loading substitute data (such as an error page) creates a new back-forward list
3284         item. FrameLoader has a mechanism that detects when a substitute data load occurs during
3285         handling of a provisional load error and prevents the creation of a new back-forwards list
3286         item in that case if the unreachable URL is the same as the failing provisional URL. This
3287         mechanism was broken in WebKit2, where handling the provisional load error is asynchronous.
3288
3289         The fix is to capture some state (namely, the failing provisional URL) when dispatching the
3290         load error and allow it to be restored when loading the substitute data.
3291
3292         * loader/FrameLoader.cpp:
3293         (WebCore::FrameLoader::FrameLoader): Removed initialization of
3294         m_delegateIsHandlingProvisionalLoadError.
3295         (WebCore::FrameLoader::shouldReloadToHandleUnreachableURL): Instead of checking
3296         m_delegateIsHandlingProvisionalLoadError and if true using the provisional document loader’s
3297         URL, check m_provisionalLoadErrorBeingHandledURL.
3298         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Instead of checking and setting
3299         m_delegateIsHandlingProvisionalLoadError, use m_provisionalLoadErrorBeingHandledURL.
3300         * loader/FrameLoader.h:
3301         (WebCore::FrameLoader::provisionalLoadErrorBeingHandledURL): Added this getter. The client
3302         can call this from its override of dispatchDidFailProvisionalLoad and store the result.
3303         (WebCore::FrameLoader::setProvisionalLoadErrorBeingHandledURL): Added this setter. The
3304         client can call this prior to loading substitute data if it’s done as part of handling a
3305         previously-dispatched didFailProvisionalLoad.
3306
3307 2015-05-01  Martin Robinson  <mrobinson@igalia.com>
3308
3309         USE(...) macro should expect unprefixed variables
3310         https://bugs.webkit.org/show_bug.cgi?id=144454
3311
3312         Reviewed by Daniel Bates.
3313
3314         * DerivedSources.make: Replace all occurrences WTF_USE with USE.
3315         * PlatformEfl.cmake: Ditto.
3316         * PlatformGTK.cmake: Ditto.
3317         * bindings/objc/PublicDOMInterfaces.h: Ditto.
3318         * config.h: Ditto.
3319         * crypto/mac/SerializedCryptoKeyWrapMac.mm: Ditto.
3320         * page/AlternativeTextClient.h: Ditto.
3321         * platform/efl/FileSystemEfl.cpp: Ditto.
3322         (WebCore::fileSystemRepresentation): Ditto.
3323         * platform/graphics/cg/ImageBufferDataCG.h: Ditto.
3324         * platform/graphics/cg/PDFDocumentImage.h: Ditto.
3325         * platform/ios/wak/WAKAppKitStubs.h: Ditto.
3326         * rendering/RenderLayerCompositor.cpp: Ditto.
3327
3328 2015-05-01  Myles C. Maxfield  <mmaxfield@apple.com>
3329
3330         [OS X] Text dilation parameters are not restored after being set
3331         https://bugs.webkit.org/show_bug.cgi?id=144507
3332         <rdar://problem/19446938>
3333
3334         Reviewed by Simon Fraser and Ned Holbrook.
3335
3336         Create a RAII class who is in charge of saving, applying, and restoring dilation parameters. Use this class
3337         around our text drawing routines.
3338
3339         Note that this migrates our use of CTFontSetRenderingParameters() to CTFontSetRenderingStyle().
3340
3341         Test: fast/text/dilation-save-restore.html
3342
3343         * platform/graphics/cocoa/FontCascadeCocoa.mm:
3344         (WebCore::RenderingStyleSaver::RenderingStyleSaver):
3345         (WebCore::RenderingStyleSaver::~RenderingStyleSaver):
3346         (WebCore::showGlyphsWithAdvances):
3347         * platform/spi/cg/CoreGraphicsSPI.h:
3348         * platform/spi/cocoa/CoreTextSPI.h:
3349
3350 2015-05-01  Commit Queue  <commit-queue@webkit.org>
3351
3352         Unreviewed, rolling out r183687.
3353         https://bugs.webkit.org/show_bug.cgi?id=144505
3354
3355         Appears to have caused assertions (Requested by ap on
3356         #webkit).
3357
3358         Reverted changeset:
3359
3360         "Media control volume slider is opaque."
3361         https://bugs.webkit.org/show_bug.cgi?id=144470
3362         http://trac.webkit.org/changeset/183687
3363
3364 2015-05-01  Jeremy Jones  <jeremyj@apple.com>
3365
3366         Stop using deprecated AVKit SPI for enter and exit fullscreen.
3367         https://bugs.webkit.org/show_bug.cgi?id=144493
3368
3369         Reviewed by Jer Noble.
3370
3371         Replace 
3372             -enterFullScreenWithCompletionHandler:
3373             -exitFullScreenWithCompletionHandler:
3374         with
3375             -enterFullScreenAnimated:completionHandler:
3376             -exitFullScreenAnimated:completionHandler:
3377         
3378         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3379         (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard):
3380         (WebVideoFullscreenInterfaceAVKit::exitFullscreenInternal):
3381         * platform/spi/cocoa/AVKitSPI.h:
3382
3383 2015-05-01  Roger Fong  <roger_fong@apple.com>
3384
3385         Media control volume slider is opaque.
3386         https://bugs.webkit.org/show_bug.cgi?id=144470.
3387         <rdar://problem/20770350>
3388
3389         Rubberstamped by Simon Fraser.
3390
3391         * Modules/mediacontrols/mediaControlsApple.css:
3392         (audio::-webkit-media-controls-panel): 
3393         Don't create a stacking context just for the controls.
3394         Doing so causes the mix-blend-mode on the volume box to fail.
3395
3396 2015-05-01  Joanmarie Diggs  <jdiggs@igalia.com>
3397
3398         [GTK] REGRESSION(183368): It made editing tests assert
3399         https://bugs.webkit.org/show_bug.cgi?id=144447
3400
3401         Reviewed by Chris Fleizach.
3402
3403         Don't notify platforms of editing actions of type EditActionUnspecified.
3404         If we don't know what the action is, platform accessibility APIs certainly
3405         won't.
3406
3407         Add AXTextEditTypeAttributesChange and AXTextAttributesChanged as catch-alls
3408         for formatting changes. ATK lacks finely-grained signals through which to
3409         specify which text attributes have changed. If other platforms have such
3410         signals, new types can always be added.
3411
3412         Don't post an accessible replacement notification for AXTextEditTypeCut.
3413         The notification is handled by DeleteSelectionCommand. It is possible for
3414         white space to be inserted in preparation for a cut which was triggering
3415         a not-reached assert, but insertion of whitespace in preparation for a
3416         cut does not seem notification-worthy.
3417
3418         Treat AXTextEditTypeDictation the same as other insertion types (insert,
3419         pas