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