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