067623b825f414d9b8d8e7afd511fc02dbe703d2
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-08-07  Andy Estes  <aestes@apple.com>
2
3         Crash when following a Google search link to Twitter with Limit Adult Content enabled
4         https://bugs.webkit.org/show_bug.cgi?id=147651
5
6         Reviewed by Brady Eidson.
7
8         When a loaded CachedRawResource gets a new client, it synthesizes the callbacks that the new client would have
9         received while the resource was loading. Unlike a real network load, it synthesizes these callbacks in a single
10         run loop iteration. When DocumentLoader receives a redirect, and finds substitute data in the app cache for the
11         redirect URL, it schedules a timer that removes DocumentLoader as a client of the CachedRawResource then
12         synthesizes its own set of CachedRawResourceClient callbacks. But since CachedRawResource has already delivered
13         client callbacks before the app cache timer fires, DocumentLoader unexpectedly ends up getting two sets of
14         client callbacks and badness ensues.
15
16         The fix is to let CachedRawResource detect if a redirect will trigger the client to load substitute data. If so,
17         stop delivering client callbacks.
18
19         Layout test to follow.
20
21         * loader/DocumentLoader.cpp:
22         (WebCore::DocumentLoader::syntheticRedirectReceived): If there is valid substitute data, do not continue.
23         * loader/DocumentLoader.h:
24         * loader/cache/CachedRawResource.cpp: Returned early if syntheticRedirectReceived() said not to continue.
25         (WebCore::CachedRawResource::didAddClient):
26         * loader/cache/CachedRawResourceClient.h:
27         (WebCore::CachedRawResourceClient::syntheticRedirectReceived):
28
29 2015-08-06  Dean Jackson  <dino@apple.com>
30
31         Shadows don't draw on fillText when using a gradient fill
32         https://bugs.webkit.org/show_bug.cgi?id=147758
33         <rdar://problem/20860912>
34
35         Reviewed by Myles Maxfield.
36
37         Since we use a mask to render a pattern or gradient
38         into text, any shadow was being clipped out. Change
39         this to draw the shadow before the mask + fill operation,
40         using a technique similar to text-shadow.
41
42         Test: fast/canvas/gradient-text-with-shadow.html
43
44         * html/canvas/CanvasRenderingContext2D.cpp:
45         (WebCore::CanvasRenderingContext2D::drawTextInternal): Get the current shadow
46         style, paint the text with a transformed shadow offset so that we only
47         see the shadow and not the text, then combine with the existing pattern/gradient
48         fill.
49
50 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
51
52         Implement font-feature-settings
53         https://bugs.webkit.org/show_bug.cgi?id=147722
54
55         Reviewed by Simon Fraser.
56
57         Fonts with features are simply modeled as new font objects. Font
58         feature information is contained within FontDescription, and our
59         caches are correctly sensitive to this information. Therefore,
60         we just need to make our font lookup code honor the request to
61         use certain features.
62
63         This patch creates a file, FontCacheCoreText.cpp, which will be the
64         new home of all shared OS X / iOS FontCache code. Over time, I will
65         be moving more and more source into this file, until there is
66         nothing left of FontCacheMac.mm and FontCacheIOS.mm. For now, the
67         only function in this file is the code which applies font features.
68
69         Test: css3/font-feature-settings-preinstalled-fonts.html
70
71         * WebCore.xcodeproj/project.pbxproj: Add FontCacheCoreText.cpp.
72         * platform/graphics/FontCache.h:
73         * platform/graphics/cocoa/FontCacheCoreText.cpp: Added.
74         (WebCore::appendTrueTypeFeature): What the name says.
75         (WebCore::appendOpenTypeFeature): Ditto.
76         (WebCore::applyFontFeatureSettings): Ditto.
77         * platform/graphics/ios/FontCacheIOS.mm:
78         (WebCore::FontCache::getSystemFontFallbackForCharacters): Call
79         applyFontFeatureSettings().
80         (WebCore::FontCache::createFontPlatformData): Ditto.
81         * platform/graphics/mac/FontCacheMac.mm:
82         (WebCore::fontWithFamily): Ditto.
83         (WebCore::FontCache::systemFallbackForCharacters): Ditto.
84         (WebCore::FontCache::createFontPlatformData): Ditto.
85         * platform/graphics/mac/FontCustomPlatformData.cpp:
86         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
87         * rendering/RenderThemeIOS.mm:
88         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
89         Ditto.
90
91 2015-08-07  Commit Queue  <commit-queue@webkit.org>
92
93         Unreviewed, rolling out r187907.
94         https://bugs.webkit.org/show_bug.cgi?id=147789
95
96         taking a different approach to the fix (Requested by estes on
97         #webkit).
98
99         Reverted changeset:
100
101         "Crash when following a Google search link to Twitter with
102         Limit Adult Content enabled."
103         https://bugs.webkit.org/show_bug.cgi?id=147651
104         http://trac.webkit.org/changeset/187907
105
106 2015-08-07  Alex Christensen  <achristensen@webkit.org>
107
108         Fix WinCairo build after r188130.
109
110         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
111         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
112         (WebCore::FontCustomPlatformData::fontPlatformData):
113         I forgot the parameter name.
114
115 2015-08-07  Alex Christensen  <achristensen@webkit.org>
116
117         Fix WinCairo build after r188130.
118
119         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
120         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
121         (WebCore::FontCustomPlatformData::fontPlatformData):
122         Update fontPlatformData parameters.
123
124 2015-08-07  Daniel Bates  <dabates@apple.com>
125
126         Attempt to fix the Windows build after <http://trac.webkit.org/changeset/188130>
127         (https://bugs.webkit.org/show_bug.cgi?id=147775)
128
129         Include header FontDescription.h.
130
131         * platform/graphics/win/FontCustomPlatformData.cpp:
132         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
133
134 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
135
136         Allow FontCustomPlatformData to consult with FontDescription
137         https://bugs.webkit.org/show_bug.cgi?id=147775
138
139         Reviewed by Zalan Bujtas.
140
141         In order to implement font-feature-settings, web fonts need to be
142         able to consult with the set of active font features. Rather than
143         add yet another argument to all the functions in this flow, this
144         patch passes around a reference to the FontDescription itself instead
145         of copies of constituent members of it.
146
147         No new tests because there is no behavior change.
148
149         * css/CSSFontFaceSource.cpp:
150         (WebCore::CSSFontFaceSource::font):
151         * loader/cache/CachedFont.cpp:
152         (WebCore::CachedFont::createFont):
153         (WebCore::CachedFont::platformDataFromCustomData):
154         * loader/cache/CachedFont.h:
155         * loader/cache/CachedSVGFont.cpp:
156         (WebCore::CachedSVGFont::platformDataFromCustomData):
157         * loader/cache/CachedSVGFont.h:
158         * platform/graphics/cairo/FontCustomPlatformData.h:
159         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
160         (WebCore::FontCustomPlatformData::fontPlatformData):
161         * platform/graphics/freetype/FontPlatformData.h:
162         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
163         (WebCore::FontPlatformData::FontPlatformData):
164         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
165         (WebCore::Font::platformCreateScaledFont):
166         * platform/graphics/mac/FontCustomPlatformData.cpp:
167         (WebCore::FontCustomPlatformData::fontPlatformData):
168         * platform/graphics/mac/FontCustomPlatformData.h:
169         * platform/graphics/win/FontCustomPlatformData.cpp:
170         (WebCore::FontCustomPlatformData::fontPlatformData):
171         * platform/graphics/win/FontCustomPlatformData.h:
172
173 2015-08-07  Xabier Rodriguez Calvar  <calvaris@igalia.com>
174
175         [Streams API] Create CountQueuingStrategy object as per spec
176         https://bugs.webkit.org/show_bug.cgi?id=146594
177
178         Reviewed by Geoffrey Garen.
179
180         CountQueuingStrategy is a class part of the Streams API that can be found at
181         https://streams.spec.whatwg.org/#cqs-class. We had it as js at the tests but the spec says we have to provide it
182         natively. The class is implemented in this patch by creating its corresponding IDL with the size method using
183         the [CustomBinding] attribute, that does not create any bindings against the object allowing us full control to
184         do what the spec requires (just returning 1 without any cast check). The constructor sets the highWaterMark
185         property taking it from the argument.
186
187         Covered by current tests
188         (LayoutTests/streams/reference-implementation/count-queuing-strategy.html and
189         LayoutTests/streams/reference-implementation/brand-checks.html).
190
191         * CMakeLists.txt:
192         * DerivedSources.cpp:
193         * DerivedSources.make:
194         * PlatformMac.cmake:
195         * WebCore.vcxproj/WebCore.vcxproj:
196         * WebCore.vcxproj/WebCore.vcxproj.filters:
197         * WebCore.xcodeproj/project.pbxproj:
198         * bindings/js/JSBindingsAllInOne.cpp: Build infrastructure.
199         * Modules/streams/CountQueuingStrategy.h: Added.
200         (WebCore::CountQueuingStrategy::~CountQueuingStrategy): Created empty.
201         (WebCore::CountQueuingStrategy::size): Returns 1.
202         * Modules/streams/CountQueuingStrategy.idl: Added.
203         * bindings/js/JSCountQueuingStrategyCustom.cpp: Added.
204         (WebCore::jsCountQueuingStrategyPrototypeFunctionSize): Calls WebCore::CountQueuingStrategy::size.
205         (WebCore::constructJSCountQueuingStrategy): Constructs the strategy, copies the highWaterMark from the argument
206         and returns it.
207         * bindings/js/JSDOMBinding.h:
208         (WebCore::getPropertyFromObject): Moved from ReadableJSStream.cpp.
209         (WebCore::setPropertyToObject): Added to create a property into an object.
210         * bindings/js/ReadableJSStream.cpp:
211         (WebCore::getPropertyFromObject): Deleted.
212
213 2015-08-07  Brady Eidson  <beidson@apple.com>
214
215         Move concrete KeyedDecoder/Encoder implementations to WebCore.
216         https://bugs.webkit.org/show_bug.cgi?id=147757.
217
218         Rubberstamped by Andy Estes.
219
220         * PlatformEfl.cmake:
221         * PlatformGTK.cmake:
222         * WebCore.xcodeproj/project.pbxproj:
223
224         * platform/KeyedCoding.h:
225         (WebCore::KeyedDecoder::KeyedDecoder): Static constructor to be implemented per-platform.
226         (WebCore::KeyedEncoder::KeyedEncoder): Ditto.
227
228         * platform/cf/KeyedDecoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.cpp.
229         (WebCore::KeyedDecoder::decoder):
230         (WebCore::KeyedDecoderCF::KeyedDecoderCF):
231         (WebCore::KeyedDecoderCF::~KeyedDecoderCF):
232         (WebCore::KeyedDecoderCF::decodeBytes):
233         (WebCore::KeyedDecoderCF::decodeBool):
234         (WebCore::KeyedDecoderCF::decodeUInt32):
235         (WebCore::KeyedDecoderCF::decodeInt32):
236         (WebCore::KeyedDecoderCF::decodeInt64):
237         (WebCore::KeyedDecoderCF::decodeFloat):
238         (WebCore::KeyedDecoderCF::decodeDouble):
239         (WebCore::KeyedDecoderCF::decodeString):
240         (WebCore::KeyedDecoderCF::beginObject):
241         (WebCore::KeyedDecoderCF::endObject):
242         (WebCore::KeyedDecoderCF::beginArray):
243         (WebCore::KeyedDecoderCF::beginArrayElement):
244         (WebCore::KeyedDecoderCF::endArrayElement):
245         (WebCore::KeyedDecoderCF::endArray):
246         * platform/cf/KeyedDecoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.h.
247         
248         * platform/cf/KeyedEncoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.cpp.
249         (WebCore::KeyedEncoder::encoder):
250         (WebCore::createDictionary):
251         (WebCore::KeyedEncoderCF::KeyedEncoderCF):
252         (WebCore::KeyedEncoderCF::~KeyedEncoderCF):
253         (WebCore::KeyedEncoderCF::encodeBytes):
254         (WebCore::KeyedEncoderCF::encodeBool):
255         (WebCore::KeyedEncoderCF::encodeUInt32):
256         (WebCore::KeyedEncoderCF::encodeInt32):
257         (WebCore::KeyedEncoderCF::encodeInt64):
258         (WebCore::KeyedEncoderCF::encodeFloat):
259         (WebCore::KeyedEncoderCF::encodeDouble):
260         (WebCore::KeyedEncoderCF::encodeString):
261         (WebCore::KeyedEncoderCF::beginObject):
262         (WebCore::KeyedEncoderCF::endObject):
263         (WebCore::KeyedEncoderCF::beginArray):
264         (WebCore::KeyedEncoderCF::beginArrayElement):
265         (WebCore::KeyedEncoderCF::endArrayElement):
266         (WebCore::KeyedEncoderCF::endArray):
267         (WebCore::KeyedEncoderCF::finishEncoding):
268         * platform/cf/KeyedEncoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.h.
269         
270         * platform/glib/KeyedDecoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.cpp.
271         (WebCore::KeyedDecoder::decoder):
272         (WebCore::KeyedDecoderGlib::KeyedDecoderGlib):
273         (WebCore::KeyedDecoderGlib::~KeyedDecoderGlib):
274         (WebCore::KeyedDecoderGlib::dictionaryFromGVariant):
275         (WebCore::KeyedDecoderGlib::decodeBytes):
276         (WebCore::KeyedDecoderGlib::decodeSimpleValue):
277         (WebCore::KeyedDecoderGlib::decodeBool):
278         (WebCore::KeyedDecoderGlib::decodeUInt32):
279         (WebCore::KeyedDecoderGlib::decodeInt32):
280         (WebCore::KeyedDecoderGlib::decodeInt64):
281         (WebCore::KeyedDecoderGlib::decodeFloat):
282         (WebCore::KeyedDecoderGlib::decodeDouble):
283         (WebCore::KeyedDecoderGlib::decodeString):
284         (WebCore::KeyedDecoderGlib::beginObject):
285         (WebCore::KeyedDecoderGlib::endObject):
286         (WebCore::KeyedDecoderGlib::beginArray):
287         (WebCore::KeyedDecoderGlib::beginArrayElement):
288         (WebCore::KeyedDecoderGlib::endArrayElement):
289         (WebCore::KeyedDecoderGlib::endArray):
290         * platform/glib/KeyedDecoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.h.
291         
292         * platform/glib/KeyedEncoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.cpp.
293         (WebCore::KeyedEncoder::encoder):
294         (WebCore::KeyedEncoderGlib::KeyedEncoderGlib):
295         (WebCore::KeyedEncoderGlib::~KeyedEncoderGlib):
296         (WebCore::KeyedEncoderGlib::encodeBytes):
297         (WebCore::KeyedEncoderGlib::encodeBool):
298         (WebCore::KeyedEncoderGlib::encodeUInt32):
299         (WebCore::KeyedEncoderGlib::encodeInt32):
300         (WebCore::KeyedEncoderGlib::encodeInt64):
301         (WebCore::KeyedEncoderGlib::encodeFloat):
302         (WebCore::KeyedEncoderGlib::encodeDouble):
303         (WebCore::KeyedEncoderGlib::encodeString):
304         (WebCore::KeyedEncoderGlib::beginObject):
305         (WebCore::KeyedEncoderGlib::endObject):
306         (WebCore::KeyedEncoderGlib::beginArray):
307         (WebCore::KeyedEncoderGlib::beginArrayElement):
308         (WebCore::KeyedEncoderGlib::endArrayElement):
309         (WebCore::KeyedEncoderGlib::endArray):
310         (WebCore::KeyedEncoderGlib::finishEncoding):
311         * platform/glib/KeyedEncoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.h.
312
313 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
314
315         [GStreamer] Do not automatically show PackageKit codec installation notifications
316         https://bugs.webkit.org/show_bug.cgi?id=135973
317
318         Reviewed by Philippe Normand.
319
320         Add description parameter to requestInstallMissingPlugins() that
321         will be used by the API layer.
322
323         * html/HTMLMediaElement.cpp:
324         (WebCore::HTMLMediaElement::requestInstallMissingPlugins):
325         * html/HTMLMediaElement.h:
326         * page/ChromeClient.h:
327         * platform/graphics/MediaPlayer.h:
328         (WebCore::MediaPlayerClient::requestInstallMissingPlugins):
329         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
330         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
331
332 2015-08-07  Doug Russell  <d_russell@apple.com>
333
334         AX: Bug 147737 is causing test failures in Mavericks WK1
335         https://bugs.webkit.org/show_bug.cgi?id=147763
336
337         Restrict change made in 147737 to ElCapitan+ because it is causing tests
338         to fail in Mavericks.
339
340         Reviewed by Chris Fleizach.
341
342         Fixes failing tests.
343
344         * accessibility/AXObjectCache.cpp:
345         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):
346
347 2015-08-07  Xabier Rodriguez Calvar  <calvaris@igalia.com>
348
349         Create [CustomBinding] extended IDL attribute
350         https://bugs.webkit.org/show_bug.cgi?id=146593
351
352         Reviewed by Geoffrey Garen.
353
354         Added the [CustomBinding] IDL extended attribute. The idea is that when using this attribute, bindings generate
355         only the signature of the JS functions and we have to implement all the access in the Custom.cpp files, meaning
356         accessing the implementations at our wish.
357
358         Added customBindingMethod, customBindingMethodWithArgs to the generator tests.
359
360         * bindings/scripts/CodeGeneratorGObject.pm:
361         (SkipFunction): Skipped [CustomBinding] methods.
362         * bindings/scripts/CodeGeneratorJS.pm:
363         (GenerateHeader): Consider CustomBinding as ForwardDeclareInHeader.
364         (GenerateImplementation): Avoid printing both header and implementation of the function.
365         * bindings/scripts/CodeGeneratorObjC.pm:
366         (SkipFunction): Skipped [CustomBinding] methods.
367         * bindings/scripts/IDLAttributes.txt: Added [CustomBinding] IDL extended attribute.
368         * bindings/scripts/test/JS/JSTestObj.cpp:
369         * bindings/scripts/test/TestObj.idl: Added customBindingMethod, customBindingMethodWithArgs and their
370         expectations.
371
372 2015-08-06  Zan Dobersek  <zdobersek@igalia.com>
373
374         Source/WebCore/crypto code should pass std::function<> objects through rvalue references
375         https://bugs.webkit.org/show_bug.cgi?id=147332
376
377         Reviewed by Anders Carlsson.
378
379         Pass the std::function<> callbacks through CryptoAlgorithm methods via
380         rvlaue references. This avoids generation of unnecessary move and copy
381         constructors for std::function<> objects that are being handled.
382
383         * crypto/CryptoAlgorithm.cpp:
384         (WebCore::CryptoAlgorithm::encrypt):
385         (WebCore::CryptoAlgorithm::decrypt):
386         (WebCore::CryptoAlgorithm::sign):
387         (WebCore::CryptoAlgorithm::verify):
388         (WebCore::CryptoAlgorithm::digest):
389         (WebCore::CryptoAlgorithm::generateKey):
390         (WebCore::CryptoAlgorithm::deriveKey):
391         (WebCore::CryptoAlgorithm::deriveBits):
392         (WebCore::CryptoAlgorithm::importKey):
393         (WebCore::CryptoAlgorithm::encryptForWrapKey):
394         (WebCore::CryptoAlgorithm::decryptForUnwrapKey):
395         * crypto/CryptoAlgorithm.h:
396         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
397         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
398         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
399         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
400         (WebCore::CryptoAlgorithmAES_CBC::importKey):
401         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
402         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
403         (WebCore::CryptoAlgorithmAES_KW::encryptForWrapKey):
404         (WebCore::CryptoAlgorithmAES_KW::decryptForUnwrapKey):
405         (WebCore::CryptoAlgorithmAES_KW::generateKey):
406         (WebCore::CryptoAlgorithmAES_KW::importKey):
407         * crypto/algorithms/CryptoAlgorithmAES_KW.h:
408         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
409         (WebCore::CryptoAlgorithmHMAC::sign):
410         (WebCore::CryptoAlgorithmHMAC::verify):
411         (WebCore::CryptoAlgorithmHMAC::generateKey):
412         (WebCore::CryptoAlgorithmHMAC::importKey):
413         * crypto/algorithms/CryptoAlgorithmHMAC.h:
414         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
415         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
416         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
417         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
418         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
419         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
420         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
421         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
422         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
423         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
424         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
425         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
426         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
427         (WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
428         (WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
429         (WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
430         (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
431         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
432         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
433         (WebCore::CryptoAlgorithmSHA1::digest):
434         * crypto/algorithms/CryptoAlgorithmSHA1.h:
435         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
436         (WebCore::CryptoAlgorithmSHA224::digest):
437         * crypto/algorithms/CryptoAlgorithmSHA224.h:
438         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
439         (WebCore::CryptoAlgorithmSHA256::digest):
440         * crypto/algorithms/CryptoAlgorithmSHA256.h:
441         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
442         (WebCore::CryptoAlgorithmSHA384::digest):
443         * crypto/algorithms/CryptoAlgorithmSHA384.h:
444         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
445         (WebCore::CryptoAlgorithmSHA512::digest):
446         * crypto/algorithms/CryptoAlgorithmSHA512.h:
447         * crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:
448         (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
449         (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
450         * crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp:
451         (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
452         (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
453         * crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp:
454         (WebCore::CryptoAlgorithmHMAC::platformSign):
455         (WebCore::CryptoAlgorithmHMAC::platformVerify):
456         * crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:
457         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
458         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
459         * crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp:
460         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
461         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
462         * crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:
463         (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
464         (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
465         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
466         (WebCore::transformAES_CBC):
467         (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
468         (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
469         * crypto/mac/CryptoAlgorithmAES_KWMac.cpp:
470         (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
471         (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
472         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
473         (WebCore::CryptoAlgorithmHMAC::platformSign):
474         (WebCore::CryptoAlgorithmHMAC::platformVerify):
475         * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
476         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
477         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
478         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
479         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
480         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
481         * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
482         (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
483         (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
484
485 2015-08-06  Alex Christensen  <achristensen@webkit.org>
486
487         Fix GTK clean build after r187997
488         https://bugs.webkit.org/show_bug.cgi?id=147723
489
490         Reviewed by Gyuyoung Kim.
491
492         * CMakeLists.txt:
493         r187997 made it so WebCoreTestSupport does not link with WebCore, which is necessary to get DumpRenderTree to link.
494         It also made it so WebCoreTestSupport is no longer dependent on WebCore, which causes it to build at the same time.
495         This caused problems because WebCoreTestSupport uses headers that are generated for WebCore, such as WebKitFontFamilyNames.h.
496         Adding a dependency makes it so that WebCoreTestSupport waits until WebCore is done compiling before compiling,
497         which is what it used to do, but it does not cause linking problems with DumpRenderTree.
498
499 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
500
501         CSSSegmentedFontFace::fontRanges() does not handle duplicate fonts correctly
502         https://bugs.webkit.org/show_bug.cgi?id=147765
503
504         Reviewed by Filip Pizlo.
505
506         CSSSegmentedFontFace::fontRanges() was trying to hash on FontDescriptors by
507         picking a few specific pieces of data out of the FontDescriptor, computing
508         a hash on it, and using that unsigned as a key in a HashMap. This has two
509         problems: it doesn't handle equality correctly, as hash collisions cannot
510         depend on an equality operator to dedup, and it doesn't hash on all the
511         members of a FontDescription.
512
513         Instead, this HashMap should use FontDescriptionKey, which represents a
514         FontDescription, and is designed exactly for the purpose of being used as a
515         key in a HashMap.
516
517         No new tests because there is no behavior change (because a problem occurs
518         when two different FontDescriptions hash to the same value, which is rare).
519
520         * css/CSSSegmentedFontFace.cpp:
521         (WebCore::CSSSegmentedFontFace::fontRanges):
522         * css/CSSSegmentedFontFace.h:
523         * platform/graphics/FontCache.h:
524         (WebCore::FontDescriptionKeyHash::hash):
525         (WebCore::FontDescriptionKeyHash::equal):
526
527 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
528
529         [iOS] Remove dead code from FontCache::createFontPlatformData()
530         https://bugs.webkit.org/show_bug.cgi?id=147762
531
532         Reviewed by Andy Estes.
533
534         No new tests because there is no behavior change.
535
536         * platform/graphics/ios/FontCacheIOS.mm:
537         (WebCore::FontCache::createFontPlatformData): Deleted.
538
539 2015-08-06  Alex Christensen  <achristensen@webkit.org>
540
541         Revert part of my "build fix" in r188101.
542
543         * CMakeLists.txt:
544         MockCDM was already conditionally added to WebCore_SOURCES, and that change causes dependency cycles when bug 147723 is fixed.
545
546 2015-08-06  Alex Christensen  <achristensen@webkit.org>
547
548         [Win] CMake build fix after r188098.
549
550         * CMakeLists.txt:
551         MockCDM is necessary for testing if ENCRYPTED_MEDIA_V2 is enabled.
552
553 2015-08-06  Alex Christensen  <achristensen@webkit.org>
554
555         [Win] Enable all Windows features in CMake
556         https://bugs.webkit.org/show_bug.cgi?id=147744
557
558         Reviewed by Tim Horton.
559
560         * PlatformWin.cmake:
561         Add a file needed for enabling video.
562
563 2015-08-06  Anders Carlsson  <andersca@apple.com>
564
565         Rename SQLStatementBackend to SQLStatement
566         https://bugs.webkit.org/show_bug.cgi?id=147755
567
568         Reviewed by Geoffrey Garen.
569
570         * CMakeLists.txt:
571         * Modules/webdatabase/SQLStatement.h: Renamed from Source/WebCore/Modules/webdatabase/SQLStatementBackend.h.
572         (WebCore::SQLStatement::hasStatementCallback):
573         (WebCore::SQLStatement::hasStatementErrorCallback):
574         * Modules/webdatabase/SQLStatementBackend.cpp: Removed.
575         (WebCore::SQLStatementBackend::SQLStatementBackend): Deleted.
576         (WebCore::SQLStatementBackend::~SQLStatementBackend): Deleted.
577         (WebCore::SQLStatementBackend::sqlError): Deleted.
578         (WebCore::SQLStatementBackend::sqlResultSet): Deleted.
579         (WebCore::SQLStatementBackend::execute): Deleted.
580         (WebCore::SQLStatementBackend::performCallback): Deleted.
581         (WebCore::SQLStatementBackend::setDatabaseDeletedError): Deleted.
582         (WebCore::SQLStatementBackend::setVersionMismatchedError): Deleted.
583         (WebCore::SQLStatementBackend::setFailureDueToQuota): Deleted.
584         (WebCore::SQLStatementBackend::clearFailureDueToQuota): Deleted.
585         (WebCore::SQLStatementBackend::lastExecutionFailedDueToQuota): Deleted.
586         * Modules/webdatabase/SQLStatementBackend.h:
587         (WebCore::SQLStatementBackend::hasStatementCallback): Deleted.
588         (WebCore::SQLStatementBackend::hasStatementErrorCallback): Deleted.
589         * Modules/webdatabase/SQLTransaction.cpp:
590         (WebCore::SQLTransaction::deliverStatementCallback):
591         (WebCore::SQLTransaction::executeSQL):
592         * Modules/webdatabase/SQLTransactionBackend.cpp:
593         (WebCore::SQLTransactionBackend::currentStatement):
594         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
595         (WebCore::SQLTransactionBackend::executeSQL):
596         * Modules/webdatabase/SQLTransactionBackend.h:
597         * WebCore.vcxproj/WebCore.vcxproj:
598         * WebCore.vcxproj/WebCore.vcxproj.filters:
599         * WebCore.xcodeproj/project.pbxproj:
600
601 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
602
603         Make FontDescriptionKey sensitive to FontFeatureSettings
604         https://bugs.webkit.org/show_bug.cgi?id=147751
605
606         Reviewed by Anders Carlsson.
607
608         Just like how FontDescription hashes should be sensitive to locale, they should
609         also be sensitive to font features.
610
611         This patch also fixes operator== for FontDescriptionKey, which was previously
612         comparing hashes for equality instead of the underlying data. Comparing hashes
613         for equality is useless inside hashmaps.
614
615         This is in preparation for implementing font-feature-settings.
616
617         No new tests because there is no behavior change.
618
619         * platform/graphics/FontCache.cpp:
620         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
621         (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
622         (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize): Deleted.
623         * platform/graphics/FontCache.h:
624         (WebCore::FontDescriptionKey::FontDescriptionKey):
625         (WebCore::FontDescriptionKey::operator==):
626         (WebCore::FontDescriptionKey::operator!=):
627         (WebCore::FontDescriptionKey::isHashTableDeletedValue):
628         (WebCore::FontDescriptionKey::computeHash):
629         * platform/graphics/FontFeatureSettings.cpp:
630         (WebCore::FontFeature::hash):
631         (WebCore::FontFeatureSettings::hash):
632         * platform/graphics/FontFeatureSettings.h:
633
634 2015-08-06  Anders Carlsson  <andersca@apple.com>
635
636         Merge SQLStatement into SQLStatementBackend
637         https://bugs.webkit.org/show_bug.cgi?id=147754
638
639         Reviewed by Geoffrey Garen.
640
641         * CMakeLists.txt:
642         * Modules/webdatabase/Database.h:
643         * Modules/webdatabase/SQLStatement.cpp: Removed.
644         (WebCore::SQLStatement::SQLStatement): Deleted.
645         (WebCore::SQLStatement::setBackend): Deleted.
646         (WebCore::SQLStatement::hasCallback): Deleted.
647         (WebCore::SQLStatement::hasErrorCallback): Deleted.
648         (WebCore::SQLStatement::performCallback): Deleted.
649         * Modules/webdatabase/SQLStatement.h: Removed.
650         * Modules/webdatabase/SQLStatementBackend.cpp:
651         (WebCore::SQLStatementBackend::SQLStatementBackend):
652         (WebCore::SQLStatementBackend::performCallback):
653         (WebCore::SQLStatementBackend::frontend): Deleted.
654         * Modules/webdatabase/SQLStatementBackend.h:
655         (WebCore::SQLStatementBackend::hasStatementCallback):
656         (WebCore::SQLStatementBackend::hasStatementErrorCallback):
657         * Modules/webdatabase/SQLTransaction.cpp:
658         (WebCore::SQLTransaction::deliverStatementCallback):
659         (WebCore::SQLTransaction::executeSQL):
660         * Modules/webdatabase/SQLTransaction.h:
661         * Modules/webdatabase/SQLTransactionBackend.cpp:
662         (WebCore::SQLTransactionBackend::currentStatement):
663         (WebCore::SQLTransactionBackend::executeSQL):
664         * Modules/webdatabase/SQLTransactionBackend.h:
665         * WebCore.vcxproj/WebCore.vcxproj:
666         * WebCore.vcxproj/WebCore.vcxproj.filters:
667         * WebCore.xcodeproj/project.pbxproj:
668         * bindings/js/JSSQLTransactionCustom.cpp:
669
670 2015-08-06  Chris Dumez  <cdumez@apple.com>
671
672         Toggle GPS state based on page visibility to save battery
673         https://bugs.webkit.org/show_bug.cgi?id=147685
674
675         Reviewed by Benjamin Poulain.
676
677         Toggle GPS state based on page visibility to save battery. Previously,
678         if the site you were viewing was watching your position and you
679         switched tab, the GPS would stay on. This was bad for battery life.
680
681         Tests: fast/dom/Geolocation/startUpdatingOnlyWhenPageVisible.html
682                fast/dom/Geolocation/stopUpdatingForHiddenPage.html
683
684         * Modules/geolocation/GeolocationController.cpp:
685         (WebCore::GeolocationController::addObserver):
686         (WebCore::GeolocationController::viewStateDidChange):
687
688 2015-08-06  Anders Carlsson  <andersca@apple.com>
689
690         SQLStatementBackend doesn't need to be refcounted
691         https://bugs.webkit.org/show_bug.cgi?id=147748
692
693         Reviewed by Geoffrey Garen.
694
695         There's no shared ownership of SQLStatementBackend so we can just use std::unique_ptr.
696
697         * Modules/webdatabase/SQLStatementBackend.cpp:
698         (WebCore::SQLStatementBackend::create): Deleted.
699         * Modules/webdatabase/SQLStatementBackend.h:
700         * Modules/webdatabase/SQLTransactionBackend.cpp:
701         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
702         (WebCore::SQLTransactionBackend::executeSQL):
703         * Modules/webdatabase/SQLTransactionBackend.h:
704
705 2015-08-06  Eric Carlson  <eric.carlson@apple.com>
706
707         Do not enforce "content-disposition: attachment" sandbox restrictions on a MediaDocument
708         https://bugs.webkit.org/show_bug.cgi?id=147734
709         rdar://problem/22028179
710
711         Reviewed by Andy Estes.
712
713         Test to follow, see https://bugs.webkit.org/show_bug.cgi?id=147735
714
715         * dom/Document.cpp:
716         (WebCore::Document::initSecurityContext): Use applyContentDispositionAttachmentSandbox
717           instead of setting sandbox flags directly.
718         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Don't special
719           case MediaDocument.
720         (WebCore::Document::applyContentDispositionAttachmentSandbox): Apply sandbox flags
721           according to document type.
722         * dom/Document.h:
723
724 2015-08-06  Anders Carlsson  <andersca@apple.com>
725
726         Get rid of DatabaseBackendBase
727         https://bugs.webkit.org/show_bug.cgi?id=147733
728
729         Reviewed by Geoffrey Garen.
730
731         * CMakeLists.txt:
732         * Modules/webdatabase/Database.cpp:
733         (WebCore::Database::Database):
734         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
735         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
736         * Modules/webdatabase/Database.h:
737         * Modules/webdatabase/DatabaseBackendBase.cpp: Removed.
738         (WebCore::DatabaseBackendBase::DatabaseBackendBase): Deleted.
739         (WebCore::DatabaseBackendBase::~DatabaseBackendBase): Deleted.
740         * Modules/webdatabase/DatabaseBackendBase.h: Removed.
741         * Modules/webdatabase/DatabaseManager.cpp:
742         * Modules/webdatabase/DatabaseManager.h:
743         * Modules/webdatabase/DatabaseTracker.cpp:
744         * WebCore.vcxproj/WebCore.vcxproj:
745         * WebCore.vcxproj/WebCore.vcxproj.filters:
746         * WebCore.xcodeproj/project.pbxproj:
747
748 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
749
750         Add comment to CSSParserString
751         https://bugs.webkit.org/show_bug.cgi?id=147724
752
753         Reviewed by Dean Jackson.
754
755         No new tests because there is no behavior change.
756
757         * css/CSSParserValues.h:
758
759 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
760
761         Font feature settings comparisons are order-dependent and case-dependent
762         https://bugs.webkit.org/show_bug.cgi?id=147719
763
764         Reviewed by Benjamin Poulain.
765
766         We should make our settings vector order-independent and case-independent.
767
768         Test: css3/font-feature-settings-parsing.html
769
770         * css/CSSParser.cpp:
771         (WebCore::CSSParser::parseFontFeatureTag):
772         * css/StyleBuilderConverter.h:
773         (WebCore::StyleBuilderConverter::convertFontFeatureSettings):
774         * platform/graphics/FontFeatureSettings.cpp:
775         (WebCore::FontFeature::FontFeature):
776         (WebCore::FontFeature::operator==):
777         (WebCore::FontFeatureSettings::FontFeatureSettings):
778         * platform/graphics/FontFeatureSettings.h:
779         (WebCore::FontFeature::FontFeature):
780         (WebCore::FontFeature::operator==):
781         (WebCore::FontFeature::operator<):
782         (WebCore::FontFeatureSettings::insert):
783         (WebCore::FontFeatureSettings::FontFeatureSettings):
784         (WebCore::FontFeatureSettings::append): Deleted.
785
786 2015-08-06  Doug Russell  <d_russell@apple.com>
787
788         AX: AXLoadComplete that comes before AX API access won't fire
789         https://bugs.webkit.org/show_bug.cgi?id=147737
790
791         Reviewed by Chris Fleizach.
792
793         Treat setEnhancedUserInterfaceAccessibility() as AX API access and if true,
794         enableAccessibility().
795
796         Test: accessibility/mac/loaded-notification.html
797
798         * accessibility/AXObjectCache.cpp:
799         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):
800
801 2015-08-06  Eric Carlson  <eric.carlson@apple.com>
802
803         Do not enforce "content-disposition: attachment" sandbox restrictions on a MediaDocument
804         https://bugs.webkit.org/show_bug.cgi?id=147734
805         rdar://problem/22028179
806
807         Reviewed by Dean Jackson.
808
809         Test to follow, see https://bugs.webkit.org/show_bug.cgi?id=147735
810
811         * dom/Document.cpp:
812         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Return
813           early if the Document is a MediaDocument.
814
815 2015-08-06  Matt Rajca  <mrajca@apple.com>
816
817         Media Session: remove media elements from the ID <-> element map on destruction
818         https://bugs.webkit.org/show_bug.cgi?id=147707
819
820         Reviewed by Eric Carlson.
821
822         * html/HTMLMediaElement.cpp:
823         (WebCore::HTMLMediaElement::~HTMLMediaElement):
824
825 2015-08-06  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
826
827         [CoordinatedGraphics] Remove unused functions in Coordinated TiledBackingStore
828         https://bugs.webkit.org/show_bug.cgi?id=147621
829
830         Reviewed by Csaba Osztrogonác.
831
832         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Remove setTileSize() and tileSize().
833         (WebCore::TiledBackingStore::setTileSize):
834
835 2015-08-06  Anders Carlsson  <andersca@apple.com>
836
837         Move the last remnants of DatabaseBackendBase to Database
838         https://bugs.webkit.org/show_bug.cgi?id=147730
839
840         Reviewed by Tim Horton.
841
842         * Modules/webdatabase/Database.cpp:
843         (WebCore::Database::Database):
844         (WebCore::Database::performOpenAndVerify):
845         * Modules/webdatabase/Database.h:
846         * Modules/webdatabase/DatabaseBackendBase.cpp:
847         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
848         * Modules/webdatabase/DatabaseBackendBase.h:
849         (WebCore::DatabaseBackendBase::databaseContext): Deleted.
850         (WebCore::DatabaseBackendBase::setFrontend): Deleted.
851
852 2015-08-06  Alex Christensen  <achristensen@webkit.org>
853
854         Fix build without ENABLE(VIDEO) after r188030.
855
856         * dom/Document.h:
857         * html/HTMLMediaElement.cpp:
858         * html/HTMLMediaElement.h:
859         Move definition of HTMLMediaElementInvalidID to Document.h so it can be used outside of ENABLE(VIDEO) macros.
860
861 2015-08-04  Matt Rajca  <mrajca@apple.com>
862
863         Media Session: push paused state to the media session focus manager instead of polling
864         https://bugs.webkit.org/show_bug.cgi?id=147633
865
866         Reviewed by Simon Fraser.
867
868         * dom/Document.cpp:
869         (WebCore::Document::updateIsPlayingMedia): If a valid source element ID is passed in, set the 'IsSourcePlaying'
870          flag accordingly.
871         * dom/Document.h:
872         * html/HTMLMediaElement.cpp:
873         (WebCore::HTMLMediaElement::elementWithID):
874         (WebCore::HTMLMediaElement::setMuted): Pass along the element ID.
875         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
876         (WebCore::HTMLMediaElement::setPlaying): Ditto.
877         * html/HTMLMediaElement.h:
878         * page/ChromeClient.h:
879         * page/MediaProducer.h:
880         * page/Page.cpp:
881         (WebCore::Page::updateIsPlayingMedia): Pass along the source element ID.
882         (WebCore::Page::isMediaElementPaused): Deleted. We now push media playback state changes instead of polling.
883         * page/Page.h:
884
885 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
886
887         CharacterFallbackMapKey should be locale-specific
888         https://bugs.webkit.org/show_bug.cgi?id=147532
889
890         Reviewed by Dean Jackson.
891
892         This is in preparation for locale-specific font fallback.
893
894         No new tests because there is no behavior change.
895
896         * platform/graphics/Font.cpp:
897         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
898         (WebCore::CharacterFallbackMapKey::operator==):
899         (WebCore::CharacterFallbackMapKeyHash::hash):
900         (WebCore::Font::systemFallbackFontForCharacter):
901
902 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
903
904         Expand CharacterFallbackMapKey to a struct
905         https://bugs.webkit.org/show_bug.cgi?id=147530
906
907         Reviewed by Dean Jackson.
908
909         This is in prepraration for making this struct locale-specific.
910
911         No new tests because there is no behavior change.
912
913         * platform/graphics/Font.cpp:
914         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
915         (WebCore::CharacterFallbackMapKey::isHashTableDeletedValue):
916         (WebCore::CharacterFallbackMapKey::operator==):
917         (WebCore::CharacterFallbackMapKeyHash::hash):
918         (WebCore::CharacterFallbackMapKeyHash::equal):
919         (WebCore::Font::systemFallbackFontForCharacter):
920
921 2015-08-05  Chris Dumez  <cdumez@apple.com>
922
923         Crash when removing children of a MathMLSelectElement
924         https://bugs.webkit.org/show_bug.cgi?id=147704
925         <rdar://problem/21940321>
926
927         Reviewed by Ryosuke Niwa.
928
929         When MathMLSelectElement::childrenChanged() is called after its
930         children have been removed, MathMLSelectElement calls
931         updateSelectedChild() which accesses m_selectedChild. However,
932         in this case, m_selectedChild is the previously selected child
933         and it may be destroyed as this point if it was removed. To avoid
934         this problem, MathMLSelectElement now keep a strong ref to the
935         currently selected element.
936
937         Test: mathml/maction-removeChild.html
938
939         * mathml/MathMLSelectElement.h:
940
941 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
942
943         Migrate FontCascade.cpp to NeverDestroyed
944         https://bugs.webkit.org/show_bug.cgi?id=147533
945
946         Reviewed by Simon Fraser.
947
948         No new tests because there is no behavior change.
949
950         * platform/graphics/FontCascade.cpp:
951         (WebCore::fontCascadeCache):
952
953 2015-08-05  Tim Horton  <timothy_horton@apple.com>
954
955         Try to fix the build
956
957         * Modules/webdatabase/Database.cpp:
958         (WebCore::Database::performOpenAndVerify):
959         * Modules/webdatabase/Database.h:
960
961 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
962
963         Delete duplicate forward-declaration
964         https://bugs.webkit.org/show_bug.cgi?id=147701
965
966         Reviewed by Simon Fraser.
967
968         No new tests because there is no behavior change.
969
970         * platform/spi/cocoa/CoreTextSPI.h:
971
972 2015-08-05  Anders Carlsson  <andersca@apple.com>
973
974         Move the last DatabaseBackendBase functions over to Database
975         https://bugs.webkit.org/show_bug.cgi?id=147706
976
977         Reviewed by Tim Horton.
978
979         * Modules/webdatabase/Database.cpp:
980         (WebCore::Database::~Database):
981         (WebCore::Database::setExpectedVersion):
982         (WebCore::Database::getActualVersionForTransaction):
983         (WebCore::Database::version):
984         (WebCore::Database::stringIdentifier):
985         (WebCore::Database::displayName):
986         (WebCore::Database::estimatedSize):
987         (WebCore::Database::fileName):
988         (WebCore::Database::details):
989         (WebCore::Database::maximumSize):
990         (WebCore::Database::databaseDebugName):
991         * Modules/webdatabase/Database.h:
992         * Modules/webdatabase/DatabaseBackendBase.cpp:
993         (WebCore::DatabaseBackendBase::databaseDebugName): Deleted.
994         (WebCore::DatabaseBackendBase::~DatabaseBackendBase): Deleted.
995         (WebCore::DatabaseBackendBase::version): Deleted.
996         (WebCore::DatabaseBackendBase::securityOrigin): Deleted.
997         (WebCore::DatabaseBackendBase::stringIdentifier): Deleted.
998         (WebCore::DatabaseBackendBase::displayName): Deleted.
999         (WebCore::DatabaseBackendBase::estimatedSize): Deleted.
1000         (WebCore::DatabaseBackendBase::fileName): Deleted.
1001         (WebCore::DatabaseBackendBase::details): Deleted.
1002         (WebCore::DatabaseBackendBase::setExpectedVersion): Deleted.
1003         (WebCore::DatabaseBackendBase::getActualVersionForTransaction): Deleted.
1004         (WebCore::DatabaseBackendBase::maximumSize): Deleted.
1005         * Modules/webdatabase/DatabaseBackendBase.h:
1006         (WebCore::DatabaseBackendBase::opened): Deleted.
1007         (WebCore::DatabaseBackendBase::isNew): Deleted.
1008         (WebCore::DatabaseBackendBase::sqliteDatabase): Deleted.
1009         (WebCore::DatabaseBackendBase::expectedVersion): Deleted.
1010         * Modules/webdatabase/SQLTransactionClient.cpp:
1011         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
1012         (WebCore::SQLTransactionClient::didExceedQuota):
1013         * Modules/webdatabase/SQLTransactionClient.h:
1014
1015 2015-08-05  Filip Pizlo  <fpizlo@apple.com>
1016
1017         Unreviewed, roll out http://trac.webkit.org/changeset/187972.
1018
1019         * Modules/webaudio/AsyncAudioDecoder.cpp:
1020         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
1021         (WebCore::AsyncAudioDecoder::runLoop):
1022         * Modules/webaudio/AsyncAudioDecoder.h:
1023         * Modules/webaudio/AudioContext.h:
1024         * Modules/webaudio/MediaStreamAudioSource.cpp:
1025         (WebCore::MediaStreamAudioSource::addAudioConsumer):
1026         (WebCore::MediaStreamAudioSource::removeAudioConsumer):
1027         (WebCore::MediaStreamAudioSource::setAudioFormat):
1028         (WebCore::MediaStreamAudioSource::consumeAudio):
1029         * Modules/webaudio/MediaStreamAudioSource.h:
1030         * Modules/webdatabase/Database.cpp:
1031         (WebCore::Database::close):
1032         (WebCore::Database::runTransaction):
1033         (WebCore::Database::inProgressTransactionCompleted):
1034         (WebCore::Database::hasPendingTransaction):
1035         * Modules/webdatabase/DatabaseTask.h:
1036         * Modules/webdatabase/DatabaseThread.cpp:
1037         (WebCore::DatabaseThread::start):
1038         (WebCore::DatabaseThread::databaseThread):
1039         * Modules/webdatabase/DatabaseThread.h:
1040         * Modules/webdatabase/DatabaseTracker.cpp:
1041         (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
1042         (WebCore::DatabaseTracker::canEstablishDatabase):
1043         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
1044         (WebCore::DatabaseTracker::hasEntryForOrigin):
1045         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
1046         (WebCore::DatabaseTracker::closeAllDatabases):
1047         (WebCore::DatabaseTracker::fullPathForDatabase):
1048         (WebCore::DatabaseTracker::origins):
1049         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1050         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
1051         (WebCore::DatabaseTracker::setDatabaseDetails):
1052         (WebCore::DatabaseTracker::doneCreatingDatabase):
1053         (WebCore::DatabaseTracker::addOpenDatabase):
1054         (WebCore::DatabaseTracker::removeOpenDatabase):
1055         (WebCore::DatabaseTracker::getOpenDatabases):
1056         (WebCore::DatabaseTracker::originLockFor):
1057         (WebCore::DatabaseTracker::quotaForOrigin):
1058         (WebCore::DatabaseTracker::setQuota):
1059         (WebCore::DatabaseTracker::deleteOrigin):
1060         (WebCore::DatabaseTracker::deleteDatabase):
1061         (WebCore::DatabaseTracker::deleteDatabaseFile):
1062         (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
1063         (WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
1064         (WebCore::DatabaseTracker::openDatabaseMutex):
1065         (WebCore::DatabaseTracker::setClient):
1066         (WebCore::notificationMutex):
1067         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
1068         (WebCore::DatabaseTracker::notifyDatabasesChanged):
1069         * Modules/webdatabase/DatabaseTracker.h:
1070         * Modules/webdatabase/OriginLock.h:
1071         * Modules/webdatabase/SQLCallbackWrapper.h:
1072         (WebCore::SQLCallbackWrapper::clear):
1073         (WebCore::SQLCallbackWrapper::unwrap):
1074         (WebCore::SQLCallbackWrapper::hasCallback):
1075         * Modules/webdatabase/SQLTransactionBackend.cpp:
1076         (WebCore::SQLTransactionBackend::doCleanup):
1077         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
1078         (WebCore::SQLTransactionBackend::getNextStatement):
1079         * Modules/webdatabase/SQLTransactionBackend.h:
1080         * bindings/js/WorkerScriptController.cpp:
1081         (WebCore::WorkerScriptController::scheduleExecutionTermination):
1082         (WebCore::WorkerScriptController::isExecutionTerminating):
1083         * bindings/js/WorkerScriptController.h:
1084         * dom/default/PlatformMessagePortChannel.cpp:
1085         (WebCore::MessagePortChannel::postMessageToRemote):
1086         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
1087         (WebCore::MessagePortChannel::isConnectedTo):
1088         (WebCore::MessagePortChannel::hasPendingActivity):
1089         (WebCore::MessagePortChannel::locallyEntangledPort):
1090         (WebCore::PlatformMessagePortChannel::setRemotePort):
1091         (WebCore::PlatformMessagePortChannel::entangledChannel):
1092         (WebCore::PlatformMessagePortChannel::closeInternal):
1093         * dom/default/PlatformMessagePortChannel.h:
1094         * loader/icon/IconDatabase.cpp:
1095         (WebCore::IconDatabase::removeAllIcons):
1096         (WebCore::IconDatabase::synchronousIconForPageURL):
1097         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
1098         (WebCore::IconDatabase::synchronousIconURLForPageURL):
1099         (WebCore::IconDatabase::retainIconForPageURL):
1100         (WebCore::IconDatabase::performRetainIconForPageURL):
1101         (WebCore::IconDatabase::releaseIconForPageURL):
1102         (WebCore::IconDatabase::performReleaseIconForPageURL):
1103         (WebCore::IconDatabase::setIconDataForIconURL):
1104         (WebCore::IconDatabase::setIconURLForPageURL):
1105         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
1106         (WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
1107         (WebCore::IconDatabase::pageURLMappingCount):
1108         (WebCore::IconDatabase::retainedPageURLCount):
1109         (WebCore::IconDatabase::iconRecordCount):
1110         (WebCore::IconDatabase::iconRecordCountWithData):
1111         (WebCore::IconDatabase::wakeSyncThread):
1112         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks):
1113         (WebCore::IconDatabase::databasePath):
1114         (WebCore::IconDatabase::getOrCreatePageURLRecord):
1115         (WebCore::IconDatabase::iconDatabaseSyncThread):
1116         (WebCore::IconDatabase::performOpenInitialization):
1117         (WebCore::IconDatabase::performURLImport):
1118         (WebCore::IconDatabase::syncThreadMainLoop):
1119         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
1120         (WebCore::IconDatabase::readFromDatabase):
1121         (WebCore::IconDatabase::writeToDatabase):
1122         (WebCore::IconDatabase::pruneUnretainedIcons):
1123         (WebCore::IconDatabase::cleanupSyncThread):
1124         * loader/icon/IconDatabase.h:
1125         * page/scrolling/ScrollingTree.cpp:
1126         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
1127         (WebCore::ScrollingTree::commitNewTreeState):
1128         (WebCore::ScrollingTree::setMainFramePinState):
1129         (WebCore::ScrollingTree::mainFrameScrollPosition):
1130         (WebCore::ScrollingTree::setMainFrameScrollPosition):
1131         (WebCore::ScrollingTree::isPointInNonFastScrollableRegion):
1132         (WebCore::ScrollingTree::isRubberBandInProgress):
1133         (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
1134         (WebCore::ScrollingTree::isScrollSnapInProgress):
1135         (WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
1136         (WebCore::ScrollingTree::setCanRubberBandState):
1137         (WebCore::ScrollingTree::rubberBandsAtLeft):
1138         (WebCore::ScrollingTree::rubberBandsAtRight):
1139         (WebCore::ScrollingTree::rubberBandsAtBottom):
1140         (WebCore::ScrollingTree::rubberBandsAtTop):
1141         (WebCore::ScrollingTree::setScrollPinningBehavior):
1142         (WebCore::ScrollingTree::scrollPinningBehavior):
1143         (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
1144         (WebCore::ScrollingTree::latchedNode):
1145         (WebCore::ScrollingTree::setLatchedNode):
1146         (WebCore::ScrollingTree::clearLatchedNode):
1147         * page/scrolling/ScrollingTree.h:
1148         * platform/MemoryPressureHandler.h:
1149         * platform/audio/HRTFDatabaseLoader.cpp:
1150         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
1151         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
1152         * platform/audio/HRTFDatabaseLoader.h:
1153         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1154         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
1155         (WebCore::MemoryPressureHandler::clearMemoryPressure):
1156         (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
1157         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
1158         * platform/graphics/DisplayRefreshMonitor.cpp:
1159         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
1160         * platform/graphics/DisplayRefreshMonitor.h:
1161         (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime):
1162         (WebCore::DisplayRefreshMonitor::mutex):
1163         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1164         (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks):
1165         (WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag):
1166         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
1167         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1168         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1169         (WebCore::AVFWrapper::callbackContext):
1170         (WebCore::AVFWrapper::~AVFWrapper):
1171         (WebCore::AVFWrapper::mapLock):
1172         (WebCore::AVFWrapper::addToMap):
1173         (WebCore::AVFWrapper::removeFromMap):
1174         (WebCore::AVFWrapper::periodicTimeObserverCallback):
1175         (WebCore::AVFWrapper::processNotification):
1176         (WebCore::AVFWrapper::loadPlayableCompletionCallback):
1177         (WebCore::AVFWrapper::loadMetadataCompletionCallback):
1178         (WebCore::AVFWrapper::seekCompletedCallback):
1179         (WebCore::AVFWrapper::processCue):
1180         (WebCore::AVFWrapper::legibleOutputCallback):
1181         (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource):
1182         (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):
1183         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
1184         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
1185         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
1186         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
1187         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1188         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
1189         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
1190         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
1191         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
1192         (WebCore::DisplayRefreshMonitorMac::requestRefreshCallback):
1193         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
1194         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1195         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
1196         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
1197         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
1198         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
1199         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
1200         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1201         * platform/ios/LegacyTileCache.h:
1202         * platform/ios/LegacyTileCache.mm:
1203         (WebCore::LegacyTileCache::setTilesOpaque):
1204         (WebCore::LegacyTileCache::doLayoutTiles):
1205         (WebCore::LegacyTileCache::setCurrentScale):
1206         (WebCore::LegacyTileCache::commitScaleChange):
1207         (WebCore::LegacyTileCache::layoutTilesNow):
1208         (WebCore::LegacyTileCache::layoutTilesNowForRect):
1209         (WebCore::LegacyTileCache::removeAllNonVisibleTiles):
1210         (WebCore::LegacyTileCache::removeAllTiles):
1211         (WebCore::LegacyTileCache::removeForegroundTiles):
1212         (WebCore::LegacyTileCache::setContentReplacementImage):
1213         (WebCore::LegacyTileCache::contentReplacementImage):
1214         (WebCore::LegacyTileCache::tileCreationTimerFired):
1215         (WebCore::LegacyTileCache::setNeedsDisplayInRect):
1216         (WebCore::LegacyTileCache::updateTilingMode):
1217         (WebCore::LegacyTileCache::setTilingMode):
1218         (WebCore::LegacyTileCache::doPendingRepaints):
1219         (WebCore::LegacyTileCache::flushSavedDisplayRects):
1220         (WebCore::LegacyTileCache::prepareToDraw):
1221         * platform/ios/LegacyTileLayerPool.h:
1222         * platform/ios/LegacyTileLayerPool.mm:
1223         (WebCore::LegacyTileLayerPool::addLayer):
1224         (WebCore::LegacyTileLayerPool::takeLayerWithSize):
1225         (WebCore::LegacyTileLayerPool::setCapacity):
1226         (WebCore::LegacyTileLayerPool::prune):
1227         (WebCore::LegacyTileLayerPool::drain):
1228         * platform/network/curl/CurlDownload.cpp:
1229         (WebCore::CurlDownloadManager::add):
1230         (WebCore::CurlDownloadManager::remove):
1231         (WebCore::CurlDownloadManager::getActiveDownloadCount):
1232         (WebCore::CurlDownloadManager::getPendingDownloadCount):
1233         (WebCore::CurlDownloadManager::stopThreadIfIdle):
1234         (WebCore::CurlDownloadManager::updateHandleList):
1235         (WebCore::CurlDownload::~CurlDownload):
1236         (WebCore::CurlDownload::init):
1237         (WebCore::CurlDownload::getTempPath):
1238         (WebCore::CurlDownload::getUrl):
1239         (WebCore::CurlDownload::getResponse):
1240         (WebCore::CurlDownload::closeFile):
1241         (WebCore::CurlDownload::didReceiveHeader):
1242         (WebCore::CurlDownload::didReceiveData):
1243         (WebCore::CurlDownload::didFail):
1244         * platform/network/curl/CurlDownload.h:
1245         * platform/network/curl/ResourceHandleManager.cpp:
1246         (WebCore::cookieJarPath):
1247         (WebCore::sharedResourceMutex):
1248         (WebCore::curl_lock_callback):
1249         (WebCore::curl_unlock_callback):
1250         * platform/network/ios/QuickLook.mm:
1251         (WebCore::QLDirectoryAttributes):
1252         (qlPreviewConverterDictionaryMutex):
1253         (WebCore::addQLPreviewConverterWithFileForURL):
1254         (WebCore::qlPreviewConverterUTIForURL):
1255         (WebCore::removeQLPreviewConverterForURL):
1256         (WebCore::safeQLURLForDocumentURLAndResourceURL):
1257         * platform/sql/SQLiteDatabase.cpp:
1258         (WebCore::SQLiteDatabase::close):
1259         (WebCore::SQLiteDatabase::maximumSize):
1260         (WebCore::SQLiteDatabase::setMaximumSize):
1261         (WebCore::SQLiteDatabase::pageSize):
1262         (WebCore::SQLiteDatabase::freeSpaceSize):
1263         (WebCore::SQLiteDatabase::totalSize):
1264         (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
1265         (WebCore::SQLiteDatabase::setAuthorizer):
1266         * platform/sql/SQLiteDatabase.h:
1267         (WebCore::SQLiteDatabase::databaseMutex):
1268         * platform/sql/SQLiteStatement.cpp:
1269         (WebCore::SQLiteStatement::prepare):
1270         (WebCore::SQLiteStatement::step):
1271         * workers/WorkerThread.cpp:
1272         (WebCore::WorkerThread::start):
1273         (WebCore::WorkerThread::workerThread):
1274         (WebCore::WorkerThread::stop):
1275         * workers/WorkerThread.h:
1276
1277 2015-08-05  Anders Carlsson  <andersca@apple.com>
1278
1279         Move more functions from DatabaseBackendBase to Database
1280         https://bugs.webkit.org/show_bug.cgi?id=147705
1281
1282         Reviewed by Tim Horton.
1283
1284         * Modules/webdatabase/Database.cpp:
1285         (WebCore::guidMutex):
1286         (WebCore::guidToVersionMap):
1287         (WebCore::updateGuidVersionMap):
1288         (WebCore::guidToDatabaseMap):
1289         (WebCore::guidForOriginAndName):
1290         (WebCore::Database::Database):
1291         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
1292         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
1293         (WebCore::DoneCreatingDatabaseOnExitCaller::setOpenSucceeded):
1294         (WebCore::Database::performOpenAndVerify):
1295         (WebCore::Database::closeDatabase):
1296         (WebCore::Database::getCachedVersion):
1297         (WebCore::Database::setCachedVersion):
1298         * Modules/webdatabase/Database.h:
1299         * Modules/webdatabase/DatabaseBackendBase.cpp:
1300         (WebCore::DatabaseBackendBase::version):
1301         (WebCore::formatErrorMessage): Deleted.
1302         (WebCore::guidMutex): Deleted.
1303         (WebCore::guidToVersionMap): Deleted.
1304         (WebCore::updateGuidVersionMap): Deleted.
1305         (WebCore::guidToDatabaseMap): Deleted.
1306         (WebCore::guidForOriginAndName): Deleted.
1307         (WebCore::DatabaseBackendBase::DatabaseBackendBase): Deleted.
1308         (WebCore::DatabaseBackendBase::closeDatabase): Deleted.
1309         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller): Deleted.
1310         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller): Deleted.
1311         (WebCore::DoneCreatingDatabaseOnExitCaller::setOpenSucceeded): Deleted.
1312         (WebCore::DatabaseBackendBase::performOpenAndVerify): Deleted.
1313         (WebCore::DatabaseBackendBase::getCachedVersion): Deleted.
1314         (WebCore::DatabaseBackendBase::setCachedVersion): Deleted.
1315         * Modules/webdatabase/DatabaseBackendBase.h:
1316
1317 2015-08-05  Anders Carlsson  <andersca@apple.com>
1318
1319         Move more functions from DatabaseBackendBase to Database
1320         https://bugs.webkit.org/show_bug.cgi?id=147703
1321
1322         Reviewed by Tim Horton.
1323
1324         * Modules/webdatabase/Database.cpp:
1325         (WebCore::fullyQualifiedInfoTableName):
1326         (WebCore::setTextValueInDatabase):
1327         (WebCore::retrieveTextResultFromDatabase):
1328         (WebCore::Database::getVersionFromDatabase):
1329         (WebCore::Database::setVersionInDatabase):
1330         (WebCore::Database::performGetTableNames):
1331         * Modules/webdatabase/Database.h:
1332         * Modules/webdatabase/DatabaseBackendBase.cpp:
1333         (WebCore::DatabaseBackendBase::performOpenAndVerify):
1334         (WebCore::DatabaseBackendBase::getActualVersionForTransaction):
1335         (WebCore::DatabaseBackendBase::databaseInfoTableName): Deleted.
1336         (WebCore::fullyQualifiedInfoTableName): Deleted.
1337         (WebCore::retrieveTextResultFromDatabase): Deleted.
1338         (WebCore::setTextValueInDatabase): Deleted.
1339         (WebCore::DatabaseBackendBase::getVersionFromDatabase): Deleted.
1340         (WebCore::DatabaseBackendBase::setVersionInDatabase): Deleted.
1341         * Modules/webdatabase/DatabaseBackendBase.h:
1342
1343 2015-08-05  Alex Christensen  <achristensen@webkit.org>
1344
1345         Build DumpRenderTree with CMake.
1346         https://bugs.webkit.org/show_bug.cgi?id=147519
1347
1348         Reviewed by Brent Fulgham.
1349
1350         * CMakeLists.txt:
1351         WebCoreTestSupport is a static library and should not be linked with WebCore.
1352
1353 2015-08-05  Anders Carlsson  <andersca@apple.com>
1354
1355         Move some more DatabaseBackendBase functions to Database
1356         https://bugs.webkit.org/show_bug.cgi?id=147702
1357
1358         Reviewed by Tim Horton.
1359
1360         * Modules/webdatabase/Database.cpp:
1361         (WebCore::formatErrorMessage):
1362         (WebCore::Database::disableAuthorizer):
1363         (WebCore::Database::enableAuthorizer):
1364         (WebCore::Database::setAuthorizerPermissions):
1365         (WebCore::Database::lastActionChangedDatabase):
1366         (WebCore::Database::lastActionWasInsert):
1367         (WebCore::Database::resetDeletes):
1368         (WebCore::Database::hadDeletes):
1369         (WebCore::Database::resetAuthorizer):
1370         (WebCore::Database::incrementalVacuumIfNeeded):
1371         * Modules/webdatabase/Database.h:
1372         * Modules/webdatabase/DatabaseBackendBase.cpp:
1373         (WebCore::DatabaseBackendBase::disableAuthorizer): Deleted.
1374         (WebCore::DatabaseBackendBase::enableAuthorizer): Deleted.
1375         (WebCore::DatabaseBackendBase::setAuthorizerPermissions): Deleted.
1376         (WebCore::DatabaseBackendBase::lastActionChangedDatabase): Deleted.
1377         (WebCore::DatabaseBackendBase::lastActionWasInsert): Deleted.
1378         (WebCore::DatabaseBackendBase::resetDeletes): Deleted.
1379         (WebCore::DatabaseBackendBase::hadDeletes): Deleted.
1380         (WebCore::DatabaseBackendBase::resetAuthorizer): Deleted.
1381         (WebCore::DatabaseBackendBase::incrementalVacuumIfNeeded): Deleted.
1382         * Modules/webdatabase/DatabaseBackendBase.h:
1383
1384 2015-08-05  Zalan Bujtas  <zalan@apple.com>
1385
1386         [Frame flattening] Return early when child RenderView is not available.
1387         https://bugs.webkit.org/show_bug.cgi?id=147697
1388
1389         Reviewed by Simon Fraser.
1390
1391         No change in functionality.
1392
1393         * rendering/RenderFrameBase.cpp:
1394         (WebCore::RenderFrameBase::peformLayoutWithFlattening):
1395
1396 2015-08-05  Anders Carlsson  <andersca@apple.com>
1397
1398         Remove more dead database code
1399         https://bugs.webkit.org/show_bug.cgi?id=147698
1400
1401         Reviewed by Tim Horton.
1402
1403         * Modules/webdatabase/DatabaseBackendBase.cpp:
1404         (WebCore::DatabaseBackendBase::interrupt): Deleted.
1405         (WebCore::DatabaseBackendBase::isInterrupted): Deleted.
1406         * Modules/webdatabase/DatabaseBackendBase.h:
1407         * Modules/webdatabase/SQLStatementBackend.cpp:
1408         (WebCore::SQLStatementBackend::execute):
1409         * Modules/webdatabase/SQLTransaction.cpp:
1410         (WebCore::SQLTransaction::computeNextStateAndCleanupIfNeeded):
1411         * Modules/webdatabase/SQLTransactionBackend.cpp:
1412         (WebCore::SQLTransactionBackend::computeNextStateAndCleanupIfNeeded):
1413         * platform/sql/SQLiteDatabase.cpp:
1414         (WebCore::SQLiteDatabase::setFullsync):
1415         (WebCore::SQLiteDatabase::SQLiteDatabase): Deleted.
1416         (WebCore::SQLiteDatabase::interrupt): Deleted.
1417         (WebCore::SQLiteDatabase::isInterrupted): Deleted.
1418         * platform/sql/SQLiteDatabase.h:
1419         * platform/sql/SQLiteStatement.cpp:
1420         (WebCore::SQLiteStatement::prepare): Deleted.
1421         (WebCore::SQLiteStatement::step): Deleted.
1422
1423 2015-08-05  Anders Carlsson  <andersca@apple.com>
1424
1425         Fix build.
1426
1427         * platform/cf/CoreMediaSoftLink.cpp:
1428         * platform/cf/CoreMediaSoftLink.h:
1429
1430 2015-08-05  Anders Carlsson  <andersca@apple.com>
1431
1432         Fix build.
1433
1434         * platform/graphics/mac/FontCacheMac.mm:
1435         (WebCore::lookupCTFont):
1436
1437 2015-08-05  Anders Carlsson  <andersca@apple.com>
1438
1439         Change openDatabase to return a Database instead of a DatabaseBackendBase
1440         https://bugs.webkit.org/show_bug.cgi?id=147691
1441
1442         Reviewed by Tim Horton.
1443
1444         * Modules/webdatabase/AbstractDatabaseServer.h:
1445         * Modules/webdatabase/Database.cpp:
1446         (WebCore::Database::create): Deleted.
1447         * Modules/webdatabase/Database.h:
1448         * Modules/webdatabase/DatabaseManager.cpp:
1449         (WebCore::DatabaseManager::openDatabaseBackend):
1450         (WebCore::DatabaseManager::openDatabase):
1451         * Modules/webdatabase/DatabaseManager.h:
1452         * Modules/webdatabase/DatabaseServer.cpp:
1453         (WebCore::DatabaseServer::openDatabase):
1454         (WebCore::DatabaseServer::createDatabase):
1455         * Modules/webdatabase/DatabaseServer.h:
1456
1457 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
1458
1459         [OS X] Migrate to CTFontCreateForCharactersWithLanguage from [NSFont findFontLike:forString:withRange:inLanguage]
1460         https://bugs.webkit.org/show_bug.cgi?id=147483
1461
1462         Reviewed by Dean Jackson.
1463
1464         [NSFont findFontLike:forString:withRange:inLanguage] doesn't properly handle its last argument. In
1465         addition, we want to be moving away from NSFont in the first place and on to Core Text. This new
1466         CoreText function correctly handles its language argument, which is required for language-specific
1467         font fallback.
1468
1469         This patch rolls r187707 back in which was rolled out in r187802 due to test flakiness. This patch
1470         fixes the flakiness.
1471
1472         No new tests because there is no behavior change.
1473
1474         * platform/graphics/FontCache.cpp:
1475         (WebCore::FontCache::purgeInactiveFontData):
1476         * platform/graphics/FontCache.h:
1477         (WebCore::FontCache::platformPurgeInactiveFontData):
1478         * platform/graphics/mac/FontCacheMac.mm:
1479         (WebCore::fallbackDedupSet):
1480         (WebCore::FontCache::platformPurgeInactiveFontData):
1481         (WebCore::lookupCTFont):
1482         (WebCore::FontCache::systemFallbackForCharacters):
1483         * platform/spi/cocoa/CoreTextSPI.h:
1484         * platform/spi/mac/NSFontSPI.h:
1485
1486 2015-08-05  Anders Carlsson  <andersca@apple.com>
1487
1488         Get rid of DatabaseBackend as another step towards merging Database and DatabaseBackendBase
1489         https://bugs.webkit.org/show_bug.cgi?id=147687
1490
1491         Reviewed by Tim Horton.
1492
1493         * CMakeLists.txt:
1494         * Modules/webdatabase/ChangeVersionWrapper.cpp:
1495         (WebCore::ChangeVersionWrapper::performPreflight):
1496         (WebCore::ChangeVersionWrapper::performPostflight):
1497         * Modules/webdatabase/Database.cpp:
1498         (WebCore::Database::Database):
1499         (WebCore::Database::close):
1500         (WebCore::Database::from): Deleted.
1501         (WebCore::Database::backend): Deleted.
1502         * Modules/webdatabase/Database.h:
1503         * Modules/webdatabase/DatabaseBackend.cpp: Removed.
1504         (WebCore::DatabaseBackend::DatabaseBackend): Deleted.
1505         * Modules/webdatabase/DatabaseBackend.h: Removed.
1506         * Modules/webdatabase/DatabaseManager.cpp:
1507         * Modules/webdatabase/DatabaseServer.cpp:
1508         * Modules/webdatabase/DatabaseTask.cpp:
1509         (WebCore::DatabaseTask::DatabaseTask):
1510         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
1511         (WebCore::DatabaseOpenTask::doPerformTask):
1512         (WebCore::DatabaseOpenTask::debugTaskName):
1513         (WebCore::DatabaseCloseTask::DatabaseCloseTask):
1514         (WebCore::DatabaseCloseTask::doPerformTask):
1515         (WebCore::DatabaseCloseTask::debugTaskName):
1516         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
1517         (WebCore::DatabaseTransactionTask::~DatabaseTransactionTask):
1518         (WebCore::DatabaseTransactionTask::doPerformTask):
1519         (WebCore::DatabaseTransactionTask::debugTaskName):
1520         (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
1521         (WebCore::DatabaseTableNamesTask::doPerformTask):
1522         (WebCore::DatabaseTableNamesTask::debugTaskName):
1523         (WebCore::DatabaseBackend::DatabaseOpenTask::DatabaseOpenTask): Deleted.
1524         (WebCore::DatabaseBackend::DatabaseOpenTask::doPerformTask): Deleted.
1525         (WebCore::DatabaseBackend::DatabaseOpenTask::debugTaskName): Deleted.
1526         (WebCore::DatabaseBackend::DatabaseCloseTask::DatabaseCloseTask): Deleted.
1527         (WebCore::DatabaseBackend::DatabaseCloseTask::doPerformTask): Deleted.
1528         (WebCore::DatabaseBackend::DatabaseCloseTask::debugTaskName): Deleted.
1529         (WebCore::DatabaseBackend::DatabaseTransactionTask::DatabaseTransactionTask): Deleted.
1530         (WebCore::DatabaseBackend::DatabaseTransactionTask::~DatabaseTransactionTask): Deleted.
1531         (WebCore::DatabaseBackend::DatabaseTransactionTask::doPerformTask): Deleted.
1532         (WebCore::DatabaseBackend::DatabaseTransactionTask::debugTaskName): Deleted.
1533         (WebCore::DatabaseBackend::DatabaseTableNamesTask::DatabaseTableNamesTask): Deleted.
1534         (WebCore::DatabaseBackend::DatabaseTableNamesTask::doPerformTask): Deleted.
1535         (WebCore::DatabaseBackend::DatabaseTableNamesTask::debugTaskName): Deleted.
1536         * Modules/webdatabase/DatabaseTask.h:
1537         (WebCore::DatabaseTask::database):
1538         * Modules/webdatabase/SQLStatementBackend.cpp:
1539         (WebCore::SQLStatementBackend::execute):
1540         * Modules/webdatabase/SQLStatementBackend.h:
1541         * Modules/webdatabase/SQLTransactionBackend.cpp:
1542         (WebCore::SQLTransactionBackend::executeSQL):
1543         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
1544         * WebCore.vcxproj/WebCore.vcxproj:
1545         * WebCore.vcxproj/WebCore.vcxproj.filters:
1546         * WebCore.xcodeproj/project.pbxproj:
1547
1548 2015-08-04  Filip Pizlo  <fpizlo@apple.com>
1549
1550         Rename Mutex to DeprecatedMutex
1551         https://bugs.webkit.org/show_bug.cgi?id=147675
1552
1553         Reviewed by Geoffrey Garen.
1554
1555         No new tests because this is just a renaming.
1556
1557         * Modules/webaudio/AsyncAudioDecoder.cpp:
1558         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
1559         (WebCore::AsyncAudioDecoder::runLoop):
1560         * Modules/webaudio/AsyncAudioDecoder.h:
1561         * Modules/webaudio/AudioContext.h:
1562         * Modules/webaudio/MediaStreamAudioSource.cpp:
1563         (WebCore::MediaStreamAudioSource::addAudioConsumer):
1564         (WebCore::MediaStreamAudioSource::removeAudioConsumer):
1565         (WebCore::MediaStreamAudioSource::setAudioFormat):
1566         (WebCore::MediaStreamAudioSource::consumeAudio):
1567         * Modules/webaudio/MediaStreamAudioSource.h:
1568         * Modules/webdatabase/Database.cpp:
1569         (WebCore::Database::close):
1570         (WebCore::Database::runTransaction):
1571         (WebCore::Database::inProgressTransactionCompleted):
1572         (WebCore::Database::hasPendingTransaction):
1573         * Modules/webdatabase/DatabaseBackend.h:
1574         * Modules/webdatabase/DatabaseBackendBase.cpp:
1575         (WebCore::DatabaseBackendBase::performOpenAndVerify):
1576         (WebCore::DatabaseBackendBase::isInterrupted):
1577         * Modules/webdatabase/DatabaseContext.cpp:
1578         (WebCore::DatabaseContext::databaseThread):
1579         (WebCore::DatabaseContext::setPaused):
1580         * Modules/webdatabase/DatabaseContext.h:
1581         * Modules/webdatabase/DatabaseTask.h:
1582         * Modules/webdatabase/DatabaseThread.cpp:
1583         (WebCore::DatabaseThread::start):
1584         (WebCore::DatabaseThread::setPaused):
1585         (WebCore::DatabaseThread::handlePausedQueue):
1586         (WebCore::DatabaseThread::databaseThread):
1587         * Modules/webdatabase/DatabaseThread.h:
1588         * Modules/webdatabase/DatabaseTracker.cpp:
1589         (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
1590         (WebCore::DatabaseTracker::canEstablishDatabase):
1591         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
1592         (WebCore::DatabaseTracker::hasEntryForOrigin):
1593         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
1594         (WebCore::DatabaseTracker::closeAllDatabases):
1595         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
1596         (WebCore::DatabaseTracker::fullPathForDatabase):
1597         (WebCore::DatabaseTracker::origins):
1598         (WebCore::DatabaseTracker::databaseNamesForOrigin):
1599         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
1600         (WebCore::DatabaseTracker::setDatabaseDetails):
1601         (WebCore::DatabaseTracker::doneCreatingDatabase):
1602         (WebCore::DatabaseTracker::addOpenDatabase):
1603         (WebCore::DatabaseTracker::removeOpenDatabase):
1604         (WebCore::DatabaseTracker::getOpenDatabases):
1605         (WebCore::DatabaseTracker::originLockFor):
1606         (WebCore::DatabaseTracker::quotaForOrigin):
1607         (WebCore::DatabaseTracker::setQuota):
1608         (WebCore::DatabaseTracker::deleteOrigin):
1609         (WebCore::DatabaseTracker::deleteDatabase):
1610         (WebCore::DatabaseTracker::deleteDatabaseFile):
1611         (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
1612         (WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
1613         (WebCore::DatabaseTracker::openDatabaseMutex):
1614         (WebCore::DatabaseTracker::setDatabasesPaused):
1615         (WebCore::DatabaseTracker::setClient):
1616         (WebCore::notificationMutex):
1617         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
1618         (WebCore::DatabaseTracker::notifyDatabasesChanged):
1619         * Modules/webdatabase/DatabaseTracker.h:
1620         * Modules/webdatabase/OriginLock.h:
1621         * Modules/webdatabase/SQLCallbackWrapper.h:
1622         (WebCore::SQLCallbackWrapper::clear):
1623         (WebCore::SQLCallbackWrapper::unwrap):
1624         (WebCore::SQLCallbackWrapper::hasCallback):
1625         * Modules/webdatabase/SQLTransactionBackend.cpp:
1626         (WebCore::SQLTransactionBackend::doCleanup):
1627         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
1628         (WebCore::SQLTransactionBackend::getNextStatement):
1629         * Modules/webdatabase/SQLTransactionBackend.h:
1630         * bindings/js/WorkerScriptController.cpp:
1631         (WebCore::WorkerScriptController::scheduleExecutionTermination):
1632         (WebCore::WorkerScriptController::isExecutionTerminating):
1633         * bindings/js/WorkerScriptController.h:
1634         * dom/default/PlatformMessagePortChannel.cpp:
1635         (WebCore::MessagePortChannel::postMessageToRemote):
1636         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
1637         (WebCore::MessagePortChannel::isConnectedTo):
1638         (WebCore::MessagePortChannel::hasPendingActivity):
1639         (WebCore::MessagePortChannel::locallyEntangledPort):
1640         (WebCore::PlatformMessagePortChannel::setRemotePort):
1641         (WebCore::PlatformMessagePortChannel::entangledChannel):
1642         (WebCore::PlatformMessagePortChannel::closeInternal):
1643         * dom/default/PlatformMessagePortChannel.h:
1644         * loader/icon/IconDatabase.cpp:
1645         (WebCore::IconDatabase::removeAllIcons):
1646         (WebCore::IconDatabase::synchronousIconForPageURL):
1647         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
1648         (WebCore::IconDatabase::synchronousIconURLForPageURL):
1649         (WebCore::IconDatabase::retainIconForPageURL):
1650         (WebCore::IconDatabase::performRetainIconForPageURL):
1651         (WebCore::IconDatabase::releaseIconForPageURL):
1652         (WebCore::IconDatabase::performReleaseIconForPageURL):
1653         (WebCore::IconDatabase::setIconDataForIconURL):
1654         (WebCore::IconDatabase::setIconURLForPageURL):
1655         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
1656         (WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
1657         (WebCore::IconDatabase::pageURLMappingCount):
1658         (WebCore::IconDatabase::retainedPageURLCount):
1659         (WebCore::IconDatabase::iconRecordCount):
1660         (WebCore::IconDatabase::iconRecordCountWithData):
1661         (WebCore::IconDatabase::wakeSyncThread):
1662         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks):
1663         (WebCore::IconDatabase::databasePath):
1664         (WebCore::IconDatabase::getOrCreatePageURLRecord):
1665         (WebCore::IconDatabase::iconDatabaseSyncThread):
1666         (WebCore::IconDatabase::performOpenInitialization):
1667         (WebCore::IconDatabase::performURLImport):
1668         (WebCore::IconDatabase::syncThreadMainLoop):
1669         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
1670         (WebCore::IconDatabase::readFromDatabase):
1671         (WebCore::IconDatabase::writeToDatabase):
1672         (WebCore::IconDatabase::pruneUnretainedIcons):
1673         (WebCore::IconDatabase::cleanupSyncThread):
1674         * loader/icon/IconDatabase.h:
1675         * page/scrolling/ScrollingTree.cpp:
1676         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
1677         (WebCore::ScrollingTree::commitNewTreeState):
1678         (WebCore::ScrollingTree::setMainFramePinState):
1679         (WebCore::ScrollingTree::mainFrameScrollPosition):
1680         (WebCore::ScrollingTree::setMainFrameScrollPosition):
1681         (WebCore::ScrollingTree::isPointInNonFastScrollableRegion):
1682         (WebCore::ScrollingTree::isRubberBandInProgress):
1683         (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
1684         (WebCore::ScrollingTree::isScrollSnapInProgress):
1685         (WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
1686         (WebCore::ScrollingTree::setCanRubberBandState):
1687         (WebCore::ScrollingTree::rubberBandsAtLeft):
1688         (WebCore::ScrollingTree::rubberBandsAtRight):
1689         (WebCore::ScrollingTree::rubberBandsAtBottom):
1690         (WebCore::ScrollingTree::rubberBandsAtTop):
1691         (WebCore::ScrollingTree::setScrollPinningBehavior):
1692         (WebCore::ScrollingTree::scrollPinningBehavior):
1693         (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
1694         (WebCore::ScrollingTree::latchedNode):
1695         (WebCore::ScrollingTree::setLatchedNode):
1696         (WebCore::ScrollingTree::clearLatchedNode):
1697         * page/scrolling/ScrollingTree.h:
1698         * platform/MemoryPressureHandler.h:
1699         * platform/audio/HRTFDatabaseLoader.cpp:
1700         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
1701         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
1702         * platform/audio/HRTFDatabaseLoader.h:
1703         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
1704         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
1705         (WebCore::MemoryPressureHandler::clearMemoryPressure):
1706         (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
1707         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
1708         * platform/graphics/DisplayRefreshMonitor.cpp:
1709         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
1710         * platform/graphics/DisplayRefreshMonitor.h:
1711         (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime):
1712         (WebCore::DisplayRefreshMonitor::mutex):
1713         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
1714         (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks):
1715         (WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag):
1716         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
1717         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
1718         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
1719         (WebCore::AVFWrapper::callbackContext):
1720         (WebCore::AVFWrapper::~AVFWrapper):
1721         (WebCore::AVFWrapper::mapLock):
1722         (WebCore::AVFWrapper::addToMap):
1723         (WebCore::AVFWrapper::removeFromMap):
1724         (WebCore::AVFWrapper::periodicTimeObserverCallback):
1725         (WebCore::AVFWrapper::processNotification):
1726         (WebCore::AVFWrapper::loadPlayableCompletionCallback):
1727         (WebCore::AVFWrapper::loadMetadataCompletionCallback):
1728         (WebCore::AVFWrapper::seekCompletedCallback):
1729         (WebCore::AVFWrapper::processCue):
1730         (WebCore::AVFWrapper::legibleOutputCallback):
1731         (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource):
1732         (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):
1733         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
1734         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
1735         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
1736         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
1737         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
1738         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
1739         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
1740         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
1741         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
1742         (WebCore::DisplayRefreshMonitorMac::requestRefreshCallback):
1743         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
1744         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1745         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
1746         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
1747         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
1748         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
1749         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
1750         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1751         * platform/ios/LegacyTileCache.h:
1752         * platform/ios/LegacyTileCache.mm:
1753         (WebCore::LegacyTileCache::setTilesOpaque):
1754         (WebCore::LegacyTileCache::doLayoutTiles):
1755         (WebCore::LegacyTileCache::setCurrentScale):
1756         (WebCore::LegacyTileCache::commitScaleChange):
1757         (WebCore::LegacyTileCache::layoutTilesNow):
1758         (WebCore::LegacyTileCache::layoutTilesNowForRect):
1759         (WebCore::LegacyTileCache::removeAllNonVisibleTiles):
1760         (WebCore::LegacyTileCache::removeAllTiles):
1761         (WebCore::LegacyTileCache::removeForegroundTiles):
1762         (WebCore::LegacyTileCache::setContentReplacementImage):
1763         (WebCore::LegacyTileCache::contentReplacementImage):
1764         (WebCore::LegacyTileCache::tileCreationTimerFired):
1765         (WebCore::LegacyTileCache::setNeedsDisplayInRect):
1766         (WebCore::LegacyTileCache::updateTilingMode):
1767         (WebCore::LegacyTileCache::setTilingMode):
1768         (WebCore::LegacyTileCache::doPendingRepaints):
1769         (WebCore::LegacyTileCache::flushSavedDisplayRects):
1770         (WebCore::LegacyTileCache::prepareToDraw):
1771         * platform/ios/LegacyTileLayerPool.h:
1772         * platform/ios/LegacyTileLayerPool.mm:
1773         (WebCore::LegacyTileLayerPool::addLayer):
1774         (WebCore::LegacyTileLayerPool::takeLayerWithSize):
1775         (WebCore::LegacyTileLayerPool::setCapacity):
1776         (WebCore::LegacyTileLayerPool::prune):
1777         (WebCore::LegacyTileLayerPool::drain):
1778         * platform/network/curl/CurlDownload.cpp:
1779         (WebCore::CurlDownloadManager::add):
1780         (WebCore::CurlDownloadManager::remove):
1781         (WebCore::CurlDownloadManager::getActiveDownloadCount):
1782         (WebCore::CurlDownloadManager::getPendingDownloadCount):
1783         (WebCore::CurlDownloadManager::stopThreadIfIdle):
1784         (WebCore::CurlDownloadManager::updateHandleList):
1785         (WebCore::CurlDownload::~CurlDownload):
1786         (WebCore::CurlDownload::init):
1787         (WebCore::CurlDownload::getTempPath):
1788         (WebCore::CurlDownload::getUrl):
1789         (WebCore::CurlDownload::getResponse):
1790         (WebCore::CurlDownload::closeFile):
1791         (WebCore::CurlDownload::didReceiveHeader):
1792         (WebCore::CurlDownload::didReceiveData):
1793         (WebCore::CurlDownload::didFail):
1794         * platform/network/curl/CurlDownload.h:
1795         * platform/network/curl/ResourceHandleManager.cpp:
1796         (WebCore::cookieJarPath):
1797         (WebCore::sharedResourceMutex):
1798         (WebCore::curl_lock_callback):
1799         (WebCore::curl_unlock_callback):
1800         * platform/network/ios/QuickLook.mm:
1801         (WebCore::QLDirectoryAttributes):
1802         (qlPreviewConverterDictionaryMutex):
1803         (WebCore::addQLPreviewConverterWithFileForURL):
1804         (WebCore::qlPreviewConverterUTIForURL):
1805         (WebCore::removeQLPreviewConverterForURL):
1806         (WebCore::safeQLURLForDocumentURLAndResourceURL):
1807         * platform/sql/SQLiteDatabase.cpp:
1808         (WebCore::SQLiteDatabase::close):
1809         (WebCore::SQLiteDatabase::interrupt):
1810         (WebCore::SQLiteDatabase::maximumSize):
1811         (WebCore::SQLiteDatabase::setMaximumSize):
1812         (WebCore::SQLiteDatabase::pageSize):
1813         (WebCore::SQLiteDatabase::freeSpaceSize):
1814         (WebCore::SQLiteDatabase::totalSize):
1815         (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
1816         (WebCore::SQLiteDatabase::setAuthorizer):
1817         * platform/sql/SQLiteDatabase.h:
1818         (WebCore::SQLiteDatabase::databaseMutex):
1819         * platform/sql/SQLiteStatement.cpp:
1820         (WebCore::SQLiteStatement::prepare):
1821         (WebCore::SQLiteStatement::step):
1822         * workers/WorkerThread.cpp:
1823         (WebCore::WorkerThread::start):
1824         (WebCore::WorkerThread::workerThread):
1825         (WebCore::WorkerThread::stop):
1826         * workers/WorkerThread.h:
1827
1828 2015-08-05  Matthew Daiter  <mdaiter@apple.com>
1829
1830         Adding in MediaPrivateMediaStreamEngine to default compile
1831         https://bugs.webkit.org/show_bug.cgi?id=146790
1832         <rdar://problem/21747289>
1833
1834         Reviewed by Eric Carlson.
1835
1836         * WebCore.xcodeproj/project.pbxproj:
1837         * platform/mediastream/MediaStreamPrivate.h:
1838         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
1839
1840 2015-08-05  Matthew Daiter  <mdaiter@apple.com>
1841
1842         Remove m_synchronizer from MediaPlayerPrivateMediaStream
1843         https://bugs.webkit.org/show_bug.cgi?id=147637
1844
1845         Reviewed by Eric Carlson.
1846
1847         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
1848         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
1849         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::playInternal): Deleted.
1850
1851 2015-08-05  Wenson Hsieh  <wenson_hsieh@apple.com>
1852
1853         Build fix after 187961
1854
1855         * platform/mac/ThemeMac.mm:
1856         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
1857
1858 2015-08-05  Daniel Bates  <dabates@apple.com>
1859
1860         REGRESSION (r185111): Clicking phone numbers doesn't prompt to call sometimes
1861         https://bugs.webkit.org/show_bug.cgi?id=147678
1862         <rdar://problem/21827815>
1863
1864         Reviewed by Brady Eidson.
1865
1866         Fixes an issue where a non-user-initiated navigation of the main frame to a phone link (tel URL)
1867         may be ignored. The navigation is ignored if the page was reloaded as a result of a web content
1868         process crash, its lifetime exceeded the back-forward cache expiration interval, or a person
1869         quits and opens Safari again, among other scenarios.
1870
1871         * history/HistoryItem.cpp:
1872         (WebCore::HistoryItem::setShouldOpenExternalURLsPolicy): Added.
1873         (WebCore::HistoryItem::shouldOpenExternalURLsPolicy): Added.
1874         * history/HistoryItem.h:
1875         * loader/FrameLoader.cpp:
1876         (WebCore::FrameLoader::loadDifferentDocumentItem): Apply the "should open external URLs" policy
1877         from the history item, if applicable. Also, be more explicit when instantiating a NavigationAction
1878         so as to help make it straightforward to reduce the number of NavigationAction constructors we have
1879         in the future.
1880         * loader/HistoryController.cpp:
1881         (WebCore::HistoryController::saveDocumentState): Save the "should open external URLs" policy to
1882         the history item.
1883         (WebCore::HistoryController::restoreDocumentState): Apply the "should open external URLs" policy
1884         from the history item to the document loader.
1885         (WebCore::HistoryController::initializeItem): Update the "should open external URLs" policy of
1886         the history item to reflect the policy of the document loader associated with the current frame.
1887
1888 2015-08-04  Wenson Hsieh  <wenson_hsieh@apple.com>
1889
1890         Checkboxes and radio buttons should scale when zooming or pinching to zoom
1891         https://bugs.webkit.org/show_bug.cgi?id=147405
1892
1893         Reviewed by Dean Jackson.
1894
1895         Refactors paintButton and paintToggleButton to use a temporary buffer when rendering
1896         if the controls are zoomed. This affects checkboxes, radio buttons, and normal (push)
1897         buttons.
1898
1899         * platform/mac/ThemeMac.h:
1900         * platform/mac/ThemeMac.mm:
1901         (WebCore::paintToggleButton): Refactored to use drawCellOrFocusRingWithViewIntoContext.
1902         (WebCore::paintButton): Refactored to use drawCellOrFocusRingWithViewIntoContext.
1903         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Draws a given button cell
1904             and/or its focus ring into the given context, optionally using an offscreen buffer.
1905             This is a static function in ThemeMac so it can be accessed later on by
1906             RenderThemeMac when painting search fields that scale with zoom.
1907         (WebCore::ThemeMac::paint):
1908         (WebCore::buttonFocusRectOutlineWidth): Deleted. Made this value into a const float.
1909
1910 2015-08-04  Doug Russell  <d_russell@apple.com>
1911
1912         AX: tree item children returned from ranged getter are different from full array of children
1913         https://bugs.webkit.org/show_bug.cgi?id=147660
1914
1915         Reviewed by Chris Fleizach.
1916
1917         Add an isTreeItem() check in ranged element getter so that it matches the logic in 
1918         the getter for the full children array. This prevents returning a row as a child
1919         when only the rows contents should be returned. This prevents navigation issues on
1920         websites without aria outlines.
1921
1922         Test: accessibility/mac/aria-tree-item-children.html
1923
1924         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1925         (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
1926
1927 2015-08-04  Anders Carlsson  <andersca@apple.com>
1928
1929         CTTE the database task code
1930         https://bugs.webkit.org/show_bug.cgi?id=147673
1931
1932         Reviewed by Andreas Kling.
1933
1934         * Modules/webdatabase/Database.cpp:
1935         (WebCore::Database::openAndVerifyVersion):
1936         (WebCore::Database::markAsDeletedAndClose):
1937         (WebCore::Database::tableNames):
1938         * Modules/webdatabase/DatabaseTask.cpp:
1939         (WebCore::DatabaseTask::DatabaseTask):
1940         (WebCore::DatabaseTask::performTask):
1941         (WebCore::DatabaseBackend::DatabaseOpenTask::DatabaseOpenTask):
1942         (WebCore::DatabaseBackend::DatabaseOpenTask::doPerformTask):
1943         (WebCore::DatabaseBackend::DatabaseCloseTask::DatabaseCloseTask):
1944         (WebCore::DatabaseBackend::DatabaseCloseTask::doPerformTask):
1945         (WebCore::DatabaseBackend::DatabaseTransactionTask::DatabaseTransactionTask):
1946         (WebCore::DatabaseBackend::DatabaseTableNamesTask::DatabaseTableNamesTask):
1947         (WebCore::DatabaseBackend::DatabaseTableNamesTask::doPerformTask):
1948         * Modules/webdatabase/DatabaseTask.h:
1949         (WebCore::DatabaseTask::database):
1950         * Modules/webdatabase/DatabaseThread.cpp:
1951         (WebCore::SameDatabasePredicate::operator()):
1952
1953 2015-08-04  Brent Fulgham  <bfulgham@apple.com>
1954
1955         REGRESSION (r173784): [Mac] Correct latching error for non-scrollable iframe nested inside scrollable div.
1956         https://bugs.webkit.org/show_bug.cgi?id=147668
1957         <rdar://problem/21870332>
1958
1959         Reviewed by Simon Fraser.
1960
1961         Test: platform/mac/fast/scrolling/scroll-div-with-nested-nonscrollable-iframe.html
1962
1963         When we are wrapping up processing of the wheel event for a given frame, if the current latching context
1964         does NOT apply to the current frame (e.g., because it's latched to an enclosing frame) we should not pass
1965         wheel events directly to the latched elements scrollable container. Instead, we should just give the current
1966         frame an opportunity to perform any custom wheel event handling and return, so that the enclosing (latched)
1967         frame can do the rest of its event handling.
1968         
1969         If we don't do this, we incorrectly ask the enclosing frame to process the event, then return claiming that
1970         we handled the event, preventing the enclosing frame from doing its part of the processing.
1971
1972         * page/mac/EventHandlerMac.mm:
1973         (WebCore::EventHandler::platformCompleteWheelEvent):
1974
1975 2015-08-04  Alex Christensen  <achristensen@webkit.org>
1976
1977         Soft link libGLESv2 and libEGL on Windows again
1978         https://bugs.webkit.org/show_bug.cgi?id=147671
1979
1980         Reviewed by Dean Jackson.
1981
1982         * platform/graphics/PlatformDisplay.cpp:
1983         (WebCore::PlatformDisplay::initializeEGLDisplay):
1984         Fail gracefully if libEGL is not found.
1985
1986 2015-08-04  Anders Carlsson  <andersca@apple.com>
1987
1988         Remove another unused database function
1989         https://bugs.webkit.org/show_bug.cgi?id=147670
1990
1991         Reviewed by Daniel Bates.
1992
1993         This was used back when we had WebSQL support in workers, we can safely remove all these functions now.
1994
1995         * Modules/webdatabase/AbstractDatabaseServer.h:
1996         * Modules/webdatabase/DatabaseManager.cpp:
1997         (WebCore::DatabaseManager::interruptAllDatabasesForContext): Deleted.
1998         * Modules/webdatabase/DatabaseManager.h:
1999         * Modules/webdatabase/DatabaseServer.cpp:
2000         (WebCore::DatabaseServer::interruptAllDatabasesForContext): Deleted.
2001         * Modules/webdatabase/DatabaseServer.h:
2002         * Modules/webdatabase/DatabaseTracker.cpp:
2003         (WebCore::DatabaseTracker::interruptAllDatabasesForContext): Deleted.
2004         * Modules/webdatabase/DatabaseTracker.h:
2005
2006 2015-08-04  Anders Carlsson  <andersca@apple.com>
2007
2008         Remove database thread pause code
2009         https://bugs.webkit.org/show_bug.cgi?id=147669
2010
2011         Reviewed by Daniel Bates.
2012
2013         We now grab power assertions while running SQLite transactions, 
2014         and this code isn't used at all with modern WebKit so let's just get rid of it.
2015
2016         * Modules/webdatabase/DatabaseContext.cpp:
2017         (WebCore::DatabaseContext::DatabaseContext): Deleted.
2018         (WebCore::DatabaseContext::databaseThread): Deleted.
2019         (WebCore::DatabaseContext::setPaused): Deleted.
2020         * Modules/webdatabase/DatabaseContext.h:
2021         * Modules/webdatabase/DatabaseTask.cpp:
2022         (WebCore::Database::DatabaseTransactionTask::shouldPerformWhilePaused): Deleted.
2023         * Modules/webdatabase/DatabaseTask.h:
2024         * Modules/webdatabase/DatabaseThread.cpp:
2025         (WebCore::DatabaseThread::DatabaseThread): Deleted.
2026         (WebCore::DatabaseThread::requestTermination): Deleted.
2027         (WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask): Deleted.
2028         (WebCore::DatabaseUnpauseTask::shouldPerformWhilePaused): Deleted.
2029         (WebCore::DatabaseUnpauseTask::doPerformTask): Deleted.
2030         (WebCore::DatabaseUnpauseTask::debugTaskName): Deleted.
2031         (WebCore::DatabaseThread::setPaused): Deleted.
2032         (WebCore::DatabaseThread::handlePausedQueue): Deleted.
2033         (WebCore::DatabaseThread::databaseThread): Deleted.
2034         * Modules/webdatabase/DatabaseThread.h:
2035         * Modules/webdatabase/DatabaseTracker.cpp:
2036         (WebCore::DatabaseTracker::setDatabasesPaused): Deleted.
2037         * Modules/webdatabase/DatabaseTracker.h:
2038
2039 2015-08-04  Chris Dumez  <cdumez@apple.com>
2040
2041         Subframes with no current HistoryItem should not prevent page-caching
2042         https://bugs.webkit.org/show_bug.cgi?id=147649
2043         <rdar://problem/21614832>
2044
2045         Reviewed by Andreas Kling.
2046
2047         Subframes with no current HistoryItem should not prevent page-caching.
2048         We need one for the main frame as this is the key in the PageCache.
2049         However, there is no reason to require one for subframes.
2050
2051         This is a common reason for page-caching failures nowadays.
2052
2053         Frames do no have a current HistoryItem until something has been loaded in them.
2054
2055         Test: http/tests/navigation/page-cache-iframe-no-current-historyItem.html
2056
2057         * history/PageCache.cpp:
2058         (WebCore::logCanCacheFrameDecision):
2059         (WebCore::PageCache::canCachePageContainingThisFrame):
2060
2061 2015-08-04  Brent Fulgham  <bfulgham@apple.com>
2062
2063         [Win] Build fix after r187908
2064
2065         * platform/win/WindowsTouch.h: If WINVER is set properly, we
2066         don't need these definitions.
2067
2068 2015-08-04  Anders Carlsson  <andersca@apple.com>
2069
2070         Remove an unused Database function
2071         https://bugs.webkit.org/show_bug.cgi?id=147661
2072
2073         Reviewed by Simon Fraser.
2074
2075         * Modules/webdatabase/Database.cpp:
2076         (WebCore::Database::closeImmediately): Deleted.
2077         * Modules/webdatabase/Database.h:
2078
2079 2015-08-04  Brady Eidson  <beidson@apple.com>
2080
2081         Crash when following a Google search link to Twitter with Limit Adult Content enabled.
2082         <rdar://problem/22123707> and https://bugs.webkit.org/show_bug.cgi?id=147651
2083
2084         Reviewed by Sam Weinig.
2085
2086         No new tests (Doesn't occur in a tested config).
2087
2088         For now, we'll skip the application cache for main resource loads if parental controls are enabled.
2089
2090         * loader/DocumentLoader.cpp:
2091         (WebCore::DocumentLoader::willSendRequest):
2092         (WebCore::DocumentLoader::startLoadingMainResource):
2093
2094 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
2095
2096         Added buffer to AVMediaCaptureSource
2097         https://bugs.webkit.org/show_bug.cgi?id=147454
2098         <rdar://problem/22079502>
2099
2100         Reviewed by Jer Noble.
2101
2102         * platform/mediastream/mac/AVMediaCaptureSource.h:
2103         (WebCore::AVMediaCaptureSource::buffer):
2104         (WebCore::AVMediaCaptureSource::setBuffer):
2105         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2106         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
2107
2108 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
2109
2110         Needless assignment of usingDot
2111         https://bugs.webkit.org/show_bug.cgi?id=147514
2112
2113         Reviewed by Eric Carlson.
2114
2115         * platform/graphics/mac/GraphicsContextMac.mm:
2116         (WebCore::GraphicsContext::drawLineForDocumentMarker): Deleted.
2117
2118 2015-08-04  Chris Dumez  <cdumez@apple.com>
2119
2120         shouldParseTelephoneNumbersInNode() does not need to check for Comment nodes
2121         https://bugs.webkit.org/show_bug.cgi?id=147630
2122
2123         Reviewed by Sam Weinig.
2124
2125         shouldParseTelephoneNumbersInNode() does not need to check for Comment
2126         nodes. We already know the input is a ContainerNode and a Comment is
2127         NOT a ContainerNode. Also, we were already doing a isElementNode()
2128         check before calling disallowTelephoneNumberParsing().
2129
2130         I also updated the function to use a for loop for clarity and dropped
2131         the isElementNode() check as calling hasTagName() / isLink() on a
2132         ContainerNode is as fast all calling it on an Element nowadays.
2133
2134         * html/parser/HTMLTreeBuilder.cpp:
2135         (WebCore::disallowTelephoneNumberParsing):
2136         (WebCore::shouldParseTelephoneNumbersInNode):
2137
2138 2015-08-04  Eric Carlson  <eric.carlson@apple.com>
2139
2140         [Mac] Do not require a video track for AirPlay
2141         https://bugs.webkit.org/show_bug.cgi?id=147647
2142
2143         Reviewed by Jer Noble.
2144
2145         * Modules/mediacontrols/mediaControlsApple.js:
2146         (Controller.prototype.handleReadyStateChange): Call updateWirelessTargetAvailable().
2147         (Controller.prototype.updateHasVideo): Don't call updateWirelessTargetAvailable().
2148         (Controller.prototype.updateWirelessTargetAvailable): Don't require video.
2149
2150         * html/HTMLMediaElement.cpp:
2151         (WebCore::HTMLMediaElement::setReadyState): Call updateMediaState when we reach HAVE_METADATA.
2152         (WebCore::HTMLMediaElement::mediaState): Don't require video, only that the file can play.
2153
2154         * html/MediaElementSession.cpp:
2155         (WebCore::MediaElementSession::showPlaybackTargetPicker): Check readyState instead of hasVideo.
2156
2157 2015-08-04  Anders Carlsson  <andersca@apple.com>
2158
2159         Get rid of ReasonForCallingAllowPlugins since it's not used anywhere
2160         https://bugs.webkit.org/show_bug.cgi?id=147648
2161
2162         Reviewed by Andreas Kling.
2163
2164         * dom/DOMImplementation.cpp:
2165         (WebCore::DOMImplementation::createDocument):
2166         * html/HTMLElement.cpp:
2167         (WebCore::HTMLElement::rendererIsNeeded):
2168         * html/parser/HTMLParserOptions.cpp:
2169         (WebCore::HTMLParserOptions::HTMLParserOptions):
2170         * loader/FrameLoaderTypes.h:
2171         * loader/SubframeLoader.cpp:
2172         (WebCore::SubframeLoader::requestPlugin):
2173         (WebCore::SubframeLoader::createJavaAppletWidget):
2174         (WebCore::SubframeLoader::allowPlugins):
2175         * loader/SubframeLoader.h:
2176         * plugins/DOMMimeType.cpp:
2177         (WebCore::DOMMimeType::enabledPlugin):
2178
2179 2015-08-04  Alex Christensen  <achristensen@webkit.org>
2180
2181         Fix debug CMake build on Windows after r187818.
2182
2183         * PlatformWin.cmake:
2184         Debug *AllInOne.cpp object files in WebCore require /bigobj to compile successfully.
2185
2186 2015-08-04  Alexey Proskuryakov  <ap@apple.com>
2187
2188         Implement NPAPI redirect handling
2189         https://bugs.webkit.org/show_bug.cgi?id=138675
2190         rdar://problem/15779101
2191
2192         Patch by Jeffrey Pfau, updated and tweaked by me.
2193
2194         Reviewed by Anders Carlsson.
2195
2196         Test: http/tests/plugins/get-url-redirect-notify.html
2197
2198         * loader/NetscapePlugInStreamLoader.cpp:
2199         (WebCore::NetscapePlugInStreamLoader::init):
2200         (WebCore::NetscapePlugInStreamLoader::willSendRequest):
2201         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
2202         * loader/NetscapePlugInStreamLoader.h:
2203         * loader/ResourceLoader.cpp:
2204         (WebCore::ResourceLoader::init):
2205         (WebCore::ResourceLoader::isSubresourceLoader):
2206         (WebCore::ResourceLoader::willSendRequestInternal):
2207         (WebCore::ResourceLoader::willSendRequest):
2208         (WebCore::ResourceLoader::didSendData):
2209         * loader/ResourceLoader.h:
2210         * loader/SubresourceLoader.cpp:
2211         (WebCore::SubresourceLoader::isSubresourceLoader):
2212         (WebCore::SubresourceLoader::willSendRequestInternal):
2213         (WebCore::SubresourceLoader::willSendRequest): Deleted.
2214         * loader/SubresourceLoader.h:
2215         * plugins/npapi.h:
2216         * plugins/npfunctions.h:
2217
2218 2015-08-04  Zalan Bujtas  <zalan@apple.com>
2219
2220         RenderTheme::paint() should take RenderBox instead of RenderObject.
2221         https://bugs.webkit.org/show_bug.cgi?id=147638
2222
2223         Reviewed by Andreas Kling.
2224
2225         No change in functionality.
2226
2227         * rendering/RenderTheme.cpp:
2228         (WebCore::RenderTheme::paint):
2229         (WebCore::RenderTheme::updateControlStatesForRenderer): ->RenderBox too.
2230         (WebCore::RenderTheme::isActive): Remove redundant code.
2231         * rendering/RenderTheme.h:
2232
2233 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
2234
2235         Render to GraphicsContext MediaPlayerPrivateMediaStreamAVFObjC
2236         https://bugs.webkit.org/show_bug.cgi?id=147643
2237
2238         Reviewed by Eric Carlson.
2239
2240         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2241         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paint):
2242
2243 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
2244
2245         Added ability to create images from buffers for MediaStream paint methods
2246         https://bugs.webkit.org/show_bug.cgi?id=147642
2247
2248         Reviewed by Eric Carlson.
2249
2250         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
2251         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2252         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createImageFromSampleBuffer):
2253
2254 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
2255
2256         Add image variable rendered by paint methods for MediaStream
2257         https://bugs.webkit.org/show_bug.cgi?id=147645
2258
2259         Reviewed by Eric Carlson.
2260
2261         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
2262
2263 2015-08-04  Zalan Bujtas  <zalan@apple.com>
2264
2265         RenderTheme::baselinePosition() should take RenderBox instead of RenderObject.
2266         https://bugs.webkit.org/show_bug.cgi?id=147632
2267
2268         Reviewed by Andreas Kling.
2269
2270         It eliminates some redundant type checking and casting.
2271
2272         No change in functionality.
2273
2274         * platform/efl/RenderThemeEfl.cpp:
2275         (WebCore::RenderThemeEfl::baselinePosition):
2276         * platform/efl/RenderThemeEfl.h:
2277         * rendering/RenderTheme.cpp:
2278         (WebCore::RenderTheme::baselinePosition):
2279         * rendering/RenderTheme.h:
2280         * rendering/RenderThemeGtk.cpp:
2281         (WebCore::RenderThemeGtk::baselinePosition):
2282         * rendering/RenderThemeGtk.h:
2283         * rendering/RenderThemeIOS.h:
2284         * rendering/RenderThemeIOS.mm:
2285         (WebCore::RenderThemeIOS::baselinePosition):
2286         * rendering/RenderThemeSafari.cpp:
2287         (WebCore::RenderThemeSafari::baselinePosition):
2288         * rendering/RenderThemeSafari.h:
2289
2290 2015-08-04  Alex Christensen  <achristensen@webkit.org>
2291
2292         Enable WebGL on Windows CMake build.
2293         https://bugs.webkit.org/show_bug.cgi?id=143311
2294
2295         Reviewed by Csaba Osztrogonác.
2296
2297         * CMakeLists.txt:
2298         ANGLE is built quite differently on Windows, so I'm not going to touch the existing CMake build system for
2299         ANGLE on Linux, although I think it should eventually be unified more by using ANGLE's OpenGL renderer.
2300         * PlatformWin.cmake:
2301         Added some needed source files and include directories.
2302
2303 2015-08-04  Jeremy Jones  <jeremyj@apple.com>
2304
2305         Implement isPictureInPictureInterrupted.
2306         https://bugs.webkit.org/show_bug.cgi?id=147620
2307
2308         Reviewed by Eric Carlson.
2309
2310         Implement isPictureInPictureInterrupted so setting the property to true pauses playback.
2311         This allows PiP to pause when the device is locked while the app is suspended.
2312
2313         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2314         (-[WebAVPlayerController init]):
2315         (-[WebAVPlayerController isPictureInPictureInterrupted]):
2316         (-[WebAVPlayerController setPictureInPictureInterrupted:]):
2317
2318 2015-08-03  Csaba Osztrogonác  <ossy@webkit.org>
2319
2320         Introduce COMPILER(GCC_OR_CLANG) guard and make COMPILER(GCC) true only for GCC
2321         https://bugs.webkit.org/show_bug.cgi?id=146833
2322
2323         Reviewed by Alexey Proskuryakov.
2324
2325         * platform/graphics/cpu/arm/filters/FELightingNEON.cpp:
2326         * platform/graphics/cpu/arm/filters/FELightingNEON.h:
2327         * platform/graphics/filters/FELighting.cpp:
2328         (WebCore::FELighting::platformApply):
2329         * platform/network/efl/NetworkStateNotifierEfl.cpp:
2330         (WebCore::NetworkStateNotifier::readSocketCallback):
2331
2332 2015-08-03  Csaba Osztrogonác  <ossy@webkit.org>
2333
2334         [CMake] Add an option to build AllInOne files
2335         https://bugs.webkit.org/show_bug.cgi?id=102647
2336
2337         Reviewed by Alex Christensen.
2338
2339         * CMakeLists.txt:
2340
2341 2015-08-03  Csaba Osztrogonác  <ossy@webkit.org>
2342
2343         Fix the all-in-one build on Linux after r187659
2344         https://bugs.webkit.org/show_bug.cgi?id=147557
2345
2346         Reviewed by Alex Christensen.
2347
2348         Removed MediaFeatureNames.cpp from the all-in-one build, because it caused build failures on Linux.
2349         Additionally removed css/MediaAllInOne.cpp since it is unused.
2350
2351         * WebCore.vcxproj/WebCore.vcxproj:
2352         * WebCore.vcxproj/WebCore.vcxproj.filters:
2353         * css/CSSAllInOne.cpp:
2354         * css/MediaAllInOne.cpp: Removed.
2355
2356 2015-08-03  Benjamin Poulain  <bpoulain@apple.com>
2357
2358         Returns inconsistent types for el.style.property and el.style.getPropertyValue('color')
2359         https://bugs.webkit.org/show_bug.cgi?id=147549
2360
2361         Reviewed by Andreas Kling.
2362
2363         Kudos to Greg Whitworth for finding this bug.
2364
2365         Test: fast/css/getPropertyValue-returns-empty-on-missing-property.html
2366
2367         * css/CSSStyleDeclaration.idl:
2368         Our definition was wrong.
2369         Current spec: http://www.w3.org/TR/cssom/#dom-cssstyledeclaration-getpropertyvalue
2370         Current draft: https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-getpropertyvalue
2371         Gecko and EdgeHTML follow the spec.
2372
2373 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
2374
2375         Fix crashing Mavericks test
2376
2377         Unreviewed.
2378
2379         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2380         (WebCore::FontPlatformData::registeredFont):
2381
2382 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
2383
2384         Unreviewed post-review feedback on r187797
2385
2386         The correct terminology is "registered" instead of "activated."
2387
2388         No new tests because there is no behavior change.
2389
2390         * platform/graphics/FontPlatformData.h:
2391         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2392         (WebCore::FontPlatformData::registeredFont):
2393         (WebCore::FontPlatformData::activatedFont): Deleted.
2394
2395 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
2396
2397         Clean up casts between NSFont*s and CTFontRefs
2398         https://bugs.webkit.org/show_bug.cgi?id=147618
2399
2400         Reviewed by Mitz Pettel.
2401
2402         For toll free bridged types, it makes more sense to do a C-style cast, than jump
2403         through hoops for older compilers.
2404
2405         No new tests because there is no behavior change.
2406
2407         * platform/graphics/FontPlatformData.h:
2408         (WebCore::FontPlatformData::nsFont):
2409         (WebCore::FontPlatformData::hash):
2410
2411 2015-08-03  Commit Queue  <commit-queue@webkit.org>
2412
2413         Unreviewed, rolling out r187707, r187709, r187724, and
2414         r187728.
2415         https://bugs.webkit.org/show_bug.cgi?id=147617
2416
2417         fast/text/international/arabic-justify.html is flakey
2418         (Requested by litherum on #webkit).
2419
2420         Reverted changesets:
2421
2422         "[OS X] Migrate to CTFontCreateForCharactersWithLanguage from
2423         [NSFont findFontLike:forString:withRange:inLanguage]"
2424         https://bugs.webkit.org/show_bug.cgi?id=147483
2425         http://trac.webkit.org/changeset/187707
2426
2427         "Fix the build"
2428         http://trac.webkit.org/changeset/187709
2429
2430         "Expand CharacterFallbackMapKey to a struct"
2431         https://bugs.webkit.org/show_bug.cgi?id=147530
2432         http://trac.webkit.org/changeset/187724
2433
2434         "CharacterFallbackMapKey should be locale-specific"
2435         https://bugs.webkit.org/show_bug.cgi?id=147532
2436         http://trac.webkit.org/changeset/187728
2437
2438 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
2439
2440         REGRESSION(r184899): Crash when focusing an input element styled with a web font
2441         https://bugs.webkit.org/show_bug.cgi?id=147616
2442         <rdar://problem/21838271>
2443
2444         Reviewed by Dean Jackson.
2445
2446         NSFontManager can't handle web fonts. We used to pass null to NSFontManager in this case,
2447         but r184899 changed that.
2448
2449         Test: fast/text/input-webfont-focus.html
2450
2451         * platform/graphics/FontPlatformData.h:
2452         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2453         (WebCore::FontPlatformData::activatedFont):
2454
2455 2015-08-03  Brent Fulgham  <bfulgham@apple.com>
2456
2457         [Win] Unreviewed build fix.
2458
2459         It turns out that the IFEQ command (at least on Cygwin) does not
2460         understand Wildcards for OS types. Consequently, we should not use
2461         Windows* in makefiles. Luckily, we only need Windows_NT anymore.
2462
2463         * DerivedSources.make: Change Windows* -> Windows_NT to correct build.
2464
2465 2015-08-03  Tim Horton  <timothy_horton@apple.com>
2466
2467         REGRESSION (r186916): TextIndicators for multiline link previews are unreadable/offset/blank
2468         https://bugs.webkit.org/show_bug.cgi?id=147615
2469         <rdar://problem/22116575>
2470
2471         Reviewed by Dean Jackson.
2472
2473         * page/mac/TextIndicatorWindow.mm:
2474         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
2475         No need to offset by the difference between the text bounding rect and the selection bounding rect,
2476         because the snapshot is now (after r186916) taken of exactly the text bounding rect.
2477
2478 2015-08-03  Matt Rajca  <mrajca@apple.com>
2479
2480         Media Session: let UI clients query whether a media element is paused
2481         https://bugs.webkit.org/show_bug.cgi?id=147588
2482
2483         Reviewed by Tim Horton.
2484
2485         * page/Page.cpp:
2486         (WebCore::Page::isMediaElementPaused): Determine if the media element with the given ID is paused.
2487         * page/Page.h:
2488
2489 2015-08-03  Eric Carlson  <eric.carlson@apple.com>
2490
2491         [Mac] Always require user gesture to begin playing to AppleTV automatically
2492         https://bugs.webkit.org/show_bug.cgi?id=147591
2493
2494         Reviewed by Jer Noble.
2495
2496         * html/HTMLMediaElement.cpp:
2497         (WebCore::HTMLMediaElement::mediaState): Don't set the ExternalDeviceAutoPlayCandidate 
2498           flag until the user has explicitly triggered playback.
2499
2500 2015-08-03  Dean Jackson  <dino@apple.com>
2501
2502         Inline video controls overlap each other while playing video in slideover mode
2503         https://bugs.webkit.org/show_bug.cgi?id=147535
2504         <rdar://problem/22026864>
2505
2506         Reviewed by Eric Carlson.
2507
2508         Now that the resizing code is in the shared controller, we need to
2509         make sure to hide the timeline scrubber in iOS when the controls
2510         get too small. This involved adding the dropped class to the timeline,
2511         and rules for hiding to the CSS.
2512
2513         Meanwhile, when the page scale factor is less than one, we use the CSS zoom property
2514         and don't need to factor in the page scale factor when calculating
2515         the size.
2516
2517         * Modules/mediacontrols/mediaControlsApple.js:
2518         (Controller.prototype.updateLayoutForDisplayedWidth): Don't use pageScaleFactor.
2519         * Modules/mediacontrols/mediaControlsiOS.css:
2520         (audio::-webkit-media-controls-panel .dropped): Add display none for this rule.
2521
2522 2015-08-03  Anders Carlsson  <andersca@apple.com>
2523
2524         Safari is failing to remove SQLite Databases via Remove All Website Data
2525         https://bugs.webkit.org/show_bug.cgi?id=147584
2526         rdar://problem/22095006
2527
2528         Reviewed by Brady Eidson.
2529
2530         If we end up deleting every single database for an origin, make sure to also delete the origin.
2531
2532         * Modules/webdatabase/DatabaseTracker.cpp:
2533         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
2534
2535 2015-08-03  Zalan Bujtas  <zalan@apple.com>
2536
2537         Move "starting from root" frame flattening logging to the correct place.
2538         https://bugs.webkit.org/show_bug.cgi?id=147571
2539
2540         Reviewed by Simon Fraser.
2541
2542         * page/FrameView.cpp:
2543         (WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):
2544         (WebCore::FrameView::layout): Deleted.
2545
2546 2015-08-03  Commit Queue  <commit-queue@webkit.org>
2547
2548         Unreviewed, rolling out r187729.
2549         https://bugs.webkit.org/show_bug.cgi?id=147575
2550
2551         10% performance hit (Requested by litherum on #webkit).
2552
2553         Reverted changeset:
2554
2555         "[OS X] Font fallback is not language-sensitive"
2556         https://bugs.webkit.org/show_bug.cgi?id=147390
2557         http://trac.webkit.org/changeset/187729
2558
2559 2015-08-03  Zalan Bujtas  <zalan@apple.com>
2560
2561         ChildWidgetState::ChildWidgetIs* naming is redundant.
2562         https://bugs.webkit.org/show_bug.cgi?id=147565
2563
2564         Reviewed by Simon Fraser.
2565
2566         Since strongly typed enum requires to write out 'ChildWidgetState::ChildWidgetIsDestroyed',
2567         the enumerator list names can be shortened.
2568
2569         No change in behaviour.
2570
2571         * rendering/RenderFrameBase.cpp:
2572         (WebCore::RenderFrameBase::peformLayoutWithFlattening):
2573         * rendering/RenderWidget.cpp:
2574         (WebCore::RenderWidget::updateWidgetPosition):
2575         * rendering/RenderWidget.h:
2576
2577 2015-08-03  Zalan Bujtas  <zalan@apple.com>
2578
2579         Pass ControlStates& to RenderTheme methods instead of ControlStates*
2580         https://bugs.webkit.org/show_bug.cgi?id=147521
2581
2582         Reviewed by Andreas Kling.
2583
2584         No change in functionality.
2585
2586         * platform/Theme.h:
2587         (WebCore::Theme::selectionColor):
2588         (WebCore::Theme::paint):
2589         (WebCore::Theme::inflateControlPaintRect):
2590         * platform/mac/ThemeMac.h:
2591         * platform/mac/ThemeMac.mm:
2592         (WebCore::updateStates):
2593         (WebCore::convertControlStatesToThemeDrawState):
2594         (WebCore::configureToggleButton):
2595         (WebCore::sharedRadioCell):
2596         (WebCore::sharedCheckboxCell):
2597         (WebCore::paintToggleButton):
2598         (WebCore::setUpButtonCell):
2599         (WebCore::button):
2600         (WebCore::paintButton):
2601         (WebCore::paintStepper):
2602         (WebCore::ThemeMac::ensuredView):
2603         (WebCore::ThemeMac::inflateControlPaintRect):
2604         (WebCore::ThemeMac::paint):
2605         * rendering/RenderBox.cpp:
2606         (WebCore::RenderBox::paintBoxDecorations):
2607         * rendering/RenderTheme.cpp:
2608         (WebCore::RenderTheme::paint):
2609         (WebCore::RenderTheme::adjustRepaintRect):
2610         (WebCore::RenderTheme::updateControlStatesForRenderer):
2611         * rendering/RenderTheme.h:
2612         * rendering/RenderThemeMac.mm:
2613         (WebCore::RenderThemeMac::documentViewFor):
2614
2615 2015-08-03  Brady Eidson  <beidson@apple.com>
2616
2617         Crash when signing into twitter calling WebCore::DocumentLoader::responseReceived(WebCore::CachedResource*, WebCore::ResourceResponse const&).
2618         <rdar://problem/22098457> and https://bugs.webkit.org/show_bug.cgi?id=147560
2619
2620         Reviewed by Alexey Proskuryakov.
2621
2622         * loader/DocumentLoader.cpp:
2623         (WebCore::DocumentLoader::willSendRequest): Only grab identifierForLoadWithoutResourceLoader() if there's no ResourceLoader.
2624
2625 2015-08-03  Zalan Bujtas  <zalan@apple.com>
2626
2627         themePainted in RenderBox::paintBoxDecorations() is confusing.
2628         https://bugs.webkit.org/show_bug.cgi?id=147492
2629
2630         Reviewed by Andreas Kling.
2631
2632         What themePainted is supposed to indicate is whether the theme requires additional border and background painting.
2633         Rename it to borderOrBackgroundPaintingIsNeeded.
2634
2635         No change in behaviour.
2636
2637         * rendering/RenderBox.cpp:
2638         (WebCore::RenderBox::paintBoxDecorations):
2639
2640 2015-08-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2641
2642         [EFL] http/tests/media/media-stream/disconnected-frame-already.html is crashing after r185903
2643         https://bugs.webkit.org/show_bug.cgi?id=146834
2644
2645         Reviewed by Eric Carlson.
2646
2647         r185903 went to far in removing some tests, in particular whether the current process is related to a frame.
2648         Readded that check.
2649         Refactored the code to remove the need for NavigatorUserMedia class.
2650
2651         Covered by existing tests.
2652
2653         * CMakeLists.txt: Removed NavigatorUserMedia.cpp.
2654         * Modules/mediastream/NavigatorUserMedia.cpp: Removed.
2655         * Modules/mediastream/NavigatorUserMedia.h: Removed.
2656         * WebCore.xcodeproj/project.pbxproj: Ditto.
2657         * bindings/js/JSNavigatorCustom.cpp:
2658         (WebCore::JSNavigator::webkitGetUserMedia): Inlined NavigatorUserMeia::webkitGetUserMedia.
2659
2660 2015-08-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2661
2662         JSXMLHttpRequest::visitAdditionalChildren does not need to explicitly mark m_response
2663         https://bugs.webkit.org/show_bug.cgi?id=147488
2664
2665         Reviewed by Andreas Kling.
2666
2667         Covered by existing tests.
2668
2669         * bindings/js/JSXMLHttpRequestCustom.cpp:
2670         (WebCore::JSXMLHttpRequest::visitAdditionalChildren): Removed m_response marking.
2671
2672 2015-08-01  Chris Fleizach  <cfleizach@apple.com>
2673
2674         AX: On some complex sites, iOS instantly crashes once VoiceOver is turned on
2675         https://bugs.webkit.org/show_bug.cgi?id=147529
2676
2677         Reviewed by Dan Bernstein.
2678
2679         Sometimes after focusing on a node, it seems like the entire document is destroyed.
2680         Accessibility the axObjectCache returns nullptr and we crash.
2681
2682         Despite my best efforts, I couldn't make a layout test that reproduced this. It's possible
2683         the entire document needs to be destroyed and replaced with something.
2684
2685         * accessibility/AccessibilityRenderObject.cpp:
2686         (WebCore::AccessibilityRenderObject::setFocused):
2687
2688 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
2689
2690         [OS X] Font fallback is not language-sensitive
2691         https://bugs.webkit.org/show_bug.cgi?id=147390
2692
2693         Reviewed by Dean Jackson.
2694
2695         We need to make our font fallback code sensitive to locale.
2696
2697         Test: fast/text/fallback-language-han.html
2698
2699         * platform/graphics/mac/FontCacheMac.mm:
2700         (WebCore::lookupCTFont):
2701         (WebCore::FontCache::systemFallbackForCharacters):
2702
2703 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
2704
2705         CharacterFallbackMapKey should be locale-specific
2706         https://bugs.webkit.org/show_bug.cgi?id=147532
2707
2708         Reviewed by Dean Jackson.
2709
2710         This is in preparation for locale-specific font fallback.
2711
2712         No new tests because there is no behavior change.
2713
2714         * platform/graphics/Font.cpp:
2715         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
2716         (WebCore::CharacterFallbackMapKey::operator==):
2717         (WebCore::CharacterFallbackMapKeyHash::hash):
2718         (WebCore::Font::systemFallbackFontForCharacter):
2719
2720 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
2721
2722         Expand CharacterFallbackMapKey to a struct
2723         https://bugs.webkit.org/show_bug.cgi?id=147530
2724
2725         Reviewed by Dean Jackson.
2726
2727         This is in prepraration for making this struct locale-specific.
2728
2729         No new tests because there is no behavior change.
2730
2731         * platform/graphics/Font.cpp:
2732         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
2733         (WebCore::CharacterFallbackMapKey::isHashTableDeletedValue):
2734         (WebCore::CharacterFallbackMapKey::operator==):
2735         (WebCore::CharacterFallbackMapKeyHash::hash):
2736         (WebCore::CharacterFallbackMapKeyHash::equal):
2737         (WebCore::Font::systemFallbackFontForCharacter):
2738
2739 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
2740
2741         Fix the build after r187721
2742
2743         Unreviewed.
2744
2745         * bindings/js/JSDOMBinding.h:
2746         (WebCore::createWrapper):
2747
2748 2015-08-01  Alex Christensen  <achristensen@webkit.org>
2749
2750         Fix compile errors with VS2015
2751         https://bugs.webkit.org/show_bug.cgi?id=147526
2752
2753         Reviewed by Myles Maxfield.
2754
2755         * bindings/js/JSDOMBinding.h:
2756         (WebCore::createWrapper):
2757         Explicitly call the Ref constructor to avoid unresolved symbols with VS2015.
2758         Otherwise, VS2015 tries to use CSSPrimitiveValue::operator<Ref<CSSPrimitiveValue> > which doesn't exist.
2759
2760 2015-07-27  Matt Rajca  <mrajca@apple.com>
2761
2762         Media Session: inform the UI process when the focused Content media element changes
2763         https://bugs.webkit.org/show_bug.cgi?id=147323
2764
2765         Reviewed by Tim Horton.
2766
2767         * html/HTMLMediaElement.cpp:
2768         (WebCore::HTMLMediaElement::playInternal): Eventually tell the UI process that the focused Content media element changed.
2769         * page/ChromeClient.h:
2770
2771 2015-07-27  Matt Rajca  <mrajca@apple.com>
2772
2773         Media Session: give media elements unique IDs
2774         https://bugs.webkit.org/show_bug.cgi?id=147322
2775
2776         Reviewed by Eric Carlson.
2777
2778         * html/HTMLMediaElement.cpp:
2779         (WebCore::elementIDsToElements): Create a global map of element IDs to elements.
2780         (WebCore::HTMLMediaElement::elementWithID): Retrieve the element with the given ID.
2781         (WebCore::HTMLMediaElement::HTMLMediaElement): Give the element a unique ID.
2782         (WebCore::HTMLMediaElement::playInternal): Removed whitespace.
2783         (WebCore::HTMLMediaElement::pauseInternal): Ditto.
2784         * html/HTMLMediaElement.h:
2785         (WebCore::HTMLMediaElement::elementID):
2786
2787 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
2788
2789         Fix the build
2790
2791         Unreviewed.
2792
2793         * platform/graphics/mac/FontCacheMac.mm:
2794         (WebCore::lookupCTFont):
2795
2796 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
2797
2798         [OS X] Migrate to CTFontCreateForCharactersWithLanguage from [NSFont findFontLike:forString:withRange:inLanguage]
2799         https://bugs.webkit.org/show_bug.cgi?id=147483
2800
2801         Reviewed by Dean Jackson.
2802
2803         [NSFont findFontLike:forString:withRange:inLanguage] doesn't properly handle its last argument. In
2804         addition, we want to be moving away from NSFont in the first place and on to Core Text. This new
2805         CoreText function correctly handles its language argument, which is required for language-specific
2806         font fallback.
2807
2808         No new tests because there is no behavior change.
2809
2810         * platform/graphics/FontCache.cpp:
2811         (WebCore::FontCache::purgeInactiveFontData):
2812         * platform/graphics/FontCache.h:
2813         (WebCore::FontCache::platformPurgeInactiveFontData):
2814         * platform/graphics/mac/FontCacheMac.mm:
2815         (WebCore::fallbackDedupSet):
2816         (WebCore::FontCache::platformPurgeInactiveFontData):
2817         (WebCore::lookupCTFont):
2818         (WebCore::FontCache::systemFallbackForCharacters):
2819         * platform/spi/cocoa/CoreTextSPI.h:
2820         * platform/spi/mac/NSFontSPI.h:
2821
2822 2015-07-31  Chris Dumez  <cdumez@apple.com>
2823
2824         Drop dummy Timer callbacks
2825         https://bugs.webkit.org/show_bug.cgi?id=147516
2826
2827         Reviewed by Alexey Proskuryakov.
2828
2829         Drop dummy Timer callbacks in the code base. A lot of Timer callbacks
2830         do nothing else beside calling a particular method. In such case, we
2831         can use the called method as Timer callback instead.
2832
2833         * css/FontLoader.cpp:
2834         (WebCore::FontLoader::FontLoader):
2835         * css/FontLoader.h:
2836         * dom/Document.cpp:
2837         (WebCore::Document::Document):
2838         (WebCore::Document::styleRecalcTimerFired): Deleted.
2839         (WebCore::Document::domCookieCacheExpiryTimerFired): Deleted.
2840         * dom/Document.h:
2841         * html/MediaController.cpp:
2842         (MediaController::MediaController):
2843         (MediaController::timeupdateTimerFired): Deleted.
2844         * html/MediaController.h:
2845         * loader/cache/CachedResource.cpp:
2846         (WebCore::CachedResource::CachedResource):
2847         * loader/cache/CachedResourceLoader.cpp:
2848         (WebCore::CachedResourceLoader::CachedResourceLoader):
2849         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): Deleted.
2850         * loader/cache/CachedResourceLoader.h:
2851         * loader/cache/MemoryCache.cpp:
2852         (WebCore::MemoryCache::MemoryCache):
2853         (WebCore::MemoryCache::pruneTimerFired): Deleted.
2854         * loader/cache/MemoryCache.h:
2855         * page/EventSource.cpp:
2856         (WebCore::EventSource::EventSource):
2857         (WebCore::EventSource::connectTimerFired): Deleted.
2858         * page/EventSource.h:
2859         * page/FrameView.cpp:
2860         (WebCore::FrameView::FrameView):
2861         (WebCore::FrameView::delayedScrollEventTimerFired): Deleted.
2862         (WebCore::FrameView::postLayoutTimerFired): Deleted.
2863         * page/FrameView.h:
2864         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
2865         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
2866         (WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS):
2867         (WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired): Deleted.
2868         * page/scrolling/mac/ScrollingCoordinatorMac.h:
2869         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
2870         (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
2871         (WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired): Deleted.
2872         * platform/graphics/FontCache.cpp:
2873         (WebCore::FontCache::FontCache):
2874         (WebCore::FontCache::purgeTimerFired): Deleted.
2875         * platform/graphics/FontCache.h:
2876         * platform/graphics/ShadowBlur.cpp:
2877         (WebCore::ScratchBuffer::ScratchBuffer):
2878         (WebCore::ScratchBuffer::timerFired): Deleted.
2879         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2880         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2881         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
2882         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): Deleted.
2883
2884 2015-07-31  Matthew Daiter  <mdaiter@apple.com>
2885
2886         Removed pointSize from _addMarkersToList
2887         https://bugs.webkit.org/show_bug.cgi?id=147515
2888
2889         Reviewed by Eric Carlson.
2890
2891         * editing/cocoa/HTMLConverter.mm:
2892         (HTMLConverter::_addMarkersToList): Deleted.
2893
2894 2015-07-31  Alex Christensen  <achristensen@webkit.org>
2895
2896         Prepare for VS2015
2897         https://bugs.webkit.org/show_bug.cgi?id=146579
2898
2899         Reviewed by Jon Honeycutt.
2900
2901         * WebCore.vcxproj/build-generated-files.pl:
2902         Find a correct preprocessor when using VS2015.
2903
2904 2015-07-31  Eric Carlson  <eric.carlson@apple.com>
2905
2906         [iOS] use a media-specific user gesture check
2907         https://bugs.webkit.org/show_bug.cgi?id=147509
2908
2909         Reviewed by Tim Horton.
2910
2911         Change an enum name added in r187688.
2912
2913         * dom/UserGestureIndicator.cpp:
2914         (WebCore::isDefinite): DefinitelyProcessingMediaUserGesture -> DefinitelyProcessingPotentialUserGesture
2915         (WebCore::UserGestureIndicator::processingUserGestureForMedia): Ditto.
2916         * dom/UserGestureIndicator.h: Ditto.
2917
2918 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
2919
2920         [Cocoa] Latin quotes are used with the system font on Chinese devices
2921         https://bugs.webkit.org/show_bug.cgi?id=147504
2922
2923         Reviewed by Dean Jackson.
2924
2925         The system font has some fancy logic regarding character selection which requires
2926         using Core Text for glyph selection.
2927
2928         No new tests because tests can't change the system language of the device.
2929
2930         * platform/graphics/mac/GlyphPageMac.cpp:
2931         (WebCore::shouldUseCoreText):
2932
2933 2015-07-31  Chris Dumez  <cdumez@apple.com>
2934
2935         Coalesce authentication credential requests
2936         https://bugs.webkit.org/show_bug.cgi?id=128006
2937         <rdar://problem/16839069>
2938
2939         Reviewed by Alexey Proskuryakov.
2940
2941         Export symbol for ProtectionSpace::compare() so it can be called from
2942         WebKit2.
2943
2944         * platform/network/ProtectionSpaceBase.h:
2945
2946 2015-07-31  Eric Carlson  <eric.carlson@apple.com>
2947
2948         [iOS] use a media-specific user gesture check
2949         https://bugs.webkit.org/show_bug.cgi?id=147509
2950
2951         Reviewed by Jer Noble.
2952
2953         * bindings/js/ScriptController.cpp:
2954         (WebCore::ScriptController::processingUserGestureForMedia): New.
2955         * bindings/js/ScriptController.h:
2956
2957         * dom/UserGestureIndicator.cpp:
2958         (WebCore::isDefinite): Allow DefinitelyProcessingMediaUserGesture.
2959         (WebCore::UserGestureIndicator::processingUserGestureForMedia): New.
2960         * dom/UserGestureIndicator.h:
2961
2962         * html/HTMLMediaElement.cpp:
2963         (WebCore::HTMLMediaElement::load): Use ScriptController::processingUserGestureForMedia instead of 
2964           ScriptController::processingUserGesture
2965         (WebCore::HTMLMediaElement::play): Ditto.
2966
2967 2015-07-31  Andreas Kling  <akling@apple.com>
2968
2969         Crashes under HTMLMediaElement::updateActiveTextTrackCues() when destroying CachedPage.
2970         <https://webkit.org/b/147506>
2971         <rdar://problem/21939014>
2972
2973         Reviewed by Chris Dumez.
2974
2975         Don't mess with the media element's text tracks below its ActiveDOMObject::stop()
2976         implementation, since that may cause DOM mutations.
2977
2978         I don't have a repro or a test for this, but plenty of crash logs to indicate that
2979         we're getting ourselves into trouble by modifying the DOM during CachedPage teardown.
2980
2981         * html/HTMLMediaElement.cpp:
2982         (WebCore::HTMLMediaElement::configureTextTrackDisplay):
2983
2984 2015-07-31  Tim Horton  <timothy_horton@apple.com>
2985
2986         [iOS] DOMNode preview snapshot rects are wrong for user-select: none links
2987         https://bugs.webkit.org/show_bug.cgi?id=147513
2988         <rdar://problem/22083354>
2989
2990         Reviewed by Simon Fraser.
2991
2992         * bindings/objc/DOM.mm:
2993         (-[DOMNode getPreviewSnapshotImage:andRects:]):
2994         Use the same code as WebKit2 to compute the fallback rect (if TextIndicator fails),
2995         asking the RenderObject (or RenderImage) for its bounding box instead of using the
2996         (often wrong) Range bounding rect.
2997
2998         Make sure to use the fallback rect *any* time TextIndicator fails (before
2999         we would return no rects at all if TextIndicator::createWithRange returned null,
3000         and the fallback rect if it returned with an empty image).
3001
3002         Inverse-page-scale the margin, to match the appearance in WebKit2.
3003
3004 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
3005
3006         [SVG -> OTF Converter] Crash when converting Arabic fonts
3007         https://bugs.webkit.org/show_bug.cgi?id=147510
3008
3009         Reviewed by Anders Carlsson.
3010
3011         SVGToOTFFontConverter::compareCodepointsLexicographically() wasn't transitive.
3012
3013         Test: fast/text/arabic-duplicate-glyph-font.html
3014
3015         * svg/SVGToOTFFontConversion.cpp:
3016         (WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically):
3017
3018 2015-07-31  Jeremy Jones  <jeremyj@apple.com>
3019
3020         Rename AVPlayerLayerView to _AVPlayerLayerView.
3021         https://bugs.webkit.org/show_bug.cgi?id=147399
3022
3023         Reviewed by Eric Carlson.
3024
3025         Change class name AVPlayerLayerView to match change in AVKit SPI. 
3026         This prevents conflicts with 3rd party apps.
3027
3028         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3029         (WebAVPlayerLayerView_dealloc):
3030         (getWebAVPlayerLayerViewClass):
3031         * platform/spi/cocoa/AVKitSPI.h:
3032
3033 2015-07-31  Chris Dumez  <cdumez@apple.com>
3034
3035         ImageBufferDataCG should not add IOSurfaces to the pool
3036         https://bugs.webkit.org/show_bug.cgi?id=147494
3037
3038         Reviewed by Tim Horton.
3039
3040         ImageBufferDataCG should not add IOSurfaces to the pool as it is not
3041         safe. IOSurfaceIsInUse() does not return accurate result for those
3042         surfaces.
3043
3044         This is a partial revert of r181301.
3045
3046         * platform/graphics/cg/ImageBufferDataCG.cpp:
3047         (WebCore::ImageBufferData::~ImageBufferData): Deleted.
3048         * platform/graphics/cg/ImageBufferDataCG.h:
3049
3050 2015-07-31  Jer Noble  <jer.noble@apple.com>
3051
3052          CRASH at WebCore::TaskDispatcher<WebCore::ScriptExecutionContext>::postTask + 38
3053          https://bugs.webkit.org/show_bug.cgi?id=147485
3054
3055          Rubber-stamped by Joseph Pecoraro.
3056
3057          Follow-up test crash fix: call superclass's contextDestroyed() which allows the
3058          m_scriptExecutionContext variable to be cleared.
3059
3060          * html/HTMLMediaElement.cpp:
3061          (WebCore::HTMLMediaElement::contextDestroyed):
3062
3063 2015-07-31  Joseph Pecoraro  <pecoraro@apple.com>
3064
3065         Only generate "themeWin*" UserAgentStyleSheet constants for Windows builds
3066         https://bugs.webkit.org/show_bug.cgi?id=147378
3067
3068         Reviewed by Alex Christensen.
3069
3070         * DerivedSources.make:
3071         Only include windows user agent style sheets for Windows OSes.
3072
3073 2015-07-31  Alex Christensen  <achristensen@webkit.org>
3074
3075         Prepare for debug CMake builds on Windows.
3076         https://bugs.webkit.org/show_bug.cgi?id=147484
3077
3078         Reviewed by Tim Horton.
3079
3080         In order to get debug builds to link on Windows with CMake, we will need to use AllInOnes.
3081         This patch includes more files in the AllInOnes and removes some duplicate code.
3082
3083         * WebCore.vcxproj/WebCore.vcxproj:
3084         * bindings/js/JSBindingsAllInOne.cpp:
3085         * css/CSSAllInOne.cpp:
3086         Many files were added to the AllInOne files.  They should not be included in the Visual Studio solutions.
3087         * css/CSSCalculationValue.cpp:
3088         (WebCore::CSSCalcValue::create):
3089         Use CSSParserString::equalIgnoringCase to avoid ambiguous calls to overloaded functions.
3090         * css/StyleResolver.cpp:
3091         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3092         (WebCore::shouldApplyPropertyInParseOrder):
3093         (WebCore::convertToFloatLength): Deleted.
3094         * css/TransformFunctions.cpp:
3095         (WebCore::transformOperationType):
3096         (WebCore::convertToFloatLength):
3097         * css/TransformFunctions.h:
3098         Removed duplicate convertToFloatLength function.
3099         * html/HTMLElementsAllInOne.cpp:
3100         * rendering/FlowThreadController.cpp:
3101         (WebCore::FlowThreadController::updateNamedFlowsLayerListsIfNeeded):
3102         (WebCore::compareZIndexFlowThreadController): Renamed from compareZIndex to prevent naming conflicts.
3103         (WebCore::FlowThreadController::collectFixedPositionedLayers):
3104         (WebCore::compareZIndex): Deleted.
3105         * rendering/RenderLayer.cpp:
3106         (WebCore::RenderLayer::shouldRepaintAfterLayout):
3107         (WebCore::compositedWithOwnBackingStore):
3108         * rendering/RenderLayer.h:
3109         * rendering/RenderLayerBacking.cpp:
3110         (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
3111         (WebCore::descendantLayerPaintsIntoAncestor):
3112         (WebCore::RenderLayerBacking::paintIntoLayer):
3113         (WebCore::RenderLayerBacking::paintContents):
3114         (WebCore::compositedWithOwnBackingStore): Deleted.
3115         Removed duplicate compositedWithOwnBackingStore.
3116         (WebCore::paintScrollbar): Deleted duplicate function.
3117         * rendering/RenderLayerCompositor.cpp:
3118         (WebCore::RenderLayerCompositor::requiresScrollLayer):
3119         (WebCore::paintScrollbar):
3120         * rendering/RenderLayerCompositor.h:
3121         * rendering/RenderingAllInOne.cpp:
3122
3123 2015-07-31  Jer Noble  <jer.noble@apple.com>
3124
3125         CRASH at WebCore::TaskDispatcher<WebCore::ScriptExecutionContext>::postTask + 38
3126         https://bugs.webkit.org/show_bug.cgi?id=147485
3127
3128         Reviewed by Eric Carlson.
3129
3130         CrashLogs indicate a use-after-free of the ScriptExecutionContext (i.e., Document) used by
3131         the GenericTaskQueue objects owned by HTMLMediaElement. When the ScriptExecutionContext
3132         notifies its ActiveDOMObjects that it is about to be destroyed, close() the
3133         GenericTaskQueues so that they can no longer accept new tasks.
3134
3135         Previously, enqueueing a task on a closed GenericTaskQueue ASSERTed in debug builds, but
3136         silently succeeded in release builds. Calling enqueueTask() on a  closed GenericTaskQueue is
3137         now a no-op.
3138
3139         * html/HTMLMediaElement.cpp:
3140         (WebCore::HTMLMediaElement::contextDestroyed):
3141         * html/HTMLMediaElement.h:
3142         * platform/GenericTaskQueue.h:
3143         (WebCore::GenericTaskQueue::enqueueTask):
3144
3145 2015-07-31  Zan Dobersek  <zdobersek@igalia.com>
3146
3147         [GTK] Have DataObjectGtk::unknownTypes() return a reference to the HashMap object
3148         https://bugs.webkit.org/show_bug.cgi?id=147401
3149
3150         Reviewed by Carlos Garcia Campos.
3151
3152         Don't copy the DataObjectGtk::m_unknownTypes HashMap on every retrieval through
3153         DataObjectGtk::unknownTypes(). The range-based for-loops that iterate over the
3154         map in PasteboardGtk.cpp and PasteboardHelper.cpp are also cleaned up.
3155
3156         * platform/gtk/DataObjectGtk.cpp:
3157         (WebCore::DataObjectGtk::unknownTypes):
3158         * platform/gtk/DataObjectGtk.h:
3159         * platform/gtk/PasteboardGtk.cpp:
3160         (WebCore::Pasteboard::writePasteboard):
3161         (WebCore::Pasteboard::types):
3162         * platform/gtk/PasteboardHelper.cpp:
3163         (WebCore::PasteboardHelper::fillSelectionData):
3164
3165 2015-07-30  Zalan Bujtas  <zalan@apple.com>
3166
3167         RenderTheme::paintBorderOnly and paintDecorations should take RenderBox instead of RenderObject.
3168         https://bugs.webkit.org/show_bug.cgi?id=147470
3169
3170         Reviewed by Simon Fraser.
3171
3172         Tighten the code so that RenderTheme paint functions take RenderBox instead of RenderObject.
3173
3174         No change in functionality.
3175
3176         * rendering/RenderTheme.cpp:
3177         (WebCore::RenderTheme::paintBorderOnly):
3178         (WebCore::RenderTheme::paintDecorations):
3179         * rendering/RenderTheme.h:
3180
3181 2015-07-30  Andreas Kling  <akling@apple.com>
3182
3183         [CF] Web process continually eating memory on simple, shared Google Docs spreadsheet.
3184         <https://webkit.org/b/147403>
3185         <rdar://problem/18835799>
3186
3187         Reviewed by Geoffrey Garen.
3188
3189         Make sure we service the CFRunLoop on worker threads, since ports using CoreFoundation
3190         will be scheduling garbage collections and heap sweeps using CFRunLoop timers.
3191
3192         This fix is a stopgap. Long term we need a better design for integrating GC tasks with
3193         with the web worker run loop.
3194
3195         * workers/WorkerRunLoop.cpp:
3196         (WebCore::WorkerRunLoop::runInMode): Instead of sleeping forever, calculate a better
3197         wakeup deadline by asking the CFRunLoop when its next timer will fire. Then, when a
3198         timeout occurs, call CFRunLoopRunInMode (with seconds=0) to service pending timers.
3199
3200 2015-07-30  Myles C. Maxfield  <mmaxfield@apple.com>
3201
3202         Move locale information into FontDescription
3203         https://bugs.webkit.org/show_bug.cgi?id=147457
3204
3205         Reviewed by Andreas Kling.
3206
3207         Currently, the "lang" attribute on a node sets locale information in RenderStyle.
3208         Font selection is sensitive to this locale information, and occurs deep within
3209         platform/ code, far away from RenderStyle. Because every RenderStyle owns a
3210         FontDescription, and font selection can consult with FontDescriptions, it makes
3211         sense to move the variable from RenderStyle to FontDescription, and provide
3212         convenience methods on RenderStyle which inspect its FontDescription for locale
3213         information.
3214
3215         This patch is in preparation for correctly obeying locale information when
3216         performing font fallback.
3217
3218         No new tests because there is no behavior change.
3219
3220         * css/CSSPropertyNames.in:
3221         * css/StyleBuilderCustom.h:
3222         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
3223         * platform/graphics/FontCache.h:
3224         (WebCore::FontDescriptionKey::FontDescriptionKey):
3225         (WebCore::FontDescriptionKey::operator==):
3226         * platform/graphics/FontCascade.cpp:
3227         * platform/graphics/FontDescription.cpp:
3228         (WebCore::FontDescription::FontDescription):
3229         (WebCore::FontDescription::setLocale):
3230         * platform/graphics/FontDescription.h:
3231         (WebCore::FontDescription::locale):
3232         (WebCore::FontDescription::initialLocale):
3233         (WebCore::FontDescription::operator==):
3234         (WebCore::FontDescription::FontDescription): Deleted.
3235         (WebCore::FontDescription::setScript): Deleted.
3236         * platform/text/LocaleToScriptMappingDefault.cpp:
3237         (WebCore::localeToScriptCodeForFontSelection):
3238         * rendering/style/RenderStyle.cpp:
3239         (WebCore::RenderStyle::changeRequiresLayout): Deleted.
3240         * rendering/style/RenderStyle.h:
3241         * rendering/style/StyleRareInheritedData.cpp:
3242         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Deleted.
3243         (WebCore::StyleRareInheritedData::operator==): Deleted.
3244         * rendering/style/StyleRareInheritedData.h:
3245         * style/StyleResolveForDocument.cpp:
3246         (WebCore::Style::resolveForDocument):
3247
3248 2015-07-30  Anders Carlsson  <andersca@apple.com>
3249
3250         Remove stray printf.
3251         
3252         * loader/SubframeLoader.cpp:
3253         (WebCore::SubframeLoader::requestObject):
3254
3255 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
3256
3257         Make Path::apply() take a function reference
3258         https://bugs.webkit.org/show_bug.cgi?id=147472
3259
3260         Reviewed by Anders Carlsson.
3261
3262         Path::apply() should take a const reference to a std::function.
3263
3264         * platform/graphics/Path.h:
3265         * platform/graphics/cairo/PathCairo.cpp:
3266         * platform/graphics/cg/PathCG.cpp:
3267         (WebCore::CGPathApplierToPathApplier):
3268         (WebCore::Path::apply):
3269
3270 2015-07-30  Anders Carlsson  <andersca@apple.com>
3271
3272         Assertion failure when a plug-in loads a resource that redirects somewhere
3273         https://bugs.webkit.org/show_bug.cgi?id=147469
3274
3275         Reviewed by Alexey Proskuryakov.
3276
3277         Test: http/tests/plugins/get-url-redirect.html
3278
3279         r186597 moved the call to addPlugInStreamLoader to willSendRequest. This is wrong since
3280         willSendRequest can be invoked more than once.
3281         
3282         Fix this by making the initialization phase of NetscapePlugInStreamLoader be more like
3283         SubresourceLoader where we only call addPlugInStreamLoader once we've successfully initialized
3284         the loader, and only call removePlugInStreamLoader if we've called addPlugInStreamLoader.
3285
3286         Also change addPlugInStreamLoader and removePlugInStreamLoader to take references.
3287
3288         * loader/DocumentLoader.cpp:
3289         (WebCore::DocumentLoader::addPlugInStreamLoader):
3290         (WebCore::DocumentLoader::removePlugInStreamLoader):
3291         * loader/DocumentLoader.h:
3292         * loader/NetscapePlugInStreamLoader.cpp:
3293         (WebCore::NetscapePlugInStreamLoader::create):
3294         (WebCore::NetscapePlugInStreamLoader::init):
3295         (WebCore::NetscapePlugInStreamLoader::didFinishLoading):
3296         (WebCore::NetscapePlugInStreamLoader::didFail):
3297         (WebCore::NetscapePlugInStreamLoader::didCancel):
3298         (WebCore::NetscapePlugInStreamLoader::notifyDone):
3299         * loader/NetscapePlugInStreamLoader.h:
3300         * loader/ResourceLoader.cpp:
3301         (WebCore::ResourceLoader::willSendRequest): Deleted.
3302         * loader/ResourceLoader.h:
3303         (WebCore::ResourceLoader::isPlugInStreamLoader): Deleted.
3304         * loader/SubframeLoader.cpp:
3305         (WebCore::SubframeLoader::requestObject):
3306
3307 2015-07-30  Jer Noble  <jer.noble@apple.com>
3308
3309         [iOS] Pressing 'done' in fullscreen video sometimes does nothing; stuck in fullscreen
3310         https://bugs.webkit.org/show_bug.cgi?id=147367
3311
3312         Reviewed by Eric Carlson.
3313
3314         During the request to exit fullscreen, the video element's m_videoFullscreenMode variable
3315         is set, but no exitFullscreen() request is sent up to the UIProcess. Previous threading
3316         issues have been discovered and fixed, but may have been re-introduced (or never fully
3317         fixed in the first place). To solve the bad behavior this threading issue creates, add
3318         a watchdog timer, similar to the one used in the desktop fullscreen controller, to ensure
3319         that if an exit fullscreen request is not acted upon, the UIProcess forcibly exits fullscreen
3320         anyway.
3321
3322         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
3323         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3324         (WebVideoFullscreenInterfaceAVKit::WebVideoFullscreenInterfaceAVKit): Initialize the timer.
3325         (WebVideoFullscreenInterfaceAVKit::exitFullscreen): Cancel the timer.
3326         (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Set the timer.
3327         (WebVideoFullscreenInterfaceAVKit::watchdogTimerFired): Forcibly exit fullscreen mode.
3328
3329 2015-07-30  Myles C. Maxfield  <mmaxfield@apple.com>
3330
3331         Clean up makeFontCascadeCacheKey()
3332         https://bugs.webkit.org/show_bug.cgi?id=147430
3333
3334         Reviewed by Benjamin Poulain.
3335
3336         FontDescriptionKey is designed to encapsulate all the cacheable properties of a FontDescription.
3337         However, a higher-level cache, FontCascadeCacheKey, was taking some values from FontDescriptions.
3338         The fact that there wasn't a bug before is just a happy coincidence. This patch moves those bits
3339         from the higher-level cache and puts them into FontDescriptionKey where they belong.
3340
3341         No new tests because there is no behavior change.
3342
3343         * platform/graphics/FontCache.h:
3344         (WebCore::FontDescriptionKey::makeFlagKey):
3345         * platform/graphics/FontCascade.cpp:
3346         (WebCore::operator==):
3347         (WebCore::makeFontSelectorFlags): Deleted.
3348         (WebCore::makeFontCascadeCacheKey): Deleted.
3349         (WebCore::computeFontCascadeCacheHash): Deleted.
3350
3351 2015-07-18  Matt Rajca  <mrajca@apple.com>
3352
3353         [Mac] Media Session: add support for more telephony interruptions
3354         https://bugs.webkit.org/show_bug.cgi?id=147079
3355
3356         Reviewed by Eric Carlson.
3357
3358         * platform/mediasession/mac/MediaSessionInterruptionProviderMac.mm:
3359         (WebCore::callDidEndRinging): End 'Transient' interruptions.
3360         (WebCore::callDidConnect): Forward this event to media sessions as a 'Content' interruption.
3361         (WebCore::MediaSessionInterruptionProviderMac::beginListeningForInterruptions): Register observers for new
3362          notification types.
3363         (WebCore::MediaSessionInterruptionProviderMac::stopListeningForInterruptions): Unregister all observers.
3364
3365 2015-07-29  Dean Jackson  <dino@apple.com>
3366
3367         Don't use (Details) when exposing SPI
3368         https://bugs.webkit.org/show_bug.cgi?id=147426
3369         <rdar://problem/22062407>
3370
3371         Reviewed by Dan Bernstein.
3372
3373         If we are declaring the interface without any implementation,
3374         we should use class extensions.
3375
3376         Added three new SPI.h files for NSButtonCell, NSURLConnection and
3377         NSURLRequest.
3378
3379         * WebCore.xcodeproj/project.pbxproj:
3380         * platform/mac/ScrollViewMac.mm:
3381         * platform/mac/ThemeMac.mm:
3382         * platform/network/mac/ResourceHandleMac.mm:
3383         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
3384         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
3385         * platform/spi/cf/CFNetworkSPI.h:
3386         * platform/spi/cocoa/AVKitSPI.h:
3387         * platform/spi/cocoa/CFNSURLConnectionSPI.h:
3388         * platform/spi/cocoa/NSButtonCellSPI.h: Copied from Source/WebCore/platform/spi/cocoa/NSColorSPI.h.
3389         * platform/spi/cocoa/NSCalendarDateSPI.h:
3390         * platform/spi/cocoa/NSColorSPI.h:
3391         * platform/spi/cocoa/NSFileManagerSPI.h:
3392         * platform/spi/cocoa/NSStringSPI.h:
3393         * platform/spi/cocoa/NSURLConnectionSPI.h: Copied from Source/WebCore/platform/spi/cocoa/NSStringSPI.h.
3394         * platform/spi/cocoa/NSURLDownloadSPI.h:
3395         * platform/spi/cocoa/NSURLRequestSPI.h: Copied from Source/WebCore/platform/spi/cocoa/NSStringSPI.h.
3396         * platform/spi/cocoa/QuartzCoreSPI.h:
3397         * platform/spi/cocoa/WebFilterEvaluatorSPI.h:
3398         * platform/spi/ios/CoreUISPI.h:
3399         * platform/spi/ios/LaunchServicesSPI.h:
3400         * platform/spi/ios/MediaPlayerSPI.h:
3401         * platform/spi/ios/QuickLookSPI.h:
3402         * platform/spi/ios/UIColorSPI.h:
3403         * platform/spi/mac/QuickLookMacSPI.h:
3404         * rendering/RenderThemeMac.mm:
3405
3406 2015-07-30  Alex Christensen  <achristensen@webkit.org>
3407
3408         Remove LegacyCACFLayerTreeHost
3409         https://bugs.webkit.org/show_bug.cgi?id=147388
3410
3411         Reviewed by Geoffrey Garen.
3412
3413         * WebCore.vcxproj/WebCore.vcxproj:
3414         * WebCore.vcxproj/WebCore.vcxproj.filters:
3415         * platform/graphics/ca/win/CACFLayerTreeHost.cpp:
3416         (WebCore::CACFLayerTreeHost::create):
3417         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.cpp: Removed.
3418         * platform/graphics/ca/win/LegacyCACFLayerTreeHost.h: Removed.
3419
3420 2015-07-30  Alex Christensen  <achristensen@webkit.org>
3421
3422         Fix Windows build after r187587.
3423
3424         * loader/SubresourceLoader.h:
3425         * loader/cache/CachedResource.h:
3426         * platform/graphics/Font.h:
3427         (WebCore::Font::DerivedFontData::DerivedFontData):
3428         * rendering/RenderLayerFilterInfo.h:
3429         Visual Studio doesn't like making std::unique_ptrs of private nested classes.
3430         It tries to make a std::default_delete with the private class as a template parameter.
3431
3432 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
3433
3434         Convert Path applier to use std::function
3435         https://bugs.webkit.org/show_bug.cgi?id=147368
3436
3437         Reviewed by Sam Weinig.
3438
3439         Use std::function for Path::apply().
3440
3441         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
3442         (convertPathToScreenSpaceFunction):
3443         (-[WebAccessibilityObjectWrapperBase convertPathToScreenSpace:]):
3444         (ConvertPathToScreenSpaceFunction): Deleted.
3445         * inspector/InspectorOverlay.cpp:
3446         (WebCore::appendPathSegment):
3447         (WebCore::buildObjectForShapeOutside):
3448         * platform/graphics/Path.cpp:
3449         (WebCore::Path::length):
3450         (WebCore::Path::traversalStateAtLength):
3451         (WebCore::pathLengthApplierFunction): Deleted.
3452         * platform/graphics/Path.h:
3453         * platform/graphics/cairo/FontCairo.cpp:
3454         (WebCore::findPathIntersections):
3455         (WebCore::FontCascade::dashesForIntersectionsWithRect):
3456         * platform/graphics/cairo/PathCairo.cpp:
3457         (WebCore::Path::apply):
3458         * platform/graphics/cg/PathCG.cpp:
3459         (WebCore::CGPathApplierToPathApplier):
3460         (WebCore::Path::apply):
3461         * rendering/svg/RenderSVGPath.cpp:
3462         (WebCore::RenderSVGPath::updateZeroLengthSubpaths):
3463         * rendering/svg/RenderSVGShape.cpp:
3464         (WebCore::RenderSVGShape::processMarkerPositions):
3465         * rendering/svg/SVGMarkerData.h:
3466         (WebCore::SVGMarkerData::updateFromPathElement):
3467         * rendering/svg/SVGSubpathData.h:
3468         (WebCore::SVGSubpathData::updateFromPathElement):
3469         (WebCore::SVGSubpathData::SVGSubpathData): Deleted.
3470         * svg/SVGPathUtilities.cpp:
3471         (WebCore::pathIteratorForBuildingString):
3472         (WebCore::buildStringFromPath):
3473
3474 2015-07-30  Simon Fraser  <simon.fraser@apple.com>
3475
3476         Selecting in an iframe can cause main page scrolling
3477         https://bugs.webkit.org/show_bug.cgi?id=147431
3478         rdar://problem/19244589
3479
3480         Reviewed by Zalan Bujtas.
3481         
3482         The RenderLayer auatoscroll code walks up the RenderLayer hierarchy, crossing
3483         frame boundaries. However, as it crosses into an ancestor frame it failed to
3484         map the target rect into the coordinate space of the new frame, which caused
3485         us to scroll to an incorrect location in that parent frame.
3486
3487         Test: fast/events/autoscroll-in-iframe.html
3488