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