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