[CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-30  Javier Fernandez  <jfernandez@igalia.com>
2
3         [CSS Grid Layout] Upgrade align-self and align-items parsing to CSS 3
4         https://bugs.webkit.org/show_bug.cgi?id=133359
5
6         Reviewed by David Hyatt.
7
8         From Blink r164817 and r165264 by <jchaffraix@chromium.org>
9
10         Broaden justify-self's parsing name
11
12         This is in preparation of migrating align-self, align-items
13         and justify-items to the CSS 3 Alignment syntax.
14
15         The current naming was too tied to justify-self and needs to
16         be broadened. This will reduce the follow-up implementations'
17         patches.
18
19         Upgrade align-self and align-items parsing to CSS 3
20
21         This change migrates the 2 properties to the CSS 3 Alignment
22         parsing. The new parsing is identical to how we parse
23         'justify-self'. The 2 properties need to be migrated together
24         as they are used in tandem in CSSComputedStyleDeclaration.
25
26         This change also removes EAlignItems as it is now unused.
27
28         Tests: css3/parse-align-items.html
29                css3/parse-align-self.html
30
31         * css/CSSComputedStyleDeclaration.cpp:
32         (WebCore::resolveAlignmentAuto): Added. Resolves the "auto" value for the alignment properties.
33         (WebCore::valueForItemPositionWithOverflowAlignment): Added. Builds the CSSValue for the for the alignment properties.
34         (WebCore::ComputedStyleExtractor::propertyValue):
35         * css/CSSParser.cpp:
36          (WebCore::isValidKeywordPropertyAndValue): Removed align-self, align-items and justify-items.
37         (WebCore::isKeywordPropertyID): Removed align-self, align-items and justify-items.
38         (WebCore::isBaselinePositionKeyword): Added. Set of keywords related to baseline value.
39         (WebCore::CSSParser::parseItemPositionOverflowPosition): Generic parsing fuction for the alignment properties.
40         (WebCore::CSSParser::parseJustifySelf): Deleted.
41         (WebCore::CSSParser::parseValue): Added align-items and align-self to the list and call to the generic parsing fuction for the alignment properties.
42         * css/CSSParser.h:
43         * css/CSSPrimitiveValueMappings.h:
44         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Added.
45         (WebCore::CSSPrimitiveValue::operator ItemPosition): Added. Replace the old EAlignItems enumeration.
46         (WebCore::CSSPrimitiveValue::operator OverflowAlignment): Added.
47         (WebCore::CSSPrimitiveValue::operator EAlignItems): Deleted.
48         (WebCore::CSSPrimitiveValue::operator EJustifySelf): Deleted.
49         (WebCore::CSSPrimitiveValue::operator EJustifySelfOverflowAlignment): Deleted.
50         * css/CSSPropertyNames.in:
51         * css/CSSValueKeywords.in:
52         * css/StyleBuilderCustom.h:
53         (WebCore::StyleBuilderCustom::applyInheritAlignSelf): Added.
54         (WebCore::StyleBuilderCustom::applyInitialAlignSelf): Added.
55         (WebCore::StyleBuilderCustom::applyValueAlignSelf): Added.
56         (WebCore::StyleBuilderCustom::applyInheritAlignItems): Added.
57         (WebCore::StyleBuilderCustom::applyInitialAlignItems): Added.
58         (WebCore::StyleBuilderCustom::applyValueAlignItems): Added.
59         (WebCore::StyleBuilderCustom::applyInheritJustifySelf): Added.
60         (WebCore::StyleBuilderCustom::applyInitialJustifySelf): Added.
61         (WebCore::StyleBuilderCustom::applyValueJustifySelf): Added.
62         (WebCore::StyleBuilderCustom::applyValueWebkitJustifySelf): Deleted.
63         * css/StyleResolver.cpp:
64         (WebCore::StyleResolver::adjustRenderStyle): isDisplayFlexibleOrGridBox now a RenderStyle function.
65         (WebCore::isDisplayFlexibleBox): Deleted. Moved to RenderStyle.
66         (WebCore::isDisplayGridBox): Deleted. Moved to RenderStyle.
67         (WebCore::isDisplayFlexibleOrGridBox): Deleted. Moved to RenderStyle.
68         * rendering/RenderBox.cpp:
69         (WebCore::flexItemHasStretchAlignment): Adapted to the new ItemPostition enum.
70         * rendering/RenderFlexibleBox.cpp:
71         (WebCore::RenderFlexibleBox::firstLineBaseline): Adapted to the new ItemPostition enum.
72         (WebCore::RenderFlexibleBox::styleDidChange): Adapted to the new ItemPostition enum.
73         (WebCore::RenderFlexibleBox::alignmentForChild): Adapted to the new ItemPostition enum.
74         (WebCore::RenderFlexibleBox::needToStretchChild): Adapted to the new ItemPostition enum.
75         (WebCore::RenderFlexibleBox::layoutAndPlaceChildren): Adapted to the new ItemPostition enum.
76         (WebCore::RenderFlexibleBox::alignChildren): Adapted to the new ItemPostition enum.
77         (WebCore::resolveAlignment): Deleted. Moved to RenderStyle.
78         * rendering/RenderFlexibleBox.h:
79         * rendering/RenderFullScreen.cpp:
80         (WebCore::createFullScreenStyle): Adapted to the new ItemPostition enum.
81         * rendering/RenderMenuList.cpp:
82         (WebCore::RenderMenuList::adjustInnerStyle): Adapted to the new ItemPostition enum.
83         * rendering/mathml/RenderMathMLRoot.cpp:
84         (WebCore::RenderMathMLRoot::updateStyle): Adapted to the new ItemPostition enum.
85         * rendering/mathml/RenderMathMLScripts.cpp:
86         (WebCore::RenderMathMLScripts::fixAnonymousStyleForSubSupPair): Adapted to the new ItemPostition enum.
87         (WebCore::RenderMathMLScripts::fixAnonymousStyles): Adapted to the new ItemPostition enum.
88         * rendering/style/ContentData.h:
89         * rendering/style/RenderStyle.cpp:
90         (WebCore::RenderStyle::resolveAlignment): Added.
91         * rendering/style/RenderStyle.h: Adapted to the new ItemPostition enum.
92         * rendering/style/RenderStyleConstants.h: Adapted to the new ItemPostition enum.
93         * rendering/style/StyleRareNonInheritedData.cpp: Adapted to the new ItemPostition enum.
94         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData): Adapted to the new ItemPostition enum.
95         (WebCore::StyleRareNonInheritedData::operator==): Adapted to the new ItemPostition enum.
96         * rendering/style/StyleRareNonInheritedData.h: Adapted to the new ItemPostition enum.
97         * style/StyleResolveTree.cpp:
98         (WebCore::Style::determineChange): Changes in the alignItems property cause a Detach.
99
100 2015-03-27  David Hyatt  <hyatt@apple.com>
101
102         [New Block-Inside-Inline Model] Create anonymous inline blocks to hold blocks-inside-inlines.
103         https://bugs.webkit.org/show_bug.cgi?id=143145
104
105         Reviewed by Dean Jackson.
106
107         Added fast/block/inside-inlines/ tests.
108
109         * rendering/RenderBlock.cpp:
110         (WebCore::RenderBlock::renderName):
111         Add support for labeling anonymous inline-blocks when dumped by the render tree.
112
113         * rendering/RenderInline.cpp:
114         (WebCore::RenderInline::addChildIgnoringContinuation):
115         When the pref is set to use the new block-inside-inline model, create an anonymous inline block to
116         hold block children of RenderInlines instead of splitting flows or creating continuations.
117
118         * rendering/RenderObject.h:
119         (WebCore::RenderObject::isAnonymousInlineBlock):
120         Add the definition of isAnonymousInlineBlock (note the exclusion of Ruby, since Ruby creates anonymous
121         inline-blocks also).
122
123 2015-03-30  Chris Dumez  <cdumez@apple.com>
124
125         [WK2][NetworkCache] Add support for "Cache-Control: max-stale" request header
126         https://bugs.webkit.org/show_bug.cgi?id=143159
127         <rdar://problem/20333296>
128
129         Reviewed by Antti Koivisto.
130
131         Add support for "Cache-Control: max-stale" request header:
132         https://tools.ietf.org/html/rfc7234#section-5.2.1.2
133
134         Test: http/tests/cache/disk-cache/disk-cache-request-max-stale.html
135
136         * platform/network/CacheValidation.cpp:
137         (WebCore::parseCacheControlDirectives):
138         * platform/network/CacheValidation.h:
139
140 2015-03-30  Simon Fraser  <simon.fraser@apple.com>
141
142         Fix iOS internal build after r182132.
143
144         * page/scrolling/ScrollingCoordinator.cpp:
145         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
146
147 2015-03-30  Jer Noble  <jer.noble@apple.com>
148
149         [iOS] When Web Audio is interrupted by a phone call, it cannot be restarted.
150         https://bugs.webkit.org/show_bug.cgi?id=143190
151
152         Reviewed by Darin Adler.
153
154         Tests: webaudio/audiocontext-state-interrupted.html
155                webaudio/audiocontext-state.html
156
157         Implement the following methods and properties from the Web Audio spec:
158         close(), suspend(), resume(), onstatechange.
159
160         AudioContext will take more responsibility for tracking state and interruptions (and
161         AudioDestination will give up that responsibility). This means AudioContext must be a
162         MediaSessionClient, and own its own MediaSession. In return, AudioDestinationIOS and 
163         AudioDestinationMac relinquish both.
164
165         * Modules/webaudio/AudioContext.cpp:
166         (WebCore::AudioContext::AudioContext): Set default values in header.
167         (WebCore::AudioContext::uninitialize): Call setState() instead of setting m_state.
168         (WebCore::AudioContext::addReaction): Added. Append the callback to the appropriate vector for the state.
169         (WebCore::AudioContext::setState): Added. Fire events and resolve the appropriate reaction callbacks for the new state.
170         (WebCore::AudioContext::state): Return a string representing the context's state.
171         (WebCore::AudioContext::stop): Close the event queue.
172         (WebCore::AudioContext::startRendering): Call setState().
173         (WebCore::AudioContext::fireCompletionEvent): Call setState().
174         (WebCore::AudioContext::suspendContext): Added. Add reaction callback and call suspend() on the destination node.
175         (WebCore::AudioContext::resumeContext): Added. Add reaction callback and call resume() on the destination node.
176         (WebCore::AudioContext::closeContext): Added. Add reaction callback and call close() on the destination node.
177         (WebCore::AudioContext::suspendPlayback): Added. Suspend playback and set state to interrupted.
178         (WebCore::AudioContext::mayResumePlayback): Added. Conditionally resume playback.
179         * bindings/js/JSAudioContextCustom.cpp:
180         (WebCore::JSAudioContext::suspend): Added. Create and return a new Promise object.
181         (WebCore::JSAudioContext::resume): Ditto.
182         (WebCore::JSAudioContext::close): Ditto.
183         * Modules/webaudio/AudioContext.idl: Add new methods and properties.
184
185         Extensive organizational changes were made to AudioContext.h to group instance
186         variables together and add C++11 initializers in their declarations:
187
188         * Modules/webaudio/AudioContext.h:
189         (WebCore::AudioContext::mediaType): Moved from AudioDestinationNode.
190         (WebCore::AudioContext::presentationType): Ditto.
191         (WebCore::AudioContext::canReceiveRemoteControlCommands): Ditto.
192         (WebCore::AudioContext::didReceiveRemoteControlCommand): Ditto.
193         (WebCore::AudioContext::overrideBackgroundPlaybackRestriction): Ditto.
194         
195         Other changes to support the new AudioContext methods:
196
197         * Modules/webaudio/AudioDestinationNode.h:
198         (WebCore::AudioDestinationNode::resume): Add empty default virtual method.
199         (WebCore::AudioDestinationNode::suspend): Ditto.
200         (WebCore::AudioDestinationNode::close): Ditto.
201         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
202         (WebCore::DefaultAudioDestinationNode::resume): Added. Pass to AudioDestination.
203         (WebCore::DefaultAudioDestinationNode::suspend): Ditto.
204         (WebCore::DefaultAudioDestinationNode::close): Ditto.
205         * Modules/webaudio/DefaultAudioDestinationNode.h:
206         * bindings/js/JSDOMPromise.h:
207         (WebCore::DeferredWrapper::resolve): Add an overload for a nullptr resolve value.
208         * dom/EventNames.h: Added 'statechange'.
209         * dom/ScriptExecutionContext.h:
210         (WebCore::ScriptExecutionContext::Task::Task): Add a constructor which takes a void() callback.
211
212         Modify MediaSession, AudioSession, and MediaSessionManager to support the new
213         interruption behavior.
214
215         * html/HTMLMediaElement.cpp:
216         (WebCore::HTMLMediaElement::suspendPlayback): Renamed from pausePlayback().
217         (WebCore::HTMLMediaElement::mayResumePlayback): Renamed from resumePlayback().
218         * html/HTMLMediaElement.h:
219         * platform/audio/AudioSession.cpp:
220         (WebCore::AudioSession::tryToSetActive): Renamed from setActive. Return true by default.
221         (WebCore::AudioSession::setActive): Deleted.
222         * platform/audio/AudioSession.h:
223         * platform/audio/MediaSession.cpp:
224         (WebCore::MediaSession::beginInterruption): pausePlayback() was renamed to suspendPlayback().
225         (WebCore::MediaSession::endInterruption): Always notify the client, telling it whether to resume.
226         (WebCore::MediaSession::clientWillBeginPlayback): Bail early if reentrant.  Check the (new) 
227             return value of sessionWillBeginPlayback() and remember to resume once the interruption ends.
228         (WebCore::MediaSession::clientWillPausePlayback): Bail early if reentrant.
229         (WebCore::MediaSession::pauseSession): pausePlayback() was renamed to suspendPlayback().
230         * platform/audio/MediaSession.h:
231         * platform/audio/MediaSessionManager.cpp:
232         (WebCore::MediaSessionManager::sessionWillBeginPlayback): Return false if not allowed to break interruption or 
233             if activating the audio session failed. Otherwise, end the interruption.
234         * platform/audio/MediaSessionManager.h:
235         * platform/audio/ios/AudioDestinationIOS.cpp:
236         (WebCore::AudioDestinationIOS::AudioDestinationIOS): m_mediaSession was removed.
237         (WebCore::AudioDestinationIOS::start): Ditto.
238         * platform/audio/ios/AudioDestinationIOS.h:
239         * platform/audio/ios/AudioSessionIOS.mm:
240         (WebCore::AudioSession::tryToSetActive): Renamed from setActive. Return false if the AVAudioSession could not be activated.
241         (WebCore::AudioSession::setActive): Deleted.
242         * platform/audio/ios/MediaSessionManagerIOS.h:
243         * platform/audio/ios/MediaSessionManagerIOS.mm:
244         (WebCore::MediaSessionManageriOS::sessionWillBeginPlayback): Do not update the now playing info if session playback was blocked.
245         * platform/audio/mac/AudioDestinationMac.cpp:
246         (WebCore::AudioDestinationMac::AudioDestinationMac): m_mediaSession was removed.
247         * platform/audio/mac/AudioDestinationMac.h:
248         * platform/audio/mac/AudioSessionMac.cpp:
249         (WebCore::AudioSession::tryToSetActive): Renamed from setActive(). Return true by default.
250         (WebCore::AudioSession::setActive): Deleted.
251         * platform/audio/mac/MediaSessionManagerMac.cpp:
252         (MediaSessionManager::updateSessionState): No longer attempt to activate the session, as this is done
253             MediaSessionManager::sessionWillBeginPlayback().
254         * testing/Internals.cpp:
255         (WebCore::Internals::setMediaSessionRestrictions): Add "InterruptedPlaybackNotPermitted".
256
257 2015-03-25 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr>
258
259         [Streams API] Error storage should be moved from source to stream/reader
260         https://bugs.webkit.org/show_bug.cgi?id=143048
261
262         Reviewed by Benjamin Poulain.
263
264         This patch removes error storage from the source as it should be stored at the stream level as error access goes through the reader.
265         It removes abstract ReadableStreamSource::isErrored and the storage of JavaScript errors from ReadableStreamJSSource.
266
267         Existing tests cover most of the changes.
268         Added test case for creating readable stream from empty JS object.
269
270         * Modules/streams/ReadableStreamSource.h: Removing isErrored().
271         * bindings/js/JSReadableStreamCustom.cpp:
272         (WebCore::constructJSReadableStream): Added JS stream constructor parameters checking.
273         * bindings/js/ReadableStreamJSSource.cpp:
274         (WebCore::ReadableStreamJSSource::ReadableStreamJSSource): Removed JS stream constructor parameters checking.
275         (WebCore::ReadableStreamJSSource::start): Changed prototype of start so that start can throw errors directly.
276         (WebCore::ReadableStreamJSSource::setInternalError): Deleted.
277         * bindings/js/ReadableStreamJSSource.h: Removed m_error, setInternalError and updated start declaration.
278
279 2015-03-30  Philippe Normand  <pnormand@igalia.com>
280
281         [GStreamer] More GL shared context fixes
282         https://bugs.webkit.org/show_bug.cgi?id=143216
283
284         Reviewed by Carlos Garcia Campos.
285
286         Moved the GLX/EGL context tests to be done at runtime rather than
287         using build-time macros because in the GTK port at least, both EGL
288         and GLX support are mutually exclusive. Also fixed a couple wrong
289         defines (USE(GLES2) doesn't exist).
290
291         * platform/graphics/GLContext.h: Simple utility method to check if
292         the platform context is compatible with EGL APIs or not.
293         * platform/graphics/egl/GLContextEGL.h:
294         (WebCore::GLContextEGL::isEGLContext):
295         * platform/graphics/glx/GLContextGLX.h:
296         (WebCore::GLContextGLX::isEGLContext):
297         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
298         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): Do
299         runtime checks and properly ensure GLES2/GL API usage.
300
301 2015-03-30  Marcos Chavarría Teijeiro  <chavarria1991@gmail.com>
302
303         Add support for deleting emoji on GTK
304         https://bugs.webkit.org/show_bug.cgi?id=141419
305
306         Reviewed by Gustavo Noronha Silva.
307
308         The code for deleting special group of characters was specific for
309         COCOA and EFL platforms. The fix consists on add GTK to the #if
310         preprocessor directive.
311
312         * rendering/RenderText.cpp:
313         (WebCore::RenderText::previousOffsetForBackwardDeletion):
314
315 2015-03-30  Benjamin Poulain  <benjamin@webkit.org>
316
317         Start the features.json files
318         https://bugs.webkit.org/show_bug.cgi?id=143207
319
320         Reviewed by Darin Adler.
321
322         * features.json: Added.
323
324 2015-03-29  Simon Fraser  <simon.fraser@apple.com>
325
326         Convert arguments to ScrollingCoordinator functions to references
327         https://bugs.webkit.org/show_bug.cgi?id=143198
328
329         Reviewed by Darin Adler.
330
331         Convert all the FrameView* and ScrollableArea* arguments to ScrollingCoordinator functions to
332         references, and use references in a few other places.
333
334         * dom/Document.cpp:
335         (WebCore::wheelEventHandlerCountChanged):
336         * loader/HistoryController.cpp:
337         (WebCore::HistoryController::restoreScrollPositionAndViewState):
338         * page/DebugPageOverlays.cpp:
339         (WebCore::NonFastScrollableRegionOverlay::updateRegion):
340         * page/Frame.cpp:
341         (WebCore::Frame::willDetachPage):
342         * page/FrameView.cpp:
343         (WebCore::FrameView::prepareForDetach):
344         (WebCore::FrameView::addSlowRepaintObject):
345         (WebCore::FrameView::removeSlowRepaintObject):
346         (WebCore::FrameView::addViewportConstrainedObject):
347         (WebCore::FrameView::removeViewportConstrainedObject):
348         (WebCore::FrameView::requestScrollPositionUpdate):
349         (WebCore::FrameView::performPostLayoutTasks):
350         (WebCore::FrameView::scrollableAreaSetChanged):
351         (WebCore::FrameView::wheelEvent):
352         * page/Page.cpp:
353         (WebCore::Page::nonFastScrollableRects):
354         * page/Page.h:
355         * page/scrolling/AsyncScrollingCoordinator.cpp:
356         (WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
357         (WebCore::AsyncScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
358         (WebCore::AsyncScrollingCoordinator::frameViewRootLayerDidChange):
359         (WebCore::AsyncScrollingCoordinator::requestScrollPositionUpdate):
360         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
361         (WebCore::AsyncScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
362         (WebCore::AsyncScrollingCoordinator::ensureRootStateNodeForFrameView):
363         (WebCore::AsyncScrollingCoordinator::updateMainFrameScrollLayerPosition):
364         (WebCore::AsyncScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
365         * page/scrolling/AsyncScrollingCoordinator.h:
366         * page/scrolling/ScrollingCoordinator.cpp:
367         (WebCore::ScrollingCoordinator::pageDestroyed):
368         (WebCore::ScrollingCoordinator::coordinatesScrollingForFrameView):
369         (WebCore::ScrollingCoordinator::computeNonFastScrollableRegion):
370         (WebCore::ScrollingCoordinator::frameViewWheelEventHandlerCountChanged):
371         (WebCore::ScrollingCoordinator::frameViewHasSlowRepaintObjectsDidChange):
372         (WebCore::ScrollingCoordinator::frameViewFixedObjectsDidChange):
373         (WebCore::ScrollingCoordinator::scrollLayerForScrollableArea):
374         (WebCore::ScrollingCoordinator::scrollLayerForFrameView):
375         (WebCore::ScrollingCoordinator::headerLayerForFrameView):
376         (WebCore::ScrollingCoordinator::footerLayerForFrameView):
377         (WebCore::ScrollingCoordinator::counterScrollingLayerForFrameView):
378         (WebCore::ScrollingCoordinator::insetClipLayerForFrameView):
379         (WebCore::ScrollingCoordinator::contentShadowLayerForFrameView):
380         (WebCore::ScrollingCoordinator::rootContentLayerForFrameView):
381         (WebCore::ScrollingCoordinator::frameViewRootLayerDidChange):
382         (WebCore::ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects):
383         (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
384         (WebCore::ScrollingCoordinator::updateSynchronousScrollingReasons):
385         (WebCore::ScrollingCoordinator::setForceSynchronousScrollLayerPositionUpdates):
386         (WebCore::ScrollingCoordinator::shouldUpdateScrollLayerPositionSynchronously):
387         (WebCore::ScrollingCoordinator::replaySessionStateDidChange):
388         (WebCore::ScrollingCoordinator::synchronousScrollingReasonsAsText):
389         * page/scrolling/ScrollingCoordinator.h: Align the bitmask enums to make mistakes easier to spot.
390         (WebCore::ScrollingCoordinator::frameViewLayoutUpdated):
391         (WebCore::ScrollingCoordinator::frameViewNonFastScrollableRegionChanged):
392         (WebCore::ScrollingCoordinator::requestScrollPositionUpdate):
393         (WebCore::ScrollingCoordinator::handleWheelEvent):
394         (WebCore::ScrollingCoordinator::willDestroyScrollableArea):
395         (WebCore::ScrollingCoordinator::scrollableAreaScrollLayerDidChange):
396         (WebCore::ScrollingCoordinator::scrollableAreaScrollbarLayerDidChange):
397         (WebCore::ScrollingCoordinator::recomputeWheelEventHandlerCountForFrameView):
398         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
399         (WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange):
400         (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
401         (WebCore::ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate):
402         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
403         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
404         * page/scrolling/mac/ScrollingCoordinatorMac.h:
405         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
406         (WebCore::ScrollingCoordinatorMac::handleWheelEvent):
407         * rendering/RenderLayer.cpp:
408         (WebCore::RenderLayer::~RenderLayer):
409         * rendering/RenderLayerBacking.cpp:
410         (WebCore::RenderLayerBacking::updateOverflowControlsLayers):
411         * rendering/RenderLayerCompositor.cpp:
412         (WebCore::RenderLayerCompositor::updateBacking):
413         (WebCore::RenderLayerCompositor::hasCoordinatedScrolling):
414         (WebCore::RenderLayerCompositor::scrollingLayerDidChange):
415         (WebCore::RenderLayerCompositor::updateLayerForHeader):
416         (WebCore::RenderLayerCompositor::updateLayerForFooter):
417         (WebCore::RenderLayerCompositor::updateOverflowControlsLayers):
418         (WebCore::RenderLayerCompositor::destroyRootLayer):
419         (WebCore::RenderLayerCompositor::updateScrollCoordinationForThisFrame):
420         (WebCore::RenderLayerCompositor::updateScrollCoordinatedLayer):
421         (WebCore::RenderLayerCompositor::willRemoveScrollingLayerWithBacking):
422         (WebCore::RenderLayerCompositor::didAddScrollingLayer):
423         * testing/Internals.cpp:
424         (WebCore::Internals::nonFastScrollableRects):
425
426 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
427
428         Use :matches() instead of :-webkit-any() for the sections and headings default style
429         https://bugs.webkit.org/show_bug.cgi?id=143197
430
431         Reviewed by Darin Adler.
432
433         We no longer need to use the :-webkit-any() hack in the default stylesheet.
434
435         The pseudo class :matches() also support correct specificity. This is not observable
436         since those selector do not conflict with any other rule in the default stylesheet.
437
438         * css/CSSSelector.h:
439         * css/SelectorChecker.cpp:
440         (WebCore::SelectorChecker::determineLinkMatchType):
441         * css/html.css:
442         (:matches(article, aside, nav, section) h1):
443         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
444         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
445         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
446         (:matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) :matches(article, aside, nav, section) h1):
447         (:-webkit-any(article,aside,nav,section) h1): Deleted.
448         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
449         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
450         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
451         (:-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) :-webkit-any(article,aside,nav,section) h1): Deleted.
452
453 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
454
455         `currentColor` computes to the same colour on all elements, even if 'color' is inherited differently
456         https://bugs.webkit.org/show_bug.cgi?id=133420
457
458         Reviewed by Darin Adler.
459
460         When resolving a style with the help of the property cache, we were
461         completely ignoring currentColor.
462
463         Since you can set currentColor on properties that are not inherited,
464         those properties would just be copied from the cached style, which
465         may have a completely different inherited color.
466
467         This pacth fixes the issue by preventing any MatchResult from hitting
468         the cache if it contains any non-inherited property that would require
469         resolution by the cache:
470         -Using the inherit value.
471         -Using the currentColor value.
472
473         Tests: fast/css/currentColor-on-before-after-pseudo-elements.html
474                fast/css/currentColor-style-update-reftest.html
475                fast/css/currentColor-value-style-update.html
476
477         * css/ElementRuleCollector.cpp:
478         (WebCore::ElementRuleCollector::addElementStyleProperties):
479         (WebCore::ElementRuleCollector::matchAuthorRules):
480         (WebCore::ElementRuleCollector::matchUserRules):
481         (WebCore::ElementRuleCollector::matchUARules):
482         * css/StyleResolver.cpp:
483         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
484         (WebCore::StyleResolver::styleForKeyframe):
485         (WebCore::StyleResolver::pseudoStyleForElement):
486         (WebCore::StyleResolver::styleForPage):
487         (WebCore::StyleResolver::findFromMatchedPropertiesCache):
488         (WebCore::StyleResolver::addToMatchedPropertiesCache):
489         (WebCore::extractDirectionAndWritingMode):
490         (WebCore::StyleResolver::applyMatchedProperties):
491         (WebCore::StyleResolver::CascadedProperties::addStyleProperties):
492         (WebCore::StyleResolver::CascadedProperties::addMatches):
493         * css/StyleResolver.h:
494         (WebCore::StyleResolver::MatchResult::matchedProperties):
495
496 2015-03-29  Benjamin Poulain  <benjamin@webkit.org>
497
498         Enable :any-link by default
499         https://bugs.webkit.org/show_bug.cgi?id=143201
500
501         Reviewed by Sam Weinig.
502
503         The pseudo class :any-link has been stable for a while. This patch enables
504         it by default and remove the -webkit- prefix on the default style.
505
506         * css/CSSDefaultStyleSheets.cpp:
507         * css/CSSSelector.cpp:
508         (WebCore::CSSSelector::selectorText):
509         * css/CSSSelector.h:
510         * css/RuleSet.cpp:
511         (WebCore::RuleSet::addRule):
512         * css/SelectorChecker.cpp:
513         (WebCore::SelectorChecker::checkOne):
514         * css/SelectorChecker.h:
515         (WebCore::SelectorChecker::isCommonPseudoClassSelector):
516         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
517         * css/html.css:
518         (a:any-link):
519         (a:any-link:active):
520         (:any-link img):
521         (a:-webkit-any-link): Deleted.
522         (a:-webkit-any-link:active): Deleted.
523         (:-webkit-any-link img): Deleted.
524         * cssjit/SelectorCompiler.cpp:
525         (WebCore::SelectorCompiler::addPseudoClassType):
526         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
527
528 2015-03-29  Joonghun Park  <jh718.park@samsung.com>
529
530         nullptr cleanup in RenderFooBox classes
531         https://bugs.webkit.org/show_bug.cgi?id=143182
532
533         Reviewed by Ryosuke Niwa.
534
535         No new tests, no behavior changes
536
537         Replace 0 with nullptr in RenderFooBox classes.
538
539         * rendering/RenderBox.cpp:
540         (WebCore::RenderBox::RenderBox):
541         (WebCore::RenderBox::paintFillLayer):
542         (WebCore::RenderBox::shrinkLogicalWidthToAvoidFloats):
543         (WebCore::RenderBox::containingBlockAvailableLineWidthInRegion):
544         (WebCore::RenderBox::renderBoxRegionInfo):
545         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
546         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
547         (WebCore::RenderBox::computePositionedLogicalWidthReplaced):
548         (WebCore::RenderBox::positionForPoint):
549         (WebCore::RenderBox::layoutOverflowRectForPropagation):
550         * rendering/RenderBox.h:
551         (WebCore::RenderBox::setMarginBefore):
552         (WebCore::RenderBox::setMarginAfter):
553         (WebCore::RenderBox::setMarginStart):
554         (WebCore::RenderBox::setMarginEnd):
555         (WebCore::RenderBox::createAnonymousBoxWithSameTypeAs):
556         (WebCore::RenderBox::setInlineBoxWrapper):
557         * rendering/RenderBoxModelObject.cpp:
558         (WebCore::RenderBoxModelObject::willBeDestroyed):
559         (WebCore::RenderBoxModelObject::paintMaskForTextFillBox):
560         (WebCore::RenderBoxModelObject::paintBorderSides):
561         (WebCore::RenderBoxModelObject::firstLetterRemainingText):
562         * rendering/RenderBoxModelObject.h:
563         (WebCore::RenderBoxModelObject::moveChildTo):
564         (WebCore::RenderBoxModelObject::moveAllChildrenTo):
565         (WebCore::RenderBoxModelObject::moveChildrenTo):
566         * rendering/RenderDeprecatedFlexibleBox.cpp:
567         (WebCore::FlexBoxIterator::reset):
568         (WebCore::FlexBoxIterator::next):
569         * rendering/RenderDeprecatedFlexibleBox.h:
570         * rendering/RenderFlexibleBox.cpp:
571         (WebCore::RenderFlexibleBox::firstLineBaseline):
572         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
573         * rendering/RenderLineBoxList.cpp:
574         (WebCore::RenderLineBoxList::deleteLineBoxTree):
575         (WebCore::RenderLineBoxList::extractLineBox):
576         (WebCore::RenderLineBoxList::deleteLineBoxes):
577         (WebCore::RenderLineBoxList::checkConsistency):
578         * rendering/RenderLineBoxList.h:
579         (WebCore::RenderLineBoxList::RenderLineBoxList):
580         * rendering/RenderListBox.cpp:
581         (WebCore::RenderListBox::enclosingScrollableArea):
582         (WebCore::RenderListBox::setHasVerticalScrollbar):
583         * rendering/RenderListBox.h:
584
585 2015-03-29  Darin Adler  <darin@apple.com>
586
587         HTMLCollection caches incorrect length if item(0) is called before length on an empty collection
588         https://bugs.webkit.org/show_bug.cgi?id=143203
589         rdar://problem/18460462
590
591         Reviewed by Antti Koivisto.
592
593         Test: fast/dom/htmlcollection-length-after-item-2.html
594
595         * dom/CollectionIndexCache.h:
596         (CollectionIndexCache::nodeAt): If we hit the end looking for index 0, cache a length
597         of 0, not a length of 1.
598
599 2015-03-29  Darin Adler  <darin@apple.com>
600
601         Remove unneeded SVG code, including most isSupportedAttribute functions
602         https://bugs.webkit.org/show_bug.cgi?id=143194
603
604         Reviewed by Antti Koivisto.
605
606         - Removed most implementations of isSupportedAttribute. Others can be removed in
607           future patches. The ones left behind are now all private static member functions.
608           It's dangerous for them to be public because they tend to indicate which attributes
609           are supported at a particular level in the class hierarchy and they are not virtual
610           functions; might want to rethink the function name if we keep any of these long term.
611
612         - Removed unneeded includes, especially of Attr.h and Attribute.h.
613
614         - Changed most parseAttribute and svgAttributeChanged functions so they no longer
615           rely on checking attribute names against a set. Also removed lots of unneeded calls
616           to SVGLangSpace::parseAttribute, which is called by SVGElement::parseAttribute and
617           need not be called by derived classes.
618
619         - Removed return values from parseAttribute functions. Skipping other parseAttribute
620           logic is not an important optimization and makes functions needlessly complex.
621
622         - Moved use of InstanceInvalidationGuard closer to where they are needed. Eventually
623           we may be able to remove many of these.
624
625         - Used auto in a few places where the same type is repeated twice on the same line of
626           code, and auto makes it a bit smaller.
627
628         - Got rid of protected sections in some final classes; doesn't make sense to combine
629           these two. Also moved a few functions from protected to private in other classes.
630
631         - Made a number of functions into static member functions in the base classes such
632           as SVGLangSpace; they were not making any use of the object, and so it was wasteful
633           to compile them as non-static member functions.
634
635         * rendering/svg/RenderSVGImage.cpp: Removed unneeded includes.
636         * svg/SVGAElement.cpp: Removed unneeded includes.
637         (WebCore::SVGAElement::isSupportedAttribute): Deleted.
638         (WebCore::SVGAElement::parseAttribute): Don't use isSupportedAttribute.
639         (WebCore::SVGAElement::svgAttributeChanged): Don't use isSupportedAttribute.
640         * svg/SVGAElement.h: Removed isSupportedAttribute.
641         * svg/SVGAnimateMotionElement.cpp: Removed unneeded includes.
642         (WebCore::SVGAnimateMotionElement::isSupportedAttribute): Deleted.
643         (WebCore::SVGAnimateMotionElement::parseAttribute): Don't use isSupportedAttribute.
644         * svg/SVGAnimateMotionElement.h: Removed isSupportedAttribute.
645         * svg/SVGAnimateTransformElement.cpp:
646         (WebCore::SVGAnimateTransformElement::isSupportedAttribute): Deleted.
647         (WebCore::SVGAnimateTransformElement::parseAttribute): Don't use isSupportedAttribute.
648         * svg/SVGAnimateTransformElement.h: Removed isSupportedAttribute.
649         * svg/SVGAnimationElement.cpp:
650         (WebCore::SVGAnimationElement::parseAttribute): Don't use isSupportedAttribute.
651         * svg/SVGCircleElement.cpp:
652         (WebCore::SVGCircleElement::isSupportedAttribute): Deleted.
653         (WebCore::SVGCircleElement::parseAttribute): Don't use isSupportedAttribute.
654         (WebCore::SVGCircleElement::svgAttributeChanged): Don't use isSupportedAttribute.
655         * svg/SVGCircleElement.h: Removed isSupportedAttribute.
656         * svg/SVGClipPathElement.cpp: Removed unneeded includes.
657         (WebCore::SVGClipPathElement::parseAttribute): Don't use isSupportedAttribute.
658         * svg/SVGComponentTransferFunctionElement.cpp:
659         (WebCore::SVGComponentTransferFunctionElement::parseAttribute): Don't use isSupportedAttribute.
660         * svg/SVGCursorElement.cpp: Removed unneeded includes.
661         (WebCore::SVGCursorElement::parseAttribute): Don't use isSupportedAttribute.
662         (WebCore::SVGCursorElement::svgAttributeChanged): Don't use isSupportedAttribute.
663         * svg/SVGElement.cpp: Removed unneeded includes.
664         * svg/SVGEllipseElement.cpp: Removed unneeded includes.
665         (WebCore::SVGEllipseElement::isSupportedAttribute): Deleted.
666         (WebCore::SVGEllipseElement::parseAttribute): Don't use isSupportedAttribute.
667         (WebCore::SVGEllipseElement::svgAttributeChanged): Don't use isSupportedAttribute.
668         * svg/SVGEllipseElement.h: Removed isSupportedAttribute.
669         * svg/SVGExternalResourcesRequired.cpp: Removed unneeded includes.
670         (WebCore::SVGExternalResourcesRequired::parseAttribute): Don't return a boolean.
671         * svg/SVGExternalResourcesRequired.h: Don't return a boolean.
672         * svg/SVGFEBlendElement.cpp: Removed unneeded includes.
673         (WebCore::SVGFEBlendElement::isSupportedAttribute): Deleted.
674         (WebCore::SVGFEBlendElement::parseAttribute): Don't use isSupportedAttribute.
675         (WebCore::SVGFEBlendElement::svgAttributeChanged): Don't use isSupportedAttribute.
676         * svg/SVGFEBlendElement.h: Removed isSupportedAttribute.
677         * svg/SVGFEColorMatrixElement.cpp: Removed unneeded includes.
678         (WebCore::SVGFEColorMatrixElement::isSupportedAttribute): Deleted.
679         (WebCore::SVGFEColorMatrixElement::parseAttribute): Don't use isSupportedAttribute.
680         (WebCore::SVGFEColorMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
681         * svg/SVGFEColorMatrixElement.h: Removed isSupportedAttribute.
682         * svg/SVGFEComponentTransferElement.cpp: Removed unneeded includes.
683         (WebCore::SVGFEComponentTransferElement::isSupportedAttribute): Deleted.
684         (WebCore::SVGFEComponentTransferElement::parseAttribute): Don't use isSupportedAttribute.
685         * svg/SVGFEComponentTransferElement.h: Removed unneeded includes.
686         * svg/SVGFECompositeElement.cpp: Removed unneeded includes.
687         (WebCore::SVGFECompositeElement::isSupportedAttribute): Deleted.
688         (WebCore::SVGFECompositeElement::parseAttribute): Don't use isSupportedAttribute.
689         (WebCore::SVGFECompositeElement::svgAttributeChanged): Don't use isSupportedAttribute.
690         * svg/SVGFECompositeElement.h:
691         * svg/SVGFEConvolveMatrixElement.cpp: Removed unneeded includes.
692         (WebCore::SVGFEConvolveMatrixElement::isSupportedAttribute): Deleted.
693         (WebCore::SVGFEConvolveMatrixElement::parseAttribute): Don't use isSupportedAttribute.
694         (WebCore::SVGFEConvolveMatrixElement::svgAttributeChanged): Don't use isSupportedAttribute.
695         * svg/SVGFEConvolveMatrixElement.h:
696         * svg/SVGFEDiffuseLightingElement.cpp: Removed unneeded includes.
697         (WebCore::SVGFEDiffuseLightingElement::isSupportedAttribute): Deleted.
698         (WebCore::SVGFEDiffuseLightingElement::parseAttribute): Don't use isSupportedAttribute.
699         (WebCore::SVGFEDiffuseLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
700         * svg/SVGFEDiffuseLightingElement.h:
701         * svg/SVGFEDisplacementMapElement.cpp: Removed unneeded includes.
702         (WebCore::SVGFEDisplacementMapElement::isSupportedAttribute): Deleted.
703         (WebCore::SVGFEDisplacementMapElement::parseAttribute): Don't use isSupportedAttribute.
704         (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Don't use isSupportedAttribute.
705         * svg/SVGFEDisplacementMapElement.h:
706         * svg/SVGFEDropShadowElement.cpp: Removed unneeded includes.
707         (WebCore::SVGFEDropShadowElement::isSupportedAttribute): Deleted.
708         (WebCore::SVGFEDropShadowElement::parseAttribute): Don't use isSupportedAttribute.
709         (WebCore::SVGFEDropShadowElement::svgAttributeChanged): Don't use isSupportedAttribute.
710         * svg/SVGFEDropShadowElement.h:
711         * svg/SVGFEFloodElement.cpp: Removed unneeded includes.
712         * svg/SVGFEGaussianBlurElement.cpp: Removed unneeded includes.
713         (WebCore::SVGFEGaussianBlurElement::isSupportedAttribute): Deleted.
714         (WebCore::SVGFEGaussianBlurElement::parseAttribute): Don't use isSupportedAttribute.
715         (WebCore::SVGFEGaussianBlurElement::svgAttributeChanged): Don't use isSupportedAttribute.
716         * svg/SVGFEGaussianBlurElement.h:
717         * svg/SVGFEImageElement.cpp: Removed unneeded includes.
718         (WebCore::SVGFEImageElement::isSupportedAttribute): Deleted.
719         (WebCore::SVGFEImageElement::parseAttribute): Don't use isSupportedAttribute.
720         (WebCore::SVGFEImageElement::svgAttributeChanged): Don't use isSupportedAttribute.
721         * svg/SVGFEImageElement.h:
722         * svg/SVGFELightElement.cpp: Removed unneeded includes.
723         (WebCore::SVGFELightElement::isSupportedAttribute): Deleted.
724         (WebCore::SVGFELightElement::parseAttribute): Don't use isSupportedAttribute.
725         (WebCore::SVGFELightElement::svgAttributeChanged): Don't use isSupportedAttribute.
726         * svg/SVGFELightElement.h:
727         * svg/SVGFEMergeNodeElement.cpp: Removed unneeded includes.
728         (WebCore::SVGFEMergeNodeElement::isSupportedAttribute): Deleted.
729         (WebCore::SVGFEMergeNodeElement::parseAttribute): Don't use isSupportedAttribute.
730         (WebCore::SVGFEMergeNodeElement::svgAttributeChanged): Don't use isSupportedAttribute.
731         * svg/SVGFEMergeNodeElement.h:
732         * svg/SVGFEMorphologyElement.cpp: Removed unneeded includes.
733         (WebCore::SVGFEMorphologyElement::isSupportedAttribute): Deleted.
734         (WebCore::SVGFEMorphologyElement::parseAttribute): Don't use isSupportedAttribute.
735         (WebCore::SVGFEMorphologyElement::svgAttributeChanged): Don't use isSupportedAttribute.
736         * svg/SVGFEMorphologyElement.h:
737         * svg/SVGFEOffsetElement.cpp: Removed unneeded includes.
738         (WebCore::SVGFEOffsetElement::isSupportedAttribute): Deleted.
739         (WebCore::SVGFEOffsetElement::parseAttribute): Don't use isSupportedAttribute.
740         (WebCore::SVGFEOffsetElement::svgAttributeChanged): Don't use isSupportedAttribute.
741         * svg/SVGFEOffsetElement.h:
742         * svg/SVGFESpecularLightingElement.cpp: Removed unneeded includes.
743         (WebCore::SVGFESpecularLightingElement::isSupportedAttribute): Deleted.
744         (WebCore::SVGFESpecularLightingElement::parseAttribute): Don't use isSupportedAttribute.
745         (WebCore::SVGFESpecularLightingElement::svgAttributeChanged): Don't use isSupportedAttribute.
746         * svg/SVGFESpecularLightingElement.h:
747         * svg/SVGFETileElement.cpp: Removed unneeded includes.
748         (WebCore::SVGFETileElement::isSupportedAttribute): Deleted.
749         (WebCore::SVGFETileElement::parseAttribute): Don't use isSupportedAttribute.
750         (WebCore::SVGFETileElement::svgAttributeChanged): Don't use isSupportedAttribute.
751         * svg/SVGFETileElement.h:
752         * svg/SVGFETurbulenceElement.cpp: Removed unneeded includes.
753         (WebCore::SVGFETurbulenceElement::isSupportedAttribute): Deleted.
754         (WebCore::SVGFETurbulenceElement::parseAttribute): Don't use isSupportedAttribute.
755         (WebCore::SVGFETurbulenceElement::svgAttributeChanged): Don't use isSupportedAttribute.
756         * svg/SVGFETurbulenceElement.h:
757         * svg/SVGFilterElement.cpp: Removed unneeded includes.
758         (WebCore::SVGFilterElement::parseAttribute): Don't use isSupportedAttribute.
759         * svg/SVGFilterPrimitiveStandardAttributes.cpp: Removed unneeded includes.
760         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute): Don't use isSupportedAttribute.
761         * svg/SVGFilterPrimitiveStandardAttributes.h: Removed isSupportedAttribute and also moved a
762         couple functions out of the class definition.
763         * svg/SVGFitToViewBox.cpp: Removed unneeded includes.
764         * svg/SVGFontFaceElement.cpp: Removed unneeded includes.
765         * svg/SVGFontFaceUriElement.cpp: Removed unneeded includes.
766         * svg/SVGForeignObjectElement.cpp: Removed unneeded includes.
767         (WebCore::SVGForeignObjectElement::parseAttribute): Don't use isSupportedAttribute.
768         * svg/SVGGElement.cpp: Removed unneeded includes.
769         (WebCore::SVGGElement::parseAttribute): Don't use isSupportedAttribute.
770         * svg/SVGGlyphElement.cpp: Removed unneeded includes.
771         * svg/SVGGlyphRefElement.cpp: Removed unneeded includes.
772         (WebCore::SVGGlyphRefElement::hasValidGlyphElement): Rewrote to use is<> instead of hasTagName.
773         (WebCore::SVGGlyphRefElement::parseAttribute): Don't use return value from SVGURIReference::parseAttribute.
774         * svg/SVGGradientElement.cpp: Removed unneeded includes.
775         (WebCore::SVGGradientElement::parseAttribute): Don't use isSupportedAttribute.
776         * svg/SVGGraphicsElement.cpp: Removed unneeded includes.
777         (WebCore::SVGGraphicsElement::parseAttribute): Don't use isSupportedAttribute.
778         * svg/SVGImageElement.cpp: Removed unneeded includes.
779         (WebCore::SVGImageElement::parseAttribute): Don't use isSupportedAttribute.
780         * svg/SVGLangSpace.cpp: Removed unneeded includes.
781         (WebCore::SVGLangSpace::parseAttribute): Removed the return value.
782         * svg/SVGLangSpace.h: Converted functions to static member functions and removed the
783         return value from parseAttribute.
784         * svg/SVGLineElement.cpp: Removed unneeded includes.
785         (WebCore::SVGLineElement::parseAttribute): Don't use isSupportedAttribute.
786         * svg/SVGLinearGradientElement.cpp: Removed unneeded includes.
787         (WebCore::SVGLinearGradientElement::parseAttribute): Don't use isSupportedAttribute.
788         * svg/SVGMPathElement.cpp: Removed unneeded includes.
789         (WebCore::SVGMPathElement::isSupportedAttribute): Deleted.
790         (WebCore::SVGMPathElement::parseAttribute): Don't use isSupportedAttribute.
791         (WebCore::SVGMPathElement::svgAttributeChanged): Don't use isSupportedAttribute.
792         * svg/SVGMPathElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
793         private instead of protected.
794         * svg/SVGMarkerElement.cpp: Removed unneeded includes.
795         (WebCore::SVGMarkerElement::parseAttribute): Don't use isSupportedAttribute.
796         * svg/SVGMaskElement.cpp: Removed unneeded includes.
797         (WebCore::SVGMaskElement::parseAttribute): Don't use isSupportedAttribute.
798         * svg/SVGPathElement.cpp: Removed unneeded includes.
799         (WebCore::SVGPathElement::parseAttribute): Don't use isSupportedAttribute.
800         * svg/SVGPatternElement.cpp: Removed unneeded includes.
801         (WebCore::SVGPatternElement::parseAttribute): Don't use isSupportedAttribute.
802         * svg/SVGPolyElement.cpp: Removed unneeded includes.
803         (WebCore::SVGPolyElement::isSupportedAttribute): Deleted.
804         (WebCore::SVGPolyElement::parseAttribute): Don't use isSupportedAttribute.
805         (WebCore::SVGPolyElement::svgAttributeChanged): Don't use isSupportedAttribute.
806         * svg/SVGPolyElement.h:
807         * svg/SVGRadialGradientElement.cpp: Removed unneeded includes.
808         (WebCore::SVGRadialGradientElement::parseAttribute): Don't use isSupportedAttribute.
809         * svg/SVGRectElement.cpp: Removed unneeded includes.
810         (WebCore::SVGRectElement::isSupportedAttribute): Deleted.
811         (WebCore::SVGRectElement::parseAttribute): Don't use isSupportedAttribute.
812         (WebCore::SVGRectElement::svgAttributeChanged): Don't use isSupportedAttribute.
813         * svg/SVGRectElement.h:
814         * svg/SVGSVGElement.cpp: Removed unneeded includes.
815         (WebCore::SVGSVGElement::parseAttribute): Don't use isSupportedAttribute.
816         * svg/SVGScriptElement.cpp: Removed unneeded includes.
817         * svg/SVGStopElement.cpp: Removed unneeded includes.
818         (WebCore::SVGStopElement::isSupportedAttribute): Deleted.
819         (WebCore::SVGStopElement::parseAttribute): Don't use isSupportedAttribute.
820         (WebCore::SVGStopElement::svgAttributeChanged): Don't use isSupportedAttribute.
821         * svg/SVGStopElement.h: Removed isSupportedAttribute.
822         * svg/SVGStyleElement.cpp: Removed unneeded includes.
823         (WebCore::SVGStyleElement::isSupportedAttribute): Deleted.
824         (WebCore::SVGStyleElement::parseAttribute): Don't use isSupportedAttribute.
825         * svg/SVGStyleElement.h: Removed isSupportedAttribute.
826         * svg/SVGSymbolElement.cpp: Removed unneeded includes.
827         (WebCore::SVGSymbolElement::isSupportedAttribute): Deleted.
828         (WebCore::SVGSymbolElement::parseAttribute): Don't use isSupportedAttribute.
829         (WebCore::SVGSymbolElement::svgAttributeChanged): Don't use isSupportedAttribute.
830         * svg/SVGSymbolElement.h: Removed isSupportedAttribute.
831         * svg/SVGTRefElement.cpp: Removed unneeded includes.
832         (WebCore::SVGTRefElement::isSupportedAttribute): Deleted.
833         (WebCore::SVGTRefElement::parseAttribute): Don't use isSupportedAttribute.
834         (WebCore::SVGTRefElement::svgAttributeChanged): Don't use isSupportedAttribute.
835         * svg/SVGTRefElement.h: Removed isSupportedAttribute and made didNotifySubtreeInsertions
836         private instead of protected.
837         * svg/SVGTests.cpp: Removed unneeded includes.
838         (WebCore::SVGTests::parseAttribute): Removed return value.
839         * svg/SVGTests.h: Removed return value of parseAttribute.
840         * svg/SVGTextContentElement.cpp: Removed unneeded includes.
841         (WebCore::SVGTextContentElement::collectStyleForPresentationAttribute): Don't use
842         isSupportedAttribute. Also removed global to optimize comparing attribute value against
843         the string "preserve".
844         (WebCore::SVGTextContentElement::parseAttribute): Don't use isSupportedAttribute.
845         (WebCore::SVGTextContentElement::svgAttributeChanged): Don't use isSupportedAttribute.
846         * svg/SVGTextContentElement.h: Made isSupportedAttribute private instead of protected.
847         * svg/SVGTextElement.cpp: Removed unneeded includes.
848         * svg/SVGTextPathElement.cpp: Removed unneeded includes.
849         (WebCore::SVGTextPathElement::parseAttribute): Don't use isSupportedAttribute.
850         * svg/SVGTextPositioningElement.cpp: Removed unneeded includes.
851         (WebCore::SVGTextPositioningElement::isSupportedAttribute): Deleted.
852         (WebCore::SVGTextPositioningElement::parseAttribute): Don't use isSupportedAttribute.
853         (WebCore::SVGTextPositioningElement::svgAttributeChanged): Don't use isSupportedAttribute.
854         * svg/SVGTextPositioningElement.h: Removed isSupportedAttribute and made some functions
855         private insetad of protected.
856         * svg/SVGURIReference.cpp: Removed unneeded includes.
857         (WebCore::SVGURIReference::parseAttribute): Don't use isSupportedAttribute.
858         * svg/SVGURIReference.h:
859         (WebCore::SVGURIReference::isExternalURIReference):
860         * svg/SVGUseElement.cpp: Removed unneeded includes.
861         (WebCore::SVGUseElement::parseAttribute): Don't use isSupportedAttribute.
862         * svg/SVGViewElement.h: Removed isSupportedAttribute.
863         * svg/animation/SVGSMILElement.cpp: Removed unneeded includes.
864
865 2015-03-29  Darin Adler  <darin@apple.com>
866
867         Remove unneeded includes of "Attribute.h"
868         https://bugs.webkit.org/show_bug.cgi?id=143195
869
870         Reviewed by Antti Koivisto.
871
872         * css/StyleResolver.cpp:
873         * html/HTMLAnchorElement.cpp:
874         * html/HTMLAreaElement.cpp:
875         * html/HTMLBRElement.cpp:
876         * html/HTMLBaseElement.cpp:
877         * html/HTMLBodyElement.cpp:
878         * html/HTMLButtonElement.cpp:
879         * html/HTMLCanvasElement.cpp:
880         * html/HTMLDivElement.cpp:
881         * html/HTMLElement.cpp:
882         * html/HTMLEmbedElement.cpp:
883         * html/HTMLFontElement.cpp:
884         * html/HTMLFormControlElement.cpp:
885         * html/HTMLFormElement.cpp:
886         * html/HTMLFrameElement.cpp:
887         * html/HTMLFrameElementBase.cpp:
888         * html/HTMLFrameSetElement.cpp:
889         * html/HTMLHRElement.cpp:
890         * html/HTMLIFrameElement.cpp:
891         * html/HTMLImageElement.cpp:
892         * html/HTMLOListElement.cpp:
893         * html/HTMLOptionElement.cpp:
894         * html/HTMLParagraphElement.cpp:
895         * html/HTMLParamElement.cpp:
896         * html/HTMLPlugInElement.cpp:
897         * html/HTMLPreElement.cpp:
898         * html/HTMLProgressElement.cpp:
899         * html/HTMLScriptElement.cpp:
900         * html/HTMLSelectElement.cpp:
901         * html/HTMLStyleElement.cpp:
902         * html/HTMLTableCaptionElement.cpp:
903         * html/HTMLTableCellElement.cpp:
904         * html/HTMLTableColElement.cpp:
905         * html/HTMLTableElement.cpp:
906         * html/HTMLTablePartElement.cpp:
907         * html/HTMLTextAreaElement.cpp:
908         * html/HTMLTextFormControlElement.cpp:
909         * html/HTMLUListElement.cpp:
910         * html/HTMLVideoElement.cpp:
911         * html/parser/HTMLScriptRunner.cpp:
912         * inspector/InspectorNodeFinder.cpp:
913         Removed includes of "Attribute.h".
914
915 2015-03-28  Eric Carlson  <eric.carlson@apple.com>
916
917         [Mac] Update for output device API change
918         https://bugs.webkit.org/show_bug.cgi?id=143187
919
920         Reviewed by Zalan Bujtas.
921
922         The API used for output device is being deprecated, update to the replacement.
923
924         * WebCore.xcodeproj/project.pbxproj: Add SPI headers.
925
926         * platform/graphics/MediaPlaybackTarget.h:
927         (WebCore::MediaPlaybackTarget::MediaPlaybackTarget): Update for API change.
928         (WebCore::MediaPlaybackTarget::setDevicePickerContext):
929         (WebCore::MediaPlaybackTarget::devicePickerContext):
930
931         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
932         (WebCore::MediaPlaybackTarget::encode):
933         (WebCore::MediaPlaybackTarget::decode):
934
935         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
936         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
937         (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):
938         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac):
939         (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired):
940         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):
941         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange):
942         (WebCore::MediaPlaybackTargetPickerMac::stopMonitoringPlaybackTargets):
943         (-[WebAVOutputDeviceMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]):
944         (-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]): Deleted.
945
946         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
947         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
948         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
949         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
950         (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget):
951         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]):
952
953         * platform/spi/cocoa/AVKitSPI.h: Copied from Source/WebCore/platform/spi/ios/AVKitSPI.h. Moved
954             from ios directory, added Mac includes and prototypes.
955         * platform/spi/ios/AVKitSPI.h: Removed.
956
957         * platform/spi/mac/AVFoundationSPI.h: Added.
958
959 2015-03-28  Simon Fraser  <simon.fraser@apple.com>
960
961         Optimize RenderLayer::intersectsDamageRect() slightly
962         https://bugs.webkit.org/show_bug.cgi?id=143186
963
964         Reviewed by Zalan Bujtas.
965
966         We can early return from RenderLayer::intersectsDamageRect() if the
967         damageRect is empty, since nothing will intersect with the empty rect.
968         
969         Slight performance gain when scrolling overflow-scroll with lots of nested,
970         clipping layers.
971
972         * rendering/RenderLayer.cpp:
973         (WebCore::RenderLayer::calculateClipRects):
974
975 2015-03-28  Anders Carlsson  <andersca@apple.com>
976
977         Remove an unused SPI method from WebKitLegacy
978         https://bugs.webkit.org/show_bug.cgi?id=143185
979
980         Reviewed by Sam Weinig.
981
982         * loader/appcache/ApplicationCacheStorage.cpp:
983         (WebCore::ApplicationCacheStorage::storeCopyOfCache): Deleted.
984         * loader/appcache/ApplicationCacheStorage.h:
985
986 2015-03-28  Joonghun Park  <jh718.park@samsung.com>
987
988         nullptr cleanup in InlineFooBox classes
989         https://bugs.webkit.org/show_bug.cgi?id=143178
990
991         Reviewed by Csaba Osztrogonác.
992
993         No new tests, no behavior changes
994
995         Replace 0 with nullptr in InlineFooBox classes.
996
997         * rendering/InlineBox.cpp:
998         (WebCore::InlineBox::prevLeafChildIgnoringLineBreak):
999         * rendering/InlineFlowBox.cpp:
1000         (WebCore::InlineFlowBox::removeChild):
1001         (WebCore::InlineFlowBox::deleteLine):
1002         (WebCore::InlineFlowBox::placeBoxesInInlineDirection):
1003         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
1004         * rendering/InlineFlowBox.h:
1005         (WebCore::InlineFlowBox::InlineFlowBox):
1006         * rendering/InlineTextBox.h:
1007         (WebCore::InlineTextBox::InlineTextBox):
1008         * rendering/RootInlineBox.cpp:
1009         (WebCore::RootInlineBox::getLogicalStartBoxWithNode):
1010         (WebCore::RootInlineBox::getLogicalEndBoxWithNode):
1011         * rendering/RootInlineBox.h:
1012         * rendering/svg/SVGInlineTextBox.cpp:
1013         (WebCore::SVGInlineTextBox::SVGInlineTextBox):
1014         (WebCore::SVGInlineTextBox::releasePaintingResource):
1015         (WebCore::SVGInlineTextBox::restoreGraphicsContextAfterTextPainting):
1016         * rendering/svg/SVGRootInlineBox.cpp:
1017         (WebCore::SVGRootInlineBox::closestLeafChildForPosition):
1018         (WebCore::findFirstAndLastAttributesInVector):
1019         * rendering/svg/SVGRootInlineBox.h:
1020
1021 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
1022
1023         More modern loops in RenderLayer.cpp
1024         https://bugs.webkit.org/show_bug.cgi?id=143175
1025
1026         Reviewed by Ryosuke Niwa.
1027
1028         Use modern loops in more places in RenderLayer.app.
1029
1030         * rendering/RenderLayer.cpp:
1031         (WebCore::RenderLayer::update3DTransformedDescendantStatus):
1032         (WebCore::RenderLayer::paint):
1033         (WebCore::performOverlapTests):
1034         (WebCore::RenderLayer::paintFixedLayersInNamedFlows):
1035         (WebCore::RenderLayer::paintList):
1036         (WebCore::RenderLayer::collectFragments):
1037         (WebCore::RenderLayer::updatePaintingInfoForFragments):
1038         (WebCore::RenderLayer::paintTransformedLayerIntoFragments):
1039         (WebCore::RenderLayer::calculateClipRects):
1040
1041 2015-03-27  Simon Fraser  <simon.fraser@apple.com>
1042
1043         nullptr cleanup in RenderLayer
1044         https://bugs.webkit.org/show_bug.cgi?id=143174
1045
1046         Reviewed by Ryosuke Niwa.
1047
1048         Replace 0 with nullptr in RenderLayer.cpp.
1049
1050         * rendering/RenderLayer.cpp:
1051         (WebCore::RenderLayer::filterRenderer):
1052         (WebCore::RenderLayer::updateLayerPositionsAfterLayout):
1053         (WebCore::RenderLayer::updateLayerPositionsAfterOverflowScroll):
1054         (WebCore::RenderLayer::positionNewlyCreatedOverflowControls):
1055         (WebCore::RenderLayer::enclosingOverflowClipLayer):
1056         (WebCore::RenderLayer::enclosingCompositingLayer):
1057         (WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
1058         (WebCore::RenderLayer::enclosingFilterLayer):
1059         (WebCore::RenderLayer::enclosingFilterRepaintLayer):
1060         (WebCore::RenderLayer::clippingRootForPainting):
1061         (WebCore::RenderLayer::transparentPaintingAncestor):
1062         (WebCore::transparencyClipBox):
1063         (WebCore::RenderLayer::removeChild):
1064         (WebCore::RenderLayer::removeOnlyThisLayer):
1065         (WebCore::RenderLayer::insertOnlyThisLayer):
1066         (WebCore::accumulateOffsetTowardsAncestor):
1067         (WebCore::RenderLayer::enclosingScrollableArea):
1068         (WebCore::RenderLayer::enclosingPaginationLayerInSubtree):
1069         (WebCore::RenderLayer::enclosingElement):
1070         (WebCore::RenderLayer::enclosingFlowThreadAncestor):
1071         (WebCore::RenderLayer::hitTestFixedLayersInNamedFlows):
1072         (WebCore::RenderLayer::hitTestLayer):
1073         (WebCore::RenderLayer::hitTestTransformedLayerInFragments):
1074         (WebCore::RenderLayer::hitTestLayerByApplyingTransform):
1075         (WebCore::RenderLayer::hitTestList):
1076         (WebCore::RenderLayer::updateClipRects):
1077         (WebCore::RenderLayer::clipRects):
1078         (WebCore::RenderLayer::calculateClipRects):
1079
1080 2015-03-27  Gwang Yoon Hwang  <yoon@igalia.com>
1081
1082         [TexMap] Seperate BitmapTexture related classes implementations from TextureMapper
1083         https://bugs.webkit.org/show_bug.cgi?id=142386
1084
1085         Reviewed by Žan Doberšek.
1086
1087         TextureMapper and TextureMapperGL are bloated and tightly coupled with
1088         BitmapTexture. We should move these classes to seperated file of their own.
1089         Also, this patch removes friend relationship from TextureMapperGL and  its
1090         subsidiary classes.
1091
1092         The main purpose of this refactoring is to expose BitmapTexturePool to
1093         renderers of platformlayers like Video and Canvas. By doing this, each
1094         renderer can acquire textures from the global texture pool to paint
1095         their contents directly.
1096
1097         No new tests needed.
1098
1099         * PlatformEfl.cmake:
1100         * PlatformGTK.cmake:
1101         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1102         Include BitmapTextureGL and BitmapTexturePool explicitly
1103
1104         * platform/graphics/texmap/BitmapTexture.cpp: Added.
1105         * platform/graphics/texmap/BitmapTexture.h: Added.
1106         (WebCore::BitmapTexture::updateContents):
1107         Exclude BitmapTexture class from TextureMapper
1108
1109         * platform/graphics/texmap/BitmapTextureGL.cpp: Added.
1110         * platform/graphics/texmap/BitmapTextureGL.h: Added.
1111         Exclude BitmapTextureGL class from TextureMapperGL
1112         (WebCore::BitmapTextureGL::clipStack): Added.
1113         Add the getter for clipStack for TextureMapperGL
1114         (WebCore::BitmapTextureGL::Bind): Deleted.
1115         (WebCore::BitmapTextureGL::BindAsSurface): Added.
1116         Bind used TextureMapperGL's internal data directly to compute projection matrix as a friend class,
1117         However, TextureMapperGL can compute projection matrix itself after binding job, so this
1118         friend ship is not needed. Also, this patch renames Bind to BindAsSurface to remove ambiguity.
1119
1120         * platform/graphics/texmap/BitmapTextureImageBuffer.cpp: Added.
1121         * platform/graphics/texmap/BitmapTextureImageBuffer.h: Added.
1122         Exclude BitmapTextureImageBuffer class from TextureMapperImageBuffer
1123
1124         * platform/graphics/texmap/BitmapTexturePool.cpp: Added.
1125         * platform/graphics/texmap/BitmapTexturePool.h: Added.
1126         Exclude BitmapTexturePool class from TextureMapperGL
1127         (WebCore::BitmapTexturePool::acquireTexture):
1128         Modified to use passed GraphicsContext3D instead of TextureMapperGL to remove redundant coupling
1129
1130         * platform/graphics/texmap/TextureMapper.cpp:
1131         * platform/graphics/texmap/TextureMapper.h:
1132         Remove BitmapTexturePool and BitmapTexture from its implementation.
1133
1134         * platform/graphics/texmap/TextureMapperGL.cpp:
1135         * platform/graphics/texmap/TextureMapperGL.h:
1136         Remove BitmapTextureGL from its implementation.
1137         (WebCore::TextureMapperGL::TextureMapperGL):
1138         (WebCore::TextureMapperGL::clipStack):
1139         (WebCore::TextureMapperGL::bindSurface):
1140         (WebCore::TextureMapperGL::currentSurface):
1141         Add a getter of the current surface for filtering operation in BitmapTextureGL.
1142         It would be clear to move filtering operation from BitmapTextureGL to TextureMapperGL later.
1143
1144         (WebCore::TextureMapperGL::ClipStack):
1145         Move inner class declaration to public.
1146
1147         * platform/graphics/texmap/TextureMapperImageBuffer.cpp:
1148         * platform/graphics/texmap/TextureMapperImageBuffer.h:
1149         Remove BitmapTextureImageBuffer from its implementation.
1150
1151 2015-03-27  Tim Horton  <timothy_horton@apple.com>
1152
1153         WebProcess started by editable WKWebView spends 15% of its initialization time loading DataDetectors
1154         https://bugs.webkit.org/show_bug.cgi?id=143142
1155         <rdar://problem/20324495>
1156
1157         Reviewed by Anders Carlsson.
1158
1159         Calling DataDetectorsLibrary() is expensive; we should avoid doing it
1160         until actually necessary. When loading a page that makes a caret selection,
1161         ServicesOverlayController was calling DataDetectorsLibrary() (ignoring the fact
1162         that a caret selection can't have any services associated with it) to avoid
1163         crashing on systems where DataDetectors is not available. Instead, we should
1164         first check if there's anything to do, and then check for the existence
1165         of DataDetectors.
1166
1167         * page/mac/ServicesOverlayController.mm:
1168         (WebCore::ServicesOverlayController::buildPhoneNumberHighlights):
1169         Build the list of phone number ranges, and bail (clearing the potential highlights)
1170         if it is empty, before calling DataDetectorsLibrary().
1171
1172         (WebCore::ServicesOverlayController::buildSelectionHighlight):
1173         Check the list of selection rects, and bail (clearing the potential highlights)
1174         if it is empty, before calling DataDetectorsLibrary().
1175
1176 2015-03-27  Jer Noble  <jer.noble@apple.com>
1177
1178         [Mac] Safari fails to fire page "load" event with video[preload=none]
1179         https://bugs.webkit.org/show_bug.cgi?id=143147
1180
1181         Reviewed by Simon Fraser.
1182
1183         Test: media/video-page-load-preload-none.html
1184
1185         When told to load() when preload == None, set the networkState to Idle.
1186         This causes HTMLMediaElement to set the shouldDelayLoadEvent flag to
1187         false, and allows the page's 'load' event to fire.
1188
1189         Drive-by fix: add setNetworkState() and setReadyState() methods to
1190         MediaPlayerPrivateAVFoundation, reducing a bunch of code duplication.
1191
1192         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1193         (WebCore::MediaPlayerPrivateAVFoundation::load):
1194         (WebCore::MediaPlayerPrivateAVFoundation::setNetworkState):
1195         (WebCore::MediaPlayerPrivateAVFoundation::setReadyState):
1196         (WebCore::MediaPlayerPrivateAVFoundation::updateStates):
1197         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1198
1199 2015-03-27  Alexey Proskuryakov  <ap@apple.com>
1200
1201         Calling crypto.webkitSubtle.generateKey causes page memory to never be released
1202         https://bugs.webkit.org/show_bug.cgi?id=143151
1203         rdar://problem/18940687
1204
1205         Reviewed by Tim Horton.
1206
1207         * crypto/mac/CryptoKeyRSAMac.cpp: (WebCore::CryptoKeyRSA::generatePair): Don't.
1208
1209 2015-03-27  Brent Fulgham  <bfulgham@apple.com>
1210
1211         Null dereference in InbandMetadataTextTrack handling
1212         https://bugs.webkit.org/show_bug.cgi?id=143144
1213         <rdar://problem/18983250>
1214
1215         Reviewed by Eric Carlson.
1216
1217         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp:
1218         (WebCore::InbandMetadataTextTrackPrivateAVF::updatePendingCueEndTimes): Check for null return value from
1219         'client()', just like we do in all other methods.
1220
1221 2015-03-27  Oliver Hunt  <oliver@apple.com>
1222
1223         Forward additional CFNetwork ATS information to child processes
1224         https://bugs.webkit.org/show_bug.cgi?id=143136
1225
1226         Reviewed by Anders Carlsson.
1227
1228         Declare SPI.
1229
1230         * platform/spi/cf/CFNetworkSPI.h:
1231
1232 2015-03-27  Chris Dumez  <cdumez@apple.com>
1233
1234         [WK2][NetworkCache] We only cache responses with status codes that are cacheable by default
1235         https://bugs.webkit.org/show_bug.cgi?id=143125
1236         <rdar://problem/20321172>
1237
1238         Reviewed by Antti Koivisto.
1239
1240         Export a couple of extra symbols.
1241
1242         * platform/network/ResourceResponseBase.h:
1243
1244 2015-03-27  Jer Noble  <jer.noble@apple.com>
1245
1246         HTMLMediaElement will fire 'seeked' before seek completes, leading to currentTime discontinuities.
1247         https://bugs.webkit.org/show_bug.cgi?id=143132
1248
1249         Reviewed by Eric Carlson.
1250
1251         When seeking, if the ready state rises to >= HAVE_CURRENT_DATA, we will fire the 'seeked'
1252         event and continue playback. However, if a media engine updates the ready state before its
1253         seek operation actually completes, the currentTime it returns may still be the time before
1254         the seek.
1255
1256         Wait until both the ready state rises to HAVE_CURRENT_DATA and m_player->seeking() returns
1257         false before firing the 'seeked' event.
1258
1259         * html/HTMLMediaElement.cpp:
1260         (WebCore::HTMLMediaElement::parseAttribute):
1261
1262 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
1263
1264         Make some more objects use FastMalloc
1265         https://bugs.webkit.org/show_bug.cgi?id=143122
1266
1267         Reviewed by Csaba Osztrogonác.
1268
1269         * Modules/geolocation/GeolocationController.h:
1270         * Modules/geolocation/NavigatorGeolocation.h:
1271         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
1272         * Modules/notifications/NotificationController.h:
1273         * Modules/webdatabase/DatabaseServer.h:
1274         * css/CSSFontFaceSource.h:
1275         * html/HTMLMediaSession.h:
1276         * inspector/InspectorIndexedDBAgent.h:
1277         * inspector/InspectorReplayAgent.h:
1278         * page/CaptionUserPreferencesMediaAF.h:
1279         * page/PageConsoleClient.h:
1280         * page/PageDebuggable.h:
1281         * page/animation/CSSPropertyAnimation.cpp:
1282         * page/mac/ServicesOverlayController.h:
1283         * platform/RemoteCommandListener.h:
1284         * platform/Timer.h:
1285         * platform/audio/MediaSessionManager.h:
1286         * platform/mac/SystemSleepListenerMac.h:
1287         * platform/mac/ThemeMac.h:
1288         * rendering/svg/RenderSVGResourceSolidColor.h:
1289         * replay/ReplayController.h:
1290
1291 2015-03-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
1292
1293         FEMorphology::platformApplyGeneric() should bail out if the radius is less than or equal to zero.
1294         https://bugs.webkit.org/show_bug.cgi?id=142885.
1295
1296         Reviewed by Dean Jackson.
1297
1298         FEMorphology class implementation code clean up.
1299         
1300         Tests: svg/filters/feMorphology-radius-cases.svg
1301
1302         * platform/graphics/filters/FEMorphology.cpp:
1303         (WebCore::shouldSupersedeExtremum): Reuse code instead of repeating it and
1304         use < and > instead of =< and >=.
1305         
1306         (WebCore::pixelArrayIndex): Returns the array index of a pixel in an image
1307         buffer, given: position(x, y), image width and the color channel.
1308         
1309         (WebCore::columnExtremum): Returns the extremum of a column of pixels.
1310         
1311         (WebCore::kernelExtremum): Returns the extremum of a filter kernel.
1312         
1313         (WebCore::FEMorphology::platformApplyGeneric): Apply some code clean-up.
1314         The kernel size should be equal to radius of the filter. The extra pixel
1315         was causing the resulted image to be asymmetric in some cases.
1316         
1317         (WebCore::FEMorphology::platformApplyDegenerate):
1318         (WebCore::FEMorphology::platformApplySoftware): After applying scaling, we
1319         still need to check the resulted radius is negative (overflow case) or less
1320         than one (zero radius case) and treat these cases differently.
1321         
1322         (WebCore::FEMorphology::morphologyOperator): Deleted.
1323         (WebCore::FEMorphology::radiusX): Deleted.
1324         (WebCore::FEMorphology::radiusY): Deleted.
1325         * platform/graphics/filters/FEMorphology.h:
1326         (WebCore::FEMorphology::morphologyOperator):
1327         (WebCore::FEMorphology::radiusX):
1328         (WebCore::FEMorphology::radiusY):
1329         Move a single line functions from the source file to the header file.
1330
1331 2015-03-27  Antti Koivisto  <antti@apple.com>
1332
1333         Move CacheValidation to platform
1334         https://bugs.webkit.org/show_bug.cgi?id=143133
1335
1336         Reviewed by Chris Dumez.
1337
1338         It deals with platform types only and is currently violating layering.
1339
1340         * WebCore.xcodeproj/project.pbxproj:
1341         * loader/cache/CacheValidation.cpp: Removed.
1342         * loader/cache/CacheValidation.h: Removed.
1343         * platform/network/CacheValidation.cpp: Copied from Source/WebCore/loader/cache/CacheValidation.cpp.
1344         * platform/network/CacheValidation.h: Copied from Source/WebCore/loader/cache/CacheValidation.h.
1345
1346 2015-03-27  Commit Queue  <commit-queue@webkit.org>
1347
1348         Unreviewed, rolling out r177896.
1349         https://bugs.webkit.org/show_bug.cgi?id=142978
1350
1351         Loading libgstclutter.so in-process hangs web process
1352         (Requested by mcatanzaro on #webkit).
1353
1354         Reverted changeset:
1355
1356         "[GStreamer] Disable gst-plugin-scanner if seccomp filters are
1357         enabled"
1358         https://bugs.webkit.org/show_bug.cgi?id=140069
1359         http://trac.webkit.org/changeset/177896
1360
1361 2015-03-26  Antti Koivisto  <antti@apple.com>
1362
1363         Respect cache-control directives in request
1364         https://bugs.webkit.org/show_bug.cgi?id=143121
1365         rdar://problem/19714040
1366
1367         Reviewed by Chris Dumez.
1368
1369         Test: http/tests/cache/disk-cache/disk-cache-request-headers.html
1370
1371         * loader/cache/CacheValidation.cpp:
1372         (WebCore::isCacheHeaderSeparator):
1373         (WebCore::isControlCharacter):
1374         (WebCore::trimToNextSeparator):
1375         (WebCore::parseCacheHeader):
1376         (WebCore::parseCacheControlDirectives):
1377
1378             Factor Cache-control parsing here so it can be used for both requests and responses.
1379
1380         * loader/cache/CacheValidation.h:
1381         * platform/network/ResourceRequestBase.h:
1382         * platform/network/ResourceResponseBase.cpp:
1383         (WebCore::ResourceResponseBase::ResourceResponseBase):
1384         (WebCore::ResourceResponseBase::parseCacheControlDirectives):
1385         (WebCore::ResourceResponseBase::cacheControlContainsNoCache):
1386         (WebCore::ResourceResponseBase::cacheControlContainsNoStore):
1387         (WebCore::ResourceResponseBase::cacheControlContainsMustRevalidate):
1388         (WebCore::ResourceResponseBase::cacheControlMaxAge):
1389         (WebCore::isCacheHeaderSeparator): Deleted.
1390         (WebCore::isControlCharacter): Deleted.
1391         (WebCore::trimToNextSeparator): Deleted.
1392         (WebCore::parseCacheHeader): Deleted.
1393         * platform/network/ResourceResponseBase.h:
1394
1395 2015-03-27  Víctor Manuel Jáquez Leal  <vjaquez@igalia.com>
1396
1397         [GStreamer] share GL context in pipeline, part 2
1398         https://bugs.webkit.org/show_bug.cgi?id=143049
1399
1400         Reviewed by Carlos Garcia Campos.
1401
1402         This patch, instead of cluttering the GstGL attributes creation in
1403         ::handleSyncMessage(), creates a new method ::ensureGstGLContext(),
1404         where those attributes are defined. This method is guarded by
1405         USE(GSTREAMER_GL)
1406
1407         ::handlSyncMessage() shall return nothing, according to GStreamer
1408         documentation, not a boolean.
1409
1410         The GstGL attributes are now GRefPtr<> to avoid memory leaks.
1411
1412         The GstGLAPI and GstGLPlatform are now set given by the pre-processor
1413         directives, and the code in ::ensureGstGLContext() is simpler.
1414
1415         No new tests because this is platform specific and it depends in the
1416         run-time availability and configurations of GstGL elements.
1417
1418         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1419         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1420         Don't initialise the GstGL attributes since are GRefPtr<>
1421         (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): Changed the
1422         signature to use void instead of gboolean.
1423         (WebCore::MediaPlayerPrivateGStreamer::ensureGstGLContext): New method.
1424         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1425
1426 2015-03-26  Jeremy Jones  <jeremyj@apple.com>
1427
1428         Optimized Fullscreen fails to cleanup because of no longer necessary release of m_playerController in exitFullscreen()
1429         https://bugs.webkit.org/show_bug.cgi?id=143120
1430
1431         Reviewed by Eric Carlson.
1432
1433         We used to release m_playerController in WebVideoFullscreenInterfaceAVKit::exitFullscreen() in order to make sure 
1434         media state was reset. This is no longer necessary as we now have a way the model can explicitly request resetting the
1435         media state via resetMediaState(). m_playerController is already released in 
1436         WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal(). Releasing it prematurely can actually prevent the exit
1437         fullscreen process from completing successfully.
1438
1439         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1440         (WebVideoFullscreenInterfaceAVKit::exitFullscreen):
1441
1442 2015-03-26  Zalan Bujtas  <zalan@apple.com>
1443
1444         Inline continuation code should not take anonymous containing wrapper granted.
1445         https://bugs.webkit.org/show_bug.cgi?id=133312
1446
1447         Reviewed by Dave Hyatt.
1448
1449         It's wrong to assume that when RenderInline is part of an inline continuation, its containing block
1450         is an anonymous wrapper and its sibling might be a block level renderer.
1451         When the inline continuation is no longer needed, for example when the block level renderer that initiated the continuation
1452         is detached from the render tree, the inline renderes still continue to form continuation.(however they no longer require
1453         anonymous wrappers)
1454
1455         Test: fast/inline/crash-when-position-property-is-changed-and-no-longer-in-continuation.html
1456
1457         * rendering/RenderInline.cpp:
1458         (WebCore::updateStyleOfAnonymousBlockContinuations):
1459         (WebCore::RenderInline::styleDidChange):
1460
1461 2015-03-26  Tim Horton  <timothy_horton@apple.com>
1462
1463         REGRESSION (r181358 and r181507): Lots of sites think that we support touch events on OS X
1464         https://bugs.webkit.org/show_bug.cgi?id=142888
1465         <rdar://problem/20227304>
1466
1467         Reviewed by Beth Dakin.
1468
1469         * dom/Document.idl:
1470         * dom/Element.idl:
1471         * html/HTMLBodyElement.idl:
1472         * html/HTMLFrameSetElement.idl:
1473         * page/DOMWindow.idl:
1474         Re-conditionalize a lot of event listeners; sites test ("ontouchstart" in window), which
1475         is not covered by NotEnumerable, and so r181358 and r181507 broke a bunch of sites
1476         (apple.com, blaze.com, anything using nicescroll.js, etc.) by causing them to think
1477         that (Mac) Safari was touch-enabled.
1478
1479 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
1480
1481         "lineNo" does not match WebKit coding style guidelines
1482         https://bugs.webkit.org/show_bug.cgi?id=143119
1483
1484         Reviewed by Michael Saboff.
1485
1486         We can afford to use whole words.
1487
1488         * bindings/js/JSLazyEventListener.cpp:
1489         (WebCore::JSLazyEventListener::initializeJSFunction):
1490         * bindings/js/JSMainThreadExecStateInstrumentation.h:
1491         (WebCore::JSMainThreadExecState::instrumentFunctionCall):
1492         * inspector/InspectorDOMAgent.cpp:
1493         (WebCore::InspectorDOMAgent::buildObjectForEventListener):
1494         * testing/Internals.cpp:
1495         (WebCore::Internals::parserMetaData):
1496
1497 2015-03-26  Roger Fong  <roger_fong@apple.com>
1498
1499         Apply blur effect to media control background.
1500         https://bugs.webkit.org/show_bug.cgi?id=143116.
1501         <rdar://problem/20316964>.
1502
1503         Reviewed by Brent Fulgham.
1504
1505         There are still a few issues, like the borders of the controls being blurred with black,
1506         and the volume slider background not showing the blur effect. Will fix those separately.
1507
1508         Add CSS for new divs to create blur effect using back drop filters and blend modes.
1509         * Modules/mediacontrols/mediaControlsApple.css:
1510         (audio::-webkit-media-controls-panel):
1511         (audio::-webkit-media-controls-panel-tint):
1512         (audio::-webkit-media-controls-panel-background):
1513         (audio::-webkit-media-controls-panel .volume-box):
1514         (audio::-webkit-media-controls-volume-slider-container-background):
1515         (audio::-webkit-media-controls-volume-slider-container-tint):
1516         (audio::-webkit-media-controls-toggle-closed-captions-button): Adjust fill.
1517         (audio::-webkit-media-controls-fullscreen-button): Adjust fill.
1518         (audio::-webkit-media-controls-fullscreen-button.exit): Adjust fill.
1519         (video:-webkit-full-screen::-webkit-media-controls-panel):
1520         (audio:-webkit-full-screen::-webkit-media-controls-panel-tint):
1521         (audio:-webkit-full-screen::-webkit-media-controls-panel-background):
1522         (video:-webkit-full-screen::-webkit-media-controls-panel .volume-box):
1523         (video:-webkit-full-screen::-webkit-media-controls-play-button):
1524         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
1525         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
1526         (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
1527         (video:-webkit-full-screen::-webkit-media-controls-status-display):
1528         (audio::-webkit-media-controls-panel .volume-box:active): Deleted.
1529         * Modules/mediacontrols/mediaControlsApple.js:
1530         (Controller.prototype.createControls):
1531         (Controller.prototype.configureInlineControls): Add new divs for blurred background effect.
1532         (Controller.prototype.configureFullScreenControls): Ditto.
1533         (Controller.prototype.handlePanelMouseDown): The tint div is now in front.
1534         (Controller.prototype.drawTimelineBackground): Adjust colors to make border look better with new background.
1535         (Controller.prototype.drawVolumeBackground): Ditto.
1536
1537 2015-03-26  Geoffrey Garen  <ggaren@apple.com>
1538
1539         Assertion firing in JavaScriptCore/parser/parser.h for statesman.com site
1540         https://bugs.webkit.org/show_bug.cgi?id=142974
1541
1542         Reviewed by Joseph Pecoraro.
1543
1544         * bindings/js/JSLazyEventListener.cpp:
1545         (WebCore::JSLazyEventListener::initializeJSFunction): Use the new override
1546         line number API to guarantee that errors will map to the .html file locations
1547         that we like.
1548
1549         * bindings/js/ScriptController.cpp:
1550         (WebCore::ScriptController::eventHandlerPosition): Added a FIXME to cover
1551         some cases where our line and column numbers are still nonsense.
1552
1553 2015-03-26  Beth Dakin  <bdakin@apple.com>
1554
1555         Relevant repainted objects callback is inaccurate and inconsistent for PDF 
1556         documents
1557         https://bugs.webkit.org/show_bug.cgi?id=143118
1558         -and corresponding-
1559         rdar://problem/13371582
1560
1561         Reviewed by Tim Horton.
1562
1563         Investigating this bug resulted in finding two things that should change for the 
1564         relevant repainted objects heuristic. First, we should not count any objects 
1565         painted while updating control tints. And secondly, we should not use it at all 
1566         for plugin documents. In other documents, we count the plugin area as “painted” 
1567         when we get to paint whether or not the plugin has actually loaded. This is 
1568         intentional because it allows us to account for chunks of the page that will be 
1569         filled in by possibly slow-loading ads. However, if the plugin is the whole 
1570         document, then the heuristic just doesn’t make any sense and it leads to 
1571         inconsistent behavior at different window sizes. So we’ll only count plugins when 
1572         the document is not a plugin document. 
1573
1574         Don’t count objects during this paint!
1575         * page/FrameView.cpp:
1576         (WebCore::FrameView::updateControlTints):
1577         * page/Page.h:
1578         (WebCore::Page::setIsCountingRelevantRepaintedObjects):
1579
1580         Make sure the document is not a plugin document.
1581         * rendering/RenderEmbeddedObject.cpp:
1582         (WebCore::RenderEmbeddedObject::paint):
1583
1584 2015-03-26  Alex Christensen  <achristensen@webkit.org>
1585
1586         Progress towards CMake on Mac.
1587         https://bugs.webkit.org/show_bug.cgi?id=143112
1588
1589         Reviewed by Chris Dumez.
1590
1591         * CMakeLists.txt:
1592         * PlatformEfl.cmake:
1593         * PlatformGTK.cmake:
1594         * PlatformMac.cmake:
1595         * platform/graphics/mac/IconMac.mm:
1596
1597 2015-03-26  Jer Noble  <jer.noble@apple.com>
1598
1599         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
1600         https://bugs.webkit.org/show_bug.cgi?id=142970
1601
1602         Reviewed by Eric Carlson.
1603
1604         isMainThread() will (ironically) return true if called from the web thread. Rather than dispatch
1605         synchronously to the main thread to allocate the _volumeView, dispatch asynchronously and handle
1606         the case where the MPVolumeView has not yet been created.
1607
1608         * platform/audio/ios/MediaSessionManagerIOS.mm:
1609         (-[WebMediaSessionHelper allocateVolumeView]): Dispatch to the main thread to allocate. Move notification
1610             registration to -setVolumeView:.
1611         (-[WebMediaSessionHelper setVolumeView:]): Added. Register/Unregister for route availablitiy notifications.
1612         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Handle the possibility of a nil _volumeView.
1613
1614 2015-03-26  Benjamin Poulain  <bpoulain@apple.com>
1615
1616         Fix state maching debugging after r181964
1617         https://bugs.webkit.org/show_bug.cgi?id=143082
1618
1619         Reviewed by Alex Christensen.
1620
1621         * contentextensions/ContentExtensionCompiler.cpp:
1622         (WebCore::ContentExtensions::compileRuleList):
1623
1624 2015-03-25  David Hyatt  <hyatt@apple.com>
1625
1626         Improve the offsetWidth/Height layout optimization
1627         https://bugs.webkit.org/show_bug.cgi?id=143008
1628
1629         Reviewed by Zalan Bujtas.
1630
1631         * dom/Document.cpp:
1632         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
1633         * dom/Document.h:
1634         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
1635         the positioning restrictions on the optimization check.
1636
1637         * dom/Element.cpp:
1638         (WebCore::Element::offsetWidth):
1639         (WebCore::Element::offsetHeight):
1640         Change to use Element& instead of Element*.
1641
1642         (WebCore::Element::clientWidth):
1643         (WebCore::Element::clientHeight):
1644         (WebCore::Element::scrollWidth):
1645         (WebCore::Element::scrollHeight):
1646         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
1647
1648 2015-03-26  Brady Eidson  <beidson@apple.com>
1649
1650         Apply ContentExtension actions after redirects.
1651         <rdar://problem/20062613> and https://bugs.webkit.org/show_bug.cgi?id=143055
1652
1653         Reviewed by Alex Christensen.
1654
1655         Tests: http/tests/contentextensions/loading/main-resource-redirect-blocked.php
1656                http/tests/contentextensions/subresource-redirect-blocked.html
1657
1658         This patch moves the "run a URL against the content extension" code from CachedResourceLoader to
1659         the ContentExtensionsBackend.
1660
1661         That allows it to be shared between the CachedResourceLoader where loads are initiated and 
1662         ResourceLoader where redirects are handled.
1663
1664         * contentextensions/ContentExtension.cpp:
1665         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
1666
1667         * contentextensions/ContentExtensionsBackend.cpp:
1668         (WebCore::ContentExtensions::ContentExtensionsBackend::processContentExtensionRulesForLoad):
1669         (WebCore::ContentExtensions::ContentExtensionsBackend::displayNoneCSSRule):
1670         * contentextensions/ContentExtensionsBackend.h:
1671
1672         * loader/NetscapePlugInStreamLoader.cpp:
1673         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
1674
1675         * loader/ResourceLoadInfo.h:
1676
1677         * loader/ResourceLoader.cpp:
1678         (WebCore::ResourceLoader::ResourceLoader):
1679         (WebCore::ResourceLoader::willSendRequest):
1680         * loader/ResourceLoader.h:
1681
1682         * loader/SubresourceLoader.cpp:
1683         (WebCore::SubresourceLoader::SubresourceLoader):
1684
1685         * loader/cache/CachedResourceLoader.cpp:
1686         (WebCore::CachedResourceLoader::requestResource):
1687
1688         * page/UserContentController.cpp:
1689         (WebCore::UserContentController::processContentExtensionRulesForLoad):
1690         (WebCore::UserContentController::actionsForResourceLoad): Deleted.
1691         (WebCore::UserContentController::globalDisplayNoneStyleSheet): Deleted.
1692         (WebCore::UserContentController::displayNoneCSSRule): Deleted.
1693         * page/UserContentController.h:
1694
1695 2015-03-26  Myles C. Maxfield  <mmaxfield@apple.com>
1696
1697         Crash when laying out (char)0
1698         https://bugs.webkit.org/show_bug.cgi?id=143103
1699
1700         Reviewed by Dean Jackson.
1701
1702         We currently cache a character -> Font mapping in a HashMap.
1703         However, keys in Hashmaps can't be 0. This patch simply skips
1704         the cache in this case.
1705
1706         No new tests, for now. I'm having trouble creating a test because
1707         the site that causes this bug generates their page using script,
1708         and the script is all minified, and difficult to understand. I
1709         will contact the owner of the site and ask for and unminified
1710         version of their sources. However, I don't want to that to block
1711         this tiny fix from going in.
1712
1713         * platform/graphics/Font.cpp:
1714         (WebCore::Font::systemFallbackFontForCharacter):
1715
1716 2015-03-26  Jer Noble  <jer.noble@apple.com>
1717
1718         [Mac][EME] Crash at com.apple.WebCore: WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys + 177
1719         https://bugs.webkit.org/show_bug.cgi?id=143080
1720
1721         Reviewed by Eric Carlson.
1722
1723         Null-check m_certificate before dereferencing.
1724
1725         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
1726         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys):
1727
1728 2015-03-26  Chris Fleizach  <cfleizach@apple.com>
1729
1730         AX: [role="button"][aria-pressed] should be exposed as AXCheckbox:AXToggleButton, with role description of "toggle button"
1731         https://bugs.webkit.org/show_bug.cgi?id=115298
1732
1733         Reviewed by Mario Sanchez Prada.
1734
1735         A role=button + aria-pressed object should be exposed as AXCheckbox on Mac now. It should also convert the
1736         aria-pressed state into a 0, 1, 2 number value for the Mac.
1737
1738         Test: platform/mac/accessibility/aria-pressed-button-attributes.html
1739
1740         * accessibility/AccessibilityObject.cpp:
1741         (WebCore::AccessibilityObject::checkboxOrRadioValue):
1742         * accessibility/AccessibilityObject.h:
1743         (WebCore::AccessibilityObject::isToggleButton):
1744         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1745         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
1746         (createAccessibilityRoleMap):
1747         (-[WebAccessibilityObjectWrapper subrole]):
1748         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1749
1750 2015-03-25  Dean Jackson  <dino@apple.com>
1751
1752         CSS blend modes do not parse when in the shadow tree
1753         https://bugs.webkit.org/show_bug.cgi?id=143067
1754         <rdar://problem/20302662>
1755
1756         Reviewed by Anders Carlson.
1757
1758         The media controls style sheets are injected as UA stylesheets
1759         when we come across a <video> or <audio> element. These stylesheets
1760         have a different parsing context than the document stylesheets -
1761         one that uses the default constructor, which initializes some
1762         features like cssCompositingEnabled to false without checking
1763         the runtime state.
1764
1765         The easy fix is to use the global state to initialize the context.
1766
1767         Unfortunately we can't test this since it only occurs in the shadow
1768         tree.
1769
1770         * css/CSSParser.cpp:
1771         (WebCore::CSSParserContext::CSSParserContext): Check the state
1772         of RuntimeEnabledFeatures to initialize CSS Regions and
1773         CSS Compositing (Blending).
1774
1775 2015-03-25  Chris Fleizach  <cfleizach@apple.com>
1776
1777         AX: table cells that use display:block render the table inaccessible to VoiceOver
1778         https://bugs.webkit.org/show_bug.cgi?id=143007
1779
1780         Reviewed by Mario Sanchez Prada.
1781
1782         When display:block is used on a table cell, it was being ignored because it was anonymous.
1783         This is still a valid scenario however if it's still inside of a valid table.
1784
1785         Test: accessibility/table-cell-display-block.html
1786
1787         * accessibility/AccessibilityTableCell.cpp:
1788         (WebCore::AccessibilityTableCell::computeAccessibilityIsIgnored):
1789
1790 2015-03-25  Tim Horton  <timothy_horton@apple.com>
1791
1792         Add a preference to prevent "user-scalable=no" from having any effect
1793         https://bugs.webkit.org/show_bug.cgi?id=143032
1794
1795         Reviewed by Sam Weinig.
1796
1797         * page/ViewportConfiguration.cpp:
1798         (WebCore::ViewportConfiguration::ViewportConfiguration):
1799         (WebCore::ViewportConfiguration::allowsUserScaling):
1800         * page/ViewportConfiguration.h:
1801         (WebCore::ViewportConfiguration::setForceAlwaysUserScalable):
1802         If forceAlwaysUserScalable is set to true, force "user-scalable=yes".
1803
1804 2015-03-25  Dan Bernstein  <mitz@apple.com>
1805
1806         Another attempt to get the iOS EWS building again.
1807
1808         * WebCore.xcodeproj/project.pbxproj:
1809
1810 2015-03-25  Alex Christensen  <achristensen@webkit.org>
1811
1812         Add case-insensitive checks to DFA bytecode.
1813         https://bugs.webkit.org/show_bug.cgi?id=142977
1814
1815         Reviewed by Benjamin Poulain.
1816
1817         * contentextensions/DFABytecode.h:
1818         (WebCore::ContentExtensions::instructionSizeWithArguments):
1819         * contentextensions/DFABytecodeCompiler.cpp:
1820         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
1821         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValueRange):
1822         Add case-insensitive bytecode.
1823         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
1824         Check to see if case-insensitive bytecodes can be used.
1825         (WebCore::ContentExtensions::DFABytecodeCompiler::compileCheckForRange):
1826         * contentextensions/DFABytecodeCompiler.h:
1827         (WebCore::ContentExtensions::DFABytecodeCompiler::Range::Range):
1828         Added Range structure to be able to count the ranges in a future patch deciding if we want to use jump tables.
1829         * contentextensions/DFABytecodeInterpreter.cpp:
1830         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1831         Interpret case-insensitive bytecodes.
1832
1833 2015-03-25  Sam Weinig  <sam@webkit.org>
1834
1835         Address additional review feedback from https://bugs.webkit.org/show_bug.cgi?id=143059.
1836
1837         * contentextensions/ContentExtensionCompiler.cpp:
1838         (WebCore::ContentExtensions::compileRuleList):
1839         * contentextensions/ContentExtensionCompiler.h:
1840         * contentextensions/ContentExtensionParser.cpp:
1841         (WebCore::ContentExtensions::getTypeFlags):
1842
1843 2015-03-25  Sam Weinig  <sam@webkit.org>
1844
1845         [Content Extensions] Convert content extension compiling to return error codes and write its output using a client
1846         https://bugs.webkit.org/show_bug.cgi?id=143059
1847
1848         Reviewed by Alex Christensen.
1849
1850         * WebCore.xcodeproj/project.pbxproj:
1851         Add ContentExtensionError.h/cpp.
1852
1853         * contentextensions/ContentExtensionError.cpp: Added.
1854         (WebCore::ContentExtensions::contentExtensionErrorCategory):
1855         * contentextensions/ContentExtensionError.h: Added.
1856         (WebCore::ContentExtensions::make_error_code):
1857         Add ContentExtensionError enum and std::error_code adaptor.
1858
1859         * contentextensions/ContentExtensionCompiler.h:
1860         Instead of returning CompiledContentExtensionData, use a client interface
1861         to pass data. Eventually, this should be turned into a direct streaming 
1862         interface so we can write directly to a file.
1863
1864         * contentextensions/ContentExtensionCompiler.cpp:
1865         (WebCore::ContentExtensions::compileRuleList):
1866         * contentextensions/ContentExtensionParser.cpp:
1867         (WebCore::ContentExtensions::getTypeFlags):
1868         (WebCore::ContentExtensions::loadTrigger):
1869         (WebCore::ContentExtensions::loadAction):
1870         (WebCore::ContentExtensions::loadRule):
1871         (WebCore::ContentExtensions::loadEncodedRules):
1872         (WebCore::ContentExtensions::parseRuleList):
1873         * contentextensions/ContentExtensionParser.h:
1874         Convert to return an error.
1875
1876 2015-03-25  Beth Dakin  <bdakin@apple.com>
1877
1878         REGRESSION (r181660): Safari navigates to link after a starting and canceling a 
1879         force preview
1880         https://bugs.webkit.org/show_bug.cgi?id=143057
1881         -and corresponding-
1882         rdar://problem/20251436
1883
1884         Reviewed by Tim Horton.
1885
1886         This patch adds a value for ActionUpdated to the ImmediateActionStage enum. Now if 
1887         m_immediateActionStage indicates that an immediate action has either begun or 
1888         completed then we can have the same behavior.
1889         * page/EventHandler.cpp:
1890         (WebCore::EventHandler::handleMouseReleaseEvent):
1891         * page/EventHandler.h:
1892
1893 2015-03-25  Dean Jackson  <dino@apple.com>
1894
1895         MediaControls: Use font with fixed number width
1896         https://bugs.webkit.org/show_bug.cgi?id=143018
1897         <rdar://problem/20245415>
1898
1899         Reviewed by Eric Carlson.
1900
1901         Add a new font-family, specific to Apple platforms,
1902         called -apple-system-font-monospaced-numbers. This is
1903         a special variant of the system font which uses monospaced
1904         forms for the number glyphs - allowing a time reading that
1905         doesn't bounce around as the time changes.
1906
1907         * Modules/mediacontrols/mediaControlsApple.css: Media controls should
1908         use the new font.
1909         (audio::-webkit-media-controls-time-remaining-display):
1910         * Modules/mediacontrols/mediaControlsiOS.css:
1911         (audio::-webkit-media-controls-time-remaining-display):
1912
1913         * platform/graphics/ios/FontCacheIOS.mm: Request a new CTFontRef with
1914         the appropriate attributes.
1915         (WebCore::createCTFontWithFamilyNameAndWeight):
1916         * platform/graphics/mac/FontCacheMac.mm: Ditto, but NSFont.
1917         (WebCore::fontWithFamily):
1918         * platform/spi/cocoa/CoreTextSPI.h: Expose the constants for
1919         the new form so that the public SDK can build.
1920
1921 2015-03-25  Alex Christensen  <achristensen@webkit.org>
1922
1923         [Content Extensions] Add multi-DFA compiling and interpreting.
1924         https://bugs.webkit.org/show_bug.cgi?id=143010
1925
1926         Reviewed by Benjamin Poulain.
1927
1928         * contentextensions/ContentExtensionCompiler.cpp:
1929         (WebCore::ContentExtensions::compileRuleList):
1930         Compile multiple NFAs to DFAs.
1931         * contentextensions/ContentExtensionsBackend.cpp:
1932         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
1933         Fixed a bug when there are no non-universal actions.
1934         We still need to report that no ignore-previous-rules was hit to apply the
1935         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
1936         and skipped in DFABytecodeInterpreter::interpret.
1937         * contentextensions/DFABytecodeCompiler.cpp:
1938         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
1939         Add a header for each DFA.
1940         * contentextensions/DFABytecodeInterpreter.cpp:
1941         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
1942         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1943         Interpret as many DFAs as there are in the bytecode.
1944
1945 2015-03-25  Per Arne Vollan  <peavo@outlook.com>
1946
1947         [Win] Illegal character in project file.
1948         https://bugs.webkit.org/show_bug.cgi?id=143051
1949
1950         Reviewed by Brent Fulgham.
1951
1952         There is an illegal character in the WebCore project filter.
1953         WebCore files are shown unfiltered.
1954
1955         * WebCore.vcxproj/WebCore.vcxproj.filters:
1956
1957 2015-03-25  David Hyatt  <hyatt@apple.com>
1958
1959         Add a pref to enable the new block-inside-inline model
1960         https://bugs.webkit.org/show_bug.cgi?id=143050
1961
1962         Reviewed by Sam Weinig.
1963
1964         * page/Settings.in:
1965
1966 2015-03-25  Dan Bernstein  <mitz@apple.com>
1967
1968         iOS Simulator build fix.
1969
1970         * platform/spi/cocoa/IOSurfaceSPI.h:
1971
1972 2015-03-25  Commit Queue  <commit-queue@webkit.org>
1973
1974         Unreviewed, rolling out r181932.
1975         https://bugs.webkit.org/show_bug.cgi?id=143041
1976
1977         The test fails most of the time on bots (Requested by ap on
1978         #webkit).
1979
1980         Reverted changeset:
1981
1982         "[Content Extensions] Add multi-DFA compiling and
1983         interpreting."
1984         https://bugs.webkit.org/show_bug.cgi?id=143010
1985         http://trac.webkit.org/changeset/181932
1986
1987 2015-03-24  Dean Jackson  <dino@apple.com>
1988
1989         Source/WebCore/rendering/RenderThemeMac.mm:2181:118: error: null passed to a callee that requires a non-null argument [-Werror,-Wnonnull]
1990         https://bugs.webkit.org/show_bug.cgi?id=143039
1991
1992         Unreviewed build fix for newer versions of OS X.
1993
1994         * rendering/RenderThemeMac.mm: Define a null language parameter. This
1995         seemed better than turning the clang warning off for just that
1996         function.
1997         (WebCore::AttachmentLayout::layOutTitle):
1998         (WebCore::AttachmentLayout::layOutSubtitle):
1999
2000 2015-03-24  Dan Bernstein  <mitz@apple.com>
2001
2002         Another attempt to fix the build.
2003
2004         * WebCore.xcodeproj/project.pbxproj:
2005         * platform/spi/cocoa/QuartzCoreSPI.h:
2006
2007 2015-03-24  Alex Christensen  <achristensen@webkit.org>
2008
2009         [Content Extensions] Add multi-DFA compiling and interpreting.
2010         https://bugs.webkit.org/show_bug.cgi?id=143010
2011
2012         Reviewed by Benjamin Poulain.
2013
2014         * contentextensions/ContentExtensionCompiler.cpp:
2015         (WebCore::ContentExtensions::compileRuleList):
2016         Compile multiple NFAs to DFAs.
2017         * contentextensions/ContentExtensionsBackend.cpp:
2018         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2019         Fixed a bug when there are no non-universal actions.
2020         We still need to report that no ignore-previous-rules was hit to apply the
2021         universal actions which are now accessed through DFABytecodeInterpreter::actionsFromDFARoot
2022         and skipped in DFABytecodeInterpreter::interpret.
2023         * contentextensions/DFABytecodeCompiler.cpp:
2024         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
2025         Add a header for each DFA.
2026         * contentextensions/DFABytecodeInterpreter.cpp:
2027         (WebCore::ContentExtensions::DFABytecodeInterpreter::actionsFromDFARoot):
2028         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2029         Interpret as many DFAs as there are in the bytecode.
2030
2031 2015-03-24  Dan Bernstein  <mitz@apple.com>
2032
2033         Tried to fix the EWS build.
2034
2035         * platform/spi/cocoa/QuartzCoreSPI.h:
2036
2037 2015-03-24  Commit Queue  <commit-queue@webkit.org>
2038
2039         Unreviewed, rolling out r181898 and r181909.
2040         https://bugs.webkit.org/show_bug.cgi?id=143034
2041
2042         Broke fast/regions/auto-size/autoheight-two-pass-layout-
2043         complex-002.html (Requested by ap on #webkit).
2044
2045         Reverted changesets:
2046
2047         "Improve the offsetWidth/Height layout optimization"
2048         https://bugs.webkit.org/show_bug.cgi?id=143008
2049         http://trac.webkit.org/changeset/181898
2050
2051         "Disable layout dimensions optimization for RenderRegions"
2052         https://bugs.webkit.org/show_bug.cgi?id=143017
2053         http://trac.webkit.org/changeset/181909
2054
2055 2015-03-24  Zhuo Li  <zachli@apple.com>
2056
2057         Scripts running in isolated world should not subject to a page's CSP about 'eval'.
2058         https://bugs.webkit.org/show_bug.cgi?id=141316.
2059
2060         Reviewed by Geoffrey Garen.
2061
2062         * bindings/js/ScriptController.cpp:
2063         (WebCore::ScriptController::initScript):
2064         We should not impose the main world Content Security Policy onto the isolated world.
2065
2066 2015-03-24  Chris Dumez  <cdumez@apple.com>
2067
2068         [Mac] Use .cpp file extension instead of .mm for SharedTimerCF and PowerObserverMac
2069         https://bugs.webkit.org/show_bug.cgi?id=143026
2070
2071         Reviewed by Andy Estes.
2072
2073         Use .cpp file extension instead of .mm for SharedTimerCF and
2074         PowerObserverMac.
2075
2076         * WebCore.xcodeproj/project.pbxproj:
2077         * platform/cf/SharedTimerCF.cpp: Renamed from Source/WebCore/platform/cf/SharedTimerCF.mm.
2078         (WebCore::timerFired):
2079         Use WTF::AutodrainedPool instead of @autoreleasepool {}.
2080
2081         * platform/mac/PowerObserverMac.cpp: Renamed from Source/WebCore/platform/mac/PowerObserverMac.mm.
2082
2083 2015-03-24  Yusuke Suzuki  <utatane.tea@gmail.com>
2084
2085         REGRESSION (r181458): Heap use-after-free in JSSetIterator destructor
2086         https://bugs.webkit.org/show_bug.cgi?id=142696
2087
2088         Reviewed and tweaked by Geoffrey Garen.
2089
2090         Use JSSetIterator/JSMapIterator to iterate over JSSet and JSMap.
2091
2092         * ForwardingHeaders/runtime/JSMapIterator.h: Added.
2093         * ForwardingHeaders/runtime/JSSetIterator.h: Added.
2094         * bindings/js/SerializedScriptValue.cpp:
2095         (WebCore::CloneSerializer::serialize):
2096
2097 2015-03-24  Dan Bernstein  <mitz@apple.com>
2098
2099         Tried to fix the iOS Simulator build.
2100
2101         * platform/spi/cocoa/QuartzCoreSPI.h:
2102
2103 2015-03-24  Benjamin Poulain  <bpoulain@apple.com>
2104
2105         Make URL filter patterns matching consistent and add a simple canonicalization step
2106         https://bugs.webkit.org/show_bug.cgi?id=142998
2107
2108         Reviewed by Alex Christensen.
2109
2110         This patch makes two changes to the url filter input:
2111         -Make the matching "Search" by default, the pattern can now appear anywhere
2112          in the URL by default.
2113         -Make the input a little less fragile: do not explode on valid input
2114          that is not formatted in a certain way.
2115
2116         To implement the search behavior, I simply add an implict ".*" in front of the patterns
2117         when that make sense.
2118
2119         To make the input more solid, we do some little modification on the input:
2120         -Remove duplicated ".*".
2121         -Remove matching suffixes that do not bring new information.
2122         -Unify all the ".*" in the same format.
2123
2124         Why do that here? That should be done through a graph analysis on the machine.
2125
2126         The reason is this is incredibly cheap compared to the graph analysis. Any state
2127         removed upfront will save the handling of several hundred nodes in the deterministic
2128         graph.
2129
2130         * contentextensions/URLFilterParser.cpp:
2131         (WebCore::ContentExtensions::Term::isKnownToMatchAnyString):
2132         (WebCore::ContentExtensions::Term::isUniversalTransition):
2133         (WebCore::ContentExtensions::GraphBuilder::finalize):
2134         (WebCore::ContentExtensions::GraphBuilder::assertionBOL):
2135         (WebCore::ContentExtensions::GraphBuilder::fail):
2136         (WebCore::ContentExtensions::GraphBuilder::simplifySunkTerms):
2137
2138 2015-03-24  Chris Dumez  <cdumez@apple.com>
2139
2140         Regression(r181671): Caused Timer-related crashes on iOS / WK1
2141         https://bugs.webkit.org/show_bug.cgi?id=143025
2142
2143         Reviewed by Andy Estes.
2144
2145         Call CFRunLoopAddTimer() on WebThreadRunLoop() instead of
2146         CFRunLoopGetCurrent() for iOS, as we did before r181671.
2147
2148         I inadvertently changed this in r181671 when merging the Mac
2149         and iOS implementations.
2150
2151         No new tests, already covered by existing tests.
2152
2153         * platform/cf/SharedTimerCF.mm:
2154         (WebCore::setSharedTimerFireInterval):
2155
2156 2015-03-24  Dan Bernstein  <mitz@apple.com>
2157
2158         WebCore part of <rdar://problem/20282863> Transforms are flattened in snapshots of on-screen WKWebViews
2159         https://bugs.webkit.org/show_bug.cgi?id=143023
2160
2161         Reviewed by Tim Horton.
2162
2163         * platform/spi/cocoa/QuartzCoreSPI.h: Added the declaration of
2164         CARenderServerRenderLayerWithTransform.
2165
2166 2015-03-24  David Hyatt  <hyatt@apple.com>
2167
2168         Disable layout dimensions optimization for RenderRegions
2169         https://bugs.webkit.org/show_bug.cgi?id=143017
2170
2171         Reviewed by Dean Jackson.
2172
2173         * dom/Document.cpp:
2174         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
2175         Turn off the optimization for regions, since auto height regions can change size
2176         without needing a layout.
2177
2178 2015-03-24  Beth Dakin  <bdakin@apple.com>
2179
2180         Add events related to force click gesture
2181         https://bugs.webkit.org/show_bug.cgi?id=142836
2182         -and corresponding-
2183         rdar://problem/20210239
2184
2185         Reviewed by Dean Jackson.
2186
2187         This patch adds six new events for the force click gesture:
2188
2189         webkitmouseforcewillbegin -> Event is sent just before mousedown to indicate that 
2190         force can be perceived if the user presses any harder. The author should prevent 
2191         default on this event to both prevent the user agent’s default force click 
2192         features and to receive the other 5 events.
2193
2194         webkitmouseforcechanged -> This event fires whenever force changes between the 
2195         mousedown and mouseup. It is a new type of mouse event that includes a force 
2196         variable which is a normalized number between 0 (corresponds to click) and 1 
2197         (corresponds to force click). In this patch, I have only added code to send this 
2198         event between mousedown and mouseforcedown, but as a followup patch, we plan to 
2199         send it through mouseup.
2200
2201         webkitmouseforcecancelled -> If the user releases their finger from the trackpad 
2202         after pressing hard enough to send webkitmouseforcewillbegin events but not hard 
2203         enough to force click, this event will be sent to indicate that the user bailed 
2204         out on the gesture.
2205
2206         webkitmouseforcedown -> The down part of the force click.
2207
2208         webkitmouseforceup -> The up part of the force click. This event is added in this 
2209         patch, but does not yet fire. That is work for a follow-up patch.
2210
2211         webkitmouseforceclick -> The equivalent of the click event for the force click. 
2212         Should fire just after webkitmouseforceup. This event is added in this patch, but 
2213         does not yet fire. That is work for a follow-up patch.
2214
2215         Add new files for WebKitMouseForceEvent to build systems.
2216         * DerivedSources.cpp:
2217         * DerivedSources.make:
2218         * WebCore.vcxproj/WebCore.vcxproj:
2219         * WebCore.vcxproj/WebCore.vcxproj.filters:
2220         * WebCore.xcodeproj/project.pbxproj:
2221         * WebCore.xcodeproj/project.pbxproj:
2222
2223         Plumbing for new events.
2224         * dom/Document.idl:
2225
2226         Code to dispatch the new events. Currently the code that calls these functions is 
2227         in WebKit2.
2228         * dom/Element.cpp:
2229         (WebCore::Element::dispatchMouseForceWillBegin):
2230         (WebCore::Element::dispatchMouseForceChanged):
2231         (WebCore::Element::dispatchMouseForceDown):
2232         (WebCore::Element::dispatchMouseForceUp):
2233         (WebCore::Element::dispatchMouseForceClick):
2234         (WebCore::Element::dispatchMouseForceCancelled):
2235         * dom/Element.h:
2236
2237         More plumbing.
2238         * dom/Element.idl:
2239         * dom/EventNames.h:
2240         * dom/EventNames.in:
2241
2242         Our new type of mouse event that includes force.
2243         * dom/WebKitMouseForceEvent.cpp: Added.
2244         (WebCore::WebKitMouseForceEventInit::WebKitMouseForceEventInit):
2245         (WebCore::WebKitMouseForceEvent::WebKitMouseForceEvent):
2246         (WebCore::WebKitMouseForceEvent::~WebKitMouseForceEvent):
2247         (WebCore::WebKitMouseForceEvent::eventInterface):
2248         * dom/WebKitMouseForceEvent.h: Added.
2249         * dom/WebKitMouseForceEvent.idl: Added.
2250
2251         More plumbing.
2252         * html/HTMLAttributeNames.in:
2253         * html/HTMLBodyElement.cpp:
2254         (WebCore::HTMLBodyElement::createWindowEventHandlerNameMap):
2255         * html/HTMLBodyElement.idl:
2256         * html/HTMLElement.cpp:
2257         (WebCore::HTMLElement::createEventHandlerNameMap):
2258         * page/DOMWindow.idl:
2259         * page/EventHandler.h:
2260         (WebCore::EventHandler::lastMouseDownEvent):
2261
2262 2015-03-24  Anders Carlsson  <andersca@apple.com>
2263
2264         Fix designated initializer violations
2265         https://bugs.webkit.org/show_bug.cgi?id=143016
2266         rdar://problem/20268858
2267
2268         Reviewed by Dan Bernstein.
2269
2270         Mark -[DOMObject init] as unavailable.
2271
2272         * bindings/objc/DOMObject.h:
2273         * bindings/objc/DOMObject.mm:
2274         (-[DOMObject init]):
2275
2276 2015-03-24  Benjamin Poulain  <benjamin@webkit.org>
2277
2278         CSS Selectors Level 4: enable case-insensitive attribute matching by default
2279         https://bugs.webkit.org/show_bug.cgi?id=142960
2280
2281         Reviewed by Andreas Kling.
2282
2283         All open issues have been resolved, enable the feature by default.
2284
2285         Test: fast/css/attribute-selector-case-insensitive.html
2286
2287         * css/CSSGrammar.y.in:
2288
2289 2015-03-24  Dean Jackson  <dino@apple.com>
2290
2291         MediaControls: Scrubber and Time displays have the incorrect blending
2292         https://bugs.webkit.org/show_bug.cgi?id=143011
2293         <rdar://problem/20245251>
2294
2295         Reviewed by Eric Carlson.
2296
2297         The scrubber in media controls should use plus-darker blending. Then
2298         the scrubber itself should use a slightly transparent black (55% opacity)
2299         when drawing.
2300
2301         * Modules/mediacontrols/mediaControlsiOS.css:
2302         (audio::-webkit-media-controls-timeline): Add the blend mode.
2303         * Modules/mediacontrols/mediaControlsiOS.js:
2304         (ControllerIOS.prototype.drawTimelineBackground): Start drawing with
2305         transparency. I changed the order of rendering to make it
2306         more clear we draw the three parts in left to right order.
2307
2308 2015-03-24  David Hyatt  <hyatt@apple.com>
2309
2310         Improve the offsetWidth/Height layout optimization
2311         https://bugs.webkit.org/show_bug.cgi?id=143008
2312
2313         Reviewed by Dean Jackson.
2314
2315         * dom/Document.cpp:
2316         (WebCore::Document::updateLayoutIfDimensionsOutOfDate):
2317         * dom/Document.h:
2318         Change Element* to Element&. Clean up the dimension bits to use shifting. Remove both the inline and
2319         the positioning restrictions on the optimization check.
2320
2321         * dom/Element.cpp:
2322         (WebCore::Element::offsetWidth):
2323         (WebCore::Element::offsetHeight):
2324         Change to use Element& instead of Element*.
2325
2326         (WebCore::Element::clientWidth):
2327         (WebCore::Element::clientHeight):
2328         (WebCore::Element::scrollWidth):
2329         (WebCore::Element::scrollHeight):
2330         Turn on the optimization for clientWidth/Height and scrollWidth/Height.
2331
2332 2015-03-24  Yoav Weiss  <yoav@yoav.ws>
2333
2334         Stop image from displaying when src attribute is removed or emptied
2335         https://bugs.webkit.org/show_bug.cgi?id=142677
2336
2337         Reviewed by Chris Dumez.
2338
2339         Previously, we ignored empty attribute as failed URL, and didn't update the
2340         renderer when an image was removed. This patch fixes that.
2341
2342         Tests: fast/dom/HTMLImageElement/image-empty-src.html
2343                fast/dom/HTMLImageElement/image-remove-src.html
2344
2345         * loader/ImageLoader.cpp:
2346         (WebCore::ImageLoader::updateFromElement):
2347
2348 2015-03-17  Philippe Normand  <pnormand@igalia.com>
2349
2350         [OpenWebRTC] RealtimeMediaSourceCenter implementation
2351         https://bugs.webkit.org/show_bug.cgi?id=142476
2352
2353         Reviewed by Eric Carlson.
2354
2355         The old GStreamer MediaStreamCenter is replaced by the OpenWebRTC
2356         RealtimeMediaSourceCenter. It is not yet able to correctly assess
2357         MediaConstraints so it selects the first audio/video sources
2358         available through OpenWebRTC.
2359
2360         * PlatformEfl.cmake: Add new files to the build.
2361         * PlatformGTK.cmake: Ditto.
2362         * platform/mediastream/gstreamer/MediaStreamCenterGStreamer.cpp: Removed.
2363         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp: Added.
2364         (WebCore::initializeOpenWebRTC): Simple function to initialize the
2365         framework, it is going to be used by the PeerConnection backend as well.
2366         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.h: Added.
2367         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp: Added.
2368         (WebCore::mediaSourcesAvailableCallback): Function invoked once
2369         the media sources discovery succeeded within OpenWebRTC.
2370         (WebCore::RealtimeMediaSourceCenter::platformCenter): Instantiate
2371         the OpenWebRTC RealtimeMediaSourceCenter.
2372         (WebCore::RealtimeMediaSourceCenterOwr::RealtimeMediaSourceCenterOwr):
2373         (WebCore::RealtimeMediaSourceCenterOwr::~RealtimeMediaSourceCenterOwr):
2374         (WebCore::RealtimeMediaSourceCenterOwr::validateRequestConstraints):
2375         Schedule a discovery process for the capture sources.
2376         (WebCore::RealtimeMediaSourceCenterOwr::createMediaStream): Pick
2377         the first audio/video sources and create a MediaStream accordingly.
2378         (WebCore::RealtimeMediaSourceCenterOwr::getMediaStreamTrackSources):
2379         Not yet implemented.
2380         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
2381         Method invoked once the capture sources process succeeded. Parse
2382         them and create an internal cache of RealtimeMediaSources accordingly.
2383         (WebCore::RealtimeMediaSourceCenterOwr::firstSource): Utility
2384         function to fetch the first source of the given type from the
2385         RealtimeMediaSources cache.
2386         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.h: Renamed from Source/WebCore/platform/mediastream/gstreamer/MediaStreamCenterGStreamer.h.
2387         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h: Added.
2388
2389 2015-03-24  Csaba Osztrogonác  <ossy@webkit.org>
2390
2391         [EFL] Add OpenWebRTC in jhbuild
2392         https://bugs.webkit.org/show_bug.cgi?id=142778
2393
2394         Reviewed by Gyuyoung Kim.
2395
2396         Original patch by Philippe Normand <pnormand@igalia.com>
2397
2398         * PlatformEfl.cmake: Add OpenWebRTC CFLAGS and LDFLAGS.
2399
2400 2015-03-23 Yoav Weiss  <yoav@yoav.ws>
2401
2402         Update empty image canvas tests and fix a related bug
2403         https://bugs.webkit.org/show_bug.cgi?id=142694
2404
2405         Reviewed by Chris Dumez.
2406
2407         During the work on https://bugs.webkit.org/show_bug.cgi?id=142677
2408         we encountered an issue with canvas tests related to empty image handling
2409         when drawn or used as a pattern. After updating these tests, an issue with
2410         pattern handling was encountered.
2411
2412         The spec, as well as Chrome's implementation, say that when an empty image
2413         is used as a pattern, createPattern should return null. See
2414         https://html.spec.whatwg.org/multipage/scripting.html#fill-and-stroke-styles:check-the-usability-of-the-image-argument
2415         Instead, createPattern returned an exception in this case.
2416         This patch fixes that and makes sure that it returns a null when image loading hasn't started.
2417
2418         Tests: canvas/philip/tests/2d.drawImage.incomplete.emptysrc.html
2419                canvas/philip/tests/2d.drawImage.incomplete.nosrc.html
2420                canvas/philip/tests/2d.drawImage.incomplete.removedsrc.html
2421                canvas/philip/tests/2d.pattern.image.incomplete.emptysrc.html
2422                canvas/philip/tests/2d.pattern.image.incomplete.removedsrc.html
2423
2424         * html/canvas/CanvasRenderingContext2D.cpp:
2425         (WebCore::CanvasRenderingContext2D::createPattern): Return "null" if image is not fully decodeable.
2426
2427 2015-03-23  Alex Christensen  <achristensen@webkit.org>
2428
2429         Fix api tests after r181876.
2430
2431         * contentextensions/ContentExtensionsBackend.cpp:
2432         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2433         Always append a CSSDisplayNoneStyleSheet action if no ignore-previous-rules is seen.
2434         * loader/cache/CachedResourceLoader.cpp:
2435         (WebCore::CachedResourceLoader::requestResource):
2436         Changed an assertion to a null check.
2437
2438 2015-03-23  Dean Jackson  <dino@apple.com>
2439
2440         Timelines are sharing the same canvas background
2441         https://bugs.webkit.org/show_bug.cgi?id=142994
2442         <rdar://problem/20209466>
2443
2444         Reviewed by Brent Fulgham.
2445
2446         Since each MediaControl lives in an isolated world, we
2447         can't rely on a global variable to provide a unique
2448         identifier for a named canvas. The fix is to expose
2449         WebCore's UUID generator, and have each canvas use
2450         that for a name.
2451
2452         * Modules/mediacontrols/MediaControlsHost.cpp:
2453         (WebCore::MediaControlsHost::generateUUID): New method on the
2454         MediaControlsHost that generates a UUID.
2455         * Modules/mediacontrols/MediaControlsHost.h:
2456         * Modules/mediacontrols/MediaControlsHost.idl:
2457
2458         * Modules/mediacontrols/mediaControlsApple.js: Remove the global
2459         variable unique ID that wasn't working, and instead get
2460         an ID from the MediaControlsHost.
2461         (Controller.prototype.createControls):
2462         * Modules/mediacontrols/mediaControlsiOS.js:
2463         (ControllerIOS):
2464
2465 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
2466
2467         Scroll latching logic can get stuck in 'scrollable="no"' iframes
2468         https://bugs.webkit.org/show_bug.cgi?id=142789
2469         <rdar://problem/20129494>
2470
2471         Reviewed by Dean Jackson.
2472
2473         Clean up the EventHandler and latching code as follows:
2474         (1) Do not handle iframe elements as part of the normal latching logic. Instead, iframes should
2475             be evaluated during the 'platformCompleteWheelEvent' phase of processing as top-level scrolling
2476             frames.
2477         (2) Get rid of the ill-conceived notation that we should process non-mainframe and main-frame frames
2478             different.
2479         (3) Modify code to reflect that the scroll latching code really deals with overflow scrolling. Consequently,
2480             the 'findEnclosingScrollableContainer' was renamed to 'findEnclosingOverflowScroll' and does not
2481             treat iframe as a suitable target.
2482         (4) Do not create a latching state object when the container being evaluated is already scrolled to the
2483             extreme position in the direction of the mouse gesture. In this case, we want the enclosing frame
2484             to be the latching target.
2485         (5) Do not treat the state where the mouse wheel gesture has ended manual scrolling, but has not ended
2486             momentum scrolling, as an appropriate time to select a latching target.
2487
2488         * page/EventHandler.cpp:
2489         (WebCore::EventHandler::platformCompleteWheelEvent): Modify signature to remove unneeded argument.
2490         (WebCore::EventHandler::handleWheelEvent): Modify call to 'platformCompleteWheelEvent' to remove unused argument.
2491         * page/EventHandler.h:
2492         * page/mac/EventHandlerMac.mm:
2493         (WebCore::findEnclosingOverflowScroll): Renamed from 'findEnclosingScrollableContainer' and revised per the
2494         notes above.
2495         (WebCore::EventHandler::platformPrepareForWheelEvents): Remove mainFrame vs. non-mainFrame code paths and
2496         consolidate logic.
2497         (WebCore::EventHandler::platformCompleteWheelEvent): Remove unused argument. The wheel event target is no
2498         longer needed here, now that iframes are not processed by this code.
2499         (WebCore::findEnclosingScrollableContainer): Deleted.
2500         * page/scrolling/ScrollLatchingState.cpp:
2501         (WebCore::ScrollLatchingState::setPreviousWheelScrolledElement:) Switch to move operator for passing
2502         a temporary RefPtr to the the function.
2503         * page/scrolling/ScrollLatchingState.h:
2504         * platform/PlatformWheelEvent.h:
2505         (WebCore::PlatformWheelEvent::useLatchedEventElement): Recognize 'phase=ended, momentum=none' as a state
2506         that should not cause latching state to be revised.
2507
2508 2015-03-23  Anders Carlsson  <andersca@apple.com>
2509
2510         Try to fix the iOS build.
2511
2512         * platform/network/mac/CookieJarMac.mm:
2513
2514 2015-03-23  Brady Eidson  <beidson@apple.com>
2515
2516         Content extensions should apply css selectors
2517         https://bugs.webkit.org/show_bug.cgi?id=142604
2518
2519         Reviewed by Alex Christensen.
2520
2521         Tests: http/tests/contentextensions/css-display-none.html
2522
2523         * WebCore.xcodeproj/project.pbxproj:
2524
2525         * contentextensions/ContentExtension.cpp:
2526         (WebCore::ContentExtensions::ContentExtension::create):
2527         (WebCore::ContentExtensions::ContentExtension::ContentExtension):
2528         (WebCore::ContentExtensions::ContentExtension::globalDisplayNoneStyleSheet):
2529         * contentextensions/ContentExtension.h:
2530         (WebCore::ContentExtensions::ContentExtension::identifier):
2531         (WebCore::ContentExtensions::ContentExtension::compiledExtension):
2532
2533         * contentextensions/ContentExtensionsBackend.cpp:
2534         (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
2535         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForResourceLoad):
2536         (WebCore::ContentExtensions::ContentExtensionsBackend::globalDisplayNoneStyleSheet):
2537         * contentextensions/ContentExtensionsBackend.h:
2538
2539         * contentextensions/DFABytecodeInterpreter.cpp:
2540         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
2541
2542         * dom/DocumentStyleSheetCollection.cpp:
2543         (WebCore::DocumentStyleSheetCollection::maybeAddContentExtensionSheet):
2544         * dom/DocumentStyleSheetCollection.h:
2545
2546         * loader/DocumentLoader.cpp:
2547         (WebCore::DocumentLoader::commitData):
2548         (WebCore::DocumentLoader::startLoadingMainResource):
2549         (WebCore::DocumentLoader::addPendingContentExtensionSheet):
2550         * loader/DocumentLoader.h:
2551
2552         * loader/cache/CachedResourceLoader.cpp:
2553         (WebCore::CachedResourceLoader::requestResource):
2554
2555         * loader/cache/CachedResourceRequest.cpp:
2556         (WebCore::CachedResourceRequest::setInitiator):
2557         * loader/cache/CachedResourceRequest.h:
2558         (WebCore::CachedResourceRequest::initiatingDocumentLoader):
2559
2560         * page/UserContentController.cpp:
2561         (WebCore::UserContentController::globalDisplayNoneStyleSheet):
2562         (WebCore::UserContentController::displayNoneCSSRule):
2563         * page/UserContentController.h:
2564
2565 2015-03-23  Anders Carlsson  <andersca@apple.com>
2566
2567         -[_WKWebsiteDataStore removeDataOfTypes:modifiedSince:completionHandler:] doesn't remove cookies
2568         https://bugs.webkit.org/show_bug.cgi?id=142990
2569         rdar://problem/20241645
2570
2571         Reviewed by Andreas Kling.
2572
2573         Use the Mac version of deleteAllCookiesModifiedSince on iOS as well.
2574
2575         * platform/network/cf/CookieJarCFNet.cpp:
2576         * platform/network/mac/CookieJarMac.mm:
2577
2578 2015-03-23  Conrad Shultz  <conrad_shultz@apple.com>
2579
2580         Replace uses of kCTFontSystemFontType
2581         https://bugs.webkit.org/show_bug.cgi?id=142984
2582
2583         Reviewed by Tim Horton.
2584
2585         * rendering/RenderThemeMac.mm:
2586         (WebCore::AttachmentLayout::layOutTitle):
2587         (WebCore::AttachmentLayout::layOutSubtitle):
2588
2589 2015-03-23  Dean Jackson  <dino@apple.com>
2590
2591         kCTFontSystemFontType is deprecated in CoreText
2592         https://bugs.webkit.org/show_bug.cgi?id=142981
2593         <rdar://problem/20261171>
2594
2595         Reviewed by Beth Dakin.
2596
2597         Update to the non-deprecated version.
2598
2599         * rendering/RenderThemeIOS.mm: kCTFontSystemFontType -> kCTFontUIFontSystem
2600         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2601
2602 2015-03-23  Eric Carlson  <eric.carlson@apple.com>
2603
2604         [Mac] Enable fullscreen for MSE-based videos
2605         https://bugs.webkit.org/show_bug.cgi?id=142971
2606
2607         Reviewed by Jer Noble.
2608
2609         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2610         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::supportsFullscreen): Return true;
2611
2612 2015-03-23  Alex Christensen  <achristensen@webkit.org>
2613
2614         [MediaFoundation] Implement seek.
2615         https://bugs.webkit.org/show_bug.cgi?id=142594
2616
2617         Reviewed by Darin Adler.
2618
2619         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2620         (WebCore::MediaPlayerPrivateMediaFoundation::seeking):
2621         (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
2622         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
2623         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2624
2625 2015-03-23  Dan Bernstein  <mitz@apple.com>
2626
2627         Fixed the build.
2628
2629         * platform/graphics/cocoa/FontCocoa.mm:
2630         (WebCore::Font::platformBoundsForGlyph): Switched to non-deprecated CTFontOrientation values.
2631         (WebCore::Font::platformWidthForGlyph): Ditto.
2632
2633 2015-03-23  Jer Noble  <jer.noble@apple.com>
2634
2635         [iOS] Accessibility crashing because MediaPlayer is laying out UI off the main thread
2636         https://bugs.webkit.org/show_bug.cgi?id=142970
2637
2638         Reviewed by Eric Carlson.
2639
2640         Return early after synchronously calling to the main thread to allocate the volume
2641         view, to avoid re-allocating the volume view again on the web thread.
2642
2643         * platform/audio/ios/MediaSessionManagerIOS.mm:
2644         (-[WebMediaSessionHelper allocateVolumeView]):
2645
2646 2015-03-23  Tim Horton  <timothy_horton@apple.com>
2647
2648         Add a share item to the link action menu
2649         https://bugs.webkit.org/show_bug.cgi?id=142961
2650         <rdar://problem/19198374>
2651
2652         Reviewed by Beth Dakin.
2653
2654         * English.lproj/Localizable.strings:
2655         Remove some now-unused strings.
2656
2657         * platform/spi/mac/NSMenuSPI.h:
2658         Add some SPI.
2659
2660 2015-03-23  David Kilzer  <ddkilzer@apple.com>
2661
2662         [iOS] Build fix: CoreText deprecated kCTFontSystemFontType
2663
2664         Fix tracked by:  <rdar://problem/20261171>
2665
2666         * rendering/RenderThemeIOS.mm:
2667         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2668         Add clang pragmas.
2669
2670 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
2671
2672         Unreviewed test fix.
2673
2674         * css/CSSParser.cpp:
2675         (WebCore::CSSParser::parseScrollSnapDestination): Remove new assertion.
2676
2677 2015-03-23  Brent Fulgham  <bfulgham@apple.com>
2678
2679         scroll-snap-destination and scroll-snap-coordinate do not seem to work together properly
2680         https://bugs.webkit.org/show_bug.cgi?id=142552
2681         <rdar://problem/20114743>
2682
2683         Reviewed by Dean Jackson.
2684
2685         Revise the snap point logic as follows:
2686         (1) Put the snap point destination handling in a helper function to make the rest of the code
2687             easier to read.
2688         (2) Make sure we always have a left-hand snap point (i.e., position 0), but don't add multiple
2689             left-hand snap points.
2690         (3) Create a helper function to determine if we should be working with the scroll snap 'elements'
2691             behavior. We want to use this for scroll-snap-destination/scroll-snap-coordinate markup.
2692         (4) Create per-element snap point offsets when using scroll-snap-destination/scroll-snap-coordinate.
2693
2694         * css/CSSParser.cpp:
2695         (WebCore::CSSParser::parseScrollSnapDestination): Add assertion to try to catch bad parser state.
2696         * page/scrolling/AxisScrollSnapOffsets.cpp:
2697         (WebCore::destinationOffsetForViewSize): Added helper function to consolidate logic for handling
2698         destination coordinates.
2699         (WebCore::updateFromStyle): Make sure a left-hand snap point is always provided.
2700         (WebCore::styleUsesElements): Added helper function.
2701         (WebCore::updateSnapOffsetsForScrollableArea): Revise logic to generate 'per-element' snap point
2702         offsets.
2703
2704 2015-03-23  Yoav Weiss  <yoav@yoav.ws>
2705
2706         Refactor ImageLoader's setting of CachedImage
2707         https://bugs.webkit.org/show_bug.cgi?id=142825
2708
2709         Reviewed by Chris Dumez.
2710
2711         No new tests, since there's no functional change.
2712
2713         setImage and setImageWithoutConsideringPendingLoadEvent were not called with new
2714         CachedImages and were not used as originally intended. That resulted in some dead code,
2715         and confusion when going over the code.
2716         This patch renames these methods into equivalent clearImage* methods, and deletes resulting dead code.
2717
2718         * html/HTMLObjectElement.cpp:
2719         (WebCore::HTMLObjectElement::renderFallbackContent): Changed setImage call to clearImage.
2720         * loader/ImageLoader.cpp:
2721         (WebCore::ImageLoader::clearImage):
2722         (WebCore::ImageLoader::clearImageWithoutConsideringPendingLoadEvent):
2723         (WebCore::ImageLoader::notifyFinished):
2724         (WebCore::ImageLoader::elementDidMoveToNewDocument):
2725         (WebCore::ImageLoader::setImage): Deleted.
2726         (WebCore::ImageLoader::setImageWithoutConsideringPendingLoadEvent): Deleted.
2727         * loader/ImageLoader.h:
2728
2729 2015-03-22  Benjamin Poulain  <benjamin@webkit.org>
2730
2731         CSS Selectors: fix attribute case-insensitive matching of Contain and List
2732         https://bugs.webkit.org/show_bug.cgi?id=142932
2733
2734         Reviewed by Darin Adler.
2735
2736         Fix the last two attribute selectors that were using full case-insensitive
2737         match:
2738             -Contain ([foo*=bar]).
2739             -List (foo~=bar]).
2740
2741         Tests: fast/selectors/attribute-contains-value-matching-is-ascii-case-insensitive.html
2742                fast/selectors/attribute-list-value-matching-is-ascii-case-insensitive.html
2743
2744         * css/SelectorChecker.cpp:
2745         (WebCore::attributeValueMatches):
2746         * cssjit/SelectorCompiler.cpp:
2747         (WebCore::SelectorCompiler::attributeValueContains):
2748         (WebCore::SelectorCompiler::attributeValueSpaceSeparetedListContains):
2749
2750 2015-03-22  Benjamin Poulain  <bpoulain@apple.com>
2751
2752         Detect when url filter pattern with groups match the empty string
2753         https://bugs.webkit.org/show_bug.cgi?id=142930
2754
2755         Reviewed by Sam Weinig.
2756
2757         The previous test was only accounting for simple atoms. This patch extends
2758         it to groups.
2759
2760         * contentextensions/URLFilterParser.cpp:
2761         (WebCore::ContentExtensions::Term::quantify):
2762         (WebCore::ContentExtensions::Term::matchesAtLeastOneCharacter):
2763         (WebCore::ContentExtensions::GraphBuilder::finalize):
2764         (WebCore::ContentExtensions::Term::quantifier): Deleted.
2765
2766 2015-03-22  Eric Carlson  <eric.carlson@apple.com>
2767
2768         [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
2769         https://bugs.webkit.org/show_bug.cgi?id=142940
2770
2771         Reviewed by Sam Weinig.
2772
2773         * dom/Document.cpp:
2774         (WebCore::Document::didChoosePlaybackTarget): const-ify the didChoosePlaybackTarget argument.
2775         * dom/Document.h:
2776
2777         * html/HTMLMediaSession.cpp:
2778         (WebCore::HTMLMediaSession::didChoosePlaybackTarget): Ditto.
2779         * html/HTMLMediaSession.h:
2780
2781         * page/Page.cpp:
2782         (WebCore::Page::didChoosePlaybackTarget):  Ditto.
2783         * page/Page.h:
2784
2785         * platform/audio/MediaSession.h:
2786         * platform/graphics/MediaPlaybackTargetPickerClient.h:
2787         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: 
2788         (WebCore::MediaPlaybackTargetPickerMac::devicePicker):  Ditto.
2789
2790 2015-03-22  Anders Carlsson  <andersca@apple.com>
2791
2792         _WKWebsiteDataStore should clear WebSQL databases
2793         https://bugs.webkit.org/show_bug.cgi?id=142947
2794
2795         Reviewed by Sam Weinig.
2796
2797         * Modules/webdatabase/DatabaseTracker.cpp:
2798         (WebCore::DatabaseTracker::trackerWithDatabasePath):
2799         Add a hack so we can get at a tracker from the UI process.
2800
2801         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
2802         New function that deletes all databases modified after a given time.
2803
2804         * Modules/webdatabase/DatabaseTracker.h:
2805         Add new members and export the ones we want to call from WebKit2.
2806
2807         * Modules/webdatabase/OriginLock.h:
2808         Export the destructor.
2809
2810 2015-03-21  Dean Jackson  <dino@apple.com>
2811
2812         Remove the prefix for CSS Transforms
2813         https://bugs.webkit.org/show_bug.cgi?id=142927
2814         <rdar://problem/11568151>
2815
2816         Reviewed by Simon Fraser.
2817
2818         Support the bare form of:
2819         - transform
2820         - transform-style
2821         - transform-origin
2822         - perspective
2823         - perspective-origin
2824
2825         For transform-style, we also still differentiate the prefixed property
2826         because we may want to use that as an indicator of legacy content.
2827
2828         This is mostly a find and replace, but with some related naming
2829         changes. The DOM interface for WebKitCSSTransformValue remains
2830         unchanged.
2831
2832         Tests: transforms/2d/transform-2d-prefixed.html
2833                transforms/3d/general/prefixed-3dtransform-values.html
2834
2835         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2836         (WebCore::propertyChangeMayRepaintNonDescendants):
2837         * css/CSSComputedStyleDeclaration.cpp:
2838         (WebCore::isLayoutDependent):
2839         (WebCore::ComputedStyleExtractor::propertyValue):
2840         * css/CSSParser.cpp:
2841         (WebCore::isValidKeywordPropertyAndValue):
2842         (WebCore::isKeywordPropertyID):
2843         (WebCore::parseTranslateTransformValue):
2844         (WebCore::CSSParser::parseValue):
2845         (WebCore::CSSParser::parseTransformOrigin):
2846         (WebCore::CSSParser::parsePerspectiveOrigin):
2847         * css/CSSPropertyNames.in:
2848         * css/StyleProperties.cpp:
2849         (WebCore::StyleProperties::getPropertyValue):
2850         (WebCore::StyleProperties::asText):
2851         * css/WebKitCSSMatrix.cpp:
2852         (WebCore::WebKitCSSMatrix::setMatrixValue):
2853         * html/track/VTTCue.cpp:
2854         (WebCore::VTTCueBox::applyCSSProperties):
2855         * page/animation/AnimationController.cpp:
2856         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
2857         * page/animation/CSSPropertyAnimation.cpp:
2858         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
2859         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2860         * page/animation/CompositeAnimation.cpp:
2861         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
2862         * page/animation/ImplicitAnimation.cpp:
2863         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
2864         * page/animation/KeyframeAnimation.cpp:
2865         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
2866         (WebCore::KeyframeAnimation::validateTransformFunctionList):
2867         * platform/graphics/GraphicsLayer.cpp:
2868         (WebCore::GraphicsLayer::validateTransformOperations):
2869         * platform/graphics/GraphicsLayerClient.h:
2870         * platform/graphics/ca/GraphicsLayerCA.cpp:
2871         (WebCore::propertyIdToString):
2872         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
2873         (WebCore::GraphicsLayerCA::addAnimation):
2874         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
2875         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2876         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2877         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2878         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2879         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2880         (WebCore::TextureMapperAnimation::applyInternal):
2881         * platform/graphics/texmap/TextureMapperLayer.cpp:
2882         (WebCore::TextureMapperLayer::syncAnimations):
2883         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2884         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
2885         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
2886         (WebCore::CoordinatedGraphicsLayer::addAnimation):
2887         * rendering/RenderLayerBacking.cpp:
2888         (WebCore::RenderLayerBacking::updateGeometry):
2889         (WebCore::RenderLayerBacking::startAnimation):
2890         (WebCore::RenderLayerBacking::startTransition):
2891         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
2892         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
2893         * rendering/RenderLayerCompositor.cpp:
2894         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2895         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
2896         * svg/SVGElement.cpp:
2897         (WebCore::populateAttributeNameToCSSPropertyIDMap):
2898
2899 2015-03-21  Commit Queue  <commit-queue@webkit.org>
2900
2901         Unreviewed, rolling out r181824.
2902         https://bugs.webkit.org/show_bug.cgi?id=142935
2903
2904         Broke Windows build (Requested by ap on #webkit).
2905
2906         Reverted changeset:
2907
2908         "Remove the prefix for CSS Transforms"
2909         https://bugs.webkit.org/show_bug.cgi?id=142927
2910         http://trac.webkit.org/changeset/181824
2911
2912 2015-03-20  Dean Jackson  <dino@apple.com>
2913
2914         Remove the prefix for CSS Transforms
2915         https://bugs.webkit.org/show_bug.cgi?id=142927
2916         <rdar://problem/11568151>
2917
2918         Reviewed by Simon Fraser.
2919
2920         Support the bare form of:
2921         - transform
2922         - transform-style
2923         - transform-origin
2924         - perspective
2925         - perspective-origin
2926
2927         For transform-style, we also still differentiate the prefixed property
2928         because we may want to use that as an indicator of legacy content.
2929
2930         This is mostly a find and replace, but with some related naming
2931         changes. The DOM interface for WebKitCSSTransformValue remains
2932         unchanged.
2933
2934         Tests: transforms/2d/transform-2d-prefixed.html
2935                transforms/3d/general/prefixed-3dtransform-values.html
2936
2937         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
2938         (WebCore::propertyChangeMayRepaintNonDescendants):
2939         * css/CSSComputedStyleDeclaration.cpp:
2940         (WebCore::isLayoutDependent):
2941         (WebCore::ComputedStyleExtractor::propertyValue):
2942         * css/CSSParser.cpp:
2943         (WebCore::isValidKeywordPropertyAndValue):
2944         (WebCore::isKeywordPropertyID):
2945         (WebCore::parseTranslateTransformValue):
2946         (WebCore::CSSParser::parseValue):
2947         (WebCore::CSSParser::parseTransformOrigin):
2948         (WebCore::CSSParser::parsePerspectiveOrigin):
2949         * css/CSSPropertyNames.in:
2950         * css/StyleProperties.cpp:
2951         (WebCore::StyleProperties::getPropertyValue):
2952         (WebCore::StyleProperties::asText):
2953         * css/WebKitCSSMatrix.cpp:
2954         (WebCore::WebKitCSSMatrix::setMatrixValue):
2955         * html/track/VTTCue.cpp:
2956         (WebCore::VTTCueBox::applyCSSProperties):
2957         * page/animation/AnimationController.cpp:
2958         (WebCore::AnimationControllerPrivate::computeExtentOfAnimation):
2959         * page/animation/CSSPropertyAnimation.cpp:
2960         (WebCore::PropertyWrapperAcceleratedTransform::PropertyWrapperAcceleratedTransform):
2961         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
2962         * page/animation/CompositeAnimation.cpp:
2963         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
2964         * page/animation/ImplicitAnimation.cpp:
2965         (WebCore::ImplicitAnimation::computeExtentOfTransformAnimation):
2966         * page/animation/KeyframeAnimation.cpp:
2967         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
2968         (WebCore::KeyframeAnimation::validateTransformFunctionList):
2969         * platform/graphics/GraphicsLayer.cpp:
2970         (WebCore::GraphicsLayer::validateTransformOperations):
2971         * platform/graphics/GraphicsLayerClient.h:
2972         * platform/graphics/ca/GraphicsLayerCA.cpp:
2973         (WebCore::propertyIdToString):
2974         (WebCore::GraphicsLayerCA::moveOrCopyAnimations):
2975         (WebCore::GraphicsLayerCA::addAnimation):
2976         (WebCore::GraphicsLayerCA::isRunningTransformAnimation):
2977         (WebCore::GraphicsLayerCA::createAnimationFromKeyframes):
2978         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
2979         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2980         (WebCore::GraphicsLayerTextureMapper::addAnimation):
2981         * platform/graphics/texmap/TextureMapperAnimation.cpp:
2982         (WebCore::TextureMapperAnimation::applyInternal):
2983         * platform/graphics/texmap/TextureMapperLayer.cpp:
2984         (WebCore::TextureMapperLayer::syncAnimations):
2985         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2986         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHasActiveTransformAnimation):
2987         (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms):
2988         (WebCore::CoordinatedGraphicsLayer::addAnimation):
2989         * rendering/RenderLayerBacking.cpp:
2990         (WebCore::RenderLayerBacking::updateGeometry):
2991         (WebCore::RenderLayerBacking::startAnimation):
2992         (WebCore::RenderLayerBacking::startTransition):
2993         (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
2994         (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
2995         * rendering/RenderLayerCompositor.cpp:
2996         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
2997         (WebCore::RenderLayerCompositor::isRunningTransformAnimation):
2998         * svg/SVGElement.cpp:
2999         (WebCore::populateAttributeNameToCSSPropertyIDMap):
3000
3001 2015-03-20  Yusuke Suzuki  <utatane.tea@gmail.com>
3002
3003         REGRESSION (r179429): Potential Use after free in JavaScriptCore`WTF::StringImpl::ref + 83
3004         https://bugs.webkit.org/show_bug.cgi?id=142410
3005
3006         Reviewed by Geoffrey Garen.
3007
3008         The same issues are found in the existing code; PropertyName does not have ownership.
3009         This patch rewrite the point that should have ownership to Identifier.
3010
3011         * bindings/js/JSDOMWindowCustom.cpp:
3012         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex):
3013         (WebCore::JSDOMWindow::putByIndex):
3014         * bindings/js/ReadableStreamJSSource.cpp:
3015         (WebCore::getInternalSlotFromObject):
3016         * bindings/scripts/CodeGeneratorJS.pm:
3017         (GenerateImplementation):
3018         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3019         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlotByIndex):
3020         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3021         (WebCore::JSTestEventTarget::getOwnPropertySlotByIndex):
3022         * bindings/scripts/test/JS/JSTestInterface.cpp:
3023         (WebCore::JSTestInterface::putByIndex):
3024
3025 2015-03-20  Simon Fraser  <simon.fraser@apple.com>
3026
3027         Log the slow-scrolling reasons (if any) on first commit of a ScrollingTreeFrameScrollingNodeMac
3028         https://bugs.webkit.org/show_bug.cgi?id=142917
3029
3030         Reviewed by Beth Dakin.
3031         
3032         The scrollperf test would fail to detect transitions between slow and fast scrolling
3033         for new pages, because there was no logging when slow-scrolling scrolling tree was
3034         torn down, and a new fast-scrolling tree constructed.
3035         
3036         Fix by always logging the slow-scrolling reasons in the first update of the
3037         ScrollingTreeFrameScrollingNodeMac, even when the slow-scrolling reasons haven't
3038         changed.
3039
3040         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3041         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3042         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
3043         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren):
3044
3045 2015-03-19  Geoffrey Garen  <ggaren@apple.com>
3046
3047         Function.prototype.toString should not decompile the AST
3048         https://bugs.webkit.org/show_bug.cgi?id=142853
3049
3050         Reviewed by Sam Weinig.
3051
3052         * bindings/js/JSLazyEventListener.cpp:
3053         (WebCore::JSLazyEventListener::initializeJSFunction): Adjust the line
3054         number of attribute event listeners to account for the leading newline
3055         now added by JavaScriptCore.
3056
3057         This solution is not perfect, but there are a lot of pre-existing problems
3058         with line and column reporting for attribute event listeners, and this
3059         preserves existing behavior with reasonable reliability.
3060
3061 2015-03-20  Alex Christensen  <achristensen@webkit.org>
3062
3063         Progress towards CMake on Mac.
3064         https://bugs.webkit.org/show_bug.cgi?id=136003
3065
3066         Reviewed by Chris Dumez.
3067
3068         * PlatformMac.cmake:
3069         Added some directories to create forwarding headers from.
3070         Generate ObjC bindings.
3071
3072 2015-03-20  Per Arne Vollan  <peavo@outlook.com>
3073
3074         [WinCairo] Crash when leaving page while video is playing.
3075         https://bugs.webkit.org/show_bug.cgi?id=142578
3076
3077         Reviewed by Alex Christensen.
3078
3079         This can happen when there is an asynchronous event invoked from a video worker
3080         thread, accessing the media player object after it has been deleted.
3081         This is solved by resetting the media player pointer in the event object,
3082         when the media player is deleted.
3083
3084         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3085         (WebCore::MediaPlayerPrivateMediaFoundation::~MediaPlayerPrivateMediaFoundation):
3086         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
3087         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
3088         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
3089         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::AsyncCallback):
3090         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::~AsyncCallback):
3091         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
3092         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
3093         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
3094         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::MediaPlayerListener):
3095         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::~MediaPlayerListener):
3096         (WebCore::MediaPlayerPrivateMediaFoundation::MediaPlayerListener::onMediaPlayerDeleted):
3097
3098 2015-03-20  Chris Dumez  <cdumez@apple.com>
3099
3100         Regression(r181782): Caused WebKit2.RestoreSessionStateContainingFormData API test to crash
3101         https://bugs.webkit.org/show_bug.cgi?id=142911
3102
3103         Reviewed by Antti Koivisto.
3104
3105         Drop the isBackForwardLoadType(m_loadType) assertion in
3106         FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad(). This assertion
3107         used to hold true when goToBackForwardItem() was only called with
3108         history navigation load types. However, after r181782, we use a Standard
3109         load in the cases where we do not wish to display stale content (e.g.
3110         restoring session state).
3111
3112         The assertion comment says "We only use cache-only loads to avoid
3113         resubmitting forms". However, we then call loadDifferentDocumentItem()
3114         which already takes care of using the ReturnCacheDataElseLoad cache
3115         policy as the HistoryItem has form data and we pass
3116         MayNotAttemptCacheOnlyLoadForFormSubmissionItem as parameter.
3117
3118         No new tests, covered by WebKit2.RestoreSessionStateContainingFormData
3119         API test.
3120
3121         * loader/FrameLoader.cpp:
3122         (WebCore::FrameLoader::retryAfterFailedCacheOnlyMainResourceLoad):
3123
3124 2015-03-20  Andy Estes  <aestes@apple.com>
3125
3126         [Content Filtering] Adopt NEFilterSource unblock handling
3127         https://bugs.webkit.org/show_bug.cgi?id=142904
3128
3129         Reviewed by Andreas Kling.
3130
3131         * platform/cocoa/NetworkExtensionContentFilter.mm:
3132         (WebCore::NetworkExtensionContentFilter::unblockHandler):
3133         Returned an unblock handler that calls -[NEFilterSource remediateWithDecisionHandler:].
3134         * platform/cocoa/ParentalControlsContentFilter.mm:
3135         (WebCore::ParentalControlsContentFilter::unblockHandler): Used ASCIILiteral.
3136
3137 2015-03-19  Andy Estes  <aestes@apple.com>
3138
3139         [Content Filtering] Add tests for unblock requests
3140         https://bugs.webkit.org/show_bug.cgi?id=142900
3141
3142         Reviewed by Andreas Kling.
3143
3144         Currently the iOS Parental Controls content filter has a mechanism for requesting that a page be unblocked.
3145         WebKit implements this by listening for navigations originating from the filter's error page to a special URL,
3146         and requesting the page be unblocked via platform API, which might cause UI to be displayed. If the unblock is
3147         successful then we schedule a reload of the frame in order to display the unblocked document.
3148
3149         NetworkExtension also supports unblock requests, so in preparation for adopting its API, this patch allows
3150         content filters to specify their own unblock request method, teaches MockContentFilter to provide such a method,
3151         and writes tests to cover both allowed and denied unblock requests.
3152
3153         The content filter that blocks a load creates a ContentFilterUnblockHandler, passing it a lambda that is executed
3154         when a navigation matches the filter's special unblock URL. Filters can also specify that a script be executed in
3155         the context of its error page if the unblock is denied.
3156
3157         All platform content filters can handle unblock requests like this with the exception of iOS Parental Controls in WebKit2.
3158         Since UI can be displayed by the system in this case, the request must be made from within the UI process. Therefore the
3159         existing method is retained of serializing a WebFilterEvaluator and intercepting navigation policy calls in the UI process.
3160
3161         Tests: contentfiltering/allow-after-unblock-request.html
3162                contentfiltering/block-after-unblock-request.html
3163
3164         * bindings/js/JSMockContentFilterSettingsCustom.cpp:
3165         (WebCore::JSMockContentFilterSettings::decisionPoint): Added some using statements for clarity.
3166         (WebCore::JSMockContentFilterSettings::setDecisionPoint): Ditto.
3167         (WebCore::toJSValue): Returns a JSValue from a Decision.
3168         (WebCore::toDecision): Returns a Decision from a JSValue.
3169         (WebCore::JSMockContentFilterSettings::decision): Used toJSValue.
3170         (WebCore::JSMockContentFilterSettings::setDecision): Used toDecision.
3171         (WebCore::JSMockContentFilterSettings::unblockRequestDecision): Used toJSValue.
3172         (WebCore::JSMockContentFilterSettings::setUnblockRequestDecision): Used toDecision.
3173         * loader/ContentFilter.cpp:
3174         (WebCore::ContentFilter::createIfNeeded): Passed a reference to the owning DocumentLoader.
3175         (WebCore::ContentFilter::ContentFilter): Ditto.
3176         (WebCore::ContentFilter::unblockHandler): If the unblockHandler requests that a script be executed when an
3177         unblock request is denied, create a wrapper unblockHandler that executes that script in m_documentLoader's frame.
3178         * loader/ContentFilter.h:
3179         * loader/DocumentLoader.cpp:
3180         (WebCore::DocumentLoader::responseReceived): Passed this to ContentFilter::createIfNeeded.
3181         * loader/FrameLoader.cpp:
3182         (WebCore::FrameLoader::prepareForLoadStart): Called PolicyChecker::prepareForLoadStart.
3183         * loader/PolicyChecker.cpp:
3184         (WebCore::PolicyChecker::prepareForLoadStart): Reset m_contentFilterUnblockHandler.
3185         (WebCore::PolicyChecker::checkNavigationPolicy): Moved logic to here from WebKit1's WebFrameLoaderClient.
3186         Placing it here allows it to be shared between WebKit1 and WebKit2 (when the unblock handler does not need to
3187         be called in the UI process).
3188         * loader/PolicyChecker.h:
3189         (WebCore::PolicyChecker::setContentFilterUnblockHandler): Added.
3190         * page/Frame.h: Made Frame ThreadSafeRefCounted, since RefPtr<Frames> are captured in lambdas that can be
3191         copied by background threads managed by the underlying platform.
3192         * platform/ContentFilterUnblockHandler.h:
3193         (WebCore::ContentFilterUnblockHandler::unblockURLScheme): Returned the Apple content filter scheme.
3194         (WebCore::ContentFilterUnblockHandler::unblockURLHost): Returned the unblock URL host.
3195         (WebCore::ContentFilterUnblockHandler::clear): Deleted.
3196         * platform/PlatformContentFilter.h:
3197         (WebCore::PlatformContentFilter::unblockRequestDeniedScript): Returned the unblock request denied script.
3198         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
3199         (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler): Added a constructor that takes an
3200         unblockURLHost and a UnblockRequesterFunction. Added an alternate constructor for iOS Parental Controls on
3201         WebKit2 that takes an unblockURLHost and a WebFilterEvaluator.
3202         (WebCore::ContentFilterUnblockHandler::needsUIProcess): Returned true if m_webFilterEvaluator is non-null.
3203         (WebCore::ContentFilterUnblockHandler::encode): Encoded m_unblockURLHost in addition to m_webFilterEvaluator.
3204         (WebCore::ContentFilterUnblockHandler::decode): Decoded m_unblockURLHost in addition to m_webFilterEvaluator.
3205         (WebCore::ContentFilterUnblockHandler::canHandleRequest): Returned true if there is a either a m_unblockRequester
3206         or a m_webFilterEvaluator and the request's host and scheme match those of the unblock request URL.
3207         (WebCore::dispatchToMainThread): Added a helper to dispatch a block to the main thread. Then if the web thread
3208         is enabled on iOS, dispatch it there.
3209         (WebCore::ContentFilterUnblockHandler::requestUnblockAsync): Renamed from handleUnblockRequestAndDispatchIfSuccessful.
3210         Requested an unblock using either m_unblockRequester or m_webFilterEvaluator, then called decisionHandler with the response.
3211         (WebCore::scheme): Moved to ContentFilterUnblockHandler::unblockURLScheme.
3212         (WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful): Renamed to requestUnblockAsync.
3213         * platform/cocoa/ParentalControlsContentFilter.mm:
3214         (WebCore::ParentalControlsContentFilter::unblockHandler): Returned an unblock handler using the WebFilterEvaluator constructor.
3215         * testing/MockContentFilter.cpp: Added using statments for clarity.
3216         (WebCore::settings): Added a helper to get MockContentFilterSettings::singleton().
3217         (WebCore::MockContentFilter::canHandleResponse): Used the helper.
3218         (WebCore::MockContentFilter::MockContentFilter): Took advantage of the using statements.
3219         (WebCore::MockContentFilter::addData): Ditto.
3220         (WebCore::MockContentFilter::finishedAddingData): Ditto.
3221         (WebCore::MockContentFilter::unblockHandler): Returned a ContentFilterUnblockHandler that checks settings() for its decision.
3222         (WebCore::MockContentFilter::unblockRequestDeniedScript): Returned the script to execute in MockContentFilter's
3223         error page when an unblock request is denied.
3224         (WebCore::MockContentFilter::maybeDetermineStatus): Took advantage of settings() and using statements.
3225         * testing/MockContentFilterSettings.cpp:
3226         (WebCore::MockContentFilterSettings::unblockRequestURL): Constructed a static unblock URL and returned it.
3227         * testing/MockContentFilterSettings.h:
3228         (WebCore::MockContentFilterSettings::unblockURLHost): Returned the filter's unblock URL host.
3229         (WebCore::MockContentFilterSettings::unblockRequestDecision): Returns the decision to make for an unblock request.
3230         (WebCore::MockContentFilterSettings::setUnblockRequestDecision): Sets the decision to make for an unblock request.
3231         * testing/MockContentFilterSettings.idl: Added the unblockRequestDecision and unblockRequestURL attributes.
3232
3233 2015-03-20  Carlos Garcia Campos  <cgarcia@igalia.com>
3234
3235         [GTK] Crash due to empty drag image during drag-and-drop
3236         https://bugs.webkit.org/show_bug.cgi?id=142671
3237
3238         Reviewed by Philippe Normand.
3239
3240         Return early from ImageBuffer constructor if an empty size is
3241         given. This is a speculative fix for a crash while starting a drag
3242         and drop operation, that I haven't been able to reproduce.
3243
3244         * platform/graphics/cairo/ImageBufferCairo.cpp:
3245         (WebCore::ImageBuffer::ImageBuffer):
3246
3247 2015-03-19  Chris Dumez  <cdumez@apple.com>
3248
3249         [WK2] We should allow stale content when restoring a killed / crashed WebProcess
3250         https://bugs.webkit.org/show_bug.cgi?id=142893
3251         <rdar://problem/19633737>
3252         <rdar://problem/19869257>
3253
3254         Reviewed by Antti Koivisto.
3255
3256         Always use ReturnCacheDataElseLoad cache policy for history navigations.
3257         Previously, we would use the default protocol cache policy for history
3258         navigations if m_stateMachine.committedFirstRealDocumentLoad() returned
3259         false so that we do not display stale content when restoring the session
3260         state of Safari statup (rdar://problem/8131355). This is now handled
3261         before reaching this method by no longer using "IndexedBackForward"
3262         FrameLoadType when restoring session tabs, and using "Standard" load
3263         type instead.
3264
3265         * loader/FrameLoader.cpp:
3266         (WebCore::FrameLoader::loadDifferentDocumentItem):
3267
3268 2015-03-19  Andy Estes  <aestes@apple.com>
3269
3270         [Content Filtering] Move ContentFilter to from platform/ to loader/
3271         https://bugs.webkit.org/show_bug.cgi?id=142897
3272
3273         Reviewed by Dan Bernstein.
3274
3275         ContentFilterCollection never contained any platform code, so it doesn't make sense for it to be in platform.
3276         Move it to loader/, since ContentFilters are owned by DocumentLoaders, and just call it ContentFilter. Extract
3277         the abstract part of ContentFilter into a new base class called PlatformContentFilter that each of the
3278         individual filters inherit from.
3279
3280         * WebCore.xcodeproj/project.pbxproj:
3281         * loader/ContentFilter.cpp: Renamed from Source/WebCore/platform/ContentFilter.cpp.
3282         (WebCore::ContentFilter::types): Moved from ContentFilterCollection.
3283         (WebCore::ContentFilter::createIfNeeded): Ditto.
3284         (WebCore::ContentFilter::ContentFilter): Ditto.
3285         (WebCore::ContentFilter::addData): Ditto.
3286         (WebCore::ContentFilter::finishedAddingData): Ditto.
3287         (WebCore::ContentFilter::needsMoreData): Ditto.
3288         (WebCore::ContentFilter::didBlockData): Ditto.
3289         (WebCore::ContentFilter::getReplacementData): Ditto.
3290         (WebCore::ContentFilter::unblockHandler): Ditto.
3291         * loader/ContentFilter.h: Copied from Source/WebCore/platform/ContentFilter.h.
3292         (WebCore::ContentFilter::type): Replaced a use of ContentFilterCollection.
3293         * platform/PlatformContentFilter.h: Renamed from Source/WebCore/platform/ContentFilter.h.
3294         * platform/cocoa/NetworkExtensionContentFilter.h: Inherited from PlatformContentFilter.
3295         * platform/cocoa/ParentalControlsContentFilter.h: Ditto.
3296         * testing/MockContentFilter.h: Ditto.
3297
3298 2015-03-19  Dean Jackson  <dino@apple.com>
3299
3300         CSS Animations with triggers should map scroll position to duration
3301         https://bugs.webkit.org/show_bug.cgi?id=142870
3302         <rdar://problem/20227244>
3303
3304         Reviewed by Simon Fraser.
3305
3306         Expose a prototype implementation of what will eventually be called
3307         animation-timebase, mapping the scroll location to the duration of an
3308         animation. This only applies if the animation has a start and end
3309         trigger.
3310
3311         Test: animations/trigger-container-scroll-boundaries.html
3312
3313         * css/CSSComputedStyleDeclaration.cpp:
3314         (WebCore::createAnimationTriggerValue): Change to downcast.
3315
3316         * css/CSSToStyleMap.cpp:
3317         (WebCore::CSSToStyleMap::mapAnimationTrigger): Fix a bug where I wasn't
3318         telling the ScrollAnimationTrigger object whether or not it had
3319         an end value. This wasn't visible before because we were not using
3320         the end value.
3321
3322         * page/animation/AnimationBase.cpp:
3323         (WebCore::AnimationBase::fireAnimationEventsIfNeeded): Add a comment and
3324         change to using a downcast.
3325         (WebCore::AnimationBase::timeToNextService): Change to downcast.
3326         (WebCore::AnimationBase::freezeAtTime): Whitespace cleanup.
3327         (WebCore::AnimationBase::getElapsedTime): Calculate the elapsedTime based
3328         on the scroll position relative to the start and end trigger spots.
3329
3330         * page/animation/AnimationController.cpp:
3331         (WebCore::AnimationControllerPrivate::updateAnimations): Since this
3332         can potentially call into beginAnimationUpdateTime, it should have
3333         an update blocker. This fixes the assert we were seeing in tests.
3334         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Keep track of the scroll
3335         position so we don't need to ask for it all the time.
3336         * page/animation/AnimationControllerPrivate.h:
3337         (WebCore::AnimationControllerPrivate::scrollPosition): New accessor.
3338
3339         * platform/animation/AnimationTrigger.h: Add downcast macros.
3340         (WebCore::ScrollAnimationTrigger::create): Calculate hasEndValue from the passed
3341         parameters rather than a separate value.
3342         (WebCore::ScrollAnimationTrigger::hasEndValue):
3343         (WebCore::ScrollAnimationTrigger::ScrollAnimationTrigger):
3344         (WebCore::ScrollAnimationTrigger::setHasEndValue): Deleted.
3345
3346         * platform/graphics/ca/GraphicsLayerCA.cpp:
3347         (WebCore::GraphicsLayerCA::animationCanBeAccelerated): If we have an
3348         animation of this sort, we can't use a CAAnimation.
3349
3350 2015-03-19  Eric Carlson  <eric.carlson@apple.com>
3351
3352         [Mac] Move MediaPlaybackTargetPicker
3353         https://bugs.webkit.org/show_bug.cgi?id=142889
3354
3355         Move WebMediaPlaybackTargetPickerProxy from WK2 and rename as MediaPlaybackTargetPicker so it
3356         can be used by both WK2 and WK1.
3357
3358         Reviewed by Tim Horton.
3359
3360         * WebCore.xcodeproj/project.pbxproj:
3361         * platform/graphics/MediaPlaybackTargetPicker.cpp: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.cpp.
3362         * platform/graphics/MediaPlaybackTargetPicker.h: Copied from Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.h.
3363         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h.
3364         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm: Copied from Source/WebKit2/UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm.
3365
3366 2015-03-19  Enrica Casucci  <enrica@apple.com>
3367
3368         REGRESSION (r109593): Clicking after last inline element could cause a crash.
3369         https://bugs.webkit.org/show_bug.cgi?id=142880
3370         rdar://problem/17222294
3371
3372         Reviewed by Ryosuke Niwa.
3373
3374         Test: editing/selection/click-after-last-inline-crash.html
3375
3376         * rendering/RootInlineBox.cpp:
3377         (WebCore::RootInlineBox::closestLeafChildForLogicalLeftPosition):
3378
3379 2015-03-19  Enrica Casucci  <enrica@apple.com>
3380
3381         One more build fix after r181760.
3382
3383         * page/EventHandler.cpp:
3384         (WebCore::EventHandler::handleDrag):