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