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