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