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