Unreviewed, fix the cairo build after r188594.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-08-18  Alex Christensen  <achristensen@webkit.org>
2
3         Unreviewed, fix the cairo build after r188594.
4
5         * platform/network/curl/CurlDownload.h:
6         * platform/network/curl/ResourceHandleManager.cpp:
7         Include Lock.h
8
9 2015-08-18  Filip Pizlo  <fpizlo@apple.com>
10
11         Unreviewed, fix the cairo build.
12
13         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
14
15 2015-08-17  Filip Pizlo  <fpizlo@apple.com>
16
17         Replace all remaining uses of WTF::Mutex with WTF::Lock
18         https://bugs.webkit.org/show_bug.cgi?id=148089
19
20         Reviewed by Geoffrey Garen.
21
22         No new tests because no new behavior.
23
24         * Modules/webaudio/AsyncAudioDecoder.cpp:
25         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
26         (WebCore::AsyncAudioDecoder::runLoop):
27         * Modules/webaudio/AsyncAudioDecoder.h:
28         * Modules/webaudio/AudioContext.h:
29         * Modules/webaudio/MediaStreamAudioSource.cpp:
30         (WebCore::MediaStreamAudioSource::addAudioConsumer):
31         (WebCore::MediaStreamAudioSource::removeAudioConsumer):
32         (WebCore::MediaStreamAudioSource::setAudioFormat):
33         (WebCore::MediaStreamAudioSource::consumeAudio):
34         * Modules/webaudio/MediaStreamAudioSource.h:
35         * Modules/webdatabase/Database.cpp:
36         (WebCore::Database::close):
37         (WebCore::Database::runTransaction):
38         (WebCore::Database::inProgressTransactionCompleted):
39         (WebCore::Database::hasPendingTransaction):
40         * Modules/webdatabase/Database.h:
41         * Modules/webdatabase/DatabaseTask.cpp:
42         (WebCore::DatabaseTaskSynchronizer::taskCompleted):
43         * Modules/webdatabase/DatabaseTask.h:
44         * Modules/webdatabase/DatabaseThread.cpp:
45         (WebCore::DatabaseThread::start):
46         (WebCore::DatabaseThread::databaseThread):
47         * Modules/webdatabase/DatabaseThread.h:
48         * Modules/webdatabase/DatabaseTracker.cpp:
49         (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
50         (WebCore::DatabaseTracker::canEstablishDatabase):
51         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
52         (WebCore::DatabaseTracker::hasEntryForOrigin):
53         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
54         (WebCore::DatabaseTracker::closeAllDatabases):
55         (WebCore::DatabaseTracker::fullPathForDatabase):
56         (WebCore::DatabaseTracker::origins):
57         (WebCore::DatabaseTracker::databaseNamesForOrigin):
58         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
59         (WebCore::DatabaseTracker::setDatabaseDetails):
60         (WebCore::DatabaseTracker::doneCreatingDatabase):
61         (WebCore::DatabaseTracker::addOpenDatabase):
62         (WebCore::DatabaseTracker::removeOpenDatabase):
63         (WebCore::DatabaseTracker::getOpenDatabases):
64         (WebCore::DatabaseTracker::originLockFor):
65         (WebCore::DatabaseTracker::quotaForOrigin):
66         (WebCore::DatabaseTracker::setQuota):
67         (WebCore::DatabaseTracker::deleteOrigin):
68         (WebCore::DatabaseTracker::deleteDatabase):
69         (WebCore::DatabaseTracker::deleteDatabaseFile):
70         (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
71         (WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
72         (WebCore::DatabaseTracker::openDatabaseMutex):
73         (WebCore::DatabaseTracker::setClient):
74         (WebCore::notificationMutex):
75         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
76         (WebCore::DatabaseTracker::notifyDatabasesChanged):
77         * Modules/webdatabase/DatabaseTracker.h:
78         * Modules/webdatabase/OriginLock.h:
79         * Modules/webdatabase/SQLCallbackWrapper.h:
80         (WebCore::SQLCallbackWrapper::clear):
81         (WebCore::SQLCallbackWrapper::unwrap):
82         (WebCore::SQLCallbackWrapper::hasCallback):
83         * Modules/webdatabase/SQLTransactionBackend.cpp:
84         (WebCore::SQLTransactionBackend::doCleanup):
85         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
86         (WebCore::SQLTransactionBackend::getNextStatement):
87         * Modules/webdatabase/SQLTransactionBackend.h:
88         * bindings/js/WorkerScriptController.cpp:
89         (WebCore::WorkerScriptController::scheduleExecutionTermination):
90         (WebCore::WorkerScriptController::isExecutionTerminating):
91         * bindings/js/WorkerScriptController.h:
92         * dom/default/PlatformMessagePortChannel.cpp:
93         (WebCore::MessagePortChannel::postMessageToRemote):
94         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
95         (WebCore::MessagePortChannel::isConnectedTo):
96         (WebCore::MessagePortChannel::hasPendingActivity):
97         (WebCore::MessagePortChannel::locallyEntangledPort):
98         (WebCore::PlatformMessagePortChannel::setRemotePort):
99         (WebCore::PlatformMessagePortChannel::entangledChannel):
100         (WebCore::PlatformMessagePortChannel::closeInternal):
101         * dom/default/PlatformMessagePortChannel.h:
102         * loader/icon/IconDatabase.cpp:
103         (WebCore::IconDatabase::removeAllIcons):
104         (WebCore::IconDatabase::synchronousIconForPageURL):
105         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
106         (WebCore::IconDatabase::synchronousIconURLForPageURL):
107         (WebCore::IconDatabase::retainIconForPageURL):
108         (WebCore::IconDatabase::performRetainIconForPageURL):
109         (WebCore::IconDatabase::releaseIconForPageURL):
110         (WebCore::IconDatabase::performReleaseIconForPageURL):
111         (WebCore::IconDatabase::setIconDataForIconURL):
112         (WebCore::IconDatabase::setIconURLForPageURL):
113         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
114         (WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
115         (WebCore::IconDatabase::pageURLMappingCount):
116         (WebCore::IconDatabase::retainedPageURLCount):
117         (WebCore::IconDatabase::iconRecordCount):
118         (WebCore::IconDatabase::iconRecordCountWithData):
119         (WebCore::IconDatabase::wakeSyncThread):
120         (WebCore::IconDatabase::scheduleOrDeferSyncTimer):
121         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks):
122         (WebCore::IconDatabase::databasePath):
123         (WebCore::IconDatabase::getOrCreatePageURLRecord):
124         (WebCore::IconDatabase::iconDatabaseSyncThread):
125         (WebCore::IconDatabase::performOpenInitialization):
126         (WebCore::IconDatabase::performURLImport):
127         (WebCore::IconDatabase::syncThreadMainLoop):
128         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
129         (WebCore::IconDatabase::readFromDatabase):
130         (WebCore::IconDatabase::writeToDatabase):
131         (WebCore::IconDatabase::pruneUnretainedIcons):
132         (WebCore::IconDatabase::cleanupSyncThread):
133         * loader/icon/IconDatabase.h:
134         * page/scrolling/ScrollingTree.cpp:
135         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
136         (WebCore::ScrollingTree::commitNewTreeState):
137         (WebCore::ScrollingTree::setMainFramePinState):
138         (WebCore::ScrollingTree::mainFrameScrollPosition):
139         (WebCore::ScrollingTree::setMainFrameScrollPosition):
140         (WebCore::ScrollingTree::isPointInNonFastScrollableRegion):
141         (WebCore::ScrollingTree::isRubberBandInProgress):
142         (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
143         (WebCore::ScrollingTree::isScrollSnapInProgress):
144         (WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
145         (WebCore::ScrollingTree::setCanRubberBandState):
146         (WebCore::ScrollingTree::rubberBandsAtLeft):
147         (WebCore::ScrollingTree::rubberBandsAtRight):
148         (WebCore::ScrollingTree::rubberBandsAtBottom):
149         (WebCore::ScrollingTree::rubberBandsAtTop):
150         (WebCore::ScrollingTree::setScrollPinningBehavior):
151         (WebCore::ScrollingTree::scrollPinningBehavior):
152         (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
153         (WebCore::ScrollingTree::latchedNode):
154         (WebCore::ScrollingTree::setLatchedNode):
155         (WebCore::ScrollingTree::clearLatchedNode):
156         * page/scrolling/ScrollingTree.h:
157         * platform/MemoryPressureHandler.h:
158         * platform/audio/HRTFDatabaseLoader.cpp:
159         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
160         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
161         * platform/audio/HRTFDatabaseLoader.h:
162         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
163         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
164         (WebCore::MemoryPressureHandler::clearMemoryPressure):
165         (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
166         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
167         * platform/graphics/DisplayRefreshMonitor.cpp:
168         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
169         * platform/graphics/DisplayRefreshMonitor.h:
170         (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime):
171         (WebCore::DisplayRefreshMonitor::mutex):
172         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
173         (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks):
174         (WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag):
175         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
176         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
177         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
178         (WebCore::AVFWrapper::callbackContext):
179         (WebCore::AVFWrapper::~AVFWrapper):
180         (WebCore::AVFWrapper::mapLock):
181         (WebCore::AVFWrapper::addToMap):
182         (WebCore::AVFWrapper::removeFromMap):
183         (WebCore::AVFWrapper::periodicTimeObserverCallback):
184         (WebCore::AVFWrapper::processNotification):
185         (WebCore::AVFWrapper::loadPlayableCompletionCallback):
186         (WebCore::AVFWrapper::loadMetadataCompletionCallback):
187         (WebCore::AVFWrapper::seekCompletedCallback):
188         (WebCore::AVFWrapper::processCue):
189         (WebCore::AVFWrapper::legibleOutputCallback):
190         (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource):
191         (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):
192         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
193         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
194         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
195         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
196         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
197         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
198         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
199         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
200         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
201         (WebCore::DisplayRefreshMonitorMac::requestRefreshCallback):
202         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
203         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
204         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
205         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
206         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
207         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
208         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
209         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
210         * platform/ios/LegacyTileCache.h:
211         * platform/ios/LegacyTileCache.mm:
212         (WebCore::LegacyTileCache::setTilesOpaque):
213         (WebCore::LegacyTileCache::doLayoutTiles):
214         (WebCore::LegacyTileCache::setCurrentScale):
215         (WebCore::LegacyTileCache::commitScaleChange):
216         (WebCore::LegacyTileCache::layoutTilesNow):
217         (WebCore::LegacyTileCache::layoutTilesNowForRect):
218         (WebCore::LegacyTileCache::removeAllNonVisibleTiles):
219         (WebCore::LegacyTileCache::removeAllTiles):
220         (WebCore::LegacyTileCache::removeForegroundTiles):
221         (WebCore::LegacyTileCache::setContentReplacementImage):
222         (WebCore::LegacyTileCache::contentReplacementImage):
223         (WebCore::LegacyTileCache::tileCreationTimerFired):
224         (WebCore::LegacyTileCache::setNeedsDisplayInRect):
225         (WebCore::LegacyTileCache::updateTilingMode):
226         (WebCore::LegacyTileCache::setTilingMode):
227         (WebCore::LegacyTileCache::doPendingRepaints):
228         (WebCore::LegacyTileCache::flushSavedDisplayRects):
229         (WebCore::LegacyTileCache::prepareToDraw):
230         * platform/ios/LegacyTileLayerPool.h:
231         * platform/ios/LegacyTileLayerPool.mm:
232         (WebCore::LegacyTileLayerPool::addLayer):
233         (WebCore::LegacyTileLayerPool::takeLayerWithSize):
234         (WebCore::LegacyTileLayerPool::setCapacity):
235         (WebCore::LegacyTileLayerPool::prune):
236         (WebCore::LegacyTileLayerPool::drain):
237         * platform/network/curl/CurlDownload.cpp:
238         (WebCore::CurlDownloadManager::add):
239         (WebCore::CurlDownloadManager::remove):
240         (WebCore::CurlDownloadManager::getActiveDownloadCount):
241         (WebCore::CurlDownloadManager::getPendingDownloadCount):
242         (WebCore::CurlDownloadManager::stopThreadIfIdle):
243         (WebCore::CurlDownloadManager::updateHandleList):
244         (WebCore::CurlDownload::~CurlDownload):
245         (WebCore::CurlDownload::init):
246         (WebCore::CurlDownload::getTempPath):
247         (WebCore::CurlDownload::getUrl):
248         (WebCore::CurlDownload::getResponse):
249         (WebCore::CurlDownload::closeFile):
250         (WebCore::CurlDownload::didReceiveHeader):
251         (WebCore::CurlDownload::didReceiveData):
252         (WebCore::CurlDownload::didFail):
253         * platform/network/curl/CurlDownload.h:
254         * platform/network/curl/ResourceHandleManager.cpp:
255         (WebCore::cookieJarPath):
256         (WebCore::sharedResourceMutex):
257         (WebCore::curl_lock_callback):
258         (WebCore::curl_unlock_callback):
259         * platform/network/ios/QuickLook.mm:
260         (WebCore::QLDirectoryAttributes):
261         (qlPreviewConverterDictionaryMutex):
262         (WebCore::addQLPreviewConverterWithFileForURL):
263         (WebCore::qlPreviewConverterUTIForURL):
264         (WebCore::removeQLPreviewConverterForURL):
265         (WebCore::safeQLURLForDocumentURLAndResourceURL):
266         * platform/sql/SQLiteDatabase.cpp:
267         (WebCore::SQLiteDatabase::close):
268         (WebCore::SQLiteDatabase::maximumSize):
269         (WebCore::SQLiteDatabase::setMaximumSize):
270         (WebCore::SQLiteDatabase::pageSize):
271         (WebCore::SQLiteDatabase::freeSpaceSize):
272         (WebCore::SQLiteDatabase::totalSize):
273         (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
274         (WebCore::SQLiteDatabase::setAuthorizer):
275         * platform/sql/SQLiteDatabase.h:
276         (WebCore::SQLiteDatabase::databaseMutex):
277         * platform/sql/SQLiteStatement.cpp:
278         (WebCore::SQLiteStatement::prepare):
279         (WebCore::SQLiteStatement::step):
280         * workers/WorkerThread.cpp:
281         (WebCore::WorkerThread::start):
282         (WebCore::WorkerThread::workerThread):
283         (WebCore::WorkerThread::stop):
284         * workers/WorkerThread.h:
285
286 2015-08-18  Myles C. Maxfield  <mmaxfield@apple.com>
287
288         [Cocoa] Honor the 'trak' table by opting in via text-rendering: optimizeLegibility
289         https://bugs.webkit.org/show_bug.cgi?id=148119
290         <rdar://problem/22291561>
291
292         Reviewed by Tim Horton.
293
294         When the author has opted in by specifying "text-rendering: optimizeLegibility;", we should
295         honor the font's 'trak' table. We do this by specifying kCTFontOpticalSizeAttribute at font
296         creation time, and by using CTFontGetAdvancesForGlyphs() instead of
297         CGFontGetGlyphAdvancesForStyle().
298
299         Test: fast/text/trak-optimizeLegibility.html
300
301         * platform/graphics/FontCache.h:
302         (WebCore::FontDescriptionKey::makeFlagKey): Make our caches sensitive to TextRenderingMode.
303         * platform/graphics/FontPlatformData.cpp:
304         (WebCore::FontPlatformData::FontPlatformData): Add a TextRenderingMode member variable.
305         (WebCore::FontPlatformData::operator=): Update to consult with the new member.
306         * platform/graphics/FontPlatformData.h:
307         (WebCore::FontPlatformData::textRenderingMode): Getter.
308         * platform/graphics/cocoa/FontCacheCoreText.cpp:
309         (WebCore::preparePlatformFont): Specify kCTFontOpticalSizeAttribute.
310         (WebCore::applyFontFeatureSettings): Deleted.
311         * platform/graphics/cocoa/FontCocoa.mm:
312         (WebCore::canUseFastGlyphAdvanceGetter): Use CTFontGetAdvancesForGlyphs() if we are
313         optimizeLegibility.
314         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
315         (WebCore::FontPlatformData::FontPlatformData): Pass the TextRenderingMode around.
316         * platform/graphics/ios/FontCacheIOS.mm:
317         (WebCore::FontCache::getSystemFontFallbackForCharacters): Update to call renamed function.
318         (WebCore::FontCache::createFontPlatformData): Ditto.
319         * platform/graphics/mac/FontCacheMac.mm:
320         (WebCore::fontWithFamily): Ditto.
321         (WebCore::FontCache::systemFallbackForCharacters): Ditto.
322         (WebCore::FontCache::createFontPlatformData): Ditto.
323         * platform/graphics/mac/FontCustomPlatformData.cpp:
324         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
325         * platform/spi/cocoa/CoreTextSPI.h:
326         * rendering/RenderThemeIOS.mm:
327         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription): Ditto.
328
329 2015-08-18  Chris Dumez  <cdumez@apple.com>
330
331         Make our bindings' GetOwnPropertySlot() behave according to specification
332         https://bugs.webkit.org/show_bug.cgi?id=148092
333
334         Reviewed by Geoffrey Garen.
335
336         Make our bindings' GetOwnPropertySlot() behave according to
337         specification. In particular, our bindings use to do:
338         1. Indexed getter
339         2. Check static properties
340         3. Prototype check
341         4. Named getter
342         5. Check own properties
343
344         According to the specification [1][2], we should do:
345         - If the interface has [OverrideBuiltins]:
346             1. Indexed getter
347             2. Named getter
348             3. Static / own properties
349         - Otherwise:
350             1. Indexed getter
351             2. Static / own properties
352             3. Prototype check
353             4. Named getter
354
355         This patch adds support for the [OverrideBuiltins] IDL extended
356         attribute [3] and aligns our bindings implementation with the Web IDL
357         specification weither that IDL extended attribute is present or
358         not.
359         
360         [1] https://heycam.github.io/webidl/#getownproperty-guts
361         [2] https://heycam.github.io/webidl/#dfn-named-property-visibility
362         [3] https://heycam.github.io/webidl/#OverrideBuiltins
363
364         Performance:
365         - PerformanceTests/Bindings/childNodes-traversal.html: ~Same
366         - PerformanceTests/Bindings/children-traversal.html: +104% :)
367
368         No new tests, covered by:
369         fast/dom/htmlcollection-getownproperty.html
370         fast/dom/collection-length-should-not-be-overridden.html
371         fast/forms/input-named-action-overrides-action-attribute.html
372
373         * bindings/js/JSHTMLCollectionCustom.cpp:
374         (WebCore::JSHTMLCollection::nameGetter):
375         Add assertions to make sure we don't use HTMLCollection's namedGetter()
376         for HTMLFormControlsCollection / HTMLOptionsCollection subclasses.
377         We should use the subclasses' namedGetter() instead.
378
379         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
380         (WebCore::JSHTMLOptionsCollection::canGetItemsForName):
381         (WebCore::JSHTMLOptionsCollection::nameGetter):
382         Add code for handling named getter requests on
383         HTMLOptionsCollection.
384
385         * bindings/js/JSNodeListCustom.cpp:
386         (WebCore::JSNodeList::canGetItemsForName):
387         (WebCore::JSNodeList::nameGetter):
388         Refactor custom code for the NodeList named getter, now that the
389         IDL interface is using [CustomNamedGetter] instead of
390         [JSCustomGetOwnPropertySlotAndDescriptor].
391
392         * bindings/scripts/CodeGeneratorJS.pm:
393         (GenerateGetOwnPropertySlotBody):
394         (GenerateHeaderContentHeader): Deleted.
395         - Add support for the [OverrideBuiltins] IDL extended attribute and
396         update the generated getOwnPropertySlot() methods to match the
397         Web IDL specification.
398         - Also drop the JSC::HasImpureGetOwnPropertySlot flag for interfaces
399         that have a named getter but NOT the [OverrideBuiltins] IDL extended
400         attribute. Without [OverrideBuiltins], named properties can no longer
401         shadow own properties so we no longer need to mark GetOwnPropertySlot
402         as impure. This allows caching of properties.
403
404         * bindings/scripts/IDLAttributes.txt:
405         Add [OverrideBuiltins] IDL extended attribute [3].
406
407         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
408         (WebCore::JSTestActiveDOMObject::getOwnPropertySlot):
409         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
410         (WebCore::JSTestCustomNamedGetter::getOwnPropertySlot):
411         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
412         (WebCore::JSTestEventTarget::getOwnPropertySlot):
413         * bindings/scripts/test/JS/JSTestException.cpp:
414         (WebCore::JSTestException::getOwnPropertySlot):
415         * bindings/scripts/test/JS/JSTestInterface.cpp:
416         (WebCore::JSTestInterface::getOwnPropertySlot):
417         * bindings/scripts/test/JS/JSTestObj.cpp:
418         (WebCore::JSTestObj::getOwnPropertySlot):
419         Rebaseline the bindings tests as their getOwnPropertySlot() method
420         is now different.
421
422         * bindings/scripts/test/GObject/WebKitDOMTestOverrideBuiltins.cpp: Added.
423         * bindings/scripts/test/GObject/WebKitDOMTestOverrideBuiltins.h: Added.
424         * bindings/scripts/test/GObject/WebKitDOMTestOverrideBuiltinsPrivate.h: Added.
425         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: Added.
426         * bindings/scripts/test/JS/JSTestOverrideBuiltins.h: Added.
427         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
428         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.h: Added.
429         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.mm: Added.
430         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltinsInternal.h: Added.
431         * bindings/scripts/test/TestOverrideBuiltins.idl: Added.
432         Add bindings test coverage for the new [OverrideBuiltins] IDL extended
433         attribute [3].
434
435         * dom/DOMStringMap.idl:
436         Add [OverrideBuiltins] IDL extended attribute to match the specification:
437         https://html.spec.whatwg.org/multipage/infrastructure.html#domstringmap
438
439         * dom/NodeList.idl:
440         Use CustomNamedGetter IDL extended attribute instead of
441         JSCustomGetOwnPropertySlotAndDescriptor as NodeList merely implements
442         a custom named getter. This makes sure that the order in which the
443         named getter is called is correct as per the Web IDL specification.
444
445         * html/HTMLDocument.idl:
446         Add [OverrideBuiltins] IDL extended attribute to match the specification:
447         https://html.spec.whatwg.org/multipage/dom.html#the-document-object
448
449         * html/HTMLFormElement.idl:
450         Add [OverrideBuiltins] IDL extended attribute to match the specification:
451         https://html.spec.whatwg.org/multipage/forms.html#the-form-element
452
453         * html/HTMLOptionsCollection.idl:
454         Add missing 'getter' in front of the named getter, as the per the HTML
455         specification. Without this, HTMLOptionsCollection would not be
456         recognized as a named properties object, which means that we would not
457         check the HTMLOptionsCollection prototype before querying the named
458         getter on HTMLCollection. This used to work because the bindings
459         generator was hard-coding the prototype check for every HTML*Collection
460         IDL interface. In this patch, we generalized the check to every
461         interface that has a named getter.
462
463 2015-08-18  Per Arne Vollan  <peavo@outlook.com>
464
465         [Win] Popup menu displayed at incorrect position when page is scrolled and device scale factor != 1.
466         https://bugs.webkit.org/show_bug.cgi?id=148130
467
468         Reviewed by Alex Christensen.
469
470         Scale WebView coordinates with device scale factor.
471
472         * platform/win/PopupMenuWin.cpp:
473         (WebCore::PopupMenuWin::calculatePositionAndSize):
474
475 2015-08-18  Javier Fernandez  <jfernandez@igalia.com>
476
477         [CSS Grid Layout] Do not stretch always grid items with auto width
478         https://bugs.webkit.org/show_bug.cgi?id=148069
479
480         Reviewed by Darin Adler.
481
482         We assumed that any grid item with 'auto' width will be stretched
483         to fill all the available space in its grid area. We assumed this
484         because grid area acts as item's container.
485
486         However, Grid Layout specification states on its Alignment section
487         that items will be stretched by default, unless either
488         justify-self or align-self compute to a value other than stretch
489         or margins are auto. In those cases, grid items will auto-size to
490         fit their contents.
491
492         Tests:
493         fast/css-grid-layout/grid-align-justify-stretch.html
494         fast/css-grid-layout/grid-item-auto-margins-and-stretch.html
495         fast/css-grid-layout/grid-items-should-not-be-stretched-when-height-or-width-or-margin-change.html
496
497         * rendering/RenderBox.cpp:
498         (WebCore::RenderBox::computeLogicalWidthInRegion):
499         * rendering/RenderGrid.cpp:
500         (WebCore::RenderGrid::layoutGridItems):
501         (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
502         (WebCore::RenderGrid::needToStretchChildLogicalHeight): Deleted.
503         * rendering/RenderGrid.h:
504
505 2015-08-18  Xabier Rodriguez Calvar  <calvaris@igalia.com>
506
507         [Streams API] Update implementation with the latest spec
508         https://bugs.webkit.org/show_bug.cgi?id=147978
509
510         Reviewed by Darin Adler.
511
512         Changed the way the read and closed promises are resolved and the stream is released when an even closes or
513         errors the stream.
514
515         Current tests suffice after changing the order of the promise resolution according to the new spec.
516
517         * Modules/streams/ReadableStream.cpp:
518         (WebCore::ReadableStream::releaseReader): Changed how the promises are resolved.
519         (WebCore::ReadableStream::changeStateToErrored): Changed how the promises are resolved and manually releasing
520         the stream instead of calling releaseReader according to the spec.
521
522 2015-08-17  Zalan Bujtas  <zalan@apple.com>
523
524         Outline with auto style leaves bits behind when the the box is moved.
525         https://bugs.webkit.org/show_bug.cgi?id=148100
526
527         Reviewed by Simon Fraser.
528
529         We paint the focus ring when 'outline-style: auto' is present, however
530         we don't take the focus ring width into account when the repaint rect
531         is computed.
532
533         Tests: fast/repaint/outline-with1px-auto-repaint-rect.html
534                fast/repaint/outline-with2px-auto-repaint-rect.html
535                fast/repaint/outline-with3px-auto-repaint-rect.html
536
537         * rendering/RenderObject.cpp:
538         (WebCore::RenderObject::adjustRectForOutlineAndShadow):
539         * rendering/RenderThemeMac.h:
540         * rendering/RenderThemeMac.mm:
541         (WebCore::RenderThemeMac::platformFocusRingMaxWidth): Deleted. : 0 as focus ring width is incorrect.
542         The reason why r169699 fixed the failing cases was because they all had outline width < 3 (but no auto outline style).
543         The correct fix is to check if the style requires focus ring painting and use the RenderTheme::platformFocusRingMaxWidth
544         accordingly.
545
546 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
547
548         [Cocoa] Address post-commit review
549         https://bugs.webkit.org/show_bug.cgi?id=147864
550
551         Reviewed by Darin Adler.
552
553         Create helper functions to cast between NSFont*s and CTFontRefs.
554
555         No new tests because there is no behavior change.
556
557         * platform/graphics/FontPlatformData.h:
558         (WebCore::toCTFont):
559         (WebCore::toNSFont):
560         * platform/graphics/cocoa/FontCacheCoreText.cpp:
561         * platform/graphics/cocoa/FontCocoa.mm:
562         (WebCore::Font::platformCreateScaledFont):
563         (WebCore::Font::compositeFontReferenceFont):
564         * platform/graphics/mac/FontCacheMac.mm:
565         (WebCore::FontCache::platformPurgeInactiveFontData):
566         (WebCore::lookupCTFont):
567         (WebCore::FontCache::systemFallbackForCharacters):
568         (WebCore::FontCache::createFontPlatformData):
569         * platform/mac/DragImageMac.mm:
570         (WebCore::fontFromNSFont):
571         (WebCore::widthWithFont):
572         (WebCore::drawAtPoint):
573         * platform/spi/mac/NSFontSPI.h:
574
575 2015-08-17  Alex Christensen  <achristensen@webkit.org>
576
577         WinCairo build fix after r188566
578
579         * platform/graphics/win/FontPlatformDataCairoWin.cpp:
580         (WebCore::FontPlatformData::FontPlatformData):
581         Remove reference to removed m_isCompositeFontReference.
582
583 2015-08-17  Alex Christensen  <achristensen@webkit.org>
584
585         Add const to content extension parser
586         https://bugs.webkit.org/show_bug.cgi?id=148044
587
588         Reviewed by Benjamin Poulain.
589
590         * contentextensions/ContentExtensionParser.cpp:
591         (WebCore::ContentExtensions::containsOnlyASCIIWithNoUppercase):
592         (WebCore::ContentExtensions::getDomainList):
593         (WebCore::ContentExtensions::getTypeFlags):
594         (WebCore::ContentExtensions::loadTrigger):
595         (WebCore::ContentExtensions::loadAction):
596         (WebCore::ContentExtensions::loadRule):
597         (WebCore::ContentExtensions::loadEncodedRules):
598         Add const.  No change in behavior.
599
600 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
601
602         [OS X] Remove support for composite fonts
603         https://bugs.webkit.org/show_bug.cgi?id=147920
604
605         Reviewed by Dan Bernstein.
606
607         Composite fonts were first introduced in [1]. These composite fonts are extremely rare
608         because:
609         1. None of the preinstalled fonts on either OS X nor iOS are composite fonts,
610         2. WebKit does not support loading web fonts from composite font files, and
611         3. WebKit's support only ever existed on OS X (none of the other ports).
612
613         In fact, no one I've consulted with has ever seen any of these fonts used in the wild.
614         The fonts also require a fundamentally broken code path, and add complexity to WebKit.
615
616         [1] https://bugs.webkit.org/attachment.cgi?id=134923&action=review
617
618         No new tests.
619
620         * platform/graphics/Font.h:
621         * platform/graphics/FontPlatformData.cpp:
622         (WebCore::FontPlatformData::FontPlatformData): Deleted.
623         (WebCore::FontPlatformData::operator=): Deleted.
624         * platform/graphics/FontPlatformData.h:
625         (WebCore::FontPlatformData::isCompositeFontReference): Deleted.
626         (WebCore::FontPlatformData::operator==): Deleted.
627         * platform/graphics/cocoa/FontCocoa.mm:
628         (WebCore::Font::compositeFontReferenceFont): Deleted.
629         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
630         (WebCore::FontPlatformData::FontPlatformData): Deleted.
631         (WebCore::FontPlatformData::setFont): Deleted.
632         * platform/graphics/mac/GlyphPageMac.cpp:
633         (WebCore::shouldUseCoreText):
634         (WebCore::GlyphPage::fill):
635
636 2015-08-17  Tim Horton  <timothy_horton@apple.com>
637
638         Some functions on DictionaryLookup.h should just be generic functions elsewhere
639         https://bugs.webkit.org/show_bug.cgi?id=138567
640
641         Reviewed by Dean Jackson.
642
643         No new tests, just refactoring.
644
645         * dom/Range.cpp:
646         (WebCore::Range::contains):
647         * dom/Range.h:
648         Add a Range::contains(VisiblePosition).
649         It's simpler than the old thing from DictionaryLookup.mm, but does the same thing.
650         It's so simple that it doesn't necessarily need to exist, but it seems useful.
651
652         * editing/VisiblePosition.cpp:
653         (WebCore::makeRange):
654         nullptrs
655
656         * editing/mac/DictionaryLookup.h:
657         * editing/mac/DictionaryLookup.mm:
658         (WebCore::selectionContainsPosition):
659         (WebCore::rangeForDictionaryLookupAtHitTestResult):
660         (WebCore::isPositionInRange): Deleted.
661         (WebCore::shouldUseSelection): Deleted.
662         Move isPositionInRange to Range.
663         Rename shouldUseSelection to what it really means.
664         I didn't move selectionContainsPosition to VisibleSelection because it
665         only handles Range selections, not any of the ohers, and thus isn't
666         generic enough to put there.
667
668 2015-08-17  Alex Christensen  <achristensen@webkit.org>
669
670         [Win CMake] Allow WebKitLibraries directory to be set from the command line
671         https://bugs.webkit.org/show_bug.cgi?id=148112
672
673         Reviewed by Brent Fulgham.
674
675         * PlatformAppleWin.cmake:
676         * PlatformWinCairo.cmake:
677         Don't use an environment variable for WEBKIT_LIBRARIES_DIR.  
678
679 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
680
681         [OS X] Migrate off of CTFontSetRenderingParameters()
682         https://bugs.webkit.org/show_bug.cgi?id=148113
683
684         Reviewed by Lucas Forschler.
685
686         Instead, use CTFontSetRenderingStyle().
687
688         No new tests because there is no behavior change.
689
690         * platform/spi/cocoa/CoreTextSPI.h:
691
692 2015-08-17  Alex Christensen  <achristensen@webkit.org>
693
694         Build Debug Suffix on Windows with CMake
695         https://bugs.webkit.org/show_bug.cgi?id=148083
696
697         Reviewed by Brent Fulgham.
698
699         * CMakeLists.txt:
700         * PlatformAppleWin.cmake:
701         * PlatformWin.cmake:
702         Add DEBUG_SUFFIX
703
704 2015-08-17  Myles C. Maxfield  <mmaxfield@apple.com>
705
706         Implement IntegerHasher
707         https://bugs.webkit.org/show_bug.cgi?id=147866
708
709         Reviewed by Darin Adler and Anders Carlsson.
710
711         Rename StringHasher.h to Hasher.
712
713         No new tests because there is no behavior difference.
714
715         * contentextensions/DFAMinimizer.cpp: Use new #include.
716         * contentextensions/HashableActionList.h: Ditto.
717         * platform/graphics/FontFeatureSettings.cpp:
718         (WebCore::FontFeatureSettings::hash): Use new IntegerHasher class.
719         (WebCore::FontFeature::hash): Deleted.
720         * platform/graphics/FontFeatureSettings.h: Remove unnecessary function.
721         * platform/graphics/Gradient.cpp: Use new #include.
722         * platform/graphics/WidthCache.h: Ditto.
723
724 2015-08-17  Chris Dumez  <cdumez@apple.com>
725
726         Log actual PageCache retrieval success rate using diagnostic logging
727         https://bugs.webkit.org/show_bug.cgi?id=147937
728
729         Reviewed by Antti Koivisto.
730
731         Log actual PageCache retrieval success rate using diagnostic logging.
732         Previously, we would only log how successful we are at saving entries
733         into the cache, which is not the most interesting metric.
734
735         * history/PageCache.cpp:
736         (WebCore::canCachePage):
737         * loader/FrameLoader.cpp:
738         (WebCore::FrameLoader::continueLoadAfterNavigationPolicy):
739         * page/DiagnosticLoggingKeys.cpp:
740         (WebCore::DiagnosticLoggingKeys::canCacheKey):
741         * page/DiagnosticLoggingKeys.h:
742
743 2015-08-17  Alex Christensen  <achristensen@webkit.org>
744
745         Move some commands from ./CMakeLists.txt to Source/cmake
746         https://bugs.webkit.org/show_bug.cgi?id=148003
747
748         Reviewed by Brent Fulgham.
749
750         * CMakeLists.txt:
751         Added commands needed to build WebCore by itself.
752
753 2015-08-17  Alex Christensen  <achristensen@webkit.org>
754
755         Remove unused multisampling check
756         https://bugs.webkit.org/show_bug.cgi?id=148030
757
758         Reviewed by Dean Jackson.
759
760         No change in behavior.
761         Extensions3DOpenGLCommon.m_maySupportMultisampling is always true.
762
763         * platform/graphics/Extensions3D.h:
764         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
765         (WebCore::Extensions3DOpenGLCommon::Extensions3DOpenGLCommon):
766         * platform/graphics/opengl/Extensions3DOpenGLCommon.h:
767         (WebCore::Extensions3DOpenGLCommon::isImagination):
768         (WebCore::Extensions3DOpenGLCommon::vendor):
769         (WebCore::Extensions3DOpenGLCommon::requiresBuiltInFunctionEmulation):
770         (WebCore::Extensions3DOpenGLCommon::requiresRestrictedMaximumTextureSize):
771         (WebCore::Extensions3DOpenGLCommon::maySupportMultisampling): Deleted.
772         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
773         (WebCore::GraphicsContext3D::validateDepthStencil):
774
775 2015-08-17  Andy Estes  <aestes@apple.com>
776
777         REGRESSION (r188486): Crash in SubresourceLoader::didReceiveResponse() when TemporaryChange goes out of scope
778         https://bugs.webkit.org/show_bug.cgi?id=148082
779
780         Reviewed by Alexey Proskuryakov.
781
782         Covered by existing tests run under ASan or Guard Malloc.
783
784         * loader/SubresourceLoader.cpp:
785         (WebCore::SubresourceLoader::didReceiveResponse): Ensure that callingDidReceiveResponse is destroyed while the
786         SubresourceLoader is still alive by declaring it after protect.
787
788 2015-08-17  Simon Fraser  <simon.fraser@apple.com>
789
790         will-change should sometimes trigger compositing
791         https://bugs.webkit.org/show_bug.cgi?id=148072
792
793         Reviewed by Tim Horton.
794         
795         Implement the compositing side-effects of will-change, if any of the
796         following properties are specified:
797             opacity
798             filter (as -webkit-filter)
799             backdrop-filter (as -webkit-backdrop-filter)
800             transform (on transformable elements only)
801
802         Tests: compositing/layer-creation/will-change-change.html
803                compositing/layer-creation/will-change-layer-creation.html
804
805         * inspector/InspectorLayerTreeAgent.cpp:
806         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer): Tell the inspector
807         about will-change.
808         * rendering/RenderElement.cpp:
809         (WebCore::RenderElement::adjustStyleDifference): Need to trigger a recomposite if
810         will-change includes a compositing trigger property. This gets called before and
811         after setting the style, so this checks both states.
812         (WebCore::RenderElement::shouldWillChangeCreateStackingContext):
813         * rendering/RenderElement.h:
814         (WebCore::RenderElement::willChangeCreatesStackingContext): Helper function that
815         RenderInline uses to determine if it needs to create a RenderLayer, since RenderInline
816         doesn't get automatic layer RenderLayers as a side effect of having non-auto z-index
817         in the style.
818         * rendering/RenderInline.h: Need to trigger a RenderLayer if will-change includes
819         a property that applies to inlines.
820         * rendering/RenderLayerCompositor.cpp:
821         (WebCore::RenderLayerCompositor::requiresCompositingLayer): Call requiresCompositingForWillChange().
822         (WebCore::RenderLayerCompositor::requiresOwnBackingStore): Call requiresCompositingForWillChange().
823         (WebCore::RenderLayerCompositor::reasonsForCompositing): Include requiresCompositingForWillChange().
824         (WebCore::RenderLayerCompositor::requiresCompositingForWillChange): If will-change contains a
825         property that would trigger compositing on this element, return true.
826         * rendering/RenderLayerCompositor.h:
827         * rendering/style/RenderStyle.cpp:
828         (WebCore::RenderStyle::changeRequiresLayout): Set ContextSensitivePropertyWillChange in
829         changedContextSensitiveProperties if will-change changes.
830         * rendering/style/RenderStyle.h: Rename for clarity.
831         * rendering/style/RenderStyleConstants.h: Add ContextSensitivePropertyWillChange.
832         * rendering/style/WillChangeData.cpp:
833         (WebCore::propertyCreatesStackingContext): Subset of properties that create stacking
834         context on any element.
835         (WebCore::propertyCreatesStackingContextOnBoxesOnly): Additional properties that
836         create stacking context on boxes.
837         (WebCore::propertyTriggersCompositing): Properties that trigger compositing on
838         any element.
839         (WebCore::propertyTriggersCompositingOnBoxesOnly): Additional properties that
840         trigger compositing on boxes.
841         (WebCore::WillChangeData::addFeature): As features are added, manage a set of
842         flags to know if they trigger stacking context or compositing, on inlines and boxes.
843         (WebCore::WillChangeData::createsStackingContext): Deleted.
844         * rendering/style/WillChangeData.h:
845         (WebCore::WillChangeData::canCreateStackingContext):
846         (WebCore::WillChangeData::canCreateStackingContextOnInline):
847         (WebCore::WillChangeData::canTriggerCompositing):
848         (WebCore::WillChangeData::canTriggerCompositingOnInline):
849
850 2015-08-17  Timothy Horton  <timothy_horton@apple.com>
851
852         Holes for find matches that span multiple lines are completely wrong
853         https://bugs.webkit.org/show_bug.cgi?id=148065
854         <rdar://problem/5305002>
855
856         Reviewed by Simon Fraser.
857
858         Test: fast/text/mark-matches-broken-line-rendering.html
859
860         Two big problems with find holes:
861             - RenderedDocumentMarker only has one rect, but a marker can be painted
862               by multiple text runs, each with their own rendered rect
863             - paintTextMatchMarker does std::max((unsigned)a, (unsigned)0), which is
864               obviously an overflow problem/not going to work if a is negative
865
866         The combination of these issues causes the holes for find matches to be
867         very broken: text that isn't part of the match is highlighted, and some
868         text that is part of the match isn't highlighted.
869
870         To fix, make RenderedDocumentMarker support multiple rects, and use signed
871         math (like paintDocumentMarker already did) when computing positions in paintTextMatchMarker.
872
873         * dom/DocumentMarkerController.cpp:
874         (WebCore::DocumentMarkerController::addTextMatchMarker):
875         (WebCore::DocumentMarkerController::renderedRectsForMarkers):
876         * dom/RenderedDocumentMarker.h:
877         (WebCore::RenderedDocumentMarker::RenderedDocumentMarker):
878         (WebCore::RenderedDocumentMarker::isRendered):
879         (WebCore::RenderedDocumentMarker::contains):
880         (WebCore::RenderedDocumentMarker::addRenderedRect):
881         (WebCore::RenderedDocumentMarker::renderedRects):
882         (WebCore::RenderedDocumentMarker::invalidate):
883         (WebCore::RenderedDocumentMarker::setRenderedRect): Deleted.
884         (WebCore::RenderedDocumentMarker::renderedRect): Deleted.
885         (WebCore::RenderedDocumentMarker::invalidMarkerRect): Deleted.
886         * rendering/InlineTextBox.cpp:
887         (WebCore::InlineTextBox::paintDocumentMarker):
888         (WebCore::InlineTextBox::paintTextMatchMarker):
889         (WebCore::InlineTextBox::computeRectForReplacementMarker):
890         * rendering/svg/SVGInlineFlowBox.cpp:
891         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
892
893 2015-08-17  Timothy Horton  <timothy_horton@apple.com>
894
895         Adopt shrink-wrapping for TextIndicators on Mac
896         https://bugs.webkit.org/show_bug.cgi?id=148064
897
898         Reviewed by Beth Dakin.
899
900         Instead of indicating the bounding rect when there are multiple text rects,
901         use shrink-wrapping for TextIndicatorWindow (on Mac), like we do on iOS.
902
903         * bindings/objc/DOM.mm:
904         (-[DOMNode getPreviewSnapshotImage:andRects:]):
905         Make getPreviewSnapshotImage use the same options that iOS WebKit2 uses.
906         This fixes a regression from r188420 where iOS WebKit1 TextIndicators lost
907         all of the relevant (previously hardcoded inside TextIndicator) options.
908
909         * page/TextIndicator.cpp:
910         (WebCore::TextIndicator::createWithRange):
911         (WebCore::TextIndicator::createWithSelectionInFrame):
912         (WebCore::initializeIndicator):
913         Don't keep indicatesCurrentSelection in TextIndicatorData. Instead,
914         just pass it through to initializeIndicator. Add a flag which stops us
915         from zeroing out the margin if indicatesCurrentSelection is true.
916         Move default margins into TextIndicator so they can be applied to the stored rects
917         just like on iOS, instead of trying to apply them later like we used to on Mac.
918
919         * page/TextIndicator.h:
920         (WebCore::TextIndicator::indicatesCurrentSelection): Deleted.
921         * page/mac/TextIndicatorWindow.h:
922         * page/mac/TextIndicatorWindow.mm:
923         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
924         (WebCore::TextIndicatorWindow::setTextIndicator):
925         (outsetIndicatorRectIncludingShadow): Deleted.
926         (textIndicatorsForTextRectsOverlap): Deleted.
927         Make use of pathsWithShrinkWrappedRects for TextIndicatorWindow, instead
928         of just smushing all intersecting rects together. Use the computed path
929         for the shadows and to mask the yellow highlight and snapshot layer.
930
931         * platform/graphics/PathUtilities.cpp:
932         (WebCore::PathUtilities::pathsWithShrinkWrappedRects):
933         (WebCore::PathUtilities::pathWithShrinkWrappedRects):
934         * platform/graphics/PathUtilities.h:
935         Make it possible to retrieve each non-intersecting path individually, instead
936         of just a single giant Path, so that TextIndicatorWindow can make separate
937         layers for each one (so they can bounce separately).
938
939 2015-08-17  Simon Fraser  <simon.fraser@apple.com>
940
941         Remove some includes from Node.cpp
942         https://bugs.webkit.org/show_bug.cgi?id=148000
943
944         Reviewed by Anders Carlsson.
945
946         No need for these includes.
947
948         * dom/Node.cpp:
949
950 2015-08-17  Chris Dumez  <cdumez@apple.com>
951
952         Accessing HTMLCollection.length is slow
953         https://bugs.webkit.org/show_bug.cgi?id=148039
954
955         Reviewed by Ryosuke Niwa.
956
957         Accessing was HTMLCollection.length is slow, much slower than accessing
958         NodeList.length. The reason is that HTMLCollection's bindings code is
959         slightly different. In particular, HTMLCollection's GetOwnPropertySlot()
960         has an extra check to see if the PropertyName is available on the
961         prototype before doing:
962         1. Check static properties (getStaticValueSlotEntryWithoutCaching())
963         2. Indexed getter
964         3. Named getter
965         4. Check own properties (getStaticValueSlot())
966
967         This means that everytime the JavaScript was accessing HTMLCollection.length
968         or HTMLCollection[index], we would check if length / index was present on the
969         prototype before calling HTMLCollection::length() / HTMLCollection::item(i).
970         The prototype check is fairly expensive and was making traversing an
971         HTMLCollection much slower than traversing a NodeList.
972
973         In this patch, I refactored GetOwnPropertySlot() to do:
974         1. Indexed getter
975         2. Check static properties
976         3. Prototype check
977         4. Named getter
978         5. Check own properties
979
980         This way, the prototype check is no longer slowing down HTMLCollection
981         traversal. What matters is that we do the prototype check *before* calling
982         the named getter as we don't want named properties to mask properties on
983         the prototype.
984
985         Note that this patch takes the minimal approach to get the performance win
986         while limiting the risk of breakage. Indeed, the current behavior still
987         does not match the WebIDL specification, which seems to indicate the order
988         should be:
989         1. Indexed getter
990         2. Check static / own properties
991         3. Prototype check
992         4. Named getter
993
994         Once we match the specification, I believe we will be able to drop the
995         JSC::HasImpureGetOwnPropertySlot flag on HTMLCollection, which currently
996         makes HTMLCollection.length not cacheable. Right now, I believe we still
997         need this flag because named properties can still mask own properties.
998
999         Performance:
1000         /Bindings/childNodes-traversal: 5597.54 +/- 0.7% -> 5572.10 +/- 0.4%
1001         /Bindings/children-traversal: 3852.61 +/- 0.3% -> 4731.03 +/- 0.3% (~23% better)
1002
1003         Test: fast/dom/htmlcollection-getownproperty.html
1004
1005         * bindings/scripts/CodeGeneratorJS.pm:
1006         (GenerateGetOwnPropertySlotBody):
1007         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
1008         (WebCore::JSTestEventTarget::getOwnPropertySlot):
1009
1010 2015-08-17  Jinyoung Hur  <hur.ims@navercorp.com>
1011
1012         Fix possible EGL and GLX makeCurrent problem of GLPlatformContext and GLPlatformSurface
1013         https://bugs.webkit.org/show_bug.cgi?id=147695
1014
1015         Reviewed by Gyuyoung Kim.
1016
1017         GLPLatformContext::makeCurrent is implemented to do no-op when it thinks, comparing with a static
1018         variable declared in GLPlatformContext.cpp, there is no changes. This can lead to not-working 
1019         makeCurrent when other part of codes, e.g., Cairo-gl, change EGL or GLX current context by calling
1020         something like eglMakeCurrent. So modify GLPLatformContext::makeCurrent to use the return value of
1021         eglGetCurrentContext or glXGetCurrentContext as a comparing target rather than a static variable.
1022         In addition, GLPlatformSurface::isCurrentDrawable is also modified to use eglGetCurrentSurface or
1023         glXGetCurrentDrawable rather than a static variable.
1024
1025         There are no tests because already existing GL tests will verify this change.
1026
1027         * platform/graphics/opengl/GLPlatformContext.cpp:
1028         (WebCore::GLPlatformContext::makeCurrent):
1029         (WebCore::GLPlatformContext::releaseCurrent):
1030         (WebCore::GLCurrentContextWrapper::GLCurrentContextWrapper): Deleted.
1031         (WebCore::GLPlatformContext::~GLPlatformContext): Deleted.
1032         (WebCore::GLPlatformContext::isCurrentContext): Deleted.
1033         (WebCore::GLPlatformContext::getCurrent): Deleted.
1034         * platform/graphics/opengl/GLPlatformContext.h:
1035         * platform/graphics/opengl/GLPlatformSurface.cpp:
1036         (WebCore::GLPlatformSurface::~GLPlatformSurface): Deleted.
1037         (WebCore::GLPlatformSurface::isCurrentDrawable): Deleted.
1038         (WebCore::GLPlatformSurface::onMakeCurrent): Deleted.
1039         (WebCore::GLPlatformSurface::destroy): Deleted.
1040         * platform/graphics/opengl/GLPlatformSurface.h:
1041         * platform/graphics/surfaces/egl/EGLSurface.cpp:
1042         (WebCore::EGLTransportSurface::isCurrentDrawable):
1043         (WebCore::EGLOffScreenSurface::isCurrentDrawable):
1044         * platform/graphics/surfaces/egl/EGLSurface.h:
1045         * platform/graphics/surfaces/glx/GLXSurface.cpp:
1046         (WebCore::GLXTransportSurface::isCurrentContext):
1047         (WebCore::GLXOffScreenSurface::isCurrentContext):
1048         * platform/graphics/surfaces/glx/GLXSurface.h:
1049
1050 2015-08-15  Chris Dumez  <cdumez@apple.com>
1051
1052         Refactor HTMLCollection to be as fast as CachedLiveNodeList
1053         https://bugs.webkit.org/show_bug.cgi?id=147979
1054
1055         Reviewed by Ryosuke Niwa and Antti Koivisto.
1056
1057         Refactor HTMLCollection to be as fast as CachedLiveNodeList. This is in
1058         preparation of having getElementsByTagName*() / getElementsByClassName()
1059         return an HTMLCollection instead of a NodeList, as per the
1060         specification. Chrome and Firefox already match the specification in
1061         this case.
1062
1063         Traversing an HTMLCollection was slow because of all the extra
1064         branching it had compared to CachedLiveNodeList. To address the issue,
1065         this patch introduces a new templated CachedHTMLCollection subclass,
1066         which behaves in a similar way as CachedLiveNodeList. The 2 template
1067         parameters are:
1068         1. The type of the subclass of CachedHTMLCollection, so we can call
1069            elementMatches() directly on the subclass, without needed any
1070            virtual function call or switch statement. This is the same approach
1071            as in CachedLiveNodeList.
1072         2. The type of tree traversal used (Descendants, ChildrenOnly,
1073            CustomForwardOnly). Unlike LiveNodeList, HTMLCollection needs to
1074            support these 3 types of tree traversal. These were causing extra
1075            branching for every item() call. We are now able to choose the right
1076            type of traversal for the CachedHTMLCollection at compile time.
1077
1078         * WebCore.xcodeproj/project.pbxproj:
1079         Add new files to the Project.
1080
1081         * dom/ContainerNode.cpp:
1082         (WebCore::ContainerNode::children):
1083         (WebCore::ContainerNode::cachedHTMLCollection): Deleted.
1084         * dom/ContainerNode.h:
1085         Drop ContainerNode::ensureCachedHTMLCollection() and use
1086         NodeListsNodeData::addCachedCollection() directly at call sites
1087         instead. We need access to the CollectionType at build-time so
1088         we can resolve the CollectionTraversalType parameter for the
1089         GenericCachedHTMLCollection using CollectionTypeTraits.
1090
1091         * dom/Document.cpp:
1092         * dom/Document.h:
1093         Update ensureCachedCollection() so the CollectionType is now a template
1094         parameter instead of a method argument. We need to know the
1095         CollectionType at build time to construct the GenericCachedHTMLCollection.
1096
1097         * dom/ElementChildIterator.h:
1098         (WebCore::ElementChildIterator<ElementType>::operator):
1099         (WebCore::ElementChildConstIterator<ElementType>::operator):
1100         Add support for decrementing an ElementChildIterator, for consistency
1101         with ElementDescendantIterator. We need this to support backward
1102         traversal in CachedHTMLCollections that use the 'ChildrenOnly' type
1103         of traversal.
1104
1105         * dom/LiveNodeList.h:
1106         (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
1107         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
1108         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
1109         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
1110         Move traversal implementation to CollectionTraversal.h, so it can be
1111         shared with achedHTMLCollection.h.
1112
1113         * html/CachedHTMLCollection.h: Added.
1114         (WebCore::traversalType>::CachedHTMLCollection):
1115         (WebCore::traversalType>::~CachedHTMLCollection):
1116         (WebCore::traversalType>::CachedHTMLCollection::memoryCost):
1117         (WebCore::traversalType>::collectionCanTraverseBackward):
1118         (WebCore::traversalType>::collectionTraverseForward):
1119         (WebCore::traversalType>::collectionTraverseBackward):
1120         (WebCore::traversalType>::willValidateIndexCache):
1121         (WebCore::traversalType>::length):
1122         (WebCore::traversalType>::item):
1123         (WebCore::traversalType>::invalidateCache):
1124         (WebCore::traversalType>::elementMatches):
1125         (WebCore::nameShouldBeVisibleInDocumentAll):
1126         (WebCore::traversalType>::namedItem):
1127
1128         * html/CollectionTraversal.h: Added.
1129         Add new template class that provide the collection traversal code
1130         needed by CollectionIndexCache. It has template specializations for
1131         all 3 types of traversal: Descendants, ChildrenOnly, and
1132         CustomForwardOnly.
1133
1134         * html/CollectionType.h:
1135         Add CollectionTypeTraits traits so we can resolve the
1136         CollectionTraversalType used by a specific CollectionType at
1137         compile-time. This is needed for the second template parameter of
1138         CachedHTMLCollection.
1139
1140         * html/GenericCachedHTMLCollection.cpp: Added.
1141         (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
1142         * html/GenericCachedHTMLCollection.h: Added.
1143         Add CachedHTMLCollection subclass is the generic one used for all
1144         CollectionTypes that do not have their own subclass (e.g. NodeChildren).
1145         This has an elementMatches() method with a switch() statement handling
1146         all these CollectionTypes. Those are not normally not performance
1147         sensitive.
1148
1149         * html/HTMLAllCollection.cpp:
1150         (WebCore::HTMLAllCollection::HTMLAllCollection):
1151         * html/HTMLAllCollection.h:
1152         Subclass CachedHTMLCollection instead of HTMLCollection. Also provide
1153         an elementMatches() method that simply returns true as we want to
1154         match all elements.
1155
1156         * html/HTMLCollection.cpp:
1157         (WebCore::HTMLCollection::HTMLCollection):
1158         Move CollectionIndexCache member to the subclass and drop the 2 other
1159         members as they are replaced with the CollectionTraversalType template
1160         parameter of CachedHTMLCollection.
1161
1162         (WebCore::HTMLCollection::~HTMLCollection):
1163         Move Document::unregisterCollection() call to ~CachedHTMLCollection()
1164         as we needed to check if the CollectionIndexCache was valid first.
1165
1166         (WebCore::HTMLCollection::updateNamedElementCache):
1167         Move part of the implementation to the CachedHTMLCollection subclass
1168         as it needs to know about the type of traversal and it needs to be
1169         able to call elementMatches().
1170
1171         * html/HTMLCollection.h:
1172         (WebCore::HTMLCollection::rootNode):
1173         Inline for performance reasons and consistency with CachedLiveNodeList.
1174
1175         (WebCore::HTMLCollection::memoryCost):
1176         Make virtual and move part of the implementation to the
1177         CachedHTMLCollection subclass to compute the cost of the
1178         CollectionIndexCache.
1179
1180         (WebCore::HTMLCollection::invalidateCache):
1181         Move part of the implementation to the subclass to invalidate the
1182         CollectionIndexCache.
1183
1184         * html/HTMLFieldSetElement.cpp:
1185         (WebCore::HTMLFieldSetElement::elements):
1186
1187         * html/HTMLFormControlsCollection.cpp:
1188         * html/HTMLFormControlsCollection.h:
1189         Subclass CachedHTMLCollection instead of HTMLCollection.
1190         customElementAfter() no longer needs to be virtual as it
1191         is called directly by CachedHTMLCollection on the subclass.
1192
1193         * html/HTMLFormElement.cpp:
1194         (WebCore::HTMLFormElement::elements):
1195         * html/HTMLMapElement.cpp:
1196         (WebCore::HTMLMapElement::areas):
1197         Call NodeListsNodeData::addCachedCollection() directly.
1198
1199         * html/HTMLNameCollection.cpp:
1200         * html/HTMLNameCollection.h:
1201         Subclass CachedHTMLCollection instead of HTMLCollection.
1202
1203         * html/HTMLOptionsCollection.cpp:
1204         * html/HTMLOptionsCollection.h:
1205         Subclass CachedHTMLCollection instead of HTMLCollection.
1206
1207         * html/HTMLSelectElement.cpp:
1208         (WebCore::HTMLSelectElement::selectedOptions):
1209         (WebCore::HTMLSelectElement::options):
1210         * html/HTMLTableElement.cpp:
1211         (WebCore::HTMLTableElement::rows):
1212         (WebCore::HTMLTableElement::tBodies):
1213         * html/HTMLTableRowElement.cpp:
1214         (WebCore::HTMLTableRowElement::cells):
1215         Call NodeListsNodeData::addCachedCollection() directly.
1216
1217         * html/HTMLTableRowsCollection.cpp:
1218         * html/HTMLTableRowsCollection.h:
1219         Subclass CachedHTMLCollection instead of HTMLCollection.
1220         customElementAfter() no longer needs to be virtual as it
1221         is called directly by CachedHTMLCollection on the subclass.
1222
1223         * html/HTMLTableSectionElement.cpp:
1224         (WebCore::HTMLTableSectionElement::rows):
1225         Call NodeListsNodeData::addCachedCollection() directly.
1226
1227 2015-08-15  Timothy Horton  <timothy_horton@apple.com>
1228
1229         REGRESSION (r168327): ImageDocuments with margins zoom to the wrong position when clicked
1230         https://bugs.webkit.org/show_bug.cgi?id=148063
1231
1232         Reviewed by Simon Fraser.
1233
1234         No new test because it doesn't seem possible to click on a window.open'd ImageDocument.
1235
1236         * html/ImageDocument.cpp:
1237         (WebCore::ImageEventListener::handleEvent):
1238         Use <img>-relative coordinates, not document-relative coordinates,
1239         because after r168327, the image can be centered.
1240
1241 2015-08-15  Simon Fraser  <simon.fraser@apple.com>
1242
1243         Have will-change create stacking context when necessary
1244         https://bugs.webkit.org/show_bug.cgi?id=148060
1245
1246         Reviewed by Zalan Bujtas.
1247         
1248         If will-change includes a property whose non-initial value can create
1249         stacking context, create stacking context for that element.
1250
1251         Test: fast/css/will-change/will-change-creates-stacking-context.html
1252
1253         * css/StyleResolver.cpp:
1254         (WebCore::StyleResolver::adjustRenderStyle):
1255         * rendering/style/RenderStyle.h: Add willChangeCreatesStackingContext(),
1256         which on most cases is a fast, inlined 'return false'. Otherwise ask
1257         the WillChangeData.
1258         * rendering/style/WillChangeData.cpp:
1259         (WebCore::propertyCreatesStackingContext):
1260         (WebCore::WillChangeData::createsStackingContext):
1261         * rendering/style/WillChangeData.h:
1262
1263 2015-08-15  Commit Queue  <commit-queue@webkit.org>
1264
1265         Unreviewed, rolling out r188508.
1266         https://bugs.webkit.org/show_bug.cgi?id=148058
1267
1268         Caused 10 tests to crash (Requested by smfr on #webkit).
1269
1270         Reverted changeset:
1271
1272         "Refactor HTMLCollection to be as fast as CachedLiveNodeList"
1273         https://bugs.webkit.org/show_bug.cgi?id=147979
1274         http://trac.webkit.org/changeset/188508
1275
1276 2015-08-14  Simon Fraser  <simon.fraser@apple.com>
1277
1278         Implement parsing for CSS will-change
1279         https://bugs.webkit.org/show_bug.cgi?id=148052
1280
1281         Reviewed by Dean Jackson.
1282         
1283         Syntax is
1284             will-change: auto | <animateable-feature>#
1285         where
1286             <animateable-feature> = scroll-position | contents | <custom-ident>
1287             
1288         To support this, add WillChangeData which stores a vector of "feature"
1289         and CSS property squished into 16 bits. This is stored in rareNonInheritedData.
1290         If null or an empty list, the property value is 'auto'. The list preserves
1291         unknown properties.
1292
1293         Test: fast/css/will-change-parsing.html
1294
1295         * CMakeLists.txt:
1296         * WebCore.vcxproj/WebCore.vcxproj:
1297         * WebCore.vcxproj/WebCore.vcxproj.filters:
1298         * WebCore.xcodeproj/project.pbxproj:
1299         * css/CSSComputedStyleDeclaration.cpp:
1300         (WebCore::getWillChangePropertyValue):
1301         (WebCore::ComputedStyleExtractor::propertyValue):
1302         * css/CSSParser.cpp:
1303         (WebCore::CSSParser::parseValue):
1304         (WebCore::isValidGridPositionCustomIdent): Renamed from isValidCustomIdent(),
1305         since it's grid-specific.
1306         (WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition):
1307         (WebCore::valueIsCSSKeyword): Returns true for the "CSS-wide" keywords like
1308         "initial", "inherit" and "default".
1309         (WebCore::CSSParser::parseFontFamily):
1310         (WebCore::isValidWillChangeAnimatableFeature):
1311         (WebCore::CSSParser::parseWillChange):
1312         (WebCore::isValidCustomIdent): Deleted.
1313         * css/CSSParser.h:
1314         * css/CSSPrimitiveValue.h:
1315         (WebCore::CSSPrimitiveValue::isPropertyID): New utility function.
1316         * css/CSSPropertyNames.in:
1317         * css/CSSValueKeywords.in:
1318         * css/StyleBuilderCustom.h:
1319         (WebCore::StyleBuilderCustom::applyValueWillChange):
1320         * rendering/style/RenderStyle.cpp:
1321         (WebCore::RenderStyle::setWillChange):
1322         * rendering/style/RenderStyle.h:
1323         * rendering/style/StyleAllInOne.cpp:
1324         * rendering/style/StyleRareNonInheritedData.cpp:
1325         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1326         (WebCore::StyleRareNonInheritedData::operator==):
1327         (WebCore::StyleRareNonInheritedData::willChangeDataEquivalent):
1328         * rendering/style/StyleRareNonInheritedData.h:
1329         * rendering/style/WillChangeData.cpp: Added.
1330         (WebCore::WillChangeData::operator==):
1331         (WebCore::WillChangeData::containsScrollPosition):
1332         (WebCore::WillChangeData::containsContents):
1333         (WebCore::WillChangeData::containsProperty):
1334         (WebCore::WillChangeData::addFeature):
1335         (WebCore::WillChangeData::featureAt):
1336         * rendering/style/WillChangeData.h: Added.
1337         (WebCore::WillChangeData::create):
1338         (WebCore::WillChangeData::operator!=):
1339         (WebCore::WillChangeData::isAuto):
1340         (WebCore::WillChangeData::numFeatures):
1341         (WebCore::WillChangeData::WillChangeData):
1342         (WebCore::WillChangeData::AnimatableFeature::feature):
1343         (WebCore::WillChangeData::AnimatableFeature::property):
1344         (WebCore::WillChangeData::AnimatableFeature::featurePropertyPair):
1345         (WebCore::WillChangeData::AnimatableFeature::AnimatableFeature):
1346         (WebCore::WillChangeData::AnimatableFeature::operator==):
1347
1348 2015-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
1349
1350         Build fix after r188510
1351
1352         * platform/mac/ThemeMac.mm:
1353         (WebCore::paintToggleButton): Pass a raw pointer to drawCellOrFocusRingWithViewIntoContext.
1354
1355 2015-08-15  Wenson Hsieh  <wenson_hsieh@apple.com>
1356
1357         Search fields should scale when rendering while zoomed
1358         https://bugs.webkit.org/show_bug.cgi?id=147867
1359
1360         Reviewed by Daniel Bates.
1361
1362         When rendering zoomed search fields, draw to an image buffer instead of drawing directly into the context. This
1363         allows us to scale the image buffer up before rendering. Also refactors common logic used to draw both selects
1364         (paintMenuList) and search fields into the new private method paintCellAndSetFocusedElementNeedsRepaintIfNecessary.
1365
1366         * rendering/RenderThemeMac.h: Changed drawCellOrFocusRingWithViewIntoContext to take a raw pointer.
1367         * rendering/RenderThemeMac.mm:
1368         (WebCore::paintToggleButton): Passes a raw pointer to drawCellOrFocusRingWithViewIntoContext.
1369         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Changed to take a raw pointer.
1370         * rendering/RenderThemeMac.h:
1371         * rendering/RenderThemeMac.mm:
1372         (WebCore::RenderThemeMac::paintMenuList): Refactored to use paintCellAndSetFocusedElementNeedsRepaintIfNecessary.
1373         (WebCore::RenderThemeMac::paintCellAndSetFocusedElementNeedsRepaintIfNecessary): Contains logic common to painting
1374             both selects and search fields.
1375         (WebCore::RenderThemeMac::paintSearchField): Use ThemeMac::drawCellOrFocusRingWithViewIntoContext
1376             to render search fields, utilizing an offscreen image buffer only when necessary.
1377
1378 2015-08-14  Chris Dumez  <cdumez@apple.com>
1379
1380         Refactor HTMLCollection to be as fast as CachedLiveNodeList
1381         https://bugs.webkit.org/show_bug.cgi?id=147979
1382
1383         Reviewed by Ryosuke Niwa.
1384
1385         Refactor HTMLCollection to be as fast as CachedLiveNodeList. This is in
1386         preparation of having getElementsByTagName*() / getElementsByClassName()
1387         return an HTMLCollection instead of a NodeList, as per the
1388         specification. Chrome and Firefox already match the specification in
1389         this case.
1390
1391         Traversing an HTMLCollection was slow because of all the extra
1392         branching it had compared to CachedLiveNodeList. To address the issue,
1393         this patch introduces a new templated CachedHTMLCollection subclass,
1394         which behaves in a similar way as CachedLiveNodeList. The 2 template
1395         parameters are:
1396         1. The type of the subclass of CachedHTMLCollection, so we can call
1397            elementMatches() directly on the subclass, without needed any
1398            virtual function call or switch statement. This is the same approach
1399            as in CachedLiveNodeList.
1400         2. The type of tree traversal used (Descendants, ChildrenOnly,
1401            CustomForwardOnly). Unlike LiveNodeList, HTMLCollection needs to
1402            support these 3 types of tree traversal. These were causing extra
1403            branching for every item() call. We are now able to choose the right
1404            type of traversal for the CachedHTMLCollection at compile time.
1405
1406         * WebCore.xcodeproj/project.pbxproj:
1407         Add new files to the Project.
1408
1409         * dom/ContainerNode.cpp:
1410         (WebCore::ContainerNode::children):
1411         (WebCore::ContainerNode::cachedHTMLCollection): Deleted.
1412         * dom/ContainerNode.h:
1413         Drop ContainerNode::ensureCachedHTMLCollection() and use
1414         NodeListsNodeData::addCachedCollection() directly at call sites
1415         instead. We need access to the CollectionType at build-time so
1416         we can resolve the CollectionTraversalType parameter for the
1417         GenericCachedHTMLCollection using CollectionTypeTraits.
1418
1419         * dom/Document.cpp:
1420         * dom/Document.h:
1421         Update ensureCachedCollection() so the CollectionType is now a template
1422         parameter instead of a method argument. We need to know the
1423         CollectionType at build time to construct the GenericCachedHTMLCollection.
1424
1425         * dom/ElementChildIterator.h:
1426         (WebCore::ElementChildIterator<ElementType>::operator):
1427         (WebCore::ElementChildConstIterator<ElementType>::operator):
1428         Add support for decrementing an ElementChildIterator, for consistency
1429         with ElementDescendantIterator. We need this to support backward
1430         traversal in CachedHTMLCollections that use the 'ChildrenOnly' type
1431         of traversal.
1432
1433         * dom/LiveNodeList.h:
1434         (WebCore::CachedLiveNodeList<NodeListType>::collectionBegin):
1435         (WebCore::CachedLiveNodeList<NodeListType>::collectionLast):
1436         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseForward):
1437         (WebCore::CachedLiveNodeList<NodeListType>::collectionTraverseBackward):
1438         Move traversal implementation to CollectionTraversal.h, so it can be
1439         shared with achedHTMLCollection.h.
1440
1441         * html/CachedHTMLCollection.h: Added.
1442         (WebCore::traversalType>::CachedHTMLCollection):
1443         (WebCore::traversalType>::~CachedHTMLCollection):
1444         (WebCore::traversalType>::CachedHTMLCollection::memoryCost):
1445         (WebCore::traversalType>::collectionCanTraverseBackward):
1446         (WebCore::traversalType>::collectionTraverseForward):
1447         (WebCore::traversalType>::collectionTraverseBackward):
1448         (WebCore::traversalType>::willValidateIndexCache):
1449         (WebCore::traversalType>::length):
1450         (WebCore::traversalType>::item):
1451         (WebCore::traversalType>::invalidateCache):
1452         (WebCore::traversalType>::elementMatches):
1453         (WebCore::nameShouldBeVisibleInDocumentAll):
1454         (WebCore::traversalType>::namedItem):
1455
1456         * html/CollectionTraversal.h: Added.
1457         Add new template class that provide the collection traversal code
1458         needed by CollectionIndexCache. It has template specializations for
1459         all 3 types of traversal: Descendants, ChildrenOnly, and
1460         CustomForwardOnly.
1461
1462         * html/CollectionType.h:
1463         Add CollectionTypeTraits traits so we can resolve the
1464         CollectionTraversalType used by a specific CollectionType at
1465         compile-time. This is needed for the second template parameter of
1466         CachedHTMLCollection.
1467
1468         * html/GenericCachedHTMLCollection.cpp: Added.
1469         (WebCore::GenericCachedHTMLCollection<traversalType>::elementMatches):
1470         * html/GenericCachedHTMLCollection.h: Added.
1471         Add CachedHTMLCollection subclass is the generic one used for all
1472         CollectionTypes that do not have their own subclass (e.g. NodeChildren).
1473         This has an elementMatches() method with a switch() statement handling
1474         all these CollectionTypes. Those are not normally not performance
1475         sensitive.
1476
1477         * html/HTMLAllCollection.cpp:
1478         (WebCore::HTMLAllCollection::HTMLAllCollection):
1479         * html/HTMLAllCollection.h:
1480         Subclass CachedHTMLCollection instead of HTMLCollection. Also provide
1481         an elementMatches() method that simply returns true as we want to
1482         match all elements.
1483
1484         * html/HTMLCollection.cpp:
1485         (WebCore::HTMLCollection::HTMLCollection):
1486         Move CollectionIndexCache member to the subclass and drop the 2 other
1487         members as they are replaced with the CollectionTraversalType template
1488         parameter of CachedHTMLCollection.
1489
1490         (WebCore::HTMLCollection::~HTMLCollection):
1491         Move Document::unregisterCollection() call to ~CachedHTMLCollection()
1492         as we needed to check if the CollectionIndexCache was valid first.
1493
1494         (WebCore::HTMLCollection::updateNamedElementCache):
1495         Move part of the implementation to the CachedHTMLCollection subclass
1496         as it needs to know about the type of traversal and it needs to be
1497         able to call elementMatches().
1498
1499         * html/HTMLCollection.h:
1500         (WebCore::HTMLCollection::rootNode):
1501         Inline for performance reasons and consistency with CachedLiveNodeList.
1502
1503         (WebCore::HTMLCollection::memoryCost):
1504         Make virtual and move part of the implementation to the
1505         CachedHTMLCollection subclass to compute the cost of the
1506         CollectionIndexCache.
1507
1508         (WebCore::HTMLCollection::invalidateCache):
1509         Move part of the implementation to the subclass to invalidate the
1510         CollectionIndexCache.
1511
1512         * html/HTMLFieldSetElement.cpp:
1513         (WebCore::HTMLFieldSetElement::elements):
1514
1515         * html/HTMLFormControlsCollection.cpp:
1516         * html/HTMLFormControlsCollection.h:
1517         Subclass CachedHTMLCollection instead of HTMLCollection.
1518         customElementAfter() no longer needs to be virtual as it
1519         is called directly by CachedHTMLCollection on the subclass.
1520
1521         * html/HTMLFormElement.cpp:
1522         (WebCore::HTMLFormElement::elements):
1523         * html/HTMLMapElement.cpp:
1524         (WebCore::HTMLMapElement::areas):
1525         Call NodeListsNodeData::addCachedCollection() directly.
1526
1527         * html/HTMLNameCollection.cpp:
1528         * html/HTMLNameCollection.h:
1529         Subclass CachedHTMLCollection instead of HTMLCollection.
1530
1531         * html/HTMLOptionsCollection.cpp:
1532         * html/HTMLOptionsCollection.h:
1533         Subclass CachedHTMLCollection instead of HTMLCollection.
1534
1535         * html/HTMLSelectElement.cpp:
1536         (WebCore::HTMLSelectElement::selectedOptions):
1537         (WebCore::HTMLSelectElement::options):
1538         * html/HTMLTableElement.cpp:
1539         (WebCore::HTMLTableElement::rows):
1540         (WebCore::HTMLTableElement::tBodies):
1541         * html/HTMLTableRowElement.cpp:
1542         (WebCore::HTMLTableRowElement::cells):
1543         Call NodeListsNodeData::addCachedCollection() directly.
1544
1545         * html/HTMLTableRowsCollection.cpp:
1546         * html/HTMLTableRowsCollection.h:
1547         Subclass CachedHTMLCollection instead of HTMLCollection.
1548         customElementAfter() no longer needs to be virtual as it
1549         is called directly by CachedHTMLCollection on the subclass.
1550
1551         * html/HTMLTableSectionElement.cpp:
1552         (WebCore::HTMLTableSectionElement::rows):
1553         Call NodeListsNodeData::addCachedCollection() directly.
1554
1555 2015-08-14  Matthew Daiter  <mdaiter@apple.com>
1556
1557         Implementing enumerateDevices
1558         https://bugs.webkit.org/show_bug.cgi?id=146426
1559         <rdar://problem/21599847>
1560
1561         Reviewed by Eric Carlson.
1562
1563         * CMakeLists.txt:
1564         * Modules/mediastream/MediaDeviceInfo.idl:
1565         * Modules/mediastream/UserMediaRequest.cpp:
1566         (WebCore::UserMediaRequest::enumerateDevices):
1567         * WebCore.xcodeproj/project.pbxproj:
1568         * platform/mediastream/MediaDevicesPrivate.cpp:
1569         (WebCore::MediaDevicesPrivate::create):
1570         (WebCore::MediaDevicesPrivate::MediaDevicesPrivate):
1571         (WebCore::MediaDevicesPrivate::didCompleteRequest):
1572         (WebCore::MediaDevicesPrivate::availableMediaDevices):
1573         * platform/mediastream/MediaDevicesPrivate.h:
1574         (WebCore::MediaDevicesPrivate::~MediaDevicesPrivate):
1575         (WebCore::MediaDevicesPrivate::capturedDevices):
1576
1577 2015-08-13  Andy Estes  <aestes@apple.com>
1578
1579         [Cocoa] Downloads do not start if policy decision is made asynchronously
1580         https://bugs.webkit.org/show_bug.cgi?id=147985
1581
1582         Reviewed by Brady Eidson.
1583
1584         It's only possible to convert a NSURLConnection to a download while the connection delegate's
1585         -connection:didReceiveResponse: is being called. However, WebKit clients can decide content policy
1586         asynchronously. If a client chooses to download a response asynchronously, we can no longer convert the
1587         connection to a download, so we should start a new download instead.
1588
1589         New API test: _WKDownload.AsynchronousDownloadPolicy
1590
1591         * dom/Document.cpp: Updated to include SubresourceLoader.h.
1592         * loader/DocumentLoader.cpp:
1593         (WebCore::DocumentLoader::mainResourceLoader): Updated to return a SubresourceLoader.
1594         (WebCore::DocumentLoader::continueAfterContentPolicy): Cast mainResourceLoader() to a ResourceLoader since
1595         didFail() is private in SubresourceLoader.
1596         * loader/DocumentLoader.h:
1597         * loader/SubresourceLoader.cpp:
1598         (WebCore::SubresourceLoader::SubresourceLoader): Initialized m_callingDidReceiveResponse to false.
1599         (WebCore::SubresourceLoader::didReceiveResponse): Used TemporaryChange<> to set m_callingDidReceiveResponse to true.
1600         * loader/SubresourceLoader.h:
1601         * loader/appcache/ApplicationCacheHost.cpp: Updated to include SubresourceLoader.h.
1602         * loader/mac/DocumentLoaderMac.cpp: Ditto.
1603
1604 2015-08-14  Zalan Bujtas  <zalan@apple.com>
1605
1606         RenderBlock::simplifiedLayout should pop LayoutStateMaintainer when early returns.
1607         https://bugs.webkit.org/show_bug.cgi?id=148031
1608
1609         Reviewed by Simon Fraser.
1610
1611         LayoutStateMaintainer push/pop calls need to be balanced to ensure layout consistency.
1612
1613         Unable to make a test case for this.
1614
1615         * rendering/RenderBlock.cpp:
1616         (WebCore::RenderBlock::simplifiedLayout):
1617         * rendering/RenderView.h:
1618         (WebCore::LayoutStateMaintainer::~LayoutStateMaintainer): ASSERT the state properly.
1619         (WebCore::LayoutStateMaintainer::push):
1620         (WebCore::LayoutStateMaintainer::pop):
1621         (WebCore::LayoutStateMaintainer::didPush):
1622         (WebCore::LayoutStateMaintainer::LayoutStateMaintainer): Deleted.
1623
1624 2015-08-14  Simon Fraser  <simon.fraser@apple.com>
1625
1626         Remove a few includes from RenderObject.h
1627         https://bugs.webkit.org/show_bug.cgi?id=148007
1628
1629         Reviewed by Tim Horton.
1630
1631         Shrink down the RenderObject.h includes a little.
1632
1633         * rendering/RenderElement.h:
1634         * rendering/RenderObject.h:
1635         * rendering/RenderText.h:
1636
1637 2015-08-14  Tim Horton  <timothy_horton@apple.com>
1638
1639         Fix the Mavericks build.
1640
1641         * platform/spi/mac/LookupSPI.h:
1642
1643 2015-08-14  Tim Horton  <timothy_horton@apple.com>
1644
1645         Fix the build.
1646
1647         * platform/spi/mac/LookupSPI.h:
1648
1649 2015-08-14  Philippe Normand  <pnormand@igalia.com>
1650
1651         [GStreamer] Handle missing plugins better at runtime
1652         https://bugs.webkit.org/show_bug.cgi?id=146999
1653
1654         Reviewed by Carlos Garcia Campos.
1655
1656         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1657         (WebCore::MediaPlayerPrivateGStreamer::createAudioSink): Warn the
1658         user if autoaudiosink wasn't found at runtime. In that case
1659         playbin will try to be smart by itself, hopefully. Also moved a
1660         couple GST_WARNING calls to WARN_MEDIA_MESSAGE.
1661         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): Use
1662         WARN_MEDIA_MESSAGE here as well.
1663
1664 2015-08-13  Antti Koivisto  <antti@apple.com>
1665
1666         Cover memory cache subresource validation policy with cache tests
1667         https://bugs.webkit.org/show_bug.cgi?id=147830
1668
1669         Reviewed by Alexey Proskuryakov.
1670
1671         Existing tests under http/tests/cache/disk-cache currently cover disk and XHR memory cache validation behaviors.
1672         They can be extended to cover the regular subresource policy too.
1673
1674         Add window.internals API to disable CachedRawResource validation behavior. This makes XHR validate like
1675         other resources and allows existing tests (that use XHR) to cover normal subresource policy .
1676
1677         Test results reveal some bugs. For example subresources in memory cache don't respect Vary header.
1678
1679         It is generally bad that we have a separate XHR-and-main-resource validation policy in memory cache. Network cache
1680         doesn't have one.
1681
1682         * loader/FrameLoader.cpp:
1683         (WebCore::FrameLoader::clearTestingOverrides):
1684         (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
1685         * loader/FrameLoader.h:
1686         (WebCore::FrameLoader::setOverrideCachePolicyForTesting):
1687         (WebCore::FrameLoader::setOverrideResourceLoadPriorityForTesting):
1688         (WebCore::FrameLoader::setStrictRawResourceValidationPolicyDisabledForTesting):
1689         (WebCore::FrameLoader::isStrictRawResourceValidationPolicyDisabledForTesting):
1690         (WebCore::FrameLoader::provisionalLoadErrorBeingHandledURL):
1691         * loader/cache/CachedRawResource.h:
1692         * loader/cache/CachedResource.h:
1693         (WebCore::CachedResource::setLoadFinishTime):
1694         (WebCore::CachedResource::loadFinishTime):
1695         (WebCore::CachedResource::canReuse): Deleted.
1696
1697             Made canReuse non-virtual and removed it from the base. Only CachedRawResource has implementation.
1698
1699         * loader/cache/CachedResourceLoader.cpp:
1700         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1701         * testing/Internals.cpp:
1702         (WebCore::Internals::setOverrideResourceLoadPriority):
1703         (WebCore::Internals::setStrictRawResourceValidationPolicyDisabled):
1704         (WebCore::Internals::clearMemoryCache):
1705         * testing/Internals.h:
1706
1707 2015-08-13  Tim Horton  <timothy_horton@apple.com>
1708
1709         Performing a Lookup on wrapped text puts the popover arrow in the wrong place (off to the right)
1710         https://bugs.webkit.org/show_bug.cgi?id=148012
1711         <rdar://problem/19238094>
1712
1713         Reviewed by Simon Fraser.
1714
1715         * platform/spi/mac/LookupSPI.h:
1716         Add some SPI.
1717
1718 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
1719
1720         Another Windows build fix.
1721
1722         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1723
1724 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
1725
1726         Try to fix Windows build after r188430.
1727
1728         * platform/graphics/ca/win/PlatformCALayerWin.h:
1729
1730 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
1731
1732         Generated files don't all need to include ScriptExecutionContext.h
1733         https://bugs.webkit.org/show_bug.cgi?id=148011
1734
1735         Reviewed by Alexey Proskuryakov.
1736         
1737         Generated files which are not callbacks or constructors do not need to include
1738         ScriptExecutionContext.h.
1739
1740         * bindings/scripts/CodeGeneratorJS.pm:
1741         (GenerateImplementation): Deleted.
1742         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
1743         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1744         * bindings/scripts/test/JS/JSTestException.cpp:
1745         * bindings/scripts/test/JS/JSTestInterface.cpp:
1746         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1747         * bindings/scripts/test/JS/JSTestObj.cpp:
1748         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1749         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1750         * bindings/scripts/test/JS/JSattribute.cpp:
1751
1752 2015-08-13  Commit Queue  <commit-queue@webkit.org>
1753
1754         Unreviewed, rolling out r188428.
1755         https://bugs.webkit.org/show_bug.cgi?id=148015
1756
1757         broke cmake build (Requested by alexchristensen on #webkit).
1758
1759         Reverted changeset:
1760
1761         "Move some commands from ./CMakeLists.txt to Source/cmake"
1762         https://bugs.webkit.org/show_bug.cgi?id=148003
1763         http://trac.webkit.org/changeset/188428
1764
1765 2015-08-13  Zalan Bujtas  <zalan@apple.com>
1766
1767         Remove pixelSnapped* functions from RenderBoxModelObject/RenderBox.
1768         https://bugs.webkit.org/show_bug.cgi?id=147982
1769
1770         Reviewed by Simon Fraser.
1771
1772         RenderBoxModelObject/RenderBox::pixelSnapped* functions are misleading.
1773         They all round to integral values, while the rest of the pixel snapping
1774         functions round to device pixels.
1775         This patch moves integral rounding to the callers. (Note that they all will eventually
1776         go away as we convert additional modules to subpixel rendering (tables, scrolling etc).)
1777
1778         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1779         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1780         * dom/Element.cpp:
1781         (WebCore::Element::offsetLeft):
1782         (WebCore::Element::offsetTop):
1783         (WebCore::Element::offsetWidth):
1784         (WebCore::Element::offsetHeight):
1785         (WebCore::Element::clientWidth):
1786         (WebCore::Element::clientHeight):
1787         * dom/Position.cpp:
1788         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
1789         * html/HTMLImageElement.cpp:
1790         (WebCore::HTMLImageElement::width):
1791         (WebCore::HTMLImageElement::height):
1792         * html/shadow/SpinButtonElement.cpp:
1793         (WebCore::SpinButtonElement::defaultEventHandler):
1794         * inspector/InspectorOverlay.cpp:
1795         (WebCore::buildObjectForElementData):
1796         * page/FrameView.cpp:
1797         (WebCore::FrameView::applyPaginationToViewport):
1798         (WebCore::FrameView::calculateScrollbarModesForLayout):
1799         (WebCore::FrameView::calculateExtendedBackgroundMode):
1800         (WebCore::FrameView::qualifiesAsVisuallyNonEmpty):
1801         * page/PrintContext.cpp:
1802         (WebCore::PrintContext::pageNumberForElement):
1803         * platform/graphics/LayoutRect.h:
1804         (WebCore::LayoutRect::pixelSnappedSize): Deleted.
1805         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1806         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
1807         * rendering/RenderBox.cpp:
1808         (WebCore::RenderBox::pixelSnappedClientWidth): Deleted.
1809         (WebCore::RenderBox::pixelSnappedClientHeight): Deleted.
1810         (WebCore::RenderBox::pixelSnappedOffsetWidth): Deleted.
1811         (WebCore::RenderBox::pixelSnappedOffsetHeight): Deleted.
1812         * rendering/RenderBox.h:
1813         (WebCore::RenderBox::pixelSnappedLogicalHeight): Deleted.
1814         (WebCore::RenderBox::pixelSnappedLogicalWidth): Deleted.
1815         (WebCore::RenderBox::pixelSnappedSize): Deleted.
1816         (WebCore::RenderBox::pixelSnappedBorderBoxRect): Deleted.
1817         * rendering/RenderBoxModelObject.cpp:
1818         (WebCore::RenderBoxModelObject::pixelSnappedOffsetWidth): Deleted.
1819         (WebCore::RenderBoxModelObject::pixelSnappedOffsetHeight): Deleted.
1820         * rendering/RenderBoxModelObject.h:
1821         (WebCore::RenderBoxModelObject::pixelSnappedOffsetLeft): Deleted.
1822         (WebCore::RenderBoxModelObject::pixelSnappedOffsetTop): Deleted.
1823         * rendering/RenderFileUploadControl.cpp:
1824         (WebCore::nodeWidth):
1825         (WebCore::nodeHeight):
1826         (WebCore::RenderFileUploadControl::maxFilenameWidth):
1827         * rendering/RenderLayer.cpp:
1828         (WebCore::RenderLayer::updateLayerPosition):
1829         (WebCore::RenderLayer::perspectiveTransform):
1830         (WebCore::RenderLayer::clampScrollOffset):
1831         (WebCore::RenderLayer::visibleSize):
1832         (WebCore::RenderLayer::positionOverflowControls):
1833         (WebCore::RenderLayer::hasHorizontalOverflow):
1834         (WebCore::RenderLayer::hasVerticalOverflow):
1835         (WebCore::RenderLayer::updateScrollbarsAfterLayout):
1836         (WebCore::RenderLayer::overflowControlsIntersectRect):
1837         (WebCore::RenderLayer::isPointInResizeControl):
1838         * rendering/RenderLayerBacking.cpp:
1839         (WebCore::RenderLayerBacking::updateGeometry):
1840         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
1841         (WebCore::RenderLayerBacking::startAnimation):
1842         (WebCore::RenderLayerBacking::startTransition):
1843         * rendering/RenderLayerBacking.h:
1844         * rendering/RenderListBox.cpp:
1845         (WebCore::RenderListBox::scrollWidth):
1846         (WebCore::RenderListBox::scrollHeight):
1847         * rendering/RenderMediaControlElements.cpp:
1848         (WebCore::RenderMediaVolumeSliderContainer::layout):
1849         * rendering/RenderScrollbar.cpp:
1850         (WebCore::RenderScrollbar::buttonRect):
1851         * rendering/RenderTable.cpp:
1852         (WebCore::RenderTable::addOverflowFromChildren):
1853         * rendering/RenderTableCell.cpp:
1854         (WebCore::RenderTableCell::computeIntrinsicPadding):
1855         (WebCore::RenderTableCell::paintCollapsedBorders):
1856         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
1857         (WebCore::RenderTableCell::paintBoxDecorations):
1858         (WebCore::RenderTableCell::paintMask):
1859         * rendering/RenderTableCell.h:
1860         (WebCore::RenderTableCell::logicalHeightForRowSizing):
1861         * rendering/RenderTheme.cpp:
1862         (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
1863         * rendering/RenderTheme.h:
1864         * rendering/RenderThemeMac.mm:
1865         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1866         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
1867         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
1868         * rendering/RenderTreeAsText.cpp:
1869         (WebCore::write):
1870         * rendering/mathml/RenderMathMLFraction.cpp:
1871         (WebCore::RenderMathMLFraction::paint):
1872         * rendering/mathml/RenderMathMLRoot.cpp:
1873         (WebCore::RenderMathMLRoot::paint):
1874         * rendering/svg/RenderSVGRoot.cpp:
1875         (WebCore::RenderSVGRoot::paintReplaced):
1876         (WebCore::RenderSVGRoot::computeFloatRectForRepaint):
1877
1878 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
1879
1880         Minor GraphicsLayer.h/PlatformCALayer.h cleanup
1881         https://bugs.webkit.org/show_bug.cgi?id=148009
1882
1883         Reviewed by Tim Horton.
1884
1885         Remove some #includes.
1886
1887         * platform/graphics/GraphicsLayer.h:
1888         * platform/graphics/ca/PlatformCALayer.h:
1889
1890 2015-08-13  Alex Christensen  <achristensen@webkit.org>
1891
1892         Move some commands from ./CMakeLists.txt to Source/cmake
1893         https://bugs.webkit.org/show_bug.cgi?id=148003
1894
1895         Reviewed by Brent Fulgham.
1896
1897         * CMakeLists.txt:
1898         Added commands needed to build WebCore by itself.
1899
1900 2015-08-13  Tim Horton  <timothy_horton@apple.com>
1901
1902         Refactor and improve TextIndicator to prepare for tests
1903         https://bugs.webkit.org/show_bug.cgi?id=147622
1904
1905         Reviewed by Simon Fraser.
1906
1907         No new tests because they're coming soon!
1908
1909         * page/TextIndicator.cpp:
1910         (WebCore::TextIndicator::TextIndicator):
1911         (WebCore::TextIndicator::~TextIndicator):
1912         (WebCore::TextIndicator::createWithRange):
1913         (WebCore::TextIndicator::createWithSelectionInFrame):
1914         (WebCore::hasNonInlineOrReplacedElements):
1915         (WebCore::snapshotOptionsForTextIndicatorOptions):
1916         (WebCore::takeSnapshot):
1917         (WebCore::takeSnapshots):
1918         (WebCore::initializeIndicator):
1919         (WebCore::snapshotSelectionWithHighlight): Deleted.
1920         (WebCore::TextIndicator::wantsBounce): Deleted.
1921         (WebCore::TextIndicator::wantsContentCrossfade): Deleted.
1922         (WebCore::TextIndicator::wantsFadeIn): Deleted.
1923         (WebCore::TextIndicator::wantsManualAnimation): Deleted.
1924         * page/TextIndicator.h:
1925         (WebCore::TextIndicator::indicatesCurrentSelection):
1926         (WebCore::TextIndicator::setWantsMargin): Deleted.
1927         (WebCore::TextIndicator::wantsMargin): Deleted.
1928         Rename wantsMargin to indicatesCurrentSelection. It's really about whether
1929         the TextIndicator indicates the existing selection, and the Mac presentation
1930         just uses that to determine whether or not to show a margin, but that
1931         margin has nothing to do with the cross-platform TextIndicator code.
1932
1933         Move most of the snapshotting and rect gathering code to initializeTextIndicator, and call it
1934         from both ::createWithRange and ::createWithSelectionInFrame, instead of calling
1935         ::createWithSelectionInFrame from ::createWithRange after setting the selection.
1936         This way, the range passed into ::createWithRange is preserved for use in initializeTextIndicator,
1937         instead of round-tripping through selection code, which can change it (e.g. in the case
1938         of user-select: none; elements).
1939
1940         Add TextIndicatorOptions, which allow callers to adjust the behavior of TextIndicator
1941         instead of having #if PLATFORM(X) strewn throughout TextIndicator.
1942
1943         Add an option which was previously implemented at the iOS-specific callsites,
1944         TextIndicatorOptionUseBoundingRectAndPaintAllContentForComplexRanges,
1945         which falls back to indicating a bounding rect and not doing a range-only paint
1946         if the given range includes any non-inline elements or any replaced elements.
1947         This makes it so that we do something reasonable-looking for very complex ranges,
1948         like article links on the New York Times, which include multiple disparate paragraphs
1949         of text and one or more images, and also so that indicating a range that only
1950         includes an image does something fairly reasonable.
1951
1952         Move presentation-specific functions (wantsBounce, wantsContentCrossfade, etc.)
1953         to TextIndicatorWindow. Ideally TextIndicatorPresentationTransition would also move,
1954         but that is a fairly large and complicated change that should be made separately.
1955
1956         * page/mac/TextIndicatorWindow.h:
1957         * page/mac/TextIndicatorWindow.mm:
1958         (indicatorWantsBounce):
1959         (indicatorWantsContentCrossfade):
1960         (indicatorWantsFadeIn):
1961         (indicatorWantsManualAnimation):
1962         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
1963         (-[WebTextIndicatorView _animationDuration]):
1964         (-[WebTextIndicatorView present]):
1965         (WebCore::TextIndicatorWindow::~TextIndicatorWindow):
1966         (WebCore::TextIndicatorWindow::clearTextIndicator):
1967         (WebCore::TextIndicatorWindow::setTextIndicator):
1968         Rename TextIndicatorDismissalAnimation to TextIndicatorWindowDismissalAnimation,
1969         and TextIndicatorLifetime to TextIndicatorWindowLifetime, because
1970         they are TextIndicatorWindow specific.
1971
1972         * accessibility/AccessibilityRenderObject.cpp:
1973         (WebCore::AccessibilityRenderObject::boundsForVisiblePositionRange):
1974         * bindings/objc/DOM.mm:
1975         (-[DOMNode getPreviewSnapshotImage:andRects:]):
1976         (-[DOMRange boundingBox]):
1977         (-[DOMRange textRects]):
1978         * dom/DocumentMarkerController.cpp:
1979         (WebCore::DocumentMarkerController::addTextMatchMarker):
1980         * dom/Node.cpp:
1981         (WebCore::Node::textRects):
1982         * dom/Range.cpp:
1983         (WebCore::Range::intersectsNode):
1984         (WebCore::Range::absoluteBoundingBox):
1985         (WebCore::Range::absoluteTextRects):
1986         (WebCore::Range::absoluteTextQuads):
1987         (WebCore::Range::getClientRects):
1988         (WebCore::Range::getBoundingClientRect):
1989         (WebCore::Range::getBorderAndTextQuads):
1990         (WebCore::Range::boundingRectInternal):
1991         (WebCore::Range::absoluteBoundingRect):
1992         (WebCore::Range::boundingBox): Deleted.
1993         (WebCore::Range::textRects): Deleted.
1994         (WebCore::Range::textQuads): Deleted.
1995         (WebCore::Range::boundingRect): Deleted.
1996         * dom/Range.h:
1997         * editing/AlternativeTextController.cpp:
1998         (WebCore::AlternativeTextController::rootViewRectForRange):
1999         * editing/Editor.cpp:
2000         (WebCore::Editor::findStringAndScrollToVisible):
2001         * editing/FrameSelection.cpp:
2002         (WebCore::FrameSelection::getClippedVisibleTextRectangles):
2003         * editing/mac/DataDetection.mm:
2004         (WebCore::DataDetection::detectItemAroundHitTestResult):
2005         * rendering/RenderObject.cpp:
2006         (WebCore::RenderObject::absoluteBoundingBoxRectForRange):
2007         Rename various Range methods to make it clear whether they return absolute or client rects.
2008
2009 2015-08-13  Jer Noble  <jer.noble@apple.com>
2010
2011         Don't short circuit seeking
2012         https://bugs.webkit.org/show_bug.cgi?id=147892
2013
2014         Reviewed by Eric Carlson.
2015
2016         When two seekWithTolerance() requests come in before the first is acted upon in seekTask(),
2017         the second will result in a "no seek required" conditional, because the new "currentTime" is
2018         assumed to be the destination time of the first seek.
2019
2020         When cancelling a pending seek, first replace the "now" value with the "now" value from the
2021         replaced seek, thus preserving the original currentTime across all replacement seeks.
2022
2023         Drive-by fix: some added logging causes occasional crashes, due to the underlying object being
2024         accessed having been deleted.
2025
2026         * html/HTMLMediaElement.cpp:
2027         (WebCore::HTMLMediaElement::seekWithTolerance):
2028         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2029         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime):
2030
2031 2015-08-13  Brent Fulgham  <bfulgham@apple.com>
2032
2033         Prospective Mac/iOS build fix after the last Windows build fix.
2034
2035         * page/CaptionUserPreferences.cpp:
2036         * page/UserContentController.cpp:
2037
2038 2015-08-13  Brent Fulgham  <bfulgham@apple.com>
2039
2040         [Win] More build fixes.
2041
2042         * dom/make_event_factory.pl:
2043         (generateImplementation):
2044         * page/CaptionUserPreferences.cpp:
2045         * page/PageGroup.cpp:
2046         * page/UserContentController.cpp:
2047
2048 2015-08-13  Wenson Hsieh  <wenson_hsieh@apple.com>
2049
2050         A focused node should not be assisted when handling touch events synchronously
2051         https://bugs.webkit.org/show_bug.cgi?id=147836
2052         <rdar://problem/22204108>
2053
2054         Reviewed by Enrica Casucci.
2055
2056         Makes interaction with touch handlers no longer assist the currently focused element in the
2057         general case. Added plumbing to reassist a currently focused node when dispatching touch events,
2058         so that an input that programmatically focuses itself and prevents default on a touch event will
2059         be properly assisted when it has been programmatically focused (either through Javascript or the
2060         autofocus attribute) prior to receiving the touch event. This patch also removes the now
2061         unnecessary special-casing of the Gmail settings app that currently makes the keyboard deploy
2062         upon autofocus.
2063
2064         * dom/Element.cpp:
2065         (WebCore::Element::focus): Notifies the chrome client that the element has refocused before
2066             returning early.
2067         * page/ChromeClient.h: Refocusing an element does nothing by default.
2068         * platform/RuntimeApplicationChecksIOS.h: Removed special casing for Gmail Add Account.
2069         * platform/RuntimeApplicationChecksIOS.mm: See above.
2070         (WebCore::applicationIsGmailAddAccountOnIOS): See above.
2071
2072 2015-08-13  Brent Fulgham  <bfulgham@apple.com>
2073
2074         [Win] Unreviewed build fix.
2075
2076         * accessibility/AXObjectCache.cpp: Add missing 'DataLog.h' include.
2077
2078 2015-08-13 Wenson Hsieh  <wenson_hsieh@apple.com>
2079
2080         Selects should scale when rendering while zoomed
2081         https://bugs.webkit.org/show_bug.cgi?id=147868
2082
2083         Reviewed by Daniel Bates.
2084
2085         When rendering zoomed <select> elements, draw to an image buffer instead of drawing directly
2086         into the context. This allows us to scale the image buffer up before rendering.
2087
2088         * rendering/RenderThemeMac.mm:
2089         (WebCore::RenderThemeMac::paintMenuList): Use ThemeMac::drawCellOrFocusRingWithViewIntoContext
2090             to render search fields, utilizing an offscreen image buffer only when necessary.
2091
2092 2015-08-13  Alex Christensen  <achristensen@webkit.org>
2093
2094         [Win] Unreviewed build fix after r188388.
2095
2096         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2097         * dom/EventFactory.h:
2098         * rendering/RenderThemeWin.cpp:
2099         Strange things happen when you change including headers.  This fixed my local build.
2100
2101 2015-08-13  Geoffrey Garen  <ggaren@apple.com>
2102
2103         Standardize on the phrase "delete code"
2104         https://bugs.webkit.org/show_bug.cgi?id=147984
2105
2106         Reviewed by Mark Lam.
2107
2108         Use "delete" when we talk about throwing away code, as opposed to
2109         "invalidate" or "discard".
2110
2111         * bindings/js/GCController.cpp:
2112         (WebCore::GCController::setJavaScriptGarbageCollectorTimerEnabled):
2113         (WebCore::GCController::deleteAllCode):
2114         (WebCore::GCController::discardAllCompiledCode): Deleted.
2115         * bindings/js/GCController.h:
2116         * platform/MemoryPressureHandler.cpp:
2117         (WebCore::MemoryPressureHandler::releaseCriticalMemory):
2118
2119 2015-08-13  Eric Carlson  <eric.carlson@apple.com>
2120
2121         Don't short circuit seeking
2122         https://bugs.webkit.org/show_bug.cgi?id=147892
2123
2124         Reviewed by Jer Noble.
2125
2126         Test: media/video-seek-to-current-time.html
2127
2128         * html/HTMLMediaElement.cpp:
2129         (WebCore::HTMLMediaElement::prepareForLoad): Call clearSeeking.
2130         (WebCore::HTMLMediaElement::fastSeek): Add logging.
2131         (WebCore::HTMLMediaElement::seekWithTolerance): Add logging. Set m_pendingSeekType.
2132         (WebCore::HTMLMediaElement::seekTask):  Call clearSeeking. Don't short circuit a
2133           if the current or pending seek is a fast seek. Set m_seeking to true immediately
2134           before calling media engine as it may have been cleared before the seek task
2135           queue ran.
2136         (WebCore::HTMLMediaElement::clearSeeking): New.
2137         * html/HTMLMediaElement.h:
2138         * html/HTMLMediaElementEnums.h:
2139
2140         * platform/GenericTaskQueue.h:
2141         (WebCore::GenericTaskQueue::enqueueTask): Clear m_pendingTasks.
2142
2143         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2144         (WebCore::MediaPlayerPrivateAVFoundation::seekWithTolerance): Don't return early
2145           when asked to seek to the current time.
2146         (WebCore::MediaPlayerPrivateAVFoundation::invalidateCachedDuration): Remove some 
2147           extremely noisy logging.
2148
2149         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2150         (WebCore::MediaPlayerPrivateAVFoundationObjC::seekToTime): Add logging.
2151
2152 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
2153
2154         FilterOperation.h should not include FilterEffect.h
2155         https://bugs.webkit.org/show_bug.cgi?id=147970
2156
2157         Reviewed by Daniel Bates.
2158
2159         FilterEffect.h pulls in lots of JSC goop via runtime/Uint8ClampedArray.h,
2160         so move its include to FilterOperation.cpp.
2161         
2162         Causes include bloat because FilterOperation.h is pulled in via RenderStyle.h.
2163
2164         * platform/graphics/filters/FilterOperation.cpp:
2165         (WebCore::ReferenceFilterOperation::setFilterEffect):
2166         * platform/graphics/filters/FilterOperation.h:
2167         (WebCore::ReferenceFilterOperation::setFilterEffect): Deleted.
2168
2169 2015-08-13  Simon Fraser  <simon.fraser@apple.com>
2170
2171         ScriptExecutionContext.h pulls in all the JSC headers
2172         https://bugs.webkit.org/show_bug.cgi?id=147969
2173
2174         Reviewed by Alexey Proskuryakov.
2175
2176         ScriptExecutionContext.h included ScheduledAction.h, which pulled in all the
2177         JSC headers via JSDOMBinding.h. There was no need for this #include, so remove
2178         it and fix the fallout.
2179
2180         * Modules/webdatabase/DatabaseTracker.cpp:
2181         * Modules/webdatabase/SQLTransaction.h:
2182         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2183         * contentextensions/ContentExtensionStyleSheet.cpp:
2184         * dom/ScriptExecutionContext.h:
2185         * html/FTPDirectoryDocument.cpp:
2186         * html/canvas/WebGLRenderingContext.cpp:
2187         * html/parser/HTMLTreeBuilder.h:
2188
2189 2015-08-12  Anders Carlsson  <andersca@apple.com>
2190
2191         Use WTF::Optional in WindowFeatures
2192         https://bugs.webkit.org/show_bug.cgi?id=147956
2193
2194         Reviewed by Sam Weinig.
2195
2196         * loader/FrameLoader.cpp:
2197         (WebCore::createWindow):
2198         * page/WindowFeatures.cpp:
2199         (WebCore::WindowFeatures::WindowFeatures):
2200         (WebCore::WindowFeatures::setWindowFeature):
2201         (WebCore::WindowFeatures::boolFeature):
2202         (WebCore::WindowFeatures::floatFeature):
2203         (WebCore::WindowFeatures::parseDialogFeatures):
2204         * page/WindowFeatures.h:
2205         (WebCore::WindowFeatures::WindowFeatures):
2206
2207 2015-08-13  Matthew Daiter  <mdaiter@apple.com>
2208
2209         UserMediaRequest should supply IDs of devices selected by user
2210         https://bugs.webkit.org/show_bug.cgi?id=147263
2211         <rdar://problem/21983345>
2212
2213         Reviewed by Jer Noble.
2214
2215         * Modules/mediastream/UserMediaRequest.cpp:
2216         (WebCore::UserMediaRequest::userMediaAccessGranted):
2217         * Modules/mediastream/UserMediaRequest.h:
2218         * platform/mock/UserMediaClientMock.h:
2219
2220 2015-08-12  Carlos Garcia Campos  <cgarcia@igalia.com>
2221
2222         [Cairo] Improve image quality when using newer versions of cairo/pixman
2223         https://bugs.webkit.org/show_bug.cgi?id=147826
2224
2225         Reviewed by Martin Robinson.
2226
2227         Since cairo 1.14 the image filters changed a bit:
2228
2229          - CAIRO_FILTER_GOOD uses a box filter when downscaling if the
2230            scale factor is less than 0.75, otherwise it uses a filter
2231            equivalent to CAIRO_FILTER_BILINEAR.
2232          - CAIRO_FILTER_BEST uses always a Catmull-Rom filter.
2233
2234         We are currently using CAIRO_FILTER_BILINEAR for medium, high and
2235         default interpolation levels. We could use CAIRO_FILTER_GOOD for
2236         medium and default, and CAIRO_FILTER_BEST for high. This will not
2237         have any effect in previous versions of cairo because before 1.14
2238         CAIRO_FILTER_GOOD, CAIRO_FILTER_BILINEAR and CAIRO_FILTER_BEST had
2239         the same implementation in pixman.
2240
2241         * platform/graphics/cairo/PlatformContextCairo.cpp:
2242         (WebCore::PlatformContextCairo::drawSurfaceToContext):
2243
2244 2015-08-12  Myles C. Maxfield  <mmaxfield@apple.com>
2245
2246         [Cocoa] [CJK-configured device] System font has vertical punctuation
2247         https://bugs.webkit.org/show_bug.cgi?id=147964
2248         <rdar://problem/22256660>
2249
2250         Reviewed by Dean Jackson.
2251
2252         GlyphPage::fill() has multiple code paths to accomplish its goal. It uses the shouldUseCoreText() helper
2253         function to determine which one of the paths should be taken. However, not all of the code paths in
2254         GlyphPage::fill() are able of handling all situations. Indeed, the CoreText code paths in GlyphPage::fill()
2255         are only able to handle the situations which shouldUseCoreText() returns true for. This happens in the
2256         following cases:
2257
2258         1. If the font is a composite font
2259         2. If the font is used for text-combine
2260         3. If the font has vertical glyphs
2261
2262         In r187693, I added one more case to this list: If the font is the system font. However, I failed to add
2263         the necessary support to GlyphPage::fill() for this case. Becasue of this, we just happened to fall into
2264         the case of vertical fonts (just by coincidence), which causes us to use
2265         CTFontGetVerticalGlyphsForCharacters() instead of CTFontGetGlyphsForCharacters().
2266
2267         The solution is to adopt the same behavior we were using before r187693. Back then, we were using
2268         CGFontGetGlyphsForUnichars(), which always returned horizontal glyphs. We should simply adopt this same
2269         behavior, except in the Core Text case. Therefore, this patch is just a simple check to see if we are
2270         using the system font when determining which Core Text function to use.
2271
2272         Test: fast/text/system-font-punctuation.html
2273
2274         * platform/graphics/FontDescription.h:
2275         (WebCore::FontDescription::setWidthVariant):
2276         * platform/graphics/FontPlatformData.h:
2277         (WebCore::FontPlatformData::isForTextCombine):
2278         * platform/graphics/mac/GlyphPageMac.cpp:
2279         (WebCore::shouldUseCoreText):
2280         (WebCore::GlyphPage::fill):
2281         * rendering/RenderCombineText.cpp:
2282         (WebCore::RenderCombineText::combineText):
2283
2284 2015-08-12  Jinyoung Hur  <hur.ims@navercorp.com>
2285
2286         [WinCairo] Turn on WOFF font
2287         https://bugs.webkit.org/show_bug.cgi?id=147878
2288
2289         WOFF is already usable in Windows Cairo. Just turn it on.
2290
2291         Reviewed by Myles C. Maxfield.
2292
2293         Test: fast\css\font-face-woff.html
2294
2295         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
2296         (WebCore::FontCustomPlatformData::supportsFormat):
2297
2298 2015-08-12  Brent Fulgham  <bfulgham@apple.com>
2299
2300         Move RenderBox-specific Scroll Snap code from RenderElement to RenderBox
2301         https://bugs.webkit.org/show_bug.cgi?id=147963
2302
2303         Reviewed by Simon Fraser.
2304
2305         No new tests: No change in functionality.
2306
2307         * rendering/RenderBox.cpp:
2308         (WebCore::RenderBox::styleWillChange): Remove RenderBox-specific code.
2309         (WebCore::RenderBox::willBeRemovedFromTree): Ditto.
2310         * rendering/RenderBox.h:
2311         * rendering/RenderElement.cpp:
2312         (WebCore::RenderElement::styleWillChange): Move code from RenderElement to
2313         handle Scroll Snap Points.
2314         (WebCore::RenderElement::willBeRemovedFromTree): Added new override to handle
2315         scroll-snap point logic.
2316
2317 2015-08-12  Antti Koivisto  <antti@apple.com>
2318
2319         CachedResource leak in validation code
2320         https://bugs.webkit.org/show_bug.cgi?id=147941
2321
2322         Reviewed by Chris Dumez.
2323
2324         While adding test coverage I discovered a way to hit ASSERT(!resource->m_proxyResource) in CachedResource::setResourceToRevalidate.
2325         I think this ends up leaking a resource too.
2326
2327         Test: http/tests/cache/recursive-validation.html
2328
2329         * loader/cache/CachedRawResource.cpp:
2330         (WebCore::CachedRawResource::didAddClient):
2331
2332             Tighten the condition.
2333
2334         * loader/cache/CachedResource.cpp:
2335         (WebCore::CachedResource::setResourceToRevalidate):
2336         (WebCore::CachedResource::clearResourceToRevalidate):
2337
2338             Replace workaround for this bug with an assert.
2339
2340         * loader/cache/CachedResource.h:
2341         (WebCore::CachedResource::validationInProgress):
2342         (WebCore::CachedResource::validationCompleting):
2343         (WebCore::CachedResource::didSendData):
2344         * loader/cache/CachedResourceLoader.cpp:
2345         (WebCore::CachedResourceLoader::revalidateResource):
2346         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
2347
2348             Fix the bug by using (instead of revalidating) resource that we are just finishing revalidating.
2349             This can happen when a succesful revalidation synchronously triggers another load for the same resource.
2350
2351 2015-08-12  Matthew Daiter  <mdaiter@apple.com>
2352
2353         Need to add stubs to enumerateDevices
2354         https://bugs.webkit.org/show_bug.cgi?id=147903
2355
2356         Reviewed by Eric Carlson.
2357
2358         * Modules/mediastream/MediaDevices.cpp:
2359         (WebCore::MediaDevices::enumerateDevices):
2360         * Modules/mediastream/MediaDevices.h:
2361         * Modules/mediastream/UserMediaRequest.cpp:
2362         (WebCore::UserMediaRequest::enumerateDevices):
2363         * Modules/mediastream/UserMediaRequest.h:
2364
2365 2015-08-12  Matt Rajca  <mrajca@apple.com>
2366
2367         Fixed the Release build when MEDIA_SESSION is enabled.
2368
2369         * testing/Internals.cpp:
2370         (WebCore::interruptingCategoryFromString):
2371
2372 2015-08-07  Matt Rajca  <mrajca@apple.com>
2373
2374         Media Session: notify the UI process when media controls are enabled/disabled
2375         https://bugs.webkit.org/show_bug.cgi?id=147802
2376
2377         Reviewed by Eric Carlson.
2378
2379         * Modules/mediasession/MediaRemoteControls.cpp:
2380         (WebCore::MediaRemoteControls::MediaRemoteControls): Keep track of the parent session.
2381         (WebCore::MediaRemoteControls::~MediaRemoteControls): Removed unnecessary line.
2382         (WebCore::MediaRemoteControls::setPreviousTrackEnabled): Tell the session a control was enabled/disabled.
2383         (WebCore::MediaRemoteControls::setNextTrackEnabled): Tell the session a control was enabled/disabled.
2384         * Modules/mediasession/MediaRemoteControls.h:
2385         (WebCore::MediaRemoteControls::create):
2386         (WebCore::MediaRemoteControls::setPreviousTrackEnabled): Moved to implementation file.
2387         (WebCore::MediaRemoteControls::setNextTrackEnabled): Moved to implementation file.
2388         * Modules/mediasession/MediaSession.cpp:
2389         (WebCore::MediaSession::MediaSession): Keep track of the remote controls' parent session.
2390         (WebCore::MediaSession::controlIsEnabledDidChange): Propagate the new media state to the UI process.
2391         * Modules/mediasession/MediaSession.h:
2392         * dom/Document.cpp:
2393         (WebCore::Document::updateIsPlayingMedia): Include whether we can skip to the previous/next track.
2394         * page/MediaProducer.h:
2395
2396 2015-08-12  Alex Christensen  <achristensen@webkit.org>
2397
2398         Fix Debug CMake builds on Windows
2399         https://bugs.webkit.org/show_bug.cgi?id=147940
2400
2401         Reviewed by Chris Dumez.
2402
2403         * PlatformWin.cmake:
2404         Copy localized strings to the WebKit.resources directory.
2405
2406 2015-08-12  Alex Christensen  <achristensen@webkit.org>
2407
2408         Unreviewed build fix after r188339.
2409
2410         * bindings/js/GCController.cpp:
2411         (WebCore::GCController::garbageCollectOnAlternateThreadForDebugging):
2412         (WebCore::GCController::setJavaScriptGarbageCollectorTimerEnabled):
2413         (WebCore::GCController::releaseExecutableMemory): Deleted.
2414         * bindings/js/GCController.h:
2415         Commit WebCore part of patch.
2416
2417 2015-08-12  Brent Fulgham  <bfulgham@apple.com>
2418
2419         REGRESSION(r185606): ASSERT in WebCore::RenderElement::styleWillChange
2420         https://bugs.webkit.org/show_bug.cgi?id=147596
2421         <rdar://problem/21963355>
2422
2423         Reviewed by Jon Honeycutt.
2424
2425         Only add (or remove) a RenderElement from the container of RenderBoxes with
2426         scroll snap coordinates if the element actually is a RenderBox.
2427
2428         Tested by css3/scroll-snap/improper-snap-points-crash.html.
2429
2430         * rendering/RenderElement.cpp:
2431         (WebCore::RenderElement::styleWillChange):
2432         (WebCore::RenderElement::willBeRemovedFromTree):
2433
2434 2015-08-12  Devin Rousso  <drousso@apple.com>
2435
2436         Web Inspector: Implement selector highlighting for iOS
2437         https://bugs.webkit.org/show_bug.cgi?id=147919
2438
2439         Reviewed by Timothy Hatcher.
2440
2441         * inspector/InspectorOverlay.cpp:
2442         (WebCore::InspectorOverlay::getHighlight):
2443         If the current highlight is a nodeList, generate highlights for each node in the list and
2444         return the concatenated value of those highlights.
2445
2446 2015-08-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2447
2448         Remove promise attribute specific handling from binding generator
2449         https://bugs.webkit.org/show_bug.cgi?id=147828
2450
2451         Reviewed by Darin Adler.
2452
2453         Reverting http://trac.webkit.org/changeset/184643, as CachedAttribute is used instead.
2454
2455         * bindings/scripts/CodeGeneratorJS.pm:
2456         (GenerateHeader): Deleted.
2457         * bindings/scripts/test/JS/JSTestObj.cpp:
2458         (WebCore::jsTestObjConstructor): Deleted.
2459         (WebCore::setJSTestObjConstructorStaticStringAttr): Deleted.
2460         * bindings/scripts/test/JS/JSTestObj.h:
2461         * bindings/scripts/test/ObjC/DOMTestObj.h:
2462         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2463         (-[DOMTestObj voidMethod]): Deleted.
2464         (-[DOMTestObj voidMethodWithArgs:strArg:objArg:]): Deleted.
2465         * bindings/scripts/test/TestObj.idl:
2466
2467 2015-08-12  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2468
2469         XHR.setRequestHeader should remove trailing and leading whitespaces from the header value
2470         https://bugs.webkit.org/show_bug.cgi?id=147445
2471
2472         Reviewed by Darin Adler.
2473
2474         Covered by added and modifed tests.
2475
2476         * platform/network/HTTPParsers.h:
2477         (WebCore::isHTTPSpace):
2478         (WebCore::stripLeadingAndTrailingHTTPSpaces):
2479         * xml/XMLHttpRequest.cpp:
2480         (WebCore::XMLHttpRequest::setRequestHeader): strip trailing and leading whitespace before testing for header value validity and storing.
2481
2482 2015-08-11  Carlos Garcia Campos  <cgarcia@igalia.com>
2483
2484         NetworkProcess: DNS prefetch happens in the Web Process
2485         https://bugs.webkit.org/show_bug.cgi?id=147824
2486
2487         Reviewed by Alexey Proskuryakov.
2488
2489         Use FrameLoaderClient to do the DNS prefetch.
2490
2491         * html/HTMLAnchorElement.cpp:
2492         (WebCore::HTMLAnchorElement::parseAttribute):
2493         * loader/FrameLoaderClient.h:
2494         * loader/LinkLoader.cpp:
2495         (WebCore::LinkLoader::loadLink):
2496         * page/Chrome.cpp:
2497         (WebCore::Chrome::mouseDidMoveOverElement):
2498
2499 2015-08-11  Mark Lam  <mark.lam@apple.com>
2500
2501         Implementation JavaScript watchdog using WTF::WorkQueue.
2502         https://bugs.webkit.org/show_bug.cgi?id=147107
2503
2504         Reviewed by Geoffrey Garen.
2505
2506         No new tests because we're not introducing any behavior change to WebCore here.
2507         We're only #include'ing Watchdog.h directly instead of going through VM.h.
2508
2509         * ForwardingHeaders/runtime/Watchdog.h: Added.
2510         * PlatformEfl.cmake:
2511         * WebCore.vcxproj/WebCore.vcxproj:
2512         * WebCore.vcxproj/WebCore.vcxproj.filters:
2513         * bindings/js/JSEventListener.cpp:
2514         * bindings/js/WorkerScriptController.cpp:
2515
2516 2015-08-11  Simon Fraser  <simon.fraser@apple.com>
2517
2518         [iOS WK2] ASSERT(!m_properties.backingStore || owner()) sometimes on zooming
2519         https://bugs.webkit.org/show_bug.cgi?id=147854
2520
2521         Reviewed by Tim Horton.
2522
2523         When destroying a TileGrid, the container layer remains alive by virtue of being
2524         in the layer tree, and it and its tiles get visited during layer tree transaction
2525         building but we assert because we've cleared the owner on the tile layers.
2526
2527         The real bug is that TileController doesn't tell GraphicsLayerCA when the custom
2528         sublayers change. Make this possible via a new PlatformCALayerClient function,
2529         and make TileController use this when rearranging its tile grids.
2530
2531         * platform/graphics/ca/GraphicsLayerCA.cpp:
2532         (WebCore::GraphicsLayerCA::platformCALayerCustomSublayersChanged):
2533         (WebCore::GraphicsLayerCA::updateContentsScale): No need to explicitly set
2534         the ChildrenChanged flag now.
2535         * platform/graphics/ca/GraphicsLayerCA.h:
2536         * platform/graphics/ca/PlatformCALayerClient.h:
2537         (WebCore::PlatformCALayerClient::platformCALayerCustomSublayersChanged):
2538         (WebCore::PlatformCALayerClient::platformCALayerLayerDidDisplay):
2539         * platform/graphics/ca/TileController.cpp:
2540         (WebCore::TileController::setNeedsDisplay):
2541         (WebCore::TileController::setContentsScale):
2542         (WebCore::TileController::setZoomedOutContentsScale):
2543         (WebCore::TileController::revalidateTiles):
2544         (WebCore::TileController::clearZoomedOutTileGrid):
2545         (WebCore::TileController::tileGridsChanged):
2546         (WebCore::TileController::tileRevalidationTimerFired):
2547         * platform/graphics/ca/TileController.h:
2548         * platform/graphics/ca/TileGrid.h: Default param.
2549
2550 2015-08-11  Zalan Bujtas  <zalan@apple.com>
2551
2552         Disconnect LayoutStateDisabler logic and RenderView pointer.
2553         https://bugs.webkit.org/show_bug.cgi?id=147906
2554
2555         Reviewed by Simon Fraser.
2556
2557         LayoutStateDisabler should disable layout state unconditionally.
2558         The only place where it was actually conditional was the subtree layout branch.
2559         Create a dedicated SubtreeLayoutStateMaintainer to manage the subtree layout case.
2560
2561         No change in behaviour.
2562
2563         * page/FrameView.cpp:
2564         (WebCore::SubtreeLayoutStateMaintainer::SubtreeLayoutStateMaintainer):
2565         (WebCore::SubtreeLayoutStateMaintainer::~SubtreeLayoutStateMaintainer):
2566         (WebCore::FrameView::layout):
2567         * rendering/RenderBlock.cpp:
2568         (WebCore::RenderBlock::updateFirstLetterStyle):
2569         (WebCore::RenderBlock::updateFirstLetter):
2570         * rendering/RenderBlockFlow.cpp:
2571         (WebCore::RenderBlockFlow::repaintOverhangingFloats):
2572         * rendering/RenderFlowThread.cpp:
2573         (WebCore::RenderFlowThread::repaintRectangleInRegions):
2574         * rendering/RenderListBox.cpp:
2575         (WebCore::RenderListBox::layout):
2576         * rendering/RenderListItem.cpp:
2577         (WebCore::RenderListItem::insertOrMoveMarkerRendererIfNeeded):
2578         * rendering/RenderMediaControlElements.cpp:
2579         (WebCore::RenderMediaVolumeSliderContainer::layout):
2580         (WebCore::RenderMediaControlTimelineContainer::layout):
2581         (WebCore::RenderTextTrackContainerElement::layout):
2582         * rendering/RenderMultiColumnFlowThread.cpp:
2583         (WebCore::RenderMultiColumnFlowThread::populate):
2584         (WebCore::RenderMultiColumnFlowThread::evacuateAndDestroy):
2585         * rendering/RenderView.h:
2586         (WebCore::LayoutStateDisabler::LayoutStateDisabler):
2587         (WebCore::LayoutStateDisabler::~LayoutStateDisabler):
2588         * rendering/svg/RenderSVGRoot.cpp:
2589         (WebCore::RenderSVGRoot::layout):
2590
2591 2015-08-11  Simon Fraser  <simon.fraser@apple.com>
2592
2593         Fix ViewportConfiguration dumping.
2594         
2595         ViewportConfiguration::dump() was dumping parameters.width as parameters.initialScale.
2596
2597         * page/ViewportConfiguration.cpp:
2598         (WebCore::ViewportConfigurationTextStream::operator<<):
2599
2600 2015-08-11  Myles C. Maxfield  <mmaxfield@apple.com>
2601
2602         [font-features] Map OpenType feature tags to TrueType feature selectors
2603         https://bugs.webkit.org/show_bug.cgi?id=147819
2604
2605         Reviewed by Dean Jackson.
2606
2607         Allow uses of font-feature-settings even on TrueType fonts.
2608
2609         Test: css3/font-feature-settings-preinstalled-fonts.html
2610
2611         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2612         (WebCore::appendRawTrueTypeFeature):
2613         (WebCore::appendTrueTypeFeature):
2614
2615 2015-08-11  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
2616
2617         Reduce use of PassRefPtr in WebCore/css
2618         https://bugs.webkit.org/show_bug.cgi?id=147821
2619
2620         Reviewed by Daniel Bates.
2621
2622         Use RefPtr when returning nullptr or RefPtr, if not, use Ref.
2623
2624         * css/CSSBasicShapes.cpp:
2625         (WebCore::buildSerializablePositionOffset):
2626         (WebCore::CSSBasicShapeCircle::cssText):
2627         (WebCore::CSSBasicShapeEllipse::cssText):
2628         * css/CSSBasicShapes.h:
2629         * css/CSSCalculationValue.cpp:
2630         (WebCore::determineCategory):
2631         (WebCore::CSSCalcExpressionNodeParser::parseCalc):
2632         (WebCore::createBlendHalf):
2633         (WebCore::createCSS):
2634         * css/CSSCanvasValue.cpp:
2635         (WebCore::CSSCanvasValue::image):
2636         * css/CSSCanvasValue.h:
2637         * css/CSSComputedStyleDeclaration.cpp:
2638         (WebCore::positionOffsetValue):
2639         (WebCore::ComputedStyleExtractor::currentColorOrValidColor):
2640         (WebCore::ComputedStyleExtractor::getFontSizeCSSValuePreferringKeyword):
2641         (WebCore::counterToCSSValue):
2642         (WebCore::zoomAdjustedPaddingOrMarginPixelValue):
2643         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2644         (WebCore::computeRenderStyleForProperty):
2645         (WebCore::valueForItemPositionWithOverflowAlignment):
2646         (WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
2647         (WebCore::ComputedStyleExtractor::propertyValue):
2648         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForShorthandProperties):
2649         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForSidesShorthand):
2650         (WebCore::ComputedStyleExtractor::getCSSPropertyValuesForGridShorthand):
2651         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValueInternal):
2652         (WebCore::ComputedStyleExtractor::getBackgroundShorthandValue):
2653         * css/CSSComputedStyleDeclaration.h:
2654         * css/CSSCrossfadeValue.cpp:
2655         (WebCore::CSSCrossfadeValue::image):
2656         (WebCore::CSSCrossfadeValue::blend):
2657         * css/CSSCrossfadeValue.h:
2658         * css/CSSFilterImageValue.cpp:
2659         (WebCore::CSSFilterImageValue::image):
2660         * css/CSSFilterImageValue.h:
2661         * css/CSSGradientValue.cpp:
2662         (WebCore::CSSGradientValue::image):
2663         (WebCore::CSSGradientValue::gradientWithStylesResolved):
2664         (WebCore::CSSLinearGradientValue::createGradient):
2665         (WebCore::CSSRadialGradientValue::createGradient):
2666         * css/CSSGradientValue.h:
2667         * css/CSSImageSetValue.cpp:
2668         (WebCore::CSSImageSetValue::cloneForCSSOM):
2669         * css/CSSImageSetValue.h:
2670         * css/CSSImageValue.cpp:
2671         (WebCore::CSSImageValue::cloneForCSSOM):
2672         * css/CSSImageValue.h:
2673         * css/CSSParser.cpp:
2674         (WebCore::CSSParser::parseRule):
2675         (WebCore::CSSParser::parseKeyframeRule):
2676         (WebCore::CSSParser::parseFontFaceValue):
2677         (WebCore::CSSParser::parseValidPrimitive):
2678         (WebCore::CSSParser::parseContentDistributionOverflowPosition):
2679         (WebCore::CSSParser::parseAttr):
2680         (WebCore::CSSParser::parseBackgroundColor):
2681         (WebCore::CSSParser::parsePositionX):
2682         (WebCore::CSSParser::parsePositionY):
2683         (WebCore::CSSParser::parseFillPositionComponent):
2684         (WebCore::CSSParser::parseFillSize):
2685         (WebCore::CSSParser::parseAnimationDelay):
2686         (WebCore::CSSParser::parseAnimationDirection):
2687         (WebCore::CSSParser::parseAnimationDuration):
2688         (WebCore::CSSParser::parseAnimationFillMode):
2689         (WebCore::CSSParser::parseAnimationIterationCount):
2690         (WebCore::CSSParser::parseAnimationName):
2691         (WebCore::CSSParser::parseAnimationPlayState):
2692         (WebCore::CSSParser::parseAnimationTrigger):
2693         (WebCore::CSSParser::parseAnimationProperty):
2694         (WebCore::CSSParser::parseAnimationTimingFunction):
2695         (WebCore::CSSParser::parseGridPosition):
2696         (WebCore::gridMissingGridPositionValue):
2697         (WebCore::CSSParser::parseGridTrackList):
2698         (WebCore::CSSParser::parseGridTrackSize):
2699         (WebCore::CSSParser::parseGridBreadth):
2700         (WebCore::CSSParser::parseGridAutoFlow):
2701         (WebCore::CSSParser::parseGridTemplateAreas):
2702         (WebCore::CSSParser::parseCounterContent):
2703         (WebCore::CSSParser::parseInsetRoundedCorners):
2704         (WebCore::CSSParser::parseBasicShapeInset):
2705         (WebCore::CSSParser::parseShapeRadius):
2706         (WebCore::CSSParser::parseBasicShapeCircle):
2707         (WebCore::CSSParser::parseBasicShapeEllipse):
2708         (WebCore::CSSParser::parseBasicShapePolygon):
2709         (WebCore::CSSParser::parseBasicShapeAndOrBox):
2710         (WebCore::CSSParser::parseShapeProperty):
2711         (WebCore::CSSParser::parseClipPath):
2712         (WebCore::CSSParser::parseBasicShape):
2713         (WebCore::CSSParser::parseFontFamily):
2714         (WebCore::CSSParser::parseColor):
2715         (WebCore::CSSParser::parseShadow):
2716         (WebCore::CSSParser::parseImageResolution):
2717         (WebCore::CSSParser::parseImageSet):
2718         (WebCore::CSSParser::parseTransform):
2719         (WebCore::CSSParser::parseTransformValue):
2720         (WebCore::CSSParser::parseBuiltinFilterArguments):
2721         (WebCore::CSSParser::parseTextIndent):
2722         (WebCore::CSSParser::createImportRule):
2723         (WebCore::CSSParser::createMediaRule):
2724         (WebCore::CSSParser::createEmptyMediaRule):
2725         (WebCore::CSSParser::createSupportsRule):
2726         (WebCore::CSSParser::popSupportsRuleData):
2727         (WebCore::CSSParser::createKeyframesRule):
2728         (WebCore::CSSParser::createStyleRule):
2729         (WebCore::CSSParser::createFontFaceRule):
2730         (WebCore::CSSParser::createPageRule):
2731         (WebCore::CSSParser::createRegionRule):
2732         (WebCore::CSSParser::createKeyframe):
2733         * css/CSSParser.h:
2734         * css/CSSPrimitiveValue.cpp:
2735         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
2736         * css/CSSPrimitiveValue.h:
2737         * css/CSSStyleDeclaration.h:
2738         * css/CSSStyleSheet.cpp:
2739         (WebCore::CSSStyleSheet::rules):
2740         (WebCore::CSSStyleSheet::cssRules):
2741         * css/CSSStyleSheet.h:
2742         * css/CSSToStyleMap.cpp:
2743         (WebCore::CSSToStyleMap::styleImage):
2744         * css/CSSToStyleMap.h:
2745         * css/CSSValue.cpp:
2746         (WebCore::CSSValue::cloneForCSSOM):
2747         * css/CSSValue.h:
2748         * css/CSSValueList.cpp:
2749         (WebCore::CSSValueList::cloneForCSSOM):
2750         * css/CSSValueList.h:
2751         * css/MediaList.h:
2752         (WebCore::MediaQuerySet::copy):
2753         * css/MediaQueryMatcher.cpp:
2754         (WebCore::MediaQueryMatcher::matchMedia):
2755         * css/MediaQueryMatcher.h:
2756         * css/PropertySetCSSStyleDeclaration.cpp:
2757         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
2758         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal):
2759         * css/PropertySetCSSStyleDeclaration.h:
2760         * css/RGBColor.cpp:
2761         (WebCore::RGBColor::red):
2762         (WebCore::RGBColor::green):
2763         (WebCore::RGBColor::blue):
2764         (WebCore::RGBColor::alpha):
2765         * css/RGBColor.h:
2766         * css/SVGCSSComputedStyleDeclaration.cpp:
2767         (WebCore::glyphOrientationToCSSPrimitiveValue):
2768         (WebCore::strokeDashArrayToCSSValueList):
2769         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor):
2770         (WebCore::ComputedStyleExtractor::svgPropertyValue):
2771         * css/SVGCSSParser.cpp:
2772         (WebCore::CSSParser::parseSVGStrokeDasharray):
2773         (WebCore::CSSParser::parseSVGPaint):
2774         (WebCore::CSSParser::parseSVGColor):
2775         (WebCore::CSSParser::parsePaintOrder):
2776         * css/WebKitCSSFilterValue.cpp:
2777         (WebCore::WebKitCSSFilterValue::cloneForCSSOM):
2778         * css/WebKitCSSFilterValue.h:
2779         * css/WebKitCSSMatrix.cpp:
2780         (WebCore::WebKitCSSMatrix::multiply):
2781         (WebCore::WebKitCSSMatrix::inverse):
2782         (WebCore::WebKitCSSMatrix::translate):
2783         (WebCore::WebKitCSSMatrix::scale):
2784         (WebCore::WebKitCSSMatrix::rotate):
2785         (WebCore::WebKitCSSMatrix::rotateAxisAngle):
2786         (WebCore::WebKitCSSMatrix::skewX):
2787         (WebCore::WebKitCSSMatrix::skewY):
2788         * css/WebKitCSSMatrix.h:
2789         * css/WebKitCSSTransformValue.cpp:
2790         (WebCore::WebKitCSSTransformValue::cloneForCSSOM):
2791         * css/WebKitCSSTransformValue.h:
2792
2793 2015-08-11  Sam Weinig  <sam@webkit.org>
2794
2795         Move CountQueuingStrategy and related to files to their correct place in the Xcode project
2796         https://bugs.webkit.org/show_bug.cgi?id=147901
2797
2798         Reviewed by Anders Carlsson.
2799
2800         * WebCore.xcodeproj/project.pbxproj:
2801
2802 2015-08-11  Zalan Bujtas  <zalan@apple.com>
2803
2804         Use more references in FrameView.
2805         https://bugs.webkit.org/show_bug.cgi?id=147899
2806
2807         Reviewed by Simon Fraser.
2808
2809         No change in functionality.
2810
2811         * page/FrameView.cpp:
2812         (WebCore::FrameView::flushCompositingStateForThisFrame):
2813         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
2814         (WebCore::FrameView::addSlowRepaintObject):
2815         (WebCore::FrameView::scrollElementToRect):
2816         * page/FrameView.h:
2817         * rendering/RenderObject.cpp:
2818         (WebCore::RenderObject::willBeDestroyed):
2819         * rendering/RenderScrollbarPart.cpp:
2820         (WebCore::RenderScrollbarPart::imageChanged):
2821         * testing/Internals.cpp:
2822         (WebCore::Internals::scrollElementToRect):
2823
2824 2015-08-11  Zalan Bujtas  <zalan@apple.com>
2825
2826         Invalid FrameView::m_viewportRenderer after layout is finished.
2827         https://bugs.webkit.org/show_bug.cgi?id=147848
2828         rdar://problem/22205197
2829
2830         Reviewed by Simon Fraser.
2831
2832         We cache the current viewport renderer (FrameView::m_viewportRenderer) right before layout.
2833         It gets dereferenced later when layout is finished to update the overflow status.
2834         If the viewport renderer gets destroyed during layout, we end up with a dangling pointer.
2835         This patch replaces the pointer caching with type caching (none, body, document).
2836
2837         Unable to construct a test case.
2838
2839 2015-08-11  Brent Fulgham  <bfulgham@apple.com>
2840
2841         [Win] Switch Windows build to Visual Studio 2015
2842         https://bugs.webkit.org/show_bug.cgi?id=147887
2843         <rdar://problem/22235098>
2844
2845         Reviewed by Alex Christensen.
2846
2847         Update Visual Studio project file settings to use the current Visual
2848         Studio and compiler. Continue targeting binaries to run on our minimum
2849         supported configuration of Windows 7.
2850
2851         No change in behavior, so no new tests.
2852
2853         * WebCore.vcxproj/WebCore.vcxproj:
2854         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
2855         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
2856
2857 2015-08-11  Said Abou-Hallawa  <sabouhallawa@apple.com>
2858
2859         feMorphology is not rendered correctly on Retina display
2860         https://bugs.webkit.org/show_bug.cgi?id=147589
2861
2862         Reviewed by Dean Jackson.
2863
2864         The result ImageBuffer of any FilterEffect is already scaled up for 2x
2865         display. The FEMorphology needs to fix its painting data dimension and
2866         radius by multiplying them by the filter scale factor.
2867  
2868         Test: fast/hidpi/filters-morphology.html
2869
2870         * platform/graphics/filters/FEMorphology.cpp:
2871         (WebCore::FEMorphology::platformApplySoftware):
2872
2873 2015-08-11  Myles C. Maxfield  <mmaxfield@apple.com>
2874
2875         [iOS] Arabic letter Yeh is drawn in LastResort
2876         https://bugs.webkit.org/show_bug.cgi?id=147862
2877         <rdar://problem/22202935>
2878
2879         Reviewed by Darin Adler.
2880
2881         In order to perform font fallback, we must know which fonts support which characters. We
2882         perform this check by asking each font to map a sequence of codepoints to glyphs, and
2883         any glyphs which end up with a 0 value are unsupported by the font.
2884
2885         One of the mechanisms that we use to do this is to combine the code points into a string,
2886         and tell Core Text to lay out the string. However, this is fundamentally a different
2887         operation than the one we are trying to perform. Strings combine adjacent codepoints into
2888         grapheme clusters, and CoreText operates on these. However, we are trying to gain
2889         information regarding codepoints, not grapheme clusters.
2890
2891         Instead of taking this string-based approach, we should try harder to use Core Text
2892         functions which operate on ordered collections of characters, rather than strings. In
2893         particular, CTFontGetGlyphsForCharacters() and CTFontGetVerticalGlyphsForCharacters()
2894         have the behavior we want where any unmapped characters end up with a 0 value glyph.
2895
2896         Previously, we were only using the result of those functions if they were successfully
2897         able to map their entire input. However, given the fact that we can degrade gracefully
2898         in the case of a partial mapping, we shouldn't need to bail completely to the
2899         string-based approach should a partial mapping occur.
2900
2901         At some point we should delete the string-based approach entirely. However, this path
2902         is still explicitly used for composite fonts. Fixing that use case is out of scope
2903         for this patch.
2904
2905         Test: fast/text/arabic-glyph-cache-fill-combine.html
2906
2907         * platform/graphics/mac/GlyphPageMac.cpp:
2908         (WebCore::GlyphPage::fill):
2909
2910 2015-08-11  Chris Dumez  <cdumez@apple.com>
2911
2912         The 'length' property on interface objects should be configurable
2913         https://bugs.webkit.org/show_bug.cgi?id=147858
2914
2915         Reviewed by Daniel Bates.
2916
2917         Make the 'length' property configurable on interface objects to comply
2918         with the Web IDL specification [1] and to align our behavior with
2919         Firefox 38 and Chrome 44.
2920
2921         This behavior is also covered by the following W3C test suite:
2922         http://w3c-test.org/dom/interfaces.html
2923
2924         [1] http://heycam.github.io/webidl/#es-interface-call (17 July 2015)
2925
2926         Test: fast/dom/length-property-configurable.html
2927
2928         * bindings/scripts/CodeGeneratorJS.pm:
2929         (GenerateConstructorHelperMethods):
2930         Make the 'length' property configurable on interface objects.
2931
2932         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
2933         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
2934         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
2935         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
2936         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
2937         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
2938         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2939         (WebCore::JSTestEventConstructorConstructor::finishCreation):
2940         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
2941         (WebCore::JSTestEventTargetConstructor::finishCreation):
2942         * bindings/scripts/test/JS/JSTestException.cpp:
2943         (WebCore::JSTestExceptionConstructor::finishCreation):
2944         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
2945         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
2946         * bindings/scripts/test/JS/JSTestInterface.cpp:
2947         (WebCore::JSTestInterfaceConstructor::finishCreation):
2948         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
2949         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
2950         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
2951         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
2952         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
2953         * bindings/scripts/test/JS/JSTestNode.cpp:
2954         (WebCore::JSTestNodeConstructor::finishCreation):
2955         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
2956         (WebCore::JSTestNondeterministicConstructor::finishCreation):
2957         * bindings/scripts/test/JS/JSTestObj.cpp:
2958         (WebCore::JSTestObjConstructor::finishCreation):
2959         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
2960         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
2961         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2962         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
2963         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
2964         (WebCore::JSTestTypedefsConstructor::finishCreation):
2965         * bindings/scripts/test/JS/JSattribute.cpp:
2966         (WebCore::JSattributeConstructor::finishCreation):
2967         * bindings/scripts/test/JS/JSreadonly.cpp:
2968         (WebCore::JSreadonlyConstructor::finishCreation):
2969         Rebaseline bindings tests.
2970
2971 2015-08-11  Per Arne Vollan  <peavo@outlook.com>
2972
2973         [Win] Popup menus have incorrect placement when device scale factor != 1.
2974         https://bugs.webkit.org/show_bug.cgi?id=147880
2975
2976         Reviewed by Brent Fulgham.
2977
2978         We need to take the device scaling factor into account when calculating
2979         the position and size of the popup menu.
2980
2981         * platform/win/PopupMenuWin.cpp:
2982         (WebCore::PopupMenuWin::calculatePositionAndSize):
2983
2984 2015-08-11  Chris Dumez  <cdumez@apple.com>
2985
2986         [WebIDL] All interface objects must have a property named "name"
2987         https://bugs.webkit.org/show_bug.cgi?id=147865
2988
2989         Reviewed by Darin Adler.
2990
2991         As per the Web IDL specification, all interface objects must have a
2992         property named "name" with attributes
2993         { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }
2994         whose value is the identifier of the corresponding interface:
2995         http://heycam.github.io/webidl/#es-interface-call
2996         http://heycam.github.io/webidl/#named-constructors
2997
2998         Previously, our interface objects had no such property, this patch
2999         addresses the problem.
3000
3001         Both Firefox 38 and Chrome 44 comply with the Web IDL specification
3002         here.
3003
3004         Test: fast/dom/interface-name-property.html
3005
3006         * bindings/scripts/CodeGeneratorJS.pm:
3007         (GenerateConstructorHelperMethods):
3008
3009         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3010         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
3011         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3012         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
3013         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3014         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
3015         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3016         (WebCore::JSTestEventConstructorConstructor::finishCreation):
3017         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3018         (WebCore::JSTestEventTargetConstructor::finishCreation):
3019         * bindings/scripts/test/JS/JSTestException.cpp:
3020         (WebCore::JSTestExceptionConstructor::finishCreation):
3021         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3022         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
3023         * bindings/scripts/test/JS/JSTestInterface.cpp:
3024         (WebCore::JSTestInterfaceConstructor::finishCreation):
3025         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3026         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
3027         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3028         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
3029         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
3030         * bindings/scripts/test/JS/JSTestNode.cpp:
3031         (WebCore::JSTestNodeConstructor::finishCreation):
3032         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3033         (WebCore::JSTestNondeterministicConstructor::finishCreation):
3034         * bindings/scripts/test/JS/JSTestObj.cpp:
3035         (WebCore::JSTestObjConstructor::finishCreation):
3036         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3037         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
3038         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3039         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
3040         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3041         (WebCore::JSTestTypedefsConstructor::finishCreation):
3042         * bindings/scripts/test/JS/JSattribute.cpp:
3043         (WebCore::JSattributeConstructor::finishCreation):
3044         * bindings/scripts/test/JS/JSreadonly.cpp:
3045         (WebCore::JSreadonlyConstructor::finishCreation):
3046         Rebaseline bindings tests.
3047
3048 2015-08-11  Ting-Wei Lan  <lantw44@gmail.com>
3049
3050         Fix debug build when optimization is enabled
3051         https://bugs.webkit.org/show_bug.cgi?id=147816
3052
3053         Reviewed by Alexey Proskuryakov.
3054
3055         No new tests because this is only a build fix.
3056
3057         * editing/InsertNodeBeforeCommand.cpp:
3058
3059 2015-08-11  Chris Dumez  <cdumez@apple.com>
3060
3061         Unreviewed, rebaseline bindings tests after r188252.
3062
3063         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
3064         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
3065         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
3066         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
3067         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
3068         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
3069         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
3070         (WebCore::JSTestEventConstructorConstructor::finishCreation):
3071         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
3072         (WebCore::JSTestEventTargetConstructor::finishCreation):
3073         * bindings/scripts/test/JS/JSTestException.cpp:
3074         (WebCore::JSTestExceptionConstructor::finishCreation):
3075         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
3076         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
3077         * bindings/scripts/test/JS/JSTestInterface.cpp:
3078         (WebCore::JSTestInterfaceConstructor::finishCreation):
3079         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
3080         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
3081         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
3082         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
3083         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
3084         * bindings/scripts/test/JS/JSTestNode.cpp:
3085         (WebCore::JSTestNodeConstructor::finishCreation):
3086         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
3087         (WebCore::JSTestNondeterministicConstructor::finishCreation):
3088         * bindings/scripts/test/JS/JSTestObj.cpp:
3089         (WebCore::JSTestObjConstructor::finishCreation):
3090         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
3091         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
3092         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
3093         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
3094         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
3095         (WebCore::JSTestTypedefsConstructor::finishCreation):
3096         * bindings/scripts/test/JS/JSattribute.cpp:
3097         (WebCore::JSattributeConstructor::finishCreation):
3098         * bindings/scripts/test/JS/JSreadonly.cpp:
3099         (WebCore::JSreadonlyConstructor::finishCreation):
3100
3101 2015-08-10  Chris Dumez  <cdumez@apple.com>
3102
3103         The 'prototype' property on interface objects should not be enumerable
3104         https://bugs.webkit.org/show_bug.cgi?id=147861
3105
3106         Reviewed by Darin Adler.
3107
3108         1. Make the 'prototype' property not enumerable on interface object to
3109            comply with the Web IDL specification [1] and to align our behavior
3110            with Firefox 38 and Chrome 44.
3111
3112         2. Also update the 'prototype' property on named constructors to have the
3113            following attributes:
3114            { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }
3115
3116            Previously, all these were true in WebKit. The new behavior complies
3117            with the Web IDL specification [2] and aligns our behavior with
3118            Firefox 38. On Chrome 44, the attributes are as follows:
3119            { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: false }
3120
3121         This behavior is also covered by the following W3C test suite:
3122         http://w3c-test.org/dom/interfaces.html
3123
3124         [1] http://heycam.github.io/webidl/#interface-object
3125         [2] http://heycam.github.io/webidl/#named-constructors
3126
3127         Test: fast/dom/prototype-property-not-enumerable.html
3128
3129         * bindings/scripts/CodeGeneratorJS.pm:
3130         (GenerateConstructorHelperMethods):
3131
3132 2015-08-10  Alex Christensen  <achristensen@webkit.org>
3133
3134         Build fix after r188239.
3135
3136         * PlatformWinCairo.cmake:
3137         MediaPlayerPrivateMediaFoundation is needed on WinCairo with video properly enabled.
3138
3139 2015-08-10  Myles C. Maxfield  <mmaxfield@apple.com>
3140
3141         Post-review fixup after r188195
3142         https://bugs.webkit.org/show_bug.cgi?id=147806
3143
3144         Unreviewed.
3145
3146         Covered by fast/text/crash-obscure-text.html.
3147
3148         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3149         (WebCore::FontPlatformData::objectForEqualityCheck):
3150
3151 2015-08-10  Alex Christensen  <achristensen@webkit.org>
3152
3153         Build TestWebKitAPI with CMake on Windows
3154         https://bugs.webkit.org/show_bug.cgi?id=147851
3155
3156         Reviewed by Chris Dumez.
3157
3158         * PlatformWin.cmake:
3159         Remove RenderThemeWin.cpp which is included in RenderingAllInOne.cpp.
3160         * WebCorePrefix.h:
3161         Include cmakeconfig.h before wtf/Platform.h like we do in JavaScriptCore's config.h to avoid warnings and redefining ENABLE_*  macros.
3162
3163 2015-08-10  Matthew Daiter  <mdaiter@apple.com>
3164
3165         HTMLMediaElement needs way to find MediaDeviceInfo
3166         https://bugs.webkit.org/show_bug.cgi?id=147842
3167
3168         Reviewed by Jer Noble.
3169
3170         * html/HTMLMediaElement.cpp:
3171         (WebCore::HTMLMediaElement::mediaPlayerMediaDeviceIdentifierStorageDirectory):
3172         * html/HTMLMediaElement.h:
3173         * page/Settings.h:
3174         (WebCore::Settings::setMediaDeviceIdentifierStorageDirectory):
3175         (WebCore::Settings::mediaDeviceIdentifierStorageDirectory):
3176         * platform/graphics/MediaPlayer.h:
3177         (WebCore::MediaPlayerClient::mediaPlayerMediaDeviceIdentifierStorageDirectory):
3178
3179 2015-08-10  Chris Dumez  <cdumez@apple.com>
3180
3181         Simplify code for making Page-cacheability decision
3182         https://bugs.webkit.org/show_bug.cgi?id=147829
3183
3184         Reviewed by Antti Koivisto.
3185
3186         Simplify code for making Page-cacheability decision by merging logging
3187         code and decision making code. Having the same checks in two places was
3188         redundant and error-prone as we needed to keep them in sync.
3189
3190         Also get rid of failure reason enum values as those have not been used
3191         in a while.
3192
3193         * history/PageCache.cpp:
3194         (WebCore::canCacheFrame):
3195         (WebCore::canCachePage):
3196         (WebCore::PageCache::canCache):
3197         (WebCore::logPageCacheFailureDiagnosticMessage): Deleted.
3198         (WebCore::PageCache::singleton): Deleted.
3199         (WebCore::PageCache::setMaxSize): Deleted.
3200         (WebCore::PageCache::frameCount): Deleted.
3201         (WebCore::PageCache::markPagesForVisitedLinkStyleRecalc): Deleted.
3202         (WebCore::PageCache::markPagesForFullStyleRecalc): Deleted.
3203         (WebCore::PageCache::markPagesForDeviceOrPageScaleChanged): Deleted.
3204         (WebCore::PageCache::markPagesForContentsSizeChanged): Deleted.
3205         (WebCore::PageCache::markPagesForCaptionPreferencesChanged): Deleted.
3206         (WebCore::pruningReasonToDiagnosticLoggingKey): Deleted.
3207         * page/DiagnosticLoggingKeys.cpp:
3208         (WebCore::DiagnosticLoggingKeys::isDisabledKey):
3209         (WebCore::DiagnosticLoggingKeys::redirectKey):
3210         (WebCore::DiagnosticLoggingKeys::replaceKey):
3211         (WebCore::DiagnosticLoggingKeys::sourceKey):
3212         (WebCore::DiagnosticLoggingKeys::underMemoryPressureKey):
3213         (WebCore::DiagnosticLoggingKeys::reloadFromOriginKey): Deleted.
3214         * page/DiagnosticLoggingKeys.h:
3215
3216 2015-08-10  Devin Rousso  <drousso@apple.com>
3217
3218         Web Inspector: [iOS] Allow inspector to retrieve a list of system fonts
3219         https://bugs.webkit.org/show_bug.cgi?id=147033
3220
3221         Reviewed by Joseph Pecoraro.
3222
3223         Implement systemFontFamilies for iOS.
3224
3225         * platform/graphics/ios/FontCacheIOS.mm:
3226         (WebCore::FontCache::systemFontFamilies):
3227
3228 2015-08-10  Devin Rousso  <drousso@apple.com>
3229
3230         Web Inspector: Invalid selectors can be applied to the stylesheet
3231         https://bugs.webkit.org/show_bug.cgi?id=147230
3232
3233         Reviewed by Timothy Hatcher.
3234
3235         * inspector/InspectorStyleSheet.cpp:
3236         (WebCore::isValidSelectorListString):
3237         (WebCore::InspectorStyleSheet::setRuleSelector):
3238         Now checks to see that the supplied selector is valid before trying to commit it to the rule.
3239         (WebCore::InspectorStyleSheet::addRule):
3240         (WebCore::checkStyleRuleSelector): Deleted.
3241
3242 2015-08-10  James Craig  <jcraig@apple.com>
3243
3244         AX: Address follow-up comments in bug 145684
3245         https://bugs.webkit.org/show_bug.cgi?id=147817
3246
3247         Reviewed by Dean Jackson.
3248
3249         Minor cleanup and style updates requested by Dean.
3250         Updated Existing Test Expectations.
3251
3252         * Modules/mediacontrols/mediaControlsApple.css:
3253         (video::-webkit-media-show-controls):
3254         * Modules/mediacontrols/mediaControlsiOS.css:
3255         (video::-webkit-media-show-controls):
3256
3257 2015-08-07  Antti Koivisto  <antti@apple.com>
3258
3259         Expand network cache tests to cover memory cache behavior
3260         https://bugs.webkit.org/show_bug.cgi?id=147783
3261
3262         Reviewed by Alexey Proskuryakov.
3263
3264         To support testing, include memory cache as a possible source type to XHR responses.
3265
3266         * loader/ResourceLoader.cpp:
3267         (WebCore::logResourceResponseSource):
3268         * loader/cache/CachedRawResource.cpp:
3269         (WebCore::CachedRawResource::didAddClient):
3270         * loader/cache/CachedResource.h:
3271         (WebCore::CachedResource::revalidationInProgress):
3272         * platform/network/ResourceResponseBase.h:
3273         * testing/Internals.cpp:
3274         (WebCore::Internals::xhrResponseSource):
3275
3276 2015-08-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3277
3278         Compile warning (-Wsign-compare) on 32-bits at WebCore/platform/FileSystem.cpp
3279         https://bugs.webkit.org/show_bug.cgi?id=146414
3280
3281         Reviewed by Darin Adler.
3282
3283         No behavioral changes.
3284
3285         * platform/FileSystem.cpp:
3286         (WebCore::MappedFileData::MappedFileData): Making use of convertSafely.
3287         * platform/posix/SharedBufferPOSIX.cpp:
3288         (WebCore::SharedBuffer::createFromReadingFile): Making use of convertSafely.
3289
3290 2015-08-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3291
3292         [Streams API] ReadableStreamReader closed promise should use CachedAttribute
3293         https://bugs.webkit.org/show_bug.cgi?id=147487
3294
3295         Reviewed by Darin Adler.
3296
3297         Covered by existing tests.
3298
3299         * Modules/streams/ReadableStreamReader.idl: Made closed a CachedAttribute.
3300         * bindings/js/JSReadableStreamReaderCustom.cpp:
3301         (WebCore::JSReadableStreamReader::closed): Updated according CachedAttribute specific field.
3302
3303 2015-08-09  Hunseop Jeong  <hs85.jeong@samsung.com>
3304
3305         [EFL] Use the non-overlay scrollbar
3306         https://bugs.webkit.org/show_bug.cgi?id=147725
3307
3308         Reviewed by Gyuyoung Kim.
3309
3310         No new tests because there is no behavior change.
3311
3312         * platform/efl/ScrollbarThemeEfl.cpp:
3313         (WebCore::ScrollbarThemeEfl::usesOverlayScrollbars):
3314         Changed the condition of the 'usesOverlayScrollbars' to use the
3315         setting value.
3316         * platform/efl/ScrollbarThemeEfl.h:
3317
3318 2015-08-09  Chris Dumez  <cdumez@apple.com>
3319
3320         Page cache doesn't work for pages actively using Geolocation
3321         https://bugs.webkit.org/show_bug.cgi?id=147785
3322         <rdar://problem/11147901>
3323
3324         Reviewed by Darin Adler.
3325
3326         Allow pages actively using Geolocation into the PageCache.
3327
3328         Tests: fast/history/page-cache-geolocation-active-oneshot.html
3329                fast/history/page-cache-geolocation-active-watcher.html
3330
3331         * Modules/geolocation/Geolocation.cpp:
3332         (WebCore::Geolocation::canSuspendForPageCache):
3333         (WebCore::Geolocation::suspend): Deleted.
3334         * history/PageCache.cpp:
3335
3336 2015-08-09  Nan Wang  <n_wang@apple.com>
3337
3338         AX: CSS table display styles can cause malformed, inaccessible AXTables to be exposed to the AX tree
3339         https://bugs.webkit.org/show_bug.cgi?id=136415
3340         <rdar://problem/22026625>
3341
3342         Reviewed by Chris Fleizach.
3343
3344         Applying CSS display styles to tables can end up inserting anonymous RenderTableRows, which is not handled well by the 
3345         accessibility code, which treats these as the actual rows. We can address this by diving deeper into anonymous nodes 
3346         and finding the real rows and cells we want. In addition, another thing also causing malformed tables is that "grid" 
3347         roles are being exposed as AXGrid instead of AXTable.
3348
3349         Test: accessibility/mac/malformed-table.html
3350
3351         * accessibility/AccessibilityARIAGrid.cpp:
3352         (WebCore::AccessibilityARIAGrid::addRowDescendant):
3353         * accessibility/AccessibilityTable.cpp:
3354         (WebCore::AccessibilityTable::addChildren):
3355         (WebCore::AccessibilityTable::addTableCellChild):
3356         (WebCore::AccessibilityTable::addChildrenFromSection):
3357         * accessibility/AccessibilityTable.h:
3358         * accessibility/AccessibilityTableCell.cpp:
3359         (WebCore::AccessibilityTableCell::parentTable):
3360         (WebCore::AccessibilityTableCell::rowIndexRange):
3361         * accessibility/AccessibilityTableRow.cpp:
3362         (WebCore::AccessibilityTableRow::parentTable):
3363         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
3364         (createAccessibilityRoleMap):
3365
3366 2015-08-08  Darin Adler  <darin@apple.com>
3367
3368         Remove -webkit-color-correction CSS property
3369         https://bugs.webkit.org/show_bug.cgi?id=147812
3370
3371         Reviewed by Maciej Stachowiak.
3372
3373         Covered by existing tests.
3374
3375         I am doing some general cleanup of handling of color spaces in WebKit.
3376         This removes the obsolete web-visible property that allowed clients to
3377         get color correction on older Apple platforms where we chose not to do
3378         it all the time for performance reasons. Currently, it has no effect on
3379         any supported platform.
3380
3381         Now that this property is removed, a website can detect that it's not
3382         there if it uses getComputedStyle, but I don't expect this to have
3383         significant compatibility fallout. It's harmless to continue using the
3384         property in legacy content or websites that have not been updated, since
3385         unknown property names are ignored and it had no effect before anyway.
3386
3387         * css/CSSComputedStyleDeclaration.cpp: Removed
3388         CSSPropertyWebkitColorCorrection from the list of computed properties.
3389         (WebCore::ComputedStyleExtractor::propertyValue): Removed the
3390         CSSPropertyWebkitColorCorrection case.
3391
3392         * css/CSSParser.cpp:
3393         (WebCore::isValidKeywordPropertyAndValue): Removed the
3394         CSSPropertyWebkitColorCorrection case.
3395         (WebCore::isKeywordPropertyID): Ditto.
3396         (WebCore::CSSParser::parseValue): Ditto.
3397
3398         * css/CSSPrimitiveValueMappings.h:
3399         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted the overload
3400         of this that converts a ColorSpace to a CSSPrimitiveValue.
3401         (WebCore::CSSPrimitiveValue::operator ColorSpace): Deleted.
3402
3403         * css/CSSPropertyNames.in: Removed -webkit-color-correction.
3404
3405         * css/CSSValueKeywords.in: Removed the -webkit-color-correction section,
3406         which contained sRGB.
3407
3408         * css/SVGCSSValueKeywords.in: Uncommented sRGB now that it's not shared
3409         with -webkit-color-correction.
3410
3411         * rendering/style/RenderStyle.h: Removed setColorSpace and initialColorSpace.
3412         Kept colorSpace around for now, but it simply returns ColorSpaceSRGB.
3413         This prevents us from needing to touch every single call site that passes
3414         the color space in to functions in the platform graphics abstraction.
3415         We'll touch most of those call sites when we change Color to include the
3416         color space and eventually we can delete this.
3417
3418         * rendering/style/StyleRareInheritedData.cpp: Deleted colorSpace.
3419         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Deleted
3420         code to initialize colorSpace and to copy colorSpace.
3421         (WebCore::StyleRareInheritedData::operator==): Deleted code to compare
3422         colorSpace.
3423
3424 2015-08-09  Eric Carlson  <eric.carlson@apple.com>
3425
3426         [Mac] Always require ExternalDeviceAutoPlayCandidate flag to AirPlay automatically
3427         https://bugs.webkit.org/show_bug.cgi?id=147801
3428
3429         Reviewed by Dean Jackson.
3430
3431         Test: http/tests/media/video-media-document-disposition-download.html
3432
3433         * Modules/mediasession/WebMediaSessionManager.cpp: