<attachment> title text disappears when dragging
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-04  Timothy Horton  <timothy_horton@apple.com>
2
3         <attachment> title text disappears when dragging
4         https://bugs.webkit.org/show_bug.cgi?id=142263
5         <rdar://problem/20035515>
6
7         Reviewed by Sam Weinig.
8
9         * rendering/RenderThemeMac.mm:
10         (WebCore::RenderThemeMac::paintAttachment):
11         We use NSColors with CoreText, which requires that Cocoa knows the current
12         CGContext out-of-band (through the NSGraphicsContext currentContext mechanism).
13         Otherwise, sometimes (especially when dragging), it will try to apply the
14         text foreground color to a null context, complain to the system log, and fail
15         to render the text.
16
17 2015-03-04  Jer Noble  <jer.noble@apple.com>
18
19         [Mac] YouTube playback at 1.5x speed has audible distortion
20         https://bugs.webkit.org/show_bug.cgi?id=142280
21
22         Reviewed by Eric Carlson.
23
24         Use the high-quality AVAudioTimePitchAlgorithmSpectral algorithm for the 
25         AVSampleBufferAudioRenderer rather than its default value of 
26         AVAudioTimePitchAlgorithmTimeDomain.
27
28         Drive-by fix:
29
30         Might as well add support for MediaPlayer::setPreservesPitch() while we're
31         changing the audio pitch algorithm. If preservesPitch() is false use the
32         AVAudioTimePitchAlgorithmVarispeed algorithm in both AVFObjC-based media players
33         (MediaPlayerPrivateAVFoundationObjC & MediaPlayerPrivateMediaSourceAVFObjC).
34
35         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
36         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
37         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
38         (WebCore::MediaPlayerPrivateAVFoundationObjC::setPreservesPitch):
39         (WebCore::MediaPlayerPrivateAVFoundationObjC::setRateDouble): Deleted.
40         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
41         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
42         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setPreservesPitch):
43         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addAudioRenderer):
44
45 2015-03-04  Jer Noble  <jer.noble@apple.com>
46
47         [MSE][EME][Mac] Calling close on a MediaKeysSession will cause many decoding errors to be emitted
48         https://bugs.webkit.org/show_bug.cgi?id=142285
49
50         Reviewed by Eric Carlson.
51
52         When a MediaKeySession (backed by CDMSessionMediaSourceAVFObjC) is closed and the
53         underlying AVStreamSession is invalidated, the decryption context for in-flight
54         CMSampleBuffers is also invalidated, and the AVSampleBufferDisplayLayer will issue
55         one error for each enqueued and un-displayed sample in its image-queue. -flush-ing
56         the AVSampleBufferDisplayLayer is not enough, as the flush only takes effect
57         asynchronously the next time the layer needs new samples.
58
59         Add a workaround until framework-level support lands to fully flush enqueued and
60         encrypted frames.
61
62         When the CDMSessionMediaSOurceAVFObjC object recieves an error from the layer,
63         check to see if the session has been stopped. If so, and if the error in question is
64         one that indicates that the samples decryption context has been invalidated, suppress
65         the error and instruct the sender to suppress the error as well. This workaround will
66         be removed once real support for synchronous flushing lands in <rdar://problem/20027434.>
67
68         Still, we'll make our best effort to flush undisplayed frames when our CDM session is
69         invalidated. Move away from std::map and instead use HashMap to store the set of 
70         AVSampleBufferAudioRenderers. This allows us to use C++11 style loops against just
71         the HashMap's set of values.
72
73         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
74         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
75         (WebCore::CDMSessionMediaSourceAVFObjC::releaseKeys): Flush and set m_stopped.
76         (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Check m_stopped and the
77             error code and bail before issuing the error.
78         (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Ditto.
79         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
80         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
81         (-[WebAVSampleBufferErrorListener layerFailedToDecode:]): Drive-by fix. Check whether
82             the layer is in the set of listened-to layers only back in the main thread; the
83             listnener may have been unregistered by the time the main thread was called.
84         (WebCore::SourceBufferPrivateAVFObjC::destroyRenderers): std::map -> HashMap.
85         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled): Ditto.
86         (WebCore::SourceBufferPrivateAVFObjC::flushAndEnqueueNonDisplayingSamples): Ditto.
87         (WebCore::SourceBufferPrivateAVFObjC::enqueueSample): Ditto.
88         (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples): Ditto.
89         (WebCore::SourceBufferPrivateAVFObjC::didBecomeReadyForMoreSamples): Ditto.
90         (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples): Ditto.
91         (WebCore::SourceBufferPrivateAVFObjC::flush): Added; call -flush on all the display
92             layers and audio renderers.
93         (WebCore::SourceBufferPrivateAVFObjC::layerDidReceiveError): Check if any clients
94             asked to ignore the error, and if so, bail.
95         (WebCore::SourceBufferPrivateAVFObjC::rendererDidReceiveError): Ditto.
96
97 2015-03-04  Alex Christensen  <achristensen@webkit.org>
98
99         Update bindings tests after r181001.
100
101         * bindings/scripts/test/JS/*.cpp:
102         Class names changed to auto.
103
104 2015-03-04  Brent Fulgham  <bfulgham@apple.com>
105
106         [Win] Missing dependency checking in DerivedSources.make for FeatureDefines.props
107         https://bugs.webkit.org/show_bug.cgi?id=142284
108
109         Reviewed by David Kilzer.
110
111         Make DerivedSources.make understand its build dependency on FeatureDefines.props
112         when building on Windows:
113         1. Modify DerivedSources.make to declare a default dependency (on Windows)
114            to $(WEBKIT_LIBRARIES)/tools/vsprops/FeatureDefines.props.
115         2. Update the Windows script 'build-generated-files.pl' to specify the correct
116            FeatureDefines{Cairo}.props value to use, depending on build environment.
117
118         * DerivedSources.make:
119         * WebCore.vcxproj/build-generated-files.pl:
120
121 2015-03-04  Darin Adler  <darin@apple.com>
122
123         Make JavaScript binding get and set legacy event listener attributes directly
124         https://bugs.webkit.org/show_bug.cgi?id=142282
125
126         Reviewed by Sam Weinig.
127
128         Test: fast/dom/legacy-event-handler-attributes.html
129
130         This patch changes the JavaScript getters and setters for these attributes
131         to work directly without requiring any functions in the C++ DOM implementation.
132         A subsequent patch will remove the now-unused C++ DOM implementation.
133
134         * bindings/js/JSEventListener.cpp:
135         (WebCore::legacyEventListenerAttribute): Added.
136         (WebCore::createEventListenerForLegacyAttribute): Added.
137         (WebCore::setLegacyEventListenerAttribute): Added.
138         (WebCore::legacyWindowEventListenerAttribute): Added.
139         (WebCore::setLegacyWindowEventListenerAttribute): Added.
140
141         * bindings/js/JSEventListener.h:
142         (WebCore::createJSEventListenerForAttribute): Deleted.
143
144         * bindings/scripts/CodeGeneratorJS.pm:
145         (GenerateAttributeEventListenerCall): Deleted.
146         (LegacyEventListenerAttributeEventName): Added.
147         (LegacyEventListenerAttributePrefix): Added.
148         (GenerateImplementation): Use "auto" in lots of places to simplify the code
149         generation. Replaced the old inlined code to deal with legacy event listener
150         attributes with code that simply calls the new functions from JSEventLister.h.
151         (GenerateCallWith): Use "auto".
152         (GenerateConstructorDefinition): Ditto.
153
154 2015-03-03  Sam Weinig  <sam@webkit.org>
155
156         [Content Extensions] Split parsing and compiling of content extensions into their own files
157         https://bugs.webkit.org/show_bug.cgi?id=142259
158
159         Reviewed by Anders Carlsson.
160
161         Added new unit test:
162             ContentFilterTest.Basic
163
164         * WebCore.xcodeproj/project.pbxproj:
165         Add new files (CompiledContentExtension.h/cpp, ContentExtensionCompiler.h/cpp, and ContentExtensionParser.h/cpp)
166
167         * contentextensions/CompiledContentExtension.cpp: Added.
168         * contentextensions/CompiledContentExtension.h: Added.
169         Add new class for holding onto the compiled content extension itself. Make it ThreadSafeRefCounted so it is easy
170         to move between threads which will be important in a subsequent patch where we enable compilation on a background
171         thread.
172
173         * contentextensions/ContentExtensionCompiler.cpp: Added.
174         (WebCore::ContentExtensions::serializeActions):
175         (WebCore::ContentExtensions::compileRuleList):
176         * contentextensions/ContentExtensionCompiler.h: Added.
177         Moving compilation to its own file. Was previously in ContentExtensionsBackend. This is necessary because
178         we will want to be able to compile without the need of a backend.
179
180         * contentextensions/ContentExtensionParser.cpp: Copied from contentextensions/ContentExtensionsManager.cpp.
181         * contentextensions/ContentExtensionParser.h: Copied from contentextensions/ContentExtensionsManager.h.
182         Renamed ContentExtensionsManager to ContentExtensionParser, since that is all it is doing.
183
184         * contentextensions/ContentExtensionsBackend.cpp:
185         (WebCore::ContentExtensions::ContentExtensionsBackend::addContentExtension):
186         (WebCore::ContentExtensions::ContentExtensionsBackend::removeContentExtension):
187         (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllContentExtensions):
188         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
189         (WebCore::ContentExtensions::ContentExtensionsBackend::serializeActions): Deleted.
190         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList): Deleted.
191         (WebCore::ContentExtensions::ContentExtensionsBackend::removeRuleList): Deleted.
192         (WebCore::ContentExtensions::ContentExtensionsBackend::removeAllRuleLists): Deleted.
193         * contentextensions/ContentExtensionsBackend.h:
194         Change the backend to use the new CompiledContentExtension and change the terminology to
195         reference content extensions, rather than rule lists.
196
197         * page/UserContentController.cpp:
198         (WebCore::UserContentController::addUserContentFilter):
199         (WebCore::UserContentController::removeUserContentFilter):
200         (WebCore::UserContentController::removeAllUserContentFilters):
201         Update for new names and change addUserContentFilter to explicitly compile the JSON
202         rule list before handing it to the backend. In subsequent changes, addUserContentFilter
203         should be changed to take the compiled content extension, and it should become the responsibility
204         of the called (WebKit) to create them.
205
206 2015-03-04  Philippe Normand  <pnormand@igalia.com>
207
208         [GStreamer] the GST_SCHEDULING_FLAG_BANDWIDTH_LIMITED should be wrapped by a ifdef
209         https://bugs.webkit.org/show_bug.cgi?id=142274
210
211         Reviewed by Carlos Garcia Campos.
212
213         Don't handle scheduling queries if building against versions of
214         GStreamer older than 1.2.0.
215
216         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
217         (webKitWebSrcQueryWithParent):
218
219 2015-03-03  Yoav Weiss  <yoav@yoav.ws>
220
221         Add a microtask abstraction
222         https://bugs.webkit.org/show_bug.cgi?id=137496
223
224         Reviewed by Sam Weinig.
225
226         This patch adds a microtask abstraction: https://html.spec.whatwg.org/multipage/webappapis.html#microtask
227         That abstraction is required in order to enable async loading of images,
228         which is in turn required to enable support for the picture element, as well as
229         to make sure that the order of properties set on HTMLImageElement has no implications.
230
231         A similar patch was rolled back in r180914. This patch is an improved version.
232
233         * WebCore.vcxproj/WebCore.vcxproj: Add MicroTask.{h,cpp} to the project.
234         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Add MicroTaskTest.{h,cpp} to the project.
235         * WebCore.vcxproj/WebCore.vcxproj.filters: Add MicroTask.{h,cpp} to the project.
236         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Add MicroTaskTest.{h,cpp} to the project.
237         * WebCore.xcodeproj/project.pbxproj: Add MicroTask{,Test}.{h,cpp} to the project.
238         * dom/Document.h: Add WEBCORE_EXPORT to addConsoleMessage, so it can be used in MicroTaskTest that's in WebCoreTestSupport..
239         * dom/MicroTask.h: Add a MicroTask interface class. Add a MicroTaskQueue singleton.
240         (WebCore::MicroTask::~MicroTask):
241         (WebCore::MicroTask::run): Run the microtask.
242         * dom/MicroTask.cpp: Implement the MicroTaskQueue singleton.
243         (WebCore::MicroTaskQueue::singleton): Get a singleton instance of MicroTaskQueue.
244         (WebCore::MicroTaskQueue::queueMicroTask): Add a microtask to the queue.
245         (WebCore::MicroTaskQueue::runMicroTasks): Run all the microtasks in the queue and clear it.
246         * dom/ScriptRunner.cpp: Trigger running of all microtasks in queue.
247         (WebCore::ScriptRunner::timerFired):
248         * html/parser/HTMLScriptRunner.cpp: Trigger running of all microtasks in queue.
249         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
250         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
251         (WebCore::HTMLScriptRunner::runScript):
252         * testing/Internals.cpp: Add a method to queue a test microtask.
253         (WebCore::Internals::queueMicroTask):
254         * testing/Internals.h: Add a method to queue a test microtask.
255         (WebCore::Internals::queueMicroTask):
256         * testing/Internals.idl: Expose test microtask queueing to test JS.
257         * testing/MicroTaskTest.cpp: Add a test class that implements a microtask and prints to the console when it runs.
258         (WebCore::MicroTaskTest::run): Run the microtask
259         (WebCore::MicroTaskTest::create): Create a test microtask.
260         * testing/MicroTaskTest.h: Add a test class that implements a microtask.
261         (WebCore::MicroTaskTest::run):
262         (WebCore::MicroTaskTest::create):
263
264 2015-03-03  Brent Fulgham  <bfulgham@apple.com>
265
266         Scroll snap points are not supported on the main frame
267         https://bugs.webkit.org/show_bug.cgi?id=141973
268         <rdar://problem/19938393>
269
270         Reviewed by Simon Fraser.
271
272         No new tests. Tests will be added when the animation behavior is finalized. Manual tests are attached to the bug.
273
274         Update the ScrollingTreeFrameScrollingNodeMac class to implement the delegate interface needed by the
275         ScrollController. This involves the following:
276         1. Implement scrollOffsetOnAxis: Used by the AxisScrollAnimator to determine the current position of the ScrollableArea.
277         2. Implement immediateScrollOnAxis: Used by the AxisScrollAnimator to scroll the ScrollableArea
278
279         We also need to hold a copy of the snap points vector to send to the scrolling thread.
280
281         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
282         (WebCore::convertToLayoutUnits): Added helper function to match Scroll Snap Points API.
283         (WebCore::ScrollingTreeFrameScrollingNodeMac::updateBeforeChildren): Recognize and react to changes to
284         Scroll Snap Points on top-level frames.
285         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Implement delegate method needed by the ScrollController.
286         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
287         * platform/cocoa/ScrollController.h:
288         * platform/cocoa/ScrollController.mm:
289         (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Pass snap offsets to AxisScrollSnapAnimator constructor as references.
290         (WebCore::ScrollController::updateScrollSnapPoints): Added. Used by ScrollingTreeFrameScrollingNodeMac to update scroll snap point
291         settings in the scrolling thread.
292         * platform/mac/AxisScrollSnapAnimator.h:
293         * platform/mac/AxisScrollSnapAnimator.mm:
294         (WebCore::toWheelEventStatus): Don't ignore the "MayBegin" or "Cancelled" event phases.
295         (WebCore::AxisScrollSnapAnimator::AxisScrollSnapAnimator): Revise signature to take a reference to the layout units.
296         (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Handle the case where this method gets called from a thread
297         when the scrollable area has already reached its final destination.
298         (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Handle the possibility that the snap offset point vector might be
299         empty. Update method to account for m_snapOffsets being a value, instead of a pointer.
300
301 2015-03-03  Andy Estes  <aestes@apple.com>
302
303         [Content Filtering] Separate unblock handling into its own class
304         https://bugs.webkit.org/show_bug.cgi?id=142251
305
306         Reviewed by Andreas Kling.
307
308         Unblock handling is currently supported only for one type of content filter (WebFilterEvaluator) on one
309         platform (iOS). Having its implementation in ContentFilter is making it difficult to support other filters and
310         platforms, so let's separate unblock handling into its own class called ContentFilterUnblockHandler.
311
312         * WebCore.xcodeproj/project.pbxproj:
313         * loader/DocumentLoader.cpp:
314         (WebCore::DocumentLoader::finishedLoading): Passed a ContentFilterUnblockHandler to FrameLoaderClient::contentFilterDidBlockLoad.
315         (WebCore::DocumentLoader::dataReceived): Ditto.
316         * loader/FrameLoaderClient.h:
317         * platform/ContentFilter.h:
318         * platform/ContentFilterUnblockHandler.h: Copied from Source/WebCore/platform/ios/ContentFilterIOS.mm.
319         (WebCore::ContentFilterUnblockHandler::clear):
320         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm: Renamed from Source/WebCore/platform/ios/ContentFilterIOS.mm.
321         (WebCore::ContentFilterUnblockHandler::ContentFilterUnblockHandler):
322         (WebCore::ContentFilterUnblockHandler::encode):
323         (WebCore::ContentFilterUnblockHandler::decode):
324         (WebCore::scheme):
325         (WebCore::ContentFilterUnblockHandler::handleUnblockRequestAndDispatchIfSuccessful):
326         * platform/mac/ContentFilterMac.mm:
327         (WebCore::ContentFilter::unblockHandler):
328         (WebCore::ContentFilter::ContentFilter): Deleted.
329         (WebCore::ContentFilter::encode): Deleted.
330         (WebCore::ContentFilter::decode): Deleted.
331
332 2015-03-03  Alexey Proskuryakov  <ap@apple.com>
333
334         [Mac] Track localized name follows locale instead of primary language
335         https://bugs.webkit.org/show_bug.cgi?id=142242
336         rdar://problem/20000365
337
338         Reviewed by Eric Carlson.
339
340         * page/CaptionUserPreferencesMediaAF.cpp: (WebCore::trackDisplayName): Use the
341         language for localization, as CFBundle does.
342
343 2015-03-03  Alex Christensen  <achristensen@webkit.org>
344
345         [Win] Unreviewed build fix.
346
347         * WebCore.vcxproj/WebCoreIncludeCommon.props:
348         Include contentextensions subdirectory.
349
350 2015-03-03  Alex Christensen  <achristensen@webkit.org>
351
352         Prepare to use CSS selectors in content extensions.
353         https://bugs.webkit.org/show_bug.cgi?id=142227
354
355         Reviewed by Benjamin Poulain.
356
357         Test: http/tests/usercontentfilter/css-display-none.html
358
359         * CMakeLists.txt:
360         * WebCore.xcodeproj/project.pbxproj:
361         * contentextensions/ContentExtensionActions.h: Added.
362         * contentextensions/ContentExtensionRule.cpp:
363         (WebCore::ContentExtensions::Action::deserialize):
364         * contentextensions/ContentExtensionRule.h:
365         (WebCore::ContentExtensions::Action::Action):
366         (WebCore::ContentExtensions::Action::type):
367         (WebCore::ContentExtensions::Action::cssSelector):
368         * contentextensions/ContentExtensionsBackend.cpp:
369         (WebCore::ContentExtensions::ContentExtensionsBackend::serializeActions):
370         Put action descriptions into a compact format in a Vector 
371         to be able to be put into one block of shared read-only memory.
372         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
373         Put an index of the beginning of the description into the NFA instead of the index of the rule
374         because we will be sharing the descriptions of the actions and not the rules.
375         (WebCore::ContentExtensions::ContentExtensionsBackend::actionsForURL):
376         (WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL): Deleted.
377         Return a vector of actions to be able to do multiple actions for one URL.
378         * contentextensions/ContentExtensionsBackend.h:
379         * contentextensions/ContentExtensionsManager.cpp:
380         (WebCore::ContentExtensions::ExtensionsManager::loadTrigger):
381         (WebCore::ContentExtensions::ExtensionsManager::loadAction):
382         Added the css-display-none action type, which requires a selector.
383         (WebCore::ContentExtensions::ExtensionsManager::loadRule):
384         * loader/cache/CachedResourceLoader.cpp:
385         (WebCore::CachedResourceLoader::requestResource):
386         * page/UserContentController.cpp:
387         (WebCore::UserContentController::actionsForURL):
388         (WebCore::UserContentController::actionForURL): Deleted.
389         * page/UserContentController.h:
390
391 2015-03-03  Brent Fulgham  <bfulgham@apple.com>
392
393         Move scroll animating functions from ScrollAnimator to ScrollController
394         https://bugs.webkit.org/show_bug.cgi?id=142102
395         <rdar://problem/20007161>
396
397         Reviewed by Simon Fraser.
398
399         Tested by platform/mac-wk2/tiled-drawing/scrolling/fast-scroll-mainframe-zoom.html.
400
401         Do some refactoring of the various scrolling classes:
402         1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
403            and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
404         2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
405         3. Move code from ScrollAnimator{Mac} -> ScrollController.
406         4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
407         5. Rename immediateScrollInAxis -> immediateScrollOnAxis
408
409         * WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
410         * page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
411         events, just as is done for the "event not handled" case in EventHandler.cpp. 
412         (WebCore::EventHandler::platformCompleteWheelEvent):
413         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
414         methods, now that ScrollController is controlling this state.
415         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
416         (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
417         need to clean up the CFRunLoopTimer.
418         (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Make sure scroll
419         state is updated after rubber band snap.
420         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
421         until Bug1973 is completed.).
422         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
423         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
424         * platform/ScrollAnimator.cpp:
425         (WebCore::ScrollAnimator::ScrollAnimator):
426         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
427         (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
428         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
429         (WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
430         (WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
431         (WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
432         (WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
433         (WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
434         (WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
435         (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
436         (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
437         * platform/ScrollAnimator.h:
438         * platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
439         (WebCore::ScrollControllerClient::startSnapRubberbandTimer):
440         (WebCore::ScrollControllerClient::stopSnapRubberbandTimer):
441         (WebCore::ScrollControllerClient::startScrollSnapTimer):
442         (WebCore::ScrollControllerClient::stopScrollSnapTimer):
443         * platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
444         (WebCore::ScrollController::ScrollController): Update to initialize new timers.
445         (WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
446         (WebCore::ScrollController::startSnapRubberbandTimer): Added.
447         (WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
448         require client to maintain timers.
449         (WebCore::ScrollController::snapRubberBand): Ditto.
450         (WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
451         (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
452         (WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
453         (WebCore::ScrollController::stopScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
454         (WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
455         (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
456         (WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
457         (WebCore::ScrollController::immediateScrollOnAxis): Ditto.
458         * platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
459         * platform/mac/AxisScrollSnapAnimator.mm:
460         (WebCore::AxisScrollSnapAnimator::handleWheelEvent): Update for 'InAxis' to 'OnAxis' renaming.
461         (WebCore::AxisScrollSnapAnimator::scrollSnapAnimationUpdate): Ditto.
462         (WebCore::AxisScrollSnapAnimator::beginScrollSnapAnimation): Ditto.
463         (WebCore::AxisScrollSnapAnimator::computeSnapDelta): Ditto.
464         (WebCore::AxisScrollSnapAnimator::computeGlideDelta): Ditto.
465         * platform/mac/ScrollAnimatorMac.h:
466         * platform/mac/ScrollAnimatorMac.mm:
467         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
468         controlled in the ScrollController)
469         (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
470         (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
471         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
472         * platform/mac/ScrollController.h: Removed.
473         * platform/mac/ScrollController.mm: Removed.
474
475 2015-03-03  Commit Queue  <commit-queue@webkit.org>
476
477         Unreviewed, rolling out r180683.
478         https://bugs.webkit.org/show_bug.cgi?id=142249
479
480         Broke fast/css/acid2-pixel.html (Requested by ap on #webkit).
481
482         Reverted changeset:
483
484         "Setting any of the <object> element plugin controlling
485         attributes does not have any affect."
486         https://bugs.webkit.org/show_bug.cgi?id=141936
487         http://trac.webkit.org/changeset/180683
488
489 2015-03-03  Dean Jackson  <dino@apple.com>
490
491         Controls panel should have system blurry background
492         https://bugs.webkit.org/show_bug.cgi?id=142154
493         <rdar://problem/20000964>
494
495         Reviewed by Simon Fraser.
496
497         In order to replicate the system style of media controls
498         on OS X and iOS, we need to expose a special -webkit-appearance.
499         This patch adds the new property value, and implements
500         the iOS part of the appearance, which is a blurry shaded
501         background.
502
503         Test: compositing/media-controls-bar-appearance.html
504
505         * css/CSSPrimitiveValueMappings.h:
506         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Map the new
507         keywords from ControlParts.
508
509         * css/CSSValueKeywords.in: Add media-controls-light-bar-background
510         and media-controls-dark-bar-background. Darin suggested they
511         be sorted, so I did this at the same time.
512         * platform/ThemeTypes.h: New ControlParts for the values, and
513         sort the values since they need to be in sync with
514         CSSValueKeywords.in.
515
516         * platform/graphics/GraphicsLayer.h: Expose two new custom appearance
517         values.
518         * platform/graphics/ca/GraphicsLayerCA.cpp:
519         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
520         (WebCore::layerTypeForCustomBackdropAppearance): Helper function.
521         (WebCore::isCustomBackdropLayerType): Ditto.
522         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Merge setting
523         a system backdrop layer in with the code that swaps to/from tiled layers.
524         (WebCore::GraphicsLayerCA::changeLayerTypeTo): New method that does what
525         swapFromOrToTiledLayer implemented, but also allows us to change to a
526         system backdrop layer.
527         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer): Deleted.
528         * platform/graphics/ca/GraphicsLayerCA.h:
529
530         * platform/graphics/ca/PlatformCALayer.h: New layer types.
531         * platform/graphics/ca/mac/PlatformCALayerMac.mm: For now expose these
532         as regular backdrop layers.
533         (PlatformCALayerMac::PlatformCALayerMac):
534         (PlatformCALayerMac::updateCustomAppearance):
535
536         * rendering/RenderLayerBacking.cpp:
537         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer): Make sure to update
538         custom appearance,
539         (WebCore::RenderLayerBacking::updateCustomAppearance): New method.
540         * rendering/RenderLayerBacking.h:
541
542 2015-03-03  Chris Dumez  <cdumez@apple.com>
543
544         Access ApplicationCacheStorage global instance via singleton() static member function
545         https://bugs.webkit.org/show_bug.cgi?id=142239
546
547         Reviewed by Anders Carlsson.
548
549         Access ApplicationCacheStorage global instance via singleton() static
550         member function as per WebKit coding style.
551
552 2015-03-03  Anders Carlsson  <andersca@apple.com>
553
554         Try to fix the build.
555
556         * platform/spi/cf/CFNetworkSPI.h:
557
558 2015-03-03  Timothy Horton  <timothy_horton@apple.com>
559
560         <attachment> label can get very wide, doesn't wrap/truncate
561         https://bugs.webkit.org/show_bug.cgi?id=142214
562         <rdar://problem/19982499>
563
564         Reviewed by Simon Fraser.
565
566         Test: fast/attachment/attachment-label-highlight.html
567
568         * rendering/RenderThemeMac.h:
569         * rendering/RenderThemeMac.mm:
570         (WebCore::labelTextColorForAttachment):
571         (WebCore::AttachmentLayout::addLine):
572         (WebCore::AttachmentLayout::layOutText):
573         (WebCore::AttachmentLayout::AttachmentLayout):
574         Make it possible to lay out multiple lines of label text.
575         We lay out the whole string normally, but then only draw N (where N=1 for now,
576         but is adjustable) of the lines. The remainder of the string is then
577         merged into a single line, which is middle-truncated with an ellipsis
578         and drawn in place of the N+1 line.
579
580         (WebCore::addAttachmentLabelBackgroundRightCorner):
581         (WebCore::addAttachmentLabelBackgroundLeftCorner):
582         (WebCore::paintAttachmentLabelBackground):
583         Wrap the label background around the multiple lines of text with curved edges.
584         We run first down the right side of the label, determining whether to use
585         concave or convex arcs based on the relative widths of adjacent lines.
586         Then, we run back up the left side of the label doing the same thing.
587
588         If the background rects of two lines are very similar (within the rounded rect radius),
589         they will be expanded to the larger of the two, because otherwise the arcs
590         look quite wrong.
591
592         (WebCore::paintAttachmentLabel):
593         Draw the label with CoreText directly instead of bothering with WebCore
594         text layout primitives. There's no need, and it makes wrapping much more complicated.
595
596         (WebCore::RenderThemeMac::paintAttachment):
597         (WebCore::RenderThemeMac::paintAttachmentLabelBackground): Deleted.
598         (WebCore::RenderThemeMac::paintAttachmentLabel): Deleted.
599
600 2015-03-03  Simon Fraser  <simon.fraser@apple.com>
601
602         Avoid applying the clip-path when painting, if a layer also has a shape layer mask
603         https://bugs.webkit.org/show_bug.cgi?id=142212
604
605         Reviewed by Zalan Bujtas.
606
607         After r180882 we translate clip-path into a composited shape mask when the layer
608         is composited. However, we were also still applying the clip-path when painting
609         the layer contents.
610         
611         Now, we set the GraphicsLayer bits GraphicsLayerPaintClipPath and GraphicsLayerPaintMask
612         only for the m_maskLayer's painting. This translate into setting PaintLayerPaintingCompositingMaskPhase
613         and PaintLayerPaintingCompositingClipPathPhase only when painting that same mask layer,
614         rather than always. To ensure that masks and clip-path get applied for software paints,
615         add shouldPaintMask() and shouldApplyClipPath() that return true for non-composited layers,
616         and when doing a flattening paint.
617
618         * rendering/RenderLayer.cpp:
619         (WebCore::RenderLayer::paintLayerContents): Use shouldApplyClipPath().
620         Pull three chunks of code under a single "if (shouldPaintContent && !selectionOnly)" condition.
621         The condition for paintChildClippingMaskForFragments() is changed slightly; we need to call this
622         only when painting the clip-path/mask layer contents, but also only when there is no mask to fill
623         the clipped area for us.
624         (WebCore::RenderLayer::calculateClipRects):
625         (WebCore::RenderLayer::paintsWithClipPath): Deleted.
626         * rendering/RenderLayer.h:
627         * rendering/RenderLayerBacking.cpp:
628         (WebCore::RenderLayerBacking::updateMaskingLayer): Be sure to set the GraphicsLayerPaintClipPath bit
629         when having a mask forces us onto the painting path.
630
631 2015-03-03  Anders Carlsson  <andersca@apple.com>
632
633         Use the correct display name for website data for local files
634         https://bugs.webkit.org/show_bug.cgi?id=142228
635
636         Reviewed by Dan Bernstein.
637
638         * English.lproj/Localizable.strings:
639         Add local file display name.
640
641         * platform/spi/cf/CFNetworkSPI.h:
642         Add kCFHTTPCookieLocalFileDomain declaration.
643
644 2015-03-03  Myles C. Maxfield  <mmaxfield@apple.com>
645
646         BreakingContext cleanup
647         https://bugs.webkit.org/show_bug.cgi?id=142146
648
649         Reviewed by Dean Jackson.
650
651         1. Use commitLineBreakAtCurrentWidth() instead of directly
652         updating m_width and m_lineBreak, because the name makes the
653         intent clearer.
654         2. Remove duplicate function LineBreaker::nextSegmentBreak().
655         3. lineStyle() takes care of inspecting RenderText's parent's
656         style.
657         4. Add FIXME to BreakingContext::initializeForCurrentObject()
658         because it seems like we are ignoring first-line style for
659         some properties.
660
661         No new tests because there is no behavior change.
662
663         * rendering/line/BreakingContextInlineHeaders.h:
664         (WebCore::BreakingContext::BreakingContext):
665         (WebCore::BreakingContext::initializeForCurrentObject):
666         (WebCore::BreakingContext::handleReplaced):
667         (WebCore::BreakingContext::handleText):
668         (WebCore::BreakingContext::commitAndUpdateLineBreakIfNeeded):
669         (WebCore::BreakingContext::handleEndOfLine):
670         * rendering/line/LineBreaker.cpp:
671         (WebCore::LineBreaker::nextLineBreak): Deleted.
672         (WebCore::LineBreaker::nextSegmentBreak): Deleted.
673         * rendering/line/LineBreaker.h:
674         * rendering/line/LineInlineHeaders.h:
675         (WebCore::lineStyle):
676
677 2015-03-03  Chris Dumez  <cdumez@apple.com>
678
679         Make AudioContext suspendable when it is not rendering
680         https://bugs.webkit.org/show_bug.cgi?id=142210
681         <rdar://problem/19923085>
682
683         Reviewed by Eric Carlson.
684
685         Make AudioContext suspendable when it is not rendering to increase the
686         likelihood of entering the PageCache for pages using WebAudio.
687
688         This patch adds a state member to AudioContext with 3 possible states:
689         Suspended / Running / Closed, as defined in the specification:
690         http://webaudio.github.io/web-audio-api/#widl-AudioContext-state
691
692         This state is used to decide if we can suspend the page or not. We
693         can safely suspend if the AudioContext's state is suspended (did not
694         start rendering) or closed (Stopped rendering).
695
696         Note that this patch does not expose the AudioContext's state to the
697         Web yet, even though it is exposed in the latest specification.
698
699         Tests: fast/history/page-cache-closed-audiocontext.html
700                fast/history/page-cache-running-audiocontext.html
701                fast/history/page-cache-suspended-audiocontext.html
702
703         * Modules/webaudio/AudioContext.cpp:
704         (WebCore::AudioContext::AudioContext):
705         (WebCore::AudioContext::uninitialize):
706         (WebCore::AudioContext::canSuspend):
707         (WebCore::AudioContext::startRendering):
708         (WebCore::AudioContext::fireCompletionEvent):
709         * Modules/webaudio/AudioContext.h:
710
711 2015-03-02  Carlos Garcia Campos  <cgarcia@igalia.com>
712
713         [SOUP] Use SoupMessage::starting instead of SoupSession::request-started
714         https://bugs.webkit.org/show_bug.cgi?id=142164
715
716         Reviewed by Sergio Villar Senin.
717
718         SoupSession::request-started is deprecated in libsoup 2.50. Both
719         signals are equivalent, but SoupMessage::starting is also emitted
720         for resources loaded from the disk cache. This fixes web timing
721         calculations for cached resources, since we were not initializing
722         m_requestStart.
723
724         * platform/network/soup/ResourceHandleSoup.cpp:
725         (WebCore::startingCallback):
726         (WebCore::createSoupMessageForHandleAndRequest):
727         * platform/network/soup/SoupNetworkSession.cpp:
728         (WebCore::SoupNetworkSession::SoupNetworkSession):
729
730 2015-03-03  Carlos Garcia Campos  <cgarcia@igalia.com>
731
732         [SOUP] Synchronous XMLHttpRequests can time out when we reach the max connections limit
733         https://bugs.webkit.org/show_bug.cgi?id=141508
734
735         Reviewed by Sergio Villar Senin.
736
737         Use SOUP_MESSAGE_IGNORE_CONNECTION_LIMITS flag when loading a
738         synchronous message instead of increasing the maximum number of
739         connections allowed if the soup version is recent enough.
740         The current solution of increasing/decreasing the limits doesn't
741         always work, because connections are not marked as IDLE in libsoup
742         until the message is unqueued, but we don't wait for the message
743         to be unqueued to finish our loads in WebKit, we finish them as
744         soon as we have finished reading the stream. This causes that
745         synchronous loads keep blocked in the nested main loop until the
746         timeout of 10 seconds is fired and the load fails.
747         Also marked WebCoreSynchronousLoader class as final, the virtual
748         methods as override and removed the unsused method isSynchronousClient.
749
750         * platform/network/soup/ResourceHandleSoup.cpp:
751         (WebCore::createSoupMessageForHandleAndRequest):
752         (WebCore::WebCoreSynchronousLoader::WebCoreSynchronousLoader):
753         (WebCore::WebCoreSynchronousLoader::isSynchronousClient): Deleted.
754         (WebCore::WebCoreSynchronousLoader::didReceiveResponse):
755         (WebCore::WebCoreSynchronousLoader::didReceiveData):
756         (WebCore::WebCoreSynchronousLoader::didReceiveBuffer):
757         (WebCore::WebCoreSynchronousLoader::didFinishLoading):
758         (WebCore::WebCoreSynchronousLoader::didFail):
759         (WebCore::WebCoreSynchronousLoader::didReceiveAuthenticationChallenge):
760         (WebCore::WebCoreSynchronousLoader::shouldUseCredentialStorage):
761
762 2015-03-02  David Kilzer  <ddkilzer@apple.com>
763
764         [iOS] Disable -Wdeprecated-declaration warnings in WebVideoFullscreenInterfaceAVKit.mm
765
766         Fixing the deprecations is tracked by: <rdar://problem/20018692>
767
768         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
769         (WebVideoFullscreenInterfaceAVKit::enterFullscreenOptimized):
770         Ignore -Wdeprecated-declaration warnings via clang pragmas.
771
772 2015-03-02  Commit Queue  <commit-queue@webkit.org>
773
774         Unreviewed, rolling out r180902.
775         https://bugs.webkit.org/show_bug.cgi?id=142205
776
777         It broke scrolling in some cases. See bug 142202 for details.
778         (Requested by bdash on #webkit).
779
780         Reverted changeset:
781
782         "Move scroll animating functions from ScrollAnimator to
783         ScrollController"
784         https://bugs.webkit.org/show_bug.cgi?id=142102
785         http://trac.webkit.org/changeset/180902
786
787 2015-03-02  Commit Queue  <commit-queue@webkit.org>
788
789         Unreviewed, rolling out r180911.
790         https://bugs.webkit.org/show_bug.cgi?id=142204
791
792         The tests it added are crashing (Requested by bdash on
793         #webkit).
794
795         Reverted changeset:
796
797         "Add a microtask abstraction"
798         https://bugs.webkit.org/show_bug.cgi?id=137496
799         http://trac.webkit.org/changeset/180911
800
801 2015-03-02  Yoav Weiss  <yoav@yoav.ws>
802
803         Add a microtask abstraction
804         https://bugs.webkit.org/show_bug.cgi?id=137496
805
806         Reviewed by Sam Weinig.
807
808         This patch adds a microtask abstraction: https://html.spec.whatwg.org/multipage/webappapis.html#microtask
809         That abstraction is required in order to enable async loading of images,
810         which is in turn required to enable support for the picture element, as well as
811         to make sure that the order of properties set on HTMLImageElement has no implications.
812
813         * WebCore.vcxproj/WebCore.vcxproj: Add MicroTask.{h,cpp} to the project.
814         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Add MicroTaskTest.{h,cpp} to the project.
815         * WebCore.vcxproj/WebCore.vcxproj.filters: Add MicroTask.{h,cpp} to the project.
816         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Add MicroTaskTest.{h,cpp} to the project.
817         * WebCore.xcodeproj/project.pbxproj: Add MicroTask{,Test}.{h,cpp} to the project.
818         * dom/Document.h: Add WEBCORE_EXPORT to addConsoleMessage, so it can be used in MicroTaskTest that's in WebCoreTestSupport..
819         * dom/MicroTask.h: Add a MicroTask interface class. Add a MicroTaskQueue singleton.
820         (WebCore::MicroTask::~MicroTask):
821         (WebCore::MicroTask::run): Run the microtask.
822         * dom/MicroTask.cpp: Implement the MicroTaskQueue singleton.
823         (WebCore::MicroTaskQueue::singleton): Get a singleton instance of MicroTaskQueue.
824         (WebCore::MicroTaskQueue::queueMicroTask): Add a microtask to the queue.
825         (WebCore::MicroTaskQueue::runMicroTasks): Run all the microtasks in the queue and clear it.
826         * dom/ScriptRunner.cpp: Trigger running of all microtasks in queue.
827         (WebCore::ScriptRunner::timerFired):
828         * html/parser/HTMLScriptRunner.cpp: Trigger running of all microtasks in queue.
829         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
830         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
831         (WebCore::HTMLScriptRunner::runScript):
832         * testing/Internals.cpp: Add a method to queue a test microtask.
833         (WebCore::Internals::queueMicroTask):
834         * testing/Internals.h: Add a method to queue a test microtask.
835         (WebCore::Internals::queueMicroTask):
836         * testing/Internals.idl: Expose test microtask queueing to test JS.
837         * testing/MicroTaskTest.cpp: Add a test class that implements a microtask and prints to the console when it runs.
838         (WebCore::MicroTaskTest::run): Run the microtask
839         (WebCore::MicroTaskTest::create): Create a test microtask.
840         * testing/MicroTaskTest.h: Add a test class that implements a microtask.
841         (WebCore::MicroTaskTest::run):
842         (WebCore::MicroTaskTest::create):
843
844 2015-03-02  Jeremy Jones  <jeremyj@apple.com>
845
846         RenderVideo should not paint the video frame when video is fullscreen.
847         https://bugs.webkit.org/show_bug.cgi?id=142097
848
849         Reviewed by Eric Carlson.
850
851         For performance and correctness, RenderVideo should not paint the current video frame
852         inline when video is fullscreen. This happens when snapshots are taken and can have a
853         negative performance impact.
854
855         * rendering/RenderVideo.cpp:
856         (WebCore::RenderVideo::paintReplaced):
857
858 2015-03-02  Dean Jackson  <dino@apple.com>
859
860         [iOS Media] Airplay button should be blue when active
861         https://bugs.webkit.org/show_bug.cgi?id=142193
862
863         Reviewed by Brent Fulgham.
864
865         Add a blue form of the Airplay button that is used
866         when we are actively displaying on another screen.
867
868         * Modules/mediacontrols/mediaControlsiOS.css:
869         (video::-webkit-media-controls-wireless-playback-picker-button):
870         (video::-webkit-media-controls-wireless-playback-picker-button:active):
871         (video::-webkit-media-controls-wireless-playback-picker-button.playing):
872         * Modules/mediacontrols/mediaControlsiOS.js:
873         (ControllerIOS.prototype.updateWirelessPlaybackStatus):
874
875 2015-03-02  Brent Fulgham  <bfulgham@apple.com>
876
877         Move scroll animating functions from ScrollAnimator to ScrollController
878         https://bugs.webkit.org/show_bug.cgi?id=142102
879         <rdar://problem/20007161>
880
881         Reviewed by Simon Fraser.
882
883         No change in functionality.
884         
885         Do some refactoring of the various scrolling classes:
886         1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
887            and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
888         2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
889         3. Move code from ScrollAnimator{Mac} -> ScrollController.
890         4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
891         5. Rename immediateScrollInAxis -> immediateScrollOnAxis
892
893         * WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
894         * page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
895         events, just as is done for the "event not handled" case in EventHandler.cpp. 
896         (WebCore::EventHandler::platformCompleteWheelEvent):
897         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
898         methods, now that ScrollController is controlling this state.
899         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
900         (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
901         need to clean up the CFRunLoopTimer.
902         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
903         until Bug 141973 is completed.).
904         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
905         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
906         (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Deleted.
907         * platform/ScrollAnimator.cpp:
908         (WebCore::ScrollAnimator::ScrollAnimator):
909         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
910         (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
911         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
912         (WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
913         (WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
914         (WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
915         (WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
916         (WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
917         (WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
918         (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
919         (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
920         * platform/ScrollAnimator.h:
921         * platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
922         * platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
923         (WebCore::ScrollController::ScrollController): Update to initialize new timers.
924         (WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
925         (WebCore::ScrollController::startSnapRubberbandTimer): Added.
926         (WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
927         require client to maintain timers.
928         (WebCore::ScrollController::snapRubberBand): Ditto.
929         (WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
930         (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
931         (WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
932         (WebCore::ScrollController::stopScrollSnapTimer):  Ditto. Also updated to use RunLoop::Timer.
933         (WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
934         (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
935         (WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
936         (WebCore::ScrollController::immediateScrollOnAxis): Ditto.
937         * platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
938         * platform/mac/AxisScrollSnapAnimator.mm: Ditto.
939         * platform/mac/ScrollAnimatorMac.h:
940         * platform/mac/ScrollAnimatorMac.mm:
941         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
942         controlled in the ScrollController)
943         (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
944         (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
945         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
946         * platform/mac/ScrollController.h: Removed.
947         * platform/mac/ScrollController.mm: Removed.
948
949 2015-03-02  Mark Lam  <mark.lam@apple.com>
950
951         The InspectorTimelineAgent should gracefully handle attempts to start more than once.
952         <https://webkit.org/b/142189>
953
954         Reviewed by Joseph Pecoraro.
955
956         No new tests.  Unskipped an existing test that already asserts this.
957
958         InspectorTimelineAgent::internalStop() already checks for redundant calls to it in
959         case the InspectorTimelineAgent is already disabled. Similarly,
960         InspectorTimelineAgent::internalStart() should check if the InspectorTimelineAgent
961         is already enabled before proceeding to do work to enable it. Though wasteful,
962         it is legal for clients of the InspectorTimelineAgent to invoke start on it more
963         than once. Hence, this check is needed.
964
965         This check fixes the debug assertion failure when running the
966         inspector/timeline/debugger-paused-while-recording.html test. The test can now
967         be unskipped.
968
969         * inspector/InspectorTimelineAgent.cpp:
970         (WebCore::InspectorTimelineAgent::internalStart):
971
972 2015-03-02  Roger Fong  <roger_fong@apple.com>
973
974         Update backgrounds of sliders for inline media controls on OS X.
975         https://bugs.webkit.org/show_bug.cgi?id=142188.
976         <rdar://problem/20012413>
977
978         Reviewed by Dean Jackson.
979
980         Don’t use CSS to draw volume and timeline slider backgrounds.
981         * Modules/mediacontrols/mediaControlsApple.css:
982         (video::-webkit-media-controls-volume-slider):
983         (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
984         (audio::-webkit-media-controls-timeline):
985         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
986         (audio::-webkit-media-controls-panel .thumbnail-track):
987         (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb): Deleted.
988         (audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,): Deleted.
989
990         Draw volume and timeline slider backgrounds using 2d canvases.
991         * Modules/mediacontrols/mediaControlsApple.js:
992         (Controller.prototype.createControls):
993         (Controller.prototype.handleVolumeSliderInput):
994         (Controller.prototype.addRoundedRect):
995         (Controller.prototype.drawTimelineBackground):
996         (Controller.prototype.drawVolumeBackground):
997         (Controller.prototype.showControls):
998         * Modules/mediacontrols/mediaControlsiOS.js:
999         (ControllerIOS.prototype.addRoundedRect): Deleted.
1000
1001 2015-03-01  Roger Fong  <roger_fong@apple.com>
1002
1003         Update inline media element controls appearance Part 1.
1004         https://bugs.webkit.org/show_bug.cgi?id=142138.
1005         <rdar://problem/19997384>
1006
1007         Reviewed by Dean Jackson.
1008
1009         Update positioning, sizes, and background colors media control elements.
1010         Volume and timeline sliders will be drawn in a separate patch via 2d canvases.
1011
1012         * Modules/mediacontrols/mediaControlsApple.css:
1013         (audio::-webkit-media-controls-panel):
1014         (video::-webkit-media-controls-panel):
1015         (audio::-webkit-media-controls-rewind-button):
1016         (audio::-webkit-media-controls-play-button):
1017         (audio::-webkit-media-controls-panel .mute-box):
1018         (video::-webkit-media-controls-volume-max-button):
1019         (audio::-webkit-media-controls-panel .volume-box):
1020         (audio::-webkit-media-controls-panel .volume-box:active):
1021         (video::-webkit-media-controls-volume-slider):
1022         (audio::-webkit-media-controls-toggle-closed-captions-button):
1023         (audio::-webkit-media-controls-fullscreen-button):
1024         (audio::-webkit-media-controls-current-time-display):
1025         (audio::-webkit-media-controls-time-remaining-display):
1026         (audio::-webkit-media-controls-timeline-container .hour-long-time): Deleted.
1027
1028 2015-03-02  David Kilzer  <ddkilzer@apple.com>
1029
1030         REGRESSION (r180882): Build failure: Methods not marked override in GraphicsLayerCA.h
1031         <http://webkit.org/b/138684>
1032
1033         Fixes the following build failures:
1034
1035             In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
1036             In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
1037             In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
1038             WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:123:33: error: 'setShapeLayerPath' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
1039                 WEBCORE_EXPORT virtual void setShapeLayerPath(const Path&);
1040                                             ^
1041             In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
1042             In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
1043             In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
1044             WebCore.framework/PrivateHeaders/GraphicsLayer.h:390:18: note: overridden virtual function is here
1045                 virtual void setShapeLayerPath(const Path&);
1046                              ^
1047             In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
1048             In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
1049             In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
1050             WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:124:33: error: 'setShapeLayerWindRule' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
1051                 WEBCORE_EXPORT virtual void setShapeLayerWindRule(WindRule);
1052                                             ^
1053             In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
1054             In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
1055             In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
1056             WebCore.framework/PrivateHeaders/GraphicsLayer.h:393:18: note: overridden virtual function is here
1057                 virtual void setShapeLayerWindRule(WindRule);
1058                              ^
1059             2 errors generated.
1060
1061         * platform/graphics/ca/GraphicsLayerCA.h:
1062         (WebCore::GraphicsLayer::setShapeLayerPath): Mark as override.
1063         (WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.
1064
1065 2015-03-01  Simon Fraser  <simon.fraser@apple.com>
1066
1067         Make clip-path work on <video>, <canvas> etc.
1068         https://bugs.webkit.org/show_bug.cgi?id=138684
1069
1070         Reviewed by Darin Adler.
1071         
1072         clip-path only worked in compositing layers on the painted contents of the layer,
1073         and failed to clip children. Fix this by translating the clip path into a Path
1074         which is set on a CA shape layer (for Mac and iOS), or painted into the
1075         RenderLayerBacking's mask layer. There are two code paths:
1076
1077         1. clip-path which is a <basic-shape> or <geometry-box>, and no mask.
1078             Here we can use the optimal code path of converting the clip into a path
1079             that is put onto a CAShapeLayer, which is then used as a mask. There is no
1080             additional backing store.
1081         2. clip-path with an SVG reference, or clip-path combined with -webkit-mask:
1082             Here we have to allocate backing store for the mask layer, and paint the
1083             clip path (possibly with the mask).
1084         
1085         We add GraphicsLayer::Type::Shape, and add a getter for the layer type.
1086
1087         Tests: compositing/masks/compositing-clip-path-and-mask.html
1088                compositing/masks/compositing-clip-path-mask-change.html
1089                compositing/masks/compositing-clip-path.html
1090                compositing/masks/reference-clip-path-on-composited.html
1091
1092         * platform/graphics/GraphicsLayer.cpp:
1093         (WebCore::GraphicsLayer::GraphicsLayer): Store the type in the layer so the getter can return it.
1094         (WebCore::GraphicsLayer::shapeLayerPath): Get and set the shape layer path.
1095         (WebCore::GraphicsLayer::setShapeLayerPath): Ditto.
1096         (WebCore::GraphicsLayer::shapeLayerWindRule): Get and set the shape layer wind rule.
1097         (WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.
1098         * platform/graphics/GraphicsLayer.h:
1099         (WebCore::GraphicsLayer::type): Expose the type.
1100         (WebCore::GraphicsLayer::supportsLayerType): Allow the cross-platform code to use
1101         shape layers when it knows they are available.
1102         (WebCore::GraphicsLayer::needsClippingMaskLayer): Deleted. This was never used.
1103         * platform/graphics/GraphicsLayerClient.h: Align the bits (helps avoid typos). Add a
1104         GraphicsLayerPaintClipPath phase.
1105         * platform/graphics/Path.h: Some exports since WK2 needs to encode Paths now.
1106         * platform/graphics/ca/GraphicsLayerCA.cpp:
1107         (WebCore::GraphicsLayerCA::initialize): Make shape layers.
1108         (WebCore::GraphicsLayerCA::setShapeLayerPath): Setter for the shape path. Sadly we
1109         can't early return on unchanged paths yet.
1110         (WebCore::GraphicsLayerCA::setShapeLayerWindRule):
1111         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Updates for shape path
1112         and wind rule.
1113         (WebCore::GraphicsLayerCA::updateShape):
1114         (WebCore::GraphicsLayerCA::updateWindRule):
1115         * platform/graphics/ca/GraphicsLayerCA.h: Some new dirty bits for shape path and wind rule.
1116         * platform/graphics/ca/PlatformCALayer.h:
1117         * platform/graphics/ca/mac/PlatformCALayerMac.h:
1118         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Got rid of lots of m_layer.get().
1119         (PlatformCALayerMac::~PlatformCALayerMac):
1120         (PlatformCALayerMac::setNeedsDisplay):
1121         (PlatformCALayerMac::setNeedsDisplayInRect):
1122         (PlatformCALayerMac::removeFromSuperlayer):
1123         (PlatformCALayerMac::setSublayers):
1124         (PlatformCALayerMac::removeAllSublayers):
1125         (PlatformCALayerMac::appendSublayer):
1126         (PlatformCALayerMac::insertSublayer):
1127         (PlatformCALayerMac::replaceSublayer):
1128         (PlatformCALayerMac::adoptSublayers):
1129         (PlatformCALayerMac::addAnimationForKey):
1130         (PlatformCALayerMac::removeAnimationForKey):
1131         (PlatformCALayerMac::animationForKey):
1132         (PlatformCALayerMac::setMask):
1133         (PlatformCALayerMac::isOpaque):
1134         (PlatformCALayerMac::setOpaque):
1135         (PlatformCALayerMac::bounds):
1136         (PlatformCALayerMac::setBounds):
1137         (PlatformCALayerMac::position):
1138         (PlatformCALayerMac::setPosition):
1139         (PlatformCALayerMac::anchorPoint):
1140         (PlatformCALayerMac::setAnchorPoint):
1141         (PlatformCALayerMac::transform):
1142         (PlatformCALayerMac::setTransform):
1143         (PlatformCALayerMac::sublayerTransform):
1144         (PlatformCALayerMac::setSublayerTransform):
1145         (PlatformCALayerMac::setHidden):
1146         (PlatformCALayerMac::setGeometryFlipped):
1147         (PlatformCALayerMac::isDoubleSided):
1148         (PlatformCALayerMac::setDoubleSided):
1149         (PlatformCALayerMac::masksToBounds):
1150         (PlatformCALayerMac::setMasksToBounds):
1151         (PlatformCALayerMac::acceleratesDrawing):
1152         (PlatformCALayerMac::setAcceleratesDrawing):
1153         (PlatformCALayerMac::contents):
1154         (PlatformCALayerMac::setContents):
1155         (PlatformCALayerMac::setContentsRect):
1156         (PlatformCALayerMac::setMinificationFilter):
1157         (PlatformCALayerMac::setMagnificationFilter):
1158         (PlatformCALayerMac::backgroundColor):
1159         (PlatformCALayerMac::setBackgroundColor):
1160         (PlatformCALayerMac::setBorderWidth):
1161         (PlatformCALayerMac::setBorderColor):
1162         (PlatformCALayerMac::opacity):
1163         (PlatformCALayerMac::setOpacity):
1164         (PlatformCALayerMac::copyFiltersFrom):
1165         (PlatformCALayerMac::setName):
1166         (PlatformCALayerMac::setSpeed):
1167         (PlatformCALayerMac::setTimeOffset):
1168         (PlatformCALayerMac::contentsScale):
1169         (PlatformCALayerMac::setContentsScale):
1170         (PlatformCALayerMac::cornerRadius):
1171         (PlatformCALayerMac::setCornerRadius):
1172         (PlatformCALayerMac::setEdgeAntialiasingMask):
1173         (PlatformCALayerMac::shapeWindRule): New function.
1174         (PlatformCALayerMac::setShapeWindRule): Ditto.
1175         (PlatformCALayerMac::shapePath): Ditto.
1176         (PlatformCALayerMac::setShapePath): Ditto.
1177         (PlatformCALayer::isWebLayer):
1178         * platform/graphics/cg/PathCG.cpp:
1179         (WebCore::Path::Path): nullptr.
1180         * rendering/RenderLayer.cpp:
1181         (WebCore::RenderLayer::paintsWithClipPath): Return true if the clip path is painted.
1182         (WebCore::RenderLayer::computeClipPath): Factor code that computes the clip path into this
1183         function, so we can call it from RenderLayerBacking too.
1184         (WebCore::RenderLayer::setupClipPath):
1185         (WebCore::RenderLayer::paintLayerContents): We only want to apply the clip path
1186         for painting when we're either painting a non-composited layer, or we're painting the
1187         mask layer of a composited layer. We in the latter case, we just want to fill the clip
1188         path with black, so re-use the paintChildClippingMaskForFragments() which does this.
1189         * rendering/RenderLayer.h: Align the bits, add PaintLayerPaintingCompositingClipPathPhase.
1190         * rendering/RenderLayerBacking.cpp:
1191         (WebCore::RenderLayerBacking::~RenderLayerBacking):
1192         (WebCore::RenderLayerBacking::updateConfiguration):
1193         (WebCore::RenderLayerBacking::updateGeometry): Move mask updating into its own function.
1194         (WebCore::RenderLayerBacking::updateMaskingLayerGeometry): If we're using the shape layer
1195         code path, compute the Path and set it and the wind rule on the mask layer.
1196         (WebCore::RenderLayerBacking::updateMaskingLayer): This is now more complex, as it has
1197         to deal with combinations of clip-path and mask, some of which allow for the shape layer
1198         mask, and we handle dynamic changes between these and painted masks.
1199         (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer): Include the GraphicsLayerPaintClipPath phase.
1200         (WebCore::RenderLayerBacking::paintIntoLayer): Map GraphicsLayerPaintClipPath to PaintLayerPaintingCompositingClipPathPhase.
1201         (WebCore::RenderLayerBacking::updateMaskLayer): Deleted.
1202         * rendering/RenderLayerBacking.h:
1203
1204 2015-03-01  Hunseop Jeong  <hs85.jeong@samsung.com>
1205
1206         [Cairo] Implement Path::addEllipse 
1207         https://bugs.webkit.org/show_bug.cgi?id=142144
1208
1209         Reviewed by Gyuyoung Kim.
1210
1211         Add support for addEllipse method for platforms using cairo.
1212
1213         * platform/graphics/cairo/PathCairo.cpp:
1214         (WebCore::Path::addEllipse):
1215
1216 2015-03-01  Joonghun Park  <jh718.park@samsung.com>
1217
1218         Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ScrollAnimator
1219         https://bugs.webkit.org/show_bug.cgi?id=142143
1220
1221         Reviewed by Darin Adler.
1222
1223         No new tests, no behavior changes.
1224
1225         * platform/ScrollAnimator.cpp:
1226         (WebCore::ScrollAnimator::create):
1227         * platform/ScrollAnimator.h:
1228         * platform/ScrollAnimatorNone.cpp:
1229         (WebCore::ScrollAnimator::create):
1230         * platform/ScrollableArea.h:
1231         * platform/ios/ScrollAnimatorIOS.mm:
1232         (WebCore::ScrollAnimator::create):
1233         * platform/mac/ScrollAnimatorMac.mm:
1234         (WebCore::ScrollAnimator::create):
1235
1236 2015-02-26  Andy Estes  <aestes@apple.com>
1237
1238         [Content Filtering] Move another declaration to WebFilterEvaluatorSPI.h
1239         https://bugs.webkit.org/show_bug.cgi?id=142066
1240
1241         Reviewed by Andreas Kling.
1242
1243         * platform/ios/ContentFilterIOS.mm:
1244         * platform/spi/cocoa/WebFilterEvaluatorSPI.h:
1245
1246 2015-03-01  Chris Dumez  <cdumez@apple.com>
1247
1248         Make NotificationCenter / Notification suspendable
1249         https://bugs.webkit.org/show_bug.cgi?id=142117
1250         <rdar://problem/19923085>
1251
1252         Reviewed by Andreas Kling.
1253
1254         Make NotificationCenter / Notification suspendable so that pages using
1255         them can enter the PageCache.
1256
1257         NotificationCenter can safely be suspended if there are no pending
1258         permission requests. This required adding an
1259         "hasPendingPermissionRequests()" callback to the NotificationClient.
1260
1261         Notification can safely be suspended if it is either idle (not showing
1262         yet) or closed.
1263
1264         Tests: fast/history/page-cache-notification-non-suspendable.html
1265                fast/history/page-cache-notification-suspendable.html
1266
1267         * Modules/notifications/Notification.cpp:
1268         (WebCore::Notification::canSuspend):
1269         * Modules/notifications/NotificationCenter.cpp:
1270         (WebCore::NotificationCenter::canSuspend):
1271         * Modules/notifications/NotificationClient.h:
1272
1273 2015-03-01  Ryosuke Niwa  <rniwa@webkit.org>
1274
1275         isContentEditable shouldn't trigger synchronous style recalc in most cases
1276         https://bugs.webkit.org/show_bug.cgi?id=129034
1277
1278         Reviewed by Antti Koivisto.
1279
1280         Avoid style recalc inside isContentEditable when the document doesn't contain -webkit-user-modify or
1281         -webkit-user-select: all. Instead, compute the value from contenteditable attributes in ancestors.
1282         However, still compute the editability from the style tree when it's up-to-date in order to avoid
1283         repeatedly walking up the DOM tree in a hot code path inside editing.
1284
1285         Test: fast/dom/HTMLElement/dynamic-editability-change.html
1286
1287         * css/CSSGrammar.y.in: No need to pass in "true" as we never call this function with false.
1288         * css/CSSParser.cpp:
1289         (WebCore::isValidKeywordPropertyAndValue): Calls parserSetUsesStyleBasedEditability as needed.
1290         (WebCore::parseKeywordValue): Passes around StyleSheetContents*.
1291         (WebCore::CSSParser::parseValue): Ditto.
1292         (WebCore::CSSParser::parseFont): Ditto.
1293
1294         * css/StyleSheetContents.cpp:
1295         (WebCore::StyleSheetContents::StyleSheetContents): Initializes and copies m_usesStyleBasedEditability.
1296
1297         * css/StyleSheetContents.h:
1298         (WebCore::StyleSheetContents::parserSetUsesRemUnits): Removed the argument since it was always true.
1299         (WebCore::StyleSheetContents::parserSetUsesStyleBasedEditability): Added.
1300         (WebCore::StyleSheetContents::usesStyleBasedEditability): Added.
1301
1302         * dom/Document.cpp:
1303         (WebCore::Document::recalcStyle): Added a FIXME as well as a comment explaining why we don't call
1304         setUsesStyleBasedEditability. Since Node::computeEditability triggers style recalc only when the flag
1305         is set to true, it's too late to update the flag here.
1306         (WebCore::Document::updateStyleIfNeeded): Uses a newly extracted needsStyleRecalc.
1307         (WebCore::Document::updateBaseURL): Preserves m_usesStyleBasedEditability as well as m_usesRemUnit.
1308         (WebCore::Document::usesStyleBasedEditability): Added. Returns true when inline style declarations or
1309         any active stylesheet uses -webkit-user-modify or -webkit-user-select: all. Flushing pending stylesheet
1310         changes here is fine because the alternative is to trigger a full blown style recalc.
1311
1312         * dom/Document.h:
1313         (WebCore::Document::needsStyleRecalc): Added. Extracted from updateStyleIfNeeded.
1314
1315         * dom/DocumentStyleSheetCollection.cpp:
1316         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
1317         (WebCore::styleSheetsUseRemUnits): Deleted.
1318         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Updates m_usesStyleBasedEditability
1319         as well as m_usesRemUnit.
1320
1321         * dom/DocumentStyleSheetCollection.h:
1322         (WebCore::DocumentStyleSheetCollection::usesStyleBasedEditability): Added.
1323         (WebCore::DocumentStyleSheetCollection::setUsesStyleBasedEditability): Added.
1324
1325         * dom/Node.cpp:
1326         (WebCore::computeEditabilityFromComputedStyle): Extracted from computeEditability.
1327         (WebCore::Node::computeEditability): When the style recalc is requested and the render tree is dirty,
1328         check if the document uses any CSS property that can affect the editability of elements. If it doesn't,
1329         compute the editability from contenteditable attributes in the anchors via matchesReadWritePseudoClass.
1330         Continue to use the style-based computation when the render tree isn't dirty to avoid the tree walk.
1331
1332         * html/HTMLElement.cpp:
1333         (WebCore::HTMLElement::editabilityFromContentEditableAttr): Extracted from matchesReadWritePseudoClass
1334         to be called in Node::computeEditability. Also made it return Editability instead of boolean.
1335         (WebCore::HTMLElement::matchesReadWritePseudoClass):
1336         * html/HTMLElement.h:
1337
1338 2015-03-01  Brent Fulgham  <bfulgham@apple.com>
1339
1340         [Win] Unreviewed build fix.
1341
1342         * WebCorePrefix.h: Provide some default definitions to help build on Windows
1343         machines with different application support libraries.
1344
1345 2015-02-28  Simon Fraser  <simon.fraser@apple.com>
1346
1347         Viewport units should not dirty style just before we do layout
1348         https://bugs.webkit.org/show_bug.cgi?id=141682
1349
1350         Reviewed by Zalan Bujtas.
1351         
1352         In documents using viewport units, we dirtied style every time layout changed
1353         the size of the document. This is nonsensical, because viewport units depend on the
1354         viewport size, not the document size.
1355         
1356         Move the style dirtying from layout() into availableContentSizeChanged(). Hook
1357         this up for WebKit1 by calling from -[WebFrameView _frameSizeChanged], and,
1358         since that causes availableContentSizeChanged() to be called for WK1 for the first
1359         time, protect the call to updateScrollbars() with a !platformWidget check.
1360
1361         Covered by existing viewport unit tests.
1362
1363         * page/FrameView.cpp:
1364         (WebCore::FrameView::layout):
1365         (WebCore::FrameView::availableContentSizeChanged):
1366         (WebCore::FrameView::viewportSizeForCSSViewportUnits): Add a FIXME comment. Whether
1367         scrollbars are ignored depends on the value of the overflow property on the root element.
1368         * page/FrameView.h:
1369         * platform/ScrollView.cpp:
1370         (WebCore::ScrollView::availableContentSizeChanged):
1371
1372 2015-02-28  Andreas Kling  <akling@apple.com>
1373
1374         [Cocoa] Purge SQLite page cache when under memory pressure.
1375         <https://webkit.org/b/142139>
1376         <rdar://problem/19997739>
1377
1378         Reviewed by Pratik Solanki.
1379
1380         Call out to sqlite3 cache purging SPI on Cocoa platforms when
1381         we need to free up some extra memory.
1382
1383         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1384         (WebCore::MemoryPressureHandler::platformReleaseMemory):
1385
1386 2015-02-28  Simon Fraser  <simon.fraser@apple.com>
1387
1388         FrameView::layoutTimerFired() should update style if needed before doing layout
1389         https://bugs.webkit.org/show_bug.cgi?id=141688
1390
1391         Reviewed by Andreas Kling.
1392
1393         If the style recalc timer has been scheduled to fire after the layout timer,
1394         when the layout timer fires, we might as well just do the style recalc
1395         too. The call to updateStyleIfNeeded() will cancel the pending style
1396         recalc timer.
1397         
1398         This doesn't have much impact on the number of layouts (measured via PLT)
1399         but seems like a reasonable thing to do.
1400
1401         * page/FrameView.cpp:
1402         (WebCore::FrameView::layoutTimerFired):
1403
1404 2015-02-28  Simon Fraser  <simon.fraser@apple.com>
1405
1406         Fullscreen video layers are off by one sometimes
1407         https://bugs.webkit.org/show_bug.cgi?id=142122
1408         rdar://problem/19878821
1409
1410         Reviewed by Eric Carlson.
1411
1412         Convert MediaPlayer::naturalSize() to return a FloatSize, since the natural size
1413         isn't always integral (because of preserving pixel aspect ratio etc). Fix all the media
1414         backends to use FloatSizes for natural size. Convert the video image drawing code
1415         paths to FloatSize, since naturalSize is used on the destination rect computation,
1416         and painting should be floating point anyway.
1417         
1418         Give the layer created by SourceBufferPrivateAVFObjC a name in debug builds.
1419
1420         * html/HTMLVideoElement.cpp:
1421         (WebCore::HTMLVideoElement::videoWidth):
1422         (WebCore::HTMLVideoElement::videoHeight):
1423         (WebCore::HTMLVideoElement::paintCurrentFrameInContext):
1424         * html/HTMLVideoElement.h:
1425         * html/canvas/CanvasRenderingContext2D.cpp:
1426         (WebCore::size):
1427         (WebCore::CanvasRenderingContext2D::drawImage):
1428         * html/canvas/WebGLRenderingContextBase.cpp:
1429         (WebCore::WebGLRenderingContextBase::videoFrameToImage):
1430         * platform/graphics/MediaPlayer.cpp:
1431         (WebCore::NullMediaPlayerPrivate::naturalSize):
1432         (WebCore::MediaPlayer::naturalSize):
1433         (WebCore::MediaPlayer::paint):
1434         (WebCore::MediaPlayer::paintCurrentFrameInContext):
1435         (WebCore::NullMediaPlayerPrivate::paint): Deleted.
1436         * platform/graphics/MediaPlayer.h:
1437         * platform/graphics/MediaPlayerPrivate.h:
1438         (WebCore::MediaPlayerPrivateInterface::paintCurrentFrameInContext):
1439         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1440         (WebCore::MediaPlayerPrivateAVFoundation::naturalSize):
1441         (WebCore::MediaPlayerPrivateAVFoundation::setNaturalSize):
1442         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1443         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1444         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1445         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
1446         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
1447         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator):
1448         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
1449         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
1450         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
1451         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
1452         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1453         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1454         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
1455         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
1456         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
1457         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
1458         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
1459         (WebCore::MediaSourcePrivateAVFObjC::naturalSize):
1460         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
1461         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
1462         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
1463         (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
1464         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
1465         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
1466         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::naturalSize):
1467         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1468         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1469         (WebCore::MediaPlayerPrivateQTKit::naturalSize):
1470         (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
1471         (WebCore::MediaPlayerPrivateQTKit::paint):
1472         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1473         (WebCore::MockMediaPlayerMediaSource::naturalSize):
1474         (WebCore::MockMediaPlayerMediaSource::paint):
1475         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
1476         * rendering/RenderVideo.cpp:
1477         (WebCore::RenderVideo::calculateIntrinsicSize):
1478         (WebCore::RenderVideo::paintReplaced):
1479
1480 2015-02-27  Hunseop Jeong  <hs85.jeong@samsung.com>
1481
1482         [EFL][GTK] Fix build break after r180790,180798
1483         https://bugs.webkit.org/show_bug.cgi?id=142127
1484
1485         Reviewed by Gyuyoung Kim.
1486
1487         * platform/graphics/cairo/PathCairo.cpp:
1488         (WebCore::Path::addEllipse):
1489
1490 2015-02-27  Zalan Bujtas  <zalan@apple.com>
1491
1492         Subpixel-layout: width: max-content; property might cause unnecessary scrollbar.
1493         https://bugs.webkit.org/show_bug.cgi?id=142065
1494
1495         Reviewed by Simon Fraser.
1496
1497         We should not pixelsnap (ceil in this case) logical coordinates during layout.
1498         Should this cause content to be partially cut off, we need to
1499         find the broken piece in the computation logic.
1500
1501         Covered by the unskipped test.
1502
1503         * rendering/RootInlineBox.cpp:
1504         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
1505
1506 2015-02-27  Ryosuke Niwa  <rniwa@webkit.org>
1507
1508         Node::hasEditableStyle and isEditablePosition have too many options
1509         https://bugs.webkit.org/show_bug.cgi?id=142078
1510
1511         Reviewed by Andreas Kling.
1512
1513         Moved the code that dealt with accessibility to htmlediting.cpp from Node. This patch introduces
1514         new editing helper functions hasEditableStyle and isEditableNode for this purpose.
1515
1516         Also removed UserSelectAllTreatment from isContentEditable's arguments in the favor of using
1517         newly extracted computeEditability in call sites that specify this option since isContentEditable
1518         is a public DOM API.
1519
1520         No new tests since there should be no observable behavior changes.
1521
1522         * accessibility/AXObjectCache.h: Removed the declaration of an undefined function.
1523
1524         * dom/Element.cpp:
1525         (WebCore::Element::shouldUseInputMethod): Uses newly added computeEditability.
1526
1527         * dom/Node.cpp:
1528         (WebCore::Node::isContentEditable): Ditto. No longer takes UserSelectAllTreatment as an argument.
1529         (WebCore::Node::isContentRichlyEditable): Ditto.
1530         (WebCore::Node::computeEditability): Renamed from hasEditableStyle to avoid the confusion with
1531         a helper function of the same name. Added ShouldUpdateStyle as an argument to optionally update
1532         style tree. Also returns tri-state Editability enum instead of returning a boolean based on
1533         the value of EditableLevel argument.
1534         (WebCore::Node::isEditableToAccessibility): Moved to htmlediting.cpp.
1535         (WebCore::Node::willRespondToMouseClickEvents): Uses newly added computeEditability.
1536         (WebCore::Node::rootEditableElement): Moved to htmlediting.cpp.
1537
1538         * dom/Node.h: No longer includes EditingBoundary.h.
1539         (WebCore::Node::isContentEditable):
1540         (WebCore::Node::hasEditableStyle): No longer takes EditableType as an argument.
1541         (WebCore::Node::hasRichlyEditableStyle): Ditto.
1542
1543         * editing/ApplyStyleCommand.cpp:
1544         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Uses newly added isEditableNode.
1545         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): Ditto.
1546         * editing/DeleteFromTextNodeCommand.cpp:
1547         (WebCore::DeleteFromTextNodeCommand::doApply): Ditto.
1548         * editing/FrameSelection.cpp:
1549         (WebCore::CaretBase::invalidateCaretRect): Ditto.
1550         * editing/InsertNodeBeforeCommand.cpp:
1551         (WebCore::InsertNodeBeforeCommand::doApply): Ditto.
1552         (WebCore::InsertNodeBeforeCommand::doUnapply): Ditto.
1553         * editing/RemoveNodeCommand.cpp:
1554         (WebCore::RemoveNodeCommand::doApply): Ditto.
1555
1556         * editing/VisibleSelection.cpp:
1557         (WebCore::VisibleSelection::hasEditableStyle): Since this is the only caller of isEditablePosition
1558         which sets DoNotUpdateStyle, directly call hasEditableStyle on the container node instead. This was
1559         not possible prior to r180726 because isEditablePosition had to move out of tables.
1560
1561         * editing/VisibleUnits.cpp:
1562         (WebCore::previousLeafWithSameEditability): Uses newly added hasEditableStyle.
1563         (WebCore::nextLeafWithSameEditability): Ditto.
1564         (WebCore::rootEditableOrDocumentElement): Extracted from previousLinePosition. Use helper functions
1565         in htmlediting.cpp instead of member functions of Node since they no longer support EditableType.
1566         (WebCore::previousLinePosition):
1567         (WebCore::nextLinePosition):
1568
1569         * editing/htmlediting.cpp:
1570         (WebCore::highestEditableRoot): Uses newly added hasEditableStyle.
1571         (WebCore::isEditableToAccessibility): Moved from Node.
1572         (WebCore::computeEditability): Extracted from isEditablePosition.
1573         (WebCore::hasEditableStyle): Added.
1574         (WebCore::isEditableNode): Added.
1575         (WebCore::isEditablePosition): Now calls computeEditability.
1576         (WebCore::isRichlyEditablePosition): No longer takes EditableType since that variant was never used.
1577         (WebCore::editableRootForPosition): Moved the code from Node::rootEditableElement.
1578
1579         * editing/htmlediting.h:
1580
1581 2015-02-27  Chris Dumez  <cdumez@apple.com>
1582
1583         Make ActiveDOMObject::canSuspend() pure virtual
1584         https://bugs.webkit.org/show_bug.cgi?id=142096
1585         <rdar://problem/19923085>
1586
1587         Reviewed by Andreas Kling.
1588
1589         Make ActiveDOMObject::canSuspend() pure virtual so that people at least
1590         try to provide an implementation for it. The default implementation was
1591         returning false unconditionally and thus was preventing pages from
1592         entering the PageCache.
1593
1594 2015-02-27  Commit Queue  <commit-queue@webkit.org>
1595
1596         Unreviewed, rolling out r180203 and r180210.
1597         https://bugs.webkit.org/show_bug.cgi?id=142116
1598
1599         broke process suspension and tile map (Requested by thorton on
1600         #webkit).
1601
1602         Reverted changesets:
1603
1604         "Adopt CAMachPort-as-layer-contents"
1605         https://bugs.webkit.org/show_bug.cgi?id=141687
1606         http://trac.webkit.org/changeset/180203
1607
1608         "Fix the !USE(IOSURFACE) build"
1609         http://trac.webkit.org/changeset/180210
1610
1611 2015-02-27  Sam Weinig  <sam@webkit.org>
1612
1613         Add WebKit2 SPI to create a DOM File object
1614         https://bugs.webkit.org/show_bug.cgi?id=142109
1615
1616         Reviewed by Tim Horton.
1617
1618         * WebCore.xcodeproj/project.pbxproj:
1619         Make <WebCore/File.h> (and associated files) available to WebKit2.
1620
1621 2015-02-27  Myles C. Maxfield  <mmaxfield@apple.com>
1622
1623         [Subpixel] Subpixelize RenderListMarker
1624         https://bugs.webkit.org/show_bug.cgi?id=142093
1625
1626         Reviewed by Zalan Bujtas.
1627
1628         Use floats instead of ints.
1629
1630         Test: fast/lists/rtl-marker.html
1631
1632         * rendering/RenderListMarker.cpp:
1633         (WebCore::RenderListMarker::paint):
1634         (WebCore::RenderListMarker::updateContent):
1635         (WebCore::RenderListMarker::getRelativeMarkerRect):
1636         * rendering/RenderListMarker.h:
1637
1638 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
1639
1640         <attachment> should be selected immediately upon click, and be drag/copyable upon click
1641         https://bugs.webkit.org/show_bug.cgi?id=142114
1642         <rdar://problem/19982520>
1643
1644         Reviewed by Enrica Casucci.
1645
1646         * css/html.css:
1647         (attachment):
1648         Make attachment use 'user-select: all' to act as a single click-to-select unit.
1649
1650         * html/HTMLAttachmentElement.cpp:
1651         (WebCore::HTMLAttachmentElement::setFocus): Deleted.
1652         * html/HTMLAttachmentElement.h:
1653         * rendering/RenderAttachment.cpp:
1654         (WebCore::RenderAttachment::isFocused): Deleted.
1655         (WebCore::RenderAttachment::focusChanged): Deleted.
1656         * rendering/RenderAttachment.h:
1657         * rendering/RenderThemeMac.mm:
1658         (WebCore::RenderThemeMac::paintAttachment):
1659         Remove focus-related code; instead of focusing the element upon click,
1660         we get a selection including just the <attachment>, and everything
1661         behaves much more consistently (copy works, drag works, etc.).
1662
1663 2015-02-27  Myles C. Maxfield  <mmaxfield@apple.com>
1664
1665         [iOS] Some MathML tests crash in RenderMathMLOperator::advanceForGlyph() or boundsForGlyph()
1666         https://bugs.webkit.org/show_bug.cgi?id=141371
1667
1668         Reviewed by David Kilzer.
1669
1670         Null checks.
1671
1672         Covered by existing mathml tests.
1673
1674         * rendering/mathml/RenderMathMLOperator.cpp:
1675         (WebCore::RenderMathMLOperator::boundsForGlyph):
1676         (WebCore::RenderMathMLOperator::advanceForGlyph):
1677         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):
1678
1679 2015-02-27  Chris Dumez  <cdumez@apple.com>
1680
1681         Make SourceBuffer ActiveDOMObject suspendable
1682         https://bugs.webkit.org/show_bug.cgi?id=142108
1683         <rdar://problem/19923085>
1684
1685         Reviewed by Jer Noble.
1686
1687         Make SourceBuffer ActiveDOMObject suspendable if it is removed from its
1688         MediaSource and does not have any pending events. This makes it more
1689         likely for pages using SourceBuffer objects to go into the PageCache.
1690
1691         Test: fast/history/page-cache-removed-source-buffer.html
1692
1693         * Modules/mediasource/SourceBuffer.cpp:
1694         (WebCore::SourceBuffer::canSuspend):
1695         * Modules/mediasource/SourceBuffer.h:
1696
1697 2015-02-26  Sam Weinig  <sam@webkit.org>
1698
1699         Add support for canvas ellipse method
1700         https://bugs.webkit.org/show_bug.cgi?id=82791
1701         <rdar://problem/11159172>
1702
1703         Reviewed by Dirk Schulze.
1704
1705         Tests: fast/canvas/canvas-ellipse-360-winding.html
1706                fast/canvas/canvas-ellipse-circumference-fill.html
1707                fast/canvas/canvas-ellipse-circumference.html
1708                fast/canvas/canvas-ellipse-connecting-line.html
1709                fast/canvas/canvas-ellipse-negative-radius.html
1710                fast/canvas/canvas-ellipse-zero-lineto.html
1711                fast/canvas/canvas-ellipse.html
1712
1713         * html/canvas/CanvasPathMethods.h:
1714         * html/canvas/CanvasPathMethods.cpp:
1715         (WebCore::CanvasPathMethods::lineTo):
1716         Convenience for passing a FloatPoint instead of two floats.
1717
1718         (WebCore::normalizeAngles):
1719         Normalizes the angles as described in the HTML spec. Ensuring the startAngle
1720         is greater than 0 and less than 2pi, and the the endAngle is at most 2pi
1721         from the start angle.
1722
1723         (WebCore::CanvasPathMethods::arc):
1724         - Renames some of the parameters to be clearer.
1725         - Normalizes the angles for consistency with ellipse.
1726         - Moves hasInvertibleTransform() higher in the function for consistency.
1727
1728         (WebCore::CanvasPathMethods::ellipse): Added.
1729
1730         * html/canvas/CanvasRenderingContext2D.idl:
1731         * html/canvas/DOMPath.idl:
1732         Add ellipse(...).
1733
1734         * platform/graphics/Path.h:
1735         * platform/graphics/cg/PathCG.cpp:
1736         (WebCore::Path::addArc):
1737         Rename parameters for clarity and use a nullptr.
1738
1739         (WebCore::Path::addEllipse):
1740         Added. Constructs an ellipse via a transformed arc.
1741
1742 2015-02-27  Enrica Casucci  <enrica@apple.com>
1743
1744         Adding support for serializing HTMLAttachment elements.
1745         https://bugs.webkit.org/show_bug.cgi?id=142026
1746
1747         Reviewed by Tim Horton.
1748
1749         Test: editing/pasteboard/copy-paste-attachment.html
1750
1751         Adding support to serialize the attachment element
1752         and properly handle it when converting a DOM range
1753         to NSAttributedString.
1754
1755         * editing/cocoa/HTMLConverter.mm:
1756         (HTMLConverter::_processElement):
1757         * editing/markup.cpp:
1758         (WebCore::StyledMarkupAccumulator::appendCustomAttributes): Create new attribute
1759         for attachment element when serializating.
1760         (WebCore::StyledMarkupAccumulator::appendElement):
1761         (WebCore::createFragmentFromMarkup): Remove the attribute from the attachment element
1762         when creating the fragment.
1763         * html/HTMLAttachmentElement.cpp:
1764         (WebCore::HTMLAttachmentElement::file): Added const to file() to
1765         use it in appendCustonAttributes where the element is a const reference.
1766         * html/HTMLAttachmentElement.h:
1767         * html/HTMLAttributeNames.in:
1768
1769 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
1770
1771         <attachment> should have an inactive style (gray in background)
1772         https://bugs.webkit.org/show_bug.cgi?id=142103
1773         <rdar://problem/19982486>
1774
1775         Reviewed by Dan Bernstein.
1776
1777         * rendering/RenderThemeMac.mm:
1778         (WebCore::attachmentLabelInactiveBackgroundColor):
1779         (WebCore::attachmentLabelInactiveTextColor):
1780         (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
1781         (WebCore::RenderThemeMac::paintAttachmentLabel):
1782         Use a gray background and gray text when the selection containing the
1783         attachment isn't focused and active.
1784
1785 2015-02-27  Brady Eidson  <beidson@apple.com>
1786
1787         Add a "block-cookies" rule to the user content filter.
1788         https://bugs.webkit.org/show_bug.cgi?id=142105
1789
1790         Reviewed by Alex Christensen.
1791
1792         Tests: http/tests/usercontentfilter/block-cookies-basic.html
1793                http/tests/usercontentfilter/block-cookies-send.html
1794
1795         * contentextensions/ContentExtensionRule.h:
1796
1797         * contentextensions/ContentExtensionsBackend.cpp:
1798         (WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL):
1799         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL): Deleted.
1800         * contentextensions/ContentExtensionsBackend.h:
1801
1802         * contentextensions/ContentExtensionsManager.cpp:
1803         (WebCore::ContentExtensions::ExtensionsManager::loadAction):
1804
1805         * loader/cache/CachedResourceLoader.cpp:
1806         (WebCore::CachedResourceLoader::requestResource):
1807
1808         * page/UserContentController.cpp:
1809         (WebCore::UserContentController::actionForURL):
1810         (WebCore::UserContentController::contentFilterBlocksURL): Deleted.
1811         * page/UserContentController.h:
1812
1813 2015-02-27  Alex Christensen  <achristensen@webkit.org>
1814
1815         [WinCairo] Unreviewed build fix.
1816
1817         * platform/graphics/BitmapImage.h:
1818         * platform/win/BitmapInfo.h:
1819         Added WEBCORE_EXPORT.
1820
1821 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
1822
1823         <attachment>'s label baseline should match that of the surrounding text
1824         https://bugs.webkit.org/show_bug.cgi?id=142099
1825         rdar://problem/19982495
1826
1827         Reviewed by Dan Bernstein.
1828
1829         * rendering/RenderAttachment.cpp:
1830         (WebCore::RenderAttachment::baselinePosition):
1831         * rendering/RenderAttachment.h:
1832         Override baselinePosition and retrieve it from RenderTheme.
1833
1834         * rendering/RenderTheme.h:
1835         (WebCore::RenderTheme::attachmentBaseline):
1836         * rendering/RenderThemeMac.h:
1837         * rendering/RenderThemeMac.mm:
1838         (WebCore::AttachmentLayout::AttachmentLayout):
1839         (WebCore::RenderThemeMac::attachmentBaseline):
1840         Plumb the label baseline from AttachmentLayout to RenderAttachment.
1841
1842 2015-02-27  Commit Queue  <commit-queue@webkit.org>
1843
1844         Unreviewed, rolling out r180752.
1845         https://bugs.webkit.org/show_bug.cgi?id=142098
1846
1847         Causes 10 SVG test failures on Windows. (Requested by
1848         bfulgham_ on #webkit).
1849
1850         Reverted changeset:
1851
1852         "Cache glyph widths to GlyphPages"
1853         https://bugs.webkit.org/show_bug.cgi?id=142028
1854         http://trac.webkit.org/changeset/180752
1855
1856 2015-02-27  David Kilzer  <ddkilzer@apple.com>
1857
1858         [iOS] Fix build by defining EAGL_IOSURFACE macro before including <OpenGLES/EAGLPrivate.h>
1859
1860         * platform/spi/ios/OpenGLESSPI.h:  Define EAGL_IOSURFACE macro
1861         until header refactoring is completed.
1862
1863 2015-02-27  Chris Dumez  <cdumez@apple.com>
1864
1865         MediaSource should be suspendable when closed
1866         https://bugs.webkit.org/show_bug.cgi?id=142089
1867         <rdar://problem/19923085>
1868
1869         Reviewed by Jer Noble.
1870
1871         Make MediaSource ActiveDOMObject suspendable when it is in closed state
1872         and it has no pending events. This increases the likelihood of pages
1873         using MediaSource to enter the PageCache.
1874
1875         Tests: fast/history/page-cache-media-source-closed-2.html
1876                fast/history/page-cache-media-source-closed.html
1877                fast/history/page-cache-media-source-opened.html
1878
1879 2015-02-27  Andreas Kling  <akling@apple.com>
1880
1881         Use NeverDestroyed for JS wrapper owners.
1882         <https://webkit.org/b/142090>
1883
1884         Reviewed by Chris Dumez.
1885
1886         Using NeverDestroyed puts these objects in BSS which is preferable
1887         since that prevents them from pinning down entire malloc pages forever.
1888
1889         * bindings/scripts/CodeGeneratorJS.pm:
1890         (GenerateHeader): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
1891
1892         * bindings/scripts/test/JS/*: Rebaseline bindings tests for this change.
1893
1894 2015-02-27  Chris Dumez  <cdumez@apple.com>
1895
1896         Make IDBDatabase / IDBRequest suspendable
1897         https://bugs.webkit.org/show_bug.cgi?id=142076
1898         <rdar://problem/19923085>
1899
1900         Reviewed by Andreas Kling.
1901
1902         Make IDBDatabase / IDBRequest suspendable under certain conditions to
1903         make it more likely for pages using indexeddb to enter the PageCache.
1904
1905         IDBDatabase is safely suspendable if the database is closed. IDBRequest
1906         is safely suspendable if the request no longer has any pending activity
1907         (i.e. state is DONE and success / failure handler was called). We may
1908         be able to do better later but this is the bare minimum for now.
1909
1910         Tests: fast/history/page-cache-indexed-closed-db.html
1911                fast/history/page-cache-indexed-opened-db.html
1912
1913         * Modules/indexeddb/IDBDatabase.cpp:
1914         (WebCore::IDBDatabase::IDBDatabase):
1915         (WebCore::IDBDatabase::closeConnection):
1916         (WebCore::IDBDatabase::enqueueEvent):
1917         (WebCore::IDBDatabase::canSuspend):
1918         * Modules/indexeddb/IDBDatabase.h:
1919         * Modules/indexeddb/IDBRequest.cpp:
1920         (WebCore::IDBRequest::canSuspend):
1921         * Modules/indexeddb/IDBRequest.h:
1922
1923 2015-02-27  Chris Dumez  <cdumez@apple.com>
1924
1925         Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame()
1926         https://bugs.webkit.org/show_bug.cgi?id=142052
1927
1928         Reviewed by Andreas Kling.
1929
1930         Drop WebDatabase special-handling from PageCache::canCachePageContainingThisFrame().
1931         DatabaseContext is already an ActiveDOMObject and DatabaseContext::canSuspend() was
1932         returning false so pages using WebDatabase would never enter the PageCache anyway.
1933
1934         This patch also overrides ActiveDOMObject::canSuspend() in DatabaseContext to only
1935         return false when there are open databases. This check is now equivalent to the one
1936         that was in PageCache.
1937
1938         An issue that remains is that DatabaseContext::m_hasOpenDatabases is never reset
1939         to false so once a page opened a database, it will never be page-cacheable. This
1940         will be taken care of separately though.
1941
1942         Test: fast/history/page-cache-webdatabase-opened-db.html
1943
1944         * Modules/webdatabase/DatabaseContext.cpp:
1945         (WebCore::DatabaseContext::canSuspend):
1946         * Modules/webdatabase/DatabaseContext.h:
1947         * history/PageCache.cpp:
1948         (WebCore::logCanCacheFrameDecision):
1949         (WebCore::PageCache::canCachePageContainingThisFrame):
1950         * page/DiagnosticLoggingKeys.cpp:
1951         (WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey): Deleted.
1952         * page/DiagnosticLoggingKeys.h:
1953
1954 2015-02-27  Alex Christensen  <achristensen@webkit.org>
1955
1956         Compile DFA to bytecode.
1957         https://bugs.webkit.org/show_bug.cgi?id=142031
1958
1959         Reviewed by Benjamin Poulain.
1960
1961         * WebCore.xcodeproj/project.pbxproj:
1962         * contentextensions/ContentExtensionsBackend.cpp:
1963         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
1964         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
1965         * contentextensions/ContentExtensionsBackend.h:
1966         * contentextensions/DFA.cpp:
1967         (WebCore::ContentExtensions::DFA::nextState): Deleted.
1968         (WebCore::ContentExtensions::DFA::actions): Deleted.
1969         * contentextensions/DFA.h:
1970         (WebCore::ContentExtensions::DFA::size):
1971         (WebCore::ContentExtensions::DFA::nodeAt):
1972         * contentextensions/DFABytecode.h: Added.
1973         (WebCore::ContentExtensions::instructionSizeWithArguments):
1974         * contentextensions/DFABytecodeCompiler.cpp: Added.
1975         (WebCore::ContentExtensions::append):
1976         (WebCore::ContentExtensions::set32Bits):
1977         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
1978         (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
1979         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
1980         (WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
1981         (WebCore::ContentExtensions::DFABytecodeCompiler::reserveBufferCapacity):
1982         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
1983         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
1984         * contentextensions/DFABytecodeCompiler.h: Added.
1985         (WebCore::ContentExtensions::DFABytecodeCompiler::DFABytecodeCompiler):
1986         * contentextensions/DFABytecodeInterpreter.cpp: Added.
1987         (WebCore::ContentExtensions::getBits):
1988         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1989         * contentextensions/DFABytecodeInterpreter.h: Added.
1990         (WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):
1991
1992 2015-02-27  Zalan Bujtas  <zalan@apple.com>
1993
1994         Use after free in WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle
1995         https://bugs.webkit.org/show_bug.cgi?id=138366
1996
1997         Reviewed by Dave Hyatt.
1998
1999         This patch ensures that we clean up RenderNamedFlowFragment::m_renderObjectRegionStyle when embedded flow content is getting destroyed.
2000
2001         In m_renderObjectRegionStyle hash map, we store style information about the named flow's descendant children.
2002         When a child is being detached from the tree, it removes itself from this hashmap.
2003         We do it by traversing up on the ancestor chain and call removeFlowChildInfo() on the parent flow.
2004         However in case of embedded flows (for example multicolumn content inside a region), we need to check whether the parent flow
2005         is inside a flow too and continue the cleanup accordingly.
2006
2007         Test: fast/regions/region-with-multicolumn-embedded-crash.html
2008
2009         * rendering/RenderObject.cpp:
2010         (WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
2011
2012 2015-02-27  Brady Eidson  <beidson@apple.com>
2013
2014         Add API to remove a single content filter.
2015         <rdar://problem/19977764> and https://bugs.webkit.org/show_bug.cgi?id=142088
2016
2017         Reviewed by Sam Weinig.
2018
2019         * page/UserContentController.cpp:
2020         (WebCore::UserContentController::removeUserContentFilter):
2021         * page/UserContentController.h:
2022
2023 2015-02-26  Brent Fulgham  <bfulgham@apple.com>
2024
2025         [Win] Remove remaining SafariTheme cruft
2026         https://bugs.webkit.org/show_bug.cgi?id=142075
2027
2028         Reviewed by Anders Carlsson.
2029
2030         Remove reference to SafariTheme-switching preference.
2031
2032         Tested by existing layout tests.
2033
2034         * WebCore.vcxproj/WebCore.vcxproj:
2035         * WebCore.vcxproj/WebCore.vcxproj.filters:
2036         * config.h:
2037         * page/Settings.cpp:
2038         (WebCore::Settings::fontRenderingMode):
2039         (WebCore::Settings::setShouldPaintNativeControls): Deleted.
2040         * page/Settings.h:
2041         (WebCore::Settings::shouldPaintNativeControls): Deleted.
2042         * platform/win/ScrollbarThemeWin.cpp:
2043         (WebCore::ScrollbarTheme::nativeTheme):
2044         * rendering/RenderThemeWin.cpp:
2045         (WebCore::RenderTheme::themeForPage):
2046
2047 2015-02-27  Myles C. Maxfield  <mmaxfield@apple.com>
2048
2049         Add comment about CSS value name mangling
2050
2051         Unreviewed
2052
2053         * css/CSSParser.cpp:
2054         (WebCore::cssValueKeywordID):
2055
2056 2015-02-27  Antti Koivisto  <antti@apple.com>
2057
2058         Cache glyph widths to GlyphPages
2059         https://bugs.webkit.org/show_bug.cgi?id=142028
2060
2061         Reviewed by Andreas Kling.
2062
2063         Currently we have a separate cache in Font for glyph widths. In practice we always need
2064         the widths so we can just cache them in GlyphPages. This simplifies the code and removes
2065         a per-character hash lookup from WidthIterator.
2066
2067         * platform/graphics/Font.cpp:
2068         (WebCore::Font::Font):
2069         (WebCore::Font::initCharWidths):
2070         (WebCore::Font::platformGlyphInit):
2071         (WebCore::createAndFillGlyphPage):
2072         (WebCore::Font::computeWidthForGlyph):
2073
2074             Rename to make it clear this doesn't cache.
2075
2076         (WebCore::GlyphPage::setGlyphDataForIndex):
2077
2078             Initialize the width.
2079             This could go to GlyphPage.cpp if we had one.
2080
2081         * platform/graphics/Font.h:
2082         (WebCore::Font::glyphZeroWidth):
2083         (WebCore::Font::isZeroWidthSpaceGlyph):
2084         (WebCore::Font::zeroGlyph): Deleted.
2085         (WebCore::Font::setZeroGlyph): Deleted.
2086         (WebCore::Font::widthForGlyph): Deleted.
2087         * platform/graphics/FontCascade.cpp:
2088         (WebCore::offsetToMiddleOfGlyph):
2089         * platform/graphics/FontCascadeFonts.cpp:
2090         (WebCore::FontCascadeFonts::glyphDataForCharacter):
2091         * platform/graphics/GlyphPage.h:
2092         (WebCore::GlyphData::GlyphData):
2093
2094             Return width too as part of GlyphData.
2095
2096         (WebCore::GlyphPage::glyphDataForIndex):
2097         (WebCore::GlyphPage::setGlyphDataForCharacter):
2098         (WebCore::GlyphPage::setGlyphDataForIndex):
2099         (WebCore::GlyphPage::GlyphPage):
2100         * platform/graphics/WidthIterator.cpp:
2101         (WebCore::WidthIterator::advanceInternal):
2102
2103             No need to lookup width separately now.
2104
2105         * platform/graphics/mac/ComplexTextController.cpp:
2106         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2107         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2108         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
2109         * rendering/mathml/RenderMathMLOperator.cpp:
2110         (WebCore::RenderMathMLOperator::advanceForGlyph):
2111         * rendering/svg/SVGTextRunRenderingContext.cpp:
2112         (WebCore::missingGlyphForFont):
2113         * svg/SVGFontData.cpp:
2114         (WebCore::SVGFontData::initializeFont):
2115
2116 2015-02-26  Alexey Proskuryakov  <ap@apple.com>
2117
2118         iOS build fix after r180717.
2119
2120         * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseUnpauseTask::doPerformTask):
2121
2122 2015-02-26  Ryosuke Niwa  <rniwa@webkit.org>
2123
2124         isEditablePosition and related functions shouldn't move position out of table
2125         https://bugs.webkit.org/show_bug.cgi?id=129200
2126
2127         Reviewed by Darin Adler.
2128
2129         This patch removes the legacy editing position for elements display: table in its computed style.
2130         Previously, we used (table, 0) and (table, !0) to denote positions immediately before and after
2131         such an element for historical reasons. This forced us to update the style tree before computing
2132         the editability of a position because we have to check the editability of the position outside
2133         the element with display: table if the position was using such a legacy editing position.
2134         e.g. if a table was not editable (contenteditable=false), the position before the table (table, 0)
2135         should still be considered editable if the parent node of the table was editable.
2136
2137         This patch replaces such a legacy editing position by using modern position types:
2138         PositionIsBeforeAnchor and PositionIsAfterAnchor.
2139
2140         No new tests since there should be no change in the user perceived editing operations.
2141
2142         * dom/Position.cpp:
2143         (WebCore::Position::previous): Setup the node and the offset correctly when the original position's
2144         type is PositionIsBeforeAnchor. Also return a position before or after node when the node we found
2145         is "atomic" (e.g. input, img, br, etc...) or it's a table. This avoids creating a legacy editing
2146         position inside a table.
2147         (WebCore::Position::next): Ditto.
2148         (WebCore::Position::atStartOfTree): Use atFirstEditingPositionForNode, which takes care of all types
2149         of positions.
2150         (WebCore::Position::atEndOfTree): Ditto.
2151         (WebCore::Position::downstream): Return a position before a node instead of a legacy editing position
2152         for an atomic element or a table element as done in the equivalent code in Position::upstream.
2153         (WebCore::Position::isCandidate): Don't treat a position inside a table to be a candidate. e.g.
2154         (table, 1) when there are more than two children of the table.
2155
2156         * dom/PositionIterator.cpp:
2157         (WebCore::PositionIterator::operator Position): PositionIterator internally uses legacy editing
2158         positions. So convert it to a modern position by returning a position before or after a table here.
2159         * editing/ApplyBlockElementCommand.cpp:
2160         (WebCore::ApplyBlockElementCommand::formatSelection): Check that the unsplittable element we found
2161         is actually empty before executing the simple code path for an empty unsplittable element. Without
2162         this check, block formatting a table element will fail.
2163
2164         * editing/htmlediting.cpp:
2165         (WebCore::isEditablePosition): Use containerNode instead of deprecatedNode because the editability
2166         of a position before or after an element is determined by its parent, not the element itself.
2167         (WebCore::isAtUnsplittableElement): Ditto.
2168         (WebCore::isRichlyEditablePosition): Ditto. Removed the code that moved the starting node out of
2169         an element with display: table. This is the code removal for which this patch was made.
2170         (WebCore::editableRootForPosition): Ditto.
2171
2172 2015-02-26  Timothy Horton  <timothy_horton@apple.com>
2173
2174         Implement <attachment> element appearance on Mac
2175         https://bugs.webkit.org/show_bug.cgi?id=142023
2176
2177         Reviewed by Dean Jackson.
2178
2179         * css/CSSParser.cpp:
2180         (WebCore::isValidKeywordPropertyAndValue):
2181         * css/CSSPrimitiveValueMappings.h:
2182         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2183         * css/CSSValueKeywords.in:
2184         * css/html.css:
2185         (attachment):
2186         * platform/ThemeTypes.h:
2187         Add a new -webkit-appearance value, attachment.
2188
2189         * WebCore.xcodeproj/project.pbxproj:
2190         * html/HTMLAttachmentElement.cpp:
2191         (WebCore::HTMLAttachmentElement::setFile):
2192         Let the renderer know when the file changes (so it can relayout and repaint).
2193
2194         (WebCore::HTMLAttachmentElement::filePath):
2195         (WebCore::HTMLAttachmentElement::fileName):
2196         * html/HTMLAttachmentElement.h:
2197         Handy acccessors for the full path and the name of the file.
2198
2199         * platform/spi/mac/IconServicesSPI.h: Added.
2200         * platform/spi/mac/LaunchServicesSPI.h: Added.
2201         Add some IconServices and LaunchServices SPI headers.
2202
2203         * rendering/RenderAttachment.cpp:
2204         (WebCore::RenderAttachment::RenderAttachment):
2205         Don't have a default intrinsic size; we'll adjust in layout().
2206
2207         (WebCore::RenderAttachment::isSelected):
2208         (WebCore::RenderAttachment::isFocused):
2209         (WebCore::RenderAttachment::isSelectedOrFocused):
2210         Factor out from paintReplaced().
2211
2212         (WebCore::RenderAttachment::layout):
2213         Use RenderTheme to compute the intrinsic size of this attachment.
2214
2215         (WebCore::RenderAttachment::paintReplaced):
2216         Use RenderTheme to paint the attachment.
2217
2218         (WebCore::RenderAttachment::representedFileChanged):
2219         When the represented file changes, we need to recompute the intrinsic size and repaint.
2220
2221         * rendering/RenderTheme.cpp:
2222         (WebCore::RenderTheme::adjustStyle):
2223         (WebCore::RenderTheme::paint):
2224         (WebCore::RenderTheme::adjustAttachmentStyle):
2225         (WebCore::RenderTheme::paintAttachment):
2226         Plumb through the attachment appearance.
2227
2228         * rendering/RenderAttachment.h:
2229         * rendering/RenderTheme.h:
2230         (WebCore::RenderTheme::paintAttachment):
2231         (WebCore::RenderTheme::attachmentIntrinsicSize):
2232         * rendering/RenderThemeMac.h:
2233         * rendering/RenderThemeMac.mm:
2234         (WebCore::attachmentIconBackgroundColor):
2235         (WebCore::attachmentIconBorderColor):
2236         (WebCore::AttachmentLayout):
2237         AttachmentLayout lays out the innards of the RenderThemeMac attachment
2238         presentation: an icon with an optional bordered background, with a label
2239         underneath it with an optional background.
2240
2241         (WebCore::RenderThemeMac::attachmentIntrinsicSize):
2242         (WebCore::paintAttachmentIconBackground):
2243         (WebCore::paintAttachmentIcon):
2244         (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
2245         (WebCore::RenderThemeMac::paintAttachmentLabel):
2246         (WebCore::RenderThemeMac::paintAttachment):
2247         Paint the attachment element. Paint the optional backgrounds (and swap
2248         out the text color) if the element is selected/focused.
2249
2250 2015-02-26  Doug Russell  <d_russell@apple.com>
2251
2252         AX: Expose caret browsing preference to accessibility API
2253         https://bugs.webkit.org/show_bug.cgi?id=141862
2254
2255         Reviewed by Chris Fleizach.
2256
2257         Exposing the caret browsing setting on WebCore::Frame via the accessibility API would allow assistive tech apps to enable it contextually (for example, when the assistive tech app is running).
2258         Enabling caret browsing when assistive tech apps are running greatly improves the reliability of keyboard navigation on the web. Most especially in cases where selection would be disrupted by focus events.
2259
2260         Tests: platform/mac/accessibility/caret-browsing-arrow-nav.html
2261                platform/mac/accessibility/caret-browsing-attribute.html
2262                platform/mac/accessibility/caret-browsing-tab-selection.html
2263
2264         * accessibility/AccessibilityObject.h:
2265         * accessibility/mac/AccessibilityObjectMac.mm:
2266         (WebCore::AccessibilityObject::caretBrowsingEnabled):
2267         (WebCore::AccessibilityObject::setCaretBrowsingEnabled):
2268         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2269         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
2270         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2271         (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
2272         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
2273         (-[WebAccessibilityObjectWrapper _accessibilitySetTestValue:forAttribute:]):
2274
2275 2015-02-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2276
2277         Remove unnecessary create() factory functions
2278         https://bugs.webkit.org/show_bug.cgi?id=142039
2279
2280         Reviewed by Chris Dumez.
2281
2282         Clean up remaining JSCryptoKeySerializationJWK::create, HTMLMediaSession::create,
2283         and DatabaseUnpauseTask::create.
2284
2285         * Modules/webdatabase/DatabaseThread.cpp:
2286         (WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask):
2287         (WebCore::DatabaseThread::setPaused):
2288         (WebCore::DatabaseUnpauseTask::create): Deleted.
2289         * bindings/js/JSCryptoKeySerializationJWK.h:
2290         * bindings/js/JSSubtleCryptoCustom.cpp:
2291         (WebCore::importKey):
2292         * html/HTMLMediaElement.cpp:
2293         (WebCore::HTMLMediaElement::HTMLMediaElement):
2294         * html/HTMLMediaSession.cpp:
2295         (WebCore::HTMLMediaSession::create): Deleted.
2296         * html/HTMLMediaSession.h:
2297
2298 2015-02-26  Joseph Pecoraro  <pecoraro@apple.com>
2299
2300         Web Inspector: Save Console Evaluations into Command Line variables $1-$99 ($n)
2301         https://bugs.webkit.org/show_bug.cgi?id=142061
2302
2303         Reviewed by Timothy Hatcher.
2304
2305         * inspector/CommandLineAPIModuleSource.js:
2306         Replace $1-$4 "inspected objects" with $1-$99 "saved results".
2307
2308         * bindings/js/JSCommandLineAPIHostCustom.cpp:
2309         (WebCore::JSCommandLineAPIHost::inspectedObject):
2310         * inspector/CommandLineAPIHost.cpp:
2311         (WebCore::CommandLineAPIHost::CommandLineAPIHost):
2312         (WebCore::CommandLineAPIHost::InspectableObject::get):
2313         (WebCore::CommandLineAPIHost::addInspectedObject):
2314         (WebCore::CommandLineAPIHost::inspectedObject):
2315         (WebCore::CommandLineAPIHost::clearInspectedObjects): Deleted.
2316         * inspector/CommandLineAPIHost.h:
2317         * inspector/CommandLineAPIHost.idl:
2318         Since we now just save the single $0 inspected object, eliminate
2319         keeping track of a list of 5 values.
2320
2321 2015-02-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2322
2323         Remove unnecessary create() factory functions in CDMFoo, NamedNodeMap
2324         https://bugs.webkit.org/show_bug.cgi?id=141902
2325
2326         Reviewed by Darin Adler.
2327
2328         Create instance using std::make_unique<> in CDMFactory directly. To do that,
2329         CDMFactory uses lambdas. Additionally this patch removes NamedNodeMap::create() as well.
2330
2331         No new tests, no behavior changes.
2332
2333         * Modules/encryptedmedia/CDM.cpp:
2334         (WebCore::installedCDMFactories):
2335         * Modules/encryptedmedia/CDM.h:
2336         * Modules/encryptedmedia/CDMPrivateClearKey.h:
2337         (WebCore::CDMPrivateClearKey::CDMPrivateClearKey):
2338         (WebCore::CDMPrivateClearKey::create): Deleted.
2339         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
2340         (WebCore::CDMPrivateMediaPlayer::create): Deleted.
2341         * dom/Element.cpp:
2342         (WebCore::Element::attributes):
2343         * dom/NamedNodeMap.h:
2344         (WebCore::NamedNodeMap::NamedNodeMap):
2345         (WebCore::NamedNodeMap::create): Deleted.
2346         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
2347         (WebCore::CDMPrivateMediaSourceAVFObjC::create): Deleted.
2348
2349 2015-02-26  Andy Estes  <aestes@apple.com>
2350
2351         [Content Filtering] Move WebFilterEvaluator and NEFilterSource declarations to SPI headers
2352         https://bugs.webkit.org/show_bug.cgi?id=142062
2353
2354         Reviewed by Daniel Bates.
2355
2356         * WebCore.xcodeproj/project.pbxproj:
2357         * platform/mac/ContentFilterMac.mm:
2358         * platform/spi/cocoa/NEFilterSourceSPI.h: Added.
2359         * platform/spi/cocoa/WebFilterEvaluatorSPI.h: Added.
2360
2361 2015-02-26  Anders Carlsson  <andersca@apple.com>
2362
2363         Add API to remove all website data for the given data records
2364         https://bugs.webkit.org/show_bug.cgi?id=142060
2365
2366         Reviewed by Beth Dakin.
2367
2368         * loader/cache/MemoryCache.cpp:
2369         (WebCore::MemoryCache::removeResourcesWithOrigins):
2370         New function that removes all resources that match the set of origins in a given session.
2371
2372 2015-02-26  Chris Dumez  <cdumez@apple.com>
2373
2374         Rename DatabaseManager::manager() to DatabaseManager::singleton()
2375         https://bugs.webkit.org/show_bug.cgi?id=142054
2376
2377         Reviewed by Ryosuke Niwa.
2378
2379         Rename DatabaseManager::manager() to DatabaseManager::singleton() as
2380         per coding style and use WTF::NeverDestroyed.
2381
2382         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
2383         (WebCore::DOMWindowWebDatabase::openDatabase):
2384         * Modules/webdatabase/DatabaseBackendBase.cpp:
2385         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
2386         * Modules/webdatabase/DatabaseContext.cpp:
2387         (WebCore::DatabaseContext::DatabaseContext):
2388         (WebCore::DatabaseContext::~DatabaseContext):
2389         (WebCore::DatabaseContext::stopDatabases):
2390         (WebCore::DatabaseContext::databaseExceededQuota):
2391         * Modules/webdatabase/DatabaseManager.cpp:
2392         (WebCore::DatabaseManager::singleton):
2393         (WebCore::DatabaseManager::manager): Deleted.
2394         * Modules/webdatabase/DatabaseManager.h:
2395         (WebCore::DatabaseManager::~DatabaseManager): Deleted.
2396         * Modules/webdatabase/SQLTransactionClient.cpp:
2397         (WebCore::SQLTransactionClient::didExceedQuota):
2398         * history/PageCache.cpp:
2399         (WebCore::logCanCacheFrameDecision):
2400         (WebCore::PageCache::canCachePageContainingThisFrame):
2401         * loader/FrameLoader.cpp:
2402         (WebCore::FrameLoader::stopLoading):
2403
2404 2015-02-26  Csaba Osztrogonác  <ossy@webkit.org>
2405
2406         Fix the !ENABLE(GEOLOCATION) build after r180533
2407         https://bugs.webkit.org/show_bug.cgi?id=142053
2408
2409         Reviewed by Chris Dumez.
2410
2411         * Modules/geolocation/GeoNotifier.cpp:
2412         * Modules/geolocation/GeoNotifier.h:
2413
2414 2015-02-26  Dean Jackson  <dino@apple.com>
2415
2416         [iOS Media] incorrect front padding on time values
2417         https://bugs.webkit.org/show_bug.cgi?id=142027
2418         <rdar://problem/19960790>
2419
2420         Reviewed by Brent Fulgham.
2421
2422         My last commit was updating the OS X file,
2423         not the iOS file.
2424
2425         We don't want to prefix times with a "0".
2426
2427         * Modules/mediacontrols/mediaControlsApple.js:
2428         (Controller.prototype.formatTime):
2429         * Modules/mediacontrols/mediaControlsiOS.js:
2430         (ControllerIOS.prototype.formatTime):
2431
2432 2015-02-26  Mark Lam  <mark.lam@apple.com>
2433
2434         Rolling out r180602, r180608, r180613, r180617, r180671.
2435         <https://webkit.org/b/141990>
2436
2437         Not reviewed.
2438
2439         The r180602 solution does result in more work for GC when worker
2440         threads are in use.  Filip is uncomfortable with that.
2441         The EFL and GTK ports also seem to be unhappy with this change.
2442         Rolling out while we investigate.
2443
2444         * bindings/js/JSDOMWindowBase.cpp:
2445         (WebCore::JSDOMWindowBase::commonVM):
2446
2447 2015-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
2448
2449         [Mac] [iOS] Parsing support for -apple-trailing-word
2450         https://bugs.webkit.org/show_bug.cgi?id=141939
2451
2452         Reviewed by Andreas Kling.
2453
2454         This patch implements initial parsing support for the -apple-trailing-word CSS property.
2455         This property has two possible (mutually exclusive) values: auto and
2456         -apple-partially-balanced. This property is inherited.
2457
2458         The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
2459
2460         This is an internal property that will allow us to control line breaking behavior for
2461         short paragraphs.
2462
2463         Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
2464         the new value must be implemented as -webkit-partially-balanced. Using the -apple-
2465         prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
2466         version.
2467
2468         Test: platform/mac/fast/text/trailing-word-parse.html
2469
2470         * Configurations/FeatureDefines.xcconfig:
2471         * css/CSSComputedStyleDeclaration.cpp:
2472         (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
2473         CSS value.
2474         * css/CSSParser.cpp:
2475         (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
2476         pair.
2477         (WebCore::isKeywordPropertyID): New property is a keyword property.
2478         (WebCore::CSSParser::parseValue): Use the keyword property codepath.
2479         * css/CSSPrimitiveValueMappings.h:
2480         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
2481         representation and CSS values.
2482         (WebCore::CSSPrimitiveValue::operator TrailingWord):
2483         * css/CSSPropertyNames.in: New property.
2484         * css/CSSValueKeywords.in: New value.
2485         * rendering/SimpleLineLayout.cpp:
2486         (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
2487         * rendering/style/RenderStyle.h: Getter, setter and initial value.
2488         * rendering/style/RenderStyleConstants.h: Internal data type.
2489         * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
2490         * rendering/style/StyleRareInheritedData.cpp: Update constructors and operators.
2491
2492 2015-02-26  Roger Fong  <roger_fong@apple.com>
2493
2494         Unreviewed. Fix a accidental deletion from r178674.
2495
2496         * html/canvas/WebGLRenderingContextBase.cpp:
2497         (WebCore::WebGLRenderingContextBase::create):
2498         Return the fake WebGL context.
2499
2500 2015-02-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
2501
2502         Cleanup RenderSVGResourceClipper class.
2503         https://bugs.webkit.org/show_bug.cgi?id=142032.
2504
2505         Reviewed by Darin Adler.
2506         
2507         This is a follow up for r180643: <http://trac.webkit.org/changeset/180643>.
2508         It includes cleanup for RenderSVGResourceClipper class.
2509
2510         * rendering/svg/RenderSVGResourceClipper.cpp:
2511         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
2512         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
2513         * rendering/svg/RenderSVGResourceClipper.h: Change ClipperData to be a
2514         typedef instead of a class and rename it to ClipperMaskImage. The purpose
2515         of having it a class even though it includes only one member was because
2516         we wanted it to be WTF_MAKE_FAST_ALLOCATED. We do not need to allocate it
2517         as a separate object on the heap anymore.
2518         
2519         (WebCore::RenderSVGResourceClipper::addRendererToClipper): Instead of doing
2520         double hash table lookups by calling HashMap::contains() and then HashMap::get(),
2521         we can use HashMap::add() instead.
2522
2523 2015-02-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
2524
2525         Setting any of the <object> element plugin controlling attributes does not have any affect.
2526         https://bugs.webkit.org/show_bug.cgi?id=141936.
2527
2528         Reviewed by Zalan Bujtas.
2529
2530         When setting any of the <object> element plugin controlling attributes
2531         dynamically we need to mark the the element to be dirty by calling
2532         setNeedsStyleRecalc(), so it has to recreate its renderer when needed.
2533         
2534         Test: svg/as-object/svg-in-object-dynamic-attribute-change.html
2535
2536         * dom/Element.h: Delete unimplemented function.
2537         
2538         * html/HTMLObjectElement.cpp:
2539         (WebCore::HTMLObjectElement::parseAttribute): Dirty the element by calling
2540         setNeedsStyleRecalc() when one of the plugin controlling attributes gets
2541         changed. We have to clear the m_useFallbackContent because the attribute's
2542         new value might fix the object rendering.
2543         
2544         * html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.
2545         
2546         * html/HTMLPlugInImageElement.cpp:
2547         (WebCore::HTMLPlugInImageElement::willRecalcStyle): We might need to 
2548         reconstruct the object renderer in the image case. This can happen if the
2549         image was rendering fallback content and the attribute's new value fixes
2550         the object rendering.
2551
2552 2015-02-26  Brent Fulgham  <bfulgham@apple.com>
2553
2554         [Win] Make build logs more legible by reducing noise
2555         https://bugs.webkit.org/show_bug.cgi?id=142034
2556
2557         Reviewed by Alexey Proskuryakov.
2558
2559         Modify batch files, makefiles, and DOS commands to remove
2560         uninteresting/unhelpful output.
2561
2562         * WebCore.vcxproj/WebCoreGenerated.make:
2563         * WebCore.vcxproj/WebCorePreBuild.cmd:
2564         * WebCore.vcxproj/copyForwardingHeaders.cmd:
2565         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
2566
2567 2015-02-26  Michael Catanzaro  <mcatanzaro@igalia.com>
2568
2569         [FreeType] REGRESSION(r180563): Introduced crashes
2570         https://bugs.webkit.org/show_bug.cgi?id=142044
2571
2572         Reviewed by Martin Robinson.
2573
2574         No new tests, should be caught by any woff font test.
2575
2576         Use optionsPattern, not m_pattern, when m_pattern may be null.
2577
2578         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2579         (WebCore::FontPlatformData::initializeWithFontFace):
2580
2581 2015-02-26  Sergio Villar Senin  <svillar@igalia.com>
2582
2583         ASSERTION FAILED: !length.isUndefined() in WebCore::GridLength::GridLength
2584         https://bugs.webkit.org/show_bug.cgi?id=141645
2585
2586         Reviewed by Chris Dumez.
2587
2588         This bug has been here since r110484 but was uncovered by
2589         r180140. The problem r110484 was trying to fix was that
2590         CSSPrimitiveValue::convertToLength<Length> ended up calling
2591         CSSPrimitiveValue::computeLengthDouble() which was apparently
2592         dereferencing conversionData.style() and
2593         conversionData.rootStyle() pointers without checking them. That's
2594         why that fix added this condition to convertToLength():
2595
2596         isFontRelativeLength() && (!conversionData.style() || !conversionData.rootStyle())
2597
2598         which is not correct, because for the 4 possible font relative
2599         length types, 3 of them just use the style() pointer and the other
2600         one just uses rootStyle() which BTW could be NULL. This erroneous
2601         condition makes that function to return Length(Undefined) more
2602         often than it should.
2603
2604         From now on it only returns Length(Undefined) if the style()
2605         pointer is NULL and the font relative length type is one in the
2606         set (CSS_EMS, CSS_EXS, CSS_CHS);
2607
2608         Test: fast/css-grid-layout/grid-with-relative-font-length-crash.html
2609
2610         * css/CSSPrimitiveValue.h:
2611         * css/CSSPrimitiveValueMappings.h:
2612         (WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle):
2613         (WebCore::CSSPrimitiveValue::convertToLength):
2614
2615
2616 2015-02-26  Andreas Kling  <akling@apple.com>
2617
2618         [Cocoa] Prod libcache to drop caches in memory pressure relief handler.
2619         <https://webkit.org/b/142024>
2620         <rdar://problem/19966096>
2621
2622         Reviewed by Antti Koivisto.
2623
2624         libcache already listens to the OS memory pressure notifications, but we still
2625         need to manually request a cleanup when doing an iOS process suspension, or when
2626         simulating memory pressure.
2627
2628         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2629         (WebCore::MemoryPressureHandler::platformReleaseMemory): Call out to libcache's
2630         cache_simulate_memory_warning_event() to make sure that nonessential objects
2631         being kept alive by NSCaches get dropped when we need the memory.
2632
2633 2015-02-25  Zalan Bujtas  <zalan@apple.com>
2634
2635         Black line across screen on Adobe Illustrator detail page (non-retina only)
2636         https://bugs.webkit.org/show_bug.cgi?id=141866
2637
2638         Reviewed by Simon Fraser.
2639
2640         Phase is relative to the destination origin. We need to take location information into account
2641         while snapping so that the result is inline with the snapped destination rect.
2642         (location affects the snapped size.)
2643
2644         Test: fast/backgrounds/gradient-background-on-subpixel-position.html
2645
2646         * rendering/RenderBoxModelObject.cpp:
2647         (WebCore::pixelSnapBackgroundImageGeometryForPainting):
2648         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2649
2650 2015-02-25  Brent Fulgham  <bfulgham@apple.com>
2651
2652         [Win] Use WEBCORE_EXPORT instead of Definition file
2653         https://bugs.webkit.org/show_bug.cgi?id=141734
2654
2655         Reviewed by Alex Christensen.
2656
2657         No change in functionality.
2658
2659         * WebCore.vcxproj/WebCore.vcxproj: Correct bad Precompiled header
2660         settings on certain files.
2661         * WebCore.vcxproj/WebCore.vcxproj.filters: Automatically updated
2662         by Visual Studio.
2663         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto.
2664         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
2665         * WebCore.vcxproj/WebCoreTestSupportCommon.props: Added.
2666         * WebCore.vcxproj/WebCoreTestSupportDebug.props: Added.
2667         * WebCore.vcxproj/WebCoreTestSupportDebugWinCairo.props: Added.
2668         * WebCore.vcxproj/WebCoreTestSupportProduction.props: Added.
2669         * WebCore.vcxproj/WebCoreTestSupportRelease.props: Added.
2670         * WebCore.vcxproj/WebCoreTestSupportReleaseWinCairo.props: Added.
2671         * WebCorePrefix.h: Provide proper export definitions for Windows.
2672         * bindings/js/JSCustomXPathNSResolver.cpp: Add missing #include
2673         needed by the new export style.
2674         * bindings/js/JSDOMWindowBase.h: Export class since DRT needs
2675         access to parts of it.
2676         * bindings/js/ScriptCachedFrameData.cpp: Add missing #include
2677         needed by the new export style.
2678         * bindings/scripts/CodeGeneratorJS.pm: Use different export macro
2679         when generating WebCoreTestSupport files, so that we don't confuse
2680         the linker when WebCore.lib and WebCoreTestSupport.lib try to
2681         both export WEBCORE_EXPORT symbols.
2682         (ExportLabelForClass):
2683         (GenerateHeader):
2684         * bridge/jsc/BridgeJSC.cpp: Add missing #include needed by the new
2685         export style.
2686         * css/CSSParser.cpp: Ditto.
2687         * dom/Document.cpp: Ditto.
2688         * html/HTMLImageLoader.cpp: Ditto.
2689         * inspector/CommandLineAPIModule.cpp: Ditto.
2690         * inspector/PageDebuggerAgent.cpp: Ditto.
2691         * inspector/PageRuntimeAgent.cpp: Ditto.
2692         * inspector/WorkerRuntimeAgent.cpp: Ditto.
2693         * page/DOMWindow.cpp: Ditto.
2694         * page/DOMWindow.h: Export the destructor, as it is needed by
2695         DumpRenderTree (on Windows).
2696         * page/Page.cpp: Add missing #include needed by the new export style.
2697         * platform/Logging.h: Remove conflicting export declaration.
2698         * platform/PlatformExportMacros.h: Update for Windows use.
2699         * testing/Internals.cpp: Add missing #include needed by the new export style.
2700         * testing/Internals.h: Use WEBCORE_TESTSUPPORT_EXPORT for things that
2701         are supposed to be exported by WebCoreTestSupport, not WebCore.
2702         * testing/js/WebCoreTestSupport.cpp: Add missing #include needed by
2703         new export style.
2704         * testing/js/WebCoreTestSupportPrefix.cpp: Added.
2705         * testing/js/WebCoreTestSupportPrefix.h: Added.
2706         * xml/XMLHttpRequest.h: Export the destructor.
2707         * xml/XSLStyleSheetLibxslt.cpp: Add missing #include needed by the new
2708         export style.
2709         * xml/XSLTProcessorLibxslt.cpp: Ditto.
2710
2711 2015-02-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2712
2713         Remove unnecessary DatabaseFooTask::create
2714         https://bugs.webkit.org/show_bug.cgi?id=142002
2715
2716         Reviewed by Darin Adler.
2717
2718         DatabaseFooTask::create can be replaced with std::make_unique<>.
2719
2720         No new tests, no behavior changes.
2721
2722         * Modules/webdatabase/Database.cpp:
2723         (WebCore::Database::scheduleTransaction):
2724         (WebCore::Database::scheduleTransactionStep):
2725         (WebCore::Database::markAsDeletedAndClose):
2726         (WebCore::Database::closeImmediately):
2727         (WebCore::Database::tableNames):
2728         * Modules/webdatabase/DatabaseTask.h:
2729         (WebCore::DatabaseBackend::DatabaseCloseTask::create): Deleted.
2730         (WebCore::DatabaseBackend::DatabaseTransactionTask::create): Deleted.
2731         (WebCore::DatabaseBackend::DatabaseTableNamesTask::create): Deleted.
2732
2733 2015-02-25  Dean Jackson  <dino@apple.com>
2734
2735         [iOS Media] incorrect front padding on time values
2736         https://bugs.webkit.org/show_bug.cgi?id=142027
2737         <rdar://problem/19960790>
2738
2739         Reviewed by Brent Fulgham.
2740
2741         We don't want to prefix times with a "0".
2742
2743         * Modules/mediacontrols/mediaControlsApple.js:
2744         (Controller.prototype.formatTime):
2745
2746 2015-02-25  Chris Dumez  <cdumez@apple.com>
2747
2748         Make PublicURLManager suspendable
2749         https://bugs.webkit.org/show_bug.cgi?id=141977
2750         <rdar://problem/19923085>
2751
2752         Reviewed by Andreas Kling.
2753
2754         Make PublicURLManager suspendable by overriding ActiveDOMObject::canSuspend()
2755         and returning true. Nothing prevents suspending the PublicURLManager as its
2756         implementation never causes JS to be executed. No implementation for
2757         suspend() / resume() needs to be provided for the same reason.
2758
2759         The fact that PublicURLManager wasn't suspendable was preventing pages using
2760         URL.createObjectURL() from entering the PageCache. Baidu.com search results
2761         pages are using the API for example.
2762
2763         Test: fast/history/page-cache-createObjectURL.html
2764
2765         * html/PublicURLManager.cpp:
2766         (WebCore::PublicURLManager::canSuspend):
2767         * html/PublicURLManager.h:
2768
2769 2015-02-25  Zalan Bujtas  <zalan@apple.com>
2770
2771         Cleanup BackgroundImageGeometry class.
2772         https://bugs.webkit.org/show_bug.cgi?id=141997
2773
2774         Reviewed by Simon Fraser.
2775
2776         This patch attempts to improve RenderBoxModelObject::calculateBackgroundImageGeometry() readability by
2777         removing redundant code and making image geometry operations explicit. BackgroundImageGeometry
2778         becomes a read only class (with the exception of the clip() method).
2779
2780         No change in functionality.
2781
2782         * rendering/RenderBoxModelObject.cpp:
2783         (WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
2784         (WebCore::BackgroundImageGeometry::pixelSnapBackgroundImageGeometryForPainting):
2785         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2786         (WebCore::BackgroundImageGeometry::setNoRepeatX): Deleted.
2787         (WebCore::BackgroundImageGeometry::setNoRepeatY): Deleted.
2788         (WebCore::BackgroundImageGeometry::useFixedAttachment): Deleted.
2789         (WebCore::BackgroundImageGeometry::clip): Deleted.
2790         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting): Deleted.
2791         * rendering/RenderBoxModelObject.h:
2792         (WebCore::BackgroundImageGeometry::clip):
2793         (WebCore::BackgroundImageGeometry::BackgroundImageGeometry): Deleted.
2794         (WebCore::BackgroundImageGeometry::setDestRect): Deleted.
2795         (WebCore::BackgroundImageGeometry::setPhase): Deleted.
2796         (WebCore::BackgroundImageGeometry::setPhaseX): Deleted.
2797         (WebCore::BackgroundImageGeometry::setPhaseY): Deleted.
2798         (WebCore::BackgroundImageGeometry::setTileSize): Deleted.
2799         (WebCore::BackgroundImageGeometry::setSpaceSize): Deleted.
2800         (WebCore::BackgroundImageGeometry::setHasNonLocalGeometry): Deleted.
2801
2802 2015-02-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
2803
2804         Horizontal and vertical lines are clipped completely if clip-path is included in the tag but the referenced element is defined later.
2805         https://bugs.webkit.org/show_bug.cgi?id=141776.
2806
2807         Reviewed by Dean Jackson.
2808
2809         Tests: svg/clip-path/clip-path-line-use-before-defined-expected.svg
2810                svg/clip-path/clip-path-line-use-before-defined.svg
2811
2812         * rendering/svg/RenderSVGResourceClipper.cpp:
2813         (WebCore::RenderSVGResourceClipper::applyClippingToContext): Ensure the renderer
2814         is added to m_clipper if it does not exist. The same renderer might have been 
2815         added to m_clipper in resourceBoundingBox().
2816         
2817         (WebCore::RenderSVGResourceClipper::addRendererToClipper): Add the renderer to
2818         m_clipper if it does not exist. Return the associated ClipperData.
2819         
2820         (WebCore::RenderSVGResourceClipper::resourceBoundingBox): If the clipper is
2821         referenced before it is defined, add the renderer to m_clipper. While doing the
2822         layout() for the clipper, we can check if m_clipper has values or not. If it does
2823         have, we are going to mark the clipper for client invalidation which is done by
2824         the SVG root.
2825         
2826         * rendering/svg/RenderSVGResourceClipper.h:
2827         * rendering/svg/RenderSVGResourceContainer.h:
2828         (WebCore::RenderSVGResourceContainer::selfNeedsClientInvalidation): Define a 
2829         new function selfNeedsClientInvalidation() which controls marking the clipper 
2830         for client invalidation. In RenderSVGResourceClipper, override it so it checks
2831         m_clipper to force clients validation even if it the first time we do layout
2832         for this clipper.
2833
2834         * rendering/svg/RenderSVGResourceContainer.cpp:
2835         (WebCore::RenderSVGResourceContainer::layout): Call the virtual function
2836         selfNeedsClientInvalidation() to check whether we need to mark the clipper for
2837         client invalidation.
2838         
2839         * svg/SVGElement.cpp: Delete unneeded header file.
2840
2841 2015-02-25  peavo@outlook.com  <peavo@outlook.com>
2842
2843         [WinCairo] WinLauncher is not starting on Vista.
2844         https://bugs.webkit.org/show_bug.cgi?id=141905
2845
2846         Reviewed by Alex Christensen.
2847
2848         We have to soft link with Media Foundation functions to be able
2849         to start on Vista and WinXP.
2850
2851         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2852         (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
2853         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
2854         (WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
2855         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
2856         (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
2857         (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
2858         (WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
2859         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
2860
2861 2015-02-25  Beth Dakin  <bdakin@apple.com>
2862
2863         REGRESSION (r180018 ): Holding a rubber-band in place can get stuck
2864         https://bugs.webkit.org/show_bug.cgi?id=142020
2865         -and corresponding-
2866         rdar://problem/19945216
2867
2868         Reviewed by Tom Horton.
2869
2870         It was a mistaken assumption that it was necessary to return false in the zero-
2871         delta case. That is clearly conceptually wrong since false represents the DOM 
2872         doing something special with the event, which is clearly not the case if we never 
2873         even send the event to the DOM. Returning true will allow the rest of the 
2874         scrolling machinery the ability to handle the event.
2875         * dom/Element.cpp:
2876         (WebCore::Element::dispatchWheelEvent):
2877
2878 2015-02-25  Ryosuke Niwa  <rniwa@webkit.org>
2879
2880         HTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for contentEditableAttr
2881         https://bugs.webkit.org/show_bug.cgi?id=142003
2882
2883         Reviewed by Sam Weinig.
2884
2885         Utilized contentEditableType to reduce the code duplication.
2886
2887         * html/HTMLElement.cpp:
2888         (WebCore::contentEditableType): Moved and added a version that takes AtomicString.
2889         (WebCore::HTMLElement::collectStyleForPresentationAttribute):
2890
2891 2015-02-25  Sergio Villar Senin  <svillar@igalia.com>
2892
2893         [CSS Grid Layout] Tracks growing beyond limits when they should not
2894         https://bugs.webkit.org/show_bug.cgi?id=140883
2895
2896         Reviewed by Darin Adler.
2897
2898         Our track sizing algorithm implementation incorrectly grew some
2899         tracks beyond limits when handling min-content and max-content
2900         base sizes. In those cases we should only grow "any affected track
2901         that happens to also have an intrinsic max track sizing function"
2902         or all of them if there are none.
2903
2904         The problem was that we're using a vector of indexes pointing to
2905         the vector with the list of affected tracks. Those indexes become
2906         easily incorrect because the first thing we do in
2907         distributeSpaceToTracks() is to sort the vector with the affected
2908         tracks by growth potential.
2909
2910         Instead of that we now pass a vector with pointers to the list of
2911         tracks allowed to grow over the limits. The size changes are now
2912         directly stored in the GridTracks (it's called plannedSize)
2913         instead of in a separate vector, so we don't need to worry about
2914         tracks being rearranged (and we also get rid of the ugly vector of
2915         indexes pointing to another vector).
2916
2917         * rendering/RenderGrid.cpp:
2918         (WebCore::GridTrack::plannedSize): New member with getter/setter.
2919         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2920         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2921         Pass a setXXX() function instead of a growXXX() one to ForItems().
2922         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2923         Renamed additionalBreadthSpace to extraSpace which is the term
2924         used by specs.
2925         (WebCore::RenderGrid::distributeSpaceToTracks): Use GridTrack's
2926         plannedSize instead of the old distribution vector.
2927         (WebCore::GridTrack::growBaseSize): Deleted.
2928         (WebCore::GridTrack::growGrowthLimit): Deleted.
2929         * rendering/RenderGrid.h:
2930
2931 2015-02-25  Joanmarie Diggs  <jdiggs@igalia.com>
2932
2933         AX: Implement support for ARIA 1.1 'searchbox' role
2934         https://bugs.webkit.org/show_bug.cgi?id=142004
2935
2936         Reviewed by Chris Fleizach.
2937
2938         Add a new accessible SearchFieldRole to handle both the ARIA role
2939         and the "search" input type.
2940
2941         No new tests. Instead, added a new test case to roles-exposed.html
2942         for the mapping, and updated roles-computedRoleString.html because
2943         there is now a one-to-one mapping between the "search" input type
2944         and an ARIA role.
2945
2946         * accessibility/AccessibilityNodeObject.cpp:
2947         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2948         (WebCore::AccessibilityNodeObject::isSearchField):
2949         * accessibility/AccessibilityObject.cpp:
2950         (WebCore::AccessibilityObject::isARIATextControl):
2951         (WebCore::AccessibilityObject::isARIAInput):
2952         (WebCore::initializeRoleMap):
2953         * accessibility/AccessibilityObject.h:
2954         * accessibility/AccessibilityRenderObject.cpp:
2955         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2956         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2957         (atkRole):
2958         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2959         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
2960         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
2961         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
2962         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2963         (createAccessibilityRoleMap):
2964
2965 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
2966
2967         Clarify some resizing terminology in ScrollView/FrameView
2968         https://bugs.webkit.org/show_bug.cgi?id=141996
2969
2970         Reviewed by Zalan Bujtas.
2971
2972         ScrollableArea/ScrollView/FrameView had some confusing terminology around
2973         contentsResized/visibleContentsResized/fixedLayoutSizeChanged.
2974         
2975         Clarify this by distinguishing between:
2976         1. Available size changes because of
2977             i) non-overlay scrollbar presence
2978            ii) ScrollableArea frame change
2979         2. Removing fixedLayoutSizeChanged() and just treating it like an
2980            available size change.
2981            
2982         contentsResized() is relegated to simply being a hook that allows Mac to
2983         flash overlay scrollbars.
2984         
2985         The confusingly named visibleContentsResized() is now updateContentsSize(),
2986         and is the way that a ScrollableArea tells its subclasss that it should recompute
2987         the size of the contents (i.e. do a layout).
2988
2989         * page/FrameView.cpp:
2990         (WebCore::FrameView::setContentsSize): No longer mysteriously skip the
2991         FrameView implementation of contentsResized(), which used to do a setNeedsLayout()
2992         which we didn't want to do from setContentsSize(), which itself happens as a result of layout.
2993         (WebCore::FrameView::adjustViewSize): Whitespace.
2994         (WebCore::FrameView::layout): Ditto.
2995         (WebCore::FrameView::availableContentSizeChanged): Called on frame size change, or scrollbar
2996         change.
2997         (WebCore::FrameView::updateContentsSize): This actually does the layout.
2998         (WebCore::FrameView::scrollbarStyleChanged): Always call the base class;  ScrollView::scrollbarStyleChanged
2999         will bail if not a forced update.
3000         (WebCore::FrameView::setCustomFixedPositionLayoutRect): Forces a layout via updateContentsSize() now.
3001         (WebCore::FrameView::contentsResized): Deleted.
3002         (WebCore::FrameView::fixedLayoutSizeChanged): Deleted.
3003         (WebCore::FrameView::visibleContentsResized): Deleted.
3004         * page/FrameView.h:
3005         * platform/ScrollView.cpp:
3006         (WebCore::ScrollView::setFixedLayoutSize): Calls availableContentSizeChanged() now.
3007         (WebCore::ScrollView::setUseFixedLayout): Ditto.
3008         (WebCore::ScrollView::availableContentSizeChanged): Update scrollbars if that's not
3009         the reason we are being called.
3010         (WebCore::ScrollView::updateScrollbars): contentsResized() was the thing that caused setNeedsLayout();
3011         replace it with availableContentSizeChanged(). visibleContentsResized() did the layout, and
3012         replace with updateContentsSize().
3013         (WebCore::ScrollView::setFrameRect): Call availableContentSizeChanged() now. This takes care of
3014         updating scrollbars, so no need to explicitly do that.
3015         (WebCore::ScrollView::scrollbarStyleChanged): Call the base class.
3016         (WebCore::ScrollView::fixedLayoutSizeChanged): Deleted.
3017         * platform/ScrollView.h:
3018         * platform/ScrollableArea.cpp:
3019         (WebCore::ScrollableArea::availableContentSizeChanged): Call scrollAnimator->contentsResized()
3020         to flash the scrollbars.
3021         (WebCore::ScrollableArea::scrolledToRight):
3022         (WebCore::ScrollableArea::scrollbarStyleChanged): Call availableContentSizeChanged() since
3023         scrollbar style affects available space.
3024         * platform/ScrollableArea.h:
3025         (WebCore::ScrollableArea::updateContentsSize):
3026         (WebCore::ScrollableArea::scrollbarStyleChanged): Deleted.
3027
3028 2015-02-24  Ryosuke Niwa  <rniwa@webkit.org>
3029
3030         Unreviewed Mavericks build attempt fix after r180609.
3031
3032         * platform/graphics/mac/GraphicsContext3DMac.mm:
3033         (WebCore::GraphicsContext3D::GraphicsContext3D):
3034         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary):
3035
3036 2015-02-19  Roger Fong  <roger_fong@apple.com>
3037
3038         WebGL: Destroy the GLContext if a GPU restart has been detected.
3039         https://bugs.webkit.org/show_bug.cgi?id=141567.
3040         <rdar://problem/18507496>
3041
3042         Reviewed by Dean Jackson.
3043
3044         * html/canvas/WebGLRenderingContextBase.cpp:
3045         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
3046         * platform/graphics/GraphicsContext3D.h:
3047         (WebCore::GraphicsContext3D::setWebGLContext): 
3048         Keep track of which WebGLRenderingContext is associated with the current GraphicsContext3D.
3049         * platform/graphics/mac/GraphicsContext3DMac.mm:
3050         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): Helper method to check GPU status.
3051         (WebCore::GraphicsContext3D::GraphicsContext3D): 
3052         Don’t immediately abort the GPU process when the restart status is kCGLCPGPURestartStatusBlacklisted.
3053         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
3054         (WebCore::GraphicsContext3D::forceContextLost): 
3055         Force the WebGLRenderingContext to be lost.
3056         (WebCore::GraphicsContext3D::drawArrays): Check GPU status after calling drawArrays.
3057         (WebCore::GraphicsContext3D::drawElements): Check GPU status after calling drawElements.
3058         * WebCore.xcodeproj/project.pbxproj: Add SPI header for iOS.
3059         * platform/spi/ios/OpenGLESSPI.h: Added.
3060
3061 2015-02-24  Stephanie Lewis  <slewis@apple.com>
3062
3063         Unreviewed ios build fix after http://trac.webkit.org/changeset/180602.
3064
3065         * bindings/js/JSDOMWindowBase.cpp:
3066         (WebCore::JSDOMWindowBase::commonVM):
3067
3068 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
3069
3070         Use an enum for scrollbar style
3071         https://bugs.webkit.org/show_bug.cgi?id=141985
3072
3073         Reviewed by Beth Dakin.
3074
3075         Switch to an enum class for the scrollbar style (normal or overlay).
3076
3077         * page/ChromeClient.h:
3078         * page/FrameView.cpp:
3079         (WebCore::FrameView::scrollbarStyleChanged):
3080         * page/FrameView.h:
3081         * platform/ScrollTypes.h:
3082         * platform/ScrollView.cpp:
3083         (WebCore::ScrollView::scrollbarStyleChanged):
3084         * platform/ScrollView.h:
3085         * platform/ScrollableArea.h:
3086         (WebCore::ScrollableArea::scrollbarStyleChanged):
3087         * platform/mac/ScrollAnimatorMac.mm:
3088         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
3089
3090 2015-02-24  Commit Queue  <commit-queue@webkit.org>
3091
3092         Unreviewed, rolling out r180599.
3093         https://bugs.webkit.org/show_bug.cgi?id=141998
3094
3095         Lots of new test failures (Requested by smfr on #webkit).
3096
3097         Reverted changeset:
3098
3099         "Parsing support for -webkit-trailing-word"
3100         https://bugs.webkit.org/show_bug.cgi?id=141939
3101         http://trac.webkit.org/changeset/180599
3102
3103 2015-02-24  Sam Weinig  <sam@webkit.org>
3104
3105         [Attachment] Give <attachment> elements an underlying File
3106         https://bugs.webkit.org/show_bug.cgi?id=141993
3107
3108         Reviewed by Tim Horton.
3109
3110         - Add a JS subclass for attachments so that <attachment>s are
3111           instances of HTMLAttachmentElement rather than HTMLElement.
3112         - Give HTMLAttachmentElements an underlying File that they
3113           are the representation of. Expose it via a new 'file' property.
3114         - Expose a new Internals function called window.internals.createFile(url)
3115           that allows creating File objects for testing.
3116
3117         * CMakeLists.txt:
3118         * DerivedSources.cpp:
3119         * DerivedSources.make:
3120         * WebCore.vcxproj/WebCore.vcxproj:
3121         * WebCore.vcxproj/WebCore.vcxproj.filters:
3122         * WebCore.xcodeproj/project.pbxproj:
3123         * fileapi/File.h:
3124         * html/HTMLAttachmentElement.cpp:
3125         (WebCore::HTMLAttachmentElement::~HTMLAttachmentElement):
3126         (WebCore::HTMLAttachmentElement::file):
3127         (WebCore::HTMLAttachmentElement::setFile):
3128         * html/HTMLAttachmentElement.h:
3129         * html/HTMLAttachmentElement.idl: Added.
3130         * html/HTMLTagNames.in:
3131         * testing/Internals.cpp:
3132         (WebCore::Internals::createFile):
3133         * testing/Internals.h:
3134         * testing/Internals.idl:
3135
3136 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
3137
3138         AX: Implement support for ARIA 1.1 'switch' role
3139         https://bugs.webkit.org/show_bug.cgi?id=141986
3140
3141         Reviewed by Chris Fleizach.
3142
3143         Map the role to ATK_ROLE_TOGGLE_BUTTON for Gtk and Efl; on the Mac, to
3144         AXCheckBox with a subrole of AXSwitch. Ensure it looks and acts like a
3145         widget to accessibility APIs (supports and emits notifications when
3146         toggled, doesn't have children, exposes a name and description when
3147         provided).
3148
3149         Tests: accessibility/aria-switch-checked.html
3150                accessibility/aria-switch-sends-notification.html
3151                accessibility/aria-switch-text.html
3152
3153         * accessibility/AccessibilityNodeObject.cpp:
3154         (WebCore::AccessibilityNodeObject::canHaveChildren):
3155         (WebCore::AccessibilityNodeObject::isChecked):
3156         (WebCore::AccessibilityNodeObject::visibleText):
3157         (WebCore::AccessibilityNodeObject::title):
3158         * accessibility/AccessibilityObject.cpp:
3159         (WebCore::AccessibilityObject::isARIAInput):
3160         (WebCore::AccessibilityObject::actionVerb):
3161         (WebCore::initializeRoleMap):
3162         (WebCore::AccessibilityObject::supportsChecked):
3163         (WebCore::AccessibilityObject::checkboxOrRadioValue):
3164         * accessibility/AccessibilityObject.h:
3165         (WebCore::AccessibilityObject::isSwitch):
3166         * accessibility/atk/AXObjectCacheAtk.cpp:
3167         (WebCore::AXObjectCache::postPlatformNotification):
3168         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
3169         (atkRole):
3170         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
3171         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
3172         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
3173         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
3174         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3175         (createAccessibilityRoleMap):
3176         (-[WebAccessibilityObjectWrapper subrole]):
3177         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3178
3179 2015-02-24  Myles C. Maxfield  <mmaxfield@apple.com>
3180
3181         [Mac] [iOS] Parsing support for -apple-trailing-word
3182         https://bugs.webkit.org/show_bug.cgi?id=141939
3183
3184         Reviewed by Andreas Kling.
3185
3186         This patch implements initial parsing support for the -apple-trailing-word CSS property.
3187         This property has two possible (mutually exclusive) values: auto and
3188         -apple-partially-balanced. This property is inherited.
3189
3190         The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
3191
3192         This is an internal property that will allow us to control line breaking behavior for
3193         short paragraphs.
3194
3195         Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
3196         the new value must be implemented as -webkit-partially-balanced. Using the -apple-
3197         prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
3198         version.
3199
3200         Test: platform/mac/fast/text/trailing-word-parse.html
3201
3202         * Configurations/FeatureDefines.xcconfig:
3203         * css/CSSComputedStyleDeclaration.cpp:
3204         (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
3205         CSS value.
3206         * css/CSSParser.cpp:
3207         (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
3208         pair.
3209         (WebCore::isKeywordPropertyID): New property is a keyword property.
3210         (WebCore::CSSParser::parseValue): Use the keyword property codepath.
3211         * css/CSSPrimitiveValueMappings.h:
3212         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
3213         representation and CSS values.
3214         (WebCore::CSSPrimitiveValue::operator TrailingWord):
3215         * css/CSSPropertyNames.in: New property.
3216         * css/CSSValueKeywords.in: New value.
3217         * rendering/SimpleLineLayout.cpp:
3218         (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
3219         * rendering/style/RenderStyle.h: Getter, setter and initial value.
3220         * rendering/style/RenderStyleConstants.h: Internal data type.
3221         * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
3222
3223 2015-02-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3224
3225         Remove DecodingTask::create and DatabaseOpenTask::create
3226         https://bugs.webkit.org/show_bug.cgi?id=141966
3227
3228         Reviewed by Anders Carlsson.
3229
3230         These create() factory functions are redundant. We can use std::make_unique<> directly.
3231
3232         No new tests, no behavior changes.
3233
3234         * Modules/webaudio/AsyncAudioDecoder.cpp:
3235         (WebCore::AsyncAudioDecoder::decodeAsync):
3236         (WebCore::AsyncAudioDecoder::DecodingTask::create): Deleted.
3237         * Modules/webaudio/AsyncAudioDecoder.h:
3238         * Modules/webdatabase/Database.cpp:
3239         (WebCore::Database::openAndVerifyVersion):
3240         * Modules/webdatabase/DatabaseTask.h:
3241         (WebCore::DatabaseBackend::DatabaseOpenTask::create): Deleted.
3242
3243 2015-02-24  Commit Queue  <commit-queue@webkit.org>
3244
3245         Unreviewed, rolling out r180578.
3246         https://bugs.webkit.org/show_bug.cgi?id=141992
3247
3248         Broke scrolling in Inspector Console. (Requested by JoePeck on
3249         #webkit).
3250
3251         Reverted changeset:
3252
3253         "[Mac] WebKit abandons overlay scrollbar CALayers."
3254         https://bugs.webkit.org/show_bug.cgi?id=141943
3255         http://trac.webkit.org/changeset/180578
3256
3257 2015-02-24  Dean Jackson  <dino@apple.com>
3258
3259         [ios Media] the inline controls are visible after pressing Done on iPhone
3260         https://bugs.webkit.org/show_bug.cgi?id=141987
3261         <rdar://problem/19944110>
3262
3263         Reviewed by Beth Dakin.
3264
3265         When exiting out of a playing video, we should show the
3266         start playback button if we don't allow inline media
3267         (such as on iPhone).
3268
3269         * Modules/mediacontrols/mediaControlsiOS.js:
3270         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): Test for
3271         allowsInline as well.
3272
3273 2015-02-24  Zalan Bujtas  <zalan@apple.com>
3274
3275         Pass FillLayer reference instead of pointer to RenderBoxModelObject::calculateBackgroundImageGeometry.
3276         https://bugs.webkit.org/show_bug.cgi?id=141982
3277
3278         Reviewed by Simon Fraser.
3279
3280         There should always be a valid FillLayer.
3281
3282         No change in functionality.
3283
3284         * rendering/RenderBox.cpp:
3285         (WebCore::RenderBox::getBackgroundPaintedExtent):
3286         (WebCore::RenderBox::maskClipRect):
3287         (WebCore::RenderBox::repaintLayerRectsForImage):
3288         * rendering/RenderBoxModelObject.cpp:
3289         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3290         (WebCore::RenderBoxModelObject::calculateFillTileSize):
3291         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
3292         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
3293         * rendering/RenderBoxModelObject.h:
3294
3295 2015-02-24  Dean Jackson  <dino@apple.com>
3296
3297         [iOS Media] Be specific about which document to use for the timeline background canvas
3298         https://bugs.webkit.org/show_bug.cgi?id=141981
3299
3300         Reviewed by Eric Carlson.
3301
3302         In some cases, especially with nested iframes, the document
3303         reference for the shadow DOM might not be the one used
3304         to create a -webkit-canvas context for rendering via CSS.
3305         Explicitly get the context from the video's owner
3306         document.
3307
3308         There is still a bug here:
3309         https://bugs.webkit.org/show_bug.cgi?id=141983
3310
3311         * Modules/mediacontrols/mediaControlsiOS.js:
3312         (ControllerIOS.prototype.drawTimelineBackground):
3313
3314 2015-02-24  Zalan Bujtas  <zalan@apple.com>
3315
3316         Remove unused BackgroundImageGeometry::m_destOrigin
3317         https://bugs.webkit.org/show_bug.cgi?id=141980
3318
3319         Reviewed by Simon Fraser.
3320
3321         Remove BackgroundImageGeometry::m_destOrigin and its dependencies.
3322         They are not used at all.
3323
3324         No change in functionality.
3325
3326         * rendering/RenderBoxModelObject.cpp:
3327         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3328         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
3329         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
3330         (WebCore::BackgroundImageGeometry::relativePhase): Deleted.
3331         * rendering/RenderBoxModelObject.h:
3332         (WebCore::BackgroundImageGeometry::destOrigin): Deleted.
3333         (WebCore::BackgroundImageGeometry::setDestOrigin): Deleted.
3334         * rendering/svg/RenderSVGResourceMasker.cpp:
3335         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
3336
3337 2015-02-24  Zalan Bujtas  <zalan@apple.com>
3338
3339         RenderBoxModelObject::calculateBackgroundImageGeometry should return BackgroundImageGeometry.
3340         https://bugs.webkit.org/show_bug.cgi?id=141979
3341
3342         Reviewed by Simon Fraser.
3343
3344         No change in functionality.
3345
3346         * rendering/RenderBox.cpp:
3347         (WebCore::RenderBox::getBackgroundPaintedExtent):
3348         (WebCore::RenderBox::maskClipRect):
3349         (WebCore::RenderBox::repaintLayerRectsForImage):
3350         * rendering/RenderBoxModelObject.cpp:
3351         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3352         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
3353         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
3354         * rendering/RenderBoxModelObject.h:
3355
3356 2015-02-24  Zalan Bujtas  <zalan@apple.com>
3357
3358         Switch BackgroundImageGeometry's m_phase from LayoutPoint to LayoutSize.
3359         https://bugs.webkit.org/show_bug.cgi?id=141972
3360
3361         Reviewed by Simon Fraser.
3362
3363         Image geometry's phase represents distance.
3364
3365         No change in functionality.
3366
3367         * WebCore.order:
3368         * platform/graphics/GraphicsLayer.h:
3369         (WebCore::GraphicsLayer::setContentsTilePhase):
3370         (WebCore::GraphicsLayer::contentsTilePhase):
3371         * platform/graphics/texmap/TextureMapperLayer.cpp:
3372         (WebCore::TextureMapperLayer::computePatternTransformIfNeeded):
3373         (WebCore::TextureMapperLayer::setContentsTilePhase):
3374         * platform/graphics/texmap/TextureMapperLayer.h:
3375         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
3376         (WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
3377         * rendering/RenderBoxModelObject.cpp:
3378         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
3379         (WebCore::BackgroundImageGeometry::setNoRepeatX):
3380         (WebCore::BackgroundImageGeometry::setNoRepeatY):
3381         (WebCore::BackgroundImageGeometry::useFixedAttachment):
3382         (WebCore::BackgroundImageGeometry::relativePhase):