[EFL] Skip timeouting editing tests
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2014-11-17  Eric Carlson  <eric.carlson@apple.com>
2
3         [iOS] allow host application to opt-out of alternate fullscreen
4         https://bugs.webkit.org/show_bug.cgi?id=138787
5
6         Reviewed by Darin Adler.
7
8         * Modules/mediacontrols/MediaControlsHost.cpp:
9         (WebCore::MediaControlsHost::optimizedFullscreenSupported): Check mediaSession().allowsAlternateFullscreen.
10
11         * html/HTMLMediaElement.cpp:
12         (WebCore::HTMLMediaElement::enterFullscreenOptimized): Do nothing if
13             mediaSession().allowsAlternateFullscreen says it isn't allowed.
14
15         * html/HTMLMediaSession.cpp:
16         (WebCore::HTMLMediaSession::allowsAlternateFullscreen): New, check settings.
17         * html/HTMLMediaSession.h:
18
19         * page/Settings.cpp: Add allowsAlternateFullscreen.
20         * page/Settings.in: Ditto.
21
22 2014-11-16  Zan Dobersek  <zdobersek@igalia.com>
23
24         Replace RenderSVGResource::cast<T>() with downcast<T>()
25         https://bugs.webkit.org/show_bug.cgi?id=138290
26
27         Reviewed by Chris Dumez.
28
29         Add type traits for the RenderSVGResource hierarchy. This enables
30         using the typecasting framework in getRenderSVGResourceById() that
31         in return renders the RenderSVGResource::cast<>() template and all
32         the static s_resourceType member variables in the hierarchy removable.
33
34         * WebCore.order:
35         * rendering/svg/RenderSVGResource.h:
36         (WebCore::RenderSVGResource::cast): Deleted.
37         * rendering/svg/RenderSVGResourceClipper.h:
38         * rendering/svg/RenderSVGResourceContainer.h:
39         (WebCore::getRenderSVGResourceById):
40         * rendering/svg/RenderSVGResourceFilter.h:
41         (isType):
42         * rendering/svg/RenderSVGResourceLinearGradient.h:
43         * rendering/svg/RenderSVGResourceMarker.h:
44         * rendering/svg/RenderSVGResourceMasker.h:
45         * rendering/svg/RenderSVGResourcePattern.h:
46         * rendering/svg/RenderSVGResourceRadialGradient.h:
47         * rendering/svg/RenderSVGResourceSolidColor.h:
48
49 2014-11-16  Benjamin Poulain  <benjamin@webkit.org>
50
51         Implement :valid and :invalid matching for the fieldset element
52         https://bugs.webkit.org/show_bug.cgi?id=138769
53
54         Reviewed by Darin Adler.
55
56         In the latest HTML spec, the pseudo classes :valid and :invalid match
57         a fieldset element based on its descendants:
58             https://html.spec.whatwg.org/#selector-valid
59             https://html.spec.whatwg.org/#selector-invalid
60
61         This patch adds that behavior.
62
63         There are two key problems to solve with these pseudo classes on fieldset:
64         -Efficient matching.
65         -Style invalidation when any of the descendant changes.
66
67         To implement the style invalidation, I have modified HTMLFormControlElement
68         to notify its ancestor when its state changes.
69
70         The first change is making the state fully internal to HTMLFormControlElement,
71         we do not want subclass to be able to change the behavior and forget to update
72         the ancestors.
73
74         To achieve that encapsulation, the interface was changed a bit:
75         -Neither willValidate() nor isValidFormControlElement() inherit from Element.
76          Instead, willValidate() is the implementation of FormAssociatedElement's interface
77          and it is final. The method isValidFormControlElement() becomes completely internal
78          to HTMLFormControlElement.
79         -Since willValidate() should no longer be re-implemented by subclass, the elements
80          that were depending on it have been migrated to recalcWillValidate() to set
81          the initial state as needed.
82
83         With the validity state fully encapsulated in HTMLFormControlElement, all I need
84         is a way to communicate that information to HTMLFieldSetElement ancestors.
85         This is done in two cases:
86         -The validity state changes.
87         -The tree changes in a way that would make the input element not a descendant
88          of a HTMLFieldSetElement.
89
90         The invalidation is simply done by walking up the ancestors and adding the current
91         element to a "validity dependency list" on each HTMLFieldSetElement.
92
93         Tests: fast/css/pseudo-invalid-fieldset-invalidation-optimization.html
94                fast/css/pseudo-invalid-fieldset-style-sharing.html
95                fast/css/pseudo-invalid-fieldset.html
96                fast/css/pseudo-valid-fieldset-invalidation-optimization.html
97                fast/css/pseudo-valid-fieldset-style-sharing.html
98                fast/css/pseudo-valid-fieldset.html
99                fast/selectors/invalid-fieldset-style-update-1.html
100                fast/selectors/invalid-fieldset-style-update-2.html
101                fast/selectors/invalid-fieldset-style-update-3.html
102                fast/selectors/invalid-fieldset-style-update-4.html
103                fast/selectors/invalid-fieldset-style-update-5.html
104                fast/selectors/valid-fieldset-style-update-1.html
105                fast/selectors/valid-fieldset-style-update-2.html
106                fast/selectors/valid-fieldset-style-update-3.html
107                fast/selectors/valid-fieldset-style-update-4.html
108                fast/selectors/valid-fieldset-style-update-5.html
109
110         * css/SelectorCheckerTestFunctions.h:
111         (WebCore::isInRange):
112         (WebCore::isOutOfRange):
113         (WebCore::isInvalid):
114         (WebCore::isValid):
115         The hack "ContainsValidityStyleRules" is in the way of correct styling
116         of FieldSet and Form.
117         It is not the right way to get stylesheet properties anyway.
118
119         * css/StyleResolver.cpp:
120         (WebCore::StyleResolver::canShareStyleWithControl):
121         Make sure style sharing does not incorrectly share style for fieldset elements.
122
123         * dom/Document.cpp:
124         (WebCore::Document::Document):
125         * dom/Document.h:
126         (WebCore::Document::containsValidityStyleRules): Deleted.
127         (WebCore::Document::setContainsValidityStyleRules): Deleted.
128         * dom/Element.h:
129         (WebCore::Element::matchesValidPseudoClass):
130         (WebCore::Element::matchesInvalidPseudoClass):
131         (WebCore::Element::willValidate): Deleted.
132         (WebCore::Element::isValidFormControlElement): Deleted.
133         * html/FormAssociatedElement.cpp:
134         (WebCore::FormAssociatedElement::customError):
135         * html/FormAssociatedElement.h:
136
137         * html/HTMLFieldSetElement.cpp:
138         (WebCore::HTMLFieldSetElement::matchesValidPseudoClass):
139         (WebCore::HTMLFieldSetElement::matchesInvalidPseudoClass):
140         (WebCore::HTMLFieldSetElement::addInvalidDescendant):
141         (WebCore::HTMLFieldSetElement::removeInvalidDescendant):
142         Each HTMLFormControlElement that has constraint validation adds or removes
143         itself from its HTMLFieldSetElement ancestors.
144
145         It should be possible to just keep track of a count instead of a HashSet.
146         I decided to got with the HashSet to make the code more robust and easier
147         to debug. A few assertions ensure that the HashSet is actually used as a counter.
148
149         * html/HTMLFieldSetElement.h:
150         * html/HTMLFormControlElement.cpp:
151         (WebCore::addInvalidElementToAncestorFromInsertionPoint):
152         (WebCore::removeInvalidElementToAncestorFromInsertionPoint):
153
154         (WebCore::HTMLFormControlElement::insertedInto):
155         (WebCore::HTMLFormControlElement::removedFrom):
156         One tricky part of those two functions is that we cannot use
157         matchesValidPseudoClass() or matchesInvalidPseudoClass().
158
159         The reason is that HTMLFieldSetElement is a subclass of HTMLFormControlElement
160         and it has its own definition of what Valid and Invalid mean when matching selectors.
161
162         In HTMLFormControlElement, we must use the internal state,
163         willValidate() and isValidFormControlElement() must be used directly.
164
165         (WebCore::HTMLFormControlElement::matchesValidPseudoClass):
166         (WebCore::HTMLFormControlElement::matchesInvalidPseudoClass):
167         (WebCore::HTMLFormControlElement::willValidate):
168         (WebCore::addInvalidElementToAncestors):
169         (WebCore::removeInvalidElementFromAncestors):
170         (WebCore::HTMLFormControlElement::setNeedsWillValidateCheck):
171         (WebCore::HTMLFormControlElement::setNeedsValidityCheck):
172         (WebCore::HTMLFormControlElement::isValidFormControlElement): Deleted.
173         * html/HTMLFormControlElement.h:
174         (WebCore::HTMLFormControlElement::isValidFormControlElement):
175         * html/HTMLKeygenElement.h:
176         * html/HTMLObjectElement.h:
177         * html/HTMLOutputElement.h:
178
179 2014-11-16  Zan Dobersek  <zdobersek@igalia.com>
180
181         [TexMap] Add typecasting support for GraphicsLayerTextureMapper
182         https://bugs.webkit.org/show_bug.cgi?id=138741
183
184         Reviewed by Martin Robinson.
185
186         Add type traits for the GraphicsLayerTextureMapper class.
187         This enables using typecasting functions instead of
188         toGraphicsLayerTextureMapper().
189
190         Remove toTextureMapperLayer() casting function which actually
191         returned the TextureMapperLayer object that belonged to the
192         passed-in GraphicsLayerTextureMapper. Instead, the GraphicsLayer
193         object is now downcasted and the TextureMapperLayer is accessed
194         by calling the GraphicsLayerTextureMapper::layer() method.
195
196         * platform/graphics/GraphicsLayer.h:
197         (WebCore::GraphicsLayer::isGraphicsLayerTextureMapper):
198         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
199         (WebCore::toTextureMapperLayerVector):
200         (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
201         (WebCore::toTextureMapperLayer): Deleted.
202         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
203         (WebCore::toGraphicsLayerTextureMapper): Deleted.
204
205 2014-11-16  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
206
207         Move WebCore/loader to std::unique_ptr
208         https://bugs.webkit.org/show_bug.cgi?id=138646
209
210         Reviewed by Chris Dumez.
211
212         Replace OwnPtr with std::unique_ptr<> and std::make_unique<>.
213         However this patch leaves ResourceRequest::adopt() because this need
214         to be handled by different patch.
215
216         No new tests, no behavior changes.
217
218         * loader/DocumentThreadableLoader.cpp:
219         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
220         (WebCore::DocumentThreadableLoader::preflightSuccess):
221         * loader/DocumentThreadableLoader.h:
222         * loader/SubresourceLoader.cpp:
223         (WebCore::SubresourceLoader::SubresourceLoader):
224         (WebCore::SubresourceLoader::didReceiveResponse):
225         (WebCore::SubresourceLoader::notifyDone):
226         * loader/SubresourceLoader.h:
227         * loader/TextTrackLoader.h:
228         * loader/appcache/ApplicationCacheHost.h:
229         * loader/appcache/ApplicationCacheStorage.cpp:
230         (WebCore::ApplicationCacheStorage::storeCopyOfCache):
231         * loader/archive/cf/LegacyWebArchive.cpp:
232         (WebCore::LegacyWebArchive::create):
233         * loader/cache/CachedResourceLoader.cpp:
234         (WebCore::CachedResourceLoader::requestPreload):
235         (WebCore::CachedResourceLoader::clearPreloads):
236         (WebCore::CachedResourceLoader::printPreloadStats):
237         * loader/cache/CachedResourceLoader.h:
238         * loader/icon/IconDatabase.cpp:
239         (WebCore::IconDatabase::deleteAllPreparedStatements):
240         (WebCore::readySQLiteStatement):
241         * loader/icon/IconDatabase.h:
242         * loader/icon/IconRecord.h:
243
244 2014-11-16  Chris Dumez  <cdumez@apple.com>
245
246         Crash when setting 'order' CSS property to a calculated value
247         https://bugs.webkit.org/show_bug.cgi?id=138780
248
249         Reviewed by Darin Adler.
250
251         CSS Calculated values were not handled by the CSS parser for 'order'
252         CSS property. As a result, using calculated values wouldn't work in
253         release builds and would hit an assertion in debug builds.
254
255         This patch updates the CSS parser to directly convert the
256         CSS Calculated value into a simple integer CSSPrimitiveValue for
257         'order' property. We could have marked CSS Calculated values as
258         valid in the CSS Parser instead but this would have brought issues:
259         - The calculated value needs to be adjusted to INT_MIN + 2 if it is less
260           than that. This would force us to calculate the expression anyway.
261         - The StyleBuilder would need updating to properly handle CSS Calculated
262           values for 'order'.
263
264         Test: fast/css/order-calculated-value.html
265
266         * css/CSSParser.cpp:
267         (WebCore::CSSParser::parseValue):
268
269 2014-11-16  Chris Dumez  <cdumez@apple.com>
270
271         Assertion hit when setting a very large value to 'border-width' / 'font-size' CSS properties
272         https://bugs.webkit.org/show_bug.cgi?id=138770
273
274         Reviewed by Darin Adler.
275
276         When setting a very large value to a CSS property, it is represented internally as
277         infinity. r166114 already tried to deal with this by adding an std::isinf() check
278         in CSSValuePool::createValue() and returning an identifier CSSPrimitiveValue with
279         CSSValueInvalid value in such case. The issue is that doing leads to the
280         StyleBuilder getting a CSSValueInvalid CSSPrimitive value as input, which is not
281         handled and leads to assertions.
282
283         This patch updates the CSSParser to detect cases where the double value is
284         infinity earlier (in CSSParser::validUnit() and parseSimpleLengthValue()), so
285         that we mark the value as invalid and actually drop it. As a result,
286         CSSPrimitiveValues with CSSValueInvalid value no longer make their way to the
287         StyleBuilder.
288
289         Test: fast/css/style-builder-infinite-value.html
290               fast/css/infinite-floating-value.html
291
292         * css/CSSParser.cpp:
293         (WebCore::parseSimpleLengthValue):
294         (WebCore::CSSParser::validUnit):
295         * css/CSSValuePool.cpp:
296         (WebCore::CSSValuePool::createValue):
297
298 2014-11-16  Shivakumar JM  <shiva.jm@samsung.com>
299
300         Attribute text in HTMLAnchorElement should behave as per specification.
301         https://bugs.webkit.org/show_bug.cgi?id=138557
302
303         Reviewed by Darin Adler.
304
305         attribute text in HTMLAnchorElement should not be readonly as per specification
306         http://www.w3.org/TR/html/text-level-semantics.html#dom-a-text. It should behave as textContent attribute. 
307         Also This matches the behavior of Chrome 38 and FireFox.
308
309         Test: fast/dom/HTMLAnchorElement/anchor-text-attribute.html
310
311         * html/HTMLAnchorElement.cpp:
312         (WebCore::HTMLAnchorElement::text):
313         (WebCore::HTMLAnchorElement::setText):
314         * html/HTMLAnchorElement.h:
315         * html/HTMLAnchorElement.idl:
316
317 2014-11-16  Chris Dumez  <cdumez@apple.com>
318
319         Move 'vertical-align' CSS property to the new StyleBuilder
320         https://bugs.webkit.org/show_bug.cgi?id=138764
321
322         Reviewed by Darin Adler.
323
324         Move 'vertical-align' CSS property from DeprecatedStyleBuilder to the
325         new StyleBuilder by using custom code.
326
327         No new tests, no behavior change.
328
329         * css/CSSPropertyNames.in:
330         * css/DeprecatedStyleBuilder.cpp:
331         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
332         (WebCore::ApplyPropertyVerticalAlign::applyValue): Deleted.
333         (WebCore::ApplyPropertyVerticalAlign::createHandler): Deleted.
334         * css/StyleBuilderCustom.h:
335         (WebCore::StyleBuilderFunctions::applyValueVerticalAlign):
336
337 2014-11-16  Tim Horton  <timothy_horton@apple.com>
338
339         Use TextIndicator instead of the built in Lookup highlight
340         https://bugs.webkit.org/show_bug.cgi?id=138775
341         <rdar://problem/18953982>
342
343         Follow-up to r176164.
344
345         * platform/spi/mac/LookupSPI.h:
346         (WebCore::canDisableLookupIndicator): Deleted.
347         Remove canDisableLookupIndicator.
348
349 2014-11-16  Chris Dumez  <cdumez@apple.com>
350
351         Crash when setting '-webkit-line-clamp' CSS property to a calculated value
352         https://bugs.webkit.org/show_bug.cgi?id=138777
353
354         Reviewed by Benjamin Poulain.
355
356         CSS Calculated values were not handled when converting a CSSPrimitiveValue
357         to a LineClampValue. As a result, we would hit an ASSERT_NOT_REACHED()
358         assertion. To address this issue, this patch updates the code to use
359         primitiveType() / getValue<>() instead of m_primitiveUnitType /
360         m_value.num, as those getter function properly handle CSS Calculated
361         values.
362
363         Test: fast/css/webkit-line-clamp-calculated-value.html
364
365         * css/CSSPrimitiveValueMappings.h:
366         (WebCore::CSSPrimitiveValue::operator LineClampValue):
367
368 2014-11-16  Tim Horton  <timothy_horton@apple.com>
369
370         Use TextIndicator instead of the built in Lookup highlight
371         https://bugs.webkit.org/show_bug.cgi?id=138775
372         <rdar://problem/18953982>
373
374         Reviewed by Anders Carlsson.
375
376         * WebCore.exp.in:
377         * platform/mac/WebCoreSystemInterface.h:
378         * platform/mac/WebCoreSystemInterface.mm:
379         Remove a WKSI import/export that we don't need anymore.
380         
381         * platform/spi/mac/LookupSPI.h: Added.
382         (WebCore::canDisableLookupIndicator):
383         Add Lookup SPI header.
384         Add a 'canDisableLookupIndicator', which must be called in any translation
385         unit that wants to use either of the soft-linked constants related to
386         that functionality, before calling the get* function.
387
388         * WebCore.xcodeproj/project.pbxproj:
389         * editing/mac/DictionaryLookup.mm:
390         (WebCore::rangeForDictionaryLookupForSelection):
391         (WebCore::rangeForDictionaryLookupAtHitTestResult):
392         Adopt the Lookup SPI header.
393
394 2014-11-16  Joanmarie Diggs  <jdiggs@igalia.com>
395
396         AX: [ATK] REGRESSION(r166288): Accessible values are no longer accessible via AT-SPI2
397         https://bugs.webkit.org/show_bug.cgi?id=138776
398
399         Reviewed by Chris Fleizach.
400
401         r166288 used #if...#else instead of #if...#endif, thus disabling the old
402         AtkValue support. Unfortunately AT-SPI2 doesn't yet have support for the
403         new AtkValue API. Thus r166288 broke access to value-holding elements for
404         AT-SPI2 assistive technologies. Replacing #else with #endif fixes things.
405
406         No new tests because catching this regression would require AT-SPI2.
407
408         * accessibility/atk/WebKitAccessibleInterfaceValue.cpp:
409         (webkitAccessibleValueGetMinimumIncrement):
410         (webkitAccessibleValueInterfaceInit):
411
412 2014-11-16  Joanmarie Diggs  <jdiggs@igalia.com>
413
414         AX: [ATK] Expose the blockquote element using ATK_ROLE_BLOCK_QUOTE
415         https://bugs.webkit.org/show_bug.cgi?id=138771
416
417         Reviewed by Chris Fleizach.
418
419         Add BlockquoteRole and assigns it to blockquote elements. Make
420         corresponding changes to platform role mappings: ATK_ROLE_BLOCK_QUOTE
421         for GTK and EFL; AXGroup (which was being used already) for the Mac.
422
423         No new tests are required. Instead, updated the existing expectations
424         to reflect the new mapping.
425
426         * accessibility/AccessibilityNodeObject.cpp:
427         (WebCore::AccessibilityNodeObject::determineAccessibilityRole):
428         * accessibility/AccessibilityObject.cpp:
429         (WebCore::AccessibilityObject::isBlockquote):
430         * accessibility/AccessibilityObject.h:
431         * accessibility/AccessibilityRenderObject.cpp:
432         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
433         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
434         (atkRole):
435         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
436         (createAccessibilityRoleMap):
437
438 2014-11-16  Chris Dumez  <cdumez@apple.com>
439
440         Crash when setting 'alt' CSS property to inherit or initial
441         https://bugs.webkit.org/show_bug.cgi?id=138774
442         <rdar://problem/18995409>
443
444         Reviewed by Chris Fleizach.
445
446         The StyleResolver was not handling 'inherit' or 'initial' values for
447         'alt' CSS property. As a result, the code was assuming the CSSValue
448         was a CSSPrimitiveValue (although it could be a CSSInitialValue or
449         a CSSInheritValue). In such case, the code would dereference a null
450         pointer because primitiveValue is initialized using:
451         CSSPrimitiveValue* primitiveValue = is<CSSPrimitiveValue>(*value)
452             ? downcast<CSSPrimitiveValue>(value)
453             : nullptr;
454
455         Test: fast/css/alt-inherit-initial.html
456
457         * css/StyleResolver.cpp:
458         (WebCore::StyleResolver::applyProperty):
459
460 2014-11-15  Joanmarie Diggs  <jdiggs@igalia.com>
461
462         AX: [ATK] Lists with selectable children should have ATK_ROLE_LIST_BOX
463         https://bugs.webkit.org/show_bug.cgi?id=127060
464
465         Reviewed by Chris Fleizach.
466
467         Corrected the mapping from ATK_ROLE_LIST to ATK_ROLE_LIST_BOX.
468
469         No new tests. Instead, updated the expectations of roles-exposed.html to
470         reflect the corrected mapping.
471
472         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
473         (atkRole):
474
475 2014-11-15  Joanmarie Diggs  <jdiggs@igalia.com>
476
477         AX: [ATK] Video and audio elements should be exposed using ATK's video and audio roles.
478         https://bugs.webkit.org/show_bug.cgi?id=138767
479
480         Reviewed by Chris Fleizach.
481
482         Map AudioRole and VideoRole to ATK_ROLE_AUDIO and ATK_ROLE_VIDEO
483         respectively, falling back on the existing mapping to ATK_ROLE_EMBEDDED
484         in environments which have an older version of ATK.
485
486         No new tests are required. Instead, existing expectations were updated
487         to reflect the new mapping.
488
489         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
490         (atkRole):
491
492 2014-11-15  Joanmarie Diggs  <jdiggs@igalia.com>
493
494         AX: [ATK] Expose the footer element as ATK_ROLE_FOOTER
495         https://bugs.webkit.org/show_bug.cgi?id=138773
496
497         Reviewed by Chris Fleizach.
498
499         Map FooterRole to ATK_ROLE_FOOTER.
500
501         No new tests. Unskipped a test that verifies this mapping.
502
503         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
504         (atkRole):
505
506 2014-11-14  Dean Jackson  <dino@apple.com>
507
508         Rename WebKitCSSKeyframe(s)Rule into CSSKeyframe(s)Rule
509         https://bugs.webkit.org/show_bug.cgi?id=138763
510         <rdar://problem/18991569>
511
512         Reviewed by Simon Fraser.
513
514         Globally rename WebKitCSSKeyframeRule and WebKitCSSKeyframesRule to
515         CSSKeyframeRule and CSSKeyframesRule respectively.
516
517         This *may* break some existing content, but is compatible with
518         what Blink and Firefox are doing. To minimize breakage, I kept an
519         alias for the old constant values on CSSRule: WEBKIT_KEYFRAMES_RULE
520         and WEBKIT_KEYFRAME_RULE.
521
522         Covered by existing tests.
523
524         * CMakeLists.txt:
525         * DerivedSources.cpp:
526         * DerivedSources.make:
527         * WebCore.vcxproj/WebCore.vcxproj:
528         * WebCore.vcxproj/WebCore.vcxproj.filters:
529         * WebCore.xcodeproj/project.pbxproj:
530         * bindings/js/JSCSSRuleCustom.cpp:
531         (WebCore::toJS):
532         * bindings/objc/DOMCSS.mm:
533         (kitClass):
534         * css/CSSGrammar.y.includes:
535         * css/CSSKeyframeRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.cpp.
536         (WebCore::StyleKeyframe::StyleKeyframe):
537         (WebCore::StyleKeyframe::~StyleKeyframe):
538         (WebCore::StyleKeyframe::mutableProperties):
539         (WebCore::StyleKeyframe::parseKeyString):
540         (WebCore::StyleKeyframe::cssText):
541         (WebCore::CSSKeyframeRule::CSSKeyframeRule):
542         (WebCore::CSSKeyframeRule::~CSSKeyframeRule):
543         (WebCore::CSSKeyframeRule::style):
544         (WebCore::CSSKeyframeRule::reattach):
545         * css/CSSKeyframeRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.h.
546         (WebCore::StyleKeyframe::create):
547         (WebCore::StyleKeyframe::keyText):
548         (WebCore::StyleKeyframe::setKeyText):
549         (WebCore::StyleKeyframe::getKeys):
550         (WebCore::StyleKeyframe::properties):
551         * css/CSSKeyframeRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframeRule.idl.
552         * css/CSSKeyframesRule.cpp: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.cpp.
553         (WebCore::StyleRuleKeyframes::StyleRuleKeyframes):
554         (WebCore::StyleRuleKeyframes::~StyleRuleKeyframes):
555         (WebCore::StyleRuleKeyframes::parserAppendKeyframe):
556         (WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
557         (WebCore::StyleRuleKeyframes::wrapperRemoveKeyframe):
558         (WebCore::StyleRuleKeyframes::findKeyframeIndex):
559         (WebCore::CSSKeyframesRule::CSSKeyframesRule):
560         (WebCore::CSSKeyframesRule::~CSSKeyframesRule):
561         (WebCore::CSSKeyframesRule::setName):
562         (WebCore::CSSKeyframesRule::appendRule):
563         (WebCore::CSSKeyframesRule::insertRule):
564         (WebCore::CSSKeyframesRule::deleteRule):
565         (WebCore::CSSKeyframesRule::findRule):
566         (WebCore::CSSKeyframesRule::cssText):
567         (WebCore::CSSKeyframesRule::length):
568         (WebCore::CSSKeyframesRule::item):
569         (WebCore::CSSKeyframesRule::cssRules):
570         (WebCore::CSSKeyframesRule::reattach):
571         * css/CSSKeyframesRule.h: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.h.
572         (WebCore::StyleRuleKeyframes::create):
573         (WebCore::StyleRuleKeyframes::keyframes):
574         (WebCore::StyleRuleKeyframes::name):
575         (WebCore::StyleRuleKeyframes::setName):
576         (WebCore::StyleRuleKeyframes::copy):
577         * css/CSSKeyframesRule.idl: Renamed from Source/WebCore/css/WebKitCSSKeyframesRule.idl.
578         * css/CSSParser.cpp:
579         * css/CSSRule.h:
580         * css/CSSRule.idl:
581         * css/CSSStyleSheet.cpp:
582         * css/RuleSet.cpp:
583         * css/StyleResolver.cpp:
584         * css/StyleRule.cpp:
585         (WebCore::StyleRuleBase::createCSSOMWrapper):
586         * inspector/InspectorStyleSheet.cpp:
587         (WebCore::asCSSRuleList):
588
589 2014-11-15  David Kilzer  <ddkilzer@apple.com>
590
591         REGRESSION (r176137): iOS build broke after moving DataDetectors scanning code to WebCore
592
593         This regressed with the following commit:
594
595             Move DataDetectors scanning code to WebCore
596             https://bugs.webkit.org/show_bug.cgi?id=138731
597             <rdar://problem/18877535>
598
599         This fixes the following build failures:
600
601             In file included from WebCore/editing/mac/DataDetection.mm:29:
602             WebCore/platform/spi/mac/DataDetectorsSPI.h:66:11: error: unknown type name 'NSRect'
603             @property NSRect highlightFrame;
604                       ^
605             WebCore/editing/mac/DataDetection.mm:42:28: error: use of undeclared identifier 'DataDetection'
606             RetainPtr<DDActionContext> DataDetection::detectItemAroundHitTestResult(const HitTestResult& hitTestResult, FloatRect& detectedDataBoundingBox, RefPtr<Range>& detectedDataRange)
607                                        ^
608             2 errors generated.
609
610         * WebCore.exp.in:
611         (DataDetection::detectItemAroundHitTestResult): Move symbol from
612         shared section to Mac-only section.
613         * editing/mac/DataDetection.mm: Add PLATFORM(MAC) check around
614         the entire implementation since it it unused on iOS.
615         * platform/spi/mac/DataDetectorsSPI.h: Expand PLATFORM(MAC)
616         check around DDActionContext class declarations.
617
618 2014-11-14  Benjamin Poulain  <benjamin@webkit.org>
619
620         Compute the selector specificity as we match simple selectors
621         https://bugs.webkit.org/show_bug.cgi?id=138718
622
623         Reviewed by Andreas Kling.
624
625         This is an other tiny step toward dynamic specificity. Instead of computing
626         the entire specificity at the end, compute it dynamically as we are matching
627         each individual simple selector.
628
629         * css/CSSSelector.cpp:
630         (WebCore::CSSSelector::specificity):
631         (WebCore::CSSSelector::simpleSelectorSpecificity):
632         (WebCore::CSSSelector::addSpecificities):
633         (WebCore::CSSSelector::specificityForPage):
634         (WebCore::CSSSelector::specificityForOneSelector): Deleted.
635         * css/CSSSelector.h:
636         * css/SelectorChecker.cpp:
637         (WebCore::SelectorChecker::match):
638         (WebCore::SelectorChecker::matchRecursively):
639         (WebCore::SelectorChecker::checkOne):
640         (WebCore::SelectorChecker::matchSelectorList):
641         * css/SelectorChecker.h:
642
643 2014-11-14  Andreas Kling  <akling@apple.com>
644
645         [mac] Only images that are actually purgeable should be advertised as such.
646         <https://webkit.org/b/138759>
647         <rdar://problem/13205438>
648
649         Reviewed by Tim Horton.
650
651         Instead of saying that all images on >=Yosemite are purgeable, have BitmapImage
652         forward the question to CGImage for the correct answer.
653
654         The memory may be marked non-volatile by frameworks underneath WebKit at any
655         given time, but that's not something we need to worry about.
656
657         * platform/graphics/BitmapImage.cpp:
658         (WebCore::BitmapImage::decodedDataIsPurgeable):
659         * platform/graphics/BitmapImage.h:
660         * platform/graphics/cg/BitmapImageCG.cpp:
661         (WebCore::BitmapImage::decodedDataIsPurgeable):
662         * platform/graphics/cg/ImageSourceCG.cpp:
663         (WebCore::ImageSource::createFrameAtIndex):
664         * platform/spi/cg/CoreGraphicsSPI.h:
665
666 2014-11-14  Zalan Bujtas  <zalan@apple.com>
667
668         Remove computeTextPaintStyle's RenderText dependency.
669         https://bugs.webkit.org/show_bug.cgi?id=138754
670
671         Reviewed by Simon Fraser.
672
673         So that we can compute text paint style across renderers in simple line layout.
674
675         No change in functionality.
676
677         * rendering/InlineTextBox.cpp:
678         (WebCore::InlineTextBox::paint):
679         * rendering/SimpleLineLayoutFunctions.cpp:
680         (WebCore::SimpleLineLayout::paintFlow):
681         * rendering/TextPaintStyle.cpp:
682         (WebCore::computeTextPaintStyle):
683         * rendering/TextPaintStyle.h:
684
685 2014-11-14  Myles C. Maxfield  <mmaxfield@apple.com>
686
687         Get rid of WebFontCache
688         https://bugs.webkit.org/show_bug.cgi?id=134752
689
690         Reviewed by Dave Hyatt.
691
692         No new tests because there is no behavior change.
693
694         * Configurations/WebCore.xcconfig:
695         * PlatformMac.cmake:
696         * WebCore.exp.in:
697         * WebCore.order:
698         * WebCore.xcodeproj/project.pbxproj:
699         * platform/graphics/mac/FontCacheMac.mm:
700         (WebCore::acceptableChoice):
701         (WebCore::betterChoice):
702         (WebCore::toTraitsMask):
703         (WebCore::desiredFamilyToAvailableFamilyDictionary):
704         (WebCore::rememberDesiredFamilyToAvailableFamilyMapping):
705         (WebCore::fontWithFamily):
706         (WebCore::invalidateFontCache):
707         (WebCore::FontCache::getTraitsInFamily):
708         (WebCore::FontCache::createFontPlatformData):
709         * platform/mac/WebFontCache.h: Removed.
710         * platform/mac/WebFontCache.mm: Removed.
711
712 2014-11-14  Daniel Bates  <dabates@apple.com>
713
714         [iOS] NSFileManager and QuickLook SPI not available in public SDK
715         https://bugs.webkit.org/show_bug.cgi?id=138742
716
717         Reviewed by Pratik Solanki.
718
719         Add a SPI wrapper headers {NSFileManager, QuickLook}SPI.h that forward declares
720         NSFileManager and QuickLook SPI, respectively, and use these header instead of
721         including private headers of Foundation and QuickLook directly.
722
723         * WebCore.xcodeproj/project.pbxproj: Add project and private header QuickLookSPI.h
724         and NSFileManagerSPI.h, respectively.
725         * platform/network/ios/QuickLook.mm: Include headers QuickLookSPI.h and NSFileManagerSPI.h
726         instead of including headers of QuickLook and Foundation directly. 
727         * platform/spi/cocoa/NSFileManagerSPI.h: Added.
728         * platform/spi/ios/QuickLookSPI.h: Added.
729
730 2014-11-14  Daniel Bates  <dabates@apple.com>
731
732         [iOS] CoreGraphics SPI not available in public SDK
733         https://bugs.webkit.org/show_bug.cgi?id=138709
734
735         Reviewed by David Kilzer.
736
737         Add a SPI wrapper header called CoreGraphicsSPI.h that forward declares
738         CoreGraphics SPI and use this header instead of including private headers
739         of CoreGraphics directly.
740
741         * WebCore.xcodeproj/project.pbxproj: Add WebCore private header CoreGraphicsSPI.h. Also remove header
742         CGFontUnicodeSupportSPI.h as its functionality has been incorporated into header CoreGraphicsSPI.h.
743         * WebCore.vcxproj/WebCore.vcxproj: Add WebCore private header CoreGraphicsSPI.h.
744         * WebCore.vcxproj/WebCore.vcxproj.filters: Add directories platform/spi and platform/spi/cg.
745         * WebCore.vcxproj/WebCoreCG.props: Add include directory platform/spi/cg.
746         * WebCore.vcxproj/copyForwardingHeaders.cmd: Copy WebCore headers from directory platform/spi/cg. This
747         is necessary because WebCore/platform/graphics/SimpleFontData.h includes CoreGraphicsSPI.h. And
748         WebCore/platform/graphics/SimpleFontData.h is compiled for the Apple Windows port.
749         * platform/graphics/SimpleFontData.h: Move CGFontRenderingStyle declaration and associated enum
750         from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h. 
751         * platform/graphics/cg/BitmapImageCG.cpp: Remove unnecessary #include of header CGContextPrivate.h.
752         * platform/graphics/cg/ColorCG.cpp: Include header CoreGraphicsSPI.h instead of including headers
753         of CoreGraphics directly.
754         * platform/graphics/cg/GraphicsContextCG.cpp: Move forward declarations of CoreGraphics functions
755         from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h. Also sort the list
756         of #include directives.
757         * platform/graphics/cg/ImageSourceCG.cpp: Include header CoreGraphicsSPI.h instead of including
758         headers of CoreGraphics directly.
759         * platform/graphics/cg/PDFDocumentImage.cpp: Ditto.
760         * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Ditto.
761         * platform/graphics/ios/FontCacheIOS.mm: Include header CoreGraphicsSPI.h instead of including
762         header <CoreGraphics/CGFontUnicodeSupport.h> directly.
763         * platform/graphics/ios/FontServicesIOS.mm: Include header CoreGraphicsSPI.h instead of including
764         headers of CoreGraphics directly.
765         * platform/graphics/ios/SimpleFontDataIOS.mm: Ditto.
766         * platform/graphics/mac/FontMac.mm: Move forward declarations of CoreGraphics functions from this
767         file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
768         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp: Substitute header CoreGraphicsSPI.h for CGFontUnicodeSupportSPI.h
769         and remove #include of headers CGFontUnicodeSupport.h (it will be included by CoreGraphicsSPI.h).
770         * platform/graphics/mac/SimpleFontDataMac.mm: Move forward declarations of CoreGraphics functions
771         from this file to file CoreGraphicsSPI.h and include header CoreGraphicsSPI.h.
772         * platform/ios/LegacyTileGrid.mm: Include header CoreGraphicsSPI.h instead of including headers of
773         CoreGraphics directly.
774         * platform/ios/wak/WKGraphics.h: Remove #include of header CoreGraphicsPrivate.h and forward declare
775         CGFontAntialiasingStyle Additionally, declare WKCompositeOperation as an alias of int and use this
776         data type instead of CGCompositeOperation (SPI). This approach lets us keep the definition of
777         CGCompositeOperation in file CoreGraphicsSPI.h, where all the other definitions/forward declarations
778         of CoreGraphics data types reside, as opposed to defining it in this file.
779         * platform/ios/wak/WKGraphics.mm:
780         (WKRectFillUsingOperation): Cast data type WKCompositeOperation to CGCompositeOperation and added
781         compile-time assert to ensure that the size of WKCompositeOperation is identical to the size of CGCompositeOperation.
782         * platform/graphics/cg/ImageSourceCG.cpp: Move CGImageCachingFlags declaration, associated enum, and
783         forward declaration of CGImageSetCachingFlags() from this file to file CoreGraphicsSPI.h and include
784         header CoreGraphicsSPI.h.
785         (WebCore::ImageSource::createFrameAtIndex): Fix incorrect comment.
786         * platform/spi/cocoa/CGFontUnicodeSupportSPI.h: Removed; moved its functionality into header CoreGraphicsSPI.h.
787         * platform/spi/cg/CoreGraphicsSPI.h: Added.
788         (CGFloatMin):
789         * rendering/RenderThemeIOS.mm: Substitute header CoreGraphics.h for CGPathPrivate.h as we no longer
790         make use of any functionality from CGPathPrivate.h in this file. The functionality we used from
791         CGPathPrivate.h, including CGPathAddRoundedRect(), has been moved to the public API header, CGPath.h,
792         which is included from header CoreGraphics.h.
793
794 2014-11-14  Dean Jackson  <dino@apple.com>
795
796         [Media] Timeline scrubber not updating as the video plays
797         https://bugs.webkit.org/show_bug.cgi?id=138717
798         <rdar://problem/18957509>
799
800         Reviewed by Jer Noble.
801
802         There is some confusing logic that determines
803         whether or not the controls are hidden, and a
804         slight error caused timelines to not advance unless
805         they were explicitly showing.
806
807         The fix was to be a bit more liberal in deciding
808         when the controls are showing, but still cautious
809         enough to stop up causing repaints when things
810         are hidden.
811
812         Test: media/media-controls-timeline-updates.html
813
814         * Modules/mediacontrols/mediaControlsApple.js:
815         (Controller.prototype.controlsAreHidden): We only need
816         to check if we're an audio element or explicitly
817         hidden.
818         (Controller.prototype.showControls): Explicitly call
819         updateTime.
820
821 2014-11-14  Tim Horton  <timothy_horton@apple.com>
822
823         Move DataDetectors scanning code to WebCore
824         https://bugs.webkit.org/show_bug.cgi?id=138731
825         <rdar://problem/18877535>
826
827         Reviewed by Anders Carlsson.
828
829         * WebCore.exp.in:
830         Export our new function.
831
832         * WebCore.xcodeproj/project.pbxproj:
833         Add DataDetection.{mm, h}
834         Adjust the project so that editing/mac actually points to editing/mac instead of editing/
835
836         * editing/mac/DictionaryLookup.h:
837         * editing/mac/DictionaryLookup.mm:
838         Swap to PLATFORM(MAC) instead of !PLATFORM(IOS).
839         Move DictionaryLookup.{mm, h} to editing/mac, where they were in the project but not on disk.
840
841         * editing/mac/DataDetection.h: Added.
842         * editing/mac/DataDetection.mm: Added.
843         (WebCore::DataDetection::detectItemAroundHitTestResult):
844         Moved from WebKit2.
845
846 2014-11-14  Dan Bernstein  <mitz@apple.com>
847
848         <rdar://problem/18978497> Wrong (off-by-1) navigation snapshots shown after a mix of gesture and button back/forward navigation
849         https://bugs.webkit.org/show_bug.cgi?id=138753
850
851         Reviewed by Tim Horton.
852
853         Removed a FrameLoaderClient function that no one overrides anymore.
854
855         * loader/FrameLoaderClient.h:
856         (WebCore::FrameLoaderClient::willChangeCurrentHistoryItem): Deleted.
857         * loader/HistoryController.cpp:
858         (WebCore::HistoryController::setCurrentItem): Removed call to willChangeCurrentHistoryItem.
859         (WebCore::HistoryController::replaceCurrentItem): Ditto.
860
861 2014-11-14  Jeremy Jones  <jeremyj@apple.com>
862
863         Do proper teardown for optimized fullscreen
864         https://bugs.webkit.org/show_bug.cgi?id=138648
865
866         Reviewed by Eric Carlson.
867
868         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
869         (WebVideoFullscreenInterfaceAVKit::invalidate): must do corresponding teardown based on mode.
870
871 2014-11-11  David Hyatt  <hyatt@apple.com>
872
873         Table rows repaint entire table when their background color changes.
874         https://bugs.webkit.org/show_bug.cgi?id=26662
875
876         Reviewed by Simon Fraser.
877
878         Added fast/repaint/table-row-repaint.html
879
880         * rendering/RenderTableCell.h:
881         * rendering/RenderTableRow.cpp:
882         (WebCore::RenderTableRow::clippedOverflowRectForRepaint):
883         Improve table row's function to unite with the cell rects that can possibly
884         have the the row's background color painted behind them.
885
886 2014-11-14  Zalan Bujtas  <zalan@apple.com>
887
888         Simple line layout: Move simple line layout RunResolver and LineResolver implementation to SimpleLineLayoutResolver.cpp
889         https://bugs.webkit.org/show_bug.cgi?id=138704
890
891         Reviewed by Antti Koivisto.
892
893         No change in functionality.
894
895         * CMakeLists.txt:
896         * WebCore.vcxproj/WebCore.vcxproj:
897         * WebCore.vcxproj/WebCore.vcxproj.filters:
898         * WebCore.xcodeproj/project.pbxproj:
899         * rendering/SimpleLineLayoutResolver.cpp: Added.
900         (WebCore::SimpleLineLayout::RunResolver::Run::Run):
901         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
902         (WebCore::SimpleLineLayout::RunResolver::Run::baseline):
903         (WebCore::SimpleLineLayout::RunResolver::Run::text):
904         (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator):
905         (WebCore::SimpleLineLayout::RunResolver::Iterator::advance):
906         (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines):
907         (WebCore::SimpleLineLayout::RunResolver::RunResolver):
908         (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight):
909         (WebCore::SimpleLineLayout::RunResolver::rangeForRect):
910         (WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator):
911         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*):
912         (WebCore::SimpleLineLayout::LineResolver::LineResolver):
913         * rendering/SimpleLineLayoutResolver.h:
914         (WebCore::SimpleLineLayout::RunResolver::Run::Run): Deleted.
915         (WebCore::SimpleLineLayout::RunResolver::Run::rect): Deleted.
916         (WebCore::SimpleLineLayout::RunResolver::Run::baseline): Deleted.
917         (WebCore::SimpleLineLayout::RunResolver::Run::text): Deleted.
918         (WebCore::SimpleLineLayout::RunResolver::Iterator::Iterator): Deleted.
919         (WebCore::SimpleLineLayout::RunResolver::Iterator::advance): Deleted.
920         (WebCore::SimpleLineLayout::RunResolver::Iterator::advanceLines): Deleted.
921         (WebCore::SimpleLineLayout::RunResolver::RunResolver): Deleted.
922         (WebCore::SimpleLineLayout::RunResolver::lineIndexForHeight): Deleted.
923         (WebCore::SimpleLineLayout::RunResolver::rangeForRect): Deleted.
924         (WebCore::SimpleLineLayout::LineResolver::Iterator::Iterator): Deleted.
925         (WebCore::SimpleLineLayout::LineResolver::Iterator::operator*): Deleted.
926         (WebCore::SimpleLineLayout::LineResolver::LineResolver): Deleted.
927
928 2014-11-14  Andrzej Badowski  <a.badowski@samsung.com>
929
930         AX: Improve AccessibilityTableCell isColumnHeaderCell function.
931         https://bugs.webkit.org/show_bug.cgi?id=138423
932
933         Reviewed by Chris Fleizach.
934
935         <th> cell in the zero row should be column header.
936
937         New tests are not necessary.
938
939         * accessibility/AccessibilityTableCell.cpp:
940         (WebCore::AccessibilityTableCell::isColumnHeaderCell):
941
942 2014-11-14  Carlos Garcia Campos  <cgarcia@igalia.com>
943
944         [SOUP] Use GMainLoopSource for request timeout in ResourceHandle
945         https://bugs.webkit.org/show_bug.cgi?id=138695
946
947         Reviewed by Sergio Villar Senin.
948
949         We are currently using soup_timeout_add() that simply creates a
950         GSource and attaches it to the given context. Using
951         GMainLoopSource we simplify the code and fix any potential problem
952         of converting the double value into milliseconds.
953
954         * platform/network/ResourceHandleInternal.h:
955         * platform/network/soup/ResourceHandleSoup.cpp:
956         (WebCore::cleanupSoupRequestOperation):
957         (WebCore::ResourceHandle::sendPendingRequest):
958         (WebCore::ResourceHandle::platformSetDefersLoading):
959         (WebCore::requestTimeoutCallback): Deleted.
960
961 2014-11-13  Tim Horton  <timothy_horton@apple.com>
962
963         [mac] Keep around more decoded image data, since it's purgeable
964         https://bugs.webkit.org/show_bug.cgi?id=125273
965         <rdar://problem/13205438>
966
967         Reviewed by Simon Fraser.
968
969         No new tests, just an optimization.
970
971         Instead of throwing away decoded image data eagerly, allow the operating
972         system to manage the memory via the standard purgeability mechanism,
973         where it can.
974
975         This improves the performance on some pathological cases (extremely large
976         animated GIFs) by up to 8x.
977
978         * loader/cache/MemoryCache.cpp:
979         (WebCore::MemoryCache::pruneLiveResourcesToSize):
980         Don't prune live resources' decoded data if it is purgeable.
981
982         * platform/graphics/BitmapImage.cpp:
983         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
984         Don't eagerly throw away decoded image data if it's purgeable.
985
986         * loader/cache/CachedImage.h:
987         * loader/cache/CachedResource.h:
988         (WebCore::CachedResource::decodedDataIsPurgeable):
989         * platform/graphics/BitmapImage.h:
990         * platform/graphics/Image.h:
991         (WebCore::Image::decodedDataIsPurgeable):
992
993 2014-11-13  Myles C. Maxfield  <litherum@gmail.com>
994
995         Addressing post-review comment
996         https://bugs.webkit.org/show_bug.cgi?id=138633
997
998         * platform/spi/cg/CoreGraphicsSPI.h:
999
1000 2014-11-13  Myles C. Maxfield  <mmaxfield@apple.com>
1001
1002         Move FontMac and FontCacheMac off of WKSI
1003         https://bugs.webkit.org/show_bug.cgi?id=138633
1004
1005         Reviewed by Simon Fraser.
1006
1007         No new tests because there is no behavior change.
1008
1009         * WebCore.exp.in:
1010         * WebCore.order:
1011         * WebCore.vcxproj/WebCoreCG.props:
1012         * WebCore.xcodeproj/project.pbxproj:
1013         * platform/graphics/ios/FontCacheIOS.mm:
1014         (WebCore::FontCache::platformInit):
1015         * platform/graphics/mac/FontCacheMac.mm:
1016         (WebCore::FontCache::platformInit):
1017         (WebCore::FontCache::systemFallbackForCharacters):
1018         * platform/graphics/mac/FontMac.mm:
1019         (WebCore::isIntegral):
1020         (WebCore::setCGFontRenderingMode):
1021         (WebCore::Font::drawGlyphs):
1022         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
1023         * platform/graphics/win/FontCacheWin.cpp:
1024         (WebCore::FontCache::platformInit):
1025         * platform/ios/WebCoreSystemInterfaceIOS.mm:
1026         * platform/mac/WebCoreSystemInterface.h:
1027         * platform/mac/WebCoreSystemInterface.mm:
1028         * platform/spi/cocoa/CoreGraphicsSPI.h: Copied from Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h.
1029         * platform/spi/cocoa/CoreTextSPI.h:
1030         * platform/spi/mac/NSFontSPI.h: Renamed from Source/WebCore/platform/spi/cocoa/CGFontUnicodeSupportSPI.h.
1031
1032 2014-11-13  Chris Dumez  <cdumez@apple.com>
1033
1034         Move 'image-resolution' CSS property to the new StyleBuilder
1035         https://bugs.webkit.org/show_bug.cgi?id=138715
1036
1037         Reviewed by Andreas Kling.
1038
1039         Move 'image-resolution' CSS property from DeprecatedStyleBuilder to
1040         the new StyleBuilder by using custom code.
1041
1042         No new tests, no behavior change.
1043
1044         * css/CSSPropertyNames.in:
1045         * css/DeprecatedStyleBuilder.cpp:
1046         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1047         (WebCore::ApplyPropertyImageResolution::applyInheritValue): Deleted.
1048         (WebCore::ApplyPropertyImageResolution::applyInitialValue): Deleted.
1049         (WebCore::ApplyPropertyImageResolution::applyValue): Deleted.
1050         (WebCore::ApplyPropertyImageResolution::createHandler): Deleted.
1051         * css/StyleBuilderCustom.h:
1052         (WebCore::StyleBuilderFunctions::applyInheritImageResolution):
1053         (WebCore::StyleBuilderFunctions::applyInitialImageResolution):
1054         (WebCore::StyleBuilderFunctions::applyValueImageResolution):
1055
1056 2014-11-13  Commit Queue  <commit-queue@webkit.org>
1057
1058         Unreviewed, rolling out r176106.
1059         https://bugs.webkit.org/show_bug.cgi?id=138719
1060
1061         needs build love (Requested by kling on #webkit).
1062
1063         Reverted changeset:
1064
1065         "[mac] Keep around more decoded image data, since it's
1066         purgeable"
1067         https://bugs.webkit.org/show_bug.cgi?id=125273
1068         http://trac.webkit.org/changeset/176106
1069
1070 2014-11-13  Eric Carlson  <eric.carlson@apple.com>
1071
1072         Context menus should not offer the "Download video" option for videos that cannot 
1073         be downloaded
1074         https://bugs.webkit.org/show_bug.cgi?id=138530
1075         -and corresponding-
1076         rdar://problem/18919130
1077
1078         Reviewed by Tim Horton.
1079
1080         * html/HTMLMediaElement.cpp:
1081         (WebCore::HTMLMediaElement::parseAttribute):
1082         * html/HTMLMediaElement.h:
1083         * page/ContextMenuController.cpp:
1084         (WebCore::ContextMenuController::populate):
1085         * platform/graphics/MediaPlayer.cpp:
1086         (WebCore::MediaPlayer::canSaveMediaData):
1087         (WebCore::MediaPlayer::supportsSave): Deleted.
1088         * platform/graphics/MediaPlayer.h:
1089         * platform/graphics/MediaPlayerPrivate.h:
1090         (WebCore::MediaPlayerPrivateInterface::supportsFullscreen):
1091         (WebCore::MediaPlayerPrivateInterface::canSaveMediaData):
1092         (WebCore::MediaPlayerPrivateInterface::supportsSave): Deleted.
1093         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1094         (WebCore::MediaPlayerPrivateAVFoundation::resolvedURL):
1095         (WebCore::MediaPlayerPrivateAVFoundation::canSaveMediaData):
1096         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1097         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1098         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1099         (WebCore::MediaPlayerPrivateAVFoundationObjC::resolvedURL):
1100         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1101         (WebCore::MediaPlayerPrivateGStreamer::canSaveMediaData):
1102         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1103         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1104         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1105         (WebCore::MediaPlayerPrivateQTKit::canSaveMediaData):
1106         * rendering/HitTestResult.cpp:
1107         (WebCore::HitTestResult::isDownloadableMedia):
1108
1109 2014-11-02  Tim Horton  <timothy_horton@apple.com>
1110
1111         [mac] Keep around more decoded image data, since it's purgeable
1112         <https://webkit.org/b/125273>
1113         <rdar://problem/13205438>
1114
1115         Reviewed by Simon Fraser and Andreas Kling.
1116
1117         No new tests, just an optimization.
1118
1119         Instead of throwing away decoded image data eagerly, allow the operating
1120         system to manage the memory via the standard purgeability mechanism,
1121         where it can.
1122
1123         This improves the performance on some pathological cases (extremely large
1124         animated GIFs) by up to 8x.
1125
1126         * loader/cache/MemoryCache.cpp:
1127         (WebCore::MemoryCache::pruneLiveResourcesToSize):
1128         Don't prune live resources' decoded data if it is purgeable.
1129
1130         * platform/graphics/BitmapImage.cpp:
1131         (WebCore::BitmapImage::destroyDecodedDataIfNecessary):
1132         Don't eagerly throw away decoded image data if it's purgeable.
1133
1134         * loader/cache/CachedImage.h:
1135         * loader/cache/CachedResource.h:
1136         (WebCore::CachedResource::decodedDataIsPurgeable):
1137         * platform/graphics/BitmapImage.h:
1138         * platform/graphics/Image.h:
1139         (WebCore::Image::decodedDataIsPurgeable):
1140
1141 2014-11-13  Daniel Bates  <dabates@apple.com>
1142
1143         [iOS] NSGeometry data types are not available in the public SDK
1144         https://bugs.webkit.org/show_bug.cgi?id=137536
1145
1146         Reviewed by David Kilzer.
1147
1148         Towards building iOS WebKit with the public iOS SDK, define NSGeometry
1149         data types and functions in terms of CGGeometry data types and functions
1150         because the former is SPI on iOS.
1151
1152         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: Include
1153         header WAKAppKitStubs.h when building for iOS. Otherwise, include header NSGeometry.h.
1154         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Remove import of private header NSGeometry.h.
1155         We will use the NSGeometry data types defined in WAKAppKitStubs.h, which is implicitly imported
1156         by header WAKWindow.h.
1157         * platform/graphics/mac/MediaPlayerProxy.h: Substitute WAKAppKitStubs.h for NSGeometry.h.
1158         * platform/ios/PlatformEventFactoryIOS.mm: Ditto. Also fix up style issues with #import directives.
1159         * platform/ios/WebEvent.mm: Ditto.
1160         * platform/ios/wak/WAKAppKitStubs.h: Define typedefs and macros that map NSGeometry data types
1161         and functions to the analogous CGGeometry data types and functions. Also, remove #ifdef __OBJC__-
1162         guard as the existing content in WAKAppKitStubs.h assumes that this file will only be included
1163         in an Objective-C/Objective-C++ file.
1164         * platform/ios/wak/WAKView.h: Import header WAKAppKitStubs.h instead of defining macros for some
1165         NSGeometry data types.
1166
1167 2014-11-13  Simon Fraser  <simon.fraser@apple.com>
1168
1169         [WK2] Fire a layout milestone on session restore based on render tree size
1170         https://bugs.webkit.org/show_bug.cgi?id=138711
1171         rdar://problem/16033854
1172
1173         Reviewed by Anders Carlsson.
1174
1175         New layout milestone for session restore based on render tree size. Only used
1176         in WK2 at present.
1177
1178         * page/LayoutMilestones.h:
1179
1180 2014-11-13  Dan Bernstein  <mitz@apple.com>
1181
1182         Policy client not called for navigations through the page cache
1183         https://bugs.webkit.org/show_bug.cgi?id=138703
1184
1185         Reviewed by Alexey Proskuryakov.
1186
1187         Test added to TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm.
1188
1189         * loader/FrameLoader.cpp:
1190         (WebCore::FrameLoader::loadDifferentDocumentItem): When using a cached page, which already
1191         has a document loader, set the document loader’s triggering action (so that the policy
1192         client sees that this is a back/forward navigation) and clear its last checked request (so
1193         that the policy client gets called).
1194
1195 2014-11-13  Joanmarie Diggs  <jdiggs@igalia.com>
1196
1197         AX: [ATK] Do not return ATK_ROLE_UNKNOWN for null or otherwise invalid accessible objects
1198         https://bugs.webkit.org/show_bug.cgi?id=137867
1199
1200         Reviewed by Chris Fleizach.
1201
1202         Return ATK_ROLE_INVALID for null or otherwise invalid accessible objects.
1203
1204         Test: platform/gtk/accessibility/detached-object-role.html
1205
1206         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
1207         (webkitAccessibleGetRole):
1208
1209 2014-11-13  Eric Carlson  <eric.carlson@apple.com>
1210
1211         [iOS] update optimized fullscreen media controls artwork
1212         https://bugs.webkit.org/show_bug.cgi?id=138705
1213
1214         Reviewed by Dean Jackson.
1215
1216         * Modules/mediacontrols/MediaControlsHost.cpp:
1217         (WebCore::MediaControlsHost::mediaUIImageData): Remove one button.
1218         * Modules/mediacontrols/MediaControlsHost.idl:
1219
1220         * Modules/mediacontrols/mediaControlsApple.js:
1221         (Controller.prototype.controlsAreHidden): Add parentheses to fix the logic.
1222
1223         * Modules/mediacontrols/mediaControlsiOS.js:
1224         (ControllerIOS.prototype.shouldHaveStartPlaybackButton): The big play button should not be
1225             visible during playback.
1226         (ControllerIOS.prototype.createControls): No longer necessary to insert style dynamically,
1227         (ControllerIOS.prototype.setPlaying): Call the base class first so "isPlaying" is set before
1228             calling updateControls, which calls shouldHaveStartPlaybackButton.
1229
1230         * platform/ios/WebCoreSystemInterfaceIOS.h: Update constants.
1231
1232         * rendering/RenderThemeIOS.mm:
1233         (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Add button style to the media controls sheet.
1234
1235 2014-11-13  Benjamin Poulain  <bpoulain@apple.com>
1236
1237         Implement the matching for :nth-last-child(An+B of selector-list)
1238         https://bugs.webkit.org/show_bug.cgi?id=138650
1239
1240         Reviewed by Andreas Kling.
1241
1242         Matching is trivial based on the existing CSS4 infrastructure.
1243
1244         The tricky part is style invalidation. In the cases of the old :nth-last-child()
1245         and :nth-last-of-type(), we were using the flag ChildrenAffectedByBackwardPositionalRules.
1246
1247         The problem with ChildrenAffectedByBackwardPositionalRules is that it only invalidate
1248         subtrees when nodes are being added or removed. It is a valuable optimization by itself
1249         since tree updates are less common than property updates.
1250
1251         For the case of property updates, I have added the new flag "ChildrenAffectedByPropertyBasedBackwardPositionalRules".
1252         It pretty much work the same way but invalidates subtree on style recalc.
1253
1254         Tests: fast/css/nth-child-and-nth-last-child.html
1255                fast/css/nth-last-child-of-classname.html
1256                fast/css/nth-last-child-of-complex-selector.html
1257                fast/css/nth-last-child-of-compound-selector.html
1258                fast/css/nth-last-child-of-style-sharing-1.html
1259                fast/css/nth-last-child-of-style-sharing-2.html
1260                fast/css/nth-last-child-of-style-update-optimization.html
1261                fast/css/nth-last-child-of-tagname.html
1262                fast/selectors/nth-last-child-of-class-style-update.html
1263
1264         * css/SelectorChecker.cpp:
1265         (WebCore::SelectorChecker::checkOne):
1266         * dom/Element.cpp:
1267         (WebCore::Element::setChildrenAffectedByPropertyBasedBackwardPositionalRules):
1268         (WebCore::Element::hasFlagsSetDuringStylingOfChildren):
1269         (WebCore::Element::rareDataChildrenAffectedByPropertyBasedBackwardPositionalRules):
1270         * dom/Element.h:
1271         (WebCore::Element::childrenAffectedByPropertyBasedBackwardPositionalRules):
1272         * dom/ElementRareData.h:
1273         (WebCore::ElementRareData::childrenAffectedByPropertyBasedBackwardPositionalRules):
1274         (WebCore::ElementRareData::setChildrenAffectedByPropertyBasedBackwardPositionalRules):
1275         (WebCore::ElementRareData::ElementRareData):
1276         (WebCore::ElementRareData::resetDynamicRestyleObservations):
1277         * dom/Node.cpp:
1278         (WebCore::Node::updateAncestorsForStyleRecalc):
1279         (WebCore::Node::setNeedsStyleRecalc):
1280         (WebCore::markAncestorsWithChildNeedsStyleRecalc): Deleted.
1281         * dom/Node.h:
1282         Unlike the other marking steps, ChildrenAffectedByPropertyBasedBackwardPositionalRules can only really
1283         affect one level (because we don't have a parent-selectors). It is quite easy to mark large
1284         trees with ChildrenAffectedByPropertyBasedBackwardPositionalRules by using a selector list that is a bit
1285         too generic. When that happen, we must be careful not invalidating everything, just the affected subtree.
1286
1287 2014-11-12  Jon Honeycutt  <jhoneycutt@apple.com>
1288
1289         REGRESSION (r172826): Password field placeholder text is missing if
1290         placeholder attribute precedes type attribute
1291
1292         <https://bugs.webkit.org/show_bug.cgi?id=138682>
1293         <rdar://problem/18574213> 
1294
1295         When the placeholder attribute is encountered, a shadow tree is created
1296         to include the placeholder element. When the type attribute is
1297         encountered, the previous shadow tree is destroyed, and a new shadow
1298         tree is created. TextFieldInputType::createShadowSubtree() did not
1299         handle creating the placeholder element. 
1300
1301         This regressed in r172826 because prior to r172826, the placeholder
1302         element would be recreated when
1303         HTMLTextFormControlElement::updatePlaceholderVisibility() was called.
1304         In r172826, updatePlaceholderVisibility() was changed to only show or
1305         hide the placeholder element if it exists.
1306
1307         Reviewed by Benjamin Poulain.
1308
1309         * html/TextFieldInputType.cpp:
1310         (WebCore::TextFieldInputType::createShadowSubtree):
1311         Call updatePlaceholderVisibility() to insert the placeholder element
1312         (after the inner text element has been inserted, as it appears before
1313         it in the shadow DOM).
1314
1315 2014-11-13  Joanmarie Diggs  <jdiggs@igalia.com>
1316
1317         AX: [ATK] Accessible focus events are emitted when the selection is changed in non-focused combo boxes
1318         https://bugs.webkit.org/show_bug.cgi?id=137866
1319
1320         Reviewed by Mario Sanchez Prada.
1321
1322         Check that the AccessibilityMenuList is really focused before notifying
1323         the platform that it is focused. Likewise, only notify the platform of
1324         an AccessibilityMenuListOption focus gain if the AccessibilityMenuList
1325         containing that option is expanded.
1326
1327         Test: platform/gtk/accessibility/menu-list-unfocused-notifications.html
1328
1329         * accessibility/atk/AXObjectCacheAtk.cpp:
1330         (WebCore::notifyChildrenSelectionChange):
1331         (WebCore::AXObjectCache::postPlatformNotification):
1332
1333 2014-11-13  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1334
1335         [EFL] Unexpected crashes in layout test after r175953
1336         https://bugs.webkit.org/show_bug.cgi?id=138652
1337
1338         Reviewed by Csaba Osztrogonác.
1339
1340         In r175953, it set reusableNodeIndex value with m_partCache's size(). It causes
1341         out of bound index crash because the reusableNodeIndex is Vector object.
1342
1343         No new test. This patch is to fix broken tests related to widgets on EFL port.
1344
1345         * platform/efl/RenderThemeEfl.cpp:
1346         (WebCore::RenderThemeEfl::getThemePartFromCache): Need to set reusableNodeIndex with "size() - 1".
1347
1348 2014-11-13  Chris Dumez  <cdumez@apple.com>
1349
1350         Lazily create HTMLInputElement's inputType and shadow subtree
1351         https://bugs.webkit.org/show_bug.cgi?id=138524
1352
1353         Reviewed by Ryosuke Niwa.
1354
1355         When an HTMLInputElement was created by the parser, we would first call
1356         HTMLInputElement::create(), then call Element::parserSetAttributes() on
1357         the constructed input. With the previous implementation, this was a bit
1358         inefficient because HTMLInputElement::create() would construct a
1359         TextInputType inputType (as this is the default) as well as its
1360         corresponding shadow subtree. Then, parserSetAttributes() would often
1361         set the |type| attribute and would need to destroy this input type as
1362         well as its subtree if the new |type| is not 'text', to create a new
1363         inputType / shadow subtree of the right type. The profiler showed that
1364         this was fairly expensive.
1365
1366         To improve this, this patch delays the inputType / shadow subtree
1367         creation when the HTMLInputElement is constructed by the parser, until
1368         the attributes are actually set by the parser. This way, we directly
1369         create an inputType / shadow subtree of the right type.
1370
1371         I see a 1.4% speed up on speedometer (73.95 -> 75.0).
1372
1373         Test: fast/dom/HTMLInputElement/border-attribute-crash.html
1374
1375         * dom/Element.cpp:
1376         (WebCore::Element::parserSetAttributes):
1377         (WebCore::Element::parserDidSetAttributes):
1378         * dom/Element.h:
1379         * html/HTMLInputElement.cpp:
1380         (WebCore::HTMLInputElement::HTMLInputElement):
1381         (WebCore::HTMLInputElement::create):
1382         (WebCore::HTMLInputElement::updateType):
1383         (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
1384         (WebCore::HTMLInputElement::initializeInputType):
1385         (WebCore::HTMLInputElement::parseAttribute):
1386         (WebCore::HTMLInputElement::parserDidSetAttributes):
1387         (WebCore::HTMLInputElement::finishParsingChildren):
1388         * html/HTMLInputElement.h:
1389
1390 2014-11-12  Chris Dumez  <cdumez@apple.com>
1391
1392         Have DOMTimer deal with more ScriptExecutionContext references
1393         https://bugs.webkit.org/show_bug.cgi?id=138679
1394
1395         Reviewed by Andreas Kling.
1396
1397         Have DOMTimer deal with more ScriptExecutionContext references instead
1398         of pointers, to make it clear the script execution context cannot be
1399         null.
1400
1401         No new tests, no behavior change.
1402
1403         * bindings/js/ScheduledAction.cpp:
1404         (WebCore::ScheduledAction::execute):
1405         (WebCore::ScheduledAction::executeFunctionInContext):
1406         * bindings/js/ScheduledAction.h:
1407         * dom/DocumentEventQueue.cpp:
1408         * page/DOMTimer.cpp:
1409         (WebCore::DOMTimerFireState::DOMTimerFireState):
1410         (WebCore::NestedTimersMap::instanceForContext):
1411         (WebCore::DOMTimer::DOMTimer):
1412         (WebCore::DOMTimer::install):
1413         (WebCore::DOMTimer::removeById):
1414         (WebCore::DOMTimer::fired):
1415         * page/DOMTimer.h:
1416         * page/DOMWindow.cpp:
1417         (WebCore::DOMWindow::setTimeout):
1418         (WebCore::DOMWindow::clearTimeout):
1419         (WebCore::DOMWindow::setInterval):
1420         (WebCore::DOMWindow::clearInterval):
1421         * page/SuspendableTimer.cpp:
1422         (WebCore::SuspendableTimer::SuspendableTimer):
1423         * page/SuspendableTimer.h:
1424         * workers/WorkerGlobalScope.cpp:
1425         (WebCore::WorkerGlobalScope::setTimeout):
1426         (WebCore::WorkerGlobalScope::clearTimeout):
1427         (WebCore::WorkerGlobalScope::setInterval):
1428         (WebCore::WorkerGlobalScope::clearInterval):
1429
1430 2014-11-12  Dean Jackson  <dino@apple.com>
1431
1432         Support unprefixed animation property names
1433         https://bugs.webkit.org/show_bug.cgi?id=138678
1434         <rdar://problem/18943059>
1435
1436         Reviewed by Simon Fraser.
1437
1438         Step 1 of 3 in unprefixing CSS animations: handling the
1439         property names and values.
1440
1441         Unlike other unprefixing, where we use an alias that
1442         effectively removes the prefixed values from the code,
1443         for animations we need to keep the old values around so that
1444         existing content will not break (e.g. computed style).
1445
1446         During testing I noticed that we didn't handle the
1447         (relatively) new animation-direction values of
1448         "reverse" and "alternate-reverse" when querying
1449         computed style.
1450
1451         Tests: animations/unprefixed-properties.html
1452                animations/unprefixed-shorthand.html
1453
1454         * css/CSSComputedStyleDeclaration.cpp:
1455         (WebCore::ComputedStyleExtractor::propertyValue): Handle the unprefixed
1456         values, but also get animation direction to produce the correct
1457         results when "reverse" and "alternate-reverse" is specified.
1458
1459         * css/CSSParser.cpp: Handle the new values. If necessary, pass a flag
1460         around indicating whether it is prefixed or unprefixed.
1461         (WebCore::CSSParser::parseValue):
1462         (WebCore::CSSParser::parseAnimationShorthand): Use the flag to decide
1463         which of the forms we're going to check.
1464         (WebCore::CSSParser::parseAnimationProperty):
1465         * css/CSSParser.h:
1466
1467         * css/CSSProperty.h:
1468         (WebCore::prefixingVariantForPropertyId): Add prefixing/unprefixing variants for
1469         all the animation values, and clean up the code a bit.
1470
1471         * css/CSSPropertyNames.in: Add new properties.
1472
1473         * css/DeprecatedStyleBuilder.cpp:
1474         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder): We need handlers for the
1475         unprefixed forms. This should move to the new StyleBuilder soon.
1476
1477         * css/StyleProperties.cpp: Handle new values.
1478         (WebCore::StyleProperties::getPropertyValue):
1479         (WebCore::StyleProperties::asText):
1480
1481         * css/StylePropertyShorthand.cpp:
1482         (WebCore::animationShorthand):
1483         (WebCore::animationShorthandForParsing): Decide which list of properties to use.
1484         (WebCore::shorthandForProperty):
1485         (WebCore::matchingShorthandsForLonghand):
1486         (WebCore::webkitAnimationShorthandForParsing): Deleted.
1487         * css/StylePropertyShorthand.h:
1488
1489         * css/StyleResolver.cpp: Since the new properties come before "background" in
1490         alphabetical order, they are earlier in the CSSPropertyNames.in file, and thus
1491         we need to update the call sites that think CSSPropertyBackground is the first
1492         property.
1493         (WebCore::StyleResolver::styleForKeyframe): Replace CSSPropertyBackground with CSSPropertyAnimation.
1494         (WebCore::StyleResolver::styleForPage):
1495         (WebCore::StyleResolver::applyMatchedProperties):
1496         (WebCore::StyleResolver::applyProperty):
1497
1498 2014-11-12  Beth Dakin  <bdakin@apple.com>
1499
1500         Speculative build fix.
1501
1502         * WebCore.exp.in:
1503
1504 2014-11-12  Timothy Horton  <timothy_horton@apple.com>
1505
1506         Fix the iOS build.
1507
1508         * platform/spi/mac/DataDetectorsSPI.h:
1509         It's likely that more of this file should be compiled out on iOS,
1510         but this is all we need to build.
1511
1512 2014-11-12  Beth Dakin  <bdakin@apple.com>
1513
1514         WK1: Support default actions for images
1515         https://bugs.webkit.org/show_bug.cgi?id=138668
1516         -and corresponding-
1517         rdar://problem/18785434
1518
1519         Reviewed by Tim Horton.
1520
1521         Symbol needed for copying image.
1522         * WebCore.exp.in:
1523
1524 2014-11-05  Ada Chan  <adachan@apple.com>
1525
1526         Implement new plug-in API for muting plug-ins
1527         https://bugs.webkit.org/show_bug.cgi?id=138105
1528
1529         Reviewed by Anders Carlsson.
1530
1531         Add the new NPNVmuteAudioBool NPNVariable.
1532
1533         Test: platform/mac-wk2/plugins/muted-state.html
1534
1535         * plugins/npapi.h:
1536
1537 2014-11-12  Tim Horton  <timothy_horton@apple.com>
1538
1539         Need to show the text indicator when Data Detectors shows a popover
1540         https://bugs.webkit.org/show_bug.cgi?id=138664
1541         <rdar://problem/18869900>
1542
1543         Reviewed by Beth Dakin.
1544
1545         * platform/spi/mac/DataDetectorsSPI.h:
1546         Add new DataDetectors SPI.
1547
1548 2014-11-12  Chris Dumez  <cdumez@apple.com>
1549
1550         Minor improvements to RenderListItem
1551         https://bugs.webkit.org/show_bug.cgi?id=138601
1552
1553         Reviewed by Darin Adler.
1554
1555         Make several minor improvements to RenderListItem and clean up the
1556         code a bit.
1557
1558         No new tests, no behavior change.
1559
1560         * rendering/RenderListItem.cpp:
1561         (WebCore::isHTMLListElement):
1562         - Rename isList to isHTMLListElement() for clarity as it checks
1563           for HTMLOListElement and HTMLUListElement types
1564         - Inline the function as it is short.
1565         - Use is<HTML*Element>() for type checking
1566         - Update the argument to take a Node& instead of an Element*. This
1567           is because the argument is expected to the non-null. Also using
1568           looser typing here allows us to use this utility function is one
1569           more place, without impacting performance as
1570           hasTagName(HTMLQualifiedName) is defined on Node.
1571
1572         (WebCore::enclosingList):
1573         - Pass the argument as a reference instead of a pointer as it is
1574           expected to be non-null.
1575         - Initialize firstNode before the loop to avoid the if (!firstNode)
1576           check for every iteration.
1577
1578         (WebCore::nextListItem):
1579         - Take an Element as second argument instead of a RenderListItem*
1580           and provide convenience overloads so that we don't need to do
1581           null checks just because some calls sites call this function
1582           with 2 arguments and others with 1 argument. This way, we avoid
1583           unnecessary null checks as most call sites already do such
1584           checks (or have references).
1585         - Transform the while loop into a for loop for clarity.
1586         - Don't traverse an Element's subtree if the Element does not have
1587           a renderer as it is impossible of any of its descendant to have
1588           a renderer (and we are looking for a specific type of renderer).
1589
1590         (WebCore::previousListItem):
1591         - Pass the item argument as a reference instead of a pointer as it
1592           is expected to be non-null.
1593         - Reduce the scope of the |current| so that it is now declared
1594           inside the loop.
1595
1596         (WebCore::RenderListItem::updateItemValuesForOrderedList):
1597         (WebCore::RenderListItem::itemCountForOrderedList):
1598         - Pass argument as a reference instead of a pointer as it was expected
1599           to be non-null (There was an assertion in place to make sure of it).
1600
1601         (WebCore::RenderListItem::calcValue):
1602         - Use is<HTMLOListElement>() instead of hasTagName().
1603
1604         (WebCore::getParentOfFirstLineBox):
1605         - Rename variables to stop using abbreviations.
1606         - Pass arguments as references instead of pointers as they are expected
1607           to be non-null.
1608         - Remove the firstChild null check before the loop as it does not
1609           change behavior. The loop will abort early if firstChild is null
1610           and we will end up returning nullptr as well.
1611         - Use is<>() more for type checking.
1612         - Reuse the isHTMLListElement() utility function instead of duplicating
1613           its code inside this function.
1614
1615         (WebCore::firstNonMarkerChild):
1616         - Pass argument as a reference as it is expected to be non-null.
1617         - Rename variable from result to child for clarity, as we are traversing
1618           the children.
1619
1620         (WebCore::RenderListItem::markerTextWithSuffix):
1621         - Use String appending instead of StringBuilder as it simplifies the
1622           code a lot and should not impact performance in this case.
1623
1624         (WebCore::RenderListItem::explicitValueChanged):
1625         - Restructure the code a bit to do the |listNode| null check before the
1626           loop, now that nextListItem() takes a reference in argument. This is
1627           the only call site where we didn't already know that listNode is
1628           non-null.
1629
1630         (WebCore::previousOrNextItem):
1631         - Mark this function as inline as it is short and called repeatedly.
1632
1633 2014-11-12  Chris Dumez  <cdumez@apple.com>
1634
1635         Speed up HTMLTextFormControlElement::setInnerTextValue() a bit
1636         https://bugs.webkit.org/show_bug.cgi?id=138619
1637
1638         Reviewed by Darin Adler.
1639
1640         Speed up HTMLTextFormControlElement::setInnerTextValue() a bit by:
1641         - Not doing a virtual isTextFormControl() call. Relying on innerTextElement()
1642           not returning null is sufficient.
1643         - Caching the result of innerTextElement() instead of repeatedly calling that
1644           virtual function.
1645         - De-virtualizing setFormControlValueMatchesRenderer() /
1646           formControlValueMatchesRenderer() as these are never overridden.
1647         - Moving the code constructing the innerTextValue from a
1648           TextControlInnerTextElement from innerTextValue() to a new
1649           innerTextValueFrom(TextControlInnerTextElement&) function and call this new
1650           function from setInnerTextValue() to avoid calling innerTextElement() again
1651           and making sure it is non-null
1652         - Do the tree traversal from innerTextElement's firstChild instead of from
1653           innerTextElement. The innerTextElement is a TextControlInnerTextElement.
1654           Therefore, it cannot be an HTMLBRElement or a Text node.
1655
1656         No new tests, no behavior change.
1657
1658         * html/HTMLFormControlElement.h:
1659         (WebCore::HTMLFormControlElement::formControlValueMatchesRenderer):
1660         (WebCore::HTMLFormControlElement::setFormControlValueMatchesRenderer):
1661         * html/HTMLTextFormControlElement.cpp:
1662         (WebCore::stripTrailingNewline):
1663         (WebCore::innerTextValueFrom):
1664         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
1665         (WebCore::HTMLTextFormControlElement::innerTextValue):
1666         (WebCore::HTMLTextFormControlElement::valueWithHardLineBreaks):
1667         (WebCore::finishText): Deleted.
1668
1669 2014-11-12  Jer Noble  <jer.noble@apple.com>
1670
1671         [Mac] media/track/audio-track.html is flakey
1672         https://bugs.webkit.org/show_bug.cgi?id=138394
1673
1674         Reviewed by Alexey Proskuryakov.
1675
1676         The above test fails if the HTMLMediaElement's "canplaythrough" event fires before the AudioTrackList's
1677         "addtrack" event fires. This can happen because each object keeps its own GenericEventQueue, which
1678         empties when that individual queue's timer fires. So events can be enqueued in the following order:
1679         1, A, 2, B, 3, C; but fired in a different order: 1, 2, 3, A, B, C.
1680
1681         Make events enqueued in GenericEventQueues globally ordered, so that events are fired in the order
1682         which they are enqueued, regardless of which object owns the queue. Use a static queue of
1683         GenericEventQueues to manage which GenericEventQueue fires and in what order.
1684
1685         GenericEventQueues will use a WeakPtrFactory to cancel pending events. Revoking a GenericEventQueue's
1686         weak pointers means those queue's entries will be skipped the next time the meta-queue is processed.
1687
1688         * dom/GenericEventQueue.cpp:
1689         (WebCore::GenericEventQueue::GenericEventQueue): Create a WeakPtrFactory instead of a Timer.
1690         (WebCore::GenericEventQueue::enqueueEvent): Enqueue this queue with the MetaQueue.
1691         (WebCore::GenericEventQueue::sharedTimer): Lazily-initializing accessor.
1692         (WebCore::GenericEventQueue::sharedTimerFired):  Ask each queue to dispatch one event.
1693         (WebCore::GenericEventQueue::pendingQueues): Lazily-initializing accessor.
1694         (WebCore::GenericEventQueue::dispatchOneEvent): Renamed from timerFired.
1695         (WebCore::GenericEventQueue::close): Revoke all WeakPtrs.
1696         (WebCore::GenericEventQueue::cancelAllEvents): Ditto.
1697         (WebCore::GenericEventQueue::hasPendingEvents): Use !isEmpty().
1698         (WebCore::GenericEventQueue::timerFired): Deleted.
1699         * dom/GenericEventQueue.h:
1700
1701 2014-11-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1702
1703         [GTK] Expose user script messages to GObject DOM bindings
1704         https://bugs.webkit.org/show_bug.cgi?id=138411
1705
1706         Reviewed by Philippe Normand.
1707
1708         * PlatformGTK.cmake: Add WebKitDOMCustomUnstable.h to the list of
1709         installed headers and make a symlink for it in the DerivedSources dir.
1710         * bindings/gobject/WebKitDOMCustomUnstable.h: Added.
1711         * bindings/gobject/WebKitDOMCustom.cpp:
1712         (webkit_dom_dom_window_get_webkit_namespace):
1713         (webkit_dom_user_message_handlers_namespace_get_handler):
1714         * bindings/scripts/CodeGeneratorGObject.pm:
1715         (HasUnstableCustomAPI): Helper function to check if the given
1716         class has custom unstable API.
1717         (WriteData): Include WebKitDOMCustomUnstable.h header if the class
1718         has API defined there.
1719
1720 2014-11-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1721
1722         [GTK] Fix how SerializedScriptValue is exposed to GObject DOM bindings
1723         https://bugs.webkit.org/show_bug.cgi?id=138409
1724
1725         Reviewed by Philippe Normand.
1726
1727         It's currently exposed as a WebKitDOMSerializedScriptValue class
1728         that doesn't really exist. It should be handled as a string, that
1729         is used to create a SerializedScriptValue when coming from the
1730         API, and converted to a string again when returned to the API.
1731
1732         * bindings/scripts/CodeGeneratorGObject.pm:
1733         (GetGlibTypeName): Return gchar* as glib type of SerializedScriptValue.
1734         (IsGDOMClassType): Don't consider SerializedScriptValue as a GDOM class.
1735         (GenerateFunction): Handle SerializedScriptValue parameters and
1736         return values specially.
1737         * bindings/scripts/test/GObject/WebKitDOMTestCallback.cpp:
1738         (webkit_dom_test_callback_callback_with_serialized_script_value_param):
1739         * bindings/scripts/test/GObject/WebKitDOMTestCallback.h:
1740         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1741         (webkit_dom_test_obj_serialized_value):
1742         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1743         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.cpp:
1744         (webkit_dom_test_serialized_script_value_interface_class_init):
1745         (webkit_dom_test_serialized_script_value_interface_get_value):
1746         (webkit_dom_test_serialized_script_value_interface_set_value):
1747         (webkit_dom_test_serialized_script_value_interface_get_readonly_value):
1748         (webkit_dom_test_serialized_script_value_interface_get_cached_value):
1749         (webkit_dom_test_serialized_script_value_interface_set_cached_value):
1750         (webkit_dom_test_serialized_script_value_interface_get_cached_readonly_value):
1751         * bindings/scripts/test/GObject/WebKitDOMTestSerializedScriptValueInterface.h:
1752         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.cpp:
1753         (webkit_dom_test_typedefs_class_init):
1754         (webkit_dom_test_typedefs_get_immutable_serialized_script_value):
1755         (webkit_dom_test_typedefs_set_immutable_serialized_script_value):
1756         * bindings/scripts/test/GObject/WebKitDOMTestTypedefs.h:
1757
1758 2014-11-12  Carlos Garcia Campos  <cgarcia@igalia.com>
1759
1760         [GTK] Move RedirectedXCompositeWindow from platform to WebKit2 layer
1761         https://bugs.webkit.org/show_bug.cgi?id=138093
1762
1763         Reviewed by Martin Robinson.
1764
1765         Remove RedirectedXCompositeWindow.
1766
1767         * PlatformGTK.cmake:
1768
1769 2014-09-01  Philippe Normand  <pnormand@igalia.com>
1770
1771         [WK2] UserMediaClient support
1772         https://bugs.webkit.org/show_bug.cgi?id=123158
1773
1774         Reviewed by Benjamin Poulain.
1775
1776         Added document and frame accessors, needed by the
1777         UserMediaRequestManager of the WebProcess. Also added two methods
1778         used by the permission request manager to know if access to audio
1779         or video devices is requested.
1780
1781         Tests: fast/mediastream/error.html
1782                fast/mediastream/success.html
1783                fast/mediastream/delayed-permission-allowed.html
1784                fast/mediastream/delayed-permission-denied.html
1785                http/tests/media/media-stream/disconnected-frame-already.html
1786                http/tests/media/media-stream/disconnected-frame-permission-denied.html
1787                http/tests/media/media-stream/disconnected-frame.html
1788
1789         * Modules/mediastream/UserMediaRequest.cpp:
1790         (WebCore::UserMediaRequest::document):
1791         (WebCore::UserMediaRequest::frame):
1792         * Modules/mediastream/UserMediaRequest.h:
1793         (WebCore::UserMediaRequest::requiresAudio):
1794         (WebCore::UserMediaRequest::requiresVideo):
1795
1796 2014-11-12  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1797
1798         [EFL] Clean up OwnPtr in RenderThemeEfl
1799         https://bugs.webkit.org/show_bug.cgi?id=138642
1800
1801         Reviewed by Zoltan Herczeg.
1802
1803         No new tests, no behavior change.
1804
1805         * platform/efl/RenderThemeEfl.cpp:
1806         (WebCore::RenderThemeEfl::applyEdjeRTLState): Clean up all remaining OwnPtr. 
1807
1808 2014-11-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1809
1810         Move Modules/websockets to std::unique_ptr
1811         https://bugs.webkit.org/show_bug.cgi?id=138649
1812
1813         Reviewed by Chris Dumez.
1814
1815         Remove create() factory function and use std::make_unique<>, std::unique_ptr<>
1816         instead of OwnPtr, PassOwnPtr.
1817         However didReceiveBinaryData() is still using PassOwnPtr. It should be replaced
1818         with std::unique_ptr<>
1819
1820         No new tests, no behavior.
1821
1822         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
1823         * Modules/websockets/WebSocket.cpp:
1824         * Modules/websockets/WebSocketChannel.cpp:
1825         (WebCore::WebSocketChannel::connect):
1826         (WebCore::WebSocketChannel::didFail):
1827         (WebCore::WebSocketChannel::processFrame):
1828         (WebCore::WebSocketChannel::enqueueTextFrame):
1829         (WebCore::WebSocketChannel::enqueueRawFrame):
1830         (WebCore::WebSocketChannel::enqueueBlobFrame):
1831         (WebCore::WebSocketChannel::processOutgoingFrameQueue):
1832         (WebCore::WebSocketChannel::sendFrame):
1833         * Modules/websockets/WebSocketChannel.h:
1834         * Modules/websockets/WebSocketDeflateFramer.cpp:
1835         (WebCore::WebSocketDeflateFramer::createExtensionProcessor):
1836         (WebCore::WebSocketDeflateFramer::enableDeflate):
1837         (WebCore::WebSocketDeflateFramer::deflate):
1838         (WebCore::WebSocketDeflateFramer::inflate):
1839         (WebCore::WebSocketExtensionDeflateFrame::create): Deleted.
1840         * Modules/websockets/WebSocketDeflateFramer.h:
1841         (WebCore::DeflateResultHolder::create): Deleted.
1842         (WebCore::InflateResultHolder::create): Deleted.
1843         * Modules/websockets/WebSocketDeflater.cpp:
1844         (WebCore::WebSocketDeflater::WebSocketDeflater):
1845         (WebCore::WebSocketInflater::WebSocketInflater):
1846         (WebCore::WebSocketDeflater::create): Deleted.
1847         (WebCore::WebSocketInflater::create): Deleted.
1848         * Modules/websockets/WebSocketDeflater.h:
1849         * Modules/websockets/WebSocketExtensionDispatcher.cpp:
1850         (WebCore::WebSocketExtensionDispatcher::addProcessor):
1851         * Modules/websockets/WebSocketExtensionDispatcher.h:
1852         * Modules/websockets/WebSocketHandshake.cpp:
1853         (WebCore::WebSocketHandshake::addExtensionProcessor):
1854         * Modules/websockets/WebSocketHandshake.h:
1855
1856 2014-11-11  Chris Dumez  <cdumez@apple.com>
1857
1858         Unreviewed iOS build fix after r176001.
1859
1860         Export an additional symbol.
1861
1862         * WebCore.exp.in:
1863
1864 2014-11-11  Jer Noble  <jer.noble@apple.com>
1865
1866         [Mac] Add diagnostic logging for per-media-engine load failures
1867         https://bugs.webkit.org/show_bug.cgi?id=138647
1868
1869         Reviewed by Eric Carlson.
1870
1871         Add diagnostic logging fired whenever a media engine fails to load media,
1872         even if another engine subsequentially succeeds. Add a mechanism for retrieving
1873         the platform-specific error code from a given engine.
1874
1875         * html/HTMLMediaElement.cpp:
1876         (WebCore::HTMLMediaElement::parseAttribute):
1877         * html/HTMLMediaElement.h:
1878         * page/DiagnosticLoggingKeys.cpp:
1879         (WebCore::DiagnosticLoggingKeys::engineFailedToLoadKey):
1880         * page/DiagnosticLoggingKeys.h:
1881         * platform/graphics/MediaPlayer.cpp:
1882         (WebCore::MediaPlayer::networkStateChanged):
1883         (WebCore::MediaPlayer::platformErrorCode):
1884         * platform/graphics/MediaPlayer.h:
1885         (WebCore::MediaPlayerClient::mediaPlayerEngineFailedToLoad):
1886         * platform/graphics/MediaPlayerPrivate.h:
1887         (WebCore::MediaPlayerPrivateInterface::platformErrorCode):
1888         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1889         (WebCore::MediaPlayerPrivateAVFoundation::platformErrorCode):
1890         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1891         (WebCore::MediaPlayerPrivateAVFoundationCF::assetErrorCode):
1892         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
1893         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1894         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1895         (WebCore::MediaPlayerPrivateAVFoundationObjC::assetErrorCode):
1896         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
1897         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1898         (WebCore::MediaPlayerPrivateQTKit::platformErrorCode):
1899
1900 2014-11-11  Chris Dumez  <cdumez@apple.com>
1901
1902         Mark more virtual functions in HTMLInputElement as final
1903         https://bugs.webkit.org/show_bug.cgi?id=138644
1904
1905         Reviewed by Andreas Kling.
1906
1907         Mark more virtual functions in HTMLInputElement as final to help the
1908         compiler optimize better.
1909
1910         No new tests, no behavior change.
1911
1912         * html/HTMLInputElement.h:
1913
1914 2014-11-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
1915
1916         Remove IncrementalSweeper::create()
1917         https://bugs.webkit.org/show_bug.cgi?id=138243
1918
1919         Reviewed by Filip Pizlo.
1920
1921         As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes
1922         IncrementalSweeper::create(), then set constructor of IncrementalSweeper to public.
1923         Now we begins to use std::make_unique<> to create IncrementalSweeper instance.
1924
1925         No new tests, no behavior changes.
1926
1927         * bindings/js/JSDOMWindowBase.cpp:
1928         (WebCore::JSDOMWindowBase::commonVM):
1929         * platform/ios/WebSafeIncrementalSweeperIOS.h:
1930
1931 2014-11-11  Chris Dumez  <cdumez@apple.com>
1932
1933         Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties to the new StyleBuilder
1934         https://bugs.webkit.org/show_bug.cgi?id=138594
1935
1936         Reviewed by Antti Koivisto.
1937
1938         Move 'border-image-*' / '-webkit-mask-box-image-*' CSS properties from
1939         DeprecatedStyleBuilder to the new StyleBuilder using custom code.
1940
1941         No new tests, no behavior change.
1942
1943         * css/CSSPropertyNames.in:
1944         * css/DeprecatedStyleBuilder.cpp:
1945         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
1946         (WebCore::ApplyPropertyBorderImageModifier::getValue): Deleted.
1947         (WebCore::ApplyPropertyBorderImageModifier::setValue): Deleted.
1948         (WebCore::ApplyPropertyBorderImageModifier::applyInheritValue): Deleted.
1949         (WebCore::ApplyPropertyBorderImageModifier::applyInitialValue): Deleted.
1950         (WebCore::ApplyPropertyBorderImageModifier::applyValue): Deleted.
1951         (WebCore::ApplyPropertyBorderImageModifier::createHandler): Deleted.
1952         * css/StyleBuilderCustom.h:
1953         (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInheritValue):
1954         (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyInitialValue):
1955         (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::applyValue):
1956         (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::getValue):
1957         (WebCore::StyleBuilderFunctions::ApplyPropertyBorderImageModifier::setValue):
1958
1959 2014-11-11  David Kilzer  <ddkilzer@apple.com>
1960
1961         Modernize $buildingForIPhone in CodeGeneratorObjC.pm
1962         <http://webkit.org/b/138640>
1963
1964         Reviewed by Daniel Bates.
1965
1966         Mac OS X is the only platform that supports NSColor, so rename
1967         $buildingForIPhone to $shouldUseCGColor (which is actually what
1968         the variable represents) and define it in terms of the "macosx"
1969         platform name.
1970
1971         * bindings/scripts/CodeGeneratorObjC.pm:
1972         ($buildingForIPhone): Rename to $shouldUseCGColor.
1973         ($shouldUseCGColor): False if PLATFORM_NAME is not defined,
1974         which is the case on older Xcodes when building for Mac OS X, or
1975         if PLATFORM_NAME is equal to "macosx".  True otherwise.
1976         (GetClassName): Switch to use new variable name.
1977         (AddIncludesForType): Ditto.
1978         (GenerateHeader): Remove dead code.  The
1979         $buildingForTigerOrEarlier variable was accidentally
1980         re-introduced in r161638, but was originally removed in r127032!
1981         (GenerateImplementation): Switch to use new variable name.
1982
1983 2014-11-11  Tim Horton  <timothy_horton@apple.com>
1984
1985         Add support for mailto: link action menus
1986         https://bugs.webkit.org/show_bug.cgi?id=138641
1987         <rdar://problem/18741567>
1988
1989         Reviewed by Beth Dakin.
1990
1991         * WebCore.exp.in:
1992         Add an export.
1993
1994         * platform/spi/mac/DataDetectorsSPI.h:
1995         Add some DataDetectors SPI.
1996
1997 2014-11-11  Eric Carlson  <eric.carlson@apple.com>
1998
1999         [iOS] video is sometimes allowed to play from the background
2000         https://bugs.webkit.org/show_bug.cgi?id=138522
2001
2002         Rubber-stamped by Jer Noble.
2003
2004         * platform/audio/MediaSession.cpp:
2005         (WebCore::MediaSession::updateClientDataBuffering): Call MediaSessionManager::sessionCanLoadMedia.
2006
2007 2014-11-11  Eric Carlson  <eric.carlson@apple.com>
2008
2009         [iOS] a page with video in optimized fullscreen is visible
2010         https://bugs.webkit.org/show_bug.cgi?id=138632
2011
2012         Reviewed by Anders Carlsson.
2013
2014         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2015         (WebCore::WebVideoFullscreenInterfaceAVKit::mode): Expose fullscreen mode.
2016
2017 2014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
2018
2019         Mountain Lion build fix
2020         https://bugs.webkit.org/show_bug.cgi?id=138631
2021
2022         Reviewed by Simon Fraser.
2023
2024         * platform/spi/cocoa/CoreTextSPI.h:
2025
2026 2014-11-11  Eric Carlson  <eric.carlson@apple.com>
2027
2028         [iOS] cleanup wireless route monitoring
2029         https://bugs.webkit.org/show_bug.cgi?id=138614
2030
2031         Reviewed by Jer Noble.
2032
2033         * html/HTMLMediaElement.cpp:
2034         (WebCore::HTMLMediaElement::clearMediaPlayer): Add logging.
2035         (WebCore::HTMLMediaElement::removeEventListener): Ditto.
2036         (WebCore::HTMLMediaElement::createMediaPlayer): Ditto.
2037
2038         * platform/audio/ios/MediaSessionManagerIOS.mm:
2039         (WebCore::MediaSessionManageriOS::resetRestrictions): Add logging.
2040         (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring): Ditto.
2041         (WebCore::MediaSessionManageriOS::updateNowPlayingInfo): Ditto.
2042         (-[WebMediaSessionHelper initWithCallback:]): Ditto.
2043         (-[WebMediaSessionHelper dealloc]): Always deallocate volume view and routing controller
2044             on the main thread.
2045         (-[WebMediaSessionHelper clearCallback]): Add logging.
2046         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]): Ditto.
2047         (-[WebMediaSessionHelper startMonitoringAirPlayRoutes]): Always call routing controller on
2048             the main thread.
2049         (-[WebMediaSessionHelper stopMonitoringAirPlayRoutes]): Ditto.
2050         (-[WebMediaSessionHelper interruption:]): Add logging.
2051         (-[WebMediaSessionHelper applicationWillEnterForeground:]): Ditto.
2052         (-[WebMediaSessionHelper applicationDidBecomeActive:]): Ditto.
2053         (-[WebMediaSessionHelper applicationWillResignActive:]): Ditto.
2054         (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): Ditto.
2055
2056 2014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
2057
2058         Unreviewd iOS build fix
2059
2060         * platform/spi/cocoa/CoreTextSPI.h:
2061
2062 2014-11-11  David Kilzer  <ddkilzer@apple.com>
2063
2064         Protect Document in ProcessingInstruction::setXSLStyleSheet()
2065         <http://webkit.org/b/138621>
2066
2067         Reviewed by Andreas Kling.
2068
2069         The patch is inspired by the following Blink revision by
2070         <tasak@google.com>:
2071         <https://src.chromium.org/viewvc/blink?view=rev&revision=182309>
2072
2073         * dom/ProcessingInstruction.cpp:
2074         (WebCore::ProcessingInstruction::setXSLStyleSheet):
2075
2076 2014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
2077
2078         Finish moving CTFontGetVerticalGlyphsForCharacters and CTLineCreateWithUniCharProvider out from WKSI
2079         https://bugs.webkit.org/show_bug.cgi?id=138623
2080
2081         Reviewed by Geoff Garen.
2082
2083         No new tests because there is no behavior change.
2084
2085         * WebCore.exp.in:
2086         * WebCore.order:
2087         * platform/graphics/mac/GlyphPageTreeNodeMac.cpp:
2088         (WebCore::GlyphPage::fill):
2089         * platform/graphics/mac/SimpleFontDataMac.mm:
2090         (WebCore::SimpleFontData::canRenderCombiningCharacterSequence):
2091         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2092         * platform/mac/WebCoreSystemInterface.h:
2093         * platform/mac/WebCoreSystemInterface.mm:
2094         * platform/spi/cocoa/CoreTextSPI.h:
2095
2096 2014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
2097
2098         Unreviewed Mountain Lion build fix
2099
2100         * platform/spi/cocoa/CoreTextSPI.h:
2101
2102 2014-11-11  Commit Queue  <commit-queue@webkit.org>
2103
2104         Unreviewed, rolling out r175852.
2105         https://bugs.webkit.org/show_bug.cgi?id=138626
2106
2107         Broke PLT by introducing a crash. (Requested by rniwa on
2108         #webkit).
2109
2110         Reverted changeset:
2111
2112         "Lazily create HTMLInputElement's inputType and shadow
2113         subtree"
2114         https://bugs.webkit.org/show_bug.cgi?id=138524
2115         http://trac.webkit.org/changeset/175852
2116
2117 2014-11-11  Chris Dumez  <cdumez@apple.com>
2118
2119         Regression(r175947): Caused assertions in debug builds
2120         https://bugs.webkit.org/show_bug.cgi?id=138620
2121
2122         Reviewed by Benjamin Poulain.
2123
2124         In HTMLCollection::traverseForward(), traversedCount was incremented 1
2125         time too many when hitting the end of the collection (i.e. element
2126         becomes null). Doing a partial revert.
2127
2128         No new tests, already covered by existing tests.
2129
2130         * html/HTMLCollection.cpp:
2131         (WebCore::HTMLCollection::traverseForward):
2132
2133 2014-11-11  Tim Horton  <timothy_horton@apple.com>
2134
2135         DataDetectors' menu items aren't presented in the telephone number menu
2136         https://bugs.webkit.org/show_bug.cgi?id=138602
2137         <rdar://problem/18866308>
2138
2139         Reviewed by Beth Dakin.
2140
2141         * English.lproj/Localizable.strings:
2142         Remove a now-unused localized string.
2143
2144 2014-11-11  Daniel Bates  <dabates@apple.com>
2145
2146         [Frame Flattening] ASSERT(transaction->view == &view()) fails in RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction()
2147         https://bugs.webkit.org/show_bug.cgi?id=138615
2148         <rdar://problem/18928487>
2149
2150         Reviewed by David Hyatt.
2151
2152         Fixes an issue where we always expected that the RenderView associated with the RenderBlock called in
2153         RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction() is the same as the RenderView associated with
2154         the top transaction in the UpdateScrollInfoAfterLayoutTransaction stack regardless of frame flattening. This
2155         expectation is only true when frame flattening is disabled.
2156
2157         Test: fast/frames/flattening/iframe-flattening-inside-flexbox-with-delayed-scroll-update.html
2158
2159         * rendering/RenderBlock.cpp:
2160         (WebCore::RenderBlock::removeFromUpdateScrollInfoAfterLayoutTransaction):
2161
2162 2014-11-11  Tim Horton  <timothy_horton@apple.com>
2163
2164         Adopt DDActionContext menu type SPI
2165         https://bugs.webkit.org/show_bug.cgi?id=138603
2166         <rdar://problem/18867627>
2167
2168         Reviewed by Anders Carlsson.
2169
2170         * platform/spi/mac/DataDetectorsSPI.h:
2171         Add the new SPI.
2172
2173 2014-11-11  Tim Horton  <timothy_horton@apple.com>
2174
2175         Data Detectors popovers should be dismissed upon scrolling
2176         https://bugs.webkit.org/show_bug.cgi?id=138600
2177         <rdar://problem/18932770>
2178
2179         Reviewed by Beth Dakin.
2180
2181         * platform/spi/mac/DataDetectorsSPI.h:
2182         Adjust the SPI header.
2183
2184 2014-11-11  Tim Horton  <timothy_horton@apple.com>
2185
2186         Localize strings for action menus
2187         https://bugs.webkit.org/show_bug.cgi?id=138591
2188         <rdar://problem/18815343>
2189
2190         Reviewed by Dan Bates.
2191
2192         * English.lproj/Localizable.strings:
2193         Add a bunch of localizable strings.
2194
2195 2014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
2196
2197         Cleanup from r175379
2198         https://bugs.webkit.org/show_bug.cgi?id=138616
2199
2200         Reviewed by Simon Fraser.
2201
2202         No new tests because there is no behavior change.
2203
2204         * WebCore.exp.in:
2205         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2206         * platform/mac/WebCoreSystemInterface.h:
2207         * platform/mac/WebCoreSystemInterface.mm:
2208
2209 2014-11-11  Myles C. Maxfield  <mmaxfield@apple.com>
2210
2211         Move CTFontTransformGlyphs out from WKSI
2212         https://bugs.webkit.org/show_bug.cgi?id=138599
2213
2214         Reviewed by Simon Fraser.
2215
2216         No new tests because there is no behavior change.
2217
2218         * WebCore.exp.in:
2219         * WebCore.order:
2220         * platform/graphics/SimpleFontData.cpp:
2221         (WebCore::SimpleFontData::applyTransforms):
2222         * platform/graphics/SimpleFontData.h:
2223         * platform/ios/WebCoreSystemInterfaceIOS.mm:
2224         * platform/mac/WebCoreSystemInterface.h:
2225         * platform/mac/WebCoreSystemInterface.mm:
2226         * platform/spi/cocoa/CoreTextSPI.h:
2227
2228 2014-11-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2229
2230         Use std::unique_ptr<>|std::make_unique_ptr in RenderThemeEfl::ThemePartCacheEntry::create()
2231         https://bugs.webkit.org/show_bug.cgi?id=138558
2232
2233         Reviewed by Anders Carlsson.
2234
2235         This patch removes PassOwnPtr and OwnPtr in RenderThemeEfl::ThemePartCacheEntry::create().
2236         It would be good if we also remove create() factory function though, in this case, it is
2237         a little hard to remove it since the create() factory function does many works to create
2238         a ThemePartCacheEntry instance. Thus this patch just replaces PassOwnPtr|OwnPtr with
2239         std::unique_ptr<> and std::make_unique<> in RenderThemeEfl::ThemePartCacheEntry::create().
2240
2241         Besides the theme entries have been maintained by Eina_List*. Unfortunately it doesn't support
2242         std::unique_ptr<> yet. Thus the Eina_List* should be replaced with Vector<std::unique_ptr<>>
2243         so that m_partCache has ownship of all EFL theme entries. This patch tries to keep original
2244         cache algorithm based on Vector class.
2245
2246         No new tests, no behavior changes.
2247
2248         * platform/efl/RenderThemeEfl.cpp:
2249         (WebCore::RenderThemeEfl::ThemePartCacheEntry::create):
2250         (WebCore::RenderThemeEfl::getThemePartFromCache):
2251         * platform/efl/RenderThemeEfl.h:
2252
2253 2014-11-09  Darin Adler  <darin@apple.com>
2254
2255         Minor tweaks to HTMLCollection
2256         https://bugs.webkit.org/show_bug.cgi?id=138556
2257
2258         Reviewed by Chris Dumez.
2259
2260         * accessibility/AccessibilityRenderObject.cpp:
2261         (WebCore::AccessibilityRenderObject::addRadioButtonGroupMembers):
2262         Update for namedElements function that now returns a Vector; also use
2263         a new style for loop to iterate it.
2264
2265         * bindings/js/JSHTMLAllCollectionCustom.cpp: Removed some unneeded includes.
2266         (WebCore::namedItems): Updated name to match WebKit coding style, and also
2267         updated to use the return value from namedItems, which now returns a Vector.
2268         (WebCore::callHTMLAllCollection): Updated for namedItems name change.
2269         Also removed explicit Node* type from result of namedItemWithIndex, since that
2270         function now returns a more specific type.
2271         (WebCore::JSHTMLAllCollection::nameGetter): Update for namedItems name change.
2272         (WebCore::JSHTMLAllCollection::item): Ditto.
2273         (WebCore::JSHTMLAllCollection::namedItem): Ditto.
2274
2275         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Removed some unneeded includes.
2276         (WebCore::namedItems): Updated name to match WebKit coding style, and also
2277         updated to use the return value from namedItems, which now returns a Vector.
2278         (WebCore::JSHTMLFormControlsCollection::nameGetter): Update for namedItems name change.
2279         (WebCore::JSHTMLFormControlsCollection::namedItem): Ditto.
2280
2281         * bindings/js/JSHTMLFormElementCustom.cpp:
2282         (WebCore::JSHTMLFormElement::nameGetter): Updated to use the return value from
2283         namedItems, which now returns a Vector.
2284
2285         * html/HTMLAllCollection.cpp:
2286         (WebCore::HTMLAllCollection::HTMLAllCollection): Marked the constructor inline,
2287         since it's only used in one place, the create function.
2288         (WebCore::HTMLAllCollection::~HTMLAllCollection): Deleted. No need to have an
2289         explicit destructor since there's nothing special to implement, and includers of
2290         the header file have everything they ened to compile the compiler-generated one.
2291         (WebCore::HTMLAllCollection::namedItemWithIndex): Changed return type to Element.
2292
2293         * html/HTMLAllCollection.h: Removed unneeded explicit declaration of destructor.
2294         Chagned return type of namedItemWithIndex to Element.
2295
2296         * html/HTMLCollection.cpp:
2297         (WebCore::HTMLCollection::rootTypeFromCollectionType): Marked this inline. Also
2298         changed this to be a static member function so it can use the RootType enum, which
2299         is now private to the class.
2300         (WebCore::isMatchingHTMLElement): Marked this function static so it will get
2301         internal linkage.
2302         (WebCore::isMatchingElement): Ditto.
2303         (WebCore::previousElement): Marked this function inline since it's called in only
2304         one place. Changed argument type to a reference since it can never be null.
2305         (WebCore::HTMLCollection::iterateForPreviousElement): Changed argument name and
2306         also updated for above changes.
2307         (WebCore::firstMatchingElement): Marked this function static so it will get
2308         internal linkage.
2309         (WebCore::nextMatchingElement): Ditto. Changed argument type to a reference
2310         since it can never be null.
2311         (WebCore::HTMLCollection::item): Changed return type to Element.
2312         (WebCore::nameShouldBeVisibleInDocumentAll): Added an overload that takes an
2313         Element. This streamlines the code below that calls it so it fits on one line.
2314         (WebCore::firstMatchingChildElement): Marked this function static so it will get
2315         internal linkage.
2316         (WebCore::nextMatchingSiblingElement): Ditto. Changed argument type to a reference
2317         since it can never be null.
2318         (WebCore::HTMLCollection::usesCustomForwardOnlyTraversal): Moved here from the
2319         header since, although it's marked inline, it's only used inside this file.
2320         (WebCore::HTMLCollection::traverseForward): Restructured the code a little bit
2321         to make the function smaller and possibly easier to read. This does add one
2322         redundant null check, but it seems OK to do that.
2323         (WebCore::HTMLCollection::collectionTraverseBackward): Tweaked foramtting a bit.
2324         (WebCore::HTMLCollection::namedItem): Changed return type to Element. Tightened
2325         the code that calls nameShouldBeVisibleInDocumentAll so it fits better on one line.
2326         Changed code that handles m_shouldOnlyIncludeDirectChildren to use a nested if
2327         instead of an && since it makes the code a little easier to read.
2328         (WebCore::HTMLCollection::updateNamedElementCache): Tweaked code a little bit,
2329         using shorter variable names, and using references instead of pointers. Also removed
2330         the call to didPopulate, since setNamedItemCache now takes care of that.
2331         (WebCore::HTMLCollection::namedItems): Changed to return a Vector instead of
2332         appending to an existing one. Also use reserveInitialCapacity and uncheckedAppend
2333         for better performance. Added a FIXME, because there seems to be something wrong
2334         here about this being non-virtual. Made other small tweaks to streamline the code.
2335         (WebCore::HTMLCollection::customElementAfter): Moved this here from the header.
2336         There is no reason to need to inline this.
2337
2338         * html/HTMLCollection.h: Removed unneeded includes. Moved function bodies out
2339         of the class definitions so the class definitions are easier to read. Made some
2340         functions that were formerly public or protected be private instead. Added a call
2341         to didPopulate to setNamedItemCache so the callers don't have to do it.
2342
2343         * html/HTMLFormControlsCollection.cpp:
2344         (WebCore::HTMLFormControlsCollection::namedItem): Changed return value to Element.
2345         Tweaked coding style a little bit.
2346         (WebCore::HTMLFormControlsCollection::updateNamedElementCache): Rearranged to
2347         simplify a bit. Don't build the foundInputElements set when the owner is not a
2348         form element, since we don't use the set in that case. Use shorter variable names,
2349         and modern for loops. Also removed the call to didPopulate, since setNamedItemCache
2350         now takes care of that.
2351
2352         * html/HTMLFormControlsCollection.h: Removed some uneeded forward declarations.
2353         Updated return type for namedItem, and also made the override private.
2354
2355         * html/HTMLFormElement.cpp:
2356         (WebCore::HTMLFormElement::namedElements): Changed to return a Vector and updated
2357         function name accordingly.
2358         * html/HTMLFormElement.h: Ditto.
2359
2360         * html/HTMLNameCollection.h: Removed a stray blank line.
2361
2362         * html/HTMLSelectElement.cpp:
2363         (WebCore::HTMLSelectElement::namedItem): Changed return value to Element.
2364         (WebCore::HTMLSelectElement::item): Ditto.
2365         * html/HTMLSelectElement.h: Ditto.
2366
2367         * page/scrolling/AxisScrollSnapOffsets.cpp:
2368         (WebCore::appendChildSnapOffsets): Rewrote loop as a for loop rather than a while
2369         loop. Removed unwanted use of children()->collectionBegin() to get the first element
2370         child of an HTMLElement. This function uses a mix of DOM and rendering functions that
2371         is probably incorrect, but I did not tackle fixing that at this time.
2372
2373 2014-11-11  Dan Bernstein  <mitz@apple.com>
2374
2375         [Mac] WebCore includes unused cursor image resources
2376         https://bugs.webkit.org/show_bug.cgi?id=138605
2377
2378         Reviewed by Anders Carlsson.
2379
2380         * Resources/aliasCursor.png: Removed.
2381         * Resources/cellCursor.png: Removed.
2382         * Resources/contextMenuCursor.png: Removed.
2383         * Resources/copyCursor.png: Removed.
2384         * Resources/eastResizeCursor.png: Removed.
2385         * Resources/eastWestResizeCursor.png: Removed.
2386         * Resources/helpCursor.png: Removed.
2387         * Resources/linkCursor.png: Removed.
2388         * Resources/moveCursor.png: Removed.
2389         * Resources/noDropCursor.png: Removed.
2390         * Resources/noneCursor.png: Removed.
2391         * Resources/northEastResizeCursor.png: Removed.
2392         * Resources/northEastSouthWestResizeCursor.png: Removed.
2393         * Resources/northResizeCursor.png: Removed.
2394         * Resources/northSouthResizeCursor.png: Removed.
2395         * Resources/northWestResizeCursor.png: Removed.
2396         * Resources/northWestSouthEastResizeCursor.png: Removed.
2397         * Resources/progressCursor.png: Removed.
2398         * Resources/southEastResizeCursor.png: Removed.
2399         * Resources/southResizeCursor.png: Removed.
2400         * Resources/southWestResizeCursor.png: Removed.
2401         * Resources/verticalTextCursor.png: Removed.
2402         * Resources/waitCursor.png: Removed.
2403         * Resources/westResizeCursor.png: Removed.
2404         * Resources/zoomInCursor.png: Removed.
2405         * Resources/zoomOutCursor.png: Removed.
2406
2407         * WebCore.xcodeproj/project.pbxproj: Removed references to the above files.
2408
2409         * platform/mac/CursorMac.mm:
2410         (WebCore::Cursor::ensurePlatformCursor): For Help, Cell, ZoomIn and ZoomOut, don’t check
2411         for a nil return value from wkCursor(), which can’t occur in any supported configuration.
2412         For None, create a cursor with an empty NSImage instead of loading a transparent image from
2413         the file system.
2414         (WebCore::createNamedCursor): Deleted.
2415
2416 2014-11-11  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2417
2418         Unreviewed, rolling out r175844.
2419
2420         Win debug build has broken since r175844.
2421
2422         Reverted changeset:
2423
2424         "Use std::unique_ptr<> and std::make_unique<> in WebCore"
2425         https://bugs.webkit.org/show_bug.cgi?id=138560
2426         http://trac.webkit.org/changeset/175844
2427
2428 2014-11-11  Philippe Normand  <pnormand@igalia.com>
2429
2430         Qt/Chromium remnants in MediaPlayer
2431         https://bugs.webkit.org/show_bug.cgi?id=138611
2432
2433         Reviewed by Jer Noble.
2434
2435         * platform/graphics/MediaPlayer.h: Remove unused Qt/Chromium stuff.
2436
2437 2014-11-11  Chris Dumez  <cdumez@apple.com>
2438
2439         Move '-webkit-marquee-speed' CSS property to the new StyleBuilder
2440         https://bugs.webkit.org/show_bug.cgi?id=138595
2441
2442         Reviewed by Antti Koivisto.
2443
2444         Move '-webkit-marquee-speed' CSS property from DeprecatedStyleBuilder
2445         to the new StyleBuilder by adding a new MarqueeSpeed Converter.
2446
2447         No new tests, no behavior change.
2448
2449         * css/CSSPropertyNames.in:
2450         * css/DeprecatedStyleBuilder.cpp:
2451         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2452         (WebCore::ApplyPropertyMarqueeSpeed::applyValue): Deleted.
2453         (WebCore::ApplyPropertyMarqueeSpeed::createHandler): Deleted.
2454         * css/StyleBuilderConverter.h:
2455         (WebCore::StyleBuilderConverter::convertMarqueeSpeed):
2456
2457 2014-10-07  Sergio Villar Senin  <svillar@igalia.com>
2458
2459         [CSS Grid Layout] Limit the size of explicit/implicit grid
2460         https://bugs.webkit.org/show_bug.cgi?id=136217
2461
2462         Reviewed by Andreas Kling.
2463
2464         A recent change in the specs allow us to set a limit (maximum
2465         size) for both the explicit and implicit grids so we can protect
2466         ourselves from absurdly huge grid specifications. It was decided
2467         to use the recommended limit which is 1 million.
2468
2469         This means that we can remove the old limitation for the number of
2470         repetitions in repeat(). Instead we now clamp the number of
2471         repetitions to the maximum value that allow us to have the maximum
2472         number of whole repetitions without exceeding the track number
2473         limit.
2474
2475         * WebCore.xcodeproj/project.pbxproj:
2476         * css/CSSParser.cpp:
2477         (WebCore::CSSParser::parseGridTrackRepeatFunction): Replaced the
2478         old limit by the new one.
2479         * rendering/RenderGrid.cpp:
2480         (WebCore::RenderGrid::placeItemsOnGrid): Use the amount of tracks
2481         provided by GridResolvedPosition.
2482         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Ditto.
2483         * rendering/style/GridCoordinate.h:
2484         (WebCore::GridSpan::GridSpan):
2485         * rendering/style/GridResolvedPosition.cpp:
2486         (WebCore::GridResolvedPosition::explicitGridColumnCount): Bring
2487         the static function back to life.
2488         (WebCore::GridResolvedPosition::explicitGridRowCount): Ditto.
2489         (WebCore::explicitGridSizeForSide):
2490         * rendering/style/GridResolvedPosition.h:
2491
2492 2014-11-11  Yusuke Suzuki  <utatane.tea@gmail.com>
2493
2494         CSS4 Selectors: Add multiple pseudo elements support to :matches
2495         https://bugs.webkit.org/show_bug.cgi?id=138214
2496
2497         Reviewed by Benjamin Poulain.
2498
2499         In this patch, we implement (multiple) pseudo elements support to :matches.
2500         Currently, we implemented it in css/SelectorChecker and there's no CSS JIT implementation.
2501
2502         And we change the semantics of pseudo element selector behavior.
2503         Previously when pseudo element selector appeared in the non-rightmost
2504         fragment, it was ignored. This patch changes it to unmatched.
2505
2506         * css/SelectorChecker.cpp:
2507         (WebCore::SelectorChecker::CheckingContextWithStatus::CheckingContextWithStatus):
2508         (WebCore::SelectorChecker::match):
2509         (WebCore::hasScrollbarPseudoElement):
2510         (WebCore::SelectorChecker::matchRecursively):
2511         (WebCore::SelectorChecker::checkOne):
2512         (WebCore::SelectorChecker::matchSelectorList):
2513         * css/SelectorChecker.h:
2514         (WebCore::SelectorChecker::MatchResult::matches):
2515         (WebCore::SelectorChecker::MatchResult::updateWithMatchType):
2516         (WebCore::SelectorChecker::MatchResult::fails):
2517         * cssjit/SelectorCompiler.cpp:
2518         (WebCore::SelectorCompiler::addPseudoClassType):
2519         (WebCore::SelectorCompiler::SelectorCodeGenerator::SelectorCodeGenerator):
2520         (WebCore::SelectorCompiler::constructFragments):
2521         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasPseudoElement):
2522         * rendering/style/RenderStyle.h:
2523         (WebCore::RenderStyle::setHasPseudoStyles):
2524         * rendering/style/RenderStyleConstants.h:
2525         (WebCore::PseudoIdSet::PseudoIdSet):
2526         (WebCore::PseudoIdSet::fromMask):
2527         (WebCore::PseudoIdSet::has):
2528         (WebCore::PseudoIdSet::add):
2529         (WebCore::PseudoIdSet::merge):
2530         (WebCore::PseudoIdSet::operator &):
2531         (WebCore::PseudoIdSet::operator |):
2532         (WebCore::PseudoIdSet::operator bool):
2533         (WebCore::PseudoIdSet::data):
2534
2535 2014-11-10  Chris Dumez  <cdumez@apple.com>
2536
2537         Lazily create HTMLInputElement's inputType and shadow subtree
2538         https://bugs.webkit.org/show_bug.cgi?id=138524
2539
2540         Reviewed by Ryosuke Niwa.
2541
2542         When an HTMLInputElement was created by the parser, we would first call
2543         HTMLInputElement::create(), then call Element::parserSetAttributes() on
2544         the constructed input. With the previous implementation, this was a bit
2545         inefficient because HTMLInputElement::create() would construct a
2546         TextInputType inputType (as this is the default) as well as its
2547         corresponding shadow subtree. Then, parserSetAttributes() would often
2548         set the |type| attribute and would need to destroy this input type as
2549         well as its subtree if the new |type| is not 'text', to create a new
2550         inputType / shadow subtree of the right type. The profiler showed that
2551         this was fairly expensive.
2552
2553         To improve this, this patch delays the inputType / shadow subtree
2554         creation when the HTMLInputElement is constructed by the parser, until
2555         the attributes are actually set by the parser. This way, we directly
2556         create an inputType / shadow subtree of the right type.
2557
2558         I see a 1.4% speed up on speedometer (73.95 -> 75.0).
2559
2560         No new tests, no behavior change.
2561
2562         * dom/Element.cpp:
2563         (WebCore::Element::parserSetAttributes):
2564         (WebCore::Element::parserDidFinishParsingAttributes):
2565         * dom/Element.h:
2566         * html/HTMLInputElement.cpp:
2567         (WebCore::HTMLInputElement::HTMLInputElement):
2568         (WebCore::HTMLInputElement::create):
2569         (WebCore::HTMLInputElement::updateType):
2570         (WebCore::HTMLInputElement::runPostTypeUpdateTasks):
2571         (WebCore::HTMLInputElement::ensureInputType):
2572         (WebCore::HTMLInputElement::parseAttribute):
2573         (WebCore::HTMLInputElement::parserDidFinishParsingAttributes):
2574         * html/HTMLInputElement.h:
2575
2576 2014-11-10  Benjamin Poulain  <bpoulain@apple.com>
2577
2578         Add parsing support for the extended :nth-last-child(An+B of selector-list) defined
2579         https://bugs.webkit.org/show_bug.cgi?id=138520
2580
2581         Reviewed by Andreas Kling.
2582
2583         Add parsing for :nth-last-child(An+B of selector-list). The selector is defined
2584         in CSS Selectors Level 4: http://dev.w3.org/csswg/selectors4/#the-nth-last-child-pseudo
2585
2586         Tests: fast/css/parsing-css-nth-last-child-of-1.html
2587                fast/css/parsing-css-nth-last-child-of-2.html
2588                fast/css/parsing-css-nth-last-child-of-3.html
2589                fast/css/parsing-css-nth-last-child-of-4.html
2590
2591         * css/CSSGrammar.y.in:
2592         * css/CSSParser.cpp:
2593         (WebCore::CSSParser::detectFunctionTypeToken):
2594         * css/CSSSelector.cpp:
2595         (WebCore::CSSSelector::selectorText):
2596
2597 2014-11-10  Said Abou-Hallawa  <sabouhallawa@apple.com>
2598
2599         SVG foreign objects do not inherit the container coordinates system if they are repainted.
2600         https://bugs.webkit.org/show_bug.cgi?id=138481.
2601
2602         Reviewed by Simon Fraser.
2603
2604         If a foreign object is included in an SVG, it should inherit the coordinates system
2605         of the container if it is repainted. The foreign object is actually redrawn in the
2606         CSS coordinates system regardless of the transformation that may be applied to the
2607         container.
2608
2609         The bug is RenderSVG* classes use computeFloatRectForRepaint(), but the rest of the
2610         render classes use computeRectForRepaint(). RenderSVGForeignObject::computeRectForRepaint()
2611         was not defined, so we end up hitting RenderObject::computeRectForRepaint() for 
2612         a RenderSVGTransformableContainer and completely miss the transform.
2613
2614         Tests: svg/transforms/svg-transform-foreign-object-repaint.html
2615
2616         Implement RenderSVGForeignObject::computeRectForRepaint() so we can apply the
2617         container transformation on the SVG foreign object repaint rectangle.
2618         * rendering/svg/RenderSVGForeignObject.cpp:
2619         (WebCore::RenderSVGForeignObject::computeRectForRepaint):
2620         * rendering/svg/RenderSVGForeignObject.h:
2621
2622 2014-11-10  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2623
2624         Use std::unique_ptr<> and std::make_unique<> in WebCore
2625         https://bugs.webkit.org/show_bug.cgi?id=138560
2626
2627         Reviewed by Chris Dumez.
2628
2629         Clean up unused OwnPtr.h and PassOwnPtr.h and use std::unique_ptr.
2630
2631         No new tests, no behavior changes.
2632
2633         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
2634         * dom/ContainerNode.h:
2635         * dom/ElementIteratorAssertions.h:
2636         (WebCore::ElementIteratorAssertions::ElementIteratorAssertions):
2637         * dom/ElementRareData.h:
2638         * page/DragController.h:
2639         * rendering/RenderView.h:
2640
2641 2014-11-10  Beth Dakin  <bdakin@apple.com>
2642
2643         WK1: Support default actions for editable text with misspelled word
2644         https://bugs.webkit.org/show_bug.cgi?id=138590
2645         -and corresponding-
2646         rdar://problem/18877506
2647
2648         Reviewed by Tim Horton.
2649
2650         * WebCore.exp.in:
2651
2652 2014-11-10  Chris Dumez  <cdumez@apple.com>
2653
2654         Remove unnecessary null check in FrameSelection::nodeWillBeRemoved()
2655         https://bugs.webkit.org/show_bug.cgi?id=138578
2656
2657         Reviewed by Andreas Kling.
2658
2659         Remove unnecessary null check in FrameSelection::nodeWillBeRemoved()
2660         and turn the argument into a reference to make it clear it cannot be
2661         null.
2662
2663         No new tests, no behavior change.
2664
2665         * dom/ContainerNode.cpp:
2666         (WebCore::ContainerNode::willRemoveChild):
2667         * dom/Document.cpp:
2668         (WebCore::Document::nodeChildrenWillBeRemoved):
2669         (WebCore::Document::nodeWillBeRemoved):
2670         * dom/Document.h:
2671         * dom/NodeIterator.cpp:
2672         (WebCore::NodeIterator::nodeWillBeRemoved):
2673         (WebCore::NodeIterator::updateForNodeRemoval):
2674         * dom/NodeIterator.h:
2675         * dom/Range.cpp:
2676         (WebCore::Range::insertNode):
2677         (WebCore::boundaryNodeWillBeRemoved):
2678         (WebCore::Range::nodeWillBeRemoved):
2679         * dom/Range.h:
2680         * dom/RangeBoundaryPoint.h:
2681         (WebCore::RangeBoundaryPoint::setToBeforeChild):
2682         * editing/CompositeEditCommand.cpp:
2683         (WebCore::CompositeEditCommand::updatePositionForNodeRemovalPreservingChildren):
2684         * editing/CompositeEditCommand.h:
2685         * editing/DeleteSelectionCommand.cpp:
2686         (WebCore::DeleteSelectionCommand::removeNode):
2687         (WebCore::DeleteSelectionCommand::handleGeneralDelete):
2688         (WebCore::DeleteSelectionCommand::removeRedundantBlocks):
2689         * editing/FrameSelection.cpp:
2690         (WebCore::removingNodeRemovesPosition):
2691         (WebCore::DragCaretController::nodeWillBeRemoved):
2692         (WebCore::FrameSelection::nodeWillBeRemoved):
2693         (WebCore::FrameSelection::respondToNodeModification):
2694         * editing/FrameSelection.h:
2695         * editing/ReplaceSelectionCommand.cpp:
2696         (WebCore::ReplaceSelectionCommand::mergeTextNodesAroundPosition):
2697         * editing/htmlediting.cpp:
2698         (WebCore::updatePositionForNodeRemoval):
2699         * editing/htmlediting.h:
2700         * page/EventHandler.cpp:
2701         (WebCore::EventHandler::nodeWillBeRemoved):
2702         * page/EventHandler.h:
2703
2704 2014-11-10  Benjamin Poulain  <bpoulain@apple.com>
2705
2706         Fix the build when CSS Selectors Level 4 is disabled
2707         https://bugs.webkit.org/show_bug.cgi?id=138533
2708
2709         * css/CSSSelector.cpp:
2710         (WebCore::appendArgumentList):
2711         * cssjit/SelectorCompiler.cpp:
2712         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementLinkMatching):
2713
2714 2014-11-10  Chris Dumez  <cdumez@apple.com>
2715
2716         Support throttling of DOMTimers using nested setTimeout() calls
2717         https://bugs.webkit.org/show_bug.cgi?id=138262
2718
2719         Reviewed by Gavin Barraclough.
2720
2721         Extend DOMTimers throttling support to timers that are using nested
2722         setTimeout() calls instead of a setInterval(). To achieve this, this
2723         patch introduces a NestedTimersMap singleton class where nested timers
2724         are added, and for which we potentially update the next firing time,
2725         after the parent timer is done executing.
2726
2727         I have verified this helps on ebay.com for example, which has timers
2728         interacting with non-visible plugins that are scheduled using nested
2729         setTimeout() calls with a frequency of 150 / 200 ms.
2730
2731         This is a second take on r175441, which caused intermittent crashes.
2732         This time, nested timers are removed from the NestedTimersMap when
2733         DOMTimer::removeById() is called. It would be unsafe to use the nested
2734         timer afterwards because we don't hold a strong reference to it and
2735         the ScriptExecutionContext is unref'ing the DOMTimer when
2736         ScriptExecutionContext::removeTimeout() is called from
2737         DOMTimer::removeById().
2738
2739         * page/DOMTimer.cpp:
2740         (WebCore::NestedTimersMap::NestedTimersMap):
2741         (WebCore::NestedTimersMap::~NestedTimersMap):
2742         (WebCore::NestedTimersMap::add):
2743         (WebCore::NestedTimersMap::remove):
2744         (WebCore::NestedTimersMap::begin):
2745         (WebCore::NestedTimersMap::end):
2746         (WebCore::DOMTimer::install):
2747         (WebCore::DOMTimer::removeById):
2748         (WebCore::DOMTimer::fired):
2749
2750 2014-11-10  Jer Noble  <jer.noble@apple.com>
2751
2752         [EME][Mac] Add a systemCode to distinguish when no expired sessions were found in response to a "keyrelease" message.
2753         https://bugs.webkit.org/show_bug.cgi?id=138199
2754
2755         Reviewed by Eric Carlson.
2756
2757         Clients may want to be able to distinguish between cases where expired session data is not supported, and when
2758         those data are supported, but none are found.
2759
2760         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2761         (WebCore::CDMSessionMediaSourceAVFObjC::generateKeyReleaseMessage):
2762
2763 2014-11-04  Jer Noble  <jer.noble@apple.com>
2764
2765         REGRESSION(r174823): Several tests fail due to canplaythrough firing before tracks are available
2766         https://bugs.webkit.org/show_bug.cgi?id=137882
2767
2768         Reviewed by Eric Carlson.
2769
2770         For HLS streams with only one video, audio, or text track, there will be no media selection group
2771         for that media characteristic. When culling out AVPlayerItemTracks in tracksDidChange(), do not skip
2772         tracks for which there is no matching AVMediaSelectionGroup.
2773
2774         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2775         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2776         (WebCore::MediaPlayerPrivateAVFoundationObjC::hasLoadedMediaSelectionGroups): Refactored.
2777         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForLegibleMedia): Call above.
2778         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForAudibleMedia): Ditto.
2779         (WebCore::MediaPlayerPrivateAVFoundationObjC::safeMediaSelectionGroupForVisualMedia): Ditto.
2780         (WebCore::MediaPlayerPrivateAVFoundationObjC::tracksDidChange):
2781
2782 2014-11-10  Commit Queue  <commit-queue@webkit.org>
2783
2784         Unreviewed, rolling out r175813.
2785         https://bugs.webkit.org/show_bug.cgi?id=138573
2786
2787         Breaks complex text layout spacing (Requested by litherum on
2788         #webkit).
2789
2790         Reverted changeset:
2791
2792         "[OSX] Some words are placed on top of each other in complex
2793         text layout"
2794         https://bugs.webkit.org/show_bug.cgi?id=138348
2795         http://trac.webkit.org/changeset/175813
2796
2797 2014-11-10  Beth Dakin  <bdakin@apple.com>
2798
2799         Rolling out failed build fix 
2800         http://trac.webkit.org/changeset/175819
2801
2802         * WebCore.exp.in:
2803
2804 2014-11-10  Beth Dakin  <bdakin@apple.com>
2805
2806         Speculative build fix.
2807
2808         * WebCore.exp.in:
2809
2810 2014-11-10  Beth Dakin  <bdakin@apple.com>
2811
2812         Speculative build fix.
2813
2814         * WebCore.exp.in:
2815
2816 2014-11-10  Simon Fraser  <simon.fraser@apple.com>
2817
2818         [iOS WK2] Layers with negative z position disapear behind the page tiles
2819         https://bugs.webkit.org/show_bug.cgi?id=138571
2820         rdar://problem/18873480
2821
2822         Reviewed by Dean Jackson.
2823
2824         Some crufty iOS-only code in RenderLayerBacking::parentForSublayers() caused us to fail
2825         to use the m_childContainmentLayer as the ancestor for descendants, so layers with
2826         negative z position would get depth-sorted behind the tiles.
2827         
2828         Fix by removing that code.
2829         
2830         This should have been detected by compositing/tile-cache-must-flatten.html, but
2831         testing infrastructure suck prevented us from doing so.
2832
2833         * rendering/RenderLayerBacking.cpp:
2834         (WebCore::RenderLayerBacking::parentForSublayers):
2835         * rendering/RenderLayerBacking.h: Just some nullptr cleanup.
2836
2837 2014-11-10  Chris Dumez  <cdumez@apple.com>
2838
2839         Move 'resize' CSS property to the new StyleBuilder
2840         https://bugs.webkit.org/show_bug.cgi?id=138550
2841
2842         Reviewed by Andreas Kling.
2843
2844         No new tests, no behavior change.
2845
2846         Move 'resize' CSS property from DeprecatedStyleBuilder to the new
2847         StyleBuilder by adding a new 'Resize' Converter function.
2848
2849         * css/CSSPropertyNames.in:
2850         * css/DeprecatedStyleBuilder.cpp:
2851         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2852         (WebCore::ApplyPropertyResize::applyValue): Deleted.
2853         (WebCore::ApplyPropertyResize::createHandler): Deleted.
2854         * css/StyleBuilderConverter.h:
2855         (WebCore::StyleBuilderConverter::convertResize):
2856
2857 2014-11-10  Beth Dakin  <bdakin@apple.com>
2858
2859         Speculative build fix.
2860
2861         * editing/DictionaryLookup.h:
2862         * editing/DictionaryLookup.mm:
2863
2864 2014-11-10  Chris Dumez  <cdumez@apple.com>
2865
2866         Move 'text-indent' CSS property to the new StyleBuilder
2867         https://bugs.webkit.org/show_bug.cgi?id=138547
2868
2869         Reviewed by Andreas Kling.
2870
2871         Move 'text-indent' CSS property from DeprecatedStyleBuilder to the new
2872         StyleBuilder, by using custom code.
2873
2874         No new tests, no behavior change.
2875
2876         * css/CSSPropertyNames.in:
2877         * css/DeprecatedStyleBuilder.cpp:
2878         (WebCore::DeprecatedStyleBuilder::DeprecatedStyleBuilder):
2879         (WebCore::ApplyPropertyTextIndent::applyInheritValue): Deleted.
2880         (WebCore::ApplyPropertyTextIndent::applyInitialValue): Deleted.
2881         (WebCore::ApplyPropertyTextIndent::applyValue): Deleted.
2882         (WebCore::ApplyPropertyTextIndent::createHandler): Deleted.
2883         * css/StyleBuilderConverter.h:
2884         * css/StyleBuilderCustom.h:
2885         (WebCore::StyleBuilderFunctions::applyInheritTextIndent):
2886         (WebCore::StyleBuilderFunctions::applyInitialTextIndent):
2887         (WebCore::StyleBuilderFunctions::applyValueTextIndent):
2888
2889 2014-11-10  Beth Dakin  <bdakin@apple.com>
2890
2891         WK1: Support default actions for read-only text
2892         https://bugs.webkit.org/show_bug.cgi?id=138552
2893         -and corresponding-
2894         rdar://problem/18877483
2895
2896         Reviewed by Tim Horton.
2897
2898         WK1 now needs to do a lot of dictionary lookup operations that it did not 
2899         previously have to handle. So this patch takes a lot of that functionality, which 
2900         was implemented as static functions in WebPageMac for WK2 and moves it into 
2901         WebCore.
2902
2903         * WebCore.exp.in:
2904         * WebCore.xcodeproj/project.pbxproj:
2905         * editing/DictionaryLookup.h: Added.
2906         * editing/DictionaryLookup.mm: Added.
2907         (WebCore::isPositionInRange):
2908         (WebCore::shouldUseSelection):
2909         (WebCore::rangeExpandedAroundPositionByCharacters):
2910         (WebCore::rangeForDictionaryLookupForSelection):
2911         (WebCore::rangeForDictionaryLookupAtHitTestResult):
2912         * platform/mac/WebCoreSystemInterface.h:
2913         * platform/mac/WebCoreSystemInterface.mm:
2914
2915 2014-11-10  Myles C. Maxfield  <mmaxfield@apple.com>
2916
2917         [OSX] Some words are placed on top of each other in complex text layout
2918         https://bugs.webkit.org/show_bug.cgi?id=138348
2919
2920         Reviewed by Simon Fraser.
2921
2922         Some complex text layouts have lots of diacritics being placed all over the place.
2923         CoreText sometimes compensates for this by adjusting the advances of the glyphs
2924         throughout the string to make glyphs appear in the correct place. This means that
2925         we can't naively cache the width of a space character; instead, we must obey
2926         CoreText when it gives us an advance for a space.
2927
2928         Test: fast/text/large-space-width-complex.html
2929
2930         * platform/graphics/mac/ComplexTextController.cpp:
2931         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2932
2933 2014-11-10  Eric Carlson  <eric.carlson@apple.com>
2934
2935         [iOS] wireless playback placeholder UI doesn't always draw
2936         https://bugs.webkit.org/show_bug.cgi?id=138548
2937
2938         While it is important to only listen for the 'webkitplaybacktargetavailabilitychanged' event
2939         when we are displaying inline controls because listening for it increases power consumption,
2940         we should always listen for the 'webkitcurrentplaybacktargetiswirelesschanged' event because
2941         it controls whether or not we draw the placeholder UI which is always visible during wireless
2942         playback.
2943
2944         Reviewed by Brent Fulgham.
2945
2946         * Modules/mediacontrols/mediaControlsiOS.js:
2947         (ControllerIOS.prototype.addVideoListeners): Always listen for the
2948             'webkitcurrentplaybacktargetiswirelesschanged' event.
2949         (ControllerIOS.prototype.removeVideoListeners): Always stop listening for the 
2950             'webkitcurrentplaybacktargetiswirelesschanged' event.
2951         (ControllerIOS.prototype.handleStartPlaybackButtonTouchEnd): Call updateControls so we update 
2952             the type of controls rendered and start listening for wireless target changes immediately.
2953         (ControllerIOS.prototype.setShouldListenForPlaybackTargetAvailabilityEvent): Don't start and stop 
2954             listening for 'webkitcurrentplaybacktargetiswirelesschanged', we should always listen for it.
2955
2956 2014-11-10  Csaba Osztrogonác  <ossy@webkit.org>
2957
2958         Crash in WebCore::Node::getFlag
2959         https://bugs.webkit.org/show_bug.cgi?id=137961
2960
2961         Reviewed by Antti Koivisto.
2962
2963         * editing/ApplyStyleCommand.cpp:
2964         (WebCore::ApplyStyleCommand::applyBlockStyle): Null pointer check added.
2965
2966 2014-11-10  Mihnea Ovidenie  <mihnea@adobe.com>
2967
2968         ASSERTION FAILED: !object || !object->parent()->isRuby() || is<RenderRubyRun>(*object) || (object->isInline() && (object->isBeforeContent() || object->isAfterContent())) || (object->isAnonymous() && ... ) in WebCore::isAnonymousRubyInlineBlock
2969         https://bugs.webkit.org/show_bug.cgi?id=137958
2970
2971         Reviewed by Chris Dumez.
2972
2973         When a ruby element, with block behavior, dynamically changes its style
2974         from multicol to without multicol, we have to remove its special children,
2975         RenderMultiColumnFlowThread and RenderMultiColumnSet, the normal way using
2976         the method in RenderBlockFlow base class. This patch adds both
2977         RenderMultiColumnFlowThread and RenderMultiColumnSet to the list of RenderRuby
2978         children removed normally and adds a new function - isRubyChildForNormalRemove -
2979         to test the condition and use it in the assertion in RenderRuby*::removeChild
2980         method.
2981
2982         Test: fast/multicol/newmulticol/ruby-from-multicol-to-auto.html
2983
2984         * rendering/RenderRuby.cpp:
2985         (WebCore::isRubyChildForNormalRemove):
2986         (WebCore::RenderRubyAsInline::removeChild):
2987         (WebCore::RenderRubyAsBlock::removeChild):
2988
2989 2014-11-09  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
2990
2991         [EFL] Remove GamepadDeviceEfl::create()
2992         https://bugs.webkit.org/show_bug.cgi?id=138553
2993
2994         Reviewed by Darin Adler.
2995
2996         As a step to use std::unique_ptr<> and std::make_unique<>, this patch removes GamepadDeviceEfl::create().
2997         Instead we use std::make_unique<>.
2998
2999         No new tests, no behavior changes.
3000
3001         * platform/efl/GamepadsEfl.cpp:
3002         (WebCore::GamepadsEfl::registerDevice):
3003         (WebCore::GamepadDeviceEfl::create): Deleted.
3004         (WebCore::GamepadsEfl::unregisterDevice): Deleted.
3005
3006 2014-11-09  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3007
3008         Remove create() factory function in FooAnimationValue classes
3009         https://bugs.webkit.org/show_bug.cgi?id=138206
3010
3011         Reviewed by Darin Adler.
3012
3013         As a step to use std::unique_ptr and std::make_unique, this patch removes create()
3014         factory function in FooAnimationValue classes. As this changes, FooAnimationValue::create()
3015         are changed to std::make_unique<>.
3016
3017         No new tests, no behavior changes.
3018
3019         * platform/graphics/GraphicsLayer.cpp:
3020         (WebCore::KeyframeValueList::insert):
3021         * platform/graphics/GraphicsLayer.h:
3022         (WebCore::FloatAnimationValue::FloatAnimationValue):
3023         (WebCore::TransformAnimationValue::TransformAnimationValue):
3024         (WebCore::FilterAnimationValue::FilterAnimationValue):
3025         (WebCore::FloatAnimationValue::create): Deleted.
3026         (WebCore::TransformAnimationValue::create): Deleted.
3027         (WebCore::FilterAnimationValue::create): Deleted.
3028         * rendering/RenderLayerBacking.cpp:
3029         (WebCore::RenderLayerBacking::startAnimation):
3030         (WebCore::RenderLayerBacking::startTransition):
3031
3032 2014-11-09  Chris Dumez  <cdumez@apple.com>
3033
3034         Add a more correct way to compare floating point numbers and use it
3035         https://bugs.webkit.org/show_bug.cgi?id=138527
3036
3037         Reviewed by Darin Adler.
3038
3039         Use the new WTF::areEssentuallyEqual() utility function from MathExtras.h
3040         to compare floating-point numbers.
3041
3042         No new tests, no behavior change.
3043
3044         * page/DOMTimer.cpp:
3045         (WebCore::DOMTimer::updateTimerIntervalIfNecessary):
3046         * platform/graphics/FloatQuad.cpp:
3047         (WebCore::FloatQuad::isRectilinear):
3048         * platform/graphics/FloatRoundedRect.cpp:
3049         (WebCore::FloatRoundedRect::Radii::isUniformCornerRadius):
3050         * platform/graphics/FloatSize.h:
3051         (WebCore::areEssentiallyEqual):
3052         (WebCore::withinEpsilon): Deleted.
3053
3054 2014-11-08  Simon Fraser  <simon.fraser@apple.com>
3055
3056         Implement round-rect clipping on video elements
3057         https://bugs.webkit.org/show_bug.cgi?id=138537
3058         rdar://problem/9534399
3059
3060         Reviewed by Darin Adler.
3061         
3062         Support border-radius on video and other layers with composited contents,
3063         by pushing a FloatRoundedRect onto the GraphicsLayer as the contentsClippingRect,
3064         and, on Mac, using layer corner-radius or a CAShapeLayer mask.
3065
3066         Test: compositing/video/video-border-radius.html
3067
3068         * WebCore.exp.in:
3069         * platform/graphics/FloatRoundedRect.cpp:
3070         (WebCore::FloatRoundedRect::Radii::isUniformCornerRadius): Returns true if all
3071         corner radii are the same, and have equal widths and heights.
3072         * platform/graphics/FloatRoundedRect.h: Allow construction without an explicit
3073         rect.
3074         * platform/graphics/GraphicsLayer.cpp:
3075         (WebCore::GraphicsLayer::GraphicsLayer): nullptr goodness.
3076         (showGraphicsLayerTree): Print contents layers when debugging.
3077         * platform/graphics/GraphicsLayer.h:
3078         (WebCore::GraphicsLayer::contentsClippingRect): Make this take a FloatRoundedRect.
3079         (WebCore::GraphicsLayer::setContentsClippingRect):
3080         * platform/graphics/ca/GraphicsLayerCA.cpp:
3081         (WebCore::GraphicsLayerCA::setContentsClippingRect):
3082         (WebCore::GraphicsLayerCA::setContentsToSolidColor):
3083         (WebCore::GraphicsLayerCA::setContentsToImage):
3084         (WebCore::GraphicsLayerCA::setContentsToPlatformLayer):
3085         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3086         (WebCore::GraphicsLayerCA::updateClippingStrategy): Determines whether we can simply
3087         use corner-radius on the existing contentsClippingLayer, or whether we have to
3088         create a shape layer to use as a mask.
3089         (WebCore::GraphicsLayerCA::updateContentsRects): We have to add/remove the shape layer
3090         based on the rounded rect radii. Calls updateClippingStrategy() on the clipping layer,
3091         and also updates clones accordingly.
3092         (WebCore::dumpInnerLayer):
3093         (WebCore::GraphicsLayerCA::dumpAdditionalProperties): Dump all the inner layers
3094         (requiring on test rebaseline), including the new shape and backdrop layers.
3095         * platform/graphics/ca/GraphicsLayerCA.h:
3096         * platform/graphics/ca/PlatformCALayer.h: Add a new shape layer type.
3097         * platform/graphics/ca/mac/PlatformCALayerMac.h: Support for corner radius and
3098         a rounded rect shape mask.
3099         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
3100         (PlatformCALayerMac::PlatformCALayerMac):
3101         (PlatformCALayerMac::clone):
3102         (PlatformCALayerMac::setMask):
3103         (PlatformCALayerMac::cornerRadius):
3104         (PlatformCALayerMac::setCornerRadius):
3105         (PlatformCALayerMac::shapeRoundedRect):
3106         (PlatformCALayerMac::setShapeRoundedRect):
3107         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3108         (PlatformCALayerWin::cornerRadius):
3109         (PlatformCALayerWin::setCornerRadius):
3110         (PlatformCALayerWin::shapeRoundedRect):
3111         (PlatformCALayerWin::setShapeRoundedRect):
3112         * platform/graphics/ca/win/PlatformCALayerWin.h:
3113         * rendering/RenderLayerBacking.cpp:
3114         (WebCore::RenderLayerBacking::resetContentsRect): Use getRoundedInnerBorderFor() to get
3115         the rounded rect used to clip contents.
3116         (WebCore::RenderLayerBacking::positionOverflowControlsLayers): Push a FloatRoundedRect for the contents clip,
3117         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundColor): Ditto.
3118         (WebCore::RenderLayerBacking::updateDirectlyCompositedBackgroundImage): Ditto.
3119         (WebCore::RenderLayerBacking::updateImageContents): Get the rounded rect clip.
3120         * rendering/RenderLayerBacking.h: nullptr.
3121
3122 2014-11-09  Darin Adler  <darin@apple.com>
3123
3124         Fix various cases of incorrect cross-thread capture of non-thread-safe RefCounted
3125         https://bugs.webkit.org/show_bug.cgi?id=138539
3126
3127         Reviewed by Alexey Proskuryakov.
3128
3129         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3130         (WebCore::WorkerThreadableWebSocketChannel::Peer::didConnect): Use StringCapture
3131         instead of isolatedCopy, to avoid a problem where the original thread does its deref
3132         after passing the string to the other thread.
3133         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveMessage): Ditto.
3134         (WebCore::WorkerThreadableWebSocketChannel::Peer::didClose): Ditto.
3135         (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize): Ditto.
3136         (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect): Ditto.
3137         (WebCore::WorkerThreadableWebSocketChannel::Bridge::send): Ditto.
3138         (WebCore::WorkerThreadableWebSocketChannel::Bridge::close): Ditto.
3139         (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail): Ditto.
3140
3141         * dom/Document.cpp:
3142         (WebCore::Document::addConsoleMessage): Pass a StringCapture when creating
3143         AddConsoleMessageTask. Same reason as above, but in a different context.
3144         (WebCore::Document::addMessage): Ditto.
3145
3146         * dom/ScriptExecutionContext.h: Changed AddConsoleMessageTask to take and
3147         capture a StringCapture rather than a String, for the same reason as above.
3148
3149         * fileapi/AsyncFileStream.cpp:
3150         (WebCore::AsyncFileStream::write): Use URLCapture instead of trying to use
3151         StringCapture on a URL, since that doesn't preserve the validity flag.
3152
3153         * loader/WorkerThreadableLoader.cpp:
3154         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Use StringCapture.
3155         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail): Ditto.
3156         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFailAccessControlCheck): Ditto.
3157
3158         * platform/URL.h: Added URLCapture.
3159
3160         * platform/network/FormData.cpp:
3161         (WebCore::appendBlobResolved): Remove incorrect pointless code that creates a new URL
3162         from an existing URL with the ParsedURLString constructor.
3163
3164         * workers/DefaultSharedWorkerRepository.cpp: Fixed code that was trying to copy a URL
3165         by copying a string to instead just use URL::copy. The comment claimed that URL::copy
3166         is not thread safe, but that claim is incorrect.
3167         (WebCore::SharedWorkerProxy::postExceptionToWorkerObject): Use StringCapture.
3168         (WebCore::SharedWorkerProxy::postConsoleMessageToWorkerObject): Ditto.
3169         (WebCore::DefaultSharedWorkerRepository::getProxy): Use URL::copy.
3170
3171         * workers/WorkerGlobalScope.cpp:
3172         (WebCore::WorkerGlobalScope::addConsoleMessage): Use StringCapture.
3173         (WebCore::WorkerGlobalScope::addMessage): Ditto.
3174         * workers/WorkerMessagingProxy.cpp:
3175         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject): Ditto.
3176         (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject): Ditto.
3177         (WebCore::WorkerMessagingProxy::sendMessageToInspector): Ditto.
3178         (WebCore::WorkerMessagingProxy::postMessageToPageInspector): Ditto.
3179
3180         * workers/WorkerRunLoop.cpp:
3181         (WebCore::WorkerRunLoop::postTaskAndTerminate): Make a Task with make_unique
3182         rather than with Task::create. Removed an extra isolatedCopy, unneeded because
3183         the Task constructor already does an isolatedCopy.
3184         (WebCore::WorkerRunLoop::postTaskForMode): Ditto.
3185         (WebCore::WorkerRunLoop::Task::create): Deleted.
3186
3187         * workers/WorkerRunLoop.h: Removed unneeded create function and explicit
3188         public empty destructor.
3189
3190 2014-11-09  Chris Dumez  <cdumez@apple.com>
3191
3192         Use is<>() / downcast<>() for HTMLCollection subclasses
3193         https://bugs.webkit.org/show_bug.cgi?id=138541
3194
3195         Reviewed by Sam Weinig.
3196
3197         Use is<>() / downcast<>() for HTMLCollection subclasses for
3198         safety and consistency with the rest of the code base.
3199
3200         No new tests, no behavior change.
3201
3202         * bindings/gobject/WebKitDOMPrivate.cpp:
3203         (WebKit::wrap):
3204         * html/HTMLAllCollection.h:
3205         * html/HTMLCollection.cpp:
3206         (WebCore::isMatchingHTMLElement):
3207         (WebCore::isMatchingElement):
3208         * html/HTMLCollection.h:
3209         * html/HTMLFormControlsCollection.h:
3210         * html/HTMLNameCollection.h:
3211         * html/HTMLOptionsCollection.h:
3212         * html/HTMLSelectElement.cpp:
3213         (WebCore::HTMLSelectElement::options):
3214         * html/HTMLTableRowsCollection.h:
3215
3216 2014-11-08  Chris Dumez  <cdumez@apple.com>
3217
3218         Call faster HTMLElement::hasTagName() in HTMLCollection
3219         https://bugs.webkit.org/show_bug.cgi?id=138529
3220
3221         Reviewed by Darin Adler.
3222
3223         Call faster HTMLElement::hasTagName() in HTMLCollection instead of
3224         slower Node::hasTagName() by restructuring the code a bit to
3225         distinguish collection that deal only with HTMLElements from others.
3226
3227         No new tests, no behavior change.
3228
3229         * html/HTMLCollection.cpp:
3230         (WebCore::isMatchingHTMLElement):
3231         (WebCore::isMatchingElement):
3232
3233 2014-11-08  Chris Dumez  <cdumez@apple.com>
3234
3235         Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType
3236         https://bugs.webkit.org/show_bug.cgi?id=138538
3237
3238         Reviewed by Darin Adler.
3239
3240         Move isEmptyValue() logic from HTMLInputElement to TextFieldInputType
3241         as this only makes sense for text field input types.
3242
3243         No new tests, no behavior change.
3244
3245         * html/HTMLInputElement.cpp:
3246         (WebCore::HTMLInputElement::isEmptyValue):
3247         * html/InputType.cpp:
3248         (WebCore::InputType::isEmptyValue):
3249         * html/InputType.h:
3250         * html/TextFieldInputType.cpp:
3251         (WebCore::TextFieldInputType::isEmptyValue):
3252         * html/TextFieldInputType.h:
3253
3254 2014-11-08  Darin Adler  <darin@apple.com>
3255
3256         Replace FileThread class with a single function
3257         https://bugs.webkit.org/show_bug.cgi?id=138282
3258
3259         Reviewed by Alexey Proskuryakov.
3260
3261         * CMakeLists.txt: Removed FileThread.cpp.
3262
3263         * WebCore.vcxproj/WebCore.vcxproj: Removed FileThread.cpp/.h.
3264         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3265         * WebCore.xcodeproj/project.pbxproj: Ditto.
3266
3267         * bindings/generic/ActiveDOMCallback.cpp: Removed unneeded includes.
3268         * dom/ActiveDOMObject.cpp: Ditto.
3269
3270         * fileapi/AsyncFileStream.cpp:
3271         (WebCore::callOnFileThread): Added. Implements the file thread.
3272         (WebCore::AsyncFileStream::AsyncFileStream): Take a reference to the client.
3273         Make m_internals. Use the destroyed flag instead of trickier techniques to
3274         handle stopping. Once the stream is destroyed, there will be no further callbacks.
3275         (WebCore::AsyncFileStream::~AsyncFileStream): Added assertions and merged in the
3276         stop behavior here. This class no longer requires an explicit stop function.
3277         (WebCore::AsyncFileStream::perform): Added. Helper used for all the operations
3278         below. Takes a function that performs an operation and then returns a client
3279         callback function. Respects the m_stopped boolean on the file thread (so we
3280         don't do extra operations) and on the client thread (so we are guaranteed not
3281         to get any client callbacks even if the file thread was partway through an
3282         operation).
3283         (WebCore::AsyncFileStream::getSize): Changed to use the perform function.
3284         (WebCore::AsyncFileStream::openForRead): Ditto. Also fixed reference count
3285         thread safety issue by capturing a StringCapture rather than a String.
3286         (WebCore::AsyncFileStream::openForWrite): Ditto.
3287         (WebCore::AsyncFileStream::close): Changed to use callOnFileThread.
3288         (WebCore::AsyncFileStream::read): Changed to use the perform function.
3289         (WebCore::AsyncFileStream::write): Ditto. Also fixed reference count
3290         thread safety issue by capturing a StringCapture rather than a URL.
3291         (WebCore::AsyncFileStream::truncate): Ditto.
3292
3293         * fileapi/AsyncFileStream.h: Removed use of RefCounted since we only need
3294         single ownership. Removed the stop function, since we can now stop when
3295         the stream is destroyed since we have single ownership. Made a new Internals
3296         object to handle destruction while operations are still going on the file thread.
3297
3298         * fileapi/FileThread.cpp: Removed.
3299         * fileapi/FileThread.h: Removed.
3300
3301         * loader/ResourceLoader.cpp: Removed unneeded include.
3302
3303         * platform/FileStream.cpp:
3304         (WebCore::FileStream::~FileStream): Merged the stop function in here.
3305
3306         * platform/FileStream.h: Removed use of RefCounted since we only need
3307         single ownership. Removed the empty start function. Removed the stop function,
3308         since we can now stop when the stream is destroyed since we have single ownership.
3309
3310         * platform/FileStreamClient.h: Removed unneeded didStart and didStop.
3311
3312         * platform/network/BlobResourceHandle.cpp:
3313         (WebCore::BlobResourceHandle::BlobResourceHandle): Use make_unique to make the
3314         stream objects instead of custom create functions.
3315         (WebCore::BlobResourceHandle::~BlobResourceHandle): Removed now-unneeded code
3316         to call stop functions. Destroying the objects now takes care of the this, and
3317         that's done by the unique_ptrs.
3318         (WebCore::BlobResourceHandle::cancel): Removed the rest of the code to stop the
3319         m_asyncStream, keeping only the code that sets it to null. That now stops the
3320         stream by destroying it.
3321
3322         * platform/network/BlobResourceHandle.h: Use std::unique_ptr rather than
3323         RefPtr for the file stream objects.
3324
3325         * storage/StorageThread.h: Tweaked formatting of std::function<void()> to
3326         match the format used elsewhere in WebKit.
3327
3328 2014-11-08  Simon Fraser  <simon.fraser@apple.com>
3329
3330         Don't try to schedule a GraphicsLayer flush when propagating changes to replicas inside a flush
3331         https://bugs.webkit.org/show_bug.cgi?id=138532
3332
3333         Reviewed by Dan Bernstein.
3334
3335         When changing masks on replica layers with certain layer configurations, 
3336         it was possible to hit an assertion that a flush was being scheduled when already
3337         flushing, via propagateLayerChangeToReplicas(). Fix by passing the scheduleFlush
3338         flag along.
3339         
3340         Not testable with current GraphicsLayer configurations.
3341
3342         * platform/graphics/ca/GraphicsLayerCA.cpp:
3343         * platform/graphics/ca/GraphicsLayerCA.h:
3344
3345 2014-11-08  Beth Dakin  <bdakin@apple.com>
3346
3347         Implement action menu support for videos
3348         https://bugs.webkit.org/show_bug.cgi?id=138534
3349         -and corresponding-
3350         rdar://problem/18742164
3351
3352         Reviewed by Tim Horton.
3353
3354         Export needed symbols and added not-yet-implemented 
3355         HitTestResult::isMediaThatCanBeDownloaded() so that action menus will work as 
3356         expected once it is implemented.
3357         * WebCore.exp.in:
3358         * rendering/HitTestResult.cpp:
3359         (WebCore::HitTestResult::isMediaThatCanBeDownloaded):
3360         * rendering/HitTestResult.h:
3361
3362 2014-11-08  Chris Dumez  <cdumez@apple.com>
3363
3364         Speed up HTMLInputElement::isEmptyValue()
3365         https://bugs.webkit.org/show_bug.cgi?id=138515
3366
3367         Reviewed by Geoffrey Garen.
3368
3369         HTMLInputElement::isEmptyValue() was calling
3370         HTMLTextFormControlElement::innerTextValue() which causes a full
3371         subtree traversal to construct a string representation of that subtree
3372         using a StringBuilder. In the case of HTMLInputElement::isEmptyValue(),
3373         we don't have to do all this: We don't need to construct a String
3374         and we can return false as soon as we find a non-empty descendant.
3375
3376         No new tests, no behavior change.
3377
3378         * html/HTMLInputElement.cpp:
3379         (WebCore::HTMLInputElement::isEmptyValue):
3380         * html/HTMLInputElement.h:
3381
3382 2014-11-07  Eric Carlson  <eric.carlson@apple.com>
3383
3384         [iOS] video is sometimes allowed to play from the background
3385         https://bugs.webkit.org/show_bug.cgi?id=138522
3386
3387         Reviewed by Jer Noble.
3388
3389         * html/HTMLMediaElement.cpp:
3390         (WebCore::HTMLMediaElement::displayType): New.
3391         * html/HTMLMediaElement.h:
3392
3393         * platform/audio/MediaSession.cpp:
3394         (WebCore::MediaSession::isHidden): New, client passthrough.
3395         (WebCore::MediaSession::displayType): Ditto.
3396         * platform/audio/MediaSession.h:
3397         (WebCore::MediaSessionClient::displayType):
3398
3399         * platform/audio/MediaSessionManager.cpp:
3400         (WebCore::MediaSessionManager::sessionCanLoadMedia): New, default implementation returns
3401             true if client is visible or playing.
3402         * platform/audio/MediaSessionManager.h:
3403
3404         * platform/audio/ios/MediaSessionManagerIOS.h:
3405         * platform/audio/ios/MediaSessionManagerIOS.mm:
3406         (WebCore::MediaSessionManageriOS::sessionCanLoadMedia): iOS override, also allows buffering
3407             when displaying optimized fullscreen.
3408
3409 2014-11-07  Benjamin Poulain  <bpoulain@apple.com>
3410
3411         Fix the build after r175772
3412
3413         * inspector/InspectorCSSAgent.cpp:
3414         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
3415
3416 2014-11-07  Benjamin Poulain  <benjamin@webkit.org>
3417
3418         Make the Selector's specificity part of Selector matching
3419         https://bugs.webkit.org/show_bug.cgi?id=138486
3420
3421         Reviewed by Andreas Kling.
3422
3423         In CSS Selectors Level 4, the specificity of selectors is computed dynamically
3424         based on which element is being matched.
3425
3426         For example, a selector:
3427             :matches(#foo, .bar, baz)
3428         has a specificity of
3429             (1, 0, 0) on <baz id=foo class=bar>
3430             (0, 1, 0) on <baz class=bar>
3431             (0, 0, 1) on <baz>