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