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