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