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