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