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