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