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