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