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