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