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