HTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for conten...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-02-25  Ryosuke Niwa  <rniwa@webkit.org>
2
3         HTMLElement::collectStyleForPresentationAttribute duplicates a lot of code for contentEditableAttr
4         https://bugs.webkit.org/show_bug.cgi?id=142003
5
6         Reviewed by Sam Weinig.
7
8         Utilized contentEditableType to reduce the code duplication.
9
10         * html/HTMLElement.cpp:
11         (WebCore::contentEditableType): Moved and added a version that takes AtomicString.
12         (WebCore::HTMLElement::collectStyleForPresentationAttribute):
13
14 2015-02-25  Sergio Villar Senin  <svillar@igalia.com>
15
16         [CSS Grid Layout] Tracks growing beyond limits when they should not
17         https://bugs.webkit.org/show_bug.cgi?id=140883
18
19         Reviewed by Darin Adler.
20
21         Our track sizing algorithm implementation incorrectly grew some
22         tracks beyond limits when handling min-content and max-content
23         base sizes. In those cases we should only grow "any affected track
24         that happens to also have an intrinsic max track sizing function"
25         or all of them if there are none.
26
27         The problem was that we're using a vector of indexes pointing to
28         the vector with the list of affected tracks. Those indexes become
29         easily incorrect because the first thing we do in
30         distributeSpaceToTracks() is to sort the vector with the affected
31         tracks by growth potential.
32
33         Instead of that we now pass a vector with pointers to the list of
34         tracks allowed to grow over the limits. The size changes are now
35         directly stored in the GridTracks (it's called plannedSize)
36         instead of in a separate vector, so we don't need to worry about
37         tracks being rearranged (and we also get rid of the ugly vector of
38         indexes pointing to another vector).
39
40         * rendering/RenderGrid.cpp:
41         (WebCore::GridTrack::plannedSize): New member with getter/setter.
42         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
43         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
44         Pass a setXXX() function instead of a growXXX() one to ForItems().
45         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
46         Renamed additionalBreadthSpace to extraSpace which is the term
47         used by specs.
48         (WebCore::RenderGrid::distributeSpaceToTracks): Use GridTrack's
49         plannedSize instead of the old distribution vector.
50         (WebCore::GridTrack::growBaseSize): Deleted.
51         (WebCore::GridTrack::growGrowthLimit): Deleted.
52         * rendering/RenderGrid.h:
53
54 2015-02-25  Joanmarie Diggs  <jdiggs@igalia.com>
55
56         AX: Implement support for ARIA 1.1 'searchbox' role
57         https://bugs.webkit.org/show_bug.cgi?id=142004
58
59         Reviewed by Chris Fleizach.
60
61         Add a new accessible SearchFieldRole to handle both the ARIA role
62         and the "search" input type.
63
64         No new tests. Instead, added a new test case to roles-exposed.html
65         for the mapping, and updated roles-computedRoleString.html because
66         there is now a one-to-one mapping between the "search" input type
67         and an ARIA role.
68
69         * accessibility/AccessibilityNodeObject.cpp:
70         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
71         (WebCore::AccessibilityNodeObject::isSearchField):
72         * accessibility/AccessibilityObject.cpp:
73         (WebCore::AccessibilityObject::isARIATextControl):
74         (WebCore::AccessibilityObject::isARIAInput):
75         (WebCore::initializeRoleMap):
76         * accessibility/AccessibilityObject.h:
77         * accessibility/AccessibilityRenderObject.cpp:
78         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
79         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
80         (atkRole):
81         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
82         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
83         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
84         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
85         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
86         (createAccessibilityRoleMap):
87
88 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
89
90         Clarify some resizing terminology in ScrollView/FrameView
91         https://bugs.webkit.org/show_bug.cgi?id=141996
92
93         Reviewed by Zalan Bujtas.
94
95         ScrollableArea/ScrollView/FrameView had some confusing terminology around
96         contentsResized/visibleContentsResized/fixedLayoutSizeChanged.
97         
98         Clarify this by distinguishing between:
99         1. Available size changes because of
100             i) non-overlay scrollbar presence
101            ii) ScrollableArea frame change
102         2. Removing fixedLayoutSizeChanged() and just treating it like an
103            available size change.
104            
105         contentsResized() is relegated to simply being a hook that allows Mac to
106         flash overlay scrollbars.
107         
108         The confusingly named visibleContentsResized() is now updateContentsSize(),
109         and is the way that a ScrollableArea tells its subclasss that it should recompute
110         the size of the contents (i.e. do a layout).
111
112         * page/FrameView.cpp:
113         (WebCore::FrameView::setContentsSize): No longer mysteriously skip the
114         FrameView implementation of contentsResized(), which used to do a setNeedsLayout()
115         which we didn't want to do from setContentsSize(), which itself happens as a result of layout.
116         (WebCore::FrameView::adjustViewSize): Whitespace.
117         (WebCore::FrameView::layout): Ditto.
118         (WebCore::FrameView::availableContentSizeChanged): Called on frame size change, or scrollbar
119         change.
120         (WebCore::FrameView::updateContentsSize): This actually does the layout.
121         (WebCore::FrameView::scrollbarStyleChanged): Always call the base class;  ScrollView::scrollbarStyleChanged
122         will bail if not a forced update.
123         (WebCore::FrameView::setCustomFixedPositionLayoutRect): Forces a layout via updateContentsSize() now.
124         (WebCore::FrameView::contentsResized): Deleted.
125         (WebCore::FrameView::fixedLayoutSizeChanged): Deleted.
126         (WebCore::FrameView::visibleContentsResized): Deleted.
127         * page/FrameView.h:
128         * platform/ScrollView.cpp:
129         (WebCore::ScrollView::setFixedLayoutSize): Calls availableContentSizeChanged() now.
130         (WebCore::ScrollView::setUseFixedLayout): Ditto.
131         (WebCore::ScrollView::availableContentSizeChanged): Update scrollbars if that's not
132         the reason we are being called.
133         (WebCore::ScrollView::updateScrollbars): contentsResized() was the thing that caused setNeedsLayout();
134         replace it with availableContentSizeChanged(). visibleContentsResized() did the layout, and
135         replace with updateContentsSize().
136         (WebCore::ScrollView::setFrameRect): Call availableContentSizeChanged() now. This takes care of
137         updating scrollbars, so no need to explicitly do that.
138         (WebCore::ScrollView::scrollbarStyleChanged): Call the base class.
139         (WebCore::ScrollView::fixedLayoutSizeChanged): Deleted.
140         * platform/ScrollView.h:
141         * platform/ScrollableArea.cpp:
142         (WebCore::ScrollableArea::availableContentSizeChanged): Call scrollAnimator->contentsResized()
143         to flash the scrollbars.
144         (WebCore::ScrollableArea::scrolledToRight):
145         (WebCore::ScrollableArea::scrollbarStyleChanged): Call availableContentSizeChanged() since
146         scrollbar style affects available space.
147         * platform/ScrollableArea.h:
148         (WebCore::ScrollableArea::updateContentsSize):
149         (WebCore::ScrollableArea::scrollbarStyleChanged): Deleted.
150
151 2015-02-24  Ryosuke Niwa  <rniwa@webkit.org>
152
153         Unreviewed Mavericks build attempt fix after r180609.
154
155         * platform/graphics/mac/GraphicsContext3DMac.mm:
156         (WebCore::GraphicsContext3D::GraphicsContext3D):
157         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary):
158
159 2015-02-19  Roger Fong  <roger_fong@apple.com>
160
161         WebGL: Destroy the GLContext if a GPU restart has been detected.
162         https://bugs.webkit.org/show_bug.cgi?id=141567.
163         <rdar://problem/18507496>
164
165         Reviewed by Dean Jackson.
166
167         * html/canvas/WebGLRenderingContextBase.cpp:
168         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
169         * platform/graphics/GraphicsContext3D.h:
170         (WebCore::GraphicsContext3D::setWebGLContext): 
171         Keep track of which WebGLRenderingContext is associated with the current GraphicsContext3D.
172         * platform/graphics/mac/GraphicsContext3DMac.mm:
173         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary): Helper method to check GPU status.
174         (WebCore::GraphicsContext3D::GraphicsContext3D): 
175         Don’t immediately abort the GPU process when the restart status is kCGLCPGPURestartStatusBlacklisted.
176         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
177         (WebCore::GraphicsContext3D::forceContextLost): 
178         Force the WebGLRenderingContext to be lost.
179         (WebCore::GraphicsContext3D::drawArrays): Check GPU status after calling drawArrays.
180         (WebCore::GraphicsContext3D::drawElements): Check GPU status after calling drawElements.
181         * WebCore.xcodeproj/project.pbxproj: Add SPI header for iOS.
182         * platform/spi/ios/OpenGLESSPI.h: Added.
183
184 2015-02-24  Stephanie Lewis  <slewis@apple.com>
185
186         Unreviewed ios build fix after http://trac.webkit.org/changeset/180602.
187
188         * bindings/js/JSDOMWindowBase.cpp:
189         (WebCore::JSDOMWindowBase::commonVM):
190
191 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
192
193         Use an enum for scrollbar style
194         https://bugs.webkit.org/show_bug.cgi?id=141985
195
196         Reviewed by Beth Dakin.
197
198         Switch to an enum class for the scrollbar style (normal or overlay).
199
200         * page/ChromeClient.h:
201         * page/FrameView.cpp:
202         (WebCore::FrameView::scrollbarStyleChanged):
203         * page/FrameView.h:
204         * platform/ScrollTypes.h:
205         * platform/ScrollView.cpp:
206         (WebCore::ScrollView::scrollbarStyleChanged):
207         * platform/ScrollView.h:
208         * platform/ScrollableArea.h:
209         (WebCore::ScrollableArea::scrollbarStyleChanged):
210         * platform/mac/ScrollAnimatorMac.mm:
211         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
212
213 2015-02-24  Commit Queue  <commit-queue@webkit.org>
214
215         Unreviewed, rolling out r180599.
216         https://bugs.webkit.org/show_bug.cgi?id=141998
217
218         Lots of new test failures (Requested by smfr on #webkit).
219
220         Reverted changeset:
221
222         "Parsing support for -webkit-trailing-word"
223         https://bugs.webkit.org/show_bug.cgi?id=141939
224         http://trac.webkit.org/changeset/180599
225
226 2015-02-24  Sam Weinig  <sam@webkit.org>
227
228         [Attachment] Give <attachment> elements an underlying File
229         https://bugs.webkit.org/show_bug.cgi?id=141993
230
231         Reviewed by Tim Horton.
232
233         - Add a JS subclass for attachments so that <attachment>s are
234           instances of HTMLAttachmentElement rather than HTMLElement.
235         - Give HTMLAttachmentElements an underlying File that they
236           are the representation of. Expose it via a new 'file' property.
237         - Expose a new Internals function called window.internals.createFile(url)
238           that allows creating File objects for testing.
239
240         * CMakeLists.txt:
241         * DerivedSources.cpp:
242         * DerivedSources.make:
243         * WebCore.vcxproj/WebCore.vcxproj:
244         * WebCore.vcxproj/WebCore.vcxproj.filters:
245         * WebCore.xcodeproj/project.pbxproj:
246         * fileapi/File.h:
247         * html/HTMLAttachmentElement.cpp:
248         (WebCore::HTMLAttachmentElement::~HTMLAttachmentElement):
249         (WebCore::HTMLAttachmentElement::file):
250         (WebCore::HTMLAttachmentElement::setFile):
251         * html/HTMLAttachmentElement.h:
252         * html/HTMLAttachmentElement.idl: Added.
253         * html/HTMLTagNames.in:
254         * testing/Internals.cpp:
255         (WebCore::Internals::createFile):
256         * testing/Internals.h:
257         * testing/Internals.idl:
258
259 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
260
261         AX: Implement support for ARIA 1.1 'switch' role
262         https://bugs.webkit.org/show_bug.cgi?id=141986
263
264         Reviewed by Chris Fleizach.
265
266         Map the role to ATK_ROLE_TOGGLE_BUTTON for Gtk and Efl; on the Mac, to
267         AXCheckBox with a subrole of AXSwitch. Ensure it looks and acts like a
268         widget to accessibility APIs (supports and emits notifications when
269         toggled, doesn't have children, exposes a name and description when
270         provided).
271
272         Tests: accessibility/aria-switch-checked.html
273                accessibility/aria-switch-sends-notification.html
274                accessibility/aria-switch-text.html
275
276         * accessibility/AccessibilityNodeObject.cpp:
277         (WebCore::AccessibilityNodeObject::canHaveChildren):
278         (WebCore::AccessibilityNodeObject::isChecked):
279         (WebCore::AccessibilityNodeObject::visibleText):
280         (WebCore::AccessibilityNodeObject::title):
281         * accessibility/AccessibilityObject.cpp:
282         (WebCore::AccessibilityObject::isARIAInput):
283         (WebCore::AccessibilityObject::actionVerb):
284         (WebCore::initializeRoleMap):
285         (WebCore::AccessibilityObject::supportsChecked):
286         (WebCore::AccessibilityObject::checkboxOrRadioValue):
287         * accessibility/AccessibilityObject.h:
288         (WebCore::AccessibilityObject::isSwitch):
289         * accessibility/atk/AXObjectCacheAtk.cpp:
290         (WebCore::AXObjectCache::postPlatformNotification):
291         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
292         (atkRole):
293         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
294         (-[WebAccessibilityObjectWrapper accessibilityCanFuzzyHitTest]):
295         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
296         (-[WebAccessibilityObjectWrapper determineIsAccessibilityElement]):
297         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
298         (createAccessibilityRoleMap):
299         (-[WebAccessibilityObjectWrapper subrole]):
300         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
301
302 2015-02-24  Myles C. Maxfield  <mmaxfield@apple.com>
303
304         [Mac] [iOS] Parsing support for -apple-trailing-word
305         https://bugs.webkit.org/show_bug.cgi?id=141939
306
307         Reviewed by Andreas Kling.
308
309         This patch implements initial parsing support for the -apple-trailing-word CSS property.
310         This property has two possible (mutually exclusive) values: auto and
311         -apple-partially-balanced. This property is inherited.
312
313         The work for this property is behind the ENABLE(CSS_TRAILING_WORD) preprocessor define.
314
315         This is an internal property that will allow us to control line breaking behavior for
316         short paragraphs.
317
318         Note that, because of the implementation of cssValueKeywordID() in CSSParser.cpp,
319         the new value must be implemented as -webkit-partially-balanced. Using the -apple-
320         prefix will work, but if you getComputedStyle(), it will return the -webkit- prefixed
321         version.
322
323         Test: platform/mac/fast/text/trailing-word-parse.html
324
325         * Configurations/FeatureDefines.xcconfig:
326         * css/CSSComputedStyleDeclaration.cpp:
327         (WebCore::ComputedStyleExtractor::propertyValue): Turn internal representation into a
328         CSS value.
329         * css/CSSParser.cpp:
330         (WebCore::isValidKeywordPropertyAndValue): Updated for new keyword property / value
331         pair.
332         (WebCore::isKeywordPropertyID): New property is a keyword property.
333         (WebCore::CSSParser::parseValue): Use the keyword property codepath.
334         * css/CSSPrimitiveValueMappings.h:
335         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Convert to and from the internal
336         representation and CSS values.
337         (WebCore::CSSPrimitiveValue::operator TrailingWord):
338         * css/CSSPropertyNames.in: New property.
339         * css/CSSValueKeywords.in: New value.
340         * rendering/SimpleLineLayout.cpp:
341         (WebCore::SimpleLineLayout::canUseFor): Can't use SimpleLineLayout for this.
342         * rendering/style/RenderStyle.h: Getter, setter and initial value.
343         * rendering/style/RenderStyleConstants.h: Internal data type.
344         * rendering/style/StyleRareInheritedData.h: One bit to control this style property.
345
346 2015-02-24  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
347
348         Remove DecodingTask::create and DatabaseOpenTask::create
349         https://bugs.webkit.org/show_bug.cgi?id=141966
350
351         Reviewed by Anders Carlsson.
352
353         These create() factory functions are redundant. We can use std::make_unique<> directly.
354
355         No new tests, no behavior changes.
356
357         * Modules/webaudio/AsyncAudioDecoder.cpp:
358         (WebCore::AsyncAudioDecoder::decodeAsync):
359         (WebCore::AsyncAudioDecoder::DecodingTask::create): Deleted.
360         * Modules/webaudio/AsyncAudioDecoder.h:
361         * Modules/webdatabase/Database.cpp:
362         (WebCore::Database::openAndVerifyVersion):
363         * Modules/webdatabase/DatabaseTask.h:
364         (WebCore::DatabaseBackend::DatabaseOpenTask::create): Deleted.
365
366 2015-02-24  Commit Queue  <commit-queue@webkit.org>
367
368         Unreviewed, rolling out r180578.
369         https://bugs.webkit.org/show_bug.cgi?id=141992
370
371         Broke scrolling in Inspector Console. (Requested by JoePeck on
372         #webkit).
373
374         Reverted changeset:
375
376         "[Mac] WebKit abandons overlay scrollbar CALayers."
377         https://bugs.webkit.org/show_bug.cgi?id=141943
378         http://trac.webkit.org/changeset/180578
379
380 2015-02-24  Dean Jackson  <dino@apple.com>
381
382         [ios Media] the inline controls are visible after pressing Done on iPhone
383         https://bugs.webkit.org/show_bug.cgi?id=141987
384         <rdar://problem/19944110>
385
386         Reviewed by Beth Dakin.
387
388         When exiting out of a playing video, we should show the
389         start playback button if we don't allow inline media
390         (such as on iPhone).
391
392         * Modules/mediacontrols/mediaControlsiOS.js:
393         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): Test for
394         allowsInline as well.
395
396 2015-02-24  Zalan Bujtas  <zalan@apple.com>
397
398         Pass FillLayer reference instead of pointer to RenderBoxModelObject::calculateBackgroundImageGeometry.
399         https://bugs.webkit.org/show_bug.cgi?id=141982
400
401         Reviewed by Simon Fraser.
402
403         There should always be a valid FillLayer.
404
405         No change in functionality.
406
407         * rendering/RenderBox.cpp:
408         (WebCore::RenderBox::getBackgroundPaintedExtent):
409         (WebCore::RenderBox::maskClipRect):
410         (WebCore::RenderBox::repaintLayerRectsForImage):
411         * rendering/RenderBoxModelObject.cpp:
412         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
413         (WebCore::RenderBoxModelObject::calculateFillTileSize):
414         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
415         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
416         * rendering/RenderBoxModelObject.h:
417
418 2015-02-24  Dean Jackson  <dino@apple.com>
419
420         [iOS Media] Be specific about which document to use for the timeline background canvas
421         https://bugs.webkit.org/show_bug.cgi?id=141981
422
423         Reviewed by Eric Carlson.
424
425         In some cases, especially with nested iframes, the document
426         reference for the shadow DOM might not be the one used
427         to create a -webkit-canvas context for rendering via CSS.
428         Explicitly get the context from the video's owner
429         document.
430
431         There is still a bug here:
432         https://bugs.webkit.org/show_bug.cgi?id=141983
433
434         * Modules/mediacontrols/mediaControlsiOS.js:
435         (ControllerIOS.prototype.drawTimelineBackground):
436
437 2015-02-24  Zalan Bujtas  <zalan@apple.com>
438
439         Remove unused BackgroundImageGeometry::m_destOrigin
440         https://bugs.webkit.org/show_bug.cgi?id=141980
441
442         Reviewed by Simon Fraser.
443
444         Remove BackgroundImageGeometry::m_destOrigin and its dependencies.
445         They are not used at all.
446
447         No change in functionality.
448
449         * rendering/RenderBoxModelObject.cpp:
450         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
451         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
452         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
453         (WebCore::BackgroundImageGeometry::relativePhase): Deleted.
454         * rendering/RenderBoxModelObject.h:
455         (WebCore::BackgroundImageGeometry::destOrigin): Deleted.
456         (WebCore::BackgroundImageGeometry::setDestOrigin): Deleted.
457         * rendering/svg/RenderSVGResourceMasker.cpp:
458         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
459
460 2015-02-24  Zalan Bujtas  <zalan@apple.com>
461
462         RenderBoxModelObject::calculateBackgroundImageGeometry should return BackgroundImageGeometry.
463         https://bugs.webkit.org/show_bug.cgi?id=141979
464
465         Reviewed by Simon Fraser.
466
467         No change in functionality.
468
469         * rendering/RenderBox.cpp:
470         (WebCore::RenderBox::getBackgroundPaintedExtent):
471         (WebCore::RenderBox::maskClipRect):
472         (WebCore::RenderBox::repaintLayerRectsForImage):
473         * rendering/RenderBoxModelObject.cpp:
474         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
475         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
476         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
477         * rendering/RenderBoxModelObject.h:
478
479 2015-02-24  Zalan Bujtas  <zalan@apple.com>
480
481         Switch BackgroundImageGeometry's m_phase from LayoutPoint to LayoutSize.
482         https://bugs.webkit.org/show_bug.cgi?id=141972
483
484         Reviewed by Simon Fraser.
485
486         Image geometry's phase represents distance.
487
488         No change in functionality.
489
490         * WebCore.order:
491         * platform/graphics/GraphicsLayer.h:
492         (WebCore::GraphicsLayer::setContentsTilePhase):
493         (WebCore::GraphicsLayer::contentsTilePhase):
494         * platform/graphics/texmap/TextureMapperLayer.cpp:
495         (WebCore::TextureMapperLayer::computePatternTransformIfNeeded):
496         (WebCore::TextureMapperLayer::setContentsTilePhase):
497         * platform/graphics/texmap/TextureMapperLayer.h:
498         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
499         (WebCore::CoordinatedGraphicsLayer::setContentsTilePhase):
500         * rendering/RenderBoxModelObject.cpp:
501         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
502         (WebCore::BackgroundImageGeometry::setNoRepeatX):
503         (WebCore::BackgroundImageGeometry::setNoRepeatY):
504         (WebCore::BackgroundImageGeometry::useFixedAttachment):
505         (WebCore::BackgroundImageGeometry::relativePhase):
506         (WebCore::RenderBoxModelObject::pixelSnapBackgroundImageGeometryForPainting):
507         (WebCore::RenderBoxModelObject::getGeometryForBackgroundImage):
508         * rendering/RenderBoxModelObject.h:
509         (WebCore::BackgroundImageGeometry::phase):
510         (WebCore::BackgroundImageGeometry::setPhase):
511         (WebCore::BackgroundImageGeometry::setPhaseX):
512         (WebCore::BackgroundImageGeometry::setPhaseY):
513         * rendering/RenderLayerBacking.cpp:
514         (WebCore::RenderLayerBacking::resetContentsRect):
515         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage):
516         * rendering/svg/RenderSVGResourceMasker.cpp:
517         (WebCore::RenderSVGResourceMasker::drawMaskForRenderer):
518
519 2015-02-24  Andreas Kling  <akling@apple.com>
520
521         [Mac] WebKit abandons overlay scrollbar CALayers.
522         <https://webkit.org/b/141943>
523         <rdar://problem/19932199>
524
525         Reviewed by Beth Dakin.
526
527         * platform/mac/ScrollAnimatorMac.mm:
528         (-[WebScrollbarPartAnimation initWithScrollbar:featureToAnimate:animateFrom:animateTo:duration:]):
529         Use NSAnimationNonblockingThreaded to ensure that NSAnimations get cleaned up after they finish.
530         The animation was indirectly retaining the overlay scrollbar's CALayer, causing significant
531         amounts of abandoned memory to accumulate over time.
532
533 2015-02-24  Anders Carlsson  <andersca@apple.com>
534
535         Implement more of the data fetching API
536         https://bugs.webkit.org/show_bug.cgi?id=141975
537
538         Reviewed by Andreas Kling.
539
540         Add API for getting origins in a given session that has cached data.
541
542         * loader/cache/MemoryCache.cpp:
543         (WebCore::MemoryCache::originsWithCache):
544
545 2015-02-24  Simon Fraser  <simon.fraser@apple.com>
546
547         Use nullptr in more places in FrameView, RenderView, RenderObject
548         https://bugs.webkit.org/show_bug.cgi?id=141974
549
550         Reviewed by Zalan Bujtas.
551
552         0 -> nullptr in FrameView.h/cpp, RenderView.h/cpp, RenderObject.h/cpp.
553         
554         Rename FrameView::m_deferSetNeedsLayouts to FrameView::m_deferSetNeedsLayoutCount
555         to make it more clear that it's a count.
556
557         * page/FrameView.cpp:
558         (WebCore::FrameView::FrameView):
559         (WebCore::FrameView::reset):
560         (WebCore::FrameView::setContentsSize):
561         (WebCore::FrameView::calculateScrollbarModesForLayout):
562         (WebCore::FrameView::layerForScrolling):
563         (WebCore::FrameView::layerForHorizontalScrollbar):
564         (WebCore::FrameView::layerForVerticalScrollbar):
565         (WebCore::FrameView::layerForScrollCorner):
566         (WebCore::FrameView::tiledBacking):
567         (WebCore::FrameView::scrollLayerID):
568         (WebCore::FrameView::layerForOverhangAreas):
569         (WebCore::FrameView::setWantsLayerForTopOverHangArea):
570         (WebCore::FrameView::setWantsLayerForBottomOverHangArea):
571         (WebCore::FrameView::hasCompositedContentIncludingDescendants):
572         (WebCore::FrameView::layoutRoot):
573         (WebCore::FrameView::forceLayoutParentViewIfNeeded):
574         (WebCore::FrameView::layout):
575         (WebCore::FrameView::hostWindow):
576         (WebCore::FrameView::scheduleRelayout):
577         (WebCore::FrameView::scheduleRelayoutOfSubtree):
578         (WebCore::FrameView::needsLayout):
579         (WebCore::FrameView::setNeedsLayout):
580         (WebCore::FrameView::enclosingScrollableArea):
581         (WebCore::FrameView::parentFrameView):
582         (WebCore::FrameView::paintControlTints):
583         (WebCore::FrameView::adjustPageHeightDeprecated):
584         (WebCore::FrameView::axObjectCache):
585         * page/FrameView.h:
586         * rendering/RenderObject.cpp:
587         (WebCore::RenderObject::RenderObject):
588         (WebCore::RenderObject::nextInPreOrderAfterChildren):
589         (WebCore::RenderObject::previousInPreOrder):
590         (WebCore::RenderObject::firstLeafChild):
591         (WebCore::RenderObject::lastLeafChild):
592         (WebCore::RenderObject::traverseNext):
593         (WebCore::RenderObject::firstLineBlock):
594         (WebCore::RenderObject::containerForRepaint):
595         (WebCore::RenderObject::showRenderSubTreeAndMark):
596         (WebCore::RenderObject::localToAbsolute):
597         (WebCore::RenderObject::container):
598         * rendering/RenderObject.h:
599         (WebCore::RenderObject::virtualContinuation):
600         (WebCore::RenderObject::node):
601         (WebCore::RenderObject::nonPseudoNode):
602         (WebCore::RenderObject::localToAbsoluteQuad):
603         (WebCore::RenderObject::absoluteQuads):
604         (WebCore::RenderObject::absoluteClippedOverflowRect):
605         (WebCore::RenderObject::outlineBoundsForRepaint):
606         (WebCore::RenderObject::computeAbsoluteRepaintRect):
607         (WebCore::RenderObject::selectionRect):
608         (WebCore::RenderObject::imageChanged):
609         (WebCore::RenderObject::addFocusRingRects):
610         (WebCore::RenderObject::absoluteOutlineBounds):
611         * rendering/RenderView.cpp:
612         (WebCore::SelectionIterator::next):
613         (WebCore::RenderView::RenderView):
614         (WebCore::RenderView::mapLocalToContainer):
615         (WebCore::RenderView::pushMappingToContainer):
616         (WebCore::RenderView::computeRectForRepaint):
617         (WebCore::rendererAfterPosition):
618         (WebCore::RenderView::splitSelectionBetweenSubtrees):
619         (WebCore::RenderView::rootBackgroundIsEntirelyFixed):
620         * rendering/RenderView.h:
621
622 2015-02-24  Yusuke Suzuki  <utatane.tea@gmail.com>
623
624         REGRESSION(r179429): Can't type comments in Facebook
625         https://bugs.webkit.org/show_bug.cgi?id=141859
626
627         Reviewed by Brent Fulgham.
628
629         Enable SymbolEnabled runtime flag in inspector context.
630
631         * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
632         * WebCore.order:
633         * WebCore.vcxproj/WebCore.vcxproj:
634         * WebCore.vcxproj/WebCore.vcxproj.filters:
635         * bindings/js/JSDOMWindowBase.cpp:
636         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
637         (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
638         * bindings/js/JSDOMWindowBase.h:
639         * bindings/js/JSWorkerGlobalScopeBase.cpp:
640         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
641         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
642         * bindings/js/JSWorkerGlobalScopeBase.h:
643         * inspector/InspectorFrontendClientLocal.cpp:
644         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
645         * page/Settings.h:
646         * page/Settings.in:
647
648 2015-02-24  Manuel Rego Casasnovas  <rego@igalia.com>
649
650         [CSS Grid Layout] Support "sparse" in auto-placed items locked to a row/column
651         https://bugs.webkit.org/show_bug.cgi?id=141748
652
653         Reviewed by Sergio Villar Senin.
654
655         The first step of grid item placement algorithm has been updated in
656         order to support both "sparse" and "dense" modes. Current code is always
657         doing a "dense" packing in this case.
658
659         See: http://dev.w3.org/csswg/css-grid/#auto-placement-algo
660
661         Test: fast/css-grid-layout/grid-item-auto-placement-fixed-row-column.html
662
663         * rendering/RenderGrid.cpp:
664         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Add a cursor
665         for each row/column and use it to place items in the right position.
666
667 2015-02-24  Joanmarie Diggs  <jdiggs@igalia.com>
668
669         [GTK] Layout Test accessibility/roles-exposed.html is failing
670         https://bugs.webkit.org/show_bug.cgi?id=141960
671
672         Reviewed by Martin Robinson.
673
674         The test was failing because Gtk now uses GtkColorChooserDialog for the
675         color input, making the input field a button which results in the color
676         chooser dialog appearing. As a side effect of this change, the input now
677         has an accessible role of ColorWell, which is currently mapped to
678         ATK_ROLE_COLOR_CHOOSER (which is by definition the dialog which results
679         upon activating the button input field). Changed the Gtk platform mapping
680         to ATK_ROLE_BUTTON, leaving the Efl mapping as-is.
681
682         No new tests. Instead, updated and unskipped failing test.
683
684         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
685         (atkRole):
686
687 2015-02-24  Michael Catanzaro  <mcatanzaro@igalia.com>
688
689         [GTK] Fonts loaded via @font-face look bad
690         https://bugs.webkit.org/show_bug.cgi?id=140994
691
692         Reviewed by Martin Robinson.
693
694         We've had several complaints that woff fonts look bad on some websites. This seems to be a
695         combination of multiple issues. For one, we don't look at Fontconfig settings at all when
696         creating a web font. This commit changes FontPlatformData::initializeWithFontFace to instead
697         use sane default settings from Fontconfig when loading a web font, rather than accepting the
698         default settings from GTK+, which are normally overridden by Fontconfig when loading system
699         fonts. However, we will hardcode the hinting setting for web fonts to always force use of
700         the light autohinter, so that we do not use a font's native hints. This avoids compatibility
701         issues when fonts with poor native hinting are only tested in browsers that do not use the
702         native hints. It also allows us to sidestep future security vulnerabilities in FreeType's
703         bytecode interpreter.
704
705         The net result of this is that there should be little noticable difference if you have GTK+
706         set to use slight hinting (which forces use of the autohinter) unless you have customized
707         Fontconfig configuration, but a dramatic improvement with particular fonts if you use medium
708         or full hinting. This should reduce complaints about our font rendering on "fancy sites."
709
710         No new tests, since the affected fonts we've found are not freely redistributable.
711
712         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
713         (WebCore::FontCustomPlatformData::FontCustomPlatformData): Force web fonts to be autohinted.
714         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
715         (WebCore::getDefaultCairoFontOptions): Renamed to disambiguate.
716         (WebCore::getDefaultFontconfigOptions): Added.
717         (WebCore::FontPlatformData::initializeWithFontFace): Always call
718         FontPlatformData::setCairoOptionsFromFontConfigPattern. If the FontPlatformData was not
719         created with an FcPattern (e.g. because this is a web font), call
720         getDefaultFontconfigOptions to get a sane default FcPattern.
721         (WebCore::FontPlatformData::setOrientation): Renamed call to getDefaultCairoFontOptions.
722         (WebCore::getDefaultFontOptions): Deleted.
723
724 2015-02-24  Andreas Kling  <akling@apple.com>
725
726         [Cocoa] Break internal reference cycle in WebCore::Font.
727         <https://webkit.org/b/141941>
728         <rdar://problem/19650570>
729
730         Reviewed by Antti Koivisto.
731
732         The Cocoa implementation of Font::platformCreateScaledFont() tried to be smart and use the FontCache.
733         This didn't work out well when scaling a 0pt Font, since scaling 0pt by any factor will return 0pt.
734
735         We'd have a 0pt font, scale it by 0.7 to get a small-caps variant, and then cache that small-caps
736         variant (really "this") in Font::m_derivedData->smallCaps.
737
738         Fix this by having Cocoa Font scaling do exactly what other platforms do: create a new Font every time.
739         This stops us from accumulating tons of abandoned Font objects over time.
740
741         * platform/graphics/Font.cpp:
742         (WebCore::Font::verticalRightOrientationFont):
743         (WebCore::Font::uprightOrientationFont):
744         (WebCore::Font::smallCapsFont):
745         (WebCore::Font::emphasisMarkFont):
746         (WebCore::Font::brokenIdeographFont):
747         (WebCore::Font::nonSyntheticItalicFont): Add assertions to guard against reference cycles inside a Font.
748
749         * platform/graphics/cocoa/FontCocoa.mm:
750         (WebCore::Font::platformCreateScaledFont): Always create a new Font when scaling an existing Font to a different size.
751
752 2015-02-24  Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
753
754         [Streams API] Reading ReadableStream ready and closed attributes should not always create a new promise
755         https://bugs.webkit.org/show_bug.cgi?id=141650
756
757         Reviewed by Benjamin Poulain.
758
759         The JSPromiseDeferred objects returned by JSReadableStream::ready and JSReadableStream::closed should be stored somewhere.
760         This patch stores them as private slots in JSReadableStream.
761         This is close to the description in https://streams.spec.whatwg.org/#rs-internal-slots.
762
763         An alternative would be to have these objects as JSReadableStream class members, thus modifying the binding generator.
764         That may be the cleanest solution, especially if other APIs express the same need.
765         Another alternative is to store DeferredWrapper in ReadableStream objects.
766         But it is currently preferred to keep DeferredWrapper in bindings/js code.
767
768         Added new constructor for DeferredWrapper to use these stored values.
769         Updated ready and closed methods to use that new constructor.
770         Changes are covered by new test in streams/readablestream-constructor.html.
771
772         * bindings/js/JSDOMPromise.cpp:
773         (WebCore::DeferredWrapper::DeferredWrapper):
774         * bindings/js/JSDOMPromise.h:
775         * bindings/js/JSReadableStreamCustom.cpp:
776         (WebCore::closedPromiseSlotName):
777         (WebCore::getOrCreatePromiseDeferredFromObject):
778         (WebCore::readyPromiseSlotName):
779         (WebCore::JSReadableStream::ready):
780         (WebCore::JSReadableStream::closed):
781         * bindings/js/ReadableStreamJSSource.cpp:
782         (WebCore::setInternalSlotToObject):
783         (WebCore::getInternalSlotFromObject):
784         * bindings/js/ReadableStreamJSSource.h:
785
786 2015-02-24  Dhi Aurrahman  <diorahman@rockybars.com>
787
788         Always serialize :lang()'s arguments to strings
789         https://bugs.webkit.org/show_bug.cgi?id=141944
790
791         Reviewed by Benjamin Poulain.
792
793         As specified in [1] :lang()'s arguments are always serialized to strings.
794
795         [1] http://dev.w3.org/csswg/cssom/#serializing-selectors
796
797         Related tests are updated.
798
799         * css/CSSGrammar.y.in:
800         * css/CSSParserValues.cpp:
801         (WebCore::CSSParserSelector::setLangArgumentList):
802         * css/CSSParserValues.h:
803         (WebCore::CSSParserString::init):
804         (WebCore::CSSParserString::clear):
805         (WebCore::CSSParserString::tokenType): Deleted.
806         (WebCore::CSSParserString::setTokenType): Deleted.
807         * css/CSSSelector.cpp:
808         (WebCore::appendLangArgumentList):
809         (WebCore::CSSSelector::setLangArgumentList):
810         * css/CSSSelector.h:
811         (WebCore::CSSSelector::langArgumentList):
812         * css/SelectorCheckerTestFunctions.h:
813         (WebCore::matchesLangPseudoClass):
814         * cssjit/SelectorCompiler.cpp:
815         (WebCore::SelectorCompiler::addPseudoClassType):
816         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsInLanguage):
817
818 2015-02-24  Antti Koivisto  <antti@apple.com>
819
820        Give TemporaryChange for m_inLoadPendingImages assertion a name so it actually does something.
821
822         * css/StyleResolver.cpp:
823         (WebCore::StyleResolver::loadPendingImages):
824
825 2015-02-23  Commit Queue  <commit-queue@webkit.org>
826
827         Unreviewed, rolling out r180547 and r180550.
828         https://bugs.webkit.org/show_bug.cgi?id=141957
829
830         Broke 10 Windows tests. (Requested by bfulgham_ on #webkit).
831
832         Reverted changesets:
833
834         "REGRESSION(r179429): Can't type comments in Facebook"
835         https://bugs.webkit.org/show_bug.cgi?id=141859
836         http://trac.webkit.org/changeset/180547
837
838         "Constructor returning null should construct an object instead
839         of null"
840         https://bugs.webkit.org/show_bug.cgi?id=141640
841         http://trac.webkit.org/changeset/180550
842
843 2015-02-23  Ryosuke Niwa  <rniwa@webkit.org>
844
845         Disable font loading events until our implementation gets updated to match the latest spec
846         https://bugs.webkit.org/show_bug.cgi?id=141938
847
848         Reviewed by Andreas Kling.
849
850         Revert r173531 for now since our implementation is outdated.
851
852         * Configurations/FeatureDefines.xcconfig:
853
854 2015-02-23  Brent Fulgham  <bfulgham@apple.com>
855
856         EventHandler references deleted Scrollbar
857         https://bugs.webkit.org/show_bug.cgi?id=141931
858         <rdar://problem/19915210>
859
860         Reviewed by Tim Horton.
861
862         Tested by scrollbars/overflow-custom-scrollbar-crash.html
863
864         Update the EventHandler class to use a WeakPtr to reference the
865         last used Scrollbar, rather than retaining the Scrollbar and
866         artificially extending its life. This keeps the EventHandler
867         state in proper sync with the state of the render tree, and
868         avoids cases where we have destroyed a ScrollableArea (and
869         Scrollbar) but are still sending messages to a fake zombie
870         version of the element.
871
872         * page/EventHandler.cpp:
873         (WebCore::EventHandler::clear):
874         (WebCore::EventHandler::handleMousePressEvent):
875         (WebCore::EventHandler::updateMouseEventTargetNode):
876         (WebCore::EventHandler::updateLastScrollbarUnderMouse):
877         * page/EventHandler.h:
878         * platform/Scrollbar.cpp:
879         (WebCore::Scrollbar::Scrollbar): Initialize WeakPtrFactory.
880         * platform/Scrollbar.h:
881         (WebCore::Scrollbar::createWeakPtr): Added,
882
883 2015-02-23  Yusuke Suzuki  <utatane.tea@gmail.com>
884
885         REGRESSION(r179429): Can't type comments in Facebook
886         https://bugs.webkit.org/show_bug.cgi?id=141859
887
888         Reviewed by Geoffrey Garen.
889
890         Enable SymbolEnabled runtime flag in inspector context.
891
892         * ForwardingHeaders/runtime/RuntimeFlags.h: Added.
893         * WebCore.order:
894         * WebCore.vcxproj/WebCore.vcxproj:
895         * WebCore.vcxproj/WebCore.vcxproj.filters:
896         * bindings/js/JSDOMWindowBase.cpp:
897         (WebCore::JSDOMWindowBase::javaScriptRuntimeFlags):
898         (WebCore::JSDOMWindowBase::javaScriptExperimentsEnabled): Deleted.
899         * bindings/js/JSDOMWindowBase.h:
900         * bindings/js/JSWorkerGlobalScopeBase.cpp:
901         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
902         (WebCore::JSWorkerGlobalScopeBase::javaScriptExperimentsEnabled): Deleted.
903         * bindings/js/JSWorkerGlobalScopeBase.h:
904         * inspector/InspectorFrontendClientLocal.cpp:
905         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal):
906         * page/Settings.h:
907         * page/Settings.in:
908
909 2015-02-23  Benjamin Poulain  <benjamin@webkit.org>
910
911         CSS JIT: add support for case-insensitive attribute matching
912         https://bugs.webkit.org/show_bug.cgi?id=141880
913
914         Reviewed by Andreas Kling.
915
916         The value matching now has 3 cases:
917         1) Case-sensitive.
918         2) Case-insensitive.
919         3) Legacy HTML Case-insensitive.
920
921         The information to determine the case is split over 2 source:
922         -To know if explicit case-insensitive is needed, we need to ask the selector
923          for attributeValueMatchingIsCaseInsensitive().
924         -To know if the legacy HTML behavior is needed, we need to test the attribute
925          name filter with HTMLDocument::isCaseSensitiveAttribute().
926
927         I decided to perform all those checks at the fragment creation step.
928         This makes the register requirements and code generation more explicit.
929
930         From there, everything is easy: switch() on the type of matching needed,
931         and generate the code. The new case-insensitive case is a simplified version
932         of the legacy HTML behavior without runtime check for the element type.
933
934         Tests: fast/css/implicitly-case-insensitive-attribute-with-svg.html
935                fast/selectors/case-insensitive-attribute-register-requirement-1.html
936                fast/selectors/case-insensitive-attribute-register-requirement-2.html
937                fast/selectors/querySelector-explicit-case-insensitive-attribute-match-with-svg.html
938
939         * cssjit/SelectorCompiler.cpp:
940         (WebCore::SelectorCompiler::attributeSelectorCaseSensitivity):
941         (WebCore::SelectorCompiler::AttributeMatchingInfo::AttributeMatchingInfo):
942         (WebCore::SelectorCompiler::AttributeMatchingInfo::attributeCaseSensitivity):
943         (WebCore::SelectorCompiler::AttributeMatchingInfo::canDefaultToCaseSensitiveValueMatch): Deleted.
944         (WebCore::SelectorCompiler::constructFragmentsInternal):
945         Compute the type of value matching and store it on the AttributeMatchingInfo
946         when creating the fragment.
947
948         (WebCore::SelectorCompiler::minimumRegisterRequirements):
949         (WebCore::SelectorCompiler::attributeValueTestingRequiresExtraRegister):
950         (WebCore::SelectorCompiler::attributeValueTestingRequiresCaseFoldingRegister): Deleted.
951         In general, AttributeCaseSensitivity::CaseInsensitive does not require an extra
952         register. I have made an exception for generateElementAttributeValueExactMatching()
953         for simplicity. I use that register to load the StringImpl of the attribute
954         being tested, that way I can use WTF::equalIgnoringCaseNonNull() directly.
955
956         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueMatching):
957         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeValueExactMatching):
958         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeFunctionCallValueMatching):
959         Matching itself is just function calls. Unlike AttributeCaseSensitivity::HTMLLegacyCaseInsensitive,
960         the behavior is consistent between XML and HTML.
961
962 2015-02-23  Alex Christensen  <achristensen@webkit.org>
963
964         [WinCairo] Unreviewed build fix after r180532
965
966         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
967         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
968         Fixed typo.
969
970 2015-02-23  Chris Dumez  <cdumez@apple.com>
971
972         Log using diagnostic logging which ActiveDOMObjects prevent using the PageCache
973         https://bugs.webkit.org/show_bug.cgi?id=141922
974         <rdar://problem/19923085>
975
976         Reviewed by Andreas Kling.
977
978         Log using diagnostic logging which ActiveDOMObjects prevent using the
979         PageCache.
980
981         * history/PageCache.cpp:
982         (WebCore::logCanCacheFrameDecision):
983         * page/DiagnosticLoggingKeys.cpp:
984         (WebCore::DiagnosticLoggingKeys::unsuspendableDOMObjectKey):
985         * page/DiagnosticLoggingKeys.h:
986
987 2015-02-23  Chris Dumez  <cdumez@apple.com>
988
989         Move GeoNotifier class to its own file
990         https://bugs.webkit.org/show_bug.cgi?id=141918
991
992         Reviewed by Andreas Kling.
993
994         Move GeoNotifier class to its own file to make Geolocation class less
995         crowded.
996
997 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
998
999         Remove unnecessary PlatformTimeRanges::create()
1000         https://bugs.webkit.org/show_bug.cgi?id=141901
1001
1002         Reviewed by Filip Pizlo.
1003
1004         PlatformTimeRanges::create() functions have just created an instance of PlatformTimeRanges.
1005         This functionality can be replaced with std::make_unique<> use directly.
1006
1007         No new tests, no behavior changes.
1008
1009         * Modules/mediasource/MediaSource.cpp:
1010         (WebCore::MediaSource::buffered):
1011         * Modules/mediasource/SourceBuffer.cpp:
1012         (WebCore::SourceBuffer::bufferedAccountingForEndOfStream):
1013         * platform/graphics/MediaPlayer.cpp:
1014         (WebCore::NullMediaPlayerPrivate::buffered):
1015         * platform/graphics/MediaPlayerPrivate.h:
1016         (WebCore::MediaPlayerPrivateInterface::seekable):
1017         * platform/graphics/PlatformTimeRanges.cpp:
1018         (WebCore::PlatformTimeRanges::create): Deleted.
1019         * platform/graphics/PlatformTimeRanges.h:
1020         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1021         (WebCore::MediaPlayerPrivateAVFoundation::buffered):
1022         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1023         (WebCore::MediaPlayerPrivateAVFoundationCF::platformBufferedTimeRanges):
1024         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1025         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformBufferedTimeRanges):
1026         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1027         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekable):
1028         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::buffered):
1029         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1030         (WebCore::MediaPlayerPrivateGStreamer::buffered):
1031         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1032         (WebCore::MediaPlayerPrivateQTKit::buffered):
1033         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1034         (WebCore::MediaPlayerPrivateMediaFoundation::buffered):
1035         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
1036         (WebCore::MockMediaPlayerMediaSource::buffered):
1037
1038 2015-02-23  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1039
1040         Partial clean up OwnPtr and PassOwnPtr in WebCore/platform
1041         https://bugs.webkit.org/show_bug.cgi?id=141888
1042
1043         Reviewed by Filip Pizlo.
1044
1045         Use std::unique_ptr<> and std::make_unique<>. Besides this patch removes
1046         unnecessary OwnPtr.h|PasSOwnPtr.h includes.
1047
1048         No new tests, no behavior changes.
1049
1050         * platform/SharedBuffer.h:
1051         * platform/Supplementable.h:
1052         * platform/audio/gstreamer/AudioSourceProviderGStreamer.h:
1053         (WebCore::AudioSourceProviderGStreamer::create): Deleted.
1054         * platform/graphics/ImageBuffer.h:
1055         * platform/graphics/TiledBackingStoreBackend.h:
1056         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1057         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1058         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
1059         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1060         * platform/graphics/gstreamer/VideoSinkGStreamer.cpp:
1061         * platform/gtk/GamepadsGtk.cpp:
1062
1063 2015-02-23  Shivakumar JM  <shiva.jm@samsung.com>
1064
1065         Default value of HTMLSelectElement size IDL attribute should be 0.
1066         https://bugs.webkit.org/show_bug.cgi?id=141795
1067
1068         Reviewed by Andreas Kling.
1069
1070         Default value of HTMLSelectElement size IDL attribute should be 0. 
1071         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
1072         Gecko.
1073
1074         Test: fast/dom/select-size.html
1075
1076         * html/HTMLSelectElement.cpp:
1077         (WebCore::HTMLSelectElement::parseAttribute):
1078
1079 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
1080
1081         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
1082         https://bugs.webkit.org/show_bug.cgi?id=141729.
1083
1084         Reviewed by Daniel Bates.
1085
1086         Fix a build break which is caused by http://trac.webkit.org/changeset/180511/trunk.
1087         Two functions of GraphicsContext were made inline but they were kept WEBCORE_EXPORT.
1088
1089         * platform/graphics/GraphicsContext.h:
1090         (WebCore::GraphicsContext::paintingDisabled):
1091         (WebCore::GraphicsContext::updatingControlTints):
1092
1093 2015-02-22  Dean Jackson  <dino@apple.com>
1094
1095         [iOS] Max canvas size is lower than expected
1096         https://bugs.webkit.org/show_bug.cgi?id=141886
1097         <rdar://problem/19729246>
1098
1099         Reviewed by Tim Horton.
1100
1101         Use the same maximum canvas area for all ports,
1102         which bumps the iOS limit up from 4580 * 1145
1103         to 16k * 16k.
1104
1105         * html/HTMLCanvasElement.cpp: Update MaxCanvasArea.
1106
1107 2015-02-23  Chris Dumez  <cdumez@apple.com>
1108
1109         Add support for diagnostic logging messages sampling
1110         https://bugs.webkit.org/show_bug.cgi?id=141823
1111         <rdar://problem/19899030>
1112
1113         Reviewed by Andreas Kling.
1114
1115         Add support for diagnostic logging messages sampling to decrease the
1116         impact of diagnostic logging on CPU usage, while still getting useful
1117         overall results. This patch adds a ShouldSample argument to
1118         logDiagnosticMessage*() functions and logs 5% of the messages when
1119         sampling. Sampling is turned on for keys that are known to be verbose
1120         (e.g. per resource load logging).
1121
1122         On the page load test I am tracking, CPU usage caused by diagnostic
1123         logging went down to 0.3% of UIProcess from 2.8% with this change.
1124
1125         * history/PageCache.cpp:
1126         (WebCore::logPageCacheFailureDiagnosticMessage):
1127         (WebCore::logCanCachePageDecision):
1128         * html/HTMLMediaElement.cpp:
1129         (WebCore::HTMLMediaElement::parseAttribute):
1130         * loader/EmptyClients.h:
1131         * loader/FrameLoader.cpp:
1132         (WebCore::logNavigation):
1133         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1134         * loader/ResourceLoader.cpp:
1135         (WebCore::logResourceResponseSource):
1136         * loader/SubframeLoader.cpp:
1137         (WebCore::logPluginRequest):
1138         * loader/SubresourceLoader.cpp:
1139         (WebCore::SubresourceLoader::willSendRequest):
1140         (WebCore::SubresourceLoader::didReceiveResponse):
1141         (WebCore::logResourceLoaded):
1142         * loader/cache/CachedResource.cpp:
1143         (WebCore::logResourceRevalidationReason):
1144         * loader/cache/CachedResourceLoader.cpp:
1145         (WebCore::logMemoryCacheResourceRequest):
1146         * page/DiagnosticLoggingClient.h:
1147
1148 2015-02-23  Said Abou-Hallawa  <sabouhallawa@apple.com>
1149
1150         Drawing an SVG image into a canvas using drawImage() ignores globalAlpha.
1151         https://bugs.webkit.org/show_bug.cgi?id=141729.
1152
1153         Reviewed by Simon Fraser.
1154
1155         When drawing an SVG image and the drawing context is set to be transparent,
1156         make sure this transparency is applied to the compositing layer.
1157
1158         Test: svg/canvas/canvas-global-alpha-svg.html
1159
1160         * platform/graphics/GraphicsContext.cpp:
1161         (WebCore::GraphicsContext::setAlpha): Make setAlpha() calls the platform
1162         function and sets 'm_state.alpha' to the input value.
1163
1164         (WebCore::GraphicsContext::alpha): Add a new function 'alpha()' which
1165         returns the value of the global alpha.
1166         
1167         * platform/graphics/GraphicsContext.h:
1168         (WebCore::GraphicsContextState::GraphicsContextState): Add a new member
1169         'alpha' to the context state since the getter function CGContextGetAlpha
1170         is defined only in a private header file. Also move single line functions
1171         from the source file to the header file.
1172     
1173         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1174         (WebCore::GraphicsContext::setPlatformAlpha):
1175         (WebCore::GraphicsContext::setAlpha): Deleted.
1176         * platform/graphics/cg/GraphicsContextCG.cpp:
1177         (WebCore::GraphicsContext::setPlatformAlpha):
1178         (WebCore::GraphicsContext::setAlpha): Deleted.
1179         Rename setAlpha() to setPlatformAlpha() in the platform files. Add setAlpha()
1180         to the core file. setAlpha() will set the value of 'm_state.alpha' and call
1181         setPlatformAlpha().
1182     
1183         * svg/graphics/SVGImage.cpp:
1184         (WebCore::SVGImage::draw): If the drawing context is transparent, apply its
1185         global alpha value to the compositing layer.
1186         
1187 2015-02-23  Eric Carlson  <eric.carlson@apple.com>
1188
1189         Occasional crash in MediaPlayer::setPrivateBrowsingMode
1190         https://bugs.webkit.org/show_bug.cgi?id=141910
1191
1192         Reviewed by Jer Noble.
1193
1194         No new tests, I was unable to reproduce the crash.
1195
1196         * html/HTMLMediaElement.cpp:
1197         (WebCore::HTMLMediaElement::stopPeriodicTimers): Use EveryDelayedAction instead of -1.
1198         (WebCore::HTMLMediaElement::stop): Call clearMediaPlayer instead of just setting m_player
1199             to NULL.
1200         * html/HTMLMediaElement.h: Define EveryDelayedAction.
1201
1202 2015-02-23  Philippe Normand  <pnormand@igalia.com>
1203
1204         [GStreamer] Redundant track language notifications
1205         https://bugs.webkit.org/show_bug.cgi?id=141908
1206
1207         Reviewed by Žan Doberšek.
1208
1209         Invoke languageChanged only if the language code actually
1210         changed.
1211
1212         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1213         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
1214
1215 2015-02-23  peavo@outlook.com  <peavo@outlook.com>
1216
1217         [WinCairo] Crash when media player is destroyed.
1218         https://bugs.webkit.org/show_bug.cgi?id=141248
1219
1220         Reviewed by Darin Adler.
1221
1222         A COM smart pointer is both released, and set to null.
1223         This means that the COM Release method is called twice, causing a crash.
1224
1225         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1226         (WebCore::MediaPlayerPrivateMediaFoundation::endSession):
1227
1228 2015-02-23  Manuel Rego Casasnovas  <rego@igalia.com>
1229
1230         [CSS Grid Layout] Remove old FIXME in RenderGrid::placeItemsOnGrid()
1231         https://bugs.webkit.org/show_bug.cgi?id=141899
1232
1233         Reviewed by Sergio Villar Senin.
1234
1235         There was a FIXME about not re-resolving positions if the grid is grown during
1236         auto-placement. But as the spec has changed [1] and you can only refer to the
1237         explicit grid (even if you use for example grid-column: 1 / -1). It seems that
1238         we can get rid of this FIXME as it's not a causing a problem anymore.
1239
1240         [1] http://dev.w3.org/csswg/css-grid/#grid-placement-int
1241
1242         No new tests (no change in behavior).
1243
1244         * rendering/RenderGrid.cpp:
1245         (WebCore::RenderGrid::placeItemsOnGrid): Remove FIXME.
1246
1247 2015-02-22  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1248
1249         Move std::unique_ptr<>|make_unique<> to WebCore/page/scrolling
1250         https://bugs.webkit.org/show_bug.cgi?id=137877
1251
1252         Reviewed by Sam Weinig.
1253
1254         Clean up unnecessary OwnPtr.h|PassOwnPtr.h includes as well as
1255         change OwnPtr with std::unique_ptr<>|make_unique<>.
1256
1257         No new tests, no behavior changes.
1258
1259         * page/scrolling/AsyncScrollingCoordinator.h:
1260         * page/scrolling/ScrollingStateFixedNode.cpp:
1261         * page/scrolling/ScrollingStateFrameScrollingNode.cpp:
1262         * page/scrolling/ScrollingStateNode.cpp:
1263         (WebCore::ScrollingStateNode::appendChild):
1264         * page/scrolling/ScrollingStateNode.h:
1265         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp:
1266         * page/scrolling/ScrollingStateScrollingNode.cpp:
1267         * page/scrolling/ScrollingStateStickyNode.cpp:
1268         * page/scrolling/ScrollingTree.h:
1269         * page/scrolling/ScrollingTreeNode.cpp:
1270         (WebCore::ScrollingTreeNode::appendChild):
1271         * page/scrolling/ScrollingTreeNode.h:
1272         * page/scrolling/ScrollingTreeScrollingNode.h:
1273
1274 2015-02-22  Dean Jackson  <dino@apple.com>
1275
1276         Print a console warning when HTMLCanvasElement exceeds the maximum size
1277         https://bugs.webkit.org/show_bug.cgi?id=141861
1278         <rdar://problem/19729145>
1279
1280         Reviewed by Simon Fraser.
1281
1282         Add a warning if we ever try to create a canvas that is
1283         too big.
1284
1285         No test because:
1286         1. We can't ref-test against console messages.
1287         2. The output is platform specific.
1288
1289         * html/HTMLCanvasElement.cpp:
1290         (WebCore::HTMLCanvasElement::createImageBuffer):
1291
1292 2015-02-21  Sam Weinig  <sam@webkit.org>
1293
1294         Convert the caps lock indicator to be implemented using the shadow DOM
1295         https://bugs.webkit.org/show_bug.cgi?id=141868
1296
1297         Reviewed by Dan Bernstein.
1298
1299         - Re-adds 'caps-lock-indicator' as a valid -webkit-appearance value. It was removed
1300           in r74099 to work around a site bug, that should not be a problem anymore.
1301         - Converts the caps lock indicator to be implemented as part of the shadow DOM rather
1302           than a paint time effect. This gives the proper overflow behavior (it now clips) and
1303           behaves correctly in RTL.
1304
1305         * css/CSSParser.cpp:
1306         (WebCore::isValidKeywordPropertyAndValue):
1307         Make 'caps-lock-indicator' a valid -webkit-appearance value.
1308
1309         * css/CSSValueKeywords.in:
1310         Remove comment that indicated that caps-lock-indicator was not a valid
1311         -webkit-appearance value.
1312
1313         * css/html.css:
1314         (input::-webkit-caps-lock-indicator):
1315         Add new default style for the new -webkit-caps-lock-indicator pseudo-element. The
1316         trick employed here is to use a content: image to both implement the painting of
1317         the caps lock indicator, and to get the sizing right (shrink-to-fit, height: 100%).
1318
1319         * html/HTMLInputElement.cpp:
1320         (WebCore::HTMLInputElement::capsLockIndicatorElement):
1321         (WebCore::HTMLInputElement::capsLockStateMayHaveChanged):
1322         * html/HTMLInputElement.h:
1323         * html/InputType.cpp:
1324         (WebCore::InputType::capsLockStateMayHaveChanged):
1325         * html/InputType.h:
1326         (WebCore::InputType::capsLockIndicatorElement):
1327         Pipe notification of changes in the caps locks state to the <input> element
1328         rather than the RenderTextControlSingleLine. Also add an accessor for the caps
1329         lock indicator element in the shadow DOM.
1330
1331         * html/TextFieldInputType.cpp:
1332         (WebCore::TextFieldInputType::forwardEvent):
1333         (WebCore::TextFieldInputType::shouldHaveCapsLockIndicator):
1334         (WebCore::TextFieldInputType::createShadowSubtree):
1335         (WebCore::TextFieldInputType::capsLockIndicatorElement):
1336         (WebCore::TextFieldInputType::destroyShadowSubtree):
1337         (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator):
1338         (WebCore::TextFieldInputType::capsLockStateMayHaveChanged):
1339         * html/TextFieldInputType.h:
1340         Add a new element to the text field shadow DOM to act as the caps lock indicator.
1341         Give it a pseudo-element ID of -webkit-caps-lock-indicator so it can be referenced
1342         from CSS. The element is always in the DOM for a password field. It toggles between
1343         display: none and display: block depending on the state of the caps lock key.
1344
1345         * page/EventHandler.cpp:
1346         (WebCore::EventHandler::capsLockStateMayHaveChanged):
1347         Pipe notification of changes in the caps locks state to the <input> element
1348         rather than the RenderTextControlSingleLine.
1349
1350         * rendering/RenderTextControlSingleLine.cpp:
1351         (WebCore::RenderTextControlSingleLine::RenderTextControlSingleLine):
1352         (WebCore::RenderTextControlSingleLine::paint): Deleted.
1353         (WebCore::RenderTextControlSingleLine::capsLockStateMayHaveChanged): Deleted.
1354         * rendering/RenderTextControlSingleLine.h:
1355         Remove logic for drawing the caps lock indicator.
1356
1357         * rendering/RenderTheme.cpp:
1358         (WebCore::RenderTheme::adjustStyle):
1359         (WebCore::RenderTheme::paint):
1360         (WebCore::RenderTheme::paintMeter):
1361         (WebCore::RenderTheme::adjustCapsLockIndicatorStyle):
1362         (WebCore::RenderTheme::paintCapsLockIndicator):
1363         (WebCore::RenderTheme::shouldHaveCapsLockIndicator):
1364         * rendering/RenderTheme.h:
1365         (WebCore::RenderTheme::paintCapsLockIndicator): Deleted.
1366         * rendering/RenderThemeIOS.h:
1367         * rendering/RenderThemeIOS.mm:
1368         (WebCore::RenderThemeIOS::shouldHaveCapsLockIndicator):
1369         * rendering/RenderThemeMac.h:
1370         * rendering/RenderThemeMac.mm:
1371         (WebCore::RenderThemeMac::shouldHaveCapsLockIndicator):
1372         (WebCore::RenderThemeMac::paintCapsLockIndicator): Deleted.
1373         Now that the caps lock indicator is implemented like other aspects of form controls,
1374         the theme code can be converted to be similar as well.
1375
1376 2015-02-21  David Kilzer  <ddkilzer@apple.com>
1377
1378         [iOS] Fix build failure after including CoreMediaSoftLink.h in WebVideoFullscreenInterfaceAVKit.mm
1379         <http://webkit.org/b/141816>
1380
1381         Attempt to fix the following build failure:
1382
1383             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:68:1: error: call to 'CoreMediaLibrary' is ambiguous
1384             SOFT_LINK(CoreMedia, CMTimeRangeContainsTime, Boolean, (CMTimeRange range, CMTime time), (range, time))
1385             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1386             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
1387             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
1388             WebCore/platform/mac/SoftLinking.h:107:79: note: expanded from macro 'SOFT_LINK'
1389             <scratch space>:58:1: note: expanded from here
1390             CoreMediaLibrary
1391             ^~~~~~~~~~~~~~~~
1392             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
1393             WebCore/platform/cf/CoreMediaSoftLink.h:35:1: note: candidate function
1394             SOFT_LINK_FRAMEWORK_HEADER(WebCore, CoreMedia)
1395             ^
1396             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
1397             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
1398             WebCore/platform/mac/SoftLinking.h:298:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK_HEADER'
1399             <scratch space>:42:1: note: expanded from here
1400             CoreMediaLibrary
1401             ^
1402             WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:67:1: note: candidate function
1403             SOFT_LINK_FRAMEWORK(CoreMedia)
1404             ^
1405             In file included from WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm:34:
1406             In file included from WebCore/platform/cf/CoreMediaSoftLink.h:32:
1407             WebCore/platform/mac/SoftLinking.h:46:18: note: expanded from macro 'SOFT_LINK_FRAMEWORK'
1408             <scratch space>:51:1: note: expanded from here
1409             CoreMediaLibrary
1410             ^
1411
1412         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Remove the
1413         SOFT_LINK_FRAMEWORK(CoreMedia) macro since the remaining
1414         SOFT_LINK() and SOFT_LINK_CONSTANT() macros can use the
1415         CoreMediaLibrary() method exposed by CoreMediaSoftLink.h.
1416
1417 2015-02-21  David Kilzer  <ddkilzer@apple.com>
1418
1419         Add SOFT_LINK_CONSTANT_SOURCE() cross-platform macro and start using it
1420         <http://webkit.org/b/141816>
1421
1422         Reviewed by Alexey Proskuryakov.
1423
1424         * WebCore.vcxproj/WebCore.vcxproj:
1425         * WebCore.vcxproj/WebCore.vcxproj.filters:
1426         - Remove CoreMediaSoftLinking.h.
1427
1428         * platform/cf/CoreMediaSoftLink.cpp:
1429         - Add kCMTimeZero constant.
1430         * platform/cf/CoreMediaSoftLink.h:
1431         - Add SOFT_LINK_FRAMEWORK_HEADER() macro for CoreMedia.
1432         - Add kCMTimeZero constant.
1433
1434         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h: Remove.
1435
1436         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1437         - Remove reference to CoreMediaSoftLinking.h and update comment.
1438         (WebCore::MediaPlayerPrivateAVFoundationCF::isAvailable):
1439         - Switch to using new method to check if a framework is
1440           available.
1441
1442         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1443         - Remove all local soft-linking macros for CoreMedia.
1444           CoreMediaSoftLink.h handles everything now.
1445         (WebCore::MediaPlayerPrivateAVFoundationObjC::isAvailable):
1446         - Switch to using new method to check if a framework is
1447           available.
1448
1449         * platform/mac/SoftLinking.h:
1450         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
1451         is_Name_FrameworkAvailable() macro.
1452         (SOFT_LINK_FRAMEWORK_SOURCE): Update to make it work with
1453         optional framework checks without a separate macro.
1454         (SOFT_LINK_CONSTANT_HEADER): Add.
1455         (SOFT_LINK_CONSTANT_SOURCE): Add.
1456         - Support soft-links to constants.
1457
1458         * platform/win/SoftLinking.h:
1459         (SOFT_LINK_FRAMEWORK_HELPER): Add.  Copied from
1460         SOFT_LINK_LIBRARY_HELPER, with addition of namespace and
1461         non-static function.
1462         (SOFT_LINK_FRAMEWORK): Add.  Copied from SOFT_LINK_LIBRARY.
1463         (SOFT_LINK_DEBUG_FRAMEWORK): Add.  Copied from
1464         SOFT_LINK_DEBUG_LIBRARY.
1465         (SOFT_LINK_FRAMEWORK_HEADER): Add.  Defines
1466         is_Name_FrameworkAvailable() macro.
1467         (SOFT_LINK_FRAMEWORK_SOURCE): Redefine in terms of
1468         SOFT_LINK_FRAMEWORK/SOFT_LINK_DEBUG_FRAMEWORK.
1469         (SOFT_LINK_CONSTANT_HEADER): Add.
1470         (SOFT_LINK_CONSTANT_SOURCE): Add.
1471         - Support soft-links to constants.
1472
1473 2015-02-20  David Kilzer  <ddkilzer@apple.com>
1474
1475         Make namespace configurable for SOFT_LINK_*_{HEADER,SOURCE}() macros
1476         <http://webkit.org/b/141849>
1477
1478         Reviewed by Brent Fulgham.
1479
1480         This patch does the following:
1481         - Add namespace argument to the SOFT_LINK_*_{HEADER,SOURCE}()
1482           macros for reuse in other projects.
1483         - Adds SOFT_LINK_FRAMEWORK_SOURCE() macro in preparation for Bug
1484           141816.
1485         - Adds back framework argument to SOFT_LINK_FUNCTION_HEADER()
1486           and includes framework name in generated function names.  This
1487           adds more entropy to the names in case there are two functions
1488           with the same name in different frameworks.
1489
1490         * platform/cf/CoreMediaSoftLink.cpp:
1491         - Add FIXME about USE(COREMEDIA).
1492         - Switch from SOFT_LINK_FRAMEWORK() to
1493           SOFT_LINK_FRAMEWORK_SOURCE().
1494         * platform/cf/CoreMediaSoftLink.h:
1495         - Add FIXME about USE(COREMEDIA).
1496         - Add back framework argument to SOFT_LINK_FUNCTION_HEADER()
1497           macros.
1498
1499         * platform/mac/SoftLinking.h:
1500         - Add missing header guards.
1501         - Add pragmas for different macro groups.
1502         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
1503         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
1504         (SOFT_LINK_FUNCTION_SOURCE): Move.
1505         - Add framework name to generated function names.
1506         - Incorporates namespace so that it doesn't have to be listed in
1507           the *SoftLink.{cpp,h} file.
1508
1509         * platform/win/SoftLinking.h:
1510         - Add pragmas for different macro groups.
1511         (SOFT_LINK_FRAMEWORK_SOURCE): Add.
1512         (SOFT_LINK_FUNCTION_HEADER): Move. Add back framework argument.
1513         (SOFT_LINK_FUNCTION_SOURCE): Move.
1514         - Add framework name to generated function names.
1515         - Incorporates namespace so that it doesn't have to be listed in
1516           the *SoftLink.{cpp,h} file.
1517
1518 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
1519
1520         [Gtk] Unreviewed build fix.
1521
1522         * platform/ScrollAnimatorNone.cpp:
1523         (WebCore::ScrollAnimatorNone::ScrollAnimatorNone): Forget to update two
1524         uses of ScrollableArea.
1525
1526 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
1527
1528         Scrollbars and ScrollAnimators must always have a ScrollableArea
1529         https://bugs.webkit.org/show_bug.cgi?id=141855
1530
1531         Reviewed by Simon Fraser.
1532
1533         No change in functionality.
1534         
1535         Change users of the scrollAnimator() method to expect a reference instead of a pointer. Also get rid of
1536         a number of unnecessary nullptr checks.
1537
1538         * accessibility/AccessibilityScrollbar.cpp:
1539         (WebCore::AccessibilityScrollbar::setValue):
1540         * css/SelectorCheckerTestFunctions.h:
1541         (WebCore::scrollbarMatchesCornerPresentPseudoClass):
1542         * page/FrameView.cpp:
1543         (WebCore::FrameView::createScrollbar):
1544         (WebCore::FrameView::setFixedVisibleContentRect):
1545         * page/scrolling/ScrollingCoordinator.cpp:
1546         (WebCore::ScrollingCoordinator::handleWheelEventPhase):
1547         * platform/PopupMenuClient.h:
1548         * platform/ScrollAnimator.cpp:
1549         (WebCore::ScrollAnimator::ScrollAnimator):
1550         (WebCore::ScrollAnimator::scroll):
1551         (WebCore::ScrollAnimator::handleWheelEvent):
1552         (WebCore::ScrollAnimator::notifyPositionChanged):
1553         (WebCore::ScrollAnimator::updateScrollAnimatorsAndTimers):
1554         * platform/ScrollAnimator.h:
1555         (WebCore::ScrollAnimator::ScrollAnimator::scrollableArea):
1556         * platform/ScrollAnimatorNone.cpp:
1557         * platform/ScrollAnimatorNone.h:
1558         * platform/ScrollView.cpp:
1559         (WebCore::ScrollView::createScrollbar):
1560         * platform/ScrollableArea.cpp:
1561         (WebCore::ScrollableArea::scrollAnimator):
1562         (WebCore::ScrollableArea::scroll):
1563         (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
1564         (WebCore::ScrollableArea::notifyScrollPositionChanged):
1565         (WebCore::ScrollableArea::scrollPositionChanged):
1566         (WebCore::ScrollableArea::handleWheelEvent):
1567         (WebCore::ScrollableArea::handleTouchEvent):
1568         (WebCore::ScrollableArea::mouseEnteredScrollbar):
1569         (WebCore::ScrollableArea::mouseExitedScrollbar):
1570         (WebCore::ScrollableArea::didAddScrollbar):
1571         (WebCore::ScrollableArea::willRemoveScrollbar):
1572         (WebCore::ScrollableArea::verticalScrollbarLayerDidChange):
1573         (WebCore::ScrollableArea::horizontalScrollbarLayerDidChange):
1574         * platform/ScrollableArea.h:
1575         * platform/Scrollbar.cpp:
1576         (WebCore::Scrollbar::createNativeScrollbar):
1577         (WebCore::Scrollbar::Scrollbar):
1578         (WebCore::Scrollbar::scrollbarOverlayStyle):
1579         (WebCore::Scrollbar::isScrollableAreaActive):
1580         (WebCore::Scrollbar::offsetDidChange):
1581         (WebCore::Scrollbar::autoscrollPressedPart):
1582         (WebCore::Scrollbar::moveThumb):
1583         (WebCore::Scrollbar::mouseMoved):
1584         (WebCore::Scrollbar::mouseEntered):
1585         (WebCore::Scrollbar::mouseExited):
1586         (WebCore::Scrollbar::mouseUp):
1587         (WebCore::Scrollbar::shouldParticipateInHitTesting):
1588         (WebCore::Scrollbar::isWindowActive):
1589         (WebCore::Scrollbar::invalidateRect):
1590         (WebCore::Scrollbar::convertToContainingView):
1591         (WebCore::Scrollbar::convertFromContainingView):
1592         (WebCore::Scrollbar::supportsUpdateOnSecondaryThread):
1593         * platform/Scrollbar.h:
1594         (WebCore::Scrollbar::scrollableArea):
1595         (WebCore::Scrollbar::disconnectFromScrollableArea): Deleted.
1596         * platform/ios/ScrollAnimatorIOS.mm:
1597         (WebCore::ScrollAnimatorIOS::handleTouchEvent):
1598         (WebCore::ScrollAnimatorIOS::determineScrollableAreaForTouchSequence):
1599         * platform/mac/ScrollAnimatorMac.h:
1600         * platform/mac/ScrollAnimatorMac.mm:
1601         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:setContentAreaNeedsDisplayInRect:]):
1602         (-[WebScrollbarPainterControllerDelegate scrollerImpPair:updateScrollerStyleForNewRecommendedScrollerStyle:]):
1603         (-[WebScrollbarPainterDelegate scrollAnimator]):
1604         (-[WebScrollbarPainterDelegate layer]):
1605         (-[WebScrollbarPainterDelegate mouseLocationInScrollerForScrollerImp:]):
1606         (-[WebScrollbarPainterDelegate setUpAlphaAnimation:scrollerPainter:part:animateAlphaTo:duration:]):
1607         (WebCore::ScrollAnimator::create):
1608         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1609         (WebCore::ScrollAnimatorMac::scroll):
1610         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
1611         (WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
1612         (WebCore::ScrollAnimatorMac::immediateScrollTo):
1613         (WebCore::ScrollAnimatorMac::didAddVerticalScrollbar):
1614         (WebCore::ScrollAnimatorMac::didAddHorizontalScrollbar):
1615         (WebCore::ScrollAnimatorMac::verticalScrollbarLayerDidChange):
1616         (WebCore::ScrollAnimatorMac::horizontalScrollbarLayerDidChange):
1617         (WebCore::ScrollAnimatorMac::notifyContentAreaScrolled):
1618         (WebCore::ScrollAnimatorMac::pinnedInDirection):
1619         (WebCore::ScrollAnimatorMac::isAlreadyPinnedInDirectionOfGesture):
1620         (WebCore::ScrollAnimatorMac::allowsVerticalStretching):
1621         (WebCore::ScrollAnimatorMac::allowsHorizontalStretching):
1622         (WebCore::ScrollAnimatorMac::stretchAmount):
1623         (WebCore::ScrollAnimatorMac::canScrollHorizontally):
1624         (WebCore::ScrollAnimatorMac::canScrollVertically):
1625         (WebCore::ScrollAnimatorMac::absoluteScrollPosition):
1626         (WebCore::ScrollAnimatorMac::immediateScrollByWithoutContentEdgeConstraints):
1627         (WebCore::ScrollAnimatorMac::updateScrollerStyle):
1628         (WebCore::ScrollAnimatorMac::setVisibleScrollerThumbRect):
1629         * rendering/RenderLayer.cpp:
1630         (WebCore::RenderLayer::RenderLayer):
1631         (WebCore::RenderLayer::createScrollbar):
1632         (WebCore::RenderLayer::destroyScrollbar):
1633         (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1634         * rendering/RenderListBox.cpp:
1635         (WebCore::RenderListBox::createScrollbar):
1636         (WebCore::RenderListBox::destroyScrollbar):
1637         * rendering/RenderMenuList.cpp:
1638         (RenderMenuList::createScrollbar):
1639         * rendering/RenderMenuList.h:
1640         * rendering/RenderScrollbar.cpp:
1641         (WebCore::RenderScrollbar::createCustomScrollbar):
1642         (WebCore::RenderScrollbar::RenderScrollbar):
1643         * rendering/RenderScrollbar.h:
1644         * rendering/RenderSearchField.cpp:
1645         (WebCore::RenderSearchField::createScrollbar):
1646         * rendering/RenderSearchField.h:
1647
1648 2015-02-20  Enrica Casucci  <enrica@apple.com>
1649
1650         [WK2] Add support for font panel on OS X.
1651         https://bugs.webkit.org/show_bug.cgi?id=141777
1652
1653         Reviewed by Tim Horton.
1654
1655         This patch adds the necessary hooks to the Editor class to support
1656         the font panel.
1657
1658         * editing/Editor.h:
1659         * editing/mac/EditorMac.mm:
1660         (WebCore::Editor::applyFontStyles):
1661
1662 2015-02-20  Zalan Bujtas  <zalan@apple.com>
1663
1664         Invalid assert in CompositeEditCommand::insertNodeAfter/insertNodeBefore
1665         https://bugs.webkit.org/show_bug.cgi?id=141854
1666
1667         Reviewed by Ryosuke Niwa.
1668
1669         Inserting content before/after the body as the result of editing is a valid operation.
1670         This assert was originally introduced to cover cases where edited content would get moved
1671         out of body. However, asserting such operation properly is not possible atm.
1672
1673         Test: editing/inserting/insert-as-body-sibling.html
1674
1675         * editing/CompositeEditCommand.cpp:
1676         (WebCore::CompositeEditCommand::insertNodeBefore):
1677         (WebCore::CompositeEditCommand::insertNodeAfter):
1678
1679 2015-02-20  Chris Dumez  <cdumez@apple.com>
1680
1681         [WK2] Add more detailed diagnostic logging for measuring network cache efficacy
1682         https://bugs.webkit.org/show_bug.cgi?id=141803
1683         <rdar://problem/19632080>
1684
1685         Reviewed by Antti Koivisto.
1686
1687         Add more diagnostic logging keys for the network cache.
1688
1689         * page/DiagnosticLoggingKeys.cpp:
1690         (WebCore::DiagnosticLoggingKeys::missingValidatorFieldsKey):
1691         (WebCore::DiagnosticLoggingKeys::noLongerInCacheKey):
1692         (WebCore::DiagnosticLoggingKeys::isReloadIgnoringCacheDataKey):
1693         (WebCore::DiagnosticLoggingKeys::isAttachmentKey):
1694         (WebCore::DiagnosticLoggingKeys::isConditionalRequestKey):
1695         (WebCore::DiagnosticLoggingKeys::cacheControlNoStoreKey):
1696         (WebCore::DiagnosticLoggingKeys::uncacheableStatusCodeKey):
1697         (WebCore::DiagnosticLoggingKeys::unsupportedHTTPMethodKey):
1698         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryKey):
1699         (WebCore::DiagnosticLoggingKeys::varyingHeaderMismatchKey):
1700         (WebCore::WebCore::DiagnosticLoggingKeys::notHTTPFamilyKey):
1701         (WebCore::DiagnosticLoggingKeys::notInCacheKey):
1702         (WebCore::DiagnosticLoggingKeys::noLongerInCacheFailureKey): Deleted.
1703         (WebCore::DiagnosticLoggingKeys::unhandledRequestFailureKey): Deleted.
1704         (WebCore::DiagnosticLoggingKeys::unusableCachedEntryFailureKey): Deleted.
1705         * page/DiagnosticLoggingKeys.h:
1706
1707 2015-02-20  Tim Horton  <timothy_horton@apple.com>
1708
1709         <attachment> turns the wrong blue when you highlight it
1710         https://bugs.webkit.org/show_bug.cgi?id=141853
1711
1712         Reviewed by Simon Fraser.
1713
1714         * rendering/RenderAttachment.h:
1715         * rendering/RenderReplaced.cpp:
1716         (WebCore::RenderReplaced::shouldDrawSelectionTint):
1717         (WebCore::RenderReplaced::paint):
1718         * rendering/RenderReplaced.h:
1719         Don't draw the selection tint for RenderAttachment.
1720
1721 2015-02-20  Tim Horton  <timothy_horton@apple.com>
1722
1723         Allow <attachment> elements to be focused
1724         https://bugs.webkit.org/show_bug.cgi?id=141847
1725
1726         Reviewed by Enrica Casucci.
1727
1728         * css/html.css:
1729         (attachment:focus):
1730         Disable focus rings for <attachment>.
1731
1732         * html/HTMLAttachmentElement.cpp:
1733         (WebCore::HTMLAttachmentElement::setFocus):
1734         * html/HTMLAttachmentElement.h:
1735         Allow HTMLAttachmentElement to get editing focus.
1736         Let RenderAttachment know when focus changes.
1737
1738         * rendering/RenderAttachment.cpp:
1739         (WebCore::RenderAttachment::paintReplaced):
1740         Paint the background in cyan when we are inside the selection or have focus.
1741         Otherwise, it will be gray.
1742
1743         (WebCore::RenderAttachment::focusChanged):
1744         When focus changes, repaint.
1745
1746         * rendering/RenderAttachment.h:
1747
1748 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
1749
1750         Rename ScrollElasticityController to ScrollController
1751         https://bugs.webkit.org/show_bug.cgi?id=141842
1752
1753         Reviewed by Simon Fraser.
1754
1755         No change in functionality.
1756
1757         * PlatformMac.cmake:
1758         * WebCore.order:
1759         * WebCore.xcodeproj/project.pbxproj:
1760         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
1761         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
1762         (WebCore::ScrollingTreeFrameScrollingNodeMac::ScrollingTreeFrameScrollingNodeMac):
1763         (WebCore::ScrollingTreeFrameScrollingNodeMac::handleWheelEvent):
1764         (WebCore::ScrollingTreeFrameScrollingNodeMac::startSnapRubberbandTimer):
1765         * platform/mac/ScrollAnimatorMac.h:
1766         * platform/mac/ScrollAnimatorMac.mm:
1767         (WebCore::ScrollAnimatorMac::ScrollAnimatorMac):
1768         (WebCore::ScrollAnimatorMac::isRubberBandInProgress):
1769         (WebCore::ScrollAnimatorMac::handleWheelEvent):
1770         (WebCore::ScrollAnimatorMac::snapRubberBandTimerFired):
1771         * platform/mac/ScrollController.h: Copied from WebCore/platform/mac/ScrollElasticityController.h.
1772         (WebCore::ScrollControllerClient::~ScrollControllerClient):
1773         (WebCore::ScrollElasticityControllerClient::~ScrollElasticityControllerClient): Deleted.
1774         * platform/mac/ScrollController.mm: Copied from WebCore/platform/mac/ScrollElasticityController.mm.
1775         (WebCore::ScrollController::ScrollController):
1776         (WebCore::ScrollController::handleWheelEvent):
1777         (WebCore::ScrollController::snapRubberBandTimerFired):
1778         (WebCore::ScrollController::isRubberBandInProgress):
1779         (WebCore::ScrollController::stopSnapRubberbandTimer):
1780         (WebCore::ScrollController::snapRubberBand):
1781         (WebCore::ScrollController::shouldRubberBandInHorizontalDirection):
1782         (WebCore::ScrollElasticityController::ScrollElasticityController): Deleted.
1783         (WebCore::ScrollElasticityController::handleWheelEvent): Deleted.
1784         (WebCore::ScrollElasticityController::snapRubberBandTimerFired): Deleted.
1785         (WebCore::ScrollElasticityController::isRubberBandInProgress): Deleted.
1786         (WebCore::ScrollElasticityController::stopSnapRubberbandTimer): Deleted.
1787         (WebCore::ScrollElasticityController::snapRubberBand): Deleted.
1788         (WebCore::ScrollElasticityController::shouldRubberBandInHorizontalDirection): Deleted.
1789         * platform/mac/ScrollElasticityController.h: Removed.
1790         * platform/mac/ScrollElasticityController.mm: Removed.
1791
1792 2015-02-20  Alexey Proskuryakov  <ap@apple.com>
1793
1794         Remove svn:keywords property.
1795
1796         As far as I can tell, the property had no effect on any of these files, but also,
1797         when it has effect it's likely harmful.
1798
1799         * Modules/mediacontrols/assets-apple-iOS.svg: Removed property svn:keywords.
1800         * Modules/mediacontrols/mediaControlsBase.css: Removed property svn:keywords.
1801         * Modules/mediacontrols/mediaControlsBase.js: Removed property svn:keywords.
1802         * bindings/js/JSDeviceMotionEventCustom.cpp: Removed property svn:keywords.
1803         * css/CSSKeyframeRule.cpp: Removed property svn:keywords.
1804         * css/CSSKeyframeRule.h: Removed property svn:keywords.
1805         * css/CSSKeyframesRule.cpp: Removed property svn:keywords.
1806         * css/CSSKeyframesRule.h: Removed property svn:keywords.
1807         * css/WebKitCSSFilterValue.cpp: Removed property svn:keywords.
1808         * css/WebKitCSSFilterValue.h: Removed property svn:keywords.
1809         * css/plugIns.css: Removed property svn:keywords.
1810         * dom/AnimationEvent.cpp: Removed property svn:keywords.
1811         * dom/AnimationEvent.h: Removed property svn:keywords.
1812         * dom/DeviceMotionClient.h: Removed property svn:keywords.
1813         * dom/DeviceMotionController.cpp: Removed property svn:keywords.
1814         * dom/DeviceMotionController.h: Removed property svn:keywords.
1815         * dom/DeviceMotionData.cpp: Removed property svn:keywords.
1816         * dom/DeviceMotionData.h: Removed property svn:keywords.
1817         * dom/DeviceMotionEvent.cpp: Removed property svn:keywords.
1818         * dom/DeviceMotionEvent.h: Removed property svn:keywords.
1819         * html/canvas/ANGLEInstancedArrays.cpp: Removed property svn:keywords.
1820         * html/canvas/ANGLEInstancedArrays.h: Removed property svn:keywords.
1821         * html/canvas/OESTextureFloatLinear.cpp: Removed property svn:keywords.
1822         * html/canvas/OESTextureFloatLinear.h: Removed property svn:keywords.
1823         * html/canvas/OESTextureHalfFloatLinear.cpp: Removed property svn:keywords.
1824         * html/canvas/OESTextureHalfFloatLinear.h: Removed property svn:keywords.
1825         * html/shadow/MediaControlsApple.cpp: Removed property svn:keywords.
1826         * html/shadow/MediaControlsApple.h: Removed property svn:keywords.
1827         * page/Frame.h: Removed property svn:keywords.
1828         * page/scrolling/ScrollingConstraints.cpp: Removed property svn:keywords.
1829         * page/scrolling/ScrollingConstraints.h: Removed property svn:keywords.
1830         * page/scrolling/ScrollingStateStickyNode.cpp: Removed property svn:keywords.
1831         * page/scrolling/ios/ScrollingTreeIOS.cpp: Removed property svn:keywords.
1832         * page/scrolling/mac/ScrollingTreeStickyNode.h: Removed property svn:keywords.
1833         * platform/ControlStates.h: Removed property svn:keywords.
1834         * platform/ScrollbarTheme.cpp: Removed property svn:keywords.
1835         * platform/graphics/GraphicsLayerUpdater.cpp: Removed property svn:keywords.
1836         * platform/graphics/GraphicsLayerUpdater.h: Removed property svn:keywords.
1837         * platform/graphics/ca/TileController.h: Removed property svn:keywords.
1838         * platform/graphics/ca/mac/WebTiledBackingLayer.h: Removed property svn:keywords.
1839         * platform/graphics/filters/FilterOperation.cpp: Removed property svn:keywords.
1840         * platform/graphics/filters/FilterOperation.h: Removed property svn:keywords.
1841         * platform/graphics/filters/FilterOperations.h: Removed property svn:keywords.
1842         * platform/ios/SystemMemory.h: Removed property svn:keywords.
1843         * platform/mock/ScrollbarThemeMock.cpp: Removed property svn:keywords.
1844         * platform/mock/ScrollbarThemeMock.h: Removed property svn:keywords.
1845         * platform/spi/cocoa/ServersSPI.h: Removed property svn:keywords.
1846         * platform/text/mac/ios-encodings.txt: Removed property svn:keywords.
1847         * rendering/FilterEffectRenderer.cpp: Removed property svn:keywords.
1848         * rendering/FilterEffectRenderer.h: Removed property svn:keywords.
1849         * rendering/RenderGeometryMap.cpp: Removed property svn:keywords.
1850         * rendering/RenderGeometryMap.h: Removed property svn:keywords.
1851         * rendering/RenderMediaControlElements.h: Removed property svn:keywords.
1852         * rendering/TextAutoSizing.cpp: Removed property svn:keywords.
1853         * rendering/TextAutoSizing.h: Removed property svn:keywords.
1854         * rendering/style/StylePendingImage.h: Removed property svn:keywords.
1855
1856 2015-02-20  Brent Fulgham  <bfulgham@apple.com>
1857
1858         [Mac] REGRESSION: Scroll snap points broken after r180018
1859         https://bugs.webkit.org/show_bug.cgi?id=141821
1860         <rdar://problem/19898333>
1861
1862         Reviewed by Simon Fraser.
1863
1864         * page/EventHandler.cpp:
1865         (WebCore::EventHandler::platformNotifySnapIfNecessary): Added stub.
1866         (WebCore::EventHandler::handleWheelEvent): Call new 'platformNotifySnapIfNecessary' method
1867         to catch the 'ended wheel' gesture.
1868         * page/EventHandler.h:
1869         * page/mac/EventHandlerMac.mm:
1870         (WebCore::EventHandler::platformNotifySnapIfNecessary): Added. If the wheel event signifies
1871         the end of a wheel/swipe gesture, let the snap logic decide if it should do anything
1872         (i.e., trigger an animation)
1873         * platform/ScrollAnimator.cpp:
1874         (WebCore::ScrollAnimator::processWheelEventForScrollSnap): Added.
1875         * platform/ScrollAnimator.h:
1876
1877 2015-02-20  Eric Carlson  <eric.carlson@apple.com>
1878
1879         [iOS] cleanup AirPlay code
1880         https://bugs.webkit.org/show_bug.cgi?id=141811
1881
1882         Reviewed by Jer Noble.
1883
1884         * Configurations/FeatureDefines.xcconfig: IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
1885
1886         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp: Ditto.
1887         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.h:
1888         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.idl:
1889
1890         * Modules/mediacontrols/MediaControlsHost.cpp:
1891         (WebCore::MediaControlsHost::externalDeviceDisplayName): Ditto.
1892         (WebCore::MediaControlsHost::externalDeviceType):
1893
1894         * dom/EventNames.h: Ditto.
1895         * dom/EventNames.in:
1896
1897         * html/HTMLMediaElement.cpp:
1898         (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto.
1899         (WebCore::HTMLMediaElement::~HTMLMediaElement): Ditto.
1900         (WebCore::HTMLMediaElement::parseAttribute):
1901         * html/HTMLMediaElement.h:
1902         * html/HTMLMediaElement.idl:
1903
1904         * html/HTMLMediaSession.cpp:
1905         (WebCore::restrictionName): Ditto.
1906         (WebCore::HTMLMediaSession::applyMediaPlayerRestrictions): Ditto.
1907         * html/HTMLMediaSession.h:
1908
1909         * html/HTMLVideoElement.cpp:
1910         (WebCore::HTMLVideoElement::parseAttribute): Ditto.
1911         * html/HTMLVideoElement.h:
1912         * html/HTMLVideoElement.idl:
1913
1914         * page/Settings.in: Ditto.
1915
1916         * platform/audio/MediaSessionManager.h:
1917         * platform/audio/ios/MediaSessionManagerIOS.h:
1918         * platform/audio/ios/MediaSessionManagerIOS.mm: Ditto.
1919
1920         * platform/graphics/MediaPlayer.cpp:
1921         (WebCore::MediaPlayer::showPlaybackTargetPicker): Deleted.
1922         (WebCore::MediaPlayer::hasWirelessPlaybackTargets): Deleted.
1923         * platform/graphics/MediaPlayer.h:
1924         * platform/graphics/MediaPlayerPrivate.h:
1925         (WebCore::MediaPlayerPrivateInterface::showPlaybackTargetPicker): Deleted.
1926         (WebCore::MediaPlayerPrivateInterface::hasWirelessPlaybackTargets): Deleted.
1927         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1928         (WebCore::MediaPlayerPrivateAVFoundation::rateChanged):
1929         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
1930
1931         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1932         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1933         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1934         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC): IOS_AIRPLAY -> WIRELESS_PLAYBACK_TARGET.
1935         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): Ditto.
1936         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): Ditto.
1937         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): Ditto.
1938         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): Ditto.
1939
1940 2015-02-20  Dhi Aurrahman  <diorahman@rockybars.com>
1941
1942         Language ranges containing asterisks must be quoted as strings
1943         https://bugs.webkit.org/show_bug.cgi?id=141659
1944
1945         Reviewed by Benjamin Poulain.
1946
1947         As specified in [1], the language ranges containing asterisks must be quoted as strings.
1948
1949         [1] http://dev.w3.org/csswg/selectors-4/#the-lang-pseudo.
1950
1951         * css/CSSGrammar.y.in:
1952         * css/CSSParser.cpp:
1953         (WebCore::CSSParser::realLex):
1954
1955 2015-02-20  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1956
1957         Use std::unique_ptr instead of PassOwnPtr|OwnPtr in MediaPlayerFoo classes
1958         https://bugs.webkit.org/show_bug.cgi?id=137765
1959
1960         Reviewed by Ryosuke Niwa.
1961
1962         As a step to use std::unique_ptr|std::make_unique<>, this patch changes use of OwnPtr|PassOwnPtr
1963         with std::unique_ptr<>|std::make_unique<>. To remove all create() factory function, lambdas is
1964         used in registerMediaEngine().
1965
1966         No new tests, no behavior changes.
1967
1968         * WebCore.exp.in:
1969         * html/HTMLMediaElement.cpp:
1970         (WebCore::HTMLMediaElement::parseAttribute):
1971         * html/HTMLMediaElement.h:
1972         * platform/graphics/MediaPlayer.cpp:
1973         (WebCore::NullMediaPlayerPrivate::NullMediaPlayerPrivate):
1974         (WebCore::MediaPlayer::MediaPlayer):
1975         (WebCore::MediaPlayer::loadWithNextMediaEngine):
1976         (WebCore::createNullMediaPlayer): Deleted.
1977         * platform/graphics/MediaPlayer.h:
1978         (WebCore::MediaPlayer::create): Deleted.
1979         * platform/graphics/MediaPlayerPrivate.h:
1980         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1981         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1982         (WebCore::MediaPlayerPrivateAVFoundationCF::registerMediaEngine):
1983         (WebCore::MediaPlayerPrivateAVFoundationCF::create): Deleted.
1984         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1985         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1986         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1987         (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine):
1988         (WebCore::MediaPlayerPrivateAVFoundationObjC::create): Deleted.
1989         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1990         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1991         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::registerMediaEngine):
1992         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::create): Deleted.
1993         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1994         (WebCore::MediaPlayerPrivateGStreamer::registerMediaEngine):
1995         (WebCore::MediaPlayerPrivateGStreamer::create): Deleted.
1996         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1997         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1998         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1999         (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine):
2000         (WebCore::MediaPlayerPrivateQTKit::create): Deleted.
2001         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2002         (WebCore::MediaPlayerPrivateMediaFoundation::registerMediaEngine):
2003         (WebCore::MediaPlayerPrivateMediaFoundation::create): Deleted.
2004         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2005         * platform/mock/mediasource/MockMediaPlayerMediaSource.cpp:
2006         (WebCore::MockMediaPlayerMediaSource::registerMediaEngine):
2007         (WebCore::MockMediaPlayerMediaSource::create): Deleted.
2008         * platform/mock/mediasource/MockMediaPlayerMediaSource.h:
2009
2010 2015-02-19  David Kilzer  <ddkilzer@apple.com>
2011
2012         Rename SOFT_LINK_FUNCTION_{DECL,IMPL}() to SOFT_LINK_FUNCTION_{HEADER,SOURCE}()
2013
2014         Rubber-stamped by Brent Fulgham.
2015
2016         "HEADER" and "SOURCE" seem clearer than "DECL" and "IMPL", and
2017         Brent agreed when I talked to him in person.
2018
2019         * platform/cf/CoreMediaSoftLink.cpp:
2020         * platform/cf/CoreMediaSoftLink.h:
2021         * platform/mac/SoftLinking.h:
2022         * platform/win/SoftLinking.h:
2023         - Do the rename.
2024
2025 2015-02-19  David Kilzer  <ddkilzer@apple.com>
2026
2027         Move more CoreMedia soft-linked functions to CoreMediaSoftLink.{cpp,h}
2028         <http://webkit.org/b/141791>
2029
2030         Reviewed by Alexey Proskuryakov.
2031
2032         * Configurations/WebCore.unexp:
2033         - Remove five more symbols.
2034
2035         * Modules/plugins/QuickTimePluginReplacement.mm:
2036         - Remove all local soft-links and include CoreMediaSoftLink.h.
2037           Note that SOFT_LINK_FRAMEWORK_OPTIONAL() should not have been
2038           used here since we didn't use the optional function soft-link
2039           method.
2040
2041         * WebCore.vcxproj/WebCore.vcxproj.filters:
2042         * WebCore.vcxproj/WebCoreCFNetwork.props:
2043         * WebCore.xcodeproj/project.pbxproj:
2044         - Add CoreMediaSPI.h to the project.
2045
2046         * platform/cf/CoreMediaSoftLink.cpp:
2047         * platform/cf/CoreMediaSoftLink.h:
2048         - Add three cross-platform symbols, five Cocoa-only symbols, and
2049           two Windows-only symbols (based on current usage, not
2050           availability on each platform).
2051         - Include CoreMediaSPI.h header.
2052         - Include <CoreMedia/CoreMedia.h> instead of just CMTime.h.
2053
2054         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2055         - Remove all CoreMedia soft-linked functions.  Constants remain.
2056
2057         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
2058         - Remove one CoreMedia soft-linked method.
2059
2060         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
2061         - Remove all CoreMedia soft-linked funtions.  With this change,
2062           we are already realizing space savings for duplicate
2063           SOFT_LINK_FRAMEWORK() calls.  (On Windows, there was code
2064           generated for many unused functions included by
2065           CoreMediaSoftLinking.h.)
2066
2067         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h:
2068         - Remove all CoreMedia soft-linked funtions.  Constants remain.
2069
2070         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2071         - Remove duplicate header included by CoreMediaSoftLink.h.
2072
2073         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2074         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2075         - Remove all CoreMedia soft-linked funtions.  Constants remain.
2076
2077         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2078         - Remove three CoreMedia soft-linked methods.
2079
2080         * platform/mac/PlatformClockCM.mm:
2081         - Remove two CoreMedia soft-linked methods.
2082
2083         * platform/mac/SerializedPlatformRepresentationMac.mm:
2084         - Remove only CoreMedia soft-linked funtion.  It wasn't even
2085           used.
2086
2087         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2088         - Remove two CoreMedia soft-linked method.
2089
2090         * platform/spi/cf/CoreMediaSPI.h:
2091         - Add for SPI from CMNotificationCenter.h.
2092
2093 2015-02-19  David Hyatt  <hyatt@apple.com>
2094
2095         Columns are splitting unsplittable content.
2096         https://bugs.webkit.org/show_bug.cgi?id=141807
2097         <rdar://problem/18387659>
2098
2099         Reviewed by Dean Jackson.
2100
2101         Added inline-table-dynamic-movement.html
2102
2103         * rendering/RenderBlockFlow.cpp:
2104         (WebCore::RenderBlockFlow::pageLogicalTopForOffset):
2105         (WebCore::RenderBlockFlow::pageLogicalHeightForOffset):
2106         Patch these functions to always check the layout state for a zero
2107         pageLogicalHeight, since that is actually our indicator that we're
2108         doing column balancing and don't have a height set yet.
2109
2110         * rendering/RenderMultiColumnFlowThread.cpp:
2111         (WebCore::RenderMultiColumnFlowThread::isPageLogicalHeightKnown):
2112         * rendering/RenderMultiColumnSet.cpp:
2113         (WebCore::RenderMultiColumnSet::RenderMultiColumnSet):
2114         (WebCore::RenderMultiColumnSet::setAndConstrainColumnHeight):
2115         (WebCore::RenderMultiColumnSet::prepareForLayout):
2116         * rendering/RenderMultiColumnSet.h:
2117         The function for deciding whether the logical height of the columns was
2118         known was checking for a zero computedColumnHeight. However, a column set
2119         can legitimately compute a zero column height, and with the fix to examine
2120         the layout state, this bug was exposed.
2121
2122         The fix is to add a new variable that caches whether or not the column height
2123         has been computed, so that even if it computes to zero, we aren't fooled.
2124
2125 2015-02-19  Chris Dumez  <cdumez@apple.com>
2126
2127         [iOS] Fix inefficiencies in ResourceResponse::platformLazyInit()
2128         https://bugs.webkit.org/show_bug.cgi?id=141744
2129
2130         Reviewed by Alexey Proskuryakov.
2131
2132         Fix inefficiencies in iOS's ResourceResponse::platformLazyInit()
2133         implementation, similarly to what was already done for Mac in:
2134         <http://trac.webkit.org/changeset/174717>
2135
2136         The following changes were made:
2137         - Add missing "initLevel == AllFields" check before initializing
2138           uncommon fields. This bug was causing us to initialize uncommon
2139           fields even if called with 'CommonFieldsOnly' initLevel.
2140         - Bypass the first pass populating common HTTP headers in
2141           m_httpHeaderFields if the initLevel is AllFields. If called
2142           with AllFields initLevel, we will end up populating all HTTP
2143           headers later on so this first pass is redundant.
2144         - Use C++11 range loop to iterator over commonHeaderFields array
2145           for readability.
2146         - Use CFDictionaryApplyFunction() to populate m_httpHeaderFields
2147           for the CFDictionaryRef containing the headers instead of creating
2148           copies of keys and values using CFDictionaryGetKeysAndValues() and
2149           then iterating over those. This avoids allocating Vectors for keys /
2150           values and avoids unnecessary copying.
2151
2152
2153 2015-02-18  Dean Jackson  <dino@apple.com>
2154
2155         Sufficiently small media controls should remove toolbar elements
2156         https://bugs.webkit.org/show_bug.cgi?id=141780
2157         <rdar://problem/16548548>
2158         <rdar://problem/17598778>
2159         <rdar://problem/18351963>
2160
2161         Reviewed by Eric Carlson.
2162
2163         Implement some logic where elements on the media controls are
2164         hidden when there isn't enough room. We start by dropping
2165         the scrubber, then the various buttons on the right hand
2166         side.
2167
2168         This solution isn't perfect. If we had perfection, it would
2169         be because we get resize events and respond accordingly. Instead
2170         we check the size when the user has pinch-zoomed, or when
2171         we start/stop playing.
2172
2173         This is going to cause some extra layout, because we need
2174         to know the size of things before we can work out which
2175         bits to hide.
2176
2177         * Modules/mediacontrols/mediaControlsiOS.css:
2178         (::-webkit-media-controls): Remove the minimum width. This can
2179         cause the controls to get clipped.
2180         (audio::-webkit-media-controls-spacer): Add this empty element to
2181         replace the scrubber when it is hidden.
2182         (audio::-webkit-media-controls-timeline-container):
2183         * Modules/mediacontrols/mediaControlsiOS.js:
2184         (ControllerIOS): Remember our size so we don't churn.
2185         (ControllerIOS.prototype.createControls): Create a new spacer element.
2186         (ControllerIOS.prototype.configureInlineControls):
2187         (ControllerIOS.prototype.showControls): Check if we need to hide stuff.
2188         (ControllerIOS.prototype.updateControls):
2189         (ControllerIOS.prototype.setPlaying): Ditto.
2190         (ControllerIOS.prototype.set pageScaleFactor): Ditto.
2191         (ControllerIOS.prototype.scheduleUpdateLayoutForDisplayedWidth): Trigger an update
2192         asap. In this case it's probably ok to be in a bad state for a frame, or
2193         we are inside setup and we know that we'll layout soon.
2194         (ControllerIOS.prototype.updateLayoutForDisplayedWidth): The actual code
2195         that hides elements.
2196
2197 2015-02-19  Tim Horton  <timothy_horton@apple.com>
2198
2199         Move the software-only ImageBuffer::m_context to ImageBufferData
2200         https://bugs.webkit.org/show_bug.cgi?id=141784
2201
2202         Reviewed by Simon Fraser.
2203
2204         * platform/graphics/ImageBuffer.h:
2205         * platform/graphics/cairo/ImageBufferCairo.cpp:
2206         (WebCore::ImageBuffer::ImageBuffer):
2207         (WebCore::ImageBuffer::context):
2208         * platform/graphics/cairo/ImageBufferDataCairo.h:
2209         * platform/graphics/cg/ImageBufferCG.cpp:
2210         (WebCore::ImageBuffer::ImageBuffer):
2211         (WebCore::ImageBuffer::context):
2212         * platform/graphics/cg/ImageBufferDataCG.h:
2213         Move m_context to ImageBufferData in the software-only section;
2214         for accelerated contexts, the GraphicsContext is owned by the IOSurface wrapper.
2215         This will make it harder for ImageBuffer to make the mistake of using
2216         m_context blindly without thinking when it will often be null.
2217
2218 2015-02-18  Andreas Kling  <akling@apple.com>
2219
2220         REGRESSION(r179347): Clearing the PageCache no longer clears the PageCache.
2221         <https://webkit.org/b/141788>
2222
2223         Reviewed by Anders Carlsson.
2224
2225         Once again we've fallen into the TemporaryChange trap:
2226
2227             TemporaryChange<unsigned>(m_member, temporaryValue);
2228
2229         The code above doesn't actually do anything. Since the TemporaryChange local is not named,
2230         it immediately goes out of scope and restores the original value of m_member.
2231
2232         Unless someone knows a C++ trick to prevent these, we'll need to add a style checker pass
2233         to catch bugs like this. Whatever we do will be done separately from this bug.
2234
2235         Test: fast/history/page-cache-clearing.html
2236
2237         * history/PageCache.cpp:
2238         (WebCore::PageCache::pruneToSizeNow): Name the local so it lives longer.
2239
2240         * testing/Internals.cpp:
2241         (WebCore::Internals::clearPageCache):
2242         (WebCore::Internals::pageCacheSize):
2243         * testing/Internals.h:
2244         * testing/Internals.idl: Add a way to clear the page cache and query its size from
2245         window.internals to facilitate writing a simple test for this bug.
2246
2247 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
2248
2249         Roll out r180280.
2250
2251         Crashes under IDBDatabase::closeConnection.
2252         https://bugs.webkit.org/show_bug.cgi?id=141745
2253         rdar://problem/19816412
2254
2255         * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::closeConnection):
2256
2257 2015-02-18  Tim Horton  <timothy_horton@apple.com>
2258
2259         Fix the iOS Simulator build after r180308.
2260
2261         * platform/graphics/cg/ImageBufferDataCG.h:
2262
2263 2015-02-18  Zalan Bujtas  <zalan@apple.com>
2264
2265         REGRESSION(r174761) Dangling spanner pointer in RenderMultiColumnSpannerPlaceholder.
2266         https://bugs.webkit.org/show_bug.cgi?id=138224
2267
2268         Reviewed by Dave Hyatt.
2269
2270         It's wrong to call flowThreadRelativeWillBeRemoved(child).
2271         RenderMultiColumnFlowThread::removeFlowChildInfo() does not mean that the child is actually about to be removed.
2272         Should this introduce any regressions, we need to deal with those separately.
2273
2274         Test: fast/multicol/crash-when-spanner-gets-moved-around.html
2275
2276         * rendering/RenderMultiColumnFlowThread.cpp:
2277         (WebCore::RenderMultiColumnFlowThread::removeFlowChildInfo): Deleted.
2278         * rendering/RenderMultiColumnFlowThread.h:
2279
2280 2015-02-18  Brent Fulgham  <bfulgham@apple.com>
2281
2282         [Win] CFData leak in CDMSessionAVFoundationCF
2283         https://bugs.webkit.org/show_bug.cgi?id=141765
2284         <rdar://problem/141765>
2285
2286         Reviewed by Joseph Pecoraro.
2287
2288         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
2289         (WebCore::CDMSessionAVFoundationCF::generateKeyRequest): use 'adoptCF'
2290         so we don't double-increment the retain count.
2291
2292 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
2293
2294         Adopt WebCore::IOSurface in ImageBuffer
2295         https://bugs.webkit.org/show_bug.cgi?id=141751
2296
2297         Reviewed by Simon Fraser.
2298
2299         * platform/graphics/cg/ImageBufferCG.cpp:
2300         (WebCore::createIOSurface): Deleted.
2301         (WebCore::ImageBuffer::ImageBuffer):
2302         Make use of cachedCGColorSpace.
2303         Make use of WebCore::IOSurface.
2304         Remove the unused size argument from ImageBufferDataCG.
2305         Clear the IOSurface once we've allocated it; WebCore::IOSurface doesn't
2306         do this for us, unlike wkIOSurfaceContextCreate.
2307         Apply the flipping and scale factor to whichever context we made.
2308         We don't need to setIsAcceleratedContext anymore because it's always
2309         false for software contexts, and WebCore::IOSurface will set it for
2310         any accelerated contexts.
2311
2312         (WebCore::ImageBuffer::context):
2313         If we are IOSurface-backed, return WebCore::IOSurface's GraphicsContext.
2314
2315         (WebCore::ImageBuffer::flushContext):
2316         Make use of context(); m_context is now null for accelerated ImageBuffers.
2317
2318         (WebCore::ImageBuffer::copyNativeImage):
2319         Adopt in-line with the Create functions for clarity. Make use of
2320         IOSurface::createImage instead of wkIOSurfaceContextCreateImage.
2321
2322         (WebCore::ImageBuffer::draw):
2323         (WebCore::ImageBuffer::drawPattern):
2324         (WebCore::ImageBuffer::getUnmultipliedImageData):
2325         (WebCore::ImageBuffer::getPremultipliedImageData):
2326         (WebCore::ImageBuffer::putByteArray):
2327         (WebCore::ImageBuffer::toDataURL):
2328         Make use of context(); m_context is now null for accelerated ImageBuffers.
2329
2330         * platform/graphics/cg/ImageBufferDataCG.cpp:
2331         (WebCore::ImageBufferData::ImageBufferData):
2332         Indentation fix, and use nullptr.
2333
2334         (WebCore::convertScanline):
2335         Grammar fix (is -> are).
2336
2337         (WebCore::ImageBufferData::getData):
2338         (WebCore::ImageBufferData::putData):
2339         Grab the IOSurfaceRef from the IOSurface wrapper. Eventually these things
2340         should be made more convenient by the wrapper.
2341
2342         * platform/graphics/cg/ImageBufferDataCG.h:
2343         Drop the unused size argument from the constructor.
2344         Reorganize and label the various members which are only used
2345         for a particular type of ImageBufferDataCG.
2346
2347         * platform/graphics/cocoa/IOSurface.mm:
2348         (IOSurface::ensureGraphicsContext):
2349         IOSurface-backed GraphicsContexts are always considered accelerated.
2350
2351         (IOSurface::create):
2352         (IOSurface::IOSurface):
2353         Add a constructor that take an extra size to use when making the CGContext;
2354         it can only be less than the actual backing IOSurface size.
2355         This is needed for r160121.
2356
2357         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2358         * platform/mac/WebCoreSystemInterface.h:
2359         * platform/mac/WebCoreSystemInterface.mm:
2360         Remove old WKSI IOSurface-related functions.
2361
2362 2015-02-18  Alex Christensen  <achristensen@webkit.org>
2363
2364         Prepare to use WEBCORE_EXPORT on Windows.
2365         https://bugs.webkit.org/show_bug.cgi?id=141735
2366
2367         Reviewed by Brent Fulgham.
2368
2369         * bindings/js/GCController.h:
2370         * bindings/js/JSDOMGlobalObject.h:
2371         * bindings/scripts/CodeGeneratorJS.pm:
2372         (GenerateHeader):
2373         (GenerateImplementation):
2374         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2375         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2376         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2377         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2378         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2379         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2380         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2381         * bindings/scripts/test/JS/JSTestEventTarget.h:
2382         * bindings/scripts/test/JS/JSTestException.cpp:
2383         * bindings/scripts/test/JS/JSTestException.h:
2384         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2385         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
2386         * bindings/scripts/test/JS/JSTestInterface.cpp:
2387         * bindings/scripts/test/JS/JSTestInterface.h:
2388         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2389         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2390         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2391         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2392         * bindings/scripts/test/JS/JSTestNode.cpp:
2393         * bindings/scripts/test/JS/JSTestNode.h:
2394         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2395         * bindings/scripts/test/JS/JSTestNondeterministic.h:
2396         * bindings/scripts/test/JS/JSTestObj.cpp:
2397         * bindings/scripts/test/JS/JSTestObj.h:
2398         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2399         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2400         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2401         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2402         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2403         * bindings/scripts/test/JS/JSTestTypedefs.h:
2404         * bindings/scripts/test/JS/JSattribute.cpp:
2405         * bindings/scripts/test/JS/JSattribute.h:
2406         * bindings/scripts/test/JS/JSreadonly.cpp:
2407         * bindings/scripts/test/JS/JSreadonly.h:
2408         * bridge/runtime_method.h:
2409         * bridge/runtime_object.h:
2410         * dom/make_names.pl:
2411         (printNamesHeaderFile):
2412         * history/HistoryItem.h:
2413         * loader/FrameLoader.h:
2414         * loader/LoaderStrategy.h:
2415         * loader/ResourceLoadScheduler.h:
2416         * loader/icon/IconDatabase.h:
2417         * loader/icon/IconDatabaseBase.h:
2418         * page/DatabaseProvider.h:
2419         * page/Page.h:
2420         * page/PageConsoleClient.h:
2421         * page/PageOverlay.h:
2422         * platform/FileSystem.h:
2423         * platform/MemoryPressureHandler.h:
2424         * platform/ThreadGlobalData.h:
2425         * platform/URL.h:
2426         * platform/graphics/ca/PlatformCALayer.h:
2427         * platform/network/BlobDataFileReference.h:
2428         * platform/network/BlobRegistry.h:
2429         * platform/network/BlobRegistryImpl.h:
2430         * platform/sql/SQLiteDatabase.h:
2431         * rendering/ScrollBehavior.h:
2432         * rendering/break_lines.h:
2433         Add and move some WEBCORE_EXPORT macros.
2434
2435 2015-02-18  Anders Carlsson  <andersca@apple.com>
2436
2437         Rename LocalizedStringsMac.cpp to LocalizedStringsCocoa.mm
2438         https://bugs.webkit.org/show_bug.cgi?id=141767
2439
2440         Reviewed by Tim Horton.
2441
2442         Also, move it to platform/cocoa instead of platform/mac.
2443
2444         * WebCore.xcodeproj/project.pbxproj:
2445         * platform/cocoa/LocalizedStringsCocoa.mm: Renamed from Source/WebCore/platform/mac/LocalizedStringsMac.cpp.
2446
2447 2015-02-18  Antti Koivisto  <antti@apple.com>
2448
2449         Rename FontGlyphs to FontCascadeFonts
2450         https://bugs.webkit.org/show_bug.cgi?id=141754
2451
2452         Reviewed by Andreas Kling.
2453
2454         "It is better than Impl."
2455
2456         The purpose of the class to own to create and own the realized Font instances and the associated caches
2457         for FontCascade instances.
2458
2459 2015-02-18  Commit Queue  <commit-queue@webkit.org>
2460
2461         Unreviewed, rolling out r180286.
2462         https://bugs.webkit.org/show_bug.cgi?id=141766
2463
2464         Caused >50 crashed LayoutTests (Requested by jernoble on
2465         #webkit).
2466
2467         Reverted changeset:
2468
2469         "Page::userContentController() should return a reference, not
2470         a pointer"
2471         https://bugs.webkit.org/show_bug.cgi?id=141764
2472         http://trac.webkit.org/changeset/180286
2473
2474 2015-02-18  David Kilzer  <ddkilzer@apple.com>
2475
2476         Consolidate soft-linked CMTimeMakeWithSeconds() function
2477         <http://webkit.org/b/141655>
2478
2479         Reviewed by Brent Fulgham.
2480
2481         * Configurations/WebCore.unexp: Remove workaround for
2482         CMTimeMakeWithSeconds() weak external.
2483
2484         * WebCore.vcxproj/WebCore.vcxproj:
2485         * WebCore.vcxproj/WebCore.vcxproj.filters:
2486         * WebCore.xcodeproj/project.pbxproj:
2487         - Add CoreMediaSoftLink.{cpp,h} to the project.
2488
2489         * platform/cf/CoreMediaSoftLink.cpp: Add.
2490         * platform/cf/CoreMediaSoftLink.h: Add.
2491         - Implement new strategy where code for soft-linking is only
2492           in one place, and the header can simply be included wherever a
2493           soft-linked method is needed.
2494
2495         * platform/graphics/avfoundation/MediaTimeAVFoundation.cpp:
2496         * platform/graphics/avfoundation/cf/CoreMediaSoftLinking.h:
2497         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2498         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2499         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2500         * platform/mac/PlatformClockCM.mm:
2501         - Remove old soft-linking strategy and include
2502           CoreMediaSoftLink.h.
2503
2504         * platform/mac/SoftLinking.h:
2505         (SOFT_LINK_FUNCTION_DECL): Add.  New macro function used for
2506         header declaration.  Split out from SOFT_LINK() macro.  Also
2507         stop violating C++ standards by redeclaring an inline function
2508         with the exact same signature as an extern "C" function.  This
2509         now matches what we do on Windows (where Visual C++ already
2510         prevented these shenanigans).
2511         (SOFT_LINK_FUNCTION_IMPL): Add.  New macro function used for
2512         source implementation.  Split out the from SOFT_LINK() macro.
2513
2514         * platform/win/SoftLinking.h:
2515         (SOFT_LINK_FRAMEWORK): Map mac/SoftLinking.h macro name to
2516         Windows macros so we can simplify CoreMediaSoftLink.{cpp,h}.
2517         (SOFT_LINK_FUNCTION_DECL): Add.
2518         (SOFT_LINK_FUNCTION_IMPL): Add.
2519         - New macro functions split out from SOFT_LINK_DLL_IMPORT()
2520           macro for header declaration and source implementation.
2521         - We assume the __cdecl calling convention because that's what
2522           all Apple libraries use, and so we are able to use the exact
2523           same macro function on both Mac and Windows to simplify
2524           CoreMediaSoftLink.{cpp,h}.
2525
2526 2015-02-18  Brady Eidson  <beidson@apple.com>
2527
2528         Page::userContentController() should return a reference, not a pointer
2529         https://bugs.webkit.org/show_bug.cgi?id=141764
2530
2531         Reviewed by Jer Noble.
2532
2533         No new tests (No behavior change)
2534
2535         * dom/DocumentStyleSheetCollection.cpp:
2536         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
2537         * loader/cache/CachedResourceLoader.cpp:
2538         (WebCore::CachedResourceLoader::requestResource):
2539         * page/CaptionUserPreferences.cpp:
2540         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
2541         * page/DOMWindow.cpp:
2542         (WebCore::DOMWindow::shouldHaveWebKitNamespaceForWorld):
2543         * page/Frame.cpp:
2544         (WebCore::Frame::injectUserScripts):
2545         * page/Page.cpp:
2546         (WebCore::Page::Page):
2547         (WebCore::Page::~Page):
2548         (WebCore::Page::setUserContentController):
2549         * page/Page.h:
2550         (WebCore::Page::userContentController):
2551         * page/UserMessageHandlersNamespace.cpp:
2552         (WebCore::UserMessageHandlersNamespace::handler):
2553
2554 2015-02-18  Roger Fong  <roger_fong@apple.com>
2555
2556         WebGL2: Promote various WebGL1 extensions to core for WebGL2.
2557         https://bugs.webkit.org/show_bug.cgi?id=141446
2558         <rdar://problem/19633715>
2559
2560         Reviewed by Brent Fulham.
2561
2562         Tests covered by WebGL2 conformance tests.
2563
2564         This patch promotes the following WebGL1 extensions to core in WebGL2:
2565         OES_element_index_uint 
2566         EXT_sRGB 
2567         EXT_blend_minmax 
2568         EXT_frag_depth 
2569         EXT_shader_texture_lod
2570         OES_standard_derivatives 
2571         
2572         The latter 3 are enabled by default now for GLSL1, though we will get these extensions 
2573         for free when GLSL3 becomes available.
2574
2575         WebGL2 binding code should actually fall back to base implementation for getFramebufferAttachmentParameter.
2576         * bindings/js/JSWebGL2RenderingContextCustom.cpp: 
2577         (WebCore::JSWebGL2RenderingContext::getFramebufferAttachmentParameter): Deleted.
2578         * html/canvas/WebGL2RenderingContext.idl: Ditto.
2579
2580         * html/canvas/WebGL2RenderingContext.cpp:
2581         (WebCore::WebGL2RenderingContext::getExtension): Enable WEBGL_lose_context as an extension again.
2582         It was not promoted to core as I originally thought it had been.
2583         (WebCore::WebGL2RenderingContext::getSupportedExtensions): Ditto.
2584         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext): Promote the 3 shader extensions for GLSL1 to core.
2585         (WebCore::WebGL2RenderingContext::initializeShaderExtensions): Ditto.
2586         (WebCore::WebGL2RenderingContext::getFramebufferAttachmentParameter): Promote SRGB extension to core.
2587         (WebCore::WebGL2RenderingContext::renderbufferStorage): Ditto.
2588         (WebCore::WebGL2RenderingContext::hint): Ditto.
2589         (WebCore::WebGL2RenderingContext::validateTexFuncFormatAndType): Ditto.
2590         (WebCore::WebGL2RenderingContext::validateIndexArrayConservative): Promote OES_element_index_uint extension to core.
2591         (WebCore::WebGL2RenderingContext::validateDrawElements): Ditto.
2592         (WebCore::WebGL2RenderingContext::validateBlendEquation): Promote EXT_blend_minmax extension to core.
2593         * html/canvas/WebGL2RenderingContext.h:
2594
2595         * html/canvas/WebGLRenderingContext.cpp:
2596         (WebCore::WebGLRenderingContext::getFramebufferAttachmentParameter): Copied form WebGLRenderingContextBase.
2597         (WebCore::WebGLRenderingContext::renderbufferStorage): Ditto.
2598         (WebCore::WebGLRenderingContext::hint): Ditto.
2599         (WebCore::WebGLRenderingContext::validateIndexArrayConservative): Ditto.
2600         (WebCore::WebGLRenderingContext::validateDrawElements): Ditto.
2601         (WebCore::WebGLRenderingContext::validateBlendEquation): Ditto.
2602         * html/canvas/WebGLRenderingContext.h:
2603
2604         * html/canvas/WebGLRenderingContextBase.cpp:
2605         (WebCore::WebGLRenderingContextBase::validateIndexArrayConservative): Deleted.
2606         (WebCore::WebGLRenderingContextBase::validateDrawElements): Deleted.
2607         (WebCore::WebGLRenderingContextBase::getExtension): Deleted.
2608         (WebCore::WebGLRenderingContextBase::getFramebufferAttachmentParameter): Deleted.
2609         (WebCore::WebGLRenderingContextBase::hint): Deleted.
2610         (WebCore::WebGLRenderingContextBase::renderbufferStorage): Deleted.
2611         (WebCore::WebGLRenderingContextBase::validateBlendEquation): Deleted.
2612         * html/canvas/WebGLRenderingContextBase.h:
2613
2614 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
2615
2616         Streamline unexported function build fixes
2617         https://bugs.webkit.org/show_bug.cgi?id=141761
2618
2619         Reviewed by Alex Christensen.
2620
2621         * Configurations/WebCore.unexp: Added some functions for symbols only used on newer
2622         OS versions. Removed a special case for NodeList, to handle it uniformly with Node.
2623
2624         * Configurations/WebCore.xcconfig: Made the unexported list unconditional, because
2625         it's not only Xcode 5 that is affected.
2626
2627         * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): We already had a hack for
2628         Node, NodeList needs an exactly the same one. Also updated the comments.
2629
2630 2015-02-18  Chris Dumez  <cdumez@apple.com>
2631
2632         Access FontCache global instance via singleton() static member function
2633         https://bugs.webkit.org/show_bug.cgi?id=141726
2634
2635         Reviewed by Daniel Bates.
2636
2637         Access FontCache global instance via singleton() static member function,
2638         as per coding style.
2639
2640 2015-02-18  Alexey Proskuryakov  <ap@apple.com>
2641
2642         Crashes under IDBDatabase::closeConnection.
2643         https://bugs.webkit.org/show_bug.cgi?id=141745
2644         rdar://problem/19816412
2645
2646         Reviewed by David Kilzer.
2647
2648         * Modules/indexeddb/IDBDatabase.cpp: (WebCore::IDBDatabase::closeConnection):
2649         Add a missing protector.
2650
2651 2015-02-18  Myles C. Maxfield  <mmaxfield@apple.com>
2652
2653         Justified ruby can cause lines to grow beyond their container
2654         https://bugs.webkit.org/show_bug.cgi?id=141732
2655
2656         Reviewed by David Hyatt.
2657
2658         After we re-layout RenderRubyRuns, this can change the environment upon which
2659         ruby's overhang calculation is sensitive to. Before this patch, we would recalculate
2660         the overhang after the RenderRubyRun gets relaid out. However, doing such causes the
2661         effective width of the RenderRubyRun to change, which causes out subsequent
2662         justification calculations to be off.
2663
2664         Therefore, we have a cycle; the amount of ruby overhang can change the justification
2665         in a line, and the layout of the line affects the ruby overhang calculation. Instead
2666         of performing a layout in a loop until it converges, this patch simply observes that
2667         having a flush right edge is more valuable than having a perfectly correct overhang.
2668         It therefore simply removes the secondary overhang calculation.
2669
2670         Test: fast/text/ruby-justification-flush.html
2671
2672         * rendering/RenderBlockFlow.h:
2673         * rendering/RenderBlockLineLayout.cpp:
2674         (WebCore::RenderBlockFlow::updateRubyForJustifiedText):
2675         (WebCore::RenderBlockFlow::computeExpansionForJustifiedText):
2676         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
2677
2678 2015-02-18  Chris Dumez  <cdumez@apple.com>
2679
2680         Evict dead resources in MemoryCache in MemoryPressureHandler::releaseNoncriticalMemory()
2681         https://bugs.webkit.org/show_bug.cgi?id=141723
2682
2683         Reviewed by Andreas Kling.
2684
2685         Evict dead resources from the MemoryCache on non-critical memory
2686         pressure. On critical memory pressure, we already evict ALL resources
2687         from the MemoryCache. It is a good idea to start by evicting resources
2688         we care less about on non-critical warning to decrease the chances of
2689         getting a critical warning and thus having to clear the whole
2690         MemoryCache.
2691
2692         * loader/cache/MemoryCache.h:
2693         * platform/MemoryPressureHandler.cpp:
2694         (WebCore::MemoryPressureHandler::releaseNoncriticalMemory):
2695         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2696         (WebCore::MemoryPressureHandler::releaseMemory):
2697         Call releaseCriticalMemory() before releaseNoncriticalMemory()
2698         as releaseCriticalMemory() is more aggressive. Doing it the
2699         other way around would mean that on critical warning, we would
2700         first evict dead resources, then evict all resources. It is
2701         more efficient to evict all resources first, as it makes the
2702         non-critical operation (evict dead resources) a no-op.
2703
2704 2015-02-18  Eric Carlson  <eric.carlson@apple.com>
2705
2706         [iOS] pause video when a tab moves to the background on some devices
2707         https://bugs.webkit.org/show_bug.cgi?id=141753
2708         <rdar://problem/19814562>
2709
2710         Reviewed by Jer Noble.
2711
2712         Test: media/video-background-tab-playback.html
2713
2714         * platform/audio/MediaSession.cpp:
2715         (WebCore::MediaSession::clientDataBufferingTimerFired): Pause video when the element becomes
2716             hidden if the BackgroundTabPlaybackRestricted is set.
2717
2718         * platform/audio/MediaSessionManager.cpp:
2719         (WebCore::MediaSessionManager::applicationWillEnterBackground): Rename BackgroundPlaybackNotPermitted
2720              to BackgroundProcessPlaybackRestricted.
2721         (WebCore::MediaSessionManager::applicationWillEnterForeground): Ditto.
2722         * platform/audio/MediaSessionManager.h:
2723
2724         * platform/audio/ios/MediaSessionManagerIOS.mm:
2725         (WebCore::MediaSessionManageriOS::resetRestrictions): Set BackgroundTabPlaybackRestricted on
2726             devices with restricted memory. BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
2727
2728         * testing/Internals.cpp:
2729         (WebCore::Internals::setMediaSessionRestrictions): Add support for BackgroundTabPlaybackRestricted.
2730             BackgroundPlaybackNotPermitted -> BackgroundProcessPlaybackRestricted.
2731
2732 2015-02-16  David Hyatt  <hyatt@apple.com>
2733
2734         Wrong element's style is used for text-decoration-style.
2735         https://bugs.webkit.org/show_bug.cgi?id=141673
2736         <rdar://problem/19876774>
2737
2738         Reviewed by Dean Jackson.
2739
2740         Added fast/text/text-underline-style.html
2741
2742         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2743         (AXAttributeStringSetStyle):
2744         Add arguments for fetching styles.
2745
2746         * rendering/InlineTextBox.cpp:
2747         (WebCore::InlineTextBox::paint):
2748         (WebCore::InlineTextBox::paintDecoration):
2749         * rendering/InlineTextBox.h:
2750         Remove the passed in TextDecorationStyle and instead patch the code to fetch the styles in the same
2751         way it fetches the colors.
2752
2753         * rendering/RenderObject.cpp:
2754         (WebCore::RenderObject::getTextDecorationColorsAndStyles):
2755         (WebCore::RenderObject::getTextDecorationColors): Deleted.
2756         * rendering/RenderObject.h:
2757         Add style fetching to the same function that fetches colors and rename it.
2758
2759 2015-02-18  David Kilzer  <ddkilzer@apple.com>
2760
2761         REGRESSION (r180260): Try to fix incremental builds by changing UserContentController.cpp
2762
2763         Attempt to fix this linker error by making a non-coding change:
2764
2765             Undefined symbols for architecture i386:
2766               "__ZN7WebCore17ContentExtensions24ContentExtensionsBackendC1Ev", referenced from:
2767                   __ZN7WebCore21UserContentController20addUserContentFilterERKN3WTF6StringES4_ in UserContentController.o
2768             ld: symbol(s) not found for architecture i386
2769
2770         This should have been fixed by r180266, but perhaps Xcode didn't
2771         recognize that it needed to rebuild this source file.
2772
2773         * page/UserContentController.cpp: Update copyright.
2774
2775 2015-02-18  Andreas Kling  <akling@apple.com>
2776
2777         Purge PassRefPtr from CanvasRenderingContext2D.
2778         <https://webkit.org/b/141749>
2779
2780         Reviewed by Gyuyoung Kim.
2781
2782         Switch from using PassRefPtr to RefPtr/Ref in CanvasRenderingContext2D.
2783
2784         * html/TextMetrics.h:
2785         (WebCore::TextMetrics::create): Changed create() helper to return Ref.
2786
2787         * html/canvas/CanvasRenderingContext2D.h:
2788         * html/canvas/CanvasRenderingContext2D.cpp:
2789         (WebCore::CanvasRenderingContext2D::prepareGradientForDashboard): Changed to take a reference.
2790
2791         (WebCore::CanvasRenderingContext2D::createLinearGradient):
2792         (WebCore::CanvasRenderingContext2D::createRadialGradient):
2793         (WebCore::CanvasRenderingContext2D::createPattern):
2794         (WebCore::createEmptyImageData):
2795         (WebCore::CanvasRenderingContext2D::createImageData):
2796         (WebCore::CanvasRenderingContext2D::getImageData):
2797         (WebCore::CanvasRenderingContext2D::webkitGetImageDataHD): Made these return RefPtr. Also did
2798         a bunch of 0 -> nullptr conversion, removed a bunch of unnecessary RefPtr::release() calls,
2799         and changed a PassRefPtr argument to RefPtr&&.
2800
2801         (WebCore::CanvasRenderingContext2D::measureText): Made this return Ref.
2802
2803 2015-02-18  Commit Queue  <commit-queue@webkit.org>
2804
2805         Unreviewed, rolling out r180260.
2806         https://bugs.webkit.org/show_bug.cgi?id=141757
2807
2808         Broke the 32-bit builders (Requested by jessieberlin on
2809         #webkit).
2810
2811         Reverted changeset:
2812
2813         "Add a trivial code generator for the DFA"
2814         https://bugs.webkit.org/show_bug.cgi?id=141017
2815         http://trac.webkit.org/changeset/180260
2816
2817 2015-02-17  Anders Carlsson  <andersca@apple.com>
2818
2819         Add API for clearing in-memory caches to WKWebsiteDataStore
2820         https://bugs.webkit.org/show_bug.cgi?id=141724
2821
2822         Reviewed by Tim Horton.
2823
2824         Add a version of evictResources that takes a session id.
2825
2826         * loader/cache/MemoryCache.cpp:
2827         (WebCore::MemoryCache::evictResources):
2828
2829 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
2830
2831         Remove more references to WebCore.exp.in
2832         https://bugs.webkit.org/show_bug.cgi?id=141747
2833
2834         Reviewed by Alexey Proskuryakov.
2835
2836         * WebCore.xcodeproj/project.pbxproj:
2837
2838 2015-02-17  Benjamin Poulain  <benjamin@webkit.org>
2839
2840         Add a trivial code generator for the DFA
2841         https://bugs.webkit.org/show_bug.cgi?id=141017
2842
2843         Reviewed by Andreas Kling.
2844
2845         Nothing fancy yet, this is just doing a literal translation from the DFA
2846         to machine code. It is extremely inefficient at the moment.
2847
2848         * WebCore.xcodeproj/project.pbxproj:
2849         * contentextensions/ContentExtensionsBackend.cpp:
2850         (WebCore::ContentExtensions::ContentExtensionsBackend::ContentExtensionsBackend):
2851         (WebCore::ContentExtensions::ContentExtensionsBackend::setRuleList):
2852         (WebCore::ContentExtensions::addActionToHashSet):
2853         (WebCore::ContentExtensions::ContentExtensionsBackend::shouldBlockURL):
2854         * contentextensions/ContentExtensionsBackend.h:
2855         * contentextensions/DFA.cpp:
2856         (WebCore::ContentExtensions::DFA::nextState): Deleted.
2857         (WebCore::ContentExtensions::DFA::actions): Deleted.
2858         * contentextensions/DFA.h:
2859         (WebCore::ContentExtensions::DFA::size):
2860         (WebCore::ContentExtensions::DFA::nodeAt):
2861         * contentextensions/DFACompiler.cpp: Added.
2862         (WebCore::ContentExtensions::compileDFA):
2863         (WebCore::ContentExtensions::DFACodeGenerator::DFACodeGenerator):
2864         (WebCore::ContentExtensions::DFACodeGenerator::compile):
2865         (WebCore::ContentExtensions::DFACodeGenerator::lowerStateMachine):
2866         (WebCore::ContentExtensions::DFACodeGenerator::lowerNode):
2867         (WebCore::ContentExtensions::DFACodeGenerator::getNextCharacter):
2868         (WebCore::ContentExtensions::DFACodeGenerator::callAddActionFunction):
2869         * contentextensions/DFACompiler.h: Copied from Source/WebCore/contentextensions/DFA.h.
2870
2871 2015-02-17  Chris Dumez  <cdumez@apple.com>
2872
2873         Rename ScopedEventQueue::instance() to singleton()
2874         https://bugs.webkit.org/show_bug.cgi?id=141738
2875
2876         Reviewed by Daniel Bates.
2877
2878         Rename ScopedEventQueue::instance() to singleton(), as per coding
2879         style. Also modernize the code a little bit.
2880
2881         * dom/EventDispatcher.cpp:
2882         (WebCore::EventDispatcher::dispatchScopedEvent):
2883         * dom/ScopedEventQueue.cpp:
2884         (WebCore::ScopedEventQueue::singleton):
2885         (WebCore::ScopedEventQueue::dispatchAllEvents):
2886         (WebCore::ScopedEventQueue::incrementScopingLevel):
2887         (WebCore::ScopedEventQueue::decrementScopingLevel):
2888         (WebCore::ScopedEventQueue::ScopedEventQueue): Deleted.
2889         (WebCore::ScopedEventQueue::~ScopedEventQueue): Deleted.
2890         (WebCore::ScopedEventQueue::instance): Deleted.
2891         * dom/ScopedEventQueue.h:
2892         (WebCore::EventQueueScope::EventQueueScope):
2893         (WebCore::EventQueueScope::~EventQueueScope):
2894
2895 2015-02-17  Chris Dumez  <cdumez@apple.com>
2896
2897         Remove dead code from FontCache
2898         https://bugs.webkit.org/show_bug.cgi?id=141741
2899
2900         Reviewed by Daniel Bates.
2901
2902         Remove dead code from FontCache:
2903         - getFontFamilyForCharacters() has no implementation.
2904         - SimpleFontFamily is unused.
2905
2906         * platform/graphics/FontCache.h:
2907
2908 2015-02-17  Chris Dumez  <cdumez@apple.com>
2909
2910         Rename CSSPropertyAnimationWrapperMap::instance() to singleton()
2911         https://bugs.webkit.org/show_bug.cgi?id=141739
2912
2913         Reviewed by Simon Fraser.
2914
2915         Rename CSSPropertyAnimationWrapperMap::instance() to singleton(), as
2916         per coding style.
2917
2918         * page/animation/CSSPropertyAnimation.cpp:
2919         (WebCore::CSSPropertyAnimationWrapperMap::singleton):
2920         (WebCore::CSSPropertyAnimation::blendProperties):
2921         (WebCore::CSSPropertyAnimation::animationOfPropertyIsAccelerated):
2922         (WebCore::CSSPropertyAnimation::animatableShorthandsAffectingProperty):
2923         (WebCore::CSSPropertyAnimation::propertiesEqual):
2924         (WebCore::CSSPropertyAnimation::getPropertyAtIndex):
2925         (WebCore::CSSPropertyAnimation::getNumProperties):
2926         (WebCore::CSSPropertyAnimationWrapperMap::instance): Deleted.
2927
2928 2015-02-17  David Kilzer  <ddkilzer@apple.com>
2929
2930         REGRESSION (r180224): Remove unused generate-export-file script
2931         <http://webkit.org/b/141491>
2932
2933         * generate-export-file: Removed.  This was the script used to
2934         create WebCore.exp files for iOS since we couldn't compile a
2935         host-side tool to run like we did on Mac OS X.  Dont't tell
2936         anyone, but this was an epic hack I created while merging open
2937         source changes to the internal iOS WebKit repository around the
2938         time that the WebCore.exp.in file was created.  End of an era.
2939
2940 2015-02-17  David Kilzer  <ddkilzer@apple.com>
2941
2942         SoftLinking.h: Update copyright and license; clean up whitespace
2943
2944         * platform/win/SoftLinking.h:
2945
2946 2015-02-17  Chris Dumez  <cdumez@apple.com>
2947
2948         Slight CachedPage class clean up
2949         https://bugs.webkit.org/show_bug.cgi?id=141693
2950
2951         Reviewed by Andreas Kling.
2952
2953         Slight CachedPage class clean up:
2954         - Drop unnecessary m_timeStamp data member
2955         - Protect m_needsCaptionPreferencesChanged data member with
2956           #if ENABLE(VIDEO_TRACK)
2957         - Merge destroy() method into the destructor as this is the
2958           only caller
2959         - Update clear() to reset 2 data members that were missing
2960
2961 2015-02-17  Anders Carlsson  <andersca@apple.com>
2962
2963         Silence two -Wcast-qual warnings.
2964         rdar://problem/19758266
2965
2966         * platform/ios/wak/WKUtilities.c:
2967         (WKRetain):
2968         (WKRelease):
2969
2970 2015-02-17  Zalan Bujtas  <zalan@apple.com>
2971
2972         Minor RenderTable* class cleanups.
2973         https://bugs.webkit.org/show_bug.cgi?id=141707
2974
2975         Reviewed by Andreas Kling.
2976
2977         Use in-class initializer where possible.
2978         Remove redundant code.
2979         Move multiline implementations out of class declaration.
2980
2981         No change in functionality.
2982
2983         * rendering/RenderTableCaption.cpp:
2984         (WebCore::RenderTableCaption::insertedIntoTree):
2985         (WebCore::RenderTableCaption::willBeRemovedFromTree):
2986         (WebCore::RenderTableCaption::containingBlockLogicalWidthForContent): Deleted.
2987         * rendering/RenderTableCaption.h:
2988         * rendering/RenderTableCell.cpp:
2989         (WebCore::RenderTableCell::RenderTableCell):
2990         * rendering/RenderTableCell.h:
2991         (WebCore::RenderTableCell::colSpan):
2992         (WebCore::RenderTableCell::rowSpan):
2993         (WebCore::RenderTableCell::setCol):
2994         (WebCore::RenderTableCell::col):
2995         (WebCore::RenderTableCell::section):
2996         (WebCore::RenderTableCell::table):
2997         (WebCore::RenderTableCell::rowIndex):
2998         (WebCore::RenderTableCell::styleOrColLogicalWidth):
2999         (WebCore::RenderTableCell::logicalHeightForRowSizing):
3000         (WebCore::RenderTableCell::isBaselineAligned):
3001         (WebCore::RenderTableCell::borderAdjoiningTableStart):
3002         (WebCore::RenderTableCell::borderAdjoiningTableEnd):
3003         (WebCore::RenderTableCell::borderAdjoiningCellBefore):
3004         (WebCore::RenderTableCell::borderAdjoiningCellAfter):
3005         * rendering/RenderTableCol.cpp:
3006         (WebCore::RenderTableCol::RenderTableCol):
3007         * rendering/RenderTableCol.h:
3008         (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentBefore):
3009         (WebCore::RenderTableCol::enclosingColumnGroupIfAdjacentAfter):
3010         * rendering/RenderTableRow.h:
3011         (WebCore::RenderTableRow::setRowIndex):
3012         (WebCore::RenderTableRow::rowIndex):
3013         (WebCore::RenderTableRow::borderAdjoiningTableStart):
3014         (WebCore::RenderTableRow::borderAdjoiningTableEnd):
3015         (WebCore::RenderTableRow::table):
3016         (WebCore::RenderTableSection::firstRow):
3017         (WebCore::RenderTableSection::lastRow):
3018         * rendering/RenderTableSection.cpp:
3019         (WebCore::RenderTableSection::RenderTableSection):
3020         (WebCore::RenderTableSection::dirtiedRows):
3021         (WebCore::RenderTableSection::dirtiedColumns):
3022         (WebCore::RenderTableSection::paintObject):
3023         (WebCore::RenderTableSection::nodeAtPoint):
3024         * rendering/RenderTableSection.h:
3025         (WebCore::CellSpan::CellSpan):
3026         (WebCore::RenderTableSection::borderAdjoiningTableStart):
3027         (WebCore::RenderTableSection::borderAdjoiningTableEnd):
3028         (WebCore::RenderTableSection::cellAt):
3029         (WebCore::RenderTableSection::primaryCellAt):
3030         (WebCore::RenderTableSection::rowRendererAt):
3031         (WebCore::RenderTableSection::outerBorderLeft):
3032         (WebCore::RenderTableSection::outerBorderRight):
3033         (WebCore::RenderTableSection::outerBorderTop):
3034         (WebCore::RenderTableSection::outerBorderBottom):
3035         (WebCore::RenderTableSection::numRows):
3036         (WebCore::RenderTableSection::recalcCellsIfNeeded):
3037         (WebCore::RenderTableSection::rowBaseline):
3038         (WebCore::RenderTableSection::fullTableRowSpan):
3039         (WebCore::CellSpan::start): Deleted.
3040         (WebCore::CellSpan::end): Deleted.
3041
3042 2015-02-16  Dean Jackson  <dino@apple.com>
3043
3044         REGRESSION: Video control fails to hide after playback begins in reflowable EPUB files
3045         https://bugs.webkit.org/show_bug.cgi?id=141689
3046         <rdar://problem/19689286>
3047
3048         Reviewed by Eric Carlson.
3049
3050         The iBooks app turns off the requirement for a user gesture
3051         before triggering playback. When we moved to script-based
3052         media controls there were a few regressions in this setup.
3053         This makes them behave a lot more like iOS 7.
3054
3055         * Modules/mediacontrols/mediaControlsApple.js:
3056         (Controller.prototype.setPlaying): We don't want to hide the controls
3057         yet, just start a hiding timer.
3058         * Modules/mediacontrols/mediaControlsiOS.js:
3059         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): If we've ever
3060         played before, we don't want to show the big start button. If we
3061         are in the middle of construction, we do want to show it. We no
3062         longer care about the case where you're not in setup and have
3063         the relaxed restrictions (we still want to show the start button
3064         in that case).
3065         (ControllerIOS.prototype.showControls): When we show the controls,
3066         make sure our timeline is up to date. This is necessary for the
3067         cases where we automatically show the controls, such as when we hit
3068         the end of a video.
3069         (ControllerIOS.prototype.updateTime): Make sure to pass the forceUpdate
3070         parameter on to the super-method.
3071         (ControllerIOS.prototype.setPlaying):
3072         (ControllerIOS.prototype.progressFillStyle): Deleted.
3073
3074 2015-02-17  Chris Dumez  <cdumez@apple.com>
3075
3076         Access MemoryPressureHandler global instance via a singleton() static member function
3077         https://bugs.webkit.org/show_bug.cgi?id=141691
3078
3079         Reviewed by Andreas Kling.
3080
3081         Access MemoryPressureHandler global instance via a singleton() static
3082         member function as per coding style. Also make all other member
3083         functions non-static as callers can just use singleton() to get the
3084         instance and access methods. This avoid having to call
3085         MemoryPressureHandler::singleton() from member functions.
3086
3087         * bindings/js/ScriptController.cpp:
3088         (WebCore::collectGarbageAfterWindowShellDestruction):
3089         * history/PageCache.cpp:
3090         (WebCore::PageCache::canCache):
3091         * loader/FrameLoader.cpp:
3092         (WebCore::FrameLoader::commitProvisionalLoad):
3093         * page/FrameView.cpp:
3094         (WebCore::FrameView::willPaintContents):
3095         (WebCore::FrameView::didPaintContents):
3096         (WebCore::FrameView::computeCoverageRect):
3097         * platform/MemoryPressureHandler.cpp:
3098         (WebCore::MemoryPressureHandler::singleton):
3099         (WebCore::MemoryPressureHandler::MemoryPressureHandler):
3100         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
3101         (WebCore::memoryPressureHandler): Deleted.
3102         * platform/MemoryPressureHandler.h:
3103         (WebCore::MemoryPressureHandler::setLowMemoryHandler):
3104         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
3105         (WebCore::MemoryPressureHandler::platformReleaseMemory):
3106         (WebCore::MemoryPressureHandler::install):
3107         (WebCore::MemoryPressureHandler::holdOff):
3108         (WebCore::respondToMemoryPressureCallback):
3109         * platform/graphics/FontCache.cpp:
3110         (WebCore::FontCache::purgeInactiveFontDataIfNeeded):
3111         * platform/ios/LegacyTileCache.mm:
3112         (WebCore::LegacyTileCache::createTilesInActiveGrid):
3113         * platform/ios/LegacyTileGrid.mm:
3114         (WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage):
3115         * platform/ios/LegacyTileLayerPool.mm:
3116         (WebCore::LegacyTileLayerPool::addLayer):
3117         * platform/ios/TileControllerMemoryHandlerIOS.cpp:
3118         (WebCore::TileControllerMemoryHandler::tileControllerGainedUnparentedTiles):
3119         * platform/linux/MemoryPressureHandlerLinux.cpp:
3120         (WebCore::MemoryPressureHandler::waitForMemoryPressureEvent):
3121
3122 2015-02-17  Alex Christensen  <achristensen@webkit.org>
3123
3124         Remove WebCore.exp.in and clean up.
3125         https://bugs.webkit.org/show_bug.cgi?id=141491
3126
3127         Reviewed by Andreas Kling.
3128
3129         * Configurations/WebCore.xcconfig:
3130         Don't use exported symbols files.
3131         * DerivedSources.make:
3132         Don't generate export files.
3133         * WebCore.exp.in: Removed.
3134         * WebCore.xcodeproj/project.pbxproj:
3135         Removed WebCoreExportFileGenerator targets.
3136         * make-export-file-generator: Removed.
3137
3138 2015-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3139
3140         Use HashMap::add instead of get/contains + set in DOMObjectCache
3141         https://bugs.webkit.org/show_bug.cgi?id=141558
3142
3143         Rubber-stamped by Žan Doberšek.
3144
3145         * bindings/gobject/DOMObjectCache.cpp:
3146         (WebKit::getOrCreateDOMObjectCacheFrameObserver):
3147         (WebKit::DOMObjectCache::put):
3148
3149 2015-02-17  Carlos Garcia Campos  <cgarcia@igalia.com>
3150
3151         [GTK] GObject DOM bindings object are cached forever
3152         https://bugs.webkit.org/show_bug.cgi?id=141558
3153
3154         Reviewed by Sergio Villar Senin.
3155
3156         Rework the DOMObjectCache to avoid having to manually clear the
3157         objects when the frame is destroyed, using a FrameDestructionObserver
3158         instead. When a new object associated to a Frame is added to the
3159         cache, a FrameDestructionObserver is created for the frame if
3160         needed, and the DOM object is tracked by the observer too. When
3161         the frame is detached from the page all its objects are cleared,
3162         and if the aren't additional references, the object is finalized
3163         and removed from the cache normally.
3164         This patch also simplifies and modernizes the code to make it
3165         easier to read an maintain.
3166
3167         * bindings/gobject/DOMObjectCache.cpp:
3168         (WebKit::DOMObjectCacheData::DOMObjectCacheData): Add constructor
3169         to initialize its members and simplify the callers.
3170         (WebKit::DOMObjectCacheData::clearObject): Remove the references
3171         added by the cache, ensuring the GObject is not finalized until
3172         the method returns.
3173         (WebKit::DOMObjectCacheData::refObject): Adds a reference owned by
3174         the cache.
3175         (WebKit::domObjectCacheFrameObservers): Map a frame to a FrameDestructionObserver.
3176         (WebKit::getOrCreateDOMObjectCacheFrameObserver): Create a new
3177         FrameDestructionObserver for the given Frame or return the
3178         existing one.
3179         (WebKit::domObjects): Map wrapped object to wrapper object.
3180         (WebKit::DOMObjectCache::forget): Remove the wrapped object from
3181         the cache.
3182         (WebKit::DOMObjectCache::get): Return the wrapped object if it is
3183         in the cache, increasing the cache references.
3184         (WebKit::DOMObjectCache::put): Add the wrapper object to the cache
3185         for the given wrapped object. If it's a Node and has a frame add
3186         the node to the FrameDestructionObserver corresponding to the frame.
3187         (WebKit::getFrameFromHandle): Deleted.
3188         (WebKit::weakRefNotify): Deleted.
3189         (WebKit::DOMObjectCache::clearByFrame): Deleted.
3190         (WebKit::DOMObjectCache::~DOMObjectCache): Deleted.
3191         * bindings/gobject/DOMObjectCache.h:
3192
3193 2015-02-17  ChangSeok Oh  <changseok.oh@collabora.com>
3194
3195         REGRESSION(r180050): It broke the !ENABLE(CSS_GRID_LAYOUT) build
3196         https://bugs.webkit.org/show_bug.cgi?id=141647
3197
3198         Reviewed by Csaba Osztrogonác.
3199
3200         No new tests since this just fixes a build break.
3201
3202         * dom/Position.cpp: Add a build guard ENABLE(CSS_GRID_LAYOUT) for RenderGrid.
3203         (WebCore::Position::isCandidate):
3204
3205 2015-02-16  Chris Dumez  <cdumez@apple.com>
3206
3207         Keep all memory cache resources in ListHashSets
3208         https://bugs.webkit.org/show_bug.cgi?id=141667
3209
3210         Reviewed by Andreas Kling.
3211
3212         Keep all memory cache resources in ListHashSets instead of manual linked
3213         lists. This simplifies the code a lot and is also more efficient for
3214         retrieving / removing particular CachedResources.
3215
3216         * loader/cache/CachedResource.cpp:
3217         (WebCore::CachedResource::CachedResource):
3218         * loader/cache/CachedResource.h:
3219         * loader/cache/MemoryCache.cpp:
3220         (WebCore::MemoryCache::pruneDeadResourcesToSize):
3221         (WebCore::MemoryCache::removeFromLRUList):
3222         (WebCore::MemoryCache::insertInLRUList):
3223         (WebCore::MemoryCache::dumpLRULists):
3224         (WebCore::MemoryCache::lruListFor): Deleted.
3225         * loader/cache/MemoryCache.h:
3226
3227 2015-02-16  Benjamin Poulain  <benjamin@webkit.org>
3228
3229         CSS JIT: finish :nth-last-child()
3230         https://bugs.webkit.org/show_bug.cgi?id=141629
3231
3232         Reviewed by Andreas Kling.
3233
3234         This patch adds the matcher for :nth-child(An+B of selector list) and
3235         fix a small bug I discovered while working on it.
3236
3237         The matcher is straightforward: count the next siblings matching the selector,
3238         nothing fancy.
3239
3240         While working on it I noticed I forgot the test for IsParsingChildrenFinished
3241         on the simple version of :nth-last-child(). I add it in both matcher, write
3242         a couple of tests, the first part of the tests now succeed, but the second part
3243         fails...
3244
3245         What happened is:
3246         1) We interupt the parsing to execute the JavaScript.
3247            From there, we force the style resolution to get the computed style.
3248         2) When resolving the style, the early check for isFinishedParsingChildren()
3249            quits the function early. This is done *before* we marked the parent
3250            for :nth-last-child() style resolution.
3251         3) After the script, parsing resume and the following elements are added.
3252         4) When resolving the style, only the new elements are marked dirty,
3253            the elements pending their :nth-last-child() style never get udpated.
3254
3255         To fix the problem, I moved the test for FinishedParsingChildren after
3256         the parent marking.
3257
3258         Honestly, those early return for FinishedParsingChildren need to be refined
3259         and they should be tested properly. We should not do this kind of things
3260         for Query for example.
3261
3262         Tests: fast/selectors/nth-last-child-cannot-match-during-parsing-1.html
3263                fast/selectors/nth-last-child-cannot-match-during-parsing-2.html
3264                fast/selectors/nth-last-child-of-cannot-match-during-parsing-1.html
3265                fast/selectors/nth-last-child-of-cannot-match-during-parsing-2.html
3266                fast/selectors/nth-last-child-of-register-requirement.html
3267
3268         * css/SelectorChecker.cpp:
3269         (WebCore::SelectorChecker::checkOne):
3270         Fix the tree marking.
3271
3272         * cssjit/SelectorCompiler.cpp:
3273         (WebCore::SelectorCompiler::addPseudoClassType):
3274         The fragment creation was already done, all I had to do was
3275         accept the compile.
3276
3277         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementMatching):
3278         :nth-child() and :nth-last-child() with a selector list are heavier than :not()
3279         and :matches(), move them accordingly.
3280
3281         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChild):
3282         More the early return after the tree marking.
3283
3284         (WebCore::SelectorCompiler::setParentAffectedByLastChildOf):
3285         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementIsNthLastChildOf):
3286         New matcher, nothing optimized yet.
3287
3288 2015-02-16  Tim Horton  <timothy_horton@apple.com>
3289
3290         Adopt CAMachPort-as-layer-contents
3291         https://bugs.webkit.org/show_bug.cgi?id=141687
3292         <rdar://problem/19393233>
3293
3294         Reviewed by Simon Fraser.
3295
3296         No new tests, just a performance bump.
3297
3298         * platform/cocoa/MachSendRight.h:
3299         (WebCore::MachSendRight::operator bool):
3300         Add an operator bool() that checks if the underlying port is nonnull.
3301
3302         * platform/spi/cocoa/QuartzCoreSPI.h:
3303         Add some SPI.
3304
3305 2015-02-15  Sam Weinig  <sam@webkit.org>
3306
3307         Add experimental <attachment> element support
3308         https://bugs.webkit.org/show_bug.cgi?id=141626
3309
3310         Reviewed by Tim Horton.
3311
3312         Adds scaffolding for an experimental implementation of an <attachment> element
3313         which can represent a file attachment (e.g. NSTextAttachment in NSAttributedString
3314         parlance).
3315
3316         The implementation is guarded by both an #ifdef (ENABLE(ATTACHMENT_ELEMENT)) and 
3317         a setting (Settings::attachmentElementEnabled()).
3318
3319         Tests: fast/attachment/attachment-disabled-dom.html
3320                fast/attachment/attachment-disabled-rendering.html
3321                fast/attachment/attachment-dom.html
3322                fast/attachment/attachment-rendering.html
3323
3324         * Configurations/FeatureDefines.xcconfig:
3325         Add new ENABLE_ATTACHMENT_ELEMENT macro.
3326
3327         * CMakeLists.txt:
3328         * WebCore.vcxproj/WebCore.vcxproj:
3329         * WebCore.xcodeproj/project.pbxproj:
3330         Add new files.
3331
3332         * dom/make_names.pl:
3333         Add support for checking a setting to determine if a particular tag should be exposed.
3334
3335         * html/HTMLAttachmentElement.cpp: Added.
3336         * html/HTMLAttachmentElement.h: Added.
3337         Stub out the basics of the new element.
3338
3339         * html/HTMLElementsAllInOne.cpp:
3340         Add HTMLAttachmentElement.cpp.
3341
3342         * html/HTMLTagNames.in:
3343         Add 'attachment'.
3344
3345         * page/Settings.in:
3346         Add attachmentElementEnabled setting.
3347
3348         * rendering/RenderAttachment.cpp: Added.
3349         * rendering/RenderAttachment.h: Added.
3350         Stub out the basics of the new render. We will probably want to replace this with
3351         a non-replaced render, but this will do as a placeholder for now.
3352
3353         * rendering/RenderObject.h:
3354         (WebCore::RenderObject::isAttachment):
3355         Add predicate for type casting.
3356
3357         * rendering/RenderingAllInOne.cpp:
3358         Add RenderAttachment.cpp.
3359
3360 2015-02-16  Andreas Kling  <akling@apple.com>
3361
3362         GC (almost) immediately when navigating under memory pressure.
3363         <https://webkit.org/b/141663>
3364
3365         Reviewed by Geoffrey Garen.
3366
3367         Since the PageCache is already disabled in memory pressure situations,
3368         we know that detaching the old window shell on navigation is basically
3369         guaranteed to generate a bunch of garbage, we can soften the memory
3370         peak a bit by doing a GC right away instead of scheduling one for soon(tm).
3371
3372         * bindings/js/GCController.cpp:
3373         (WebCore::GCController::GCController):
3374         (WebCore::GCController::garbageCollectSoon):
3375         (WebCore::GCController::garbageCollectOnNextRunLoop):
3376         (WebCore::GCController::gcTimerFired):
3377         * bindings/js/GCController.h:
3378
3379             Add a GCController::garbageCollectOnNextRunLoop() complement to the
3380             "soon" and "now" options. There was already a zero timer in here for
3381             non-CF builds, so I just used that same timer to implement this
3382             and have the non-CF code path call garbageCollectOnNextRunLoop().
3383
3384         * bindings/js/ScriptController.cpp:
3385         (WebCore::collectGarbageAfterWindowShellDestruction):
3386         (WebCore::ScriptController::~ScriptController):
3387         (WebCore::ScriptController::clearWindowShell):
3388
3389             Under system memory pressure conditions, schedule a full GC on next
3390             runloop iteration instead of just asking for it to happen soon.
3391             We do it on next runloop to ensure that there's no pointer to the
3392             window object on the stack.
3393
3394 2015-02-16  Enrica Casucci  <enrica@apple.com>
3395
3396         Emoji sequences do not render properly.
3397         https://bugs.webkit.org/show_bug.cgi?id=141661
3398         rdar://problem/19820463
3399
3400         Reviewed by Sam Weinig.
3401
3402         Emoji sequences and emoji with variations should be rendered
3403         using the Complex code path and should be treated as graphemes.
3404         This change modifies advanceByCombiningCharacterSequence to add
3405         this logic.
3406
3407         Test: fast/text/emoji.html
3408
3409         * WebCore.xcodeproj/project.pbxproj:
3410         * platform/graphics/FontCascade.cpp:
3411         (WebCore::FontCascade::characterRangeCodePath):
3412         * platform/graphics/mac/ComplexTextController.cpp:
3413         (WebCore::advanceByCombiningCharacterSequence): Implements a simple
3414         logic to treat emoji sequences and emoji with variations as graphemes.
3415         * platform/text/CharacterProperties.h: Added.
3416         (WebCore::isEmojiGroupCandidate):
3417         (WebCore::isEmojiModifier):
3418         (WebCore::isVariationSelector):
3419         * rendering/RenderText.cpp:
3420         (WebCore::isEmojiGroupCandidate): Deleted.
3421         (WebCore::isEmojiModifier): Deleted.
3422
3423 2015-02-16  Zalan Bujtas  <zalan@apple.com>
3424
3425         RenderTableRow should check if it has access to its ancestor chain.
3426         https://bugs.webkit.org/show_bug.cgi?id=141668
3427
3428         Reviewed by Andreas Kling.
3429
3430         Preventive fix.
3431
3432         * rendering/RenderTableRow.cpp:
3433         (WebCore::RenderTableRow::styleDidChange):