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