Modern IDB: Check in empty SQLite backing store implementation.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-01-12  Brady Eidson  <beidson@apple.com>
2
3         Modern IDB: Check in empty SQLite backing store implementation.
4         https://bugs.webkit.org/show_bug.cgi?id=153022
5
6         Reviewed by Alex Christensen.
7
8         No new tests (No change in behavior).
9
10         Just to get the implementation files in the tree, this backing store currently does nothing
11         other than return errors for every operation.
12
13         * CMakeLists.txt:
14         * WebCore.xcodeproj/project.pbxproj:
15
16         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp: Added.
17         (WebCore::IDBServer::SQLiteIDBBackingStore::SQLiteIDBBackingStore):
18         (WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore):
19         (WebCore::IDBServer::SQLiteIDBBackingStore::getOrEstablishDatabaseInfo):
20         (WebCore::IDBServer::SQLiteIDBBackingStore::beginTransaction):
21         (WebCore::IDBServer::SQLiteIDBBackingStore::abortTransaction):
22         (WebCore::IDBServer::SQLiteIDBBackingStore::commitTransaction):
23         (WebCore::IDBServer::SQLiteIDBBackingStore::createObjectStore):
24         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteObjectStore):
25         (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
26         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
27         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
28         (WebCore::IDBServer::SQLiteIDBBackingStore::keyExistsInObjectStore):
29         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
30         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
31         (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
32         (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
33         (WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
34         (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
35         (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
36         (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
37         (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
38         (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
39         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteBackingStore):
40         * Modules/indexeddb/server/SQLiteIDBBackingStore.h: Added.
41
42 2016-01-12  Brady Eidson  <beidson@apple.com>
43
44         Modern IDB: storage/indexeddb/dont-wedge.html is flaky.
45         https://bugs.webkit.org/show_bug.cgi?id=152892
46
47         Reviewed by Alex Christensen.
48
49         No new tests (Reenabled existing test).
50
51         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
52         (WebCore::IDBClient::IDBConnectionToServer::abortOpenAndUpgradeNeeded):
53         * Modules/indexeddb/client/IDBConnectionToServer.h:
54         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
55
56         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
57         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted): If the database was opened
58           or an upgrade transaction was started, but the script execution context is already
59           stopped, immediately message back to the server so it doesn't wedge.
60
61         * Modules/indexeddb/server/IDBServer.cpp:
62         (WebCore::IDBServer::IDBServer::abortOpenAndUpgradeNeeded):
63         * Modules/indexeddb/server/IDBServer.h:
64
65         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
66         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::abortWithoutCallback):
67         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
68
69         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
70         (WebCore::InProcessIDBServer::abortOpenAndUpgradeNeeded):
71         * Modules/indexeddb/shared/InProcessIDBServer.h:
72
73 2016-01-12  Commit Queue  <commit-queue@webkit.org>
74
75         Unreviewed, rolling out r194826.
76         https://bugs.webkit.org/show_bug.cgi?id=153020
77
78         Appears to have regressed PLT (Requested by kling on #webkit).
79
80         Reverted changeset:
81
82         "Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
83         cont'd"
84         https://bugs.webkit.org/show_bug.cgi?id=152902
85         http://trac.webkit.org/changeset/194826
86
87 2016-01-12  Antti Koivisto  <antti@apple.com>
88
89         Don't reuse memory cache entries with different charset
90         https://bugs.webkit.org/show_bug.cgi?id=110031
91         rdar://problem/13666418
92
93         Reviewed by Andreas Kling.
94
95         Test: fast/loader/cache-encoding.html
96
97         * loader/cache/CachedResourceLoader.cpp:
98         (WebCore::CachedResourceLoader::requestResource):
99         (WebCore::logResourceRevalidationDecision):
100         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
101
102             Pass full CachedResourceRequest to the function.
103             If charset differs don't reuse the cache entry.
104
105         * loader/cache/CachedResourceLoader.h:
106
107 2016-01-12  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
108
109         Use a pointer instead of PassRefPtr in AbstractView argument of UIEvent class
110         https://bugs.webkit.org/show_bug.cgi?id=152829
111
112         Reviewed by Darin Adler.
113
114         As a step to reduce uses of PassRefPtr, UIEvent class doesn't need to use PassRefPtr for AbstractView argument.
115         Nobody hands us ownership when making one of these objects.
116
117         * dom/FocusEvent.cpp:
118         (WebCore::FocusEvent::FocusEvent):
119         * dom/FocusEvent.h:
120         * dom/KeyboardEvent.cpp:
121         (WebCore::KeyboardEvent::KeyboardEvent):
122         * dom/MouseEvent.cpp:
123         (WebCore::MouseEvent::create):
124         (WebCore::MouseEvent::MouseEvent):
125         (WebCore::MouseEvent::initMouseEvent):
126         (WebCore::SimulatedMouseEvent::create):
127         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
128         * dom/MouseEvent.h:
129         * dom/MouseRelatedEvent.cpp:
130         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
131         * dom/MouseRelatedEvent.h:
132         * dom/TextEvent.cpp:
133         (WebCore::TextEvent::create):
134         (WebCore::TextEvent::createForPlainTextPaste):
135         (WebCore::TextEvent::createForFragmentPaste):
136         (WebCore::TextEvent::createForDrop):
137         (WebCore::TextEvent::createForDictation):
138         (WebCore::TextEvent::TextEvent):
139         (WebCore::TextEvent::initTextEvent):
140         * dom/TextEvent.h:
141         * dom/TouchEvent.cpp:
142         (WebCore::TouchEvent::TouchEvent):
143         (WebCore::TouchEvent::initTouchEvent):
144         * dom/TouchEvent.h:
145         * dom/UIEvent.cpp:
146         (WebCore::UIEvent::UIEvent):
147         (WebCore::UIEvent::initUIEvent):
148         * dom/UIEvent.h:
149         (WebCore::UIEvent::create):
150         (WebCore::UIEvent::view):
151         * dom/UIEventWithKeyState.h:
152         (WebCore::UIEventWithKeyState::UIEventWithKeyState):
153
154 2016-01-12  Csaba Osztrogonác  <ossy@webkit.org>
155
156         Fix unused-private-field warnings in DisplayListItems.h
157         https://bugs.webkit.org/show_bug.cgi?id=153012
158
159         Reviewed by Michael Catanzaro.
160
161         * platform/graphics/displaylists/DisplayListItems.cpp:
162         (WebCore::DisplayList::DrawNativeImage::DrawNativeImage):
163         * platform/graphics/displaylists/DisplayListItems.h:
164
165 2016-01-12  Carlos Garcia Campos  <cgarcia@igalia.com>
166
167         Unreviewed. Fix isRecording condition logic in GraphicsContext::roundToDevicePixels after r194816.
168
169         This looks like a typo introduced in r194816, we want to return early logging
170         a message when isRecording() returns true.
171
172         * platform/graphics/cairo/GraphicsContextCairo.cpp:
173         (WebCore::GraphicsContext::roundToDevicePixels):
174         * platform/graphics/cg/GraphicsContextCG.cpp:
175         (WebCore::GraphicsContext::roundToDevicePixels):
176
177 2016-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
178
179         Inconsistencies in main resource load delegates when loading from history
180         https://bugs.webkit.org/show_bug.cgi?id=150927
181
182         Reviewed by Michael Catanzaro.
183
184         When restoring a page from the page cache, even though there
185         isn't an actual load of resources, we are still emitting the load
186         delegates to let the API layer know there are contents being
187         loaded in the web view. This makes the page cache restoring
188         transparent for the API layer. However, when restoring a page from
189         the cache, all the delegates are emitted after the load is
190         committed. This is not consistent with real loads, where we first
191         load the main resource and once we get a response we commit the
192         load. This inconsistency is problematic if the API layer expects
193         to always have a main resource with a response when the load is
194         committed. This is the case of the GTK+ port, for example. So,
195         this patch ensures that when a page is restored from the page
196         cache, the main resource load delegates that are emitted until a
197         response is received in normal loads, are emitted before the load
198         is committed.
199
200         Test: http/tests/loading/main-resource-delegates-on-back-navigation.html
201
202         * loader/FrameLoader.cpp:
203         (WebCore::FrameLoader::commitProvisionalLoad): When loading from
204         the page cache, send delegate messages up to didReceiveResponse
205         for the main resource before the load is committed, and the
206         remaining messages afterwards.
207
208 2016-01-09  Andy Estes  <aestes@apple.com>
209
210         [Cocoa] Add SPI to opt out a URL scheme from the memory cache
211         https://bugs.webkit.org/show_bug.cgi?id=152950
212         rdar://problem/24066652
213
214         Reviewed by Tim Horton.
215
216         Added a list of schemes to SchemeRegistry whose resources should always be revalidated. Taught CachedResource to
217         return a freshness lifetime of 0 for these resources, unless the scheme is one that should be cached indefinitely.
218
219         New API test: WebKit2.AlwaysRevalidatedURLSchemes
220
221         * loader/cache/CachedResource.cpp:
222         (WebCore::shouldCacheSchemeIndefinitely): Moved from SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely().
223         (WebCore::CachedResource::freshnessLifetime): For a scheme that should not be cached indefinitely, return 0 if
224         that scheme should always be revalidated according to SchemeRegistry.
225         * platform/SchemeRegistry.cpp:
226         (WebCore::alwaysRevalidatedSchemes):
227         (WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated):
228         (WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme):
229         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely): Moved to WebCore::shouldCacheSchemeIndefinitely().
230         There was no reason for this to be in SchemeRegistry.
231         * platform/SchemeRegistry.h:
232
233 2016-01-11  Brady Eidson  <beidson@apple.com>
234
235         Modern IDB: storage/indexeddb/index-multientry.html fails under GuardMalloc/ASAN.
236         https://bugs.webkit.org/show_bug.cgi?id=152990
237
238         Reviewed by Alex Christensen.
239
240         No new tests (Covered by re-enabling existing test).
241
242         * Modules/indexeddb/client/IDBRequestImpl.cpp:
243         (WebCore::IDBClient::IDBRequest::dispatchEvent): Use String::utf8() instead of AtomicString::characters8() for
244           the format string, as the latter fails under ASAN.
245           
246         * Modules/indexeddb/server/IndexValueStore.cpp:
247         (WebCore::IDBServer::IndexValueStore::removeEntriesWithValueKey): We can't save off pointers to IDBKeyDatas
248           used as keys in the map, because the moment we start mutating the map the keys can be rehashed, invalidating
249           our pointers. Save off the IDBKeyDatas by value instead.
250
251 2016-01-11  Joseph Pecoraro  <pecoraro@apple.com>
252
253         Web Inspector: Migrate Page Timeline recording to ScriptProfiler
254         https://bugs.webkit.org/show_bug.cgi?id=152727
255
256         Reviewed by Brian Burg.
257
258         Test: inspector/script-profiler/event-type-Other.html
259
260         This now shares the JavaScript profiling code between JSContext and Page
261         inspection. It also moves forward splitting the Page's Timeline domain
262         into smaller components that can be turned on/off individually.
263
264         * bindings/js/JSCallbackData.cpp:
265         (WebCore::JSCallbackData::invokeCallback):
266         * bindings/js/JSErrorHandler.cpp:
267         (WebCore::JSErrorHandler::handleEvent):
268         * bindings/js/JSEventListener.cpp:
269         (WebCore::JSEventListener::handleEvent):
270         * bindings/js/JSMainThreadExecState.h:
271         (WebCore::JSMainThreadExecState::profiledCall):
272         (WebCore::JSMainThreadExecState::profiledEvaluate):
273         * bindings/js/JSMutationCallback.cpp:
274         (WebCore::JSMutationCallback::call):
275         * bindings/js/ScheduledAction.cpp:
276         (WebCore::ScheduledAction::executeFunctionInContext):
277         * bindings/js/ScriptController.cpp:
278         (WebCore::ScriptController::evaluateInWorld):
279         * bindings/objc/WebScriptObject.mm:
280         (-[WebScriptObject callWebScriptMethod:withArguments:]):
281         (-[WebScriptObject evaluateWebScript:]):
282         Identify entry points into JSC that we want to profile for the frontend.
283         These were nearly all already classified for the Timeline. We added missing
284         support for ErrorHandlers (window.onerror handler functions).
285
286         * inspector/InspectorTimelineAgent.cpp:
287         (WebCore::InspectorTimelineAgent::didCallFunction):
288         (WebCore::InspectorTimelineAgent::didEvaluateScript):
289         (WebCore::startProfiling): Deleted.
290         (WebCore::stopProfiling): Deleted.
291         (WebCore::InspectorTimelineAgent::willCallFunction): Deleted.
292         (WebCore::InspectorTimelineAgent::willEvaluateScript): Deleted.
293         * inspector/InspectorTimelineAgent.h:
294         TimelineAgent no longer needs to start/stop the Legacy Profiler
295         since ScriptProfiler will automatically do that for us. Delete
296         all code associated with that. There is still an open question
297         regarding `console.profile` and `console.profileEnd` that
298         starts/stops the profiler.
299
300 2016-01-11  Anders Carlsson  <andersca@apple.com>
301
302         Get rid of CFMakeCollectable, it is a no-op
303         https://bugs.webkit.org/show_bug.cgi?id=152988
304
305         Reviewed by Sam Weinig.
306
307         * platform/mac/WebCoreNSURLExtras.mm:
308         (WebCore::URLByTruncatingOneCharacterBeforeComponent):
309         (WebCore::URLByRemovingComponentAndSubsequentCharacter):
310
311 2016-01-11  Commit Queue  <commit-queue@webkit.org>
312
313         Unreviewed, rolling out r194866.
314         https://bugs.webkit.org/show_bug.cgi?id=152986
315
316         This change broke the mac build (Requested by ryanhaddad on
317         #webkit).
318
319         Reverted changeset:
320
321         "[Cocoa] Add SPI to opt out a URL scheme from the memory
322         cache"
323         https://bugs.webkit.org/show_bug.cgi?id=152950
324         http://trac.webkit.org/changeset/194866
325
326 2016-01-11  Zalan Bujtas  <zalan@apple.com>
327
328         Padding added to table-cell element after font-size change.
329         https://bugs.webkit.org/show_bug.cgi?id=152796
330
331         Reviewed by David Hyatt.
332
333         Do not include intrinsicPaddingBefore value while figuring out the height of a row.
334         In RenderTableSection::calcRowLogicalHeight() we are interested in the height of the content
335         without the additional padding (normal padding is included).
336
337         Test: fast/table/table-baseline-grows.html
338
339         * rendering/RenderTableSection.cpp:
340         (WebCore::RenderTableSection::calcRowLogicalHeight):
341
342 2016-01-11  Andy Estes  <aestes@apple.com>
343
344         [Cocoa] Add SPI to opt out a URL scheme from the memory cache
345         https://bugs.webkit.org/show_bug.cgi?id=152950
346         rdar://problem/24066652
347
348         Reviewed by Tim Horton.
349
350         Added a list of schemes to SchemeRegistry whose resources should always be revalidated. Taught CachedResource to
351         return a freshness lifetime of 0 for these resources, unless the scheme is one that should be cached indefinitely.
352
353         New API test: WebKit2.AlwaysRevalidatedURLSchemes
354
355         * loader/cache/CachedResource.cpp:
356         (WebCore::shouldCacheSchemeIndefinitely): Moved from SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely().
357         (WebCore::CachedResource::freshnessLifetime): For a scheme that should not be cached indefinitely, return 0 if
358         that scheme should always be revalidated according to SchemeRegistry.
359         * platform/SchemeRegistry.cpp:
360         (WebCore::alwaysRevalidatedSchemes):
361         (WebCore::SchemeRegistry::registerURLSchemeAsAlwaysRevalidated):
362         (WebCore::SchemeRegistry::shouldAlwaysRevalidateURLScheme):
363         (WebCore::SchemeRegistry::shouldCacheResponsesFromURLSchemeIndefinitely): Moved to WebCore::shouldCacheSchemeIndefinitely().
364         There was no reason for this to be in SchemeRegistry.
365         * platform/SchemeRegistry.h:
366
367 2016-01-11  Dave Hyatt  <hyatt@apple.com>
368
369         Picture element needs to work with the preload scanner and select the correct
370         source element instead of loading the image.
371         https://bugs.webkit.org/show_bug.cgi?id=152983
372
373         Reviewed by Dean Jackson.
374
375         Added new tests in http/tests/loading.
376
377         * html/parser/HTMLPreloadScanner.cpp:
378         (WebCore::TokenPreloadScanner::tagIdFor):
379         (WebCore::TokenPreloadScanner::initiatorFor):
380         (WebCore::TokenPreloadScanner::StartTagScanner::StartTagScanner):
381         (WebCore::TokenPreloadScanner::StartTagScanner::processAttributes):
382         (WebCore::TokenPreloadScanner::StartTagScanner::processImageAndScriptAttribute):
383         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
384         (WebCore::TokenPreloadScanner::StartTagScanner::resourceType):
385         (WebCore::TokenPreloadScanner::scan):
386         * html/parser/HTMLPreloadScanner.h:
387         (WebCore::TokenPreloadScanner::setPredictedBaseElementURL):
388         (WebCore::TokenPreloadScanner::inPicture):
389
390 2016-01-11  Brady Eidson  <beidson@apple.com>
391
392         Modern IDB: storage/indexeddb/key-generator.html fails.
393         https://bugs.webkit.org/show_bug.cgi?id=152981
394
395         Reviewed by Alex Christensen.
396
397         No new tests (One failing test now passes, and one test's results get a progression).
398
399         * Modules/indexeddb/server/IDBBackingStore.h:
400         
401         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
402         (WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber): Throw an error if the current
403           value is already over 2^53.
404         (WebCore::IDBServer::MemoryIDBBackingStore::revertGeneratedKeyNumber):
405         (WebCore::IDBServer::MemoryIDBBackingStore::maybeUpdateKeyGeneratorNumber): Handle double -> uint64_t
406           conversions properly when calculating the next key.
407         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
408         
409         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
410         (WebCore::IDBServer::ScopeGuard::ScopeGuard): Add this utility class to call a function 
411           any time it goes out of scope.
412         (WebCore::IDBServer::ScopeGuard::~ScopeGuard):
413         (WebCore::IDBServer::ScopeGuard::enable):
414         (WebCore::IDBServer::ScopeGuard::disable):
415         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): Revert the key generator value if
416           the put/add operation ends in error.
417
418 2016-01-11  Brady Eidson  <beidson@apple.com>
419
420         Modern IDB: storage/indexeddb/lazy-index-population.html fails.
421         https://bugs.webkit.org/show_bug.cgi?id=152976
422
423         Reviewed by Alex Christensen.
424
425         No new tests (At least one failing test now passes).
426
427         We were restoring objectstores/indexes incorrectly on transaction abort.
428
429         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
430         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
431         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
432         (WebCore::IDBServer::MemoryIDBBackingStore::removeObjectStoreForVersionChangeAbort):
433
434 2016-01-11  Brady Eidson  <beidson@apple.com>
435
436         Modern IDB: Make MemoryIndex and MemoryObjectStore RefCounted.
437         https://bugs.webkit.org/show_bug.cgi?id=152966
438
439         Reviewed by Alex Christensen.
440
441         No new tests (Refactor, no change in behavior)
442
443         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
444         (WebCore::IDBServer::MemoryBackingStoreTransaction::indexDeleted):
445         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreDeleted):
446         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
447         * Modules/indexeddb/server/MemoryBackingStoreTransaction.h:
448         
449         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
450         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
451         (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
452         (WebCore::IDBServer::MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort):
453         (WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
454         (WebCore::IDBServer::MemoryIDBBackingStore::takeObjectStoreByName):
455         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
456         
457         * Modules/indexeddb/server/MemoryIndex.cpp:
458         (WebCore::IDBServer::MemoryIndex::create):
459         * Modules/indexeddb/server/MemoryIndex.h:
460         
461         * Modules/indexeddb/server/MemoryObjectStore.cpp:
462         (WebCore::IDBServer::MemoryObjectStore::create):
463         (WebCore::IDBServer::MemoryObjectStore::createIndex):
464         (WebCore::IDBServer::MemoryObjectStore::maybeRestoreDeletedIndex):
465         (WebCore::IDBServer::MemoryObjectStore::takeIndexByName):
466         (WebCore::IDBServer::MemoryObjectStore::deleteIndex):
467         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForDeleteRecord):
468         (WebCore::IDBServer::MemoryObjectStore::updateIndexesForPutRecord):
469         (WebCore::IDBServer::MemoryObjectStore::registerIndex):
470         * Modules/indexeddb/server/MemoryObjectStore.h:
471
472 2016-01-11  Andreas Kling  <akling@apple.com>
473
474         Fix other builds after my MSVC build fix. :-|
475
476         * css/StyleResolver.cpp:
477
478 2016-01-11  Andreas Kling  <akling@apple.com>
479
480         Fix MSVC build after r194848.
481
482         Since MSVC refuses to recognize the friendship between LazyNeverDestroyed
483         and some CSS*Value classes, make their constructors public in MSVC builds.
484
485         Added FIXME's to make it look extra gross.
486
487         * css/CSSInheritedValue.h:
488         (WebCore::CSSInheritedValue::create): Deleted.
489         * css/CSSInitialValue.h:
490         * css/CSSPrimitiveValue.h:
491         * css/CSSRevertValue.h:
492         (WebCore::CSSRevertValue::create): Deleted.
493         * css/CSSUnsetValue.h:
494         (WebCore::CSSUnsetValue::create): Deleted.
495         * css/StyleResolver.cpp:
496         (WebCore::StyleResolver::applyProperty):
497
498 2016-01-11  Andreas Kling  <akling@apple.com>
499
500         CSSValuePool should use nonfragmented storage for eternal caches.
501         <https://webkit.org/b/152960>
502
503         Reviewed by Antti Koivisto.
504
505         Store all of the common cached CSS value objects in contiguous arrays
506         instead of lazily allocating them on the heap.
507
508         This reduces heap fragmentation (win) and removes indirection (win)
509
510         * css/CSSInheritedValue.h:
511         * css/CSSInitialValue.h:
512         * css/CSSPrimitiveValue.h:
513         * css/CSSRevertValue.h:
514         * css/CSSUnsetValue.h:
515         * css/CSSValuePool.cpp:
516         (WebCore::CSSValuePool::CSSValuePool):
517         (WebCore::CSSValuePool::createIdentifierValue):
518         (WebCore::CSSValuePool::createColorValue):
519         (WebCore::CSSValuePool::createValue):
520         (WebCore::CSSValuePool::drain): Deleted.
521         * css/CSSValuePool.h:
522         (WebCore::CSSValuePool::createInheritedValue):
523         (WebCore::CSSValuePool::createImplicitInitialValue):
524         (WebCore::CSSValuePool::createExplicitInitialValue):
525         (WebCore::CSSValuePool::createUnsetValue):
526         (WebCore::CSSValuePool::createRevertValue):
527
528 2016-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
529
530         [GTK] Cleanup RenderThemeGtk
531         https://bugs.webkit.org/show_bug.cgi?id=152888
532
533         Reviewed by Michael Catanzaro.
534
535         Use a common path for GTK+ 3.19 and previous versions, simplifying
536         the code and removing a lot of ifdefs.
537
538          - createStyleContext() now receives a theme part enum value, and
539            an optional parent GtkStyleContext. It encapsulates all the
540            differences between GTK+ 3.19 and previous version leaving the
541            rendering code common and free of ifdefs.
542          - Stock icons support have been removed, simplifying the code
543            that now always renders symbolic icons, updating the colors
544            depending on the current state.
545          - Media button and colors have been removed, because they are
546            unused now that we render the media controls with CSS.
547          - ComboBox separators support has also been removed. In GTK+ 3.19
548            combo boxes no longer have separators and most of the GTK+
549            themes don't use the either, so it's better to simple not render
550            them anymore in WebKit either.
551          - Code to paint caps lock indicator has been removed too, since
552            caps lock indicator is now shadow dom and automatically
553            rendered by WebCore.
554
555         * rendering/RenderThemeGtk.cpp:
556         (WebCore::createStyleContext):
557         (WebCore::loadThemedIcon):
558         (WebCore::gtkIconStateFlags):
559         (WebCore::RenderThemeGtk::adjustRepaintRect):
560         (WebCore::setToggleSize):
561         (WebCore::paintToggle):
562         (WebCore::RenderThemeGtk::setCheckboxSize):
563         (WebCore::RenderThemeGtk::paintCheckbox):
564         (WebCore::RenderThemeGtk::setRadioSize):
565         (WebCore::RenderThemeGtk::paintRadio):
566         (WebCore::RenderThemeGtk::paintButton):
567         (WebCore::getComboBoxMetrics):
568         (WebCore::RenderThemeGtk::popupInternalPaddingLeft):
569         (WebCore::RenderThemeGtk::popupInternalPaddingRight):
570         (WebCore::RenderThemeGtk::popupInternalPaddingTop):
571         (WebCore::RenderThemeGtk::popupInternalPaddingBottom):
572         (WebCore::RenderThemeGtk::paintMenuList):
573         (WebCore::RenderThemeGtk::paintTextField):
574         (WebCore::adjustSearchFieldIconStyle):
575         (WebCore::RenderThemeGtk::adjustSearchFieldResultsDecorationPartStyle):
576         (WebCore::paintIcon):
577         (WebCore::paintEntryIcon):
578         (WebCore::RenderThemeGtk::paintSearchFieldResultsDecorationPart):
579         (WebCore::RenderThemeGtk::adjustSearchFieldCancelButtonStyle):
580         (WebCore::RenderThemeGtk::paintSearchFieldCancelButton):
581         (WebCore::RenderThemeGtk::shouldHaveCapsLockIndicator):
582         (WebCore::RenderThemeGtk::paintSliderTrack):
583         (WebCore::RenderThemeGtk::paintSliderThumb):
584         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
585         (WebCore::RenderThemeGtk::paintProgressBar):
586         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
587         (WebCore::paintSpinArrowButton):
588         (WebCore::RenderThemeGtk::paintInnerSpinButton):
589         (WebCore::styleColor):
590         (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor):
591         (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor):
592         (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor):
593         (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor):
594         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor):
595         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionBackgroundColor):
596         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor):
597         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor):
598         (WebCore::RenderThemeGtk::systemColor):
599         (WebCore::RenderThemeGtk::paintMediaButton):
600         (WebCore::RenderThemeGtk::paintMediaFullscreenButton):
601         (WebCore::RenderThemeGtk::paintMediaMuteButton):
602         (WebCore::RenderThemeGtk::paintMediaPlayButton):
603         (WebCore::RenderThemeGtk::paintMediaSeekBackButton):
604         (WebCore::RenderThemeGtk::paintMediaSeekForwardButton):
605         (WebCore::RenderThemeGtk::paintMediaToggleClosedCaptionsButton):
606         * rendering/RenderThemeGtk.h:
607
608 2016-01-11  Carlos Garcia Campos  <cgarcia@igalia.com>
609
610         [GTK] Cleanup ScrollbarThemeGtk
611         https://bugs.webkit.org/show_bug.cgi?id=152830
612
613         Reviewed by Michael Catanzaro.
614
615         Use a common path for GTK+ 3.19 and previous versions, simplifying
616         the code and removing a lot of ifdefs. Use always a new
617         GtkStyleContext, but when painting cache the newly created one so
618         all paint methods use that one. We were also caching some theme
619         properties assuming they don't change unless the theme changes,
620         but some of them can have different values depending on the state,
621         for example, when hovered or pressed. Those properties are now
622         only cached when we create a new GtkStyleContext.
623         The method updateScrollbarsFrameThickness() has also been removed,
624         since the Scrollbar constructor already initializes the frame rect
625         using the scrollbarThickness(). This method was not doing anything
626         anyway, since that was called on the constructor of the theme,
627         when there were no scrollbars registered. This also means we no
628         longer need to track registered/unregistered scrollbars.
629
630         * platform/gtk/ScrollbarThemeGtk.cpp:
631         (WebCore::ScrollbarThemeGtk::backButtonRect): Use the cached
632         GtkStyleContext and properties or create a new.
633         (WebCore::ScrollbarThemeGtk::forwardButtonRect): Ditto.
634         (WebCore::ScrollbarThemeGtk::trackRect): Ditto.
635         (WebCore::orientationStyleClass):
636         (WebCore::ScrollbarThemeGtk::getOrCreateStyleContext): Create a
637         new GtkStyleContext for the scrollbar if there isn't a cached
638         one. Also initialize the properties that depend on the state.
639         (WebCore::createChildStyleContext): Create a new GtkStyleContext
640         from a parent one.
641         (WebCore::ScrollbarThemeGtk::updateThemeProperties): Get the
642         properties that can only change when the theme changes.
643         (WebCore::ScrollbarThemeGtk::thumbRect): Use the cached
644         GtkStyleContext and properties or create a new.
645         (WebCore::adjustRectAccordingToMargin): Use always the
646         GtkStyleContext state instead of receiving it and setting it again.
647         (WebCore::ScrollbarThemeGtk::paintTrackBackground): Get or create
648         a GtkStyleContext for the scrollbar and create a child one for the trough.
649         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Use the
650         cached GtkStyleContext or create a new one.
651         (WebCore::ScrollbarThemeGtk::paintThumb): Get or create a
652         GtkStyleContext for the scrollbar and create a child ones for
653         trough and slider.
654         (WebCore::ScrollbarThemeGtk::paintButton): Get or create a
655         GtkStyleContext for the scrollbar and create a child one for the button.
656         (WebCore::ScrollbarThemeGtk::paint): Create a GtkStyleContext and
657         cache it temporarily using TemporaryChange until the method finishes.
658         (WebCore::ScrollbarThemeGtk::scrollbarThickness): Use the cached
659         GtkStyleContext and properties or create a new.
660         (WebCore::ScrollbarThemeGtk::buttonSize): Ditto.
661         * platform/gtk/ScrollbarThemeGtk.h:
662
663 2016-01-10  Myles C. Maxfield  <mmaxfield@apple.com>
664
665         [SVG -> OTF Converter] Parsing failures cause use of incomplete fonts
666         https://bugs.webkit.org/show_bug.cgi?id=152772
667         <rdar://problem/24043104>
668
669         Reviewed by Simon Fraser.
670
671         Originally, if we fail to parse a glyph, we would simply skip the glyph. However, this means that
672         we will create an incomplete font without all the necessary glyphs. This causes very distressing
673         text where all the occurances of a particular letter are missing. Instead, we should treat the
674         entire font as invalid.
675
676         Test: fast/text/svg-font-invalid-glyph-path-failure.html
677
678         * css/CSSFontFaceSource.cpp:
679         (WebCore::CSSFontFaceSource::font):
680         * loader/cache/CachedSVGFont.cpp:
681         (WebCore::CachedSVGFont::ensureCustomFontData):
682         * svg/SVGToOTFFontConversion.cpp:
683         (WebCore::SVGToOTFFontConverter::error):
684         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
685         (WebCore::SVGToOTFFontConverter::processGlyphElement):
686         (WebCore::convertSVGToOTFFont):
687         * svg/SVGToOTFFontConversion.h:
688
689 2016-01-10  Andreas Kling  <akling@apple.com>
690
691         Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL cont'd
692         <https://webkit.org/b/152902>
693
694         Reviewed by Andy Estes.
695
696         Convert some more of the remaining clients to use NeverDestroyed.
697
698         * html/track/VTTRegion.cpp:
699         (WebCore::VTTRegion::textTrackCueContainerShadowPseudoId):
700         (WebCore::VTTRegion::textTrackRegionShadowPseudoId):
701         * svg/properties/SVGAnimatedPropertyMacros.h:
702
703 2016-01-09  Simon Fraser  <simon.fraser@apple.com>
704
705         Hook up display-list drawing in GraphicsLayerCA
706         https://bugs.webkit.org/show_bug.cgi?id=152946
707
708         Reviewed by Zalan Bujtas.
709
710         Have GraphicsLayerCA hold a DisplayList. If enabled, do a display-list record
711         in GraphicsLayerCA::recursiveCommitChanges(), and a playback in GraphicsLayerCA::platformCALayerPaintContents().
712         
713         GraphicsLayerCA needs to maintain a m_hasEverPainted flag to know to do a full record
714         at first paint (when there are no dirty rects).
715         
716         Plumb 'isUsingDisplayListDrawing' through to TileGrid via PlatformCALayer{Client}
717         so that we can decorate the tile paint counters with an outline.
718         
719         Have RenderLayerCompositor push the displayListDrawingEnabled state down through
720         RenderLayerBackings to GraphicsLayers.
721         
722         Convert RenderLayerCompositor to use initializers.
723
724         * platform/graphics/GraphicsLayer.cpp:
725         (WebCore::GraphicsLayer::GraphicsLayer):
726         * platform/graphics/GraphicsLayer.h:
727         (WebCore::GraphicsLayer::usesDisplayListDrawing):
728         (WebCore::GraphicsLayer::setUsesDisplayListDrawing):
729         * platform/graphics/ca/GraphicsLayerCA.cpp:
730         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
731         (WebCore::GraphicsLayerCA::setUsesDisplayListDrawing):
732         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
733         (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
734         (WebCore::GraphicsLayerCA::updateDrawsContent):
735         (WebCore::GraphicsLayerCA::dumpAdditionalProperties):
736         * platform/graphics/ca/GraphicsLayerCA.h:
737         * platform/graphics/ca/PlatformCALayer.cpp:
738         (WebCore::PlatformCALayer::drawRepaintIndicator):
739         * platform/graphics/ca/PlatformCALayerClient.h:
740         (WebCore::PlatformCALayerClient::isUsingDisplayListDrawing):
741         * platform/graphics/ca/TileGrid.cpp:
742         (WebCore::TileGrid::platformCALayerShowRepaintCounter):
743         (WebCore::TileGrid::isUsingDisplayListDrawing):
744         * platform/graphics/ca/TileGrid.h:
745         * platform/graphics/displaylists/DisplayList.h: Sadly need to include DisplayListItems.h
746         to get things to compile. I wasn't able to avoid this even when making functions non-inline.
747         * rendering/RenderLayerBacking.cpp:
748         (WebCore::RenderLayerBacking::createGraphicsLayer):
749         * rendering/RenderLayerCompositor.cpp:
750         (WebCore::RenderLayerCompositor::RenderLayerCompositor):
751         (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
752         * rendering/RenderLayerCompositor.h:
753
754 2016-01-09  Zalan Bujtas  <zalan@apple.com>
755
756         REGRESSION (r194426): First email field is not autofilled on amazon.com
757         https://bugs.webkit.org/show_bug.cgi?id=152945
758         <rdar://problem/24082914>
759
760         Reviewed by Simon Fraser.
761
762         r194426 missed marking the m_layoutRoot for layout while converting to full layout (it only marked the new layout root).
763
764         Test: fast/forms/multiple-subtree-layout-failure.html
765
766         * page/FrameView.cpp:
767         (WebCore::FrameView::scheduleRelayoutOfSubtree):
768
769 2016-01-09  Dan Bernstein  <mitz@apple.com>
770
771         [Cocoa] Allow overriding the frameworks directory independently of using a staging install path
772         https://bugs.webkit.org/show_bug.cgi?id=152926
773
774         Reviewed by Tim Horton.
775
776         Introduce a new build setting, WK_OVERRIDE_FRAMEWORKS_DIR. When not empty, it determines
777         where the frameworks are installed. Setting USE_STAGING_INSTALL_PATH to YES sets
778         WK_OVERRIDE_FRAMEWORKS_DIR to $(SYSTEM_LIBRARY_DIR)/StagedFrameworks/Safari.
779
780         Account for the possibility of WK_OVERRIDE_FRAMEWORKS_DIR containing spaces.
781
782         * Configurations/WebCore.xcconfig:
783         - Replace STAGED_FRAMEWORKS_SEARCH_PATH in FRAMEWORK_SEARCH_PATHS with
784           WK_OVERRIDE_FRAMEWORKS_DIR and add quotes to account for spaces.
785         - Define WEBCORE_FRAMEWORKS_DIR and PRODUCTION_FRAMEWORKS_DIR based on
786           WK_OVERRIDE_FRAMEWORKS_DIR.
787
788         * WebCore.xcodeproj/project.pbxproj: Work around make’s inability to handle spaces in paths
789           by creating a symlink to JAVASCRIPTCORE_PRIVATE_HEADERS_DIR under BUILT_PRODUCTS_DIR and
790           using the symlink as the value of JavaScriptCore_SCRIPTS_DIR.
791
792 2016-01-09  Andreas Kling  <akling@apple.com>
793
794         Use NeverDestroyed instead of DEPRECATED_DEFINE_STATIC_LOCAL
795         <https://webkit.org/b/152902>
796
797         Reviewed by Anders Carlsson.
798
799         Mostly mechanical conversion to NeverDestroyed throughout WebCore.
800
801         * Modules/airplay/WebKitPlaybackTargetAvailabilityEvent.cpp:
802         (WebCore::stringForPlaybackTargetAvailability):
803         * Modules/indexeddb/IDBCursor.cpp:
804         (WebCore::IDBCursor::directionNext):
805         (WebCore::IDBCursor::directionNextUnique):
806         (WebCore::IDBCursor::directionPrev):
807         (WebCore::IDBCursor::directionPrevUnique):
808         * Modules/indexeddb/IDBTransaction.cpp:
809         (WebCore::IDBTransaction::modeReadOnly):
810         (WebCore::IDBTransaction::modeReadWrite):
811         (WebCore::IDBTransaction::modeVersionChange):
812         (WebCore::IDBTransaction::modeReadOnlyLegacy):
813         (WebCore::IDBTransaction::modeReadWriteLegacy):
814         * Modules/indexeddb/legacy/LegacyRequest.cpp:
815         (WebCore::LegacyRequest::readyState):
816         * Modules/mediacontrols/MediaControlsHost.cpp:
817         (WebCore::MediaControlsHost::automaticKeyword):
818         (WebCore::MediaControlsHost::forcedOnlyKeyword):
819         (WebCore::MediaControlsHost::alwaysOnKeyword):
820         (WebCore::MediaControlsHost::externalDeviceType):
821         * Modules/mediasource/MediaSource.cpp:
822         (WebCore::MediaSource::openKeyword):
823         (WebCore::MediaSource::closedKeyword):
824         (WebCore::MediaSource::endedKeyword):
825         (WebCore::MediaSource::streamEndedWithError):
826         * Modules/plugins/QuickTimePluginReplacement.mm:
827         (WebCore::quickTimePluginReplacementScript):
828         (WebCore::QuickTimePluginReplacement::supportsMimeType):
829         (WebCore::QuickTimePluginReplacement::supportsFileExtension):
830         * Modules/speech/SpeechSynthesis.cpp:
831         (WebCore::SpeechSynthesis::boundaryEventOccurred):
832         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
833         (WebCore::cssPropertyIDForJSCSSPropertyName):
834         * bridge/c/c_instance.cpp:
835         (JSC::Bindings::globalExceptionString):
836         * css/MediaList.cpp:
837         (WebCore::addResolutionWarningMessageToConsole):
838         * css/StyleSheetContents.cpp:
839         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
840         * dom/ChildListMutationScope.cpp:
841         (WebCore::accumulatorMap):
842         * dom/DOMImplementation.cpp:
843         (WebCore::isSupportedSVG10Feature):
844         (WebCore::isSupportedSVG11Feature):
845         * dom/Document.cpp:
846         (WebCore::Document::readyState):
847         * dom/Element.cpp:
848         (WebCore::Element::webkitRegionOverset):
849         * dom/EventDispatcher.cpp:
850         (WebCore::EventDispatcher::dispatchSimulatedClick):
851         * dom/InlineStyleSheetOwner.cpp:
852         (WebCore::isValidCSSContentType):
853         * dom/MutationObserver.cpp:
854         (WebCore::activeMutationObservers):
855         (WebCore::suspendedMutationObservers):
856         * dom/MutationRecord.cpp:
857         * dom/PseudoElement.cpp:
858         (WebCore::pseudoElementTagName):
859         (WebCore::PseudoElement::pseudoElementNameForEvents):
860         * dom/QualifiedName.cpp:
861         (WebCore::qualifiedNameCache):
862         (WebCore::nullQName):
863         * dom/ScriptElement.cpp:
864         (WebCore::isLegacySupportedJavaScriptLanguage):
865         (WebCore::ScriptElement::notifyFinished):
866         * editing/ApplyStyleCommand.cpp:
867         (WebCore::styleSpanClassString):
868         * editing/MarkupAccumulator.cpp:
869         (WebCore::MarkupAccumulator::shouldAddNamespaceElement):
870         * editing/ReplaceSelectionCommand.cpp:
871         (WebCore::isInterchangeNewlineNode):
872         (WebCore::isInterchangeConvertedSpaceSpan):
873         * editing/htmlediting.cpp:
874         (WebCore::nonBreakingSpaceString):
875         * editing/markup.cpp:
876         (WebCore::StyledMarkupAccumulator::styleNodeCloseTag):
877         (WebCore::createMarkupInternal):
878         * fileapi/Blob.cpp:
879         (WebCore::BlobURLRegistry::registry):
880         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
881         (WebCore::BaseChooserOnlyDateAndTimeInputType::createShadowSubtree):
882         * html/DateInputType.cpp:
883         (WebCore::DateInputType::createStepRange):
884         * html/DateTimeInputType.cpp:
885         (WebCore::DateTimeInputType::createStepRange):
886         * html/DateTimeLocalInputType.cpp:
887         (WebCore::DateTimeLocalInputType::createStepRange):
888         * html/EmailInputType.cpp:
889         (WebCore::isValidEmailAddress):
890         * html/FormController.cpp:
891         (WebCore::FormKeyGenerator::formKey):
892         (WebCore::formStateSignature):
893         * html/HTMLAnchorElement.cpp:
894         (WebCore::rootEditableElementMap):
895         * html/HTMLButtonElement.cpp:
896         (WebCore::HTMLButtonElement::formControlType):
897         * html/HTMLFieldSetElement.cpp:
898         (WebCore::HTMLFieldSetElement::formControlType):
899         * html/HTMLFrameOwnerElement.h:
900         (WebCore::SubframeLoadingDisabler::disabledSubtreeRoots):
901         * html/HTMLKeygenElement.cpp:
902         (WebCore::HTMLKeygenElement::formControlType):
903         * html/HTMLLinkElement.cpp:
904         (WebCore::linkLoadEventSender):
905         * html/HTMLMediaElement.cpp:
906         (WebCore::documentToElementSetMap):
907         * html/HTMLObjectElement.cpp:
908         (WebCore::isRecognizedTagName):
909         * html/HTMLOptGroupElement.cpp:
910         (WebCore::HTMLOptGroupElement::formControlType):
911         * html/HTMLOutputElement.cpp:
912         (WebCore::HTMLOutputElement::formControlType):
913         * html/HTMLPlugInElement.cpp:
914         (WebCore::registeredPluginReplacements):
915         * html/HTMLPlugInImageElement.cpp:
916         (WebCore::titleText):
917         (WebCore::subtitleText):
918         (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
919         * html/HTMLSelectElement.cpp:
920         (WebCore::HTMLSelectElement::formControlType):
921         * html/HTMLStyleElement.cpp:
922         (WebCore::styleLoadEventSender):
923         * html/HTMLTextAreaElement.cpp:
924         (WebCore::HTMLTextAreaElement::formControlType):
925         * html/HTMLTextFormControlElement.cpp:
926         (WebCore::directionString):
927         * html/ImageInputType.cpp:
928         (WebCore::ImageInputType::appendFormData):
929         * html/InputTypeNames.cpp:
930         (WebCore::InputTypeNames::button):
931         (WebCore::InputTypeNames::checkbox):
932         (WebCore::InputTypeNames::color):
933         (WebCore::InputTypeNames::date):
934         (WebCore::InputTypeNames::datetime):
935         (WebCore::InputTypeNames::datetimelocal):
936         (WebCore::InputTypeNames::email):
937         (WebCore::InputTypeNames::file):
938         (WebCore::InputTypeNames::hidden):
939         (WebCore::InputTypeNames::image):
940         (WebCore::InputTypeNames::month):
941         (WebCore::InputTypeNames::number):
942         (WebCore::InputTypeNames::password):
943         (WebCore::InputTypeNames::radio):
944         (WebCore::InputTypeNames::range):
945         (WebCore::InputTypeNames::reset):
946         (WebCore::InputTypeNames::search):
947         (WebCore::InputTypeNames::submit):
948         (WebCore::InputTypeNames::telephone):
949         (WebCore::InputTypeNames::text):
950         (WebCore::InputTypeNames::time):
951         (WebCore::InputTypeNames::url):
952         (WebCore::InputTypeNames::week):
953         * html/MediaController.cpp:
954         (playbackStateWaiting):
955         (playbackStatePlaying):
956         (playbackStateEnded):
957         * html/MonthInputType.cpp:
958         (WebCore::MonthInputType::createStepRange):
959         * html/NumberInputType.cpp:
960         (WebCore::NumberInputType::createStepRange):
961         * html/RangeInputType.cpp:
962         (WebCore::RangeInputType::createStepRange):
963         * html/StepRange.cpp:
964         (WebCore::StepRange::acceptableError):
965         (WebCore::StepRange::alignValueForStep):
966         (WebCore::StepRange::stepMismatch):
967         * html/TimeInputType.cpp:
968         (WebCore::TimeInputType::createStepRange):
969         * html/WeekInputType.cpp:
970         (WebCore::WeekInputType::createStepRange):
971         * html/canvas/CanvasRenderingContext2D.cpp:
972         (WebCore::CanvasRenderingContext2D::getImageData):
973         * html/parser/XSSAuditor.cpp:
974         (WebCore::XSSAuditor::init):
975         (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
976         * html/shadow/MediaControlElements.cpp:
977         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay):
978         (WebCore::getMediaControlTimeRemainingDisplayElementShadowPseudoId):
979         (WebCore::getMediaControlCurrentTimeDisplayElementShadowPseudoId):
980         * html/shadow/MeterShadowElement.cpp:
981         (WebCore::MeterInnerElement::MeterInnerElement):
982         (WebCore::MeterValueElement::valuePseudoId):
983         * html/shadow/MeterShadowElement.h:
984         * html/shadow/SliderThumbElement.cpp:
985         (WebCore::sliderThumbShadowPseudoId):
986         (WebCore::mediaSliderThumbShadowPseudoId):
987         (WebCore::SliderContainerElement::shadowPseudoId):
988         * html/track/AudioTrack.cpp:
989         (WebCore::AudioTrack::alternativeKeyword):
990         (WebCore::AudioTrack::descriptionKeyword):
991         (WebCore::AudioTrack::mainKeyword):
992         (WebCore::AudioTrack::mainDescKeyword):
993         (WebCore::AudioTrack::translationKeyword):
994         (WebCore::AudioTrack::commentaryKeyword):
995         * html/track/TextTrack.cpp:
996         (WebCore::TextTrack::subtitlesKeyword):
997         (WebCore::TextTrack::captionsKeyword):
998         (WebCore::TextTrack::descriptionsKeyword):
999         (WebCore::TextTrack::chaptersKeyword):
1000         (WebCore::TextTrack::metadataKeyword):
1001         (WebCore::TextTrack::forcedKeyword):
1002         (WebCore::TextTrack::disabledKeyword):
1003         (WebCore::TextTrack::hiddenKeyword):
1004         (WebCore::TextTrack::showingKeyword):
1005         * html/track/TextTrackCue.h:
1006         (WebCore::TextTrackCue::cueShadowPseudoId):
1007         * html/track/VTTCue.cpp:
1008         (WebCore::startKeyword):
1009         (WebCore::middleKeyword):
1010         (WebCore::endKeyword):
1011         (WebCore::leftKeyword):
1012         (WebCore::rightKeyword):
1013         (WebCore::verticalGrowingLeftKeyword):
1014         (WebCore::verticalGrowingRightKeyword):
1015         (WebCore::VTTCueBox::vttCueBoxShadowPseudoId):
1016         (WebCore::VTTCue::cueBackdropShadowPseudoId):
1017         (WebCore::VTTCue::determineTextDirection):
1018         (WebCore::VTTCue::markFutureAndPastNodes):
1019         * html/track/VTTRegion.cpp:
1020         (WebCore::VTTRegion::scroll):
1021         (WebCore::VTTRegion::setScroll):
1022         (WebCore::VTTRegion::parseSettingValue):
1023         (WebCore::VTTRegion::textTrackCueContainerScrollingClass):
1024         * html/track/VideoTrack.cpp:
1025         (WebCore::VideoTrack::alternativeKeyword):
1026         (WebCore::VideoTrack::captionsKeyword):
1027         (WebCore::VideoTrack::mainKeyword):
1028         (WebCore::VideoTrack::signKeyword):
1029         (WebCore::VideoTrack::subtitlesKeyword):
1030         (WebCore::VideoTrack::commentaryKeyword):
1031         * html/track/WebVTTElement.cpp:
1032         (WebCore::nodeTypeToTagName):
1033         * html/track/WebVTTElement.h:
1034         * html/track/WebVTTParser.cpp:
1035         (WebCore::WebVTTParser::collectMetadataHeader):
1036         * inspector/InspectorCSSAgent.cpp:
1037         (WebCore::computePseudoClassMask):
1038         * inspector/InspectorPageAgent.cpp:
1039         (WebCore::InspectorPageAgent::sourceMapURLForResource):
1040         * inspector/InspectorStyleSheet.cpp:
1041         (WebCore::selectorsFromSource):
1042         * inspector/PageDebuggerAgent.cpp:
1043         (WebCore::PageDebuggerAgent::sourceMapURLForScript):
1044         * loader/ImageLoader.cpp:
1045         (WebCore::ImageLoader::notifyFinished):
1046         * loader/TextTrackLoader.cpp:
1047         (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
1048         * loader/cache/CachedResourceRequest.cpp:
1049         (WebCore::CachedResourceRequest::initiatorName):
1050         * loader/icon/IconDatabase.cpp:
1051         (WebCore::IconDatabase::defaultDatabaseFilename):
1052         * page/CaptionUserPreferences.cpp:
1053         (WebCore::CaptionUserPreferences::updateCaptionStyleSheetOveride):
1054         * page/CaptionUserPreferencesMediaAF.cpp:
1055         (WebCore::CaptionUserPreferencesMediaAF::captionsBackgroundCSS):
1056         (WebCore::CaptionUserPreferencesMediaAF::captionsTextEdgeCSS):
1057         * page/ContentSecurityPolicy.cpp:
1058         (WebCore::CSPDirectiveList::allowJavaScriptURLs):
1059         (WebCore::CSPDirectiveList::allowInlineEventHandlers):
1060         (WebCore::CSPDirectiveList::allowInlineScript):
1061         (WebCore::CSPDirectiveList::allowInlineStyle):
1062         (WebCore::CSPDirectiveList::allowEval):
1063         (WebCore::ContentSecurityPolicy::reportUnsupportedDirective):
1064         * page/DOMWindow.cpp:
1065         (WebCore::windowsWithUnloadEventListeners):
1066         (WebCore::windowsWithBeforeUnloadEventListeners):
1067         * page/EventHandler.cpp:
1068         (WebCore::EventHandler::dragState):
1069         (WebCore::focusDirectionForKey):
1070         * page/Frame.cpp:
1071         (WebCore::createRegExpForLabels):
1072         * page/NavigatorBase.cpp:
1073         (WebCore::NavigatorBase::platform):
1074         * page/PageVisibilityState.cpp:
1075         (WebCore::pageVisibilityStateString):
1076         * page/SecurityPolicy.cpp:
1077         (WebCore::originAccessMap):
1078         * page/UserContentURLPattern.cpp:
1079         (WebCore::UserContentURLPattern::parse):
1080         * page/animation/CSSPropertyAnimation.cpp:
1081         (WebCore::shadowForBlending):
1082         * page/animation/CompositeAnimation.cpp:
1083         (WebCore::CompositeAnimation::updateKeyframeAnimations):
1084         * platform/Cursor.cpp:
1085         (WebCore::pointerCursor):
1086         (WebCore::crossCursor):
1087         (WebCore::handCursor):
1088         (WebCore::moveCursor):
1089         (WebCore::verticalTextCursor):
1090         (WebCore::cellCursor):
1091         (WebCore::contextMenuCursor):
1092         (WebCore::aliasCursor):
1093         (WebCore::zoomInCursor):
1094         (WebCore::zoomOutCursor):
1095         (WebCore::copyCursor):
1096         (WebCore::noneCursor):
1097         (WebCore::progressCursor):
1098         (WebCore::noDropCursor):
1099         (WebCore::notAllowedCursor):
1100         (WebCore::iBeamCursor):
1101         (WebCore::waitCursor):
1102         (WebCore::helpCursor):
1103         (WebCore::eastResizeCursor):
1104         (WebCore::northResizeCursor):
1105         (WebCore::northEastResizeCursor):
1106         (WebCore::northWestResizeCursor):
1107         (WebCore::southResizeCursor):
1108         (WebCore::southEastResizeCursor):
1109         (WebCore::southWestResizeCursor):
1110         (WebCore::westResizeCursor):
1111         (WebCore::northSouthResizeCursor):
1112         (WebCore::eastWestResizeCursor):
1113         (WebCore::northEastSouthWestResizeCursor):
1114         (WebCore::northWestSouthEastResizeCursor):
1115         (WebCore::columnResizeCursor):
1116         (WebCore::rowResizeCursor):
1117         (WebCore::middlePanningCursor):
1118         (WebCore::eastPanningCursor):
1119         (WebCore::northPanningCursor):
1120         (WebCore::northEastPanningCursor):
1121         (WebCore::northWestPanningCursor):
1122         (WebCore::southPanningCursor):
1123         (WebCore::southEastPanningCursor):
1124         (WebCore::southWestPanningCursor):
1125         (WebCore::westPanningCursor):
1126         (WebCore::grabCursor):
1127         (WebCore::grabbingCursor):
1128         * platform/Language.cpp:
1129         (WebCore::preferredLanguagesOverride):
1130         * platform/LocalizedStrings.cpp:
1131         (WebCore::truncatedStringForLookupMenuItem):
1132         * platform/MIMETypeRegistry.cpp:
1133         (WebCore::mediaMIMETypeMap):
1134         (WebCore::defaultMIMEType):
1135         * platform/SchemeRegistry.cpp:
1136         (WebCore::localURLSchemes):
1137         (WebCore::displayIsolatedURLSchemes):
1138         (WebCore::secureSchemes):
1139         (WebCore::schemesWithUniqueOrigins):
1140         (WebCore::emptyDocumentSchemes):
1141         (WebCore::schemesForbiddenFromDomainRelaxation):
1142         (WebCore::canDisplayOnlyIfCanRequestSchemes):
1143         (WebCore::notAllowingJavascriptURLsSchemes):
1144         (WebCore::schemesAllowingLocalStorageAccessInPrivateBrowsing):
1145         (WebCore::schemesAllowingDatabaseAccessInPrivateBrowsing):
1146         (WebCore::CORSEnabledSchemes):
1147         (WebCore::ContentSecurityPolicyBypassingSchemes):
1148         * platform/ScrollbarTheme.cpp:
1149         (WebCore::ScrollbarTheme::theme):
1150         * platform/URL.cpp:
1151         (WebCore::blankURL):
1152         * platform/animation/Animation.cpp:
1153         (WebCore::Animation::initialName):
1154         * platform/audio/AudioSession.cpp:
1155         (WebCore::AudioSession::sharedSession):
1156         * platform/audio/AudioSession.h:
1157         * platform/audio/HRTFElevation.cpp:
1158         (WebCore::getConcatenatedImpulseResponsesForSubject):
1159         * platform/audio/ios/AudioDestinationIOS.cpp:
1160         (WebCore::audioDestinations):
1161         * platform/graphics/GraphicsLayer.cpp:
1162         (WebCore::repaintRectMap):
1163         * platform/graphics/ImageBuffer.cpp:
1164         (WebCore::ImageBuffer::transformColorSpace):
1165         * platform/graphics/MediaPlayer.cpp:
1166         (WebCore::applicationOctetStream):
1167         (WebCore::textPlain):
1168         (WebCore::codecs):
1169         * platform/graphics/ShadowBlur.cpp:
1170         (WebCore::ScratchBuffer::singleton):
1171         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1172         (WebCore::playerToPrivateMap):
1173         * platform/graphics/filters/SourceAlpha.cpp:
1174         (WebCore::SourceAlpha::effectName):
1175         * platform/graphics/filters/SourceGraphic.cpp:
1176         (WebCore::SourceGraphic::effectName):
1177         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
1178         (WebCore::mimeCommonTypesCache):
1179         (WebCore::mimeModernTypesCache):
1180         * platform/ios/CursorIOS.cpp:
1181         (WebCore::cursor):
1182         * platform/ios/TileControllerMemoryHandlerIOS.cpp:
1183         (WebCore::tileControllerMemoryHandler):
1184         * platform/ios/WebCoreMotionManager.mm:
1185         (+[WebCoreMotionManager sharedManager]):
1186         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
1187         (WebVideoFullscreenModelVideoElement::updateForEventName):
1188         * platform/ios/wak/WKContentObservation.cpp:
1189         (WebThreadGetObservedContentModifiers):
1190         * platform/mac/DragImageMac.mm:
1191         (WebCore::fontFromNSFont):
1192         * platform/mac/ThemeMac.mm:
1193         (WebCore::platformTheme):
1194         * platform/mac/ThreadCheck.mm:
1195         (WebCoreReportThreadViolation):
1196         * platform/mediastream/mac/AVCaptureDeviceManager.h:
1197         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
1198         (WebCore::AVCaptureDeviceManager::singleton):
1199         * platform/mediastream/mac/RealtimeMediaSourceCenterMac.cpp:
1200         (WebCore::RealtimeMediaSourceCenter::platformCenter):
1201         * platform/mock/mediasource/MockBox.cpp:
1202         (WebCore::MockTrackBox::type):
1203         (WebCore::MockInitializationBox::type):
1204         (WebCore::MockSampleBox::type):
1205         * platform/network/HTTPParsers.cpp:
1206         (WebCore::parseXSSProtectionHeader):
1207         * platform/network/ResourceHandle.cpp:
1208         (WebCore::builtinResourceHandleConstructorMap):
1209         (WebCore::builtinResourceHandleSynchronousLoaderMap):
1210         * platform/network/cf/ResourceHandleCFNet.cpp:
1211         (WebCore::allowsAnyHTTPSCertificateHosts):
1212         (WebCore::clientCerts):
1213         * platform/text/AtomicStringKeyedMRUCache.h:
1214         (WebCore::AtomicStringKeyedMRUCache::get):
1215         * platform/text/cf/HyphenationCF.cpp:
1216         (WebCore::cfLocaleCache):
1217         * rendering/RenderBlock.cpp:
1218         (WebCore::continuationOutlineTable):
1219         * rendering/RenderCounter.cpp:
1220         (WebCore::counterMaps):
1221         * rendering/RenderDeprecatedFlexibleBox.cpp:
1222         (WebCore::RenderDeprecatedFlexibleBox::applyLineClamp):
1223         * rendering/RenderLayer.cpp:
1224         (WebCore::RenderLayer::drawPlatformResizerImage):
1225         * rendering/RenderScrollbarTheme.cpp:
1226         (WebCore::RenderScrollbarTheme::renderScrollbarTheme):
1227         * rendering/RenderTheme.cpp:
1228         (WebCore::customFocusRingColor):
1229         * rendering/RenderWidget.cpp:
1230         (WebCore::WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap):
1231         * rendering/shapes/ShapeOutsideInfo.h:
1232         * rendering/style/RenderStyle.cpp:
1233         (WebCore::RenderStyle::hyphenString):
1234         (WebCore::RenderStyle::textEmphasisMarkString):
1235         (WebCore::RenderStyle::initialDashboardRegions):
1236         (WebCore::RenderStyle::noneDashboardRegions):
1237         * rendering/style/RenderStyle.h:
1238         * rendering/svg/RenderSVGPath.cpp:
1239         (WebCore::RenderSVGPath::zeroLengthLinecapPath):
1240         * rendering/svg/RenderSVGShape.cpp:
1241         (WebCore::RenderSVGShape::nonScalingStrokePath):
1242         * rendering/svg/SVGRenderingContext.cpp:
1243         (WebCore::currentContentTransformation):
1244         * rendering/svg/SVGResources.cpp:
1245         (WebCore::clipperFilterMaskerTags):
1246         (WebCore::markerTags):
1247         (WebCore::fillAndStrokeTags):
1248         (WebCore::chainableResourceTags):
1249         * svg/SVGAngle.cpp:
1250         (WebCore::SVGAngle::valueAsString):
1251         * svg/SVGAnimateColorElement.cpp:
1252         (WebCore::attributeValueIsCurrentColor):
1253         * svg/SVGAnimateMotionElement.cpp:
1254         (WebCore::SVGAnimateMotionElement::rotateMode):
1255         * svg/SVGAnimationElement.cpp:
1256         (WebCore::SVGAnimationElement::setCalcMode):
1257         (WebCore::SVGAnimationElement::setAttributeType):
1258         (WebCore::SVGAnimationElement::isAdditive):
1259         (WebCore::SVGAnimationElement::isAccumulated):
1260         (WebCore::inheritsFromProperty):
1261         * svg/SVGFEConvolveMatrixElement.cpp:
1262         (WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthXIdentifier):
1263         (WebCore::SVGFEConvolveMatrixElement::kernelUnitLengthYIdentifier):
1264         (WebCore::SVGFEConvolveMatrixElement::orderXIdentifier):
1265         (WebCore::SVGFEConvolveMatrixElement::orderYIdentifier):
1266         * svg/SVGFEDiffuseLightingElement.cpp:
1267         (WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthXIdentifier):
1268         (WebCore::SVGFEDiffuseLightingElement::kernelUnitLengthYIdentifier):
1269         * svg/SVGFEDropShadowElement.cpp:
1270         (WebCore::SVGFEDropShadowElement::stdDeviationXIdentifier):
1271         (WebCore::SVGFEDropShadowElement::stdDeviationYIdentifier):
1272         * svg/SVGFEGaussianBlurElement.cpp:
1273         (WebCore::SVGFEGaussianBlurElement::stdDeviationXIdentifier):
1274         (WebCore::SVGFEGaussianBlurElement::stdDeviationYIdentifier):
1275         * svg/SVGFEMorphologyElement.cpp:
1276         (WebCore::SVGFEMorphologyElement::radiusXIdentifier):
1277         (WebCore::SVGFEMorphologyElement::radiusYIdentifier):
1278         * svg/SVGFESpecularLightingElement.cpp:
1279         (WebCore::SVGFESpecularLightingElement::kernelUnitLengthXIdentifier):
1280         (WebCore::SVGFESpecularLightingElement::kernelUnitLengthYIdentifier):
1281         * svg/SVGFETurbulenceElement.cpp:
1282         (WebCore::SVGFETurbulenceElement::baseFrequencyXIdentifier):
1283         (WebCore::SVGFETurbulenceElement::baseFrequencyYIdentifier):
1284         * svg/SVGFilterElement.cpp:
1285         (WebCore::SVGFilterElement::filterResXIdentifier):
1286         (WebCore::SVGFilterElement::filterResYIdentifier):
1287         * svg/SVGGlyphMap.h:
1288         (WebCore::SVGGlyphMap::svgGlyphForGlyph):
1289         * svg/SVGLangSpace.cpp:
1290         (WebCore::SVGLangSpace::xmlspace):
1291         (WebCore::SVGLangSpace::addSupportedAttributes):
1292         * svg/SVGMarkerElement.cpp:
1293         (WebCore::SVGMarkerElement::orientTypeIdentifier):
1294         (WebCore::SVGMarkerElement::orientAngleIdentifier):
1295         (WebCore::SVGMarkerElement::synchronizeOrientType):
1296         * svg/SVGStyleElement.cpp:
1297         (WebCore::SVGStyleElement::type):
1298         (WebCore::SVGStyleElement::media):
1299         * svg/SVGTransform.cpp:
1300         (WebCore::SVGTransform::transformTypePrefixForParsing):
1301         * svg/SVGViewSpec.cpp:
1302         (WebCore::SVGViewSpec::viewBoxIdentifier):
1303         (WebCore::SVGViewSpec::preserveAspectRatioIdentifier):
1304         (WebCore::SVGViewSpec::transformIdentifier):
1305         * svg/animation/SVGSMILElement.cpp:
1306         (WebCore::SVGSMILElement::parseClockValue):
1307         (WebCore::SVGSMILElement::isSupportedAttribute):
1308         (WebCore::SVGSMILElement::restart):
1309         (WebCore::SVGSMILElement::fill):
1310         (WebCore::SVGSMILElement::repeatCount):
1311         (WebCore::SVGSMILElement::notifyDependentsIntervalChanged):
1312
1313 2016-01-08  Zalan Bujtas  <zalan@apple.com>
1314
1315         Absolute positioning -webkit-search-cancel-button crashes Safari.
1316         https://bugs.webkit.org/show_bug.cgi?id=152847
1317         <rdar://problem/24112087>
1318
1319         Reviewed by Simon Fraser.
1320
1321         Do not call offsetFromContainer while resolving the painting position for the search/cancel button renderer.
1322         It skips the static positioned parent input renderer, when the search/cancel renderer is absolute positioned.
1323         This patch also fixes a rendering glitch when the margin-right is > 0.
1324
1325         Test: fast/forms/absolute-positioned-custom-search-cancel-crash.html
1326
1327         * rendering/RenderTheme.h:
1328         (WebCore::RenderTheme::paintSearchFieldCancelButton):
1329         (WebCore::RenderTheme::paintSearchFieldResultsDecorationPart):
1330         (WebCore::RenderTheme::paintSearchFieldResultsButton):
1331         * rendering/RenderThemeMac.h:
1332         * rendering/RenderThemeMac.mm:
1333         (WebCore::convertToPaintingPosition):
1334         (WebCore::RenderThemeMac::paintSearchFieldCancelButton):
1335         (WebCore::RenderThemeMac::paintSearchFieldResultsDecorationPart):
1336         (WebCore::RenderThemeMac::paintSearchFieldResultsButton):
1337         (WebCore::RenderThemeMac::convertToPaintingRect): Deleted.
1338
1339 2016-01-08  Simon Fraser  <simon.fraser@apple.com>
1340
1341         Add display-list drawing hooks to platform-specific GraphicsContext files
1342         https://bugs.webkit.org/show_bug.cgi?id=152940
1343
1344         Reviewed by Zalan Bujtas.
1345
1346         Call into the display list recorder for top-level entrypoints implemented in platform-specific
1347         files.
1348         
1349         The convention is that if a function begins with "platform", it's not a top-level
1350         entry point, and should only be called when there's a platform context (i.e. not
1351         recording, and not paintingDisabled).
1352         
1353         A few instances are stubbed out until we have a more complete display list implementation.
1354
1355         * platform/graphics/GraphicsContext.cpp:
1356         (WebCore::GraphicsContext::drawText):
1357         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1358         (WebCore::GraphicsContext::getCTM):
1359         (WebCore::GraphicsContext::savePlatformState):
1360         (WebCore::GraphicsContext::restorePlatformState):
1361         (WebCore::GraphicsContext::drawRect):
1362         (WebCore::GraphicsContext::drawNativeImage):
1363         (WebCore::GraphicsContext::drawLine):
1364         (WebCore::GraphicsContext::drawEllipse):
1365         (WebCore::GraphicsContext::drawConvexPolygon):
1366         (WebCore::GraphicsContext::clipConvexPolygon):
1367         (WebCore::GraphicsContext::fillPath):
1368         (WebCore::GraphicsContext::strokePath):
1369         (WebCore::GraphicsContext::fillRect):
1370         (WebCore::GraphicsContext::clip):
1371         (WebCore::GraphicsContext::clipPath):
1372         (WebCore::GraphicsContext::clipBounds):
1373         (WebCore::GraphicsContext::drawLinesForText):
1374         (WebCore::GraphicsContext::roundToDevicePixels):
1375         (WebCore::GraphicsContext::translate):
1376         (WebCore::GraphicsContext::setPlatformStrokeThickness):
1377         (WebCore::GraphicsContext::setPlatformStrokeStyle):
1378         (WebCore::GraphicsContext::concatCTM):
1379         (WebCore::GraphicsContext::setCTM):
1380         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1381         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1382         (WebCore::GraphicsContext::clearRect):
1383         (WebCore::GraphicsContext::strokeRect):
1384         (WebCore::GraphicsContext::setLineCap):
1385         (WebCore::GraphicsContext::setLineDash):
1386         (WebCore::GraphicsContext::setLineJoin):
1387         (WebCore::GraphicsContext::clipOut):
1388         (WebCore::GraphicsContext::rotate):
1389         (WebCore::GraphicsContext::scale):
1390         (WebCore::GraphicsContext::platformFillRoundedRect):
1391         (WebCore::GraphicsContext::fillRectWithRoundedHole):
1392         (WebCore::GraphicsContext::drawPattern):
1393         (WebCore::GraphicsContext::setPlatformShouldAntialias):
1394         (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
1395         (WebCore::GraphicsContext::isAcceleratedContext):
1396         * platform/graphics/cg/GraphicsContextCG.cpp:
1397         (WebCore::GraphicsContext::savePlatformState):
1398         (WebCore::GraphicsContext::restorePlatformState):
1399         (WebCore::GraphicsContext::drawNativeImage):
1400         (WebCore::GraphicsContext::drawPattern):
1401         (WebCore::GraphicsContext::drawRect):
1402         (WebCore::GraphicsContext::drawLine):
1403         (WebCore::GraphicsContext::drawEllipse):
1404         (WebCore::GraphicsContext::drawConvexPolygon):
1405         (WebCore::GraphicsContext::clipConvexPolygon):
1406         (WebCore::GraphicsContext::applyStrokePattern):
1407         (WebCore::GraphicsContext::applyFillPattern):
1408         (WebCore::GraphicsContext::drawPath):
1409         (WebCore::GraphicsContext::fillPath):
1410         (WebCore::GraphicsContext::strokePath):
1411         (WebCore::GraphicsContext::fillRect):
1412         (WebCore::GraphicsContext::platformFillRoundedRect):
1413         (WebCore::GraphicsContext::fillRectWithRoundedHole):
1414         (WebCore::GraphicsContext::clip):
1415         (WebCore::GraphicsContext::clipOut):
1416         (WebCore::GraphicsContext::clipPath):
1417         (WebCore::GraphicsContext::clipBounds):
1418         (WebCore::GraphicsContext::beginPlatformTransparencyLayer):
1419         (WebCore::GraphicsContext::endPlatformTransparencyLayer):
1420         (WebCore::GraphicsContext::setPlatformShadow):
1421         (WebCore::GraphicsContext::setMiterLimit):
1422         (WebCore::GraphicsContext::clearRect):
1423         (WebCore::GraphicsContext::strokeRect):
1424         (WebCore::GraphicsContext::setLineCap):
1425         (WebCore::GraphicsContext::setLineDash):
1426         (WebCore::GraphicsContext::setLineJoin):
1427         (WebCore::GraphicsContext::scale):
1428         (WebCore::GraphicsContext::rotate):
1429         (WebCore::GraphicsContext::translate):
1430         (WebCore::GraphicsContext::concatCTM):
1431         (WebCore::GraphicsContext::setCTM):
1432         (WebCore::GraphicsContext::getCTM):
1433         (WebCore::GraphicsContext::roundToDevicePixels):
1434         (WebCore::GraphicsContext::drawLinesForText):
1435         (WebCore::GraphicsContext::setURLForRect):
1436         (WebCore::GraphicsContext::setIsCALayerContext):
1437         (WebCore::GraphicsContext::isCALayerContext):
1438         (WebCore::GraphicsContext::setIsAcceleratedContext):
1439         (WebCore::GraphicsContext::isAcceleratedContext):
1440         (WebCore::GraphicsContext::setPlatformTextDrawingMode):
1441         (WebCore::GraphicsContext::setPlatformStrokeColor):
1442         (WebCore::GraphicsContext::setPlatformStrokeThickness):
1443         (WebCore::GraphicsContext::setPlatformFillColor):
1444         (WebCore::GraphicsContext::setPlatformShouldAntialias):
1445         (WebCore::GraphicsContext::setPlatformShouldSmoothFonts):
1446         (WebCore::GraphicsContext::setPlatformAlpha):
1447         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1448         (WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
1449         (WebCore::GraphicsContext::platformFillEllipse):
1450         (WebCore::GraphicsContext::platformStrokeEllipse):
1451
1452 2016-01-08  Simon Fraser  <simon.fraser@apple.com>
1453
1454         Add DisplayList hooks into GraphicsContext
1455         https://bugs.webkit.org/show_bug.cgi?id=152932
1456
1457         Reviewed by Zalan Bujtas.
1458
1459         Add the hooks into GraphicsContext that call into the DisplayListRecorder if there
1460         is one.
1461         
1462         Rename size() to something less ambiguous.
1463         
1464         Out-of-line some DisplayList functions so that the header doesn't need to see
1465         DisplayListItems.h.
1466
1467         * platform/graphics/GraphicsContext.cpp:
1468         (WebCore::GraphicsContext::save):
1469         (WebCore::GraphicsContext::restore):
1470         (WebCore::GraphicsContext::setStrokeThickness):
1471         (WebCore::GraphicsContext::setStrokeStyle):
1472         (WebCore::GraphicsContext::setStrokeColor):
1473         (WebCore::GraphicsContext::setShadow):
1474         (WebCore::GraphicsContext::setLegacyShadow):
1475         (WebCore::GraphicsContext::clearShadow):
1476         (WebCore::GraphicsContext::setFillColor):
1477         (WebCore::GraphicsContext::setShadowsIgnoreTransforms):
1478         (WebCore::GraphicsContext::setShouldAntialias):
1479         (WebCore::GraphicsContext::setShouldSmoothFonts):
1480         (WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts):
1481         (WebCore::GraphicsContext::setImageInterpolationQuality):
1482         (WebCore::GraphicsContext::setAntialiasedFontDilationEnabled):
1483         (WebCore::GraphicsContext::setStrokePattern):
1484         (WebCore::GraphicsContext::setFillPattern):
1485         (WebCore::GraphicsContext::setStrokeGradient):
1486         (WebCore::GraphicsContext::setFillRule):
1487         (WebCore::GraphicsContext::setFillGradient):
1488         (WebCore::GraphicsContext::beginTransparencyLayer):
1489         (WebCore::GraphicsContext::endTransparencyLayer):
1490         (WebCore::GraphicsContext::drawGlyphs):
1491         (WebCore::GraphicsContext::drawImage):
1492         (WebCore::GraphicsContext::drawTiledImage):
1493         (WebCore::GraphicsContext::setTextDrawingMode):
1494         (WebCore::GraphicsContext::fillRect):
1495         (WebCore::GraphicsContext::fillRoundedRect):
1496         (WebCore::GraphicsContext::setAlpha):
1497         (WebCore::GraphicsContext::setCompositeOperation):
1498         (WebCore::GraphicsContext::setDrawLuminanceMask):
1499         (WebCore::GraphicsContext::applyDeviceScaleFactor):
1500         (WebCore::GraphicsContext::applyState):
1501         * platform/graphics/GraphicsContext.h:
1502         (WebCore::GraphicsContext::setDisplayListRecorder):
1503         (WebCore::GraphicsContext::isRecording):
1504         (WebCore::GraphicsContext::setFillRule): Deleted.
1505         (WebCore::GraphicsContext::setShadowsIgnoreTransforms): Deleted.
1506         (WebCore::GraphicsContext::setShouldSubpixelQuantizeFonts): Deleted.
1507         (WebCore::GraphicsContext::setDrawLuminanceMask): Deleted.
1508         * platform/graphics/displaylists/DisplayList.cpp:
1509         (WebCore::DisplayList::DisplayList::clear):
1510         (WebCore::DisplayList::DisplayList::removeItemsFromIndex):
1511         * platform/graphics/displaylists/DisplayList.h:
1512         (WebCore::DisplayList::DisplayList::itemCount):
1513         (WebCore::DisplayList::DisplayList::clear): Deleted.
1514         (WebCore::DisplayList::DisplayList::size): Deleted.
1515         (WebCore::DisplayList::DisplayList::removeItemsFromIndex): Deleted.
1516         * platform/graphics/displaylists/DisplayListRecorder.cpp:
1517         (WebCore::DisplayList::Recorder::save):
1518         (WebCore::DisplayList::Recorder::restore):
1519         * platform/graphics/displaylists/DisplayListRecorder.h:
1520         (WebCore::DisplayList::Recorder::itemCount):
1521         (WebCore::DisplayList::Recorder::size): Deleted.
1522         * platform/graphics/displaylists/DisplayListReplayer.cpp:
1523         (WebCore::DisplayList::Replayer::replay):
1524
1525 2016-01-08  Brady Eidson  <beidson@apple.com>
1526
1527         Modern IDB: imported/w3c/indexeddb/keyorder.htm times out.
1528         https://bugs.webkit.org/show_bug.cgi?id=152929
1529
1530         Reviewed by Alex Christensen.
1531
1532         No new tests (Existing test now runs in the test harness).
1533
1534         * Modules/indexeddb/client/IDBCursorImpl.cpp:
1535         (WebCore::IDBClient::IDBCursor::setGetResult):
1536
1537 2016-01-08  Simon Fraser  <simon.fraser@apple.com>
1538
1539         Consider painting to be disabled on a GraphicsContext with no platform data, and make updatingControlTints() immutable state
1540         https://bugs.webkit.org/show_bug.cgi?id=152927
1541
1542         Reviewed by Tim Horton.
1543
1544         GraphicsContext had setters for paintingDisabled and updatingControlTints, but neither
1545         were changed dynamically.
1546         
1547         We can eliminate paintingDisabled by simply considering a GraphicsContext that was
1548         created with no platform context to be paint-disabled.
1549         
1550         We make updatingControlTints immutable state by providing a constructor that takes
1551         a "NonPaintingReasons" enum, and doesn't create platform data.
1552         
1553         More functions in platform code were protected by if (paintingDisabled())...
1554
1555         * page/FrameView.cpp:
1556         (WebCore::FrameView::paintControlTints):
1557         * platform/graphics/GraphicsContext.cpp:
1558         (WebCore::GraphicsContext::GraphicsContext):
1559         (WebCore::GraphicsContext::fillRoundedRect):
1560         (WebCore::GraphicsContext::setUpdatingControlTints): Deleted.
1561         (WebCore::GraphicsContext::clip): Deleted.
1562         * platform/graphics/GraphicsContext.h:
1563         (WebCore::GraphicsContext::paintingDisabled):
1564         (WebCore::GraphicsContext::updatingControlTints):
1565         (WebCore::GraphicsContextState::GraphicsContextState): Deleted.
1566         (WebCore::GraphicsContext::setPaintingDisabled): Deleted.
1567         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1568         (WebCore::GraphicsContext::GraphicsContext):
1569         (WebCore::GraphicsContext::platformInit):
1570         * platform/graphics/cg/GraphicsContextCG.cpp:
1571         (WebCore::GraphicsContext::platformInit):
1572         (WebCore::GraphicsContext::savePlatformState):
1573         (WebCore::GraphicsContext::restorePlatformState):
1574         (WebCore::GraphicsContext::drawNativeImage):
1575         (WebCore::GraphicsContext::drawPattern):
1576         (WebCore::GraphicsContext::drawRect):
1577         (WebCore::GraphicsContext::applyStrokePattern):
1578         (WebCore::GraphicsContext::applyFillPattern):
1579         (WebCore::GraphicsContext::clip):
1580         (WebCore::GraphicsContext::clipBounds):
1581         (WebCore::GraphicsContext::setLineDash):
1582         (WebCore::GraphicsContext::roundToDevicePixels):
1583         (WebCore::GraphicsContext::setPlatformImageInterpolationQuality):
1584         (WebCore::GraphicsContext::setIsCALayerContext):
1585         (WebCore::GraphicsContext::isCALayerContext):
1586         (WebCore::GraphicsContext::setIsAcceleratedContext):
1587         (WebCore::GraphicsContext::isAcceleratedContext):
1588         (WebCore::GraphicsContext::platformApplyDeviceScaleFactor):
1589         * platform/graphics/win/GraphicsContextCGWin.cpp:
1590         (WebCore::GraphicsContext::platformInit):
1591         (WebCore::GraphicsContext::GraphicsContext): Deleted.
1592         * platform/graphics/win/GraphicsContextCairoWin.cpp:
1593         (WebCore::GraphicsContext::platformInit):
1594         (WebCore::GraphicsContext::GraphicsContext): Deleted.
1595
1596 2016-01-08  Anders Carlsson  <andersca@apple.com>
1597
1598         InputType::findClosestTickMarkValue should return an Optional<Decimal>
1599         https://bugs.webkit.org/show_bug.cgi?id=152931
1600
1601         Reviewed by Andreas Kling.
1602
1603         This will make it possible to get rid of the notion of infinity from Decimal, allowing for more code simplification.
1604
1605         * html/HTMLInputElement.cpp:
1606         (WebCore::HTMLInputElement::findClosestTickMarkValue):
1607         * html/HTMLInputElement.h:
1608         * html/InputType.cpp:
1609         (WebCore::InputType::findClosestTickMarkValue):
1610         * html/InputType.h:
1611         * html/RangeInputType.cpp:
1612         (WebCore::RangeInputType::findClosestTickMarkValue):
1613         * html/RangeInputType.h:
1614         * html/shadow/SliderThumbElement.cpp:
1615         (WebCore::SliderThumbElement::setPositionFromPoint):
1616
1617 2016-01-08  Brady Eidson  <beidson@apple.com>
1618
1619         Modern IDB: IDBBindingUtilities chokes on unicode strings for get/set.
1620         https://bugs.webkit.org/show_bug.cgi?id=152921
1621
1622         Reviewed by Alex Christensen.
1623
1624         No new tests (Covered by existing tests).
1625
1626         * bindings/js/IDBBindingUtilities.cpp:
1627         (WebCore::get): Don't do a potentially lossy utf8() conversion on the string.
1628         (WebCore::set): Ditto.
1629
1630 2016-01-08  Per Arne Vollan  <peavo@outlook.com>
1631
1632         [WinCairo] Support more video formats.
1633         https://bugs.webkit.org/show_bug.cgi?id=152890
1634
1635         Reviewed by Alex Christensen.
1636
1637         Use MediaFoundation api to detect all supported video/audio formats.
1638
1639         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1640         (WebCore::MediaPlayerPrivateMediaFoundation::getSupportedTypes):
1641         (WebCore::MediaPlayerPrivateMediaFoundation::supportsType):
1642
1643 2016-01-08  Brady Eidson  <beidson@apple.com>
1644
1645         Modern IDB: Blocked event can fire on a delete request even after the last open connection has closed.
1646         https://bugs.webkit.org/show_bug.cgi?id=152896
1647
1648         Reviewed by Alex Christensen.
1649
1650         No new tests (Progression in many tests).
1651
1652         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
1653         (WebCore::IDBClient::IDBFactory::deleteDatabase):
1654         
1655         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1656         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation): Allow for handling 2+ delete operations in a row.
1657         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore): Ditto.
1658         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient): Call "notifyCurrentRequestConnectionClosedOrFiredVersionChangeEvent"
1659           after the connection is actually removed from the set of open connections.
1660         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1661
1662 2016-01-08  Zalan Bujtas  <zalan@apple.com>
1663
1664         Hovering link on http://help.apple.com/appletv/#/ does not show text underline.
1665         https://bugs.webkit.org/show_bug.cgi?id=152906
1666         <rdar://problem/23339617>
1667
1668         Reviewed by Simon Fraser.
1669
1670         GraphicsContext::computeLineBoundsAndAntialiasingModeForText() always integral ceils the origin y position to offset underline text.
1671         This additional visual overflow offset is not taken into account by visualOverflowForDecorations().
1672         Unfortunately we can't compute the exact same offset value while collecting repaint rects, because
1673         computeLineBoundsAndAntialiasingModeForText() uses CTM scaling before adjusting the offset position.
1674         Use 1px (css) bottom offset to cover this underling overflow.
1675
1676         Test: fast/css3-text/css3-text-decoration/text-underline-position/underline-visual-overflow-with-subpixel-position.html
1677
1678         * platform/graphics/GraphicsContext.cpp:
1679         (WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
1680         * rendering/SimpleLineLayoutResolver.cpp: Add visual overflow to simple line layout.
1681         (WebCore::SimpleLineLayout::RunResolver::Run::rect):
1682         (WebCore::SimpleLineLayout::RunResolver::RunResolver):
1683         * rendering/SimpleLineLayoutResolver.h:
1684         * style/InlineTextBoxStyle.cpp:
1685         (WebCore::visualOverflowForDecorations):
1686
1687 2016-01-08  Brady Eidson  <beidson@apple.com>
1688
1689         Modern IDB: imported/w3c/indexeddb/idbobjectstore_createIndex6-event_order.htm fails.
1690         https://bugs.webkit.org/show_bug.cgi?id=152891
1691
1692         Reviewed by Alex Christensen.
1693
1694         No new tests (At least two failing tests now pass).
1695
1696         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1697         (WebCore::IDBClient::IDBRequest::dispatchEvent): Whenever we add the IDBTransaction as an event target,
1698           also add the IDBDatabase.
1699
1700 2016-01-07  Antti Koivisto  <antti@apple.com>
1701
1702         Enable selector filtering for shadow trees
1703         https://bugs.webkit.org/show_bug.cgi?id=152831
1704
1705         Reviewed by Simon Fraser.
1706
1707         Selector filtering doesn't currently work in shadow trees making style resolve for them slow.
1708         This is because SelectorFilter is not in "consistent" state.
1709
1710         This patch moves SelectorFilter ownership from StyleResolver to TreeResolver and guarantees
1711         it is always upadated consistently. It eliminates a bunch of now unnecessary consistency checks
1712         and special cases.
1713
1714         * css/ElementRuleCollector.cpp:
1715         (WebCore::ElementRuleCollector::ElementRuleCollector):
1716
1717             Assert for consistency instead of testing for it.
1718
1719         (WebCore::ElementRuleCollector::matchedResult):
1720         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
1721
1722             Selector filter can now be used if it exists.
1723
1724         * css/ElementRuleCollector.h:
1725         (WebCore::ElementRuleCollector::ElementRuleCollector): Deleted.
1726         * css/RuleSet.cpp:
1727         (WebCore::RuleSet::addRule):
1728
1729             Disable selector filtering for custom shadow pseudo rules. They are resolved by shadow DOM resolver
1730             but may contain components matching the normal DOM.
1731
1732         * css/RuleSet.h:
1733         (WebCore::RuleData::descendantSelectorIdentifierHashes):
1734         (WebCore::RuleData::disableSelectorFiltering):
1735         (WebCore::RuleData::compilationStatus):
1736         (WebCore::RuleData::compiledSelectorCodeRef):
1737         * css/SelectorFilter.cpp:
1738         (WebCore::collectElementIdentifierHashes):
1739         (WebCore::SelectorFilter::parentStackIsConsistent):
1740
1741             New consistency conditions. This is now used for asserts only.
1742
1743         (WebCore::SelectorFilter::pushParentStackFrame):
1744         (WebCore::SelectorFilter::popParentStackFrame):
1745
1746             Selector filter only filters the current tree context, replace parentOrShadowHostElement with parentElement.
1747
1748         (WebCore::SelectorFilter::setupParentStack): Deleted.
1749
1750             No longer needed.
1751
1752         (WebCore::SelectorFilter::pushParent):
1753
1754             Remove consistency check. These cases no longer happen.
1755
1756         * css/SelectorFilter.h:
1757         (WebCore::SelectorFilter::popParent):
1758         (WebCore::SelectorFilter::parentStackIsEmpty):
1759         (WebCore::SelectorFilter::fastRejectSelector):
1760         (WebCore::SelectorFilter::parentStackIsConsistent): Deleted.
1761         * css/StyleInvalidationAnalysis.cpp:
1762         (WebCore::StyleInvalidationAnalysis::invalidateIfNeeded):
1763         (WebCore::StyleInvalidationAnalysis::invalidateStyle):
1764         * css/StyleResolver.cpp:
1765         (WebCore::StyleResolver::appendAuthorStyleSheets):
1766         (WebCore::StyleResolver::addKeyframeStyle):
1767         (WebCore::StyleResolver::initElement):
1768         (WebCore::StyleResolver::State::initForStyleResolve):
1769
1770             We no longer owner the selector filter. Move it to State.
1771
1772         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
1773         (WebCore::isAtShadowBoundary):
1774         (WebCore::StyleResolver::styleForElement):
1775         (WebCore::StyleResolver::pseudoStyleForElement):
1776         (WebCore::StyleResolver::pseudoStyleRulesForElement):
1777         (WebCore::StyleResolver::pushParentElement): Deleted.
1778         (WebCore::StyleResolver::popParentElement): Deleted.
1779
1780             No need for this logic.
1781
1782         * css/StyleResolver.h:
1783         (WebCore::StyleResolver::ruleSets):
1784         (WebCore::StyleResolver::mediaQueryEvaluator):
1785         (WebCore::StyleResolver::State::document):
1786         (WebCore::StyleResolver::State::setAuthorRollback):
1787         (WebCore::StyleResolver::State::setUserRollback):
1788         (WebCore::StyleResolver::State::selectorFilter):
1789         (WebCore::StyleResolver::state):
1790         (WebCore::checkRegionSelector):
1791         (WebCore::StyleResolver::selectorFilter): Deleted.
1792         (WebCore::StyleResolverParentPusher::StyleResolverParentPusher): Deleted.
1793         (WebCore::StyleResolverParentPusher::push): Deleted.
1794         (WebCore::StyleResolverParentPusher::~StyleResolverParentPusher): Deleted.
1795         * style/StyleTreeResolver.cpp:
1796
1797             This now owns the selector filter for a tree context.
1798
1799         (WebCore::Style::SelectorFilterPusher::SelectorFilterPusher):
1800         (WebCore::Style::SelectorFilterPusher::push):
1801         (WebCore::Style::SelectorFilterPusher::~SelectorFilterPusher):
1802         (WebCore::Style::TreeResolver::TreeResolver):
1803         (WebCore::Style::TreeResolver::styleForElement):
1804         (WebCore::Style::TreeResolver::createRenderTreeForSlotAssignees):
1805         (WebCore::Style::TreeResolver::createRenderTreeRecursively):
1806         (WebCore::Style::TreeResolver::resolveChildren):
1807         (WebCore::Style::TreeResolver::resolveRecursively):
1808
1809             Push the filter in a few more places to keep it consistent in shadow trees.
1810
1811         * style/StyleTreeResolver.h:
1812
1813 2016-01-07  Zalan Bujtas  <zalan@apple.com>
1814
1815         Move computeLineBoundsForText from GraphicsContext* to GraphicsContext.
1816         https://bugs.webkit.org/show_bug.cgi?id=152882
1817
1818         Reviewed by Simon Fraser.
1819
1820         There is nothing platform specific about it.
1821
1822         No change in functionality.
1823
1824         * platform/graphics/GraphicsContext.cpp:
1825         (WebCore::GraphicsContext::computeUnderlineBoundsForText): Rename to reflect its usage.
1826         * platform/graphics/GraphicsContext.h:
1827         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1828         (WebCore::GraphicsContext::computeLineBoundsForText): Deleted.
1829         * platform/graphics/cg/GraphicsContextCG.cpp:
1830         (WebCore::GraphicsContext::drawLinesForText):
1831         (WebCore::GraphicsContext::computeLineBoundsForText): Deleted.
1832         * rendering/TextDecorationPainter.cpp:
1833         (WebCore::drawSkipInkUnderline):
1834
1835 2016-01-07  Brady Eidson  <beidson@apple.com>
1836
1837         Modern IDB: Success-after-open event should only have the IDBOpenDBRequest as its target.
1838         https://bugs.webkit.org/show_bug.cgi?id=152875
1839
1840         Reviewed by Alex Christensen.
1841
1842         No new tests (At least 2 failing tests now pass).
1843
1844         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
1845         (WebCore::IDBClient::IDBOpenDBRequest::fireSuccessAfterVersionChangeCommit):
1846
1847         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1848         (WebCore::IDBClient::IDBRequest::dispatchEvent): Only add the transaction and database as potential
1849           targets for this event if it is *not* the success-after-open event.
1850         * Modules/indexeddb/client/IDBRequestImpl.h:
1851
1852 2016-01-07  Brent Fulgham  <bfulgham@apple.com>
1853
1854         Correct missing EXT_sRGB Format Handling
1855         https://bugs.webkit.org/show_bug.cgi?id=152876
1856         <rdar://problem/23284389>
1857
1858         Reviewed by Alex Christensen.
1859
1860         Tested by WebGL 1.0.4 suite.
1861
1862         * platform/graphics/GraphicsContext3D.cpp:
1863         (getDataFormat): Handle missing SRGB and SRGB_ALPHA cases.
1864         * platform/graphics/GraphicsContext3D.h: Add missing SRGB_ALPHA value from the Khronos standard.
1865         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
1866         (WebCore::GraphicsContext3D::texImage2D): Add an assertion that we are not being handed
1867         an internal format to a method that works with normal formats.
1868
1869 2016-01-07  Simon Fraser  <simon.fraser@apple.com>
1870
1871         Use an appropriate buffer format for swipe snapshots
1872         https://bugs.webkit.org/show_bug.cgi?id=152880
1873         rdar://problem/23728299
1874
1875         Reviewed by Tim Horton.
1876
1877         Choose an appropriate buffer format for swipe snapshots, and avoid converting
1878         them to YUV422.
1879
1880         * platform/graphics/cocoa/IOSurface.h:
1881         * platform/graphics/cocoa/IOSurface.mm:
1882         (IOSurface::allowConversionFromFormatToFormat):
1883
1884 2016-01-07  Jer Noble  <jer.noble@apple.com>
1885
1886         [EME] Secure stop information not written to disk
1887         https://bugs.webkit.org/show_bug.cgi?id=152855
1888
1889         Reviewed by Eric Carlson.
1890
1891         Two separate bugs for the two APIs provided by AVFoundation. For the AVStreamSession path,
1892         we were not calling the lazy-creation function which creates the AVStreamSession, and were
1893         rather accessing the ivar directly. For the AVContentKeySession, we were not creating the
1894         intermediate paths containing the secure stop database.
1895
1896         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
1897         (WebCore::CDMSessionAVContentKeySession::contentKeySession):
1898         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1899         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
1900
1901 2016-01-07  Zalan Bujtas  <zalan@apple.com>
1902
1903         Use wavy offset for decoration painting when line style is TextDecorationStyleWavy.
1904         https://bugs.webkit.org/show_bug.cgi?id=152856
1905
1906         Reviewed by Simon Fraser.
1907
1908         No change in functionality.
1909
1910         * rendering/TextDecorationPainter.cpp:
1911         (WebCore::TextDecorationPainter::paintTextDecoration):
1912
1913 2016-01-07  Brady Eidson  <beidson@apple.com>
1914
1915         Modern IDB: Various imported/w3c/indexeddb tests fail due to expecting the wrong exception.
1916         https://bugs.webkit.org/show_bug.cgi?id=152866
1917
1918         Reviewed by Alex Christensen.
1919
1920         No new tests (5 skipped tests now pass).
1921
1922         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1923         (WebCore::IDBClient::IDBObjectStore::putOrAdd): Reorder the exceptions, violating the spec but matching
1924           a vast majority of browsers.
1925         (WebCore::IDBClient::IDBObjectStore::deleteFunction): Ditto.
1926         (WebCore::IDBClient::IDBObjectStore::clear): Ditto.
1927         (WebCore::IDBClient::IDBObjectStore::doCount): Ditto.
1928
1929 2016-01-07  Zalan Bujtas  <zalan@apple.com>
1930
1931         Remove unused shouldAntialias parameter from GraphicsContext::computeLineBoundsAndAntialiasingModeForText()
1932         https://bugs.webkit.org/show_bug.cgi?id=152859
1933
1934         Reviewed by Simon Fraser.
1935
1936         No change in functionality.
1937
1938         * platform/graphics/GraphicsContext.cpp:
1939         (WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
1940         * platform/graphics/GraphicsContext.h:
1941         * platform/graphics/cairo/GraphicsContextCairo.cpp:
1942         (WebCore::GraphicsContext::computeLineBoundsForText):
1943         (WebCore::GraphicsContext::drawLinesForText):
1944         * platform/graphics/cg/GraphicsContextCG.cpp:
1945         (WebCore::GraphicsContext::computeLineBoundsForText):
1946         (WebCore::GraphicsContext::drawLinesForText):
1947
1948 2016-01-07  Brady Eidson  <beidson@apple.com>
1949
1950         Modern IDB: imported/w3c/indexeddb/idbcursor-continue.htm fails.
1951         https://bugs.webkit.org/show_bug.cgi?id=152849
1952
1953         Reviewed by Alex Christensen.
1954
1955         No new tests (At least one failing test now passes).
1956
1957         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
1958         (WebCore::IDBServer::MemoryIndexCursor::iterate): Don't allow returning an iterator outside of
1959           the cursor's assigned range.
1960
1961 2016-01-07  Zalan Bujtas  <zalan@apple.com>
1962
1963         Incorrect position: fixed; rendering when child of position:relative/sticky.
1964         https://bugs.webkit.org/show_bug.cgi?id=147284
1965
1966         Reviewed by Simon Fraser and David Hyatt.
1967
1968         Computing logical left for positioned objects should take the relative positioned ancestors' offset
1969         into account.
1970
1971         Tests: fast/block/positioning/fixed-container-with-relative-parent.html
1972                fast/block/positioning/fixed-container-with-sticky-parent.html
1973
1974         * rendering/RenderBox.cpp:
1975         (WebCore::computeInlineStaticDistance):
1976
1977 2016-01-06  Simon Fraser  <simon.fraser@apple.com>
1978
1979         Initial implementation files for display-list recording and playback
1980         https://bugs.webkit.org/show_bug.cgi?id=152816
1981
1982         Reviewed by Zalan Bujtas.
1983
1984         Add files for:
1985         - DisplayList, a class that holds a vector of display items, and in the future will hold metadata
1986           on the list for optimizations etc.
1987         - DisplayList::Recorder, the outward-facing recording API which GraphicsContext will
1988           call into.
1989         - DisplayList::Replayer, which plays back a DisplayList, possibly applying optimizations.
1990         - Various DisplayList::Items, one type for each display list operation. They cover most of the
1991           GraphicsContext functionality, other than clipping to an image buffer. Text drawing is stubbed
1992           out for now.
1993
1994         Added a "DisplayLists" log channel.
1995
1996         Added GraphicsContextState functions for tracking state deltas with change bits. It may
1997         make sense to combine GraphicsContextStateChange and GraphicsContextState, and use the
1998         dirty bits in non-display-list drawing as well.
1999
2000         * CMakeLists.txt:
2001         * WebCore.xcodeproj/project.pbxproj:
2002         * platform/Logging.h:
2003         * platform/graphics/GraphicsContext.h:
2004         * platform/graphics/displaylists/DisplayList.cpp: Added.
2005         (WebCore::DisplayList::DisplayList::description):
2006         (WebCore::DisplayList::DisplayList::dump):
2007         (WebCore::operator<<):
2008         * platform/graphics/displaylists/DisplayListItems.cpp: Added.
2009         * platform/graphics/displaylists/DisplayListItems.h: Added.
2010         * platform/graphics/displaylists/DisplayListRecorder.cpp: Added.
2011         * platform/graphics/displaylists/DisplayListRecorder.h: Added.
2012         * platform/graphics/displaylists/DisplayListReplayer.cpp: Added.
2013         (WebCore::DisplayList::Replayer::Replayer):
2014         (WebCore::DisplayList::Replayer::~Replayer):
2015         (WebCore::DisplayList::Replayer::replay):
2016         * platform/graphics/displaylists/DisplayListReplayer.h: Added.
2017
2018 2016-01-07  Chris Dumez  <cdumez@apple.com>
2019
2020         Directly-composited animated GIFs never resume once scrolled offscreen
2021         https://bugs.webkit.org/show_bug.cgi?id=152817
2022         <rdar://problem/19982020>
2023
2024         Reviewed by Daniel Bates.
2025
2026         Directly-composited animated GIFs would never resume once scrolled
2027         offscreen. This is because calling repaint() in this case would not
2028         cause BitmapImage::draw() to be called and the animation would thus
2029         not be resumed. To address the problem,
2030         repaintForPausedImageAnimationsIfNeeded() now calls
2031         RenderBoxModelObject::contentChanged(ImageChanged) in addition to
2032         repaint() to make sure the animation actually gets resumed, even in
2033         the directly-composited animated GIF case.
2034
2035         Test: fast/images/composited-animated-gif-outside-viewport.html
2036
2037         * platform/graphics/BitmapImage.h:
2038         Make currentFrame() public so it can be exposed via Internals for the
2039         purpose of testing.
2040
2041         * rendering/RenderElement.cpp:
2042         (WebCore::RenderElement::repaintForPausedImageAnimationsIfNeeded):
2043         Call RenderBoxModelObject::contentChanged(ImageChanged) in addition to
2044         calling repaint() to make sure the animation actually gets resumed in
2045         the directly-composited animated GIFs case.
2046
2047         * testing/Internals.cpp:
2048         (WebCore::Internals::imageFrameIndex):
2049         * testing/Internals.h:
2050         * testing/Internals.idl:
2051         Expose new "unsigned long imageFrameIndex(Element)" operation on
2052         Internals so layout tests can better check if an image is actually
2053         animating. Previously, we would rely on the output of
2054         internals.hasPausedImageAnimations(Element) but this is not sufficient
2055         to cover this bug as our rendering code believed it has resumed the
2056         animations but the GIF was not actually animating due to it being
2057         directly-composited.
2058
2059 2016-01-07  Michael Catanzaro  <mcatanzaro@igalia.com>
2060
2061         [SOUP] Consider reducing max simultaneous connections
2062         https://bugs.webkit.org/show_bug.cgi?id=137282
2063
2064         Reviewed by Carlos Garcia Campos.
2065
2066         Reduce max simultaneous connections from 35 to 17, because (a) all major browsers except
2067         Chrome use 17, and (b) Chrome uses 10. The only reason we previously used 35 was that other
2068         browsers were using 35 at the time.
2069
2070         * platform/network/soup/SoupNetworkSession.cpp:
2071         (WebCore::SoupNetworkSession::SoupNetworkSession):
2072
2073 2016-01-06  Antti Koivisto  <antti@apple.com>
2074
2075         Factor free standing tree style resolve functions into a class
2076         https://bugs.webkit.org/show_bug.cgi?id=152786
2077
2078         Reviewed by Simon Fraser.
2079
2080         Factor the free standing tree style resolve functions into a class that can keep state.
2081         Style::TreeResolver instances resolve a single tree scope. It is instantiated for resolving
2082         the document style and then recursively for each encountered shadow tree.
2083
2084         This will enable new features and optimizations later.
2085
2086         * dom/Document.cpp:
2087         (WebCore::Document::recalcStyle):
2088
2089             Move the root style computation code back to Document. It fits better here and avoid some
2090             awkwardness with style resolver construction order.
2091
2092         * style/StyleResolveTree.cpp:
2093         (WebCore::Style::TreeResolver::TreeResolver):
2094
2095             TreeResolver knows the current tree context and the StyleResolver to use for it.
2096             Switch the functions to use these instead of recomputing them repeatedly.
2097
2098         (WebCore::Style::shouldCreateRenderer):
2099         (WebCore::Style::TreeResolver::styleForElement):
2100         (WebCore::Style::moveToFlowThreadIfNeeded):
2101         (WebCore::Style::TreeResolver::createRenderer):
2102         (WebCore::Style::updateTextRendererAfterContentChange):
2103         (WebCore::Style::TreeResolver::createRenderTreeForChildren):
2104         (WebCore::Style::TreeResolver::createRenderTreeForShadowRoot):
2105         (WebCore::Style::needsPseudoElement):
2106         (WebCore::Style::TreeResolver::createRenderTreeForBeforeOrAfterPseudoElement):
2107         (WebCore::Style::TreeResolver::createRenderTreeForSlotAssignees):
2108         (WebCore::Style::TreeResolver::createRenderTreeRecursively):
2109
2110             Rename to reduce the use of confusing "attach" terminology.
2111
2112         (WebCore::Style::pseudoStyleCacheIsInvalid):
2113         (WebCore::Style::TreeResolver::resolveLocally):
2114         (WebCore::Style::resolveTextNode):
2115         (WebCore::Style::TreeResolver::resolveChildAtShadowBoundary):
2116         (WebCore::Style::TreeResolver::resolveShadowTree):
2117         (WebCore::Style::TreeResolver::resolveBeforeOrAfterPseudoElement):
2118         (WebCore::Style::TreeResolver::resolveChildren):
2119         (WebCore::Style::TreeResolver::resolveSlotAssignees):
2120         (WebCore::Style::TreeResolver::resolveRecursively):
2121         (WebCore::Style::TreeResolver::resolve):
2122         (WebCore::Style::detachRenderTree):
2123         (WebCore::Style::styleForElement): Deleted.
2124         (WebCore::Style::createRendererIfNeeded): Deleted.
2125         (WebCore::Style::attachChildren): Deleted.
2126         (WebCore::Style::attachShadowRoot): Deleted.
2127         (WebCore::Style::attachBeforeOrAfterPseudoElementIfNeeded): Deleted.
2128         (WebCore::Style::attachSlotAssignees): Deleted.
2129         (WebCore::Style::attachRenderTree): Deleted.
2130         (WebCore::Style::resolveLocal): Deleted.
2131         (WebCore::Style::resolveChildAtShadowBoundary): Deleted.
2132         (WebCore::Style::resolveShadowTree): Deleted.
2133         (WebCore::Style::updateBeforeOrAfterPseudoElement): Deleted.
2134         (WebCore::Style::resolveChildren): Deleted.
2135         (WebCore::Style::resolveSlotAssignees): Deleted.
2136         (WebCore::Style::resolveTree): Deleted.
2137         * style/StyleResolveTree.h:
2138
2139 2016-01-07  Doug Russell  <d_russell@apple.com>
2140
2141         AX: AXObjectCacheMac is passing WebCore enum values directly to VoiceOver
2142         https://bugs.webkit.org/show_bug.cgi?id=151755
2143
2144         Reviewed by Chris Fleizach.
2145
2146         No new tests, covered by existing tests.
2147
2148         * accessibility/mac/AXObjectCacheMac.mm:
2149         (platformChangeTypeForWebCoreChangeType):
2150         (platformEditTypeForWebCoreEditType):
2151         (platformDirectionForWebCoreDirection):
2152         (platformGranularityForWebCoreGranularity):
2153         (WebCore::AXObjectCache::postTextStateChangePlatformNotification):
2154         (WebCore::textReplacementChangeDictionary):
2155         (WebCore::AXObjectCache::postTextReplacementPlatformNotification):
2156
2157 2016-01-06  Brady Eidson  <beidson@apple.com>
2158
2159         Modern IDB: Fix up IDBDatabaseIdentifier hash issues.
2160         https://bugs.webkit.org/show_bug.cgi?id=152822
2161
2162         Reviewed by Alex Christensen.
2163
2164         No new tests (No explicitly testable behavior change, existing tests pass, flakiness will be reduced).
2165
2166         * Modules/indexeddb/IDBDatabaseIdentifier.h:
2167         (WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
2168         (WebCore::IDBDatabaseIdentifier::isEmpty):
2169         (WebCore::IDBDatabaseIdentifierHashTraits::isEmptyValue):
2170         * page/SecurityOriginData.h:
2171
2172 2016-01-06  Simon Fraser  <simon.fraser@apple.com>
2173
2174         Sort the project file.
2175
2176         * WebCore.xcodeproj/project.pbxproj:
2177
2178 2016-01-06  Simon Fraser  <simon.fraser@apple.com>
2179
2180         Add a setting and preferences to enable display-list drawing. Does nothing yet.
2181         https://bugs.webkit.org/show_bug.cgi?id=152807
2182
2183         Reviewed by Zalan Bujtas.
2184
2185         Setting for display-list drawing.
2186
2187         * page/Settings.in:
2188
2189 2016-01-06  Eric Carlson  <eric.carlson@apple.com>
2190
2191         AirPlay route availability event not always sent
2192         https://bugs.webkit.org/show_bug.cgi?id=152802
2193
2194         Reviewed by Jer Noble.
2195
2196         Test: media/airplay-target-availability.html
2197
2198         * Modules/mediasession/WebMediaSessionManager.cpp:
2199         (WebCore::mediaProducerStateString): Log the new flags.
2200         (WebCore::WebMediaSessionManager::clientStateDidChange): Schedule a client reconfiguration if
2201           the 'requires monitoring', 'has listener', or 'has audio or video' flags have changed.
2202         (WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring): Start monitoring if
2203           at least one client has a listener and at least one has audio/video.
2204
2205         * html/HTMLMediaElement.cpp:
2206         (WebCore::HTMLMediaElement::mediaState): Set new flags.
2207         * html/HTMLMediaElement.h:
2208
2209         * page/MediaProducer.h: Define new flags. Add new state enum.
2210
2211         * platform/graphics/MediaPlaybackTargetContext.h: Initial state is "Unknown".
2212
2213         * platform/mock/MediaPlaybackTargetMock.h:
2214         * platform/mock/MediaPlaybackTargetPickerMock.cpp:
2215         (WebCore::MediaPlaybackTargetPickerMock::externalOutputDeviceAvailable): Enums not bitfields.
2216         (WebCore::MediaPlaybackTargetPickerMock::startingMonitoringPlaybackTargets): Ditto. Don't make
2217           device change callback if the device state is "Unknown".
2218         (WebCore::MediaPlaybackTargetPickerMock::setState): Ditto.
2219         * platform/mock/MediaPlaybackTargetPickerMock.h:
2220
2221         * testing/Internals.cpp:
2222         (WebCore::Internals::setMockMediaPlaybackTargetPickerState): Support new state.
2223
2224 2016-01-06  Brady Eidson  <beidson@apple.com>
2225
2226         Modern IDB: storage/indexeddb/odd-strings.html is flaky.
2227         https://bugs.webkit.org/show_bug.cgi?id=152800
2228
2229         Reviewed by Alex Christensen.
2230
2231         No new tests (Existing flaky test is now rock solid and unskipped).
2232
2233         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2234         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
2235         (WebCore::IDBClient::IDBDatabase::maybeCloseInServer): Only refuse to close in the server if there
2236           are active transactions. In the case of page navigation where stop() has been called on active DOM objects,
2237           there will never be any active transactions.
2238         
2239         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2240         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
2241
2242 2016-01-06  Brady Eidson  <beidson@apple.com>
2243
2244         Modern IDB: storage/indexeddb/intversion-gated-on-delete.html is flaky.
2245         https://bugs.webkit.org/show_bug.cgi?id=152795
2246
2247         Reviewed by Alex Christensen.
2248
2249         No new tests (At least one failing test now passes).
2250
2251         Change the HashSet of open connection into a ListHashSet.
2252         
2253         This enforces a reliable order of event delivery, which this test relies on, 
2254         and which seems better in general.
2255
2256         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2257         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
2258         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2259
2260 2016-01-06  Simon Fraser  <simon.fraser@apple.com>
2261
2262         [iOS] Revert overflow:hidden on the body affecting viewport scale (r186786)
2263         https://bugs.webkit.org/show_bug.cgi?id=152803
2264         rdar://problem/22242515
2265
2266         Reviewed by Tim Horton.
2267
2268         You can't assume that if an author uses overflow:hidden on the body, they have no
2269         content outside the body that is important. Sites like Google Translate put
2270         abspos elements outside the body.
2271         
2272         So revert the change.
2273
2274         * page/FrameView.cpp:
2275         (WebCore::FrameView::contentsSizeRespectingOverflow): Deleted.
2276         * page/FrameView.h:
2277
2278 2016-01-06  Brent Fulgham  <bfulgham@apple.com>
2279
2280         Port blocking bypass issue using 307 redirect
2281         https://bugs.webkit.org/show_bug.cgi?id=152801
2282         <rdar://problem/24048554>
2283
2284         Reviewed by Anders Carlsson.
2285
2286         Tested by http/tests/security/blocked-on-redirect.html.
2287
2288         Make sure that 307 redirects check the requested URL via 'portAllowed'. 
2289
2290         * loader/DocumentLoader.cpp:
2291         (WebCore::DocumentLoader::willSendRequest): Confirm that the requested port
2292         is valid, and block load if it is not.
2293         * loader/FrameLoader.cpp:
2294         (WebCore::FrameLoader::reportBlockedPortFailed): Added.
2295         (WebCore::FrameLoader::blockedError): Added.
2296         * loader/FrameLoader.h:
2297
2298 2016-01-06  Myles C. Maxfield  <mmaxfield@apple.com>
2299
2300         [Cocoa] Tiny cleanup in FontPlatformData::ctFont()
2301         https://bugs.webkit.org/show_bug.cgi?id=152793
2302
2303         Reviewed by Zalan Bujtas.
2304
2305         No new tests because there is no behavior change.
2306
2307         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2308         (WebCore::FontPlatformData::ctFont):
2309
2310 2016-01-06  Brady Eidson  <beidson@apple.com>
2311
2312         Modern IDB: storage/indexeddb/transaction-scope-sequencing.html fails
2313         https://bugs.webkit.org/show_bug.cgi?id=152775
2314
2315         Reviewed by Alex Christensen.
2316
2317         No new tests (At least one failing test now passes, plus changes to another existing test).
2318         
2319         Any transaction enqueued after a read-write transaction whose scope overlaps with
2320         that read-write transaction cannot run until after that read-write transaction runs.
2321         
2322         Additionally, read-only transactions were actually sometimes running even though their scopes
2323         overlapped with a running read-write transaction.
2324         
2325         This patch fixes both of those issues.
2326     
2327         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2328         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
2329         (WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction):
2330         (WebCore::IDBServer::UniqueIDBDatabase::inProgressTransactionCompleted):
2331         * Modules/indexeddb/server/UniqueIDBDatabase.h:
2332
2333 2016-01-06  Zalan Bujtas  <zalan@apple.com>
2334
2335         Float with media query positioned incorrectly after window resize.
2336         https://bugs.webkit.org/show_bug.cgi?id=152558
2337
2338         Reviewed by Simon Fraser and David Hyatt.
2339
2340         This patch ensures that when a renderer becomes floated, it is moved
2341         to the right containing block.
2342         When this floated renderer's previous sibling is an anonymous block, it needs
2343         to be reparented so that the float is positioned as if there was no anonymous block at all.
2344
2345         Test: fast/block/float/float-with-anonymous-previous-sibling.html
2346
2347         * rendering/RenderElement.cpp:
2348         (WebCore::RenderElement::styleDidChange):
2349
2350 2016-01-06  Zalan Bujtas  <zalan@apple.com>
2351
2352         isAnonymousInlineBlock() should exclude any ruby content.
2353         https://bugs.webkit.org/show_bug.cgi?id=152648
2354         <rdar://problem/23872549>
2355
2356         Reviewed by David Hyatt.
2357
2358         isAnonymousInlineBlock is designed for the new Block-Inside-Inline Model
2359         and all other anonymous inline-block renderers (including Ruby) should bail out of it.
2360         (see webkit.org/b/143145)
2361
2362         Test: fast/ruby/ruby-inline-margin-collapse-crash.html
2363
2364         * rendering/RenderObject.cpp:
2365         (WebCore::RenderObject::isAnonymousInlineBlock):
2366         * rendering/RenderObject.h:
2367         (WebCore::RenderObject::isAnonymousInlineBlock): Deleted.
2368
2369 2016-01-05  Zalan Bujtas  <zalan@apple.com>
2370
2371         showRenderTree: add inline-block/inline/block column.
2372         https://bugs.webkit.org/show_bug.cgi?id=152771
2373
2374         Reviewed by Simon Fraser.
2375
2376         The name of the renderer (RenderBlock etc) does not always reflect the associated display type.
2377
2378         No change in functionality.
2379
2380         * rendering/RenderObject.cpp:
2381         (WebCore::showRenderTreeLegend):
2382         (WebCore::RenderObject::showRenderObject):
2383
2384 2016-01-05  Simon Fraser  <simon.fraser@apple.com>
2385
2386         Move ImageBuffer::clip() code into GraphicsContext
2387         https://bugs.webkit.org/show_bug.cgi?id=152769
2388
2389         Reviewed by Zalan Bujtas.
2390
2391         For CG, GraphicsContext had clipToNativeImage(PassNativeImagePtr...), which
2392         was ugly and platform-specific.
2393         
2394         Fix by moving code from ImageBuffer::clip() for CG and Cairo into the platform-specific
2395         GraphicsContext implementations. This required some minor refactoring of scaleSizeToUserSpace()
2396         in ImageBufferCG.
2397
2398         * platform/graphics/GraphicsContext.cpp:
2399         (WebCore::GraphicsContext::clipToImageBuffer): Deleted.
2400         * platform/graphics/ImageBuffer.cpp:
2401         (WebCore::ImageBuffer::sizeForDestinationSize):
2402         * platform/graphics/ImageBuffer.h:
2403         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2404         (WebCore::GraphicsContext::clipToImageBuffer):
2405         * platform/graphics/cairo/ImageBufferCairo.cpp:
2406         (WebCore::ImageBuffer::clip): Deleted.
2407         * platform/graphics/cg/GraphicsContextCG.cpp:
2408         (WebCore::GraphicsContext::clipToImageBuffer):
2409         (WebCore::GraphicsContext::clipToNativeImage): Deleted.
2410         * platform/graphics/cg/ImageBufferCG.cpp:
2411         (WebCore::ImageBuffer::ImageBuffer):
2412         (WebCore::ImageBuffer::sizeForDestinationSize):
2413         (WebCore::ImageBuffer::putByteArray):
2414         (WebCore::ImageBuffer::toDataURL):
2415         (WebCore::ImageBuffer::clip): Deleted.
2416
2417 2016-01-05  Simon Fraser  <simon.fraser@apple.com>
2418
2419         Remove GraphicsContext::drawJoinedLines()
2420         https://bugs.webkit.org/show_bug.cgi?id=152764
2421
2422         Reviewed by Zalan Bujtas.
2423
2424         GraphicsContext::drawJoinedLines() was only used by iOS form-control drawing
2425         and polluted GraphicsContext with platform-specific types.
2426
2427         Rewrite RenderThemeIOS::paintCheckboxDecorations() to use the CGContextRef directly.
2428
2429         * platform/graphics/GraphicsContext.h:
2430         * platform/graphics/cg/GraphicsContextCG.cpp:
2431         (WebCore::GraphicsContext::drawJoinedLines): Deleted.
2432         * rendering/RenderThemeIOS.mm:
2433         (WebCore::drawJoinedLines):
2434         (WebCore::RenderThemeIOS::paintCheckboxDecorations):
2435
2436 2016-01-05  Brady Eidson  <beidson@apple.com>
2437
2438         Modern IDB: storage/indexeddb/structured-clone.html crashes.
2439         https://bugs.webkit.org/show_bug.cgi?id=152763
2440
2441         Reviewed by Alex Christensen.
2442
2443         No new tests (At least one failing test now passes).
2444         
2445         A lot of SerializedScriptValue code incorrectly assumed the global object is a JSDOMGlobalObject,
2446         which doesn't have to be true for native Javascript types like typed arrays.
2447         
2448         Fixing that fixes the test.
2449
2450         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2451         (WebCore::IDBClient::IDBObjectStore::putOrAdd): If serializing the script value caused an exception,
2452           clear that exception and return a better IDB specific exception.
2453
2454         * bindings/js/JSDOMBinding.h:
2455         (WebCore::toJS): Add a ArrayBufferView specialization for toJS that skips the need for a JSDOMGlobalObject.
2456         
2457         * bindings/js/SerializedScriptValue.cpp:
2458         (WebCore::CloneDeserializer::readArrayBufferView): Call toJS directly instead of getJSValue, which 
2459           incorrectly assumes the existence of a JSDOMGlobalObject (vs a JSGlobalObject)
2460         (WebCore::CloneDeserializer::readTerminal): Instead of getJSValue, call JSArrayBuffer::create directly.
2461
2462 2016-01-05  Pranjal Jumde  <pjumde@apple.com>
2463
2464         Image should not be re-registered if m_form already exists. This leads to an assertion failure.
2465         https://bugs.webkit.org/show_bug.cgi?id=152741
2466         <rdar://problem/24030778>
2467
2468         Reviewed by Brent Fulgham.
2469
2470         * Source/WebCore/html/HTMLImageElement.cpp:
2471           Node::InsertionNotificationRequest HTMLImageElement::insertedInto(ContainerNode& insertionPoint)
2472
2473 2016-01-05  Simon Fraser  <simon.fraser@apple.com>
2474
2475         Adjust tile coverage with margin tiles, and tidy up the indicator
2476         https://bugs.webkit.org/show_bug.cgi?id=152742
2477
2478         Reviewed by Beth Dakin.
2479
2480         The tile coverage rect was unfeasibly large when margin tiles are present, and
2481         could be bigger than the layer itself, making the indicator look odd.
2482
2483         Fix by improving the logic in TileController::adjustTileCoverageRect(): this
2484         now first extends the visible rect for scrolling, and then constrains it
2485         within the bounds with margin padding. It also unites with the passed-in
2486         coverageRect, ensuring that we don't lose information about overhang for
2487         margin tile coverage.
2488
2489         Second, update the tiled scrolling indicator when the visible rect changes,
2490         and coalesce the map updates on a timer.
2491
2492         * platform/graphics/TiledBacking.h:
2493         * platform/graphics/ca/GraphicsLayerCA.cpp:
2494         (WebCore::GraphicsLayerCA::adjustCoverageRect):
2495         * platform/graphics/ca/TileController.cpp:
2496         (WebCore::TileController::setVisibleRect):
2497         (WebCore::TileController::setTiledScrollingIndicatorPosition):
2498         (WebCore::expandRectWithinRect):
2499         (WebCore::TileController::adjustTileCoverageRect):
2500         (WebCore::TileController::updateTileCoverageMap):
2501         (WebCore::TileController::computeTileCoverageRect): Deleted.
2502         * platform/graphics/ca/TileController.h:
2503         * platform/graphics/ca/TileCoverageMap.cpp:
2504         (WebCore::TileCoverageMap::TileCoverageMap):
2505         (WebCore::TileCoverageMap::setNeedsUpdate):
2506         (WebCore::TileCoverageMap::updateTimerFired):
2507         * platform/graphics/ca/TileCoverageMap.h:
2508
2509 2016-01-05  Antti Koivisto  <antti@apple.com>
2510
2511         Remove selector filter update calls from Element child parsing callbacks
2512         https://bugs.webkit.org/show_bug.cgi?id=152749
2513
2514         Reviewed by Andreas Kling.
2515
2516         We haven't done style resolve during parsing for a while now. These calls do nothing useful.
2517
2518         * dom/Element.cpp:
2519         (WebCore::Element::beginParsingChildren):
2520         (WebCore::Element::finishParsingChildren):
2521
2522 2016-01-05  Brady Eidson  <beidson@apple.com>
2523
2524         Modern IDB: Error message updates for two failing tests.
2525         https://bugs.webkit.org/show_bug.cgi?id=152735
2526
2527         Reviewed by Alex Christensen.
2528
2529         No new tests (Covered by existing tests).
2530
2531         Add error messages for various operations on deleted objects.
2532         
2533         * Modules/indexeddb/client/IDBCursorImpl.cpp:
2534         (WebCore::IDBClient::IDBCursor::update):
2535         (WebCore::IDBClient::IDBCursor::advance):
2536         (WebCore::IDBClient::IDBCursor::continueFunction):
2537         (WebCore::IDBClient::IDBCursor::deleteFunction):
2538         
2539         * Modules/indexeddb/client/IDBIndexImpl.cpp:
2540         (WebCore::IDBClient::IDBIndex::openCursor):
2541         (WebCore::IDBClient::IDBIndex::doCount):
2542         (WebCore::IDBClient::IDBIndex::openKeyCursor):
2543         (WebCore::IDBClient::IDBIndex::doGet):
2544         (WebCore::IDBClient::IDBIndex::doGetKey):
2545         
2546         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2547         (WebCore::IDBClient::IDBObjectStore::openCursor):
2548         (WebCore::IDBClient::IDBObjectStore::get):
2549         (WebCore::IDBClient::IDBObjectStore::putOrAdd):
2550         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
2551         (WebCore::IDBClient::IDBObjectStore::clear):
2552         (WebCore::IDBClient::IDBObjectStore::createIndex):
2553         (WebCore::IDBClient::IDBObjectStore::index):
2554         (WebCore::IDBClient::IDBObjectStore::deleteIndex):
2555         (WebCore::IDBClient::IDBObjectStore::doCount):
2556
2557         * bindings/js/JSIDBObjectStoreCustom.cpp:
2558         (WebCore::JSIDBObjectStore::createIndex):
2559
2560 2016-01-05  Eric Carlson  <eric.carlson@apple.com>
2561
2562         Avoid NULL deference in Page::updateIsPlayingMedia
2563         https://bugs.webkit.org/show_bug.cgi?id=152732
2564
2565         No new tests, this fixes a rare crash that I am unable to reproduce.
2566
2567         Reviewed by David Kilzer.
2568
2569         * page/Page.cpp:
2570         (WebCore::Page::updateIsPlayingMedia): frame->document() can return NULL.
2571
2572 2016-01-05  Brady Eidson  <beidson@apple.com>
2573
2574         Modern IDB: Transactions from a previous page can leak forward to the next.
2575         https://bugs.webkit.org/show_bug.cgi?id=152698
2576
2577         Reviewed by Alex Christensen.
2578
2579         Test: storage/indexeddb/modern/transactions-stop-on-navigation.html
2580
2581         This patch is mostly about actually implementing IDBDatabase::stop and IDBTransaction::stop.
2582         Most of the rest of the scattered changes are about cleaning up now-incorrect ASSERTs.
2583
2584         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2585         (WebCore::IDBClient::IDBDatabase::close):
2586         (WebCore::IDBClient::IDBDatabase::maybeCloseInServer):
2587         (WebCore::IDBClient::IDBDatabase::stop):
2588         (WebCore::IDBClient::IDBDatabase::startVersionChangeTransaction):
2589         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
2590         * Modules/indexeddb/client/IDBDatabaseImpl.h:
2591         
2592         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2593         (WebCore::IDBClient::IDBOpenDBRequest::requestCompleted):
2594         
2595         * Modules/indexeddb/client/IDBRequestImpl.h:
2596         
2597         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2598         (WebCore::IDBClient::IDBTransaction::IDBTransaction):
2599         (WebCore::IDBClient::IDBTransaction::stop):
2600         (WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):
2601         
2602         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2603         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentDeleteOperation):
2604         (WebCore::IDBServer::UniqueIDBDatabase::didPerformAbortTransaction):
2605
2606 2016-01-05  Zan Dobersek  <zdobersek@igalia.com>
2607
2608         Unreviewed. Attempting to fix the AppleWin build after r194577.
2609
2610         Add the ClipStack.cpp build target alongside the TextureMapperGL.cpp
2611         one, since both include GraphicsContext3D.h and ANGLEWebKitBridge.h
2612         indirectly, the latter requiring specific include flags.
2613
2614         * CMakeLists.txt:
2615         * PlatformEfl.cmake:
2616         * PlatformGTK.cmake:
2617         * PlatformWinCairo.cmake:
2618
2619 2016-01-05  Antti Koivisto  <antti@apple.com>
2620
2621         Move StyleChange enum into a separate file
2622         https://bugs.webkit.org/show_bug.cgi?id=152730
2623
2624         Reviewed by Andreas Kling.
2625
2626         Fewer whole-world rebuilds.
2627
2628         * CMakeLists.txt:
2629         * WebCore.vcxproj/WebCore.vcxproj:
2630         * WebCore.xcodeproj/project.pbxproj:
2631         * dom/CharacterData.cpp:
2632         * dom/ContainerNode.cpp:
2633         * dom/Document.cpp:
2634         * dom/Document.h:
2635         * dom/Element.cpp:
2636         * dom/Element.h:
2637         * style/StyleChange.h: Added.
2638         * style/StyleResolveTree.cpp:
2639         (WebCore::Style::shouldCreateRenderer):
2640         (WebCore::Style::determineChange): Deleted.
2641         * style/StyleResolveTree.h:
2642
2643 2016-01-04  Zan Dobersek  <zdobersek@igalia.com>
2644
2645         [PerformanceTiming] Don't expose the restrictedKeyMap() HashMap
2646         https://bugs.webkit.org/show_bug.cgi?id=147366
2647
2648         Reviewed by Sam Weinig.
2649
2650         Instead of the callers looking up in the HashMap that's returned by restrictedKeyMap(),
2651         keep the HashMap local in the static restrictedMarkFunction(). This function accepts
2652         a String reference and performs the lookup, returning the pointer to a PerformanceTiming
2653         method that corresponds to the passed-in mark or returns nullptr otherwise.
2654
2655         The HashMap is now wrapped in a NeverDestroyed object and is populated when the first
2656         mark function is looked for.
2657
2658         * page/PerformanceUserTiming.cpp:
2659         (WebCore::UserTiming::mark):
2660         (WebCore::UserTiming::findExistingMarkStartTime):
2661
2662 2016-01-04  Zan Dobersek  <zdobersek@igalia.com>
2663
2664         [TextureMapper] Move ClipStack into its own file
2665         https://bugs.webkit.org/show_bug.cgi?id=152661
2666
2667         Reviewed by Michael Catanzaro.
2668
2669         Move TextureMapperGL::ClipStack into its own file and clean it up a bit.
2670         Move ClipState under the ClipStack class, and simply name it State.
2671
2672         Move the ClipState methods into a more sensible order. Remove the inline
2673         specifiers, these aren't really needed for the methods defined in the header.
2674         apply() and applyIfNeeded() now accept a reference to the GraphicsContext3D
2675         object, not a pointer.
2676
2677         Turn YAxisMode enum into an enum class, update the uses to properly specify
2678         the scope of the enum value.
2679
2680         Reorder the ClipStack member variables into a more efficient order.
2681
2682         No new tests -- no change in behavior.
2683
2684         * CMakeLists.txt:
2685         * platform/graphics/texmap/BitmapTextureGL.cpp:
2686         (WebCore::BitmapTextureGL::clearIfNeeded):
2687         (WebCore::BitmapTextureGL::bindAsSurface):
2688         * platform/graphics/texmap/BitmapTextureGL.h:
2689         (WebCore::BitmapTextureGL::clipStack):
2690         * platform/graphics/texmap/ClipStack.cpp: Added.
2691         (WebCore::ClipStack::push):
2692         (WebCore::ClipStack::pop):
2693         (WebCore::ClipStack::reset):
2694         (WebCore::ClipStack::intersect):
2695         (WebCore::ClipStack::setStencilIndex):
2696         (WebCore::ClipStack::apply):
2697         (WebCore::ClipStack::applyIfNeeded):
2698         * platform/graphics/texmap/ClipStack.h: Added.
2699         (WebCore::ClipStack::State::State):
2700         (WebCore::ClipStack::current):
2701         (WebCore::ClipStack::getStencilIndex):
2702         (WebCore::ClipStack::isCurrentScissorBoxEmpty):
2703         * platform/graphics/texmap/TextureMapperGL.cpp:
2704         (WebCore::TextureMapperGL::clipStack):
2705         (WebCore::TextureMapperGL::beginPainting):
2706         (WebCore::TextureMapperGL::bindDefaultSurface):
2707         (WebCore::TextureMapperGL::beginScissorClip):
2708         (WebCore::TextureMapperGL::beginClip):
2709         (WebCore::TextureMapperGL::endClip):
2710         (WebCore::TextureMapperGL::ClipStack::reset): Deleted.
2711         (WebCore::TextureMapperGL::ClipStack::intersect): Deleted.
2712         (WebCore::TextureMapperGL::ClipStack::setStencilIndex): Deleted.
2713         (WebCore::TextureMapperGL::ClipStack::push): Deleted.
2714         (WebCore::TextureMapperGL::ClipStack::pop): Deleted.
2715         (WebCore::TextureMapperGL::ClipStack::apply): Deleted.
2716         (WebCore::TextureMapperGL::ClipStack::applyIfNeeded): Deleted.
2717         * platform/graphics/texmap/TextureMapperGL.h:
2718         (WebCore::TextureMapperGL::ClipState::ClipState): Deleted.
2719         (WebCore::TextureMapperGL::ClipStack::ClipStack): Deleted.
2720         (WebCore::TextureMapperGL::ClipStack::current): Deleted.
2721         (WebCore::TextureMapperGL::ClipStack::getStencilIndex): Deleted.
2722         (WebCore::TextureMapperGL::ClipStack::isCurrentScissorBoxEmpty): Deleted.
2723
2724 2016-01-04  Zan Dobersek  <zdobersek@igalia.com>
2725
2726         Shave off a TransformationMatrix copy if RenderLayer's transparencyClipBox()
2727         https://bugs.webkit.org/show_bug.cgi?id=152119
2728
2729         Reviewed by Simon Fraser.
2730
2731         * rendering/RenderLayer.cpp:
2732         (WebCore::transparencyClipBox): Multiply the transformation matrix returned by
2733         layer.transform() directly into the transform object, instead of first
2734         multiplying them and then copying the result back into the transform object.
2735
2736 2016-01-04  Myles C. Maxfield  <mmaxfield@apple.com>
2737
2738         TextBreakIterator uses an internal implementation detail of NSLocale
2739         https://bugs.webkit.org/show_bug.cgi?id=152715
2740         <rdar://problem/23775121>
2741
2742         Reviewed by Tim Horton.
2743
2744         Instead of directly querying AppleLanguages, we should use [NSLocale preferredLanguages].
2745
2746         No new tests because there is no behavior change.
2747
2748         * platform/text/mac/TextBreakIteratorInternalICUMac.mm:
2749         (WebCore::topLanguagePreference):
2750
2751 2016-01-04  Joseph Pecoraro  <pecoraro@apple.com>
2752
2753         JSCustomXPathNSResolver::lookupNamespaceURI Console Message should render with a column number
2754         https://bugs.webkit.org/show_bug.cgi?id=114312
2755
2756         Reviewed by Brent Fulgham.
2757
2758         * bindings/js/JSCustomXPathNSResolver.cpp:
2759         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI): Deleted.
2760         This now behaves as expected.
2761
2762 2016-01-04  Brady Eidson  <beidson@apple.com>
2763
2764         Modern IDB: Memory indexes aren't deleted when their owning memory object stores are deleted.
2765         https://bugs.webkit.org/show_bug.cgi?id=152717
2766
2767         Reviewed by Alex Christensen.
2768
2769         Test: storage/indexeddb/modern/memory-index-not-deleted-with-objectstore.html
2770
2771         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
2772         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreDeleted):
2773         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2774         (WebCore::IDBServer::MemoryObjectStore::deleteAllIndexes):
2775         * Modules/indexeddb/server/MemoryObjectStore.h:
2776
2777 2016-01-04  Tim Horton  <timothy_horton@apple.com>
2778
2779         Turn on gesture events when building for Yosemite
2780         https://bugs.webkit.org/show_bug.cgi?id=152704
2781         rdar://problem/24042472
2782
2783         Reviewed by Anders Carlsson.
2784
2785         * Configurations/FeatureDefines.xcconfig:
2786
2787 2016-01-04  Sergio Villar Senin  <svillar@igalia.com>
2788
2789         REGRESSION(r194143): Float width incorrectly calculated on Wikipedia
2790         https://bugs.webkit.org/show_bug.cgi?id=152644
2791
2792         Reviewed by Myles C. Maxfield.
2793
2794         The min/max-content contribution computation for non replaced
2795         blocks changed in r194143. The implementation was actually
2796         more complex than it should be and actually incomplete as it
2797         was not considering the case of out of flow elements (because
2798         it was directly calling computeLogicalWidthInRegion()).
2799
2800         This new implementation simplifies a lot the code and makes it
2801         more complete as it relies on min|maxPreferredLogicalWidth()
2802         calls which already consider all the different types of boxes.
2803
2804         Test: fast/css-intrinsic-dimensions/inlinesize-contribution-floats.html
2805
2806         * rendering/RenderBlock.cpp:
2807         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
2808
2809 2016-01-04  David Hyatt  <hyatt@apple.com>
2810
2811         word-wrap: break-word broken inside a flexbox
2812         https://bugs.webkit.org/show_bug.cgi?id=152321
2813
2814         Reviewed by Simon Fraser.
2815
2816         Added fast/text/word-break-on-flexbox-child.html
2817
2818         * rendering/RenderText.cpp:
2819         (WebCore::RenderText::computePreferredLogicalWidths):
2820
2821         At some point word-wrap:break-word was mapped to CSS overflow-wrap, but the code
2822         in RenderText was never updated to use the breakWords() RenderStyle function that
2823         checks overflow-wrap's value.
2824
2825         This means all uses of word-wrap:break-word were broken when measuring the
2826         intrinsic width of a RenderText.
2827
2828 2016-01-04  John Wilander  <wilander@apple.com>
2829
2830         webkitGetUserMedia built-in should use @then and not then
2831         https://bugs.webkit.org/show_bug.cgi?id=152296
2832
2833         Reviewed by Brent Fulgham.
2834
2835         Test: streams/webkitGetUserMedia-shadowing-then.html
2836
2837         * Modules/mediastream/NavigatorUserMedia.js:
2838         (webkitGetUserMedia): Modified to use @then syntax.
2839
2840 2016-01-04  Myles C. Maxfield  <mmaxfield@apple.com>
2841
2842         Post-commit update for r193484.
2843         https://bugs.webkit.org/show_bug.cgi?id=151884
2844
2845         Unreviwed.
2846
2847         The same null check needs to be applied in fontHasVerticalGlyphs() as well.
2848
2849         * platform/graphics/cocoa/FontCocoa.mm:
2850         (WebCore::fontHasVerticalGlyphs):
2851
2852 2016-01-04  David Hyatt  <hyatt@apple.com>
2853
2854         Video/audio-related cleanup after changes to the source element for picture support.
2855         https://bugs.webkit.org/show_bug.cgi?id=152090
2856
2857         Reviewed by Darin Adler.
2858
2859          * html/HTMLMediaElement.cpp:
2860         (WebCore::HTMLMediaElement::selectNextSourceChild):
2861         Use the parsed MediaQueryList for video/audio, since we now cache that on the source elements for picture.
2862
2863         * html/HTMLSourceElement.cpp:
2864         (WebCore::HTMLSourceElement::insertedInto):
2865         (WebCore::HTMLSourceElement::removedFrom):
2866         Add guards to fix the build when video is not enabled.
2867
2868 2016-01-04  Brent Fulgham  <bfulgham@apple.com>
2869
2870         [Win] Clean up some Windows WebCore files
2871         https://bugs.webkit.org/show_bug.cgi?id=148275
2872
2873         Reviewed by Dean Jackson.
2874
2875         No new tests because there is no behavior change.
2876
2877         Update a handful of Windows-specific WebCore files to use
2878         the proper method signatures for our updated interfaces,
2879         get rid of cruft in the COM bindings, and use proper C++14
2880         initializers.
2881
2882         * accessibility/win/AccessibilityObjectWrapperWin.h:
2883         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2884         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
2885         * platform/win/PopupMenuWin.cpp:
2886         * platform/win/PopupMenuWin.h:
2887         * platform/win/WCDataObject.cpp:
2888         * platform/win/WCDataObject.h:
2889
2890 2016-01-04  Andreas Kling  <akling@apple.com>
2891
2892         Simplify the CachedScript ASCII optimization.
2893         <https://webkit.org/b/152596>
2894
2895         Reviewed by Antti Koivisto.
2896
2897         There's actually no need to keep a non-copying StringImpl around for the
2898         CachedScript's internal SharedBuffer. Get rid of that so we don't need
2899         to fidget with that string when the SharedBuffer changes underneath.
2900
2901         Renamed CachedScript::ASCIIOptimizationState to DecodingState to better
2902         reflect what it's used for. Also added explicit caching of the string
2903         hash since we can't rely on a StringImpl to keep that around now.
2904
2905         Bonus: Implement Darin's suggestion to let TextEncoding answer whether
2906         an encoding is byte-based and thus eligible for the ASCII optimization.
2907
2908         * loader/cache/CachedResource.cpp:
2909         (WebCore::CachedResource::tryReplaceEncodedData): Deleted.
2910         * loader/cache/CachedResource.h:
2911         (WebCore::CachedResource::didReplaceSharedBufferContents): Deleted.
2912         * loader/cache/CachedScript.cpp:
2913         (WebCore::CachedScript::script):
2914         (WebCore::CachedScript::scriptHash):
2915         (WebCore::encodingMayBeAllASCII): Deleted.
2916         (WebCore::CachedScript::didReplaceSharedBufferContents): Deleted.
2917         * loader/cache/CachedScript.h:
2918         * platform/text/TextEncoding.h:
2919         (WebCore::TextEncoding::isByteBasedEncoding):
2920
2921 2016-01-04  Philippe Normand  <pnormand@igalia.com>
2922
2923         [GStreamer] A video element isn't drawn onto the canvas.
2924         https://bugs.webkit.org/show_bug.cgi?id=132671
2925
2926         Reviewed by Michael Catanzaro.
2927
2928         When both cairo-gl and gst-gl are available the texture coming
2929         from glimagesink can be used to create a cairo-gl surface that can
2930         be used for video rendering within a canvas element.
2931
2932         * html/canvas/CanvasRenderingContext2D.cpp:
2933         (WebCore::CanvasRenderingContext2D::drawImage): Use NativeImage
2934         drawing if both cairo-gl and gst-gl are available.
2935         * platform/graphics/GraphicsContext.h: Implement drawNativeImage
2936         for Cairo GraphicsContext.
2937         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2938         (WebCore::GraphicsContext::drawNativeImage): Ditto.
2939         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2940         Implement nativeImageForCurrentTime(), this method is used by the
2941         canvas rendering context.
2942         (WebCore::MediaPlayerPrivateGStreamerBase::nativeImageForCurrentTime):
2943         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2944
2945 2016-01-03  Michael Catanzaro  <mcatanzaro@igalia.com>
2946
2947         [GTK] Fix -Wpessimizing-move warnings after switch to WTFMove
2948         https://bugs.webkit.org/show_bug.cgi?id=152677
2949
2950         Reviewed by Andy Estes.
2951
2952         * platform/glib/KeyedDecoderGlib.cpp:
2953         (WebCore::KeyedDecoderGlib::dictionaryFromGVariant):
2954         * platform/graphics/egl/GLContextEGL.cpp:
2955         (WebCore::GLContextEGL::createContext):
2956         * platform/graphics/glx/GLContextGLX.cpp:
2957         (WebCore::GLContextGLX::createContext):
2958
2959 2016-01-03  David Kilzer  <ddkilzer@apple.com>
2960
2961         -[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:] is missing an m_handle->client() NULL check
2962         <https://webkit.org/b/152673>
2963         <rdar://problem/23560530>
2964
2965         Reviewed by Daniel Bates.
2966
2967         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
2968         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]):
2969         Add NULL check for m_handle->client() so we don't crash due to a
2970         NULL dereference inside the dispatch_async() block.
2971
2972 2016-01-03  Michael Catanzaro  <mcatanzaro@igalia.com>
2973
2974         Unreviewed, turn off temporary scrolling logging on GTK
2975         https://bugs.webkit.org/show_bug.cgi?id=152649
2976
2977         * platform/Logging.cpp:
2978         (WebCore::initializeLoggingChannelsIfNecessary): Deleted.
2979
2980 2016-01-03  Simon Fraser  <simon.fraser@apple.com>
2981
2982         Fix Windows build after r194515.
2983
2984         * platform/win/PopupMenuWin.cpp:
2985         (WebCore::PopupMenuWin::scrollOffset):
2986         (WebCore::PopupMenuWin::scrollPosition): Renamed.
2987         * platform/win/PopupMenuWin.h:
2988
2989 2016-01-03  Khem Raj  <raj.khem@gmail.com>
2990
2991         WebKit fails to build with musl libc library
2992         https://bugs.webkit.org/show_bug.cgi?id=152625
2993
2994         Reviewed by Daniel Bates and Alexey Proskuryakov.
2995
2996         malloc_trim is glibc specific API so guard it with __GLIBC__.
2997
2998         * platform/linux/MemoryPressureHandlerLinux.cpp:
2999         (MemoryPressureHandler::platformReleaseMemory): Guard malloc_trim()
3000         call with __GLIBC_.
3001
3002 2016-01-03  Simon Fraser  <simon.fraser@apple.com>
3003
3004         Minor cleanup in ScrollAnimator
3005         https://bugs.webkit.org/show_bug.cgi?id=152656
3006
3007         Reviewed by Dan Bernstein.
3008
3009         Hide the fact that ScrollAnimator's m_currentPosX/m_currentPosY is not a FloatPoint
3010         as much as possible.
3011         
3012         Do offset -> position conversion in ScrollAnimator::scrollToOffsetWithoutAnimation().
3013         This is a behavior change, but I could never hit this code on Mac.
3014
3015         * platform/ScrollAnimator.cpp:
3016         (WebCore::ScrollAnimator::scroll):
3017         (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
3018         (WebCore::ScrollAnimator::setCurrentPosition):
3019         (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset):
3020         (WebCore::ScrollAnimator::notifyPositionChanged):
3021         (WebCore::ScrollAnimator::immediateScrollOnAxis):
3022         (WebCore::ScrollAnimator::ScrollAnimator): Deleted.
3023         (WebCore::ScrollAnimator::currentPosition): Deleted.
3024         * platform/ScrollAnimator.h:
3025         (WebCore::ScrollAnimator::ScrollAnimator::currentPosition):
3026         (WebCore::ScrollAnimator::ScrollAnimator::setCurrentPositionInternal):
3027         * platform/mac/ScrollAnimatorMac.mm:
3028         (WebCore::ScrollAnimatorMac::scroll):
3029         (WebCore::ScrollAnimatorMac::immediateScrollToPosition):
3030         (WebCore::ScrollAnimatorMac::immediateScrollBy):
3031
3032 2016-01-03  Simon Fraser  <simon.fraser@apple.com>
3033
3034         Rename scrollPosition(Scrollbar*) to scrollOffset(ScrollbarOrientation)
3035         https://bugs.webkit.org/show_bug.cgi?id=152666
3036
3037         Reviewed by Dan Bernstein.
3038
3039         Scrollbar values take offsets (zero-based), so rename the accessor used
3040         by scrollbars to set their value, and pass in an orientation, rather than
3041         a pointer to the scrollbar.
3042
3043         * platform/ScrollView.cpp:
3044         (WebCore::ScrollView::scrollOffset): Use scrollOffsetFromPosition rather than
3045         manually adding scrollOrigin.
3046         (WebCore::ScrollView::scrollPosition): Renamed.
3047         * platform/ScrollView.h:
3048         (WebCore::ScrollView::cachedScrollPosition):
3049         * platform/ScrollableArea.h:
3050         * platform/Scrollbar.cpp:
3051         (WebCore::Scrollbar::Scrollbar):
3052         (WebCore::Scrollbar::offsetDidChange):
3053         * rendering/RenderLayer.cpp:
3054         (WebCore::RenderLayer::scrollOffset):
3055         (WebCore::RenderLayer::scrollPosition): Renamed.
3056         * rendering/RenderLayer.h:
3057         * rendering/RenderListBox.cpp:
3058         (WebCore::RenderListBox::scrollOffset):
3059         (WebCore::RenderListBox::scrollPosition): Renamed.
3060         * rendering/RenderListBox.h:
3061
3062 2016-01-03  Simon Fraser  <simon.fraser@apple.com>
3063
3064         scrollLeft returns different values for viewport and non-viewport scrolling with rtl
3065         https://bugs.webkit.org/show_bug.cgi?id=94405
3066         rdar://problem/21829754
3067
3068         Reviewed by Zalan Bujtas.
3069         
3070         Use scrollPosition for DOM-exposed scroll* values on overflow scroll elements,
3071         matching the CSS OM View spec, and Gecko behavior.
3072
3073         Test: fast/scrolling/programmatic-overflow-rtl-scrollIntoView.html
3074
3075         * rendering/RenderBox.cpp:
3076         (WebCore::RenderBox::scrollLeft):
3077         (WebCore::RenderBox::scrollTop):
3078         (WebCore::RenderBox::setScrollLeft):
3079         (WebCore::RenderBox::setScrollTop):
3080         * rendering/RenderLayer.cpp:
3081         (WebCore::RenderLayer::scrollToXPosition):
3082         (WebCore::RenderLayer::scrollToYPosition):
3083         * rendering/RenderLayer.h:
3084
3085 2016-01-03  Simon Fraser  <simon.fraser@apple.com>
3086
3087         Some cleanup in ScrollAnimator
3088         https://bugs.webkit.org/show_bug.cgi?id=152649
3089
3090         Try to fix GTK scroll position errors in RTL.
3091         
3092         ScrollAnimatorNone::scrollToOffsetWithoutAnimation() was failing to map from
3093         offset to position.
3094         
3095         Also add logging in ScrollableArea::scrollToOffsetWithoutAnimation().
3096
3097         * platform/ScrollAnimatorNone.cpp:
3098         (WebCore::ScrollAnimatorNone::scrollToOffsetWithoutAnimation):
3099         * platform/ScrollableArea.cpp:
3100         (WebCore::ScrollableArea::scrollToOffsetWithoutAnimation):
3101
3102 2016-01-02  Simon Fraser  <simon.fraser@apple.com>
3103
3104         Temporarily turn on Scrolling logging on GTK, to investigate
3105         GTK failures from https://bugs.webkit.org/show_bug.cgi?id=152649.
3106         
3107         * platform/Logging.cpp:
3108         (WebCore::initializeLoggingChannelsIfNecessary):
3109
3110 2016-01-02  Simon Fraser  <simon.fraser@apple.com>
3111
3112         Some cleanup in ScrollAnimator
3113         https://bugs.webkit.org/show_bug.cgi?id=152649
3114
3115         Try to fix GTK test failures. ScrollAnimatorNone needs to map correctly between
3116         min and max scroll positions.
3117
3118         * platform/ScrollAnimatorNone.cpp:
3119         (WebCore::ScrollAnimatorNone::PerAxisData::updateDataFromParameters):
3120         (WebCore::ScrollAnimatorNone::scroll):
3121         * platform/ScrollAnimatorNone.h:
3122
3123 2016-01-02  Max Stepin  <maxstepin@gmail.com>
3124
3125         APNG decoder: only decode the frames up to haltAtFrame
3126         https://bugs.webkit.org/show_bug.cgi?id=146205
3127
3128         Reviewed by Michael Catanzaro.
3129
3130         No new tests, already covered by existing tests.
3131
3132         * platform/image-decoders/png/PNGImageDecoder.cpp:
3133         (WebCore::PNGImageReader::close):
3134         (WebCore::PNGImageReader::decode):
3135         (WebCore::PNGImageDecoder::isSizeAvailable):
3136         (WebCore::PNGImageDecoder::frameBufferAtIndex):
3137         (WebCore::PNGImageDecoder::pngComplete):
3138         (WebCore::PNGImageDecoder::decode):
3139         * platform/image-decoders/png/PNGImageDecoder.h:
3140         (WebCore::PNGImageDecoder::isComplete):
3141         (WebCore::PNGImageDecoder::isCompleteAtIndex):
3142
3143 2016-01-02  Simon Fraser  <simon.fraser@apple.com>
3144
3145         Some cleanup in ScrollAnimator
3146         https://bugs.webkit.org/show_bug.cgi?id=152649
3147
3148         Reviewed by Zalan Bujtas.
3149
3150         Change ScrollAnimatorMac::adjustScrollPositionIfNecessary() and similar code in
3151         ScrollingTreeFrameScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary() to
3152         constrain between minimumScrollPosition() and maximumScrollPosition(), rather than
3153         rolling their own code.
3154         
3155         This revealed several issues. First, RenderLayer::maximumScrollPosition() is
3156         wrong when the layer has borders, because RenderLayer::visibleContentRectInternal()
3157         seems to have incorrect logic. However, we can just remove it, and use the ScrollableArea
3158         implementation.
3159         
3160         Second, ScrollAnimatorMac::scrollToOffsetWithoutAnimation() was failing to do a
3161         position/offset conversion, so do one. We're converting too much, and should probably
3162         just change ScrollAnimator to do everything in terms of positions.
3163         
3164         Third, ScrollAnimator::scroll() was clamping a scroll position as an offset
3165         (detected by scrollbars/scroll-rtl-or-bt-layer.html), so fix that.
3166         
3167         Remove ScrollController::absoluteScrollPosition() and overrides, since this was
3168         confusingly named, and could just be removed.
3169         
3170         Remove ScrollController::m_origOrigin which was assigned to, but never read.
3171
3172         Test: fast/scrolling/arrow-key-scroll-in-rtl-document.html: new
3173               fast/dom/horizontal-scrollbar-in-rtl.html: progressed with these changes.
3174
3175         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.h:
3176         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3177         (WebCore::ScrollingTreeFrameScrollingNodeMac::adjustScrollPositionToBoundsIfNecessary):
3178         (WebCore::ScrollingTreeFrameScrollingNodeMac::absoluteScrollPosition): Deleted.
3179         * platform/ScrollAnimator.cpp:
3180         (WebCore::ScrollAnimator::scroll):
3181         (WebCore::ScrollAnimator::notifyPositionChanged):
3182         * platform/ScrollableArea.h:
3183         (WebCore::ScrollableArea::constrainScrollPosition):
3184         * platform/cocoa/ScrollController.h:
3185         * platform/cocoa/ScrollController.mm:
3186         (WebCore::ScrollController::snapRubberBandTimerFired): Deleted.
3187         (WebCore::ScrollController::snapRubberBand): Deleted.
3188         * platform/mac/ScrollAnimatorMac.h:
3189         * platform/mac/ScrollAnimatorMac.mm:
3190         (-[WebScrollAnimationHelperDelegate _immediateScrollToPoint:]):
3191         (WebCore::ScrollAnimatorMac::scroll):
3192         (WebCore::ScrollAnimatorMac::scrollToOffsetWithoutAnimation):
3193         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
3194         (WebCore::ScrollAnimatorMac::adjustScrollPositionToBoundsIfNecessary):
3195         (WebCore::ScrollAnimatorMac::immediateScrollToPosition):
3196         (WebCore::ScrollAnimatorMac::immediateScrollToPositionForScrollAnimation):
3197         (WebCore::ScrollAnimatorMac::immediateScrollTo): Deleted.
3198         (WebCore::ScrollAnimatorMac::immediateScrollToPointForScrollAnimation): Deleted.
3199         (WebCore::ScrollAnimatorMac::absoluteScrollPosition): Deleted.
3200         * rendering/RenderLayer.cpp:
3201         (WebCore::RenderLayer::visibleContentRectInternal):
3202         (WebCore::RenderLayer::overhangAmount):
3203         (WebCore::RenderLayer::maximumScrollPosition): Deleted.
3204         * rendering/RenderLayer.h:
3205         * rendering/RenderListBox.cpp:
3206         (WebCore::RenderListBox::minimumScrollPosition):
3207         (WebCore::RenderListBox::maximumScrollPosition): RenderListBox scrolls by lines,
3208         so it needs a custom implementation of this.
3209         * rendering/RenderListBox.h:
3210
3211 2016-01-02  Zalan Bujtas  <zalan@apple.com>
3212
3213         Simple line layout:: Add text-decoration support.
3214         https://bugs.webkit.org/show_bug.cgi?id=152623
3215
3216         Reviewed by Antti Koivisto.
3217
3218         This patch enables text-decoration for simple line layout.
3219         -webkit-text-underline-position: under requires normal line layout context, skip it for now.
3220
3221         Test: fast/css3-text/css3-text-decoration/simple-line-layout-text-decoration.html
3222
3223         * rendering/SimpleLineLayout.cpp:
3224         (WebCore::SimpleLineLayout::canUseForStyle):
3225         (WebCore::SimpleLineLayout::printReason):
3226         * rendering/SimpleLineLayoutFunctions.cpp:
3227         (WebCore::SimpleLineLayout::paintFlow): In case of multiple RenderText renderers (long text), it's ok
3228         to pass the first text renderer as they all share the same set of decorations. 
3229
3230 2015-12-31  Andy Estes  <aestes@apple.com>
3231
3232         Replace WTF::move with WTFMove
3233         https://bugs.webkit.org/show_bug.cgi?id=152601
3234
3235         Reviewed by Brady Eidson.
3236
3237         * Modules/battery/NavigatorBattery.cpp:
3238         (WebCore::NavigatorBattery::from):
3239         * Modules/encryptedmedia/CDMSessionClearKey.cpp:
3240         (WebCore::CDMSessionClearKey::update):
3241         * Modules/encryptedmedia/MediaKeys.cpp:
3242         (WebCore::MediaKeys::create):
3243         (WebCore::MediaKeys::MediaKeys):
3244         * Modules/gamepad/NavigatorGamepad.cpp:
3245         (WebCore::NavigatorGamepad::from):
3246         * Modules/gamepad/deprecated/NavigatorGamepad.cpp:
3247         (WebCore::NavigatorGamepad::from):
3248         * Modules/geolocation/GeoNotifier.cpp:
3249         (WebCore::GeoNotifier::GeoNotifier):
3250         (WebCore::GeoNotifier::setFatalError):
3251         * Modules/geolocation/GeoNotifier.h:
3252         (WebCore::GeoNotifier::create):
3253         * Modules/geolocation/Geolocation.cpp:
3254         (WebCore::Geolocation::Watchers::add):
3255         (WebCore::Geolocation::getCurrentPosition):
3256         (WebCore::Geolocation::watchPosition):
3257         * Modules/geolocation/GeolocationController.cpp:
3258         (WebCore::GeolocationController::viewStateDidChange):
3259         * Modules/geolocation/Geoposition.h:
3260         (WebCore::Geoposition::create):
3261         (WebCore::Geoposition::Geoposition):
3262         * Modules/geolocation/NavigatorGeolocation.cpp:
3263         (WebCore::NavigatorGeolocation::from):
3264         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
3265         (WebCore::DOMWindowIndexedDatabase::from):
3266         * Modules/indexeddb/WorkerGlobalScopeIndexedDatabase.cpp:
3267         (WebCore::WorkerGlobalScopeIndexedDatabase::from):
3268         * Modules/indexeddb/client/IDBAnyImpl.cpp:
3269         (WebCore::IDBClient::IDBAny::IDBAny):
3270         * Modules/indexeddb/client/IDBAnyImpl.h:
3271         (WebCore::IDBClient::IDBAny::create):
3272         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
3273         (WebCore::IDBClient::IDBDatabase::willCommitTransaction):
3274         (WebCore::IDBClient::IDBDatabase::willAbortTransaction):
3275         (WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent):
3276         * Modules/indexeddb/client/IDBIndexImpl.cpp:
3277         (WebCore::IDBClient::IDBIndex::openCursor):
3278         (WebCore::IDBClient::IDBIndex::openKeyCursor):
3279         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
3280         (WebCore::IDBClient::IDBObjectStore::openCursor):
3281         (WebCore::IDBClient::IDBObjectStore::get):
3282         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
3283         (WebCore::IDBClient::IDBObjectStore::createIndex):
3284         (WebCore::IDBClient::IDBObjectStore::index):
3285         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
3286         (WebCore::IDBClient::IDBOpenDBRequest::onSuccess):
3287         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
3288         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3289         (WebCore::IDBClient::IDBRequest::enqueueEvent):
3290         (WebCore::IDBClient::IDBRequest::setResult):
3291         (WebCore::IDBClient::IDBRequest::setResultToStructuredClone):
3292         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3293         (WebCore::IDBClient::IDBTransaction::abort):
3294         (WebCore::IDBClient::IDBTransaction::scheduleOperation):
3295         (WebCore::IDBClient::IDBTransaction::commit):
3296         (WebCore::IDBClient::IDBTransaction::enqueueEvent):
3297         (WebCore::IDBClient::IDBTransaction::createObjectStore):
3298         (WebCore::IDBClient::IDBTransaction::createIndex):
3299         (WebCore::IDBClient::IDBTransaction::doRequestOpenCursor):
3300         (WebCore::IDBClient::IDBTransaction::iterateCursor):
3301         (WebCore::IDBClient::IDBTransaction::requestGetRecord):
3302         (WebCore::IDBClient::IDBTransaction::requestIndexRecord):
3303         (WebCore::IDBClient::IDBTransaction::requestClearObjectStore):
3304         (WebCore::IDBClient::IDBTransaction::requestPutOrAdd):
3305         (WebCore::IDBClient::IDBTransaction::deleteObjectStore):
3306         (WebCore::IDBClient::IDBTransaction::deleteIndex):
3307         * Modules/indexeddb/legacy/IDBDatabaseBackend.cpp:
3308         (WebCore::IDBDatabaseBackend::processPendingOpenCalls):
3309         * Modules/indexeddb/legacy/IDBDatabaseBackend.h:
3310         (WebCore::IDBDatabaseBackend::setPendingSecondHalfOpen):
3311         * Modules/indexeddb/legacy/LegacyAny.h:
3312         (WebCore::LegacyAny::create):
3313         * Modules/indexeddb/legacy/LegacyDatabase.cpp:
3314         (WebCore::LegacyDatabase::enqueueEvent):
3315         * Modules/indexeddb/legacy/LegacyRequest.cpp:
3316         (WebCore::LegacyRequest::enqueueEvent):
3317         * Modules/indexeddb/legacy/LegacyTransaction.cpp:
3318         (WebCore::LegacyTransaction::enqueueEvent):
3319         * Modules/indexeddb/server/IDBServer.cpp:
3320         (WebCore::IDBServer::IDBServer::postDatabaseTask):
3321         (WebCore::IDBServer::IDBServer::postDatabaseTaskReply):
3322         * Modules/indexeddb/server/MemoryBackingStoreTransaction.cpp:
3323         (WebCore::IDBServer::MemoryBackingStoreTransaction::indexDeleted):
3324         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreDeleted):
3325         (WebCore::IDBServer::MemoryBackingStoreTransaction::objectStoreCleared):
3326         (WebCore::IDBServer::MemoryBackingStoreTransaction::indexCleared):
3327         (WebCore::IDBServer::MemoryBackingStoreTransaction::abort):
3328         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
3329         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
3330         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
3331         (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
3332         (WebCore::IDBServer::MemoryIDBBackingStore::restoreObjectStoreForVersionChangeAbort):
3333         (WebCore::IDBServer::MemoryIDBBackingStore::registerObjectStore):
3334         * Modules/indexeddb/server/MemoryIndex.cpp:
3335         (WebCore::IDBServer::MemoryIndex::objectStoreCleared):
3336         (WebCore::IDBServer::MemoryIndex::replaceIndexValueStore):
3337         * Modules/indexeddb/server/MemoryObjectStore.cpp:
3338         (WebCore::IDBServer::MemoryObjectStore::createIndex):
3339         (WebCore::IDBServer::MemoryObjectStore::maybeRestoreDeletedIndex):
3340         (WebCore::IDBServer::MemoryObjectStore::deleteIndex):
3341         (WebCore::IDBServer::MemoryObjectStore::clear):
3342         (WebCore::IDBServer::MemoryObjectStore::replaceKeyValueStore):
3343         (WebCore::IDBServer::MemoryObjectStore::registerIndex):
3344         * Modules/indexeddb/server/ServerOpenDBRequest.cpp:
3345         (WebCore::IDBServer::ServerOpenDBRequest::notifiedConnectionsOfVersionChange):
3346         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3347         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection):
3348         (WebCore::IDBServer::UniqueIDBDatabase::performCurrentOpenOperation):
3349         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
3350         (WebCore::IDBServer::UniqueIDBDatabase::maybeNotifyConnectionsOfVersionChange):
3351         (WebCore::IDBServer::UniqueIDBDatabase::connectionClosedFromClient):
3352         (WebCore::IDBServer::UniqueIDBDatabase::enqueueTransaction):
3353         (WebCore::IDBServer::UniqueIDBDatabase::takeNextRunnableTransaction):
3354         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
3355         (WebCore::IDBServer::UniqueIDBDatabaseConnection::establishTransaction):
3356         * Modules/indexeddb/shared/IndexKey.cpp:
3357         (WebCore::IndexKey::isolatedCopy):
3358         * Modules/mediasession/WebMediaSessionManager.cpp:
3359         (WebCore::WebMediaSessionManager::setPlaybackTarget):
3360         * Modules/mediasource/MediaSource.cpp:
3361         (WebCore::MediaSource::setPrivateAndOpen):
3362         * Modules/mediasource/SourceBuffer.cpp:
3363         (WebCore::SourceBuffer::create):
3364         (WebCore::SourceBuffer::SourceBuffer):
3365         * Modules/mediastream/MediaDevices.cpp:
3366         (WebCore::MediaDevices::getUserMedia):
3367         (WebCore::MediaDevices::enumerateDevices):
3368         * Modules/mediastream/MediaDevicesRequest.cpp:
3369         (WebCore::MediaDevicesRequest::create):
3370         (WebCore::MediaDevicesRequest::MediaDevicesRequest):
3371         * Modules/mediastream/MediaStream.cpp:
3372         (WebCore::MediaStream::create):
3373         (WebCore::MediaStream::MediaStream):
3374         (WebCore::MediaStream::addTrack):
3375         (WebCore::MediaStream::didRemoveTrack):
3376         (WebCore::MediaStream::internalAddTrack):
3377         (WebCore::MediaStream::internalRemoveTrack):
3378         * Modules/mediastream/NavigatorMediaDevices.cpp:
3379         (WebCore::NavigatorMediaDevices::from):
3380         * Modules/mediastream/RTCConfiguration.cpp:
3381         (WebCore::RTCConfiguration::initialize):
3382         * Modules/mediastream/RTCDTMFSender.cpp:
3383         (WebCore::RTCDTMFSender::create):
3384         (WebCore::RTCDTMFSender::RTCDTMFSender):
3385         (WebCore::RTCDTMFSender::scheduleDispatchEvent):
3386         * Modules/mediastream/RTCDataChannel.cpp:
3387         (WebCore::RTCDataChannel::create):
3388         (WebCore::RTCDataChannel::RTCDataChannel):
3389         (WebCore::RTCDataChannel::scheduleDispatchEvent):
3390         * Modules/mediastream/RTCIceCandidateEvent.cpp:
3391         (WebCore::RTCIceCandidateEvent::create):
3392         (WebCore::RTCIceCandidateEvent::RTCIceCandidateEvent):
3393         * Modules/mediastream/RTCPeerConnection.cpp:
3394         (WebCore::RTCPeerConnection::create):
3395         (WebCore::RTCPeerConnection::RTCPeerConnection):
3396         (WebCore::RTCPeerConnection::addTrack):
3397         (WebCore::RTCPeerConnection::queuedCreateOffer):
3398         (WebCore::RTCPeerConnection::queuedCreateAnswer):
3399         (WebCore::RTCPeerConnection::queuedSetLocalDescription):
3400         (WebCore::RTCPeerConnection::queuedSetRemoteDescription):
3401         (WebCore::RTCPeerConnection::queuedAddIceCandidate):
3402         (WebCore::RTCPeerConnection::setConfiguration):
3403         (WebCore::RTCPeerConnection::privateGetStats):
3404         * Modules/mediastream/RTCRtpReceiver.cpp:
3405         (WebCore::RTCRtpReceiver::RTCRtpReceiver):
3406         * Modules/mediastream/RTCRtpReceiver.h:
3407         (WebCore::RTCRtpReceiver::create):
3408         * Modules/mediastream/RTCRtpSender.cpp:
3409         (WebCore::RTCRtpSender::RTCRtpSender):
3410         * Modules/mediastream/RTCRtpSender.h:
3411         (WebCore::RTCRtpSender::create):
3412         * Modules/mediastream/RTCTrackEvent.cpp:
3413         (WebCore::RTCTrackEvent::create):
3414         * Modules/mediastream/UserMediaRequest.cpp:
3415         (WebCore::UserMediaRequest::start):
3416         (WebCore::UserMediaRequest::UserMediaRequest):
3417         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
3418         (WebCore::provideNavigatorContentUtilsTo):
3419         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
3420         * Modules/notifications/DOMWindowNotifications.cpp:
3421         (WebCore::DOMWindowNotifications::from):
3422         * Modules/notifications/NotificationCenter.cpp:
3423         (WebCore::NotificationCenter::timerFired):
3424         * Modules/notifications/WorkerGlobalScopeNotifications.cpp:
3425         (WebCore::WorkerGlobalScopeNotifications::from):
3426         * Modules/plugins/QuickTimePluginReplacement.mm:
3427         (WebCore::QuickTimePluginReplacement::createElementRenderer):
3428         * Modules/plugins/YouTubePluginReplacement.cpp:
3429         (WebCore::YouTubePluginReplacement::createElementRenderer):
3430         (WebCore::YouTubePluginReplacement::installReplacement):
3431         * Modules/quota/DOMWindowQuota.cpp:
3432         (WebCore::DOMWindowQuota::from):
3433         * Modules/quota/NavigatorStorageQuota.cpp:
3434         (WebCore::NavigatorStorageQuota::from):
3435         * Modules/quota/WorkerNavigatorStorageQuota.cpp:
3436         (WebCore::WorkerNavigatorStorageQuota::from):
3437         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
3438         (WebCore::DOMWindowSpeechSynthesis::from):
3439         * Modules/speech/SpeechSynthesis.cpp:
3440         (WebCore::SpeechSynthesis::setPlatformSynthesizer):
3441         * Modules/webaudio/AsyncAudioDecoder.cpp:
3442         (WebCore::AsyncAudioDecoder::decodeAsync):
3443         * Modules/webaudio/AudioContext.cpp:
3444         (WebCore::AudioContext::addReaction):
3445         (WebCore::AudioContext::suspend):
3446         (WebCore::AudioContext::resume):
3447         (WebCore::AudioContext::close):
3448         * Modules/webaudio/AudioNode.cpp:
3449         (WebCore::AudioNode::addInput):
3450         (WebCore::AudioNode::addOutput):
3451         * Modules/webaudio/AudioScheduledSourceNode.cpp:
3452         (WebCore::AudioScheduledSourceNode::addEventListener):
3453         * Modules/webaudio/ConvolverNode.cpp:
3454         (WebCore::ConvolverNode::setBuffer):
3455         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp:
3456         (WebCore::MediaStreamAudioDestinationNode::MediaStreamAudioDestinationNode):