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