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