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