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