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