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