Unreviewed, rolling out r180902.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-03-02  Commit Queue  <commit-queue@webkit.org>
2
3         Unreviewed, rolling out r180902.
4         https://bugs.webkit.org/show_bug.cgi?id=142205
5
6         It broke scrolling in some cases. See bug 142202 for details.
7         (Requested by bdash on #webkit).
8
9         Reverted changeset:
10
11         "Move scroll animating functions from ScrollAnimator to
12         ScrollController"
13         https://bugs.webkit.org/show_bug.cgi?id=142102
14         http://trac.webkit.org/changeset/180902
15
16 2015-03-02  Commit Queue  <commit-queue@webkit.org>
17
18         Unreviewed, rolling out r180911.
19         https://bugs.webkit.org/show_bug.cgi?id=142204
20
21         The tests it added are crashing (Requested by bdash on
22         #webkit).
23
24         Reverted changeset:
25
26         "Add a microtask abstraction"
27         https://bugs.webkit.org/show_bug.cgi?id=137496
28         http://trac.webkit.org/changeset/180911
29
30 2015-03-02  Yoav Weiss  <yoav@yoav.ws>
31
32         Add a microtask abstraction
33         https://bugs.webkit.org/show_bug.cgi?id=137496
34
35         Reviewed by Sam Weinig.
36
37         This patch adds a microtask abstraction: https://html.spec.whatwg.org/multipage/webappapis.html#microtask
38         That abstraction is required in order to enable async loading of images,
39         which is in turn required to enable support for the picture element, as well as
40         to make sure that the order of properties set on HTMLImageElement has no implications.
41
42         * WebCore.vcxproj/WebCore.vcxproj: Add MicroTask.{h,cpp} to the project.
43         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Add MicroTaskTest.{h,cpp} to the project.
44         * WebCore.vcxproj/WebCore.vcxproj.filters: Add MicroTask.{h,cpp} to the project.
45         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Add MicroTaskTest.{h,cpp} to the project.
46         * WebCore.xcodeproj/project.pbxproj: Add MicroTask{,Test}.{h,cpp} to the project.
47         * dom/Document.h: Add WEBCORE_EXPORT to addConsoleMessage, so it can be used in MicroTaskTest that's in WebCoreTestSupport..
48         * dom/MicroTask.h: Add a MicroTask interface class. Add a MicroTaskQueue singleton.
49         (WebCore::MicroTask::~MicroTask):
50         (WebCore::MicroTask::run): Run the microtask.
51         * dom/MicroTask.cpp: Implement the MicroTaskQueue singleton.
52         (WebCore::MicroTaskQueue::singleton): Get a singleton instance of MicroTaskQueue.
53         (WebCore::MicroTaskQueue::queueMicroTask): Add a microtask to the queue.
54         (WebCore::MicroTaskQueue::runMicroTasks): Run all the microtasks in the queue and clear it.
55         * dom/ScriptRunner.cpp: Trigger running of all microtasks in queue.
56         (WebCore::ScriptRunner::timerFired):
57         * html/parser/HTMLScriptRunner.cpp: Trigger running of all microtasks in queue.
58         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
59         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
60         (WebCore::HTMLScriptRunner::runScript):
61         * testing/Internals.cpp: Add a method to queue a test microtask.
62         (WebCore::Internals::queueMicroTask):
63         * testing/Internals.h: Add a method to queue a test microtask.
64         (WebCore::Internals::queueMicroTask):
65         * testing/Internals.idl: Expose test microtask queueing to test JS.
66         * testing/MicroTaskTest.cpp: Add a test class that implements a microtask and prints to the console when it runs.
67         (WebCore::MicroTaskTest::run): Run the microtask
68         (WebCore::MicroTaskTest::create): Create a test microtask.
69         * testing/MicroTaskTest.h: Add a test class that implements a microtask.
70         (WebCore::MicroTaskTest::run):
71         (WebCore::MicroTaskTest::create):
72
73 2015-03-02  Jeremy Jones  <jeremyj@apple.com>
74
75         RenderVideo should not paint the video frame when video is fullscreen.
76         https://bugs.webkit.org/show_bug.cgi?id=142097
77
78         Reviewed by Eric Carlson.
79
80         For performance and correctness, RenderVideo should not paint the current video frame
81         inline when video is fullscreen. This happens when snapshots are taken and can have a
82         negative performance impact.
83
84         * rendering/RenderVideo.cpp:
85         (WebCore::RenderVideo::paintReplaced):
86
87 2015-03-02  Dean Jackson  <dino@apple.com>
88
89         [iOS Media] Airplay button should be blue when active
90         https://bugs.webkit.org/show_bug.cgi?id=142193
91
92         Reviewed by Brent Fulgham.
93
94         Add a blue form of the Airplay button that is used
95         when we are actively displaying on another screen.
96
97         * Modules/mediacontrols/mediaControlsiOS.css:
98         (video::-webkit-media-controls-wireless-playback-picker-button):
99         (video::-webkit-media-controls-wireless-playback-picker-button:active):
100         (video::-webkit-media-controls-wireless-playback-picker-button.playing):
101         * Modules/mediacontrols/mediaControlsiOS.js:
102         (ControllerIOS.prototype.updateWirelessPlaybackStatus):
103
104 2015-03-02  Brent Fulgham  <bfulgham@apple.com>
105
106         Move scroll animating functions from ScrollAnimator to ScrollController
107         https://bugs.webkit.org/show_bug.cgi?id=142102
108         <rdar://problem/20007161>
109
110         Reviewed by Simon Fraser.
111
112         No change in functionality.
113         
114         Do some refactoring of the various scrolling classes:
115         1. Consolidate animation times to RunLoop::Timer instead of a combination of WebCore::Timer
116            and CFRunLoopTimers. Do this for Scroll Snap Point and Rubberband animations.
117         2. Move ScrollController from platform/mac to platform/cocoa to enable sharing with iOS.
118         3. Move code from ScrollAnimator{Mac} -> ScrollController.
119         4. Rename scrollOffsetInAxis -> scrollOffsetOnAxis
120         5. Rename immediateScrollInAxis -> immediateScrollOnAxis
121
122         * WebCore.xcodeproj/project.pbxproj: Move ScrollController to 'platform/cocoa'
123         * page/mac/EventHandlerMac.mm: Make sure the scroll controller is notified of end-of-scroll
124         events, just as is done for the "event not handled" case in EventHandler.cpp. 
125         (WebCore::EventHandler::platformCompleteWheelEvent):
126         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h: Remove timer and some delegate
127         methods, now that ScrollController is controlling this state.
128         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
129         (WebCore::ScrollingTreeFrameScrollingNodeMac::~ScrollingTreeFrameScrollingNodeMac): We no longer
130         need to clean up the CFRunLoopTimer.
131         (WebCore::ScrollingTreeFrameScrollingNodeMac::scrollOffsetOnAxis): Add temporary stub needed
132         until Bug 141973 is completed.).
133         (WebCore::ScrollingTreeFrameScrollingNodeMac::immediateScrollOnAxis): Ditto.
134         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer): Deleted.
135         (WebCore::ScrollingTreeFrameScrollingNodeMac::stopSnapRubberbandTimer): Deleted.
136         * platform/ScrollAnimator.cpp:
137         (WebCore::ScrollAnimator::ScrollAnimator):
138         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Just call the ScrollController method.
139         (WebCore::ScrollAnimator::handleWheelEvent): Ditto.
140         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers): Ditto.
141         (WebCore::ScrollAnimator::scrollOffsetOnAxis): Renamed from scrollOffsetInAxis.
142         (WebCore::ScrollAnimator::scrollOffsetInAxis): Deleted.
143         (WebCore::ScrollAnimator::immediateScrollOnAxis): Renamed from immediateScrollInAxis.
144         (WebCore::ScrollAnimator::immediateScrollInAxis): Deleted.
145         (WebCore::ScrollAnimator::startScrollSnapTimer): Deleted.
146         (WebCore::ScrollAnimator::stopScrollSnapTimer): Deleted.
147         (WebCore::ScrollAnimator::horizontalScrollSnapTimerFired): Deleted.
148         (WebCore::ScrollAnimator::verticalScrollSnapTimerFired): Deleted.
149         * platform/ScrollAnimator.h:
150         * platform/cocoa/ScrollController.h: Copied from platform/mac/ScrollController.h.
151         * platform/cocoa/ScrollController.mm: Copied from platform/mac/ScrollController.mm.
152         (WebCore::ScrollController::ScrollController): Update to initialize new timers.
153         (WebCore::ScrollController::handleWheelEvent): Update to handle Scroll Snap Point events.
154         (WebCore::ScrollController::startSnapRubberbandTimer): Added.
155         (WebCore::ScrollController::stopSnapRubberbandTimer): Manage animation timers locally, do not
156         require client to maintain timers.
157         (WebCore::ScrollController::snapRubberBand): Ditto.
158         (WebCore::ScrollController::processWheelEventForScrollSnap): Added. (Moved from ScrollAnimatorMac)
159         (WebCore::ScrollController::updateScrollAnimatorsAndTimers): Ditto. Also updated to use RunLoop::Timer.
160         (WebCore::ScrollController::startScrollSnapTimer): Ditto. Also updated to use RunLoop::Timer.
161         (WebCore::ScrollController::stopScrollSnapTimer):  Ditto. Also updated to use RunLoop::Timer.
162         (WebCore::ScrollController::horizontalScrollSnapTimerFired): Ditto.
163         (WebCore::ScrollController::verticalScrollSnapTimerFired): Ditto.
164         (WebCore::ScrollController::scrollOffsetOnAxis): Moved from ScrollAnimatorMac.
165         (WebCore::ScrollController::immediateScrollOnAxis): Ditto.
166         * platform/mac/AxisScrollSnapAnimator.h: Rename methods from 'InAxis' to 'OnAxis'
167         * platform/mac/AxisScrollSnapAnimator.mm: Ditto.
168         * platform/mac/ScrollAnimatorMac.h:
169         * platform/mac/ScrollAnimatorMac.mm:
170         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Remove unused Rubberband timers (now that this is
171         controlled in the ScrollController)
172         (WebCore::ScrollAnimatorMac::startSnapRubberbandTimer): Deleted.
173         (WebCore::ScrollAnimatorMac::stopSnapRubberbandTimer): Deleted.
174         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired): Deleted.
175         * platform/mac/ScrollController.h: Removed.
176         * platform/mac/ScrollController.mm: Removed.
177
178 2015-03-02  Mark Lam  <mark.lam@apple.com>
179
180         The InspectorTimelineAgent should gracefully handle attempts to start more than once.
181         <https://webkit.org/b/142189>
182
183         Reviewed by Joseph Pecoraro.
184
185         No new tests.  Unskipped an existing test that already asserts this.
186
187         InspectorTimelineAgent::internalStop() already checks for redundant calls to it in
188         case the InspectorTimelineAgent is already disabled. Similarly,
189         InspectorTimelineAgent::internalStart() should check if the InspectorTimelineAgent
190         is already enabled before proceeding to do work to enable it. Though wasteful,
191         it is legal for clients of the InspectorTimelineAgent to invoke start on it more
192         than once. Hence, this check is needed.
193
194         This check fixes the debug assertion failure when running the
195         inspector/timeline/debugger-paused-while-recording.html test. The test can now
196         be unskipped.
197
198         * inspector/InspectorTimelineAgent.cpp:
199         (WebCore::InspectorTimelineAgent::internalStart):
200
201 2015-03-02  Roger Fong  <roger_fong@apple.com>
202
203         Update backgrounds of sliders for inline media controls on OS X.
204         https://bugs.webkit.org/show_bug.cgi?id=142188.
205         <rdar://problem/20012413>
206
207         Reviewed by Dean Jackson.
208
209         Don’t use CSS to draw volume and timeline slider backgrounds.
210         * Modules/mediacontrols/mediaControlsApple.css:
211         (video::-webkit-media-controls-volume-slider):
212         (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb):
213         (audio::-webkit-media-controls-timeline):
214         (audio::-webkit-media-controls-timeline::-webkit-slider-thumb):
215         (audio::-webkit-media-controls-panel .thumbnail-track):
216         (audio::-webkit-media-controls-volume-slider::-webkit-slider-thumb:active::-webkit-slider-thumb): Deleted.
217         (audio::-webkit-media-controls-timeline:active::-webkit-slider-thumb,): Deleted.
218
219         Draw volume and timeline slider backgrounds using 2d canvases.
220         * Modules/mediacontrols/mediaControlsApple.js:
221         (Controller.prototype.createControls):
222         (Controller.prototype.handleVolumeSliderInput):
223         (Controller.prototype.addRoundedRect):
224         (Controller.prototype.drawTimelineBackground):
225         (Controller.prototype.drawVolumeBackground):
226         (Controller.prototype.showControls):
227         * Modules/mediacontrols/mediaControlsiOS.js:
228         (ControllerIOS.prototype.addRoundedRect): Deleted.
229
230 2015-03-01  Roger Fong  <roger_fong@apple.com>
231
232         Update inline media element controls appearance Part 1.
233         https://bugs.webkit.org/show_bug.cgi?id=142138.
234         <rdar://problem/19997384>
235
236         Reviewed by Dean Jackson.
237
238         Update positioning, sizes, and background colors media control elements.
239         Volume and timeline sliders will be drawn in a separate patch via 2d canvases.
240
241         * Modules/mediacontrols/mediaControlsApple.css:
242         (audio::-webkit-media-controls-panel):
243         (video::-webkit-media-controls-panel):
244         (audio::-webkit-media-controls-rewind-button):
245         (audio::-webkit-media-controls-play-button):
246         (audio::-webkit-media-controls-panel .mute-box):
247         (video::-webkit-media-controls-volume-max-button):
248         (audio::-webkit-media-controls-panel .volume-box):
249         (audio::-webkit-media-controls-panel .volume-box:active):
250         (video::-webkit-media-controls-volume-slider):
251         (audio::-webkit-media-controls-toggle-closed-captions-button):
252         (audio::-webkit-media-controls-fullscreen-button):
253         (audio::-webkit-media-controls-current-time-display):
254         (audio::-webkit-media-controls-time-remaining-display):
255         (audio::-webkit-media-controls-timeline-container .hour-long-time): Deleted.
256
257 2015-03-02  David Kilzer  <ddkilzer@apple.com>
258
259         REGRESSION (r180882): Build failure: Methods not marked override in GraphicsLayerCA.h
260         <http://webkit.org/b/138684>
261
262         Fixes the following build failures:
263
264             In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
265             In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
266             In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
267             WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:123:33: error: 'setShapeLayerPath' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
268                 WEBCORE_EXPORT virtual void setShapeLayerPath(const Path&);
269                                             ^
270             In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
271             In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
272             In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
273             WebCore.framework/PrivateHeaders/GraphicsLayer.h:390:18: note: overridden virtual function is here
274                 virtual void setShapeLayerPath(const Path&);
275                              ^
276             In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:39:
277             In file included from WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:30:
278             In file included from WebKit2/WebProcess/WebPage/mac/GraphicsLayerCARemote.h:29:
279             WebCore.framework/PrivateHeaders/GraphicsLayerCA.h:124:33: error: 'setShapeLayerWindRule' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
280                 WEBCORE_EXPORT virtual void setShapeLayerWindRule(WindRule);
281                                             ^
282             In file included from WebKit2/WebProcess/WebPage/DrawingArea.cpp:30:
283             In file included from WebKit2/WebProcess/WebPage/WebPage.h:46:
284             In file included from WebKit2/WebProcess/Plugins/Plugin.h:31:
285             WebCore.framework/PrivateHeaders/GraphicsLayer.h:393:18: note: overridden virtual function is here
286                 virtual void setShapeLayerWindRule(WindRule);
287                              ^
288             2 errors generated.
289
290         * platform/graphics/ca/GraphicsLayerCA.h:
291         (WebCore::GraphicsLayer::setShapeLayerPath): Mark as override.
292         (WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.
293
294 2015-03-01  Simon Fraser  <simon.fraser@apple.com>
295
296         Make clip-path work on <video>, <canvas> etc.
297         https://bugs.webkit.org/show_bug.cgi?id=138684
298
299         Reviewed by Darin Adler.
300         
301         clip-path only worked in compositing layers on the painted contents of the layer,
302         and failed to clip children. Fix this by translating the clip path into a Path
303         which is set on a CA shape layer (for Mac and iOS), or painted into the
304         RenderLayerBacking's mask layer. There are two code paths:
305
306         1. clip-path which is a <basic-shape> or <geometry-box>, and no mask.
307             Here we can use the optimal code path of converting the clip into a path
308             that is put onto a CAShapeLayer, which is then used as a mask. There is no
309             additional backing store.
310         2. clip-path with an SVG reference, or clip-path combined with -webkit-mask:
311             Here we have to allocate backing store for the mask layer, and paint the
312             clip path (possibly with the mask).
313         
314         We add GraphicsLayer::Type::Shape, and add a getter for the layer type.
315
316         Tests: compositing/masks/compositing-clip-path-and-mask.html
317                compositing/masks/compositing-clip-path-mask-change.html
318                compositing/masks/compositing-clip-path.html
319                compositing/masks/reference-clip-path-on-composited.html
320
321         * platform/graphics/GraphicsLayer.cpp:
322         (WebCore::GraphicsLayer::GraphicsLayer): Store the type in the layer so the getter can return it.
323         (WebCore::GraphicsLayer::shapeLayerPath): Get and set the shape layer path.
324         (WebCore::GraphicsLayer::setShapeLayerPath): Ditto.
325         (WebCore::GraphicsLayer::shapeLayerWindRule): Get and set the shape layer wind rule.
326         (WebCore::GraphicsLayer::setShapeLayerWindRule): Ditto.
327         * platform/graphics/GraphicsLayer.h:
328         (WebCore::GraphicsLayer::type): Expose the type.
329         (WebCore::GraphicsLayer::supportsLayerType): Allow the cross-platform code to use
330         shape layers when it knows they are available.
331         (WebCore::GraphicsLayer::needsClippingMaskLayer): Deleted. This was never used.
332         * platform/graphics/GraphicsLayerClient.h: Align the bits (helps avoid typos). Add a
333         GraphicsLayerPaintClipPath phase.
334         * platform/graphics/Path.h: Some exports since WK2 needs to encode Paths now.
335         * platform/graphics/ca/GraphicsLayerCA.cpp:
336         (WebCore::GraphicsLayerCA::initialize): Make shape layers.
337         (WebCore::GraphicsLayerCA::setShapeLayerPath): Setter for the shape path. Sadly we
338         can't early return on unchanged paths yet.
339         (WebCore::GraphicsLayerCA::setShapeLayerWindRule):
340         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers): Updates for shape path
341         and wind rule.
342         (WebCore::GraphicsLayerCA::updateShape):
343         (WebCore::GraphicsLayerCA::updateWindRule):
344         * platform/graphics/ca/GraphicsLayerCA.h: Some new dirty bits for shape path and wind rule.
345         * platform/graphics/ca/PlatformCALayer.h:
346         * platform/graphics/ca/mac/PlatformCALayerMac.h:
347         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Got rid of lots of m_layer.get().
348         (PlatformCALayerMac::~PlatformCALayerMac):
349         (PlatformCALayerMac::setNeedsDisplay):
350         (PlatformCALayerMac::setNeedsDisplayInRect):
351         (PlatformCALayerMac::removeFromSuperlayer):
352         (PlatformCALayerMac::setSublayers):
353         (PlatformCALayerMac::removeAllSublayers):
354         (PlatformCALayerMac::appendSublayer):
355         (PlatformCALayerMac::insertSublayer):
356         (PlatformCALayerMac::replaceSublayer):
357         (PlatformCALayerMac::adoptSublayers):
358         (PlatformCALayerMac::addAnimationForKey):
359         (PlatformCALayerMac::removeAnimationForKey):
360         (PlatformCALayerMac::animationForKey):
361         (PlatformCALayerMac::setMask):
362         (PlatformCALayerMac::isOpaque):
363         (PlatformCALayerMac::setOpaque):
364         (PlatformCALayerMac::bounds):
365         (PlatformCALayerMac::setBounds):
366         (PlatformCALayerMac::position):
367         (PlatformCALayerMac::setPosition):
368         (PlatformCALayerMac::anchorPoint):
369         (PlatformCALayerMac::setAnchorPoint):
370         (PlatformCALayerMac::transform):
371         (PlatformCALayerMac::setTransform):
372         (PlatformCALayerMac::sublayerTransform):
373         (PlatformCALayerMac::setSublayerTransform):
374         (PlatformCALayerMac::setHidden):
375         (PlatformCALayerMac::setGeometryFlipped):
376         (PlatformCALayerMac::isDoubleSided):
377         (PlatformCALayerMac::setDoubleSided):
378         (PlatformCALayerMac::masksToBounds):
379         (PlatformCALayerMac::setMasksToBounds):
380         (PlatformCALayerMac::acceleratesDrawing):
381         (PlatformCALayerMac::setAcceleratesDrawing):
382         (PlatformCALayerMac::contents):
383         (PlatformCALayerMac::setContents):
384         (PlatformCALayerMac::setContentsRect):
385         (PlatformCALayerMac::setMinificationFilter):
386         (PlatformCALayerMac::setMagnificationFilter):
387         (PlatformCALayerMac::backgroundColor):
388         (PlatformCALayerMac::setBackgroundColor):
389         (PlatformCALayerMac::setBorderWidth):
390         (PlatformCALayerMac::setBorderColor):
391         (PlatformCALayerMac::opacity):
392         (PlatformCALayerMac::setOpacity):
393         (PlatformCALayerMac::copyFiltersFrom):
394         (PlatformCALayerMac::setName):
395         (PlatformCALayerMac::setSpeed):
396         (PlatformCALayerMac::setTimeOffset):
397         (PlatformCALayerMac::contentsScale):
398         (PlatformCALayerMac::setContentsScale):
399         (PlatformCALayerMac::cornerRadius):
400         (PlatformCALayerMac::setCornerRadius):
401         (PlatformCALayerMac::setEdgeAntialiasingMask):
402         (PlatformCALayerMac::shapeWindRule): New function.
403         (PlatformCALayerMac::setShapeWindRule): Ditto.
404         (PlatformCALayerMac::shapePath): Ditto.
405         (PlatformCALayerMac::setShapePath): Ditto.
406         (PlatformCALayer::isWebLayer):
407         * platform/graphics/cg/PathCG.cpp:
408         (WebCore::Path::Path): nullptr.
409         * rendering/RenderLayer.cpp:
410         (WebCore::RenderLayer::paintsWithClipPath): Return true if the clip path is painted.
411         (WebCore::RenderLayer::computeClipPath): Factor code that computes the clip path into this
412         function, so we can call it from RenderLayerBacking too.
413         (WebCore::RenderLayer::setupClipPath):
414         (WebCore::RenderLayer::paintLayerContents): We only want to apply the clip path
415         for painting when we're either painting a non-composited layer, or we're painting the
416         mask layer of a composited layer. We in the latter case, we just want to fill the clip
417         path with black, so re-use the paintChildClippingMaskForFragments() which does this.
418         * rendering/RenderLayer.h: Align the bits, add PaintLayerPaintingCompositingClipPathPhase.
419         * rendering/RenderLayerBacking.cpp:
420         (WebCore::RenderLayerBacking::~RenderLayerBacking):
421         (WebCore::RenderLayerBacking::updateConfiguration):
422         (WebCore::RenderLayerBacking::updateGeometry): Move mask updating into its own function.
423         (WebCore::RenderLayerBacking::updateMaskingLayerGeometry): If we're using the shape layer
424         code path, compute the Path and set it and the wind rule on the mask layer.
425         (WebCore::RenderLayerBacking::updateMaskingLayer): This is now more complex, as it has
426         to deal with combinations of clip-path and mask, some of which allow for the shape layer
427         mask, and we handle dynamic changes between these and painted masks.
428         (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer): Include the GraphicsLayerPaintClipPath phase.
429         (WebCore::RenderLayerBacking::paintIntoLayer): Map GraphicsLayerPaintClipPath to PaintLayerPaintingCompositingClipPathPhase.
430         (WebCore::RenderLayerBacking::updateMaskLayer): Deleted.
431         * rendering/RenderLayerBacking.h:
432
433 2015-03-01  Hunseop Jeong  <hs85.jeong@samsung.com>
434
435         [Cairo] Implement Path::addEllipse 
436         https://bugs.webkit.org/show_bug.cgi?id=142144
437
438         Reviewed by Gyuyoung Kim.
439
440         Add support for addEllipse method for platforms using cairo.
441
442         * platform/graphics/cairo/PathCairo.cpp:
443         (WebCore::Path::addEllipse):
444
445 2015-03-01  Joonghun Park  <jh718.park@samsung.com>
446
447         Use std::unique_ptr instead of PassOwnPtr|OwnPtr for ScrollAnimator
448         https://bugs.webkit.org/show_bug.cgi?id=142143
449
450         Reviewed by Darin Adler.
451
452         No new tests, no behavior changes.
453
454         * platform/ScrollAnimator.cpp:
455         (WebCore::ScrollAnimator::create):
456         * platform/ScrollAnimator.h:
457         * platform/ScrollAnimatorNone.cpp:
458         (WebCore::ScrollAnimator::create):
459         * platform/ScrollableArea.h:
460         * platform/ios/ScrollAnimatorIOS.mm:
461         (WebCore::ScrollAnimator::create):
462         * platform/mac/ScrollAnimatorMac.mm:
463         (WebCore::ScrollAnimator::create):
464
465 2015-02-26  Andy Estes  <aestes@apple.com>
466
467         [Content Filtering] Move another declaration to WebFilterEvaluatorSPI.h
468         https://bugs.webkit.org/show_bug.cgi?id=142066
469
470         Reviewed by Andreas Kling.
471
472         * platform/ios/ContentFilterIOS.mm:
473         * platform/spi/cocoa/WebFilterEvaluatorSPI.h:
474
475 2015-03-01  Chris Dumez  <cdumez@apple.com>
476
477         Make NotificationCenter / Notification suspendable
478         https://bugs.webkit.org/show_bug.cgi?id=142117
479         <rdar://problem/19923085>
480
481         Reviewed by Andreas Kling.
482
483         Make NotificationCenter / Notification suspendable so that pages using
484         them can enter the PageCache.
485
486         NotificationCenter can safely be suspended if there are no pending
487         permission requests. This required adding an
488         "hasPendingPermissionRequests()" callback to the NotificationClient.
489
490         Notification can safely be suspended if it is either idle (not showing
491         yet) or closed.
492
493         Tests: fast/history/page-cache-notification-non-suspendable.html
494                fast/history/page-cache-notification-suspendable.html
495
496         * Modules/notifications/Notification.cpp:
497         (WebCore::Notification::canSuspend):
498         * Modules/notifications/NotificationCenter.cpp:
499         (WebCore::NotificationCenter::canSuspend):
500         * Modules/notifications/NotificationClient.h:
501
502 2015-03-01  Ryosuke Niwa  <rniwa@webkit.org>
503
504         isContentEditable shouldn't trigger synchronous style recalc in most cases
505         https://bugs.webkit.org/show_bug.cgi?id=129034
506
507         Reviewed by Antti Koivisto.
508
509         Avoid style recalc inside isContentEditable when the document doesn't contain -webkit-user-modify or
510         -webkit-user-select: all. Instead, compute the value from contenteditable attributes in ancestors.
511         However, still compute the editability from the style tree when it's up-to-date in order to avoid
512         repeatedly walking up the DOM tree in a hot code path inside editing.
513
514         Test: fast/dom/HTMLElement/dynamic-editability-change.html
515
516         * css/CSSGrammar.y.in: No need to pass in "true" as we never call this function with false.
517         * css/CSSParser.cpp:
518         (WebCore::isValidKeywordPropertyAndValue): Calls parserSetUsesStyleBasedEditability as needed.
519         (WebCore::parseKeywordValue): Passes around StyleSheetContents*.
520         (WebCore::CSSParser::parseValue): Ditto.
521         (WebCore::CSSParser::parseFont): Ditto.
522
523         * css/StyleSheetContents.cpp:
524         (WebCore::StyleSheetContents::StyleSheetContents): Initializes and copies m_usesStyleBasedEditability.
525
526         * css/StyleSheetContents.h:
527         (WebCore::StyleSheetContents::parserSetUsesRemUnits): Removed the argument since it was always true.
528         (WebCore::StyleSheetContents::parserSetUsesStyleBasedEditability): Added.
529         (WebCore::StyleSheetContents::usesStyleBasedEditability): Added.
530
531         * dom/Document.cpp:
532         (WebCore::Document::recalcStyle): Added a FIXME as well as a comment explaining why we don't call
533         setUsesStyleBasedEditability. Since Node::computeEditability triggers style recalc only when the flag
534         is set to true, it's too late to update the flag here.
535         (WebCore::Document::updateStyleIfNeeded): Uses a newly extracted needsStyleRecalc.
536         (WebCore::Document::updateBaseURL): Preserves m_usesStyleBasedEditability as well as m_usesRemUnit.
537         (WebCore::Document::usesStyleBasedEditability): Added. Returns true when inline style declarations or
538         any active stylesheet uses -webkit-user-modify or -webkit-user-select: all. Flushing pending stylesheet
539         changes here is fine because the alternative is to trigger a full blown style recalc.
540
541         * dom/Document.h:
542         (WebCore::Document::needsStyleRecalc): Added. Extracted from updateStyleIfNeeded.
543
544         * dom/DocumentStyleSheetCollection.cpp:
545         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
546         (WebCore::styleSheetsUseRemUnits): Deleted.
547         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets): Updates m_usesStyleBasedEditability
548         as well as m_usesRemUnit.
549
550         * dom/DocumentStyleSheetCollection.h:
551         (WebCore::DocumentStyleSheetCollection::usesStyleBasedEditability): Added.
552         (WebCore::DocumentStyleSheetCollection::setUsesStyleBasedEditability): Added.
553
554         * dom/Node.cpp:
555         (WebCore::computeEditabilityFromComputedStyle): Extracted from computeEditability.
556         (WebCore::Node::computeEditability): When the style recalc is requested and the render tree is dirty,
557         check if the document uses any CSS property that can affect the editability of elements. If it doesn't,
558         compute the editability from contenteditable attributes in the anchors via matchesReadWritePseudoClass.
559         Continue to use the style-based computation when the render tree isn't dirty to avoid the tree walk.
560
561         * html/HTMLElement.cpp:
562         (WebCore::HTMLElement::editabilityFromContentEditableAttr): Extracted from matchesReadWritePseudoClass
563         to be called in Node::computeEditability. Also made it return Editability instead of boolean.
564         (WebCore::HTMLElement::matchesReadWritePseudoClass):
565         * html/HTMLElement.h:
566
567 2015-03-01  Brent Fulgham  <bfulgham@apple.com>
568
569         [Win] Unreviewed build fix.
570
571         * WebCorePrefix.h: Provide some default definitions to help build on Windows
572         machines with different application support libraries.
573
574 2015-02-28  Simon Fraser  <simon.fraser@apple.com>
575
576         Viewport units should not dirty style just before we do layout
577         https://bugs.webkit.org/show_bug.cgi?id=141682
578
579         Reviewed by Zalan Bujtas.
580         
581         In documents using viewport units, we dirtied style every time layout changed
582         the size of the document. This is nonsensical, because viewport units depend on the
583         viewport size, not the document size.
584         
585         Move the style dirtying from layout() into availableContentSizeChanged(). Hook
586         this up for WebKit1 by calling from -[WebFrameView _frameSizeChanged], and,
587         since that causes availableContentSizeChanged() to be called for WK1 for the first
588         time, protect the call to updateScrollbars() with a !platformWidget check.
589
590         Covered by existing viewport unit tests.
591
592         * page/FrameView.cpp:
593         (WebCore::FrameView::layout):
594         (WebCore::FrameView::availableContentSizeChanged):
595         (WebCore::FrameView::viewportSizeForCSSViewportUnits): Add a FIXME comment. Whether
596         scrollbars are ignored depends on the value of the overflow property on the root element.
597         * page/FrameView.h:
598         * platform/ScrollView.cpp:
599         (WebCore::ScrollView::availableContentSizeChanged):
600
601 2015-02-28  Andreas Kling  <akling@apple.com>
602
603         [Cocoa] Purge SQLite page cache when under memory pressure.
604         <https://webkit.org/b/142139>
605         <rdar://problem/19997739>
606
607         Reviewed by Pratik Solanki.
608
609         Call out to sqlite3 cache purging SPI on Cocoa platforms when
610         we need to free up some extra memory.
611
612         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
613         (WebCore::MemoryPressureHandler::platformReleaseMemory):
614
615 2015-02-28  Simon Fraser  <simon.fraser@apple.com>
616
617         FrameView::layoutTimerFired() should update style if needed before doing layout
618         https://bugs.webkit.org/show_bug.cgi?id=141688
619
620         Reviewed by Andreas Kling.
621
622         If the style recalc timer has been scheduled to fire after the layout timer,
623         when the layout timer fires, we might as well just do the style recalc
624         too. The call to updateStyleIfNeeded() will cancel the pending style
625         recalc timer.
626         
627         This doesn't have much impact on the number of layouts (measured via PLT)
628         but seems like a reasonable thing to do.
629
630         * page/FrameView.cpp:
631         (WebCore::FrameView::layoutTimerFired):
632
633 2015-02-28  Simon Fraser  <simon.fraser@apple.com>
634
635         Fullscreen video layers are off by one sometimes
636         https://bugs.webkit.org/show_bug.cgi?id=142122
637         rdar://problem/19878821
638
639         Reviewed by Eric Carlson.
640
641         Convert MediaPlayer::naturalSize() to return a FloatSize, since the natural size
642         isn't always integral (because of preserving pixel aspect ratio etc). Fix all the media
643         backends to use FloatSizes for natural size. Convert the video image drawing code
644         paths to FloatSize, since naturalSize is used on the destination rect computation,
645         and painting should be floating point anyway.
646         
647         Give the layer created by SourceBufferPrivateAVFObjC a name in debug builds.
648
649         * html/HTMLVideoElement.cpp:
650         (WebCore::HTMLVideoElement::videoWidth):
651         (WebCore::HTMLVideoElement::videoHeight):
652         (WebCore::HTMLVideoElement::paintCurrentFrameInContext):
653         * html/HTMLVideoElement.h:
654         * html/canvas/CanvasRenderingContext2D.cpp:
655         (WebCore::size):
656         (WebCore::CanvasRenderingContext2D::drawImage):
657         * html/canvas/WebGLRenderingContextBase.cpp:
658         (WebCore::WebGLRenderingContextBase::videoFrameToImage):
659         * platform/graphics/MediaPlayer.cpp:
660         (WebCore::NullMediaPlayerPrivate::naturalSize):
661         (WebCore::MediaPlayer::naturalSize):
662         (WebCore::MediaPlayer::paint):
663         (WebCore::MediaPlayer::paintCurrentFrameInContext):
664         (WebCore::NullMediaPlayerPrivate::paint): Deleted.
665         * platform/graphics/MediaPlayer.h:
666         * platform/graphics/MediaPlayerPrivate.h:
667         (WebCore::MediaPlayerPrivateInterface::paintCurrentFrameInContext):
668         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
669         (WebCore::MediaPlayerPrivateAVFoundation::naturalSize):
670         (WebCore::MediaPlayerPrivateAVFoundation::setNaturalSize):
671         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
672         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
673         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
674         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintCurrentFrameInContext):
675         (WebCore::MediaPlayerPrivateAVFoundationObjC::paint):
676         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithImageGenerator):
677         (WebCore::MediaPlayerPrivateAVFoundationObjC::createImageForTimeInRect):
678         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksChanged):
679         (WebCore::MediaPlayerPrivateAVFoundationObjC::sizeChanged):
680         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
681         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
682         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
683         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::naturalSize):
684         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paint):
685         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::paintCurrentFrameInContext):
686         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.h:
687         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
688         (WebCore::MediaSourcePrivateAVFObjC::naturalSize):
689         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
690         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
691         (WebCore::SourceBufferPrivateAVFObjC::trackDidChangeEnabled):
692         (WebCore::SourceBufferPrivateAVFObjC::naturalSize):
693         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.h:
694         * platform/graphics/avfoundation/objc/VideoTrackPrivateMediaSourceAVFObjC.mm:
695         (WebCore::VideoTrackPrivateMediaSourceAVFObjC::naturalSize):
696         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
697         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
698         (WebCore::MediaPlayerPrivateQTKit::naturalSize):
699         (WebCore::MediaPlayerPrivateQTKit::paintCurrentFrameInContext):
700         (WebCore::MediaPlayerPrivateQTKit::paint):
701         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
702         (WebCore::MockMediaPlayerMediaSource::naturalSize):
703         (WebCore::MockMediaPlayerMediaSource::paint):
704         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
705         * rendering/RenderVideo.cpp:
706         (WebCore::RenderVideo::calculateIntrinsicSize):
707         (WebCore::RenderVideo::paintReplaced):
708
709 2015-02-27  Hunseop Jeong  <hs85.jeong@samsung.com>
710
711         [EFL][GTK] Fix build break after r180790,180798
712         https://bugs.webkit.org/show_bug.cgi?id=142127
713
714         Reviewed by Gyuyoung Kim.
715
716         * platform/graphics/cairo/PathCairo.cpp:
717         (WebCore::Path::addEllipse):
718
719 2015-02-27  Zalan Bujtas  <zalan@apple.com>
720
721         Subpixel-layout: width: max-content; property might cause unnecessary scrollbar.
722         https://bugs.webkit.org/show_bug.cgi?id=142065
723
724         Reviewed by Simon Fraser.
725
726         We should not pixelsnap (ceil in this case) logical coordinates during layout.
727         Should this cause content to be partially cut off, we need to
728         find the broken piece in the computation logic.
729
730         Covered by the unskipped test.
731
732         * rendering/RootInlineBox.cpp:
733         (WebCore::RootInlineBox::paddedLayoutOverflowRect):
734
735 2015-02-27  Ryosuke Niwa  <rniwa@webkit.org>
736
737         Node::hasEditableStyle and isEditablePosition have too many options
738         https://bugs.webkit.org/show_bug.cgi?id=142078
739
740         Reviewed by Andreas Kling.
741
742         Moved the code that dealt with accessibility to htmlediting.cpp from Node. This patch introduces
743         new editing helper functions hasEditableStyle and isEditableNode for this purpose.
744
745         Also removed UserSelectAllTreatment from isContentEditable's arguments in the favor of using
746         newly extracted computeEditability in call sites that specify this option since isContentEditable
747         is a public DOM API.
748
749         No new tests since there should be no observable behavior changes.
750
751         * accessibility/AXObjectCache.h: Removed the declaration of an undefined function.
752
753         * dom/Element.cpp:
754         (WebCore::Element::shouldUseInputMethod): Uses newly added computeEditability.
755
756         * dom/Node.cpp:
757         (WebCore::Node::isContentEditable): Ditto. No longer takes UserSelectAllTreatment as an argument.
758         (WebCore::Node::isContentRichlyEditable): Ditto.
759         (WebCore::Node::computeEditability): Renamed from hasEditableStyle to avoid the confusion with
760         a helper function of the same name. Added ShouldUpdateStyle as an argument to optionally update
761         style tree. Also returns tri-state Editability enum instead of returning a boolean based on
762         the value of EditableLevel argument.
763         (WebCore::Node::isEditableToAccessibility): Moved to htmlediting.cpp.
764         (WebCore::Node::willRespondToMouseClickEvents): Uses newly added computeEditability.
765         (WebCore::Node::rootEditableElement): Moved to htmlediting.cpp.
766
767         * dom/Node.h: No longer includes EditingBoundary.h.
768         (WebCore::Node::isContentEditable):
769         (WebCore::Node::hasEditableStyle): No longer takes EditableType as an argument.
770         (WebCore::Node::hasRichlyEditableStyle): Ditto.
771
772         * editing/ApplyStyleCommand.cpp:
773         (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Uses newly added isEditableNode.
774         (WebCore::ApplyStyleCommand::surroundNodeRangeWithElement): Ditto.
775         * editing/DeleteFromTextNodeCommand.cpp:
776         (WebCore::DeleteFromTextNodeCommand::doApply): Ditto.
777         * editing/FrameSelection.cpp:
778         (WebCore::CaretBase::invalidateCaretRect): Ditto.
779         * editing/InsertNodeBeforeCommand.cpp:
780         (WebCore::InsertNodeBeforeCommand::doApply): Ditto.
781         (WebCore::InsertNodeBeforeCommand::doUnapply): Ditto.
782         * editing/RemoveNodeCommand.cpp:
783         (WebCore::RemoveNodeCommand::doApply): Ditto.
784
785         * editing/VisibleSelection.cpp:
786         (WebCore::VisibleSelection::hasEditableStyle): Since this is the only caller of isEditablePosition
787         which sets DoNotUpdateStyle, directly call hasEditableStyle on the container node instead. This was
788         not possible prior to r180726 because isEditablePosition had to move out of tables.
789
790         * editing/VisibleUnits.cpp:
791         (WebCore::previousLeafWithSameEditability): Uses newly added hasEditableStyle.
792         (WebCore::nextLeafWithSameEditability): Ditto.
793         (WebCore::rootEditableOrDocumentElement): Extracted from previousLinePosition. Use helper functions
794         in htmlediting.cpp instead of member functions of Node since they no longer support EditableType.
795         (WebCore::previousLinePosition):
796         (WebCore::nextLinePosition):
797
798         * editing/htmlediting.cpp:
799         (WebCore::highestEditableRoot): Uses newly added hasEditableStyle.
800         (WebCore::isEditableToAccessibility): Moved from Node.
801         (WebCore::computeEditability): Extracted from isEditablePosition.
802         (WebCore::hasEditableStyle): Added.
803         (WebCore::isEditableNode): Added.
804         (WebCore::isEditablePosition): Now calls computeEditability.
805         (WebCore::isRichlyEditablePosition): No longer takes EditableType since that variant was never used.
806         (WebCore::editableRootForPosition): Moved the code from Node::rootEditableElement.
807
808         * editing/htmlediting.h:
809
810 2015-02-27  Chris Dumez  <cdumez@apple.com>
811
812         Make ActiveDOMObject::canSuspend() pure virtual
813         https://bugs.webkit.org/show_bug.cgi?id=142096
814         <rdar://problem/19923085>
815
816         Reviewed by Andreas Kling.
817
818         Make ActiveDOMObject::canSuspend() pure virtual so that people at least
819         try to provide an implementation for it. The default implementation was
820         returning false unconditionally and thus was preventing pages from
821         entering the PageCache.
822
823 2015-02-27  Commit Queue  <commit-queue@webkit.org>
824
825         Unreviewed, rolling out r180203 and r180210.
826         https://bugs.webkit.org/show_bug.cgi?id=142116
827
828         broke process suspension and tile map (Requested by thorton on
829         #webkit).
830
831         Reverted changesets:
832
833         "Adopt CAMachPort-as-layer-contents"
834         https://bugs.webkit.org/show_bug.cgi?id=141687
835         http://trac.webkit.org/changeset/180203
836
837         "Fix the !USE(IOSURFACE) build"
838         http://trac.webkit.org/changeset/180210
839
840 2015-02-27  Sam Weinig  <sam@webkit.org>
841
842         Add WebKit2 SPI to create a DOM File object
843         https://bugs.webkit.org/show_bug.cgi?id=142109
844
845         Reviewed by Tim Horton.
846
847         * WebCore.xcodeproj/project.pbxproj:
848         Make <WebCore/File.h> (and associated files) available to WebKit2.
849
850 2015-02-27  Myles C. Maxfield  <mmaxfield@apple.com>
851
852         [Subpixel] Subpixelize RenderListMarker
853         https://bugs.webkit.org/show_bug.cgi?id=142093
854
855         Reviewed by Zalan Bujtas.
856
857         Use floats instead of ints.
858
859         Test: fast/lists/rtl-marker.html
860
861         * rendering/RenderListMarker.cpp:
862         (WebCore::RenderListMarker::paint):
863         (WebCore::RenderListMarker::updateContent):
864         (WebCore::RenderListMarker::getRelativeMarkerRect):
865         * rendering/RenderListMarker.h:
866
867 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
868
869         <attachment> should be selected immediately upon click, and be drag/copyable upon click
870         https://bugs.webkit.org/show_bug.cgi?id=142114
871         <rdar://problem/19982520>
872
873         Reviewed by Enrica Casucci.
874
875         * css/html.css:
876         (attachment):
877         Make attachment use 'user-select: all' to act as a single click-to-select unit.
878
879         * html/HTMLAttachmentElement.cpp:
880         (WebCore::HTMLAttachmentElement::setFocus): Deleted.
881         * html/HTMLAttachmentElement.h:
882         * rendering/RenderAttachment.cpp:
883         (WebCore::RenderAttachment::isFocused): Deleted.
884         (WebCore::RenderAttachment::focusChanged): Deleted.
885         * rendering/RenderAttachment.h:
886         * rendering/RenderThemeMac.mm:
887         (WebCore::RenderThemeMac::paintAttachment):
888         Remove focus-related code; instead of focusing the element upon click,
889         we get a selection including just the <attachment>, and everything
890         behaves much more consistently (copy works, drag works, etc.).
891
892 2015-02-27  Myles C. Maxfield  <mmaxfield@apple.com>
893
894         [iOS] Some MathML tests crash in RenderMathMLOperator::advanceForGlyph() or boundsForGlyph()
895         https://bugs.webkit.org/show_bug.cgi?id=141371
896
897         Reviewed by David Kilzer.
898
899         Null checks.
900
901         Covered by existing mathml tests.
902
903         * rendering/mathml/RenderMathMLOperator.cpp:
904         (WebCore::RenderMathMLOperator::boundsForGlyph):
905         (WebCore::RenderMathMLOperator::advanceForGlyph):
906         (WebCore::RenderMathMLOperator::getDisplayStyleLargeOperator):
907
908 2015-02-27  Chris Dumez  <cdumez@apple.com>
909
910         Make SourceBuffer ActiveDOMObject suspendable
911         https://bugs.webkit.org/show_bug.cgi?id=142108
912         <rdar://problem/19923085>
913
914         Reviewed by Jer Noble.
915
916         Make SourceBuffer ActiveDOMObject suspendable if it is removed from its
917         MediaSource and does not have any pending events. This makes it more
918         likely for pages using SourceBuffer objects to go into the PageCache.
919
920         Test: fast/history/page-cache-removed-source-buffer.html
921
922         * Modules/mediasource/SourceBuffer.cpp:
923         (WebCore::SourceBuffer::canSuspend):
924         * Modules/mediasource/SourceBuffer.h:
925
926 2015-02-26  Sam Weinig  <sam@webkit.org>
927
928         Add support for canvas ellipse method
929         https://bugs.webkit.org/show_bug.cgi?id=82791
930         <rdar://problem/11159172>
931
932         Reviewed by Dirk Schulze.
933
934         Tests: fast/canvas/canvas-ellipse-360-winding.html
935                fast/canvas/canvas-ellipse-circumference-fill.html
936                fast/canvas/canvas-ellipse-circumference.html
937                fast/canvas/canvas-ellipse-connecting-line.html
938                fast/canvas/canvas-ellipse-negative-radius.html
939                fast/canvas/canvas-ellipse-zero-lineto.html
940                fast/canvas/canvas-ellipse.html
941
942         * html/canvas/CanvasPathMethods.h:
943         * html/canvas/CanvasPathMethods.cpp:
944         (WebCore::CanvasPathMethods::lineTo):
945         Convenience for passing a FloatPoint instead of two floats.
946
947         (WebCore::normalizeAngles):
948         Normalizes the angles as described in the HTML spec. Ensuring the startAngle
949         is greater than 0 and less than 2pi, and the the endAngle is at most 2pi
950         from the start angle.
951
952         (WebCore::CanvasPathMethods::arc):
953         - Renames some of the parameters to be clearer.
954         - Normalizes the angles for consistency with ellipse.
955         - Moves hasInvertibleTransform() higher in the function for consistency.
956
957         (WebCore::CanvasPathMethods::ellipse): Added.
958
959         * html/canvas/CanvasRenderingContext2D.idl:
960         * html/canvas/DOMPath.idl:
961         Add ellipse(...).
962
963         * platform/graphics/Path.h:
964         * platform/graphics/cg/PathCG.cpp:
965         (WebCore::Path::addArc):
966         Rename parameters for clarity and use a nullptr.
967
968         (WebCore::Path::addEllipse):
969         Added. Constructs an ellipse via a transformed arc.
970
971 2015-02-27  Enrica Casucci  <enrica@apple.com>
972
973         Adding support for serializing HTMLAttachment elements.
974         https://bugs.webkit.org/show_bug.cgi?id=142026
975
976         Reviewed by Tim Horton.
977
978         Test: editing/pasteboard/copy-paste-attachment.html
979
980         Adding support to serialize the attachment element
981         and properly handle it when converting a DOM range
982         to NSAttributedString.
983
984         * editing/cocoa/HTMLConverter.mm:
985         (HTMLConverter::_processElement):
986         * editing/markup.cpp:
987         (WebCore::StyledMarkupAccumulator::appendCustomAttributes): Create new attribute
988         for attachment element when serializating.
989         (WebCore::StyledMarkupAccumulator::appendElement):
990         (WebCore::createFragmentFromMarkup): Remove the attribute from the attachment element
991         when creating the fragment.
992         * html/HTMLAttachmentElement.cpp:
993         (WebCore::HTMLAttachmentElement::file): Added const to file() to
994         use it in appendCustonAttributes where the element is a const reference.
995         * html/HTMLAttachmentElement.h:
996         * html/HTMLAttributeNames.in:
997
998 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
999
1000         <attachment> should have an inactive style (gray in background)
1001         https://bugs.webkit.org/show_bug.cgi?id=142103
1002         <rdar://problem/19982486>
1003
1004         Reviewed by Dan Bernstein.
1005
1006         * rendering/RenderThemeMac.mm:
1007         (WebCore::attachmentLabelInactiveBackgroundColor):
1008         (WebCore::attachmentLabelInactiveTextColor):
1009         (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
1010         (WebCore::RenderThemeMac::paintAttachmentLabel):
1011         Use a gray background and gray text when the selection containing the
1012         attachment isn't focused and active.
1013
1014 2015-02-27  Brady Eidson  <beidson@apple.com>
1015
1016         Add a "block-cookies" rule to the user content filter.
1017         https://bugs.webkit.org/show_bug.cgi?id=142105
1018
1019         Reviewed by Alex Christensen.
1020
1021         Tests: http/tests/usercontentfilter/block-cookies-basic.html
1022                http/tests/usercontentfilter/block-cookies-send.html
1023
1024         * contentextensions/ContentExtensionRule.h:
1025
1026         * contentextensions/ContentExtensionsBackend.cpp:
1027         (WebCore::ContentExtensions::ContentExtensionsBackend::actionForURL):
1028         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL): Deleted.
1029         * contentextensions/ContentExtensionsBackend.h:
1030
1031         * contentextensions/ContentExtensionsManager.cpp:
1032         (WebCore::ContentExtensions::ExtensionsManager::loadAction):
1033
1034         * loader/cache/CachedResourceLoader.cpp:
1035         (WebCore::CachedResourceLoader::requestResource):
1036
1037         * page/UserContentController.cpp:
1038         (WebCore::UserContentController::actionForURL):
1039         (WebCore::UserContentController::contentFilterBlocksURL): Deleted.
1040         * page/UserContentController.h:
1041
1042 2015-02-27  Alex Christensen  <achristensen@webkit.org>
1043
1044         [WinCairo] Unreviewed build fix.
1045
1046         * platform/graphics/BitmapImage.h:
1047         * platform/win/BitmapInfo.h:
1048         Added WEBCORE_EXPORT.
1049
1050 2015-02-27  Timothy Horton  <timothy_horton@apple.com>
1051
1052         <attachment>'s label baseline should match that of the surrounding text
1053         https://bugs.webkit.org/show_bug.cgi?id=142099
1054         rdar://problem/19982495
1055
1056         Reviewed by Dan Bernstein.
1057
1058         * rendering/RenderAttachment.cpp:
1059         (WebCore::RenderAttachment::baselinePosition):
1060         * rendering/RenderAttachment.h:
1061         Override baselinePosition and retrieve it from RenderTheme.
1062
1063         * rendering/RenderTheme.h:
1064         (WebCore::RenderTheme::attachmentBaseline):
1065         * rendering/RenderThemeMac.h:
1066         * rendering/RenderThemeMac.mm:
1067         (WebCore::AttachmentLayout::AttachmentLayout):
1068         (WebCore::RenderThemeMac::attachmentBaseline):
1069         Plumb the label baseline from AttachmentLayout to RenderAttachment.
1070
1071 2015-02-27  Commit Queue  <commit-queue@webkit.org>
1072
1073         Unreviewed, rolling out r180752.
1074         https://bugs.webkit.org/show_bug.cgi?id=142098
1075
1076         Causes 10 SVG test failures on Windows. (Requested by
1077         bfulgham_ on #webkit).
1078
1079         Reverted changeset:
1080
1081         "Cache glyph widths to GlyphPages"
1082         https://bugs.webkit.org/show_bug.cgi?id=142028
1083         http://trac.webkit.org/changeset/180752
1084
1085 2015-02-27  David Kilzer  <ddkilzer@apple.com>
1086
1087         [iOS] Fix build by defining EAGL_IOSURFACE macro before including <OpenGLES/EAGLPrivate.h>
1088
1089         * platform/spi/ios/OpenGLESSPI.h:  Define EAGL_IOSURFACE macro
1090         until header refactoring is completed.
1091
1092 2015-02-27  Chris Dumez  <cdumez@apple.com>
1093
1094         MediaSource should be suspendable when closed
1095         https://bugs.webkit.org/show_bug.cgi?id=142089
1096         <rdar://problem/19923085>
1097
1098         Reviewed by Jer Noble.
1099
1100         Make MediaSource ActiveDOMObject suspendable when it is in closed state
1101         and it has no pending events. This increases the likelihood of pages
1102         using MediaSource to enter the PageCache.
1103
1104         Tests: fast/history/page-cache-media-source-closed-2.html
1105                fast/history/page-cache-media-source-closed.html
1106                fast/history/page-cache-media-source-opened.html
1107
1108 2015-02-27  Andreas Kling  <akling@apple.com>
1109
1110         Use NeverDestroyed for JS wrapper owners.
1111         <https://webkit.org/b/142090>
1112
1113         Reviewed by Chris Dumez.
1114
1115         Using NeverDestroyed puts these objects in BSS which is preferable
1116         since that prevents them from pinning down entire malloc pages forever.
1117
1118         * bindings/scripts/CodeGeneratorJS.pm:
1119         (GenerateHeader): Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL.
1120
1121         * bindings/scripts/test/JS/*: Rebaseline bindings tests for this change.
1122
1123 2015-02-27  Chris Dumez  <cdumez@apple.com>
1124
1125         Make IDBDatabase / IDBRequest suspendable
1126         https://bugs.webkit.org/show_bug.cgi?id=142076
1127         <rdar://problem/19923085>
1128
1129         Reviewed by Andreas Kling.
1130
1131         Make IDBDatabase / IDBRequest suspendable under certain conditions to
1132         make it more likely for pages using indexeddb to enter the PageCache.
1133
1134         IDBDatabase is safely suspendable if the database is closed. IDBRequest
1135         is safely suspendable if the request no longer has any pending activity
1136         (i.e. state is DONE and success / failure handler was called). We may
1137         be able to do better later but this is the bare minimum for now.
1138
1139         Tests: fast/history/page-cache-indexed-closed-db.html
1140                fast/history/page-cache-indexed-opened-db.html
1141
1142         * Modules/indexeddb/IDBDatabase.cpp:
1143         (WebCore::IDBDatabase::IDBDatabase):
1144         (WebCore::IDBDatabase::closeConnection):
1145         (WebCore::IDBDatabase::enqueueEvent):
1146         (WebCore::IDBDatabase::canSuspend):
1147         * Modules/indexeddb/IDBDatabase.h:
1148         * Modules/indexeddb/IDBRequest.cpp:
1149         (WebCore::IDBRequest::canSuspend):
1150         * Modules/indexeddb/IDBRequest.h:
1151
1152 2015-02-27  Chris Dumez  <cdumez@apple.com>
1153
1154         Drop unnecessary DatabaseManager::hasOpenDatabases() in PageCache::canCachePageContainingThisFrame()
1155         https://bugs.webkit.org/show_bug.cgi?id=142052
1156
1157         Reviewed by Andreas Kling.
1158
1159         Drop WebDatabase special-handling from PageCache::canCachePageContainingThisFrame().
1160         DatabaseContext is already an ActiveDOMObject and DatabaseContext::canSuspend() was
1161         returning false so pages using WebDatabase would never enter the PageCache anyway.
1162
1163         This patch also overrides ActiveDOMObject::canSuspend() in DatabaseContext to only
1164         return false when there are open databases. This check is now equivalent to the one
1165         that was in PageCache.
1166
1167         An issue that remains is that DatabaseContext::m_hasOpenDatabases is never reset
1168         to false so once a page opened a database, it will never be page-cacheable. This
1169         will be taken care of separately though.
1170
1171         Test: fast/history/page-cache-webdatabase-opened-db.html
1172
1173         * Modules/webdatabase/DatabaseContext.cpp:
1174         (WebCore::DatabaseContext::canSuspend):
1175         * Modules/webdatabase/DatabaseContext.h:
1176         * history/PageCache.cpp:
1177         (WebCore::logCanCacheFrameDecision):
1178         (WebCore::PageCache::canCachePageContainingThisFrame):
1179         * page/DiagnosticLoggingKeys.cpp:
1180         (WebCore::DiagnosticLoggingKeys::hasOpenDatabasesKey): Deleted.
1181         * page/DiagnosticLoggingKeys.h:
1182
1183 2015-02-27  Alex Christensen  <achristensen@webkit.org>
1184
1185         Compile DFA to bytecode.
1186         https://bugs.webkit.org/show_bug.cgi?id=142031
1187
1188         Reviewed by Benjamin Poulain.
1189
1190         * WebCore.xcodeproj/project.pbxproj:
1191         * contentextensions/ContentExtensionsBackend.cpp:
1192         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
1193         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
1194         * contentextensions/ContentExtensionsBackend.h:
1195         * contentextensions/DFA.cpp:
1196         (WebCore::ContentExtensions::DFA::nextState): Deleted.
1197         (WebCore::ContentExtensions::DFA::actions): Deleted.
1198         * contentextensions/DFA.h:
1199         (WebCore::ContentExtensions::DFA::size):
1200         (WebCore::ContentExtensions::DFA::nodeAt):
1201         * contentextensions/DFABytecode.h: Added.
1202         (WebCore::ContentExtensions::instructionSizeWithArguments):
1203         * contentextensions/DFABytecodeCompiler.cpp: Added.
1204         (WebCore::ContentExtensions::append):
1205         (WebCore::ContentExtensions::set32Bits):
1206         (WebCore::ContentExtensions::DFABytecodeCompiler::emitAppendAction):
1207         (WebCore::ContentExtensions::DFABytecodeCompiler::emitJump):
1208         (WebCore::ContentExtensions::DFABytecodeCompiler::emitCheckValue):
1209         (WebCore::ContentExtensions::DFABytecodeCompiler::emitTerminate):
1210         (WebCore::ContentExtensions::DFABytecodeCompiler::reserveBufferCapacity):
1211         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
1212         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
1213         * contentextensions/DFABytecodeCompiler.h: Added.
1214         (WebCore::ContentExtensions::DFABytecodeCompiler::DFABytecodeCompiler):
1215         * contentextensions/DFABytecodeInterpreter.cpp: Added.
1216         (WebCore::ContentExtensions::getBits):
1217         (WebCore::ContentExtensions::DFABytecodeInterpreter::interpret):
1218         * contentextensions/DFABytecodeInterpreter.h: Added.
1219         (WebCore::ContentExtensions::DFABytecodeInterpreter::DFABytecodeInterpreter):
1220
1221 2015-02-27  Zalan Bujtas  <zalan@apple.com>
1222
1223         Use after free in WebCore::RenderNamedFlowFragment::restoreRegionObjectsOriginalStyle
1224         https://bugs.webkit.org/show_bug.cgi?id=138366
1225
1226         Reviewed by Dave Hyatt.
1227
1228         This patch ensures that we clean up RenderNamedFlowFragment::m_renderObjectRegionStyle when embedded flow content is getting destroyed.
1229
1230         In m_renderObjectRegionStyle hash map, we store style information about the named flow's descendant children.
1231         When a child is being detached from the tree, it removes itself from this hashmap.
1232         We do it by traversing up on the ancestor chain and call removeFlowChildInfo() on the parent flow.
1233         However in case of embedded flows (for example multicolumn content inside a region), we need to check whether the parent flow
1234         is inside a flow too and continue the cleanup accordingly.
1235
1236         Test: fast/regions/region-with-multicolumn-embedded-crash.html
1237
1238         * rendering/RenderObject.cpp:
1239         (WebCore::RenderObject::removeFromRenderFlowThreadIncludingDescendants):
1240
1241 2015-02-27  Brady Eidson  <beidson@apple.com>
1242
1243         Add API to remove a single content filter.
1244         <rdar://problem/19977764> and https://bugs.webkit.org/show_bug.cgi?id=142088
1245
1246         Reviewed by Sam Weinig.
1247
1248         * page/UserContentController.cpp:
1249         (WebCore::UserContentController::removeUserContentFilter):
1250         * page/UserContentController.h:
1251
1252 2015-02-26  Brent Fulgham  <bfulgham@apple.com>
1253
1254         [Win] Remove remaining SafariTheme cruft
1255         https://bugs.webkit.org/show_bug.cgi?id=142075
1256
1257         Reviewed by Anders Carlsson.
1258
1259         Remove reference to SafariTheme-switching preference.
1260
1261         Tested by existing layout tests.
1262
1263         * WebCore.vcxproj/WebCore.vcxproj:
1264         * WebCore.vcxproj/WebCore.vcxproj.filters:
1265         * config.h:
1266         * page/Settings.cpp:
1267         (WebCore::Settings::fontRenderingMode):
1268         (WebCore::Settings::setShouldPaintNativeControls): Deleted.
1269         * page/Settings.h:
1270         (WebCore::Settings::shouldPaintNativeControls): Deleted.
1271         * platform/win/ScrollbarThemeWin.cpp:
1272         (WebCore::ScrollbarTheme::nativeTheme):
1273         * rendering/RenderThemeWin.cpp:
1274         (WebCore::RenderTheme::themeForPage):
1275
1276 2015-02-27  Myles C. Maxfield  <mmaxfield@apple.com>
1277
1278         Add comment about CSS value name mangling
1279
1280         Unreviewed
1281
1282         * css/CSSParser.cpp:
1283         (WebCore::cssValueKeywordID):
1284
1285 2015-02-27  Antti Koivisto  <antti@apple.com>
1286
1287         Cache glyph widths to GlyphPages
1288         https://bugs.webkit.org/show_bug.cgi?id=142028
1289
1290         Reviewed by Andreas Kling.
1291
1292         Currently we have a separate cache in Font for glyph widths. In practice we always need
1293         the widths so we can just cache them in GlyphPages. This simplifies the code and removes
1294         a per-character hash lookup from WidthIterator.
1295
1296         * platform/graphics/Font.cpp:
1297         (WebCore::Font::Font):
1298         (WebCore::Font::initCharWidths):
1299         (WebCore::Font::platformGlyphInit):
1300         (WebCore::createAndFillGlyphPage):
1301         (WebCore::Font::computeWidthForGlyph):
1302
1303             Rename to make it clear this doesn't cache.
1304
1305         (WebCore::GlyphPage::setGlyphDataForIndex):
1306
1307             Initialize the width.
1308             This could go to GlyphPage.cpp if we had one.
1309
1310         * platform/graphics/Font.h:
1311         (WebCore::Font::glyphZeroWidth):
1312         (WebCore::Font::isZeroWidthSpaceGlyph):
1313         (WebCore::Font::zeroGlyph): Deleted.
1314         (WebCore::Font::setZeroGlyph): Deleted.
1315         (WebCore::Font::widthForGlyph): Deleted.
1316         * platform/graphics/FontCascade.cpp:
1317         (WebCore::offsetToMiddleOfGlyph):
1318         * platform/graphics/FontCascadeFonts.cpp:
1319         (WebCore::FontCascadeFonts::glyphDataForCharacter):
1320         * platform/graphics/GlyphPage.h:
1321         (WebCore::GlyphData::GlyphData):
1322
1323             Return width too as part of GlyphData.
1324
1325         (WebCore::GlyphPage::glyphDataForIndex):
1326         (WebCore::GlyphPage::setGlyphDataForCharacter):
1327         (WebCore::GlyphPage::setGlyphDataForIndex):
1328         (WebCore::GlyphPage::GlyphPage):
1329         * platform/graphics/WidthIterator.cpp:
1330         (WebCore::WidthIterator::advanceInternal):
1331
1332             No need to lookup width separately now.
1333
1334         * platform/graphics/mac/ComplexTextController.cpp:
1335         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
1336         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
1337         (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
1338         * rendering/mathml/RenderMathMLOperator.cpp:
1339         (WebCore::RenderMathMLOperator::advanceForGlyph):
1340         * rendering/svg/SVGTextRunRenderingContext.cpp:
1341         (WebCore::missingGlyphForFont):
1342         * svg/SVGFontData.cpp:
1343         (WebCore::SVGFontData::initializeFont):
1344
1345 2015-02-26  Alexey Proskuryakov  <ap@apple.com>
1346
1347         iOS build fix after r180717.
1348
1349         * Modules/webdatabase/DatabaseThread.cpp: (WebCore::DatabaseUnpauseTask::doPerformTask):
1350
1351 2015-02-26  Ryosuke Niwa  <rniwa@webkit.org>
1352
1353         isEditablePosition and related functions shouldn't move position out of table
1354         https://bugs.webkit.org/show_bug.cgi?id=129200
1355
1356         Reviewed by Darin Adler.
1357
1358         This patch removes the legacy editing position for elements display: table in its computed style.
1359         Previously, we used (table, 0) and (table, !0) to denote positions immediately before and after
1360         such an element for historical reasons. This forced us to update the style tree before computing
1361         the editability of a position because we have to check the editability of the position outside
1362         the element with display: table if the position was using such a legacy editing position.
1363         e.g. if a table was not editable (contenteditable=false), the position before the table (table, 0)
1364         should still be considered editable if the parent node of the table was editable.
1365
1366         This patch replaces such a legacy editing position by using modern position types:
1367         PositionIsBeforeAnchor and PositionIsAfterAnchor.
1368
1369         No new tests since there should be no change in the user perceived editing operations.
1370
1371         * dom/Position.cpp:
1372         (WebCore::Position::previous): Setup the node and the offset correctly when the original position's
1373         type is PositionIsBeforeAnchor. Also return a position before or after node when the node we found
1374         is "atomic" (e.g. input, img, br, etc...) or it's a table. This avoids creating a legacy editing
1375         position inside a table.
1376         (WebCore::Position::next): Ditto.
1377         (WebCore::Position::atStartOfTree): Use atFirstEditingPositionForNode, which takes care of all types
1378         of positions.
1379         (WebCore::Position::atEndOfTree): Ditto.
1380         (WebCore::Position::downstream): Return a position before a node instead of a legacy editing position
1381         for an atomic element or a table element as done in the equivalent code in Position::upstream.
1382         (WebCore::Position::isCandidate): Don't treat a position inside a table to be a candidate. e.g.
1383         (table, 1) when there are more than two children of the table.
1384
1385         * dom/PositionIterator.cpp:
1386         (WebCore::PositionIterator::operator Position): PositionIterator internally uses legacy editing
1387         positions. So convert it to a modern position by returning a position before or after a table here.
1388         * editing/ApplyBlockElementCommand.cpp:
1389         (WebCore::ApplyBlockElementCommand::formatSelection): Check that the unsplittable element we found
1390         is actually empty before executing the simple code path for an empty unsplittable element. Without
1391         this check, block formatting a table element will fail.
1392
1393         * editing/htmlediting.cpp:
1394         (WebCore::isEditablePosition): Use containerNode instead of deprecatedNode because the editability
1395         of a position before or after an element is determined by its parent, not the element itself.
1396         (WebCore::isAtUnsplittableElement): Ditto.
1397         (WebCore::isRichlyEditablePosition): Ditto. Removed the code that moved the starting node out of
1398         an element with display: table. This is the code removal for which this patch was made.
1399         (WebCore::editableRootForPosition): Ditto.
1400
1401 2015-02-26  Timothy Horton  <timothy_horton@apple.com>
1402
1403         Implement <attachment> element appearance on Mac
1404         https://bugs.webkit.org/show_bug.cgi?id=142023
1405
1406         Reviewed by Dean Jackson.
1407
1408         * css/CSSParser.cpp:
1409         (WebCore::isValidKeywordPropertyAndValue):
1410         * css/CSSPrimitiveValueMappings.h:
1411         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1412         * css/CSSValueKeywords.in:
1413         * css/html.css:
1414         (attachment):
1415         * platform/ThemeTypes.h:
1416         Add a new -webkit-appearance value, attachment.
1417
1418         * WebCore.xcodeproj/project.pbxproj:
1419         * html/HTMLAttachmentElement.cpp:
1420         (WebCore::HTMLAttachmentElement::setFile):
1421         Let the renderer know when the file changes (so it can relayout and repaint).
1422
1423         (WebCore::HTMLAttachmentElement::filePath):
1424         (WebCore::HTMLAttachmentElement::fileName):
1425         * html/HTMLAttachmentElement.h:
1426         Handy acccessors for the full path and the name of the file.
1427
1428         * platform/spi/mac/IconServicesSPI.h: Added.
1429         * platform/spi/mac/LaunchServicesSPI.h: Added.
1430         Add some IconServices and LaunchServices SPI headers.
1431
1432         * rendering/RenderAttachment.cpp:
1433         (WebCore::RenderAttachment::RenderAttachment):
1434         Don't have a default intrinsic size; we'll adjust in layout().
1435
1436         (WebCore::RenderAttachment::isSelected):
1437         (WebCore::RenderAttachment::isFocused):
1438         (WebCore::RenderAttachment::isSelectedOrFocused):
1439         Factor out from paintReplaced().
1440
1441         (WebCore::RenderAttachment::layout):
1442         Use RenderTheme to compute the intrinsic size of this attachment.
1443
1444         (WebCore::RenderAttachment::paintReplaced):
1445         Use RenderTheme to paint the attachment.
1446
1447         (WebCore::RenderAttachment::representedFileChanged):
1448         When the represented file changes, we need to recompute the intrinsic size and repaint.
1449
1450         * rendering/RenderTheme.cpp:
1451         (WebCore::RenderTheme::adjustStyle):
1452         (WebCore::RenderTheme::paint):
1453         (WebCore::RenderTheme::adjustAttachmentStyle):
1454         (WebCore::RenderTheme::paintAttachment):
1455         Plumb through the attachment appearance.
1456
1457         * rendering/RenderAttachment.h:
1458         * rendering/RenderTheme.h:
1459         (WebCore::RenderTheme::paintAttachment):
1460         (WebCore::RenderTheme::attachmentIntrinsicSize):
1461         * rendering/RenderThemeMac.h:
1462         * rendering/RenderThemeMac.mm:
1463         (WebCore::attachmentIconBackgroundColor):
1464         (WebCore::attachmentIconBorderColor):
1465         (WebCore::AttachmentLayout):
1466         AttachmentLayout lays out the innards of the RenderThemeMac attachment
1467         presentation: an icon with an optional bordered background, with a label
1468         underneath it with an optional background.
1469
1470         (WebCore::RenderThemeMac::attachmentIntrinsicSize):
1471         (WebCore::paintAttachmentIconBackground):
1472         (WebCore::paintAttachmentIcon):
1473         (WebCore::RenderThemeMac::paintAttachmentLabelBackground):
1474         (WebCore::RenderThemeMac::paintAttachmentLabel):
1475         (WebCore::RenderThemeMac::paintAttachment):
1476         Paint the attachment element. Paint the optional backgrounds (and swap
1477         out the text color) if the element is selected/focused.
1478
1479 2015-02-26  Doug Russell  <d_russell@apple.com>
1480
1481         AX: Expose caret browsing preference to accessibility API
1482         https://bugs.webkit.org/show_bug.cgi?id=141862
1483
1484         Reviewed by Chris Fleizach.
1485
1486         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).
1487         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.
1488
1489         Tests: platform/mac/accessibility/caret-browsing-arrow-nav.html
1490                platform/mac/accessibility/caret-browsing-attribute.html
1491                platform/mac/accessibility/caret-browsing-tab-selection.html
1492
1493         * accessibility/AccessibilityObject.h:
1494         * accessibility/mac/AccessibilityObjectMac.mm:
1495         (WebCore::AccessibilityObject::caretBrowsingEnabled):
1496         (WebCore::AccessibilityObject::setCaretBrowsingEnabled):
1497         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1498         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1499         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1500         (-[WebAccessibilityObjectWrapper accessibilityIsAttributeSettable:]):
1501         (-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
1502         (-[WebAccessibilityObjectWrapper _accessibilitySetTestValue:forAttribute:]):
1503
1504 2015-02-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1505
1506         Remove unnecessary create() factory functions
1507         https://bugs.webkit.org/show_bug.cgi?id=142039
1508
1509         Reviewed by Chris Dumez.
1510
1511         Clean up remaining JSCryptoKeySerializationJWK::create, HTMLMediaSession::create,
1512         and DatabaseUnpauseTask::create.
1513
1514         * Modules/webdatabase/DatabaseThread.cpp:
1515         (WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask):
1516         (WebCore::DatabaseThread::setPaused):
1517         (WebCore::DatabaseUnpauseTask::create): Deleted.
1518         * bindings/js/JSCryptoKeySerializationJWK.h:
1519         * bindings/js/JSSubtleCryptoCustom.cpp:
1520         (WebCore::importKey):
1521         * html/HTMLMediaElement.cpp:
1522         (WebCore::HTMLMediaElement::HTMLMediaElement):
1523         * html/HTMLMediaSession.cpp:
1524         (WebCore::HTMLMediaSession::create): Deleted.
1525         * html/HTMLMediaSession.h:
1526
1527 2015-02-26  Joseph Pecoraro  <pecoraro@apple.com>
1528
1529         Web Inspector: Save Console Evaluations into Command Line variables $1-$99 ($n)
1530         https://bugs.webkit.org/show_bug.cgi?id=142061
1531
1532         Reviewed by Timothy Hatcher.
1533
1534         * inspector/CommandLineAPIModuleSource.js:
1535         Replace $1-$4 "inspected objects" with $1-$99 "saved results".
1536
1537         * bindings/js/JSCommandLineAPIHostCustom.cpp:
1538         (WebCore::JSCommandLineAPIHost::inspectedObject):
1539         * inspector/CommandLineAPIHost.cpp:
1540         (WebCore::CommandLineAPIHost::CommandLineAPIHost):
1541         (WebCore::CommandLineAPIHost::InspectableObject::get):
1542         (WebCore::CommandLineAPIHost::addInspectedObject):
1543         (WebCore::CommandLineAPIHost::inspectedObject):
1544         (WebCore::CommandLineAPIHost::clearInspectedObjects): Deleted.
1545         * inspector/CommandLineAPIHost.h:
1546         * inspector/CommandLineAPIHost.idl:
1547         Since we now just save the single $0 inspected object, eliminate
1548         keeping track of a list of 5 values.
1549
1550 2015-02-26  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1551
1552         Remove unnecessary create() factory functions in CDMFoo, NamedNodeMap
1553         https://bugs.webkit.org/show_bug.cgi?id=141902
1554
1555         Reviewed by Darin Adler.
1556
1557         Create instance using std::make_unique<> in CDMFactory directly. To do that,
1558         CDMFactory uses lambdas. Additionally this patch removes NamedNodeMap::create() as well.
1559
1560         No new tests, no behavior changes.
1561
1562         * Modules/encryptedmedia/CDM.cpp:
1563         (WebCore::installedCDMFactories):
1564         * Modules/encryptedmedia/CDM.h:
1565         * Modules/encryptedmedia/CDMPrivateClearKey.h:
1566         (WebCore::CDMPrivateClearKey::CDMPrivateClearKey):
1567         (WebCore::CDMPrivateClearKey::create): Deleted.
1568         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
1569         (WebCore::CDMPrivateMediaPlayer::create): Deleted.
1570         * dom/Element.cpp:
1571         (WebCore::Element::attributes):
1572         * dom/NamedNodeMap.h:
1573         (WebCore::NamedNodeMap::NamedNodeMap):
1574         (WebCore::NamedNodeMap::create): Deleted.
1575         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
1576         (WebCore::CDMPrivateMediaSourceAVFObjC::create): Deleted.
1577
1578 2015-02-26  Andy Estes  <aestes@apple.com>
1579
1580         [Content Filtering] Move WebFilterEvaluator and NEFilterSource declarations to SPI headers
1581         https://bugs.webkit.org/show_bug.cgi?id=142062
1582
1583         Reviewed by Daniel Bates.
1584
1585         * WebCore.xcodeproj/project.pbxproj:
1586         * platform/mac/ContentFilterMac.mm:
1587         * platform/spi/cocoa/NEFilterSourceSPI.h: Added.
1588         * platform/spi/cocoa/WebFilterEvaluatorSPI.h: Added.
1589
1590 2015-02-26  Anders Carlsson  <andersca@apple.com>
1591
1592         Add API to remove all website data for the given data records
1593         https://bugs.webkit.org/show_bug.cgi?id=142060
1594
1595         Reviewed by Beth Dakin.
1596
1597         * loader/cache/MemoryCache.cpp:
1598         (WebCore::MemoryCache::removeResourcesWithOrigins):
1599         New function that removes all resources that match the set of origins in a given session.
1600
1601 2015-02-26  Chris Dumez  <cdumez@apple.com>
1602
1603         Rename DatabaseManager::manager() to DatabaseManager::singleton()
1604         https://bugs.webkit.org/show_bug.cgi?id=142054
1605
1606         Reviewed by Ryosuke Niwa.
1607
1608         Rename DatabaseManager::manager() to DatabaseManager::singleton() as
1609         per coding style and use WTF::NeverDestroyed.
1610
1611         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
1612         (WebCore::DOMWindowWebDatabase::openDatabase):
1613         * Modules/webdatabase/DatabaseBackendBase.cpp:
1614         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
1615         * Modules/webdatabase/DatabaseContext.cpp:
1616         (WebCore::DatabaseContext::DatabaseContext):
1617         (WebCore::DatabaseContext::~DatabaseContext):
1618         (WebCore::DatabaseContext::stopDatabases):
1619         (WebCore::DatabaseContext::databaseExceededQuota):
1620         * Modules/webdatabase/DatabaseManager.cpp:
1621         (WebCore::DatabaseManager::singleton):
1622         (WebCore::DatabaseManager::manager): Deleted.
1623         * Modules/webdatabase/DatabaseManager.h:
1624         (WebCore::DatabaseManager::~DatabaseManager): Deleted.
1625         * Modules/webdatabase/SQLTransactionClient.cpp:
1626         (WebCore::SQLTransactionClient::didExceedQuota):
1627         * history/PageCache.cpp:
1628         (WebCore::logCanCacheFrameDecision):
1629         (WebCore::PageCache::canCachePageContainingThisFrame):
1630         * loader/FrameLoader.cpp:
1631         (WebCore::FrameLoader::stopLoading):
1632
1633 2015-02-26  Csaba Osztrogonác  <ossy@webkit.org>
1634
1635         Fix the !ENABLE(GEOLOCATION) build after r180533
1636         https://bugs.webkit.org/show_bug.cgi?id=142053
1637
1638         Reviewed by Chris Dumez.
1639
1640         * Modules/geolocation/GeoNotifier.cpp:
1641         * Modules/geolocation/GeoNotifier.h:
1642
1643 2015-02-26  Dean Jackson  <dino@apple.com>
1644
1645         [iOS Media] incorrect front padding on time values
1646         https://bugs.webkit.org/show_bug.cgi?id=142027
1647         <rdar://problem/19960790>
1648
1649         Reviewed by Brent Fulgham.
1650
1651         My last commit was updating the OS X file,
1652         not the iOS file.
1653
1654         We don't want to prefix times with a "0".
1655
1656         * Modules/mediacontrols/mediaControlsApple.js:
1657         (Controller.prototype.formatTime):
1658         * Modules/mediacontrols/mediaControlsiOS.js:
1659         (ControllerIOS.prototype.formatTime):
1660
1661 2015-02-26  Mark Lam  <mark.lam@apple.com>
1662
1663         Rolling out r180602, r180608, r180613, r180617, r180671.
1664         <https://webkit.org/b/141990>
1665
1666         Not reviewed.
1667
1668         The r180602 solution does result in more work for GC when worker
1669         threads are in use.  Filip is uncomfortable with that.
1670         The EFL and GTK ports also seem to be unhappy with this change.
1671         Rolling out while we investigate.
1672
1673         * bindings/js/JSDOMWindowBase.cpp:
1674         (WebCore::JSDOMWindowBase::commonVM):
1675
1676 2015-02-26  Myles C. Maxfield  <mmaxfield@apple.com>
1677
1678         [Mac] [iOS] Parsing support for -apple-trailing-word
1679         https://bugs.webkit.org/show_bug.cgi?id=141939
1680
1681         Reviewed by Andreas Kling.
1682
1683         This patch implements initial parsing support for the -apple-trailing-word CSS property.
1684         This property has two possible (mutually exclusive) values: auto and
1685         -apple-partially-balanced. This property is inherited.
1686
1687         The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
1688
1689         This is an internal property that will allow us to control line breaking behavior for
1690         short paragraphs.
1691
1692         Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
1693         the new value must be implemented as -webkit-partially-balanced. Using the -apple-
1694         prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
1695         version.
1696
1697         Test: platform/mac/fast/text/trailing-word-parse.html
1698
1699         * Configurations/FeatureDefines.xcconfig:
1700         * css/CSSComputedStyleDeclaration.cpp:
1701         (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
1702         CSS value.
1703         * css/CSSParser.cpp:
1704         (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
1705         pair.
1706         (WebCore::isKeywordPropertyID): New property is a keyword property.
1707         (WebCore::CSSParser::parseValue): Use the keyword property codepath.
1708         * css/CSSPrimitiveValueMappings.h:
1709         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
1710         representation and CSS values.
1711         (WebCore::CSSPrimitiveValue::operator TrailingWord):
1712         * css/CSSPropertyNames.in: New property.
1713         * css/CSSValueKeywords.in: New value.
1714         * rendering/SimpleLineLayout.cpp:
1715         (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
1716         * rendering/style/RenderStyle.h: Getter, setter and initial value.
1717         * rendering/style/RenderStyleConstants.h: Internal data type.
1718         * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
1719         * rendering/style/StyleRareInheritedData.cpp: Update constructors and operators.
1720
1721 2015-02-26  Roger Fong  <roger_fong@apple.com>
1722
1723         Unreviewed. Fix a accidental deletion from r178674.
1724
1725         * html/canvas/WebGLRenderingContextBase.cpp:
1726         (WebCore::WebGLRenderingContextBase::create):
1727         Return the fake WebGL context.
1728
1729 2015-02-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
1730
1731         Cleanup RenderSVGResourceClipper class.
1732         https://bugs.webkit.org/show_bug.cgi?id=142032.
1733
1734         Reviewed by Darin Adler.
1735         
1736         This is a follow up for r180643: <http://trac.webkit.org/changeset/180643>.
1737         It includes cleanup for RenderSVGResourceClipper class.
1738
1739         * rendering/svg/RenderSVGResourceClipper.cpp:
1740         (WebCore::RenderSVGResourceClipper::applyClippingToContext):
1741         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
1742         * rendering/svg/RenderSVGResourceClipper.h: Change ClipperData to be a
1743         typedef instead of a class and rename it to ClipperMaskImage. The purpose
1744         of having it a class even though it includes only one member was because
1745         we wanted it to be WTF_MAKE_FAST_ALLOCATED. We do not need to allocate it
1746         as a separate object on the heap anymore.
1747         
1748         (WebCore::RenderSVGResourceClipper::addRendererToClipper): Instead of doing
1749         double hash table lookups by calling HashMap::contains() and then HashMap::get(),
1750         we can use HashMap::add() instead.
1751
1752 2015-02-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
1753
1754         Setting any of the <object> element plugin controlling attributes does not have any affect.
1755         https://bugs.webkit.org/show_bug.cgi?id=141936.
1756
1757         Reviewed by Zalan Bujtas.
1758
1759         When setting any of the <object> element plugin controlling attributes
1760         dynamically we need to mark the the element to be dirty by calling
1761         setNeedsStyleRecalc(), so it has to recreate its renderer when needed.
1762         
1763         Test: svg/as-object/svg-in-object-dynamic-attribute-change.html
1764
1765         * dom/Element.h: Delete unimplemented function.
1766         
1767         * html/HTMLObjectElement.cpp:
1768         (WebCore::HTMLObjectElement::parseAttribute): Dirty the element by calling
1769         setNeedsStyleRecalc() when one of the plugin controlling attributes gets
1770         changed. We have to clear the m_useFallbackContent because the attribute's
1771         new value might fix the object rendering.
1772         
1773         * html/HTMLObjectElement.h: Add a function to clear m_useFallbackContent.
1774         
1775         * html/HTMLPlugInImageElement.cpp:
1776         (WebCore::HTMLPlugInImageElement::willRecalcStyle): We might need to 
1777         reconstruct the object renderer in the image case. This can happen if the
1778         image was rendering fallback content and the attribute's new value fixes
1779         the object rendering.
1780
1781 2015-02-26  Brent Fulgham  <bfulgham@apple.com>
1782
1783         [Win] Make build logs more legible by reducing noise
1784         https://bugs.webkit.org/show_bug.cgi?id=142034
1785
1786         Reviewed by Alexey Proskuryakov.
1787
1788         Modify batch files, makefiles, and DOS commands to remove
1789         uninteresting/unhelpful output.
1790
1791         * WebCore.vcxproj/WebCoreGenerated.make:
1792         * WebCore.vcxproj/WebCorePreBuild.cmd:
1793         * WebCore.vcxproj/copyForwardingHeaders.cmd:
1794         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd:
1795
1796 2015-02-26  Michael Catanzaro  <mcatanzaro@igalia.com>
1797
1798         [FreeType] REGRESSION(r180563): Introduced crashes
1799         https://bugs.webkit.org/show_bug.cgi?id=142044
1800
1801         Reviewed by Martin Robinson.
1802
1803         No new tests, should be caught by any woff font test.
1804
1805         Use optionsPattern, not m_pattern, when m_pattern may be null.
1806
1807         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1808         (WebCore::FontPlatformData::initializeWithFontFace):
1809
1810 2015-02-26  Sergio Villar Senin  <svillar@igalia.com>
1811
1812         ASSERTION FAILED: !length.isUndefined() in WebCore::GridLength::GridLength
1813         https://bugs.webkit.org/show_bug.cgi?id=141645
1814
1815         Reviewed by Chris Dumez.
1816
1817         This bug has been here since r110484 but was uncovered by
1818         r180140. The problem r110484 was trying to fix was that
1819         CSSPrimitiveValue::convertToLength<Length> ended up calling
1820         CSSPrimitiveValue::computeLengthDouble() which was apparently
1821         dereferencing conversionData.style() and
1822         conversionData.rootStyle() pointers without checking them. That's
1823         why that fix added this condition to convertToLength():
1824
1825         isFontRelativeLength() && (!conversionData.style() || !conversionData.rootStyle())
1826
1827         which is not correct, because for the 4 possible font relative
1828         length types, 3 of them just use the style() pointer and the other
1829         one just uses rootStyle() which BTW could be NULL. This erroneous
1830         condition makes that function to return Length(Undefined) more
1831         often than it should.
1832
1833         From now on it only returns Length(Undefined) if the style()
1834         pointer is NULL and the font relative length type is one in the
1835         set (CSS_EMS, CSS_EXS, CSS_CHS);
1836
1837         Test: fast/css-grid-layout/grid-with-relative-font-length-crash.html
1838
1839         * css/CSSPrimitiveValue.h:
1840         * css/CSSPrimitiveValueMappings.h:
1841         (WebCore::CSSPrimitiveValue::convertingToLengthRequiresNonNullStyle):
1842         (WebCore::CSSPrimitiveValue::convertToLength):
1843
1844
1845 2015-02-26  Andreas Kling  <akling@apple.com>
1846
1847         [Cocoa] Prod libcache to drop caches in memory pressure relief handler.
1848         <https://webkit.org/b/142024>
1849         <rdar://problem/19966096>
1850
1851         Reviewed by Antti Koivisto.
1852
1853         libcache already listens to the OS memory pressure notifications, but we still
1854         need to manually request a cleanup when doing an iOS process suspension, or when
1855         simulating memory pressure.
1856
1857         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1858         (WebCore::MemoryPressureHandler::platformReleaseMemory): Call out to libcache's
1859         cache_simulate_memory_warning_event() to make sure that nonessential objects
1860         being kept alive by NSCaches get dropped when we need the memory.
1861
1862 2015-02-25  Zalan Bujtas  <zalan@apple.com>
1863
1864         Black line across screen on Adobe Illustrator detail page (non-retina only)
1865         https://bugs.webkit.org/show_bug.cgi?id=141866
1866
1867         Reviewed by Simon Fraser.
1868
1869         Phase is relative to the destination origin. We need to take location information into account
1870         while snapping so that the result is inline with the snapped destination rect.
1871         (location affects the snapped size.)
1872
1873         Test: fast/backgrounds/gradient-background-on-subpixel-position.html
1874
1875         * rendering/RenderBoxModelObject.cpp:
1876         (WebCore::pixelSnapBackgroundImageGeometryForPainting):
1877         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
1878
1879 2015-02-25  Brent Fulgham  <bfulgham@apple.com>
1880
1881         [Win] Use WEBCORE_EXPORT instead of Definition file
1882         https://bugs.webkit.org/show_bug.cgi?id=141734
1883
1884         Reviewed by Alex Christensen.
1885
1886         No change in functionality.
1887
1888         * WebCore.vcxproj/WebCore.vcxproj: Correct bad Precompiled header
1889         settings on certain files.
1890         * WebCore.vcxproj/WebCore.vcxproj.filters: Automatically updated
1891         by Visual Studio.
1892         * WebCore.vcxproj/WebCoreTestSupport.vcxproj: Ditto.
1893         * WebCore.vcxproj/WebCoreTestSupport.vcxproj.filters: Ditto.
1894         * WebCore.vcxproj/WebCoreTestSupportCommon.props: Added.
1895         * WebCore.vcxproj/WebCoreTestSupportDebug.props: Added.
1896         * WebCore.vcxproj/WebCoreTestSupportDebugWinCairo.props: Added.
1897         * WebCore.vcxproj/WebCoreTestSupportProduction.props: Added.
1898         * WebCore.vcxproj/WebCoreTestSupportRelease.props: Added.
1899         * WebCore.vcxproj/WebCoreTestSupportReleaseWinCairo.props: Added.
1900         * WebCorePrefix.h: Provide proper export definitions for Windows.
1901         * bindings/js/JSCustomXPathNSResolver.cpp: Add missing #include
1902         needed by the new export style.
1903         * bindings/js/JSDOMWindowBase.h: Export class since DRT needs
1904         access to parts of it.
1905         * bindings/js/ScriptCachedFrameData.cpp: Add missing #include
1906         needed by the new export style.
1907         * bindings/scripts/CodeGeneratorJS.pm: Use different export macro
1908         when generating WebCoreTestSupport files, so that we don't confuse
1909         the linker when WebCore.lib and WebCoreTestSupport.lib try to
1910         both export WEBCORE_EXPORT symbols.
1911         (ExportLabelForClass):
1912         (GenerateHeader):
1913         * bridge/jsc/BridgeJSC.cpp: Add missing #include needed by the new
1914         export style.
1915         * css/CSSParser.cpp: Ditto.
1916         * dom/Document.cpp: Ditto.
1917         * html/HTMLImageLoader.cpp: Ditto.
1918         * inspector/CommandLineAPIModule.cpp: Ditto.
1919         * inspector/PageDebuggerAgent.cpp: Ditto.
1920         * inspector/PageRuntimeAgent.cpp: Ditto.
1921         * inspector/WorkerRuntimeAgent.cpp: Ditto.
1922         * page/DOMWindow.cpp: Ditto.
1923         * page/DOMWindow.h: Export the destructor, as it is needed by
1924         DumpRenderTree (on Windows).
1925         * page/Page.cpp: Add missing #include needed by the new export style.
1926         * platform/Logging.h: Remove conflicting export declaration.
1927         * platform/PlatformExportMacros.h: Update for Windows use.
1928         * testing/Internals.cpp: Add missing #include needed by the new export style.
1929         * testing/Internals.h: Use WEBCORE_TESTSUPPORT_EXPORT for things that
1930         are supposed to be exported by WebCoreTestSupport, not WebCore.
1931         * testing/js/WebCoreTestSupport.cpp: Add missing #include needed by
1932         new export style.
1933         * testing/js/WebCoreTestSupportPrefix.cpp: Added.
1934         * testing/js/WebCoreTestSupportPrefix.h: Added.
1935         * xml/XMLHttpRequest.h: Export the destructor.
1936         * xml/XSLStyleSheetLibxslt.cpp: Add missing #include needed by the new
1937         export style.
1938         * xml/XSLTProcessorLibxslt.cpp: Ditto.
1939
1940 2015-02-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1941
1942         Remove unnecessary DatabaseFooTask::create
1943         https://bugs.webkit.org/show_bug.cgi?id=142002
1944
1945         Reviewed by Darin Adler.
1946
1947         DatabaseFooTask::create can be replaced with std::make_unique<>.
1948
1949         No new tests, no behavior changes.
1950
1951         * Modules/webdatabase/Database.cpp:
1952         (WebCore::Database::scheduleTransaction):
1953         (WebCore::Database::scheduleTransactionStep):
1954         (WebCore::Database::markAsDeletedAndClose):
1955         (WebCore::Database::closeImmediately):
1956         (WebCore::Database::tableNames):
1957         * Modules/webdatabase/DatabaseTask.h:
1958         (WebCore::DatabaseBackend::DatabaseCloseTask::create): Deleted.
1959         (WebCore::DatabaseBackend::DatabaseTransactionTask::create): Deleted.
1960         (WebCore::DatabaseBackend::DatabaseTableNamesTask::create): Deleted.
1961
1962 2015-02-25  Dean Jackson  <dino@apple.com>
1963
1964         [iOS Media] incorrect front padding on time values
1965         https://bugs.webkit.org/show_bug.cgi?id=142027
1966         <rdar://problem/19960790>
1967
1968         Reviewed by Brent Fulgham.
1969
1970         We don't want to prefix times with a "0".
1971
1972         * Modules/mediacontrols/mediaControlsApple.js:
1973         (Controller.prototype.formatTime):
1974
1975 2015-02-25  Chris Dumez  <cdumez@apple.com>
1976
1977         Make PublicURLManager suspendable
1978         https://bugs.webkit.org/show_bug.cgi?id=141977
1979         <rdar://problem/19923085>
1980
1981         Reviewed by Andreas Kling.
1982
1983         Make PublicURLManager suspendable by overriding ActiveDOMObject::canSuspend()
1984         and returning true. Nothing prevents suspending the PublicURLManager as its
1985         implementation never causes JS to be executed. No implementation for
1986         suspend() / resume() needs to be provided for the same reason.
1987
1988         The fact that PublicURLManager wasn't suspendable was preventing pages using
1989         URL.createObjectURL() from entering the PageCache. Baidu.com search results
1990         pages are using the API for example.
1991
1992         Test: fast/history/page-cache-createObjectURL.html
1993
1994         * html/PublicURLManager.cpp:
1995         (WebCore::PublicURLManager::canSuspend):
1996         * html/PublicURLManager.h:
1997
1998 2015-02-25  Zalan Bujtas  <zalan@apple.com>
1999
2000         Cleanup BackgroundImageGeometry class.
2001         https://bugs.webkit.org/show_bug.cgi?id=141997
2002
2003         Reviewed by Simon Fraser.
2004
2005         This patch attempts to improve RenderBoxModelObject::calculateBackgroundImageGeometry() readability by
2006         removing redundant code and making image geometry operations explicit. BackgroundImageGeometry
2007         becomes a read only class (with the exception of the clip() method).
2008
2009         No change in functionality.
2010
2011         * rendering/RenderBoxModelObject.cpp:
2012         (WebCore::BackgroundImageGeometry::BackgroundImageGeometry):
2013         (WebCore::BackgroundImageGeometry::pixelSnapBackgroundImageGeometryForPainting):
2014         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2015         (WebCore::BackgroundImageGeometry::setNoRepeatX): Deleted.
2016         (WebCore::BackgroundImageGeometry::setNoRepeatY): Deleted.
2017         (WebCore::BackgroundImageGeometry::useFixedAttachment): Deleted.
2018         (WebCore::BackgroundImageGeometry::clip): Deleted.
2019         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting): Deleted.
2020         * rendering/RenderBoxModelObject.h:
2021         (WebCore::BackgroundImageGeometry::clip):
2022         (WebCore::BackgroundImageGeometry::BackgroundImageGeometry): Deleted.
2023         (WebCore::BackgroundImageGeometry::setDestRect): Deleted.
2024         (WebCore::BackgroundImageGeometry::setPhase): Deleted.
2025         (WebCore::BackgroundImageGeometry::setPhaseX): Deleted.
2026         (WebCore::BackgroundImageGeometry::setPhaseY): Deleted.
2027         (WebCore::BackgroundImageGeometry::setTileSize): Deleted.
2028         (WebCore::BackgroundImageGeometry::setSpaceSize): Deleted.
2029         (WebCore::BackgroundImageGeometry::setHasNonLocalGeometry): Deleted.
2030
2031 2015-02-25  Said Abou-Hallawa  <sabouhallawa@apple.com>
2032
2033         Horizontal and vertical lines are clipped completely if clip-path is included in the tag but the referenced element is defined later.
2034         https://bugs.webkit.org/show_bug.cgi?id=141776.
2035
2036         Reviewed by Dean Jackson.
2037
2038         Tests: svg/clip-path/clip-path-line-use-before-defined-expected.svg
2039                svg/clip-path/clip-path-line-use-before-defined.svg
2040
2041         * rendering/svg/RenderSVGResourceClipper.cpp:
2042         (WebCore::RenderSVGResourceClipper::applyClippingToContext): Ensure the renderer
2043         is added to m_clipper if it does not exist. The same renderer might have been 
2044         added to m_clipper in resourceBoundingBox().
2045         
2046         (WebCore::RenderSVGResourceClipper::addRendererToClipper): Add the renderer to
2047         m_clipper if it does not exist. Return the associated ClipperData.
2048         
2049         (WebCore::RenderSVGResourceClipper::resourceBoundingBox): If the clipper is
2050         referenced before it is defined, add the renderer to m_clipper. While doing the
2051         layout() for the clipper, we can check if m_clipper has values or not. If it does
2052         have, we are going to mark the clipper for client invalidation which is done by
2053         the SVG root.
2054         
2055         * rendering/svg/RenderSVGResourceClipper.h:
2056         * rendering/svg/RenderSVGResourceContainer.h:
2057         (WebCore::RenderSVGResourceContainer::selfNeedsClientInvalidation): Define a 
2058         new function selfNeedsClientInvalidation() which controls marking the clipper 
2059         for client invalidation. In RenderSVGResourceClipper, override it so it checks
2060         m_clipper to force clients validation even if it the first time we do layout
2061         for this clipper.
2062
2063         * rendering/svg/RenderSVGResourceContainer.cpp:
2064         (WebCore::RenderSVGResourceContainer::layout): Call the virtual function
2065         selfNeedsClientInvalidation() to check whether we need to mark the clipper for
2066         client invalidation.
2067         
2068         * svg/SVGElement.cpp: Delete unneeded header file.
2069
2070 2015-02-25  peavo@outlook.com  <peavo@outlook.com>
2071
2072         [WinCairo] WinLauncher is not starting on Vista.
2073         https://bugs.webkit.org/show_bug.cgi?id=141905
2074
2075         Reviewed by Alex Christensen.
2076
2077         We have to soft link with Media Foundation functions to be able
2078         to start on Vista and WinXP.
2079
2080         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2081         (WebCore::MediaPlayerPrivateMediaFoundation::createSession):
2082         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
2083         (WebCore::MediaPlayerPrivateMediaFoundation::startCreateMediaSource):
2084         (WebCore::MediaPlayerPrivateMediaFoundation::endGetEvent):
2085         (WebCore::MediaPlayerPrivateMediaFoundation::createTopologyFromSource):
2086         (WebCore::MediaPlayerPrivateMediaFoundation::createOutputNode):
2087         (WebCore::MediaPlayerPrivateMediaFoundation::createSourceStreamNode):
2088         (WebCore::MediaPlayerPrivateMediaFoundation::onTopologySet):
2089
2090 2015-02-25  Beth Dakin  <bdakin@apple.com>
2091
2092         REGRESSION (r180018 ): Holding a rubber-band in place can get stuck
2093         https://bugs.webkit.org/show_bug.cgi?id=142020
2094         -and corresponding-
2095         rdar://problem/19945216
2096
2097         Reviewed by Tom Horton.
2098
2099         It was a mistaken assumption that it was necessary to return false in the zero-
2100         delta case. That is clearly conceptually wrong since false represents the DOM 
2101         doing something special with the event, which is clearly not the case if we never 
2102         even send the event to the DOM. Returning true will allow the rest of the 
2103         scrolling machinery the ability to handle the event.
2104         * dom/Element.cpp:
2105         (WebCore::Element::dispatchWheelEvent):
2106
2107 2015-02-25  Ryosuke Niwa  <rniwa@webkit.org>
2108
2109         HTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for contentEditableAttr
2110         https://bugs.webkit.org/show_bug.cgi?id=142003
2111
2112         Reviewed by Sam Weinig.
2113
2114         Utilized contentEditableType to reduce the code duplication.
2115
2116         * html/HTMLElement.cpp:
2117         (WebCore::contentEditableType): Moved and added a version that takes AtomicString.
2118         (WebCore::HTMLElement::collectStyleForPresentationAttribute):
2119
2120 2015-02-25  Sergio Villar Senin  <svillar@igalia.com>
2121
2122         [CSS Grid Layout] Tracks growing beyond limits when they should not
2123         https://bugs.webkit.org/show_bug.cgi?id=140883
2124
2125         Reviewed by Darin Adler.
2126
2127         Our track sizing algorithm implementation incorrectly grew some
2128         tracks beyond limits when handling min-content and max-content
2129         base sizes. In those cases we should only grow "any affected track
2130         that happens to also have an intrinsic max track sizing function"
2131         or all of them if there are none.
2132
2133         The problem was that we're using a vector of indexes pointing to
2134         the vector with the list of affected tracks. Those indexes become
2135         easily incorrect because the first thing we do in
2136         distributeSpaceToTracks() is to sort the vector with the affected
2137         tracks by growth potential.
2138
2139         Instead of that we now pass a vector with pointers to the list of
2140         tracks allowed to grow over the limits. The size changes are now
2141         directly stored in the GridTracks (it's called plannedSize)
2142         instead of in a separate vector, so we don't need to worry about
2143         tracks being rearranged (and we also get rid of the ugly vector of
2144         indexes pointing to another vector).
2145
2146         * rendering/RenderGrid.cpp:
2147         (WebCore::GridTrack::plannedSize): New member with getter/setter.
2148         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
2149         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
2150         Pass a setXXX() function instead of a growXXX() one to ForItems().
2151         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
2152         Renamed additionalBreadthSpace to extraSpace which is the term
2153         used by specs.
2154         (WebCore::RenderGrid::distributeSpaceToTracks): Use GridTrack's
2155         plannedSize instead of the old distribution vector.
2156         (WebCore::GridTrack::growBaseSize): Deleted.
2157         (WebCore::GridTrack::growGrowthLimit): Deleted.
2158         * rendering/RenderGrid.h:
2159
2160 2015-02-25  Joanmarie Diggs  <jdiggs@igalia.com>
2161
2162         AX: Implement support for ARIA 1.1 'searchbox' role
2163         https://bugs.webkit.org/show_bug.cgi?id=142004
2164
2165         Reviewed by Chris Fleizach.
2166
2167         Add a new accessible SearchFieldRole to handle both the ARIA role
2168         and the "search" input type.
2169
2170         No new tests. Instead, added a new test case to roles-exposed.html
2171         for the mapping, and updated roles-computedRoleString.html because
2172         there is now a one-to-one mapping between the "search" input type
2173         and an ARIA role.
2174
2175         * accessibility/AccessibilityNodeObject.cpp:
2176         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
2177         (WebCore::AccessibilityNodeObject::isSearchField):
2178         * accessibility/AccessibilityObject.cpp:
2179         (WebCore::AccessibilityObject::isARIATextControl):
2180         (WebCore::AccessibilityObject::isARIAInput):
2181         (WebCore::initializeRoleMap):
2182         * accessibility/AccessibilityObject.h:
2183         * accessibility/AccessibilityRenderObject.cpp:
2184         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2185         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2186         (atkRole):
2187         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2188         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
2189         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
2190         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
2191         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2192         (createAccessibilityRoleMap):
2193
2194 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
2195
2196         Clarify some resizing terminology in ScrollView/FrameView
2197         https://bugs.webkit.org/show_bug.cgi?id=141996
2198
2199         Reviewed by Zalan Bujtas.
2200
2201         ScrollableArea/ScrollView/FrameView had some confusing terminology around
2202         contentsResized/visibleContentsResized/fixedLayoutSizeChanged.
2203         
2204         Clarify this by distinguishing between:
2205         1. Available size changes because of
2206             i) non-overlay scrollbar presence
2207            ii) ScrollableArea frame change
2208         2. Removing fixedLayoutSizeChanged() and just treating it like an
2209            available size change.
2210            
2211         contentsResized() is relegated to simply being a hook that allows Mac to
2212         flash overlay scrollbars.
2213         
2214         The confusingly named visibleContentsResized() is now updateContentsSize(),
2215         and is the way that a ScrollableArea tells its subclasss that it should recompute
2216         the size of the contents (i.e. do a layout).
2217
2218         * page/FrameView.cpp:
2219         (WebCore::FrameView::setContentsSize): No longer mysteriously skip the
2220         FrameView implementation of contentsResized(), which used to do a setNeedsLayout()
2221         which we didn't want to do from setContentsSize(), which itself happens as a result of layout.
2222         (WebCore::FrameView::adjustViewSize): Whitespace.
2223         (WebCore::FrameView::layout): Ditto.
2224         (WebCore::FrameView::availableContentSizeChanged): Called on frame size change, or scrollbar
2225         change.
2226         (WebCore::FrameView::updateContentsSize): This actually does the layout.
2227         (WebCore::FrameView::scrollbarStyleChanged): Always call the base class;  ScrollView::scrollbarStyleChanged
2228         will bail if not a forced update.
2229         (WebCore::FrameView::setCustomFixedPositionLayoutRect): Forces a layout via updateContentsSize() now.
2230         (WebCore::FrameView::contentsResized): Deleted.
2231         (WebCore::FrameView::fixedLayoutSizeChanged): Deleted.
2232         (WebCore::FrameView::visibleContentsResized): Deleted.
2233         * page/FrameView.h:
2234         * platform/ScrollView.cpp:
2235         (WebCore::ScrollView::setFixedLayoutSize): Calls availableContentSizeChanged() now.
2236         (WebCore::ScrollView::setUseFixedLayout): Ditto.
2237         (WebCore::ScrollView::availableContentSizeChanged): Update scrollbars if that's not
2238         the reason we are being called.
2239         (WebCore::ScrollView::updateScrollbars): contentsResized() was the thing that caused setNeedsLayout();
2240         replace it with availableContentSizeChanged(). visibleContentsResized() did the layout, and
2241         replace with updateContentsSize().
2242         (WebCore::ScrollView::setFrameRect): Call availableContentSizeChanged() now. This takes care of
2243         updating scrollbars, so no need to explicitly do that.
2244         (WebCore::ScrollView::scrollbarStyleChanged): Call the base class.
2245         (WebCore::ScrollView::fixedLayoutSizeChanged): Deleted.
2246         * platform/ScrollView.h:
2247         * platform/ScrollableArea.cpp:
2248         (WebCore::ScrollableArea::availableContentSizeChanged): Call scrollAnimator->contentsResized()
2249         to flash the scrollbars.
2250         (WebCore::ScrollableArea::scrolledToRight):
2251         (WebCore::ScrollableArea::scrollbarStyleChanged): Call availableContentSizeChanged() since
2252         scrollbar style affects available space.
2253         * platform/ScrollableArea.h:
2254         (WebCore::ScrollableArea::updateContentsSize):
2255         (WebCore::ScrollableArea::scrollbarStyleChanged): Deleted.
2256
2257 2015-02-24  Ryosuke Niwa  <rniwa@webkit.org>
2258
2259         Unreviewed Mavericks build attempt fix after r180609.
2260
2261         * platform/graphics/mac/GraphicsContext3DMac.mm:
2262         (WebCore::GraphicsContext3D::GraphicsContext3D):
2263         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary):
2264
2265 2015-02-19  Roger Fong  <roger_fong@apple.com>
2266
2267         WebGL: Destroy the GLContext if a GPU restart has been detected.
2268         https://bugs.webkit.org/show_bug.cgi?id=141567.
2269         <rdar://problem/18507496>
2270
2271         Reviewed by Dean Jackson.
2272
2273         * html/canvas/WebGLRenderingContextBase.cpp:
2274         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
2275         * platform/graphics/GraphicsContext3D.h:
2276         (WebCore::GraphicsContext3D::setWebGLContext): 
2277         Keep track of which WebGLRenderingContext is associated with the current GraphicsContext3D.
2278         * platform/graphics/mac/GraphicsContext3DMac.mm:
2279         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): Helper method to check GPU status.
2280         (WebCore::GraphicsContext3D::GraphicsContext3D): 
2281         Don’t immediately abort the GPU process when the restart status is kCGLCPGPURestartStatusBlacklisted.
2282         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2283         (WebCore::GraphicsContext3D::forceContextLost): 
2284         Force the WebGLRenderingContext to be lost.
2285         (WebCore::GraphicsContext3D::drawArrays): Check GPU status after calling drawArrays.
2286         (WebCore::GraphicsContext3D::drawElements): Check GPU status after calling drawElements.
2287         * WebCore.xcodeproj/project.pbxproj: Add SPI header for iOS.
2288         * platform/spi/ios/OpenGLESSPI.h: Added.
2289
2290 2015-02-24  Stephanie Lewis  <slewis@apple.com>
2291
2292         Unreviewed ios build fix after http://trac.webkit.org/changeset/180602.
2293
2294         * bindings/js/JSDOMWindowBase.cpp:
2295         (WebCore::JSDOMWindowBase::commonVM):
2296
2297 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
2298
2299         Use an enum for scrollbar style
2300         https://bugs.webkit.org/show_bug.cgi?id=141985
2301
2302         Reviewed by Beth Dakin.
2303
2304         Switch to an enum class for the scrollbar style (normal or overlay).
2305
2306         * page/ChromeClient.h:
2307         * page/FrameView.cpp:
2308         (WebCore::FrameView::scrollbarStyleChanged):
2309         * page/FrameView.h:
2310         * platform/ScrollTypes.h:
2311         * platform/ScrollView.cpp:
2312         (WebCore::ScrollView::scrollbarStyleChanged):
2313         * platform/ScrollView.h:
2314         * platform/ScrollableArea.h:
2315         (WebCore::ScrollableArea::scrollbarStyleChanged):
2316         * platform/mac/ScrollAnimatorMac.mm:
2317         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
2318
2319 2015-02-24  Commit Queue  <commit-queue@webkit.org>
2320
2321         Unreviewed, rolling out r180599.
2322         https://bugs.webkit.org/show_bug.cgi?id=141998
2323
2324         Lots of new test failures (Requested by smfr on #webkit).
2325
2326         Reverted changeset:
2327
2328         "Parsing support for -webkit-trailing-word"
2329         https://bugs.webkit.org/show_bug.cgi?id=141939
2330         http://trac.webkit.org/changeset/180599
2331
2332 2015-02-24  Sam Weinig  <sam@webkit.org>
2333
2334         [Attachment] Give <attachment> elements an underlying File
2335         https://bugs.webkit.org/show_bug.cgi?id=141993
2336
2337         Reviewed by Tim Horton.
2338
2339         - Add a JS subclass for attachments so that <attachment>s are
2340           instances of HTMLAttachmentElement rather than HTMLElement.
2341         - Give HTMLAttachmentElements an underlying File that they
2342           are the representation of. Expose it via a new 'file' property.
2343         - Expose a new Internals function called window.internals.createFile(url)
2344           that allows creating File objects for testing.
2345
2346         * CMakeLists.txt:
2347         * DerivedSources.cpp:
2348         * DerivedSources.make:
2349         * WebCore.vcxproj/WebCore.vcxproj:
2350         * WebCore.vcxproj/WebCore.vcxproj.filters:
2351         * WebCore.xcodeproj/project.pbxproj:
2352         * fileapi/File.h:
2353         * html/HTMLAttachmentElement.cpp:
2354         (WebCore::HTMLAttachmentElement::~HTMLAttachmentElement):
2355         (WebCore::HTMLAttachmentElement::file):
2356         (WebCore::HTMLAttachmentElement::setFile):
2357         * html/HTMLAttachmentElement.h:
2358         * html/HTMLAttachmentElement.idl: Added.
2359         * html/HTMLTagNames.in:
2360         * testing/Internals.cpp:
2361         (WebCore::Internals::createFile):
2362         * testing/Internals.h:
2363         * testing/Internals.idl:
2364
2365 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
2366
2367         AX: Implement support for ARIA 1.1 'switch' role
2368         https://bugs.webkit.org/show_bug.cgi?id=141986
2369
2370         Reviewed by Chris Fleizach.
2371
2372         Map the role to ATK_ROLE_TOGGLE_BUTTON for Gtk and Efl; on the Mac, to
2373         AXCheckBox with a subrole of AXSwitch. Ensure it looks and acts like a
2374         widget to accessibility APIs (supports and emits notifications when
2375         toggled, doesn't have children, exposes a name and description when
2376         provided).
2377
2378         Tests: accessibility/aria-switch-checked.html
2379                accessibility/aria-switch-sends-notification.html
2380                accessibility/aria-switch-text.html
2381
2382         * accessibility/AccessibilityNodeObject.cpp:
2383         (WebCore::AccessibilityNodeObject::canHaveChildren):
2384         (WebCore::AccessibilityNodeObject::isChecked):
2385         (WebCore::AccessibilityNodeObject::visibleText):
2386         (WebCore::AccessibilityNodeObject::title):
2387         * accessibility/AccessibilityObject.cpp:
2388         (WebCore::AccessibilityObject::isARIAInput):
2389         (WebCore::AccessibilityObject::actionVerb):
2390         (WebCore::initializeRoleMap):
2391         (WebCore::AccessibilityObject::supportsChecked):
2392         (WebCore::AccessibilityObject::checkboxOrRadioValue):
2393         * accessibility/AccessibilityObject.h:
2394         (WebCore::AccessibilityObject::isSwitch):
2395         * accessibility/atk/AXObjectCacheAtk.cpp:
2396         (WebCore::AXObjectCache::postPlatformNotification):
2397         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2398         (atkRole):
2399         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2400         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
2401         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
2402         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
2403         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2404         (createAccessibilityRoleMap):
2405         (-[WebAccessibilityObjectWrapper subrole]):
2406         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2407
2408 2015-02-24  Myles C. Maxfield  <mmaxfield@apple.com>
2409
2410         [Mac] [iOS] Parsing support for -apple-trailing-word
2411         https://bugs.webkit.org/show_bug.cgi?id=141939
2412
2413         Reviewed by Andreas Kling.
2414
2415         This patch implements initial parsing support for the -apple-trailing-word CSS property.
2416         This property has two possible (mutually exclusive) values: auto and
2417         -apple-partially-balanced. This property is inherited.
2418
2419         The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
2420
2421         This is an internal property that will allow us to control line breaking behavior for
2422         short paragraphs.
2423
2424         Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
2425         the new value must be implemented as -webkit-partially-balanced. Using the -apple-
2426         prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
2427         version.
2428
2429         Test: platform/mac/fast/text/trailing-word-parse.html
2430
2431         * Configurations/FeatureDefines.xcconfig:
2432         * css/CSSComputedStyleDeclaration.cpp:
2433         (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
2434         CSS value.
2435         * css/CSSParser.cpp:
2436         (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
2437         pair.
2438         (WebCore::isKeywordPropertyID): New property is a keyword property.
2439         (WebCore::CSSParser::parseValue): Use the keyword property codepath.
2440         * css/CSSPrimitiveValueMappings.h:
2441         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
2442         representation and CSS values.
2443         (WebCore::CSSPrimitiveValue::operator TrailingWord):
2444         * css/CSSPropertyNames.in: New property.
2445         * css/CSSValueKeywords.in: New value.
2446         * rendering/SimpleLineLayout.cpp:
2447         (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
2448         * rendering/style/RenderStyle.h: Getter, setter and initial value.
2449         * rendering/style/RenderStyleConstants.h: Internal data type.
2450         * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
2451
2452 2015-02-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2453
2454         Remove DecodingTask::create and DatabaseOpenTask::create
2455         https://bugs.webkit.org/show_bug.cgi?id=141966
2456
2457         Reviewed by Anders Carlsson.
2458
2459         These create() factory functions are redundant. We can use std::make_unique<> directly.
2460
2461         No new tests, no behavior changes.
2462
2463         * Modules/webaudio/AsyncAudioDecoder.cpp:
2464         (WebCore::AsyncAudioDecoder::decodeAsync):
2465         (WebCore::AsyncAudioDecoder::DecodingTask::create): Deleted.
2466         * Modules/webaudio/AsyncAudioDecoder.h:
2467         * Modules/webdatabase/Database.cpp:
2468         (WebCore::Database::openAndVerifyVersion):
2469         * Modules/webdatabase/DatabaseTask.h:
2470         (WebCore::DatabaseBackend::DatabaseOpenTask::create): Deleted.
2471
2472 2015-02-24  Commit Queue  <commit-queue@webkit.org>
2473
2474         Unreviewed, rolling out r180578.
2475         https://bugs.webkit.org/show_bug.cgi?id=141992
2476
2477         Broke scrolling in Inspector Console. (Requested by JoePeck on
2478         #webkit).
2479
2480         Reverted changeset:
2481
2482         "[Mac] WebKit abandons overlay scrollbar CALayers."
2483         https://bugs.webkit.org/show_bug.cgi?id=141943
2484         http://trac.webkit.org/changeset/180578
2485
2486 2015-02-24  Dean Jackson  <dino@apple.com>
2487
2488         [ios Media] the inline controls are visible after pressing Done on iPhone
2489         https://bugs.webkit.org/show_bug.cgi?id=141987
2490         <rdar://problem/19944110>
2491
2492         Reviewed by Beth Dakin.
2493
2494         When exiting out of a playing video, we should show the
2495         start playback button if we don't allow inline media
2496         (such as on iPhone).
2497
2498         * Modules/mediacontrols/mediaControlsiOS.js:
2499         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): Test for
2500         allowsInline as well.
2501
2502 2015-02-24  Zalan Bujtas  <zalan@apple.com>
2503
2504         Pass FillLayer reference instead of pointer to RenderBoxModelObject::calculateBackgroundImageGeometry.
2505         https://bugs.webkit.org/show_bug.cgi?id=141982
2506
2507         Reviewed by Simon Fraser.
2508
2509         There should always be a valid FillLayer.
2510
2511         No change in functionality.
2512
2513         * rendering/RenderBox.cpp:
2514         (WebCore::RenderBox::getBackgroundPaintedExtent):
2515         (WebCore::RenderBox::maskClipRect):
2516         (WebCore::RenderBox::repaintLayerRectsForImage):
2517         * rendering/RenderBoxModelObject.cpp:
2518         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2519         (WebCore::RenderBoxModelObject::calculateFillTileSize):
2520         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2521         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
2522         * rendering/RenderBoxModelObject.h:
2523
2524 2015-02-24  Dean Jackson  <dino@apple.com>
2525
2526         [iOS Media] Be specific about which document to use for the timeline background canvas
2527         https://bugs.webkit.org/show_bug.cgi?id=141981
2528
2529         Reviewed by Eric Carlson.
2530
2531         In some cases, especially with nested iframes, the document
2532         reference for the shadow DOM might not be the one used
2533         to create a -webkit-canvas context for rendering via CSS.
2534         Explicitly get the context from the video's owner
2535         document.
2536
2537         There is still a bug here:
2538         https://bugs.webkit.org/show_bug.cgi?id=141983
2539
2540         * Modules/mediacontrols/mediaControlsiOS.js:
2541         (ControllerIOS.prototype.drawTimelineBackground):
2542
2543 2015-02-24  Zalan Bujtas  <zalan@apple.com>
2544
2545         Remove unused BackgroundImageGeometry::m_destOrigin
2546         https://bugs.webkit.org/show_bug.cgi?id=141980
2547
2548         Reviewed by Simon Fraser.
2549
2550         Remove BackgroundImageGeometry::m_destOrigin and its dependencies.
2551         They are not used at all.
2552
2553         No change in functionality.
2554
2555         * rendering/RenderBoxModelObject.cpp:
2556         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2557         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
2558         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2559         (WebCore::BackgroundImageGeometry::relativePhase): Deleted.
2560         * rendering/RenderBoxModelObject.h:
2561         (WebCore::BackgroundImageGeometry::destOrigin): Deleted.
2562         (WebCore::BackgroundImageGeometry::setDestOrigin): Deleted.
2563         * rendering/svg/RenderSVGResourceMasker.cpp:
2564         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
2565
2566 2015-02-24  Zalan Bujtas  <zalan@apple.com>
2567
2568         RenderBoxModelObject::calculateBackgroundImageGeometry should return BackgroundImageGeometry.
2569         https://bugs.webkit.org/show_bug.cgi?id=141979
2570
2571         Reviewed by Simon Fraser.
2572
2573         No change in functionality.
2574
2575         * rendering/RenderBox.cpp:
2576         (WebCore::RenderBox::getBackgroundPaintedExtent):
2577         (WebCore::RenderBox::maskClipRect):
2578         (WebCore::RenderBox::repaintLayerRectsForImage):
2579         * rendering/RenderBoxModelObject.cpp:
2580         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2581         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2582         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
2583         * rendering/RenderBoxModelObject.h:
2584
2585 2015-02-24  Zalan Bujtas  <zalan@apple.com>
2586
2587         Switch BackgroundImageGeometry's m_phase from LayoutPoint to LayoutSize.
2588         https://bugs.webkit.org/show_bug.cgi?id=141972
2589
2590         Reviewed by Simon Fraser.
2591
2592         Image geometry's phase represents distance.
2593
2594         No change in functionality.
2595
2596         * WebCore.order:
2597         * platform/graphics/GraphicsLayer.h:
2598         (WebCore::GraphicsLayer::setContentsTilePhase):
2599         (WebCore::GraphicsLayer::contentsTilePhase):
2600         * platform/graphics/texmap/TextureMapperLayer.cpp:
2601         (WebCore::TextureMapperLayer::computePatternTransformIfNeeded):
2602         (WebCore::TextureMapperLayer::setContentsTilePhase):
2603         * platform/graphics/texmap/TextureMapperLayer.h:
2604         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2605         (WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
2606         * rendering/RenderBoxModelObject.cpp:
2607         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2608         (WebCore::BackgroundImageGeometry::setNoRepeatX):
2609         (WebCore::BackgroundImageGeometry::setNoRepeatY):
2610         (WebCore::BackgroundImageGeometry::useFixedAttachment):
2611         (WebCore::BackgroundImageGeometry::relativePhase):
2612         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
2613         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
2614         * rendering/RenderBoxModelObject.h:
2615         (WebCore::BackgroundImageGeometry::phase):
2616         (WebCore::BackgroundImageGeometry::setPhase):
2617         (WebCore::BackgroundImageGeometry::setPhaseX):
2618         (WebCore::BackgroundImageGeometry::setPhaseY):
2619         * rendering/RenderLayerBacking.cpp:
2620         (WebCore::RenderLayerBacking::resetContentsRect):
2621         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
2622         * rendering/svg/RenderSVGResourceMasker.cpp:
2623         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
2624
2625 2015-02-24  Andreas Kling  <akling@apple.com>
2626
2627         [Mac] WebKit abandons overlay scrollbar CALayers.
2628         <https://webkit.org/b/141943>
2629         <rdar://problem/19932199>
2630
2631         Reviewed by Beth Dakin.
2632
2633         * platform/mac/ScrollAnimatorMac.mm:
2634         (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
2635         Use NSAnimationNonblockingThreaded to ensure that NSAnimations get cleaned up after they finish.
2636         The animation was indirectly retaining the overlay scrollbar's CALayer, causing significant
2637         amounts of abandoned memory to accumulate over time.
2638
2639 2015-02-24  Anders Carlsson  <andersca@apple.com>
2640
2641         Implement more of the data fetching API
2642         https://bugs.webkit.org/show_bug.cgi?id=141975
2643
2644         Reviewed by Andreas Kling.
2645
2646         Add API for getting origins in a given session that has cached data.
2647
2648         * loader/cache/MemoryCache.cpp:
2649         (WebCore::MemoryCache::originsWithCache):
2650
2651 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
2652
2653         Use nullptr in more places in FrameView, RenderView, RenderObject
2654         https://bugs.webkit.org/show_bug.cgi?id=141974
2655
2656         Reviewed by Zalan Bujtas.
2657
2658         0 -> nullptr in FrameView.h/cpp, RenderView.h/cpp, RenderObject.h/cpp.
2659         
2660         Rename FrameView::m_deferSetNeedsLayouts to FrameView::m_deferSetNeedsLayoutCount
2661         to make it more clear that it's a count.
2662
2663         * page/FrameView.cpp:
2664         (WebCore::FrameView::FrameView):
2665         (WebCore::FrameView::reset):
2666         (WebCore::FrameView::setContentsSize):
2667         (WebCore::FrameView::calculateScrollbarModesForLayout):
2668         (WebCore::FrameView::layerForScrolling):
2669         (WebCore::FrameView::layerForHorizontalScrollbar):
2670         (WebCore::FrameView::layerForVerticalScrollbar):
2671         (WebCore::FrameView::layerForScrollCorner):
2672         (WebCore::FrameView::tiledBacking):
2673         (WebCore::FrameView::scrollLayerID):
2674         (WebCore::FrameView::layerForOverhangAreas):
2675         (WebCore::FrameView::setWantsLayerForTopOverHangArea):
2676         (WebCore::FrameView::setWantsLayerForBottomOverHangArea):
2677         (WebCore::FrameView::hasCompositedContentIncludingDescendants):
2678         (WebCore::FrameView::layoutRoot):
2679         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
2680         (WebCore::FrameView::layout):
2681         (WebCore::FrameView::hostWindow):
2682         (WebCore::FrameView::scheduleRelayout):
2683         (WebCore::FrameView::scheduleRelayoutOfSubtree):
2684         (WebCore::FrameView::needsLayout):
2685         (WebCore::FrameView::setNeedsLayout):
2686         (WebCore::FrameView::enclosingScrollableArea):
2687         (WebCore::FrameView::parentFrameView):
2688         (WebCore::FrameView::paintControlTints):
2689         (WebCore::FrameView::adjustPageHeightDeprecated):
2690         (WebCore::FrameView::axObjectCache):
2691         * page/FrameView.h:
2692         * rendering/RenderObject.cpp:
2693         (WebCore::RenderObject::RenderObject):
2694         (WebCore::RenderObject::nextInPreOrderAfterChildren):
2695         (WebCore::RenderObject::previousInPreOrder):
2696         (WebCore::RenderObject::firstLeafChild):
2697         (WebCore::RenderObject::lastLeafChild):
2698         (WebCore::RenderObject::traverseNext):
2699         (WebCore::RenderObject::firstLineBlock):
2700         (WebCore::RenderObject::containerForRepaint):
2701         (WebCore::RenderObject::showRenderSubTreeAndMark):
2702         (WebCore::RenderObject::localToAbsolute):
2703         (WebCore::RenderObject::container):
2704         * rendering/RenderObject.h:
2705         (WebCore::RenderObject::virtualContinuation):
2706         (WebCore::RenderObject::node):
2707         (WebCore::RenderObject::nonPseudoNode):
2708         (WebCore::RenderObject::localToAbsoluteQuad):
2709         (WebCore::RenderObject::absoluteQuads):
2710         (WebCore::RenderObject::absoluteClippedOverflowRect):
2711         (WebCore::RenderObject::outlineBoundsForRepaint):
2712         (WebCore::RenderObject::computeAbsoluteRepaintRect):
2713         (WebCore::RenderObject::selectionRect):
2714         (WebCore::RenderObject::imageChanged):
2715         (WebCore::RenderObject::addFocusRingRects):
2716         (WebCore::RenderObject::absoluteOutlineBounds):
2717         * rendering/RenderView.cpp:
2718         (WebCore::SelectionIterator::next):
2719         (WebCore::RenderView::RenderView):
2720         (WebCore::RenderView::mapLocalToContainer):
2721         (WebCore::RenderView::pushMappingToContainer):
2722         (WebCore::RenderView::computeRectForRepaint):
2723         (WebCore::rendererAfterPosition):
2724         (WebCore::RenderView::splitSelectionBetweenSubtrees):
2725         (WebCore::RenderView::rootBackgroundIsEntirelyFixed):
2726         * rendering/RenderView.h:
2727
2728 2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
2729
2730         REGRESSION(r179429): Can't type comments in Facebook
2731         https://bugs.webkit.org/show_bug.cgi?id=141859
2732
2733         Reviewed by Brent Fulgham.
2734
2735         Enable SymbolEnabled runtime flag in inspector context.
2736
2737         * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
2738         * WebCore.order:
2739         * WebCore.vcxproj/WebCore.vcxproj:
2740         * WebCore.vcxproj/WebCore.vcxproj.filters:
2741         * bindings/js/JSDOMWindowBase.cpp:
2742         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
2743         (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
2744         * bindings/js/JSDOMWindowBase.h:
2745         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2746         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
2747         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
2748         * bindings/js/JSWorkerGlobalScopeBase.h:
2749         * inspector/InspectorFrontendClientLocal.cpp:
2750         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
2751         * page/Settings.h:
2752         * page/Settings.in:
2753
2754 2015-02-24  Manuel Rego Casasnovas  <rego@igalia.com>
2755
2756         [CSS Grid Layout] Support "sparse" in auto-placed items locked to a row/column
2757         https://bugs.webkit.org/show_bug.cgi?id=141748
2758
2759         Reviewed by Sergio Villar Senin.
2760
2761         The first step of grid item placement algorithm has been updated in
2762         order to support both "sparse" and "dense" modes. Current code is always
2763         doing a "dense" packing in this case.
2764
2765         See: http://dev.w3.org/csswg/css-grid/#auto-placement-algo
2766
2767         Test: fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html
2768
2769         * rendering/RenderGrid.cpp:
2770         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Add a cursor
2771         for each row/column and use it to place items in the right position.
2772
2773 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
2774
2775         [GTK] Layout Test accessibility/roles-exposed.html is failing
2776         https://bugs.webkit.org/show_bug.cgi?id=141960
2777
2778         Reviewed by Martin Robinson.
2779
2780         The test was failing because Gtk now uses GtkColorChooserDialog for the
2781         color input, making the input field a button which results in the color
2782         chooser dialog appearing. As a side effect of this change, the input now
2783         has an accessible role of ColorWell, which is currently mapped to
2784         ATK_ROLE_COLOR_CHOOSER (which is by definition the dialog which results
2785         upon activating the button input field). Changed the Gtk platform mapping
2786         to ATK_ROLE_BUTTON, leaving the Efl mapping as-is.
2787
2788         No new tests. Instead, updated and unskipped failing test.
2789
2790         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2791         (atkRole):
2792
2793 2015-02-24  Michael Catanzaro  <mcatanzaro@igalia.com>
2794
2795         [GTK] Fonts loaded via @font-face look bad
2796         https://bugs.webkit.org/show_bug.cgi?id=140994
2797
2798         Reviewed by Martin Robinson.
2799
2800         We've had several complaints that woff fonts look bad on some websites. This seems to be a
2801         combination of multiple issues. For one, we don't look at Fontconfig settings at all when
2802         creating a web font. This commit changes FontPlatformData::initializeWithFontFace to instead
2803         use sane default settings from Fontconfig when loading a web font, rather than accepting the
2804         default settings from GTK+, which are normally overridden by Fontconfig when loading system
2805         fonts. However, we will hardcode the hinting setting for web fonts to always force use of
2806         the light autohinter, so that we do not use a font's native hints. This avoids compatibility
2807         issues when fonts with poor native hinting are only tested in browsers that do not use the
2808         native hints. It also allows us to sidestep future security vulnerabilities in FreeType's
2809         bytecode interpreter.
2810
2811         The net result of this is that there should be little noticable difference if you have GTK+
2812         set to use slight hinting (which forces use of the autohinter) unless you have customized
2813         Fontconfig configuration, but a dramatic improvement with particular fonts if you use medium
2814         or full hinting. This should reduce complaints about our font rendering on "fancy sites."
2815
2816         No new tests, since the affected fonts we've found are not freely redistributable.
2817
2818         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
2819         (WebCore::FontCustomPlatformData::FontCustomPlatformData): Force web fonts to be autohinted.
2820         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
2821         (WebCore::getDefaultCairoFontOptions): Renamed to disambiguate.
2822         (WebCore::getDefaultFontconfigOptions): Added.
2823         (WebCore::FontPlatformData::initializeWithFontFace): Always call
2824         FontPlatformData::setCairoOptionsFromFontConfigPattern. If the FontPlatformData was not
2825         created with an FcPattern (e.g. because this is a web font), call
2826         getDefaultFontconfigOptions to get a sane default FcPattern.
2827         (WebCore::FontPlatformData::setOrientation): Renamed call to getDefaultCairoFontOptions.
2828         (WebCore::getDefaultFontOptions): Deleted.
2829
2830 2015-02-24  Andreas Kling  <akling@apple.com>
2831
2832         [Cocoa] Break internal reference cycle in WebCore::Font.
2833         <https://webkit.org/b/141941>
2834         <rdar://problem/19650570>
2835
2836         Reviewed by Antti Koivisto.
2837
2838         The Cocoa implementation of Font::platformCreateScaledFont() tried to be smart and use the FontCache.
2839         This didn't work out well when scaling a 0pt Font, since scaling 0pt by any factor will return 0pt.
2840
2841         We'd have a 0pt font, scale it by 0.7 to get a small-caps variant, and then cache that small-caps
2842         variant (really "this") in Font::m_derivedData->smallCaps.
2843
2844         Fix this by having Cocoa Font scaling do exactly what other platforms do: create a new Font every time.
2845         This stops us from accumulating tons of abandoned Font objects over time.
2846
2847         * platform/graphics/Font.cpp:
2848         (WebCore::Font::verticalRightOrientationFont):
2849         (WebCore::Font::uprightOrientationFont):
2850         (WebCore::Font::smallCapsFont):
2851         (WebCore::Font::emphasisMarkFont):
2852         (WebCore::Font::brokenIdeographFont):
2853         (WebCore::Font::nonSyntheticItalicFont): Add assertions to guard against reference cycles inside a Font.
2854
2855         * platform/graphics/cocoa/FontCocoa.mm:
2856         (WebCore::Font::platformCreateScaledFont): Always create a new Font when scaling an existing Font to a different size.
2857
2858 2015-02-24  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
2859
2860         [Streams API] Reading ReadableStream ready and closed attributes should not always create a new promise
2861         https://bugs.webkit.org/show_bug.cgi?id=141650
2862
2863         Reviewed by Benjamin Poulain.
2864
2865         The JSPromiseDeferred objects returned by JSReadableStream::ready and JSReadableStream::closed should be stored somewhere.
2866         This patch stores them as private slots in JSReadableStream.
2867         This is close to the description in https://streams.spec.whatwg.org/#rs-internal-slots.
2868
2869         An alternative would be to have these objects as JSReadableStream class members, thus modifying the binding generator.
2870         That may be the cleanest solution, especially if other APIs express the same need.
2871         Another alternative is to store DeferredWrapper in ReadableStream objects.
2872         But it is currently preferred to keep DeferredWrapper in bindings/js code.
2873
2874         Added new constructor for DeferredWrapper to use these stored values.
2875         Updated ready and closed methods to use that new constructor.
2876         Changes are covered by new test in streams/readablestream-constructor.html.
2877
2878         * bindings/js/JSDOMPromise.cpp:
2879         (WebCore::DeferredWrapper::DeferredWrapper):
2880         * bindings/js/JSDOMPromise.h:
2881         * bindings/js/JSReadableStreamCustom.cpp:
2882         (WebCore::closedPromiseSlotName):
2883         (WebCore::getOrCreatePromiseDeferredFromObject):
2884         (WebCore::readyPromiseSlotName):
2885         (WebCore::JSReadableStream::ready):
2886         (WebCore::JSReadableStream::closed):
2887         * bindings/js/ReadableStreamJSSource.cpp:
2888         (WebCore::setInternalSlotToObject):
2889         (WebCore::getInternalSlotFromObject):
2890         * bindings/js/ReadableStreamJSSource.h:
2891
2892 2015-02-24  Dhi Aurrahman  <diorahman@rockybars.com>
2893
2894         Always serialize :lang()'s arguments to strings
2895         https://bugs.webkit.org/show_bug.cgi?id=141944
2896
2897         Reviewed by Benjamin Poulain.
2898
2899         As specified in [1] :lang()'s arguments are always serialized to strings.
2900
2901         [1] http://dev.w3.org/csswg/cssom/#serializing-selectors
2902
2903         Related tests are updated.
2904
2905         * css/CSSGrammar.y.in:
2906         * css/CSSParserValues.cpp:
2907         (WebCore::CSSParserSelector::setLangArgumentList):
2908         * css/CSSParserValues.h:
2909         (WebCore::CSSParserString::init):
2910         (WebCore::CSSParserString::clear):
2911         (WebCore::CSSParserString::tokenType): Deleted.
2912         (WebCore::CSSParserString::setTokenType): Deleted.
2913         * css/CSSSelector.cpp:
2914         (WebCore::appendLangArgumentList):
2915         (WebCore::CSSSelector::setLangArgumentList):
2916         * css/CSSSelector.h:
2917         (WebCore::CSSSelector::langArgumentList):
2918         * css/SelectorCheckerTestFunctions.h:
2919         (WebCore::matchesLangPseudoClass):
2920         * cssjit/SelectorCompiler.cpp:
2921         (WebCore::SelectorCompiler::addPseudoClassType):
2922         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
2923
2924 2015-02-24  Antti Koivisto  <antti@apple.com>
2925
2926        Give TemporaryChange for m_inLoadPendingImages assertion a name so it actually does something.
2927
2928         * css/StyleResolver.cpp:
2929         (WebCore::StyleResolver::loadPendingImages):
2930
2931 2015-02-23  Commit Queue  <commit-queue@webkit.org>
2932
2933         Unreviewed, rolling out r180547 and r180550.
2934         https://bugs.webkit.org/show_bug.cgi?id=141957
2935
2936         Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
2937
2938         Reverted changesets:
2939
2940         "REGRESSION(r179429): Can't type comments in Facebook"
2941         https://bugs.webkit.org/show_bug.cgi?id=141859
2942         http://trac.webkit.org/changeset/180547
2943
2944         "Constructor returning null should construct an object instead
2945         of null"
2946         https://bugs.webkit.org/show_bug.cgi?id=141640
2947         http://trac.webkit.org/changeset/180550
2948
2949 2015-02-23  Ryosuke Niwa  <rniwa@webkit.org>
2950
2951         Disable font loading events until our implementation gets updated to match the latest spec
2952         https://bugs.webkit.org/show_bug.cgi?id=141938
2953
2954         Reviewed by Andreas Kling.
2955
2956         Revert r173531 for now since our implementation is outdated.
2957
2958         * Configurations/FeatureDefines.xcconfig:
2959
2960 2015-02-23  Brent Fulgham  <bfulgham@apple.com>
2961
2962         EventHandler references deleted Scrollbar
2963         https://bugs.webkit.org/show_bug.cgi?id=141931
2964         <rdar://problem/19915210>
2965
2966         Reviewed by Tim Horton.
2967
2968         Tested by scrollbars/overflow-custom-scrollbar-crash.html
2969
2970         Update the EventHandler class to use a WeakPtr to reference the
2971         last used Scrollbar, rather than retaining the Scrollbar and
2972         artificially extending its life. This keeps the EventHandler
2973         state in proper sync with the state of the render tree, and
2974         avoids cases where we have destroyed a ScrollableArea (and
2975         Scrollbar) but are still sending messages to a fake zombie
2976         version of the element.
2977
2978         * page/EventHandler.cpp:
2979         (WebCore::EventHandler::clear):
2980         (WebCore::EventHandler::handleMousePressEvent):
2981         (WebCore::EventHandler::updateMouseEventTargetNode):
2982         (WebCore::EventHandler::updateLastScrollbarUnderMouse):
2983         * page/EventHandler.h:
2984         * platform/Scrollbar.cpp:
2985         (WebCore::Scrollbar::Scrollbar): Initialize WeakPtrFactory.
2986         * platform/Scrollbar.h:
2987         (WebCore::Scrollbar::createWeakPtr): Added,
2988
2989 2015-02-23  Yusuke Suzuki  <utatane.tea@gmail.com>
2990
2991         REGRESSION(r179429): Can't type comments in Facebook
2992         https://bugs.webkit.org/show_bug.cgi?id=141859
2993
2994         Reviewed by Geoffrey Garen.
2995
2996         Enable SymbolEnabled runtime flag in inspector context.
2997
2998         * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
2999         * WebCore.order:
3000         * WebCore.vcxproj/WebCore.vcxproj:
3001         * WebCore.vcxproj/WebCore.vcxproj.filters:
3002         * bindings/js/JSDOMWindowBase.cpp:
3003         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
3004         (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
3005         * bindings/js/JSDOMWindowBase.h:
3006         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3007         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
3008         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
3009         * bindings/js/JSWorkerGlobalScopeBase.h:
3010         * inspector/InspectorFrontendClientLocal.cpp:
3011         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
3012         * page/Settings.h:
3013         * page/Settings.in:
3014
3015 2015-02-23  Benjamin Poulain  <benjamin@webkit.org>
3016
3017         CSS JIT: add support for case-insensitive attribute matching
3018         https://bugs.webkit.org/show_bug.cgi?id=141880
3019
3020         Reviewed by Andreas Kling.
3021
3022         The value matching now has 3 cases:
3023         1) Case-sensitive.
3024         2) Case-insensitive.
3025         3) Legacy HTML Case-insensitive.
3026
3027         The information to determine the case is split over 2 source:
3028         -To know if explicit case-insensitive is needed, we need to ask the selector
3029          for attributeValueMatchingIsCaseInsensitive().
3030         -To know if the legacy HTML behavior is needed, we need to test the attribute
3031          name filter with HTMLDocument::isCaseSensitiveAttribute().
3032
3033         I decided to perform all those checks at the fragment creation step.
3034         This makes the register requirements and code generation more explicit.
3035
3036         From there, everything is easy: switch() on the type of matching needed,
3037         and generate the code. The new case-insensitive case is a simplified version
3038         of the legacy HTML behavior without runtime check for the element type.
3039
3040         Tests: fast/css/implicitly-case-insensitive-attribute-with-svg.html
3041                fast/selectors/case-insensitive-attribute-register-requirement-1.html
3042                fast/selectors/case-insensitive-attribute-register-requirement-2.html
3043                fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html
3044
3045         * cssjit/SelectorCompiler.cpp:
3046         (WebCore::SelectorCompiler::attributeSelectorCaseSensitivity):
3047         (WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
3048         (WebCore::SelectorCompiler::AttributeMatchingInfo::attributeCaseSensitivity):
3049         (WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch): Deleted.
3050         (WebCore::SelectorCompiler::constructFragmentsInternal):
3051         Compute the type of value matching and store it on the AttributeMatchingInfo
3052         when creating the fragment.
3053
3054         (WebCore::SelectorCompiler::minimumRegisterRequirements):
3055         (WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
3056         (WebCore::SelectorCompiler::attributeValueTestingRequiresCaseFoldingRegister): Deleted.
3057         In general, AttributeCaseSensitivity::CaseInsensitive does not require an extra
3058         register. I have made an exception for generateElementAttributeValueExactMatching()
3059         for simplicity. I use that register to load the StringImpl of the attribute
3060         being tested, that way I can use WTF::equalIgnoringCaseNonNull() directly.
3061
3062         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
3063         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
3064         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
3065         Matching itself is just function calls. Unlike AttributeCaseSensitivity::HTMLLegacyCaseInsensitive,
3066         the behavior is consistent between XML and HTML.
3067
3068 2015-02-23  Alex Christensen  <achristensen@webkit.org>
3069
3070         [WinCairo] Unreviewed build fix after r180532
3071
3072         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3073         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
3074         Fixed typo.
3075
3076 2015-02-23  Chris Dumez  <cdumez@apple.com>
3077
3078         Log using diagnostic logging which ActiveDOMObjects prevent using the PageCache
3079         https://bugs.webkit.org/show_bug.cgi?id=141922
3080         <rdar://problem/19923085>
3081
3082         Reviewed by Andreas Kling.
3083
3084         Log using diagnostic logging which ActiveDOMObjects prevent using the
3085         PageCache.
3086
3087         * history/PageCache.cpp:
3088         (WebCore::logCanCacheFrameDecision):
3089         * page/DiagnosticLoggingKeys.cpp:
3090         (WebCore::DiagnosticLoggingKeys::unsuspendableDOMObjectKey):
3091         * page/DiagnosticLoggingKeys.h:
3092
3093 2015-02-23  Chris Dumez  <cdumez@apple.com>
3094
3095         Move GeoNotifier class to its own file
3096         https://bugs.webkit.org/show_bug.cgi?id=141918
3097
3098         Reviewed by Andreas Kling.
3099
3100         Move GeoNotifier class to its own file to make Geolocation class less
3101         crowded.
3102
3103 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3104
3105         Remove unnecessary PlatformTimeRanges::create()
3106         https://bugs.webkit.org/show_bug.cgi?id=141901
3107
3108         Reviewed by Filip Pizlo.
3109
3110         PlatformTimeRanges::create() functions have just created an instance of PlatformTimeRanges.
3111         This functionality can be replaced with std::make_unique<> use directly.
3112
3113         No new tests, no behavior changes.
3114
3115         * Modules/mediasource/MediaSource.cpp:
3116         (WebCore::MediaSource::buffered):
3117         * Modules/mediasource/SourceBuffer.cpp:
3118         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
3119         * platform/graphics/MediaPlayer.cpp:
3120         (WebCore::NullMediaPlayerPrivate::buffered):
3121         * platform/graphics/MediaPlayerPrivate.h:
3122         (WebCore::MediaPlayerPrivateInterface::seekable):
3123         * platform/graphics/PlatformTimeRanges.cpp:
3124         (WebCore::PlatformTimeRanges::create): Deleted.
3125         * platform/graphics/PlatformTimeRanges.h:
3126         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
3127         (WebCore::MediaPlayerPrivateAVFoundation::buffered):
3128         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3129         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
3130         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3131         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
3132         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3133         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
3134         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
3135         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3136         (WebCore::MediaPlayerPrivateGStreamer::buffered):
3137         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3138         (WebCore::MediaPlayerPrivateQTKit::buffered):
3139         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3140         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
3141         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
3142         (WebCore::MockMediaPlayerMediaSource::buffered):
3143
3144 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3145
3146         Partial clean up OwnPtr and PassOwnPtr in WebCore/platform
3147         https://bugs.webkit.org/show_bug.cgi?id=141888
3148
3149         Reviewed by Filip Pizlo.
3150
3151         Use std::unique_ptr<> and std::make_unique<>. Besides this patch removes
3152         unnecessary OwnPtr.h|PasSOwnPtr.h includes.
3153
3154         No new tests, no behavior changes.
3155
3156         * platform/SharedBuffer.h:
3157         * platform/Supplementable.h:
3158         * platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
3159         (WebCore::AudioSourceProviderGStreamer::create): Deleted.
3160         * platform/graphics/ImageBuffer.h:
3161         * platform/graphics/TiledBackingStoreBackend.h:
3162         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3163         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
3164         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
3165         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3166         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
3167         * platform/gtk/GamepadsGtk.cpp:
3168
3169 2015-02-23  Shivakumar JM  <shiva.jm@samsung.com>
3170
3171         Default value of HTMLSelectElement size IDL attribute should be 0.
3172         https://bugs.webkit.org/show_bug.cgi?id=141795
3173
3174         Reviewed by Andreas Kling.
3175
3176         Default value of HTMLSelectElement size IDL attribute should be 0. 
3177         As in spec: http://www.w3.org/html/wg/drafts/html/master/forms.html#the-select-element, also this matches the behavior of Chrome, IE and
3178         Gecko.
3179
3180         Test: fast/dom/select-size.html
3181
3182         * html/HTMLSelectElement.cpp:
3183         (WebCore::HTMLSelectElement::parseAttribute):
3184
3185 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
3186
3187         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
3188         https://bugs.webkit.org/show_bug.cgi?id=141729.
3189
3190         Reviewed by Daniel Bates.
3191
3192         Fix a build break which is caused by http://trac.webkit.org/changeset/180511/trunk.
3193         Two functions of GraphicsContext were made inline but they were kept WEBCORE_EXPORT.
3194
3195         * platform/graphics/GraphicsContext.h:
3196         (WebCore::GraphicsContext::paintingDisabled):
3197         (WebCore::GraphicsContext::updatingControlTints):
3198
3199 2015-02-22  Dean Jackson  <dino@apple.com>
3200
3201         [iOS] Max canvas size is lower than expected
3202         https://bugs.webkit.org/show_bug.cgi?id=141886
3203         <rdar://problem/19729246>
3204
3205         Reviewed by Tim Horton.
3206
3207         Use the same maximum canvas area for all ports,
3208         which bumps the iOS limit up from 4580 * 1145
3209         to 16k * 16k.
3210
3211         * html/HTMLCanvasElement.cpp: Update MaxCanvasArea.
3212
3213 2015-02-23  Chris Dumez  <cdumez@apple.com>
3214
3215         Add support for diagnostic logging messages sampling
3216         https://bugs.webkit.org/show_bug.cgi?id=141823
3217         <rdar://problem/19899030>
3218
3219         Reviewed by Andreas Kling.
3220
3221         Add support for diagnostic logging messages sampling to decrease the
3222         impact of diagnostic logging on CPU usage, while still getting useful
3223         overall results. This patch adds a ShouldSample argument to
3224         logDiagnosticMessage*() functions and logs 5% of the messages when
3225         sampling. Sampling is turned on for keys that are known to be verbose
3226         (e.g. per resource load logging).
3227
3228         On the page load test I am tracking, CPU usage caused by diagnostic
3229         logging went down to 0.3% of UIProcess from 2.8% with this change.
3230
3231         * history/PageCache.cpp:
3232         (WebCore::logPageCacheFailureDiagnosticMessage):
3233         (WebCore::logCanCachePageDecision):
3234         * html/HTMLMediaElement.cpp:
3235         (WebCore::HTMLMediaElement::parseAttribute):
3236         * loader/EmptyClients.h:
3237         * loader/FrameLoader.cpp:
3238         (WebCore::logNavigation):
3239         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
3240         * loader/ResourceLoader.cpp:
3241         (WebCore::logResourceResponseSource):
3242         * loader/SubframeLoader.cpp:
3243         (WebCore::logPluginRequest):
3244         * loader/SubresourceLoader.cpp:
3245         (WebCore::SubresourceLoader::willSendRequest):
3246         (WebCore::SubresourceLoader::didReceiveResponse):
3247         (WebCore::logResourceLoaded):
3248         * loader/cache/CachedResource.cpp:
3249         (WebCore::logResourceRevalidationReason):
3250         * loader/cache/CachedResourceLoader.cpp:
3251         (WebCore::logMemoryCacheResourceRequest):
3252         * page/DiagnosticLoggingClient.h:
3253
3254 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
3255
3256         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
3257         https://bugs.webkit.org/show_bug.cgi?id=141729.
3258
3259         Reviewed by Simon Fraser.
3260
3261         When drawing an SVG image and the drawing context is set to be transparent,
3262         make sure this transparency is applied to the compositing layer.
3263
3264         Test: svg/canvas/canvas-global-alpha-svg.html
3265
3266         * platform/graphics/GraphicsContext.cpp:
3267         (WebCore::GraphicsContext::setAlpha): Make setAlpha() calls the platform
3268         function and sets 'm_state.alpha' to the input value.
3269
3270         (WebCore::GraphicsContext::alpha): Add a new function 'alpha()' which
3271         returns the value of the global alpha.
3272         
3273         * platform/graphics/GraphicsContext.h:
3274         (WebCore::GraphicsContextState::GraphicsContextState): Add a new member
3275         'alpha' to the context state since the getter function CGContextGetAlpha
3276         is defined only in a private header file. Also move single line functions
3277         from the source file to the header file.
3278     
3279         * platform/graphics/cairo/GraphicsContextCairo.cpp:
3280         (WebCore::GraphicsContext::setPlatformAlpha):
3281         (WebCore::GraphicsContext::setAlpha): Deleted.
3282         * platform/graphics/cg/GraphicsContextCG.cpp:
3283         (WebCore::GraphicsContext::setPlatformAlpha):
3284         (WebCore::GraphicsContext::setAlpha): Deleted.
3285         Rename setAlpha() to setPlatformAlpha() in the platform files. Add setAlpha()
3286         to the core file. setAlpha() will set the value of 'm_state.alpha' and call
3287         setPlatformAlpha().
3288     
3289         * svg/graphics/SVGImage.cpp:
3290         (WebCore::SVGImage::draw): If the drawing context is transparent, apply its
3291         global alpha value to the compositing layer.
3292         
3293 2015-02-23  Eric Carlson  <eric.carlson@apple.com>
3294
3295         Occasional crash in MediaPlayer::setPrivateBrowsingMode
3296         https://bugs.webkit.org/show_bug.cgi?id=141910
3297
3298         Reviewed by Jer Noble.
3299
3300         No new tests, I was unable to reproduce the crash.
3301
3302         * html/HTMLMediaElement.cpp:
3303         (WebCore::HTMLMediaElement::stopPeriodicTimers): Use EveryDelayedAction instead of -1.
3304         (WebCore::HTMLMediaElement::stop): Call clearMediaPlayer instead of just setting m_player
3305             to NULL.
3306         * html/HTMLMediaElement.h: Define EveryDelayedAction.
3307
3308 2015-02-23  Philippe Normand  <pnormand@igalia.com>
3309
3310         [GStreamer] Redundant track language notifications
3311         https://bugs.webkit.org/show_bug.cgi?id=141908
3312
3313         Reviewed by Žan Doberšek.
3314
3315         Invoke languageChanged only if the language code actually
3316         changed.
3317
3318         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
3319         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
3320
3321 2015-02-23  peavo@outlook.com  <peavo@outlook.com>
3322
3323         [WinCairo] Crash when media player is destroyed.
3324         https://bugs.webkit.org/show_bug.cgi?id=141248
3325
3326         Reviewed by Darin Adler.
3327
3328         A COM smart pointer is both released, and set to null.
3329         This means that the COM Release method is called twice, causing a crash.
3330
3331         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
3332         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
3333
3334 2015-02-23  Manuel Rego Casasnovas  <rego@igalia.com>
3335
3336         [CSS Grid Layout] Remove old FIXME in RenderGrid::placeItemsOnGrid()
3337         https://bugs.webkit.org/show_bug.cgi?id=141899
3338
3339         Reviewed by Sergio Villar Senin.
3340
3341         There was a FIXME about not re-resolving positions if the grid is grown during
3342         auto-placement. But as the spec has changed [1] and you can only refer to the
3343         explicit grid (even if you use for example grid-column: 1 / -1). It seems that
3344         we can get rid of this FIXME as it's not a causing a problem anymore.
3345
3346         [1] http://dev.w3.org/csswg/css-grid/#grid-placement-int
3347
3348         No new tests (no change in behavior).
3349
3350         * rendering/RenderGrid.cpp:
3351         (WebCore::RenderGrid::placeItemsOnGrid): Remove FIXME.
3352
3353 2015-02-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3354
3355         Move std::unique_ptr<>|make_unique<> to WebCore/page/scrolling
3356         https://bugs.webkit.org/show_bug.cgi?id=137877
3357
3358         Reviewed by Sam Weinig.
3359
3360         Clean up unnecessary OwnPtr.h|PassOwnPtr.h includes as well as
3361         change OwnPtr with std::unique_ptr<>|make_unique<>.
3362
3363         No new tests, no behavior changes.
3364
3365         * page/scrolling/AsyncScrollingCoordinator.h:
3366         * page/scrolling/ScrollingStateFixedNode.cpp:
3367         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
3368         * page/scrolling/ScrollingStateNode.cpp:
3369         (WebCore::ScrollingStateNode::appendChild):
3370         * page/scrolling/ScrollingStateNode.h:
3371         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
3372         * page/scrolling/ScrollingStateScrollingNode.cpp:
3373         * page/scrolling/ScrollingStateStickyNode.cpp:
3374         * page/scrolling/ScrollingTree.h:
3375         * page/scrolling/ScrollingTreeNode.cpp:
3376         (WebCore::ScrollingTreeNode::appendChild):
3377         * page/scrolling/ScrollingTreeNode.h:
3378         * page/scrolling/ScrollingTreeScrollingNode.h:
3379
3380 2015-02-22  Dean Jackson  <dino@apple.com>
3381
3382         Print a console warning when HTMLCanvasElement exceeds the maximum size
3383         https://bugs.webkit.org/show_bug.cgi?id=141861
3384         <rdar://problem/19729145>
3385
3386         Reviewed by Simon Fraser.
3387
3388         Add a warning if we ever try to create a canvas that is
3389         too big.
3390
3391         No test because:
3392         1. We can't ref-test against console messages.
3393         2. The output is platform specific.
3394
3395         * html/HTMLCanvasElement.cpp:
3396         (WebCore::HTMLCanvasElement::createImageBuffer):
3397
3398 2015-02-21  Sam Weinig  <sam@webkit.org>
3399
3400         Convert the caps lock indicator to be implemented using the shadow DOM
3401         https://bugs.webkit.org/show_bug.cgi?id=141868
3402
3403         Reviewed by Dan Bernstein.
3404
3405         - Re-adds 'caps-lock-indicator' as a valid -webkit-appearance value. It was removed
3406           in r74099 to work around a site bug, that should not be a problem anymore.
3407         - Converts the caps lock indicator to be implemented as part of the shadow DOM rather
3408           than a paint time effect. This gives the proper overflow behavior (it now clips) and
3409           behaves correctly in RTL.
3410
3411         * css/CSSParser.cpp:
3412         (WebCore::isValidKeywordPropertyAndValue):
3413         Make 'caps-lock-indicator' a valid -webkit-appearance value.
3414
3415         * css/CSSValueKeywords.in:
3416         Remove comment that indicated that caps-lock-indicator was not a valid
3417         -webkit-appearance value.
3418
3419         * css/html.css:
3420         (input::-webkit-caps-lock-indicator):
3421         Add new default style for the new -webkit-caps-lock-indicator pseudo-element. The
3422         trick employed here is to use a content: image to both implement the painting of
3423         the caps lock indicator, and to get the sizing right (shrink-to-fit, height: 100%).
3424
3425         * html/HTMLInputElement.cpp:
3426         (WebCore::HTMLInputElement::capsLockIndicatorElement):
3427         (WebCore::HTMLInputElement::capsLockStateMayHaveChanged):
3428         * html/HTMLInputElement.h:
3429         * html/InputType.cpp:
3430         (WebCore::InputType::capsLockStateMayHaveChanged):
3431         * html/InputType.h:
3432         (WebCore::InputType::capsLockIndicatorElement):
3433         Pipe notification of changes in the caps locks state to the <input> element
3434         rather than the RenderTextControlSingleLine. Also add an accessor for the caps
3435         lock indicator element in the shadow DOM.
3436
3437         * html/TextFieldInputType.cpp:
3438         (WebCore::TextFieldInputType::forwardEvent):
3439         (WebCore::TextFieldInputType::shouldHaveCapsLockIndicator):
3440         (WebCore::TextFieldInputType::createShadowSubtree):
3441         (WebCore::TextFieldInputType::capsLockIndicatorElement):
3442         (WebCore::TextFieldInputType::destroyShadowSubtree):
3443         (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator):
3444         (WebCore::TextFieldInputType::capsLockStateMayHaveChanged):
3445         * html/TextFieldInputType.h:
3446         Add a new element to the text field shadow DOM to act as the caps lock indicator.
3447         Give it a pseudo-element ID of -webkit-caps-lock-indicator so it can be referenced
3448         from CSS. The element is always in the DOM for a password field. It toggles between
3449         display: none and display: block depending on the state of the caps lock key.
3450
3451         * page/EventHandler.cpp:
3452         (WebCore::EventHandler::capsLockStateMayHaveChanged):
3453         Pipe notification of changes in the caps locks state to the <input> element
3454         rather than the RenderTextControlSingleLine.
3455
3456         * rendering/RenderTextControlSingleLine.cpp:
3457         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
3458         (WebCore::RenderTextControlSingleLine::paint): Deleted.
3459         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged): Deleted.
3460         * rendering/RenderTextControlSingleLine.h:
3461         Remove logic for drawing the caps lock indicator.
3462
3463         * rendering/RenderTheme.cpp:
3464         (WebCore::RenderTheme::adjustStyle):
3465         (WebCore::RenderTheme::paint):
3466         (WebCore::RenderTheme::paintMeter):
3467         (WebCore::RenderTheme::adjustCapsLockIndicatorStyle):
3468         (WebCore::RenderTheme::paintCapsLockIndicator):
3469         (WebCore::RenderTheme::shouldHaveCapsLockIndicator):
3470         * rendering/RenderTheme.h:
3471         (WebCore::RenderTheme::paintCapsLockIndicator): Deleted.
3472         * rendering/RenderThemeIOS.h:
3473         * rendering/RenderThemeIOS.mm:
3474         (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator):
3475         * rendering/RenderThemeMac.h:
3476         * rendering/RenderThemeMac.mm:
3477         (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator):
3478         (WebCore::RenderThemeMac::paintCapsLockIndicator): Deleted.
3479         Now that the caps lock indicator is implemented like other aspects of form controls,
3480         the theme code can be converted to be similar as well.
3481
3482 2015-02-21  David Kilzer  <ddkilzer@apple.com>
3483
3484         [iOS] Fix build failure after including CoreMediaSoftLink.h in WebVideoFullscreenInterfaceAVKit.mm
3485         <http://webkit.org/b/141816>
3486
3487         Attempt to fix the following build failure:
3488
3489             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:68:1: error: call to 'CoreMediaLibrary' is ambiguous
3490             SOFT_LINK(CoreMedia, CMTimeRangeContainsTime, Boolean, (CMTimeRange range, CMTime time), (range, time))
3491             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3492             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
3493             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
3494             WebCore/platform/mac/SoftLinking.h:107:79: note: expanded from macro 'SOFT_LINK'
3495             <scratch space>:58:1: note: expanded from here
3496             CoreMediaLibrary
3497             ^~~~~~~~~~~~~~~~
3498             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
3499             WebCore/platform/cf/CoreMediaSoftLink.h:35:1: note: candidate function
3500             SOFT_LINK_FRAMEWORK_HEADER(WebCore, CoreMedia)
3501             ^
3502             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
3503             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
3504             WebCore/platform/mac/SoftLinking.h:298:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK_HEADER'
3505             <scratch space>:42:1: note: expanded from here
3506             CoreMediaLibrary
3507             ^
3508             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:67:1: note: candidate function
3509             SOFT_LINK_FRAMEWORK(CoreMedia)
3510             ^
3511             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
3512             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
3513             WebCore/platform/mac/SoftLinking.h:46:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK'
3514             <scratch space>:51:1: note: expanded from here
3515             CoreMediaLibrary
3516             ^
3517
3518         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Remove the
3519         SOFT_LINK_FRAMEWORK(CoreMedia) macro since the remaining
3520         SOFT_LINK() and SOFT_LINK_CONSTANT() macros can use the
3521         CoreMediaLibrary() method exposed by CoreMediaSoftLink.h.
3522
3523 2015-02-21  David Kilzer  <ddkilzer@apple.com>
3524
3525         Add SOFT_LINK_CONSTANT_SOURCE() cross-platform macro and start using it
3526         <http://webkit.org/b/141816>
3527
3528         Reviewed by Alexey Proskuryakov.
3529
3530         * WebCore.vcxproj/WebCore.vcxproj:
3531         * WebCore.vcxproj/WebCore.vcxproj.filters:
3532         - Remove CoreMediaSoftLinking.h.
3533
3534         * platform/cf/CoreMediaSoftLink.cpp:
3535         - Add kCMTimeZero constant.
3536         * platform/cf/CoreMediaSoftLink.h:
3537         - Add SOFT_LINK_FRAMEWORK_HEADER() macro for CoreMedia.
3538         - Add kCMTimeZero constant.
3539
3540         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Remove.
3541
3542         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3543         - Remove reference to CoreMediaSoftLinking.h and update comment.
3544         (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable):
3545         - Switch to using new method to check if a framework is
3546           available.
3547
3548         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3549         - Remove all local soft-linking macros for CoreMedia.
3550           CoreMediaSoftLink.h handles everything now.
3551         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
3552         - Switch to using new method to check if a framework is
3553           available.
3554
3555         * platform/mac/SoftLinking.h:
3556         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
3557         is_Name_FrameworkAvailable() macro.
3558         (SOFT_LINK_FRAMEWORK_SOURCE): Update to make it work with
3559         optional framework checks without a separate macro.
3560         (SOFT_LINK_CONSTANT_HEADER): Add.
3561         (SOFT_LINK_CONSTANT_SOURCE): Add.
3562         - Support soft-links to constants.
3563
3564         * platform/win/SoftLinking.h:
3565         (SOFT_LINK_FRAMEWORK_HELPER): Add.  Copied from
3566         SOFT_LINK_LIBRARY_HELPER, with addition of namespace and
3567         non-static function.
3568         (SOFT_LINK_FRAMEWORK): Add.  Copied from SOFT_LINK_LIBRARY.
3569         (SOFT_LINK_DEBUG_FRAMEWORK): Add.  Copied from
3570         SOFT_LINK_DEBUG_LIBRARY.
3571         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
3572         is_Name_FrameworkAvailable() macro.
3573         (SOFT_LINK_FRAMEWORK_SOURCE): Redefine in terms of
3574         SOFT_LINK_FRAMEWORK/SOFT_LINK_DEBUG_FRAMEWORK.
3575         (SOFT_LINK_CONSTANT_HEADER): Add.
3576         (SOFT_LINK_CONSTANT_SOURCE): Add.
3577         - Support soft-links to constants.
3578
3579 2015-02-20  David Kilzer  <ddkilzer@apple.com>
3580
3581         Make namespace configurable for SOFT_LINK_*_{HEADER,SOURCE}() macros
3582         <http://webkit.org/b/141849>
3583
3584         Reviewed by Brent Fulgham.
3585
3586         This patch does the following:
3587         - Add namespace argument to the SOFT_LINK_*_{HEADER,SOURCE}()
3588           macros for reuse in other projects.
3589         - Adds SOFT_LINK_FRAMEWORK_SOURCE() macro in preparation for Bug
3590           141816.
3591         - Adds back framework argument to SOFT_LINK_FUNCTION_HEADER()
3592           and includes framework name in generated function names.  This
3593           adds more entropy to the names in case there are two functions
3594           with the same name in different frameworks.
3595
3596         * platform/cf/CoreMediaSoftLink.cpp:
3597         - Add FIXME about USE(COREMEDIA).
3598         - Switch from SOFT_LINK_FRAMEWORK() to
3599           SOFT_LINK_FRAMEWORK_SOURCE().
3600         * platform/cf/CoreMediaSoftLink.h:
3601         - Add FIXME about USE(COREMEDIA).
3602         - Add back framework argument to SOFT_LINK_FUNCTION_HEADER()
3603           macros.
3604
3605         * platform/mac/SoftLinking.h:
3606         - Add missing header guards.
3607         - Add pragmas for different macro groups.
3608         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
3609         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
3610         (SOFT_LINK_FUNCTION_SOURCE): Move.
3611         - Add framework name to generated function names.
3612         - Incorporates namespace so that it doesn't have to be listed in
3613           the *SoftLink.{cpp,h} file.
3614
3615         * platform/win/SoftLinking.h:
3616         - Add pragmas for different macro groups.
3617         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
3618         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
3619         (SOFT_LINK_FUNCTION_SOURCE): Move.
3620         - Add framework name to generated function names.
3621         - Incorporates namespace so that it doesn't have to be listed in
3622           the *SoftLink.{cpp,h} file.
3623
3624 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
3625
3626         [Gtk] Unreviewed build fix.
3627
3628         * platform/ScrollAnimatorNone.cpp:
3629         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): Forget to update two
3630         uses of ScrollableArea.
3631
3632 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
3633
3634         Scrollbars and ScrollAnimators must always have a ScrollableArea
3635         https://bugs.webkit.org/show_bug.cgi?id=141855
3636
3637         Reviewed by Simon Fraser.
3638
3639         No change in functionality.
3640         
3641         Change users of the scrollAnimator() method to expect a reference instead of a pointer. Also get rid of
3642         a number of unnecessary nullptr checks.
3643
3644         * accessibility/AccessibilityScrollbar.cpp:
3645         (WebCore::AccessibilityScrollbar::setValue):
3646         * css/SelectorCheckerTestFunctions.h:
3647         (WebCore::scrollbarMatchesCornerPresentPseudoClass):
3648         * page/FrameView.cpp:
3649         (WebCore::FrameView::createScrollbar):
3650         (WebCore::FrameView::setFixedVisibleContentRect):
3651         * page/scrolling/ScrollingCoordinator.cpp:
3652         (WebCore::ScrollingCoordinator::handleWheelEventPhase):
3653         * platform/PopupMenuClient.h:
3654         * platform/ScrollAnimator.cpp:
3655         (WebCore::ScrollAnimator::ScrollAnimator):
3656         (WebCore::ScrollAnimator::scroll):
3657         (WebCore::ScrollAnimator::handleWheelEvent):
3658         (WebCore::ScrollAnimator::notifyPositionChanged):
3659         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
3660         * platform/ScrollAnimator.h:
3661         (WebCore::ScrollAnimator::ScrollAnimator::scrollableArea):
3662         * platform/ScrollAnimatorNone.cpp:
3663         * platform/ScrollAnimatorNone.h:
3664         * platform/ScrollView.cpp:
3665         (WebCore::ScrollView::createScrollbar):
3666         * platform/ScrollableArea.cpp:
3667         (WebCore::ScrollableArea::scrollAnimator):
3668         (WebCore::ScrollableArea::scroll):
3669         (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
3670         (WebCore::ScrollableArea::notifyScrollPositionChanged):
3671         (WebCore::ScrollableArea::scrollPositionChanged):
3672         (WebCore::ScrollableArea::handleWheelEvent):
3673         (WebCore::ScrollableArea::handleTouchEvent):
3674         (WebCore::ScrollableArea::mouseEnteredScrollbar):
3675         (WebCore::ScrollableArea::mouseExitedScrollbar):
3676         (WebCore::ScrollableArea::didAddScrollbar):
3677         (WebCore::ScrollableArea::willRemoveScrollbar):
3678         (WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
3679         (WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):
3680         * platform/ScrollableArea.h:
3681         * platform/Scrollbar.cpp:
3682         (WebCore::Scrollbar::createNativeScrollbar):
3683         (WebCore::Scrollbar::Scrollbar):
3684         (WebCore::Scrollbar::scrollbarOverlayStyle):
3685         (WebCore::Scrollbar::isScrollableAreaActive):
3686         (WebCore::Scrollbar::offsetDidChange):
3687         (WebCore::Scrollbar::autoscrollPressedPart):
3688         (WebCore::Scrollbar::moveThumb):
3689         (WebCore::Scrollbar::mouseMoved):
3690         (WebCore::Scrollbar::mouseEntered):
3691         (WebCore::Scrollbar::mouseExited):
3692         (WebCore::Scrollbar::mouseUp):
3693         (WebCore::Scrollbar::shouldParticipateInHitTesting):
3694         (WebCore::Scrollbar::isWindowActive):
3695         (WebCore::Scrollbar::invalidateRect):
3696         (WebCore::Scrollbar::convertToContainingView):
3697         (WebCore::Scrollbar::convertFromContainingView):
3698         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
3699         * platform/Scrollbar.h:
3700         (WebCore::Scrollbar::scrollableArea):
3701         (WebCore::Scrollbar::disconnectFromScrollableArea): Deleted.
3702         * platform/ios/ScrollAnimatorIOS.mm:
3703         (WebCore::ScrollAnimatorIOS::handleTouchEvent):
3704         (WebCore::ScrollAnimatorIOS::determineScrollableAreaForTouchSequence):
3705         * platform/mac/ScrollAnimatorMac.h:
3706         * platform/mac/ScrollAnimatorMac.mm:
3707         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
3708         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
3709         (-[WebScrollbarPainterDelegate scrollAnimator]):
3710         (-[WebScrollbarPainterDelegate layer]):
3711         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
3712         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
3713         (WebCore::ScrollAnimator::create):
3714         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3715         (WebCore::ScrollAnimatorMac::scroll):
3716         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
3717         (WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
3718         (WebCore::ScrollAnimatorMac::immediateScrollTo):
3719         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
3720         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
3721         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
3722         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
3723         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
3724         (WebCore::ScrollAnimatorMac::pinnedInDirection):
3725         (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture):
3726         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
3727         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
3728         (WebCore::ScrollAnimatorMac::stretchAmount):
3729         (WebCore::ScrollAnimatorMac::canScrollHorizontally):
3730         (WebCore::ScrollAnimatorMac::canScrollVertically):
3731         (WebCore::ScrollAnimatorMac::absoluteScrollPosition):
3732         (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints):
3733         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
3734         (WebCore::ScrollAnimatorMac::setVisibleScrollerThumbRect):
3735         * rendering/RenderLayer.cpp:
3736         (WebCore::RenderLayer::RenderLayer):
3737         (WebCore::RenderLayer::createScrollbar):
3738         (WebCore::RenderLayer::destroyScrollbar):
3739         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
3740         * rendering/RenderListBox.cpp:
3741         (WebCore::RenderListBox::createScrollbar):
3742         (WebCore::RenderListBox::destroyScrollbar):
3743         * rendering/RenderMenuList.cpp:
3744         (RenderMenuList::createScrollbar):
3745         * rendering/RenderMenuList.h:
3746         * rendering/RenderScrollbar.cpp:
3747         (WebCore::RenderScrollbar::createCustomScrollbar):
3748         (WebCore::RenderScrollbar::RenderScrollbar):
3749         * rendering/RenderScrollbar.h:
3750         * rendering/RenderSearchField.cpp:
3751         (WebCore::RenderSearchField::createScrollbar):
3752         * rendering/RenderSearchField.h:
3753
3754 2015-02-20  Enrica Casucci  <enrica@apple.com>
3755
3756         [WK2] Add support for font panel on OS X.
3757         https://bugs.webkit.org/show_bug.cgi?id=141777
3758
3759         Reviewed by Tim Horton.
3760
3761         This patch adds the necessary hooks to the Editor class to support
3762         the font panel.
3763
3764         * editing/Editor.h:
3765         * editing/mac/EditorMac.mm:
3766         (WebCore::Editor::applyFontStyles):
3767
3768 2015-02-20  Zalan Bujtas  <zalan@apple.com>
3769
3770         Invalid assert in CompositeEditCommand::insertNodeAfter/insertNodeBefore
3771         https://bugs.webkit.org/show_bug.cgi?id=141854
3772
3773         Reviewed by Ryosuke Niwa.
3774
3775         Inserting content before/after the body as the result of editing is a valid operation.
3776         This assert was originally introduced to cover cases where edited content would get moved
3777         out of body. However, asserting such operation properly is not possible atm.
3778
3779         Test: editing/inserting/insert-as-body-sibling.html
3780
3781         * editing/CompositeEditCommand.cpp:
3782         (WebCore::CompositeEditCommand::insertNodeBefore):
3783         (WebCore::CompositeEditCommand::insertNodeAfter):
3784
3785 2015-02-20  Chris Dumez  <cdumez@apple.com>
3786
3787         [WK2] Add more detailed diagnostic logging for measuring network cache efficacy
3788         https://bugs.webkit.org/show_bug.cgi?id=141803
3789         <rdar://problem/19632080>
3790
3791         Reviewed by Antti Koivisto.
3792
3793         Add more diagnostic logging keys for the network cache.
3794
3795         * page/DiagnosticLoggingKeys.cpp:
3796         (WebCore::DiagnosticLoggingKeys::missingValidatorFieldsKey):
3797         (WebCore::DiagnosticLoggingKeys::noLongerInCacheKey):
3798         (WebCore::DiagnosticLoggingKeys::isReloadIgnoringCacheDataKey):
3799         (WebCore::DiagnosticLoggingKeys::isAttachmentKey):
3800         (WebCore::DiagnosticLoggingKeys::isConditionalRequestKey):
3801         (WebCore::DiagnosticLoggingKeys::cacheControlNoStoreKey):
3802         (WebCore::DiagnosticLoggingKeys::uncacheableStatusCodeKey):
3803         (WebCore::DiagnosticLoggingKeys::unsupportedHTTPMethodKey):
3804         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryKey):
3805         (WebCore::DiagnosticLoggingKeys::varyingHeaderMismatchKey):
3806         (WebCore::WebCore::DiagnosticLoggingKeys::notHTTPFamilyKey):
3807         (WebCore::DiagnosticLoggingKeys::notInCacheKey):
3808         (WebCore::DiagnosticLoggingKeys::noLongerInCacheFailureKey): Deleted.
3809         (WebCore::DiagnosticLoggingKeys::unhandledRequestFailureKey): Deleted.
3810         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryFailureKey): Deleted.
3811         * page/DiagnosticLoggingKeys.h:
3812
3813 2015-02-20  Tim Horton  <timothy_horton@apple.com>
3814
3815         <attachment> turns the wrong blue when you highlight it
3816         https://bugs.webkit.org/show_bug.cgi?id=141853
3817
3818         Reviewed by Simon Fraser.
3819
3820         * rendering/RenderAttachment.h:
3821         * rendering/RenderReplaced.cpp:
3822         (WebCore::RenderReplaced::shouldDrawSelectionTint):
3823         (WebCore::RenderReplaced::paint):
3824         * rendering/RenderReplaced.h:
3825         Don't draw the selection tint for RenderAttachment.
3826
3827 2015-02-20  Tim Horton  <timothy_horton@apple.com>
3828
3829         Allow <attachment> elements to be focused
3830         https://bugs.webkit.org/show_bug.cgi?id=141847
3831
3832         Reviewed by Enrica Casucci.
3833
3834         * css/html.css:
3835         (attachment:focus):
3836         Disable focus rings for <attachment>.
3837
3838         * html/HTMLAttachmentElement.cpp:
3839         (WebCore::HTMLAttachmentElement::setFocus):
3840         * html/HTMLAttachmentElement.h:
3841         Allow HTMLAttachmentElement to get editing focus.
3842         Let RenderAttachment know when focus changes.
3843
3844         * rendering/RenderAttachment.cpp:
3845         (WebCore::RenderAttachment::paintReplaced):
3846         Paint the background in cyan when we are inside the selection or have focus.
3847         Otherwise, it will be gray.
3848
3849         (WebCore::RenderAttachment::focusChanged):
3850         When focus changes, repaint.
3851
3852         * rendering/RenderAttachment.h:
3853
3854 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
3855
3856         Rename ScrollElasticityController to ScrollController
3857         https://bugs.webkit.org/show_bug.cgi?id=141842
3858
3859         Reviewed by Simon Fraser.
3860
3861         No change in functionality.
3862
3863         * PlatformMac.cmake:
3864         * WebCore.order:
3865         * WebCore.xcodeproj/project.pbxproj:
3866         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3867         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3868         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
3869         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
3870         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer):
3871         * platform/mac/ScrollAnimatorMac.h:
3872         * platform/mac/ScrollAnimatorMac.mm:
3873         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
3874         (WebCore::ScrollAnimatorMac::isRubberBandInProgress):
3875         (WebCore::ScrollAnimatorMac::handleWheelEvent):
3876         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
3877         * platform/mac/ScrollController.h: Copied from WebCore/platform/mac/ScrollElasticityController.h.
3878         (WebCore::ScrollControllerClient::~ScrollControllerClient):
3879         (WebCore::ScrollElasticityControllerClient::~ScrollElasticityControllerClient): Deleted.
3880         * platform/mac/ScrollController.mm: Copied from WebCore/platform/mac/ScrollElasticityController.mm.
3881         (WebCore::ScrollController::ScrollController):
3882         (WebCore::ScrollController::handleWheelEvent):
3883         (WebCore::ScrollController::snapRubberBandTimerFired):
3884         (WebCore::ScrollController::isRubberBandInProgress):
3885         (WebCore::ScrollController::stopSnapRubberbandTimer):
3886         (WebCore::ScrollController::snapRubberBand):
3887         (WebCore::ScrollController::shouldRubberBandInHorizontalDirection):
3888         (WebCore::ScrollElasticityController::ScrollElasticityController): Deleted.
3889         (WebCore::ScrollElasticityController::handleWheelEvent): Deleted.
3890         (WebCore::ScrollElasticityController::snapRubberBandTimerFired): Deleted.
3891         (WebCore::ScrollElasticityController::isRubberBandInProgress): Deleted.
3892         (WebCore::ScrollElasticityController::stopSnapRubberbandTimer): Deleted.
3893         (WebCore::ScrollElasticityController::snapRubberBand): Deleted.
3894         (WebCore::ScrollElasticityController::shouldRubberBandInHorizontalDirection): Deleted.
3895         * platform/mac/ScrollElasticityController.h: Removed.
3896         * platform/mac/ScrollElasticityController.mm: Removed.
3897
3898 2015-02-20  Alexey Proskuryakov  <ap@apple.com>
3899
3900         Remove svn:keywords property.
3901
3902         As far as I can tell, the property had no effect on any of these files, but also,
3903         when it has effect it's likely harmful.
3904
3905         * Modules/mediacontrols/assets-apple-iOS.svg: Removed property svn:keywords.
3906         * Modules/mediacontrols/mediaControlsBase.css: Removed property svn:keywords.
3907         * Modules/mediacontrols/mediaControlsBase.js: Removed property svn:keywords.
3908         * bindings/js/JSDeviceMotionEventCustom.cpp: Removed property svn:keywords.
3909         * css/CSSKeyframeRule.cpp: Removed property svn:keywords.
3910         * css/CSSKeyframeRule.h: Removed property svn:keywords.
3911         * css/CSSKeyframesRule.cpp: Removed property svn:keywords.
3912         * css/CSSKeyframesRule.h: Removed property svn:keywords.
3913         * css/WebKitCSSFilterValue.cpp: Removed property svn:keywords.
3914         * css/WebKitCSSFilterValue.h: Removed property svn:keywords.
3915         * css/plugIns.css: Removed property svn:keywords.
3916         * dom/AnimationEvent.cpp: Removed property svn:keywords.
3917         * dom/AnimationEvent.h: Removed property svn:keywords.
3918         * dom/DeviceMotionClient.h: Removed property svn:keywords.
3919         * dom/DeviceMotionController.cpp: Removed property svn:keywords.
3920         * dom/DeviceMotionController.h: Removed property svn:keywords.
3921         * dom/DeviceMotionData.cpp: Removed property svn:keywords.
3922         * dom/DeviceMotionData.h: Removed property svn:keywords.
3923         * dom/DeviceMotionEvent.cpp: Removed property svn:keywords.
3924         * dom/DeviceMotionEvent.h: Removed property svn:keywords.
3925         * html/canvas/ANGLEInstancedArrays.cpp: Removed property svn:keywords.
3926         * html/canvas/ANGLEInstancedArrays.h: Removed property svn:keywords.
3927         * html/canvas/OESTextureFloatLinear.cpp: Removed property svn:keywords.
3928         * html/canvas/OESTextureFloatLinear.h: Removed property svn:keywords.
3929         * html/canvas/OESTextureHalfFloatLinear.cpp: Removed property svn:keywords.
3930         * html/canvas/OESTextureHalfFloatLinear.h: Removed property svn:keywords.
3931         * html/shadow/MediaControlsApple.cpp: Removed property svn:keywords.
3932         * html/shadow/MediaControlsApple.h: Removed property svn:keywords.
3933         * page/Frame.h: Removed property svn:keywords.
3934         * page/scrolling/ScrollingConstraints.cpp: Removed property svn:keywords.
3935         * page/scrolling/ScrollingConstraints.h: Removed property svn:keywords.
3936         * page/scrolling/ScrollingStateStickyNode.cpp: Removed property svn:keywords.
3937         * page/scrolling/ios/ScrollingTreeIOS.cpp: Removed property svn:keywords.
3938         * page/scrolling/mac/ScrollingTreeStickyNode.h: Removed property svn:keywords.
3939         * platform/ControlStates.h: Removed property svn:keywords.
3940         * platform/ScrollbarTheme.cpp: Removed property svn:keywords.
3941         * platform/graphics/GraphicsLayerUpdater.cpp: Removed property svn:keywords.
3942         * platform/graphics/GraphicsLayerUpdater.h: Removed property svn:keywords.
3943         * platform/graphics/ca/TileController.h: Removed property svn:keywords.
3944         * platform/graphics/ca/mac/WebTiledBackingLayer.h: Removed property svn:keywords.
3945         * platform/graphics/filters/FilterOperation.cpp: Removed property svn:keywords.
3946         * platform/graphics/filters/FilterOperation.h: Removed property svn:keywords.
3947         * platform/graphics/filters/FilterOperations.h: Removed property svn:keywords.
3948         * platform/ios/SystemMemory.h: Removed property svn:keywords.
3949         * platform/mock/ScrollbarThemeMock.cpp: Removed property svn:keywords.
3950         * platform/mock/ScrollbarThemeMock.h: Removed property svn:keywords.
3951         * platform/spi/cocoa/ServersSPI.h: Removed property svn:keywords.
3952         * platform/text/mac/ios-encodings.txt: Removed property svn:keywords.
3953         * rendering/FilterEffectRenderer.cpp: Removed property svn:keywords.
3954         * rendering/FilterEffectRenderer.h: Removed property svn:keywords.
3955         * rendering/RenderGeometryMap.cpp: Removed property svn:keywords.
3956         * rendering/RenderGeometryMap.h: Removed property svn:keywords.
3957         * rendering/RenderMediaControlElements.h: Removed property svn:keywords.
3958         * rendering/TextAutoSizing.cpp: Removed property svn:keywords.
3959         * rendering/TextAutoSizing.h: Removed property svn:keywords.
3960         * rendering/style/StylePendingImage.h: Removed property svn:keywords.
3961
3962 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
3963
3964         [Mac] REGRESSION: Scroll snap points broken after r180018
3965         https://bugs.webkit.org/show_bug.cgi?id=141821