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