NodeList has issues with Symbol and empty string
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-04-29  Joseph Pecoraro  <pecoraro@apple.com>
2
3         NodeList has issues with Symbol and empty string
4         https://bugs.webkit.org/show_bug.cgi?id=144310
5
6         Reviewed by Darin Adler.
7
8         Tests: fast/dom/StyleSheet/stylesheet-symbol-names.html
9                fast/dom/dataset-name-getter-symbols.html
10                fast/dom/named-items-with-empty-name.html
11                fast/dom/named-items-with-symbol-name.html
12                storage/domstorage/localstorage/named-items.html
13
14         Test different bindings objects with custom named setter
15         and getter handlers. Ensure that they handle Symbol properties
16         gracefully. Often times avoiding the string path.
17
18         * dom/StaticNodeList.cpp:
19         (WebCore::StaticNodeList::namedItem):
20         (WebCore::StaticElementList::namedItem):
21         Better handle the empty string. It should not match an item.
22
23         * bindings/js/JSDOMBinding.h:
24         (WebCore::propertyNameToString):
25         In cases where we would use this, we should have handled
26         Symbol properties.
27
28         (WebCore::propertyNameToAtomicString):
29         For Symbols, use the unique string. This should result
30         in no matches for a Symbol property.
31
32         * bindings/js/JSDOMStringMapCustom.cpp:
33         (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate):
34         (WebCore::JSDOMStringMap::deleteProperty):
35         (WebCore::JSDOMStringMap::putDelegate):
36         * bindings/js/JSStorageCustom.cpp:
37         (WebCore::JSStorage::canGetItemsForName):
38         (WebCore::JSStorage::nameGetter):
39         (WebCore::JSStorage::deleteProperty):
40         (WebCore::JSStorage::putDelegate):
41         * bindings/js/JSStyleSheetListCustom.cpp:
42         (WebCore::JSStyleSheetList::canGetItemsForName):
43         Treat Symbol properties as private properties. They just
44         go directly through to the Object, and avoid the string
45         getter/setter property path.
46
47 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
48
49         [Mac] Register with device picker whenever a page has <video>
50         https://bugs.webkit.org/show_bug.cgi?id=144408
51
52         Reviewed by Jer Noble.
53
54         * Modules/mediasession/WebMediaSessionManager.cpp:
55         (WebCore::WebMediaSessionManager::setPlaybackTarget): Drive-by fix: don't tell a client to play
56         to the target when it has not routes.
57
58         * html/HTMLMediaElement.cpp:
59         (WebCore::HTMLMediaElement::mediaState): Set RequiresPlaybackTargetMonitoring whenever the 
60         element is <video> with a video track that does not block wireless playback.
61
62 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
63
64         [GTK] Add support for automatic hyphenation
65         https://bugs.webkit.org/show_bug.cgi?id=44478
66
67         Reviewed by Carlos Garcia Campos.
68
69         No new tests. This patch unskips and updates results for existing hyphenation tests.
70
71         * PlatformGTK.cmake: Add the libhypen implementation to the source list.
72         * platform/gtk/GtkUtilities.cpp:
73         (WebCore::topLevelPath): Add this helper function taken from the test harness.
74         (WebCore::getWebKitBuildDirectory): Ditto.
75         * platform/gtk/GtkUtilities.h: Add function declarations for the helper functions.
76         * platform/text/Hyphenation.cpp: Surround this implementation with !USE(LIBHYPHEN),
77           so that it can still be shared.
78         * platform/text/gtk/HyphenationLibHyphen.cpp: Added.
79         (WebCore::extractLocaleFromDictionaryFilePath): Take in a dictionary filename and
80         determine the locale that it covers.
81         (WebCore::scanDirectoryForDicionaries): Look for all installed dictionaries as well
82         as ones in the JHBuild root for testing.
83         (WebCore::scanTestDictionariesDirectoryIfNecessary): Try to scan the dictionaries installed
84         in the JHBuild root.
85         (WebCore::availableLocales): Getter for global hash of installed dictionaries.
86         (WebCore::canHyphenate): Added libhyphen implementation.
87         (WebCore::HyphenationDictionary): Helper class that properly manages the memory of
88         an open libhyphen dictionary. This is useful so that they can be stored in an MRU
89         cache. This is a similar approach to the CoreFoundation implementation.
90         (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForNullKey): MRU cache
91         helper.
92         (WebCore::AtomicStringKeyedMRUCache<RefPtr<HyphenationDictionary>>::createValueForKey): Ditto.
93         (WebCore::hyphenDictionaryCache): A cache for opened hyphenation dictionaries.
94         (WebCore::countLeadingSpaces): Count leading spaces, since WebCore often passes words with them.
95         (WebCore::lastHyphenLocation): Added libhyphen implementation.
96
97 2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
98
99         Unreviewed build fix.
100
101         * platform/graphics/mac/FontCacheMac.mm:
102         (WebCore::fontWithFamily):
103
104 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
105
106         Some media tests assert after r183096
107         https://bugs.webkit.org/show_bug.cgi?id=144098
108
109         Reviewed by Brent Fulgham.
110
111         Never assert when a MediaPlaybackTargetClient client calls one of the methods on Document
112         after it has been unregistered. A media element unregisters itself when it is removed from the 
113         document, but scripts can still run and modify state that results in a call to
114         playbackTargetPickerClientStateDidChange. Remove the asserts instead of adding checks to
115         the various call sites.
116
117         * dom/Document.cpp:
118         (WebCore::Document::showPlaybackTargetPicker): Don't assert if the client has already
119         been unregistered.
120         (WebCore::Document::playbackTargetPickerClientStateDidChange): Ditto.
121
122 2015-04-29  Zalan Bujtas  <zalan@apple.com>
123
124         Simple line layout: Web process spins endlessly below layoutSimpleLines.
125         https://bugs.webkit.org/show_bug.cgi?id=144403
126         rdar://problem/20742783
127
128         Reviewed by Antti Koivisto.
129
130         When a text fragment overlaps multiple renderes and it does not fit the current line,
131         we revert the text fragment iterator position so that the overlapping content
132         gets processed again for the next line.
133         However, TextFragmentIterator::revertToFragment() was reverting too much and
134         we started processing old content all over again -> infinite loop.
135
136         This patch ensures that text fragment iterator is reverted to the right position.
137
138         Test: fast/text/simple-line-layout-wrapping-multiple-renderers-hang.html
139
140         * rendering/SimpleLineLayout.cpp:
141         (WebCore::SimpleLineLayout::createLineRuns):
142         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
143         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToEndOfFragment):
144         (WebCore::SimpleLineLayout::TextFragmentIterator::revertToFragment): Deleted.
145         * rendering/SimpleLineLayoutTextFragmentIterator.h:
146
147 2015-04-29  Filip Pizlo  <fpizlo@apple.com>
148
149         JSTypeInfo should have an inline type flag to indicate of getCallData() has been overridden
150         https://bugs.webkit.org/show_bug.cgi?id=144397
151
152         Reviewed by Andreas Kling.
153
154         If you override getCallData() and you want to be called a "function", then you need to use the
155         new TypeOfShouldCallGetCallData flag.
156
157         * bindings/scripts/CodeGeneratorJS.pm:
158         (GenerateHeader):
159         * bridge/objc/objc_runtime.h:
160         * bridge/runtime_method.h:
161         * bridge/runtime_object.h:
162
163 2015-04-29  Commit Queue  <commit-queue@webkit.org>
164
165         Unreviewed, rolling out r183553 and r183561.
166         https://bugs.webkit.org/show_bug.cgi?id=144406
167
168         broke the iOS build (Requested by thorton__ on #webkit).
169
170         Reverted changesets:
171
172         "Switch QuickLook soft-linking to use
173         QuickLookSoftLink.{h,mm}"
174         https://bugs.webkit.org/show_bug.cgi?id=144362
175         http://trac.webkit.org/changeset/183553
176
177         "Unreviewed iOS build fix after r183553: fix declaration of
178         QLPreviewScheme"
179         http://trac.webkit.org/changeset/183561
180
181 2015-04-29  Antti Koivisto  <antti@apple.com>
182
183         ResourceLoadPriority should be enum class
184         https://bugs.webkit.org/show_bug.cgi?id=144326
185
186         Reviewed by Darin Adler.
187
188         * html/HTMLLinkElement.cpp:
189         (WebCore::HTMLLinkElement::process):
190         * loader/LinkLoader.cpp:
191         (WebCore::LinkLoader::loadLink):
192         * loader/ResourceLoadScheduler.cpp:
193         (WebCore::ResourceLoadScheduler::scheduleLoad):
194         (WebCore::ResourceLoadScheduler::servePendingRequests):
195         (WebCore::ResourceLoadScheduler::HostInformation::~HostInformation):
196         (WebCore::ResourceLoadScheduler::HostInformation::priorityToIndex):
197         (WebCore::ResourceLoadScheduler::HostInformation::schedule):
198         (WebCore::ResourceLoadScheduler::HostInformation::remove):
199         (WebCore::ResourceLoadScheduler::HostInformation::hasRequests):
200         (WebCore::ResourceLoadScheduler::HostInformation::limitRequests):
201         * loader/ResourceLoadScheduler.h:
202         (WebCore::ResourceLoadScheduler::HostInformation::requestsPending):
203
204             Modernize ResourceLoadScheduler code a bit while switching to enum class.
205
206         * loader/cache/CachedResource.cpp:
207         (WebCore::defaultPriorityForResourceType):
208         * loader/cache/CachedResourceLoader.cpp:
209         (WebCore::CachedResourceLoader::requestResource):
210         * loader/icon/IconLoader.cpp:
211         (WebCore::IconLoader::startLoading):
212         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
213         (WebCore::WebCoreAVFResourceLoader::startLoading):
214         * platform/network/ResourceLoadPriority.h:
215         (WebCore::operator++):
216         (WebCore::operator--):
217         * platform/network/ResourceRequestBase.cpp:
218         (WebCore::ResourceRequestBase::adopt):
219         (WebCore::ResourceRequestBase::copyData):
220         (WebCore::ResourceRequestBase::cachePolicy):
221         (WebCore::ResourceRequestBase::priority):
222         (WebCore::ResourceRequestBase::setPriority):
223         * platform/network/ResourceRequestBase.h:
224
225             Remove bitfields. ResourceRequests are not present in large enough numbers to require this kind of optimization.
226             Use modern initialization syntax.
227
228         (WebCore::ResourceRequestBase::ResourceRequestBase):
229         (WebCore::CrossThreadResourceRequestDataBase::CrossThreadResourceRequestDataBase): Deleted.
230         * platform/network/cf/ResourceRequestCFNet.cpp:
231         (WebCore::initializeMaximumHTTPConnectionCountPerHost):
232         (WebCore::initializeHTTPConnectionSettingsOnStartup):
233         * platform/network/cf/ResourceRequestCFNet.h:
234         (WebCore::toResourceLoadPriority):
235         (WebCore::toPlatformRequestPriority):
236         * platform/network/soup/ResourceRequest.h:
237         (WebCore::toSoupMessagePriority):
238         * testing/Internals.cpp:
239         (WebCore::stringToResourceLoadPriority):
240
241 2015-04-29  Myles C. Maxfield  <mmaxfield@apple.com>
242
243         [OS X] Use CTFontCreateForCSS instead of doing font search ourselves
244         https://bugs.webkit.org/show_bug.cgi?id=132159
245
246         Reviewed by Darin Adler.
247
248         On platforms that support it, delegate font selection logic to the platform. Currently, this is
249         only supported on Mac, using CTFontCreateForCSS().
250
251         This also changes the mechanism that enforces our font whitelist in our tests. We used to
252         swizzle the implementations of NSFontManager methods. This patch migrates to using a whitelist of
253         font family names instead.
254
255         Note that this patch is a work in progress, because it makes the following tests fail:
256         fast/css/font-weight-1.html
257         fast/forms/validation-message-appearance.html
258         fast/forms/select/optgroup-rendering.html
259
260         No new tests, because there is no behavior change.
261
262         * platform/graphics/FontCache.h: Add a function to set the whitlist.
263         * platform/graphics/mac/FontCacheMac.mm:
264         (WebCore::fontWhitelist):
265         (WebCore::FontCache::setFontWhitelist):
266         (WebCore::toAppKitFontWeight):
267         (WebCore::toCoreTextFontWeight):
268         (WebCore::fontWithFamily): If ENABLE(PLATFORM_FONT_LOOKUP), use CTFontCreateForCSS().
269         (WebCore::FontCache::createFontPlatformData):
270         * platform/spi/cocoa/CoreTextSPI.h: Add signature for CTFontCreateForCSS().
271
272 2015-04-29  Jer Noble  <jer.noble@apple.com>
273
274         Unreviewed iOS build fix after r183553: fix declaration of QLPreviewScheme
275
276         * platform/ios/QuickLookSoftLink.mm:
277
278 2015-04-29  Eric Carlson  <eric.carlson@apple.com>
279
280         [Mac] Use new device picker menu API
281         https://bugs.webkit.org/show_bug.cgi?id=144392
282
283         Reviewed by Jer Noble.
284
285         * Modules/mediasession/WebMediaSessionManager.cpp:
286         (WebCore::WebMediaSessionManager::showPlaybackTargetPicker): Pass the route state to the picker.
287         * platform/graphics/MediaPlaybackTargetPicker.h:
288
289         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.h:
290         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
291         (WebCore::MediaPlaybackTargetPickerMac::MediaPlaybackTargetPickerMac):  m_deviceChangeTimer -> m_pendingActionTimer.
292         (WebCore::MediaPlaybackTargetPickerMac::~MediaPlaybackTargetPickerMac): Ditto.
293         (WebCore::MediaPlaybackTargetPickerMac::pendingActionTimerFired): Renamed from 
294         outputeDeviceAvailabilityChangedTimerFired.
295         (WebCore::MediaPlaybackTargetPickerMac::availableDevicesDidChange): Use addPendingAction.
296         (WebCore::MediaPlaybackTargetPickerMac::showPlaybackTargetPicker): Call new picker API if it is
297         available. New API returns true if a target is chosen, so call currentDeviceDidChange in that case.
298         (WebCore::MediaPlaybackTargetPickerMac::addPendingAction): New.
299         (WebCore::MediaPlaybackTargetPickerMac::currentDeviceDidChange): Make asynchronous because it 
300         can now be called from showPlaybackTargetPicker.
301         (WebCore::MediaPlaybackTargetPickerMac::outputeDeviceAvailabilityChangedTimerFired): Renamed
302         pendingActionTimerFired.
303
304         * platform/spi/cocoa/AVKitSPI.h: Add new SPI.
305
306 2015-04-29  Antti Koivisto  <antti@apple.com>
307
308         Main resource loaded via 304 response becomes empty if reloaded by user
309         https://bugs.webkit.org/show_bug.cgi?id=144386
310
311         Reviewed by Darin Adler.
312
313         Memory cache layer may make a main resource request conditional (add If-modified-since/If-none-match header).
314         DocumentLoader stores the final ResourceRequest associated with document. If user triggered reload for
315         conditionally loaded document DocumentLoader would include the same conditionals to the new request as well.
316         Since these were not added by the memory cache it would pass any 304 response back to the DocumentLoader.
317         However DocumentLoader has no code to handle 304 so we would end up with an empty document.
318
319         Test: http/tests/cache/main-resource-304-reload.html
320
321         * loader/DocumentLoader.cpp:
322         (WebCore::DocumentLoader::startLoadingMainResource):
323
324             Ensure DocumentLoader doesn't issue conditional requests.
325
326 2015-04-28  Jer Noble  <jer.noble@apple.com>
327
328         Replace HTMLMediaElement's seek timer with a task queue.
329         https://bugs.webkit.org/show_bug.cgi?id=144353
330
331         Reviewed by Eric Carlson.
332
333         No change in functionality, so no new tests added.
334
335         Replace a zero-length timer with an explicit task queue, backed by Document's postTask(). To
336         make enqueued tasks cancellable, add a new GenericTaskQueue class modelled on
337         GenericEventQueue which can cancel enqueued but not-yet-executed tasks.
338
339         * CMakeLists.txt:
340         * WebCore.vcxproj/WebCore.vcxproj:
341         * WebCore.vcxproj/WebCore.vcxproj.filters:
342         * WebCore.xcodeproj/project.pbxproj:
343         * dom/GenericTaskQueue.cpp: Added.
344         (WebCore::GenericTaskQueue::GenericTaskQueue): Initialize ivars.
345         (WebCore::GenericTaskQueue::enqueueTask): Wrap the task and pass it to the ScriptExecutionContext.
346         (WebCore::GenericTaskQueue::close): Assert that the task queue will not accept any additional tasks.
347         (WebCore::GenericTaskQueue::cancelAllTasks): Revoke outstanding weak pointers, thereby cancelling tasks.
348         * dom/GenericTaskQueue.h: Added.
349         (WebCore::GenericTaskQueue::hasPendingTasks):
350         * html/HTMLMediaElement.cpp:
351         (WebCore::HTMLMediaElement::HTMLMediaElement): Initialize the task queue.
352         (WebCore::HTMLMediaElement::~HTMLMediaElement): Close the task queue.
353         (WebCore::HTMLMediaElement::seekWithTolerance): Post a task, rather than start a timer.
354         (WebCore::HTMLMediaElement::seekTask): Renamed from seekTimerFired().
355         (WebCore::HTMLMediaElement::seekTimerFired): Deleted.
356         * html/HTMLMediaElement.h:
357
358 2015-04-28  David Kilzer  <ddkilzer@apple.com>
359
360         Switch QuickLook soft-linking to use QuickLookSoftLink.{h,mm}
361         <http://webkit.org/b/144362>
362
363         Reviewed by Andy Estes.
364
365         This patch switches soft-linking of QuickLook.framework to
366         QuickLookSoftLink.{h,mm} so that we stop exporting unintended
367         symbols.
368
369         No new tests since no change in behavior.
370
371         * WebCore.xcodeproj/project.pbxproj:
372         - Add QuickLookSoftLinking.{h,mm} to the project.
373
374         * platform/ios/QuickLookSoftLink.h: Added.
375         * platform/ios/QuickLookSoftLink.mm: Added.
376         * platform/mac/SoftLinking.h:
377         (SOFT_LINK_CLASS_FOR_HEADER): Add macro.
378         (SOFT_LINK_CLASS_FOR_SOURCE): Add macro.
379
380         * platform/network/ios/QuickLook.h:
381         - Remove unused declarations.
382
383         * platform/network/ios/QuickLook.mm:
384         (WebCore::QLPreviewConverterClass): Deleted.
385         (WebCore::QLTypeCopyBestMimeTypeForFileNameAndMimeType): Deleted.
386         (WebCore::QLTypeCopyBestMimeTypeForURLAndMimeType): Deleted.
387         (WebCore::QLTypeCopyUTIForURLAndMimeType): Deleted.
388         - Remove SOFT_LINK macros and unused methods after switching to
389           new QuickLookSoftLink.{h,mm}.
390         (WebCore::QLPreviewGetSupportedMIMETypesSet):
391         - Switch to use NeverDestroyed<>.
392         (WebCore::registerQLPreviewConverterIfNeeded):
393         (createQLPreviewProtocol):
394         (WebCore::QLPreviewProtocol):
395         (WebCore::QuickLookHandle::QuickLookHandle):
396         (WebCore::QuickLookHandle::create):
397         (WebCore::QuickLookHandle::shouldCreateForMIMEType):
398         - Simplify code when using QuickLookSoftLink.h.
399
400         * platform/network/ios/WebCoreURLResponseIOS.mm:
401         - Include QuickLookSoftLink.h header.
402
403 2015-04-29  Darin Adler  <darin@apple.com>
404
405         [ES6] Implement Unicode code point escapes
406         https://bugs.webkit.org/show_bug.cgi?id=144377
407
408         Reviewed by Antti Koivisto.
409
410         Test: js/unicode-escape-sequences.html
411
412         * css/CSSParser.cpp:
413         (WebCore::CSSParser::parseEscape): Use ICU's UCHAR_MAX_VALUE instead of writing
414         out 0x10FFFF; clearer this way. Also use our replacementCharacter instead of
415         writing out 0xFFFD.
416
417         * html/parser/HTMLEntityParser.cpp:
418         (WebCore::isAlphaNumeric): Deleted.
419         (WebCore::HTMLEntityParser::legalEntityFor): Use ICU's UCHAR_MAX_VALUE and
420         U_IS_SURROGATE instead of writing the code out. Didn't use U_IS_UNICODE_CHAR
421         because that also includes U_IS_UNICODE_NONCHAR and thus would change behavior,
422         but maye it's something we want to do in the future.
423         (WebCore::HTMLEntityParser::consumeNamedEntity): Use isASCIIAlphanumeric instead
424         of a the function in this file that does the same thing less efficiently.
425
426         * html/parser/InputStreamPreprocessor.h:
427         (WebCore::InputStreamPreprocessor::processNextInputCharacter): Use
428         replacementCharacter from CharacterNames.h instead of writing out 0xFFFd.
429
430         * xml/parser/CharacterReferenceParserInlines.h:
431         (WebCore::consumeCharacterReference): Use ICU's UCHAR_MAX_VALUE instead of
432         defining our own local highestValidCharacter constant.
433
434 2015-04-29  Martin Robinson  <mrobinson@igalia.com>
435
436         [CMake] [GTK] Organize and clean up unused CMake variables
437         https://bugs.webkit.org/show_bug.cgi?id=144364
438
439         Reviewed by Gyuyoung Kim.
440
441         * PlatformGTK.cmake: Add variables specific to this project.
442
443 2015-04-29  Carlos Garcia Campos  <cgarcia@igalia.com>
444
445         REGRESSION(r182573): [GTK] The default context menu contains an empty item since r182573
446         https://bugs.webkit.org/show_bug.cgi?id=144388
447
448         Reviewed by Brady Eidson.
449
450         There used to be a method in ContextMenuItem to check if share
451         menu item was supported or not, but since r182573, there's a
452         method to get the share menu item. If the returned menu item is
453         null, it's not added to the menu, but we are not returning a null
454         ContextMenu item even though we don't support share menu item.
455
456         * platform/gtk/ContextMenuItemGtk.cpp:
457         (WebCore::ContextMenuItem::shareMenuItem): Return a null ContextMenuItem.
458
459 2015-04-29  Zan Dobersek  <zdobersek@igalia.com>
460
461         Switch to std::function<>, std::bind() in MediaPlayerPrivateAVFoundationObjC
462         https://bugs.webkit.org/show_bug.cgi?id=144232
463
464         Reviewed by Darin Adler.
465
466         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
467         (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): 
468         Replace uses of WTF::Function<> and WTF::bind() with the STL alternatives.
469
470 2015-04-29  Hyungwook Lee  <hyungwook.lee@navercorp.com>
471
472         Fix crash in WebCore::LogicalSelectionOffsetCaches::ContainingBlockInfo::setBlock().
473         https://bugs.webkit.org/show_bug.cgi?id=140261
474
475         Reviewed by Darin Adler.
476
477         We need to check whether RenderObject is valid in RenderView::fooSubtreeSelection functions
478         because invalid object has caused a crash. This patch adds isValidObjectForNewSelection(), and use it.
479
480         * rendering/RenderView.cpp:
481         (WebCore::isValidObjectForNewSelection):
482         (WebCore::RenderView::clearSubtreeSelection):
483         (WebCore::RenderView::applySubtreeSelection):
484
485 2015-04-29  Youenn Fablet  <youenn.fablet@crf.canon.fr>
486
487         Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
488         https://bugs.webkit.org/show_bug.cgi?id=143711
489
490         Reviewed by Darin Adler.
491
492         This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
493         If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
494         This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
495
496         Test: http/tests/appcache/simple-video-sync.html
497
498         * html/HTMLMediaElement.cpp:
499         (WebCore::HTMLMediaElement::parseAttribute):
500         * loader/DocumentThreadableLoader.cpp:
501         (WebCore::DocumentThreadableLoader::loadRequest):
502         * loader/FrameLoader.cpp:
503         (WebCore::FrameLoader::loadResourceSynchronously):
504         * loader/FrameLoader.h:
505         * loader/appcache/ApplicationCacheHost.cpp:
506         (WebCore::ApplicationCacheHost::maybeLoadResource):
507         (WebCore::ApplicationCacheHost::createFileURL):
508         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
509         (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
510         * loader/appcache/ApplicationCacheHost.h:
511         * xml/XSLTProcessorLibxslt.cpp:
512         (WebCore::docLoaderFunc):
513         * xml/parser/XMLDocumentParserLibxml2.cpp:
514         (WebCore::openFunc):
515
516 2015-04-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
517
518         Purge PassRefPtr from createSVGPathSegFoo factory functions
519         https://bugs.webkit.org/show_bug.cgi?id=144374
520
521         Reviewed by Darin Adler.
522
523         Use Ref instead of PassRefPtr in createSVGPathSegFoo functions because
524         those factory functions can't return null. Additionally let's remove unnecessary
525         #include<PassRefPtr.h> there.
526
527         No new tests, no behavior changes.
528
529         * svg/SVGColor.cpp:
530         (WebCore::SVGColor::cloneForCSSOM):
531         * svg/SVGColor.h:
532         * svg/SVGGlyphMap.h:
533         (WebCore::GlyphMapNode::create):
534         * svg/SVGPaint.cpp:
535         (WebCore::SVGPaint::cloneForCSSOM):
536         * svg/SVGPaint.h:
537         * svg/SVGPathElement.cpp:
538         (WebCore::SVGPathElement::createSVGPathSegClosePath):
539         (WebCore::SVGPathElement::createSVGPathSegMovetoAbs):
540         (WebCore::SVGPathElement::createSVGPathSegMovetoRel):
541         (WebCore::SVGPathElement::createSVGPathSegLinetoAbs):
542         (WebCore::SVGPathElement::createSVGPathSegLinetoRel):
543         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicAbs):
544         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicRel):
545         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticAbs):
546         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticRel):
547         (WebCore::SVGPathElement::createSVGPathSegArcAbs):
548         (WebCore::SVGPathElement::createSVGPathSegArcRel):
549         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalAbs):
550         (WebCore::SVGPathElement::createSVGPathSegLinetoHorizontalRel):
551         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalAbs):
552         (WebCore::SVGPathElement::createSVGPathSegLinetoVerticalRel):
553         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothAbs):
554         (WebCore::SVGPathElement::createSVGPathSegCurvetoCubicSmoothRel):
555         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothAbs):
556         (WebCore::SVGPathElement::createSVGPathSegCurvetoQuadraticSmoothRel):
557         * svg/SVGPathElement.h:
558         * svg/SVGPathSegArcAbs.h:
559         (WebCore::SVGPathSegArcAbs::create):
560         * svg/SVGPathSegArcRel.h:
561         (WebCore::SVGPathSegArcRel::create):
562         * svg/SVGPathSegClosePath.h:
563         (WebCore::SVGPathSegClosePath::create):
564         * svg/SVGPathSegCurvetoCubicAbs.h:
565         (WebCore::SVGPathSegCurvetoCubicAbs::create):
566         * svg/SVGPathSegCurvetoCubicRel.h:
567         (WebCore::SVGPathSegCurvetoCubicRel::create):
568         * svg/SVGPathSegCurvetoCubicSmoothAbs.h:
569         (WebCore::SVGPathSegCurvetoCubicSmoothAbs::create):
570         * svg/SVGPathSegCurvetoCubicSmoothRel.h:
571         (WebCore::SVGPathSegCurvetoCubicSmoothRel::create):
572         * svg/SVGPathSegCurvetoQuadraticAbs.h:
573         (WebCore::SVGPathSegCurvetoQuadraticAbs::create):
574         * svg/SVGPathSegCurvetoQuadraticRel.h:
575         (WebCore::SVGPathSegCurvetoQuadraticRel::create):
576         * svg/SVGPathSegCurvetoQuadraticSmoothAbs.h:
577         (WebCore::SVGPathSegCurvetoQuadraticSmoothAbs::create):
578         * svg/SVGPathSegCurvetoQuadraticSmoothRel.h:
579         (WebCore::SVGPathSegCurvetoQuadraticSmoothRel::create):
580         * svg/SVGPathSegLinetoAbs.h:
581         (WebCore::SVGPathSegLinetoAbs::create):
582         * svg/SVGPathSegLinetoHorizontalAbs.h:
583         (WebCore::SVGPathSegLinetoHorizontalAbs::create):
584         * svg/SVGPathSegLinetoHorizontalRel.h:
585         (WebCore::SVGPathSegLinetoHorizontalRel::create):
586         * svg/SVGPathSegLinetoRel.h:
587         (WebCore::SVGPathSegLinetoRel::create):
588         * svg/SVGPathSegLinetoVerticalAbs.h:
589         (WebCore::SVGPathSegLinetoVerticalAbs::create):
590         * svg/SVGPathSegLinetoVerticalRel.h:
591         (WebCore::SVGPathSegLinetoVerticalRel::create):
592         * svg/SVGPathSegMovetoAbs.h:
593         (WebCore::SVGPathSegMovetoAbs::create):
594         * svg/SVGPathSegMovetoRel.h:
595         (WebCore::SVGPathSegMovetoRel::create):
596         * svg/SVGViewSpec.h:
597         (WebCore::SVGViewSpec::create):
598         * svg/animation/SMILTimeContainer.h:
599         (WebCore::SMILTimeContainer::create):
600         * svg/animation/SVGSMILElement.cpp:
601         (WebCore::ConditionEventListener::create):
602         * svg/graphics/SVGImage.h:
603         * svg/graphics/SVGImageForContainer.h:
604         * svg/graphics/filters/SVGFilter.cpp:
605         (WebCore::SVGFilter::create):
606         * svg/graphics/filters/SVGFilter.h:
607
608 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
609
610         Make a non-static version of FrameView::yPositionForRootContentLayer()
611         https://bugs.webkit.org/show_bug.cgi?id=144375
612
613         Reviewed by Andy Estes.
614
615         There were two calls to the static FrameView::yPositionForRootContentLayer()
616         which passed in all the arguments for the same FrameView. Make a member
617         function for convenience.
618
619         * page/FrameView.cpp:
620         (WebCore::FrameView::yPositionForRootContentLayer):
621         * page/FrameView.h:
622         * rendering/RenderLayerCompositor.cpp:
623         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
624
625 2015-04-28  Ryuan Choi  <ryuan.choi@navercorp.com>
626
627         [CoordinatedGraphics] Merge TILED_BACKING_STORE guard with COORDINATED_GRAPHICS
628         https://bugs.webkit.org/show_bug.cgi?id=143001
629
630         Reviewed by Gyuyoung Kim.
631
632         TiledBackingStore has only been used by Coordinated Graphics since Qt and WebKit1/Efl were dropped.
633         So, this patch replaces USE(TILED_BACKING_STORE) with USE(COORDINATED_GRAPHICS) to merge the features.
634
635         In addition, this moves TiledBackingStore and related files from platform to platform/texmap/coordinated
636         where other coordinated graphics files are located.
637
638         * CMakeLists.txt: Move TiledBackingStore.cpp because this is not common file.
639         * PlatformEfl.cmake:
640         * PlatformGTK.cmake:
641         * WebCore.vcxproj/WebCore.vcxproj: Follow new location of TiledBackingStore* files.
642         * WebCore.vcxproj/WebCore.vcxproj.filters:
643         * loader/EmptyClients.h:
644         * page/Chrome.cpp:
645         * page/Chrome.h:
646         * page/ChromeClient.h:
647         * page/Frame.cpp:
648         (WebCore::Frame::createView):
649         * page/FrameView.cpp:
650         (WebCore::FrameView::requestScrollPositionUpdate):
651         * page/FrameView.h:
652         * page/Page.cpp:
653         (WebCore::Page::setPageScaleFactor):
654         * platform/HostWindow.h:
655         * platform/ScrollView.cpp:
656         (WebCore::ScrollView::unscaledVisibleContentSizeIncludingObscuredArea):
657         (WebCore::ScrollView::unscaledUnobscuredVisibleContentSize):
658         (WebCore::ScrollView::visibleContentRectInternal):
659         (WebCore::ScrollView::scrollTo):
660         * platform/ScrollView.h:
661         * platform/graphics/cairo/TileCairo.h: Removed because it is dead code since r169328
662         * platform/graphics/texmap/coordinated/Tile.h: Renamed from Source/WebCore/platform/graphics/Tile.h.
663         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.cpp.
664         * platform/graphics/texmap/coordinated/TiledBackingStore.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStore.h.
665         * platform/graphics/texmap/coordinated/TiledBackingStoreBackend.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreBackend.h.
666         * platform/graphics/texmap/coordinated/TiledBackingStoreClient.h: Renamed from Source/WebCore/platform/graphics/TiledBackingStoreClient.h.
667
668 2015-04-28  Brent Fulgham  <bfulgham@apple.com>
669
670         REGRESSION(180076): [Mac, iOS] Correct possible null dereference in printing code
671         https://bugs.webkit.org/show_bug.cgi?id=144366
672         <rdar://problem/20533513>
673
674         Reviewed by Dean Jackson.
675
676         * rendering/RenderBlockFlow.cpp:
677         (WebCore::needsAppleMailPaginationQuirk): Check if the document settings is a nullptr
678         before attempting to dereference it. 
679
680 2015-04-28  Andreas Kling  <akling@apple.com>
681
682         Simplify DOM wrapper destruction, don't deref() in finalizers.
683         <https://webkit.org/b/144183>
684
685         Reviewed by Darin Adler.
686
687         DOM JS bindings had two mechanisms to call deref() on the WebCore object,
688         once through a weak finalizer, and once through the JSCell's regular destructor.
689
690         That was once believed to be an optimization, but these days the finalizer will
691         run just moments before the destructor anyway, all in the same call stack.
692         And more importantly, the finalizer is not guaranteed to run, for instance in the
693         case where a Weak is assigned to after going dead, but before the WeakBlock
694         has been swept by the incremental sweeper.
695
696         Simplify this by just removing the deref() from the generated finalizers.
697         This makes it easier to reason about DOM wrapper destruction, and eliminates
698         the awkward time window  where a DOM wrapper could have a null impl().
699
700         We could spend more time on figuring out a way to have finalizers manage the
701         destruction of these wrappers, but that would require fundamental changes to
702         our implementation of JSC::Weak pointers. It would allow us to make JSDOMWrapper
703         destructor-less, and shrink each wrapper object by 1 pointer (the ClassInfo*.)
704         However the risk:reward ratio does not seem justified at this point in time.
705
706         * bindings/scripts/CodeGeneratorJS.pm:
707         (GenerateHeader):
708         (GenerateImplementation):
709         * bindings/js/JSCSSValueCustom.cpp:
710         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
711         (WebCore::JSTestActiveDOMObject::~JSTestActiveDOMObject):
712         (WebCore::JSTestActiveDOMObjectOwner::finalize):
713         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
714         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
715         (WebCore::JSTestCustomNamedGetter::~JSTestCustomNamedGetter):
716         (WebCore::JSTestCustomNamedGetterOwner::finalize):
717         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
718         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
719         (WebCore::JSTestEventConstructor::~JSTestEventConstructor):
720         (WebCore::JSTestEventConstructorOwner::finalize):
721         * bindings/scripts/test/JS/JSTestEventConstructor.h:
722         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
723         (WebCore::JSTestEventTarget::~JSTestEventTarget):
724         (WebCore::JSTestEventTargetOwner::finalize):
725         * bindings/scripts/test/JS/JSTestEventTarget.h:
726         * bindings/scripts/test/JS/JSTestException.cpp:
727         (WebCore::JSTestException::~JSTestException):
728         (WebCore::JSTestExceptionOwner::finalize):
729         * bindings/scripts/test/JS/JSTestException.h:
730         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
731         (WebCore::JSTestGenerateIsReachable::~JSTestGenerateIsReachable):
732         (WebCore::JSTestGenerateIsReachableOwner::finalize):
733         * bindings/scripts/test/JS/JSTestGenerateIsReachable.h:
734         * bindings/scripts/test/JS/JSTestInterface.cpp:
735         (WebCore::JSTestInterface::~JSTestInterface):
736         (WebCore::JSTestInterfaceOwner::finalize):
737         * bindings/scripts/test/JS/JSTestInterface.h:
738         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
739         (WebCore::JSTestMediaQueryListListener::~JSTestMediaQueryListListener):
740         (WebCore::JSTestMediaQueryListListenerOwner::finalize):
741         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
742         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
743         (WebCore::JSTestNamedConstructor::~JSTestNamedConstructor):
744         (WebCore::JSTestNamedConstructorOwner::finalize):
745         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
746         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
747         (WebCore::JSTestNondeterministic::~JSTestNondeterministic):
748         (WebCore::JSTestNondeterministicOwner::finalize):
749         * bindings/scripts/test/JS/JSTestNondeterministic.h:
750         * bindings/scripts/test/JS/JSTestObj.cpp:
751         (WebCore::JSTestObj::~JSTestObj):
752         (WebCore::JSTestObjOwner::finalize):
753         * bindings/scripts/test/JS/JSTestObj.h:
754         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
755         (WebCore::JSTestOverloadedConstructors::~JSTestOverloadedConstructors):
756         (WebCore::JSTestOverloadedConstructorsOwner::finalize):
757         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
758         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
759         (WebCore::JSTestSerializedScriptValueInterface::~JSTestSerializedScriptValueInterface):
760         (WebCore::JSTestSerializedScriptValueInterfaceOwner::finalize):
761         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
762         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
763         (WebCore::JSTestTypedefs::~JSTestTypedefs):
764         (WebCore::JSTestTypedefsOwner::finalize):
765         * bindings/scripts/test/JS/JSTestTypedefs.h:
766         * bindings/scripts/test/JS/JSattribute.cpp:
767         (WebCore::JSattribute::~JSattribute):
768         (WebCore::JSattributeOwner::finalize):
769         * bindings/scripts/test/JS/JSattribute.h:
770         * bindings/scripts/test/JS/JSreadonly.cpp:
771         (WebCore::JSreadonly::~JSreadonly):
772         (WebCore::JSreadonlyOwner::finalize):
773         * bindings/scripts/test/JS/JSreadonly.h:
774
775 2015-04-28  Alex Christensen  <achristensen@webkit.org>
776
777         Build WinCairo without cygwin.
778         https://bugs.webkit.org/show_bug.cgi?id=144365
779
780         Reviewed by Myles Maxfield.
781
782         * WebCore.vcxproj/WebCoreGeneratedWinCairo.make:
783         Pass the CC executable to build-generated-files.pl like r182164.
784         * WebCore.vcxproj/build-generated-files.pl:
785         Default to 8 CPUs unless otherwise specified.
786
787 2015-04-28  Sam Weinig  <sam@webkit.org>
788
789         [Content Extensions] Process NFAs individually to avoid having all NFAs live at the same time
790         https://bugs.webkit.org/show_bug.cgi?id=144363
791
792         Reviewed by Alex Christensen.
793
794         This brings dirty memory use when compiling our test content extension down from ~300MB to ~100MB.
795
796         * contentextensions/CombinedURLFilters.cpp:
797         (WebCore::ContentExtensions::CombinedURLFilters::processNFAs):
798         (WebCore::ContentExtensions::CombinedURLFilters::createNFAs): Deleted.
799         * contentextensions/CombinedURLFilters.h:
800         Replace function that creates a Vector of all the NFAs with one that allows incremental processing
801         as they are created.
802
803         * contentextensions/ContentExtensionCompiler.cpp:
804         (WebCore::ContentExtensions::addUniversalActionsToDFA):
805         Extract code to add universal actions into a helper, since we need to call it in two places now.
806
807         (WebCore::ContentExtensions::compileRuleList):
808         Adopt CombinedURLFilters::processNFAs. Now that we don't have a Vector of NFAs, we need to keep track
809         of whether or not any NFAs were processed and if we are currently processing the first NFA so we can
810         ensure that we have some bytecode generated event for empty rule sets, and that universal actions are
811         placed on the first DFA.
812
813 2015-04-28  Timothy Horton  <timothy_horton@apple.com>
814
815         [TextIndicator] Yellow highlight takes too long to fade out on scroll
816         https://bugs.webkit.org/show_bug.cgi?id=144358
817         <rdar://problem/19451011>
818
819         Reviewed by Beth Dakin.
820
821         * page/TextIndicator.h:
822         Add Lifetime and DismissalAnimation enums.
823
824         (WebCore::TextIndicator::contentImageWithHighlight):
825         (WebCore::TextIndicator::contentImage):
826         Fix style.
827
828         * page/mac/TextIndicatorWindow.h:
829         * page/mac/TextIndicatorWindow.mm:
830         (WebCore::TextIndicatorWindow::TextIndicatorWindow):
831         (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
832         (WebCore::TextIndicatorWindow::clearTextIndicator):
833         (WebCore::TextIndicatorWindow::setTextIndicator):
834         (WebCore::TextIndicatorWindow::closeWindow):
835         (WebCore::TextIndicatorWindow::startFadeOut):
836         Rename m_startFadeOutTimer to m_temporaryTextIndicatorTimer (and related).
837         This is just about temporary-lifetime TextIndicators, like the ones
838         you get when the find-in-page UI is hidden but you hit Cmd-G.
839
840         Add clearTextIndicator, which takes a DismissalAnimation, providing
841         clients an opportunity to avoid the normal fade-out animation, if it
842         was going to happen.
843
844 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
845
846         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
847         https://bugs.webkit.org/show_bug.cgi?id=144304
848
849         Reviewed by Geoffrey Garen.
850
851         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
852
853         * Configurations/FeatureDefines.xcconfig:
854
855 2015-04-28  Commit Queue  <commit-queue@webkit.org>
856
857         Unreviewed, rolling out r183514.
858         https://bugs.webkit.org/show_bug.cgi?id=144359
859
860         It broke cloop test bots (Requested by mcatanzaro on #webkit).
861
862         Reverted changeset:
863
864         "Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT"
865         https://bugs.webkit.org/show_bug.cgi?id=144304
866         http://trac.webkit.org/changeset/183514
867
868 2015-04-28  Michael Catanzaro  <mcatanzaro@igalia.com>
869
870         Fully replace ENABLE_LLINT_C_LOOP with ENABLE_JIT
871         https://bugs.webkit.org/show_bug.cgi?id=144304
872
873         Reviewed by Geoffrey Garen.
874
875         Define ENABLE_JIT, enabled by default, instead of ENABLE_LLINT_C_LOOP, disabled by default.
876
877         * Configurations/FeatureDefines.xcconfig:
878
879 2015-04-28  Zalan Bujtas  <zalan@apple.com>
880
881         Checkboxes on bugs.webkit.org are painted with stripes at some zoom levels.
882         https://bugs.webkit.org/show_bug.cgi?id=144351
883
884         Reviewed by Simon Fraser.
885
886         This patch ensures that CG context is properly restored after painting dashed/dotted lines.
887
888         Test: fast/forms/checkbox-painting-with-hr.html
889
890         * platform/graphics/cg/GraphicsContextCG.cpp:
891         (WebCore::GraphicsContext::drawLine):
892
893 2015-04-28  Simon Fraser  <simon.fraser@apple.com>
894
895         Provide contentsToView() and viewToContents() functions on ScrollView, and use them
896         https://bugs.webkit.org/show_bug.cgi?id=144357
897
898         Reviewed by Tim Horton.
899
900         Too much code was consulting topContentInset() and headerHeight() directly. Replace
901         with calls to new contentsToView() and viewToContents() functions, which wrap the
902         exisiting documentScrollOffsetRelativeToViewOrigin().
903         
904         Use the new functions in FrameView and ScrollView coordinate mapping functions.
905         
906         No behavior change.
907
908         * page/FrameView.cpp:
909         (WebCore::FrameView::convertFromRendererToContainingView):
910         (WebCore::FrameView::convertFromContainingViewToRenderer):
911         * platform/ScrollView.cpp:
912         (WebCore::ScrollView::viewToContents):
913         (WebCore::ScrollView::contentsToView):
914         (WebCore::ScrollView::rootViewToContents):
915         (WebCore::ScrollView::contentsToRootView):
916         (WebCore::ScrollView::rootViewToTotalContents):
917         (WebCore::ScrollView::windowToContents):
918         (WebCore::ScrollView::contentsToWindow):
919         * platform/ScrollView.h:
920
921 2015-04-28  Eric Carlson  <eric.carlson@apple.com>
922
923         [Mac] Simplify code to support media engines which do not support target playback
924         https://bugs.webkit.org/show_bug.cgi?id=144332
925
926         Reviewed by Jer Noble.
927
928         * Modules/mediasession/WebMediaSessionManager.cpp:
929         (WebCore::WebMediaSessionManager::externalOutputDeviceAvailableDidChange): Always make client
930         callback, let them decide if it is significant or not.
931
932         * html/HTMLMediaElement.cpp:
933         (WebCore::HTMLMediaElement::HTMLMediaElement): m_loadTimer -> m_pendingActionTimer.
934         (WebCore::HTMLMediaElement::scheduleDelayedAction): Handle CheckPlaybackTargetCompatablity.
935         (WebCore::HTMLMediaElement::scheduleNextSourceChild): m_loadTimer -> m_pendingActionTimer.
936         (WebCore::HTMLMediaElement::loadTimerFired): Renamed pendingActionTimerFired.
937         (WebCore::HTMLMediaElement::prepareForLoad): m_loadTimer -> m_pendingActionTimer.
938         (WebCore::HTMLMediaElement::setDefaultPlaybackRate): Add logging.
939         (WebCore::HTMLMediaElement::clearMediaPlayer): m_loadTimer -> m_pendingActionTimer.
940         (WebCore::HTMLMediaElement::webkitCurrentPlaybackTargetIsSupported): Removed.
941         (WebCore::HTMLMediaElement::dispatchEvent): If a 'webkitcurrentplaybacktargetiswirelesschanged'
942         event is dispatched when the current target is wireless but the media engine does not support
943         wireless playback, tell the media engine not to play to the target.
944         * html/HTMLMediaElement.h:
945         * html/HTMLMediaElement.idl:
946
947         * html/HTMLMediaSession.cpp:
948         (WebCore::HTMLMediaSession::showPlaybackTargetPicker): Drive-by fix to disallow audio-only files.
949         (WebCore::HTMLMediaSession::currentPlaybackTargetIsSupported): Deleted.
950         * html/HTMLMediaSession.h:
951
952         * platform/graphics/MediaPlayer.cpp:
953         (WebCore::MediaPlayer::isCurrentPlaybackTargetSupported): Deleted.
954         * platform/graphics/MediaPlayer.h:
955         * platform/graphics/MediaPlayerPrivate.h:
956
957         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
958         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldPlayToPlaybackTarget): Use a RetainPtr
959         to explicitly manage the lifetime of the temporary object.
960         (WebCore::MediaPlayerPrivateAVFoundationObjC::isPlayingToWirelessPlaybackTarget): Ditto.
961         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
962
963         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
964         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setShouldPlayToPlaybackTarget):
965         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetWireless):
966         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::isCurrentPlaybackTargetSupported): Deleted.
967
968         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
969         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
970         (WebCore::MediaPlayerPrivateQTKit::setShouldPlayToPlaybackTarget):
971         (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetWireless):
972         (WebCore::MediaPlayerPrivateQTKit::isCurrentPlaybackTargetSupported): Deleted.
973
974 2015-04-28  Alex Christensen  <achristensen@webkit.org>
975
976         [Content Extensions] Use less memory for CombinedURLFilters.
977         https://bugs.webkit.org/show_bug.cgi?id=144290
978
979         Reviewed by Andreas Kling.
980
981         * contentextensions/CombinedURLFilters.cpp:
982         (WebCore::ContentExtensions::recursiveMemoryUsed):
983         (WebCore::ContentExtensions::CombinedURLFilters::addPattern):
984         (WebCore::ContentExtensions::generateNFAForSubtree):
985         (WebCore::ContentExtensions::CombinedURLFilters::createNFAs):
986         * contentextensions/NFA.cpp:
987         (WebCore::ContentExtensions::NFA::memoryUsed):
988         (WebCore::ContentExtensions::NFA::setActions):
989         * contentextensions/NFA.h:
990         * contentextensions/NFANode.h:
991         * contentextensions/Term.h:
992         (WebCore::ContentExtensions::Term::Term::generateGraph):
993         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
994         Use Vectors instead of HashTables in PrefixTreeVertex because the sets stay small and need to be more memory efficient.
995
996 2015-04-28  Brady Eidson  <beidson@apple.com>
997
998         Consolidate most "frame load" arguments into FrameLoadRequest.
999         https://bugs.webkit.org/show_bug.cgi?id=144276
1000
1001         Reviewed by Alexey Proskuryakov.
1002
1003         No new tests (No change in behavior).
1004         
1005         This patch starts the long overdue process of wrangling the insane load methods in FrameLoader.
1006         
1007         Humble beginnings of this long process:
1008         - Put most of the various "frame load" arguments that are passed around within FrameLoader on FrameLoadRequest.
1009         - Get rid of the "easy" constructors of FrameLoadRequest, forcing users to actually think about what they're doing.
1010         - Change a private FrameLoader load method (urlSelected) to take a FrameLoadRequest instead of argument gobbledygook.
1011         - Change a public FrameLoader load methods (changeLocation) to take a FrameLoadRequest instead of gobbledygook.
1012         
1013         These cover the straightforward changes where it was easy to figure out what the values of the FrameLoadRequest
1014         arguments were from these various call sites.
1015         
1016         Further refactoring can be done in much smaller patches, handling fewer cases at a time. Little by little we will be
1017         able to reduce the number of "load" methods on FrameLoader and make sure that they mainly only take a FrameLoadRequest
1018         as an argument.
1019
1020         * inspector/InspectorFrontendClientLocal.cpp:
1021         (WebCore::InspectorFrontendClientLocal::openInNewTab):
1022         
1023         * inspector/InspectorPageAgent.cpp:
1024         (WebCore::InspectorPageAgent::navigate):
1025         
1026         * loader/FrameLoadRequest.cpp:
1027         (WebCore::FrameLoadRequest::FrameLoadRequest):
1028         * loader/FrameLoadRequest.h:
1029         (WebCore::FrameLoadRequest::FrameLoadRequest):
1030         (WebCore::FrameLoadRequest::lockHistory):
1031         (WebCore::FrameLoadRequest::lockBackForwardList):
1032         (WebCore::FrameLoadRequest::shouldSendReferrer):
1033         (WebCore::FrameLoadRequest::allowNavigationToInvalidURL):
1034         (WebCore::FrameLoadRequest::newFrameOpenerPolicy):
1035         (WebCore::FrameLoadRequest::shouldReplaceDocumentIfJavaScriptURL):
1036         
1037         * loader/FrameLoader.cpp:
1038         (WebCore::FrameLoader::changeLocation):
1039         (WebCore::FrameLoader::urlSelected):
1040         (WebCore::FrameLoader::loadFrameRequest):
1041         * loader/FrameLoader.h:
1042         
1043         * loader/NavigationScheduler.cpp:
1044         (WebCore::NavigationScheduler::scheduleLocationChange):
1045         
1046         * page/ContextMenuController.cpp:
1047         (WebCore::openNewWindow):
1048         (WebCore::ContextMenuController::contextMenuItemSelected):
1049         
1050         * page/DOMWindow.cpp:
1051         (WebCore::DOMWindow::createWindow):
1052
1053 2015-04-27  Myles C. Maxfield  <mmaxfield@apple.com>
1054
1055         [Mac] [iOS] Implement font-synthesis CSS property
1056         https://bugs.webkit.org/show_bug.cgi?id=144305
1057
1058         Reviewed by Andreas Kling.
1059
1060         This patch is fairly straightforward, though there are some particular pieces to the patch listed below.
1061
1062         The implementation of this font-synthesis CSS property lives inside FontCacheIOS and FontCacheMac. We already
1063         determine if we should synthesize bold and italics, this CSS property simply guards that decision.
1064
1065         Because FontCache interacts with FontDescriptions and not RenderStyles, this patch moves the source of truth
1066         regarding font-synthesis into FontDescription (from RenderStyle).
1067
1068         Test: fast/css3-text/font-synthesis.html
1069
1070         * css/CSSPropertyNames.in: Mark font-synthesis as a FontProperty, which means that the relevant state is kept
1071         inside FontDescription. This also means that the property must be marked as a "high priority" property, which
1072         is enforced by it existing at the top of CSSPropertyNames.in. The move to FontDescription must be done so that
1073         FontCacheIOS and FontCacheMac have access to the saved state.
1074         * css/CSSComputedStyleDeclaration.cpp:
1075         (WebCore::fontSynthesisFromStyle): Update to look for state in FontDescription instead of RenderStyle.
1076         * css/CSSSegmentedFontFace.cpp:
1077         (WebCore::CSSSegmentedFontFace::fontRanges): Guard the synthetic bold and synthic italic decision on the new
1078         FontSynthesis state inside FontDescription.
1079         * css/StyleBuilderConverter.h:
1080         (WebCore::StyleBuilderConverter::convertFontSynthesis): Moved from
1081         StyleBuilderCustom::applyValueFontSynthesis(). This is because of the updated options inside of
1082         CSSPropertyNames.in
1083         * css/StyleBuilderCustom.h:
1084         (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Deleted.
1085         * platform/graphics/FontDescription.h:
1086         (WebCore::FontDescription::FontDescription): Moved from RenderStyle.
1087         (WebCore::FontDescription::fontSynthesis): Ditto.
1088         (WebCore::FontDescription::setFontSynthesis): Ditto.
1089         (WebCore::FontDescription::initialFontSynthesis): Ditto.
1090         (WebCore::FontDescription::operator==): Update to include new state.
1091         * platform/graphics/FontCache.h:
1092         (WebCore::FontDescriptionFontDataCacheKey::makeFlagKey): Make FontDescription hashes sensitive to the new
1093         state inside FontDescription.
1094         * platform/graphics/ios/FontCacheIOS.mm:
1095         (WebCore::FontCache::createFontPlatformData): Guard the synthetic bold and synthetic italic decision on the
1096         new FontSynthesis state inside FontDescription.
1097         * platform/graphics/mac/FontCacheMac.mm:
1098         (WebCore::FontCache::createFontPlatformData): Ditto.
1099         * platform/text/TextFlags.h: Move FontSynthesis type from RenderStyleConstants.
1100         * rendering/style/RenderStyle.h:
1101         (WebCore::RenderStyle::fontSynthesis): Moved to FontDescription.
1102         (WebCore::RenderStyle::setFontSynthesis): Ditto.
1103         (WebCore::RenderStyle::initialFontSynthesis): Ditto.
1104         * rendering/style/RenderStyleConstants.h: Moved FontSynthesis type to TextFlags.
1105         * rendering/style/StyleRareInheritedData.h: Remove state regarding font synthesis (moved to FontDescription)
1106
1107 2015-04-28  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1108
1109         SharedBuffer::copy is not computing the buffer size correctly when having m_dataArray
1110         https://bugs.webkit.org/show_bug.cgi?id=144321
1111
1112         Reviewed by Darin Adler.
1113
1114         Patch correctness covered by existing tests.
1115
1116         * platform/SharedBuffer.cpp:
1117         (WebCore::SharedBuffer::copy): Direct appending to m_dataArray and not using append method as this method updates the SharedBuffer size.
1118
1119 2015-04-28  Per Arne Vollan  <peavo@outlook.com>
1120
1121         [Curl] Memory leak.
1122         https://bugs.webkit.org/show_bug.cgi?id=144327
1123
1124         Reviewed by Brent Fulgham.
1125
1126         When a data url is loaded, the ResourceHandle is not released.
1127
1128         * platform/network/curl/ResourceHandleManager.cpp:
1129         (WebCore::ResourceHandleManager::startJob):
1130
1131 2015-04-28  Andy Estes  <aestes@apple.com>
1132
1133         Fix the Mavericks Debug build after r183467.
1134
1135         * platform/network/ResourceRequestBase.h:
1136         (WebCore::ResourceRequestBase::requester): Removed WEBCORE_EXPORT.
1137         (WebCore::ResourceRequestBase::setRequester): Ditto.
1138
1139 2015-04-28  Csaba Osztrogonác  <ossy@webkit.org>
1140
1141         Remove make-file-arrays.py
1142         https://bugs.webkit.org/show_bug.cgi?id=144324
1143
1144         Reviewed by Gyuyoung Kim.
1145
1146         * make-file-arrays.py: Removed.
1147
1148 2015-04-28  Antti Koivisto  <antti@apple.com>
1149
1150         Build fix.
1151
1152         * platform/network/ios/ResourceRequestIOS.mm:
1153         (WebCore::ResourceRequest::ResourceRequest):
1154
1155 2015-04-28  Antti Koivisto  <antti@apple.com>
1156
1157         Network Cache: Disk cache getting filled by YouTube video data
1158         https://bugs.webkit.org/show_bug.cgi?id=144259
1159
1160         Reviewed by Darin Adler.
1161
1162         MSE media is loaded via XHR and tends to eventually fill the cache.
1163
1164         YouTube serves the media chunks cacheable, however they are rarely (if ever) reused.
1165         We can reduce disk writes and keep more useful resources around by not caching them
1166
1167         Test: http/tests/cache/disk-cache/disk-cache-media.html
1168
1169         * loader/DocumentLoader.cpp:
1170         (WebCore::DocumentLoader::startLoadingMainResource):
1171
1172             Set the requester.
1173
1174         * loader/cache/CachedRawResource.cpp:
1175         (WebCore::CachedRawResource::CachedRawResource):
1176         * page/DiagnosticLoggingKeys.cpp:
1177         (WebCore::DiagnosticLoggingKeys::streamingMedia):
1178         * page/DiagnosticLoggingKeys.h:
1179         * platform/network/ResourceRequestBase.cpp:
1180         (WebCore::ResourceRequestBase::adopt):
1181         (WebCore::ResourceRequestBase::copyData):
1182         (WebCore::equalIgnoringHeaderFields):
1183         * platform/network/ResourceRequestBase.h:
1184         (WebCore::ResourceRequestBase::requester):
1185         (WebCore::ResourceRequestBase::setRequester):
1186
1187             Add requester type to the request object. Currently this is main resource, xhr or unspecified.
1188
1189         (WebCore::ResourceRequestBase::encodeWithoutPlatformData):
1190         (WebCore::ResourceRequestBase::decodeWithoutPlatformData):
1191         * platform/network/cf/ResourceRequest.h:
1192         (WebCore::ResourceRequest::deprecatedSetMainResourceRequest): Deleted.
1193         (WebCore::ResourceRequest::deprecatedIsMainResourceRequest): Deleted.
1194
1195             Replace this iOS only field with shared mechanism.
1196
1197         * platform/network/ios/QuickLook.mm:
1198         (WebCore::QuickLookHandle::create):
1199         * xml/XMLHttpRequest.cpp:
1200         (WebCore::XMLHttpRequest::createRequest):
1201
1202             Set the requester.
1203
1204 2015-04-28  Namhoon Kim  <nakim@ea.com>
1205
1206         Fix windows build error in WebCore related to bulk build.
1207         https://bugs.webkit.org/show_bug.cgi?id=144313
1208
1209         Reviewed by Csaba Osztrogonác.
1210
1211         No new tests because there is no behavior change.
1212
1213         * css/CSSAllInOne.cpp:
1214         * dom/DOMAllInOne.cpp:
1215
1216 2015-04-27  Simon Fraser  <simon.fraser@apple.com>
1217
1218         Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
1219         https://bugs.webkit.org/show_bug.cgi?id=144198
1220
1221         Followup: fix assertions seen in fullscreen and pseudo-element tests. These code
1222         paths set the style to the existing pointer, but with a SyntheticStyleChange.
1223         We have to avoid an early return in this case.
1224
1225         * rendering/RenderElement.cpp:
1226         (WebCore::RenderElement::setStyle):
1227
1228 2015-04-25  Simon Fraser  <simon.fraser@apple.com>
1229
1230         Eliminate styleDidChange with StyleDifferenceEqual when updates are actually necessary
1231         https://bugs.webkit.org/show_bug.cgi?id=144198
1232
1233         Reviewed by Darin Adler, Antti Koivisto.
1234         
1235         SyntheticStyleChange style recalcs are triggered for cases where behavior depends
1236         on state which is outside of RenderStyle; this includes triggering compositing for
1237         animations, for video and canvas, and for iframes with composited content.
1238         
1239         In these cases, we'd run through RenderElement::setStyle() and its fan-out, but
1240         with diff == StyleDifferenceEqual, and so be unable to determine if there
1241         is actual work to be done.
1242         
1243         This patch enforces the contract that the diff is never StyleDifferenceEqual if
1244         compositing or other work has to happen from setStyle(). This is achieved by
1245         passing in a 'hasSideEffects' flag, which causes the diff to become at least
1246         StyleDifferenceRecompositeLayer.
1247         
1248         RenderLayerCompositor::layerStyleChanged() can now safely early return
1249         if the diff is equal. Future patches will reduce redundant work even more.
1250
1251         Test: compositing/animation/no-style-recalc-during-accelerated-animation.html
1252
1253         * page/animation/AnimationBase.h:
1254         (WebCore::AnimationBase::animate): Returns a bool now if the state changed.
1255         (WebCore::AnimationBase::state):
1256         * page/animation/AnimationController.cpp:
1257         (WebCore::AnimationController::updateAnimations): bool out param which indicates
1258         whether any animations changed state.
1259         * page/animation/AnimationController.h:
1260         * page/animation/CompositeAnimation.cpp:
1261         (WebCore::CompositeAnimation::animate): If any transitions or animations changed
1262         state, set the animationStateChanged out param to true.
1263         * page/animation/CompositeAnimation.h:
1264         * page/animation/ImplicitAnimation.cpp:
1265         (WebCore::ImplicitAnimation::animate): Return true if the state changed.
1266         * page/animation/ImplicitAnimation.h:
1267         * page/animation/KeyframeAnimation.cpp:
1268         (WebCore::KeyframeAnimation::animate): Return true if the state changed.
1269         * page/animation/KeyframeAnimation.h:
1270         * rendering/RenderElement.cpp:
1271         (WebCore::RenderElement::adjustStyleDifference): We may enter here now with diff
1272         != StyleDifferenceEqual, but still need to do the check to see if layers changed.
1273         (WebCore::RenderElement::initializeStyle): When setting style for the first time,
1274         don't use StyleDifferenceEqual.
1275         (WebCore::RenderElement::setStyle): Additional flag to indicate whether this style
1276         change involves side effects. If the diff is equal but the flag is set, change
1277         the diff to StyleDifferenceRecompositeLayer (the "lowest" non-zero diff).
1278         * rendering/RenderElement.h:
1279         (WebCore::RenderElement::setAnimatableStyle): Pass true to setStyle() if hasSideEffects
1280         is true, or if animation state changed.
1281         * rendering/RenderLayer.cpp:
1282         (WebCore::RenderLayer::styleChanged): Pass the diff down.
1283         * rendering/RenderLayerCompositor.cpp:
1284         (WebCore::RenderLayerCompositor::layerStyleChanged): Return if the diff is equal.
1285         * rendering/RenderLayerCompositor.h:
1286         * rendering/style/RenderStyleConstants.h: StyleDifferenceNewStyle is used when
1287         setting style for the first time.
1288         * style/StyleResolveTree.cpp:
1289         (WebCore::Style::createRendererIfNeeded): Provide animationsChanged bool (which is unused).
1290         (WebCore::Style::resolveLocal): If the style change is synthetic, set the flag that
1291         says there are side-effects.
1292
1293 2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>
1294
1295         [GTK] Add one single option to control all OpenGL-related options
1296         https://bugs.webkit.org/show_bug.cgi?id=144105
1297
1298         Reviewed by Martin Robinson.
1299
1300         Test WTF_USE_TEXTURE_MAPPER since USE_TEXTURE_MAPPER has been removed.
1301
1302         * PlatformGTK.cmake:
1303
1304 2015-04-27  Myles C. Maxfield  <mmaxfield@apple.com>
1305
1306         Consolidate one-line flag-related header files into TextFlags.h
1307         https://bugs.webkit.org/show_bug.cgi?id=144295
1308
1309         Reviewed by Tim Horton.
1310
1311         There were a collection of single-line header files throughout platform/ which contain
1312         single-line type declaractions of flags related to text layout & rendering. This patch
1313         consolidates all these single-line headers into TextFlags.h
1314
1315         No new tests because there is no behavior change.
1316
1317         * WebCore.vcxproj/WebCore.vcxproj:
1318         * WebCore.vcxproj/WebCore.vcxproj.filters:
1319         * WebCore.xcodeproj/project.pbxproj:
1320         * css/CSSFontFace.h:
1321         * css/CSSPrimitiveValueMappings.h:
1322         * loader/cache/CachedFont.h:
1323         * loader/cache/CachedTextTrack.h:
1324         * page/Settings.h:
1325         * platform/DragImage.h:
1326         * platform/graphics/FontDescription.h:
1327         * platform/graphics/FontOrientation.h: Removed.
1328         * platform/graphics/FontPlatformData.h:
1329         * platform/graphics/FontRenderingMode.h: Removed.
1330         * platform/graphics/FontSmoothingMode.h: Removed.
1331         * platform/graphics/FontTraitsMask.h: Removed.
1332         * platform/graphics/FontWidthVariant.h: Removed.
1333         * platform/graphics/TextRenderingMode.h: Removed.
1334         * platform/graphics/cairo/FontCustomPlatformData.h:
1335         * platform/graphics/freetype/FontPlatformData.h:
1336         * platform/graphics/mac/FontCustomPlatformData.h:
1337         * platform/graphics/win/FontCustomPlatformData.h:
1338         * platform/text/NonCJKGlyphOrientation.h: Removed.
1339         * platform/text/TextFlags.h:
1340         * rendering/TextPainter.h:
1341         * style/StyleFontSizeFunctions.h:
1342
1343 2015-04-27  Daniel Bates  <dabates@apple.com>
1344
1345         Form control may be associated with the wrong HTML Form element after form id change
1346         https://bugs.webkit.org/show_bug.cgi?id=133456
1347         <rdar://problem/17095055>
1348
1349         Reviewed by Andy Estes.
1350
1351         Fixes an issue where a form control may be associated with the wrong HTML Form element
1352         after the id of the HTML Form element associated with the form control is changed when
1353         there is more than one HTML Form element with the same id in the document. Specifically,
1354         a form control that has an HTML form attribute value X will always be associated with
1355         some HTML Form element f where f.id = X regardless of whether f.id is subsequently
1356         changed.
1357
1358         Tests: fast/forms/change-form-id-to-be-unique-then-submit-form.html
1359                fast/forms/change-form-id-to-be-unique.html
1360
1361         * dom/Element.cpp:
1362         (WebCore::Element::attributeChanged): Notify observers when the id of an element changed.
1363         (WebCore::Element::updateId): Added parameter NotifyObservers (defaults to NotifyObservers::Yes),
1364         as to whether we should notify observers of the id change.
1365         (WebCore::Element::updateIdForTreeScope): Ditto.
1366         (WebCore::Element::willModifyAttribute): Do not notify observers of the id change immediately. As
1367         indicated by the name of this method, we plan to modify the DOM attribute id of the element, but
1368         we have not actually modified it when this method is called. Instead we will notify observers
1369         in Element::attributeChanged(), which is called after the DOM attribute id is modified.
1370         (WebCore::Element::cloneAttributesFromElement): Ditto.
1371         * dom/Element.h: Defined enum class NotifyObservers.
1372         * dom/TreeScope.cpp:
1373         (WebCore::TreeScope::addElementById): Added boolean parameter notifyObservers (defaults to true)
1374         as to whether we should dispatch a notification to all observers.
1375         (WebCore::TreeScope::removeElementById): Ditto.
1376         * dom/TreeScope.h:
1377
1378 2015-04-27  Alex Christensen  <achristensen@webkit.org>
1379
1380         Reduce allocations and memory usage when compiling content extensions.
1381         https://bugs.webkit.org/show_bug.cgi?id=144277
1382
1383         Reviewed by Benjamin Poulain.
1384
1385         Covered by existing tests.
1386
1387         * contentextensions/Term.h:
1388         (WebCore::ContentExtensions::Term::CharacterSet::set):
1389         (WebCore::ContentExtensions::Term::CharacterSet::get):
1390         (WebCore::ContentExtensions::Term::CharacterSet::invert):
1391         (WebCore::ContentExtensions::Term::CharacterSet::inverted):
1392         (WebCore::ContentExtensions::Term::CharacterSet::bitCount):
1393         (WebCore::ContentExtensions::Term::CharacterSet::operator==):
1394         (WebCore::ContentExtensions::Term::CharacterSet::hash):
1395         (WebCore::ContentExtensions::Term::Term):
1396         (WebCore::ContentExtensions::Term::addCharacter):
1397         (WebCore::ContentExtensions::Term::isEndOfLineAssertion):
1398         (WebCore::ContentExtensions::Term::isUniversalTransition):
1399         (WebCore::ContentExtensions::Term::generateSubgraphForAtom):
1400         Use two uint64_t's instead of a BitVector with a capacity of 128 bits.
1401
1402 2015-04-27  Michael Catanzaro  <mcatanzaro@igalia.com>
1403
1404         Rename WTF_USE_3D_GRAPHICS to ENABLE_GRAPHICS_CONTEXT_3D
1405         https://bugs.webkit.org/show_bug.cgi?id=144193
1406
1407         Reviewed by Darin Adler.
1408
1409         * CMakeLists.txt:
1410         * platform/graphics/ANGLEWebKitBridge.cpp:
1411         * platform/graphics/FormatConverter.cpp:
1412         * platform/graphics/FormatConverter.h:
1413         * platform/graphics/GLContext.h:
1414         * platform/graphics/GraphicsContext3D.cpp:
1415         * platform/graphics/GraphicsContext3DPrivate.cpp:
1416         * platform/graphics/OpenGLShims.cpp:
1417         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1418         * platform/graphics/cg/GraphicsContext3DCG.cpp:
1419         * platform/graphics/egl/GLContextEGL.cpp:
1420         * platform/graphics/egl/GLContextEGL.h:
1421         * platform/graphics/glx/GLContextGLX.cpp:
1422         * platform/graphics/glx/GLContextGLX.h:
1423         * platform/graphics/mac/GraphicsContext3DMac.mm:
1424         * platform/graphics/opengl/Extensions3DOpenGL.cpp:
1425         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1426         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
1427         * platform/graphics/opengl/GLPlatformContext.cpp:
1428         * platform/graphics/opengl/GLPlatformSurface.cpp:
1429         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1430         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
1431         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
1432         * platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
1433         * platform/graphics/win/GraphicsContext3DWin.cpp:
1434
1435 2015-04-27  Jer Noble  <jer.noble@apple.com>
1436
1437         [iOS] Video not centered in element on retina devices
1438         https://bugs.webkit.org/show_bug.cgi?id=144274
1439
1440         Reviewed by Simon Fraser.
1441
1442         In r173702, a transform was added to the video layer (and a matching, inverse transform
1443         in the UIProcess), but this transform affects the position property of the video layer
1444         used to position the video content within the element bounds when their aspect ratios
1445         do not match.
1446
1447         To work around this problem, pre-apply the transform during -setPosition:.
1448
1449         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1450         (-[WebVideoContainerLayer setPosition:]):
1451
1452 2015-04-27  Jer Noble  <jer.noble@apple.com>
1453
1454         Add a setting & restriction which prevents non-interactivte playback of audible media elements.
1455         https://bugs.webkit.org/show_bug.cgi?id=143486
1456
1457         Reviewed by Eric Carlson.
1458
1459         Tests: media/audio-playback-restriction-autoplay.html
1460                media/audio-playback-restriction-play.html
1461
1462         To allow clients who want to allow non-user-interactive video-only playback, but still
1463         restrict playback of audible media elements, add a new setting and matching restriction
1464         which disallows playback of media elements containing audible characteristics.
1465
1466         * html/HTMLMediaElement.cpp:
1467         (WebCore::HTMLMediaElement::HTMLMediaElement): Set the RequireUserGestureForAudioRateChange
1468             restriction if the audioPlaybackRequiresUserGesture() setting is set.
1469         (WebCore::HTMLMediaElement::parseAttribute): Drive-by fix. Move the opening brace
1470             out of the #if, as this confuses the heck out of diff and makes all subsequent
1471             changes appear to be within HTMLMediaElement::parseAttribute.
1472         (WebCore::HTMLMediaElement::autoplay): Remove the restriction check from within autoplay().
1473             It is checked again immediately after every autoplay() call site.
1474         (WebCore::HTMLMediaElement::pauseInternal): Remove the iOS-only #if.
1475         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Check whether playback
1476             is permitted, and if not, pause.
1477         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
1478         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Ditto.
1479         * html/HTMLMediaSession.cpp:
1480         (WebCore::restrictionName): Since BehaviorRestrictions is a bitfield, check each bit
1481             individually.
1482         (WebCore::HTMLMediaSession::removeBehaviorRestriction): Handle RequireUserGestureForAudioRateChange.
1483         (WebCore::HTMLMediaSession::playbackPermitted): Check whether the element has audio and 
1484             audio playback is restricted, and return false if so.
1485         * html/HTMLMediaSession.h:
1486         * page/Settings.cpp:
1487         * page/Settings.in:
1488         * testing/Internals.cpp:
1489         (WebCore::Internals::setMediaSessionRestrictions): Added. 
1490         (WebCore::Internals::setMediaElementRestrictions): Added.
1491         * testing/Internals.h:
1492         * testing/Internals.idl:
1493
1494 2015-04-27  Jer Noble  <jer.noble@apple.com>
1495
1496         [WebAudio] AudioContext does not remove user-gesture restriction during resume()
1497         https://bugs.webkit.org/show_bug.cgi?id=144211
1498
1499         Reviewed by Eric Carlson.
1500
1501         Tests: webaudio/audiocontext-restriction-audiobuffersourcenode-start.html
1502                webaudio/audiocontext-restriction.html
1503
1504         Before the introduction of resume(), suspend(), and stop(), AudioContexts which required
1505         a user-gesture would start normally, but would effectively mute their outputs. Now that
1506         the AudioContext's state property is exposed to JavaScript, the AudioContext should stay
1507         in the "suspended" state until the user-gesture restriction is lifted.
1508
1509         Add a new method, willBeginPlayback() which checks and potentially clears the context's
1510         behavior restrictions before checking with the MediaSession. Call this new willBeginPlayback()
1511         method when the state would transition to "running".
1512
1513         Because they may be called before any nodes are created, make sure to call lazyInitialize()
1514         from within the JS-exposed resumePlayback(), suspendPlayback(), and stopPlayback() methods.
1515
1516         Instead of clearing the behavior restrictions directly, scheduled AudioNodes should instead
1517         call a new method nodeWillBeginPlayback(). Because existing sites will call AudioNode.start()
1518         inside a user-gesture handler to clear the user-gesture restriction, call startRendering()
1519         from nodeWillBeginPlayback(). But because we don't want AudioNode.start() to resume playback
1520         unconditionally, only do so when the user-gesture restriction is set.
1521
1522         Now that an AudioContext will not transition to "running" state without a user-gesture (if
1523         that restriction is set), there's no reason to check for that restriction from inside
1524         AudioDestinationNode.
1525
1526         Add some internal methods to set and clear AudioContext BehaviorRestrictions for testing purposes.
1527
1528         * Modules/webaudio/AudioBufferSourceNode.cpp:
1529         (WebCore::AudioBufferSourceNode::startPlaying):
1530         * Modules/webaudio/AudioContext.cpp:
1531         (WebCore::AudioContext::nodeWillBeginPlayback):
1532         (WebCore::AudioContext::willBeginPlayback):
1533         (WebCore::AudioContext::willPausePlayback):
1534         (WebCore::AudioContext::startRendering):
1535         (WebCore::AudioContext::suspendContext):
1536         (WebCore::AudioContext::resumeContext):
1537         (WebCore::AudioContext::closeContext):
1538         (WebCore::AudioContext::suspendPlayback):
1539         (WebCore::AudioContext::mayResumePlayback):
1540         * Modules/webaudio/AudioContext.h:
1541         (WebCore::AudioContext::behaviorRestrictions):
1542         (WebCore::AudioContext::userGestureRequiredForAudioStart):
1543         (WebCore::AudioContext::pageConsentRequiredForAudioStart):
1544         * Modules/webaudio/AudioDestinationNode.cpp:
1545         (WebCore::AudioDestinationNode::render):
1546         * Modules/webaudio/AudioScheduledSourceNode.cpp:
1547         (WebCore::AudioScheduledSourceNode::start):
1548         * testing/Internals.cpp:
1549         (WebCore::Internals::setAudioContextRestrictions):
1550         * testing/Internals.h:
1551         * testing/Internals.idl:
1552
1553 2015-04-27  Alexey Proskuryakov  <ap@apple.com>
1554
1555         Build fix.
1556
1557         * accessibility/mac/AXObjectCacheMac.mm: (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
1558         Use -setObject:forKey:, not array subscript.
1559
1560 2015-04-27  Eric Carlson  <eric.carlson@apple.com>
1561
1562         WirelessTargetPicker should not be visible unless a file is playable
1563         https://bugs.webkit.org/show_bug.cgi?id=144271
1564         <rdar://problem/20712003>
1565
1566         Reviewed by Jer Noble.
1567
1568         * Modules/mediacontrols/mediaControlsApple.js:
1569         (Controller.prototype.isPlayable): New.
1570         (Controller.prototype.setStatusHidden): Call updateWirelessTargetAvailable.
1571         (Controller.prototype.updateWirelessTargetAvailable): Don't show the button until the
1572             status message has been hidden.
1573
1574 2015-04-22  Martin Robinson  <mrobinson@igalia.com>
1575
1576         [CMake] Autogenerate cmakeconfig.h.cmake
1577         https://bugs.webkit.org/show_bug.cgi?id=143997
1578
1579         Reviewed by Csaba Osztrogonác.
1580
1581         * PlatformGTK.cmake: Use the WTF_USE style variables, because those are the same
1582         as the ones exposed to the build.
1583
1584 2015-04-27  Zalan Bujtas  <zalan@apple.com>
1585
1586         Simple line layout: Wrong text offsetting when range does not start from the first renderer.
1587         https://bugs.webkit.org/show_bug.cgi?id=144167
1588         rdar://problem/20639857
1589
1590         Reviewed by Simon Fraser.
1591
1592         This patch ensures that TextIterator returns the right text when the input range starts
1593         from a sibling node.
1594
1595         TextIterator::m_previousTextLengthInFlow keeps track of the current node offset from the parent.
1596         It is required to map simple line layout runs to RenderText positions.
1597         This patch sets the offset value when the iteration start with a sibling node.
1598
1599         Test: fast/text/range-text-with-simple-line-layout.html
1600
1601         * editing/TextIterator.cpp:
1602         (WebCore::TextIterator::TextIterator):
1603         (WebCore::TextIterator::handleTextNode):
1604
1605 2015-04-27  Commit Queue  <commit-queue@webkit.org>
1606
1607         Unreviewed, rolling out r183393.
1608         https://bugs.webkit.org/show_bug.cgi?id=144272
1609
1610         Caused memory corruption detected by GuardMalloc (Requested by
1611         ap on #webkit).
1612
1613         Reverted changeset:
1614
1615         "Synchronous XMLHttpRequest should get access to AppCache
1616         resources stored as flat files"
1617         https://bugs.webkit.org/show_bug.cgi?id=143711
1618         http://trac.webkit.org/changeset/183393
1619
1620 2015-04-27  Per Arne Vollan  <peavo@outlook.com>
1621
1622         [Curl] Favicons loaded from disc cache are ignored.
1623         https://bugs.webkit.org/show_bug.cgi?id=143953
1624
1625         Reviewed by Alex Christensen.
1626
1627         When a favicon is loaded from the Curl disc cache, the icon data is thrown away.
1628         This happens because we give a 304 response, which makes the icon loader ignore
1629         the response. We can solve this by responding with 200 OK.
1630
1631         * platform/network/ResourceHandleInternal.h:
1632         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
1633         * platform/network/curl/CurlCacheManager.cpp:
1634         (WebCore::CurlCacheManager::didReceiveResponse):
1635         * platform/network/curl/ResourceHandleManager.cpp:
1636         (WebCore::headerCallback):
1637         (WebCore::ResourceHandleManager::initializeHandle):
1638
1639 2015-04-27  Brady Eidson  <beidson@apple.com>
1640
1641         Make 'enum NavigationType' be an enum class
1642         https://bugs.webkit.org/show_bug.cgi?id=144270
1643
1644         Reviewed by Alex Christensen.
1645
1646         No new tests (No change in behavior).
1647
1648         I’ll be adding a new NavigationType for bug 144269 so it makes sense to make this
1649         an enum class first.
1650
1651         * loader/FrameLoader.cpp:
1652         (WebCore::FrameLoader::load):
1653         (WebCore::FrameLoader::reload):
1654         (WebCore::FrameLoader::loadDifferentDocumentItem):
1655         * loader/FrameLoaderTypes.h:
1656
1657         * loader/NavigationAction.cpp:
1658         (WebCore::navigationType):
1659         (WebCore::NavigationAction::NavigationAction):
1660
1661         * loader/PolicyChecker.cpp:
1662         (WebCore::PolicyChecker::checkNavigationPolicy):
1663
1664         * page/PerformanceNavigation.cpp:
1665         (WebCore::PerformanceNavigation::type):
1666
1667 2015-04-27  Yoav Weiss  <yoav@yoav.ws>
1668
1669         Fix viewport units in Media Queries
1670         https://bugs.webkit.org/show_bug.cgi?id=144260
1671
1672         Reviewed by Darin Adler.
1673
1674         This patch makes sure that viewport units are considered "length units"
1675         in the context of Media Queries, by having MediaQueryExp use the unit logic
1676         that is in CSSPrimitiveValue.
1677         It does that by turning the relevant methods in CSSPrimitiveValue into static.
1678
1679         It also makes sure that the logic for "resolution units" is not maintained separately 
1680         in MediaQueryExp, to avoid similiar issues in the future with resolution units.
1681
1682         Test: fast/media/mq-viewport-units.html
1683
1684         * css/CSSPrimitiveValue.h:
1685         (WebCore::CSSPrimitiveValue::isViewportPercentageLength): Added a static variant.
1686         (WebCore::CSSPrimitiveValue::isLength): Added a static variant.
1687         (WebCore::CSSPrimitiveValue::isResolution): Added a static variant.
1688         * css/MediaQueryExp.cpp:
1689         (WebCore::featureWithValidPositiveLenghtOrNumber): Call CSSPrimitiveValue's length unit logic.
1690         (WebCore::featureWithValidDensity): Call CSSPrimitiveValue's resolution unit logic.
1691
1692 2015-04-27  Javier Fernandez  <jfernandez@igalia.com>
1693
1694         [CSS Grid Layout] Support for the justify-self and justify-items in grid layout
1695         https://bugs.webkit.org/show_bug.cgi?id=133280
1696
1697         Reviewed by David Hyatt.
1698
1699         Implementation of justify-self and justify-items properties for grid. It supports
1700         different writing-modes and direction. Margins, borders and paddings are also
1701         considered when computing the final position and stretched size.
1702
1703         This patch applies also a quite important refactoring of the alignment logic in
1704         order to share code between the two alignment dimensions, row-axis and column-axis.
1705
1706         Overflow handling is still missing and will be added later in a follow-up bug.
1707
1708         Tests: fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-lr.html
1709                fast/css-grid-layout/grid-align-justify-margin-border-padding-vertical-rl.html
1710                fast/css-grid-layout/grid-align-justify-margin-border-padding.html
1711                fast/css-grid-layout/justify-self-cell.html
1712
1713         * rendering/RenderGrid.cpp:
1714         (WebCore::RenderGrid::layoutGridItems):
1715         (WebCore::RenderGrid::columnAxisPositionForChild):
1716         (WebCore::RenderGrid::rowAxisPositionForChild):
1717         (WebCore::RenderGrid::rowPositionForChild):
1718         (WebCore::RenderGrid::columnPositionForChild):
1719         (WebCore::RenderGrid::findChildLogicalPosition):
1720         (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild): Deleted.
1721         (WebCore::RenderGrid::needToStretchChildLogicalHeight): Deleted.
1722         (WebCore::RenderGrid::marginLogicalHeightForChild): Deleted.
1723         (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching): Deleted.
1724         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded): Deleted.
1725         * rendering/RenderGrid.h:
1726         * rendering/style/RenderStyle.cpp:
1727         (WebCore::RenderStyle::resolveJustification):
1728         * rendering/style/RenderStyle.h:
1729
1730 2015-04-27  Darin Adler  <darin@apple.com>
1731
1732         Crashes under IDBDatabase::closeConnection
1733         https://bugs.webkit.org/show_bug.cgi?id=141745
1734
1735         Reviewed by Alexey Proskuryakov.
1736
1737         * Modules/indexeddb/IDBDatabase.cpp:
1738         (WebCore::IDBDatabase::~IDBDatabase): Do the work of close/closeConnection without
1739         actually calling those functions.
1740         (WebCore::IDBDatabase::closeConnection): Protect the database so it's not destroyed
1741         in the middle of this function's execution.
1742
1743 2015-04-27  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
1744
1745         [Streams API] ReadableStream constructor start function should be able to close the stream
1746         https://bugs.webkit.org/show_bug.cgi?id=143363
1747
1748         Reviewed by Benjamin Poulain.
1749
1750         Implements https://streams.spec.whatwg.org/#close-readable-stream.
1751         When the "close" JS function is called, the stream is getting closed.
1752         The stream state is changed to close and if it has a reader, the reader gets closed as well:
1753         The reader resolves the closed promise and releases the stream.
1754
1755         Enabled the possibility to resolve a promise with any JS value.
1756         This is used to resolve closed promise with jsUndefined and will be used for read promises in
1757         the future as well, though of course it is not restricted to Streams.
1758
1759         Covered by reference tests that are now passing.
1760
1761         * Modules/streams/ReadableStream.h:
1762         * Modules/streams/ReadableStream.cpp:
1763         (WebCore::ReadableStream::changeStateToClosed): Called by the JS function 'close'.
1764         * Modules/streams/ReadableStreamReader.cpp:
1765         (WebCore::ReadableStreamReader::ReadableStreamReader): Initialized stream.
1766         (WebCore::ReadableStreamReader::initialize): Added to handle state change at constructor time
1767         in particular closed/errored state.
1768         (WebCore::ReadableStreamReader::releaseStream): Releases the stream.
1769         (WebCore::ReadableStreamReader::closed): Stores the promise callbacks and invokes success
1770         immediately if the stream is already closed.
1771         (WebCore::ReadableStreamReader::changeStateToClosed): Changes the internal state to closed,
1772         resolves the promise and releases the stream.
1773         * Modules/streams/ReadableStreamReader.h:
1774         (WebCore::ReadableStreamReader::State): Added.
1775         * bindings/js/JSDOMPromise.h:
1776         (WebCore::DeferredWrapper::resolve<JSC::JSValue>): Adds the ability to resolve a promise with
1777         a custom JS value.
1778         * bindings/js/JSReadableStreamControllerCustom.cpp:
1779         (WebCore::JSReadableStreamController::close): Not "notImplemented" anymore. Now it closes the
1780         stream.
1781         * bindings/js/JSReadableStreamReaderCustom.cpp:
1782         (WebCore::JSReadableStreamReader::closed): Resolves the promise with undefined.
1783
1784 2015-04-27  Csaba Osztrogonác  <ossy@webkit.org>
1785
1786         Fix the !ENABLE(CSS_GRID_LAYOUT) build after r183370
1787         https://bugs.webkit.org/show_bug.cgi?id=144255
1788
1789         Reviewed by Carlos Garcia Campos.
1790
1791         * rendering/RenderBox.cpp:
1792         (WebCore::RenderBox::computeLogicalHeight):
1793
1794 2015-04-27  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1795
1796         Synchronous XMLHttpRequest should get access to AppCache resources stored as flat files
1797         https://bugs.webkit.org/show_bug.cgi?id=143711
1798
1799         Reviewed by Darin Adler.
1800
1801         This patch checks whether a substitute resource data is stored in memory or in file for synchronous loads.
1802         If data is stored in file, it reads the data through SharedBuffer::createWithContentsOfFile.
1803         This patch refactors some routines to replace Vector<char> by SharedBuffer to transmit response data.
1804
1805         Test: http/tests/appcache/simple-video-sync.html
1806
1807         * html/HTMLMediaElement.cpp:
1808         (WebCore::HTMLMediaElement::parseAttribute):
1809         * loader/DocumentThreadableLoader.cpp:
1810         (WebCore::DocumentThreadableLoader::loadRequest):
1811         * loader/FrameLoader.cpp:
1812         (WebCore::FrameLoader::loadResourceSynchronously):
1813         * loader/FrameLoader.h:
1814         * loader/appcache/ApplicationCacheHost.cpp:
1815         (WebCore::ApplicationCacheHost::maybeLoadResource):
1816         (WebCore::ApplicationCacheHost::createFileURL):
1817         (WebCore::ApplicationCacheHost::maybeLoadSynchronously):
1818         (WebCore::ApplicationCacheHost::maybeLoadFallbackSynchronously):
1819         * loader/appcache/ApplicationCacheHost.h:
1820         * xml/XSLTProcessorLibxslt.cpp:
1821         (WebCore::docLoaderFunc):
1822         * xml/parser/XMLDocumentParserLibxml2.cpp:
1823         (WebCore::openFunc):
1824
1825 2015-04-24  Philippe Normand  <pnormand@igalia.com>
1826
1827         [JHBuild] Move to upstream OpenWebRTC
1828         https://bugs.webkit.org/show_bug.cgi?id=144145
1829
1830         Reviewed by Carlos Garcia Campos.
1831
1832         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp:
1833         (WebCore::initializeOpenWebRTC): Update with new owr_init API.
1834
1835 2015-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
1836
1837         [SOUP] Add initial implementation of NetworkProcess disk cache
1838         https://bugs.webkit.org/show_bug.cgi?id=143872
1839
1840         Reviewed by Martin Robinson.
1841
1842         Allow to create a GRefPtr for SoupBuffer. Even though SoupBuffer
1843         is not a GObject and has copy/free functions instead of ref/unref,
1844         it's internally refcounted, so we could use copy/free as
1845         ref/unref.
1846
1847         * PlatformGTK.cmake:
1848         * platform/network/soup/GRefPtrSoup.cpp: Added.
1849         (WTF::refGPtr):
1850         (WTF::derefGPtr):
1851         * platform/network/soup/GRefPtrSoup.h: Added.
1852
1853 2015-04-26  Manuel Rego Casasnovas  <rego@igalia.com>
1854
1855         [CSS Grid Layout] LayoutBox::hasDefiniteLogicalHeight() should consider abspos boxes as definite
1856         https://bugs.webkit.org/show_bug.cgi?id=144144
1857
1858         Reviewed by Darin Adler.
1859
1860         Change order in hasDefiniteLogicalHeight() ifs to consider definite
1861         absolutely positioned elements.
1862
1863         Test: fast/css-grid-layout/percent-track-breadths-regarding-container-size.html
1864
1865         * rendering/RenderBox.cpp:
1866         (WebCore::RenderBox::hasDefiniteLogicalHeight):
1867
1868 2015-04-26  Said Abou-Hallawa  <sabouhallawa@apple.com>
1869
1870         SVGFilterBuilder should drive the builtin sourceAlpha from the passed sourceGraphic
1871         https://bugs.webkit.org/show_bug.cgi?id=144137
1872
1873         Reviewed by Darin Adler.
1874
1875         The SourceAlpha should be driven from the last applied FilterEffect. This
1876         will require the SourceAlpha FilterEffect to wrap a FilterEffect rather
1877         than just getting the SourceGraphic reference from FilterEffectRenderer.
1878
1879         This is based on the Blink patch:
1880         https://src.chromium.org/viewvc/blink?revision=194115&view=revision.
1881
1882         Test: svg/filters/sourceAlpha-input-filter-effect.html
1883         
1884         * platform/graphics/filters/SourceAlpha.cpp:
1885         (WebCore::SourceAlpha::create): Make SourceAlpha wraps a FilterEffect
1886         rather than a Filter.
1887         
1888         (WebCore::SourceAlpha::determineAbsolutePaintRect): Determine the paint
1889         rect from the wrapped FilterEffect.
1890         
1891         (WebCore::SourceAlpha::platformApplySoftware): Extract the alpha channel
1892         from the wrapped FilterEffect.
1893         
1894         (WebCore::SourceAlpha::SourceAlpha): 
1895         * platform/graphics/filters/SourceAlpha.h:
1896         (WebCore::SourceAlpha::SourceAlpha): Deleted.
1897         Reimplement the constructor of the SourceAlpha such that it wraps the
1898         sourceEffect in its inputEffects.
1899     
1900         * rendering/FilterEffectRenderer.cpp:
1901         (WebCore::FilterEffectRenderer::buildReferenceFilter): Delete the FIXME
1902         comment and do exactly what it said. This matches the implementation of
1903         Gecko and Blink.
1904         
1905         * rendering/svg/RenderSVGResourceFilter.cpp:
1906         (WebCore::RenderSVGResourceFilter::buildPrimitives):
1907         Delete the extra argument.
1908
1909         * svg/graphics/filters/SVGFilterBuilder.cpp:
1910         (WebCore::SVGFilterBuilder::SVGFilterBuilder):
1911         * svg/graphics/filters/SVGFilterBuilder.h: Drive the SourceAlpha from the
1912         passed source FilterEffect.
1913
1914         * platform/graphics/filters/FEBlend.cpp:
1915         * platform/graphics/filters/FEBlend.h:
1916         * platform/graphics/filters/FEColorMatrix.cpp:
1917         * platform/graphics/filters/FEColorMatrix.h:
1918         * platform/graphics/filters/FEComponentTransfer.cpp:
1919         * platform/graphics/filters/FEComponentTransfer.h:
1920         * platform/graphics/filters/FEComposite.cpp:
1921         * platform/graphics/filters/FEComposite.h:
1922         * platform/graphics/filters/FEConvolveMatrix.cpp:
1923         * platform/graphics/filters/FEConvolveMatrix.h:
1924         * platform/graphics/filters/FEDiffuseLighting.cpp:
1925         * platform/graphics/filters/FEDiffuseLighting.h:
1926         * platform/graphics/filters/FEDisplacementMap.cpp:
1927         * platform/graphics/filters/FEDisplacementMap.h:
1928         * platform/graphics/filters/FEDropShadow.cpp:
1929         * platform/graphics/filters/FEDropShadow.h:
1930         * platform/graphics/filters/FEFlood.cpp:
1931         * platform/graphics/filters/FEFlood.h:
1932         * platform/graphics/filters/FEGaussianBlur.cpp:
1933         * platform/graphics/filters/FEGaussianBlur.h:
1934         * platform/graphics/filters/FELighting.cpp:
1935         * platform/graphics/filters/FELighting.h:
1936         * platform/graphics/filters/FEMerge.cpp:
1937         * platform/graphics/filters/FEMerge.h:
1938         * platform/graphics/filters/FEMorphology.cpp:
1939         * platform/graphics/filters/FEMorphology.h:
1940         * platform/graphics/filters/FEOffset.cpp:
1941         * platform/graphics/filters/FEOffset.h:
1942         * platform/graphics/filters/FESpecularLighting.cpp:
1943         * platform/graphics/filters/FESpecularLighting.h:
1944         * platform/graphics/filters/FETile.cpp:
1945         * platform/graphics/filters/FETile.h:
1946         * platform/graphics/filters/FETurbulence.cpp:
1947         * platform/graphics/filters/FETurbulence.h:
1948         * platform/graphics/filters/Filter.h:
1949         * platform/graphics/filters/FilterEffect.cpp:
1950         * platform/graphics/filters/FilterEffect.h:
1951         * platform/graphics/filters/SourceGraphic.cpp:
1952         * platform/graphics/filters/SourceGraphic.h:
1953         * rendering/svg/RenderSVGResourceFilter.h:
1954         * rendering/svg/SVGRenderTreeAsText.cpp:
1955         Code clean up: Pointer to reference conversion. It starts by converting
1956         FilterEffect::m_filter from pointer to reference and it kept expanding.
1957         All the creations of FilterEffect were happening by passing "this" so
1958         passing "*this" did not require to check whether the pointer is nil.
1959
1960         * svg/SVGFEBlendElement.cpp:
1961         * svg/SVGFEBlendElement.h:
1962         * svg/SVGFEColorMatrixElement.cpp:
1963         * svg/SVGFEColorMatrixElement.h:
1964         * svg/SVGFEComponentTransferElement.cpp:
1965         * svg/SVGFEComponentTransferElement.h:
1966         * svg/SVGFECompositeElement.cpp:
1967         * svg/SVGFECompositeElement.h:
1968         * svg/SVGFEConvolveMatrixElement.cpp:
1969         * svg/SVGFEConvolveMatrixElement.h:
1970         * svg/SVGFEDiffuseLightingElement.cpp:
1971         * svg/SVGFEDiffuseLightingElement.h:
1972         * svg/SVGFEDisplacementMapElement.cpp:
1973         * svg/SVGFEDisplacementMapElement.h:
1974         * svg/SVGFEDropShadowElement.cpp:
1975         * svg/SVGFEDropShadowElement.h:
1976         * svg/SVGFEFloodElement.cpp:
1977         * svg/SVGFEFloodElement.h:
1978         * svg/SVGFEGaussianBlurElement.cpp:
1979         * svg/SVGFEGaussianBlurElement.h:
1980         * svg/SVGFEImageElement.cpp:
1981         * svg/SVGFEImageElement.h:
1982         * svg/SVGFEMergeElement.cpp:
1983         * svg/SVGFEMergeElement.h:
1984         * svg/SVGFEMorphologyElement.cpp:
1985         * svg/SVGFEMorphologyElement.h:
1986         * svg/SVGFEOffsetElement.cpp:
1987         * svg/SVGFEOffsetElement.h:
1988         * svg/SVGFESpecularLightingElement.cpp:
1989         * svg/SVGFESpecularLightingElement.h:
1990         * svg/SVGFETileElement.cpp:
1991         * svg/SVGFETileElement.h:
1992         * svg/SVGFETurbulenceElement.cpp:
1993         * svg/SVGFETurbulenceElement.h:
1994         * svg/SVGFilterPrimitiveStandardAttributes.h:
1995         * svg/graphics/filters/SVGFEImage.cpp:
1996         * svg/graphics/filters/SVGFEImage.h:
1997         Code clean up: Pointer to reference and PassRefPtr<> to RefPtr<> or Ref<>
1998         conversion.
1999
2000 2015-04-26  Darin Adler  <darin@apple.com>
2001
2002         REGRESSION (r174283): disabled default buttons use impossible-to-read white text on Mac
2003         https://bugs.webkit.org/show_bug.cgi?id=144237
2004
2005         Reviewed by Simon Fraser.
2006
2007         No test because DumpRenderTree and WebKitTestRunner don't have a good method
2008         for testing behaviors that are specific to active windows. That's the same reason
2009         that the change that caused this bug didn't come with a regression test.
2010
2011         * rendering/RenderTheme.cpp:
2012         (WebCore::RenderTheme::adjustStyle): Renamed "e" to "element". Added a comment to
2013         clarify the meaning of the setInsideDefaultButton function, and added an
2014         isDisabledFormControl check so it won't trigger on a disabled button.
2015         (WebCore::RenderTheme::systemColor): Moved CSSValueActivebuttontext into
2016         alphabetical order to match the rest of the switch statement ordering.
2017
2018         * rendering/RenderThemeMac.mm:
2019         (WebCore::RenderThemeMac::systemColor): Moved CSSValueActivebuttontext into
2020         alphabetical order to match the rest of the switch statement ordering. Also
2021         fixed its behavior on older versions of OS X; it should just return the same
2022         thing that CSSValueButtontext would return in that context.
2023
2024 2015-04-26  Yusuke Suzuki  <utatane.tea@gmail.com>
2025
2026         [ES6] Implement ES6 template literals
2027         https://bugs.webkit.org/show_bug.cgi?id=142691
2028
2029         Reviewed by Darin Adler.
2030
2031         Add ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX compile time flag.
2032
2033         * Configurations/FeatureDefines.xcconfig:
2034
2035 2015-04-26  Javier Fernandez  <jfernandez@igalia.com>
2036
2037         [CSS Grid Layout] Support for align-self and align-items in grid layout
2038         https://bugs.webkit.org/show_bug.cgi?id=133225
2039
2040         Reviewed by Darin Adler.
2041
2042         Implementation of align-self and align-items properties for grid. It supports
2043         different writing-modes and direction. Margins, borders and paddings are also
2044         considered when computing the final position and stretched size.
2045
2046         Overflow handling is still missing and will be added when implemented row-axis
2047         alignment support.
2048
2049         Test: fast/css-grid-layout/grid-align.html
2050
2051         * rendering/RenderBox.cpp:
2052         (WebCore::RenderBox::computeLogicalHeight):
2053         * rendering/RenderGrid.cpp:
2054         (WebCore::RenderGrid::logicalContentHeightForChild):
2055         (WebCore::RenderGrid::layoutGridItems):
2056         (WebCore::computeOverflowAlignmentOffset):
2057         (WebCore::RenderGrid::endOfRowForChild):
2058         (WebCore::RenderGrid::startOfRowForChild):
2059         (WebCore::RenderGrid::centeredRowPositionForChild):
2060         (WebCore::marginWidthForChild):
2061         (WebCore::marginHeightForChild):
2062         (WebCore::RenderGrid::allowedToStretchLogicalHeightForChild):
2063         (WebCore::RenderGrid::needToStretchChildLogicalHeight):
2064         (WebCore::RenderGrid::marginLogicalHeightForChild):
2065         (WebCore::RenderGrid::availableAlignmentSpaceForChildBeforeStretching):
2066         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
2067         (WebCore::RenderGrid::rowPositionForChild):
2068         (WebCore::RenderGrid::findChildLogicalPosition):
2069         (WebCore::RenderGrid::populateGridPositions): Deleted.
2070         * rendering/RenderGrid.h:
2071
2072 2015-04-26  Doug Russell  <d_russell@apple.com>
2073
2074         AX: richer text change notifications (142719)
2075         https://bugs.webkit.org/show_bug.cgi?id=142719
2076
2077         Reviewed by Darin Adler.
2078
2079         Richer accessibility value change notifications. Introduce AXTextEditType,
2080         postTextStateChangeNotification and postTextReplacementNotification to give assistive
2081         tech apps more reliable context for responding to changes in web content. Also implement
2082         a mechanism to post value changes in password form fields in coalesced ticks to thwart
2083         analyzing the cadence of changes.
2084
2085         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent,
2086         and an overload of postTextReplacementNotification to give assistive tech apps more
2087         reliable context for responding to changes in web content selection. Also block posting
2088         selection changes on password fields.
2089
2090         Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
2091                platform/mac/accessibility/selection-change-userinfo.html
2092                platform/mac/accessibility/value-change-userinfo.html
2093
2094         * CMakeLists.txt:
2095         * WebCore.vcxproj/WebCore.vcxproj:
2096         * WebCore.vcxproj/WebCore.vcxproj.filters:
2097         * WebCore.xcodeproj/project.pbxproj:
2098         * accessibility/AXObjectCache.cpp:
2099         (WebCore::AXObjectCache::AXObjectCache):
2100         (WebCore::AXObjectCache::notificationPostTimerFired):
2101         (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
2102         (WebCore::AXObjectCache::showIntent):
2103         (WebCore::AXObjectCache::setTextSelectionIntent):
2104         (WebCore::isPasswordFieldOrContainedByPasswordField):
2105         (WebCore::AXObjectCache::postTextStateChangeNotification):
2106         (WebCore::AXObjectCache::postTextReplacementNotification):
2107         (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
2108         (WebCore::AXObjectCache::rootWebArea):
2109         (WebCore::AXObjectCache::textChangeForEditType):
2110         (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
2111         (WebCore::AXObjectCache::frameLoadingEventNotification): Deleted.
2112         * accessibility/AXObjectCache.h:
2113         (WebCore::AXObjectCache::postTextStateChangeNotification):
2114         (WebCore::AXObjectCache::postTextReplacementNotification):
2115         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2116         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2117         (WebCore::AXObjectCache::textChangeForEditType):
2118         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2119         (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
2120         (WebCore::AXObjectCache::getOrCreate): Deleted.
2121         (WebCore::AXObjectCache::attachWrapper): Deleted.
2122         * accessibility/AXTextStateChangeIntent.h: Added.
2123         (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
2124         * accessibility/AccessibilityNodeObject.cpp:
2125         (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
2126         * accessibility/AccessibilityNodeObject.h:
2127         * accessibility/AccessibilityObject.cpp:
2128         (WebCore::AccessibilityObject::isContainedByPasswordField):
2129         * accessibility/AccessibilityObject.h:
2130         (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
2131         (WebCore::AccessibilityObject::isPasswordField): Deleted.
2132         * accessibility/AccessibilityRenderObject.cpp:
2133         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
2134         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
2135         * accessibility/AccessibilityScrollView.h:
2136         * accessibility/atk/AXObjectCacheAtk.cpp:
2137         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
2138         * accessibility/ios/AXObjectCacheIOS.mm:
2139         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2140         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2141         * accessibility/mac/AXObjectCacheMac.mm:
2142         (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
2143         (WebCore::AXPostNotificationWithUserInfo):
2144         (WebCore::AXObjectCache::postPlatformNotification):
2145         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2146         (WebCore::textReplacementChangeDictionary):
2147         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2148         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
2149         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
2150         (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
2151         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
2152         (arrayRemovingNonJSONTypes):
2153         (dictionaryRemovingNonJSONTypes):
2154         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
2155         * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
2156         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2157         (textMarkerRangeFromVisiblePositions):
2158         (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
2159         * editing/AppendNodeCommand.cpp:
2160         (WebCore::AppendNodeCommand::AppendNodeCommand):
2161         (WebCore::sendAXTextChangedIgnoringLineBreaks):
2162         (WebCore::AppendNodeCommand::doApply):
2163         (WebCore::AppendNodeCommand::doUnapply):
2164         * editing/AppendNodeCommand.h:
2165         (WebCore::AppendNodeCommand::create):
2166         * editing/ApplyStyleCommand.cpp:
2167         (WebCore::ApplyStyleCommand::ApplyStyleCommand):
2168         (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
2169         * editing/ApplyStyleCommand.h:
2170         * editing/CompositeEditCommand.cpp:
2171         (WebCore::EditCommandComposition::unapplyEditType):
2172         (WebCore::CompositeEditCommand::CompositeEditCommand):
2173         (WebCore::CompositeEditCommand::apply):
2174         (WebCore::CompositeEditCommand::insertParagraphSeparator):
2175         (WebCore::CompositeEditCommand::insertNodeBefore):
2176         (WebCore::CompositeEditCommand::appendNode):
2177         (WebCore::CompositeEditCommand::removeNodePreservingChildren):
2178         (WebCore::CompositeEditCommand::insertTextIntoNode):
2179         (WebCore::CompositeEditCommand::deleteTextFromNode):
2180         (WebCore::CompositeEditCommand::replaceTextInNode):
2181         (WebCore::CompositeEditCommand::moveParagraphs):
2182         (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
2183         (WebCore::CompositeEditCommand::applyStyle): Deleted.
2184         (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
2185         (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
2186         (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
2187         (WebCore::CompositeEditCommand::inputText): Deleted.
2188         * editing/CompositeEditCommand.h:
2189         * editing/DeleteFromTextNodeCommand.cpp:
2190         (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
2191         (WebCore::DeleteFromTextNodeCommand::doApply):
2192         (WebCore::DeleteFromTextNodeCommand::doUnapply):
2193         * editing/DeleteFromTextNodeCommand.h:
2194         (WebCore::DeleteFromTextNodeCommand::create):
2195         (WebCore::DeleteFromTextNodeCommand::deletedText):
2196         * editing/DeleteSelectionCommand.cpp:
2197         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
2198         (WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
2199         * editing/DeleteSelectionCommand.h:
2200         (WebCore::DeleteSelectionCommand::create):
2201         * editing/DictationCommand.cpp:
2202         (WebCore::DictationCommand::insertTextRunWithoutNewlines):
2203         (WebCore::DictationCommand::insertParagraphSeparator):
2204         * editing/EditAction.h:
2205         * editing/EditCommand.cpp:
2206         (WebCore::EditCommand::EditCommand):
2207         (WebCore::EditCommand::editingAction):
2208         (WebCore::EditCommand::applyEditType):
2209         (WebCore::EditCommand::unapplyEditType):
2210         (WebCore::SimpleEditCommand::SimpleEditCommand):
2211         (WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
2212         (WebCore::EditCommand::setParent): Deleted.
2213         * editing/EditCommand.h:
2214         * editing/EditingAllInOne.cpp:
2215         * editing/Editor.cpp:
2216         (WebCore::Editor::handleTextEvent):
2217         (WebCore::Editor::deleteSelectionWithSmartDelete):
2218         (WebCore::Editor::replaceSelectionWithFragment):
2219         (WebCore::Editor::replaceSelectionWithText):
2220         (WebCore::Editor::appliedEditing):
2221         (WebCore::Editor::unappliedEditing):
2222         (WebCore::Editor::performCutOrCopy):
2223         (WebCore::Editor::markMisspellingsAfterTypingToWord):
2224         (WebCore::Editor::changeBackToReplacedString):
2225         (WebCore::Editor::transpose):
2226         (WebCore::Editor::changeSelectionAfterCommand):
2227         * editing/Editor.h:
2228         * editing/EditorCommand.cpp:
2229         (WebCore::executeInsertFragment):
2230         * editing/FrameSelection.cpp:
2231         (WebCore::FrameSelection::moveTo):
2232         (WebCore::FrameSelection::moveWithoutValidationTo):
2233         (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
2234         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
2235         (WebCore::FrameSelection::setSelection):
2236         (WebCore::FrameSelection::updateAndRevealSelection):
2237         (WebCore::isBoundary):
2238         (WebCore::FrameSelection::textSelectionIntent):
2239         (WebCore::FrameSelection::modify):
2240         (WebCore::FrameSelection::selectAll):
2241         (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
2242         (WebCore::FrameSelection::modifyMovingBackward): Deleted.
2243         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
2244         (WebCore::FrameSelection::selectionAtWordStart): Deleted.
2245         * editing/FrameSelection.h:
2246         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2247         (WebCore::FrameSelection::selection): Deleted.
2248         * editing/InsertIntoTextNodeCommand.cpp:
2249         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
2250         (WebCore::InsertIntoTextNodeCommand::doApply):
2251         (WebCore::InsertIntoTextNodeCommand::doUnapply):
2252         * editing/InsertIntoTextNodeCommand.h:
2253         (WebCore::InsertIntoTextNodeCommand::create):
2254         (WebCore::InsertIntoTextNodeCommand::insertedText):
2255         * editing/InsertNodeBeforeCommand.cpp:
2256         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
2257         (WebCore::InsertNodeBeforeCommand::doApply):
2258         (WebCore::InsertNodeBeforeCommand::doUnapply):
2259         * editing/InsertNodeBeforeCommand.h:
2260         (WebCore::InsertNodeBeforeCommand::create):
2261         * editing/InsertParagraphSeparatorCommand.cpp:
2262         (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
2263         * editing/InsertParagraphSeparatorCommand.h:
2264         (WebCore::InsertParagraphSeparatorCommand::create):
2265         * editing/InsertTextCommand.cpp:
2266         (WebCore::InsertTextCommand::InsertTextCommand):
2267         * editing/InsertTextCommand.h:
2268         (WebCore::InsertTextCommand::create):
2269         (WebCore::InsertTextCommand::createWithMarkerSupplier):
2270         * editing/MoveSelectionCommand.cpp:
2271         (WebCore::MoveSelectionCommand::doApply):
2272         * editing/RemoveNodePreservingChildrenCommand.cpp:
2273         (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
2274         * editing/RemoveNodePreservingChildrenCommand.h:
2275         (WebCore::RemoveNodePreservingChildrenCommand::create):
2276         * editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
2277         (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
2278         (WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
2279         * editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
2280         * editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
2281         (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
2282         (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
2283         * editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
2284         * editing/ReplaceSelectionCommand.cpp:
2285         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
2286         (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
2287         (WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
2288         * editing/ReplaceSelectionCommand.h:
2289         (WebCore::ReplaceSelectionCommand::create):
2290         * editing/TypingCommand.cpp:
2291         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
2292         (WebCore::TypingCommand::insertParagraphSeparator):
2293         * editing/atk/FrameSelectionAtk.cpp:
2294         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2295         * editing/ios/DictationCommandIOS.cpp:
2296         (WebCore::DictationCommandIOS::DictationCommandIOS):
2297         * editing/ios/DictationCommandIOS.h:
2298         * editing/mac/FrameSelectionMac.mm:
2299         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
2300         * html/HTMLTextFormControlElement.cpp:
2301         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
2302         * page/DragController.cpp:
2303         (WebCore::DragController::concludeEditDrag):
2304         * page/EventHandler.cpp:
2305         (WebCore::setInitialKeyboardSelection):
2306         * page/FocusController.cpp:
2307         (WebCore::FocusController::advanceFocusInDocumentOrder):
2308
2309 2015-04-26  Darin Adler  <darin@apple.com>
2310
2311         REGRESSION (r176751): line-height ignored in <button> elements
2312         https://bugs.webkit.org/show_bug.cgi?id=144234
2313
2314         Reviewed by Antti Koivisto.
2315
2316         Test: fast/forms/button-line-height.html
2317
2318         The theme code was overriding line heights on all themed form controls.
2319         Instead it should have only overridden line height when the theme overrides the font.
2320         For <input type=button> on Mac, the theme always overrides the font, but for
2321         other elements like <button> it does not.
2322
2323         * platform/Theme.h: Changed controlFont to return an Optional so we can tell
2324         when the theme is overriding the font. Otherwise if the font from the user-agent
2325         style sheet and the font from the theme are the same, we will think we are not
2326         overriding the font when we actually are.
2327
2328         * platform/mac/ThemeMac.h: Updated controlFont to return Optional.
2329         * platform/mac/ThemeMac.mm:
2330         (WebCore::ThemeMac::controlFont): Ditto.
2331
2332         * rendering/RenderTheme.cpp:
2333         (WebCore::RenderTheme::adjustStyle): Set line height only if the font is
2334         overriden by the theme, all the time for PushButtonPart on Mac, and not at all
2335         for other parts. Also tightened up the logic a little since RenderStyle's
2336         setFontDescription already does an "==" comparison; we don't have to do
2337         that twice.
2338
2339 2015-04-26  Darin Adler  <darin@apple.com>
2340
2341         REGRESSION (r173801): Use after free in WebCore::NotificationCenter::~NotificationCenter
2342         https://bugs.webkit.org/show_bug.cgi?id=137163
2343
2344         Reviewed by Andy Estes.
2345
2346         Test: fast/notifications/request-notification-permission-while-reloading.html
2347
2348         The test doesn't crash under WebKit2, but that's still OK for our purposes.
2349
2350         * Modules/notifications/NotificationCenter.cpp:
2351         (WebCore::NotificationCenter::NotificationCenter): Initialize m_timer.
2352         (WebCore::NotificationCenter::createNotification): Moved here from the header.
2353         (WebCore::NotificationCenter::requestPermission): Start the timer and ref the notification
2354         center when we need to defer a callback. Also use a lambda for the callback and changed
2355         the argument to match what the bindings actually pass. Before we said PassRefPtr, but the
2356         bindings were not transferring ownership of the VoidCallback. The new type is a little
2357         strange but it's consistent with how the bindings work right now.
2358         (WebCore::NotificationCenter::timerFired): Added. Calls all the callbacks, then does a deref
2359         to match the ref we did above.
2360         (WebCore::NotificationCenter::requestTimedOut): Deleted.
2361         (WebCore::NotificationCenter::NotificationRequestCallback::createAndStartTimer): Deleted.
2362         (WebCore::NotificationCenter::NotificationRequestCallback::NotificationRequestCallback): Deleted.
2363         (WebCore::NotificationCenter::NotificationRequestCallback::startTimer): Deleted.
2364         (WebCore::NotificationCenter::NotificationRequestCallback::timerFired): Deleted.
2365
2366         * Modules/notifications/NotificationCenter.h: Reorganized the header to be a bit more tidy.
2367         Changed the argument type for requestPermission to match the reality of what's passed by the
2368         bindings. Removed NotificationRequestCallback and replaced the m_callbacks HashSet with a
2369         vector of std::function.
2370
2371 2015-04-26  Simon Fraser  <simon.fraser@apple.com>
2372
2373         Modernize animations code
2374         https://bugs.webkit.org/show_bug.cgi?id=144196
2375
2376         Reviewed by Darin Adler.
2377         
2378         General cleanup in animation-related code.
2379         
2380         Use C++ references where possible. Use modern loops. Make classes fast-allocated.
2381         Use C++11 member initialization. Order member variables to optimize packing.
2382         
2383         This removes some null checks in CompositeAnimation, but the values in m_transitions
2384         and m_keyframeAnimations can never be null.
2385         
2386         No behavior change.
2387
2388         * page/animation/AnimationBase.cpp:
2389         (WebCore::AnimationBase::AnimationBase):
2390         (WebCore::AnimationBase::animationsMatch):
2391         (WebCore::AnimationBase::updateStateMachine):
2392         (WebCore::AnimationBase::fireAnimationEventsIfNeeded):
2393         (WebCore::AnimationBase::beginAnimationUpdateTime):
2394         (WebCore::AnimationBase::getElapsedTime):
2395         * page/animation/AnimationBase.h:
2396         (WebCore::AnimationBase::animation):
2397         (WebCore::AnimationBase::setAnimation):
2398         * page/animation/AnimationController.cpp:
2399         (WebCore::AnimationControllerPrivate::ensureCompositeAnimation):
2400         (WebCore::AnimationControllerPrivate::addToAnimationsWaitingForStartTimeResponse):
2401         * page/animation/CompositeAnimation.cpp:
2402         (WebCore::CompositeAnimation::CompositeAnimation):
2403         (WebCore::CompositeAnimation::clearRenderer):
2404         (WebCore::CompositeAnimation::updateTransitions):
2405         (WebCore::CompositeAnimation::updateKeyframeAnimations):
2406         (WebCore::CompositeAnimation::animate):
2407         (WebCore::CompositeAnimation::getAnimatedStyle):
2408         (WebCore::CompositeAnimation::timeToNextService):
2409         (WebCore::CompositeAnimation::getAnimationForProperty):
2410         (WebCore::CompositeAnimation::computeExtentOfTransformAnimation):
2411         (WebCore::CompositeAnimation::suspendAnimations):
2412         (WebCore::CompositeAnimation::resumeAnimations):
2413         (WebCore::CompositeAnimation::overrideImplicitAnimations):
2414         (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
2415         (WebCore::CompositeAnimation::isAnimatingProperty):
2416         (WebCore::CompositeAnimation::pauseTransitionAtTime):
2417         (WebCore::CompositeAnimation::numberOfActiveAnimations):
2418         * page/animation/CompositeAnimation.h:
2419         (WebCore::CompositeAnimation::create):
2420         (WebCore::CompositeAnimation::animationController):
2421         * page/animation/ImplicitAnimation.cpp:
2422         (WebCore::ImplicitAnimation::ImplicitAnimation):
2423         (WebCore::ImplicitAnimation::sendTransitionEvent):
2424         * page/animation/ImplicitAnimation.h:
2425         (WebCore::ImplicitAnimation::create):
2426         * page/animation/KeyframeAnimation.cpp:
2427         (WebCore::KeyframeAnimation::KeyframeAnimation):
2428         (WebCore::KeyframeAnimation::animate):
2429         (WebCore::KeyframeAnimation::getAnimatedStyle):
2430         (WebCore::KeyframeAnimation::computeExtentOfTransformAnimation):
2431         (WebCore::KeyframeAnimation::startAnimation):
2432         (WebCore::KeyframeAnimation::sendAnimationEvent):
2433         (WebCore::KeyframeAnimation::overrideAnimations):
2434         (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
2435         (WebCore::KeyframeAnimation::timeToNextService):
2436         * page/animation/KeyframeAnimation.h:
2437         * platform/animation/Animation.cpp:
2438         (WebCore::Animation::animationsMatch):
2439         * platform/animation/Animation.h:
2440         * rendering/RenderLayer.cpp:
2441         (WebCore::RenderLayer::paint):
2442         (WebCore::performOverlapTests):
2443         * rendering/style/KeyframeList.h:
2444         (WebCore::KeyframeList::properties):
2445         (WebCore::KeyframeList::keyframes):
2446         (WebCore::KeyframeList::beginProperties): Deleted.
2447         (WebCore::KeyframeList::endProperties): Deleted.
2448         (WebCore::KeyframeList::operator[]): Deleted.
2449         * rendering/style/RenderStyle.h:
2450
2451 2015-04-25  Simon Fraser  <simon.fraser@apple.com>
2452
2453         Expand compositing coverage rect when scrolling and animating
2454         https://bugs.webkit.org/show_bug.cgi?id=144214
2455         rdar://problem/20695926
2456
2457         Reviewed by Darin Adler.
2458         
2459         r183300 added a secondary rect that gets mapped through graphics layers during
2460         layer flushing, which represents a rect, in layer coordinates, that represents
2461         the portion of this layer that's visible in the viewport.
2462         
2463         This patch extends that rect based on scrolling and animating, with the extended
2464         coverage rect being mapped into descendants (where it's used to determine whether
2465         they should detach their backing store). This required moving the responsibility for
2466         extending the coverage rect from TileController (where it was used to compute
2467         tiled extent), to GraphicsLayerCA. Thus, GraphicsLayerCA now owns the concept
2468         of coverage rect, and pushes it onto TileControllers.
2469
2470         Test: compositing/tiling/transform-origin-tiled.html
2471
2472         * platform/graphics/TiledBacking.h: Coverage rect is now pushed onto
2473         TiledBacking from outside; new functions reflect that.
2474         * platform/graphics/ca/GraphicsLayerCA.cpp:
2475         (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly): No need to pass
2476         old visible rect to commitLayerChangesBeforeSublayers.
2477         (WebCore::accumulatesTransform):
2478         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush): Now calls computeVisibleAndCoverageRect(),
2479         then adjustCoverageRect() which adjusts for scrolling and animations.
2480         (WebCore::GraphicsLayerCA::computeVisibleAndCoverageRect): Fetch the coverage rect from the
2481         TransformState, but we can only use this if mapping it through various transforms didn't clamp
2482         it (which can happen with severe rotations in perspective).
2483         (WebCore::GraphicsLayerCA::adjustCoverageRect): If this layer represents the page tiled backing,
2484         ask the TileController to do coverage adjustment (code which should move into here eventually).
2485         For other tiled layers, do motion-based adjustment. This should really be done for all layers
2486         (an animating non-tiled layer may contain a tiled layer).
2487         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): The VisibleRectChanged wasn't needed
2488         any more; layers only react to changed in coverage rect now.
2489         (WebCore::GraphicsLayerCA::recursiveCommitChanges): If adjustCoverageRect() changed the
2490         coverage rect, here we push the new rect back into the TransformState so it will affect
2491         descendants.
2492         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2493         (WebCore::GraphicsLayerCA::updateCoverage): Coverage and backing store attachment go
2494         hand-in-hand now.
2495         (WebCore::GraphicsLayerCA::changeLayerTypeTo):
2496         (WebCore::GraphicsLayerCA::computeVisibleRect): Deleted.
2497         (WebCore::GraphicsLayerCA::updateBackingStoreAttachment): Deleted.
2498         (WebCore::GraphicsLayerCA::updateVisibleRect): Deleted.
2499         * platform/graphics/ca/GraphicsLayerCA.h:
2500         * platform/graphics/ca/TileController.cpp:
2501         (WebCore::TileController::setVisibleRect): Visible rect is only used for scroll performance
2502         logging now.
2503         (WebCore::TileController::setCoverageRect):
2504         (WebCore::TileController::tilesWouldChangeForCoverageRect):
2505         (WebCore::TileController::revalidateTiles):
2506         (WebCore::TileController::boundsForSize): This is required because when computeTileCoverageRect()
2507         is called at the top of committing the owning layer, we haven't yet pushed a new size to the
2508         underlying platform layer (which TileController::bounds() consults).
2509         (WebCore::TileController::bounds):
2510         (WebCore::TileController::computeTileCoverageRect): Have to push the new size in, since the
2511         underlying layer hasn't been updated yet.
2512         (WebCore::TileController::didRevalidateTiles):
2513         (WebCore::TileController::tilesWouldChangeForVisibleRect): Deleted.
2514         * platform/graphics/ca/TileController.h:
2515         * platform/graphics/ca/TileCoverageMap.cpp:
2516         (WebCore::TileCoverageMap::TileCoverageMap): Add a layer to the tile map that shows 
2517         a dark blue outline for the coverage rect.
2518         (WebCore::TileCoverageMap::update): Fix some minor issues with map position when top
2519         content inset is non-zero.
2520         * platform/graphics/ca/TileCoverageMap.h:
2521         * platform/graphics/ca/TileGrid.cpp: Everything is in terms of coverage rect now.
2522         (WebCore::TileGrid::tilesWouldChangeForCoverageRect):
2523         (WebCore::TileGrid::revalidateTiles):
2524         (WebCore::TileGrid::tilesWouldChangeForVisibleRect): Deleted.
2525         * platform/graphics/ca/TileGrid.h:
2526         * platform/graphics/transforms/TransformState.cpp:
2527         (WebCore::TransformState::operator=):
2528         (WebCore::TransformState::mappedQuad): Pass direction into mapQuad().
2529         (WebCore::TransformState::mappedSecondaryQuad): Ditto.
2530         (WebCore::TransformState::setLastPlanarSecondaryQuad): This function allows a caller
2531         to pass in a secondary quad, and get it mapped into the coordinate space of the last
2532         "flattening" state (since the TransformState may have in-flight XY offset, or transform).
2533         This mapping is achieved by re-using mapQuad(), but in the inverse direction.
2534         (WebCore::TransformState::mapQuad): Make direction a parameter.
2535         (WebCore::TransformState::flattenWithTransform): This code omitted to map the secondary
2536         quad. Failure was detected by tests.
2537         * platform/graphics/transforms/TransformState.h:
2538         (WebCore::TransformState::isMappingSecondaryQuad):
2539         (WebCore::TransformState::direction):
2540         (WebCore::TransformState::inverseDirection):
2541         (WebCore::TransformState::lastPlanarSecondaryQuad): Deleted.
2542
2543 2015-04-25  Dan Bernstein  <mitz@apple.com>
2544
2545         Updated expected bindings generation test results after r183343.
2546
2547         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.h:
2548         * bindings/scripts/test/ObjC/DOMTestCallback.h:
2549         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.h:
2550         * bindings/scripts/test/ObjC/DOMTestEventConstructor.h:
2551         * bindings/scripts/test/ObjC/DOMTestEventTarget.h:
2552         * bindings/scripts/test/ObjC/DOMTestException.h:
2553         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.h:
2554         * bindings/scripts/test/ObjC/DOMTestInterface.h:
2555         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.h:
2556         * bindings/scripts/test/ObjC/DOMTestNamedConstructor.h:
2557         * bindings/scripts/test/ObjC/DOMTestNode.h:
2558         * bindings/scripts/test/ObjC/DOMTestNondeterministic.h:
2559         * bindings/scripts/test/ObjC/DOMTestObj.h:
2560         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.h:
2561         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.h:
2562         * bindings/scripts/test/ObjC/DOMTestTypedefs.h:
2563         * bindings/scripts/test/ObjC/DOMattribute.h:
2564         * bindings/scripts/test/ObjC/DOMreadonly.h:
2565
2566 2015-04-25  Myles C. Maxfield  <mmaxfield@apple.com>
2567
2568         font-synthesis's initial value is "style weight"
2569         https://bugs.webkit.org/show_bug.cgi?id=144195
2570
2571         Reviewed by Darin Adler.
2572
2573         Updated fast/css3-text/font-synthesis-parse.html.
2574
2575         * rendering/style/RenderStyle.h:
2576
2577 2015-04-25  Commit Queue  <commit-queue@webkit.org>
2578
2579         Unreviewed, rolling out r183305.
2580         https://bugs.webkit.org/show_bug.cgi?id=144213
2581
2582         Crashes on wikipedia (Requested by litherum on #webkit).
2583
2584         Reverted changeset:
2585
2586         "[Cocoa] FontPlatformData's equality check should always use
2587         reference URLs"
2588         https://bugs.webkit.org/show_bug.cgi?id=144168
2589         http://trac.webkit.org/changeset/183305
2590
2591 2015-04-25  Dan Bernstein  <mitz@apple.com>
2592
2593         WebCore part of <rdar://problem/20697966> Avoid using TBD as an argument to NS_AVAILABLE
2594         https://bugs.webkit.org/show_bug.cgi?id=144201
2595
2596         Reviewed by Darin Adler.
2597
2598         Instead of TBD, use the high version number to which it corresponds in CFAvailability.h,
2599         9876.5.
2600
2601         * bindings/objc/WebKitAvailability.h: Added a definition of __NSi_9876_5, so that we can
2602         use 9876_5 in availability macros. Removed the definition of
2603         __AVAILABILITY_INTERNAL__MAC_TBD, which will no longer be used.
2604
2605         * bindings/scripts/CodeGeneratorObjC.pm:
2606         (ReadPublicInterfaces): Use 9876_5 instead of TBD.
2607
2608 2015-04-25  Timothy Hatcher  <timothy@apple.com>
2609
2610         Update localized strings.
2611
2612         * English.lproj/Localizable.strings: Updated.
2613
2614 2015-04-25  Darin Adler  <darin@apple.com>
2615
2616         Crash if IDBTransaction is aborted right after it's created
2617         https://bugs.webkit.org/show_bug.cgi?id=144199
2618
2619         Reviewed by Simon Fraser.
2620
2621         Test: storage/indexeddb/transaction-abort.html
2622
2623         * Modules/indexeddb/IDBTransactionBackend.cpp:
2624         (WebCore::IDBTransactionBackend::IDBTransactionBackend): Don't start the
2625         transaction if it is already complete (has been aborted).
2626
2627 2015-04-25  Martin Robinson  <mrobinson@igalia.com>
2628
2629         Rename ENABLE_3D_RENDERING to ENABLE_3D_TRANSFORMS
2630         https://bugs.webkit.org/show_bug.cgi?id=144182
2631
2632         Reviewed by Simon Fraser.
2633
2634         * Configurations/FeatureDefines.xcconfig: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2635         * WebCore.vcxproj/WebCoreCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2636         * WebCore.vcxproj/WebCoreTestSupportCommon.props: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2637         * css/CSSComputedStyleDeclaration.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2638         * css/MediaQueryEvaluator.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2639         * platform/graphics/GraphicsContext.h: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2640         * platform/graphics/cairo/GraphicsContextCairo.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2641         * platform/graphics/texmap/TextureMapperImageBuffer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2642         * rendering/RenderLayer.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2643         * rendering/RenderLayerCompositor.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2644         * rendering/RenderObject.cpp: Replace all instances of 3D_RENDERING with 3D_TRANSFORMS.
2645
2646 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
2647
2648         [Cocoa] FontPlatformData's equality check should always use reference URLs
2649         https://bugs.webkit.org/show_bug.cgi?id=144168
2650
2651         Reviewed by Tim Horton.
2652
2653         <rdar://problem/18985642> is not fixed, so we need to continue using the older
2654         objectForEqualityCheck().
2655
2656         No new tests because there is no behavior change.
2657
2658         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2659         (WebCore::FontPlatformData::objectForEqualityCheck):
2660
2661 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
2662
2663         Implement parsing support for font-synthesis CSS property
2664         https://bugs.webkit.org/show_bug.cgi?id=144180
2665         <rdar://problem/20692791>
2666         <rdar://problem/20625024>
2667
2668         Reviewed by Tim Horton.
2669
2670         See http://www.w3.org/TR/css-fonts-3/#font-synthesis-prop
2671
2672         This property allows web authors to opt out of font synthesis. This patch only
2673         implements parsing support for the property.
2674
2675         Test: fast/css3-text/font-synthesis-parse.html
2676
2677         * css/CSSComputedStyleDeclaration.cpp:
2678         (WebCore::fontSynthesisFromStyle): Create a CSSValue for the existing style object.
2679         (WebCore::ComputedStyleExtractor::propertyValue): Call fontSynthesisFromStyle().
2680         * css/CSSParser.cpp:
2681         (WebCore::CSSParser::parseValue): Call parseFontSynthesis().
2682         (WebCore::CSSParser::parseFontSynthesis): Accept the grammar
2683         "none | [ weight || style ]"
2684         * css/CSSParser.h: Function signature.
2685         * css/CSSPropertyNames.in: New CSS property name.
2686         * css/CSSValueKeywords.in: New CSS value names.
2687         * css/StyleBuilderCustom.h:
2688         (WebCore::StyleBuilderCustom::applyValueFontSynthesis): Construct an internal
2689         representation of font-synthesis for a given CSSValue.
2690         * rendering/style/RenderStyle.h: Function signature.
2691         * rendering/style/RenderStyleConstants.h: Internal representation of
2692         font-synthesis.
2693         * rendering/style/StyleRareInheritedData.h: Where we actually store the bits
2694         related to this internal representation.
2695
2696 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
2697
2698         Have the web inspector report accurate memory use for layers with detached backing store
2699         https://bugs.webkit.org/show_bug.cgi?id=144179
2700
2701         Reviewed by Dean Jackson.
2702
2703         Only report memory use for layers whose backing store is attached.
2704
2705         * platform/graphics/ca/GraphicsLayerCA.cpp:
2706         * platform/graphics/ca/PlatformCALayer.h: Add backingContributesToMemoryEstimate()
2707         which platforms can override if they allow backing store detaching.
2708
2709 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
2710
2711         Track a coverage rect through GraphicsLayerCA flushes, use it to mark backing store attached
2712         https://bugs.webkit.org/show_bug.cgi?id=144165
2713
2714         Reviewed by Dean Jackson.
2715         
2716         Push in the clipRect as the secondary rect when doing a GraphicsLayerCA flush,
2717         which maps this rect through all the layers. Each layer tests intersection with
2718         this rect to determine if its backing store should be attached.
2719         
2720         This will cause us to drop backing store for layers that don't intersect the
2721         visible part of the view, which is too aggressive. A future patch will add
2722         some padding.
2723
2724         Tests: compositing/visible-rect/coverage-clipped.html
2725                compositing/visible-rect/coverage-scrolling.html
2726
2727         * platform/graphics/ca/GraphicsLayerCA.cpp:
2728         (WebCore::GraphicsLayerCA::GraphicsLayerCA): Remove initialization of things with
2729         C++11 initializers. Initialize the new m_intersectsCoverageRect bit.
2730         (WebCore::GraphicsLayerCA::flushCompositingState): Push the clipRect in as the
2731         secondary coverage rect. A future patch will inflate this on the way down the tree.
2732         (WebCore::GraphicsLayerCA::computeVisibleRect): If we're clipping, and
2733         we have a secondary coverage rect, that rect can be clipped to us too.
2734         (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects):
2735         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2736         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
2737         (WebCore::GraphicsLayerCA::updateBackingStoreAttachment):
2738         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
2739         * platform/graphics/ca/GraphicsLayerCA.h: New CoverageRectChanged bit.
2740         Use more C++11 initializers.
2741         (WebCore::GraphicsLayerCA::coverageRect):
2742
2743 2015-04-24  Dean Jackson  <dino@apple.com>
2744
2745         AnimationController::scrollWasUpdated() shows up in scrolling profiles on pages that don't use scroll triggers
2746         https://bugs.webkit.org/show_bug.cgi?id=144173
2747         <rdar://problem/20526168>
2748
2749         Reviewed by Simon Fraser.
2750
2751         Keep a list of Animations that care about scroll updates, and only
2752         run the animation update if the list is not empty.
2753
2754         Covered by existing tests.
2755
2756         * page/animation/AnimationBase.cpp:
2757         (WebCore::AnimationBase::updateStateMachine): Tell the AnimationController
2758         if this is an animation that depends on scrolling.
2759         * page/animation/AnimationController.cpp:
2760         (WebCore::AnimationControllerPrivate::animationWillBeRemoved): Call the
2761         new removeFromAnimationsDependentOnScroll as this animation is deleted.
2762         (WebCore::AnimationControllerPrivate::addToAnimationsDependentOnScroll):
2763         (WebCore::AnimationControllerPrivate::removeFromAnimationsDependentOnScroll):
2764         (WebCore::AnimationControllerPrivate::scrollWasUpdated): Only update if
2765         there are animations that care.
2766         (WebCore::AnimationController::wantsScrollUpdates): Helper to expose this
2767         value to FrameView.
2768         * page/animation/AnimationController.h:
2769         * page/animation/AnimationControllerPrivate.h:
2770         (WebCore::AnimationControllerPrivate::wantsScrollUpdates):
2771
2772 2015-04-24  Tim Horton  <timothy_horton@apple.com>
2773
2774         WKPDFView does not support password-protected PDFs
2775         https://bugs.webkit.org/show_bug.cgi?id=144162
2776         <rdar://problem/18411512>
2777
2778         Reviewed by Andy Estes.
2779
2780         * English.lproj/Localizable.strings:
2781         Add some localizable strings.
2782
2783 2015-04-24  David Kilzer  <ddkilzer@apple.com>
2784
2785         Fix iOS EWS builds after updating to iOS 8.3 SDK
2786
2787         * platform/spi/cocoa/CoreTextSPI.h:
2788         * rendering/RenderThemeIOS.mm:
2789         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
2790         - Update __IPHONE_OS_VERSION_MIN_REQUIRED for these constants.
2791
2792 2015-04-24  Jer Noble  <jer.noble@apple.com>
2793
2794         Unreviewed iOS build fix; add declarations to AVKitSPI.h
2795
2796         * platform/spi/cocoa/AVKitSPI.h:
2797
2798 2015-04-24  Enrica Casucci  <enrica@apple.com>
2799
2800         Make rangeExpandedAroundPositionByCharacters to all platforms.
2801         https://bugs.webkit.org/show_bug.cgi?id=144161
2802
2803         Reviewed by Tim Horton.
2804
2805         No change in functionality, simply making this available
2806         to all platforms.
2807
2808         * editing/VisibleUnits.cpp:
2809         (WebCore::rangeExpandedAroundPositionByCharacters):
2810         * editing/VisibleUnits.h:
2811         * editing/mac/DataDetection.mm:
2812         * editing/mac/DictionaryLookup.h:
2813         * editing/mac/DictionaryLookup.mm:
2814         (WebCore::rangeExpandedAroundPositionByCharacters): Deleted.
2815
2816 2015-04-24  Andreas Kling  <akling@apple.com>
2817
2818         Purge PassRefPtr from NamedNodeMap.
2819         <https://webkit.org/b/144091>
2820
2821         Reviewed by Antti Koivisto.
2822
2823         Use RefPtr instead of PassRefPtr in NamedNodeMap.
2824
2825         * dom/NamedNodeMap.cpp:
2826         (WebCore::NamedNodeMap::getNamedItem):
2827         (WebCore::NamedNodeMap::getNamedItemNS):
2828         (WebCore::NamedNodeMap::removeNamedItem):
2829         (WebCore::NamedNodeMap::removeNamedItemNS):
2830         (WebCore::NamedNodeMap::setNamedItem):
2831         (WebCore::NamedNodeMap::setNamedItemNS):
2832         (WebCore::NamedNodeMap::item):
2833         * dom/NamedNodeMap.h:
2834
2835 2015-04-24  Commit Queue  <commit-queue@webkit.org>
2836
2837         Unreviewed, rolling out r183266.
2838         https://bugs.webkit.org/show_bug.cgi?id=144164
2839
2840         Broke 32-bit build and a test. (Requested by ap on #webkit).
2841
2842         Reverted changeset:
2843
2844         "AX: richer text change notifications (142719)"
2845         https://bugs.webkit.org/show_bug.cgi?id=142719
2846         http://trac.webkit.org/changeset/183266
2847
2848 2015-04-24  Brady Eidson  <beidson@apple.com>
2849
2850         Origin header is preserved on cross-origin redirects.
2851         https://bugs.webkit.org/show_bug.cgi?id=144157.
2852
2853         Reviewed by Sam Weinig.
2854
2855         Tests: http/tests/security/cors-post-redirect-301.html
2856                http/tests/security/cors-post-redirect-302.html
2857                http/tests/security/cors-post-redirect-307.html
2858                http/tests/security/cors-post-redirect-308.html
2859
2860         * platform/network/cf/ResourceHandleCFNet.cpp:
2861         (WebCore::ResourceHandle::willSendRequest): Always clear any origin header for cross-origin redirects.
2862         * platform/network/mac/ResourceHandleMac.mm:
2863         (WebCore::ResourceHandle::willSendRequest): Ditto.
2864
2865 2015-04-24  Brent Fulgham  <bfulgham@apple.com>
2866
2867         Immediate action not functional for embedded PDFs
2868         https://bugs.webkit.org/show_bug.cgi?id=143952
2869         <rdar://problem/19842365>        
2870
2871         Reviewed by Tim Horton.
2872
2873         Add a dictionary lookup method to allow us to retrieve
2874         relevant information for PDFs.
2875
2876         * editing/mac/DictionaryLookup.mm:
2877         (WebCore::dictionaryLookupForPDFSelection): Updated to properly handle cases
2878         where the Lookup engine selects a smaller range than the initial automatic
2879         selection performed on clicking.
2880
2881 2015-04-24  Simon Fraser  <simon.fraser@apple.com>
2882
2883         Make it possible to map a secondary quad through TransformState
2884         https://bugs.webkit.org/show_bug.cgi?id=144156
2885
2886         Reviewed by Dean Jackson.
2887
2888         A future patch will need to map two quads simultaneously through TransformState,
2889         so add the ability to provide an optional secondary quad.
2890         
2891         This patch also firms up the setQuad() contract, fixing webkit.org/b/106680,
2892         requiring the state to be flattened when setting the quad (and now, the secondary quad).
2893         Previously, setQuad implicitly flattened but failed to update m_mapPoint when
2894         doing so.
2895
2896         * platform/graphics/ca/GraphicsLayerCA.cpp:
2897         (WebCore::GraphicsLayerCA::computeVisibleRect): Now we have to explicitly flatten
2898         before setting the quad.
2899         * platform/graphics/ca/GraphicsLayerCA.h: Drive-up #include removal.
2900         * platform/graphics/transforms/TransformState.cpp:
2901         (WebCore::TransformState::operator=): Copy the secondary quad if we have one.
2902         (WebCore::TransformState::translateMappedCoordinates): Move the secondary quad
2903         if we have one.
2904         (WebCore::TransformState::mappedQuad): Code factored into mapQuad().
2905         (WebCore::TransformState::mappedSecondaryQuad): Return the secondary quad mapped
2906         into the state's current coordinate space.
2907         (WebCore::TransformState::mapQuad): Factored code.
2908         * platform/graphics/transforms/TransformState.h:
2909         (WebCore::TransformState::setQuad): Make the contract more explicit with assertions.
2910         (WebCore::TransformState::setSecondaryQuad): Ditto when setting the secondary quad.
2911         (WebCore::TransformState::lastPlanarSecondaryQuad):
2912         (WebCore::TransformState::lastPlanarQuad): Deleted.
2913
2914 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
2915
2916         [iOS] Reimplement r182512 and r183153 in a cleaner way
2917         https://bugs.webkit.org/show_bug.cgi?id=144151
2918
2919         Reviewed by Enrica Casucci.
2920
2921         On iOS, we create FontPlatformData's ctFont() by round tripping it through a CGFontRef.
2922         This causes the resultant ctFont() to lose system-font-ness. Patches r182512 and r183153
2923         react to this fact by making users of a FontPlatformData use the original font passed in
2924         to the FontPlatformData instead of the FontPlatformData's ctFont(), but only if we
2925         detect that the FontPlatformData represents a system font (the underlying APIs have
2926         different behavior for system fonts and non-system-fonts).
2927
2928         However, on OS X, we create a FontPlatformData's ctFont() directly from the original
2929         font passed in to the constructor. This preserves system-font-ness (because it no
2930         longer has the CGFontRef in the middle of the transformation). Therefore, OS X has the
2931         correct behavior regarding system fonts.
2932
2933         The difference between the two ctFont() creation codepaths seems to be historical
2934         rather than intentional. Rather than change all the call sites of ctFont() to use a
2935         different platform font object if a system font is detected, a cleaner solution is to
2936         simply unify the two ctFont() creation codepaths to the version which preserves system-
2937         font-ness. Doing this will make all users of FontPlatformData automatically have the
2938         correct behavior with no updates.
2939
2940         This patch reverts the relevant parts of r182512 and r183153 in favor of this new
2941         solution.
2942
2943         No new tests because there is no behavior change.
2944
2945         * platform/graphics/FontPlatformData.h:
2946         (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
2947         * platform/graphics/cocoa/FontCocoa.mm:
2948         (WebCore::Font::platformWidthForGlyph):
2949         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2950         (WebCore::FontPlatformData::ctFontSize):
2951         (WebCore::FontPlatformData::ctFont):
2952         * platform/graphics/mac/SimpleFontDataCoreText.cpp:
2953         (WebCore::Font::getCFStringAttributes):
2954
2955 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
2956
2957         Unreviewed build fix.
2958
2959         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2960         (WebCore::FontPlatformData::FontPlatformData):
2961
2962 2015-04-24  Myles C. Maxfield  <mmaxfield@apple.com>
2963
2964         [Cocoa] Start cleaning up FontPlatformData
2965         https://bugs.webkit.org/show_bug.cgi?id=144133
2966
2967         Reviewed by Enrica Casucci.
2968
2969         This is the start of a crusade to ultimately remove one of the CTFontRefs which we have inside
2970         FontPlatformData. This patch starts this effort out by removing the FontPlatformData
2971         constructor which accepts an NSFont. This constructor simply casts the NSFont to a CTFontRef,
2972         and forwards to another constructor. This patch moves this cast to callers of this constructor,
2973         thereby enumerating the places we have left that use NSFont with FontPlatformData.
2974
2975         This patch also cleans up two of the constructors in FontPlatformData.cpp to forward on to
2976         a common constructor.
2977
2978         This patch also collects places inside FontPlatformDataCocoa.mm where we check if a pointer is
2979         not 0 and not -1, and puts this common code inside a new function,
2980         FontPlatformData::isValidCTFontRef().
2981
2982         No new tests because there is no behavior change.
2983
2984         * platform/graphics/FontPlatformData.cpp:
2985         (WebCore::FontPlatformData::FontPlatformData): Coalesce constructors.
2986         * platform/graphics/FontPlatformData.h:
2987         (WebCore::FontPlatformData::isValidCTFontRef): Check if a pointer is not 0 and not -1.
2988         (WebCore::FontPlatformData::hashTableDeletedFontValue): Deleted.
2989         * platform/graphics/cocoa/FontCocoa.mm:
2990         (WebCore::Font::platformCreateScaledFont): Receive cast which has been hoisted from the deleted
2991         FontPlatformData constructor.
2992         (WebCore::Font::compositeFontReferenceFont): Ditto.
2993         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2994         (WebCore::FontPlatformData::~FontPlatformData): Use isValidCTFontRef().
2995         (WebCore::FontPlatformData::platformDataInit): Ditto.
2996         (WebCore::FontPlatformData::platformDataAssign): Ditto.
2997         (WebCore::FontPlatformData::platformIsEqual): Simplify preprocessor macros.
2998         (WebCore::FontPlatformData::allowsLigatures): Remove unnecessary NSFont use.
2999         (WebCore::FontPlatformData::FontPlatformData): Deleted.
3000         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
3001         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters): Remove unnecessary
3002         NSFont use.
3003         * platform/graphics/mac/FontCacheMac.mm:
3004         (WebCore::FontCache::systemFallbackForCharacters): Receive cast which has been hoisted from the
3005         deleted FontPlatformData constructor.
3006         (WebCore::FontCache::createFontPlatformData): Ditto.
3007         * platform/mac/DragImageMac.mm:
3008         (WebCore::fontFromNSFont): Ditto.
3009         (WebCore::widthWithFont): Ditto.
3010         (WebCore::drawAtPoint): Ditto.
3011
3012 2015-04-24  Doug Russell  <d_russell@apple.com>
3013
3014         AX: richer text change notifications (142719)
3015         https://bugs.webkit.org/show_bug.cgi?id=142719
3016
3017         Reviewed by Darin Adler.
3018
3019         Richer accessibility value change notifications. Introduce AXTextEditType, postTextStateChangeNotification and postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content. Also implement a mechanism to post value changes in password form fields in coalesced ticks to thwart analyzing the cadence of changes.
3020
3021         Richer accessibility selection change notifications. Introduce AXTextStateChangeIntent, and an overload of postTextReplacementNotification to give assistive tech apps more reliable context for responding to changes in web content selection. Also block posting selection changes on password fields.
3022
3023         Tests: platform/mac/accessibility/input-replacevalue-userinfo.html
3024                platform/mac/accessibility/selection-change-userinfo.html
3025                platform/mac/accessibility/value-change-userinfo.html
3026
3027         * CMakeLists.txt:
3028         * WebCore.vcxproj/WebCore.vcxproj:
3029         * WebCore.vcxproj/WebCore.vcxproj.filters:
3030         * WebCore.xcodeproj/project.pbxproj:
3031         * accessibility/AXObjectCache.cpp:
3032         (WebCore::AXObjectCache::AXObjectCache):
3033         (WebCore::AXObjectCache::notificationPostTimerFired):
3034         (WebCore::AXObjectCache::passwordNotificationPostTimerFired):
3035         (WebCore::AXObjectCache::showIntent):
3036         (WebCore::AXObjectCache::setTextSelectionIntent):
3037         (WebCore::isPasswordFieldOrContainedByPasswordField):
3038         (WebCore::AXObjectCache::postTextStateChangeNotification):
3039         (WebCore::AXObjectCache::postTextReplacementNotification):
3040         (WebCore::AXObjectCache::enqueuePasswordValueChangeNotification):
3041         (WebCore::AXObjectCache::rootWebArea):
3042         (WebCore::AXObjectCache::selectedChildrenChanged): Deleted.
3043         * accessibility/AXObjectCache.h:
3044         (WebCore::AXObjectCache::postTextStateChangeNotification):
3045         (WebCore::AXObjectCache::postTextReplacementNotification):
3046         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3047         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3048         (WebCore::AXObjectCache::textChangeForEditType):
3049         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
3050         (WebCore::AXObjectCache::computedObjectAttributeCache): Deleted.
3051         (WebCore::AXObjectCache::getOrCreate): Deleted.
3052         (WebCore::AXObjectCache::attachWrapper): Deleted.
3053         * accessibility/AXTextStateChangeIntent.h: Added.
3054         (WebCore::AXTextStateChangeIntent::AXTextStateChangeIntent):
3055         * accessibility/AccessibilityNodeObject.cpp:
3056         (WebCore::AccessibilityNodeObject::passwordFieldOrContainingPasswordField):
3057         * accessibility/AccessibilityNodeObject.h:
3058         * accessibility/AccessibilityObject.cpp:
3059         (WebCore::AccessibilityObject::isContainedByPasswordField):
3060         * accessibility/AccessibilityObject.h:
3061         (WebCore::AccessibilityObject::passwordFieldOrContainingPasswordField):
3062         (WebCore::AccessibilityObject::isPasswordField): Deleted.
3063         * accessibility/AccessibilityRenderObject.cpp:
3064         (WebCore::AccessibilityRenderObject::setSelectedTextRange):
3065         (WebCore::AccessibilityRenderObject::setSelectedVisiblePositionRange):
3066         * accessibility/AccessibilityScrollView.h:
3067         * accessibility/atk/AXObjectCacheAtk.cpp:
3068         (WebCore::AXObjectCache::textChangeForEditType):
3069         (WebCore::AXObjectCache::nodeTextChangePlatformNotification):
3070         (WebCore::AXObjectCache::postPlatformNotification): Deleted.
3071         * accessibility/ios/AXObjectCacheIOS.mm:
3072         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3073         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3074         * accessibility/mac/AXObjectCacheMac.mm:
3075         (WebCore::AXObjectCache::setShouldRepostNotificationsForTests):
3076         (WebCore::AXPostNotificationWithUserInfo):
3077         (WebCore::AXObjectCache::postPlatformNotification):
3078         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
3079         (WebCore::textReplacementChangeDictionary):
3080         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
3081         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
3082         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
3083         (+[WebAccessibilityObjectWrapperBase accessibilitySetShouldRepostNotifications:]):
3084         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:]):
3085         (arrayRemovingNonJSONTypes):
3086         (dictionaryRemovingNonJSONTypes):
3087         (-[WebAccessibilityObjectWrapperBase accessibilityPostedNotification:userInfo:]):
3088         * accessibility/mac/WebAccessibilityObjectWrapperMac.h:
3089         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3090         (textMarkerRangeFromVisiblePositions):
3091         (-[WebAccessibilityObjectWrapper textMarkerRangeFromVisiblePositions:endPosition:]):
3092         * editing/AppendNodeCommand.cpp:
3093         (WebCore::AppendNodeCommand::AppendNodeCommand):
3094         (WebCore::sendAXTextChangedIgnoringLineBreaks):
3095         (WebCore::AppendNodeCommand::doApply):
3096         (WebCore::AppendNodeCommand::doUnapply):
3097         * editing/AppendNodeCommand.h:
3098         (WebCore::AppendNodeCommand::create):
3099         * editing/ApplyStyleCommand.cpp:
3100         (WebCore::ApplyStyleCommand::ApplyStyleCommand):
3101         (WebCore::ApplyStyleCommand::applyBlockStyle): Deleted.
3102         * editing/ApplyStyleCommand.h:
3103         * editing/CompositeEditCommand.cpp:
3104         (WebCore::EditCommandComposition::unapplyEditType):
3105         (WebCore::CompositeEditCommand::CompositeEditCommand):
3106         (WebCore::CompositeEditCommand::apply):
3107         (WebCore::CompositeEditCommand::insertParagraphSeparator):
3108         (WebCore::CompositeEditCommand::insertNodeBefore):
3109         (WebCore::CompositeEditCommand::appendNode):
3110         (WebCore::CompositeEditCommand::removeNodePreservingChildren):
3111         (WebCore::CompositeEditCommand::insertTextIntoNode):
3112         (WebCore::CompositeEditCommand::deleteTextFromNode):
3113         (WebCore::CompositeEditCommand::replaceTextInNode):
3114         (WebCore::CompositeEditCommand::moveParagraphs):
3115         (WebCore::EditCommandComposition::getNodesInCommand): Deleted.
3116         (WebCore::CompositeEditCommand::applyStyle): Deleted.
3117         (WebCore::CompositeEditCommand::insertLineBreak): Deleted.
3118         (WebCore::CompositeEditCommand::insertNodeAt): Deleted.
3119         (WebCore::CompositeEditCommand::removeChildrenInRange): Deleted.
3120         (WebCore::CompositeEditCommand::inputText): Deleted.
3121         * editing/CompositeEditCommand.h:
3122         * editing/DeleteFromTextNodeCommand.cpp:
3123         (WebCore::DeleteFromTextNodeCommand::DeleteFromTextNodeCommand):
3124         (WebCore::DeleteFromTextNodeCommand::doApply):
3125         (WebCore::DeleteFromTextNodeCommand::doUnapply):
3126         * editing/DeleteFromTextNodeCommand.h:
3127         (WebCore::DeleteFromTextNodeCommand::create):
3128         (WebCore::DeleteFromTextNodeCommand::deletedText):
3129         * editing/DeleteSelectionCommand.cpp:
3130         (WebCore::DeleteSelectionCommand::DeleteSelectionCommand):
3131         (WebCore::DeleteSelectionCommand::preservesTypingStyle): Deleted.
3132         * editing/DeleteSelectionCommand.h:
3133         (WebCore::DeleteSelectionCommand::create):
3134         * editing/DictationCommand.cpp:
3135         (WebCore::DictationCommand::insertTextRunWithoutNewlines):
3136         (WebCore::DictationCommand::insertParagraphSeparator):
3137         * editing/EditAction.h:
3138         * editing/EditCommand.cpp:
3139         (WebCore::EditCommand::EditCommand):
3140         (WebCore::EditCommand::editingAction):
3141         (WebCore::EditCommand::applyEditType):
3142         (WebCore::EditCommand::unapplyEditType):
3143         (WebCore::SimpleEditCommand::SimpleEditCommand):
3144         (WebCore::SimpleEditCommand::notifyAccessibilityForTextChange):
3145         (WebCore::EditCommand::setParent): Deleted.
3146         * editing/EditCommand.h:
3147         * editing/EditingAllInOne.cpp:
3148         * editing/Editor.cpp:
3149         (WebCore::Editor::handleTextEvent):
3150         (WebCore::Editor::deleteSelectionWithSmartDelete):
3151         (WebCore::Editor::replaceSelectionWithFragment):
3152         (WebCore::Editor::replaceSelectionWithText):
3153         (WebCore::Editor::appliedEditing):
3154         (WebCore::Editor::unappliedEditing):
3155         (WebCore::Editor::performCutOrCopy):
3156         (WebCore::Editor::markMisspellingsAfterTypingToWord):
3157         (WebCore::Editor::changeBackToReplacedString):
3158         (WebCore::Editor::transpose):
3159         (WebCore::Editor::changeSelectionAfterCommand):
3160         * editing/Editor.h:
3161         * editing/EditorCommand.cpp:
3162         (WebCore::executeInsertFragment):
3163         * editing/FrameSelection.cpp:
3164         (WebCore::FrameSelection::moveTo):
3165         (WebCore::FrameSelection::moveWithoutValidationTo):
3166         (WebCore::FrameSelection::setSelectionByMouseIfDifferent):
3167         (WebCore::FrameSelection::setSelectionWithoutUpdatingAppearance):
3168         (WebCore::FrameSelection::setSelection):
3169         (WebCore::FrameSelection::updateAndRevealSelection):
3170         (WebCore::isBoundary):
3171         (WebCore::FrameSelection::textSelectionIntent):
3172         (WebCore::FrameSelection::modify):
3173         (WebCore::FrameSelection::selectAll):
3174         (WebCore::FrameSelection::wordSelectionContainingCaretSelection):
3175         (WebCore::FrameSelection::modifyMovingBackward): Deleted.
3176         (WebCore::FrameSelection::selectFrameElementInParentIfFullySelected): Deleted.
3177         (WebCore::FrameSelection::selectionAtWordStart): Deleted.
3178         * editing/FrameSelection.h:
3179         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3180         (WebCore::FrameSelection::selection): Deleted.
3181         * editing/InsertIntoTextNodeCommand.cpp:
3182         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand):
3183         (WebCore::InsertIntoTextNodeCommand::doApply):
3184         (WebCore::InsertIntoTextNodeCommand::doUnapply):
3185         * editing/InsertIntoTextNodeCommand.h:
3186         (WebCore::InsertIntoTextNodeCommand::create):
3187         (WebCore::InsertIntoTextNodeCommand::insertedText):
3188         * editing/InsertNodeBeforeCommand.cpp:
3189         (WebCore::InsertNodeBeforeCommand::InsertNodeBeforeCommand):
3190         (WebCore::InsertNodeBeforeCommand::doApply):
3191         (WebCore::InsertNodeBeforeCommand::doUnapply):
3192         * editing/InsertNodeBeforeCommand.h:
3193         (WebCore::InsertNodeBeforeCommand::create):
3194         * editing/InsertParagraphSeparatorCommand.cpp:
3195         (WebCore::InsertParagraphSeparatorCommand::InsertParagraphSeparatorCommand):
3196         * editing/InsertParagraphSeparatorCommand.h:
3197         (WebCore::InsertParagraphSeparatorCommand::create):
3198         * editing/InsertTextCommand.cpp:
3199         (WebCore::InsertTextCommand::InsertTextCommand):
3200         * editing/InsertTextCommand.h:
3201         (WebCore::InsertTextCommand::create):
3202         (WebCore::InsertTextCommand::createWithMarkerSupplier):
3203         * editing/MoveSelectionCommand.cpp:
3204         (WebCore::MoveSelectionCommand::doApply):
3205         * editing/RemoveNodePreservingChildrenCommand.cpp:
3206         (WebCore::RemoveNodePreservingChildrenCommand::RemoveNodePreservingChildrenCommand):
3207         * editing/RemoveNodePreservingChildrenCommand.h:
3208         (WebCore::RemoveNodePreservingChildrenCommand::create):
3209         * editing/ReplaceDeleteFromTextNodeCommand.cpp: Copied from Source/WebCore/editing/AppendNodeCommand.h.
3210         (WebCore::ReplaceDeleteFromTextNodeCommand::ReplaceDeleteFromTextNodeCommand):
3211         (WebCore::ReplaceDeleteFromTextNodeCommand::notifyAccessibilityForTextChange):
3212         * editing/ReplaceDeleteFromTextNodeCommand.h: Copied from Source/WebCore/editing/AppendNodeCommand.h.
3213         * editing/ReplaceInsertIntoTextNodeCommand.cpp: Added.
3214         (WebCore::ReplaceInsertIntoTextNodeCommand::ReplaceInsertIntoTextNodeCommand):
3215         (WebCore::ReplaceInsertIntoTextNodeCommand::notifyAccessibilityForTextChange):
3216         * editing/ReplaceInsertIntoTextNodeCommand.h: Copied from Source/WebCore/editing/RemoveNodePreservingChildrenCommand.h.
3217         * editing/ReplaceSelectionCommand.cpp:
3218         (WebCore::ReplaceSelectionCommand::ReplaceSelectionCommand):
3219         (WebCore::ReplaceSelectionCommand::InsertedNodes::didReplaceNode): Deleted.
3220         (WebCore::ReplaceSelectionCommand::insertAsListItems): Deleted.
3221         * editing/ReplaceSelectionCommand.h:
3222         (WebCore::ReplaceSelectionCommand::create):
3223         * editing/TypingCommand.cpp:
3224         (WebCore::TypingCommand::insertTextRunWithoutNewlines):
3225         (WebCore::TypingCommand::insertParagraphSeparator):
3226         * editing/atk/FrameSelectionAtk.cpp:
3227         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3228         * editing/ios/DictationCommandIOS.cpp:
3229         (WebCore::DictationCommandIOS::DictationCommandIOS):
3230         * editing/ios/DictationCommandIOS.h:
3231         * editing/mac/FrameSelectionMac.mm:
3232         (WebCore::FrameSelection::notifyAccessibilityForSelectionChange):
3233         * html/HTMLTextFormControlElement.cpp:
3234         (WebCore::HTMLTextFormControlElement::setInnerTextValue):
3235         * page/DragController.cpp:
3236         (WebCore::DragController::concludeEditDrag):
3237         * page/EventHandler.cpp:
3238         (WebCore::setInitialKeyboardSelection):
3239         * page/FocusController.cpp:
3240         (WebCore::FocusController::advanceFocusInDocumentOrder):
3241
3242 2015-04-24  Darin Adler  <darin@apple.com>
3243
3244         Convert OwnPtr and PassOwnPtr uses to std::unique_ptr
3245         https://bugs.webkit.org/show_bug.cgi?id=128007
3246
3247         Reviewed by Anders Carlsson.
3248
3249         * PlatformEfl.cmake: Removed OwnPtrCairo source files.
3250         * PlatformGTK.cmake: Ditto.
3251         * PlatformWinCairo.cmake: Ditto.
3252         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
3253         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
3254
3255         * platform/CrossThreadCopier.cpp: Removed OwnPtr specialization.
3256         * platform/CrossThreadCopier.h: Ditto.
3257
3258         * platform/ScrollAnimatorNone.cpp: Removed unneeded include.
3259         * platform/ThreadGlobalData.cpp: Ditto.
3260         * platform/ThreadGlobalData.h: Ditto.
3261         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h: Ditto.
3262
3263         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
3264         (WebCore::AVFWrapper::processNotification): Use unique_ptr.
3265         (WebCore::AVFWrapper::notificationCallback): Use make_unique.
3266         (WebCore::AVFWrapper::platformLayer): Ditto.
3267
3268         * platform/graphics/cairo/CairoUtilities.cpp:
3269         (WebCore::appendPathToCairoContext): Use cairo_path_destroy directly
3270         instead of a smart pointer; the code path is simple enough that it is
3271         clear this way.
3272
3273         * platform/graphics/cairo/ImageBufferCairo.cpp:
3274         (WebCore::ImageBuffer::ImageBuffer): Use make_unique.
3275         * platform/graphics/cairo/ImageBufferDataCairo.h: Use unique_ptr.
3276
3277         * platform/graphics/cairo/OwnPtrCairo.cpp: Removed.
3278         * platform/graphics/cairo/OwnPtrCairo.h: Removed.
3279
3280         * platform/graphics/cairo/PathCairo.cpp:
3281         (WebCore::Path::Path): Use cairo_path_destroy directly instead of a
3282         smart pointer; the code path is simple enough that it is clear this way.
3283         (WebCore::Path::operator=): Ditto.
3284         (WebCore::Path::addPath): Ditto.
3285         (WebCore::Path::apply): Ditto.
3286         * platform/graphics/cairo/PlatformContextCairo.cpp:
3287         (WebCore::PlatformContextCairo::clipForPatternFilling): Ditto.
3288
3289         * platform/graphics/freetype/FontCacheFreeType.cpp: Removed unneeded include.
3290         * platform/graphics/glx/GLContextGLX.cpp: Ditto.
3291
3292         * platform/graphics/surfaces/egl/EGLSurface.cpp:
3293         (WebCore::EGLOffScreenSurface::EGLOffScreenSurface): Use make_unique.
3294
3295         * platform/graphics/surfaces/glx/GLXConfigSelector.h:
3296         (WebCore::GLXConfigSelector::findMatchingConfig): Use unique_ptr with X11Deleter.
3297         (WebCore::GLXConfigSelector::findMatchingConfigWithVisualId): Ditto.
3298         * platform/graphics/surfaces/glx/GLXSurface.cpp:
3299         (WebCore::GLXTransportSurface::GLXTransportSurface): Ditto.
3300         (WebCore::GLXOffScreenSurface::initialize): Ditto.
3301
3302         * platform/graphics/surfaces/glx/OwnPtrX11.h: Removed.
3303
3304         * platform/graphics/surfaces/glx/X11Helper.cpp:
3305         (WebCore::X11Helper::createOffScreenWindow): Use unique_ptr with X11Deleter.
3306         (WebCore::X11Helper::createPixmap): Ditto.
3307
3308         * platform/graphics/surfaces/glx/X11Helper.h: Added X11Deleter,
3309         which can be used with unique_ptr to make it call XFree instead of delete.
3310
3311         * platform/graphics/win/FullScreenController.cpp: Use unique_ptr.
3312         (FullScreenController::FullScreenController): Use make_unique.
3313         (FullScreenController::enterFullScreen): Ditto.
3314         * platform/graphics/win/FullScreenController.h: Use unique_ptr.
3315
3316         * platform/graphics/win/GraphicsContext3DWin.cpp: Removed unneeded includes.
3317
3318         * platform/graphics/win/WKCAImageQueue.cpp:
3319         (WebCore::WKCAImageQueue::WKCAImageQueue): Use make_unique.
3320         * platform/graphics/win/WKCAImageQueue.h: Use unique_ptr.
3321
3322         * platform/network/NetworkStorageSessionStub.cpp: Removed unneeded include.
3323
3324         * platform/network/ResourceHandleInternal.h: Use unique_ptr.
3325
3326         * platform/network/curl/MultipartHandle.cpp:
3327         (WebCore::MultipartHandle::create): Deleted.
3328         * platform/network/curl/MultipartHandle.h: Deleted the create function.
3329
3330         * platform/network/curl/ResourceHandleManager.cpp:
3331         (WebCore::headerCallback): Use make_unique.
3332
3333 2015-04-24  Per Arne Vollan  <peavo@outlook.com>
3334
3335         [Win] Popup menu is not accessible.
3336         https://bugs.webkit.org/show_bug.cgi?id=141704
3337
3338         Reviewed by Brent Fulgham.
3339
3340         Get accessibility information for items in popup menus.
3341
3342         * platform/win/PopupMenuWin.cpp:
3343         (WebCore::PopupMenuWin::onGetObject):
3344         (WebCore::PopupMenuWin::wndProc):
3345         (WebCore::AccessiblePopupMenu::AccessiblePopupMenu):
3346         (WebCore::AccessiblePopupMenu::~AccessiblePopupMenu):
3347         (WebCore::AccessiblePopupMenu::QueryInterface):
3348         (WebCore::AccessiblePopupMenu::AddRef):
3349         (WebCore::AccessiblePopupMenu::Release):
3350         (WebCore::AccessiblePopupMenu::GetTypeInfoCount):
3351         (WebCore::AccessiblePopupMenu::GetTypeInfo):
3352         (WebCore::AccessiblePopupMenu::GetIDsOfNames):
3353         (WebCore::AccessiblePopupMenu::Invoke):
3354         (WebCore::AccessiblePopupMenu::get_accParent):
3355         (WebCore::AccessiblePopupMenu::get_accChildCount):
3356         (WebCore::AccessiblePopupMenu::get_accChild):
3357         (WebCore::AccessiblePopupMenu::get_accName):
3358         (WebCore::AccessiblePopupMenu::get_accValue):
3359         (WebCore::AccessiblePopupMenu::get_accDescription):
3360         (WebCore::AccessiblePopupMenu::get_accRole):
3361         (WebCore::AccessiblePopupMenu::get_accState):
3362         (WebCore::AccessiblePopupMenu::get_accHelp):
3363         (WebCore::AccessiblePopupMenu::get_accKeyboardShortcut):
3364         (WebCore::AccessiblePopupMenu::get_accFocus):
3365         (WebCore::AccessiblePopupMenu::get_accSelection):
3366         (WebCore::AccessiblePopupMenu::get_accDefaultAction):
3367         (WebCore::AccessiblePopupMenu::accSelect):
3368         (WebCore::AccessiblePopupMenu::accLocation):
3369         (WebCore::AccessiblePopupMenu::accNavigate):
3370         (WebCore::AccessiblePopupMenu::accHitTest):
3371         (WebCore::AccessiblePopupMenu::accDoDefaultAction):
3372         (WebCore::AccessiblePopupMenu::put_accName):
3373         (WebCore::AccessiblePopupMenu::put_accValue):
3374         (WebCore::AccessiblePopupMenu::get_accHelpTopic):
3375         * platform/win/PopupMenuWin.h:
3376         * platform/win/ScrollbarThemeWin.h:
3377         (WebCore::ScrollbarThemeWin::hasButtons): Deleted.
3378
3379 2015-04-23  Antti Koivisto  <antti@apple.com>
3380
3381         Memory cache live resources repeatedly purged during painting
3382         https://bugs.webkit.org/show_bug.cgi?id=144104
3383         <rdar://problem/20667695>
3384
3385         Reviewed by Chris Dumez.
3386
3387         On some PLT pages (like nytimes.com) we get into state where painting repeatedly purges live bitmaps.
3388         This slows down page loads significantly.
3389
3390         This might have regressed because improvements in page caching keep more pages and so resources 'live'.
3391
3392         With this path we do all regular cache pruning asynchronously. If memory is really critical
3393         the low memory handling code will still prune synchronously.
3394
3395         * loader/cache/CachedResource.cpp:
3396         (WebCore::CachedResource::removeClient):
3397         (WebCore::CachedResource::didAccessDecodedData):
3398
3399             prune() -> pruneSoon()
3400
3401         * loader/cache/MemoryCache.cpp:
3402
3403             Decrease the pruning size target from 0.95 to 0.8 so we don't need to prune so often.
3404
3405         (WebCore::MemoryCache::needsPruning):
3406
3407             Factor into a function.
3408
3409         (WebCore::MemoryCache::prune):
3410         (WebCore::MemoryCache::pruneSoon):
3411
3412             Prune asynchronously.
3413
3414         * loader/cache/MemoryCache.h:
3415
3416 2015-04-24  Antti Koivisto  <antti@apple.com>
3417
3418         Unreviewed, rolling out r183259.
3419
3420         Wrong ChangeLog.
3421
3422         Reverted changeset:
3423
3424         "Memory cache live resources repeatedly purged during
3425         painting"
3426         https://bugs.webkit.org/show_bug.cgi?id=144104
3427         http://trac.webkit.org/changeset/183259
3428
3429 2015-04-24  Antti Koivisto  <antti@apple.com>
3430
3431         CrashTracer: WebProcess at com.apple.WebCore: WebCore::toScriptElementIfPossible + 4
3432         https://bugs.webkit.org/show_bug.cgi?id=144050
3433
3434         Reviewed by Chris Dumez.
3435
3436         We are seeing null Element pointer crashes with this stack:
3437
3438         47 com.apple.WebCore:  WebCore::toScriptElementIfPossible + 4 <==
3439         47 com.apple.WebCore:  WebCore::ScriptRunner::timerFired + 452
3440         47 com.apple.WebCore:  WebCore::ThreadTimers::sharedTimerFiredInternal + 175
3441
3442         The most likely cause seems to be that this code
3443
3444             ASSERT(m_pendingAsyncScripts.contains(scriptElement));
3445             m_scriptsToExecuteSoon.append(m_pendingAsyncScripts.take(scriptElement));
3446
3447         in ScriptRunner::notifyScriptReady fails to find scriptElement and we are left with null entry in
3448         m_scriptsToExecuteSoon. However I haven't managed to repro this or find the exact path how this
3449         could happen. The related code is fragile with lot of state (especially in ScriptElement class)
3450         and involves many opportunities for re-entry via scripts.
3451
3452         No repro, no test case.
3453
3454         * dom/ScriptRunner.cpp:
3455         (WebCore::ScriptRunner::timerFired):
3456
3457             Paper this over by adding a null check. We could check m_pendingAsyncScripts.take() above
3458             but this also covers possibility this is caused by something else.
3459
3460 2015-04-24  Carlos Garcia Campos  <cgarcia@igalia.com>
3461
3462         [SOUP] Use a webkit subdirectory for the disk cache
3463         https://bugs.webkit.org/show_bug.cgi?id=144048
3464
3465         Reviewed by Martin Robinson.
3466
3467         Add a static method to SoupNetworkSession to clear a soup cache
3468         given its directory.
3469
3470         * platform/network/soup/SoupNetworkSession.cpp:
3471         (WebCore::strIsNumeric):
3472         (WebCore::SoupNetworkSession::clearCache):
3473         * platform/network/soup/SoupNetworkSession.h:
3474
3475 2015-04-23  Andy Estes  <aestes@apple.com>
3476
3477         Fix the iOS build after r183234.
3478
3479         * platform/ios/LegacyTileCache.mm:
3480         (WebCore::LegacyTileCache::commitScaleChange):
3481
3482 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
3483
3484         Fix Windows build.
3485
3486         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3487         (PlatformCALayerWin::setBackingStoreAttached):
3488         (PlatformCALayerWin::backingStoreAttached):
3489         * platform/graphics/ca/win/PlatformCALayerWin.h:
3490
3491 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
3492
3493         Make it possible to detach GraphicsLayerCA backing store
3494         https://bugs.webkit.org/show_bug.cgi?id=144140
3495
3496         Reviewed by Tim Horton.
3497
3498         This changes makes it possible to denote a GraphicsLayerCA's backing store
3499         as "attached" or not. When not attached, the backing store is made volatile
3500         and can be purged. This will be used in a future patch.
3501
3502         * platform/graphics/ca/GraphicsLayerCA.h: Add updateBackingStoreAttachment().
3503         * platform/graphics/ca/PlatformCALayer.h:
3504         * platform/graphics/ca/mac/PlatformCALayerMac.h:
3505         * platform/graphics/ca/mac/PlatformCALayerMac.mm: Stubs. In future, we could
3506         remove backing store on Mac and iOS WK1 too.
3507         (PlatformCALayerMac::setBackingStoreAttached):
3508         (PlatformCALayerMac::backingStoreAttached):
3509
3510 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
3511
3512         Remove "layer" from GraphicsLayerCA member function names
3513         https://bugs.webkit.org/show_bug.cgi?id=144139
3514
3515         Reviewed by Myles Maxfield.
3516
3517         Rename "updateLayer*" to "update*" in GraphicsLayerCA.
3518
3519         * platform/graphics/ca/GraphicsLayerCA.cpp:
3520         (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
3521         (WebCore::GraphicsLayerCA::updateNames):
3522         (WebCore::GraphicsLayerCA::updateDrawsContent):
3523         (WebCore::GraphicsLayerCA::updateLayerNames): Deleted.
3524         (WebCore::GraphicsLayerCA::updateLayerDrawsContent): Deleted.
3525         * platform/graphics/ca/GraphicsLayerCA.h:
3526
3527 2015-04-23  Dan Bernstein  <mitz@apple.com>
3528
3529         <rdar://problem/20663758> Fix the build after AVPlayerViewController API change
3530
3531         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3532         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Don’t pass a nil completion
3533         handler to -[AVPlayerViewController exitFullScreenAnimated:completionHandler:].
3534
3535 2015-04-23  Darin Adler  <darin@apple.com>
3536
3537         Another round of removing use of OwnPtr, PassOwnPtr, and deleteOwnedPtr
3538         https://bugs.webkit.org/show_bug.cgi?id=144090
3539
3540         Reviewed by Anders Carlsson.
3541
3542         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h: Removed unneeded include.
3543
3544         * Modules/navigatorcontentutils/NavigatorContentUtils.h: Removed include of
3545         RefCountedSupplement.h.
3546
3547         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3548         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveBinaryData):
3549         Pass data using rvalue references, and use new/delete to pass it across
3550         threads, rather than using PassOwnPtr.
3551         * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h: Pass data
3552         in an rvalue reference instead of PassOwnPtr.
3553         * Modules/websockets/WebSocket.cpp:
3554         (WebCore::WebSocket::didReceiveBinaryData): Take an rvalue reference
3555         instead of a PassOwnPtr.
3556         * Modules/websockets/WebSocket.h: Ditto.
3557         * Modules/websockets/WebSocketChannel.cpp: Ditto.
3558         (WebCore::WebSocketChannel::processFrame): Ditto.
3559         * Modules/websockets/WebSocketChannelClient.h:
3560         (WebCore::WebSocketChannelClient::didReceiveBinaryData): Ditto.
3561         * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3562         (WebCore::WorkerThreadableWebSocketChannel::Peer::didReceiveBinaryData):
3563         Ditto.
3564         * Modules/websockets/WorkerThreadableWebSocketChannel.h: Ditto.
3565
3566         * WebCore.xcodeproj/project.pbxproj: Removed RefCountedSupplement.h.
3567
3568         * loader/cocoa/DiskCacheMonitorCocoa.mm:
3569         (WebCore::DiskCacheMonitor::monitorFileBackingStoreCreation): Fixed comment
3570         to not mention adoptPtr.
3571
3572         * page/make_settings.pl:
3573         (generateInternalSettingsHeaderFile): Removed include of RefCountedSupplement.h.
3574
3575         * platform/ColorChooserClient.h: Removed unneded include.
3576         * platform/ContextMenuItem.h: Ditto.
3577
3578         * platform/RefCountedSupplement.h: Removed.
3579
3580         * platform/ScrollAnimator.cpp: Removed unneeded include.
3581         * platform/ScrollAnimatorNone.h: Ditto.
3582
3583         * platform/ThreadGlobalData.cpp: Added now-needed include of PassOwnPtr.h.
3584
3585         * platform/graphics/GlyphMetricsMap.h: Ditto.
3586         * platform/graphics/MediaPlayer.h: Ditto.
3587         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.h: Ditto.
3588         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.cpp: Ditto.
3589         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp: Ditto.
3590         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.h: Ditto.
3591         * platform/graphics/avfoundation/objc/AudioTrackPrivateAVFObjC.h: Ditto.
3592         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h: Ditto.
3593         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h: Ditto.
3594
3595         * platform/graphics/cg/ImageBufferCG.cpp:
3596         (WebCore::ImageBuffer::ImageBuffer): Use make_unique instead of adoptPtr.
3597         * platform/graphics/cg/ImageBufferDataCG.cpp:
3598         (WebCore::ImageBufferData::getData): Return a RefPtr instead of a PassRefPtr.
3599         * platform/graphics/cg/ImageBufferDataCG.h: Streamlined the header a bit,
3600         use unique_ptr instead of OwnPtr and RefPtr instead of PassRefPtr.
3601
3602         * platform/graphics/cocoa/IOSurface.h: Use unique_ptr instead of OwnPtr.
3603         * platform/graphics/cocoa/IOSurface.mm:
3604         (IOSurface::ensureGraphicsContext): Use make_unique instead of adoptPtr.
3605
3606         * platform/graphics/egl/GLContextEGL.cpp: Removed unneeded includes.
3607         * platform/graphics/filters/FilterOperation.h: Ditto.
3608         * platform/graphics/harfbuzz/HarfBuzzShaper.h: Ditto.
3609         * platform/ios/DeviceMotionClientIOS.h: Ditto.
3610         * platform/ios/DeviceOrientationClientIOS.h: Ditto.
3611
3612         * platform/ios/LegacyTileCache.h: Use unique_ptr instead of OwnPtr.
3613         * platform/ios/LegacyTileCache.mm:
3614         (WebCore::LegacyTileCache::LegacyTileCache): Use make_unique instead of
3615         a create function, and also get rid of unneeded initialization to null.
3616         (WebCore::LegacyTileCache::commitScaleChange): Ditto.
3617
3618         * platform/ios/LegacyTileGrid.h: Made constructor public and got rid of create
3619         function. Made constructor take a reference to the tile cache, and make both
3620         tileCache() and m_tileCache be references too.
3621
3622         * platform/ios/LegacyTileGrid.mm:
3623         (WebCore::LegacyTileGrid::LegacyTileGrid): Updated to use reference.
3624         (WebCore::LegacyTileGrid::visibleRect): Ditto.
3625         (WebCore::LegacyTileGrid::tileByteSize) Ditto.:
3626         (WebCore::LegacyTileGrid::dropDistantTiles): Ditto.
3627         (WebCore::LegacyTileGrid::updateTileOpacity): Ditto.
3628         (WebCore::LegacyTileGrid::updateTileBorderVisibility): Ditto.
3629         (WebCore::LegacyTileGrid::updateHostLayerSize): Ditto.
3630         (WebCore::LegacyTileGrid::invalidateTiles): Ditto.
3631         (WebCore::LegacyTileGrid::shouldUseMinimalTileCoverage): Ditto.
3632         (WebCore::LegacyTileGrid::tileDistance2): Ditto.
3633         (WebCore::LegacyTileGrid::createTiles): Ditto.
3634         * platform/ios/LegacyTileGridTile.mm:
3635         (WebCore::LegacyTileGridTile::LegacyTileGridTile): Ditto.
3636         (WebCore::LegacyTileGridTile::invalidateRect): Ditto.
3637         (WebCore::LegacyTileGridTile::showBorder): Ditto.
3638         * platform/ios/LegacyTileLayer.mm:
3639         (-[LegacyTileHostLayer renderInContext:]): Ditto.
3640         (-[LegacyTileLayer layoutSublayers]): Ditto.
3641         (-[LegacyTileLayer drawInContext:]): Ditto.
3642
3643         * platform/ios/LegacyTileLayerPool.h: Removed unneeded include.
3644         * platform/ios/ScrollAnimatorIOS.mm: Ditto.
3645         * platform/mac/ScrollAnimatorMac.mm: Ditto.
3646         * platform/mac/WebVideoFullscreenController.h: Ditto.
3647         * platform/network/BlobData.cpp: Ditto.
3648
3649         * platform/network/ResourceHandle.cpp:
3650         (WebCore::ResourceHandle::ResourceHandle): Use make_unique instead of adoptPtr.
3651         * platform/network/ResourceHandle.h: Use unique_ptr instead of OwnPtr.
3652
3653         * platform/network/ResourceHandleInternal.h: Added now-needed include.
3654
3655         * platform/network/ResourceResponseBase.h: Removed unneeded includes and
3656         tweaked formatting a bit.
3657
3658         * platform/network/SynchronousLoaderClient.h: Removed the create function and
3659         the private constructor. Used data member initialize to make the default
3660         empty constructor automatically get generated (and be public now).
3661
3662         * platform/network/cf/FormDataStreamCFNet.cpp:
3663         (WebCore::formFinishFinalizationOnMainThread): Use delete instead of adoptPtr
3664         to delete the context argument.
3665
3666         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
3667         (WebCore::defaultNetworkStorageSession): Return a unique_ptr& instead of an OwnPtr&.
3668         (WebCore::NetworkStorageSession::switchToNewTestingSession): Use make_unique
3669         instead of adoptPtr.
3670         (WebCore::NetworkStorageSession::defaultStorageSession): Ditto.
3671
3672         * platform/network/cf/ResourceHandleCFNet.cpp:
3673         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Use a
3674         SynchronousLoaderClient on the stack instead of putting one on the heap with adoptPtr.
3675         * platform/network/mac/ResourceHandleMac.mm:
3676         (WebCore::ResourceHandle::platformLoadResourceSynchronously): Ditto.
3677
3678         * platform/text/TextCodec.h: Removed unneeded include.
3679         * platform/win/CursorWin.cpp: Ditto.
3680
3681         * rendering/RenderLayer.cpp:
3682         (WebCore::RenderLayer::calculateClipRects): Use move instead of release since
3683         we are using RefPtr&& instead of PassRefPtr.
3684
3685         * rendering/RenderLayerFilterInfo.cpp:
3686         (WebCore::RenderLayer::FilterInfo::setRenderer): Use RefPtr&& instead of PassRefPtr.
3687         (WebCore::RenderLayer::FilterInfo::updateReferenceFilterClients): Streamlined to use
3688         modern for loops and auto.
3689         (WebCore::RenderLayer::FilterInfo::removeReferenceFilterClients): Ditto.
3690
3691         * rendering/RenderLayerFilterInfo.h: Streamlined code and removed some stuff that
3692         I think is unneeded on iOS; there is no unused private field and I suspect the problem
3693         that led to the warning is gone. Deleted friending of deleteOwnedPtr.
3694
3695         * rendering/RenderLayerMaskImageInfo.cpp: Removed unneeded includes. Moved private
3696         client classes in here from the header and made them members of MaskImageInfo.
3697         Streamlined them a bit in other ways.
3698         (WebCore::RenderLayer::MaskImageInfo::getIfExists): Use nullptr.
3699         (WebCore::RenderLayer::MaskImageInfo::MaskImageInfo): Use member initialization
3700         and also pass the layer in rather than the MaskImageInfo.
3701         (WebCore::RenderLayer::MaskImageInfo::notifyFinished): Deleted. Moved the code
3702         into the SVGDocumentClient.
3703         (WebCore::RenderLayer::MaskImageInfo::imageChanged): Deleted. Moved the code into
3704         the ImageClient.
3705         (WebCore::RenderLayer::MaskImageInfo::updateMaskImageClients): Streamlined a bit
3706         to use a for loop.
3707         (WebCore::RenderLayer::MaskImageInfo::removeMaskImageClients): Ditto.
3708
3709         * rendering/RenderLayerMaskImageInfo.h: Reduced unneeded includes. Got rid of
3710         definitions of private member classes here in the header; they can be in the cpp
3711         file instead. Also cut down from three classes to two, and gave the classes less
3712         redundant names since they are already members of MaskImageInfo. Removed some
3713         unneeded functions and friending of deleteOwnedPtr.
3714
3715         * testing/InternalSettings.cpp: Got rid of comment about RefCountedSupplement
3716         since no code anywhere was using it, so not using it here was not remarkable.
3717
3718 2015-04-23  Jer Noble  <jer.noble@apple.com>
3719
3720         [iOS] Add a wrapper around the hosted AVPlayerLayer to intercept -setBounds:
3721         https://bugs.webkit.org/show_bug.cgi?id=144129
3722
3723         Reviewed by Simon Fraser.
3724
3725         When passing the hosted AVPlayerLayer to the fullscreen controller, the new superlayer will
3726         resize the hosted layer with a call to -setBounds:. But because this is a hosted layer, the
3727         bonuds change has no effect. Instead, wrap the CALayerHost in another CALayer whose job it is
3728         to intercept -setBounds: in the same way that WebAVVideoLayer did. In fact, we should just use
3729         that wrapper class inside WebAVVideoLayer as well, to avoid duplicating code.
3730
3731         Drive-by Fix: Null-check m_videoElement in setVideoLayerFrame().
3732
3733         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3734         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3735         (-[WebCALayerHostWrapper setVideoSublayer:]):
3736         (-[WebCALayerHostWrapper videoSublayer]):
3737         (-[WebCALayerHostWrapper setBounds:]): Moved from WebAVVideoLayer.
3738         (-[WebCALayerHostWrapper resolveBounds]): Ditto.
3739         (-[WebAVVideoLayer setBounds:]): Moved to WebCALayerHostWrapper.
3740         (WebVideoFullscreenInterfaceAVKit::setupFullscreenInternal): Create the wrapper.
3741         (WebVideoFullscreenInterfaceAVKit::cleanupFullscreenInternal): Clear the wrapper.
3742         (-[WebAVVideoLayer resolveBounds]): Deleted. Moved to WebCALayerHostWrapper.
3743         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
3744         (WebVideoFullscreenModelVideoElement::setVideoLayerFrame): Null-check m_videoElement.
3745
3746 2015-04-23  Tim Horton  <timothy_horton@apple.com>
3747
3748         Yellow highlight has gray background color when invoking Lookup on an address in a Google Maps drop down
3749         https://bugs.webkit.org/show_bug.cgi?id=138737
3750         <rdar://problem/18904429>
3751
3752         Reviewed by Simon Fraser.
3753
3754         * rendering/RenderReplaced.cpp:
3755         (WebCore::RenderReplaced::paint):
3756         Other RenderObjects don't paint box decorations in the selection painting phase,
3757         so RenderReplaced probably shouldn't either. This fixes the case where, when doing
3758         selection-only painting of a bit of text over top of a RenderReplaced, the RenderReplaced
3759         would paint its background, filling the previously transparent bitmap with an unwanted color.
3760
3761 2015-04-23  Roger Fong  <roger_fong@apple.com>
3762
3763         Update media timeline controls when video is paused..
3764         https://bugs.webkit.org/show_bug.cgi?id=144122.
3765         <rdar://problem/20422927>
3766
3767         Reviewed by Dean Jackson.
3768
3769         * Modules/mediacontrols/mediaControlsApple.js:
3770         (Controller.prototype.drawTimelineBackground): Use timelineWidth because offsetWidth is 0 when display: none.
3771         (Controller.prototype.setPlaying): Show controls when pausing.
3772         (Controller.prototype.showControls): Update time and timeline when unhiding controls.
3773
3774 2015-04-23  Simon Fraser  <simon.fraser@apple.com>
3775
3776         Changing TiledBacking velocity should schedule a tile revalidation
3777         https://bugs.webkit.org/show_bug.cgi?id=144123
3778
3779         Reviewed by Tim Horton.
3780
3781         Changing the velocity parameters on the TileController affect the computed
3782         coverage rect, so whenever we make a change to velocity data that could
3783         affect the outcome (basically any non-zero old or new velocities),
3784         schedule a layer flush.
3785
3786         * platform/graphics/TiledBacking.h:
3787         (WebCore::VelocityData::velocityOrScaleIsChanging):
3788         * platform/graphics/ca/TileController.cpp:
3789         (WebCore::TileController::setVelocity):
3790
3791 2015-04-23  Jer Noble  <jer.noble@apple.com>
3792
3793         [Mac] Disable QTKit by default on future OS X.
3794         https://bugs.webkit.org/show_bug.cgi?id=144082
3795
3796         Reviewed by Darin Adler.
3797
3798         Settings::gQTKitEnabled defaults to false.
3799
3800         * page/Settings.cpp:
3801
3802 2015-04-23  Daniel Bates  <dabates@apple.com>
3803
3804         Clean up: Use references instead of pointers in more SVG files
3805         https://bugs.webkit.org/show_bug.cgi?id=144045
3806
3807         Reviewed by Darin Adler.
3808
3809         * rendering/svg/SVGRootInlineBox.cpp:
3810         (WebCore::SVGRootInlineBox::layoutCharactersInTextBoxes): Pass reference instead of pointer.
3811
3812         * rendering/svg/SVGTextLayoutEngine.cpp:
3813         (WebCore::SVGTextLayoutEngine::recordTextFragment): Changed parameter textBox from pointer to reference.
3814         (WebCore::SVGTextLayoutEngine::layoutInlineTextBox): Ditto.
3815         (WebCore::SVGTextLayoutEngine::currentVisualCharacterMetrics): Changed parameter textBox from pointer to
3816         reference and made it const since this function does not modify textBox.
3817         (WebCore::SVGTextLayoutEngine::layoutTextOnLineOrPath): Changed parameters from pointers to references.
3818         Also, removed comma from comment so that it reads well.
3819         * rendering/svg/SVGTextLayoutEngine.h: Updated declarations for the above functions.
3820
3821         * rendering/svg/SVGTextLayoutEngineBaseline.cpp:
3822         (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift): Changed parameter style from pointer to reference.
3823         Added case BS_LENGTH to switch block and removed default case so that the compiler checks that we handle all cases.
3824         Renamed parameter contextElement to context since the name of its data type conveys that it is an element.
3825         (WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift): Changed parameter textRenderer from
3826         pointer to reference and removed runtime assertion that textRenderer is non-null (since it well-formed reference
3827         cannot point to a non-existent object).
3828         (WebCore::SVGTextLayoutEngineBaseline::calculateGlyphOrientationAngle): Changed parameter style from pointer to reference
3829         removed runtime assertion that style is non-null.
3830         * rendering/svg/SVGTextLayoutEngineBaseline.h: Updated declarations for the above functions.
3831
3832 2015-04-23  Commit Queue  <commit-queue@webkit.org>
3833
3834         Unreviewed, rolling out r183194.
3835         https://bugs.webkit.org/show_bug.cgi?id=144121
3836
3837         Made multiple tests flaky (Requested by ap_ on #webkit).
3838
3839         Reverted changeset:
3840
3841         "Memory cache live resources repeatedly purged during
3842         painting"
3843         https://bugs.webkit.org/show_bug.cgi?id=144104
3844         http://trac.webkit.org/changeset/183194
3845
3846 2015-04-23  Roger Fong  <roger_fong@apple.com>
3847
3848         Unreviewed. Missed a button in r182900.
3849
3850         * Modules/mediacontrols/mediaControlsApple.css:
3851         (audio::-webkit-media-controls-wireless-playback-picker-button:active):
3852
3853 2015-04-23  Roger Fong  <roger_fong@apple.com>
3854
3855         Unreviewed. Just shift some CSS around for code cleanup purposes.
3856
3857         * Modules/mediacontrols/mediaControlsApple.css:
3858         (video::-webkit-media-controls-panel):
3859         (video::-webkit-media-controls-panel:hover):
3860
3861 2015-04-22  Alexey Proskuryakov  <ap@apple.com>
3862
3863         [iOS] WebKit services should inherit environment variables for home
3864         https://bugs.webkit.org/show_bug.cgi?id=144078
3865         rdar://problem/20571678
3866
3867         Reviewed by Dan Bernstein.
3868
3869         Added an SPI header for a drive-by fix.
3870
3871         * WebCore.xcodeproj/project.pbxproj:
3872         * platform/spi/cf/CFBundleSPI.h: Added.
3873
3874 2015-04-23  Alex Christensen  <achristensen@webkit.org>
3875
3876         Use less memory when compiling content extensions.
3877         https://bugs.webkit.org/show_bug.cgi?id=144051
3878
3879         Reviewed by Darin Adler and Benjamin Poulain.
3880
3881         No change in functionality, correctness already covered by existing tests.
3882
3883         Before this patch, a DFANode contained a HashSet of transitions.
3884         Large vectors of DFANodes made many small HashSets, which was inefficient use of memory.
3885         We now put all the actions and transitions into one big compact Vector and each node owns ranges in that vector.
3886
3887         * contentextensions/CombinedURLFilters.cpp:
3888         (WebCore::ContentExtensions::recursiveMemoryUsed):
3889         (WebCore::ContentExtensions::CombinedURLFilters::memoryUsed):
3890         * contentextensions/CombinedURLFilters.h:
3891         * contentextensions/ContentExtensionCompiler.cpp:
3892         (WebCore::ContentExtensions::compileRuleList):
3893         * contentextensions/ContentExtensionsDebugging.h:
3894         * contentextensions/DFA.cpp:
3895         (WebCore::ContentExtensions::DFA::memoryUsed):
3896         (WebCore::ContentExtensions::DFANode::actions):
3897         (WebCore::ContentExtensions::DFANode::transitions):
3898         (WebCore::ContentExtensions::DFANode::fallbackTransitionDestination):
3899         (WebCore::ContentExtensions::DFANode::changeFallbackTransition):
3900         (WebCore::ContentExtensions::DFANode::addFallbackTransition):
3901         (WebCore::ContentExtensions::DFANode::containsTransition):
3902         (WebCore::ContentExtensions::DFANode::kill):
3903         (WebCore::ContentExtensions::DFA::minimize):
3904         (WebCore::ContentExtensions::DFA::DFA): Deleted.
3905         (WebCore::ContentExtensions::DFA::operator=): Deleted.
3906         * contentextensions/DFA.h:
3907         * contentextensions/DFABytecodeCompiler.cpp:
3908         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNode):
3909         (WebCore::ContentExtensions::DFABytecodeCompiler::compileNodeTransitions):
3910         (WebCore::ContentExtensions::DFABytecodeCompiler::compile):
3911         * contentextensions/DFABytecodeCompiler.h:
3912         * contentextensions/DFAMinimizer.cpp:
3913         (WebCore::ContentExtensions::DFAMinimizer::minimize):
3914         * contentextensions/DFAMinimizer.h:
3915         * contentextensions/DFANode.h:
3916         (WebCore::ContentExtensions::DFANode::isKilled):
3917         (WebCore::ContentExtensions::DFANode::hasFallbackTransition):
3918         (WebCore::ContentExtensions::DFANode::hasActions):
3919         (WebCore::ContentExtensions::DFANode::transitionsLength):
3920         (WebCore::ContentExtensions::DFANode::actionsLength):
3921         (WebCore::ContentExtensions::DFANode::actionsStart):
3922         (WebCore::ContentExtensions::DFANode::setActions):
3923         (WebCore::ContentExtensions::DFANode::setTransitions):
3924         (WebCore::ContentExtensions::DFANode::resetTransitions):
3925         (WebCore::ContentExtensions::DFANode::transitionsStart):
3926         (WebCore::ContentExtensions::DFANode::setHasFallbackTransitionWithoutChangingDFA):
3927         * contentextensions/NFA.cpp:
3928         (WebCore::ContentExtensions::NFA::memoryUsed):
3929         * contentextensions/NFA.h:
3930         * contentextensions/NFAToDFA.cpp:
3931         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetSource::NodeIdSetToUniqueNodeIdSetSource):
3932         (WebCore::ContentExtensions::NodeIdSetToUniqueNodeIdSetTranslator::translate):
3933         (WebCore::ContentExtensions::getOrCreateDFANode):