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