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