[Win] CMake build fix after r188098.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-08-06  Alex Christensen  <achristensen@webkit.org>
2
3         [Win] CMake build fix after r188098.
4
5         * CMakeLists.txt:
6         MockCDM is necessary for testing if ENCRYPTED_MEDIA_V2 is enabled.
7
8 2015-08-05  Filip Pizlo  <fpizlo@apple.com>
9
10         Lightweight locks should be adaptive
11         https://bugs.webkit.org/show_bug.cgi?id=147545
12
13         Reviewed by Geoffrey Garen.
14
15         No new tests because no new behavior.
16
17         * bindings/objc/WebScriptObject.mm:
18         (WebCore::getJSWrapper):
19         (WebCore::addJSWrapper):
20         (WebCore::removeJSWrapper):
21         (WebCore::removeJSWrapperIfRetainCountOne):
22         * platform/ios/wak/WAKWindow.mm:
23         (-[WAKWindow setExposedScrollViewRect:]):
24         (-[WAKWindow exposedScrollViewRect]):
25
26 2015-08-06  Alex Christensen  <achristensen@webkit.org>
27
28         [Win] Enable all Windows features in CMake
29         https://bugs.webkit.org/show_bug.cgi?id=147744
30
31         Reviewed by Tim Horton.
32
33         * PlatformWin.cmake:
34         Add a file needed for enabling video.
35
36 2015-08-06  Anders Carlsson  <andersca@apple.com>
37
38         Rename SQLStatementBackend to SQLStatement
39         https://bugs.webkit.org/show_bug.cgi?id=147755
40
41         Reviewed by Geoffrey Garen.
42
43         * CMakeLists.txt:
44         * Modules/webdatabase/SQLStatement.h: Renamed from Source/WebCore/Modules/webdatabase/SQLStatementBackend.h.
45         (WebCore::SQLStatement::hasStatementCallback):
46         (WebCore::SQLStatement::hasStatementErrorCallback):
47         * Modules/webdatabase/SQLStatementBackend.cpp: Removed.
48         (WebCore::SQLStatementBackend::SQLStatementBackend): Deleted.
49         (WebCore::SQLStatementBackend::~SQLStatementBackend): Deleted.
50         (WebCore::SQLStatementBackend::sqlError): Deleted.
51         (WebCore::SQLStatementBackend::sqlResultSet): Deleted.
52         (WebCore::SQLStatementBackend::execute): Deleted.
53         (WebCore::SQLStatementBackend::performCallback): Deleted.
54         (WebCore::SQLStatementBackend::setDatabaseDeletedError): Deleted.
55         (WebCore::SQLStatementBackend::setVersionMismatchedError): Deleted.
56         (WebCore::SQLStatementBackend::setFailureDueToQuota): Deleted.
57         (WebCore::SQLStatementBackend::clearFailureDueToQuota): Deleted.
58         (WebCore::SQLStatementBackend::lastExecutionFailedDueToQuota): Deleted.
59         * Modules/webdatabase/SQLStatementBackend.h:
60         (WebCore::SQLStatementBackend::hasStatementCallback): Deleted.
61         (WebCore::SQLStatementBackend::hasStatementErrorCallback): Deleted.
62         * Modules/webdatabase/SQLTransaction.cpp:
63         (WebCore::SQLTransaction::deliverStatementCallback):
64         (WebCore::SQLTransaction::executeSQL):
65         * Modules/webdatabase/SQLTransactionBackend.cpp:
66         (WebCore::SQLTransactionBackend::currentStatement):
67         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
68         (WebCore::SQLTransactionBackend::executeSQL):
69         * Modules/webdatabase/SQLTransactionBackend.h:
70         * WebCore.vcxproj/WebCore.vcxproj:
71         * WebCore.vcxproj/WebCore.vcxproj.filters:
72         * WebCore.xcodeproj/project.pbxproj:
73
74 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
75
76         Make FontDescriptionKey sensitive to FontFeatureSettings
77         https://bugs.webkit.org/show_bug.cgi?id=147751
78
79         Reviewed by Anders Carlsson.
80
81         Just like how FontDescription hashes should be sensitive to locale, they should
82         also be sensitive to font features.
83
84         This patch also fixes operator== for FontDescriptionKey, which was previously
85         comparing hashes for equality instead of the underlying data. Comparing hashes
86         for equality is useless inside hashmaps.
87
88         This is in preparation for implementing font-feature-settings.
89
90         No new tests because there is no behavior change.
91
92         * platform/graphics/FontCache.cpp:
93         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
94         (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
95         (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize): Deleted.
96         * platform/graphics/FontCache.h:
97         (WebCore::FontDescriptionKey::FontDescriptionKey):
98         (WebCore::FontDescriptionKey::operator==):
99         (WebCore::FontDescriptionKey::operator!=):
100         (WebCore::FontDescriptionKey::isHashTableDeletedValue):
101         (WebCore::FontDescriptionKey::computeHash):
102         * platform/graphics/FontFeatureSettings.cpp:
103         (WebCore::FontFeature::hash):
104         (WebCore::FontFeatureSettings::hash):
105         * platform/graphics/FontFeatureSettings.h:
106
107 2015-08-06  Anders Carlsson  <andersca@apple.com>
108
109         Merge SQLStatement into SQLStatementBackend
110         https://bugs.webkit.org/show_bug.cgi?id=147754
111
112         Reviewed by Geoffrey Garen.
113
114         * CMakeLists.txt:
115         * Modules/webdatabase/Database.h:
116         * Modules/webdatabase/SQLStatement.cpp: Removed.
117         (WebCore::SQLStatement::SQLStatement): Deleted.
118         (WebCore::SQLStatement::setBackend): Deleted.
119         (WebCore::SQLStatement::hasCallback): Deleted.
120         (WebCore::SQLStatement::hasErrorCallback): Deleted.
121         (WebCore::SQLStatement::performCallback): Deleted.
122         * Modules/webdatabase/SQLStatement.h: Removed.
123         * Modules/webdatabase/SQLStatementBackend.cpp:
124         (WebCore::SQLStatementBackend::SQLStatementBackend):
125         (WebCore::SQLStatementBackend::performCallback):
126         (WebCore::SQLStatementBackend::frontend): Deleted.
127         * Modules/webdatabase/SQLStatementBackend.h:
128         (WebCore::SQLStatementBackend::hasStatementCallback):
129         (WebCore::SQLStatementBackend::hasStatementErrorCallback):
130         * Modules/webdatabase/SQLTransaction.cpp:
131         (WebCore::SQLTransaction::deliverStatementCallback):
132         (WebCore::SQLTransaction::executeSQL):
133         * Modules/webdatabase/SQLTransaction.h:
134         * Modules/webdatabase/SQLTransactionBackend.cpp:
135         (WebCore::SQLTransactionBackend::currentStatement):
136         (WebCore::SQLTransactionBackend::executeSQL):
137         * Modules/webdatabase/SQLTransactionBackend.h:
138         * WebCore.vcxproj/WebCore.vcxproj:
139         * WebCore.vcxproj/WebCore.vcxproj.filters:
140         * WebCore.xcodeproj/project.pbxproj:
141         * bindings/js/JSSQLTransactionCustom.cpp:
142
143 2015-08-06  Chris Dumez  <cdumez@apple.com>
144
145         Toggle GPS state based on page visibility to save battery
146         https://bugs.webkit.org/show_bug.cgi?id=147685
147
148         Reviewed by Benjamin Poulain.
149
150         Toggle GPS state based on page visibility to save battery. Previously,
151         if the site you were viewing was watching your position and you
152         switched tab, the GPS would stay on. This was bad for battery life.
153
154         Tests: fast/dom/Geolocation/startUpdatingOnlyWhenPageVisible.html
155                fast/dom/Geolocation/stopUpdatingForHiddenPage.html
156
157         * Modules/geolocation/GeolocationController.cpp:
158         (WebCore::GeolocationController::addObserver):
159         (WebCore::GeolocationController::viewStateDidChange):
160
161 2015-08-06  Anders Carlsson  <andersca@apple.com>
162
163         SQLStatementBackend doesn't need to be refcounted
164         https://bugs.webkit.org/show_bug.cgi?id=147748
165
166         Reviewed by Geoffrey Garen.
167
168         There's no shared ownership of SQLStatementBackend so we can just use std::unique_ptr.
169
170         * Modules/webdatabase/SQLStatementBackend.cpp:
171         (WebCore::SQLStatementBackend::create): Deleted.
172         * Modules/webdatabase/SQLStatementBackend.h:
173         * Modules/webdatabase/SQLTransactionBackend.cpp:
174         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
175         (WebCore::SQLTransactionBackend::executeSQL):
176         * Modules/webdatabase/SQLTransactionBackend.h:
177
178 2015-08-06  Eric Carlson  <eric.carlson@apple.com>
179
180         Do not enforce "content-disposition: attachment" sandbox restrictions on a MediaDocument
181         https://bugs.webkit.org/show_bug.cgi?id=147734
182         rdar://problem/22028179
183
184         Reviewed by Andy Estes.
185
186         Test to follow, see https://bugs.webkit.org/show_bug.cgi?id=147735
187
188         * dom/Document.cpp:
189         (WebCore::Document::initSecurityContext): Use applyContentDispositionAttachmentSandbox
190           instead of setting sandbox flags directly.
191         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Don't special
192           case MediaDocument.
193         (WebCore::Document::applyContentDispositionAttachmentSandbox): Apply sandbox flags
194           according to document type.
195         * dom/Document.h:
196
197 2015-08-06  Anders Carlsson  <andersca@apple.com>
198
199         Get rid of DatabaseBackendBase
200         https://bugs.webkit.org/show_bug.cgi?id=147733
201
202         Reviewed by Geoffrey Garen.
203
204         * CMakeLists.txt:
205         * Modules/webdatabase/Database.cpp:
206         (WebCore::Database::Database):
207         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
208         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
209         * Modules/webdatabase/Database.h:
210         * Modules/webdatabase/DatabaseBackendBase.cpp: Removed.
211         (WebCore::DatabaseBackendBase::DatabaseBackendBase): Deleted.
212         (WebCore::DatabaseBackendBase::~DatabaseBackendBase): Deleted.
213         * Modules/webdatabase/DatabaseBackendBase.h: Removed.
214         * Modules/webdatabase/DatabaseManager.cpp:
215         * Modules/webdatabase/DatabaseManager.h:
216         * Modules/webdatabase/DatabaseTracker.cpp:
217         * WebCore.vcxproj/WebCore.vcxproj:
218         * WebCore.vcxproj/WebCore.vcxproj.filters:
219         * WebCore.xcodeproj/project.pbxproj:
220
221 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
222
223         Add comment to CSSParserString
224         https://bugs.webkit.org/show_bug.cgi?id=147724
225
226         Reviewed by Dean Jackson.
227
228         No new tests because there is no behavior change.
229
230         * css/CSSParserValues.h:
231
232 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
233
234         Font feature settings comparisons are order-dependent and case-dependent
235         https://bugs.webkit.org/show_bug.cgi?id=147719
236
237         Reviewed by Benjamin Poulain.
238
239         We should make our settings vector order-independent and case-independent.
240
241         Test: css3/font-feature-settings-parsing.html
242
243         * css/CSSParser.cpp:
244         (WebCore::CSSParser::parseFontFeatureTag):
245         * css/StyleBuilderConverter.h:
246         (WebCore::StyleBuilderConverter::convertFontFeatureSettings):
247         * platform/graphics/FontFeatureSettings.cpp:
248         (WebCore::FontFeature::FontFeature):
249         (WebCore::FontFeature::operator==):
250         (WebCore::FontFeatureSettings::FontFeatureSettings):
251         * platform/graphics/FontFeatureSettings.h:
252         (WebCore::FontFeature::FontFeature):
253         (WebCore::FontFeature::operator==):
254         (WebCore::FontFeature::operator<):
255         (WebCore::FontFeatureSettings::insert):
256         (WebCore::FontFeatureSettings::FontFeatureSettings):
257         (WebCore::FontFeatureSettings::append): Deleted.
258
259 2015-08-06  Doug Russell  <d_russell@apple.com>
260
261         AX: AXLoadComplete that comes before AX API access won't fire
262         https://bugs.webkit.org/show_bug.cgi?id=147737
263
264         Reviewed by Chris Fleizach.
265
266         Treat setEnhancedUserInterfaceAccessibility() as AX API access and if true,
267         enableAccessibility().
268
269         Test: accessibility/mac/loaded-notification.html
270
271         * accessibility/AXObjectCache.cpp:
272         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):
273
274 2015-08-06  Eric Carlson  <eric.carlson@apple.com>
275
276         Do not enforce "content-disposition: attachment" sandbox restrictions on a MediaDocument
277         https://bugs.webkit.org/show_bug.cgi?id=147734
278         rdar://problem/22028179
279
280         Reviewed by Dean Jackson.
281
282         Test to follow, see https://bugs.webkit.org/show_bug.cgi?id=147735
283
284         * dom/Document.cpp:
285         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Return
286           early if the Document is a MediaDocument.
287
288 2015-08-06  Matt Rajca  <mrajca@apple.com>
289
290         Media Session: remove media elements from the ID <-> element map on destruction
291         https://bugs.webkit.org/show_bug.cgi?id=147707
292
293         Reviewed by Eric Carlson.
294
295         * html/HTMLMediaElement.cpp:
296         (WebCore::HTMLMediaElement::~HTMLMediaElement):
297
298 2015-08-06  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
299
300         [CoordinatedGraphics] Remove unused functions in Coordinated TiledBackingStore
301         https://bugs.webkit.org/show_bug.cgi?id=147621
302
303         Reviewed by Csaba Osztrogonác.
304
305         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Remove setTileSize() and tileSize().
306         (WebCore::TiledBackingStore::setTileSize):
307
308 2015-08-06  Anders Carlsson  <andersca@apple.com>
309
310         Move the last remnants of DatabaseBackendBase to Database
311         https://bugs.webkit.org/show_bug.cgi?id=147730
312
313         Reviewed by Tim Horton.
314
315         * Modules/webdatabase/Database.cpp:
316         (WebCore::Database::Database):
317         (WebCore::Database::performOpenAndVerify):
318         * Modules/webdatabase/Database.h:
319         * Modules/webdatabase/DatabaseBackendBase.cpp:
320         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
321         * Modules/webdatabase/DatabaseBackendBase.h:
322         (WebCore::DatabaseBackendBase::databaseContext): Deleted.
323         (WebCore::DatabaseBackendBase::setFrontend): Deleted.
324
325 2015-08-06  Alex Christensen  <achristensen@webkit.org>
326
327         Fix build without ENABLE(VIDEO) after r188030.
328
329         * dom/Document.h:
330         * html/HTMLMediaElement.cpp:
331         * html/HTMLMediaElement.h:
332         Move definition of HTMLMediaElementInvalidID to Document.h so it can be used outside of ENABLE(VIDEO) macros.
333
334 2015-08-04  Matt Rajca  <mrajca@apple.com>
335
336         Media Session: push paused state to the media session focus manager instead of polling
337         https://bugs.webkit.org/show_bug.cgi?id=147633
338
339         Reviewed by Simon Fraser.
340
341         * dom/Document.cpp:
342         (WebCore::Document::updateIsPlayingMedia): If a valid source element ID is passed in, set the 'IsSourcePlaying'
343          flag accordingly.
344         * dom/Document.h:
345         * html/HTMLMediaElement.cpp:
346         (WebCore::HTMLMediaElement::elementWithID):
347         (WebCore::HTMLMediaElement::setMuted): Pass along the element ID.
348         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
349         (WebCore::HTMLMediaElement::setPlaying): Ditto.
350         * html/HTMLMediaElement.h:
351         * page/ChromeClient.h:
352         * page/MediaProducer.h:
353         * page/Page.cpp:
354         (WebCore::Page::updateIsPlayingMedia): Pass along the source element ID.
355         (WebCore::Page::isMediaElementPaused): Deleted. We now push media playback state changes instead of polling.
356         * page/Page.h:
357
358 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
359
360         CharacterFallbackMapKey should be locale-specific
361         https://bugs.webkit.org/show_bug.cgi?id=147532
362
363         Reviewed by Dean Jackson.
364
365         This is in preparation for locale-specific font fallback.
366
367         No new tests because there is no behavior change.
368
369         * platform/graphics/Font.cpp:
370         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
371         (WebCore::CharacterFallbackMapKey::operator==):
372         (WebCore::CharacterFallbackMapKeyHash::hash):
373         (WebCore::Font::systemFallbackFontForCharacter):
374
375 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
376
377         Expand CharacterFallbackMapKey to a struct
378         https://bugs.webkit.org/show_bug.cgi?id=147530
379
380         Reviewed by Dean Jackson.
381
382         This is in prepraration for making this struct locale-specific.
383
384         No new tests because there is no behavior change.
385
386         * platform/graphics/Font.cpp:
387         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
388         (WebCore::CharacterFallbackMapKey::isHashTableDeletedValue):
389         (WebCore::CharacterFallbackMapKey::operator==):
390         (WebCore::CharacterFallbackMapKeyHash::hash):
391         (WebCore::CharacterFallbackMapKeyHash::equal):
392         (WebCore::Font::systemFallbackFontForCharacter):
393
394 2015-08-05  Chris Dumez  <cdumez@apple.com>
395
396         Crash when removing children of a MathMLSelectElement
397         https://bugs.webkit.org/show_bug.cgi?id=147704
398         <rdar://problem/21940321>
399
400         Reviewed by Ryosuke Niwa.
401
402         When MathMLSelectElement::childrenChanged() is called after its
403         children have been removed, MathMLSelectElement calls
404         updateSelectedChild() which accesses m_selectedChild. However,
405         in this case, m_selectedChild is the previously selected child
406         and it may be destroyed as this point if it was removed. To avoid
407         this problem, MathMLSelectElement now keep a strong ref to the
408         currently selected element.
409
410         Test: mathml/maction-removeChild.html
411
412         * mathml/MathMLSelectElement.h:
413
414 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
415
416         Migrate FontCascade.cpp to NeverDestroyed
417         https://bugs.webkit.org/show_bug.cgi?id=147533
418
419         Reviewed by Simon Fraser.
420
421         No new tests because there is no behavior change.
422
423         * platform/graphics/FontCascade.cpp:
424         (WebCore::fontCascadeCache):
425
426 2015-08-05  Tim Horton  <timothy_horton@apple.com>
427
428         Try to fix the build
429
430         * Modules/webdatabase/Database.cpp:
431         (WebCore::Database::performOpenAndVerify):
432         * Modules/webdatabase/Database.h:
433
434 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
435
436         Delete duplicate forward-declaration
437         https://bugs.webkit.org/show_bug.cgi?id=147701
438
439         Reviewed by Simon Fraser.
440
441         No new tests because there is no behavior change.
442
443         * platform/spi/cocoa/CoreTextSPI.h:
444
445 2015-08-05  Anders Carlsson  <andersca@apple.com>
446
447         Move the last DatabaseBackendBase functions over to Database
448         https://bugs.webkit.org/show_bug.cgi?id=147706
449
450         Reviewed by Tim Horton.
451
452         * Modules/webdatabase/Database.cpp:
453         (WebCore::Database::~Database):
454         (WebCore::Database::setExpectedVersion):
455         (WebCore::Database::getActualVersionForTransaction):
456         (WebCore::Database::version):
457         (WebCore::Database::stringIdentifier):
458         (WebCore::Database::displayName):
459         (WebCore::Database::estimatedSize):
460         (WebCore::Database::fileName):
461         (WebCore::Database::details):
462         (WebCore::Database::maximumSize):
463         (WebCore::Database::databaseDebugName):
464         * Modules/webdatabase/Database.h:
465         * Modules/webdatabase/DatabaseBackendBase.cpp:
466         (WebCore::DatabaseBackendBase::databaseDebugName): Deleted.
467         (WebCore::DatabaseBackendBase::~DatabaseBackendBase): Deleted.
468         (WebCore::DatabaseBackendBase::version): Deleted.
469         (WebCore::DatabaseBackendBase::securityOrigin): Deleted.
470         (WebCore::DatabaseBackendBase::stringIdentifier): Deleted.
471         (WebCore::DatabaseBackendBase::displayName): Deleted.
472         (WebCore::DatabaseBackendBase::estimatedSize): Deleted.
473         (WebCore::DatabaseBackendBase::fileName): Deleted.
474         (WebCore::DatabaseBackendBase::details): Deleted.
475         (WebCore::DatabaseBackendBase::setExpectedVersion): Deleted.
476         (WebCore::DatabaseBackendBase::getActualVersionForTransaction): Deleted.
477         (WebCore::DatabaseBackendBase::maximumSize): Deleted.
478         * Modules/webdatabase/DatabaseBackendBase.h:
479         (WebCore::DatabaseBackendBase::opened): Deleted.
480         (WebCore::DatabaseBackendBase::isNew): Deleted.
481         (WebCore::DatabaseBackendBase::sqliteDatabase): Deleted.
482         (WebCore::DatabaseBackendBase::expectedVersion): Deleted.
483         * Modules/webdatabase/SQLTransactionClient.cpp:
484         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
485         (WebCore::SQLTransactionClient::didExceedQuota):
486         * Modules/webdatabase/SQLTransactionClient.h:
487
488 2015-08-05  Filip Pizlo  <fpizlo@apple.com>
489
490         Unreviewed, roll out http://trac.webkit.org/changeset/187972.
491
492         * Modules/webaudio/AsyncAudioDecoder.cpp:
493         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
494         (WebCore::AsyncAudioDecoder::runLoop):
495         * Modules/webaudio/AsyncAudioDecoder.h:
496         * Modules/webaudio/AudioContext.h:
497         * Modules/webaudio/MediaStreamAudioSource.cpp:
498         (WebCore::MediaStreamAudioSource::addAudioConsumer):
499         (WebCore::MediaStreamAudioSource::removeAudioConsumer):
500         (WebCore::MediaStreamAudioSource::setAudioFormat):
501         (WebCore::MediaStreamAudioSource::consumeAudio):
502         * Modules/webaudio/MediaStreamAudioSource.h:
503         * Modules/webdatabase/Database.cpp:
504         (WebCore::Database::close):
505         (WebCore::Database::runTransaction):
506         (WebCore::Database::inProgressTransactionCompleted):
507         (WebCore::Database::hasPendingTransaction):
508         * Modules/webdatabase/DatabaseTask.h:
509         * Modules/webdatabase/DatabaseThread.cpp:
510         (WebCore::DatabaseThread::start):
511         (WebCore::DatabaseThread::databaseThread):
512         * Modules/webdatabase/DatabaseThread.h:
513         * Modules/webdatabase/DatabaseTracker.cpp:
514         (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
515         (WebCore::DatabaseTracker::canEstablishDatabase):
516         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
517         (WebCore::DatabaseTracker::hasEntryForOrigin):
518         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
519         (WebCore::DatabaseTracker::closeAllDatabases):
520         (WebCore::DatabaseTracker::fullPathForDatabase):
521         (WebCore::DatabaseTracker::origins):
522         (WebCore::DatabaseTracker::databaseNamesForOrigin):
523         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
524         (WebCore::DatabaseTracker::setDatabaseDetails):
525         (WebCore::DatabaseTracker::doneCreatingDatabase):
526         (WebCore::DatabaseTracker::addOpenDatabase):
527         (WebCore::DatabaseTracker::removeOpenDatabase):
528         (WebCore::DatabaseTracker::getOpenDatabases):
529         (WebCore::DatabaseTracker::originLockFor):
530         (WebCore::DatabaseTracker::quotaForOrigin):
531         (WebCore::DatabaseTracker::setQuota):
532         (WebCore::DatabaseTracker::deleteOrigin):
533         (WebCore::DatabaseTracker::deleteDatabase):
534         (WebCore::DatabaseTracker::deleteDatabaseFile):
535         (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
536         (WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
537         (WebCore::DatabaseTracker::openDatabaseMutex):
538         (WebCore::DatabaseTracker::setClient):
539         (WebCore::notificationMutex):
540         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
541         (WebCore::DatabaseTracker::notifyDatabasesChanged):
542         * Modules/webdatabase/DatabaseTracker.h:
543         * Modules/webdatabase/OriginLock.h:
544         * Modules/webdatabase/SQLCallbackWrapper.h:
545         (WebCore::SQLCallbackWrapper::clear):
546         (WebCore::SQLCallbackWrapper::unwrap):
547         (WebCore::SQLCallbackWrapper::hasCallback):
548         * Modules/webdatabase/SQLTransactionBackend.cpp:
549         (WebCore::SQLTransactionBackend::doCleanup):
550         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
551         (WebCore::SQLTransactionBackend::getNextStatement):
552         * Modules/webdatabase/SQLTransactionBackend.h:
553         * bindings/js/WorkerScriptController.cpp:
554         (WebCore::WorkerScriptController::scheduleExecutionTermination):
555         (WebCore::WorkerScriptController::isExecutionTerminating):
556         * bindings/js/WorkerScriptController.h:
557         * dom/default/PlatformMessagePortChannel.cpp:
558         (WebCore::MessagePortChannel::postMessageToRemote):
559         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
560         (WebCore::MessagePortChannel::isConnectedTo):
561         (WebCore::MessagePortChannel::hasPendingActivity):
562         (WebCore::MessagePortChannel::locallyEntangledPort):
563         (WebCore::PlatformMessagePortChannel::setRemotePort):
564         (WebCore::PlatformMessagePortChannel::entangledChannel):
565         (WebCore::PlatformMessagePortChannel::closeInternal):
566         * dom/default/PlatformMessagePortChannel.h:
567         * loader/icon/IconDatabase.cpp:
568         (WebCore::IconDatabase::removeAllIcons):
569         (WebCore::IconDatabase::synchronousIconForPageURL):
570         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
571         (WebCore::IconDatabase::synchronousIconURLForPageURL):
572         (WebCore::IconDatabase::retainIconForPageURL):
573         (WebCore::IconDatabase::performRetainIconForPageURL):
574         (WebCore::IconDatabase::releaseIconForPageURL):
575         (WebCore::IconDatabase::performReleaseIconForPageURL):
576         (WebCore::IconDatabase::setIconDataForIconURL):
577         (WebCore::IconDatabase::setIconURLForPageURL):
578         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
579         (WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
580         (WebCore::IconDatabase::pageURLMappingCount):
581         (WebCore::IconDatabase::retainedPageURLCount):
582         (WebCore::IconDatabase::iconRecordCount):
583         (WebCore::IconDatabase::iconRecordCountWithData):
584         (WebCore::IconDatabase::wakeSyncThread):
585         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks):
586         (WebCore::IconDatabase::databasePath):
587         (WebCore::IconDatabase::getOrCreatePageURLRecord):
588         (WebCore::IconDatabase::iconDatabaseSyncThread):
589         (WebCore::IconDatabase::performOpenInitialization):
590         (WebCore::IconDatabase::performURLImport):
591         (WebCore::IconDatabase::syncThreadMainLoop):
592         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
593         (WebCore::IconDatabase::readFromDatabase):
594         (WebCore::IconDatabase::writeToDatabase):
595         (WebCore::IconDatabase::pruneUnretainedIcons):
596         (WebCore::IconDatabase::cleanupSyncThread):
597         * loader/icon/IconDatabase.h:
598         * page/scrolling/ScrollingTree.cpp:
599         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
600         (WebCore::ScrollingTree::commitNewTreeState):
601         (WebCore::ScrollingTree::setMainFramePinState):
602         (WebCore::ScrollingTree::mainFrameScrollPosition):
603         (WebCore::ScrollingTree::setMainFrameScrollPosition):
604         (WebCore::ScrollingTree::isPointInNonFastScrollableRegion):
605         (WebCore::ScrollingTree::isRubberBandInProgress):
606         (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
607         (WebCore::ScrollingTree::isScrollSnapInProgress):
608         (WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
609         (WebCore::ScrollingTree::setCanRubberBandState):
610         (WebCore::ScrollingTree::rubberBandsAtLeft):
611         (WebCore::ScrollingTree::rubberBandsAtRight):
612         (WebCore::ScrollingTree::rubberBandsAtBottom):
613         (WebCore::ScrollingTree::rubberBandsAtTop):
614         (WebCore::ScrollingTree::setScrollPinningBehavior):
615         (WebCore::ScrollingTree::scrollPinningBehavior):
616         (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
617         (WebCore::ScrollingTree::latchedNode):
618         (WebCore::ScrollingTree::setLatchedNode):
619         (WebCore::ScrollingTree::clearLatchedNode):
620         * page/scrolling/ScrollingTree.h:
621         * platform/MemoryPressureHandler.h:
622         * platform/audio/HRTFDatabaseLoader.cpp:
623         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
624         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
625         * platform/audio/HRTFDatabaseLoader.h:
626         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
627         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
628         (WebCore::MemoryPressureHandler::clearMemoryPressure):
629         (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
630         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
631         * platform/graphics/DisplayRefreshMonitor.cpp:
632         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
633         * platform/graphics/DisplayRefreshMonitor.h:
634         (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime):
635         (WebCore::DisplayRefreshMonitor::mutex):
636         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
637         (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks):
638         (WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag):
639         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
640         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
641         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
642         (WebCore::AVFWrapper::callbackContext):
643         (WebCore::AVFWrapper::~AVFWrapper):
644         (WebCore::AVFWrapper::mapLock):
645         (WebCore::AVFWrapper::addToMap):
646         (WebCore::AVFWrapper::removeFromMap):
647         (WebCore::AVFWrapper::periodicTimeObserverCallback):
648         (WebCore::AVFWrapper::processNotification):
649         (WebCore::AVFWrapper::loadPlayableCompletionCallback):
650         (WebCore::AVFWrapper::loadMetadataCompletionCallback):
651         (WebCore::AVFWrapper::seekCompletedCallback):
652         (WebCore::AVFWrapper::processCue):
653         (WebCore::AVFWrapper::legibleOutputCallback):
654         (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource):
655         (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):
656         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
657         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
658         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
659         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
660         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
661         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
662         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
663         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
664         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
665         (WebCore::DisplayRefreshMonitorMac::requestRefreshCallback):
666         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
667         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
668         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
669         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
670         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
671         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
672         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
673         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
674         * platform/ios/LegacyTileCache.h:
675         * platform/ios/LegacyTileCache.mm:
676         (WebCore::LegacyTileCache::setTilesOpaque):
677         (WebCore::LegacyTileCache::doLayoutTiles):
678         (WebCore::LegacyTileCache::setCurrentScale):
679         (WebCore::LegacyTileCache::commitScaleChange):
680         (WebCore::LegacyTileCache::layoutTilesNow):
681         (WebCore::LegacyTileCache::layoutTilesNowForRect):
682         (WebCore::LegacyTileCache::removeAllNonVisibleTiles):
683         (WebCore::LegacyTileCache::removeAllTiles):
684         (WebCore::LegacyTileCache::removeForegroundTiles):
685         (WebCore::LegacyTileCache::setContentReplacementImage):
686         (WebCore::LegacyTileCache::contentReplacementImage):
687         (WebCore::LegacyTileCache::tileCreationTimerFired):
688         (WebCore::LegacyTileCache::setNeedsDisplayInRect):
689         (WebCore::LegacyTileCache::updateTilingMode):
690         (WebCore::LegacyTileCache::setTilingMode):
691         (WebCore::LegacyTileCache::doPendingRepaints):
692         (WebCore::LegacyTileCache::flushSavedDisplayRects):
693         (WebCore::LegacyTileCache::prepareToDraw):
694         * platform/ios/LegacyTileLayerPool.h:
695         * platform/ios/LegacyTileLayerPool.mm:
696         (WebCore::LegacyTileLayerPool::addLayer):
697         (WebCore::LegacyTileLayerPool::takeLayerWithSize):
698         (WebCore::LegacyTileLayerPool::setCapacity):
699         (WebCore::LegacyTileLayerPool::prune):
700         (WebCore::LegacyTileLayerPool::drain):
701         * platform/network/curl/CurlDownload.cpp:
702         (WebCore::CurlDownloadManager::add):
703         (WebCore::CurlDownloadManager::remove):
704         (WebCore::CurlDownloadManager::getActiveDownloadCount):
705         (WebCore::CurlDownloadManager::getPendingDownloadCount):
706         (WebCore::CurlDownloadManager::stopThreadIfIdle):
707         (WebCore::CurlDownloadManager::updateHandleList):
708         (WebCore::CurlDownload::~CurlDownload):
709         (WebCore::CurlDownload::init):
710         (WebCore::CurlDownload::getTempPath):
711         (WebCore::CurlDownload::getUrl):
712         (WebCore::CurlDownload::getResponse):
713         (WebCore::CurlDownload::closeFile):
714         (WebCore::CurlDownload::didReceiveHeader):
715         (WebCore::CurlDownload::didReceiveData):
716         (WebCore::CurlDownload::didFail):
717         * platform/network/curl/CurlDownload.h:
718         * platform/network/curl/ResourceHandleManager.cpp:
719         (WebCore::cookieJarPath):
720         (WebCore::sharedResourceMutex):
721         (WebCore::curl_lock_callback):
722         (WebCore::curl_unlock_callback):
723         * platform/network/ios/QuickLook.mm:
724         (WebCore::QLDirectoryAttributes):
725         (qlPreviewConverterDictionaryMutex):
726         (WebCore::addQLPreviewConverterWithFileForURL):
727         (WebCore::qlPreviewConverterUTIForURL):
728         (WebCore::removeQLPreviewConverterForURL):
729         (WebCore::safeQLURLForDocumentURLAndResourceURL):
730         * platform/sql/SQLiteDatabase.cpp:
731         (WebCore::SQLiteDatabase::close):
732         (WebCore::SQLiteDatabase::maximumSize):
733         (WebCore::SQLiteDatabase::setMaximumSize):
734         (WebCore::SQLiteDatabase::pageSize):
735         (WebCore::SQLiteDatabase::freeSpaceSize):
736         (WebCore::SQLiteDatabase::totalSize):
737         (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
738         (WebCore::SQLiteDatabase::setAuthorizer):
739         * platform/sql/SQLiteDatabase.h:
740         (WebCore::SQLiteDatabase::databaseMutex):
741         * platform/sql/SQLiteStatement.cpp:
742         (WebCore::SQLiteStatement::prepare):
743         (WebCore::SQLiteStatement::step):
744         * workers/WorkerThread.cpp:
745         (WebCore::WorkerThread::start):
746         (WebCore::WorkerThread::workerThread):
747         (WebCore::WorkerThread::stop):
748         * workers/WorkerThread.h:
749
750 2015-08-05  Anders Carlsson  <andersca@apple.com>
751
752         Move more functions from DatabaseBackendBase to Database
753         https://bugs.webkit.org/show_bug.cgi?id=147705
754
755         Reviewed by Tim Horton.
756
757         * Modules/webdatabase/Database.cpp:
758         (WebCore::guidMutex):
759         (WebCore::guidToVersionMap):
760         (WebCore::updateGuidVersionMap):
761         (WebCore::guidToDatabaseMap):
762         (WebCore::guidForOriginAndName):
763         (WebCore::Database::Database):
764         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
765         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
766         (WebCore::DoneCreatingDatabaseOnExitCaller::setOpenSucceeded):
767         (WebCore::Database::performOpenAndVerify):
768         (WebCore::Database::closeDatabase):
769         (WebCore::Database::getCachedVersion):
770         (WebCore::Database::setCachedVersion):
771         * Modules/webdatabase/Database.h:
772         * Modules/webdatabase/DatabaseBackendBase.cpp:
773         (WebCore::DatabaseBackendBase::version):
774         (WebCore::formatErrorMessage): Deleted.
775         (WebCore::guidMutex): Deleted.
776         (WebCore::guidToVersionMap): Deleted.
777         (WebCore::updateGuidVersionMap): Deleted.
778         (WebCore::guidToDatabaseMap): Deleted.
779         (WebCore::guidForOriginAndName): Deleted.
780         (WebCore::DatabaseBackendBase::DatabaseBackendBase): Deleted.
781         (WebCore::DatabaseBackendBase::closeDatabase): Deleted.
782         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller): Deleted.
783         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller): Deleted.
784         (WebCore::DoneCreatingDatabaseOnExitCaller::setOpenSucceeded): Deleted.
785         (WebCore::DatabaseBackendBase::performOpenAndVerify): Deleted.
786         (WebCore::DatabaseBackendBase::getCachedVersion): Deleted.
787         (WebCore::DatabaseBackendBase::setCachedVersion): Deleted.
788         * Modules/webdatabase/DatabaseBackendBase.h:
789
790 2015-08-05  Anders Carlsson  <andersca@apple.com>
791
792         Move more functions from DatabaseBackendBase to Database
793         https://bugs.webkit.org/show_bug.cgi?id=147703
794
795         Reviewed by Tim Horton.
796
797         * Modules/webdatabase/Database.cpp:
798         (WebCore::fullyQualifiedInfoTableName):
799         (WebCore::setTextValueInDatabase):
800         (WebCore::retrieveTextResultFromDatabase):
801         (WebCore::Database::getVersionFromDatabase):
802         (WebCore::Database::setVersionInDatabase):
803         (WebCore::Database::performGetTableNames):
804         * Modules/webdatabase/Database.h:
805         * Modules/webdatabase/DatabaseBackendBase.cpp:
806         (WebCore::DatabaseBackendBase::performOpenAndVerify):
807         (WebCore::DatabaseBackendBase::getActualVersionForTransaction):
808         (WebCore::DatabaseBackendBase::databaseInfoTableName): Deleted.
809         (WebCore::fullyQualifiedInfoTableName): Deleted.
810         (WebCore::retrieveTextResultFromDatabase): Deleted.
811         (WebCore::setTextValueInDatabase): Deleted.
812         (WebCore::DatabaseBackendBase::getVersionFromDatabase): Deleted.
813         (WebCore::DatabaseBackendBase::setVersionInDatabase): Deleted.
814         * Modules/webdatabase/DatabaseBackendBase.h:
815
816 2015-08-05  Alex Christensen  <achristensen@webkit.org>
817
818         Build DumpRenderTree with CMake.
819         https://bugs.webkit.org/show_bug.cgi?id=147519
820
821         Reviewed by Brent Fulgham.
822
823         * CMakeLists.txt:
824         WebCoreTestSupport is a static library and should not be linked with WebCore.
825
826 2015-08-05  Anders Carlsson  <andersca@apple.com>
827
828         Move some more DatabaseBackendBase functions to Database
829         https://bugs.webkit.org/show_bug.cgi?id=147702
830
831         Reviewed by Tim Horton.
832
833         * Modules/webdatabase/Database.cpp:
834         (WebCore::formatErrorMessage):
835         (WebCore::Database::disableAuthorizer):
836         (WebCore::Database::enableAuthorizer):
837         (WebCore::Database::setAuthorizerPermissions):
838         (WebCore::Database::lastActionChangedDatabase):
839         (WebCore::Database::lastActionWasInsert):
840         (WebCore::Database::resetDeletes):
841         (WebCore::Database::hadDeletes):
842         (WebCore::Database::resetAuthorizer):
843         (WebCore::Database::incrementalVacuumIfNeeded):
844         * Modules/webdatabase/Database.h:
845         * Modules/webdatabase/DatabaseBackendBase.cpp:
846         (WebCore::DatabaseBackendBase::disableAuthorizer): Deleted.
847         (WebCore::DatabaseBackendBase::enableAuthorizer): Deleted.
848         (WebCore::DatabaseBackendBase::setAuthorizerPermissions): Deleted.
849         (WebCore::DatabaseBackendBase::lastActionChangedDatabase): Deleted.
850         (WebCore::DatabaseBackendBase::lastActionWasInsert): Deleted.
851         (WebCore::DatabaseBackendBase::resetDeletes): Deleted.
852         (WebCore::DatabaseBackendBase::hadDeletes): Deleted.
853         (WebCore::DatabaseBackendBase::resetAuthorizer): Deleted.
854         (WebCore::DatabaseBackendBase::incrementalVacuumIfNeeded): Deleted.
855         * Modules/webdatabase/DatabaseBackendBase.h:
856
857 2015-08-05  Zalan Bujtas  <zalan@apple.com>
858
859         [Frame flattening] Return early when child RenderView is not available.
860         https://bugs.webkit.org/show_bug.cgi?id=147697
861
862         Reviewed by Simon Fraser.
863
864         No change in functionality.
865
866         * rendering/RenderFrameBase.cpp:
867         (WebCore::RenderFrameBase::peformLayoutWithFlattening):
868
869 2015-08-05  Anders Carlsson  <andersca@apple.com>
870
871         Remove more dead database code
872         https://bugs.webkit.org/show_bug.cgi?id=147698
873
874         Reviewed by Tim Horton.
875
876         * Modules/webdatabase/DatabaseBackendBase.cpp:
877         (WebCore::DatabaseBackendBase::interrupt): Deleted.
878         (WebCore::DatabaseBackendBase::isInterrupted): Deleted.
879         * Modules/webdatabase/DatabaseBackendBase.h:
880         * Modules/webdatabase/SQLStatementBackend.cpp:
881         (WebCore::SQLStatementBackend::execute):
882         * Modules/webdatabase/SQLTransaction.cpp:
883         (WebCore::SQLTransaction::computeNextStateAndCleanupIfNeeded):
884         * Modules/webdatabase/SQLTransactionBackend.cpp:
885         (WebCore::SQLTransactionBackend::computeNextStateAndCleanupIfNeeded):
886         * platform/sql/SQLiteDatabase.cpp:
887         (WebCore::SQLiteDatabase::setFullsync):
888         (WebCore::SQLiteDatabase::SQLiteDatabase): Deleted.
889         (WebCore::SQLiteDatabase::interrupt): Deleted.
890         (WebCore::SQLiteDatabase::isInterrupted): Deleted.
891         * platform/sql/SQLiteDatabase.h:
892         * platform/sql/SQLiteStatement.cpp:
893         (WebCore::SQLiteStatement::prepare): Deleted.
894         (WebCore::SQLiteStatement::step): Deleted.
895
896 2015-08-05  Anders Carlsson  <andersca@apple.com>
897
898         Fix build.
899
900         * platform/cf/CoreMediaSoftLink.cpp:
901         * platform/cf/CoreMediaSoftLink.h:
902
903 2015-08-05  Anders Carlsson  <andersca@apple.com>
904
905         Fix build.
906
907         * platform/graphics/mac/FontCacheMac.mm:
908         (WebCore::lookupCTFont):
909
910 2015-08-05  Anders Carlsson  <andersca@apple.com>
911
912         Change openDatabase to return a Database instead of a DatabaseBackendBase
913         https://bugs.webkit.org/show_bug.cgi?id=147691
914
915         Reviewed by Tim Horton.
916
917         * Modules/webdatabase/AbstractDatabaseServer.h:
918         * Modules/webdatabase/Database.cpp:
919         (WebCore::Database::create): Deleted.
920         * Modules/webdatabase/Database.h:
921         * Modules/webdatabase/DatabaseManager.cpp:
922         (WebCore::DatabaseManager::openDatabaseBackend):
923         (WebCore::DatabaseManager::openDatabase):
924         * Modules/webdatabase/DatabaseManager.h:
925         * Modules/webdatabase/DatabaseServer.cpp:
926         (WebCore::DatabaseServer::openDatabase):
927         (WebCore::DatabaseServer::createDatabase):
928         * Modules/webdatabase/DatabaseServer.h:
929
930 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
931
932         [OS X] Migrate to CTFontCreateForCharactersWithLanguage from [NSFont findFontLike:forString:withRange:inLanguage]
933         https://bugs.webkit.org/show_bug.cgi?id=147483
934
935         Reviewed by Dean Jackson.
936
937         [NSFont findFontLike:forString:withRange:inLanguage] doesn't properly handle its last argument. In
938         addition, we want to be moving away from NSFont in the first place and on to Core Text. This new
939         CoreText function correctly handles its language argument, which is required for language-specific
940         font fallback.
941
942         This patch rolls r187707 back in which was rolled out in r187802 due to test flakiness. This patch
943         fixes the flakiness.
944
945         No new tests because there is no behavior change.
946
947         * platform/graphics/FontCache.cpp:
948         (WebCore::FontCache::purgeInactiveFontData):
949         * platform/graphics/FontCache.h:
950         (WebCore::FontCache::platformPurgeInactiveFontData):
951         * platform/graphics/mac/FontCacheMac.mm:
952         (WebCore::fallbackDedupSet):
953         (WebCore::FontCache::platformPurgeInactiveFontData):
954         (WebCore::lookupCTFont):
955         (WebCore::FontCache::systemFallbackForCharacters):
956         * platform/spi/cocoa/CoreTextSPI.h:
957         * platform/spi/mac/NSFontSPI.h:
958
959 2015-08-05  Anders Carlsson  <andersca@apple.com>
960
961         Get rid of DatabaseBackend as another step towards merging Database and DatabaseBackendBase
962         https://bugs.webkit.org/show_bug.cgi?id=147687
963
964         Reviewed by Tim Horton.
965
966         * CMakeLists.txt:
967         * Modules/webdatabase/ChangeVersionWrapper.cpp:
968         (WebCore::ChangeVersionWrapper::performPreflight):
969         (WebCore::ChangeVersionWrapper::performPostflight):
970         * Modules/webdatabase/Database.cpp:
971         (WebCore::Database::Database):
972         (WebCore::Database::close):
973         (WebCore::Database::from): Deleted.
974         (WebCore::Database::backend): Deleted.
975         * Modules/webdatabase/Database.h:
976         * Modules/webdatabase/DatabaseBackend.cpp: Removed.
977         (WebCore::DatabaseBackend::DatabaseBackend): Deleted.
978         * Modules/webdatabase/DatabaseBackend.h: Removed.
979         * Modules/webdatabase/DatabaseManager.cpp:
980         * Modules/webdatabase/DatabaseServer.cpp:
981         * Modules/webdatabase/DatabaseTask.cpp:
982         (WebCore::DatabaseTask::DatabaseTask):
983         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
984         (WebCore::DatabaseOpenTask::doPerformTask):
985         (WebCore::DatabaseOpenTask::debugTaskName):
986         (WebCore::DatabaseCloseTask::DatabaseCloseTask):
987         (WebCore::DatabaseCloseTask::doPerformTask):
988         (WebCore::DatabaseCloseTask::debugTaskName):
989         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
990         (WebCore::DatabaseTransactionTask::~DatabaseTransactionTask):
991         (WebCore::DatabaseTransactionTask::doPerformTask):
992         (WebCore::DatabaseTransactionTask::debugTaskName):
993         (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
994         (WebCore::DatabaseTableNamesTask::doPerformTask):
995         (WebCore::DatabaseTableNamesTask::debugTaskName):
996         (WebCore::DatabaseBackend::DatabaseOpenTask::DatabaseOpenTask): Deleted.
997         (WebCore::DatabaseBackend::DatabaseOpenTask::doPerformTask): Deleted.
998         (WebCore::DatabaseBackend::DatabaseOpenTask::debugTaskName): Deleted.
999         (WebCore::DatabaseBackend::DatabaseCloseTask::DatabaseCloseTask): Deleted.
1000         (WebCore::DatabaseBackend::DatabaseCloseTask::doPerformTask): Deleted.
1001         (WebCore::DatabaseBackend::DatabaseCloseTask::debugTaskName): Deleted.
1002         (WebCore::DatabaseBackend::DatabaseTransactionTask::DatabaseTransactionTask): Deleted.
1003         (WebCore::DatabaseBackend::DatabaseTransactionTask::~DatabaseTransactionTask): Deleted.
1004         (WebCore::DatabaseBackend::DatabaseTransactionTask::doPerformTask): Deleted.
1005         (WebCore::DatabaseBackend::DatabaseTransactionTask::debugTaskName): Deleted.
1006         (WebCore::DatabaseBackend::DatabaseTableNamesTask::DatabaseTableNamesTask): Deleted.
1007         (WebCore::DatabaseBackend::DatabaseTableNamesTask::doPerformTask): Deleted.
1008         (WebCore::DatabaseBackend::DatabaseTableNamesTask::debugTaskName): Deleted.
1009         * Modules/webdatabase/DatabaseTask.h:
1010         (WebCore::DatabaseTask::database):
1011         * Modules/webdatabase/SQLStatementBackend.cpp:
1012         (WebCore::SQLStatementBackend::execute):
1013         * Modules/webdatabase/SQLStatementBackend.h:
1014         * Modules/webdatabase/SQLTransactionBackend.cpp:
1015         (WebCore::SQLTransactionBackend::executeSQL):
1016         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
1017         * WebCore.vcxproj/WebCore.vcxproj:
1018         * WebCore.vcxproj/WebCore.vcxproj.filters:
1019         * WebCore.xcodeproj/project.pbxproj:
1020
1021 2015-08-04  Filip Pizlo  <fpizlo@apple.com>
1022
1023         Rename Mutex to DeprecatedMutex
1024         https://bugs.webkit.org/show_bug.cgi?id=147675
1025
1026         Reviewed by Geoffrey Garen.
1027
1028         No new tests because this is just a renaming.
1029
1030         * Modules/webaudio/AsyncAudioDecoder.cpp:
1031         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
1032         (WebCore::AsyncAudioDecoder::runLoop):
1033         * Modules/webaudio/AsyncAudioDecoder.h:
1034         * Modules/webaudio/AudioContext.h:
1035         * Modules/webaudio/MediaStreamAudioSource.cpp:
1036         (WebCore::MediaStreamAudioSource::addAudioConsumer):
1037         (WebCore::MediaStreamAudioSource::removeAudioConsumer):
1038         (WebCore::MediaStreamAudioSource::setAudioFormat):
1039         (WebCore::MediaStreamAudioSource::consumeAudio):
1040         * Modules/webaudio/MediaStreamAudioSource.h:
1041         * Modules/webdatabase/Database.cpp:
1042         (WebCore::Database::close):
1043         (WebCore::Database::runTransaction):
1044         (WebCore::Database::inProgressTransactionCompleted):
1045         (WebCore::Database::hasPendingTransaction):
1046         * Modules/webdatabase/DatabaseBackend.h:
1047         * Modules/webdatabase/DatabaseBackendBase.cpp:
1048         (WebCore::DatabaseBackendBase::performOpenAndVerify):
1049         (WebCore::DatabaseBackendBase::isInterrupted):
1050         * Modules/webdatabase/DatabaseContext.cpp:
1051         (WebCore::DatabaseContext::databaseThread):
1052         (WebCore::DatabaseContext::setPaused):
1053         * Modules/webdatabase/DatabaseContext.h:
1054         * Modules/webdatabase/DatabaseTask.h:
1055         * Modules/webdatabase/DatabaseThread.cpp:
1056         (WebCore::DatabaseThread::start):
1057         (WebCore::DatabaseThread::setPaused):
1058         (WebCore::DatabaseThread::handlePausedQueue):
1059         (WebCore::DatabaseThread::databaseThread):
1060         * Modules/webdatabase/DatabaseThread.h:
1061         * Modules/webdatabase/DatabaseTracker.cpp:
1062         (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
1063         (WebCore::DatabaseTracker::canEstablishDatabase):
1064         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
1065         (WebCore::DatabaseTracker::hasEntryForOrigin):
1066         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
1067         (WebCore::DatabaseTracker::closeAllDatabases):
1068         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
1069         (WebCore::DatabaseTracker::fullPathForDatabase):
1070         (WebCore::DatabaseTracker::origins):
1071         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1072         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
1073         (WebCore::DatabaseTracker::setDatabaseDetails):
1074         (WebCore::DatabaseTracker::doneCreatingDatabase):
1075         (WebCore::DatabaseTracker::addOpenDatabase):
1076         (WebCore::DatabaseTracker::removeOpenDatabase):
1077         (WebCore::DatabaseTracker::getOpenDatabases):
1078         (WebCore::DatabaseTracker::originLockFor):
1079         (WebCore::DatabaseTracker::quotaForOrigin):
1080         (WebCore::DatabaseTracker::setQuota):
1081         (WebCore::DatabaseTracker::deleteOrigin):
1082         (WebCore::DatabaseTracker::deleteDatabase):
1083         (WebCore::DatabaseTracker::deleteDatabaseFile):
1084         (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
1085         (WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
1086         (WebCore::DatabaseTracker::openDatabaseMutex):
1087         (WebCore::DatabaseTracker::setDatabasesPaused):
1088         (WebCore::DatabaseTracker::setClient):
1089         (WebCore::notificationMutex):
1090         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
1091         (WebCore::DatabaseTracker::notifyDatabasesChanged):
1092         * Modules/webdatabase/DatabaseTracker.h:
1093         * Modules/webdatabase/OriginLock.h:
1094         * Modules/webdatabase/SQLCallbackWrapper.h:
1095         (WebCore::SQLCallbackWrapper::clear):
1096         (WebCore::SQLCallbackWrapper::unwrap):
1097         (WebCore::SQLCallbackWrapper::hasCallback):
1098         * Modules/webdatabase/SQLTransactionBackend.cpp:
1099         (WebCore::SQLTransactionBackend::doCleanup):
1100         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
1101         (WebCore::SQLTransactionBackend::getNextStatement):
1102         * Modules/webdatabase/SQLTransactionBackend.h:
1103         * bindings/js/WorkerScriptController.cpp:
1104         (WebCore::WorkerScriptController::scheduleExecutionTermination):
1105         (WebCore::WorkerScriptController::isExecutionTerminating):
1106         * bindings/js/WorkerScriptController.h:
1107         * dom/default/PlatformMessagePortChannel.cpp:
1108         (WebCore::MessagePortChannel::postMessageToRemote):
1109         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
1110         (WebCore::MessagePortChannel::isConnectedTo):
1111         (WebCore::MessagePortChannel::hasPendingActivity):
1112         (WebCore::MessagePortChannel::locallyEntangledPort):
1113         (WebCore::PlatformMessagePortChannel::setRemotePort):
1114         (WebCore::PlatformMessagePortChannel::entangledChannel):
1115         (WebCore::PlatformMessagePortChannel::closeInternal):
1116         * dom/default/PlatformMessagePortChannel.h:
1117         * loader/icon/IconDatabase.cpp:
1118         (WebCore::IconDatabase::removeAllIcons):
1119         (WebCore::IconDatabase::synchronousIconForPageURL):
1120         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
1121         (WebCore::IconDatabase::synchronousIconURLForPageURL):
1122         (WebCore::IconDatabase::retainIconForPageURL):
1123         (WebCore::IconDatabase::performRetainIconForPageURL):
1124         (WebCore::IconDatabase::releaseIconForPageURL):
1125         (WebCore::IconDatabase::performReleaseIconForPageURL):
1126         (WebCore::IconDatabase::setIconDataForIconURL):
1127         (WebCore::IconDatabase::setIconURLForPageURL):
1128         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
1129         (WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
1130         (WebCore::IconDatabase::pageURLMappingCount):
1131         (WebCore::IconDatabase::retainedPageURLCount):
1132         (WebCore::IconDatabase::iconRecordCount):
1133         (WebCore::IconDatabase::iconRecordCountWithData):
1134         (WebCore::IconDatabase::wakeSyncThread):
1135         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks):
1136         (WebCore::IconDatabase::databasePath):
1137         (WebCore::IconDatabase::getOrCreatePageURLRecord):
1138         (WebCore::IconDatabase::iconDatabaseSyncThread):
1139         (WebCore::IconDatabase::performOpenInitialization):
1140         (WebCore::IconDatabase::performURLImport):
1141         (WebCore::IconDatabase::syncThreadMainLoop):
1142         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
1143         (WebCore::IconDatabase::readFromDatabase):
1144         (WebCore::IconDatabase::writeToDatabase):
1145         (WebCore::IconDatabase::pruneUnretainedIcons):
1146         (WebCore::IconDatabase::cleanupSyncThread):
1147         * loader/icon/IconDatabase.h:
1148         * page/scrolling/ScrollingTree.cpp:
1149         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
1150         (WebCore::ScrollingTree::commitNewTreeState):
1151         (WebCore::ScrollingTree::setMainFramePinState):
1152         (WebCore::ScrollingTree::mainFrameScrollPosition):
1153         (WebCore::ScrollingTree::setMainFrameScrollPosition):
1154         (WebCore::ScrollingTree::isPointInNonFastScrollableRegion):
1155         (WebCore::ScrollingTree::isRubberBandInProgress):
1156         (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
1157         (WebCore::ScrollingTree::isScrollSnapInProgress):
1158         (WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
1159         (WebCore::ScrollingTree::setCanRubberBandState):
1160         (WebCore::ScrollingTree::rubberBandsAtLeft):
1161         (WebCore::ScrollingTree::rubberBandsAtRight):
1162         (WebCore::ScrollingTree::rubberBandsAtBottom):
1163         (WebCore::ScrollingTree::rubberBandsAtTop):
1164         (WebCore::ScrollingTree::setScrollPinningBehavior):
1165         (WebCore::ScrollingTree::scrollPinningBehavior):
1166         (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
1167         (WebCore::ScrollingTree::latchedNode):
1168         (WebCore::ScrollingTree::setLatchedNode):
1169         (WebCore::ScrollingTree::clearLatchedNode):
1170         * page/scrolling/ScrollingTree.h:
1171         * platform/MemoryPressureHandler.h:
1172         * platform/audio/HRTFDatabaseLoader.cpp:
1173         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
1174         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
1175         * platform/audio/HRTFDatabaseLoader.h:
1176         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1177         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
1178         (WebCore::MemoryPressureHandler::clearMemoryPressure):
1179         (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
1180         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
1181         * platform/graphics/DisplayRefreshMonitor.cpp:
1182         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
1183         * platform/graphics/DisplayRefreshMonitor.h:
1184         (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime):
1185         (WebCore::DisplayRefreshMonitor::mutex):
1186         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1187         (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks):
1188         (WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag):
1189         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
1190         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1191         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1192         (WebCore::AVFWrapper::callbackContext):
1193         (WebCore::AVFWrapper::~AVFWrapper):
1194         (WebCore::AVFWrapper::mapLock):
1195         (WebCore::AVFWrapper::addToMap):
1196         (WebCore::AVFWrapper::removeFromMap):
1197         (WebCore::AVFWrapper::periodicTimeObserverCallback):
1198         (WebCore::AVFWrapper::processNotification):
1199         (WebCore::AVFWrapper::loadPlayableCompletionCallback):
1200         (WebCore::AVFWrapper::loadMetadataCompletionCallback):
1201         (WebCore::AVFWrapper::seekCompletedCallback):
1202         (WebCore::AVFWrapper::processCue):
1203         (WebCore::AVFWrapper::legibleOutputCallback):
1204         (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource):
1205         (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):
1206         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
1207         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
1208         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
1209         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
1210         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1211         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
1212         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
1213         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
1214         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
1215         (WebCore::DisplayRefreshMonitorMac::requestRefreshCallback):
1216         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
1217         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1218         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
1219         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
1220         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
1221         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
1222         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
1223         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1224         * platform/ios/LegacyTileCache.h:
1225         * platform/ios/LegacyTileCache.mm:
1226         (WebCore::LegacyTileCache::setTilesOpaque):
1227         (WebCore::LegacyTileCache::doLayoutTiles):
1228         (WebCore::LegacyTileCache::setCurrentScale):
1229         (WebCore::LegacyTileCache::commitScaleChange):
1230         (WebCore::LegacyTileCache::layoutTilesNow):
1231         (WebCore::LegacyTileCache::layoutTilesNowForRect):
1232         (WebCore::LegacyTileCache::removeAllNonVisibleTiles):
1233         (WebCore::LegacyTileCache::removeAllTiles):
1234         (WebCore::LegacyTileCache::removeForegroundTiles):
1235         (WebCore::LegacyTileCache::setContentReplacementImage):
1236         (WebCore::LegacyTileCache::contentReplacementImage):
1237         (WebCore::LegacyTileCache::tileCreationTimerFired):
1238         (WebCore::LegacyTileCache::setNeedsDisplayInRect):
1239         (WebCore::LegacyTileCache::updateTilingMode):
1240         (WebCore::LegacyTileCache::setTilingMode):
1241         (WebCore::LegacyTileCache::doPendingRepaints):
1242         (WebCore::LegacyTileCache::flushSavedDisplayRects):
1243         (WebCore::LegacyTileCache::prepareToDraw):
1244         * platform/ios/LegacyTileLayerPool.h:
1245         * platform/ios/LegacyTileLayerPool.mm:
1246         (WebCore::LegacyTileLayerPool::addLayer):
1247         (WebCore::LegacyTileLayerPool::takeLayerWithSize):
1248         (WebCore::LegacyTileLayerPool::setCapacity):
1249         (WebCore::LegacyTileLayerPool::prune):
1250         (WebCore::LegacyTileLayerPool::drain):
1251         * platform/network/curl/CurlDownload.cpp:
1252         (WebCore::CurlDownloadManager::add):
1253         (WebCore::CurlDownloadManager::remove):
1254         (WebCore::CurlDownloadManager::getActiveDownloadCount):
1255         (WebCore::CurlDownloadManager::getPendingDownloadCount):
1256         (WebCore::CurlDownloadManager::stopThreadIfIdle):
1257         (WebCore::CurlDownloadManager::updateHandleList):
1258         (WebCore::CurlDownload::~CurlDownload):
1259         (WebCore::CurlDownload::init):
1260         (WebCore::CurlDownload::getTempPath):
1261         (WebCore::CurlDownload::getUrl):
1262         (WebCore::CurlDownload::getResponse):
1263         (WebCore::CurlDownload::closeFile):
1264         (WebCore::CurlDownload::didReceiveHeader):
1265         (WebCore::CurlDownload::didReceiveData):
1266         (WebCore::CurlDownload::didFail):
1267         * platform/network/curl/CurlDownload.h:
1268         * platform/network/curl/ResourceHandleManager.cpp:
1269         (WebCore::cookieJarPath):
1270         (WebCore::sharedResourceMutex):
1271         (WebCore::curl_lock_callback):
1272         (WebCore::curl_unlock_callback):
1273         * platform/network/ios/QuickLook.mm:
1274         (WebCore::QLDirectoryAttributes):
1275         (qlPreviewConverterDictionaryMutex):
1276         (WebCore::addQLPreviewConverterWithFileForURL):
1277         (WebCore::qlPreviewConverterUTIForURL):
1278         (WebCore::removeQLPreviewConverterForURL):
1279         (WebCore::safeQLURLForDocumentURLAndResourceURL):
1280         * platform/sql/SQLiteDatabase.cpp:
1281         (WebCore::SQLiteDatabase::close):
1282         (WebCore::SQLiteDatabase::interrupt):
1283         (WebCore::SQLiteDatabase::maximumSize):
1284         (WebCore::SQLiteDatabase::setMaximumSize):
1285         (WebCore::SQLiteDatabase::pageSize):
1286         (WebCore::SQLiteDatabase::freeSpaceSize):
1287         (WebCore::SQLiteDatabase::totalSize):
1288         (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
1289         (WebCore::SQLiteDatabase::setAuthorizer):
1290         * platform/sql/SQLiteDatabase.h:
1291         (WebCore::SQLiteDatabase::databaseMutex):
1292         * platform/sql/SQLiteStatement.cpp:
1293         (WebCore::SQLiteStatement::prepare):
1294         (WebCore::SQLiteStatement::step):
1295         * workers/WorkerThread.cpp:
1296         (WebCore::WorkerThread::start):
1297         (WebCore::WorkerThread::workerThread):
1298         (WebCore::WorkerThread::stop):
1299         * workers/WorkerThread.h:
1300
1301 2015-08-05  Matthew Daiter  <mdaiter@apple.com>
1302
1303         Adding in MediaPrivateMediaStreamEngine to default compile
1304         https://bugs.webkit.org/show_bug.cgi?id=146790
1305         <rdar://problem/21747289>
1306
1307         Reviewed by Eric Carlson.
1308
1309         * WebCore.xcodeproj/project.pbxproj:
1310         * platform/mediastream/MediaStreamPrivate.h:
1311         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
1312
1313 2015-08-05  Matthew Daiter  <mdaiter@apple.com>
1314
1315         Remove m_synchronizer from MediaPlayerPrivateMediaStream
1316         https://bugs.webkit.org/show_bug.cgi?id=147637
1317
1318         Reviewed by Eric Carlson.
1319
1320         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
1321         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1322         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::playInternal): Deleted.
1323
1324 2015-08-05  Wenson Hsieh  <wenson_hsieh@apple.com>
1325
1326         Build fix after 187961
1327
1328         * platform/mac/ThemeMac.mm:
1329         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
1330
1331 2015-08-05  Daniel Bates  <dabates@apple.com>
1332
1333         REGRESSION (r185111): Clicking phone numbers doesn't prompt to call sometimes
1334         https://bugs.webkit.org/show_bug.cgi?id=147678
1335         <rdar://problem/21827815>
1336
1337         Reviewed by Brady Eidson.
1338
1339         Fixes an issue where a non-user-initiated navigation of the main frame to a phone link (tel URL)
1340         may be ignored. The navigation is ignored if the page was reloaded as a result of a web content
1341         process crash, its lifetime exceeded the back-forward cache expiration interval, or a person
1342         quits and opens Safari again, among other scenarios.
1343
1344         * history/HistoryItem.cpp:
1345         (WebCore::HistoryItem::setShouldOpenExternalURLsPolicy): Added.
1346         (WebCore::HistoryItem::shouldOpenExternalURLsPolicy): Added.
1347         * history/HistoryItem.h:
1348         * loader/FrameLoader.cpp:
1349         (WebCore::FrameLoader::loadDifferentDocumentItem): Apply the "should open external URLs" policy
1350         from the history item, if applicable. Also, be more explicit when instantiating a NavigationAction
1351         so as to help make it straightforward to reduce the number of NavigationAction constructors we have
1352         in the future.
1353         * loader/HistoryController.cpp:
1354         (WebCore::HistoryController::saveDocumentState): Save the "should open external URLs" policy to
1355         the history item.
1356         (WebCore::HistoryController::restoreDocumentState): Apply the "should open external URLs" policy
1357         from the history item to the document loader.
1358         (WebCore::HistoryController::initializeItem): Update the "should open external URLs" policy of
1359         the history item to reflect the policy of the document loader associated with the current frame.
1360
1361 2015-08-04  Wenson Hsieh  <wenson_hsieh@apple.com>
1362
1363         Checkboxes and radio buttons should scale when zooming or pinching to zoom
1364         https://bugs.webkit.org/show_bug.cgi?id=147405
1365
1366         Reviewed by Dean Jackson.
1367
1368         Refactors paintButton and paintToggleButton to use a temporary buffer when rendering
1369         if the controls are zoomed. This affects checkboxes, radio buttons, and normal (push)
1370         buttons.
1371
1372         * platform/mac/ThemeMac.h:
1373         * platform/mac/ThemeMac.mm:
1374         (WebCore::paintToggleButton): Refactored to use drawCellOrFocusRingWithViewIntoContext.
1375         (WebCore::paintButton): Refactored to use drawCellOrFocusRingWithViewIntoContext.
1376         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Draws a given button cell
1377             and/or its focus ring into the given context, optionally using an offscreen buffer.
1378             This is a static function in ThemeMac so it can be accessed later on by
1379             RenderThemeMac when painting search fields that scale with zoom.
1380         (WebCore::ThemeMac::paint):
1381         (WebCore::buttonFocusRectOutlineWidth): Deleted. Made this value into a const float.
1382
1383 2015-08-04  Doug Russell  <d_russell@apple.com>
1384
1385         AX: tree item children returned from ranged getter are different from full array of children
1386         https://bugs.webkit.org/show_bug.cgi?id=147660
1387
1388         Reviewed by Chris Fleizach.
1389
1390         Add an isTreeItem() check in ranged element getter so that it matches the logic in 
1391         the getter for the full children array. This prevents returning a row as a child
1392         when only the rows contents should be returned. This prevents navigation issues on
1393         websites without aria outlines.
1394
1395         Test: accessibility/mac/aria-tree-item-children.html
1396
1397         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1398         (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
1399
1400 2015-08-04  Anders Carlsson  <andersca@apple.com>
1401
1402         CTTE the database task code
1403         https://bugs.webkit.org/show_bug.cgi?id=147673
1404
1405         Reviewed by Andreas Kling.
1406
1407         * Modules/webdatabase/Database.cpp:
1408         (WebCore::Database::openAndVerifyVersion):
1409         (WebCore::Database::markAsDeletedAndClose):
1410         (WebCore::Database::tableNames):
1411         * Modules/webdatabase/DatabaseTask.cpp:
1412         (WebCore::DatabaseTask::DatabaseTask):
1413         (WebCore::DatabaseTask::performTask):
1414         (WebCore::DatabaseBackend::DatabaseOpenTask::DatabaseOpenTask):
1415         (WebCore::DatabaseBackend::DatabaseOpenTask::doPerformTask):
1416         (WebCore::DatabaseBackend::DatabaseCloseTask::DatabaseCloseTask):
1417         (WebCore::DatabaseBackend::DatabaseCloseTask::doPerformTask):
1418         (WebCore::DatabaseBackend::DatabaseTransactionTask::DatabaseTransactionTask):
1419         (WebCore::DatabaseBackend::DatabaseTableNamesTask::DatabaseTableNamesTask):
1420         (WebCore::DatabaseBackend::DatabaseTableNamesTask::doPerformTask):
1421         * Modules/webdatabase/DatabaseTask.h:
1422         (WebCore::DatabaseTask::database):
1423         * Modules/webdatabase/DatabaseThread.cpp:
1424         (WebCore::SameDatabasePredicate::operator()):
1425
1426 2015-08-04  Brent Fulgham  <bfulgham@apple.com>
1427
1428         REGRESSION (r173784): [Mac] Correct latching error for non-scrollable iframe nested inside scrollable div.
1429         https://bugs.webkit.org/show_bug.cgi?id=147668
1430         <rdar://problem/21870332>
1431
1432         Reviewed by Simon Fraser.
1433
1434         Test: platform/mac/fast/scrolling/scroll-div-with-nested-nonscrollable-iframe.html
1435
1436         When we are wrapping up processing of the wheel event for a given frame, if the current latching context
1437         does NOT apply to the current frame (e.g., because it's latched to an enclosing frame) we should not pass
1438         wheel events directly to the latched elements scrollable container. Instead, we should just give the current
1439         frame an opportunity to perform any custom wheel event handling and return, so that the enclosing (latched)
1440         frame can do the rest of its event handling.
1441         
1442         If we don't do this, we incorrectly ask the enclosing frame to process the event, then return claiming that
1443         we handled the event, preventing the enclosing frame from doing its part of the processing.
1444
1445         * page/mac/EventHandlerMac.mm:
1446         (WebCore::EventHandler::platformCompleteWheelEvent):
1447
1448 2015-08-04  Alex Christensen  <achristensen@webkit.org>
1449
1450         Soft link libGLESv2 and libEGL on Windows again
1451         https://bugs.webkit.org/show_bug.cgi?id=147671
1452
1453         Reviewed by Dean Jackson.
1454
1455         * platform/graphics/PlatformDisplay.cpp:
1456         (WebCore::PlatformDisplay::initializeEGLDisplay):
1457         Fail gracefully if libEGL is not found.
1458
1459 2015-08-04  Anders Carlsson  <andersca@apple.com>
1460
1461         Remove another unused database function
1462         https://bugs.webkit.org/show_bug.cgi?id=147670
1463
1464         Reviewed by Daniel Bates.
1465
1466         This was used back when we had WebSQL support in workers, we can safely remove all these functions now.
1467
1468         * Modules/webdatabase/AbstractDatabaseServer.h:
1469         * Modules/webdatabase/DatabaseManager.cpp:
1470         (WebCore::DatabaseManager::interruptAllDatabasesForContext): Deleted.
1471         * Modules/webdatabase/DatabaseManager.h:
1472         * Modules/webdatabase/DatabaseServer.cpp:
1473         (WebCore::DatabaseServer::interruptAllDatabasesForContext): Deleted.
1474         * Modules/webdatabase/DatabaseServer.h:
1475         * Modules/webdatabase/DatabaseTracker.cpp:
1476         (WebCore::DatabaseTracker::interruptAllDatabasesForContext): Deleted.
1477         * Modules/webdatabase/DatabaseTracker.h:
1478
1479 2015-08-04  Anders Carlsson  <andersca@apple.com>
1480
1481         Remove database thread pause code
1482         https://bugs.webkit.org/show_bug.cgi?id=147669
1483
1484         Reviewed by Daniel Bates.
1485
1486         We now grab power assertions while running SQLite transactions, 
1487         and this code isn't used at all with modern WebKit so let's just get rid of it.
1488
1489         * Modules/webdatabase/DatabaseContext.cpp:
1490         (WebCore::DatabaseContext::DatabaseContext): Deleted.
1491         (WebCore::DatabaseContext::databaseThread): Deleted.
1492         (WebCore::DatabaseContext::setPaused): Deleted.
1493         * Modules/webdatabase/DatabaseContext.h:
1494         * Modules/webdatabase/DatabaseTask.cpp:
1495         (WebCore::Database::DatabaseTransactionTask::shouldPerformWhilePaused): Deleted.
1496         * Modules/webdatabase/DatabaseTask.h:
1497         * Modules/webdatabase/DatabaseThread.cpp:
1498         (WebCore::DatabaseThread::DatabaseThread): Deleted.
1499         (WebCore::DatabaseThread::requestTermination): Deleted.
1500         (WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask): Deleted.
1501         (WebCore::DatabaseUnpauseTask::shouldPerformWhilePaused): Deleted.
1502         (WebCore::DatabaseUnpauseTask::doPerformTask): Deleted.
1503         (WebCore::DatabaseUnpauseTask::debugTaskName): Deleted.
1504         (WebCore::DatabaseThread::setPaused): Deleted.
1505         (WebCore::DatabaseThread::handlePausedQueue): Deleted.
1506         (WebCore::DatabaseThread::databaseThread): Deleted.
1507         * Modules/webdatabase/DatabaseThread.h:
1508         * Modules/webdatabase/DatabaseTracker.cpp:
1509         (WebCore::DatabaseTracker::setDatabasesPaused): Deleted.
1510         * Modules/webdatabase/DatabaseTracker.h:
1511
1512 2015-08-04  Chris Dumez  <cdumez@apple.com>
1513
1514         Subframes with no current HistoryItem should not prevent page-caching
1515         https://bugs.webkit.org/show_bug.cgi?id=147649
1516         <rdar://problem/21614832>
1517
1518         Reviewed by Andreas Kling.
1519
1520         Subframes with no current HistoryItem should not prevent page-caching.
1521         We need one for the main frame as this is the key in the PageCache.
1522         However, there is no reason to require one for subframes.
1523
1524         This is a common reason for page-caching failures nowadays.
1525
1526         Frames do no have a current HistoryItem until something has been loaded in them.
1527
1528         Test: http/tests/navigation/page-cache-iframe-no-current-historyItem.html
1529
1530         * history/PageCache.cpp:
1531         (WebCore::logCanCacheFrameDecision):
1532         (WebCore::PageCache::canCachePageContainingThisFrame):
1533
1534 2015-08-04  Brent Fulgham  <bfulgham@apple.com>
1535
1536         [Win] Build fix after r187908
1537
1538         * platform/win/WindowsTouch.h: If WINVER is set properly, we
1539         don't need these definitions.
1540
1541 2015-08-04  Anders Carlsson  <andersca@apple.com>
1542
1543         Remove an unused Database function
1544         https://bugs.webkit.org/show_bug.cgi?id=147661
1545
1546         Reviewed by Simon Fraser.
1547
1548         * Modules/webdatabase/Database.cpp:
1549         (WebCore::Database::closeImmediately): Deleted.
1550         * Modules/webdatabase/Database.h:
1551
1552 2015-08-04  Brady Eidson  <beidson@apple.com>
1553
1554         Crash when following a Google search link to Twitter with Limit Adult Content enabled.
1555         <rdar://problem/22123707> and https://bugs.webkit.org/show_bug.cgi?id=147651
1556
1557         Reviewed by Sam Weinig.
1558
1559         No new tests (Doesn't occur in a tested config).
1560
1561         For now, we'll skip the application cache for main resource loads if parental controls are enabled.
1562
1563         * loader/DocumentLoader.cpp:
1564         (WebCore::DocumentLoader::willSendRequest):
1565         (WebCore::DocumentLoader::startLoadingMainResource):
1566
1567 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
1568
1569         Added buffer to AVMediaCaptureSource
1570         https://bugs.webkit.org/show_bug.cgi?id=147454
1571         <rdar://problem/22079502>
1572
1573         Reviewed by Jer Noble.
1574
1575         * platform/mediastream/mac/AVMediaCaptureSource.h:
1576         (WebCore::AVMediaCaptureSource::buffer):
1577         (WebCore::AVMediaCaptureSource::setBuffer):
1578         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1579         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
1580
1581 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
1582
1583         Needless assignment of usingDot
1584         https://bugs.webkit.org/show_bug.cgi?id=147514
1585
1586         Reviewed by Eric Carlson.
1587
1588         * platform/graphics/mac/GraphicsContextMac.mm:
1589         (WebCore::GraphicsContext::drawLineForDocumentMarker): Deleted.
1590
1591 2015-08-04  Chris Dumez  <cdumez@apple.com>
1592
1593         shouldParseTelephoneNumbersInNode() does not need to check for Comment nodes
1594         https://bugs.webkit.org/show_bug.cgi?id=147630
1595
1596         Reviewed by Sam Weinig.
1597
1598         shouldParseTelephoneNumbersInNode() does not need to check for Comment
1599         nodes. We already know the input is a ContainerNode and a Comment is
1600         NOT a ContainerNode. Also, we were already doing a isElementNode()
1601         check before calling disallowTelephoneNumberParsing().
1602
1603         I also updated the function to use a for loop for clarity and dropped
1604         the isElementNode() check as calling hasTagName() / isLink() on a
1605         ContainerNode is as fast all calling it on an Element nowadays.
1606
1607         * html/parser/HTMLTreeBuilder.cpp:
1608         (WebCore::disallowTelephoneNumberParsing):
1609         (WebCore::shouldParseTelephoneNumbersInNode):
1610
1611 2015-08-04  Eric Carlson  <eric.carlson@apple.com>
1612
1613         [Mac] Do not require a video track for AirPlay
1614         https://bugs.webkit.org/show_bug.cgi?id=147647
1615
1616         Reviewed by Jer Noble.
1617
1618         * Modules/mediacontrols/mediaControlsApple.js:
1619         (Controller.prototype.handleReadyStateChange): Call updateWirelessTargetAvailable().
1620         (Controller.prototype.updateHasVideo): Don't call updateWirelessTargetAvailable().
1621         (Controller.prototype.updateWirelessTargetAvailable): Don't require video.
1622
1623         * html/HTMLMediaElement.cpp:
1624         (WebCore::HTMLMediaElement::setReadyState): Call updateMediaState when we reach HAVE_METADATA.
1625         (WebCore::HTMLMediaElement::mediaState): Don't require video, only that the file can play.
1626
1627         * html/MediaElementSession.cpp:
1628         (WebCore::MediaElementSession::showPlaybackTargetPicker): Check readyState instead of hasVideo.
1629
1630 2015-08-04  Anders Carlsson  <andersca@apple.com>
1631
1632         Get rid of ReasonForCallingAllowPlugins since it's not used anywhere
1633         https://bugs.webkit.org/show_bug.cgi?id=147648
1634
1635         Reviewed by Andreas Kling.
1636
1637         * dom/DOMImplementation.cpp:
1638         (WebCore::DOMImplementation::createDocument):
1639         * html/HTMLElement.cpp:
1640         (WebCore::HTMLElement::rendererIsNeeded):
1641         * html/parser/HTMLParserOptions.cpp:
1642         (WebCore::HTMLParserOptions::HTMLParserOptions):
1643         * loader/FrameLoaderTypes.h:
1644         * loader/SubframeLoader.cpp:
1645         (WebCore::SubframeLoader::requestPlugin):
1646         (WebCore::SubframeLoader::createJavaAppletWidget):
1647         (WebCore::SubframeLoader::allowPlugins):
1648         * loader/SubframeLoader.h:
1649         * plugins/DOMMimeType.cpp:
1650         (WebCore::DOMMimeType::enabledPlugin):
1651
1652 2015-08-04  Alex Christensen  <achristensen@webkit.org>
1653
1654         Fix debug CMake build on Windows after r187818.
1655
1656         * PlatformWin.cmake:
1657         Debug *AllInOne.cpp object files in WebCore require /bigobj to compile successfully.
1658
1659 2015-08-04  Alexey Proskuryakov  <ap@apple.com>
1660
1661         Implement NPAPI redirect handling
1662         https://bugs.webkit.org/show_bug.cgi?id=138675
1663         rdar://problem/15779101
1664
1665         Patch by Jeffrey Pfau, updated and tweaked by me.
1666
1667         Reviewed by Anders Carlsson.
1668
1669         Test: http/tests/plugins/get-url-redirect-notify.html
1670
1671         * loader/NetscapePlugInStreamLoader.cpp:
1672         (WebCore::NetscapePlugInStreamLoader::init):
1673         (WebCore::NetscapePlugInStreamLoader::willSendRequest):
1674         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
1675         * loader/NetscapePlugInStreamLoader.h:
1676         * loader/ResourceLoader.cpp:
1677         (WebCore::ResourceLoader::init):
1678         (WebCore::ResourceLoader::isSubresourceLoader):
1679         (WebCore::ResourceLoader::willSendRequestInternal):
1680         (WebCore::ResourceLoader::willSendRequest):
1681         (WebCore::ResourceLoader::didSendData):
1682         * loader/ResourceLoader.h:
1683         * loader/SubresourceLoader.cpp:
1684         (WebCore::SubresourceLoader::isSubresourceLoader):
1685         (WebCore::SubresourceLoader::willSendRequestInternal):
1686         (WebCore::SubresourceLoader::willSendRequest): Deleted.
1687         * loader/SubresourceLoader.h:
1688         * plugins/npapi.h:
1689         * plugins/npfunctions.h:
1690
1691 2015-08-04  Zalan Bujtas  <zalan@apple.com>
1692
1693         RenderTheme::paint() should take RenderBox instead of RenderObject.
1694         https://bugs.webkit.org/show_bug.cgi?id=147638
1695
1696         Reviewed by Andreas Kling.
1697
1698         No change in functionality.
1699
1700         * rendering/RenderTheme.cpp:
1701         (WebCore::RenderTheme::paint):
1702         (WebCore::RenderTheme::updateControlStatesForRenderer): ->RenderBox too.
1703         (WebCore::RenderTheme::isActive): Remove redundant code.
1704         * rendering/RenderTheme.h:
1705
1706 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
1707
1708         Render to GraphicsContext MediaPlayerPrivateMediaStreamAVFObjC
1709         https://bugs.webkit.org/show_bug.cgi?id=147643
1710
1711         Reviewed by Eric Carlson.
1712
1713         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1714         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paint):
1715
1716 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
1717
1718         Added ability to create images from buffers for MediaStream paint methods
1719         https://bugs.webkit.org/show_bug.cgi?id=147642
1720
1721         Reviewed by Eric Carlson.
1722
1723         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
1724         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1725         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createImageFromSampleBuffer):
1726
1727 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
1728
1729         Add image variable rendered by paint methods for MediaStream
1730         https://bugs.webkit.org/show_bug.cgi?id=147645
1731
1732         Reviewed by Eric Carlson.
1733
1734         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
1735
1736 2015-08-04  Zalan Bujtas  <zalan@apple.com>
1737
1738         RenderTheme::baselinePosition() should take RenderBox instead of RenderObject.
1739         https://bugs.webkit.org/show_bug.cgi?id=147632
1740
1741         Reviewed by Andreas Kling.
1742
1743         It eliminates some redundant type checking and casting.
1744
1745         No change in functionality.
1746
1747         * platform/efl/RenderThemeEfl.cpp:
1748         (WebCore::RenderThemeEfl::baselinePosition):
1749         * platform/efl/RenderThemeEfl.h:
1750         * rendering/RenderTheme.cpp:
1751         (WebCore::RenderTheme::baselinePosition):
1752         * rendering/RenderTheme.h:
1753         * rendering/RenderThemeGtk.cpp:
1754         (WebCore::RenderThemeGtk::baselinePosition):
1755         * rendering/RenderThemeGtk.h:
1756         * rendering/RenderThemeIOS.h:
1757         * rendering/RenderThemeIOS.mm:
1758         (WebCore::RenderThemeIOS::baselinePosition):
1759         * rendering/RenderThemeSafari.cpp:
1760         (WebCore::RenderThemeSafari::baselinePosition):
1761         * rendering/RenderThemeSafari.h:
1762
1763 2015-08-04  Alex Christensen  <achristensen@webkit.org>
1764
1765         Enable WebGL on Windows CMake build.
1766         https://bugs.webkit.org/show_bug.cgi?id=143311
1767
1768         Reviewed by Csaba Osztrogonác.
1769
1770         * CMakeLists.txt:
1771         ANGLE is built quite differently on Windows, so I'm not going to touch the existing CMake build system for
1772         ANGLE on Linux, although I think it should eventually be unified more by using ANGLE's OpenGL renderer.
1773         * PlatformWin.cmake:
1774         Added some needed source files and include directories.
1775
1776 2015-08-04  Jeremy Jones  <jeremyj@apple.com>
1777
1778         Implement isPictureInPictureInterrupted.
1779         https://bugs.webkit.org/show_bug.cgi?id=147620
1780
1781         Reviewed by Eric Carlson.
1782
1783         Implement isPictureInPictureInterrupted so setting the property to true pauses playback.
1784         This allows PiP to pause when the device is locked while the app is suspended.
1785
1786         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1787         (-[WebAVPlayerController init]):
1788         (-[WebAVPlayerController isPictureInPictureInterrupted]):
1789         (-[WebAVPlayerController setPictureInPictureInterrupted:]):
1790
1791 2015-08-03  Csaba Osztrogonác  <ossy@webkit.org>
1792
1793         Introduce COMPILER(GCC_OR_CLANG) guard and make COMPILER(GCC) true only for GCC
1794         https://bugs.webkit.org/show_bug.cgi?id=146833
1795
1796         Reviewed by Alexey Proskuryakov.
1797
1798         * platform/graphics/cpu/arm/filters/FELightingNEON.cpp:
1799         * platform/graphics/cpu/arm/filters/FELightingNEON.h:
1800         * platform/graphics/filters/FELighting.cpp:
1801         (WebCore::FELighting::platformApply):
1802         * platform/network/efl/NetworkStateNotifierEfl.cpp:
1803         (WebCore::NetworkStateNotifier::readSocketCallback):
1804
1805 2015-08-03  Csaba Osztrogonác  <ossy@webkit.org>
1806
1807         [CMake] Add an option to build AllInOne files
1808         https://bugs.webkit.org/show_bug.cgi?id=102647
1809
1810         Reviewed by Alex Christensen.
1811
1812         * CMakeLists.txt:
1813
1814 2015-08-03  Csaba Osztrogonác  <ossy@webkit.org>
1815
1816         Fix the all-in-one build on Linux after r187659
1817         https://bugs.webkit.org/show_bug.cgi?id=147557
1818
1819         Reviewed by Alex Christensen.
1820
1821         Removed MediaFeatureNames.cpp from the all-in-one build, because it caused build failures on Linux.
1822         Additionally removed css/MediaAllInOne.cpp since it is unused.
1823
1824         * WebCore.vcxproj/WebCore.vcxproj:
1825         * WebCore.vcxproj/WebCore.vcxproj.filters:
1826         * css/CSSAllInOne.cpp:
1827         * css/MediaAllInOne.cpp: Removed.
1828
1829 2015-08-03  Benjamin Poulain  <bpoulain@apple.com>
1830
1831         Returns inconsistent types for el.style.property and el.style.getPropertyValue('color')
1832         https://bugs.webkit.org/show_bug.cgi?id=147549
1833
1834         Reviewed by Andreas Kling.
1835
1836         Kudos to Greg Whitworth for finding this bug.
1837
1838         Test: fast/css/getPropertyValue-returns-empty-on-missing-property.html
1839
1840         * css/CSSStyleDeclaration.idl:
1841         Our definition was wrong.
1842         Current spec: http://www.w3.org/TR/cssom/#dom-cssstyledeclaration-getpropertyvalue
1843         Current draft: https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-getpropertyvalue
1844         Gecko and EdgeHTML follow the spec.
1845
1846 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
1847
1848         Fix crashing Mavericks test
1849
1850         Unreviewed.
1851
1852         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1853         (WebCore::FontPlatformData::registeredFont):
1854
1855 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
1856
1857         Unreviewed post-review feedback on r187797
1858
1859         The correct terminology is "registered" instead of "activated."
1860
1861         No new tests because there is no behavior change.
1862
1863         * platform/graphics/FontPlatformData.h:
1864         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1865         (WebCore::FontPlatformData::registeredFont):
1866         (WebCore::FontPlatformData::activatedFont): Deleted.
1867
1868 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
1869
1870         Clean up casts between NSFont*s and CTFontRefs
1871         https://bugs.webkit.org/show_bug.cgi?id=147618
1872
1873         Reviewed by Mitz Pettel.
1874
1875         For toll free bridged types, it makes more sense to do a C-style cast, than jump
1876         through hoops for older compilers.
1877
1878         No new tests because there is no behavior change.
1879
1880         * platform/graphics/FontPlatformData.h:
1881         (WebCore::FontPlatformData::nsFont):
1882         (WebCore::FontPlatformData::hash):
1883
1884 2015-08-03  Commit Queue  <commit-queue@webkit.org>
1885
1886         Unreviewed, rolling out r187707, r187709, r187724, and
1887         r187728.
1888         https://bugs.webkit.org/show_bug.cgi?id=147617
1889
1890         fast/text/international/arabic-justify.html is flakey
1891         (Requested by litherum on #webkit).
1892
1893         Reverted changesets:
1894
1895         "[OS X] Migrate to CTFontCreateForCharactersWithLanguage from
1896         [NSFont findFontLike:forString:withRange:inLanguage]"
1897         https://bugs.webkit.org/show_bug.cgi?id=147483
1898         http://trac.webkit.org/changeset/187707
1899
1900         "Fix the build"
1901         http://trac.webkit.org/changeset/187709
1902
1903         "Expand CharacterFallbackMapKey to a struct"
1904         https://bugs.webkit.org/show_bug.cgi?id=147530
1905         http://trac.webkit.org/changeset/187724
1906
1907         "CharacterFallbackMapKey should be locale-specific"
1908         https://bugs.webkit.org/show_bug.cgi?id=147532
1909         http://trac.webkit.org/changeset/187728
1910
1911 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
1912
1913         REGRESSION(r184899): Crash when focusing an input element styled with a web font
1914         https://bugs.webkit.org/show_bug.cgi?id=147616
1915         <rdar://problem/21838271>
1916
1917         Reviewed by Dean Jackson.
1918
1919         NSFontManager can't handle web fonts. We used to pass null to NSFontManager in this case,
1920         but r184899 changed that.
1921
1922         Test: fast/text/input-webfont-focus.html
1923
1924         * platform/graphics/FontPlatformData.h:
1925         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
1926         (WebCore::FontPlatformData::activatedFont):
1927
1928 2015-08-03  Brent Fulgham  <bfulgham@apple.com>
1929
1930         [Win] Unreviewed build fix.
1931
1932         It turns out that the IFEQ command (at least on Cygwin) does not
1933         understand Wildcards for OS types. Consequently, we should not use
1934         Windows* in makefiles. Luckily, we only need Windows_NT anymore.
1935
1936         * DerivedSources.make: Change Windows* -> Windows_NT to correct build.
1937
1938 2015-08-03  Tim Horton  <timothy_horton@apple.com>
1939
1940         REGRESSION (r186916): TextIndicators for multiline link previews are unreadable/offset/blank
1941         https://bugs.webkit.org/show_bug.cgi?id=147615
1942         <rdar://problem/22116575>
1943
1944         Reviewed by Dean Jackson.
1945
1946         * page/mac/TextIndicatorWindow.mm:
1947         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
1948         No need to offset by the difference between the text bounding rect and the selection bounding rect,
1949         because the snapshot is now (after r186916) taken of exactly the text bounding rect.
1950
1951 2015-08-03  Matt Rajca  <mrajca@apple.com>
1952
1953         Media Session: let UI clients query whether a media element is paused
1954         https://bugs.webkit.org/show_bug.cgi?id=147588
1955
1956         Reviewed by Tim Horton.
1957
1958         * page/Page.cpp:
1959         (WebCore::Page::isMediaElementPaused): Determine if the media element with the given ID is paused.
1960         * page/Page.h:
1961
1962 2015-08-03  Eric Carlson  <eric.carlson@apple.com>
1963
1964         [Mac] Always require user gesture to begin playing to AppleTV automatically
1965         https://bugs.webkit.org/show_bug.cgi?id=147591
1966
1967         Reviewed by Jer Noble.
1968
1969         * html/HTMLMediaElement.cpp:
1970         (WebCore::HTMLMediaElement::mediaState): Don't set the ExternalDeviceAutoPlayCandidate 
1971           flag until the user has explicitly triggered playback.
1972
1973 2015-08-03  Dean Jackson  <dino@apple.com>
1974
1975         Inline video controls overlap each other while playing video in slideover mode
1976         https://bugs.webkit.org/show_bug.cgi?id=147535
1977         <rdar://problem/22026864>
1978
1979         Reviewed by Eric Carlson.
1980
1981         Now that the resizing code is in the shared controller, we need to
1982         make sure to hide the timeline scrubber in iOS when the controls
1983         get too small. This involved adding the dropped class to the timeline,
1984         and rules for hiding to the CSS.
1985
1986         Meanwhile, when the page scale factor is less than one, we use the CSS zoom property
1987         and don't need to factor in the page scale factor when calculating
1988         the size.
1989
1990         * Modules/mediacontrols/mediaControlsApple.js:
1991         (Controller.prototype.updateLayoutForDisplayedWidth): Don't use pageScaleFactor.
1992         * Modules/mediacontrols/mediaControlsiOS.css:
1993         (audio::-webkit-media-controls-panel .dropped): Add display none for this rule.
1994
1995 2015-08-03  Anders Carlsson  <andersca@apple.com>
1996
1997         Safari is failing to remove SQLite Databases via Remove All Website Data
1998         https://bugs.webkit.org/show_bug.cgi?id=147584
1999         rdar://problem/22095006
2000
2001         Reviewed by Brady Eidson.
2002
2003         If we end up deleting every single database for an origin, make sure to also delete the origin.
2004
2005         * Modules/webdatabase/DatabaseTracker.cpp:
2006         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
2007
2008 2015-08-03  Zalan Bujtas  <zalan@apple.com>
2009
2010         Move "starting from root" frame flattening logging to the correct place.
2011         https://bugs.webkit.org/show_bug.cgi?id=147571
2012
2013         Reviewed by Simon Fraser.
2014
2015         * page/FrameView.cpp:
2016         (WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):
2017         (WebCore::FrameView::layout): Deleted.
2018
2019 2015-08-03  Commit Queue  <commit-queue@webkit.org>
2020
2021         Unreviewed, rolling out r187729.
2022         https://bugs.webkit.org/show_bug.cgi?id=147575
2023
2024         10% performance hit (Requested by litherum on #webkit).
2025
2026         Reverted changeset:
2027
2028         "[OS X] Font fallback is not language-sensitive"
2029         https://bugs.webkit.org/show_bug.cgi?id=147390
2030         http://trac.webkit.org/changeset/187729
2031
2032 2015-08-03  Zalan Bujtas  <zalan@apple.com>
2033
2034         ChildWidgetState::ChildWidgetIs* naming is redundant.
2035         https://bugs.webkit.org/show_bug.cgi?id=147565
2036
2037         Reviewed by Simon Fraser.
2038
2039         Since strongly typed enum requires to write out 'ChildWidgetState::ChildWidgetIsDestroyed',
2040         the enumerator list names can be shortened.
2041
2042         No change in behaviour.
2043
2044         * rendering/RenderFrameBase.cpp:
2045         (WebCore::RenderFrameBase::peformLayoutWithFlattening):
2046         * rendering/RenderWidget.cpp:
2047         (WebCore::RenderWidget::updateWidgetPosition):
2048         * rendering/RenderWidget.h:
2049
2050 2015-08-03  Zalan Bujtas  <zalan@apple.com>
2051
2052         Pass ControlStates& to RenderTheme methods instead of ControlStates*
2053         https://bugs.webkit.org/show_bug.cgi?id=147521
2054
2055         Reviewed by Andreas Kling.
2056
2057         No change in functionality.
2058
2059         * platform/Theme.h:
2060         (WebCore::Theme::selectionColor):
2061         (WebCore::Theme::paint):
2062         (WebCore::Theme::inflateControlPaintRect):
2063         * platform/mac/ThemeMac.h:
2064         * platform/mac/ThemeMac.mm:
2065         (WebCore::updateStates):
2066         (WebCore::convertControlStatesToThemeDrawState):
2067         (WebCore::configureToggleButton):
2068         (WebCore::sharedRadioCell):
2069         (WebCore::sharedCheckboxCell):
2070         (WebCore::paintToggleButton):
2071         (WebCore::setUpButtonCell):
2072         (WebCore::button):
2073         (WebCore::paintButton):
2074         (WebCore::paintStepper):
2075         (WebCore::ThemeMac::ensuredView):
2076         (WebCore::ThemeMac::inflateControlPaintRect):
2077         (WebCore::ThemeMac::paint):
2078         * rendering/RenderBox.cpp:
2079         (WebCore::RenderBox::paintBoxDecorations):
2080         * rendering/RenderTheme.cpp:
2081         (WebCore::RenderTheme::paint):
2082         (WebCore::RenderTheme::adjustRepaintRect):
2083         (WebCore::RenderTheme::updateControlStatesForRenderer):
2084         * rendering/RenderTheme.h:
2085         * rendering/RenderThemeMac.mm:
2086         (WebCore::RenderThemeMac::documentViewFor):
2087
2088 2015-08-03  Brady Eidson  <beidson@apple.com>
2089
2090         Crash when signing into twitter calling WebCore::DocumentLoader::responseReceived(WebCore::CachedResource*, WebCore::ResourceResponse const&).
2091         <rdar://problem/22098457> and https://bugs.webkit.org/show_bug.cgi?id=147560
2092
2093         Reviewed by Alexey Proskuryakov.
2094
2095         * loader/DocumentLoader.cpp:
2096         (WebCore::DocumentLoader::willSendRequest): Only grab identifierForLoadWithoutResourceLoader() if there's no ResourceLoader.
2097
2098 2015-08-03  Zalan Bujtas  <zalan@apple.com>
2099
2100         themePainted in RenderBox::paintBoxDecorations() is confusing.
2101         https://bugs.webkit.org/show_bug.cgi?id=147492
2102
2103         Reviewed by Andreas Kling.
2104
2105         What themePainted is supposed to indicate is whether the theme requires additional border and background painting.
2106         Rename it to borderOrBackgroundPaintingIsNeeded.
2107
2108         No change in behaviour.
2109
2110         * rendering/RenderBox.cpp:
2111         (WebCore::RenderBox::paintBoxDecorations):
2112
2113 2015-08-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2114
2115         [EFL] http/tests/media/media-stream/disconnected-frame-already.html is crashing after r185903
2116         https://bugs.webkit.org/show_bug.cgi?id=146834
2117
2118         Reviewed by Eric Carlson.
2119
2120         r185903 went to far in removing some tests, in particular whether the current process is related to a frame.
2121         Readded that check.
2122         Refactored the code to remove the need for NavigatorUserMedia class.
2123
2124         Covered by existing tests.
2125
2126         * CMakeLists.txt: Removed NavigatorUserMedia.cpp.
2127         * Modules/mediastream/NavigatorUserMedia.cpp: Removed.
2128         * Modules/mediastream/NavigatorUserMedia.h: Removed.
2129         * WebCore.xcodeproj/project.pbxproj: Ditto.
2130         * bindings/js/JSNavigatorCustom.cpp:
2131         (WebCore::JSNavigator::webkitGetUserMedia): Inlined NavigatorUserMeia::webkitGetUserMedia.
2132
2133 2015-08-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2134
2135         JSXMLHttpRequest::visitAdditionalChildren does not need to explicitly mark m_response
2136         https://bugs.webkit.org/show_bug.cgi?id=147488
2137
2138         Reviewed by Andreas Kling.
2139
2140         Covered by existing tests.
2141
2142         * bindings/js/JSXMLHttpRequestCustom.cpp:
2143         (WebCore::JSXMLHttpRequest::visitAdditionalChildren): Removed m_response marking.
2144
2145 2015-08-01  Chris Fleizach  <cfleizach@apple.com>
2146
2147         AX: On some complex sites, iOS instantly crashes once VoiceOver is turned on
2148         https://bugs.webkit.org/show_bug.cgi?id=147529
2149
2150         Reviewed by Dan Bernstein.
2151
2152         Sometimes after focusing on a node, it seems like the entire document is destroyed.
2153         Accessibility the axObjectCache returns nullptr and we crash.
2154
2155         Despite my best efforts, I couldn't make a layout test that reproduced this. It's possible
2156         the entire document needs to be destroyed and replaced with something.
2157
2158         * accessibility/AccessibilityRenderObject.cpp:
2159         (WebCore::AccessibilityRenderObject::setFocused):
2160
2161 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
2162
2163         [OS X] Font fallback is not language-sensitive
2164         https://bugs.webkit.org/show_bug.cgi?id=147390
2165
2166         Reviewed by Dean Jackson.
2167
2168         We need to make our font fallback code sensitive to locale.
2169
2170         Test: fast/text/fallback-language-han.html
2171
2172         * platform/graphics/mac/FontCacheMac.mm:
2173         (WebCore::lookupCTFont):
2174         (WebCore::FontCache::systemFallbackForCharacters):
2175
2176 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
2177
2178         CharacterFallbackMapKey should be locale-specific
2179         https://bugs.webkit.org/show_bug.cgi?id=147532
2180
2181         Reviewed by Dean Jackson.
2182
2183         This is in preparation for locale-specific font fallback.
2184
2185         No new tests because there is no behavior change.
2186
2187         * platform/graphics/Font.cpp:
2188         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
2189         (WebCore::CharacterFallbackMapKey::operator==):
2190         (WebCore::CharacterFallbackMapKeyHash::hash):
2191         (WebCore::Font::systemFallbackFontForCharacter):
2192
2193 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
2194
2195         Expand CharacterFallbackMapKey to a struct
2196         https://bugs.webkit.org/show_bug.cgi?id=147530
2197
2198         Reviewed by Dean Jackson.
2199
2200         This is in prepraration for making this struct locale-specific.
2201
2202         No new tests because there is no behavior change.
2203
2204         * platform/graphics/Font.cpp:
2205         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
2206         (WebCore::CharacterFallbackMapKey::isHashTableDeletedValue):
2207         (WebCore::CharacterFallbackMapKey::operator==):
2208         (WebCore::CharacterFallbackMapKeyHash::hash):
2209         (WebCore::CharacterFallbackMapKeyHash::equal):
2210         (WebCore::Font::systemFallbackFontForCharacter):
2211
2212 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
2213
2214         Fix the build after r187721
2215
2216         Unreviewed.
2217
2218         * bindings/js/JSDOMBinding.h:
2219         (WebCore::createWrapper):
2220
2221 2015-08-01  Alex Christensen  <achristensen@webkit.org>
2222
2223         Fix compile errors with VS2015
2224         https://bugs.webkit.org/show_bug.cgi?id=147526
2225
2226         Reviewed by Myles Maxfield.
2227
2228         * bindings/js/JSDOMBinding.h:
2229         (WebCore::createWrapper):
2230         Explicitly call the Ref constructor to avoid unresolved symbols with VS2015.
2231         Otherwise, VS2015 tries to use CSSPrimitiveValue::operator<Ref<CSSPrimitiveValue> > which doesn't exist.
2232
2233 2015-07-27  Matt Rajca  <mrajca@apple.com>
2234
2235         Media Session: inform the UI process when the focused Content media element changes
2236         https://bugs.webkit.org/show_bug.cgi?id=147323
2237
2238         Reviewed by Tim Horton.
2239
2240         * html/HTMLMediaElement.cpp:
2241         (WebCore::HTMLMediaElement::playInternal): Eventually tell the UI process that the focused Content media element changed.
2242         * page/ChromeClient.h:
2243
2244 2015-07-27  Matt Rajca  <mrajca@apple.com>
2245
2246         Media Session: give media elements unique IDs
2247         https://bugs.webkit.org/show_bug.cgi?id=147322
2248
2249         Reviewed by Eric Carlson.
2250
2251         * html/HTMLMediaElement.cpp:
2252         (WebCore::elementIDsToElements): Create a global map of element IDs to elements.
2253         (WebCore::HTMLMediaElement::elementWithID): Retrieve the element with the given ID.
2254         (WebCore::HTMLMediaElement::HTMLMediaElement): Give the element a unique ID.
2255         (WebCore::HTMLMediaElement::playInternal): Removed whitespace.
2256         (WebCore::HTMLMediaElement::pauseInternal): Ditto.
2257         * html/HTMLMediaElement.h:
2258         (WebCore::HTMLMediaElement::elementID):
2259
2260 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
2261
2262         Fix the build
2263
2264         Unreviewed.
2265
2266         * platform/graphics/mac/FontCacheMac.mm:
2267         (WebCore::lookupCTFont):
2268
2269 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
2270
2271         [OS X] Migrate to CTFontCreateForCharactersWithLanguage from [NSFont findFontLike:forString:withRange:inLanguage]
2272         https://bugs.webkit.org/show_bug.cgi?id=147483
2273
2274         Reviewed by Dean Jackson.
2275
2276         [NSFont findFontLike:forString:withRange:inLanguage] doesn't properly handle its last argument. In
2277         addition, we want to be moving away from NSFont in the first place and on to Core Text. This new
2278         CoreText function correctly handles its language argument, which is required for language-specific
2279         font fallback.
2280
2281         No new tests because there is no behavior change.
2282
2283         * platform/graphics/FontCache.cpp:
2284         (WebCore::FontCache::purgeInactiveFontData):
2285         * platform/graphics/FontCache.h:
2286         (WebCore::FontCache::platformPurgeInactiveFontData):
2287         * platform/graphics/mac/FontCacheMac.mm:
2288         (WebCore::fallbackDedupSet):
2289         (WebCore::FontCache::platformPurgeInactiveFontData):
2290         (WebCore::lookupCTFont):
2291         (WebCore::FontCache::systemFallbackForCharacters):
2292         * platform/spi/cocoa/CoreTextSPI.h:
2293         * platform/spi/mac/NSFontSPI.h:
2294
2295 2015-07-31  Chris Dumez  <cdumez@apple.com>
2296
2297         Drop dummy Timer callbacks
2298         https://bugs.webkit.org/show_bug.cgi?id=147516
2299
2300         Reviewed by Alexey Proskuryakov.
2301
2302         Drop dummy Timer callbacks in the code base. A lot of Timer callbacks
2303         do nothing else beside calling a particular method. In such case, we
2304         can use the called method as Timer callback instead.
2305
2306         * css/FontLoader.cpp:
2307         (WebCore::FontLoader::FontLoader):
2308         * css/FontLoader.h:
2309         * dom/Document.cpp:
2310         (WebCore::Document::Document):
2311         (WebCore::Document::styleRecalcTimerFired): Deleted.
2312         (WebCore::Document::domCookieCacheExpiryTimerFired): Deleted.
2313         * dom/Document.h:
2314         * html/MediaController.cpp:
2315         (MediaController::MediaController):
2316         (MediaController::timeupdateTimerFired): Deleted.
2317         * html/MediaController.h:
2318         * loader/cache/CachedResource.cpp:
2319         (WebCore::CachedResource::CachedResource):
2320         * loader/cache/CachedResourceLoader.cpp:
2321         (WebCore::CachedResourceLoader::CachedResourceLoader):
2322         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): Deleted.
2323         * loader/cache/CachedResourceLoader.h:
2324         * loader/cache/MemoryCache.cpp:
2325         (WebCore::MemoryCache::MemoryCache):
2326         (WebCore::MemoryCache::pruneTimerFired): Deleted.
2327         * loader/cache/MemoryCache.h:
2328         * page/EventSource.cpp:
2329         (WebCore::EventSource::EventSource):
2330         (WebCore::EventSource::connectTimerFired): Deleted.
2331         * page/EventSource.h:
2332         * page/FrameView.cpp:
2333         (WebCore::FrameView::FrameView):
2334         (WebCore::FrameView::delayedScrollEventTimerFired): Deleted.
2335         (WebCore::FrameView::postLayoutTimerFired): Deleted.
2336         * page/FrameView.h:
2337         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
2338         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
2339         (WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS):
2340         (WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired): Deleted.
2341         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2342         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2343         (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
2344         (WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired): Deleted.
2345         * platform/graphics/FontCache.cpp:
2346         (WebCore::FontCache::FontCache):
2347         (WebCore::FontCache::purgeTimerFired): Deleted.
2348         * platform/graphics/FontCache.h:
2349         * platform/graphics/ShadowBlur.cpp:
2350         (WebCore::ScratchBuffer::ScratchBuffer):
2351         (WebCore::ScratchBuffer::timerFired): Deleted.
2352         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2353         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2354         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
2355         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): Deleted.
2356
2357 2015-07-31  Matthew Daiter  <mdaiter@apple.com>
2358
2359         Removed pointSize from _addMarkersToList
2360         https://bugs.webkit.org/show_bug.cgi?id=147515
2361
2362         Reviewed by Eric Carlson.
2363
2364         * editing/cocoa/HTMLConverter.mm:
2365         (HTMLConverter::_addMarkersToList): Deleted.
2366
2367 2015-07-31  Alex Christensen  <achristensen@webkit.org>
2368
2369         Prepare for VS2015
2370         https://bugs.webkit.org/show_bug.cgi?id=146579
2371
2372         Reviewed by Jon Honeycutt.
2373
2374         * WebCore.vcxproj/build-generated-files.pl:
2375         Find a correct preprocessor when using VS2015.
2376
2377 2015-07-31  Eric Carlson  <eric.carlson@apple.com>
2378
2379         [iOS] use a media-specific user gesture check
2380         https://bugs.webkit.org/show_bug.cgi?id=147509
2381
2382         Reviewed by Tim Horton.
2383
2384         Change an enum name added in r187688.
2385
2386         * dom/UserGestureIndicator.cpp:
2387         (WebCore::isDefinite): DefinitelyProcessingMediaUserGesture -> DefinitelyProcessingPotentialUserGesture
2388         (WebCore::UserGestureIndicator::processingUserGestureForMedia): Ditto.
2389         * dom/UserGestureIndicator.h: Ditto.
2390
2391 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
2392
2393         [Cocoa] Latin quotes are used with the system font on Chinese devices
2394         https://bugs.webkit.org/show_bug.cgi?id=147504
2395
2396         Reviewed by Dean Jackson.
2397
2398         The system font has some fancy logic regarding character selection which requires
2399         using Core Text for glyph selection.
2400
2401         No new tests because tests can't change the system language of the device.
2402
2403         * platform/graphics/mac/GlyphPageMac.cpp:
2404         (WebCore::shouldUseCoreText):
2405
2406 2015-07-31  Chris Dumez  <cdumez@apple.com>
2407
2408         Coalesce authentication credential requests
2409         https://bugs.webkit.org/show_bug.cgi?id=128006
2410         <rdar://problem/16839069>
2411
2412         Reviewed by Alexey Proskuryakov.
2413
2414         Export symbol for ProtectionSpace::compare() so it can be called from
2415         WebKit2.
2416
2417         * platform/network/ProtectionSpaceBase.h:
2418
2419 2015-07-31  Eric Carlson  <eric.carlson@apple.com>
2420
2421         [iOS] use a media-specific user gesture check
2422         https://bugs.webkit.org/show_bug.cgi?id=147509
2423
2424         Reviewed by Jer Noble.
2425
2426         * bindings/js/ScriptController.cpp:
2427         (WebCore::ScriptController::processingUserGestureForMedia): New.
2428         * bindings/js/ScriptController.h:
2429
2430         * dom/UserGestureIndicator.cpp:
2431         (WebCore::isDefinite): Allow DefinitelyProcessingMediaUserGesture.
2432         (WebCore::UserGestureIndicator::processingUserGestureForMedia): New.
2433         * dom/UserGestureIndicator.h:
2434
2435         * html/HTMLMediaElement.cpp:
2436         (WebCore::HTMLMediaElement::load): Use ScriptController::processingUserGestureForMedia instead of 
2437           ScriptController::processingUserGesture
2438         (WebCore::HTMLMediaElement::play): Ditto.
2439
2440 2015-07-31  Andreas Kling  <akling@apple.com>
2441
2442         Crashes under HTMLMediaElement::updateActiveTextTrackCues() when destroying CachedPage.
2443         <https://webkit.org/b/147506>
2444         <rdar://problem/21939014>
2445
2446         Reviewed by Chris Dumez.
2447
2448         Don't mess with the media element's text tracks below its ActiveDOMObject::stop()
2449         implementation, since that may cause DOM mutations.
2450
2451         I don't have a repro or a test for this, but plenty of crash logs to indicate that
2452         we're getting ourselves into trouble by modifying the DOM during CachedPage teardown.
2453
2454         * html/HTMLMediaElement.cpp:
2455         (WebCore::HTMLMediaElement::configureTextTrackDisplay):
2456
2457 2015-07-31  Tim Horton  <timothy_horton@apple.com>
2458
2459         [iOS] DOMNode preview snapshot rects are wrong for user-select: none links
2460         https://bugs.webkit.org/show_bug.cgi?id=147513
2461         <rdar://problem/22083354>
2462
2463         Reviewed by Simon Fraser.
2464
2465         * bindings/objc/DOM.mm:
2466         (-[DOMNode getPreviewSnapshotImage:andRects:]):
2467         Use the same code as WebKit2 to compute the fallback rect (if TextIndicator fails),
2468         asking the RenderObject (or RenderImage) for its bounding box instead of using the
2469         (often wrong) Range bounding rect.
2470
2471         Make sure to use the fallback rect *any* time TextIndicator fails (before
2472         we would return no rects at all if TextIndicator::createWithRange returned null,
2473         and the fallback rect if it returned with an empty image).
2474
2475         Inverse-page-scale the margin, to match the appearance in WebKit2.
2476
2477 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
2478
2479         [SVG -> OTF Converter] Crash when converting Arabic fonts
2480         https://bugs.webkit.org/show_bug.cgi?id=147510
2481
2482         Reviewed by Anders Carlsson.
2483
2484         SVGToOTFFontConverter::compareCodepointsLexicographically() wasn't transitive.
2485
2486         Test: fast/text/arabic-duplicate-glyph-font.html
2487
2488         * svg/SVGToOTFFontConversion.cpp:
2489         (WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically):
2490
2491 2015-07-31  Jeremy Jones  <jeremyj@apple.com>
2492
2493         Rename AVPlayerLayerView to _AVPlayerLayerView.
2494         https://bugs.webkit.org/show_bug.cgi?id=147399
2495
2496         Reviewed by Eric Carlson.
2497
2498         Change class name AVPlayerLayerView to match change in AVKit SPI. 
2499         This prevents conflicts with 3rd party apps.
2500
2501         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2502         (WebAVPlayerLayerView_dealloc):
2503         (getWebAVPlayerLayerViewClass):
2504         * platform/spi/cocoa/AVKitSPI.h:
2505
2506 2015-07-31  Chris Dumez  <cdumez@apple.com>
2507
2508         ImageBufferDataCG should not add IOSurfaces to the pool
2509         https://bugs.webkit.org/show_bug.cgi?id=147494
2510
2511         Reviewed by Tim Horton.
2512
2513         ImageBufferDataCG should not add IOSurfaces to the pool as it is not
2514         safe. IOSurfaceIsInUse() does not return accurate result for those
2515         surfaces.
2516
2517         This is a partial revert of r181301.
2518
2519         * platform/graphics/cg/ImageBufferDataCG.cpp:
2520         (WebCore::ImageBufferData::~ImageBufferData): Deleted.
2521         * platform/graphics/cg/ImageBufferDataCG.h:
2522
2523 2015-07-31  Jer Noble  <jer.noble@apple.com>
2524
2525          CRASH at WebCore::TaskDispatcher<WebCore::ScriptExecutionContext>::postTask + 38
2526          https://bugs.webkit.org/show_bug.cgi?id=147485
2527
2528          Rubber-stamped by Joseph Pecoraro.
2529
2530          Follow-up test crash fix: call superclass's contextDestroyed() which allows the
2531          m_scriptExecutionContext variable to be cleared.
2532
2533          * html/HTMLMediaElement.cpp:
2534          (WebCore::HTMLMediaElement::contextDestroyed):
2535
2536 2015-07-31  Joseph Pecoraro  <pecoraro@apple.com>
2537
2538         Only generate "themeWin*" UserAgentStyleSheet constants for Windows builds
2539         https://bugs.webkit.org/show_bug.cgi?id=147378
2540
2541         Reviewed by Alex Christensen.
2542
2543         * DerivedSources.make:
2544         Only include windows user agent style sheets for Windows OSes.
2545
2546 2015-07-31  Alex Christensen  <achristensen@webkit.org>
2547
2548         Prepare for debug CMake builds on Windows.
2549         https://bugs.webkit.org/show_bug.cgi?id=147484
2550
2551         Reviewed by Tim Horton.
2552
2553         In order to get debug builds to link on Windows with CMake, we will need to use AllInOnes.
2554         This patch includes more files in the AllInOnes and removes some duplicate code.
2555
2556         * WebCore.vcxproj/WebCore.vcxproj:
2557         * bindings/js/JSBindingsAllInOne.cpp:
2558         * css/CSSAllInOne.cpp:
2559         Many files were added to the AllInOne files.  They should not be included in the Visual Studio solutions.
2560         * css/CSSCalculationValue.cpp:
2561         (WebCore::CSSCalcValue::create):
2562         Use CSSParserString::equalIgnoringCase to avoid ambiguous calls to overloaded functions.
2563         * css/StyleResolver.cpp:
2564         (WebCore::StyleResolver::pseudoStyleRulesForElement):
2565         (WebCore::shouldApplyPropertyInParseOrder):
2566         (WebCore::convertToFloatLength): Deleted.
2567         * css/TransformFunctions.cpp:
2568         (WebCore::transformOperationType):
2569         (WebCore::convertToFloatLength):
2570         * css/TransformFunctions.h:
2571         Removed duplicate convertToFloatLength function.
2572         * html/HTMLElementsAllInOne.cpp:
2573         * rendering/FlowThreadController.cpp:
2574         (WebCore::FlowThreadController::updateNamedFlowsLayerListsIfNeeded):
2575         (WebCore::compareZIndexFlowThreadController): Renamed from compareZIndex to prevent naming conflicts.
2576         (WebCore::FlowThreadController::collectFixedPositionedLayers):
2577         (WebCore::compareZIndex): Deleted.
2578         * rendering/RenderLayer.cpp:
2579         (WebCore::RenderLayer::shouldRepaintAfterLayout):
2580         (WebCore::compositedWithOwnBackingStore):
2581         * rendering/RenderLayer.h:
2582         * rendering/RenderLayerBacking.cpp:
2583         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
2584         (WebCore::descendantLayerPaintsIntoAncestor):
2585         (WebCore::RenderLayerBacking::paintIntoLayer):
2586         (WebCore::RenderLayerBacking::paintContents):
2587         (WebCore::compositedWithOwnBackingStore): Deleted.
2588         Removed duplicate compositedWithOwnBackingStore.
2589         (WebCore::paintScrollbar): Deleted duplicate function.
2590         * rendering/RenderLayerCompositor.cpp:
2591         (WebCore::RenderLayerCompositor::requiresScrollLayer):
2592         (WebCore::paintScrollbar):
2593         * rendering/RenderLayerCompositor.h:
2594         * rendering/RenderingAllInOne.cpp:
2595
2596 2015-07-31  Jer Noble  <jer.noble@apple.com>
2597
2598         CRASH at WebCore::TaskDispatcher<WebCore::ScriptExecutionContext>::postTask + 38
2599         https://bugs.webkit.org/show_bug.cgi?id=147485
2600
2601         Reviewed by Eric Carlson.
2602
2603         CrashLogs indicate a use-after-free of the ScriptExecutionContext (i.e., Document) used by
2604         the GenericTaskQueue objects owned by HTMLMediaElement. When the ScriptExecutionContext
2605         notifies its ActiveDOMObjects that it is about to be destroyed, close() the
2606         GenericTaskQueues so that they can no longer accept new tasks.
2607
2608         Previously, enqueueing a task on a closed GenericTaskQueue ASSERTed in debug builds, but
2609         silently succeeded in release builds. Calling enqueueTask() on a  closed GenericTaskQueue is
2610         now a no-op.
2611
2612         * html/HTMLMediaElement.cpp:
2613         (WebCore::HTMLMediaElement::contextDestroyed):
2614         * html/HTMLMediaElement.h:
2615         * platform/GenericTaskQueue.h:
2616         (WebCore::GenericTaskQueue::enqueueTask):
2617
2618 2015-07-31  Zan Dobersek  <zdobersek@igalia.com>
2619
2620         [GTK] Have DataObjectGtk::unknownTypes() return a reference to the HashMap object
2621         https://bugs.webkit.org/show_bug.cgi?id=147401
2622
2623         Reviewed by Carlos Garcia Campos.
2624
2625         Don't copy the DataObjectGtk::m_unknownTypes HashMap on every retrieval through
2626         DataObjectGtk::unknownTypes(). The range-based for-loops that iterate over the
2627         map in PasteboardGtk.cpp and PasteboardHelper.cpp are also cleaned up.
2628
2629         * platform/gtk/DataObjectGtk.cpp:
2630         (WebCore::DataObjectGtk::unknownTypes):
2631         * platform/gtk/DataObjectGtk.h:
2632         * platform/gtk/PasteboardGtk.cpp:
2633         (WebCore::Pasteboard::writePasteboard):
2634         (WebCore::Pasteboard::types):
2635         * platform/gtk/PasteboardHelper.cpp:
2636         (WebCore::PasteboardHelper::fillSelectionData):
2637
2638 2015-07-30  Zalan Bujtas  <zalan@apple.com>
2639
2640         RenderTheme::paintBorderOnly and paintDecorations should take RenderBox instead of RenderObject.
2641         https://bugs.webkit.org/show_bug.cgi?id=147470
2642
2643         Reviewed by Simon Fraser.
2644
2645         Tighten the code so that RenderTheme paint functions take RenderBox instead of RenderObject.
2646
2647         No change in functionality.
2648
2649         * rendering/RenderTheme.cpp:
2650         (WebCore::RenderTheme::paintBorderOnly):
2651         (WebCore::RenderTheme::paintDecorations):
2652         * rendering/RenderTheme.h:
2653
2654 2015-07-30  Andreas Kling  <akling@apple.com>
2655
2656         [CF] Web process continually eating memory on simple, shared Google Docs spreadsheet.
2657         <https://webkit.org/b/147403>
2658         <rdar://problem/18835799>
2659
2660         Reviewed by Geoffrey Garen.
2661
2662         Make sure we service the CFRunLoop on worker threads, since ports using CoreFoundation
2663         will be scheduling garbage collections and heap sweeps using CFRunLoop timers.
2664
2665         This fix is a stopgap. Long term we need a better design for integrating GC tasks with
2666         with the web worker run loop.
2667
2668         * workers/WorkerRunLoop.cpp:
2669         (WebCore::WorkerRunLoop::runInMode): Instead of sleeping forever, calculate a better
2670         wakeup deadline by asking the CFRunLoop when its next timer will fire. Then, when a
2671         timeout occurs, call CFRunLoopRunInMode (with seconds=0) to service pending timers.
2672
2673 2015-07-30  Myles C. Maxfield  <mmaxfield@apple.com>
2674
2675         Move locale information into FontDescription
2676         https://bugs.webkit.org/show_bug.cgi?id=147457
2677
2678         Reviewed by Andreas Kling.
2679
2680         Currently, the "lang" attribute on a node sets locale information in RenderStyle.
2681         Font selection is sensitive to this locale information, and occurs deep within
2682         platform/ code, far away from RenderStyle. Because every RenderStyle owns a
2683         FontDescription, and font selection can consult with FontDescriptions, it makes
2684         sense to move the variable from RenderStyle to FontDescription, and provide
2685         convenience methods on RenderStyle which inspect its FontDescription for locale
2686         information.
2687
2688         This patch is in preparation for correctly obeying locale information when
2689         performing font fallback.
2690
2691         No new tests because there is no behavior change.
2692
2693         * css/CSSPropertyNames.in:
2694         * css/StyleBuilderCustom.h:
2695         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
2696         * platform/graphics/FontCache.h:
2697         (WebCore::FontDescriptionKey::FontDescriptionKey):
2698         (WebCore::FontDescriptionKey::operator==):
2699         * platform/graphics/FontCascade.cpp:
2700         * platform/graphics/FontDescription.cpp:
2701         (WebCore::FontDescription::FontDescription):
2702         (WebCore::FontDescription::setLocale):
2703         * platform/graphics/FontDescription.h:
2704         (WebCore::FontDescription::locale):
2705         (WebCore::FontDescription::initialLocale):
2706         (WebCore::FontDescription::operator==):
2707         (WebCore::FontDescription::FontDescription): Deleted.
2708         (WebCore::FontDescription::setScript): Deleted.
2709         * platform/text/LocaleToScriptMappingDefault.cpp:
2710         (WebCore::localeToScriptCodeForFontSelection):
2711         * rendering/style/RenderStyle.cpp:
2712         (WebCore::RenderStyle::changeRequiresLayout): Deleted.
2713         * rendering/style/RenderStyle.h:
2714         * rendering/style/StyleRareInheritedData.cpp:
2715         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Deleted.
2716         (WebCore::StyleRareInheritedData::operator==): Deleted.
2717         * rendering/style/StyleRareInheritedData.h:
2718         * style/StyleResolveForDocument.cpp:
2719         (WebCore::Style::resolveForDocument):
2720
2721 2015-07-30  Anders Carlsson  <andersca@apple.com>
2722
2723         Remove stray printf.
2724         
2725         * loader/SubframeLoader.cpp:
2726         (WebCore::SubframeLoader::requestObject):
2727
2728 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
2729
2730         Make Path::apply() take a function reference
2731         https://bugs.webkit.org/show_bug.cgi?id=147472
2732
2733         Reviewed by Anders Carlsson.
2734
2735         Path::apply() should take a const reference to a std::function.
2736
2737         * platform/graphics/Path.h:
2738         * platform/graphics/cairo/PathCairo.cpp:
2739         * platform/graphics/cg/PathCG.cpp:
2740         (WebCore::CGPathApplierToPathApplier):
2741         (WebCore::Path::apply):
2742
2743 2015-07-30  Anders Carlsson  <andersca@apple.com>
2744
2745         Assertion failure when a plug-in loads a resource that redirects somewhere
2746         https://bugs.webkit.org/show_bug.cgi?id=147469
2747
2748         Reviewed by Alexey Proskuryakov.
2749
2750         Test: http/tests/plugins/get-url-redirect.html
2751
2752         r186597 moved the call to addPlugInStreamLoader to willSendRequest. This is wrong since
2753         willSendRequest can be invoked more than once.
2754         
2755         Fix this by making the initialization phase of NetscapePlugInStreamLoader be more like
2756         SubresourceLoader where we only call addPlugInStreamLoader once we've successfully initialized
2757         the loader, and only call removePlugInStreamLoader if we've called addPlugInStreamLoader.
2758
2759         Also change addPlugInStreamLoader and removePlugInStreamLoader to take references.
2760
2761         * loader/DocumentLoader.cpp:
2762         (WebCore::DocumentLoader::addPlugInStreamLoader):
2763         (WebCore::DocumentLoader::removePlugInStreamLoader):
2764         * loader/DocumentLoader.h:
2765         * loader/NetscapePlugInStreamLoader.cpp:
2766         (WebCore::NetscapePlugInStreamLoader::create):
2767         (WebCore::NetscapePlugInStreamLoader::init):
2768         (WebCore::NetscapePlugInStreamLoader::didFinishLoading):
2769         (WebCore::NetscapePlugInStreamLoader::didFail):
2770         (WebCore::NetscapePlugInStreamLoader::didCancel):
2771         (WebCore::NetscapePlugInStreamLoader::notifyDone):
2772         * loader/NetscapePlugInStreamLoader.h:
2773         * loader/ResourceLoader.cpp:
2774         (WebCore::ResourceLoader::willSendRequest): Deleted.
2775         * loader/ResourceLoader.h:
2776         (WebCore::ResourceLoader::isPlugInStreamLoader): Deleted.
2777         * loader/SubframeLoader.cpp:
2778         (WebCore::SubframeLoader::requestObject):
2779
2780 2015-07-30  Jer Noble  <jer.noble@apple.com>
2781
2782         [iOS] Pressing 'done' in fullscreen video sometimes does nothing; stuck in fullscreen
2783         https://bugs.webkit.org/show_bug.cgi?id=147367
2784
2785         Reviewed by Eric Carlson.
2786
2787         During the request to exit fullscreen, the video element's m_videoFullscreenMode variable
2788         is set, but no exitFullscreen() request is sent up to the UIProcess. Previous threading
2789         issues have been discovered and fixed, but may have been re-introduced (or never fully
2790         fixed in the first place). To solve the bad behavior this threading issue creates, add
2791         a watchdog timer, similar to the one used in the desktop fullscreen controller, to ensure
2792         that if an exit fullscreen request is not acted upon, the UIProcess forcibly exits fullscreen
2793         anyway.
2794
2795         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
2796         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2797         (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit): Initialize the timer.
2798         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Cancel the timer.
2799         (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Set the timer.
2800         (WebVideoFullscreenInterfaceAVKit::watchdogTimerFired): Forcibly exit fullscreen mode.
2801
2802 2015-07-30  Myles C. Maxfield  <mmaxfield@apple.com>
2803
2804         Clean up makeFontCascadeCacheKey()
2805         https://bugs.webkit.org/show_bug.cgi?id=147430
2806
2807         Reviewed by Benjamin Poulain.
2808
2809         FontDescriptionKey is designed to encapsulate all the cacheable properties of a FontDescription.
2810         However, a higher-level cache, FontCascadeCacheKey, was taking some values from FontDescriptions.
2811         The fact that there wasn't a bug before is just a happy coincidence. This patch moves those bits
2812         from the higher-level cache and puts them into FontDescriptionKey where they belong.
2813
2814         No new tests because there is no behavior change.
2815
2816         * platform/graphics/FontCache.h:
2817         (WebCore::FontDescriptionKey::makeFlagKey):
2818         * platform/graphics/FontCascade.cpp:
2819         (WebCore::operator==):
2820         (WebCore::makeFontSelectorFlags): Deleted.
2821         (WebCore::makeFontCascadeCacheKey): Deleted.
2822         (WebCore::computeFontCascadeCacheHash): Deleted.
2823
2824 2015-07-18  Matt Rajca  <mrajca@apple.com>
2825
2826         [Mac] Media Session: add support for more telephony interruptions
2827         https://bugs.webkit.org/show_bug.cgi?id=147079
2828
2829         Reviewed by Eric Carlson.
2830
2831         * platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm:
2832         (WebCore::callDidEndRinging): End 'Transient' interruptions.
2833         (WebCore::callDidConnect): Forward this event to media sessions as a 'Content' interruption.
2834         (WebCore::MediaSessionInterruptionProviderMac::beginListeningForInterruptions): Register observers for new
2835          notification types.
2836         (WebCore::MediaSessionInterruptionProviderMac::stopListeningForInterruptions): Unregister all observers.
2837
2838 2015-07-29  Dean Jackson  <dino@apple.com>
2839
2840         Don't use (Details) when exposing SPI
2841         https://bugs.webkit.org/show_bug.cgi?id=147426
2842         <rdar://problem/22062407>
2843
2844         Reviewed by Dan Bernstein.
2845
2846         If we are declaring the interface without any implementation,
2847         we should use class extensions.
2848
2849         Added three new SPI.h files for NSButtonCell, NSURLConnection and
2850         NSURLRequest.
2851
2852         * WebCore.xcodeproj/project.pbxproj:
2853         * platform/mac/ScrollViewMac.mm:
2854         * platform/mac/ThemeMac.mm:
2855         * platform/network/mac/ResourceHandleMac.mm:
2856         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
2857         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
2858         * platform/spi/cf/CFNetworkSPI.h:
2859         * platform/spi/cocoa/AVKitSPI.h:
2860         * platform/spi/cocoa/CFNSURLConnectionSPI.h:
2861         * platform/spi/cocoa/NSButtonCellSPI.h: Copied from Source/WebCore/platform/spi/cocoa/NSColorSPI.h.
2862         * platform/spi/cocoa/NSCalendarDateSPI.h:
2863         * platform/spi/cocoa/NSColorSPI.h:
2864         * platform/spi/cocoa/NSFileManagerSPI.h:
2865         * platform/spi/cocoa/NSStringSPI.h:
2866         * platform/spi/cocoa/NSURLConnectionSPI.h: Copied from Source/WebCore/platform/spi/cocoa/NSStringSPI.h.
2867         * platform/spi/cocoa/NSURLDownloadSPI.h:
2868         * platform/spi/cocoa/NSURLRequestSPI.h: Copied from Source/WebCore/platform/spi/cocoa/NSStringSPI.h.
2869         * platform/spi/cocoa/QuartzCoreSPI.h:
2870         * platform/spi/cocoa/WebFilterEvaluatorSPI.h:
2871         * platform/spi/ios/CoreUISPI.h:
2872         * platform/spi/ios/LaunchServicesSPI.h:
2873         * platform/spi/ios/MediaPlayerSPI.h:
2874         * platform/spi/ios/QuickLookSPI.h:
2875         * platform/spi/ios/UIColorSPI.h:
2876         * platform/spi/mac/QuickLookMacSPI.h:
2877         * rendering/RenderThemeMac.mm:
2878
2879 2015-07-30  Alex Christensen  <achristensen@webkit.org>
2880
2881         Remove LegacyCACFLayerTreeHost
2882         https://bugs.webkit.org/show_bug.cgi?id=147388
2883
2884         Reviewed by Geoffrey Garen.
2885
2886         * WebCore.vcxproj/WebCore.vcxproj:
2887         * WebCore.vcxproj/WebCore.vcxproj.filters:
2888         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
2889         (WebCore::CACFLayerTreeHost::create):
2890         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp: Removed.
2891         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: Removed.
2892
2893 2015-07-30  Alex Christensen  <achristensen@webkit.org>
2894
2895         Fix Windows build after r187587.
2896
2897         * loader/SubresourceLoader.h:
2898         * loader/cache/CachedResource.h:
2899         * platform/graphics/Font.h:
2900         (WebCore::Font::DerivedFontData::DerivedFontData):
2901         * rendering/RenderLayerFilterInfo.h:
2902         Visual Studio doesn't like making std::unique_ptrs of private nested classes.
2903         It tries to make a std::default_delete with the private class as a template parameter.
2904
2905 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
2906
2907         Convert Path applier to use std::function
2908         https://bugs.webkit.org/show_bug.cgi?id=147368
2909
2910         Reviewed by Sam Weinig.
2911
2912         Use std::function for Path::apply().
2913
2914         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
2915         (convertPathToScreenSpaceFunction):
2916         (-[WebAccessibilityObjectWrapperBase convertPathToScreenSpace:]):
2917         (ConvertPathToScreenSpaceFunction): Deleted.
2918         * inspector/InspectorOverlay.cpp:
2919         (WebCore::appendPathSegment):
2920         (WebCore::buildObjectForShapeOutside):
2921         * platform/graphics/Path.cpp:
2922         (WebCore::Path::length):
2923         (WebCore::Path::traversalStateAtLength):
2924         (WebCore::pathLengthApplierFunction): Deleted.
2925         * platform/graphics/Path.h:
2926         * platform/graphics/cairo/FontCairo.cpp:
2927         (WebCore::findPathIntersections):
2928         (WebCore::FontCascade::dashesForIntersectionsWithRect):
2929         * platform/graphics/cairo/PathCairo.cpp:
2930         (WebCore::Path::apply):
2931         * platform/graphics/cg/PathCG.cpp:
2932         (WebCore::CGPathApplierToPathApplier):
2933         (WebCore::Path::apply):
2934         * rendering/svg/RenderSVGPath.cpp:
2935         (WebCore::RenderSVGPath::updateZeroLengthSubpaths):
2936         * rendering/svg/RenderSVGShape.cpp:
2937         (WebCore::RenderSVGShape::processMarkerPositions):
2938         * rendering/svg/SVGMarkerData.h:
2939         (WebCore::SVGMarkerData::updateFromPathElement):
2940         * rendering/svg/SVGSubpathData.h:
2941         (WebCore::SVGSubpathData::updateFromPathElement):
2942         (WebCore::SVGSubpathData::SVGSubpathData): Deleted.
2943         * svg/SVGPathUtilities.cpp:
2944         (WebCore::pathIteratorForBuildingString):
2945         (WebCore::buildStringFromPath):
2946
2947 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
2948
2949         Selecting in an iframe can cause main page scrolling
2950         https://bugs.webkit.org/show_bug.cgi?id=147431
2951         rdar://problem/19244589
2952
2953         Reviewed by Zalan Bujtas.
2954         
2955         The RenderLayer auatoscroll code walks up the RenderLayer hierarchy, crossing
2956         frame boundaries. However, as it crosses into an ancestor frame it failed to
2957         map the target rect into the coordinate space of the new frame, which caused
2958         us to scroll to an incorrect location in that parent frame.
2959
2960         Test: fast/events/autoscroll-in-iframe.html
2961
2962         * rendering/RenderLayer.cpp:
2963         (WebCore::parentLayerCrossFrame): Make the layer a reference, and pass in
2964         an optional rect. When crossing frame boundaries, map the rect from the
2965         contents of the child frame to the contents of the parent frame.
2966         (WebCore::RenderLayer::enclosingScrollableLayer): Pass optional rect.
2967         (WebCore::RenderLayer::scrollRectToVisible):
2968         (WebCore::RenderLayer::hasScrollableOrRubberbandableAncestor):
2969         * rendering/RenderLayer.h:
2970
2971 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
2972
2973         Improve the history logging output
2974         https://bugs.webkit.org/show_bug.cgi?id=147429
2975
2976         Reviewed by Alexey Proskuryakov.
2977
2978         Improve the History log channel output to show which frame is navigating,
2979         print the addresses of the HistoryController and Frame, and print URLs
2980         for everything.
2981         
2982         Remove the BackForward log channel which had just one calling location,
2983         and log for pushState/replaceState.
2984
2985         * loader/HistoryController.cpp:
2986         (WebCore::HistoryController::updateForBackForwardNavigation):
2987         (WebCore::HistoryController::updateForReload):
2988         (WebCore::HistoryController::updateForStandardLoad):
2989         (WebCore::HistoryController::updateForRedirectWithLockedBackForwardList):
2990         (WebCore::HistoryController::updateForClientRedirect):
2991         (WebCore::HistoryController::updateForCommit):
2992         (WebCore::HistoryController::updateBackForwardListClippedAtTarget):
2993         (WebCore::HistoryController::pushState):
2994         (WebCore::HistoryController::replaceState):
2995         * platform/Logging.h:
2996
2997 2015-07-29  Matt Rajca  <mrajca@apple.com>
2998
2999         Media Session: add infrastructure for testing media control events
3000         https://bugs.webkit.org/show_bug.cgi?id=147412
3001
3002         Reviewed by Eric Carlson.
3003
3004         * Modules/mediasession/MediaSessionManager.h:
3005         * testing/Internals.cpp:
3006         (WebCore::Internals::sendMediaControlEvent): Let tests simulate media control events.
3007         * testing/Internals.h:
3008         * testing/Internals.idl:
3009
3010 2015-07-30  Chris Dumez  <cdumez@apple.com>
3011
3012         Mark more classes as fast allocated
3013         https://bugs.webkit.org/show_bug.cgi?id=147440
3014
3015         Reviewed by Sam Weinig.
3016
3017         Mark more classes as fast allocated for performance. We heap-allocate
3018         objects of those types throughout the code base.
3019
3020         * editing/Editor.h:
3021         * history/CachedFrame.h:
3022         * history/CachedPage.h:
3023         * html/parser/HTMLResourcePreloader.h:
3024         * loader/PolicyChecker.h:
3025         * loader/SubresourceLoader.h:
3026         * loader/cache/CachedResource.h:
3027         * page/animation/AnimationController.h:
3028         * page/scrolling/ScrollingConstraints.h:
3029         * page/scrolling/ScrollingStateTree.h:
3030         * platform/graphics/Font.h:
3031         * platform/graphics/GraphicsLayerUpdater.h:
3032         * rendering/FilterEffectRenderer.h:
3033         * rendering/ImageQualityController.h:
3034         * rendering/RenderLayerFilterInfo.h:
3035         * rendering/SimpleLineLayoutResolver.h:
3036         * rendering/shapes/RasterShape.h:
3037         * rendering/shapes/Shape.h:
3038
3039 2015-07-30  Michael Catanzaro  <mcatanzaro@igalia.com>
3040
3041         [GTK] Crashes when SoupSession is destroyed in exit handler
3042         https://bugs.webkit.org/show_bug.cgi?id=145347
3043
3044         Reviewed by Carlos Garcia Campos.
3045
3046         Leak the default SoupSession with NeverDestroyed to avoid races at program exit.
3047
3048         * platform/network/soup/SoupNetworkSession.cpp:
3049         (WebCore::SoupNetworkSession::defaultSession):
3050         * platform/network/soup/SoupNetworkSession.h:
3051
3052 2015-07-30  Alex Christensen  <achristensen@webkit.org>
3053
3054         Build AppleWin port with CMake
3055         https://bugs.webkit.org/show_bug.cgi?id=147385
3056
3057         Reviewed by Martin Robinson.
3058
3059         * CMakeLists.txt:
3060         Add makesafeseh.asm to 32-bit build.  It needs to be after the ADD_PRECOMPILED_HEADER macro
3061         because CMake can only set COMPILE_FLAGS once with set_source_files_properties, and we want 
3062         to use that to add /safeseh instead of a precompiled header (which wouldn't be used anyway in assembly).
3063         * PlatformAppleWin.cmake:
3064         * PlatformWin.cmake:
3065         * PlatformWinCairo.cmake:
3066         Added missing source files and libraries.
3067
3068 2015-07-30  Alex Christensen  <achristensen@webkit.org>
3069
3070         [Win] Unreviewed build fix after r187582.
3071
3072         * accessibility/AccessibilityAllInOne.cpp:
3073         Include new files.
3074
3075 2015-07-30  Michael Catanzaro  <mcatanzaro@igalia.com>
3076
3077         Web Inspector: [Freetype] Allow inspector to retrieve a list of system fonts
3078         https://bugs.webkit.org/show_bug.cgi?id=147018
3079
3080         Reviewed by Carlos Garcia Campos.
3081
3082         No new tests; unskipped inspector/css/get-system-fonts.html
3083
3084         * platform/graphics/freetype/FontCacheFreeType.cpp:
3085         (WebCore::patternToFamilies): Added.
3086         (WebCore::FontCache::systemFontFamilies): Implemented.
3087         (WebCore::strongAliasesForFamily): Split some code off to patternToFamilies.
3088
3089 2015-07-30  Nan Wang  <n_wang@apple.com>
3090
3091         AX: VoiceOver unable to access content in malformed trees
3092         https://bugs.webkit.org/show_bug.cgi?id=147295
3093         <rdar://problem/14862892>
3094
3095         Reviewed by Chris Fleizach.
3096
3097         VoiceOver is skipping the content of malformed trees. This fixes the problem
3098         by having the tree check if it has valid children (treeitems) and makes treeitems
3099         check if they are inside trees.
3100
3101         Test: platform/mac/accessibility/malformed-tree.html
3102
3103         * CMakeLists.txt:
3104         * WebCore.vcxproj/WebCore.vcxproj:
3105         * WebCore.vcxproj/WebCore.vcxproj.filters:
3106         * WebCore.xcodeproj/project.pbxproj:
3107         * accessibility/AXObjectCache.cpp:
3108         (WebCore::createFromRenderer):
3109         * accessibility/AccessibilityObject.h:
3110         (WebCore::AccessibilityObject::addChildren):
3111         (WebCore::AccessibilityObject::addChild):
3112         (WebCore::AccessibilityObject::insertChild):
3113         (WebCore::AccessibilityObject::shouldIgnoreAttributeRole):
3114         (WebCore::AccessibilityObject::canHaveChildren):
3115         (WebCore::AccessibilityObject::hasChildren):
3116         * accessibility/AccessibilityRenderObject.cpp:
3117         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
3118         * accessibility/AccessibilityTree.cpp: Added.
3119         (WebCore::AccessibilityTree::AccessibilityTree):
3120         (WebCore::AccessibilityTree::~AccessibilityTree):
3121         (WebCore::AccessibilityTree::create):
3122         (WebCore::AccessibilityTree::computeAccessibilityIsIgnored):
3123         (WebCore::AccessibilityTree::determineAccessibilityRole):
3124         (WebCore::AccessibilityTree::isTreeValid):
3125         * accessibility/AccessibilityTree.h: Added.
3126         * accessibility/AccessibilityTreeItem.cpp: Added.
3127         (WebCore::AccessibilityTreeItem::AccessibilityTreeItem):
3128         (WebCore::AccessibilityTreeItem::~AccessibilityTreeItem):
3129         (WebCore::AccessibilityTreeItem::create):
3130         (WebCore::AccessibilityTreeItem::determineAccessibilityRole):
3131         * accessibility/AccessibilityTreeItem.h: Added.
3132
3133 2015-07-29  Carlos Garcia Campos  <cgarcia@igalia.com>
3134
3135         [GTK] Paste data is removed from clipboard when closing browser tab
3136         https://bugs.webkit.org/show_bug.cgi?id=144549
3137
3138         Reviewed by Martin Robinson.
3139
3140         GTK+ stores all clipboards in gtk_main or gtk_application_shutdown
3141         when the main loop finishes. We don't use gtk_main() in the web
3142         process, so we need to do the same and store all clipboards on
3143         process shutdown.
3144
3145         * platform/gtk/PasteboardGtk.cpp:
3146         (WebCore::Pasteboard::Pasteboard): Register the GtkClipboard.
3147         * platform/gtk/PasteboardHelper.cpp:
3148         (WebCore::PasteboardHelper::singleton): Make it destructible.
3149         (WebCore::PasteboardHelper::~PasteboardHelper): Call
3150         gtk_clipboard_store for every registered GtkClipboard.
3151         (WebCore::PasteboardHelper::registerClipboard): Save the given
3152         GtkClipboard.
3153         * platform/gtk/PasteboardHelper.h:
3154
3155 2015-07-29  Andy VanWagoner  <thetalecrafter@gmail.com>
3156
3157         Implement basic types for ECMAScript Internationalization API
3158         https://bugs.webkit.org/show_bug.cgi?id=146926
3159
3160         Reviewed by Benjamin Poulain.
3161
3162         * Configurations/FeatureDefines.xcconfig: Enabled INTL.
3163
3164 2015-07-29  Chris Dumez  <cdumez@apple.com>
3165
3166         Make TextLayout fast allocated
3167         https://bugs.webkit.org/show_bug.cgi?id=147428
3168
3169         Reviewed by Simon Fraser.
3170
3171         Make TextLayout fast allocated as it is allocated frequently and on the
3172         heap.
3173
3174         * platform/graphics/mac/ComplexTextController.cpp:
3175
3176 2015-07-29  Myles C. Maxfield  <mmaxfield@apple.com>
3177
3178         Fix iOS build
3179
3180         Unreviewed.
3181
3182         * platform/graphics/FontCascade.cpp:
3183         (WebCore::FontCascade::FontCascade): Deleted.
3184         * platform/graphics/FontCascade.h:
3185
3186 2015-07-29  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3187
3188         [EFL][CoordinatedGraphics] fixed position banner is moved when enabling delegateScrolling
3189         https://bugs.webkit.org/show_bug.cgi?id=146959
3190
3191         Reviewed by Simon Fraser.
3192
3193         Don't update fixed visible content area in ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate
3194         because PageViewportController and WebView on CoordinatedGraphics also update the visible content area according
3195         to the scrolling. So this problem has been caused by duplicated fixed visible rect update.
3196
3197         EFL WTR doesn't work with fixed layout and delegatesScrolling yet. So no test for this issue.
3198
3199         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
3200         (WebCore::ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate): Deleted.
3201
3202 2015-07-29  Myles C. Maxfield  <mmaxfield@apple.com>
3203
3204         Use rvalue references in FontCascade
3205         https://bugs.webkit.org/show_bug.cgi?id=147427
3206
3207         Reviewed by Simon Fraser.
3208
3209         No new tests because there is no behavior change.
3210
3211         * css/CSSFontSelector.cpp:
3212         (WebCore::CSSFontSelector::resolvesFamilyFor):
3213         * platform/graphics/FontCascade.cpp:
3214         (WebCore::FontCascade::FontCascade):
3215         (WebCore::retrieveOrAddCachedFonts):
3216         (WebCore::FontCascade::update):
3217         * platform/graphics/FontCascade.h:
3218         * platform/graphics/FontCascadeFonts.cpp:
3219         (WebCore::FontCascadeFonts::FontCascadeFonts):
3220         * platform/graphics/FontCascadeFonts.h:
3221         (WebCore::FontCascadeFonts::create):
3222
3223 2015-07-29  Myles C. Maxfield  <mmaxfield@apple.com>
3224
3225         Rename FontDescriptionFontDataCacheKey to FontDescriptionKey
3226         https://bugs.webkit.org/show_bug.cgi?id=147424
3227
3228         Reviewed by Simon Fraser.
3229
3230         This struct holds information about a FontDescription.
3231
3232         No new tests because there is no behavior change.
3233
3234         * css/CSSSegmentedFontFace.cpp:
3235         (WebCore::CSSSegmentedFontFace::fontRanges):
3236         * platform/graphics/FontCache.cpp:
3237         (WebCore::FontPlatformDataCacheKeyHash::hash):
3238         (WebCore::computeHash): Deleted.
3239         * platform/graphics/FontCache.h:
3240         (WebCore::FontDescriptionKey::FontDescriptionKey):
3241         (WebCore::FontDescriptionKey::operator==):
3242         (WebCore::FontDescriptionKey::operator!=):
3243         (WebCore::FontDescriptionKey::computeHash):
3244         (WebCore::FontDescriptionFontDataCacheKey::FontDescriptionFontDataCacheKey): Deleted.
3245         (WebCore::FontDescriptionFontDataCacheKey::operator==): Deleted.
3246         (WebCore::FontDescriptionFontDataCacheKey::operator!=): Deleted.
3247         (WebCore::FontDescriptionFontDataCacheKey::computeHash): Deleted.
3248         * platform/graphics/FontCascade.cpp:
3249         (WebCore::operator==):
3250         (WebCore::makeFontCascadeCacheKey):
3251         (WebCore::computeFontCascadeCacheHash):
3252
3253 2015-07-29  Zalan Bujtas  <zalan@apple.com>
3254
3255         Remove the spanner placeholder from m_spannerMap when the placeholder object
3256         gets transferred to a descendant flow.
3257         https://bugs.webkit.org/show_bug.cgi?id=147380
3258         rdar://problem/21981078
3259
3260         Reviewed by David Hyatt.
3261
3262         Before r180328, the spanner placeholder was removed from m_spannerMap through
3263         RenderMultiColumnFlowThread::removeFlowChildInfo() by calling flowThreadRelativeWillBeRemoved()
3264         when the placeholder renderer got transferred to the descendant flow.
3265         Now we just remove it from the map when the renderer is being detached.
3266
3267         Test: fast/multicol/newmulticol/spanner-crash-with-embedded-columns.html
3268
3269         * rendering/RenderMultiColumnFlowThread.cpp:
3270         (WebCore::RenderMultiColumnFlowThread::flowThreadDescendantInserted):
3271
3272 2015-07-29  Brady Eidson  <beidson@apple.com>
3273
3274         Review feedback followup to: Crash in WebCore::DocumentLoader::stopLoadingForPolicyChange.
3275         https://bugs.webkit.org/show_bug.cgi?id=147418
3276         
3277         * loader/DocumentLoader.cpp:
3278         (WebCore::DocumentLoader::cancelPolicyCheckIfNeeded):
3279
3280 2015-07-29  Brady Eidson  <beidson@apple.com>
3281
3282         RELEASE_ASSERT followup to: Crash in WebCore::DocumentLoader::stopLoadingForPolicyChange.
3283         https://bugs.webkit.org/show_bug.cgi?id=147418
3284
3285         Reviewed by Chris Dumez.
3286         
3287         * loader/DocumentLoader.cpp:
3288         (WebCore::DocumentLoader::cancelPolicyCheckIfNeeded): RELEASE_ASSERT we have a FrameLoader here.
3289           We want to know if we ever get here without one.
3290
3291 2015-07-29  Brady Eidson  <beidson@apple.com>
3292
3293         Crash in WebCore::DocumentLoader::stopLoadingForPolicyChange.
3294         <rdar://problem/21412186> and https://bugs.webkit.org/show_bug.cgi?id=147418
3295
3296         Reviewed by Chris Dumez.
3297
3298         No new tests (No known reproducibility)
3299
3300         * loader/DocumentLoader.cpp:
3301         (WebCore::DocumentLoader::responseReceived): When setting to m_waitingForContentPolicy true, make sure we have a FrameLoader.
3302         (WebCore::DocumentLoader::detachFromFrame): Always explicitly call cancelPolicyCheckIfNeeded().
3303         (WebCore::DocumentLoader::cancelPolicyCheckIfNeeded): Cancel the policy check if there is one.
3304         (WebCore::DocumentLoader::cancelMainResourceLoad): Use cancelPolicyCheckIfNeeded().
3305         * loader/DocumentLoader.h:
3306
3307 2015-07-29  Brady Eidson  <beidson@apple.com>
3308
3309         Crash calling webSocket.close() from onError handler for blocked web socket.
3310         <rdar://problem/21771620> and https://bugs.webkit.org/show_bug.cgi?id=147411
3311
3312         Reviewed by Tim Horton.
3313
3314         Tests: http/tests/security/mixedContent/websocket/insecure-websocket-in-iframe.html
3315                http/tests/security/mixedContent/websocket/insecure-websocket-in-main-frame.html
3316
3317         This was introduced with http://trac.webkit.org/changeset/185848
3318
3319         * Modules/websockets/WebSocket.cpp:
3320         (WebCore::WebSocket::connect): When blocked because of mixedContent, call dispatchOrQueueErrorEvent().
3321         (WebCore::WebSocket::didReceiveMessageError): Use dispatchOrQueueErrorEvent() instead.
3322         (WebCore::WebSocket::dispatchOrQueueErrorEvent): Dispatch the error event, but don't dispatch one twice!
3323         * Modules/websockets/WebSocket.h:
3324
3325         * Modules/websockets/WebSocketChannel.cpp:
3326         (WebCore::WebSocketChannel::fail): Null-check m_handshake before creating a console message from it.
3327
3328 2015-07-29  Michael Catanzaro  <mcatanzaro@igalia.com>
3329
3330         Clean up RefPtrCairo.cpp
3331         https://bugs.webkit.org/show_bug.cgi?id=147384
3332
3333         Reviewed by Martin Robinson.
3334
3335         Tests for null/non-null should all be done without equality comparisons.
3336
3337         * platform/graphics/cairo/RefPtrCairo.cpp:
3338         (WTF::refIfNotNull):
3339         (WTF::derefIfNotNull):
3340
3341 2015-07-29  Dean Jackson  <dino@apple.com>
3342
3343         Remove dispatch_apply_f and instead use vImage more directly
3344         https://bugs.webkit.org/show_bug.cgi?id=147391
3345         <rdar://problem/21893047>
3346
3347         Fix the iOS builds.
3348
3349         * platform/graphics/cg/ImageBufferDataCG.cpp:
3350         (WebCore::unpremultiplyBufferData):
3351         (WebCore::premultiplyBufferData):
3352
3353 2015-07-29  Chris Dumez  <cdumez@apple.com>
3354
3355         Avoid unnecessarily constructing PlatformMediaSessionManager on Document destruction
3356         https://bugs.webkit.org/show_bug.cgi?id=147398
3357
3358         Reviewed by Jer Noble.
3359
3360         Only call PlatformMediaSessionManager::stopAllMediaPlaybackForProcess() in
3361         destructors if an PlatformMediaSessionManager instance already exists, to
3362         avoid constructing one unecessarily at that point.
3363
3364         * dom/Document.cpp:
3365         (WebCore::Document::~Document):
3366         * platform/audio/PlatformMediaSessionManager.cpp:
3367         (WebCore::PlatformMediaSessionManager::sharedManager):
3368         (WebCore::PlatformMediaSessionManager::sharedManagerIfExists):
3369         * platform/audio/PlatformMediaSessionManager.h:
3370         * platform/audio/ios/MediaSessionManagerIOS.mm:
3371         (WebCore::PlatformMediaSessionManager::sharedManager):
3372         (WebCore::PlatformMediaSessionManager::sharedManagerIfExists):
3373
3374 2015-07-28  Simon Fraser  <simon.fraser@apple.com>
3375
3376         Fix debug builds.
3377
3378         * platform/graphics/cg/ImageBufferDataCG.cpp:
3379         (WebCore::premultiplyBufferData):
3380         (WebCore::unpremultiplyBufferData):
3381
3382 2015-07-28  Simon Fraser  <simon.fraser@apple.com>
3383
3384         Animations sometimes fail to start
3385         https://bugs.webkit.org/show_bug.cgi?id=147394
3386         rdar://problem/21852603
3387
3388         Reviewed by Dean Jackson.
3389
3390         When an accelerated animation or transition was started at the same time as
3391         a non-accelerated one, and then the node for the former was removed, we could
3392         never kick off the non-accelerated animation.
3393         
3394         AnimationControllerPrivate has logic to synchronize the two types of animation
3395         when they start in the same animation update, which involves setting the
3396         m_waitingForAsyncStartNotification flag, and waiting for a notifyAnimationStarted()
3397         to come in from the graphics system.
3398         
3399         However, it failed to handle the case where the accelerated animation was removed
3400         before the callback was received, which left the m_waitingForAsyncStartNotification flag
3401         set to true, preventing the non-accelerated animation from running.
3402         
3403         Test: animations/remove-syncing-animation.html
3404
3405         * page/animation/AnimationBase.h:
3406         (WebCore::AnimationBase::isAccelerated): Make this public.
3407         * page/animation/AnimationController.cpp:
3408         (WebCore::AnimationControllerPrivate::clear): Add logging.
3409         (WebCore::AnimationControllerPrivate::receivedStartTimeResponse): Add logging.
3410         (WebCore::AnimationControllerPrivate::animationWillBeRemoved): Add logging.
3411         After removing animations from the maps, check to see if we expect any of the
3412         remaining animations are waiting for a notifyAnimationStarted(). If not, clear
3413         the m_waitingForAsyncStartNotification flag.
3414         (WebCore::AnimationController::notifyAnimationStarted): Log the renderer.
3415         (WebCore::AnimationControllerPrivate::AnimationControllerPrivate): Remove unneeded
3416         initializations of HashMaps.
3417         * page/animation/CompositeAnimation.cpp:
3418         (WebCore::CompositeAnimation::updateTransitions): Log renderers.
3419         (WebCore::CompositeAnimation::updateKeyframeAnimations): Ditto.
3420
3421 2015-07-28  Dean Jackson  <dino@apple.com>
3422
3423         Remove dispatch_apply_f and instead use vImage more directly
3424         https://bugs.webkit.org/show_bug.cgi?id=147391
3425         <rdar://problem/21893047>
3426
3427         Reviewed by Simon Fraser.
3428
3429         Use vImage unmultiplication and premultiplication functions on the
3430         entire ImageBufferData object, rather than getting and setting data on an
3431         line by line using dispatch_apply.
3432
3433         We were seeing some crashes in vImage with the smaller buffer sizes, and
3434         hopefully this will either fix the problem, or give us a better
3435         stack trace to diagnose.
3436
3437         I also did a drive-by change of "dst" to "dest". It was inconsistent throughout
3438         the file.
3439
3440         Convered by the tests in fast/canvas and imported/w3c/canvas
3441
3442         * platform/graphics/cg/ImageBufferDataCG.cpp: Remove the ScanlineData structure. It is
3443         no longer needed.
3444         (WebCore::premultiplyBufferData): New function that calls vImagePremultiplyData_RGBA8888.
3445         (WebCore::unpremultiplyBufferData): New function that calls vImageUnpremultiplyData_RGBA8888.
3446         (WebCore::affineWarpBufferData): Extracting some common code into a function.
3447         (WebCore::ImageBufferData::getData): Use the two new functions as appropriate. Move
3448         some of the code around now that more is shared between the different #if branches.
3449         (WebCore::ImageBufferData::putData):
3450         (WebCore::convertScanline): Deleted.
3451         (WebCore::unpremultitplyScanline): Deleted.
3452         (WebCore::premultitplyScanline): Deleted.
3453
3454 2015-07-28  Alexey Proskuryakov  <ap@apple.com>
3455
3456         Clean up usesAsyncCallbacks handling in ResourceHandle
3457         https://bugs.webkit.org/show_bug.cgi?id=147342
3458
3459         Reviewed by Darin Adler.
3460
3461         Store "usesAsyncCallbacks" bit in ResourceHandle, because it's not accessible
3462         via client once the client is zeroed out.
3463
3464         Changed ResourceHandle::setClient into ResourceHandle::clearClient, because it's
3465         only ever used to zero out the client pointer, and it doesn't support changing it.
3466
3467         * loader/ResourceLoader.cpp:
3468         (WebCore::ResourceLoader::releaseResources):
3469         * loader/appcache/ApplicationCacheGroup.cpp:
3470         (WebCore::ApplicationCacheGroup::stopLoading):
3471         * platform/network/BlobResourceHandle.cpp:
3472         (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
3473         (WebCore::BlobResourceHandle::notifyResponseOnError):
3474         * platform/network/ResourceHandle.cpp:
3475         (WebCore::ResourceHandle::client):
3476         (WebCore::ResourceHandle::clearClient):
3477         (WebCore::ResourceHandle::setDefersLoading):
3478         (WebCore::ResourceHandle::usesAsyncCallbacks):
3479         (WebCore::ResourceHandle::setClient): Deleted.
3480         * platform/network/ResourceHandle.h:
3481         * platform/network/ResourceHandleInternal.h:
3482         (WebCore::ResourceHandleInternal::ResourceHandleInternal):
3483         * platform/network/cf/ResourceHandleCFNet.cpp:
3484         (WebCore::ResourceHandle::createCFURLConnection):
3485         (WebCore::ResourceHandle::willSendRequest):
3486         (WebCore::ResourceHandle::shouldUseCredentialStorage):
3487         (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace):
3488         * platform/network/mac/ResourceHandleMac.mm:
3489         (WebCore::ResourceHandle::start):
3490         (WebCore::ResourceHandle::makeDelegate):
3491         (WebCore::ResourceHandle::willSendRequest):
3492         (WebCore::ResourceHandle::continueWillSendRequest):
3493         (WebCore::ResourceHandle::continueDidReceiveResponse):
3494         (WebCore::ResourceHandle::shouldUseCredentialStorage):
3495         (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace):
3496         (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace):
3497         (WebCore::ResourceHandle::continueWillCacheResponse):
3498
3499 2015-07-28  Michael Catanzaro  <mcatanzaro@igalia.com>
3500
3501         Minor cleanups in FontCacheFreeType.cpp
3502         https://bugs.webkit.org/show_bug.cgi?id=147