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