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