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