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