0ad5250c951d161bbbbc239fd0d317c302a6579e
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-08-11  Zalan Bujtas  <zalan@apple.com>
2
3         Use more references in FrameView.
4         https://bugs.webkit.org/show_bug.cgi?id=147899
5
6         Reviewed by Simon Fraser.
7
8         No change in functionality.
9
10         * page/FrameView.cpp:
11         (WebCore::FrameView::flushCompositingStateForThisFrame):
12         (WebCore::FrameView::flushCompositingStateIncludingSubframes):
13         (WebCore::FrameView::addSlowRepaintObject):
14         (WebCore::FrameView::scrollElementToRect):
15         * page/FrameView.h:
16         * rendering/RenderObject.cpp:
17         (WebCore::RenderObject::willBeDestroyed):
18         * rendering/RenderScrollbarPart.cpp:
19         (WebCore::RenderScrollbarPart::imageChanged):
20         * testing/Internals.cpp:
21         (WebCore::Internals::scrollElementToRect):
22
23 2015-08-11  Zalan Bujtas  <zalan@apple.com>
24
25         Invalid FrameView::m_viewportRenderer after layout is finished.
26         https://bugs.webkit.org/show_bug.cgi?id=147848
27         rdar://problem/22205197
28
29         Reviewed by Simon Fraser.
30
31         We cache the current viewport renderer (FrameView::m_viewportRenderer) right before layout.
32         It gets dereferenced later when layout is finished to update the overflow status.
33         If the viewport renderer gets destroyed during layout, we end up with a dangling pointer.
34         This patch replaces the pointer caching with type caching (none, body, document).
35
36         Unable to construct a test case.
37
38 2015-08-11  Brent Fulgham  <bfulgham@apple.com>
39
40         [Win] Switch Windows build to Visual Studio 2015
41         https://bugs.webkit.org/show_bug.cgi?id=147887
42         <rdar://problem/22235098>
43
44         Reviewed by Alex Christensen.
45
46         Update Visual Studio project file settings to use the current Visual
47         Studio and compiler. Continue targeting binaries to run on our minimum
48         supported configuration of Windows 7.
49
50         No change in behavior, so no new tests.
51
52         * WebCore.vcxproj/WebCore.vcxproj:
53         * WebCore.vcxproj/WebCoreGenerated.vcxproj:
54         * WebCore.vcxproj/WebCoreTestSupport.vcxproj:
55
56 2015-08-11  Said Abou-Hallawa  <sabouhallawa@apple.com>
57
58         feMorphology is not rendered correctly on Retina display
59         https://bugs.webkit.org/show_bug.cgi?id=147589
60
61         Reviewed by Dean Jackson.
62
63         The result ImageBuffer of any FilterEffect is already scaled up for 2x
64         display. The FEMorphology needs to fix its painting data dimension and
65         radius by multiplying them by the filter scale factor.
66  
67         Test: fast/hidpi/filters-morphology.html
68
69         * platform/graphics/filters/FEMorphology.cpp:
70         (WebCore::FEMorphology::platformApplySoftware):
71
72 2015-08-11  Myles C. Maxfield  <mmaxfield@apple.com>
73
74         [iOS] Arabic letter Yeh is drawn in LastResort
75         https://bugs.webkit.org/show_bug.cgi?id=147862
76         <rdar://problem/22202935>
77
78         Reviewed by Darin Adler.
79
80         In order to perform font fallback, we must know which fonts support which characters. We
81         perform this check by asking each font to map a sequence of codepoints to glyphs, and
82         any glyphs which end up with a 0 value are unsupported by the font.
83
84         One of the mechanisms that we use to do this is to combine the code points into a string,
85         and tell Core Text to lay out the string. However, this is fundamentally a different
86         operation than the one we are trying to perform. Strings combine adjacent codepoints into
87         grapheme clusters, and CoreText operates on these. However, we are trying to gain
88         information regarding codepoints, not grapheme clusters.
89
90         Instead of taking this string-based approach, we should try harder to use Core Text
91         functions which operate on ordered collections of characters, rather than strings. In
92         particular, CTFontGetGlyphsForCharacters() and CTFontGetVerticalGlyphsForCharacters()
93         have the behavior we want where any unmapped characters end up with a 0 value glyph.
94
95         Previously, we were only using the result of those functions if they were successfully
96         able to map their entire input. However, given the fact that we can degrade gracefully
97         in the case of a partial mapping, we shouldn't need to bail completely to the
98         string-based approach should a partial mapping occur.
99
100         At some point we should delete the string-based approach entirely. However, this path
101         is still explicitly used for composite fonts. Fixing that use case is out of scope
102         for this patch.
103
104         Test: fast/text/arabic-glyph-cache-fill-combine.html
105
106         * platform/graphics/mac/GlyphPageMac.cpp:
107         (WebCore::GlyphPage::fill):
108
109 2015-08-11  Chris Dumez  <cdumez@apple.com>
110
111         The 'length' property on interface objects should be configurable
112         https://bugs.webkit.org/show_bug.cgi?id=147858
113
114         Reviewed by Daniel Bates.
115
116         Make the 'length' property configurable on interface objects to comply
117         with the Web IDL specification [1] and to align our behavior with
118         Firefox 38 and Chrome 44.
119
120         This behavior is also covered by the following W3C test suite:
121         http://w3c-test.org/dom/interfaces.html
122
123         [1] http://heycam.github.io/webidl/#es-interface-call (17 July 2015)
124
125         Test: fast/dom/length-property-configurable.html
126
127         * bindings/scripts/CodeGeneratorJS.pm:
128         (GenerateConstructorHelperMethods):
129         Make the 'length' property configurable on interface objects.
130
131         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
132         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
133         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
134         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
135         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
136         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
137         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
138         (WebCore::JSTestEventConstructorConstructor::finishCreation):
139         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
140         (WebCore::JSTestEventTargetConstructor::finishCreation):
141         * bindings/scripts/test/JS/JSTestException.cpp:
142         (WebCore::JSTestExceptionConstructor::finishCreation):
143         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
144         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
145         * bindings/scripts/test/JS/JSTestInterface.cpp:
146         (WebCore::JSTestInterfaceConstructor::finishCreation):
147         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
148         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
149         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
150         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
151         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
152         * bindings/scripts/test/JS/JSTestNode.cpp:
153         (WebCore::JSTestNodeConstructor::finishCreation):
154         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
155         (WebCore::JSTestNondeterministicConstructor::finishCreation):
156         * bindings/scripts/test/JS/JSTestObj.cpp:
157         (WebCore::JSTestObjConstructor::finishCreation):
158         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
159         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
160         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
161         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
162         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
163         (WebCore::JSTestTypedefsConstructor::finishCreation):
164         * bindings/scripts/test/JS/JSattribute.cpp:
165         (WebCore::JSattributeConstructor::finishCreation):
166         * bindings/scripts/test/JS/JSreadonly.cpp:
167         (WebCore::JSreadonlyConstructor::finishCreation):
168         Rebaseline bindings tests.
169
170 2015-08-11  Per Arne Vollan  <peavo@outlook.com>
171
172         [Win] Popup menus have incorrect placement when device scale factor != 1.
173         https://bugs.webkit.org/show_bug.cgi?id=147880
174
175         Reviewed by Brent Fulgham.
176
177         We need to take the device scaling factor into account when calculating
178         the position and size of the popup menu.
179
180         * platform/win/PopupMenuWin.cpp:
181         (WebCore::PopupMenuWin::calculatePositionAndSize):
182
183 2015-08-11  Chris Dumez  <cdumez@apple.com>
184
185         [WebIDL] All interface objects must have a property named "name"
186         https://bugs.webkit.org/show_bug.cgi?id=147865
187
188         Reviewed by Darin Adler.
189
190         As per the Web IDL specification, all interface objects must have a
191         property named "name" with attributes
192         { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: true }
193         whose value is the identifier of the corresponding interface:
194         http://heycam.github.io/webidl/#es-interface-call
195         http://heycam.github.io/webidl/#named-constructors
196
197         Previously, our interface objects had no such property, this patch
198         addresses the problem.
199
200         Both Firefox 38 and Chrome 44 comply with the Web IDL specification
201         here.
202
203         Test: fast/dom/interface-name-property.html
204
205         * bindings/scripts/CodeGeneratorJS.pm:
206         (GenerateConstructorHelperMethods):
207
208         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
209         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
210         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
211         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
212         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
213         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
214         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
215         (WebCore::JSTestEventConstructorConstructor::finishCreation):
216         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
217         (WebCore::JSTestEventTargetConstructor::finishCreation):
218         * bindings/scripts/test/JS/JSTestException.cpp:
219         (WebCore::JSTestExceptionConstructor::finishCreation):
220         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
221         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
222         * bindings/scripts/test/JS/JSTestInterface.cpp:
223         (WebCore::JSTestInterfaceConstructor::finishCreation):
224         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
225         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
226         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
227         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
228         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
229         * bindings/scripts/test/JS/JSTestNode.cpp:
230         (WebCore::JSTestNodeConstructor::finishCreation):
231         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
232         (WebCore::JSTestNondeterministicConstructor::finishCreation):
233         * bindings/scripts/test/JS/JSTestObj.cpp:
234         (WebCore::JSTestObjConstructor::finishCreation):
235         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
236         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
237         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
238         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
239         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
240         (WebCore::JSTestTypedefsConstructor::finishCreation):
241         * bindings/scripts/test/JS/JSattribute.cpp:
242         (WebCore::JSattributeConstructor::finishCreation):
243         * bindings/scripts/test/JS/JSreadonly.cpp:
244         (WebCore::JSreadonlyConstructor::finishCreation):
245         Rebaseline bindings tests.
246
247 2015-08-11  Ting-Wei Lan  <lantw44@gmail.com>
248
249         Fix debug build when optimization is enabled
250         https://bugs.webkit.org/show_bug.cgi?id=147816
251
252         Reviewed by Alexey Proskuryakov.
253
254         No new tests because this is only a build fix.
255
256         * editing/InsertNodeBeforeCommand.cpp:
257
258 2015-08-11  Chris Dumez  <cdumez@apple.com>
259
260         Unreviewed, rebaseline bindings tests after r188252.
261
262         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp:
263         (WebCore::JSTestActiveDOMObjectConstructor::finishCreation):
264         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp:
265         (WebCore::JSTestCustomConstructorWithNoInterfaceObjectConstructor::finishCreation):
266         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp:
267         (WebCore::JSTestCustomNamedGetterConstructor::finishCreation):
268         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
269         (WebCore::JSTestEventConstructorConstructor::finishCreation):
270         * bindings/scripts/test/JS/JSTestEventTarget.cpp:
271         (WebCore::JSTestEventTargetConstructor::finishCreation):
272         * bindings/scripts/test/JS/JSTestException.cpp:
273         (WebCore::JSTestExceptionConstructor::finishCreation):
274         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp:
275         (WebCore::JSTestGenerateIsReachableConstructor::finishCreation):
276         * bindings/scripts/test/JS/JSTestInterface.cpp:
277         (WebCore::JSTestInterfaceConstructor::finishCreation):
278         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp:
279         (WebCore::JSTestMediaQueryListListenerConstructor::finishCreation):
280         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp:
281         (WebCore::JSTestNamedConstructorConstructor::finishCreation):
282         (WebCore::JSTestNamedConstructorNamedConstructor::finishCreation):
283         * bindings/scripts/test/JS/JSTestNode.cpp:
284         (WebCore::JSTestNodeConstructor::finishCreation):
285         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
286         (WebCore::JSTestNondeterministicConstructor::finishCreation):
287         * bindings/scripts/test/JS/JSTestObj.cpp:
288         (WebCore::JSTestObjConstructor::finishCreation):
289         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
290         (WebCore::JSTestOverloadedConstructorsConstructor::finishCreation):
291         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
292         (WebCore::JSTestSerializedScriptValueInterfaceConstructor::finishCreation):
293         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
294         (WebCore::JSTestTypedefsConstructor::finishCreation):
295         * bindings/scripts/test/JS/JSattribute.cpp:
296         (WebCore::JSattributeConstructor::finishCreation):
297         * bindings/scripts/test/JS/JSreadonly.cpp:
298         (WebCore::JSreadonlyConstructor::finishCreation):
299
300 2015-08-10  Chris Dumez  <cdumez@apple.com>
301
302         The 'prototype' property on interface objects should not be enumerable
303         https://bugs.webkit.org/show_bug.cgi?id=147861
304
305         Reviewed by Darin Adler.
306
307         1. Make the 'prototype' property not enumerable on interface object to
308            comply with the Web IDL specification [1] and to align our behavior
309            with Firefox 38 and Chrome 44.
310
311         2. Also update the 'prototype' property on named constructors to have the
312            following attributes:
313            { [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: false }
314
315            Previously, all these were true in WebKit. The new behavior complies
316            with the Web IDL specification [2] and aligns our behavior with
317            Firefox 38. On Chrome 44, the attributes are as follows:
318            { [[Writable]]: true, [[Enumerable]]: false, [[Configurable]]: false }
319
320         This behavior is also covered by the following W3C test suite:
321         http://w3c-test.org/dom/interfaces.html
322
323         [1] http://heycam.github.io/webidl/#interface-object
324         [2] http://heycam.github.io/webidl/#named-constructors
325
326         Test: fast/dom/prototype-property-not-enumerable.html
327
328         * bindings/scripts/CodeGeneratorJS.pm:
329         (GenerateConstructorHelperMethods):
330
331 2015-08-10  Alex Christensen  <achristensen@webkit.org>
332
333         Build fix after r188239.
334
335         * PlatformWinCairo.cmake:
336         MediaPlayerPrivateMediaFoundation is needed on WinCairo with video properly enabled.
337
338 2015-08-10  Myles C. Maxfield  <mmaxfield@apple.com>
339
340         Post-review fixup after r188195
341         https://bugs.webkit.org/show_bug.cgi?id=147806
342
343         Unreviewed.
344
345         Covered by fast/text/crash-obscure-text.html.
346
347         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
348         (WebCore::FontPlatformData::objectForEqualityCheck):
349
350 2015-08-10  Alex Christensen  <achristensen@webkit.org>
351
352         Build TestWebKitAPI with CMake on Windows
353         https://bugs.webkit.org/show_bug.cgi?id=147851
354
355         Reviewed by Chris Dumez.
356
357         * PlatformWin.cmake:
358         Remove RenderThemeWin.cpp which is included in RenderingAllInOne.cpp.
359         * WebCorePrefix.h:
360         Include cmakeconfig.h before wtf/Platform.h like we do in JavaScriptCore's config.h to avoid warnings and redefining ENABLE_*  macros.
361
362 2015-08-10  Matthew Daiter  <mdaiter@apple.com>
363
364         HTMLMediaElement needs way to find MediaDeviceInfo
365         https://bugs.webkit.org/show_bug.cgi?id=147842
366
367         Reviewed by Jer Noble.
368
369         * html/HTMLMediaElement.cpp:
370         (WebCore::HTMLMediaElement::mediaPlayerMediaDeviceIdentifierStorageDirectory):
371         * html/HTMLMediaElement.h:
372         * page/Settings.h:
373         (WebCore::Settings::setMediaDeviceIdentifierStorageDirectory):
374         (WebCore::Settings::mediaDeviceIdentifierStorageDirectory):
375         * platform/graphics/MediaPlayer.h:
376         (WebCore::MediaPlayerClient::mediaPlayerMediaDeviceIdentifierStorageDirectory):
377
378 2015-08-10  Chris Dumez  <cdumez@apple.com>
379
380         Simplify code for making Page-cacheability decision
381         https://bugs.webkit.org/show_bug.cgi?id=147829
382
383         Reviewed by Antti Koivisto.
384
385         Simplify code for making Page-cacheability decision by merging logging
386         code and decision making code. Having the same checks in two places was
387         redundant and error-prone as we needed to keep them in sync.
388
389         Also get rid of failure reason enum values as those have not been used
390         in a while.
391
392         * history/PageCache.cpp:
393         (WebCore::canCacheFrame):
394         (WebCore::canCachePage):
395         (WebCore::PageCache::canCache):
396         (WebCore::logPageCacheFailureDiagnosticMessage): Deleted.
397         (WebCore::PageCache::singleton): Deleted.
398         (WebCore::PageCache::setMaxSize): Deleted.
399         (WebCore::PageCache::frameCount): Deleted.
400         (WebCore::PageCache::markPagesForVisitedLinkStyleRecalc): Deleted.
401         (WebCore::PageCache::markPagesForFullStyleRecalc): Deleted.
402         (WebCore::PageCache::markPagesForDeviceOrPageScaleChanged): Deleted.
403         (WebCore::PageCache::markPagesForContentsSizeChanged): Deleted.
404         (WebCore::PageCache::markPagesForCaptionPreferencesChanged): Deleted.
405         (WebCore::pruningReasonToDiagnosticLoggingKey): Deleted.
406         * page/DiagnosticLoggingKeys.cpp:
407         (WebCore::DiagnosticLoggingKeys::isDisabledKey):
408         (WebCore::DiagnosticLoggingKeys::redirectKey):
409         (WebCore::DiagnosticLoggingKeys::replaceKey):
410         (WebCore::DiagnosticLoggingKeys::sourceKey):
411         (WebCore::DiagnosticLoggingKeys::underMemoryPressureKey):
412         (WebCore::DiagnosticLoggingKeys::reloadFromOriginKey): Deleted.
413         * page/DiagnosticLoggingKeys.h:
414
415 2015-08-10  Devin Rousso  <drousso@apple.com>
416
417         Web Inspector: [iOS] Allow inspector to retrieve a list of system fonts
418         https://bugs.webkit.org/show_bug.cgi?id=147033
419
420         Reviewed by Joseph Pecoraro.
421
422         Implement systemFontFamilies for iOS.
423
424         * platform/graphics/ios/FontCacheIOS.mm:
425         (WebCore::FontCache::systemFontFamilies):
426
427 2015-08-10  Devin Rousso  <drousso@apple.com>
428
429         Web Inspector: Invalid selectors can be applied to the stylesheet
430         https://bugs.webkit.org/show_bug.cgi?id=147230
431
432         Reviewed by Timothy Hatcher.
433
434         * inspector/InspectorStyleSheet.cpp:
435         (WebCore::isValidSelectorListString):
436         (WebCore::InspectorStyleSheet::setRuleSelector):
437         Now checks to see that the supplied selector is valid before trying to commit it to the rule.
438         (WebCore::InspectorStyleSheet::addRule):
439         (WebCore::checkStyleRuleSelector): Deleted.
440
441 2015-08-10  James Craig  <jcraig@apple.com>
442
443         AX: Address follow-up comments in bug 145684
444         https://bugs.webkit.org/show_bug.cgi?id=147817
445
446         Reviewed by Dean Jackson.
447
448         Minor cleanup and style updates requested by Dean.
449         Updated Existing Test Expectations.
450
451         * Modules/mediacontrols/mediaControlsApple.css:
452         (video::-webkit-media-show-controls):
453         * Modules/mediacontrols/mediaControlsiOS.css:
454         (video::-webkit-media-show-controls):
455
456 2015-08-07  Antti Koivisto  <antti@apple.com>
457
458         Expand network cache tests to cover memory cache behavior
459         https://bugs.webkit.org/show_bug.cgi?id=147783
460
461         Reviewed by Alexey Proskuryakov.
462
463         To support testing, include memory cache as a possible source type to XHR responses.
464
465         * loader/ResourceLoader.cpp:
466         (WebCore::logResourceResponseSource):
467         * loader/cache/CachedRawResource.cpp:
468         (WebCore::CachedRawResource::didAddClient):
469         * loader/cache/CachedResource.h:
470         (WebCore::CachedResource::revalidationInProgress):
471         * platform/network/ResourceResponseBase.h:
472         * testing/Internals.cpp:
473         (WebCore::Internals::xhrResponseSource):
474
475 2015-08-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
476
477         Compile warning (-Wsign-compare) on 32-bits at WebCore/platform/FileSystem.cpp
478         https://bugs.webkit.org/show_bug.cgi?id=146414
479
480         Reviewed by Darin Adler.
481
482         No behavioral changes.
483
484         * platform/FileSystem.cpp:
485         (WebCore::MappedFileData::MappedFileData): Making use of convertSafely.
486         * platform/posix/SharedBufferPOSIX.cpp:
487         (WebCore::SharedBuffer::createFromReadingFile): Making use of convertSafely.
488
489 2015-08-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
490
491         [Streams API] ReadableStreamReader closed promise should use CachedAttribute
492         https://bugs.webkit.org/show_bug.cgi?id=147487
493
494         Reviewed by Darin Adler.
495
496         Covered by existing tests.
497
498         * Modules/streams/ReadableStreamReader.idl: Made closed a CachedAttribute.
499         * bindings/js/JSReadableStreamReaderCustom.cpp:
500         (WebCore::JSReadableStreamReader::closed): Updated according CachedAttribute specific field.
501
502 2015-08-09  Hunseop Jeong  <hs85.jeong@samsung.com>
503
504         [EFL] Use the non-overlay scrollbar
505         https://bugs.webkit.org/show_bug.cgi?id=147725
506
507         Reviewed by Gyuyoung Kim.
508
509         No new tests because there is no behavior change.
510
511         * platform/efl/ScrollbarThemeEfl.cpp:
512         (WebCore::ScrollbarThemeEfl::usesOverlayScrollbars):
513         Changed the condition of the 'usesOverlayScrollbars' to use the
514         setting value.
515         * platform/efl/ScrollbarThemeEfl.h:
516
517 2015-08-09  Chris Dumez  <cdumez@apple.com>
518
519         Page cache doesn't work for pages actively using Geolocation
520         https://bugs.webkit.org/show_bug.cgi?id=147785
521         <rdar://problem/11147901>
522
523         Reviewed by Darin Adler.
524
525         Allow pages actively using Geolocation into the PageCache.
526
527         Tests: fast/history/page-cache-geolocation-active-oneshot.html
528                fast/history/page-cache-geolocation-active-watcher.html
529
530         * Modules/geolocation/Geolocation.cpp:
531         (WebCore::Geolocation::canSuspendForPageCache):
532         (WebCore::Geolocation::suspend): Deleted.
533         * history/PageCache.cpp:
534
535 2015-08-09  Nan Wang  <n_wang@apple.com>
536
537         AX: CSS table display styles can cause malformed, inaccessible AXTables to be exposed to the AX tree
538         https://bugs.webkit.org/show_bug.cgi?id=136415
539         <rdar://problem/22026625>
540
541         Reviewed by Chris Fleizach.
542
543         Applying CSS display styles to tables can end up inserting anonymous RenderTableRows, which is not handled well by the 
544         accessibility code, which treats these as the actual rows. We can address this by diving deeper into anonymous nodes 
545         and finding the real rows and cells we want. In addition, another thing also causing malformed tables is that "grid" 
546         roles are being exposed as AXGrid instead of AXTable.
547
548         Test: accessibility/mac/malformed-table.html
549
550         * accessibility/AccessibilityARIAGrid.cpp:
551         (WebCore::AccessibilityARIAGrid::addRowDescendant):
552         * accessibility/AccessibilityTable.cpp:
553         (WebCore::AccessibilityTable::addChildren):
554         (WebCore::AccessibilityTable::addTableCellChild):
555         (WebCore::AccessibilityTable::addChildrenFromSection):
556         * accessibility/AccessibilityTable.h:
557         * accessibility/AccessibilityTableCell.cpp:
558         (WebCore::AccessibilityTableCell::parentTable):
559         (WebCore::AccessibilityTableCell::rowIndexRange):
560         * accessibility/AccessibilityTableRow.cpp:
561         (WebCore::AccessibilityTableRow::parentTable):
562         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
563         (createAccessibilityRoleMap):
564
565 2015-08-08  Darin Adler  <darin@apple.com>
566
567         Remove -webkit-color-correction CSS property
568         https://bugs.webkit.org/show_bug.cgi?id=147812
569
570         Reviewed by Maciej Stachowiak.
571
572         Covered by existing tests.
573
574         I am doing some general cleanup of handling of color spaces in WebKit.
575         This removes the obsolete web-visible property that allowed clients to
576         get color correction on older Apple platforms where we chose not to do
577         it all the time for performance reasons. Currently, it has no effect on
578         any supported platform.
579
580         Now that this property is removed, a website can detect that it's not
581         there if it uses getComputedStyle, but I don't expect this to have
582         significant compatibility fallout. It's harmless to continue using the
583         property in legacy content or websites that have not been updated, since
584         unknown property names are ignored and it had no effect before anyway.
585
586         * css/CSSComputedStyleDeclaration.cpp: Removed
587         CSSPropertyWebkitColorCorrection from the list of computed properties.
588         (WebCore::ComputedStyleExtractor::propertyValue): Removed the
589         CSSPropertyWebkitColorCorrection case.
590
591         * css/CSSParser.cpp:
592         (WebCore::isValidKeywordPropertyAndValue): Removed the
593         CSSPropertyWebkitColorCorrection case.
594         (WebCore::isKeywordPropertyID): Ditto.
595         (WebCore::CSSParser::parseValue): Ditto.
596
597         * css/CSSPrimitiveValueMappings.h:
598         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Deleted the overload
599         of this that converts a ColorSpace to a CSSPrimitiveValue.
600         (WebCore::CSSPrimitiveValue::operator ColorSpace): Deleted.
601
602         * css/CSSPropertyNames.in: Removed -webkit-color-correction.
603
604         * css/CSSValueKeywords.in: Removed the -webkit-color-correction section,
605         which contained sRGB.
606
607         * css/SVGCSSValueKeywords.in: Uncommented sRGB now that it's not shared
608         with -webkit-color-correction.
609
610         * rendering/style/RenderStyle.h: Removed setColorSpace and initialColorSpace.
611         Kept colorSpace around for now, but it simply returns ColorSpaceSRGB.
612         This prevents us from needing to touch every single call site that passes
613         the color space in to functions in the platform graphics abstraction.
614         We'll touch most of those call sites when we change Color to include the
615         color space and eventually we can delete this.
616
617         * rendering/style/StyleRareInheritedData.cpp: Deleted colorSpace.
618         (WebCore::StyleRareInheritedData::StyleRareInheritedData): Deleted
619         code to initialize colorSpace and to copy colorSpace.
620         (WebCore::StyleRareInheritedData::operator==): Deleted code to compare
621         colorSpace.
622
623 2015-08-09  Eric Carlson  <eric.carlson@apple.com>
624
625         [Mac] Always require ExternalDeviceAutoPlayCandidate flag to AirPlay automatically
626         https://bugs.webkit.org/show_bug.cgi?id=147801
627
628         Reviewed by Dean Jackson.
629
630         Test: http/tests/media/video-media-document-disposition-download.html
631
632         * Modules/mediasession/WebMediaSessionManager.cpp:
633         (WebCore::WebMediaSessionManager::configurePlaybackTargetClients): Don't tell the last element
634           to begin playing to the target unless the ExternalDeviceAutoPlayCandidate flag is set and 
635           it is not currently playing.
636
637 2015-08-09  Myles C. Maxfield  <mmaxfield@apple.com>
638
639         Crash in ComplexTextController when laying out obscure text
640         https://bugs.webkit.org/show_bug.cgi?id=147806
641         <rdar://problem/22102378>
642
643         Reviewed by Darin Adler.
644
645         CTFontDescriptorCopyAttribute(fontDescriptor.get(), kCTFontReferenceURLAttribute) can return nullptr.
646
647         Test: fast/text/crash-obscure-text.html
648
649         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
650         (WebCore::safeCFEqual):
651         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
652
653 2015-08-08  Dean Jackson  <dino@apple.com>
654
655         Remove the webkit prefix from CanvasRenderingContext2D imageSmoothingEnabled
656         https://bugs.webkit.org/show_bug.cgi?id=147803
657         <rdar://problem/22200553>
658
659         Reviewed by Sam Weinig.
660
661         Rename webkitImageSmoothingEnabled to imageSmoothingEnabled.
662
663         Updated existing tests, and made sure that the prefixed version is
664         identical to the standard version.
665
666         * html/canvas/CanvasRenderingContext2D.cpp:
667         (WebCore::CanvasRenderingContext2D::imageSmoothingEnabled): Renamed from webkitImageSmoothingEnabled.
668         (WebCore::CanvasRenderingContext2D::setImageSmoothingEnabled): Renamed from setWebkitImageSmoothingEnabled.
669         (WebCore::CanvasRenderingContext2D::webkitImageSmoothingEnabled): Deleted.
670         (WebCore::CanvasRenderingContext2D::setWebkitImageSmoothingEnabled): Deleted.
671         * html/canvas/CanvasRenderingContext2D.h: Rename the methods.
672         * html/canvas/CanvasRenderingContext2D.idl: Add the non-prefixed form, and mark is as the
673         implementation of the prefixed form.
674
675 2015-08-09  Andreas Kling  <akling@apple.com>
676
677         Ref-ify some functions that always succeed in constructing Documents.
678         <https://webkit.org/b/147552>
679
680         Reviewed by Sam Weinig.
681
682         Update some functions involved in the construction of new Document objects
683         to codify that they always construct objects.
684
685         Bonus: DOMImplementation::createCSSStyleSheet().
686
687         * dom/DOMImplementation.cpp:
688         (WebCore::DOMImplementation::createCSSStyleSheet):
689         (WebCore::DOMImplementation::createHTMLDocument):
690         (WebCore::DOMImplementation::createDocument):
691         * dom/DOMImplementation.h:
692         * loader/DocumentWriter.cpp:
693         (WebCore::DocumentWriter::createDocument):
694         (WebCore::DocumentWriter::begin):
695         * loader/DocumentWriter.h:
696         * xml/DOMParser.cpp:
697         (WebCore::DOMParser::parseFromString):
698         * xml/DOMParser.h:
699         * xml/XSLTProcessor.cpp:
700         (WebCore::XSLTProcessor::createDocumentFromSource):
701         * xml/XSLTProcessor.h:
702
703 2015-08-08  Commit Queue  <commit-queue@webkit.org>
704
705         Unreviewed, rolling out r179871.
706         https://bugs.webkit.org/show_bug.cgi?id=147810
707
708         Breaks product images on http://www.apple.com/shop/buy-
709         mac/macbook (Requested by smfr on #webkit).
710
711         Reverted changeset:
712
713         "Render: properly update body's background image"
714         https://bugs.webkit.org/show_bug.cgi?id=140183
715         http://trac.webkit.org/changeset/179871
716
717 2015-08-07  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
718
719         Reduce uses of PassRefPtr in bindings
720         https://bugs.webkit.org/show_bug.cgi?id=147781
721
722         Reviewed by Chris Dumez.
723
724         Use RefPtr when function can return null or an instance. If not, Ref is used.
725
726         * bindings/gobject/GObjectNodeFilterCondition.h:
727         * bindings/gobject/GObjectXPathNSResolver.h:
728         * bindings/gobject/WebKitDOMNodeFilter.cpp:
729         (WebKit::core):
730         * bindings/gobject/WebKitDOMNodeFilterPrivate.h:
731         * bindings/gobject/WebKitDOMXPathNSResolver.cpp:
732         (WebKit::core):
733         * bindings/gobject/WebKitDOMXPathNSResolverPrivate.h:
734         * bindings/js/CallbackFunction.h:
735         (WebCore::createFunctionOnlyCallback):
736         * bindings/js/Dictionary.h:
737         (WebCore::Dictionary::getEventListener):
738         * bindings/js/IDBBindingUtilities.cpp:
739         (WebCore::createIDBKeyFromValue):
740         (WebCore::internalCreateIDBKeyFromScriptValueAndKeyPath):
741         (WebCore::createIDBKeyFromScriptValueAndKeyPath):
742         (WebCore::scriptValueToIDBKey):
743         * bindings/js/IDBBindingUtilities.h:
744         * bindings/js/JSDOMBinding.h:
745         (WebCore::toInt8Array):
746         (WebCore::toInt16Array):
747         (WebCore::toInt32Array):
748         (WebCore::toUint8Array):
749         (WebCore::toUint8ClampedArray):
750         (WebCore::toUint16Array):
751         (WebCore::toUint32Array):
752         (WebCore::toFloat32Array):
753         (WebCore::toFloat64Array):
754         * bindings/js/JSDOMStringListCustom.cpp:
755         (WebCore::JSDOMStringList::toWrapped):
756         * bindings/js/JSDeviceMotionEventCustom.cpp:
757         (WebCore::readAccelerationArgument):
758         (WebCore::readRotationRateArgument):
759         * bindings/js/JSErrorHandler.h:
760         (WebCore::createJSErrorHandler):
761         * bindings/js/JSGeolocationCustom.cpp:
762         (WebCore::createPositionOptions):
763         * bindings/js/JSNodeCustom.cpp:
764         * bindings/js/JSNodeFilterCustom.cpp:
765         (WebCore::JSNodeFilter::toWrapped):
766         * bindings/js/ScriptController.cpp:
767         (WebCore::ScriptController::createWorld):
768         (WebCore::ScriptController::createRootObject):
769         (WebCore::ScriptController::createScriptInstanceForWidget):
770         * bindings/js/ScriptController.h:
771         * bindings/js/ScriptControllerMac.mm:
772         (WebCore::ScriptController::createScriptInstanceForWidget):
773         * bindings/js/SerializedScriptValue.cpp:
774         (WebCore::SerializedScriptValue::create):
775         * bindings/js/SerializedScriptValue.h:
776         * bindings/objc/DOMUIKitExtensions.mm:
777         (-[DOMNode rangeOfContainingParagraph]):
778         * bindings/objc/ObjCNodeFilterCondition.h:
779         * bindings/scripts/CodeGeneratorJS.pm:
780         (GenerateHeader):
781
782 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
783
784         [OS X] Remove dead code from FontCache::createFontPlatformData()
785         https://bugs.webkit.org/show_bug.cgi?id=147804
786
787         Reviewed by Zalan Bujtas.
788
789         CTFontCreateForCSS() always returns the best font.
790
791         No new tests because there is no behavior change.
792
793         * platform/graphics/mac/FontCacheMac.mm:
794         (WebCore::fontWithFamily):
795
796 2015-08-07  Zalan Bujtas  <zalan@apple.com>
797
798         Move painting functions from RenderObject to RenderElement.
799         https://bugs.webkit.org/show_bug.cgi?id=147764
800
801         Reviewed by Simon Fraser.
802
803         Ideally they should live in RenderBoxModelObject, but the current SVG architecture makes is difficult
804         to move them there.
805
806         No change in functionality.
807
808         * platform/graphics/FloatRect.h:
809         (WebCore::FloatRect::FloatRect):
810         * rendering/RenderBoxModelObject.cpp:
811         (WebCore::RenderBoxModelObject::paintOneBorderSide):
812         * rendering/RenderElement.cpp:
813         (WebCore::RenderElement::drawLineForBoxSide):
814         (WebCore::RenderElement::paintFocusRing):
815         (WebCore::RenderElement::paintOutline):
816         * rendering/RenderElement.h:
817         * rendering/RenderInline.cpp:
818         (WebCore::RenderInline::paintOutline):
819         (WebCore::RenderInline::paintOutlineForLine):
820         * rendering/RenderMultiColumnSet.cpp:
821         (WebCore::RenderMultiColumnSet::paintColumnRules):
822         * rendering/RenderObject.cpp:
823         (WebCore::RenderObject::drawLineForBoxSide): Deleted.
824         (WebCore::RenderObject::paintFocusRing): Deleted.
825         (WebCore::RenderObject::paintOutline): Deleted.
826         * rendering/RenderObject.h:
827         * rendering/RenderTableCell.cpp:
828         (WebCore::RenderTableCell::paintCollapsedBorders):
829         * rendering/RenderTableSection.cpp:
830         (WebCore::RenderTableSection::paintRowGroupBorder):
831         * rendering/RenderTheme.h:
832         (WebCore::RenderTheme::paintMenuListButtonDecorations):
833         * rendering/RenderThemeIOS.h:
834         * rendering/RenderThemeIOS.mm:
835         (WebCore::RenderThemeIOS::paintMenuListButtonDecorations):
836         * rendering/RenderThemeMac.h:
837         * rendering/RenderThemeMac.mm:
838         (WebCore::RenderThemeMac::paintMenuListButtonDecorations):
839
840 2015-08-07  James Craig  <jcraig@apple.com>
841
842         REGRESSION(r184722) AX: WebKit video playback toolbar removed from DOM; no longer accessible to VoiceOver
843         https://bugs.webkit.org/show_bug.cgi?id=145684
844
845         Reviewed by Dean Jackson.
846
847         Updated Apple Video controls to add an invisible but focusable button that allows VoiceOver 
848         users (and when unblocked, keyboard users) to re-display the video controls.
849
850         Test: media/video-controls-show-on-kb-or-ax-event.html
851
852         * English.lproj/mediaControlsLocalizedStrings.js:
853         * Modules/mediacontrols/mediaControlsApple.css:
854         (audio::-webkit-media-show-controls):
855         (video::-webkit-media-show-controls):
856         * Modules/mediacontrols/mediaControlsApple.js:
857         (Controller.prototype.createControls):
858         (Controller.prototype.handleFullscreenChange):
859         (Controller.prototype.handleShowControlsClick):
860         (Controller.prototype.handleWrapperMouseMove):
861         (Controller.prototype.updateForShowingControls):
862         (Controller.prototype.showControls):
863         (Controller.prototype.hideControls):
864         (Controller.prototype.setNeedsUpdateForDisplayedWidth):
865         * Modules/mediacontrols/mediaControlsiOS.css:
866         (audio::-webkit-media-show-controls):
867         (video::-webkit-media-show-controls):
868
869 2015-08-07  Alex Christensen  <achristensen@webkit.org>
870
871         Build more testing binaries with CMake on Windows
872         https://bugs.webkit.org/show_bug.cgi?id=147799
873
874         Reviewed by Brent Fulgham.
875
876         * CMakeLists.txt:
877         MockCDM.cpp needs to be part of WebCoreTestSupport, not WebCore.
878         * PlatformWin.cmake:
879         Added files needed for AppleWin port.
880
881 2015-08-07  Anders Carlsson  <andersca@apple.com>
882
883         Being moving away from using SQLTransactionStateMachine in SQLTransactionBackend
884         https://bugs.webkit.org/show_bug.cgi?id=147798
885
886         Reviewed by Geoffrey Garen.
887
888         This is the first step towards getting rid of the state machine so we can ultimately merge SQLTransactionBackend
889         into SQLTransaction.
890
891         Instead of having the state machine run our functions, just run them ourselves where we can. For states that need
892         to be handled in the frontend, call SQLTransaction::requestTransitToState explicitly.
893
894         * Modules/webdatabase/SQLTransactionBackend.cpp:
895         (WebCore::SQLTransactionBackend::stateFunctionFor):
896         (WebCore::SQLTransactionBackend::lockAcquired):
897         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
898         (WebCore::SQLTransactionBackend::runStatements):
899         (WebCore::SQLTransactionBackend::runCurrentStatement):
900         (WebCore::SQLTransactionBackend::handleCurrentStatementError):
901         (WebCore::SQLTransactionBackend::handleTransactionError):
902         (WebCore::SQLTransactionBackend::postflightAndCommit):
903         (WebCore::SQLTransactionBackend::runCurrentStatementAndGetNextState): Deleted.
904         (WebCore::SQLTransactionBackend::nextStateForCurrentStatementError): Deleted.
905         (WebCore::SQLTransactionBackend::nextStateForTransactionError): Deleted.
906         (WebCore::SQLTransactionBackend::sendToFrontendState): Deleted.
907         * Modules/webdatabase/SQLTransactionBackend.h:
908
909 2015-08-07  Filip Pizlo  <fpizlo@apple.com>
910
911         Lightweight locks should be adaptive
912         https://bugs.webkit.org/show_bug.cgi?id=147545
913
914         Reviewed by Geoffrey Garen.
915
916         * bindings/objc/WebScriptObject.mm:
917         (WebCore::getJSWrapper):
918         (WebCore::addJSWrapper):
919         (WebCore::removeJSWrapper):
920         (WebCore::removeJSWrapperIfRetainCountOne):
921         * platform/audio/mac/CARingBuffer.cpp:
922         (WebCore::CARingBuffer::setCurrentFrameBounds):
923         (WebCore::CARingBuffer::getCurrentFrameBounds):
924         * platform/audio/mac/CARingBuffer.h:
925         * platform/ios/wak/WAKWindow.mm:
926         (-[WAKWindow setExposedScrollViewRect:]):
927         (-[WAKWindow exposedScrollViewRect]):
928
929 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
930
931         Post-review comments on r188146
932         https://bugs.webkit.org/show_bug.cgi?id=147793
933
934         Reviewed by Daniel Bates.
935
936         No new tests because there is no behavior change.
937
938         * platform/graphics/FontCache.h:
939         * platform/graphics/cocoa/FontCacheCoreText.cpp:
940         (WebCore::appendTrueTypeFeature):
941         (WebCore::appendOpenTypeFeature):
942         (WebCore::applyFontFeatureSettings):
943         * platform/graphics/ios/FontCacheIOS.mm:
944         (WebCore::FontCache::getSystemFontFallbackForCharacters):
945         (WebCore::FontCache::createFontPlatformData):
946         * platform/graphics/mac/FontCacheMac.mm:
947         (WebCore::fontWithFamily):
948         (WebCore::FontCache::systemFallbackForCharacters):
949         * platform/graphics/mac/FontCustomPlatformData.cpp:
950         (WebCore::FontCustomPlatformData::fontPlatformData):
951         * rendering/RenderThemeIOS.mm:
952         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
953
954 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
955
956         [Cocoa] Font fallback is not language-sensitive
957         https://bugs.webkit.org/show_bug.cgi?id=147390
958
959         Reviewed by Dean Jackson.
960
961         We need to make our font fallback code sensitive to locale.
962
963         This patch rolls r187729 back in. However, only particular versions of iOS and OS X are
964         performant enough to enable this language-sensitivity.
965
966         This patch also applies to iOS.
967
968         Test: fast/text/fallback-language-han.html
969
970         * platform/graphics/mac/FontCacheMac.mm:
971         (WebCore::lookupCTFont):
972         (WebCore::FontCache::systemFallbackForCharacters):
973         * platform/graphics/mac/FontCacheIOS.mm:
974         (WebCore::FontCache::systemFallbackForCharacters):
975
976 2015-08-07  Zalan Bujtas  <zalan@apple.com>
977
978         RenderTheme::volumeSliderOffsetFromMuteButton should take const& RenderBox.
979         https://bugs.webkit.org/show_bug.cgi?id=147731
980
981         Reviewed by Simon Fraser.
982
983         No change in functionality.
984
985         * rendering/RenderMediaControlElements.cpp:
986         (WebCore::RenderMediaVolumeSliderContainer::layout):
987         * rendering/RenderMediaControls.cpp:
988         (WebCore::RenderMediaControls::volumeSliderOffsetFromMuteButton): Deleted.
989         * rendering/RenderMediaControls.h:
990         * rendering/RenderTheme.cpp:
991         (WebCore::RenderTheme::volumeSliderOffsetFromMuteButton):
992         * rendering/RenderTheme.h:
993
994 2015-08-07  Zalan Bujtas  <zalan@apple.com>
995
996         Replace RenderObject::isRooted() logic with isDescendantOf().
997         https://bugs.webkit.org/show_bug.cgi?id=147788
998
999         Reviewed by Simon Fraser.
1000
1001         And some related cleanups.
1002
1003         No change in functionality.
1004
1005         * page/FrameView.cpp:
1006         (WebCore::FrameView::scheduleRelayoutOfSubtree):
1007         (WebCore::FrameView::extendedBackgroundRectForPainting):
1008         * rendering/RenderBox.cpp:
1009         (WebCore::RenderBox::paintRootBoxFillLayers):
1010         * rendering/RenderElement.cpp:
1011         (WebCore::shouldRepaintForImageAnimation):
1012         * rendering/RenderObject.cpp:
1013         (WebCore::RenderObject::isDescendantOf):
1014         (WebCore::scheduleRelayoutForSubtree):
1015         (WebCore::RenderObject::repaint):
1016         (WebCore::RenderObject::repaintRectangle):
1017         (WebCore::RenderObject::repaintSlowRepaintObject):
1018         (WebCore::RenderObject::isRooted):
1019         * rendering/RenderObject.h:
1020         * rendering/RenderView.cpp:
1021         (WebCore::RenderView::unextendedBackgroundRect):
1022         (WebCore::RenderView::backgroundRect):
1023         * rendering/RenderView.h:
1024
1025 2015-08-07  Zalan Bujtas  <zalan@apple.com>
1026
1027         Subtree layout code should use RenderElement.
1028         https://bugs.webkit.org/show_bug.cgi?id=147694
1029
1030         Reviewed by Simon Fraser.
1031
1032         Subtree layout will never begin at a RenderText, so tighten up
1033         the code to operate on RenderElements instead of RenderObjects.
1034         (This patch is based on webkit.org/b/126878)
1035
1036         No change in functionality.
1037
1038         * inspector/InspectorTimelineAgent.cpp:
1039         (WebCore::InspectorTimelineAgent::willLayout):
1040         * page/FrameView.cpp:
1041         (WebCore::FrameView::FrameView): Deleted.
1042         (WebCore::FrameView::layoutRoot): Deleted.
1043         * page/FrameView.h:
1044         * rendering/RenderBox.cpp:
1045         (WebCore::RenderBox::computeLogicalWidthInRegion):
1046         * rendering/RenderElement.cpp:
1047         (WebCore::RenderElement::clearLayoutRootIfNeeded):
1048         (WebCore::RenderElement::willBeDestroyed):
1049         * rendering/RenderElement.h:
1050         * rendering/RenderObject.cpp:
1051         (WebCore::RenderObject::clearLayoutRootIfNeeded): Deleted.
1052         (WebCore::RenderObject::willBeDestroyed): Deleted.
1053         * rendering/RenderObject.h:
1054
1055 2015-08-07  Wenson Hsieh  <wenson_hsieh@apple.com>
1056
1057         Temporarily allow programmatic input assistance for adding Gmail account
1058         https://bugs.webkit.org/show_bug.cgi?id=147792
1059
1060         Reviewed by Enrica Casucci.
1061         <rdar://problem/22126518>
1062
1063         Temporary fix for keyboard input sliding out and immediately back in upon user interaction
1064         in the Gmail 2-factor authentication page.
1065
1066         * platform/RuntimeApplicationChecksIOS.h:
1067         * platform/RuntimeApplicationChecksIOS.mm:
1068         (WebCore::applicationIsGmailAddAccountOnIOS): Added bundle ID for Gmail settings.
1069
1070 2015-08-07  Andy Estes  <aestes@apple.com>
1071
1072         Crash when following a Google search link to Twitter with Limit Adult Content enabled
1073         https://bugs.webkit.org/show_bug.cgi?id=147651
1074
1075         Reviewed by Brady Eidson.
1076
1077         When a loaded CachedRawResource gets a new client, it synthesizes the callbacks that the new client would have
1078         received while the resource was loading. Unlike a real network load, it synthesizes these callbacks in a single
1079         run loop iteration. When DocumentLoader receives a redirect, and finds substitute data in the app cache for the
1080         redirect URL, it schedules a timer that removes DocumentLoader as a client of the CachedRawResource then
1081         synthesizes its own set of CachedRawResourceClient callbacks. But since CachedRawResource has already delivered
1082         client callbacks before the app cache timer fires, DocumentLoader unexpectedly ends up getting two sets of
1083         client callbacks and badness ensues.
1084
1085         The fix is to let CachedRawResource detect if a redirect will trigger the client to load substitute data. If so,
1086         stop delivering client callbacks.
1087
1088         Layout test to follow.
1089
1090         * loader/DocumentLoader.cpp:
1091         (WebCore::DocumentLoader::syntheticRedirectReceived): If there is valid substitute data, do not continue.
1092         * loader/DocumentLoader.h:
1093         * loader/cache/CachedRawResource.cpp: Returned early if syntheticRedirectReceived() said not to continue.
1094         (WebCore::CachedRawResource::didAddClient):
1095         * loader/cache/CachedRawResourceClient.h:
1096         (WebCore::CachedRawResourceClient::syntheticRedirectReceived):
1097
1098 2015-08-06  Dean Jackson  <dino@apple.com>
1099
1100         Shadows don't draw on fillText when using a gradient fill
1101         https://bugs.webkit.org/show_bug.cgi?id=147758
1102         <rdar://problem/20860912>
1103
1104         Reviewed by Myles Maxfield.
1105
1106         Since we use a mask to render a pattern or gradient
1107         into text, any shadow was being clipped out. Change
1108         this to draw the shadow before the mask + fill operation,
1109         using a technique similar to text-shadow.
1110
1111         Test: fast/canvas/gradient-text-with-shadow.html
1112
1113         * html/canvas/CanvasRenderingContext2D.cpp:
1114         (WebCore::CanvasRenderingContext2D::drawTextInternal): Get the current shadow
1115         style, paint the text with a transformed shadow offset so that we only
1116         see the shadow and not the text, then combine with the existing pattern/gradient
1117         fill.
1118
1119 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
1120
1121         Implement font-feature-settings
1122         https://bugs.webkit.org/show_bug.cgi?id=147722
1123
1124         Reviewed by Simon Fraser.
1125
1126         Fonts with features are simply modeled as new font objects. Font
1127         feature information is contained within FontDescription, and our
1128         caches are correctly sensitive to this information. Therefore,
1129         we just need to make our font lookup code honor the request to
1130         use certain features.
1131
1132         This patch creates a file, FontCacheCoreText.cpp, which will be the
1133         new home of all shared OS X / iOS FontCache code. Over time, I will
1134         be moving more and more source into this file, until there is
1135         nothing left of FontCacheMac.mm and FontCacheIOS.mm. For now, the
1136         only function in this file is the code which applies font features.
1137
1138         Test: css3/font-feature-settings-preinstalled-fonts.html
1139
1140         * WebCore.xcodeproj/project.pbxproj: Add FontCacheCoreText.cpp.
1141         * platform/graphics/FontCache.h:
1142         * platform/graphics/cocoa/FontCacheCoreText.cpp: Added.
1143         (WebCore::appendTrueTypeFeature): What the name says.
1144         (WebCore::appendOpenTypeFeature): Ditto.
1145         (WebCore::applyFontFeatureSettings): Ditto.
1146         * platform/graphics/ios/FontCacheIOS.mm:
1147         (WebCore::FontCache::getSystemFontFallbackForCharacters): Call
1148         applyFontFeatureSettings().
1149         (WebCore::FontCache::createFontPlatformData): Ditto.
1150         * platform/graphics/mac/FontCacheMac.mm:
1151         (WebCore::fontWithFamily): Ditto.
1152         (WebCore::FontCache::systemFallbackForCharacters): Ditto.
1153         (WebCore::FontCache::createFontPlatformData): Ditto.
1154         * platform/graphics/mac/FontCustomPlatformData.cpp:
1155         (WebCore::FontCustomPlatformData::fontPlatformData): Ditto.
1156         * rendering/RenderThemeIOS.mm:
1157         (WebCore::RenderThemeIOS::updateCachedSystemFontDescription):
1158         Ditto.
1159
1160 2015-08-07  Commit Queue  <commit-queue@webkit.org>
1161
1162         Unreviewed, rolling out r187907.
1163         https://bugs.webkit.org/show_bug.cgi?id=147789
1164
1165         taking a different approach to the fix (Requested by estes on
1166         #webkit).
1167
1168         Reverted changeset:
1169
1170         "Crash when following a Google search link to Twitter with
1171         Limit Adult Content enabled."
1172         https://bugs.webkit.org/show_bug.cgi?id=147651
1173         http://trac.webkit.org/changeset/187907
1174
1175 2015-08-07  Alex Christensen  <achristensen@webkit.org>
1176
1177         Fix WinCairo build after r188130.
1178
1179         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1180         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1181         (WebCore::FontCustomPlatformData::fontPlatformData):
1182         I forgot the parameter name.
1183
1184 2015-08-07  Alex Christensen  <achristensen@webkit.org>
1185
1186         Fix WinCairo build after r188130.
1187
1188         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1189         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
1190         (WebCore::FontCustomPlatformData::fontPlatformData):
1191         Update fontPlatformData parameters.
1192
1193 2015-08-07  Daniel Bates  <dabates@apple.com>
1194
1195         Attempt to fix the Windows build after <http://trac.webkit.org/changeset/188130>
1196         (https://bugs.webkit.org/show_bug.cgi?id=147775)
1197
1198         Include header FontDescription.h.
1199
1200         * platform/graphics/win/FontCustomPlatformData.cpp:
1201         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1202
1203 2015-08-07  Myles C. Maxfield  <mmaxfield@apple.com>
1204
1205         Allow FontCustomPlatformData to consult with FontDescription
1206         https://bugs.webkit.org/show_bug.cgi?id=147775
1207
1208         Reviewed by Zalan Bujtas.
1209
1210         In order to implement font-feature-settings, web fonts need to be
1211         able to consult with the set of active font features. Rather than
1212         add yet another argument to all the functions in this flow, this
1213         patch passes around a reference to the FontDescription itself instead
1214         of copies of constituent members of it.
1215
1216         No new tests because there is no behavior change.
1217
1218         * css/CSSFontFaceSource.cpp:
1219         (WebCore::CSSFontFaceSource::font):
1220         * loader/cache/CachedFont.cpp:
1221         (WebCore::CachedFont::createFont):
1222         (WebCore::CachedFont::platformDataFromCustomData):
1223         * loader/cache/CachedFont.h:
1224         * loader/cache/CachedSVGFont.cpp:
1225         (WebCore::CachedSVGFont::platformDataFromCustomData):
1226         * loader/cache/CachedSVGFont.h:
1227         * platform/graphics/cairo/FontCustomPlatformData.h:
1228         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
1229         (WebCore::FontCustomPlatformData::fontPlatformData):
1230         * platform/graphics/freetype/FontPlatformData.h:
1231         * platform/graphics/freetype/FontPlatformDataFreeType.cpp:
1232         (WebCore::FontPlatformData::FontPlatformData):
1233         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
1234         (WebCore::Font::platformCreateScaledFont):
1235         * platform/graphics/mac/FontCustomPlatformData.cpp:
1236         (WebCore::FontCustomPlatformData::fontPlatformData):
1237         * platform/graphics/mac/FontCustomPlatformData.h:
1238         * platform/graphics/win/FontCustomPlatformData.cpp:
1239         (WebCore::FontCustomPlatformData::fontPlatformData):
1240         * platform/graphics/win/FontCustomPlatformData.h:
1241
1242 2015-08-07  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1243
1244         [Streams API] Create CountQueuingStrategy object as per spec
1245         https://bugs.webkit.org/show_bug.cgi?id=146594
1246
1247         Reviewed by Geoffrey Garen.
1248
1249         CountQueuingStrategy is a class part of the Streams API that can be found at
1250         https://streams.spec.whatwg.org/#cqs-class. We had it as js at the tests but the spec says we have to provide it
1251         natively. The class is implemented in this patch by creating its corresponding IDL with the size method using
1252         the [CustomBinding] attribute, that does not create any bindings against the object allowing us full control to
1253         do what the spec requires (just returning 1 without any cast check). The constructor sets the highWaterMark
1254         property taking it from the argument.
1255
1256         Covered by current tests
1257         (LayoutTests/streams/reference-implementation/count-queuing-strategy.html and
1258         LayoutTests/streams/reference-implementation/brand-checks.html).
1259
1260         * CMakeLists.txt:
1261         * DerivedSources.cpp:
1262         * DerivedSources.make:
1263         * PlatformMac.cmake:
1264         * WebCore.vcxproj/WebCore.vcxproj:
1265         * WebCore.vcxproj/WebCore.vcxproj.filters:
1266         * WebCore.xcodeproj/project.pbxproj:
1267         * bindings/js/JSBindingsAllInOne.cpp: Build infrastructure.
1268         * Modules/streams/CountQueuingStrategy.h: Added.
1269         (WebCore::CountQueuingStrategy::~CountQueuingStrategy): Created empty.
1270         (WebCore::CountQueuingStrategy::size): Returns 1.
1271         * Modules/streams/CountQueuingStrategy.idl: Added.
1272         * bindings/js/JSCountQueuingStrategyCustom.cpp: Added.
1273         (WebCore::jsCountQueuingStrategyPrototypeFunctionSize): Calls WebCore::CountQueuingStrategy::size.
1274         (WebCore::constructJSCountQueuingStrategy): Constructs the strategy, copies the highWaterMark from the argument
1275         and returns it.
1276         * bindings/js/JSDOMBinding.h:
1277         (WebCore::getPropertyFromObject): Moved from ReadableJSStream.cpp.
1278         (WebCore::setPropertyToObject): Added to create a property into an object.
1279         * bindings/js/ReadableJSStream.cpp:
1280         (WebCore::getPropertyFromObject): Deleted.
1281
1282 2015-08-07  Brady Eidson  <beidson@apple.com>
1283
1284         Move concrete KeyedDecoder/Encoder implementations to WebCore.
1285         https://bugs.webkit.org/show_bug.cgi?id=147757.
1286
1287         Rubberstamped by Andy Estes.
1288
1289         * PlatformEfl.cmake:
1290         * PlatformGTK.cmake:
1291         * WebCore.xcodeproj/project.pbxproj:
1292
1293         * platform/KeyedCoding.h:
1294         (WebCore::KeyedDecoder::KeyedDecoder): Static constructor to be implemented per-platform.
1295         (WebCore::KeyedEncoder::KeyedEncoder): Ditto.
1296
1297         * platform/cf/KeyedDecoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.cpp.
1298         (WebCore::KeyedDecoder::decoder):
1299         (WebCore::KeyedDecoderCF::KeyedDecoderCF):
1300         (WebCore::KeyedDecoderCF::~KeyedDecoderCF):
1301         (WebCore::KeyedDecoderCF::decodeBytes):
1302         (WebCore::KeyedDecoderCF::decodeBool):
1303         (WebCore::KeyedDecoderCF::decodeUInt32):
1304         (WebCore::KeyedDecoderCF::decodeInt32):
1305         (WebCore::KeyedDecoderCF::decodeInt64):
1306         (WebCore::KeyedDecoderCF::decodeFloat):
1307         (WebCore::KeyedDecoderCF::decodeDouble):
1308         (WebCore::KeyedDecoderCF::decodeString):
1309         (WebCore::KeyedDecoderCF::beginObject):
1310         (WebCore::KeyedDecoderCF::endObject):
1311         (WebCore::KeyedDecoderCF::beginArray):
1312         (WebCore::KeyedDecoderCF::beginArrayElement):
1313         (WebCore::KeyedDecoderCF::endArrayElement):
1314         (WebCore::KeyedDecoderCF::endArray):
1315         * platform/cf/KeyedDecoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedDecoder.h.
1316         
1317         * platform/cf/KeyedEncoderCF.cpp: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.cpp.
1318         (WebCore::KeyedEncoder::encoder):
1319         (WebCore::createDictionary):
1320         (WebCore::KeyedEncoderCF::KeyedEncoderCF):
1321         (WebCore::KeyedEncoderCF::~KeyedEncoderCF):
1322         (WebCore::KeyedEncoderCF::encodeBytes):
1323         (WebCore::KeyedEncoderCF::encodeBool):
1324         (WebCore::KeyedEncoderCF::encodeUInt32):
1325         (WebCore::KeyedEncoderCF::encodeInt32):
1326         (WebCore::KeyedEncoderCF::encodeInt64):
1327         (WebCore::KeyedEncoderCF::encodeFloat):
1328         (WebCore::KeyedEncoderCF::encodeDouble):
1329         (WebCore::KeyedEncoderCF::encodeString):
1330         (WebCore::KeyedEncoderCF::beginObject):
1331         (WebCore::KeyedEncoderCF::endObject):
1332         (WebCore::KeyedEncoderCF::beginArray):
1333         (WebCore::KeyedEncoderCF::beginArrayElement):
1334         (WebCore::KeyedEncoderCF::endArrayElement):
1335         (WebCore::KeyedEncoderCF::endArray):
1336         (WebCore::KeyedEncoderCF::finishEncoding):
1337         * platform/cf/KeyedEncoderCF.h: Renamed from Source/WebKit2/Shared/cf/KeyedEncoder.h.
1338         
1339         * platform/glib/KeyedDecoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.cpp.
1340         (WebCore::KeyedDecoder::decoder):
1341         (WebCore::KeyedDecoderGlib::KeyedDecoderGlib):
1342         (WebCore::KeyedDecoderGlib::~KeyedDecoderGlib):
1343         (WebCore::KeyedDecoderGlib::dictionaryFromGVariant):
1344         (WebCore::KeyedDecoderGlib::decodeBytes):
1345         (WebCore::KeyedDecoderGlib::decodeSimpleValue):
1346         (WebCore::KeyedDecoderGlib::decodeBool):
1347         (WebCore::KeyedDecoderGlib::decodeUInt32):
1348         (WebCore::KeyedDecoderGlib::decodeInt32):
1349         (WebCore::KeyedDecoderGlib::decodeInt64):
1350         (WebCore::KeyedDecoderGlib::decodeFloat):
1351         (WebCore::KeyedDecoderGlib::decodeDouble):
1352         (WebCore::KeyedDecoderGlib::decodeString):
1353         (WebCore::KeyedDecoderGlib::beginObject):
1354         (WebCore::KeyedDecoderGlib::endObject):
1355         (WebCore::KeyedDecoderGlib::beginArray):
1356         (WebCore::KeyedDecoderGlib::beginArrayElement):
1357         (WebCore::KeyedDecoderGlib::endArrayElement):
1358         (WebCore::KeyedDecoderGlib::endArray):
1359         * platform/glib/KeyedDecoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedDecoder.h.
1360         
1361         * platform/glib/KeyedEncoderGlib.cpp: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.cpp.
1362         (WebCore::KeyedEncoder::encoder):
1363         (WebCore::KeyedEncoderGlib::KeyedEncoderGlib):
1364         (WebCore::KeyedEncoderGlib::~KeyedEncoderGlib):
1365         (WebCore::KeyedEncoderGlib::encodeBytes):
1366         (WebCore::KeyedEncoderGlib::encodeBool):
1367         (WebCore::KeyedEncoderGlib::encodeUInt32):
1368         (WebCore::KeyedEncoderGlib::encodeInt32):
1369         (WebCore::KeyedEncoderGlib::encodeInt64):
1370         (WebCore::KeyedEncoderGlib::encodeFloat):
1371         (WebCore::KeyedEncoderGlib::encodeDouble):
1372         (WebCore::KeyedEncoderGlib::encodeString):
1373         (WebCore::KeyedEncoderGlib::beginObject):
1374         (WebCore::KeyedEncoderGlib::endObject):
1375         (WebCore::KeyedEncoderGlib::beginArray):
1376         (WebCore::KeyedEncoderGlib::beginArrayElement):
1377         (WebCore::KeyedEncoderGlib::endArrayElement):
1378         (WebCore::KeyedEncoderGlib::endArray):
1379         (WebCore::KeyedEncoderGlib::finishEncoding):
1380         * platform/glib/KeyedEncoderGlib.h: Renamed from Source/WebKit2/Shared/glib/KeyedEncoder.h.
1381
1382 2015-08-07  Carlos Garcia Campos  <cgarcia@igalia.com>
1383
1384         [GStreamer] Do not automatically show PackageKit codec installation notifications
1385         https://bugs.webkit.org/show_bug.cgi?id=135973
1386
1387         Reviewed by Philippe Normand.
1388
1389         Add description parameter to requestInstallMissingPlugins() that
1390         will be used by the API layer.
1391
1392         * html/HTMLMediaElement.cpp:
1393         (WebCore::HTMLMediaElement::requestInstallMissingPlugins):
1394         * html/HTMLMediaElement.h:
1395         * page/ChromeClient.h:
1396         * platform/graphics/MediaPlayer.h:
1397         (WebCore::MediaPlayerClient::requestInstallMissingPlugins):
1398         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1399         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
1400
1401 2015-08-07  Doug Russell  <d_russell@apple.com>
1402
1403         AX: Bug 147737 is causing test failures in Mavericks WK1
1404         https://bugs.webkit.org/show_bug.cgi?id=147763
1405
1406         Restrict change made in 147737 to ElCapitan+ because it is causing tests
1407         to fail in Mavericks.
1408
1409         Reviewed by Chris Fleizach.
1410
1411         Fixes failing tests.
1412
1413         * accessibility/AXObjectCache.cpp:
1414         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):
1415
1416 2015-08-07  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1417
1418         Create [CustomBinding] extended IDL attribute
1419         https://bugs.webkit.org/show_bug.cgi?id=146593
1420
1421         Reviewed by Geoffrey Garen.
1422
1423         Added the [CustomBinding] IDL extended attribute. The idea is that when using this attribute, bindings generate
1424         only the signature of the JS functions and we have to implement all the access in the Custom.cpp files, meaning
1425         accessing the implementations at our wish.
1426
1427         Added customBindingMethod, customBindingMethodWithArgs to the generator tests.
1428
1429         * bindings/scripts/CodeGeneratorGObject.pm:
1430         (SkipFunction): Skipped [CustomBinding] methods.
1431         * bindings/scripts/CodeGeneratorJS.pm:
1432         (GenerateHeader): Consider CustomBinding as ForwardDeclareInHeader.
1433         (GenerateImplementation): Avoid printing both header and implementation of the function.
1434         * bindings/scripts/CodeGeneratorObjC.pm:
1435         (SkipFunction): Skipped [CustomBinding] methods.
1436         * bindings/scripts/IDLAttributes.txt: Added [CustomBinding] IDL extended attribute.
1437         * bindings/scripts/test/JS/JSTestObj.cpp:
1438         * bindings/scripts/test/TestObj.idl: Added customBindingMethod, customBindingMethodWithArgs and their
1439         expectations.
1440
1441 2015-08-06  Zan Dobersek  <zdobersek@igalia.com>
1442
1443         Source/WebCore/crypto code should pass std::function<> objects through rvalue references
1444         https://bugs.webkit.org/show_bug.cgi?id=147332
1445
1446         Reviewed by Anders Carlsson.
1447
1448         Pass the std::function<> callbacks through CryptoAlgorithm methods via
1449         rvlaue references. This avoids generation of unnecessary move and copy
1450         constructors for std::function<> objects that are being handled.
1451
1452         * crypto/CryptoAlgorithm.cpp:
1453         (WebCore::CryptoAlgorithm::encrypt):
1454         (WebCore::CryptoAlgorithm::decrypt):
1455         (WebCore::CryptoAlgorithm::sign):
1456         (WebCore::CryptoAlgorithm::verify):
1457         (WebCore::CryptoAlgorithm::digest):
1458         (WebCore::CryptoAlgorithm::generateKey):
1459         (WebCore::CryptoAlgorithm::deriveKey):
1460         (WebCore::CryptoAlgorithm::deriveBits):
1461         (WebCore::CryptoAlgorithm::importKey):
1462         (WebCore::CryptoAlgorithm::encryptForWrapKey):
1463         (WebCore::CryptoAlgorithm::decryptForUnwrapKey):
1464         * crypto/CryptoAlgorithm.h:
1465         * crypto/algorithms/CryptoAlgorithmAES_CBC.cpp:
1466         (WebCore::CryptoAlgorithmAES_CBC::encrypt):
1467         (WebCore::CryptoAlgorithmAES_CBC::decrypt):
1468         (WebCore::CryptoAlgorithmAES_CBC::generateKey):
1469         (WebCore::CryptoAlgorithmAES_CBC::importKey):
1470         * crypto/algorithms/CryptoAlgorithmAES_CBC.h:
1471         * crypto/algorithms/CryptoAlgorithmAES_KW.cpp:
1472         (WebCore::CryptoAlgorithmAES_KW::encryptForWrapKey):
1473         (WebCore::CryptoAlgorithmAES_KW::decryptForUnwrapKey):
1474         (WebCore::CryptoAlgorithmAES_KW::generateKey):
1475         (WebCore::CryptoAlgorithmAES_KW::importKey):
1476         * crypto/algorithms/CryptoAlgorithmAES_KW.h:
1477         * crypto/algorithms/CryptoAlgorithmHMAC.cpp:
1478         (WebCore::CryptoAlgorithmHMAC::sign):
1479         (WebCore::CryptoAlgorithmHMAC::verify):
1480         (WebCore::CryptoAlgorithmHMAC::generateKey):
1481         (WebCore::CryptoAlgorithmHMAC::importKey):
1482         * crypto/algorithms/CryptoAlgorithmHMAC.h:
1483         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
1484         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::encrypt):
1485         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::decrypt):
1486         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::generateKey):
1487         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
1488         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.h:
1489         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
1490         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::sign):
1491         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::verify):
1492         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::generateKey):
1493         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
1494         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.h:
1495         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
1496         (WebCore::CryptoAlgorithmRSA_OAEP::encrypt):
1497         (WebCore::CryptoAlgorithmRSA_OAEP::decrypt):
1498         (WebCore::CryptoAlgorithmRSA_OAEP::generateKey):
1499         (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
1500         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.h:
1501         * crypto/algorithms/CryptoAlgorithmSHA1.cpp:
1502         (WebCore::CryptoAlgorithmSHA1::digest):
1503         * crypto/algorithms/CryptoAlgorithmSHA1.h:
1504         * crypto/algorithms/CryptoAlgorithmSHA224.cpp:
1505         (WebCore::CryptoAlgorithmSHA224::digest):
1506         * crypto/algorithms/CryptoAlgorithmSHA224.h:
1507         * crypto/algorithms/CryptoAlgorithmSHA256.cpp:
1508         (WebCore::CryptoAlgorithmSHA256::digest):
1509         * crypto/algorithms/CryptoAlgorithmSHA256.h:
1510         * crypto/algorithms/CryptoAlgorithmSHA384.cpp:
1511         (WebCore::CryptoAlgorithmSHA384::digest):
1512         * crypto/algorithms/CryptoAlgorithmSHA384.h:
1513         * crypto/algorithms/CryptoAlgorithmSHA512.cpp:
1514         (WebCore::CryptoAlgorithmSHA512::digest):
1515         * crypto/algorithms/CryptoAlgorithmSHA512.h:
1516         * crypto/gnutls/CryptoAlgorithmAES_CBCGnuTLS.cpp:
1517         (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
1518         (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
1519         * crypto/gnutls/CryptoAlgorithmAES_KWGnuTLS.cpp:
1520         (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
1521         (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
1522         * crypto/gnutls/CryptoAlgorithmHMACGnuTLS.cpp:
1523         (WebCore::CryptoAlgorithmHMAC::platformSign):
1524         (WebCore::CryptoAlgorithmHMAC::platformVerify):
1525         * crypto/gnutls/CryptoAlgorithmRSAES_PKCS1_v1_5GnuTLS.cpp:
1526         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
1527         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
1528         * crypto/gnutls/CryptoAlgorithmRSASSA_PKCS1_v1_5GnuTLS.cpp:
1529         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
1530         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
1531         * crypto/gnutls/CryptoAlgorithmRSA_OAEPGnuTLS.cpp:
1532         (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
1533         (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
1534         * crypto/mac/CryptoAlgorithmAES_CBCMac.cpp:
1535         (WebCore::transformAES_CBC):
1536         (WebCore::CryptoAlgorithmAES_CBC::platformEncrypt):
1537         (WebCore::CryptoAlgorithmAES_CBC::platformDecrypt):
1538         * crypto/mac/CryptoAlgorithmAES_KWMac.cpp:
1539         (WebCore::CryptoAlgorithmAES_KW::platformEncrypt):
1540         (WebCore::CryptoAlgorithmAES_KW::platformDecrypt):
1541         * crypto/mac/CryptoAlgorithmHMACMac.cpp:
1542         (WebCore::CryptoAlgorithmHMAC::platformSign):
1543         (WebCore::CryptoAlgorithmHMAC::platformVerify):
1544         * crypto/mac/CryptoAlgorithmRSAES_PKCS1_v1_5Mac.cpp:
1545         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformEncrypt):
1546         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::platformDecrypt):
1547         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
1548         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformSign):
1549         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::platformVerify):
1550         * crypto/mac/CryptoAlgorithmRSA_OAEPMac.cpp:
1551         (WebCore::CryptoAlgorithmRSA_OAEP::platformEncrypt):
1552         (WebCore::CryptoAlgorithmRSA_OAEP::platformDecrypt):
1553
1554 2015-08-06  Alex Christensen  <achristensen@webkit.org>
1555
1556         Fix GTK clean build after r187997
1557         https://bugs.webkit.org/show_bug.cgi?id=147723
1558
1559         Reviewed by Gyuyoung Kim.
1560
1561         * CMakeLists.txt:
1562         r187997 made it so WebCoreTestSupport does not link with WebCore, which is necessary to get DumpRenderTree to link.
1563         It also made it so WebCoreTestSupport is no longer dependent on WebCore, which causes it to build at the same time.
1564         This caused problems because WebCoreTestSupport uses headers that are generated for WebCore, such as WebKitFontFamilyNames.h.
1565         Adding a dependency makes it so that WebCoreTestSupport waits until WebCore is done compiling before compiling,
1566         which is what it used to do, but it does not cause linking problems with DumpRenderTree.
1567
1568 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
1569
1570         CSSSegmentedFontFace::fontRanges() does not handle duplicate fonts correctly
1571         https://bugs.webkit.org/show_bug.cgi?id=147765
1572
1573         Reviewed by Filip Pizlo.
1574
1575         CSSSegmentedFontFace::fontRanges() was trying to hash on FontDescriptors by
1576         picking a few specific pieces of data out of the FontDescriptor, computing
1577         a hash on it, and using that unsigned as a key in a HashMap. This has two
1578         problems: it doesn't handle equality correctly, as hash collisions cannot
1579         depend on an equality operator to dedup, and it doesn't hash on all the
1580         members of a FontDescription.
1581
1582         Instead, this HashMap should use FontDescriptionKey, which represents a
1583         FontDescription, and is designed exactly for the purpose of being used as a
1584         key in a HashMap.
1585
1586         No new tests because there is no behavior change (because a problem occurs
1587         when two different FontDescriptions hash to the same value, which is rare).
1588
1589         * css/CSSSegmentedFontFace.cpp:
1590         (WebCore::CSSSegmentedFontFace::fontRanges):
1591         * css/CSSSegmentedFontFace.h:
1592         * platform/graphics/FontCache.h:
1593         (WebCore::FontDescriptionKeyHash::hash):
1594         (WebCore::FontDescriptionKeyHash::equal):
1595
1596 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
1597
1598         [iOS] Remove dead code from FontCache::createFontPlatformData()
1599         https://bugs.webkit.org/show_bug.cgi?id=147762
1600
1601         Reviewed by Andy Estes.
1602
1603         No new tests because there is no behavior change.
1604
1605         * platform/graphics/ios/FontCacheIOS.mm:
1606         (WebCore::FontCache::createFontPlatformData): Deleted.
1607
1608 2015-08-06  Alex Christensen  <achristensen@webkit.org>
1609
1610         Revert part of my "build fix" in r188101.
1611
1612         * CMakeLists.txt:
1613         MockCDM was already conditionally added to WebCore_SOURCES, and that change causes dependency cycles when bug 147723 is fixed.
1614
1615 2015-08-06  Alex Christensen  <achristensen@webkit.org>
1616
1617         [Win] CMake build fix after r188098.
1618
1619         * CMakeLists.txt:
1620         MockCDM is necessary for testing if ENCRYPTED_MEDIA_V2 is enabled.
1621
1622 2015-08-06  Alex Christensen  <achristensen@webkit.org>
1623
1624         [Win] Enable all Windows features in CMake
1625         https://bugs.webkit.org/show_bug.cgi?id=147744
1626
1627         Reviewed by Tim Horton.
1628
1629         * PlatformWin.cmake:
1630         Add a file needed for enabling video.
1631
1632 2015-08-06  Anders Carlsson  <andersca@apple.com>
1633
1634         Rename SQLStatementBackend to SQLStatement
1635         https://bugs.webkit.org/show_bug.cgi?id=147755
1636
1637         Reviewed by Geoffrey Garen.
1638
1639         * CMakeLists.txt:
1640         * Modules/webdatabase/SQLStatement.h: Renamed from Source/WebCore/Modules/webdatabase/SQLStatementBackend.h.
1641         (WebCore::SQLStatement::hasStatementCallback):
1642         (WebCore::SQLStatement::hasStatementErrorCallback):
1643         * Modules/webdatabase/SQLStatementBackend.cpp: Removed.
1644         (WebCore::SQLStatementBackend::SQLStatementBackend): Deleted.
1645         (WebCore::SQLStatementBackend::~SQLStatementBackend): Deleted.
1646         (WebCore::SQLStatementBackend::sqlError): Deleted.
1647         (WebCore::SQLStatementBackend::sqlResultSet): Deleted.
1648         (WebCore::SQLStatementBackend::execute): Deleted.
1649         (WebCore::SQLStatementBackend::performCallback): Deleted.
1650         (WebCore::SQLStatementBackend::setDatabaseDeletedError): Deleted.
1651         (WebCore::SQLStatementBackend::setVersionMismatchedError): Deleted.
1652         (WebCore::SQLStatementBackend::setFailureDueToQuota): Deleted.
1653         (WebCore::SQLStatementBackend::clearFailureDueToQuota): Deleted.
1654         (WebCore::SQLStatementBackend::lastExecutionFailedDueToQuota): Deleted.
1655         * Modules/webdatabase/SQLStatementBackend.h:
1656         (WebCore::SQLStatementBackend::hasStatementCallback): Deleted.
1657         (WebCore::SQLStatementBackend::hasStatementErrorCallback): Deleted.
1658         * Modules/webdatabase/SQLTransaction.cpp:
1659         (WebCore::SQLTransaction::deliverStatementCallback):
1660         (WebCore::SQLTransaction::executeSQL):
1661         * Modules/webdatabase/SQLTransactionBackend.cpp:
1662         (WebCore::SQLTransactionBackend::currentStatement):
1663         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
1664         (WebCore::SQLTransactionBackend::executeSQL):
1665         * Modules/webdatabase/SQLTransactionBackend.h:
1666         * WebCore.vcxproj/WebCore.vcxproj:
1667         * WebCore.vcxproj/WebCore.vcxproj.filters:
1668         * WebCore.xcodeproj/project.pbxproj:
1669
1670 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
1671
1672         Make FontDescriptionKey sensitive to FontFeatureSettings
1673         https://bugs.webkit.org/show_bug.cgi?id=147751
1674
1675         Reviewed by Anders Carlsson.
1676
1677         Just like how FontDescription hashes should be sensitive to locale, they should
1678         also be sensitive to font features.
1679
1680         This patch also fixes operator== for FontDescriptionKey, which was previously
1681         comparing hashes for equality instead of the underlying data. Comparing hashes
1682         for equality is useless inside hashmaps.
1683
1684         This is in preparation for implementing font-feature-settings.
1685
1686         No new tests because there is no behavior change.
1687
1688         * platform/graphics/FontCache.cpp:
1689         (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
1690         (WebCore::FontPlatformDataCacheKey::isHashTableDeletedValue):
1691         (WebCore::FontPlatformDataCacheKey::hashTableDeletedSize): Deleted.
1692         * platform/graphics/FontCache.h:
1693         (WebCore::FontDescriptionKey::FontDescriptionKey):
1694         (WebCore::FontDescriptionKey::operator==):
1695         (WebCore::FontDescriptionKey::operator!=):
1696         (WebCore::FontDescriptionKey::isHashTableDeletedValue):
1697         (WebCore::FontDescriptionKey::computeHash):
1698         * platform/graphics/FontFeatureSettings.cpp:
1699         (WebCore::FontFeature::hash):
1700         (WebCore::FontFeatureSettings::hash):
1701         * platform/graphics/FontFeatureSettings.h:
1702
1703 2015-08-06  Anders Carlsson  <andersca@apple.com>
1704
1705         Merge SQLStatement into SQLStatementBackend
1706         https://bugs.webkit.org/show_bug.cgi?id=147754
1707
1708         Reviewed by Geoffrey Garen.
1709
1710         * CMakeLists.txt:
1711         * Modules/webdatabase/Database.h:
1712         * Modules/webdatabase/SQLStatement.cpp: Removed.
1713         (WebCore::SQLStatement::SQLStatement): Deleted.
1714         (WebCore::SQLStatement::setBackend): Deleted.
1715         (WebCore::SQLStatement::hasCallback): Deleted.
1716         (WebCore::SQLStatement::hasErrorCallback): Deleted.
1717         (WebCore::SQLStatement::performCallback): Deleted.
1718         * Modules/webdatabase/SQLStatement.h: Removed.
1719         * Modules/webdatabase/SQLStatementBackend.cpp:
1720         (WebCore::SQLStatementBackend::SQLStatementBackend):
1721         (WebCore::SQLStatementBackend::performCallback):
1722         (WebCore::SQLStatementBackend::frontend): Deleted.
1723         * Modules/webdatabase/SQLStatementBackend.h:
1724         (WebCore::SQLStatementBackend::hasStatementCallback):
1725         (WebCore::SQLStatementBackend::hasStatementErrorCallback):
1726         * Modules/webdatabase/SQLTransaction.cpp:
1727         (WebCore::SQLTransaction::deliverStatementCallback):
1728         (WebCore::SQLTransaction::executeSQL):
1729         * Modules/webdatabase/SQLTransaction.h:
1730         * Modules/webdatabase/SQLTransactionBackend.cpp:
1731         (WebCore::SQLTransactionBackend::currentStatement):
1732         (WebCore::SQLTransactionBackend::executeSQL):
1733         * Modules/webdatabase/SQLTransactionBackend.h:
1734         * WebCore.vcxproj/WebCore.vcxproj:
1735         * WebCore.vcxproj/WebCore.vcxproj.filters:
1736         * WebCore.xcodeproj/project.pbxproj:
1737         * bindings/js/JSSQLTransactionCustom.cpp:
1738
1739 2015-08-06  Chris Dumez  <cdumez@apple.com>
1740
1741         Toggle GPS state based on page visibility to save battery
1742         https://bugs.webkit.org/show_bug.cgi?id=147685
1743
1744         Reviewed by Benjamin Poulain.
1745
1746         Toggle GPS state based on page visibility to save battery. Previously,
1747         if the site you were viewing was watching your position and you
1748         switched tab, the GPS would stay on. This was bad for battery life.
1749
1750         Tests: fast/dom/Geolocation/startUpdatingOnlyWhenPageVisible.html
1751                fast/dom/Geolocation/stopUpdatingForHiddenPage.html
1752
1753         * Modules/geolocation/GeolocationController.cpp:
1754         (WebCore::GeolocationController::addObserver):
1755         (WebCore::GeolocationController::viewStateDidChange):
1756
1757 2015-08-06  Anders Carlsson  <andersca@apple.com>
1758
1759         SQLStatementBackend doesn't need to be refcounted
1760         https://bugs.webkit.org/show_bug.cgi?id=147748
1761
1762         Reviewed by Geoffrey Garen.
1763
1764         There's no shared ownership of SQLStatementBackend so we can just use std::unique_ptr.
1765
1766         * Modules/webdatabase/SQLStatementBackend.cpp:
1767         (WebCore::SQLStatementBackend::create): Deleted.
1768         * Modules/webdatabase/SQLStatementBackend.h:
1769         * Modules/webdatabase/SQLTransactionBackend.cpp:
1770         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
1771         (WebCore::SQLTransactionBackend::executeSQL):
1772         * Modules/webdatabase/SQLTransactionBackend.h:
1773
1774 2015-08-06  Eric Carlson  <eric.carlson@apple.com>
1775
1776         Do not enforce "content-disposition: attachment" sandbox restrictions on a MediaDocument
1777         https://bugs.webkit.org/show_bug.cgi?id=147734
1778         rdar://problem/22028179
1779
1780         Reviewed by Andy Estes.
1781
1782         Test to follow, see https://bugs.webkit.org/show_bug.cgi?id=147735
1783
1784         * dom/Document.cpp:
1785         (WebCore::Document::initSecurityContext): Use applyContentDispositionAttachmentSandbox
1786           instead of setting sandbox flags directly.
1787         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Don't special
1788           case MediaDocument.
1789         (WebCore::Document::applyContentDispositionAttachmentSandbox): Apply sandbox flags
1790           according to document type.
1791         * dom/Document.h:
1792
1793 2015-08-06  Anders Carlsson  <andersca@apple.com>
1794
1795         Get rid of DatabaseBackendBase
1796         https://bugs.webkit.org/show_bug.cgi?id=147733
1797
1798         Reviewed by Geoffrey Garen.
1799
1800         * CMakeLists.txt:
1801         * Modules/webdatabase/Database.cpp:
1802         (WebCore::Database::Database):
1803         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
1804         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
1805         * Modules/webdatabase/Database.h:
1806         * Modules/webdatabase/DatabaseBackendBase.cpp: Removed.
1807         (WebCore::DatabaseBackendBase::DatabaseBackendBase): Deleted.
1808         (WebCore::DatabaseBackendBase::~DatabaseBackendBase): Deleted.
1809         * Modules/webdatabase/DatabaseBackendBase.h: Removed.
1810         * Modules/webdatabase/DatabaseManager.cpp:
1811         * Modules/webdatabase/DatabaseManager.h:
1812         * Modules/webdatabase/DatabaseTracker.cpp:
1813         * WebCore.vcxproj/WebCore.vcxproj:
1814         * WebCore.vcxproj/WebCore.vcxproj.filters:
1815         * WebCore.xcodeproj/project.pbxproj:
1816
1817 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
1818
1819         Add comment to CSSParserString
1820         https://bugs.webkit.org/show_bug.cgi?id=147724
1821
1822         Reviewed by Dean Jackson.
1823
1824         No new tests because there is no behavior change.
1825
1826         * css/CSSParserValues.h:
1827
1828 2015-08-06  Myles C. Maxfield  <mmaxfield@apple.com>
1829
1830         Font feature settings comparisons are order-dependent and case-dependent
1831         https://bugs.webkit.org/show_bug.cgi?id=147719
1832
1833         Reviewed by Benjamin Poulain.
1834
1835         We should make our settings vector order-independent and case-independent.
1836
1837         Test: css3/font-feature-settings-parsing.html
1838
1839         * css/CSSParser.cpp:
1840         (WebCore::CSSParser::parseFontFeatureTag):
1841         * css/StyleBuilderConverter.h:
1842         (WebCore::StyleBuilderConverter::convertFontFeatureSettings):
1843         * platform/graphics/FontFeatureSettings.cpp:
1844         (WebCore::FontFeature::FontFeature):
1845         (WebCore::FontFeature::operator==):
1846         (WebCore::FontFeatureSettings::FontFeatureSettings):
1847         * platform/graphics/FontFeatureSettings.h:
1848         (WebCore::FontFeature::FontFeature):
1849         (WebCore::FontFeature::operator==):
1850         (WebCore::FontFeature::operator<):
1851         (WebCore::FontFeatureSettings::insert):
1852         (WebCore::FontFeatureSettings::FontFeatureSettings):
1853         (WebCore::FontFeatureSettings::append): Deleted.
1854
1855 2015-08-06  Doug Russell  <d_russell@apple.com>
1856
1857         AX: AXLoadComplete that comes before AX API access won't fire
1858         https://bugs.webkit.org/show_bug.cgi?id=147737
1859
1860         Reviewed by Chris Fleizach.
1861
1862         Treat setEnhancedUserInterfaceAccessibility() as AX API access and if true,
1863         enableAccessibility().
1864
1865         Test: accessibility/mac/loaded-notification.html
1866
1867         * accessibility/AXObjectCache.cpp:
1868         (WebCore::AXObjectCache::setEnhancedUserInterfaceAccessibility):
1869
1870 2015-08-06  Eric Carlson  <eric.carlson@apple.com>
1871
1872         Do not enforce "content-disposition: attachment" sandbox restrictions on a MediaDocument
1873         https://bugs.webkit.org/show_bug.cgi?id=147734
1874         rdar://problem/22028179
1875
1876         Reviewed by Dean Jackson.
1877
1878         Test to follow, see https://bugs.webkit.org/show_bug.cgi?id=147735
1879
1880         * dom/Document.cpp:
1881         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox): Return
1882           early if the Document is a MediaDocument.
1883
1884 2015-08-06  Matt Rajca  <mrajca@apple.com>
1885
1886         Media Session: remove media elements from the ID <-> element map on destruction
1887         https://bugs.webkit.org/show_bug.cgi?id=147707
1888
1889         Reviewed by Eric Carlson.
1890
1891         * html/HTMLMediaElement.cpp:
1892         (WebCore::HTMLMediaElement::~HTMLMediaElement):
1893
1894 2015-08-06  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1895
1896         [CoordinatedGraphics] Remove unused functions in Coordinated TiledBackingStore
1897         https://bugs.webkit.org/show_bug.cgi?id=147621
1898
1899         Reviewed by Csaba Osztrogonác.
1900
1901         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp: Remove setTileSize() and tileSize().
1902         (WebCore::TiledBackingStore::setTileSize):
1903
1904 2015-08-06  Anders Carlsson  <andersca@apple.com>
1905
1906         Move the last remnants of DatabaseBackendBase to Database
1907         https://bugs.webkit.org/show_bug.cgi?id=147730
1908
1909         Reviewed by Tim Horton.
1910
1911         * Modules/webdatabase/Database.cpp:
1912         (WebCore::Database::Database):
1913         (WebCore::Database::performOpenAndVerify):
1914         * Modules/webdatabase/Database.h:
1915         * Modules/webdatabase/DatabaseBackendBase.cpp:
1916         (WebCore::DatabaseBackendBase::DatabaseBackendBase):
1917         * Modules/webdatabase/DatabaseBackendBase.h:
1918         (WebCore::DatabaseBackendBase::databaseContext): Deleted.
1919         (WebCore::DatabaseBackendBase::setFrontend): Deleted.
1920
1921 2015-08-06  Alex Christensen  <achristensen@webkit.org>
1922
1923         Fix build without ENABLE(VIDEO) after r188030.
1924
1925         * dom/Document.h:
1926         * html/HTMLMediaElement.cpp:
1927         * html/HTMLMediaElement.h:
1928         Move definition of HTMLMediaElementInvalidID to Document.h so it can be used outside of ENABLE(VIDEO) macros.
1929
1930 2015-08-04  Matt Rajca  <mrajca@apple.com>
1931
1932         Media Session: push paused state to the media session focus manager instead of polling
1933         https://bugs.webkit.org/show_bug.cgi?id=147633
1934
1935         Reviewed by Simon Fraser.
1936
1937         * dom/Document.cpp:
1938         (WebCore::Document::updateIsPlayingMedia): If a valid source element ID is passed in, set the 'IsSourcePlaying'
1939          flag accordingly.
1940         * dom/Document.h:
1941         * html/HTMLMediaElement.cpp:
1942         (WebCore::HTMLMediaElement::elementWithID):
1943         (WebCore::HTMLMediaElement::setMuted): Pass along the element ID.
1944         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged): Ditto.
1945         (WebCore::HTMLMediaElement::setPlaying): Ditto.
1946         * html/HTMLMediaElement.h:
1947         * page/ChromeClient.h:
1948         * page/MediaProducer.h:
1949         * page/Page.cpp:
1950         (WebCore::Page::updateIsPlayingMedia): Pass along the source element ID.
1951         (WebCore::Page::isMediaElementPaused): Deleted. We now push media playback state changes instead of polling.
1952         * page/Page.h:
1953
1954 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
1955
1956         CharacterFallbackMapKey should be locale-specific
1957         https://bugs.webkit.org/show_bug.cgi?id=147532
1958
1959         Reviewed by Dean Jackson.
1960
1961         This is in preparation for locale-specific font fallback.
1962
1963         No new tests because there is no behavior change.
1964
1965         * platform/graphics/Font.cpp:
1966         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
1967         (WebCore::CharacterFallbackMapKey::operator==):
1968         (WebCore::CharacterFallbackMapKeyHash::hash):
1969         (WebCore::Font::systemFallbackFontForCharacter):
1970
1971 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
1972
1973         Expand CharacterFallbackMapKey to a struct
1974         https://bugs.webkit.org/show_bug.cgi?id=147530
1975
1976         Reviewed by Dean Jackson.
1977
1978         This is in prepraration for making this struct locale-specific.
1979
1980         No new tests because there is no behavior change.
1981
1982         * platform/graphics/Font.cpp:
1983         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
1984         (WebCore::CharacterFallbackMapKey::isHashTableDeletedValue):
1985         (WebCore::CharacterFallbackMapKey::operator==):
1986         (WebCore::CharacterFallbackMapKeyHash::hash):
1987         (WebCore::CharacterFallbackMapKeyHash::equal):
1988         (WebCore::Font::systemFallbackFontForCharacter):
1989
1990 2015-08-05  Chris Dumez  <cdumez@apple.com>
1991
1992         Crash when removing children of a MathMLSelectElement
1993         https://bugs.webkit.org/show_bug.cgi?id=147704
1994         <rdar://problem/21940321>
1995
1996         Reviewed by Ryosuke Niwa.
1997
1998         When MathMLSelectElement::childrenChanged() is called after its
1999         children have been removed, MathMLSelectElement calls
2000         updateSelectedChild() which accesses m_selectedChild. However,
2001         in this case, m_selectedChild is the previously selected child
2002         and it may be destroyed as this point if it was removed. To avoid
2003         this problem, MathMLSelectElement now keep a strong ref to the
2004         currently selected element.
2005
2006         Test: mathml/maction-removeChild.html
2007
2008         * mathml/MathMLSelectElement.h:
2009
2010 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
2011
2012         Migrate FontCascade.cpp to NeverDestroyed
2013         https://bugs.webkit.org/show_bug.cgi?id=147533
2014
2015         Reviewed by Simon Fraser.
2016
2017         No new tests because there is no behavior change.
2018
2019         * platform/graphics/FontCascade.cpp:
2020         (WebCore::fontCascadeCache):
2021
2022 2015-08-05  Tim Horton  <timothy_horton@apple.com>
2023
2024         Try to fix the build
2025
2026         * Modules/webdatabase/Database.cpp:
2027         (WebCore::Database::performOpenAndVerify):
2028         * Modules/webdatabase/Database.h:
2029
2030 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
2031
2032         Delete duplicate forward-declaration
2033         https://bugs.webkit.org/show_bug.cgi?id=147701
2034
2035         Reviewed by Simon Fraser.
2036
2037         No new tests because there is no behavior change.
2038
2039         * platform/spi/cocoa/CoreTextSPI.h:
2040
2041 2015-08-05  Anders Carlsson  <andersca@apple.com>
2042
2043         Move the last DatabaseBackendBase functions over to Database
2044         https://bugs.webkit.org/show_bug.cgi?id=147706
2045
2046         Reviewed by Tim Horton.
2047
2048         * Modules/webdatabase/Database.cpp:
2049         (WebCore::Database::~Database):
2050         (WebCore::Database::setExpectedVersion):
2051         (WebCore::Database::getActualVersionForTransaction):
2052         (WebCore::Database::version):
2053         (WebCore::Database::stringIdentifier):
2054         (WebCore::Database::displayName):
2055         (WebCore::Database::estimatedSize):
2056         (WebCore::Database::fileName):
2057         (WebCore::Database::details):
2058         (WebCore::Database::maximumSize):
2059         (WebCore::Database::databaseDebugName):
2060         * Modules/webdatabase/Database.h:
2061         * Modules/webdatabase/DatabaseBackendBase.cpp:
2062         (WebCore::DatabaseBackendBase::databaseDebugName): Deleted.
2063         (WebCore::DatabaseBackendBase::~DatabaseBackendBase): Deleted.
2064         (WebCore::DatabaseBackendBase::version): Deleted.
2065         (WebCore::DatabaseBackendBase::securityOrigin): Deleted.
2066         (WebCore::DatabaseBackendBase::stringIdentifier): Deleted.
2067         (WebCore::DatabaseBackendBase::displayName): Deleted.
2068         (WebCore::DatabaseBackendBase::estimatedSize): Deleted.
2069         (WebCore::DatabaseBackendBase::fileName): Deleted.
2070         (WebCore::DatabaseBackendBase::details): Deleted.
2071         (WebCore::DatabaseBackendBase::setExpectedVersion): Deleted.
2072         (WebCore::DatabaseBackendBase::getActualVersionForTransaction): Deleted.
2073         (WebCore::DatabaseBackendBase::maximumSize): Deleted.
2074         * Modules/webdatabase/DatabaseBackendBase.h:
2075         (WebCore::DatabaseBackendBase::opened): Deleted.
2076         (WebCore::DatabaseBackendBase::isNew): Deleted.
2077         (WebCore::DatabaseBackendBase::sqliteDatabase): Deleted.
2078         (WebCore::DatabaseBackendBase::expectedVersion): Deleted.
2079         * Modules/webdatabase/SQLTransactionClient.cpp:
2080         (WebCore::SQLTransactionClient::didCommitWriteTransaction):
2081         (WebCore::SQLTransactionClient::didExceedQuota):
2082         * Modules/webdatabase/SQLTransactionClient.h:
2083
2084 2015-08-05  Filip Pizlo  <fpizlo@apple.com>
2085
2086         Unreviewed, roll out http://trac.webkit.org/changeset/187972.
2087
2088         * Modules/webaudio/AsyncAudioDecoder.cpp:
2089         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
2090         (WebCore::AsyncAudioDecoder::runLoop):
2091         * Modules/webaudio/AsyncAudioDecoder.h:
2092         * Modules/webaudio/AudioContext.h:
2093         * Modules/webaudio/MediaStreamAudioSource.cpp:
2094         (WebCore::MediaStreamAudioSource::addAudioConsumer):
2095         (WebCore::MediaStreamAudioSource::removeAudioConsumer):
2096         (WebCore::MediaStreamAudioSource::setAudioFormat):
2097         (WebCore::MediaStreamAudioSource::consumeAudio):
2098         * Modules/webaudio/MediaStreamAudioSource.h:
2099         * Modules/webdatabase/Database.cpp:
2100         (WebCore::Database::close):
2101         (WebCore::Database::runTransaction):
2102         (WebCore::Database::inProgressTransactionCompleted):
2103         (WebCore::Database::hasPendingTransaction):
2104         * Modules/webdatabase/DatabaseTask.h:
2105         * Modules/webdatabase/DatabaseThread.cpp:
2106         (WebCore::DatabaseThread::start):
2107         (WebCore::DatabaseThread::databaseThread):
2108         * Modules/webdatabase/DatabaseThread.h:
2109         * Modules/webdatabase/DatabaseTracker.cpp:
2110         (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
2111         (WebCore::DatabaseTracker::canEstablishDatabase):
2112         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
2113         (WebCore::DatabaseTracker::hasEntryForOrigin):
2114         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
2115         (WebCore::DatabaseTracker::closeAllDatabases):
2116         (WebCore::DatabaseTracker::fullPathForDatabase):
2117         (WebCore::DatabaseTracker::origins):
2118         (WebCore::DatabaseTracker::databaseNamesForOrigin):
2119         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
2120         (WebCore::DatabaseTracker::setDatabaseDetails):
2121         (WebCore::DatabaseTracker::doneCreatingDatabase):
2122         (WebCore::DatabaseTracker::addOpenDatabase):
2123         (WebCore::DatabaseTracker::removeOpenDatabase):
2124         (WebCore::DatabaseTracker::getOpenDatabases):
2125         (WebCore::DatabaseTracker::originLockFor):
2126         (WebCore::DatabaseTracker::quotaForOrigin):
2127         (WebCore::DatabaseTracker::setQuota):
2128         (WebCore::DatabaseTracker::deleteOrigin):
2129         (WebCore::DatabaseTracker::deleteDatabase):
2130         (WebCore::DatabaseTracker::deleteDatabaseFile):
2131         (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
2132         (WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
2133         (WebCore::DatabaseTracker::openDatabaseMutex):
2134         (WebCore::DatabaseTracker::setClient):
2135         (WebCore::notificationMutex):
2136         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
2137         (WebCore::DatabaseTracker::notifyDatabasesChanged):
2138         * Modules/webdatabase/DatabaseTracker.h:
2139         * Modules/webdatabase/OriginLock.h:
2140         * Modules/webdatabase/SQLCallbackWrapper.h:
2141         (WebCore::SQLCallbackWrapper::clear):
2142         (WebCore::SQLCallbackWrapper::unwrap):
2143         (WebCore::SQLCallbackWrapper::hasCallback):
2144         * Modules/webdatabase/SQLTransactionBackend.cpp:
2145         (WebCore::SQLTransactionBackend::doCleanup):
2146         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
2147         (WebCore::SQLTransactionBackend::getNextStatement):
2148         * Modules/webdatabase/SQLTransactionBackend.h:
2149         * bindings/js/WorkerScriptController.cpp:
2150         (WebCore::WorkerScriptController::scheduleExecutionTermination):
2151         (WebCore::WorkerScriptController::isExecutionTerminating):
2152         * bindings/js/WorkerScriptController.h:
2153         * dom/default/PlatformMessagePortChannel.cpp:
2154         (WebCore::MessagePortChannel::postMessageToRemote):
2155         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
2156         (WebCore::MessagePortChannel::isConnectedTo):
2157         (WebCore::MessagePortChannel::hasPendingActivity):
2158         (WebCore::MessagePortChannel::locallyEntangledPort):
2159         (WebCore::PlatformMessagePortChannel::setRemotePort):
2160         (WebCore::PlatformMessagePortChannel::entangledChannel):
2161         (WebCore::PlatformMessagePortChannel::closeInternal):
2162         * dom/default/PlatformMessagePortChannel.h:
2163         * loader/icon/IconDatabase.cpp:
2164         (WebCore::IconDatabase::removeAllIcons):
2165         (WebCore::IconDatabase::synchronousIconForPageURL):
2166         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
2167         (WebCore::IconDatabase::synchronousIconURLForPageURL):
2168         (WebCore::IconDatabase::retainIconForPageURL):
2169         (WebCore::IconDatabase::performRetainIconForPageURL):
2170         (WebCore::IconDatabase::releaseIconForPageURL):
2171         (WebCore::IconDatabase::performReleaseIconForPageURL):
2172         (WebCore::IconDatabase::setIconDataForIconURL):
2173         (WebCore::IconDatabase::setIconURLForPageURL):
2174         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
2175         (WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
2176         (WebCore::IconDatabase::pageURLMappingCount):
2177         (WebCore::IconDatabase::retainedPageURLCount):
2178         (WebCore::IconDatabase::iconRecordCount):
2179         (WebCore::IconDatabase::iconRecordCountWithData):
2180         (WebCore::IconDatabase::wakeSyncThread):
2181         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks):
2182         (WebCore::IconDatabase::databasePath):
2183         (WebCore::IconDatabase::getOrCreatePageURLRecord):
2184         (WebCore::IconDatabase::iconDatabaseSyncThread):
2185         (WebCore::IconDatabase::performOpenInitialization):
2186         (WebCore::IconDatabase::performURLImport):
2187         (WebCore::IconDatabase::syncThreadMainLoop):
2188         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
2189         (WebCore::IconDatabase::readFromDatabase):
2190         (WebCore::IconDatabase::writeToDatabase):
2191         (WebCore::IconDatabase::pruneUnretainedIcons):
2192         (WebCore::IconDatabase::cleanupSyncThread):
2193         * loader/icon/IconDatabase.h:
2194         * page/scrolling/ScrollingTree.cpp:
2195         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
2196         (WebCore::ScrollingTree::commitNewTreeState):
2197         (WebCore::ScrollingTree::setMainFramePinState):
2198         (WebCore::ScrollingTree::mainFrameScrollPosition):
2199         (WebCore::ScrollingTree::setMainFrameScrollPosition):
2200         (WebCore::ScrollingTree::isPointInNonFastScrollableRegion):
2201         (WebCore::ScrollingTree::isRubberBandInProgress):
2202         (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
2203         (WebCore::ScrollingTree::isScrollSnapInProgress):
2204         (WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
2205         (WebCore::ScrollingTree::setCanRubberBandState):
2206         (WebCore::ScrollingTree::rubberBandsAtLeft):
2207         (WebCore::ScrollingTree::rubberBandsAtRight):
2208         (WebCore::ScrollingTree::rubberBandsAtBottom):
2209         (WebCore::ScrollingTree::rubberBandsAtTop):
2210         (WebCore::ScrollingTree::setScrollPinningBehavior):
2211         (WebCore::ScrollingTree::scrollPinningBehavior):
2212         (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
2213         (WebCore::ScrollingTree::latchedNode):
2214         (WebCore::ScrollingTree::setLatchedNode):
2215         (WebCore::ScrollingTree::clearLatchedNode):
2216         * page/scrolling/ScrollingTree.h:
2217         * platform/MemoryPressureHandler.h:
2218         * platform/audio/HRTFDatabaseLoader.cpp:
2219         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
2220         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
2221         * platform/audio/HRTFDatabaseLoader.h:
2222         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2223         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
2224         (WebCore::MemoryPressureHandler::clearMemoryPressure):
2225         (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
2226         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
2227         * platform/graphics/DisplayRefreshMonitor.cpp:
2228         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
2229         * platform/graphics/DisplayRefreshMonitor.h:
2230         (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime):
2231         (WebCore::DisplayRefreshMonitor::mutex):
2232         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2233         (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks):
2234         (WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag):
2235         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
2236         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2237         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2238         (WebCore::AVFWrapper::callbackContext):
2239         (WebCore::AVFWrapper::~AVFWrapper):
2240         (WebCore::AVFWrapper::mapLock):
2241         (WebCore::AVFWrapper::addToMap):
2242         (WebCore::AVFWrapper::removeFromMap):
2243         (WebCore::AVFWrapper::periodicTimeObserverCallback):
2244         (WebCore::AVFWrapper::processNotification):
2245         (WebCore::AVFWrapper::loadPlayableCompletionCallback):
2246         (WebCore::AVFWrapper::loadMetadataCompletionCallback):
2247         (WebCore::AVFWrapper::seekCompletedCallback):
2248         (WebCore::AVFWrapper::processCue):
2249         (WebCore::AVFWrapper::legibleOutputCallback):
2250         (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource):
2251         (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):
2252         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
2253         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
2254         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
2255         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
2256         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2257         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
2258         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
2259         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
2260         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
2261         (WebCore::DisplayRefreshMonitorMac::requestRefreshCallback):
2262         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
2263         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2264         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
2265         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
2266         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
2267         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
2268         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
2269         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2270         * platform/ios/LegacyTileCache.h:
2271         * platform/ios/LegacyTileCache.mm:
2272         (WebCore::LegacyTileCache::setTilesOpaque):
2273         (WebCore::LegacyTileCache::doLayoutTiles):
2274         (WebCore::LegacyTileCache::setCurrentScale):
2275         (WebCore::LegacyTileCache::commitScaleChange):
2276         (WebCore::LegacyTileCache::layoutTilesNow):
2277         (WebCore::LegacyTileCache::layoutTilesNowForRect):
2278         (WebCore::LegacyTileCache::removeAllNonVisibleTiles):
2279         (WebCore::LegacyTileCache::removeAllTiles):
2280         (WebCore::LegacyTileCache::removeForegroundTiles):
2281         (WebCore::LegacyTileCache::setContentReplacementImage):
2282         (WebCore::LegacyTileCache::contentReplacementImage):
2283         (WebCore::LegacyTileCache::tileCreationTimerFired):
2284         (WebCore::LegacyTileCache::setNeedsDisplayInRect):
2285         (WebCore::LegacyTileCache::updateTilingMode):
2286         (WebCore::LegacyTileCache::setTilingMode):
2287         (WebCore::LegacyTileCache::doPendingRepaints):
2288         (WebCore::LegacyTileCache::flushSavedDisplayRects):
2289         (WebCore::LegacyTileCache::prepareToDraw):
2290         * platform/ios/LegacyTileLayerPool.h:
2291         * platform/ios/LegacyTileLayerPool.mm:
2292         (WebCore::LegacyTileLayerPool::addLayer):
2293         (WebCore::LegacyTileLayerPool::takeLayerWithSize):
2294         (WebCore::LegacyTileLayerPool::setCapacity):
2295         (WebCore::LegacyTileLayerPool::prune):
2296         (WebCore::LegacyTileLayerPool::drain):
2297         * platform/network/curl/CurlDownload.cpp:
2298         (WebCore::CurlDownloadManager::add):
2299         (WebCore::CurlDownloadManager::remove):
2300         (WebCore::CurlDownloadManager::getActiveDownloadCount):
2301         (WebCore::CurlDownloadManager::getPendingDownloadCount):
2302         (WebCore::CurlDownloadManager::stopThreadIfIdle):
2303         (WebCore::CurlDownloadManager::updateHandleList):
2304         (WebCore::CurlDownload::~CurlDownload):
2305         (WebCore::CurlDownload::init):
2306         (WebCore::CurlDownload::getTempPath):
2307         (WebCore::CurlDownload::getUrl):
2308         (WebCore::CurlDownload::getResponse):
2309         (WebCore::CurlDownload::closeFile):
2310         (WebCore::CurlDownload::didReceiveHeader):
2311         (WebCore::CurlDownload::didReceiveData):
2312         (WebCore::CurlDownload::didFail):
2313         * platform/network/curl/CurlDownload.h:
2314         * platform/network/curl/ResourceHandleManager.cpp:
2315         (WebCore::cookieJarPath):
2316         (WebCore::sharedResourceMutex):
2317         (WebCore::curl_lock_callback):
2318         (WebCore::curl_unlock_callback):
2319         * platform/network/ios/QuickLook.mm:
2320         (WebCore::QLDirectoryAttributes):
2321         (qlPreviewConverterDictionaryMutex):
2322         (WebCore::addQLPreviewConverterWithFileForURL):
2323         (WebCore::qlPreviewConverterUTIForURL):
2324         (WebCore::removeQLPreviewConverterForURL):
2325         (WebCore::safeQLURLForDocumentURLAndResourceURL):
2326         * platform/sql/SQLiteDatabase.cpp:
2327         (WebCore::SQLiteDatabase::close):
2328         (WebCore::SQLiteDatabase::maximumSize):
2329         (WebCore::SQLiteDatabase::setMaximumSize):
2330         (WebCore::SQLiteDatabase::pageSize):
2331         (WebCore::SQLiteDatabase::freeSpaceSize):
2332         (WebCore::SQLiteDatabase::totalSize):
2333         (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
2334         (WebCore::SQLiteDatabase::setAuthorizer):
2335         * platform/sql/SQLiteDatabase.h:
2336         (WebCore::SQLiteDatabase::databaseMutex):
2337         * platform/sql/SQLiteStatement.cpp:
2338         (WebCore::SQLiteStatement::prepare):
2339         (WebCore::SQLiteStatement::step):
2340         * workers/WorkerThread.cpp:
2341         (WebCore::WorkerThread::start):
2342         (WebCore::WorkerThread::workerThread):
2343         (WebCore::WorkerThread::stop):
2344         * workers/WorkerThread.h:
2345
2346 2015-08-05  Anders Carlsson  <andersca@apple.com>
2347
2348         Move more functions from DatabaseBackendBase to Database
2349         https://bugs.webkit.org/show_bug.cgi?id=147705
2350
2351         Reviewed by Tim Horton.
2352
2353         * Modules/webdatabase/Database.cpp:
2354         (WebCore::guidMutex):
2355         (WebCore::guidToVersionMap):
2356         (WebCore::updateGuidVersionMap):
2357         (WebCore::guidToDatabaseMap):
2358         (WebCore::guidForOriginAndName):
2359         (WebCore::Database::Database):
2360         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller):
2361         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller):
2362         (WebCore::DoneCreatingDatabaseOnExitCaller::setOpenSucceeded):
2363         (WebCore::Database::performOpenAndVerify):
2364         (WebCore::Database::closeDatabase):
2365         (WebCore::Database::getCachedVersion):
2366         (WebCore::Database::setCachedVersion):
2367         * Modules/webdatabase/Database.h:
2368         * Modules/webdatabase/DatabaseBackendBase.cpp:
2369         (WebCore::DatabaseBackendBase::version):
2370         (WebCore::formatErrorMessage): Deleted.
2371         (WebCore::guidMutex): Deleted.
2372         (WebCore::guidToVersionMap): Deleted.
2373         (WebCore::updateGuidVersionMap): Deleted.
2374         (WebCore::guidToDatabaseMap): Deleted.
2375         (WebCore::guidForOriginAndName): Deleted.
2376         (WebCore::DatabaseBackendBase::DatabaseBackendBase): Deleted.
2377         (WebCore::DatabaseBackendBase::closeDatabase): Deleted.
2378         (WebCore::DoneCreatingDatabaseOnExitCaller::DoneCreatingDatabaseOnExitCaller): Deleted.
2379         (WebCore::DoneCreatingDatabaseOnExitCaller::~DoneCreatingDatabaseOnExitCaller): Deleted.
2380         (WebCore::DoneCreatingDatabaseOnExitCaller::setOpenSucceeded): Deleted.
2381         (WebCore::DatabaseBackendBase::performOpenAndVerify): Deleted.
2382         (WebCore::DatabaseBackendBase::getCachedVersion): Deleted.
2383         (WebCore::DatabaseBackendBase::setCachedVersion): Deleted.
2384         * Modules/webdatabase/DatabaseBackendBase.h:
2385
2386 2015-08-05  Anders Carlsson  <andersca@apple.com>
2387
2388         Move more functions from DatabaseBackendBase to Database
2389         https://bugs.webkit.org/show_bug.cgi?id=147703
2390
2391         Reviewed by Tim Horton.
2392
2393         * Modules/webdatabase/Database.cpp:
2394         (WebCore::fullyQualifiedInfoTableName):
2395         (WebCore::setTextValueInDatabase):
2396         (WebCore::retrieveTextResultFromDatabase):
2397         (WebCore::Database::getVersionFromDatabase):
2398         (WebCore::Database::setVersionInDatabase):
2399         (WebCore::Database::performGetTableNames):
2400         * Modules/webdatabase/Database.h:
2401         * Modules/webdatabase/DatabaseBackendBase.cpp:
2402         (WebCore::DatabaseBackendBase::performOpenAndVerify):
2403         (WebCore::DatabaseBackendBase::getActualVersionForTransaction):
2404         (WebCore::DatabaseBackendBase::databaseInfoTableName): Deleted.
2405         (WebCore::fullyQualifiedInfoTableName): Deleted.
2406         (WebCore::retrieveTextResultFromDatabase): Deleted.
2407         (WebCore::setTextValueInDatabase): Deleted.
2408         (WebCore::DatabaseBackendBase::getVersionFromDatabase): Deleted.
2409         (WebCore::DatabaseBackendBase::setVersionInDatabase): Deleted.
2410         * Modules/webdatabase/DatabaseBackendBase.h:
2411
2412 2015-08-05  Alex Christensen  <achristensen@webkit.org>
2413
2414         Build DumpRenderTree with CMake.
2415         https://bugs.webkit.org/show_bug.cgi?id=147519
2416
2417         Reviewed by Brent Fulgham.
2418
2419         * CMakeLists.txt:
2420         WebCoreTestSupport is a static library and should not be linked with WebCore.
2421
2422 2015-08-05  Anders Carlsson  <andersca@apple.com>
2423
2424         Move some more DatabaseBackendBase functions to Database
2425         https://bugs.webkit.org/show_bug.cgi?id=147702
2426
2427         Reviewed by Tim Horton.
2428
2429         * Modules/webdatabase/Database.cpp:
2430         (WebCore::formatErrorMessage):
2431         (WebCore::Database::disableAuthorizer):
2432         (WebCore::Database::enableAuthorizer):
2433         (WebCore::Database::setAuthorizerPermissions):
2434         (WebCore::Database::lastActionChangedDatabase):
2435         (WebCore::Database::lastActionWasInsert):
2436         (WebCore::Database::resetDeletes):
2437         (WebCore::Database::hadDeletes):
2438         (WebCore::Database::resetAuthorizer):
2439         (WebCore::Database::incrementalVacuumIfNeeded):
2440         * Modules/webdatabase/Database.h:
2441         * Modules/webdatabase/DatabaseBackendBase.cpp:
2442         (WebCore::DatabaseBackendBase::disableAuthorizer): Deleted.
2443         (WebCore::DatabaseBackendBase::enableAuthorizer): Deleted.
2444         (WebCore::DatabaseBackendBase::setAuthorizerPermissions): Deleted.
2445         (WebCore::DatabaseBackendBase::lastActionChangedDatabase): Deleted.
2446         (WebCore::DatabaseBackendBase::lastActionWasInsert): Deleted.
2447         (WebCore::DatabaseBackendBase::resetDeletes): Deleted.
2448         (WebCore::DatabaseBackendBase::hadDeletes): Deleted.
2449         (WebCore::DatabaseBackendBase::resetAuthorizer): Deleted.
2450         (WebCore::DatabaseBackendBase::incrementalVacuumIfNeeded): Deleted.
2451         * Modules/webdatabase/DatabaseBackendBase.h:
2452
2453 2015-08-05  Zalan Bujtas  <zalan@apple.com>
2454
2455         [Frame flattening] Return early when child RenderView is not available.
2456         https://bugs.webkit.org/show_bug.cgi?id=147697
2457
2458         Reviewed by Simon Fraser.
2459
2460         No change in functionality.
2461
2462         * rendering/RenderFrameBase.cpp:
2463         (WebCore::RenderFrameBase::peformLayoutWithFlattening):
2464
2465 2015-08-05  Anders Carlsson  <andersca@apple.com>
2466
2467         Remove more dead database code
2468         https://bugs.webkit.org/show_bug.cgi?id=147698
2469
2470         Reviewed by Tim Horton.
2471
2472         * Modules/webdatabase/DatabaseBackendBase.cpp:
2473         (WebCore::DatabaseBackendBase::interrupt): Deleted.
2474         (WebCore::DatabaseBackendBase::isInterrupted): Deleted.
2475         * Modules/webdatabase/DatabaseBackendBase.h:
2476         * Modules/webdatabase/SQLStatementBackend.cpp:
2477         (WebCore::SQLStatementBackend::execute):
2478         * Modules/webdatabase/SQLTransaction.cpp:
2479         (WebCore::SQLTransaction::computeNextStateAndCleanupIfNeeded):
2480         * Modules/webdatabase/SQLTransactionBackend.cpp:
2481         (WebCore::SQLTransactionBackend::computeNextStateAndCleanupIfNeeded):
2482         * platform/sql/SQLiteDatabase.cpp:
2483         (WebCore::SQLiteDatabase::setFullsync):
2484         (WebCore::SQLiteDatabase::SQLiteDatabase): Deleted.
2485         (WebCore::SQLiteDatabase::interrupt): Deleted.
2486         (WebCore::SQLiteDatabase::isInterrupted): Deleted.
2487         * platform/sql/SQLiteDatabase.h:
2488         * platform/sql/SQLiteStatement.cpp:
2489         (WebCore::SQLiteStatement::prepare): Deleted.
2490         (WebCore::SQLiteStatement::step): Deleted.
2491
2492 2015-08-05  Anders Carlsson  <andersca@apple.com>
2493
2494         Fix build.
2495
2496         * platform/cf/CoreMediaSoftLink.cpp:
2497         * platform/cf/CoreMediaSoftLink.h:
2498
2499 2015-08-05  Anders Carlsson  <andersca@apple.com>
2500
2501         Fix build.
2502
2503         * platform/graphics/mac/FontCacheMac.mm:
2504         (WebCore::lookupCTFont):
2505
2506 2015-08-05  Anders Carlsson  <andersca@apple.com>
2507
2508         Change openDatabase to return a Database instead of a DatabaseBackendBase
2509         https://bugs.webkit.org/show_bug.cgi?id=147691
2510
2511         Reviewed by Tim Horton.
2512
2513         * Modules/webdatabase/AbstractDatabaseServer.h:
2514         * Modules/webdatabase/Database.cpp:
2515         (WebCore::Database::create): Deleted.
2516         * Modules/webdatabase/Database.h:
2517         * Modules/webdatabase/DatabaseManager.cpp:
2518         (WebCore::DatabaseManager::openDatabaseBackend):
2519         (WebCore::DatabaseManager::openDatabase):
2520         * Modules/webdatabase/DatabaseManager.h:
2521         * Modules/webdatabase/DatabaseServer.cpp:
2522         (WebCore::DatabaseServer::openDatabase):
2523         (WebCore::DatabaseServer::createDatabase):
2524         * Modules/webdatabase/DatabaseServer.h:
2525
2526 2015-08-05  Myles C. Maxfield  <mmaxfield@apple.com>
2527
2528         [OS X] Migrate to CTFontCreateForCharactersWithLanguage from [NSFont findFontLike:forString:withRange:inLanguage]
2529         https://bugs.webkit.org/show_bug.cgi?id=147483
2530
2531         Reviewed by Dean Jackson.
2532
2533         [NSFont findFontLike:forString:withRange:inLanguage] doesn't properly handle its last argument. In
2534         addition, we want to be moving away from NSFont in the first place and on to Core Text. This new
2535         CoreText function correctly handles its language argument, which is required for language-specific
2536         font fallback.
2537
2538         This patch rolls r187707 back in which was rolled out in r187802 due to test flakiness. This patch
2539         fixes the flakiness.
2540
2541         No new tests because there is no behavior change.
2542
2543         * platform/graphics/FontCache.cpp:
2544         (WebCore::FontCache::purgeInactiveFontData):
2545         * platform/graphics/FontCache.h:
2546         (WebCore::FontCache::platformPurgeInactiveFontData):
2547         * platform/graphics/mac/FontCacheMac.mm:
2548         (WebCore::fallbackDedupSet):
2549         (WebCore::FontCache::platformPurgeInactiveFontData):
2550         (WebCore::lookupCTFont):
2551         (WebCore::FontCache::systemFallbackForCharacters):
2552         * platform/spi/cocoa/CoreTextSPI.h:
2553         * platform/spi/mac/NSFontSPI.h:
2554
2555 2015-08-05  Anders Carlsson  <andersca@apple.com>
2556
2557         Get rid of DatabaseBackend as another step towards merging Database and DatabaseBackendBase
2558         https://bugs.webkit.org/show_bug.cgi?id=147687
2559
2560         Reviewed by Tim Horton.
2561
2562         * CMakeLists.txt:
2563         * Modules/webdatabase/ChangeVersionWrapper.cpp:
2564         (WebCore::ChangeVersionWrapper::performPreflight):
2565         (WebCore::ChangeVersionWrapper::performPostflight):
2566         * Modules/webdatabase/Database.cpp:
2567         (WebCore::Database::Database):
2568         (WebCore::Database::close):
2569         (WebCore::Database::from): Deleted.
2570         (WebCore::Database::backend): Deleted.
2571         * Modules/webdatabase/Database.h:
2572         * Modules/webdatabase/DatabaseBackend.cpp: Removed.
2573         (WebCore::DatabaseBackend::DatabaseBackend): Deleted.
2574         * Modules/webdatabase/DatabaseBackend.h: Removed.
2575         * Modules/webdatabase/DatabaseManager.cpp:
2576         * Modules/webdatabase/DatabaseServer.cpp:
2577         * Modules/webdatabase/DatabaseTask.cpp:
2578         (WebCore::DatabaseTask::DatabaseTask):
2579         (WebCore::DatabaseOpenTask::DatabaseOpenTask):
2580         (WebCore::DatabaseOpenTask::doPerformTask):
2581         (WebCore::DatabaseOpenTask::debugTaskName):
2582         (WebCore::DatabaseCloseTask::DatabaseCloseTask):
2583         (WebCore::DatabaseCloseTask::doPerformTask):
2584         (WebCore::DatabaseCloseTask::debugTaskName):
2585         (WebCore::DatabaseTransactionTask::DatabaseTransactionTask):
2586         (WebCore::DatabaseTransactionTask::~DatabaseTransactionTask):
2587         (WebCore::DatabaseTransactionTask::doPerformTask):
2588         (WebCore::DatabaseTransactionTask::debugTaskName):
2589         (WebCore::DatabaseTableNamesTask::DatabaseTableNamesTask):
2590         (WebCore::DatabaseTableNamesTask::doPerformTask):
2591         (WebCore::DatabaseTableNamesTask::debugTaskName):
2592         (WebCore::DatabaseBackend::DatabaseOpenTask::DatabaseOpenTask): Deleted.
2593         (WebCore::DatabaseBackend::DatabaseOpenTask::doPerformTask): Deleted.
2594         (WebCore::DatabaseBackend::DatabaseOpenTask::debugTaskName): Deleted.
2595         (WebCore::DatabaseBackend::DatabaseCloseTask::DatabaseCloseTask): Deleted.
2596         (WebCore::DatabaseBackend::DatabaseCloseTask::doPerformTask): Deleted.
2597         (WebCore::DatabaseBackend::DatabaseCloseTask::debugTaskName): Deleted.
2598         (WebCore::DatabaseBackend::DatabaseTransactionTask::DatabaseTransactionTask): Deleted.
2599         (WebCore::DatabaseBackend::DatabaseTransactionTask::~DatabaseTransactionTask): Deleted.
2600         (WebCore::DatabaseBackend::DatabaseTransactionTask::doPerformTask): Deleted.
2601         (WebCore::DatabaseBackend::DatabaseTransactionTask::debugTaskName): Deleted.
2602         (WebCore::DatabaseBackend::DatabaseTableNamesTask::DatabaseTableNamesTask): Deleted.
2603         (WebCore::DatabaseBackend::DatabaseTableNamesTask::doPerformTask): Deleted.
2604         (WebCore::DatabaseBackend::DatabaseTableNamesTask::debugTaskName): Deleted.
2605         * Modules/webdatabase/DatabaseTask.h:
2606         (WebCore::DatabaseTask::database):
2607         * Modules/webdatabase/SQLStatementBackend.cpp:
2608         (WebCore::SQLStatementBackend::execute):
2609         * Modules/webdatabase/SQLStatementBackend.h:
2610         * Modules/webdatabase/SQLTransactionBackend.cpp:
2611         (WebCore::SQLTransactionBackend::executeSQL):
2612         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
2613         * WebCore.vcxproj/WebCore.vcxproj:
2614         * WebCore.vcxproj/WebCore.vcxproj.filters:
2615         * WebCore.xcodeproj/project.pbxproj:
2616
2617 2015-08-04  Filip Pizlo  <fpizlo@apple.com>
2618
2619         Rename Mutex to DeprecatedMutex
2620         https://bugs.webkit.org/show_bug.cgi?id=147675
2621
2622         Reviewed by Geoffrey Garen.
2623
2624         No new tests because this is just a renaming.
2625
2626         * Modules/webaudio/AsyncAudioDecoder.cpp:
2627         (WebCore::AsyncAudioDecoder::AsyncAudioDecoder):
2628         (WebCore::AsyncAudioDecoder::runLoop):
2629         * Modules/webaudio/AsyncAudioDecoder.h:
2630         * Modules/webaudio/AudioContext.h:
2631         * Modules/webaudio/MediaStreamAudioSource.cpp:
2632         (WebCore::MediaStreamAudioSource::addAudioConsumer):
2633         (WebCore::MediaStreamAudioSource::removeAudioConsumer):
2634         (WebCore::MediaStreamAudioSource::setAudioFormat):
2635         (WebCore::MediaStreamAudioSource::consumeAudio):
2636         * Modules/webaudio/MediaStreamAudioSource.h:
2637         * Modules/webdatabase/Database.cpp:
2638         (WebCore::Database::close):
2639         (WebCore::Database::runTransaction):
2640         (WebCore::Database::inProgressTransactionCompleted):
2641         (WebCore::Database::hasPendingTransaction):
2642         * Modules/webdatabase/DatabaseBackend.h:
2643         * Modules/webdatabase/DatabaseBackendBase.cpp:
2644         (WebCore::DatabaseBackendBase::performOpenAndVerify):
2645         (WebCore::DatabaseBackendBase::isInterrupted):
2646         * Modules/webdatabase/DatabaseContext.cpp:
2647         (WebCore::DatabaseContext::databaseThread):
2648         (WebCore::DatabaseContext::setPaused):
2649         * Modules/webdatabase/DatabaseContext.h:
2650         * Modules/webdatabase/DatabaseTask.h:
2651         * Modules/webdatabase/DatabaseThread.cpp:
2652         (WebCore::DatabaseThread::start):
2653         (WebCore::DatabaseThread::setPaused):
2654         (WebCore::DatabaseThread::handlePausedQueue):
2655         (WebCore::DatabaseThread::databaseThread):
2656         * Modules/webdatabase/DatabaseThread.h:
2657         * Modules/webdatabase/DatabaseTracker.cpp:
2658         (WebCore::DatabaseTracker::setDatabaseDirectoryPath):
2659         (WebCore::DatabaseTracker::canEstablishDatabase):
2660         (WebCore::DatabaseTracker::retryCanEstablishDatabase):
2661         (WebCore::DatabaseTracker::hasEntryForOrigin):
2662         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
2663         (WebCore::DatabaseTracker::closeAllDatabases):
2664         (WebCore::DatabaseTracker::interruptAllDatabasesForContext):
2665         (WebCore::DatabaseTracker::fullPathForDatabase):
2666         (WebCore::DatabaseTracker::origins):
2667         (WebCore::DatabaseTracker::databaseNamesForOrigin):
2668         (WebCore::DatabaseTracker::detailsForNameAndOrigin):
2669         (WebCore::DatabaseTracker::setDatabaseDetails):
2670         (WebCore::DatabaseTracker::doneCreatingDatabase):
2671         (WebCore::DatabaseTracker::addOpenDatabase):
2672         (WebCore::DatabaseTracker::removeOpenDatabase):
2673         (WebCore::DatabaseTracker::getOpenDatabases):
2674         (WebCore::DatabaseTracker::originLockFor):
2675         (WebCore::DatabaseTracker::quotaForOrigin):
2676         (WebCore::DatabaseTracker::setQuota):
2677         (WebCore::DatabaseTracker::deleteOrigin):
2678         (WebCore::DatabaseTracker::deleteDatabase):
2679         (WebCore::DatabaseTracker::deleteDatabaseFile):
2680         (WebCore::DatabaseTracker::removeDeletedOpenedDatabases):
2681         (WebCore::DatabaseTracker::deleteDatabaseFileIfEmpty):
2682         (WebCore::DatabaseTracker::openDatabaseMutex):
2683         (WebCore::DatabaseTracker::setDatabasesPaused):
2684         (WebCore::DatabaseTracker::setClient):
2685         (WebCore::notificationMutex):
2686         (WebCore::DatabaseTracker::scheduleNotifyDatabaseChanged):
2687         (WebCore::DatabaseTracker::notifyDatabasesChanged):
2688         * Modules/webdatabase/DatabaseTracker.h:
2689         * Modules/webdatabase/OriginLock.h:
2690         * Modules/webdatabase/SQLCallbackWrapper.h:
2691         (WebCore::SQLCallbackWrapper::clear):
2692         (WebCore::SQLCallbackWrapper::unwrap):
2693         (WebCore::SQLCallbackWrapper::hasCallback):
2694         * Modules/webdatabase/SQLTransactionBackend.cpp:
2695         (WebCore::SQLTransactionBackend::doCleanup):
2696         (WebCore::SQLTransactionBackend::enqueueStatementBackend):
2697         (WebCore::SQLTransactionBackend::getNextStatement):
2698         * Modules/webdatabase/SQLTransactionBackend.h:
2699         * bindings/js/WorkerScriptController.cpp:
2700         (WebCore::WorkerScriptController::scheduleExecutionTermination):
2701         (WebCore::WorkerScriptController::isExecutionTerminating):
2702         * bindings/js/WorkerScriptController.h:
2703         * dom/default/PlatformMessagePortChannel.cpp:
2704         (WebCore::MessagePortChannel::postMessageToRemote):
2705         (WebCore::MessagePortChannel::tryGetMessageFromRemote):
2706         (WebCore::MessagePortChannel::isConnectedTo):
2707         (WebCore::MessagePortChannel::hasPendingActivity):
2708         (WebCore::MessagePortChannel::locallyEntangledPort):
2709         (WebCore::PlatformMessagePortChannel::setRemotePort):
2710         (WebCore::PlatformMessagePortChannel::entangledChannel):
2711         (WebCore::PlatformMessagePortChannel::closeInternal):
2712         * dom/default/PlatformMessagePortChannel.h:
2713         * loader/icon/IconDatabase.cpp:
2714         (WebCore::IconDatabase::removeAllIcons):
2715         (WebCore::IconDatabase::synchronousIconForPageURL):
2716         (WebCore::IconDatabase::synchronousNativeIconForPageURL):
2717         (WebCore::IconDatabase::synchronousIconURLForPageURL):
2718         (WebCore::IconDatabase::retainIconForPageURL):
2719         (WebCore::IconDatabase::performRetainIconForPageURL):
2720         (WebCore::IconDatabase::releaseIconForPageURL):
2721         (WebCore::IconDatabase::performReleaseIconForPageURL):
2722         (WebCore::IconDatabase::setIconDataForIconURL):
2723         (WebCore::IconDatabase::setIconURLForPageURL):
2724         (WebCore::IconDatabase::synchronousLoadDecisionForIconURL):
2725         (WebCore::IconDatabase::synchronousIconDataKnownForIconURL):
2726         (WebCore::IconDatabase::pageURLMappingCount):
2727         (WebCore::IconDatabase::retainedPageURLCount):
2728         (WebCore::IconDatabase::iconRecordCount):
2729         (WebCore::IconDatabase::iconRecordCountWithData):
2730         (WebCore::IconDatabase::wakeSyncThread):
2731         (WebCore::IconDatabase::isOpenBesidesMainThreadCallbacks):
2732         (WebCore::IconDatabase::databasePath):
2733         (WebCore::IconDatabase::getOrCreatePageURLRecord):
2734         (WebCore::IconDatabase::iconDatabaseSyncThread):
2735         (WebCore::IconDatabase::performOpenInitialization):
2736         (WebCore::IconDatabase::performURLImport):
2737         (WebCore::IconDatabase::syncThreadMainLoop):
2738         (WebCore::IconDatabase::performPendingRetainAndReleaseOperations):
2739         (WebCore::IconDatabase::readFromDatabase):
2740         (WebCore::IconDatabase::writeToDatabase):
2741         (WebCore::IconDatabase::pruneUnretainedIcons):
2742         (WebCore::IconDatabase::cleanupSyncThread):
2743         * loader/icon/IconDatabase.h:
2744         * page/scrolling/ScrollingTree.cpp:
2745         (WebCore::ScrollingTree::shouldHandleWheelEventSynchronously):
2746         (WebCore::ScrollingTree::commitNewTreeState):
2747         (WebCore::ScrollingTree::setMainFramePinState):
2748         (WebCore::ScrollingTree::mainFrameScrollPosition):
2749         (WebCore::ScrollingTree::setMainFrameScrollPosition):
2750         (WebCore::ScrollingTree::isPointInNonFastScrollableRegion):
2751         (WebCore::ScrollingTree::isRubberBandInProgress):
2752         (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
2753         (WebCore::ScrollingTree::isScrollSnapInProgress):
2754         (WebCore::ScrollingTree::setMainFrameIsScrollSnapping):
2755         (WebCore::ScrollingTree::setCanRubberBandState):
2756         (WebCore::ScrollingTree::rubberBandsAtLeft):
2757         (WebCore::ScrollingTree::rubberBandsAtRight):
2758         (WebCore::ScrollingTree::rubberBandsAtBottom):
2759         (WebCore::ScrollingTree::rubberBandsAtTop):
2760         (WebCore::ScrollingTree::setScrollPinningBehavior):
2761         (WebCore::ScrollingTree::scrollPinningBehavior):
2762         (WebCore::ScrollingTree::willWheelEventStartSwipeGesture):
2763         (WebCore::ScrollingTree::latchedNode):
2764         (WebCore::ScrollingTree::setLatchedNode):
2765         (WebCore::ScrollingTree::clearLatchedNode):
2766         * page/scrolling/ScrollingTree.h:
2767         * platform/MemoryPressureHandler.h:
2768         * platform/audio/HRTFDatabaseLoader.cpp:
2769         (WebCore::HRTFDatabaseLoader::loadAsynchronously):
2770         (WebCore::HRTFDatabaseLoader::waitForLoaderThreadCompletion):
2771         * platform/audio/HRTFDatabaseLoader.h:
2772         * platform/cocoa/MemoryPressureHandlerCocoa.mm:
2773         (WebCore::MemoryPressureHandler::setReceivedMemoryPressure):
2774         (WebCore::MemoryPressureHandler::clearMemoryPressure):
2775         (WebCore::MemoryPressureHandler::shouldWaitForMemoryClearMessage):
2776         (WebCore::MemoryPressureHandler::respondToMemoryPressureIfNeeded):
2777         * platform/graphics/DisplayRefreshMonitor.cpp:
2778         (WebCore::DisplayRefreshMonitor::displayDidRefresh):
2779         * platform/graphics/DisplayRefreshMonitor.h:
2780         (WebCore::DisplayRefreshMonitor::setMonotonicAnimationStartTime):
2781         (WebCore::DisplayRefreshMonitor::mutex):
2782         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2783         (WebCore::MediaPlayerPrivateAVFoundation::setDelayCallbacks):
2784         (WebCore::MediaPlayerPrivateAVFoundation::clearMainThreadPendingFlag):
2785         (WebCore::MediaPlayerPrivateAVFoundation::dispatchNotification):
2786         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
2787         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2788         (WebCore::AVFWrapper::callbackContext):
2789         (WebCore::AVFWrapper::~AVFWrapper):
2790         (WebCore::AVFWrapper::mapLock):
2791         (WebCore::AVFWrapper::addToMap):
2792         (WebCore::AVFWrapper::removeFromMap):
2793         (WebCore::AVFWrapper::periodicTimeObserverCallback):
2794         (WebCore::AVFWrapper::processNotification):
2795         (WebCore::AVFWrapper::loadPlayableCompletionCallback):
2796         (WebCore::AVFWrapper::loadMetadataCompletionCallback):
2797         (WebCore::AVFWrapper::seekCompletedCallback):
2798         (WebCore::AVFWrapper::processCue):
2799         (WebCore::AVFWrapper::legibleOutputCallback):
2800         (WebCore::AVFWrapper::processShouldWaitForLoadingOfResource):
2801         (WebCore::AVFWrapper::resourceLoaderShouldWaitForLoadingOfRequestedResource):
2802         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp:
2803         (WebCore::InbandTextTrackPrivateGStreamer::handleSample):
2804         (WebCore::InbandTextTrackPrivateGStreamer::notifyTrackOfSample):
2805         * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h:
2806         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp:
2807         (WebCore::TrackPrivateBaseGStreamer::tagsChanged):
2808         (WebCore::TrackPrivateBaseGStreamer::notifyTrackOfTagsChanged):
2809         * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h:
2810         * platform/graphics/mac/DisplayRefreshMonitorMac.cpp:
2811         (WebCore::DisplayRefreshMonitorMac::requestRefreshCallback):
2812         (WebCore::DisplayRefreshMonitorMac::displayLinkFired):
2813         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2814         (WebCore::MediaPlayerPrivateMediaFoundation::addListener):
2815         (WebCore::MediaPlayerPrivateMediaFoundation::removeListener):
2816         (WebCore::MediaPlayerPrivateMediaFoundation::notifyDeleted):
2817         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::Invoke):
2818         (WebCore::MediaPlayerPrivateMediaFoundation::AsyncCallback::onMediaPlayerDeleted):
2819         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2820         * platform/ios/LegacyTileCache.h:
2821         * platform/ios/LegacyTileCache.mm:
2822         (WebCore::LegacyTileCache::setTilesOpaque):
2823         (WebCore::LegacyTileCache::doLayoutTiles):
2824         (WebCore::LegacyTileCache::setCurrentScale):
2825         (WebCore::LegacyTileCache::commitScaleChange):
2826         (WebCore::LegacyTileCache::layoutTilesNow):
2827         (WebCore::LegacyTileCache::layoutTilesNowForRect):
2828         (WebCore::LegacyTileCache::removeAllNonVisibleTiles):
2829         (WebCore::LegacyTileCache::removeAllTiles):
2830         (WebCore::LegacyTileCache::removeForegroundTiles):
2831         (WebCore::LegacyTileCache::setContentReplacementImage):
2832         (WebCore::LegacyTileCache::contentReplacementImage):
2833         (WebCore::LegacyTileCache::tileCreationTimerFired):
2834         (WebCore::LegacyTileCache::setNeedsDisplayInRect):
2835         (WebCore::LegacyTileCache::updateTilingMode):
2836         (WebCore::LegacyTileCache::setTilingMode):
2837         (WebCore::LegacyTileCache::doPendingRepaints):
2838         (WebCore::LegacyTileCache::flushSavedDisplayRects):
2839         (WebCore::LegacyTileCache::prepareToDraw):
2840         * platform/ios/LegacyTileLayerPool.h:
2841         * platform/ios/LegacyTileLayerPool.mm:
2842         (WebCore::LegacyTileLayerPool::addLayer):
2843         (WebCore::LegacyTileLayerPool::takeLayerWithSize):
2844         (WebCore::LegacyTileLayerPool::setCapacity):
2845         (WebCore::LegacyTileLayerPool::prune):
2846         (WebCore::LegacyTileLayerPool::drain):
2847         * platform/network/curl/CurlDownload.cpp:
2848         (WebCore::CurlDownloadManager::add):
2849         (WebCore::CurlDownloadManager::remove):
2850         (WebCore::CurlDownloadManager::getActiveDownloadCount):
2851         (WebCore::CurlDownloadManager::getPendingDownloadCount):
2852         (WebCore::CurlDownloadManager::stopThreadIfIdle):
2853         (WebCore::CurlDownloadManager::updateHandleList):
2854         (WebCore::CurlDownload::~CurlDownload):
2855         (WebCore::CurlDownload::init):
2856         (WebCore::CurlDownload::getTempPath):
2857         (WebCore::CurlDownload::getUrl):
2858         (WebCore::CurlDownload::getResponse):
2859         (WebCore::CurlDownload::closeFile):
2860         (WebCore::CurlDownload::didReceiveHeader):
2861         (WebCore::CurlDownload::didReceiveData):
2862         (WebCore::CurlDownload::didFail):
2863         * platform/network/curl/CurlDownload.h:
2864         * platform/network/curl/ResourceHandleManager.cpp:
2865         (WebCore::cookieJarPath):
2866         (WebCore::sharedResourceMutex):
2867         (WebCore::curl_lock_callback):
2868         (WebCore::curl_unlock_callback):
2869         * platform/network/ios/QuickLook.mm:
2870         (WebCore::QLDirectoryAttributes):
2871         (qlPreviewConverterDictionaryMutex):
2872         (WebCore::addQLPreviewConverterWithFileForURL):
2873         (WebCore::qlPreviewConverterUTIForURL):
2874         (WebCore::removeQLPreviewConverterForURL):
2875         (WebCore::safeQLURLForDocumentURLAndResourceURL):
2876         * platform/sql/SQLiteDatabase.cpp:
2877         (WebCore::SQLiteDatabase::close):
2878         (WebCore::SQLiteDatabase::interrupt):
2879         (WebCore::SQLiteDatabase::maximumSize):
2880         (WebCore::SQLiteDatabase::setMaximumSize):
2881         (WebCore::SQLiteDatabase::pageSize):
2882         (WebCore::SQLiteDatabase::freeSpaceSize):
2883         (WebCore::SQLiteDatabase::totalSize):
2884         (WebCore::SQLiteDatabase::runIncrementalVacuumCommand):
2885         (WebCore::SQLiteDatabase::setAuthorizer):
2886         * platform/sql/SQLiteDatabase.h:
2887         (WebCore::SQLiteDatabase::databaseMutex):
2888         * platform/sql/SQLiteStatement.cpp:
2889         (WebCore::SQLiteStatement::prepare):
2890         (WebCore::SQLiteStatement::step):
2891         * workers/WorkerThread.cpp:
2892         (WebCore::WorkerThread::start):
2893         (WebCore::WorkerThread::workerThread):
2894         (WebCore::WorkerThread::stop):
2895         * workers/WorkerThread.h:
2896
2897 2015-08-05  Matthew Daiter  <mdaiter@apple.com>
2898
2899         Adding in MediaPrivateMediaStreamEngine to default compile
2900         https://bugs.webkit.org/show_bug.cgi?id=146790
2901         <rdar://problem/21747289>
2902
2903         Reviewed by Eric Carlson.
2904
2905         * WebCore.xcodeproj/project.pbxproj:
2906         * platform/mediastream/MediaStreamPrivate.h:
2907         (WebCore::MediaStreamPrivate::MediaStreamPrivate):
2908
2909 2015-08-05  Matthew Daiter  <mdaiter@apple.com>
2910
2911         Remove m_synchronizer from MediaPlayerPrivateMediaStream
2912         https://bugs.webkit.org/show_bug.cgi?id=147637
2913
2914         Reviewed by Eric Carlson.
2915
2916         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
2917         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
2918         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::playInternal): Deleted.
2919
2920 2015-08-05  Wenson Hsieh  <wenson_hsieh@apple.com>
2921
2922         Build fix after 187961
2923
2924         * platform/mac/ThemeMac.mm:
2925         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
2926
2927 2015-08-05  Daniel Bates  <dabates@apple.com>
2928
2929         REGRESSION (r185111): Clicking phone numbers doesn't prompt to call sometimes
2930         https://bugs.webkit.org/show_bug.cgi?id=147678
2931         <rdar://problem/21827815>
2932
2933         Reviewed by Brady Eidson.
2934
2935         Fixes an issue where a non-user-initiated navigation of the main frame to a phone link (tel URL)
2936         may be ignored. The navigation is ignored if the page was reloaded as a result of a web content
2937         process crash, its lifetime exceeded the back-forward cache expiration interval, or a person
2938         quits and opens Safari again, among other scenarios.
2939
2940         * history/HistoryItem.cpp:
2941         (WebCore::HistoryItem::setShouldOpenExternalURLsPolicy): Added.
2942         (WebCore::HistoryItem::shouldOpenExternalURLsPolicy): Added.
2943         * history/HistoryItem.h:
2944         * loader/FrameLoader.cpp:
2945         (WebCore::FrameLoader::loadDifferentDocumentItem): Apply the "should open external URLs" policy
2946         from the history item, if applicable. Also, be more explicit when instantiating a NavigationAction
2947         so as to help make it straightforward to reduce the number of NavigationAction constructors we have
2948         in the future.
2949         * loader/HistoryController.cpp:
2950         (WebCore::HistoryController::saveDocumentState): Save the "should open external URLs" policy to
2951         the history item.
2952         (WebCore::HistoryController::restoreDocumentState): Apply the "should open external URLs" policy
2953         from the history item to the document loader.
2954         (WebCore::HistoryController::initializeItem): Update the "should open external URLs" policy of
2955         the history item to reflect the policy of the document loader associated with the current frame.
2956
2957 2015-08-04  Wenson Hsieh  <wenson_hsieh@apple.com>
2958
2959         Checkboxes and radio buttons should scale when zooming or pinching to zoom
2960         https://bugs.webkit.org/show_bug.cgi?id=147405
2961
2962         Reviewed by Dean Jackson.
2963
2964         Refactors paintButton and paintToggleButton to use a temporary buffer when rendering
2965         if the controls are zoomed. This affects checkboxes, radio buttons, and normal (push)
2966         buttons.
2967
2968         * platform/mac/ThemeMac.h:
2969         * platform/mac/ThemeMac.mm:
2970         (WebCore::paintToggleButton): Refactored to use drawCellOrFocusRingWithViewIntoContext.
2971         (WebCore::paintButton): Refactored to use drawCellOrFocusRingWithViewIntoContext.
2972         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext): Draws a given button cell
2973             and/or its focus ring into the given context, optionally using an offscreen buffer.
2974             This is a static function in ThemeMac so it can be accessed later on by
2975             RenderThemeMac when painting search fields that scale with zoom.
2976         (WebCore::ThemeMac::paint):
2977         (WebCore::buttonFocusRectOutlineWidth): Deleted. Made this value into a const float.
2978
2979 2015-08-04  Doug Russell  <d_russell@apple.com>
2980
2981         AX: tree item children returned from ranged getter are different from full array of children
2982         https://bugs.webkit.org/show_bug.cgi?id=147660
2983
2984         Reviewed by Chris Fleizach.
2985
2986         Add an isTreeItem() check in ranged element getter so that it matches the logic in 
2987         the getter for the full children array. This prevents returning a row as a child
2988         when only the rows contents should be returned. This prevents navigation issues on
2989         websites without aria outlines.
2990
2991         Test: accessibility/mac/aria-tree-item-children.html
2992
2993         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2994         (-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
2995
2996 2015-08-04  Anders Carlsson  <andersca@apple.com>
2997
2998         CTTE the database task code
2999         https://bugs.webkit.org/show_bug.cgi?id=147673
3000
3001         Reviewed by Andreas Kling.
3002
3003         * Modules/webdatabase/Database.cpp:
3004         (WebCore::Database::openAndVerifyVersion):
3005         (WebCore::Database::markAsDeletedAndClose):
3006         (WebCore::Database::tableNames):
3007         * Modules/webdatabase/DatabaseTask.cpp:
3008         (WebCore::DatabaseTask::DatabaseTask):
3009         (WebCore::DatabaseTask::performTask):
3010         (WebCore::DatabaseBackend::DatabaseOpenTask::DatabaseOpenTask):
3011         (WebCore::DatabaseBackend::DatabaseOpenTask::doPerformTask):
3012         (WebCore::DatabaseBackend::DatabaseCloseTask::DatabaseCloseTask):
3013         (WebCore::DatabaseBackend::DatabaseCloseTask::doPerformTask):
3014         (WebCore::DatabaseBackend::DatabaseTransactionTask::DatabaseTransactionTask):
3015         (WebCore::DatabaseBackend::DatabaseTableNamesTask::DatabaseTableNamesTask):
3016         (WebCore::DatabaseBackend::DatabaseTableNamesTask::doPerformTask):
3017         * Modules/webdatabase/DatabaseTask.h:
3018         (WebCore::DatabaseTask::database):
3019         * Modules/webdatabase/DatabaseThread.cpp:
3020         (WebCore::SameDatabasePredicate::operator()):
3021
3022 2015-08-04  Brent Fulgham  <bfulgham@apple.com>
3023
3024         REGRESSION (r173784): [Mac] Correct latching error for non-scrollable iframe nested inside scrollable div.
3025         https://bugs.webkit.org/show_bug.cgi?id=147668
3026         <rdar://problem/21870332>
3027
3028         Reviewed by Simon Fraser.
3029
3030         Test: platform/mac/fast/scrolling/scroll-div-with-nested-nonscrollable-iframe.html
3031
3032         When we are wrapping up processing of the wheel event for a given frame, if the current latching context
3033         does NOT apply to the current frame (e.g., because it's latched to an enclosing frame) we should not pass
3034         wheel events directly to the latched elements scrollable container. Instead, we should just give the current
3035         frame an opportunity to perform any custom wheel event handling and return, so that the enclosing (latched)
3036         frame can do the rest of its event handling.
3037         
3038         If we don't do this, we incorrectly ask the enclosing frame to process the event, then return claiming that
3039         we handled the event, preventing the enclosing frame from doing its part of the processing.
3040
3041         * page/mac/EventHandlerMac.mm:
3042         (WebCore::EventHandler::platformCompleteWheelEvent):
3043
3044 2015-08-04  Alex Christensen  <achristensen@webkit.org>
3045
3046         Soft link libGLESv2 and libEGL on Windows again
3047         https://bugs.webkit.org/show_bug.cgi?id=147671
3048
3049         Reviewed by Dean Jackson.
3050
3051         * platform/graphics/PlatformDisplay.cpp:
3052         (WebCore::PlatformDisplay::initializeEGLDisplay):
3053         Fail gracefully if libEGL is not found.
3054
3055 2015-08-04  Anders Carlsson  <andersca@apple.com>
3056
3057         Remove another unused database function
3058         https://bugs.webkit.org/show_bug.cgi?id=147670
3059
3060         Reviewed by Daniel Bates.
3061
3062         This was used back when we had WebSQL support in workers, we can safely remove all these functions now.
3063
3064         * Modules/webdatabase/AbstractDatabaseServer.h:
3065         * Modules/webdatabase/DatabaseManager.cpp:
3066         (WebCore::DatabaseManager::interruptAllDatabasesForContext): Deleted.
3067         * Modules/webdatabase/DatabaseManager.h:
3068         * Modules/webdatabase/DatabaseServer.cpp:
3069         (WebCore::DatabaseServer::interruptAllDatabasesForContext): Deleted.
3070         * Modules/webdatabase/DatabaseServer.h:
3071         * Modules/webdatabase/DatabaseTracker.cpp:
3072         (WebCore::DatabaseTracker::interruptAllDatabasesForContext): Deleted.
3073         * Modules/webdatabase/DatabaseTracker.h:
3074
3075 2015-08-04  Anders Carlsson  <andersca@apple.com>
3076
3077         Remove database thread pause code
3078         https://bugs.webkit.org/show_bug.cgi?id=147669
3079
3080         Reviewed by Daniel Bates.
3081
3082         We now grab power assertions while running SQLite transactions, 
3083         and this code isn't used at all with modern WebKit so let's just get rid of it.
3084
3085         * Modules/webdatabase/DatabaseContext.cpp:
3086         (WebCore::DatabaseContext::DatabaseContext): Deleted.
3087         (WebCore::DatabaseContext::databaseThread): Deleted.
3088         (WebCore::DatabaseContext::setPaused): Deleted.
3089         * Modules/webdatabase/DatabaseContext.h:
3090         * Modules/webdatabase/DatabaseTask.cpp:
3091         (WebCore::Database::DatabaseTransactionTask::shouldPerformWhilePaused): Deleted.
3092         * Modules/webdatabase/DatabaseTask.h:
3093         * Modules/webdatabase/DatabaseThread.cpp:
3094         (WebCore::DatabaseThread::DatabaseThread): Deleted.
3095         (WebCore::DatabaseThread::requestTermination): Deleted.
3096         (WebCore::DatabaseUnpauseTask::DatabaseUnpauseTask): Deleted.
3097         (WebCore::DatabaseUnpauseTask::shouldPerformWhilePaused): Deleted.
3098         (WebCore::DatabaseUnpauseTask::doPerformTask): Deleted.
3099         (WebCore::DatabaseUnpauseTask::debugTaskName): Deleted.
3100         (WebCore::DatabaseThread::setPaused): Deleted.
3101         (WebCore::DatabaseThread::handlePausedQueue): Deleted.
3102         (WebCore::DatabaseThread::databaseThread): Deleted.
3103         * Modules/webdatabase/DatabaseThread.h:
3104         * Modules/webdatabase/DatabaseTracker.cpp:
3105         (WebCore::DatabaseTracker::setDatabasesPaused): Deleted.
3106         * Modules/webdatabase/DatabaseTracker.h:
3107
3108 2015-08-04  Chris Dumez  <cdumez@apple.com>
3109
3110         Subframes with no current HistoryItem should not prevent page-caching
3111         https://bugs.webkit.org/show_bug.cgi?id=147649
3112         <rdar://problem/21614832>
3113
3114         Reviewed by Andreas Kling.
3115
3116         Subframes with no current HistoryItem should not prevent page-caching.
3117         We need one for the main frame as this is the key in the PageCache.
3118         However, there is no reason to require one for subframes.
3119
3120         This is a common reason for page-caching failures nowadays.
3121
3122         Frames do no have a current HistoryItem until something has been loaded in them.
3123
3124         Test: http/tests/navigation/page-cache-iframe-no-current-historyItem.html
3125
3126         * history/PageCache.cpp:
3127         (WebCore::logCanCacheFrameDecision):
3128         (WebCore::PageCache::canCachePageContainingThisFrame):
3129
3130 2015-08-04  Brent Fulgham  <bfulgham@apple.com>
3131
3132         [Win] Build fix after r187908
3133
3134         * platform/win/WindowsTouch.h: If WINVER is set properly, we
3135         don't need these definitions.
3136
3137 2015-08-04  Anders Carlsson  <andersca@apple.com>
3138
3139         Remove an unused Database function
3140         https://bugs.webkit.org/show_bug.cgi?id=147661
3141
3142         Reviewed by Simon Fraser.
3143
3144         * Modules/webdatabase/Database.cpp:
3145         (WebCore::Database::closeImmediately): Deleted.
3146         * Modules/webdatabase/Database.h:
3147
3148 2015-08-04  Brady Eidson  <beidson@apple.com>
3149
3150         Crash when following a Google search link to Twitter with Limit Adult Content enabled.
3151         <rdar://problem/22123707> and https://bugs.webkit.org/show_bug.cgi?id=147651
3152
3153         Reviewed by Sam Weinig.
3154
3155         No new tests (Doesn't occur in a tested config).
3156
3157         For now, we'll skip the application cache for main resource loads if parental controls are enabled.
3158
3159         * loader/DocumentLoader.cpp:
3160         (WebCore::DocumentLoader::willSendRequest):
3161         (WebCore::DocumentLoader::startLoadingMainResource):
3162
3163 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
3164
3165         Added buffer to AVMediaCaptureSource
3166         https://bugs.webkit.org/show_bug.cgi?id=147454
3167         <rdar://problem/22079502>
3168
3169         Reviewed by Jer Noble.
3170
3171         * platform/mediastream/mac/AVMediaCaptureSource.h:
3172         (WebCore::AVMediaCaptureSource::buffer):
3173         (WebCore::AVMediaCaptureSource::setBuffer):
3174         * platform/mediastream/mac/AVVideoCaptureSource.mm:
3175         (WebCore::AVVideoCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
3176
3177 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
3178
3179         Needless assignment of usingDot
3180         https://bugs.webkit.org/show_bug.cgi?id=147514
3181
3182         Reviewed by Eric Carlson.
3183
3184         * platform/graphics/mac/GraphicsContextMac.mm:
3185         (WebCore::GraphicsContext::drawLineForDocumentMarker): Deleted.
3186
3187 2015-08-04  Chris Dumez  <cdumez@apple.com>
3188
3189         shouldParseTelephoneNumbersInNode() does not need to check for Comment nodes
3190         https://bugs.webkit.org/show_bug.cgi?id=147630
3191
3192         Reviewed by Sam Weinig.
3193
3194         shouldParseTelephoneNumbersInNode() does not need to check for Comment
3195         nodes. We already know the input is a ContainerNode and a Comment is
3196         NOT a ContainerNode. Also, we were already doing a isElementNode()
3197         check before calling disallowTelephoneNumberParsing().
3198
3199         I also updated the function to use a for loop for clarity and dropped
3200         the isElementNode() check as calling hasTagName() / isLink() on a
3201         ContainerNode is as fast all calling it on an Element nowadays.
3202
3203         * html/parser/HTMLTreeBuilder.cpp:
3204         (WebCore::disallowTelephoneNumberParsing):
3205         (WebCore::shouldParseTelephoneNumbersInNode):
3206
3207 2015-08-04  Eric Carlson  <eric.carlson@apple.com>
3208
3209         [Mac] Do not require a video track for AirPlay
3210         https://bugs.webkit.org/show_bug.cgi?id=147647
3211
3212         Reviewed by Jer Noble.
3213
3214         * Modules/mediacontrols/mediaControlsApple.js:
3215         (Controller.prototype.handleReadyStateChange): Call updateWirelessTargetAvailable().
3216         (Controller.prototype.updateHasVideo): Don't call updateWirelessTargetAvailable().
3217         (Controller.prototype.updateWirelessTargetAvailable): Don't require video.
3218
3219         * html/HTMLMediaElement.cpp:
3220         (WebCore::HTMLMediaElement::setReadyState): Call updateMediaState when we reach HAVE_METADATA.
3221         (WebCore::HTMLMediaElement::mediaState): Don't require video, only that the file can play.
3222
3223         * html/MediaElementSession.cpp:
3224         (WebCore::MediaElementSession::showPlaybackTargetPicker): Check readyState instead of hasVideo.
3225
3226 2015-08-04  Anders Carlsson  <andersca@apple.com>
3227
3228         Get rid of ReasonForCallingAllowPlugins since it's not used anywhere
3229         https://bugs.webkit.org/show_bug.cgi?id=147648
3230
3231         Reviewed by Andreas Kling.
3232
3233         * dom/DOMImplementation.cpp:
3234         (WebCore::DOMImplementation::createDocument):
3235         * html/HTMLElement.cpp:
3236         (WebCore::HTMLElement::rendererIsNeeded):
3237         * html/parser/HTMLParserOptions.cpp:
3238         (WebCore::HTMLParserOptions::HTMLParserOptions):
3239         * loader/FrameLoaderTypes.h:
3240         * loader/SubframeLoader.cpp:
3241         (WebCore::SubframeLoader::requestPlugin):
3242         (WebCore::SubframeLoader::createJavaAppletWidget):
3243         (WebCore::SubframeLoader::allowPlugins):
3244         * loader/SubframeLoader.h:
3245         * plugins/DOMMimeType.cpp:
3246         (WebCore::DOMMimeType::enabledPlugin):
3247
3248 2015-08-04  Alex Christensen  <achristensen@webkit.org>
3249
3250         Fix debug CMake build on Windows after r187818.
3251
3252         * PlatformWin.cmake:
3253         Debug *AllInOne.cpp object files in WebCore require /bigobj to compile successfully.
3254
3255 2015-08-04  Alexey Proskuryakov  <ap@apple.com>
3256
3257         Implement NPAPI redirect handling
3258         https://bugs.webkit.org/show_bug.cgi?id=138675
3259         rdar://problem/15779101
3260
3261         Patch by Jeffrey Pfau, updated and tweaked by me.
3262
3263         Reviewed by Anders Carlsson.
3264
3265         Test: http/tests/plugins/get-url-redirect-notify.html
3266
3267         * loader/NetscapePlugInStreamLoader.cpp:
3268         (WebCore::NetscapePlugInStreamLoader::init):
3269         (WebCore::NetscapePlugInStreamLoader::willSendRequest):
3270         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse):
3271         * loader/NetscapePlugInStreamLoader.h:
3272         * loader/ResourceLoader.cpp:
3273         (WebCore::ResourceLoader::init):
3274         (WebCore::ResourceLoader::isSubresourceLoader):
3275         (WebCore::ResourceLoader::willSendRequestInternal):
3276         (WebCore::ResourceLoader::willSendRequest):
3277         (WebCore::ResourceLoader::didSendData):
3278         * loader/ResourceLoader.h:
3279         * loader/SubresourceLoader.cpp:
3280         (WebCore::SubresourceLoader::isSubresourceLoader):
3281         (WebCore::SubresourceLoader::willSendRequestInternal):
3282         (WebCore::SubresourceLoader::willSendRequest): Deleted.
3283         * loader/SubresourceLoader.h:
3284         * plugins/npapi.h:
3285         * plugins/npfunctions.h:
3286
3287 2015-08-04  Zalan Bujtas  <zalan@apple.com>
3288
3289         RenderTheme::paint() should take RenderBox instead of RenderObject.
3290         https://bugs.webkit.org/show_bug.cgi?id=147638
3291
3292         Reviewed by Andreas Kling.
3293
3294         No change in functionality.
3295
3296         * rendering/RenderTheme.cpp:
3297         (WebCore::RenderTheme::paint):
3298         (WebCore::RenderTheme::updateControlStatesForRenderer): ->RenderBox too.
3299         (WebCore::RenderTheme::isActive): Remove redundant code.
3300         * rendering/RenderTheme.h:
3301
3302 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
3303
3304         Render to GraphicsContext MediaPlayerPrivateMediaStreamAVFObjC
3305         https://bugs.webkit.org/show_bug.cgi?id=147643
3306
3307         Reviewed by Eric Carlson.
3308
3309         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3310         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::paint):
3311
3312 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
3313
3314         Added ability to create images from buffers for MediaStream paint methods
3315         https://bugs.webkit.org/show_bug.cgi?id=147642
3316
3317         Reviewed by Eric Carlson.
3318
3319         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
3320         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
3321         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::createImageFromSampleBuffer):
3322
3323 2015-08-04  Matthew Daiter  <mdaiter@apple.com>
3324
3325         Add image variable rendered by paint methods for MediaStream
3326         https://bugs.webkit.org/show_bug.cgi?id=147645
3327
3328         Reviewed by Eric Carlson.
3329
3330         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.h:
3331
3332 2015-08-04  Zalan Bujtas  <zalan@apple.com>
3333
3334         RenderTheme::baselinePosition() should take RenderBox instead of RenderObject.
3335         https://bugs.webkit.org/show_bug.cgi?id=147632
3336
3337         Reviewed by Andreas Kling.
3338
3339         It eliminates some redundant type checking and casting.
3340
3341         No change in functionality.
3342
3343         * platform/efl/RenderThemeEfl.cpp:
3344         (WebCore::RenderThemeEfl::baselinePosition):
3345         * platform/efl/RenderThemeEfl.h:
3346         * rendering/RenderTheme.cpp:
3347         (WebCore::RenderTheme::baselinePosition):
3348         * rendering/RenderTheme.h:
3349         * rendering/RenderThemeGtk.cpp:
3350         (WebCore::RenderThemeGtk::baselinePosition):
3351         * rendering/RenderThemeGtk.h:
3352         * rendering/RenderThemeIOS.h:
3353         * rendering/RenderThemeIOS.mm:
3354         (WebCore::RenderThemeIOS::baselinePosition):
3355         * rendering/RenderThemeSafari.cpp:
3356         (WebCore::RenderThemeSafari::baselinePosition):
3357         * rendering/RenderThemeSafari.h:
3358
3359 2015-08-04  Alex Christensen  <achristensen@webkit.org>
3360
3361         Enable WebGL on Windows CMake build.
3362         https://bugs.webkit.org/show_bug.cgi?id=143311
3363
3364         Reviewed by Csaba Osztrogonác.
3365
3366         * CMakeLists.txt:
3367         ANGLE is built quite differently on Windows, so I'm not going to touch the existing CMake build system for
3368         ANGLE on Linux, although I think it should eventually be unified more by using ANGLE's OpenGL renderer.
3369         * PlatformWin.cmake:
3370         Added some needed source files and include directories.
3371
3372 2015-08-04  Jeremy Jones  <jeremyj@apple.com>
3373
3374         Implement isPictureInPictureInterrupted.
3375         https://bugs.webkit.org/show_bug.cgi?id=147620
3376
3377         Reviewed by Eric Carlson.
3378
3379         Implement isPictureInPictureInterrupted so setting the property to true pauses playback.
3380         This allows PiP to pause when the device is locked while the app is suspended.
3381
3382         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
3383         (-[WebAVPlayerController init]):
3384         (-[WebAVPlayerController isPictureInPictureInterrupted]):
3385         (-[WebAVPlayerController setPictureInPictureInterrupted:]):
3386
3387 2015-08-03  Csaba Osztrogonác  <ossy@webkit.org>
3388
3389         Introduce COMPILER(GCC_OR_CLANG) guard and make COMPILER(GCC) true only for GCC
3390         https://bugs.webkit.org/show_bug.cgi?id=146833
3391
3392         Reviewed by Alexey Proskuryakov.
3393
3394         * platform/graphics/cpu/arm/filters/FELightingNEON.cpp:
3395         * platform/graphics/cpu/arm/filters/FELightingNEON.h:
3396         * platform/graphics/filters/FELighting.cpp:
3397         (WebCore::FELighting::platformApply):
3398         * platform/network/efl/NetworkStateNotifierEfl.cpp:
3399         (WebCore::NetworkStateNotifier::readSocketCallback):
3400
3401 2015-08-03  Csaba Osztrogonác  <ossy@webkit.org>
3402
3403         [CMake] Add an option to build AllInOne files
3404         https://bugs.webkit.org/show_bug.cgi?id=102647
3405
3406         Reviewed by Alex Christensen.
3407
3408         * CMakeLists.txt:
3409
3410 2015-08-03  Csaba Osztrogonác  <ossy@webkit.org>
3411
3412         Fix the all-in-one build on Linux after r187659
3413         https://bugs.webkit.org/show_bug.cgi?id=147557
3414
3415         Reviewed by Alex Christensen.
3416
3417         Removed MediaFeatureNames.cpp from the all-in-one build, because it caused build failures on Linux.
3418         Additionally removed css/MediaAllInOne.cpp since it is unused.
3419
3420         * WebCore.vcxproj/WebCore.vcxproj:
3421         * WebCore.vcxproj/WebCore.vcxproj.filters:
3422         * css/CSSAllInOne.cpp:
3423         * css/MediaAllInOne.cpp: Removed.
3424
3425 2015-08-03  Benjamin Poulain  <bpoulain@apple.com>
3426
3427         Returns inconsistent types for el.style.property and el.style.getPropertyValue('color')
3428         https://bugs.webkit.org/show_bug.cgi?id=147549
3429
3430         Reviewed by Andreas Kling.
3431
3432         Kudos to Greg Whitworth for finding this bug.
3433
3434         Test: fast/css/getPropertyValue-returns-empty-on-missing-property.html
3435
3436         * css/CSSStyleDeclaration.idl:
3437         Our definition was wrong.
3438         Current spec: http://www.w3.org/TR/cssom/#dom-cssstyledeclaration-getpropertyvalue
3439         Current draft: https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-getpropertyvalue
3440         Gecko and EdgeHTML follow the spec.
3441
3442 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
3443
3444         Fix crashing Mavericks test
3445
3446         Unreviewed.
3447
3448         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3449         (WebCore::FontPlatformData::registeredFont):
3450
3451 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
3452
3453         Unreviewed post-review feedback on r187797
3454
3455         The correct terminology is "registered" instead of "activated."
3456
3457         No new tests because there is no behavior change.
3458
3459         * platform/graphics/FontPlatformData.h:
3460         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3461         (WebCore::FontPlatformData::registeredFont):
3462         (WebCore::FontPlatformData::activatedFont): Deleted.
3463
3464 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
3465
3466         Clean up casts between NSFont*s and CTFontRefs
3467         https://bugs.webkit.org/show_bug.cgi?id=147618
3468
3469         Reviewed by Mitz Pettel.
3470
3471         For toll free bridged types, it makes more sense to do a C-style cast, than jump
3472         through hoops for older compilers.
3473
3474         No new tests because there is no behavior change.
3475
3476         * platform/graphics/FontPlatformData.h:
3477         (WebCore::FontPlatformData::nsFont):
3478         (WebCore::FontPlatformData::hash):
3479
3480 2015-08-03  Commit Queue  <commit-queue@webkit.org>
3481
3482         Unreviewed, rolling out r187707, r187709, r187724, and
3483         r187728.
3484         https://bugs.webkit.org/show_bug.cgi?id=147617
3485
3486         fast/text/international/arabic-justify.html is flakey
3487         (Requested by litherum on #webkit).
3488
3489         Reverted changesets:
3490
3491         "[OS X] Migrate to CTFontCreateForCharactersWithLanguage from
3492         [NSFont findFontLike:forString:withRange:inLanguage]"
3493         https://bugs.webkit.org/show_bug.cgi?id=147483
3494         http://trac.webkit.org/changeset/187707
3495
3496         "Fix the build"
3497         http://trac.webkit.org/changeset/187709
3498
3499         "Expand CharacterFallbackMapKey to a struct"
3500         https://bugs.webkit.org/show_bug.cgi?id=147530
3501         http://trac.webkit.org/changeset/187724
3502
3503         "CharacterFallbackMapKey should be locale-specific"
3504         https://bugs.webkit.org/show_bug.cgi?id=147532
3505         http://trac.webkit.org/changeset/187728
3506
3507 2015-08-03  Myles C. Maxfield  <mmaxfield@apple.com>
3508
3509         REGRESSION(r184899): Crash when focusing an input element styled with a web font
3510         https://bugs.webkit.org/show_bug.cgi?id=147616
3511         <rdar://problem/21838271>
3512
3513         Reviewed by Dean Jackson.
3514
3515         NSFontManager can't handle web fonts. We used to pass null to NSFontManager in this case,
3516         but r184899 changed that.
3517
3518         Test: fast/text/input-webfont-focus.html
3519
3520         * platform/graphics/FontPlatformData.h:
3521         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
3522         (WebCore::FontPlatformData::activatedFont):
3523
3524 2015-08-03  Brent Fulgham  <bfulgham@apple.com>
3525
3526         [Win] Unreviewed build fix.
3527
3528         It turns out that the IFEQ command (at least on Cygwin) does not
3529         understand Wildcards for OS types. Consequently, we should not use
3530         Windows* in makefiles. Luckily, we only need Windows_NT anymore.
3531
3532         * DerivedSources.make: Change Windows* -> Windows_NT to correct build.
3533
3534 2015-08-03  Tim Horton  <timothy_horton@apple.com>
3535
3536         REGRESSION (r186916): TextIndicators for multiline link previews are unreadable/offset/blank
3537         https://bugs.webkit.org/show_bug.cgi?id=147615
3538         <rdar://problem/22116575>
3539
3540         Reviewed by Dean Jackson.
3541
3542         * page/mac/TextIndicatorWindow.mm:
3543         (-[WebTextIndicatorView initWithFrame:textIndicator:margin:offset:]):
3544         No need to offset by the difference between the text bounding rect and the selection bounding rect,
3545         because the snapshot is now (after r186916) taken of exactly the text bounding rect.
3546
3547 2015-08-03  Matt Rajca  <mrajca@apple.com>
3548
3549         Media Session: let UI clients query whether a media element is paused
3550         https://bugs.webkit.org/show_bug.cgi?id=147588
3551
3552         Reviewed by Tim Horton.
3553
3554         * page/Page.cpp:
3555         (WebCore::Page::isMediaElementPaused): Determine if the media element with the given ID is paused.
3556         * page/Page.h:
3557
3558 2015-08-03  Eric Carlson  <eric.carlson@apple.com>
3559
3560         [Mac] Always require user gesture to begin playing to AppleTV automatically
3561         https://bugs.webkit.org/show_bug.cgi?id=147591
3562
3563         Reviewed by Jer Noble.
3564
3565         * html/HTMLMediaElement.cpp:
3566         (WebCore::HTMLMediaElement::mediaState): Don't set the ExternalDeviceAutoPlayCandidate 
3567           flag until the user has explicitly triggered playback.
3568
3569 2015-08-03  Dean Jackson  <dino@apple.com>
3570
3571         Inline video controls overlap each other while playing video in slideover mode
3572         https://bugs.webkit.org/show_bug.cgi?id=147535
3573         <rdar://problem/22026864>
3574
3575         Reviewed by Eric Carlson.
3576
3577         Now that the resizing code is in the shared controller, we need to
3578         make sure to hide the timeline scrubber in iOS when the controls
3579         get too small. This involved adding the dropped class to the timeline,
3580         and rules for hiding to the CSS.
3581
3582         Meanwhile, when the page scale factor is less than one, we use the CSS zoom property
3583         and don't need to factor in the page scale factor when calculating
3584         the size.
3585
3586         * Modules/mediacontrols/mediaControlsApple.js:
3587         (Controller.prototype.updateLayoutForDisplayedWidth): Don't use pageScaleFactor.
3588         * Modules/mediacontrols/mediaControlsiOS.css:
3589         (audio::-webkit-media-controls-panel .dropped): Add display none for this rule.
3590
3591 2015-08-03  Anders Carlsson  <andersca@apple.com>
3592
3593         Safari is failing to remove SQLite Databases via Remove All Website Data
3594         https://bugs.webkit.org/show_bug.cgi?id=147584
3595         rdar://problem/22095006
3596
3597         Reviewed by Brady Eidson.
3598
3599         If we end up deleting every single database for an origin, make sure to also delete the origin.
3600
3601         * Modules/webdatabase/DatabaseTracker.cpp:
3602         (WebCore::DatabaseTracker::deleteDatabasesModifiedSince):
3603
3604 2015-08-03  Zalan Bujtas  <zalan@apple.com>
3605
3606         Move "starting from root" frame flattening logging to the correct place.
3607         https://bugs.webkit.org/show_bug.cgi?id=147571
3608
3609         Reviewed by Simon Fraser.
3610
3611         * page/FrameView.cpp:
3612         (WebCore::FrameView::startLayoutAtMainFrameViewIfNeeded):
3613         (WebCore::FrameView::layout): Deleted.
3614
3615 2015-08-03  Commit Queue  <commit-queue@webkit.org>
3616
3617         Unreviewed, rolling out r187729.
3618         https://bugs.webkit.org/show_bug.cgi?id=147575
3619
3620         10% performance hit (Requested by litherum on #webkit).
3621
3622         Reverted changeset:
3623
3624         "[OS X] Font fallback is not language-sensitive"
3625         https://bugs.webkit.org/show_bug.cgi?id=147390
3626         http://trac.webkit.org/changeset/187729
3627
3628 2015-08-03  Zalan Bujtas  <zalan@apple.com>
3629
3630         ChildWidgetState::ChildWidgetIs* naming is redundant.
3631         https://bugs.webkit.org/show_bug.cgi?id=147565
3632
3633         Reviewed by Simon Fraser.
3634
3635         Since strongly typed enum requires to write out 'ChildWidgetState::ChildWidgetIsDestroyed',
3636         the enumerator list names can be shortened.
3637
3638         No change in behaviour.
3639
3640         * rendering/RenderFrameBase.cpp:
3641         (WebCore::RenderFrameBase::peformLayoutWithFlattening):
3642         * rendering/RenderWidget.cpp:
3643         (WebCore::RenderWidget::updateWidgetPosition):
3644         * rendering/RenderWidget.h:
3645
3646 2015-08-03  Zalan Bujtas  <zalan@apple.com>
3647
3648         Pass ControlStates& to RenderTheme methods instead of ControlStates*
3649         https://bugs.webkit.org/show_bug.cgi?id=147521
3650
3651         Reviewed by Andreas Kling.
3652
3653         No change in functionality.
3654
3655         * platform/Theme.h:
3656         (WebCore::Theme::selectionColor):
3657         (WebCore::Theme::paint):
3658         (WebCore::Theme::inflateControlPaintRect):
3659         * platform/mac/ThemeMac.h:
3660         * platform/mac/ThemeMac.mm:
3661         (WebCore::updateStates):
3662         (WebCore::convertControlStatesToThemeDrawState):
3663         (WebCore::configureToggleButton):
3664         (WebCore::sharedRadioCell):
3665         (WebCore::sharedCheckboxCell):
3666         (WebCore::paintToggleButton):
3667         (WebCore::setUpButtonCell):
3668         (WebCore::button):
3669         (WebCore::paintButton):
3670         (WebCore::paintStepper):
3671         (WebCore::ThemeMac::ensuredView):
3672         (WebCore::ThemeMac::inflateControlPaintRect):
3673         (WebCore::ThemeMac::paint):
3674         * rendering/RenderBox.cpp:
3675         (WebCore::RenderBox::paintBoxDecorations):
3676         * rendering/RenderTheme.cpp:
3677         (WebCore::RenderTheme::paint):
3678         (WebCore::RenderTheme::adjustRepaintRect):
3679         (WebCore::RenderTheme::updateControlStatesForRenderer):
3680         * rendering/RenderTheme.h:
3681         * rendering/RenderThemeMac.mm:
3682         (WebCore::RenderThemeMac::documentViewFor):
3683
3684 2015-08-03  Brady Eidson  <beidson@apple.com>
3685
3686         Crash when signing into twitter calling WebCore::DocumentLoader::responseReceived(WebCore::CachedResource*, WebCore::ResourceResponse const&).
3687         <rdar://problem/22098457> and https://bugs.webkit.org/show_bug.cgi?id=147560
3688
3689         Reviewed by Alexey Proskuryakov.
3690
3691         * loader/DocumentLoader.cpp:
3692         (WebCore::DocumentLoader::willSendRequest): Only grab identifierForLoadWithoutResourceLoader() if there's no ResourceLoader.
3693
3694 2015-08-03  Zalan Bujtas  <zalan@apple.com>
3695
3696         themePainted in RenderBox::paintBoxDecorations() is confusing.
3697         https://bugs.webkit.org/show_bug.cgi?id=147492
3698
3699         Reviewed by Andreas Kling.
3700
3701         What themePainted is supposed to indicate is whether the theme requires additional border and background painting.
3702         Rename it to borderOrBackgroundPaintingIsNeeded.
3703
3704         No change in behaviour.
3705
3706         * rendering/RenderBox.cpp:
3707         (WebCore::RenderBox::paintBoxDecorations):
3708
3709 2015-08-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3710
3711         [EFL] http/tests/media/media-stream/disconnected-frame-already.html is crashing after r185903
3712         https://bugs.webkit.org/show_bug.cgi?id=146834
3713
3714         Reviewed by Eric Carlson.
3715
3716         r185903 went to far in removing some tests, in particular whether the current process is related to a frame.
3717         Readded that check.
3718         Refactored the code to remove the need for NavigatorUserMedia class.
3719
3720         Covered by existing tests.
3721
3722         * CMakeLists.txt: Removed NavigatorUserMedia.cpp.
3723         * Modules/mediastream/NavigatorUserMedia.cpp: Removed.
3724         * Modules/mediastream/NavigatorUserMedia.h: Removed.
3725         * WebCore.xcodeproj/project.pbxproj: Ditto.
3726         * bindings/js/JSNavigatorCustom.cpp:
3727         (WebCore::JSNavigator::webkitGetUserMedia): Inlined NavigatorUserMeia::webkitGetUserMedia.
3728
3729 2015-08-03  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3730
3731         JSXMLHttpRequest::visitAdditionalChildren does not need to explicitly mark m_response
3732         https://bugs.webkit.org/show_bug.cgi?id=147488
3733
3734         Reviewed by Andreas Kling.
3735
3736         Covered by existing tests.
3737
3738         * bindings/js/JSXMLHttpRequestCustom.cpp:
3739         (WebCore::JSXMLHttpRequest::visitAdditionalChildren): Removed m_response marking.
3740
3741 2015-08-01  Chris Fleizach  <cfleizach@apple.com>
3742
3743         AX: On some complex sites, iOS instantly crashes once VoiceOver is turned on
3744         https://bugs.webkit.org/show_bug.cgi?id=147529
3745
3746         Reviewed by Dan Bernstein.
3747
3748         Sometimes after focusing on a node, it seems like the entire document is destroyed.
3749         Accessibility the axObjectCache returns nullptr and we crash.
3750
3751         Despite my best efforts, I couldn't make a layout test that reproduced this. It's possible
3752         the entire document needs to be destroyed and replaced with something.
3753
3754         * accessibility/AccessibilityRenderObject.cpp:
3755         (WebCore::AccessibilityRenderObject::setFocused):
3756
3757 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
3758
3759         [OS X] Font fallback is not language-sensitive
3760         https://bugs.webkit.org/show_bug.cgi?id=147390
3761
3762         Reviewed by Dean Jackson.
3763
3764         We need to make our font fallback code sensitive to locale.
3765
3766         Test: fast/text/fallback-language-han.html
3767
3768         * platform/graphics/mac/FontCacheMac.mm:
3769         (WebCore::lookupCTFont):
3770         (WebCore::FontCache::systemFallbackForCharacters):
3771
3772 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
3773
3774         CharacterFallbackMapKey should be locale-specific
3775         https://bugs.webkit.org/show_bug.cgi?id=147532
3776
3777         Reviewed by Dean Jackson.
3778
3779         This is in preparation for locale-specific font fallback.
3780
3781         No new tests because there is no behavior change.
3782
3783         * platform/graphics/Font.cpp:
3784         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
3785         (WebCore::CharacterFallbackMapKey::operator==):
3786         (WebCore::CharacterFallbackMapKeyHash::hash):
3787         (WebCore::Font::systemFallbackFontForCharacter):
3788
3789 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
3790
3791         Expand CharacterFallbackMapKey to a struct
3792         https://bugs.webkit.org/show_bug.cgi?id=147530
3793
3794         Reviewed by Dean Jackson.
3795
3796         This is in prepraration for making this struct locale-specific.
3797
3798         No new tests because there is no behavior change.
3799
3800         * platform/graphics/Font.cpp:
3801         (WebCore::CharacterFallbackMapKey::CharacterFallbackMapKey):
3802         (WebCore::CharacterFallbackMapKey::isHashTableDeletedValue):
3803         (WebCore::CharacterFallbackMapKey::operator==):
3804         (WebCore::CharacterFallbackMapKeyHash::hash):
3805         (WebCore::CharacterFallbackMapKeyHash::equal):
3806         (WebCore::Font::systemFallbackFontForCharacter):
3807
3808 2015-08-01  Myles C. Maxfield  <mmaxfield@apple.com>
3809
3810         Fix the build after r187721
3811
3812         Unreviewed.
3813
3814         * bindings/js/JSDOMBinding.h:
3815         (WebCore::createWrapper):
3816
3817 2015-08-01  Alex Christensen  <achristensen@webkit.org>
3818
3819         Fix compile errors with VS2015
3820         https://bugs.webkit.org/show_bug.cgi?id=147526
3821
3822         Reviewed by Myles Maxfield.
3823
3824         * bindings/js/JSDOMBinding.h:
3825         (WebCore::createWrapper):
3826         Explicitly call the Ref constructor to avoid unresolved symbols with VS2015.
3827         Otherwise, VS2015 tries to use CSSPrimitiveValue::operator<Ref<CSSPrimitiveValue> > which doesn't exist.
3828
3829 2015-07-27  Matt Rajca  <mrajca@apple.com>
3830
3831         Media Session: inform the UI process when the focused Content media element changes
3832         https://bugs.webkit.org/show_bug.cgi?id=147323
3833
3834         Reviewed by Tim Horton.
3835
3836         * html/HTMLMediaElement.cpp:
3837         (WebCore::HTMLMediaElement::playInternal): Eventually tell the UI process that the focused Content media element changed.
3838         * page/ChromeClient.h:
3839
3840 2015-07-27  Matt Rajca  <mrajca@apple.com>
3841
3842         Media Session: give media elements unique IDs
3843         https://bugs.webkit.org/show_bug.cgi?id=147322
3844
3845         Reviewed by Eric Carlson.
3846
3847         * html/HTMLMediaElement.cpp:
3848         (WebCore::elementIDsToElements): Create a global map of element IDs to elements.
3849         (WebCore::HTMLMediaElement::elementWithID): Retrieve the element with the given ID.
3850         (WebCore::HTMLMediaElement::HTMLMediaElement): Give the element a unique ID.
3851         (WebCore::HTMLMediaElement::playInternal): Removed whitespace.
3852         (WebCore::HTMLMediaElement::pauseInternal): Ditto.
3853         * html/HTMLMediaElement.h:
3854         (WebCore::HTMLMediaElement::elementID):
3855
3856 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
3857
3858         Fix the build
3859
3860         Unreviewed.
3861
3862         * platform/graphics/mac/FontCacheMac.mm:
3863         (WebCore::lookupCTFont):
3864
3865 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
3866
3867         [OS X] Migrate to CTFontCreateForCharactersWithLanguage from [NSFont findFontLike:forString:withRange:inLanguage]
3868         https://bugs.webkit.org/show_bug.cgi?id=147483
3869
3870         Reviewed by Dean Jackson.
3871
3872         [NSFont findFontLike:forString:withRange:inLanguage] doesn't properly handle its last argument. In
3873         addition, we want to be moving away from NSFont in the first place and on to Core Text. This new
3874         CoreText function correctly handles its language argument, which is required for language-specific
3875         font fallback.
3876
3877         No new tests because there is no behavior change.
3878
3879         * platform/graphics/FontCache.cpp:
3880         (WebCore::FontCache::purgeInactiveFontData):
3881         * platform/graphics/FontCache.h:
3882         (WebCore::FontCache::platformPurgeInactiveFontData):
3883         * platform/graphics/mac/FontCacheMac.mm:
3884         (WebCore::fallbackDedupSet):
3885         (WebCore::FontCache::platformPurgeInactiveFontData):
3886         (WebCore::lookupCTFont):
3887         (WebCore::FontCache::systemFallbackForCharacters):
3888         * platform/spi/cocoa/CoreTextSPI.h:
3889         * platform/spi/mac/NSFontSPI.h:
3890
3891 2015-07-31  Chris Dumez  <cdumez@apple.com>
3892
3893         Drop dummy Timer callbacks
3894         https://bugs.webkit.org/show_bug.cgi?id=147516
3895
3896         Reviewed by Alexey Proskuryakov.
3897
3898         Drop dummy Timer callbacks in the code base. A lot of Timer callbacks
3899         do nothing else beside calling a particular method. In such case, we
3900         can use the called method as Timer callback instead.
3901
3902         * css/FontLoader.cpp:
3903         (WebCore::FontLoader::FontLoader):
3904         * css/FontLoader.h:
3905         * dom/Document.cpp:
3906         (WebCore::Document::Document):
3907         (WebCore::Document::styleRecalcTimerFired): Deleted.
3908         (WebCore::Document::domCookieCacheExpiryTimerFired): Deleted.
3909         * dom/Document.h:
3910         * html/MediaController.cpp:
3911         (MediaController::MediaController):
3912         (MediaController::timeupdateTimerFired): Deleted.
3913         * html/MediaController.h:
3914         * loader/cache/CachedResource.cpp:
3915         (WebCore::CachedResource::CachedResource):
3916         * loader/cache/CachedResourceLoader.cpp:
3917         (WebCore::CachedResourceLoader::CachedResourceLoader):
3918         (WebCore::CachedResourceLoader::garbageCollectDocumentResourcesTimerFired): Deleted.
3919         * loader/cache/CachedResourceLoader.h:
3920         * loader/cache/MemoryCache.cpp:
3921         (WebCore::MemoryCache::MemoryCache):
3922         (WebCore::MemoryCache::pruneTimerFired): Deleted.
3923         * loader/cache/MemoryCache.h:
3924         * page/EventSource.cpp:
3925         (WebCore::EventSource::EventSource):
3926         (WebCore::EventSource::connectTimerFired): Deleted.
3927         * page/EventSource.h:
3928         * page/FrameView.cpp:
3929         (WebCore::FrameView::FrameView):
3930         (WebCore::FrameView::delayedScrollEventTimerFired): Deleted.
3931         (WebCore::FrameView::postLayoutTimerFired): Deleted.
3932         * page/FrameView.h:
3933         * page/scrolling/ios/ScrollingCoordinatorIOS.h:
3934         * page/scrolling/ios/ScrollingCoordinatorIOS.mm:
3935         (WebCore::ScrollingCoordinatorIOS::ScrollingCoordinatorIOS):
3936         (WebCore::ScrollingCoordinatorIOS::scrollingStateTreeCommitterTimerFired): Deleted.
3937         * page/scrolling/mac/ScrollingCoordinatorMac.h:
3938         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
3939         (WebCore::ScrollingCoordinatorMac::ScrollingCoordinatorMac):
3940         (WebCore::ScrollingCoordinatorMac::scrollingStateTreeCommitterTimerFired): Deleted.
3941         * platform/graphics/FontCache.cpp:
3942         (WebCore::FontCache::FontCache):
3943         (WebCore::FontCache::purgeTimerFired): Deleted.
3944         * platform/graphics/FontCache.h:
3945         * platform/graphics/ShadowBlur.cpp:
3946         (WebCore::ScratchBuffer::ScratchBuffer):
3947         (WebCore::ScratchBuffer::timerFired): Deleted.
3948         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
3949         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
3950         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
3951         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::seekTimerFired): Deleted.
3952
3953 2015-07-31  Matthew Daiter  <mdaiter@apple.com>
3954
3955         Removed pointSize from _addMarkersToList
3956         https://bugs.webkit.org/show_bug.cgi?id=147515
3957
3958         Reviewed by Eric Carlson.
3959
3960         * editing/cocoa/HTMLConverter.mm:
3961         (HTMLConverter::_addMarkersToList): Deleted.
3962
3963 2015-07-31  Alex Christensen  <achristensen@webkit.org>
3964
3965         Prepare for VS2015
3966         https://bugs.webkit.org/show_bug.cgi?id=146579
3967
3968         Reviewed by Jon Honeycutt.
3969
3970         * WebCore.vcxproj/build-generated-files.pl:
3971         Find a correct preprocessor when using VS2015.
3972
3973 2015-07-31  Eric Carlson  <eric.carlson@apple.com>
3974
3975         [iOS] use a media-specific user gesture check
3976         https://bugs.webkit.org/show_bug.cgi?id=147509
3977
3978         Reviewed by Tim Horton.
3979
3980         Change an enum name added in r187688.
3981
3982         * dom/UserGestureIndicator.cpp:
3983         (WebCore::isDefinite): DefinitelyProcessingMediaUserGesture -> DefinitelyProcessingPotentialUserGesture
3984         (WebCore::UserGestureIndicator::processingUserGestureForMedia): Ditto.
3985         * dom/UserGestureIndicator.h: Ditto.
3986
3987 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
3988
3989         [Cocoa] Latin quotes are used with the system font on Chinese devices
3990         https://bugs.webkit.org/show_bug.cgi?id=147504
3991
3992         Reviewed by Dean Jackson.
3993
3994         The system font has some fancy logic regarding character selection which requires
3995         using Core Text for glyph selection.
3996
3997         No new tests because tests can't change the system language of the device.
3998
3999         * platform/graphics/mac/GlyphPageMac.cpp:
4000         (WebCore::shouldUseCoreText):
4001
4002 2015-07-31  Chris Dumez  <cdumez@apple.com>
4003
4004         Coalesce authentication credential requests
4005         https://bugs.webkit.org/show_bug.cgi?id=128006
4006         <rdar://problem/16839069>
4007
4008         Reviewed by Alexey Proskuryakov.
4009
4010         Export symbol for ProtectionSpace::compare() so it can be called from
4011         WebKit2.
4012
4013         * platform/network/ProtectionSpaceBase.h:
4014
4015 2015-07-31  Eric Carlson  <eric.carlson@apple.com>
4016
4017         [iOS] use a media-specific user gesture check
4018         https://bugs.webkit.org/show_bug.cgi?id=147509
4019
4020         Reviewed by Jer Noble.
4021
4022         * bindings/js/ScriptController.cpp:
4023         (WebCore::ScriptController::processingUserGestureForMedia): New.
4024         * bindings/js/ScriptController.h:
4025
4026         * dom/UserGestureIndicator.cpp:
4027         (WebCore::isDefinite): Allow DefinitelyProcessingMediaUserGesture.
4028         (WebCore::UserGestureIndicator::processingUserGestureForMedia): New.
4029         * dom/UserGestureIndicator.h:
4030
4031         * html/HTMLMediaElement.cpp:
4032         (WebCore::HTMLMediaElement::load): Use ScriptController::processingUserGestureForMedia instead of 
4033           ScriptController::processingUserGesture
4034         (WebCore::HTMLMediaElement::play): Ditto.
4035
4036 2015-07-31  Andreas Kling  <akling@apple.com>
4037
4038         Crashes under HTMLMediaElement::updateActiveTextTrackCues() when destroying CachedPage.
4039         <https://webkit.org/b/147506>
4040         <rdar://problem/21939014>
4041
4042         Reviewed by Chris Dumez.
4043
4044         Don't mess with the media element's text tracks below its ActiveDOMObject::stop()
4045         implementation, since that may cause DOM mutations.
4046
4047         I don't have a repro or a test for this, but plenty of crash logs to indicate that
4048         we're getting ourselves into trouble by modifying the DOM during CachedPage teardown.
4049
4050         * html/HTMLMediaElement.cpp:
4051         (WebCore::HTMLMediaElement::configureTextTrackDisplay):
4052
4053 2015-07-31  Tim Horton  <timothy_horton@apple.com>
4054
4055         [iOS] DOMNode preview snapshot rects are wrong for user-select: none links
4056         https://bugs.webkit.org/show_bug.cgi?id=147513
4057         <rdar://problem/22083354>
4058
4059         Reviewed by Simon Fraser.
4060
4061         * bindings/objc/DOM.mm:
4062         (-[DOMNode getPreviewSnapshotImage:andRects:]):
4063         Use the same code as WebKit2 to compute the fallback rect (if TextIndicator fails),
4064         asking the RenderObject (or RenderImage) for its bounding box instead of using the
4065         (often wrong) Range bounding rect.
4066
4067         Make sure to use the fallback rect *any* time TextIndicator fails (before
4068         we would return no rects at all if TextIndicator::createWithRange returned null,
4069         and the fallback rect if it returned with an empty image).
4070
4071         Inverse-page-scale the margin, to match the appearance in WebKit2.
4072
4073 2015-07-31  Myles C. Maxfield  <mmaxfield@apple.com>
4074
4075         [SVG -> OTF Converter] Crash when converting Arabic fonts
4076         https://bugs.webkit.org/show_bug.cgi?id=147510
4077
4078         Reviewed by Anders Carlsson.
4079
4080         SVGToOTFFontConverter::compareCodepointsLexicographically() wasn't transitive.
4081
4082         Test: fast/text/arabic-duplicate-glyph-font.html
4083
4084         * svg/SVGToOTFFontConversion.cpp:
4085         (WebCore::SVGToOTFFontConverter::compareCodepointsLexicographically):
4086
4087 2015-07-31  Jeremy Jones  <jeremyj@apple.com>
4088
4089         Rename AVPlayerLayerView to _AVPlayerLayerView.
4090         https://bugs.webkit.org/show_bug.cgi?id=147399
4091
4092         Reviewed by Eric Carlson.
4093
4094         Change class name AVPlayerLayerView to match change in AVKit SPI. 
4095         This prevents conflicts with 3rd party apps.
4096
4097