Unreviewed Windows build fix; one more ResourceLoaderOptions call site which needs to
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-01-29  Jer Noble  <jer.noble@apple.com>
2
3         Unreviewed Windows build fix; one more ResourceLoaderOptions call site which needs to
4         be updated after adding the CachingPolicy parameter.
5
6         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
7         (WebCore::WebCoreAVCFResourceLoader::startLoading):
8
9 2016-01-29  Carlos Garcia Campos  <cgarcia@igalia.com>
10
11         [GTK] Implement overlay scrollbars
12         https://bugs.webkit.org/show_bug.cgi?id=153405
13
14         Reviewed by Michael Catanzaro.
15
16         Add support for overlay scrollbars to GTK+ platform following the
17         same style and behavior than GtkScrolledWindow. They are only
18         available for GTK+ >= 3.19, but honoring the GTK_OVERLAY_SCROLLING
19         environment variable, so they could be disable at run time, except
20         when threaded compositor is enabled. A new ScrollAnimator class
21         has been added for GTK+ to implement overlay scrollbars and still
22         allow smooth scrolling when available.
23
24         * PlatformGTK.cmake: Add ScrollAnimatorGtk and stop building ScrollAnimatorSmooth.
25         * platform/ScrollAnimator.h:
26         (WebCore::ScrollAnimator::ScrollAnimator::mouseEnteredContentArea):
27         Remove const to allow the ScrollAnimator to be updated.
28         (WebCore::ScrollAnimator::ScrollAnimator::mouseExitedContentArea): Ditto.
29         (WebCore::ScrollAnimator::ScrollAnimator::mouseMovedInContentArea): Ditto.
30         (WebCore::ScrollAnimator::ScrollAnimator::contentAreaDidShow): Ditto.
31         (WebCore::ScrollAnimator::ScrollAnimator::contentAreaDidHide): Ditto.
32         * platform/Scrollbar.h:
33         (WebCore::Scrollbar::opacity): Get scrollbar opacity.
34         (WebCore::Scrollbar::setOpacity): Set scrollbar opacity.
35         * platform/gtk/ScrollAnimatorGtk.cpp: Added.
36         (WebCore::ScrollAnimator::create): Create a ScrollAnimatorGtk.
37         (WebCore::ScrollAnimatorGtk::ScrollAnimatorGtk):
38         (WebCore::ScrollAnimatorGtk::~ScrollAnimatorGtk):
39         (WebCore::ScrollAnimatorGtk::ensureSmoothScrollingAnimation):
40         Initialize the ScrollAnimationSmooth if it doesn't exist.
41         (WebCore::ScrollAnimatorGtk::scroll): Ensure we have a
42         ScrollAnimationSmooth if smooth scrolling is enabled. This also
43         fixes the problem of having to reload the page after changing the
44         smooth scrolling setting.
45         (WebCore::ScrollAnimatorGtk::scrollToOffsetWithoutAnimation):
46         (WebCore::ScrollAnimatorGtk::willEndLiveResize):
47         (WebCore::ScrollAnimatorGtk::didAddVerticalScrollbar): Register
48         the scrollbar if it's an overlay scrollbar and make it visible
49         without animating it. Start the hide animation.
50         (WebCore::ScrollAnimatorGtk::didAddHorizontalScrollbar): Ditto.
51         (WebCore::ScrollAnimatorGtk::willRemoveVerticalScrollbar):
52         Unregister the scrollbar if it was registered and resrt the
53         animation state if it was the only scrollbar.
54         (WebCore::ScrollAnimatorGtk::willRemoveHorizontalScrollbar): Ditto.
55         (WebCore::ScrollAnimatorGtk::updateOverlayScrollbarsOpacity): Update
56         the scrollbars opacity and invalidate the indicator.
57         (WebCore::easeOutCubic):
58         (WebCore::ScrollAnimatorGtk::overlayScrollbarAnimationTimerFired):
59         Update the scrollbars opacity and schedule a next frame if the
60         animation didn't finish or start the hide animation otherwhise.
61         (WebCore::ScrollAnimatorGtk::showOverlayScrollbars): Start the
62         fade animation to show the scrollbars if needed.
63         (WebCore::ScrollAnimatorGtk::hideOverlayScrollbars): Start the
64         dafe animation to hide the scrollbars if needed.
65         (WebCore::ScrollAnimatorGtk::mouseEnteredContentArea): Call
66         showOverlayScrollbars().
67         (WebCore::ScrollAnimatorGtk::mouseExitedContentArea): Call
68         hideOverlayScrollbars().
69         (WebCore::ScrollAnimatorGtk::mouseMovedInContentArea): Call
70         showOverlayScrollbars().
71         (WebCore::ScrollAnimatorGtk::contentAreaDidShow): Ditto.
72         (WebCore::ScrollAnimatorGtk::contentAreaDidHide): Hide the
73         scrollbars without animations.
74         (WebCore::ScrollAnimatorGtk::notifyContentAreaScrolled): Call
75         showOverlayScrollbars().
76         (WebCore::ScrollAnimatorGtk::lockOverlayScrollbarStateToHidden):
77         Update the lock state and hide or show the scrollbars when locked
78         or unlocked.
79         * platform/gtk/ScrollAnimatorGtk.h: Added.
80         * platform/gtk/ScrollbarThemeGtk.cpp:
81         (WebCore::ScrollbarThemeGtk::backButtonRect): Pass
82         StyleContextMode to getOrCreateStyleContext depending on the
83         painting parameter.
84         (WebCore::ScrollbarThemeGtk::forwardButtonRect): Ditto.
85         (WebCore::ScrollbarThemeGtk::trackRect): Ditto.
86         (WebCore::ScrollbarThemeGtk::getOrCreateStyleContext): Add
87         StyleContextMode parameter to add the hovering class
88         unconditionally when using overlay scrollbars in layout mode. In
89         paint mode we add the hovering clas only when the scrollbar is
90         hovered. This way we always claim the size of the scrollbar when
91         hovered to be able to show the full scrollbar when the mouse is
92         close enough to the indicator.
93         (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): Initialize
94         m_usesOverlayScrollbars.
95         (WebCore::ScrollbarThemeGtk::thumbRect): Pass the scrollbar to
96         getOrCreateStyleContext().
97         (WebCore::adjustRectAccordingToMargin): Fix the top margin.
98         (WebCore::ScrollbarThemeGtk::paintTrackBackground): Pass the
99         scrollbar and paint mode to getOrCreateStyleContext().
100         (WebCore::ScrollbarThemeGtk::paintScrollbarBackground): Ditto.
101         (WebCore::ScrollbarThemeGtk::paintThumb): Adjust the thumb
102         rectangle when overlay scrollbar is not hovered to its current
103         size, since we always claim the size of the scrollbar in hovered
104         mode.
105         (WebCore::ScrollbarThemeGtk::paintButton): Pass the scrollbar and
106         paint mode to getOrCreateStyleContext().
107         (WebCore::ScrollbarThemeGtk::paint): Take the scrollbar opacity
108         into account when rendering overlay scrollbars as indicators. Also
109         get the scrollbar opacity from the GTK+ theme and use a
110         transparency group when the global opacity is not full opaque.
111         (WebCore::ScrollbarThemeGtk::buttonSize): Pass the scrollbar to
112         getOrCreateStyleContext().
113         * platform/gtk/ScrollbarThemeGtk.h:
114         * platform/mac/ScrollAnimatorMac.h:
115         * platform/mac/ScrollAnimatorMac.mm:
116         (WebCore::ScrollAnimatorMac::mouseEnteredContentArea):
117         (WebCore::ScrollAnimatorMac::mouseExitedContentArea):
118         (WebCore::ScrollAnimatorMac::mouseMovedInContentArea):
119         (WebCore::ScrollAnimatorMac::contentAreaDidShow):
120         (WebCore::ScrollAnimatorMac::contentAreaDidHide):
121
122 2016-01-29  ChangSeok Oh  <changseok.oh@collabora.com>
123
124         [GStreamer] built-in media player doesn't update
125         https://bugs.webkit.org/show_bug.cgi?id=151816
126
127         Reviewed by Xabier Rodriguez-Calvar.
128
129         The timeline of audio controls in media document is not properly updated since it is assumed
130         that the controls are hidden as soon as playing. However, such full page audio always has
131         opacity : 1 declared by video:-webkit-full-page-media::-webkit-media-controls-panel.no-video.
132         i.e. it is not actually hidden. We can fix this by simply returning false for no-video media
133         in controlsAreHidden();
134
135         Test: media/audio-controls-timeline-in-media-document.html
136
137         * Modules/mediacontrols/mediaControlsBase.js:
138         (Controller.prototype.controlsAreAlwaysVisible):
139         (Controller.prototype.controlsAreHidden):
140
141 2016-01-29  Manuel Rego Casasnovas  <rego@igalia.com>
142
143         [css-grid] Store lines instead of tracks in GridResolvedPosition
144         https://bugs.webkit.org/show_bug.cgi?id=153592
145
146         Reviewed by Sergio Villar Senin.
147
148         Due to the new feature that allows to create implicit tracks before the
149         explicit ones, we will need to use lines instead of tracks in the
150         code to be able to implement it properly.
151
152         This is just a first simple patch using lines instead of tracks in
153         GridResolvedPosition. It modifies the code that was using it, as it was
154         considering that the resolvedFinalPosition was a track index and
155         not a line index.
156
157         So if we've an item positioned like:
158           grid-column: 2 / 5;
159           grid-row: 1 / span 2;
160
161         Before we were storing this information on the GridSpan:
162         * columns:
163           * resolvedInitialPosition: 1
164           * resolvedFinalPosition:  3
165         * rows:
166           * resolvedInitialPosition: 0
167           * resolvedFinalPosition:  1
168
169         And now we're storing:
170         * columns:
171           * resolvedInitialPosition: 1
172           * resolvedFinalPosition:  4
173         * rows:
174           * resolvedInitialPosition: 0
175           * resolvedFinalPosition:  2
176
177         No new tests, no change of behavior.
178
179         * css/CSSGridTemplateAreasValue.cpp:
180         (WebCore::stringForPosition):
181         * css/CSSParser.cpp:
182         (WebCore::CSSParser::parseGridTemplateAreasRow):
183         * css/StyleBuilderConverter.h:
184         (WebCore::StyleBuilderConverter::createImplicitNamedGridLinesFromGridArea):
185         * rendering/RenderGrid.cpp:
186         (WebCore::RenderGrid::GridIterator::nextEmptyGridArea):
187         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
188         (WebCore::RenderGrid::ensureGridSize):
189         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator):
190         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
191         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
192         (WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
193         (WebCore::RenderGrid::columnAxisOffsetForChild):
194         (WebCore::RenderGrid::rowAxisOffsetForChild):
195         * rendering/RenderGrid.h:
196         * rendering/style/GridCoordinate.h:
197         (WebCore::GridSpan::GridSpan):
198         (WebCore::GridSpan::integerSpan):
199         (WebCore::GridSpan::end):
200         (WebCore::GridCoordinate::GridCoordinate):
201         * rendering/style/GridResolvedPosition.cpp:
202         (WebCore::resolveRowStartColumnStartNamedGridLinePositionAgainstOppositePosition):
203         (WebCore::resolveRowEndColumnEndNamedGridLinePositionAgainstOppositePosition):
204         (WebCore::resolveNamedGridLinePositionAgainstOppositePosition):
205         (WebCore::resolveGridPositionAgainstOppositePosition):
206         (WebCore::GridResolvedPosition::resolveGridPositionsFromAutoPlacementPosition):
207         (WebCore::GridResolvedPosition::resolveGridPositionsFromStyle):
208         (WebCore::resolveNamedGridLinePositionFromStyle): Deleted.
209         * rendering/style/GridResolvedPosition.h:
210
211 2016-01-28  Brady Eidson  <beidson@apple.com>
212
213         Modern IDB: SQLite backend mismanages key generator values.
214         https://bugs.webkit.org/show_bug.cgi?id=153625
215
216         Reviewed by Andy Estes.
217
218         No new tests (Many failing tests pass, a few get closer).
219
220         There's mixed assumptions about whether the value stored is the current value or the next value.
221
222         Fixing those assumptions fixes tests.
223         
224         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
225         (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber): Store/retrieve the correct value.
226         (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber): Ditto.
227         (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber): Ditto.
228
229 2016-01-28  Joseph Pecoraro  <pecoraro@apple.com>
230
231         Web Inspector: InspectorTimelineAgent doesn't need to recompile functions because it now uses the sampling profiler
232         https://bugs.webkit.org/show_bug.cgi?id=153500
233         <rdar://problem/24352458>
234
235         Reviewed by Timothy Hatcher.
236
237         * bindings/js/JSDOMWindowBase.cpp:
238         (WebCore::JSDOMWindowBase::supportsLegacyProfiling):
239         (WebCore::JSDOMWindowBase::supportsRichSourceInfo):
240         (WebCore::JSDOMWindowBase::supportsProfiling): Deleted.
241         * bindings/js/JSDOMWindowBase.h:
242         * bindings/js/JSWorkerGlobalScopeBase.cpp:
243         (WebCore::JSWorkerGlobalScopeBase::supportsLegacyProfiling):
244         (WebCore::JSWorkerGlobalScopeBase::supportsProfiling): Deleted.
245         * bindings/js/JSWorkerGlobalScopeBase.h:
246         * inspector/InspectorController.h:
247         * inspector/InspectorController.cpp:
248         (WebCore::InspectorController::legacyProfilerEnabled):
249         (WebCore::InspectorController::setLegacyProfilerEnabled):
250         Be more explicit about enabling legacy profiling.
251
252         * inspector/InspectorTimelineAgent.cpp:
253         (WebCore::InspectorTimelineAgent::willDestroyFrontendAndBackend):
254         (WebCore::InspectorTimelineAgent::didCreateFrontendAndBackend): Deleted.
255         TimelineAgent doesn't need to recompile if using the sampling profiler.
256         This breaks console.profile, but console.profile should move to using
257         the sampling profiler as well.
258
259         (WebCore::InspectorTimelineAgent::startFromConsole):
260         (WebCore::InspectorTimelineAgent::stopFromConsole):
261         (WebCore::startProfiling): Deleted.
262         (WebCore::stopProfiling): Deleted.
263         Inlined the use once static functions.
264
265         * page/PageConsoleClient.cpp:
266         (WebCore::PageConsoleClient::profile):
267         (WebCore::PageConsoleClient::profileEnd):
268         Added FIXMEs for improving console.profile and profileEnd.
269
270         * testing/Internals.cpp:
271         (WebCore::Internals::resetToConsistentState):
272         (WebCore::Internals::setLegacyJavaScriptProfilingEnabled):
273         (WebCore::Internals::setJavaScriptProfilingEnabled): Deleted.
274         * testing/Internals.h:
275         * testing/Internals.idl:
276         Be more explicit about enabling legacy profiling.
277
278 2016-01-28  Chris Dumez  <cdumez@apple.com>
279
280         Move attributes to the prototype for List types / and types with indexed/named property getters
281         https://bugs.webkit.org/show_bug.cgi?id=153599
282
283         Reviewed by Darin Adler.
284
285         Move attributes to the prototype for List types / and types with indexed/named property getters.
286
287         We used to keep them on the instance because:
288         1. Our GetOwnProperty lookup used to be in incorrect order for interfaces with indexed/named property getters.
289         -> This was fixed recently and we now match the specification and other browsers.
290         2. This used to regress performance when iterating over those list types
291         -> Local testing seems to show that this is no longer a regression (tested Speedometer and various related Bindings PerformanceTests).
292
293         No new tests, already covered by existing tests.
294
295         * bindings/scripts/CodeGeneratorJS.pm:
296         (InterfaceRequiresAttributesOnInstance): Deleted.
297         (AttributeShouldBeOnInstanceForCompatibility): Deleted.
298
299 2016-01-28  Antti Koivisto  <antti@apple.com>
300
301         Tab suspension code hits asserts
302              
303
304         Reviewed by Chris Dumez.
305
306         Enabling tab suspension and navigating around in a few tabs hits an assert in
307         ScriptExecutionContext::suspendActiveDOMObject. This is because suspend/resume reasons don't pair properly
308
309         * dom/Document.cpp:
310         (WebCore::Document::documentWillBecomeInactive):
311         (WebCore::Document::suspend):
312         (WebCore::Document::resume):
313
314             Provide the reason as argument.
315
316         * dom/Document.h:
317         * history/CachedFrame.cpp:
318         (WebCore::CachedFrameBase::restore):
319
320             No need to call resumeActiveDOMObjects/resumeScriptedAnimationControllerCallbacks explicitly as Document::resume does that.
321
322         (WebCore::CachedFrame::CachedFrame):
323         * loader/FrameLoader.cpp:
324         (WebCore::FrameLoader::commitProvisionalLoad):
325         * page/Page.cpp:
326         (WebCore::Page::canTabSuspend):
327         (WebCore::Page::setIsTabSuspended):
328
329 2016-01-28  Brady Eidson  <beidson@apple.com>
330
331         Modern IDB: Fix several more problems with object store changes during cursor iteration in SQLite backend.
332         https://bugs.webkit.org/show_bug.cgi?id=153616
333
334         Reviewed by Alex Christensen.
335
336         No new tests (A few failing tests pass, a few get closer).
337
338         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
339         (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
340         
341         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
342         (WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
343         (WebCore::IDBServer::SQLiteIDBCursor::bindArguments):
344         
345         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
346         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::iterateCursor):
347
348 2016-01-28  Daniel Bates  <dabates@apple.com>
349
350         Cleanup: Make DedicatedWorkerThread::create() an inline template method
351         https://bugs.webkit.org/show_bug.cgi?id=153612
352
353         Reviewed by Andy Estes.
354
355         Make use of variadic template arguments and std::forward() to forward the arguments passed
356         from DedicatedWorkerThread::create() to DedicatedWorkerThread::DedicatedWorkerThread(). This
357         removes the need to duplicate code whenever we modify the parameter types or number of
358         parameters taken by DedicatedWorkerThread::DedicatedWorkerThread().
359
360         * workers/DedicatedWorkerThread.cpp:
361         (WebCore::DedicatedWorkerThread::create): Deleted.
362         * workers/DedicatedWorkerThread.h: Reorganized listing of member functions such that we
363         group the creation/constructor and destructor functions.
364         (WebCore::DedicatedWorkerThread::create): Modified to be an inline template with variadic
365         parameters that std::forward()s its arguments to DedicatedWorkerThread::DedicatedWorkerThread().
366
367 2016-01-28  Brady Eidson  <beidson@apple.com>
368
369         Modern IDB: SQLite backend doesn't handle mutation during cursor iteration.
370         https://bugs.webkit.org/show_bug.cgi?id=153614
371
372         Reviewed by Alex Christensen.
373
374         No new tests (A few failing tests pass, a few get closer).
375
376         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
377         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange): Call notifyCursorsOfChanges.
378         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord): Ditto.
379
380         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
381         (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
382         (WebCore::IDBServer::SQLiteIDBCursor::~SQLiteIDBCursor):
383         * Modules/indexeddb/server/SQLiteIDBCursor.h:
384
385         * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
386         (WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenBackingStoreCursor): Remember these transient backing 
387           store cursors so they can be notified of changes.
388         (WebCore::IDBServer::SQLiteIDBTransaction::closeCursor): Handle removing the cursor from the right set.
389         (WebCore::IDBServer::SQLiteIDBTransaction::notifyCursorsOfChanges):
390         * Modules/indexeddb/server/SQLiteIDBTransaction.h:
391
392 2016-01-28  Brady Eidson  <beidson@apple.com>
393
394         Modern IDB: SQLite backend doesn't support deleting ranges with more than one key.
395         https://bugs.webkit.org/show_bug.cgi?id=153604
396
397         Reviewed by Andy Estes.
398
399         No new tests (A few failing tests pass, a few get closer).
400
401         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
402         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
403
404 2016-01-28  Alex Christensen  <achristensen@webkit.org>
405
406         Fix Windows build after r195774.
407
408         * platform/network/ParsedContentRange.cpp:
409
410 2016-01-28  Anders Carlsson  <andersca@apple.com>
411
412         Add an ArrayValue::get overload that returns a string
413         https://bugs.webkit.org/show_bug.cgi?id=153613
414
415         Reviewed by Tim Horton.
416
417         * bindings/js/ArrayValue.cpp:
418         (WebCore::ArrayValue::get):
419         * bindings/js/ArrayValue.h:
420
421 2016-01-28  Chris Dumez  <cdumez@apple.com>
422
423         EventHandler IDL attributes should be enumerable
424         https://bugs.webkit.org/show_bug.cgi?id=153595
425
426         Reviewed by Sam Weinig.
427
428         Most of our EventHandler IDL attributes were marked as [NotEnumerable]
429         but should not have been according to the specification:
430         - https://html.spec.whatwg.org/#globaleventhandlers
431         - https://html.spec.whatwg.org/#windoweventhandlers
432
433         Firefox and Chrome behave according to the specification.
434         This patch aligns our behavior.
435
436         No new tests, already covered by existing tests.
437
438         * dom/Document.idl:
439         * dom/GlobalEventHandlers.idl:
440         * page/WindowEventHandlers.idl:
441
442 2016-01-28  Jer Noble  <jer.noble@apple.com>
443
444         Windows build fix; PRId64 formatting macro for int64_t undefined, so provide Windows-specific alternative.
445
446         * platform/network/ParsedContentRange.cpp:
447
448 2016-01-28  ChangSeok Oh  <changseok.oh@collabora.com>
449
450         [ThreadedCompositor] Fix flickers happening on video when entering/leaving fullscreen.
451         https://bugs.webkit.org/show_bug.cgi?id=153585
452
453         Reviewed by Michael Catanzaro.
454
455         Video thumbnail flickers where threaded compositor is enabled. This is because
456         a content buffer is not set to a target layer which changes before swapBuffer.
457         This is a very rare case though, it happens where video size changes many times in a short period.
458
459         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
460         (WebCore::TextureMapperPlatformLayerProxy::activateOnCompositingThread):
461
462 2016-01-27  Jer Noble  <jer.noble@apple.com>
463
464         Allow CachedResourceLoader clients to opt out of the MemoryCache.
465         https://bugs.webkit.org/show_bug.cgi?id=153549
466
467         Reviewed by Darin Adler.
468
469         Add a flag to ResourceLoaderOptions which allow loader clients to opt out of having
470         resources stored in the MemoryCache. 
471
472         * loader/ResourceLoaderOptions.h:
473         (WebCore::ResourceLoaderOptions::ResourceLoaderOptions):
474         (WebCore::ResourceLoaderOptions::cachingPolicy):
475
476         Existing clients will have to add the (default) AllowCaching flag when they create a
477         ResourceLoaderOptions object.
478
479         * loader/DocumentLoader.cpp:
480         (WebCore::DocumentLoader::startLoadingMainResource):
481         * loader/MediaResourceLoader.cpp:
482         (WebCore::MediaResourceLoader::start):
483         * loader/NetscapePlugInStreamLoader.cpp:
484         (WebCore::NetscapePlugInStreamLoader::NetscapePlugInStreamLoader):
485         (WebCore::ResourceLoaderOptions::setCachingPolicy):
486         * loader/icon/IconLoader.cpp:
487         (WebCore::IconLoader::startLoading):
488         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
489         (WebCore::WebCoreAVFResourceLoader::startLoading):
490
491         Every time the CachedResource or CachedResourceLoader accesses the MemoryCache, check
492         to see whether the resource or the request have allowed caching before adding resources
493         to, removing resources from, or sourcing resource data from the MemoryCache.
494
495         * loader/cache/CachedResource.cpp:
496         (WebCore::CachedResource::~CachedResource):
497         (WebCore::CachedResource::failBeforeStarting):
498         (WebCore::CachedResource::addClientToSet):
499         (WebCore::CachedResource::removeClient):
500         (WebCore::CachedResource::setDecodedSize):
501         (WebCore::CachedResource::setEncodedSize):
502         (WebCore::CachedResource::didAccessDecodedData):
503         * loader/cache/CachedResource.h:
504         (WebCore::CachedResource::allowsCaching):
505         * loader/cache/CachedResourceLoader.cpp:
506         (WebCore::CachedResourceLoader::requestUserCSSStyleSheet):
507         (WebCore::CachedResourceLoader::requestResource):
508         (WebCore::CachedResourceLoader::revalidateResource):
509         (WebCore::CachedResourceLoader::loadResource):
510         (WebCore::CachedResourceLoader::printPreloadStats):
511         (WebCore::CachedResourceLoader::defaultCachedResourceOptions):
512         * loader/cache/CachedResourceRequest.h:
513         (WebCore::CachedResourceRequest::allowsCaching):
514
515 2016-01-28  Enrica Casucci  <enrica@apple.com>
516
517         Should avoid navigation for some data detector urls.
518         https://bugs.webkit.org/show_bug.cgi?id=153600
519
520         Reviewed by Tim Horton.
521
522         Adding helper function to decide whether the default action should be performed.
523
524         * editing/cocoa/DataDetection.h:
525         * editing/cocoa/DataDetection.mm:
526         (WebCore::DataDetection::shouldCancelDefaultAction):
527
528 2016-01-28  Dave Hyatt  <hyatt@apple.com>
529
530         Roll out r194555, as it introduced some bad regressions and was not
531         correct.
532
533         * rendering/RenderText.cpp:
534         (WebCore::RenderText::computePreferredLogicalWidths):
535
536 2016-01-28  Brady Eidson  <beidson@apple.com>
537
538         Modern IDB: Index uniqueness broken in the SQLite backend.
539         https://bugs.webkit.org/show_bug.cgi?id=153596
540
541         Reviewed by Alex Christensen.
542
543         No new tests (Many failing tests now pass, others improve).
544
545         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
546         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
547         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
548         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
549         (WebCore::IDBServer::SQLiteIDBBackingStore::updateOneIndexForAddRecord):
550         (WebCore::IDBServer::SQLiteIDBBackingStore::updateAllIndexesForAddRecord):
551         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
552         (WebCore::IDBServer::SQLiteIDBBackingStore::updateIndexesForAddRecord): Deleted.
553         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
554
555 2016-01-08  Jer Noble  <jer.noble@apple.com>
556
557         Custom protocol loading through AVFoundation does not support byte-range requests.
558         https://bugs.webkit.org/show_bug.cgi?id=152919
559         <rdar://problem/23664657>
560
561         Reviewed by Alex Christensen.
562
563         Tests: http/tests/xmlhttprequest/blob-request-byte-range.html
564                TestWebkitAPI/Tests/WebCore/ParsedContentRange.cpp
565
566         When loading data through the AVAssetResourceLoaderDelegateProtocol, AVFoundation will issue
567         requests for specific byte-ranges by adding a "Range:" HTTP header to the NSURLRequest it
568         passes to the delegate.  WebCore ignores this header, loads the entire resource, and replies
569         to the callback with the requested subset of the entire resource.
570
571         For byte-range requests near the end of a resource, this is inefficient, as the entire
572         resource up to, and including, the requested range must be loaded before any data can be
573         returned. Explicitly handle byte-range requests by creating a CachedResourceRequest with the
574         underlying NSURLRequest (which includes the "Range:" header) rather than just the request's
575         URL. BlobResourceHandle must be modified to add the "Content-Range:" response header to the
576         ResourceResponse. 
577
578         To facilitate both generating and parsing the "Content-Range:" header, add a new
579         ParsedContentRange class for use by ResourceResponse and its clients. This class provides
580         methods both for parsing a "Content-Range" header value string, and for generating the
581         header value from elemental values.
582
583         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
584         (WebCore::WebCoreAVFResourceLoader::startLoading):
585         (WebCore::WebCoreAVFResourceLoader::responseReceived):
586         (WebCore::WebCoreAVFResourceLoader::fulfillRequestWithResource):
587         * platform/network/BlobResourceHandle.cpp:
588         (WebCore::BlobResourceHandle::BlobResourceHandle):
589         (WebCore::BlobResourceHandle::didGetSize):
590         (WebCore::BlobResourceHandle::seek):
591         (WebCore::BlobResourceHandle::notifyResponseOnSuccess):
592         * platform/network/BlobResourceHandle.h:
593         * platform/network/HTTPHeaderNames.in:
594         * platform/network/ParsedContentRange.cpp: Added.
595         (WebCore::areContentRangeValuesValid):
596         (WebCore::parseContentRange):
597         (WebCore::ParsedContentRange::ParsedContentRange):
598         (WebCore::ParsedContentRange::headerValue):
599         * platform/network/ParsedContentRange.h: Added.
600         (WebCore::ParsedContentRange::ParsedContentRange):
601         (WebCore::ParsedContentRange::isValid):
602         (WebCore::ParsedContentRange::firstBytePosition):
603         (WebCore::ParsedContentRange::lastBytePosition):
604         (WebCore::ParsedContentRange::instanceLength):
605         * platform/network/ResourceResponseBase.cpp:
606         (WebCore::ResourceResponseBase::updateHeaderParsedState):
607         (WebCore::parseContentRangeInHeader):
608         (WebCore::ResourceResponseBase::contentRange):
609         * platform/network/ResourceResponseBase.h:
610         * CMakeLists.txt:
611         * WebCore.vcxproj/WebCore.vcxproj:
612         * WebCore.vcxproj/WebCore.vcxproj.filters:
613         * WebCore.xcodeproj/project.pbxproj:
614
615 2016-01-28  Chris Dumez  <cdumez@apple.com>
616
617         Storage interface's attributes / operations should be enumerable
618         https://bugs.webkit.org/show_bug.cgi?id=153573
619
620         Reviewed by Darin Adler.
621
622         Storage interface's attributes / operations should be enumerable:
623         - https://html.spec.whatwg.org/#the-storage-interface
624
625         Firefox matches the specification.
626
627         No new tests, already covered by existing test.
628
629         * storage/Storage.idl:
630
631 2016-01-26  Ada Chan  <adachan@apple.com>
632
633         Get WebVideoFullscreenManager and related classes to also compile for Mac platform
634         with video presentation mode support.
635         https://bugs.webkit.org/show_bug.cgi?id=153221
636
637         Reviewed by Eric Carlson.
638
639         No new tests, no actual behavior change with a stub implementation of WebVideoFullscreenInterfaceMac.
640
641         * WebCore.xcodeproj/project.pbxproj:
642         Add PlatformView.h, WebVideoFullscreenChangeObserver.h, and WebVideoFullscreenInterfaceMac.h.
643
644         * html/HTMLMediaElement.cpp:
645         (WebCore::HTMLMediaElement::HTMLMediaElement):
646         (WebCore::HTMLMediaElement::mediaPlayerEngineUpdated):
647         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction):
648         * html/HTMLMediaElement.h:
649         Enable the code that deals with the video fullscreen layer also for Mac platform with
650         video presentation mode support.
651
652         * platform/cocoa/PlatformView.h:
653         Header file for declaring the view types for each Cocoa platform.
654
655         * platform/cocoa/WebVideoFullscreenChangeObserver.h:
656         (WebCore::WebVideoFullscreenChangeObserver::~WebVideoFullscreenChangeObserver):
657         Interface declaration moved from WebVideoFullscreenInterfaceAVKit.h.
658
659         * platform/cocoa/WebVideoFullscreenInterface.h:
660         Stop guarding the declaration of WebVideoFullscreenInterface to be iOS specific. It is now
661         enabled for iOS and Mac platform with video presentation mode support.
662
663         * platform/cocoa/WebVideoFullscreenModel.h:
664         * platform/cocoa/WebVideoFullscreenModelVideoElement.h:
665         * platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
666         Enable also for Mac platform with video presentation mode support.
667         (WebVideoFullscreenModelVideoElement::setVideoFullscreenLayer):
668         Set the video fullscreen layer's anchor point to (0, 0) since we are not changing the position of
669         the video layer on Mac.
670
671         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
672         Import WebVideoFullscreenChangeObserver.h now that the interface declaration has been moved to that file.
673         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
674         Move the declaration of WebVideoFullscreenChangeObserver to a separate header.
675         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
676         Import WebVideoFullscreenChangeObserver.h now that the interface declaration has been moved to that file.
677
678         * platform/mac/WebVideoFullscreenInterfaceMac.h: Added.
679         * platform/mac/WebVideoFullscreenInterfaceMac.mm:
680         (WebCore::WebVideoFullscreenInterfaceMac::~WebVideoFullscreenInterfaceMac):
681         (WebCore::WebVideoFullscreenInterfaceMac::setWebVideoFullscreenModel):
682         (WebCore::WebVideoFullscreenInterfaceMac::setWebVideoFullscreenChangeObserver):
683         (WebCore::WebVideoFullscreenInterfaceMac::resetMediaState):
684         (WebCore::WebVideoFullscreenInterfaceMac::setDuration):
685         (WebCore::WebVideoFullscreenInterfaceMac::setCurrentTime):
686         (WebCore::WebVideoFullscreenInterfaceMac::setBufferedTime):
687         (WebCore::WebVideoFullscreenInterfaceMac::setRate):
688         (WebCore::WebVideoFullscreenInterfaceMac::setVideoDimensions):
689         (WebCore::WebVideoFullscreenInterfaceMac::setSeekableRanges):
690         (WebCore::WebVideoFullscreenInterfaceMac::setCanPlayFastReverse):
691         (WebCore::WebVideoFullscreenInterfaceMac::setAudioMediaSelectionOptions):
692         (WebCore::WebVideoFullscreenInterfaceMac::setLegibleMediaSelectionOptions):
693         (WebCore::WebVideoFullscreenInterfaceMac::setExternalPlayback):
694         (WebCore::WebVideoFullscreenInterfaceMac::setWirelessVideoPlaybackDisabled):
695         (WebCore::WebVideoFullscreenInterfaceMac::setupFullscreen):
696         (WebCore::WebVideoFullscreenInterfaceMac::enterFullscreen):
697         (WebCore::WebVideoFullscreenInterfaceMac::exitFullscreen):
698         (WebCore::WebVideoFullscreenInterfaceMac::cleanupFullscreen):
699         (WebCore::WebVideoFullscreenInterfaceMac::invalidate):
700         (WebCore::WebVideoFullscreenInterfaceMac::requestHideAndExitFullscreen):
701         (WebCore::WebVideoFullscreenInterfaceMac::preparedToReturnToInline):
702         (WebCore::WebVideoFullscreenInterfaceMac::setMode):
703         (WebCore::WebVideoFullscreenInterfaceMac::clearMode):
704         (WebCore::WebVideoFullscreenInterfaceMac::mayAutomaticallyShowVideoPictureInPicture):
705         (WebCore::WebVideoFullscreenInterfaceMac::applicationDidBecomeActive):
706         (WebCore::supportsPictureInPicture):
707         Add a stub implementation of WebVideoFullscreenInterfaceMac.
708
709 2016-01-28  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
710
711         [SVG] Add support for 'lighter' operator in feComposite
712         https://bugs.webkit.org/show_bug.cgi?id=141376
713
714         Reviewed by Darin Adler.
715
716         Added new cases where needed to support the lighter (aka 'plus')
717         Porter Duff operator in SVG Filter Effects.
718         https://www.w3.org/TR/filter-effects/#valdef-operator-lighter
719         Note that in the specification, no constant was added to the IDL for
720         the lighter operator. 
721
722         Test: svg/filters/feCompositeOpaque.html
723               svg/dom/script-tests/SVGAnimatedEnumeration-SVGFECompositeElement.js
724
725         * platform/graphics/filters/FEComposite.cpp:
726         (WebCore::FEComposite::platformApplySoftware):
727           Add case to support lighter.
728         (WebCore::operator<<):
729           Add case to support lighter for text stream operations.
730         * platform/graphics/filters/FEComposite.h:
731           Add case for lighter to CompositeOperationType enum.
732         * svg/SVGFECompositeElement.h:
733         (WebCore::SVGIDLEnumLimits<CompositeOperationType>::highestExposedEnumValue):
734           Higest exposed value is arithmetic - do not expose lighter.
735         (WebCore::SVGPropertyTraits<CompositeOperationType>::highestEnumValue):
736           Highest possible value is now lighter.
737         (WebCore::SVGPropertyTraits<CompositeOperationType>::toString):
738           Add case to support lighter.
739         (WebCore::SVGPropertyTraits<CompositeOperationType>::fromString):
740           Add case to support lighter.
741
742 2016-01-28  Darin Adler  <darin@apple.com>
743
744         Remove equalIgnoringCase since all callers really wanted equalIgnoringASCIICase
745         https://bugs.webkit.org/show_bug.cgi?id=153411
746
747         Reviewed by Ryosuke Niwa.
748
749         Tests: fast/media/media-query-non-ASCII-case-folding.html
750                fast/dom/HTMLAnchorElement/anchor-non-ASCII-case-folding.html
751                fast/xpath/xpath-non-ASCII-case-folding.html
752
753         No tests included that cover the minor behavior changes in Document::setDomain,
754         CSPSource::schemeMatches, CSPSource::hostMatches, OriginAccessEntry::operator==,
755         UserContentURLPattern::matches, UserContentURLPattern::matchesHost,
756         ContentFilterUnblockHandler::canHandleRequest. Would like to add tests for those
757         if possible, but it seems clear all are progressions.
758
759         For background on why this is the right thing to do in almost every case:
760
761         - MIME types are all ASCII and not case sensitive (details in RFC 2045)
762           <http://tools.ietf.org/html/rfc2045>
763         - case insensitive comparisons in HTML are all "ASCII case-insensitive"
764           https://www.w3.org/TR/html/infrastructure.html#ascii-case-insensitive
765         - same for CSS
766
767         * Modules/webdatabase/DatabaseAuthorizer.cpp:
768         (WebCore::DatabaseAuthorizer::denyBasedOnTableName): Use equalIgnoringASCIICase.
769         No change in behavior since the string we are comparing with is always
770         "__WebKitDatabaseInfoTable__" in practice.
771
772         * accessibility/AccessibilityNodeObject.cpp:
773         (WebCore::siblingWithAriaRole): Changed argument type to take a const char*,
774         added some FIXMEs and use equalIgnoringCase. No change in behavior since the
775         strings we are comparing with are "menu" and "menuitem".
776         (WebCore::AccessibilityNodeObject::menuElementForMenuButton): Updated to pass
777         arguments in reverse order.
778         (WebCore::AccessibilityNodeObject::menuItemElementForMenu): Ditto.
779
780         * css/CSSParser.cpp:
781         (WebCore::CSSParser::parseFontFaceValue): Use equalIgnoringASCIICase.
782         No change in behavior because the property names are all ASCII constants.
783
784         * css/CSSParserValues.h: Removed unused equalIgnoringCase function.
785
786         * css/MediaQueryEvaluator.cpp:
787         (WebCore::MediaQueryEvaluator::mediaTypeMatch): Use equalIgnoringASCIICase.
788         Changes behavior: No non-ASCII case folding when matching media types.
789         Covered by new test.
790         (WebCore::MediaQueryEvaluator::mediaTypeMatchSpecific): Use equalIgnoringASCIICase.
791         No change in behavior since the only string this is ever called with is "print".
792
793         * dom/DataTransfer.cpp:
794         (WebCore::DataTransfer::hasFileOfType): Use equalIgnoringASCIICase.
795         No change in behavior because local files will not have content types with
796         non-ASCII characters in them. In the extremely unlikely case that this is incorrect,
797         the change in behavior is a progression.
798
799         * dom/Document.cpp:
800         (WebCore::Document::setDomain): Use equalIgnoringASCIICase.
801         Changes behavior: Domains considered equal because of non-ASCII case folding
802         would get through without an error before, and now will properly throw an exception.
803
804         * dom/Element.cpp:
805         (WebCore::isStyleAttribute): Refactored into a helper function. Use
806         equalLettersIgnoringASCIICase. No change in behavior.
807         (WebCore::Element::synchronizeAttribute): Use isStyleAttribute.
808
809         * dom/TreeScope.cpp:
810         (WebCore::TreeScope::findAnchor): Use equalIgnoringASCIICase.
811         Changes behavior: Could go to an anchor and it would be considered a match because
812         of non-ASCII case folding. Covered by new test.
813
814         * html/HiddenInputType.cpp:
815         (WebCore::HiddenInputType::appendFormData): Use equalIgnoringASCIICase.
816         No change in behavior: comparing with an ASCII literal.
817         * html/canvas/WebGL2RenderingContext.cpp:
818         (WebCore::WebGL2RenderingContext::getExtension): Ditto.
819         * html/canvas/WebGLRenderingContext.cpp:
820         (WebCore::WebGLRenderingContext::getExtension): Ditto.
821
822         * html/parser/CSSPreloadScanner.cpp:
823         (WebCore::CSSPreloadScanner::emitRule): Use equalLettersIgnoringASCIICase and
824         StringView to avoid needing a special ruleEqualIgnoringCase function.
825         No change in behavior.
826
827         * inspector/InspectorNodeFinder.cpp:
828         (WebCore::InspectorNodeFinder::matchesElement): Use equalIgnoringASCIICase.
829         Changes behavior, but it's an inspector UI thing, not a web behavior thing,
830         so I don't think a new regression test is needed.
831
832         * loader/HistoryController.cpp:
833         (WebCore::HistoryController::currentItemShouldBeReplaced): Use
834         equalIgnoringASCIICase. No change in behavior because we are comparing
835         with "about:blank".
836
837         * loader/SubframeLoader.cpp:
838         (WebCore::findPluginMIMETypeFromURL): Use equalIgnoringASCIICase.
839         No change in behavior unless a plug-in claims an extension with non-ASCII
840         characters. I don't think a new regression test is needed.
841
842         * loader/appcache/ApplicationCacheHost.cpp:
843         (WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache):
844         Use equalIgnoringASCIICase. No change in behavior because both strings are
845         protocols from URLs and we don't parse non-ASCII characters into protocol strings;
846         non-ASCII are already encoding as punycode.
847         * loader/appcache/ManifestParser.cpp:
848         (WebCore::parseManifest): Ditto.
849
850         * page/ContentSecurityPolicy.cpp:
851         (WebCore::isExperimentalDirectiveName): Added. Used by isDirectiveName.
852         Uses equalLettersIgnoringASCIICase. No change in behavior.
853         (WebCore::isDirectiveName): Use equalLettersIgnoringASCIICase.
854         No change in behavior.
855         (WebCore::isSourceListNone): Use equalLettersIgnoringASCIICase. No
856         change in behavior.
857         (WebCore::CSPSource::schemeMatches): Use equalLettersIgnoringASCIICase
858         and equalIgnoringASCIICase. It's all about comparing URL protocols. The
859         old code might have done something strange if someone specified a protocol
860         with a non-ASCII character in it.
861         (WebCore::CSPSource::hostMatches): Use equalIgnoringASCIICase.
862         (WebCore::CSPSourceList::parseSource): Use equalLettersIgnoringASCIICase.
863         No change in behavior.
864         (WebCore::CSPDirectiveList::checkSourceAndReportViolation): Tweaked code
865         to do less unnecessary String allocation.
866         (WebCore::CSPDirectiveList::parseReflectedXSS): Use
867         equalLettersIgnoringASCIICase. No change in behavior.
868         (WebCore::CSPDirectiveList::addDirective): Ditto.
869         (WebCore::ContentSecurityPolicy::reportUnsupportedDirective): Use
870         equalLettersIgnoringASCIICase and remove unneeded global constant strings.
871         No change in behavior.
872         (WebCore::ContentSecurityPolicy::reportDirectiveAsSourceExpression):
873         Tweak code to eliminate unneeded local.
874         (WebCore::ContentSecurityPolicy::reportDuplicateDirective): Ditto.
875         (WebCore::ContentSecurityPolicy::reportInvalidSourceExpression): Use
876         equalLettersIgnoringASCIICase. No change in behavior.
877
878         * page/OriginAccessEntry.h:
879         (WebCore::operator==): Use equalLettersIgnoringASCIICase.
880
881         * page/Performance.cpp:
882         (WebCore::Performance::webkitGetEntriesByName): Use equalLettersIgnoringASCIICase.
883         No change in behavior.
884
885         * page/UserContentURLPattern.cpp:
886         (WebCore::UserContentURLPattern::matches): Use equalIgnoringASCIICase to match
887         schemes.
888         (WebCore::UserContentURLPattern::matchesHost): Use equalIgnoringASCIICase to
889         match host names.
890
891         * platform/URL.cpp:
892         (WebCore::URL::init): Use equalIgnoringASCIICase, and also use StringView to
893         avoid having to allocate a second string just for comparison purposes. Should be
894         better for efficiency with no change in behavior.
895
896         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
897         (WebCore::ContentFilterUnblockHandler::canHandleRequest): Use equalIgnoringASCIICase
898         to compare hosts.
899
900         * platform/efl/PlatformSpeechSynthesisProviderEfl.cpp:
901         (WebCore::PlatformSpeechSynthesisProviderEfl::voiceName): Use StringView and
902         equalIgnoringASCIICase to compare language tags. No test needed because there are
903         no language tags with non-ASCII characters in them.
904
905         * platform/graphics/FontCache.cpp:
906         (WebCore::FontPlatformDataCacheKey::operator==): Changed to use the equal
907         function from CaseFoldingHash. In a subsequent patch we will change this to be
908         ASCIICaseFoldingHash since font names don't need to compare non-ASCII characters
909         in a case folding manner, but for now preserve behavior.
910         (WebCore::alternateFamilyName): Use equalLettersIgnoringASCIICase to avoid having
911         to use a special familyNameEqualIgnoringCase function. This does mean there will
912         be a null check and a length check that wasn't there before, but the actual
913         comparison function will be tighter. Guessing it will be a wash. Also improved
914         the comments and sorted the Windows cases in with the others. No behavior change.
915
916         * platform/graphics/FontCascade.cpp:
917         (WebCore::operator==): Changed to use the equal function from CaseFoldingHash.
918         Same rationale as above in FontPlatformDataCacheKey.
919
920         * platform/graphics/FontDescription.cpp:
921         (WebCore::FontCascadeDescription::familiesEqualForTextAutoSizing): Use
922         equalIgnoringASCIICase to compare font family names. Only possible change in
923         behavior would be if actual fonts with non-ASCII names but that were specified
924         with different case in style sheets. Highly unlikely this exists.
925
926         * platform/graphics/MediaPlayer.cpp:
927         (WebCore::MediaPlayer::supportsType): Use equalLettersIgnoringASCIICase.
928         No change in behavior.
929         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
930         (WebCore::keySystemIsSupported): Ditto.
931
932         * platform/graphics/freetype/FontCacheFreeType.cpp:
933         (WebCore::isCommonlyUsedGenericFamily): Added.
934         (WebCore::FontCache::createFontPlatformData): Moved code into the
935         isCommonlyUsedGenericFamily helper and used equalIgnoringASCIICase.
936
937         * platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp:
938         (WebCore::FontCustomPlatformData::supportsFormat): Use
939         equalLettersIgnoringASCIICase. No change in behavior.
940         * platform/graphics/win/FontCacheWin.cpp:
941         (WebCore::adjustedGDIFontWeight): Ditto.
942         (WebCore::FontCache::createFontPlatformData): Ditto.
943         * platform/graphics/win/FontCustomPlatformData.cpp:
944         (WebCore::FontCustomPlatformData::supportsFormat): Ditto.
945         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
946         (WebCore::FontCustomPlatformData::supportsFormat): Ditto.
947
948         * platform/mac/PlatformSpeechSynthesizerMac.mm:
949         (-[WebSpeechSynthesisWrapper speakUtterance:]): Use equalIgnoringASCIICase to
950         compare languages. No change in behavior because languages have all-ASCII names.
951
952         * platform/network/CacheValidation.cpp:
953         (WebCore::shouldUpdateHeaderAfterRevalidation): Use equalIgnoringASCIICase.
954         No change in behavior since it's a fixed list of all ASCII headers.
955         * platform/network/curl/ResourceHandleManager.cpp:
956         (WebCore::isAppendableHeader): Ditto.
957
958         * platform/network/mac/ResourceHandleMac.mm:
959         (WebCore::ResourceHandle::willSendRequest): Use equalIgnoringASCIICase.
960         No change in behavior because HTTP methods are all ASCII letters.
961
962         * platform/text/mac/LocaleMac.mm:
963         (WebCore::determineLocale): Use equalIgnoringASCIICase. No change in behavior
964         because locale languages identifiers are all ASCII.
965         * platform/text/win/LocaleWin.cpp:
966         (WebCore::LCIDFromLocaleInternal): Ditto.
967
968         * svg/SVGToOTFFontConversion.cpp:
969         (WebCore::SVGToOTFFontConverter::appendArabicReplacementSubtable):
970         Use equalIgnoringASCIICase. No change in behavior because Arabic form attribute
971         values are all ASCII.
972
973         * xml/XMLHttpRequest.cpp:
974         (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod): Use equalIgnoringASCIICase.
975         No change in behavior because these are all fixed known ASCII HTTP method names.
976
977         * xml/XPathFunctions.cpp:
978         (WebCore::XPath::FunLang::evaluate): Use equalIgnoringASCIICase. Changes behavior
979         if specifying a non-ASCII character. Covered by new test.
980
981         * xml/XPathStep.cpp:
982         (WebCore::XPath::nodeMatchesBasicTest): Use equalIgnoringASCIICase. Changes
983         behavior if an element local name or XPath predicate has a non-ASCII character.
984         Covered by new test.
985
986 2016-01-28  Zalan Bujtas  <zalan@apple.com>
987
988         Unexpected content wrapping at http://email.osh.com/H/2/v100000152474feb8ec7c1a1f4bbe5c7c0/HTML
989         https://bugs.webkit.org/show_bug.cgi?id=153430
990
991         Reviewed by Simon Fraser.
992
993         Ensure that min/max preferred and computed widths never shrink while converting LayoutUnit to float and back.
994
995         Test: fast/table/fixed-size-table-with-fixed-size-content.html
996
997         * rendering/AutoTableLayout.cpp:
998         (WebCore::AutoTableLayout::recalcColumn):
999         (WebCore::AutoTableLayout::calcEffectiveLogicalWidth):
1000         (WebCore::AutoTableLayout::layout):
1001         * rendering/RenderBlock.cpp:
1002         (WebCore::RenderBlock::computePreferredLogicalWidths): Deleted.
1003
1004 2016-01-28  Gwang Yoon Hwang  <yoon@igalia.com>
1005
1006         [GStreamer] Clean up includes and headers related with GStreamerGL
1007         https://bugs.webkit.org/show_bug.cgi?id=153590
1008
1009         Reviewed by Philippe Normand.
1010
1011         Remove gstglmemory from the including list and reorder includes to
1012         organize GSTREAMER_GL related headers. It violates style rules of the
1013         include order, but there is no clean way to include gst/gl/gl.h
1014         without violating it.
1015
1016         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1017         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
1018
1019 2016-01-28  Gwang Yoon Hwang  <yoon@igalia.com>
1020
1021         [GStreamer] MediaPlayerPrivateGStreamerBase::handleSyncMessage leaks GstContext
1022         https://bugs.webkit.org/show_bug.cgi?id=153580
1023
1024         Reviewed by Philippe Normand.
1025
1026         When we creates GstContext using gst_context_new it increases refcount itself.
1027         And the refcount of GstContext is increased when it is passed to
1028         gst_element_set_context, also. Therefore We should unref GstContext after
1029         using it to prevent GstContext leaks.
1030
1031         * platform/graphics/gstreamer/GRefPtrGStreamer.cpp:
1032         (WTF::adoptGRef): Added for GstContext.
1033         (WTF::refGPtr<GstContext>): Ditto
1034         (WTF::derefGPtr<GstContext>): Ditto
1035         * platform/graphics/gstreamer/GRefPtrGStreamer.h:
1036         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1037         (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
1038         Use GRefPtr<GstContext> to handle currect refcounting
1039
1040 2016-01-27  Alex Christensen  <achristensen@webkit.org>
1041
1042         Fix clean CMake build after r195711.
1043
1044         * PlatformWin.cmake:
1045         Copy forwarding headers from the new directory to find ContentSecurityPolicy.h.
1046         This should fix EWS issues like the one seen in bug 153573.
1047
1048 2016-01-27  Chris Dumez  <cdumez@apple.com>
1049
1050         Expose ValidityState on the global Window object
1051         https://bugs.webkit.org/show_bug.cgi?id=153582
1052
1053         Reviewed by Antti Koivisto.
1054
1055         Expose ValidityState on the global Window object:
1056         https://html.spec.whatwg.org/#validitystate
1057
1058         Firefox and Chrome match the specification.
1059
1060         No new tests, already covered by existing tests.
1061
1062         * html/ValidityState.idl:
1063
1064 2016-01-27  Chris Dumez  <cdumez@apple.com>
1065
1066         Expose ApplicationCache on the global Window object
1067         https://bugs.webkit.org/show_bug.cgi?id=153578
1068
1069         Reviewed by Antti Koivisto.
1070
1071         Expose ApplicationCache on the global Window object as per:
1072         https://html.spec.whatwg.org/#the-storage-interface
1073
1074         Chrome follows the spec.
1075
1076         No new tests, already covered by existing test.
1077
1078         * loader/appcache/DOMApplicationCache.idl:
1079
1080 2016-01-27  Ryosuke Niwa  <rniwa@webkit.org>
1081
1082         REGRESSION(r190430): Assertion failure in Text::~Text()
1083         https://bugs.webkit.org/show_bug.cgi?id=153577
1084
1085         Reviewed by Antti Koivisto.
1086
1087         The bug was caused by destroyRenderTreeIfNeeded exiting early on all HTMLSlotElement as it lacks a render object.
1088         Fixed it by explicitly avoiding the early return when child is a HTMLSlotElement.
1089
1090         Test: fast/shadow-dom/slot-removal-crash-2.html
1091
1092         * dom/ContainerNode.cpp:
1093         (WebCore::destroyRenderTreeIfNeeded):
1094
1095 2016-01-27  Said Abou-Hallawa  <sabouhallawa@apple.com>
1096
1097         Garbage is displayed when root svg element has mix-blend-mode set
1098         https://bugs.webkit.org/show_bug.cgi?id=150556
1099
1100         Reviewed by Darin Adler.
1101
1102         This bug happens when compositing on a CALayer and drawing on a transparent
1103         layer, so it happens with WK2 with <svg style="mix-blend-mode...">. And it
1104         can happen with WK1 also with <svg style="opacity=...;mix-blend-mode...">.
1105         But in both cases, the SVG root renderer should be the root of the render
1106         tree. So it happens only with the stand alone SVG documents.
1107
1108         SVGRenderContext::prepareToRenderSVGContent() ignores the opacity of
1109         the SVG root but it creates a transparent layer for the blend-mode.
1110
1111         But RenderLayer::beginTransparencyLayers() creates a transparent layer
1112         for opacity and it sets the blend-mode also.
1113
1114         The fix is to begin two transparent layers for the SVG root renderer: one
1115         for the opacity and the second for the blend-mode. The opacity transparent
1116         layer will be still managed by RenderLayer::beginTransparencyLayers(). While
1117         the blend-mode transparent layer will be managed by SVGRenderContext
1118         ::prepareToRenderSVGContent().
1119
1120         Tests: svg/css/mix-blend-mode-background-root.svg
1121                svg/css/mix-blend-mode-opacity-root.svg
1122
1123         * rendering/RenderLayer.cpp:
1124         (WebCore::RenderLayer::beginTransparencyLayers):
1125
1126 2016-01-27  Enrica Casucci  <enrica@apple.com>
1127
1128         Cache results of data detection in the UI process when load completes.
1129         https://bugs.webkit.org/show_bug.cgi?id=153560
1130
1131         Reviewed by Tim Horton.
1132
1133         Adding new FrameLoaderClient method to notify that data
1134         detection is complete and provide the results.
1135
1136         * loader/EmptyClients.h:
1137         * loader/FrameLoader.cpp:
1138         (WebCore::FrameLoader::checkLoadCompleteForThisFrame):
1139         * loader/FrameLoaderClient.h:
1140
1141 2016-01-27  Daniel Bates  <dabates@apple.com>
1142
1143         Move ContentSecurityPolicy.{cpp, h} to its own directory
1144         https://bugs.webkit.org/show_bug.cgi?id=153527
1145         <rdar://problem/24359892>
1146
1147         Reviewed by Sam Weinig.
1148
1149         Move ContentSecurityPolicy.{cpp, h} from Source/WebCore/page to Source/WebCore/page/csp.
1150         This will facilitate separating out the policy support classes (e.g. CSPDirectiveList)
1151         into their own files to improve the hackability of this code.
1152
1153         * CMakeLists.txt:
1154         * WebCore.vcxproj/WebCore.vcxproj:
1155         * WebCore.vcxproj/WebCore.vcxproj.filters:
1156         * WebCore.xcodeproj/project.pbxproj:
1157         * page/csp/ContentSecurityPolicy.cpp: Renamed from Source/WebCore/page/ContentSecurityPolicy.cpp.
1158         * page/csp/ContentSecurityPolicy.h: Renamed from Source/WebCore/page/ContentSecurityPolicy.h.
1159
1160 2016-01-27  Brady Eidson  <beidson@apple.com>
1161
1162         Modern IDB: Incorrect handling of iterating cursors to their end.
1163         https://bugs.webkit.org/show_bug.cgi?id=153569
1164
1165         Reviewed by Alex Christensen.
1166
1167         No new tests (3 tests now pass, others are closer to passing).
1168
1169         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
1170         (WebCore::IDBServer::SQLiteIDBCursor::advance):
1171         (WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
1172
1173 2016-01-27  Nan Wang  <n_wang@apple.com>
1174
1175         AX: Crash in AccessibilityTableColumn::headerObject
1176         https://bugs.webkit.org/show_bug.cgi?id=153553
1177         <rdar://problem/23196278>
1178
1179         Reviewed by Chris Fleizach.
1180
1181         Webkit was crashing sometimes when we asked for column headers of a table.
1182         The columns vector of the table was reset during the iteration when we
1183         were asking for the headerObject of each column. The column's addChildren()
1184         function calls elementRect() for each child cell and that sometimes causes 
1185         the parent table to reset its children.
1186         Fixed it by caching the columns vector and moving out the elementRect() logic
1187         from AccessibilityTalbeColumn::addChildren().  
1188
1189         * accessibility/AccessibilityTable.cpp:
1190         (WebCore::AccessibilityTable::columnHeaders):
1191         (WebCore::AccessibilityTable::rowHeaders):
1192         * accessibility/AccessibilityTableColumn.cpp:
1193         (WebCore::AccessibilityTableColumn::elementRect):
1194         (WebCore::AccessibilityTableColumn::headerObject):
1195         (WebCore::AccessibilityTableColumn::addChildren):
1196         * accessibility/AccessibilityTableColumn.h:
1197
1198 2016-01-27  Chris Dumez  <cdumez@apple.com>
1199
1200         Settings a reflected DOMString attribute to null should set it to the "null" string rather than the empty string
1201         https://bugs.webkit.org/show_bug.cgi?id=153504
1202         <rdar://problem/24353072>
1203
1204         Reviewed by Ryosuke Niwa.
1205
1206         Settings a reflected DOMString attribute to null should set it to the "null"
1207         string rather than the empty string:
1208         - https://html.spec.whatwg.org/#reflecting-content-attributes-in-idl-attributes
1209         - http://heycam.github.io/webidl/#es-DOMString
1210         - http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tostring
1211
1212         Firefox and Chrome match the specification here.
1213
1214         This is causing a lot of W3C HTML reflection tests to fail on WebKit, e.g.:
1215         - http://w3c-test.org/html/dom/reflection-text.html
1216
1217         No new tests, already covered by existing tests.
1218
1219         * bindings/scripts/CodeGeneratorJS.pm:
1220         (JSValueToNative):
1221         Call toString() instead of valueToStringWithNullCheck() for reflected
1222         attributes. This way, null gets converted to the string "null", as
1223         expected, instead of a null String object.
1224
1225         * html/HTMLInputElement.idl:
1226         Dropping [TreatNullAs=NullString] IDL extended attribute for
1227         input.defaultValue, as this is not present in the specification:
1228         - https://html.spec.whatwg.org/#htmlinputelement
1229
1230         Without this change, assigning null to input.defaultValue would not
1231         set to to the "null" string, as is expected.
1232
1233         * html/HTMLTextAreaElement.idl:
1234         Dropping [TreatNullAs=NullString] IDL extended attribute for
1235         textArea.defaultValue, as this is not present in the specification:
1236         - https://html.spec.whatwg.org/#htmltextareaelement
1237
1238         Without this change, assigning null to textArea.defaultValue would not
1239         set to to the "null" string, as is expected.
1240
1241         * html/HTMLTitleElement.idl:
1242         Dropping [TreatNullAs=NullString] IDL extended attribute for
1243         title.text, as this is not present in the specification:
1244         - https://html.spec.whatwg.org/#htmltitleelement
1245
1246         Without this change, assigning null to title.text would not
1247         set to to the "null" string, as is expected.
1248
1249 2016-01-27  Simon Fraser  <simon.fraser@apple.com>
1250
1251         Support CSS3 Images values for the image-rendering property
1252         https://bugs.webkit.org/show_bug.cgi?id=153556
1253
1254         Reviewed by Dean Jackson.
1255
1256         CSS3 Images has the following values for image-rendering:
1257             auto, crisp-edges, pixelated
1258
1259         The old code supported:
1260             optimizeSpeed, optimizeQuality, -webkit-crisp-edges, -webkit-optimize-contrast
1261
1262         Add support for the new values without prefixes. Map -webkit-crisp-edges to crisp-edges,
1263         and -webkit-optimize-contrast to crisp-edges. Support pixelated which behaves like 
1264         crisp-edges (a low quality scale).
1265
1266         The spec says that optimizeQuality should behave like 'auto', but that would be
1267         a behavior change since ImageQualityController::shouldPaintAtLowQuality() currently
1268         uses it as a trigger to avoid low quality scaling, so don't change that for now.
1269
1270         No new tests, covered by fast/css/script-tests/image-rendering-parsing.js
1271
1272         * css/CSSParser.cpp:
1273         (WebCore::isValidKeywordPropertyAndValue):
1274         * css/CSSPrimitiveValueMappings.h:
1275         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1276         (WebCore::CSSPrimitiveValue::operator EImageRendering):
1277         * css/CSSValueKeywords.in:
1278         * rendering/ImageQualityController.cpp:
1279         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
1280         * rendering/RenderHTMLCanvas.cpp:
1281         (WebCore::RenderHTMLCanvas::paintReplaced):
1282         * rendering/style/RenderStyleConstants.h:
1283         * rendering/style/StyleRareInheritedData.h: Need another bit.
1284
1285 2016-01-27  Anders Carlsson  <andersca@apple.com>
1286
1287         Add WebKitAdditions extension points to WebCore, WebKit and WebKitLegacy
1288         https://bugs.webkit.org/show_bug.cgi?id=153550
1289
1290         Reviewed by Sam Weinig.
1291
1292         * DerivedSources.make:
1293         Add the ability for WebKitAdditions to add events and event targets.
1294
1295         * WebCore.xcodeproj/project.pbxproj:
1296         Add new files.
1297
1298         * bindings/scripts/InFilesCompiler.pm:
1299         (initializeFromCommandLine):
1300         (compile):
1301         Handle multiple --input parameters.
1302
1303         * dom/EventNames.h:
1304         Handle adding more event names.
1305
1306         * loader/EmptyClients.cpp:
1307         (WebCore::fillWithEmptyClients):
1308         * page/MainFrame.cpp:
1309         (WebCore::MainFrame::MainFrame):
1310         * page/MainFrame.h:
1311         * page/PageConfiguration.h:
1312         Add extension points.
1313
1314         * platform/cocoa/WebKitAdditions.mm: Added.
1315         Import additions.
1316
1317 2016-01-27  Brady Eidson  <beidson@apple.com>
1318
1319         Modern IDB: Fix many Index tests.
1320         https://bugs.webkit.org/show_bug.cgi?id=153561
1321
1322         Reviewed by Alex Christensen.
1323
1324         No new tests (Many failing tests now pass).
1325
1326         * Modules/indexeddb/server/MemoryIndex.cpp:
1327         (WebCore::IDBServer::MemoryIndex::getResultForKeyRange):
1328         
1329         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1330         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
1331         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
1332         (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
1333         (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
1334         
1335         * Modules/indexeddb/server/SQLiteIDBCursor.h:
1336         (WebCore::IDBServer::SQLiteIDBCursor::didComplete):
1337
1338 2016-01-27  Brady Eidson  <beidson@apple.com>
1339
1340         Modern IDB: Cursors are utterly broken in the SQLite backend.
1341         https://bugs.webkit.org/show_bug.cgi?id=153558
1342
1343         Reviewed by Alex Christensen.
1344
1345         No new tests (35 failures now pass, others improve).
1346
1347         - Fixes incorrect usage of Index cursors when ObjectStore cursors are intended.
1348         - Improves the state of getting the cursor value vs. reaching the end of a cursor.
1349
1350         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1351         (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
1352         (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
1353
1354         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
1355         (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
1356         (WebCore::IDBServer::SQLiteIDBCursor::currentData):
1357         * Modules/indexeddb/server/SQLiteIDBCursor.h:
1358
1359 2016-01-27  Chris Dumez  <cdumez@apple.com>
1360
1361         Getting / Setting property on prototype object must throw TypeError
1362         https://bugs.webkit.org/show_bug.cgi?id=153547
1363         <rdar://problem/24370650>
1364
1365         Reviewed by Ryosuke Niwa.
1366
1367         Gettingi / Setting property on prototype object must throw TypeError as per
1368         Web IDL specification:
1369         http://heycam.github.io/webidl/#dfn-attribute-getter (Step 2.4.2)
1370         http://heycam.github.io/webidl/#dfn-attribute-setter (Step 3.5)
1371
1372         Firefox and Chrome already throw a TypeError in this case, as per
1373         the specification. However, WebKit was returning null and merely
1374         logging a deprecation error message. This patch aligns our behavior
1375         with other browsers and the specification.
1376
1377         This patch also adds support for the [LenientThis] IDL extended
1378         attribute:
1379         http://heycam.github.io/webidl/#LenientThis
1380
1381         For [LenientThis] attributes, we do not throw a TypeError if the
1382         attribute getter / setter is called on an object which does not
1383         implement the expected interface, as per:
1384         http://heycam.github.io/webidl/#dfn-attribute-getter (Step 2.4.1)
1385         http://heycam.github.io/webidl/#dfn-attribute-setter (Step 3.5)
1386
1387         No new tests, already covered by existing tests.
1388
1389         * bindings/scripts/CodeGeneratorJS.pm:
1390         (GenerateImplementation):
1391         * bindings/scripts/IDLAttributes.txt:
1392         Add support for [LenientThis]:
1393         http://heycam.github.io/webidl/#LenientThis
1394
1395         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1396         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1397         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
1398         * bindings/scripts/test/JS/JSTestInterface.cpp:
1399         * bindings/scripts/test/JS/JSTestNode.cpp:
1400         * bindings/scripts/test/JS/JSTestNondeterministic.cpp:
1401         * bindings/scripts/test/JS/JSTestObj.cpp:
1402         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
1403         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1404         * bindings/scripts/test/JS/JSattribute.cpp:
1405         * bindings/scripts/test/ObjC/DOMTestObj.h:
1406         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1407         Rebaseline bindings tests.
1408
1409         * bindings/scripts/test/TestObj.idl:
1410         Add coverage for [LenientThis] attributes.
1411
1412         * dom/Document.idl:
1413         Mark 'onreadystatechange' as [LenientThis] as per the HTML
1414         specification:
1415         https://html.spec.whatwg.org/#document
1416
1417         * dom/GlobalEventHandlers.idl:
1418         Mark 'onmouseeneter' / 'onmouseleave' as [LenientThis] as per the
1419         HTML specification:
1420         https://html.spec.whatwg.org/#globaleventhandlers
1421
1422 2016-01-27  Chris Dumez  <cdumez@apple.com>
1423
1424         window.atob() should ignore spaces in input
1425         https://bugs.webkit.org/show_bug.cgi?id=153522
1426         <rdar://problem/24357822>
1427
1428         Reviewed by Benjamin Poulain.
1429
1430         window.atob() should ignore spaces in input as per:
1431         - https://html.spec.whatwg.org/#dom-windowbase64-atob (Step 3)
1432
1433         Previously, WebKit would throw an exception and it was the only browser
1434         to do so. Firefox and Chrome behavior according to the specification.
1435
1436         This was causing us to fail 10 checks in the following W3C HTML test:
1437         http://w3c-test.org/html/webappapis/atob/base64.html
1438
1439         No new tests, updated existing test.
1440
1441         * page/DOMWindow.cpp:
1442         (WebCore::DOMWindow::atob):
1443         * page/Page.cpp:
1444         (WebCore::Page::userStyleSheetLocationChanged):
1445         * platform/network/DataURL.cpp:
1446         (WebCore::handleDataURL):
1447         * platform/network/DataURLDecoder.cpp:
1448         (WebCore::DataURLDecoder::decodeBase64):
1449
1450 2016-01-27  Ada Chan  <adachan@apple.com>
1451
1452         Move some logic related to the presentation mode button from mediaControlsiOS.js to mediaControlsApple.js
1453         https://bugs.webkit.org/show_bug.cgi?id=153476
1454
1455         Reviewed by Eric Carlson.
1456
1457         Also, add the necessary styles to support that control in mediaControlsApple.css.
1458
1459         * Modules/mediacontrols/mediaControlsApple.css:
1460         (video::-webkit-media-controls-panel.picture-in-picture):
1461         (audio::-webkit-media-controls-wireless-playback-status.picture-in-picture):
1462         (audio::-webkit-media-controls-wireless-playback-text-top.picture-in-picture):
1463         (audio::-webkit-media-controls-wireless-playback-text-bottom.picture-in-picture):
1464         (video::-webkit-media-controls-panel .picture-in-picture-button):
1465         Use the same mask image as iOS, but with a different size and a background color specified
1466         (since there's another rule that makes buttons within the panel have a transparent
1467         background color).
1468         (video::-webkit-media-controls-panel .picture-in-picture-button.return-from-picture-in-picture):
1469
1470         * Modules/mediacontrols/mediaControlsApple.js:
1471         (Controller.prototype.addVideoListeners):
1472         (Controller.prototype.removeVideoListeners):
1473         Listen for (and stop listening for) the webkitpresentationmodechanged event if presentation
1474         mode is supported for this video element.
1475         (Controller.prototype.createControls):
1476         Add a class name to the pictureInPictureButton so we can query for it in the stylesheet.
1477         (Controller.prototype.configureInlineControls):
1478         Call updatePictureInPictureButton().
1479         (Controller.prototype.presentationMode):
1480         Moved from mediaControlsiOS.js.
1481         (Controller.prototype.isFullScreen):
1482         Ditto, with a bug fix to not call presentationMode(), since that method calls isFullScreen(),
1483         resulting in infinite recursion.
1484         (Controller.prototype.updatePictureInPictureButton):
1485         Ditto.
1486         (Controller.prototype.handlePresentationModeChange):
1487         Ditto.
1488         (Controller.prototype.handleFullscreenChange):
1489         Call handlePresentationModeChanged() if presentation mode is supported for this video element.
1490         (Controller.prototype.controlsAlwaysVisible):
1491         Ditto.
1492         (Controller.prototype.handlePictureInPictureButtonClicked):
1493         Ditto.
1494         * Modules/mediacontrols/mediaControlsiOS.js:
1495         (ControllerIOS.prototype.handlePresentationModeChange):
1496         Most logic has been moved to the same method in mediaControlsApple.js, except
1497         updating the style of the panelContainer, which doesn't exist in the Mac controls.
1498         (ControllerIOS.prototype.addVideoListeners): Deleted.
1499         (ControllerIOS.prototype.removeVideoListeners): Deleted.
1500         (ControllerIOS.prototype.presentationMode): Deleted.
1501         (ControllerIOS.prototype.isFullScreen): Deleted.
1502         (ControllerIOS.prototype.handlePictureInPictureButtonClicked): Deleted.
1503         (ControllerIOS.prototype.updatePictureInPictureButton): Deleted.
1504         (ControllerIOS.prototype.handleFullscreenChange): Deleted.
1505         (ControllerIOS.prototype.controlsAlwaysVisible): Deleted.
1506         Delete all code that's already handled in the Controller.
1507
1508 2016-01-26  Ada Chan  <adachan@apple.com>
1509
1510         Enable API related to the video fullscreen layer in MediaPlayerPrivateMediaSourceAVFObjC
1511         also on Mac platform with video presentation mode support.
1512         https://bugs.webkit.org/show_bug.cgi?id=153223
1513
1514         Reviewed by Jer Noble.
1515
1516         Reuse VideoFullscreenLayerManager to manage moving the video layer between the fullscreen
1517         layer and the inline layer depending on the current presentation mode.
1518
1519         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
1520         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
1521         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::MediaPlayerPrivateMediaSourceAVFObjC):
1522         Create m_videoFullscreenLayerManager.
1523         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::platformLayer):
1524         Return the video inline layer from the VideoFullscreenLayerManager.
1525         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::addDisplayLayer):
1526         Call VideoFullscreenLayerManager::setVideoLayer() with the m_sampleBufferDisplayLayer.
1527         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::removeDisplayLayer):
1528         Call VideoFullscreenLayerManager::didDestroyVideoLayer().
1529         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenLayer):
1530         Call VideoFullscreenLayerManager::setVideoFullscreenLayer().
1531         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setVideoFullscreenFrame):
1532         Call VideoFullscreenLayerManager::setVideoFullscreenFrame().
1533
1534 2016-01-27  Brady Eidson  <beidson@apple.com>
1535
1536         Modern IDB: SQLite backend doesn't update index records as object records are added.
1537         https://bugs.webkit.org/show_bug.cgi?id=153548
1538
1539         Reviewed by Alex Christensen.
1540
1541         No new tests (4 more tests pass, others improve).
1542
1543         * Modules/indexeddb/server/IDBBackingStore.h:
1544         
1545         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
1546         (WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
1547         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1548         
1549         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1550         (WebCore::IDBServer::SQLiteIDBBackingStore::initializeVM):
1551         (WebCore::IDBServer::SQLiteIDBBackingStore::vm):
1552         (WebCore::IDBServer::SQLiteIDBBackingStore::globalObject):
1553         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
1554         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexKey):
1555         (WebCore::IDBServer::SQLiteIDBBackingStore::updateIndexesForAddRecord):
1556         (WebCore::IDBServer::SQLiteIDBBackingStore::addRecord):
1557         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1558         
1559         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1560         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
1561         
1562         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
1563
1564 2016-01-27  Ryosuke Niwa  <rniwa@webkit.org>
1565
1566         Add API to access closed shadowRoot in InjectedBundle
1567         https://bugs.webkit.org/show_bug.cgi?id=153533
1568
1569         Reviewed by Antti Koivisto.
1570
1571         Always return the shadow root in Element.shadowRootForBindings when the DOM wrapper world has
1572         shadowRootIsAlwaysOpen set to true. Also renamed bindingShadowRoot to shadowRootForBindings
1573         to be consistent.
1574
1575         * bindings/js/DOMWrapperWorld.h:
1576         (WebCore::DOMWrapperWorld::setShadowRootIsAlwaysOpen): Added.
1577         (WebCore::DOMWrapperWorld::shadowRootIsAlwaysOpen): Added.
1578         * dom/Element.cpp:
1579         (WebCore::Element::shadowRootForBindings): Renamed from bindingShadowRoot.
1580         * dom/Element.h:
1581         * dom/Element.idl:
1582
1583 2016-01-27  Zhuo Li  <zachli@apple.com>
1584
1585         Need ability to specify alternate image for AutoFill button in input fields.
1586         https://bugs.webkit.org/show_bug.cgi?id=153116.
1587         rdar://problem/23384854.
1588
1589         Reviewed by Darin Adler.
1590
1591         Add a new AutoFill button that can be shown in <input> elements.
1592
1593         Tests: fast/forms/auto-fill-button/input-contacts-auto-fill-button.html
1594                fast/forms/auto-fill-button/show-correct-auto-fill-button-when-auto-fill-button-type-changes.html
1595
1596         * css/html.css:
1597         (input::-webkit-contacts-auto-fill-button):
1598         (input::-webkit-contacts-auto-fill-button:hover):
1599         (input::-webkit-contacts-auto-fill-button:active):
1600         Add default style rules for the Contacts AutoFill button based on the ones used for
1601         Manual AutoFill button.
1602
1603         * html/HTMLInputElement.cpp:
1604         (WebCore::HTMLInputElement::setShowAutoFillButton):
1605         * html/HTMLInputElement.h:
1606         (WebCore::HTMLInputElement::autoFillButtonType):
1607         - Replace the boolean parameter with a new parameter to specify the type of the AutoFill button.
1608         - Declare a private variable to keep a record of the type of the current AutoFill
1609         button.
1610         (WebCore::HTMLInputElement::showAutoFillButton): Deleted.
1611
1612         * html/HTMLTextFormControlElement.h:
1613         Declare enum for AutoFill button type.
1614
1615         * html/TextFieldInputType.cpp:
1616         (WebCore::autoFillButtonTypeToAutoFillButtonPseudoClassName):
1617         (WebCore::isAutoFillButtonTypeChanged):
1618         (WebCore::TextFieldInputType::shouldDrawAutoFillButton): None means the AutoFill button is not
1619         enabled.
1620         (WebCore::TextFieldInputType::createAutoFillButton): Only create the AutoFill button
1621         if the type is expected.
1622         (WebCore::TextFieldInputType::updateAutoFillButton):
1623         Handle the case where AutoFill button type changes in the text field.
1624         * html/TextFieldInputType.h:
1625
1626         * testing/Internals.cpp:
1627         (WebCore::stringToAutoFillButtonType): Convert the string to AutoFill button type.
1628         (WebCore::Internals::setShowAutoFillButton): Add a new parameter to specify the type of the AutoFill button.
1629         * testing/Internals.h: Ditto.
1630         * testing/Internals.idl: Ditto.
1631
1632 2016-01-26  Ryosuke Niwa  <rniwa@webkit.org>
1633
1634         Add Node.treeRoot
1635         https://bugs.webkit.org/show_bug.cgi?id=153537
1636
1637         Reviewed by Antti Koivisto.
1638
1639         Exposed highestAncestor as Node.prototype.treeRoot, which was added to shadow DOM spec in
1640         https://github.com/w3c/webcomponents/commit/6864a40fe4efa8a737e78512e3c85319ddc5bf8b
1641
1642         See also:
1643         http://w3c.github.io/webcomponents/spec/shadow/#extensions-to-node-interface
1644
1645         Test: fast/shadow-dom/Node-interface-treeRoot.html
1646
1647         * dom/Node.idl:
1648
1649 2016-01-26  Ryosuke Niwa  <rniwa@webkit.org>
1650
1651         Rename HTMLSlotElement.getDistributedNodes to getAssignedNodes
1652         https://bugs.webkit.org/show_bug.cgi?id=153534
1653
1654         Reviewed by Antti Koivisto.
1655
1656         Did the rename.
1657
1658         * html/HTMLSlotElement.idl:
1659
1660 2016-01-27  Tim Horton  <timothy_horton@apple.com>
1661
1662         Need to be able to specify MIME type for <attachment> without filename or handle
1663         https://bugs.webkit.org/show_bug.cgi?id=153552
1664         <rdar://problem/20145857>
1665
1666         Reviewed by Anders Carlsson.
1667
1668         Tests: fast/attachment/attachment-default-icon.html
1669                fast/attachment/attachment-type-attribute.html
1670
1671         * html/HTMLAttachmentElement.cpp:
1672         (WebCore::HTMLAttachmentElement::parseAttribute):
1673         Invalidate attachment when 'type' attribute changes.
1674
1675         (WebCore::HTMLAttachmentElement::attachmentType):
1676         * html/HTMLAttachmentElement.h:
1677         * platform/graphics/Icon.h:
1678         * platform/graphics/mac/IconMac.mm:
1679         (WebCore::Icon::createIconForUTI):
1680         (WebCore::Icon::createIconForMIMEType):
1681         Add Icon class methods to retrieve an icon given a UTI or MIME type.
1682
1683         * rendering/RenderThemeMac.mm:
1684         (WebCore::paintAttachmentIcon):
1685         Use the 'type' attribute (a MIME type) if we have one. Otherwise,
1686         use the filename. Lastly fall back to a plain file icon (using the root
1687         file UTI, public.data).
1688
1689 2016-01-27  Alexey Proskuryakov  <ap@apple.com>
1690
1691         Remove ENABLE_CURRENTSRC
1692         https://bugs.webkit.org/show_bug.cgi?id=153545
1693
1694         Reviewed by Simon Fraser.
1695
1696         * Configurations/FeatureDefines.xcconfig:
1697
1698 2016-01-26  Anders Carlsson  <andersca@apple.com>
1699
1700         Stop echoing echo commands to stdout
1701         https://bugs.webkit.org/show_bug.cgi?id=153531
1702
1703         Reviewed by Csaba Osztrogon√°c.
1704
1705         * DerivedSources.make:
1706
1707 2016-01-26  Jer Noble  <jer.noble@apple.com>
1708
1709         Calling video.controls=true during a scrub operation cancels scrub.
1710         https://bugs.webkit.org/show_bug.cgi?id=153494
1711
1712         Reviewed by Eric Carlson.
1713
1714         Test: media/media-controls-drag-timeline-set-controls-property.html
1715
1716         Verify that the video.controls attribute actually changed before tearing down and
1717         re-adding the media controls to the Shadow DOM.
1718
1719         * Modules/mediacontrols/mediaControlsApple.js:
1720         (Controller.prototype.handleControlsChange):
1721         (Controller.prototype.hasControls):
1722
1723 2016-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1724
1725         [GTK][EFL] Rename ScrollAnimationNone as ScrollAnimationSmooth
1726         https://bugs.webkit.org/show_bug.cgi?id=153481
1727
1728         Reviewed by Simon Fraser.
1729
1730         ScrollAnimationNone has always been used by EFL and GTK ports to
1731         implement smooth scrolling. I think it should be possible for
1732         other scroll animators to implement smooth scrolling or even
1733         implement other kind of scroll animations. For example, in the
1734         future I would like to have kinetic scrolling implemented for the
1735         GTK+ port to match all other GTK+ application and decide at
1736         runtime between different animations without having to use a
1737         different scroll animator class. So, this patch also moves the
1738         smooth scrolling animation implementation to its own class
1739         ScrollAnimationSmooth that impements an interface ScrollAnimation
1740         that could be used to implement other animations. This will allow
1741         the GTK+ port to add its own scroll animator class and still
1742         support smooth scrolling sharing the code with the
1743         ScrollAnimationSmooth.
1744
1745         * PlatformEfl.cmake: Add new files to compilation and remove ScrollAnimationNone.
1746         * PlatformGTK.cmake: Ditto.
1747         * platform/ScrollAnimation.h: Added.
1748         (WebCore::ScrollAnimation::serviceAnimation):
1749         (WebCore::ScrollAnimation::ScrollAnimation):
1750         * platform/ScrollAnimationSmooth.cpp: Added.
1751         (WebCore::ScrollAnimationSmooth::ScrollAnimationSmooth):
1752         (WebCore::ScrollAnimationSmooth::scroll):
1753         (WebCore::ScrollAnimationSmooth::stop):
1754         (WebCore::ScrollAnimationSmooth::updateVisibleLengths):
1755         (WebCore::ScrollAnimationSmooth::setCurrentPosition):
1756         (WebCore::ScrollAnimationSmooth::serviceAnimation):
1757         (WebCore::ScrollAnimationSmooth::~ScrollAnimationSmooth):
1758         (WebCore::curveAt):
1759         (WebCore::attackCurve):
1760         (WebCore::releaseCurve):
1761         (WebCore::coastCurve):
1762         (WebCore::curveIntegralAt):
1763         (WebCore::attackArea):
1764         (WebCore::releaseArea):
1765         (WebCore::getAnimationParametersForGranularity):
1766         (WebCore::ScrollAnimationSmooth::updatePerAxisData):
1767         (WebCore::ScrollAnimationSmooth::animateScroll):
1768         (WebCore::ScrollAnimationSmooth::animationTimerFired):
1769         (WebCore::ScrollAnimationSmooth::startNextTimer):
1770         (WebCore::ScrollAnimationSmooth::animationTimerActive):
1771         * platform/ScrollAnimationSmooth.h: Added.
1772         * platform/ScrollAnimator.cpp:
1773         (WebCore::ScrollAnimator::scroll):
1774         (WebCore::ScrollAnimator::scrollToOffsetWithoutAnimation):
1775         (WebCore::ScrollAnimator::setCurrentPosition):
1776         (WebCore::ScrollAnimator::updateActiveScrollSnapIndexForOffset):
1777         (WebCore::ScrollAnimator::notifyPositionChanged):
1778         (WebCore::ScrollAnimator::scrollOffsetOnAxis):
1779         * platform/ScrollAnimator.h:
1780         (WebCore::ScrollAnimator::ScrollAnimator::currentPosition):
1781         * platform/ScrollAnimatorNone.cpp: Removed.
1782         * platform/ScrollAnimatorNone.h: Removed.
1783         * platform/ScrollAnimatorSmooth.cpp: Added.
1784         (WebCore::ScrollAnimator::create):
1785         (WebCore::ScrollAnimatorSmooth::ScrollAnimatorSmooth):
1786         (WebCore::ScrollAnimatorSmooth::~ScrollAnimatorSmooth):
1787         (WebCore::ScrollAnimatorSmooth::scroll):
1788         (WebCore::ScrollAnimatorSmooth::scrollToOffsetWithoutAnimation):
1789         (WebCore::ScrollAnimatorSmooth::cancelAnimations):
1790         (WebCore::ScrollAnimatorSmooth::serviceScrollAnimations):
1791         (WebCore::ScrollAnimatorSmooth::willEndLiveResize):
1792         (WebCore::ScrollAnimatorSmooth::didAddVerticalScrollbar):
1793         (WebCore::ScrollAnimatorSmooth::didAddHorizontalScrollbar):
1794         * platform/ScrollAnimatorSmooth.h: Added.
1795         * platform/mac/ScrollAnimatorMac.mm:
1796         (WebCore::ScrollAnimatorMac::immediateScrollToPosition):
1797         (WebCore::ScrollAnimatorMac::immediateScrollBy):
1798
1799 2016-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1800
1801         Overlay scrollbars should always use the whole contents
1802         https://bugs.webkit.org/show_bug.cgi?id=153352
1803
1804         Reviewed by Michael Catanzaro.
1805
1806         In case of having both horizontal and vertical scrollbars, the
1807         scrollbars respect the scroll corner. That looks good for legacy
1808         scrollbars that show the track, but with the overlay indicators
1809         it looks weird that the indicator stops so early before the end of
1810         the contents, giving the impression that there's something else to
1811         scroll. This happens because the scroll corner is transparent, so
1812         it's not obvious that's the scroll corner. It also happens with
1813         the text areas having a resizer. Legacy scrollbars take into
1814         account the resizer, which is good, but I expect overlay
1815         scrollbars to be rendered also over the resizer. The resizer takes
1816         precedence so you can still click and drag to resize the text area.
1817         In the case of main frame scrollbars we are indeed returning an
1818         empty rectangle from ScrollView::scrollCornerRect() when using
1819         overlay scrollbars, but when calculating the size of the
1820         scrollbars we are using the actual width/height instead of the
1821         occupied with/height. For other scrollbars
1822         RenderLayer::scrollCornerRect() is not checking whether scrollbars
1823         are overlay or not and we are always returning a scroll corner
1824         rectangle when scrollbars are present.
1825
1826         * platform/ScrollView.cpp:
1827         (WebCore::ScrollView::updateScrollbars): Use the occupied
1828         width/height when calculating the space the one scrollbar
1829         should leave for the other.
1830         * rendering/RenderLayer.cpp:
1831         (WebCore::RenderLayer::scrollCornerRect): Return an empty
1832         rectangle when using overlay scrollbars.
1833
1834 2016-01-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1835
1836         ScrollAnimator is not notified when mouse entered, moved or exited a RenderListBox
1837         https://bugs.webkit.org/show_bug.cgi?id=153398
1838
1839         Reviewed by Michael Catanzaro.
1840
1841         EvenHandler is checking whether the enclosing layer of a node is
1842         registered as scrollable area of its frame view. That doesn't work
1843         for list boxes, because they are the scrollable area
1844         themselves. Also when entering a list box the node under mouse is
1845         not usually the list box itself, but any of its children, a
1846         HTMLOptionElement or a HTMLOptGroupElement. Instead of comparing
1847         layers, we should find the enclosing scrollable area of the target
1848         elements and compare them to decide whether the mouse has entered,
1849         left or moved a scrollable area.
1850
1851         * page/EventHandler.cpp:
1852         (WebCore::enclosingScrollableArea): Return the enclosing
1853         scrollable area of the given node. If the node doesn't have a
1854         renderer, it traverses its parents. If the renderer is a
1855         RenderListBox it is returned, otherwhise the enclosing layer is
1856         returned.
1857         (WebCore::EventHandler::mouseMoved): Use enclosingScrollableArea.
1858         (WebCore::EventHandler::updateMouseEventTargetNode): Ditto.
1859
1860 2016-01-26  Sam Weinig  <sam@webkit.org>
1861
1862         Try touching DerivedSources.make to force rebuilding.
1863
1864         * DerivedSources.make:
1865         * page/DOMWindow.idl:
1866
1867 2016-01-26  Sam Weinig  <sam@webkit.org>
1868
1869         Try to force a rebuild.
1870
1871         * page/DOMWindow.idl:
1872
1873 2016-01-26  Chris Dumez  <cdumez@apple.com>
1874
1875         fast/history/page-cache-webdatabase-no-transaction-db.html flakily crashes
1876         https://bugs.webkit.org/show_bug.cgi?id=153525
1877
1878         Reviewed by Andreas Kling.
1879
1880         The test was crashing because DatabaseThread::hasPendingDatabaseActivity()
1881         was accessing m_openDatabaseSet from the main thread without any locking
1882         mechanism. This is an issue because m_openDatabaseSet is altered by the
1883         database thread.
1884
1885         No new tests, already covered by fast/history/page-cache-webdatabase-no-transaction-db.html.
1886
1887         * Modules/webdatabase/DatabaseThread.cpp:
1888         (WebCore::DatabaseThread::databaseThread):
1889         (WebCore::DatabaseThread::recordDatabaseOpen):
1890         (WebCore::DatabaseThread::recordDatabaseClosed):
1891         (WebCore::DatabaseThread::hasPendingDatabaseActivity):
1892         * Modules/webdatabase/DatabaseThread.h:
1893
1894 2016-01-26  Joseph Pecoraro  <pecoraro@apple.com>
1895
1896         Unreviewed CMake build fix after r195644.
1897
1898         * PlatformMac.cmake:
1899
1900 2016-01-26  Brady Eidson  <beidson@apple.com>
1901
1902         Modern IDB: Key generator support for SQLite backend.
1903         https://bugs.webkit.org/show_bug.cgi?id=153427
1904
1905         Reviewed by Alex Christensen.
1906
1907         No new tests (Existing failing tests now pass, others improved).
1908
1909         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1910         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetKeyGeneratorValue):
1911         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedSetKeyGeneratorValue):
1912         (WebCore::IDBServer::SQLiteIDBBackingStore::generateKeyNumber):
1913         (WebCore::IDBServer::SQLiteIDBBackingStore::revertGeneratedKeyNumber):
1914         (WebCore::IDBServer::SQLiteIDBBackingStore::maybeUpdateKeyGeneratorNumber):
1915         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1916
1917 2016-01-26  Simon Fraser  <simon.fraser@apple.com>
1918
1919         Allow canvas to use display-list drawing for testing
1920         https://bugs.webkit.org/show_bug.cgi?id=153475
1921
1922         Reviewed by Dean Jackson.
1923
1924         Optionally have 2D <canvas> use display-list drawing, which is only enabled
1925         via Internals for now.
1926
1927         Support displayListAsText() and replayDisplayListAsText() on canvas, so we can
1928         use it to test playback optimizations. [Note that displayListAsText() always
1929         returns an empty string currently, because the display list is cleared when the
1930         canvas is painted to the page.]
1931
1932         Display list rendering is implemented by giving CanvasRenderingContext2D an
1933         optional DisplayListDrawingContext, which packages up a display list, recorder
1934         and recording context. The existing paintRenderingResultsToCanvas() is overridden
1935         to replay the recorded display list into the primary canvas context.
1936
1937         Tracked replay display lists are stored in a static map, keyed by the CanvasRenderingContext2D.
1938
1939         Test: displaylists/canvas-display-list.html
1940
1941         * html/HTMLCanvasElement.cpp:
1942         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
1943         (WebCore::HTMLCanvasElement::getContext):
1944         (WebCore::HTMLCanvasElement::paint):
1945         (WebCore::HTMLCanvasElement::setUsesDisplayListDrawing):
1946         (WebCore::HTMLCanvasElement::setTracksDisplayListReplay):
1947         (WebCore::HTMLCanvasElement::displayListAsText):
1948         (WebCore::HTMLCanvasElement::replayDisplayListAsText):
1949         * html/HTMLCanvasElement.h:
1950         * html/canvas/CanvasRenderingContext.h:
1951         * html/canvas/CanvasRenderingContext2D.cpp:
1952         (WebCore::DisplayListDrawingContext::DisplayListDrawingContext):
1953         (WebCore::contextDisplayListMap):
1954         (WebCore::CanvasRenderingContext2D::~CanvasRenderingContext2D):
1955         (WebCore::CanvasRenderingContext2D::setTracksDisplayListReplay):
1956         (WebCore::CanvasRenderingContext2D::displayListAsText):
1957         (WebCore::CanvasRenderingContext2D::replayDisplayListAsText):
1958         (WebCore::CanvasRenderingContext2D::paintRenderingResultsToCanvas):
1959         (WebCore::CanvasRenderingContext2D::drawingContext):
1960         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D): Deleted.
1961         * html/canvas/CanvasRenderingContext2D.h:
1962         * testing/Internals.cpp:
1963         (WebCore::Internals::setElementUsesDisplayListDrawing):
1964         (WebCore::Internals::setElementTracksDisplayListReplay):
1965         (WebCore::Internals::displayListForElement):
1966         (WebCore::Internals::replayDisplayListForElement):
1967
1968 2016-01-26  Joseph Pecoraro  <pecoraro@apple.com>
1969
1970         Generalize ResourceUsageData gathering to be used outside of ResourceUsageOverlay
1971         https://bugs.webkit.org/show_bug.cgi?id=153509
1972         <rdar://problem/24354291>
1973
1974         Reviewed by Andreas Kling.
1975
1976         * CMakeLists.txt:
1977         * PlatformMac.cmake:
1978         * WebCore.xcodeproj/project.pbxproj:
1979         * page/Page.cpp:
1980         * page/Page.h:
1981         * page/Settings.cpp:
1982         * page/Settings.h:
1983         * page/ResourceUsageOverlay.cpp:
1984         * page/ResourceUsageOverlay.h:
1985         Add new files to the build and updated ENABLE flag name.
1986
1987         * page/ResourceUsageData.cpp: Added.
1988         (WebCore::ResourceUsageData::ResourceUsageData):
1989         * page/ResourceUsageData.h: Added.
1990         (WebCore::MemoryCategoryInfo::MemoryCategoryInfo):
1991         Platform agnostic resource data that may be used by multiple clients,
1992         such as the ResourceUsageOverlay and later the Inspector.
1993
1994         * page/ResourceUsageThread.h: Added.
1995         * page/ResourceUsageThread.cpp: Added.
1996         (WebCore::ResourceUsageThread::ResourceUsageThread):
1997         (WebCore::ResourceUsageThread::singleton):
1998         (WebCore::ResourceUsageThread::addObserver):
1999         (WebCore::ResourceUsageThread::removeObserver):
2000         (WebCore::ResourceUsageThread::waitUntilObservers):
2001         (WebCore::ResourceUsageThread::notifyObservers):
2002         (WebCore::ResourceUsageThread::createThreadIfNeeded):
2003         (WebCore::ResourceUsageThread::threadCallback):
2004         (WebCore::ResourceUsageThread::threadBody):
2005         Platform agnostic resource usage thread that can be used to gather data
2006         into a ResourceUsageData struct on a background thread and notify observers
2007         on the main thread. Platforms need only implement ResourceUsageThread::platformThreadBody
2008         to populate the ResourceUsageData struct with data.
2009
2010         * page/cocoa/ResourceUsageOverlayCocoa.mm:
2011         (WebCore::HistoricMemoryCategoryInfo::HistoricMemoryCategoryInfo):
2012         (WebCore::HistoricResourceUsageData::HistoricResourceUsageData):
2013         (WebCore::historicUsageData):
2014         (WebCore::appendDataToHistory):
2015         (WebCore::ResourceUsageOverlay::platformInitialize):
2016         (WebCore::ResourceUsageOverlay::platformDestroy):
2017         (WebCore::drawMemHistory):
2018         (WebCore::drawMemoryPie):
2019         (WebCore::ResourceUsageOverlay::platformDraw):
2020         Move CPU and memory resource usage calculations to ResourceUsageThread.
2021         The overlay adds itself as an observer, and builds its RingBuffer list
2022         of data from notifications from the ResourceUsageThread. Renamed
2023         some of the fields.
2024
2025         * page/cocoa/ResourceUsageThreadCocoa.mm: Added.
2026         (WebCore::vmPageSize):
2027         (WebCore::TagInfo::TagInfo):
2028         (WebCore::pagesPerVMTag):
2029         (WebCore::cpuUsage):
2030         (WebCore::categoryForVMTag):
2031         (WebCore::ResourceUsageThread::platformThreadBody):
2032         Extracted from ResourceUsageOverlayCocoa.
2033
2034         * page/scrolling/ScrollingThread.cpp:
2035         (WebCore::ScrollingThread::dispatch):
2036         Drive-by, don't call singleton again, we already have the result.
2037
2038 2016-01-26  Simon Fraser  <simon.fraser@apple.com>
2039
2040         Use initializers in HTMLCanvasElement
2041         https://bugs.webkit.org/show_bug.cgi?id=153472
2042
2043         Reviewed by Michael Catanzaro.
2044
2045         Use initializers, and re-order member variables for better packing.
2046
2047         * html/HTMLCanvasElement.cpp:
2048         (WebCore::HTMLCanvasElement::HTMLCanvasElement):
2049         * html/HTMLCanvasElement.h:
2050
2051 2016-01-26  Chris Dumez  <cdumez@apple.com>
2052
2053         Setting HTMLInputElement.value to null to set its value to the empty string
2054         https://bugs.webkit.org/show_bug.cgi?id=153519
2055
2056         Reviewed by Ryosuke Niwa.
2057
2058         Setting HTMLInputElement.value to null to set its value to the empty string:
2059         - https://html.spec.whatwg.org/#htmlinputelement
2060         - http://heycam.github.io/webidl/#TreatNullAs
2061
2062         WebKit would previously unset the value attribute instead, which caused
2063         it to fallback to input.defaultValue if set.
2064
2065         Firefox and Chrome behave correctly.
2066
2067         Test: fast/dom/HTMLInputElement/input-value-set-null.html
2068
2069         * html/HTMLInputElement.cpp:
2070         (WebCore::HTMLInputElement::setValue):
2071
2072 2016-01-26  Anders Carlsson  <andersca@apple.com>
2073
2074         WebKitAdditions should be able to modify derived source rules
2075         https://bugs.webkit.org/show_bug.cgi?id=153514
2076
2077         Reviewed by Tim Horton.
2078
2079         * DerivedSources.make:
2080         Include WebCoreDerivedSourcesAdditions.make.
2081
2082         * WebCore.xcodeproj/project.pbxproj:
2083         Pass our WebKitAdditions paths as include paths to make.
2084
2085 2016-01-26  Chris Dumez  <cdumez@apple.com>
2086
2087         document.open() / write() should be prevented in beforeunload event handlers
2088         https://bugs.webkit.org/show_bug.cgi?id=153432
2089
2090         Reviewed by Ryosuke Niwa.
2091
2092         document.open() / write() should be prevented in beforeunload event handlers:
2093         - https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-open (step 6)
2094         - https://html.spec.whatwg.org/multipage/webappapis.html#dom-document-write (step 3)
2095         - https://html.spec.whatwg.org/multipage/webappapis.html#ignore-opens-during-unload-counter
2096         - https://html.spec.whatwg.org/multipage/browsers.html#unload-a-document
2097
2098         Test: fast/frames/page-beforeunload-document-open.html
2099
2100         * loader/FrameLoader.cpp:
2101         (WebCore::FrameLoader::dispatchBeforeUnloadEvent):
2102
2103 2016-01-26  Chris Dumez  <cdumez@apple.com>
2104
2105         Add support for HTMLDataElement
2106         https://bugs.webkit.org/show_bug.cgi?id=153459
2107
2108         Reviewed by Ryosuke Niwa.
2109
2110         Add support for HTMLDataElement:
2111         https://html.spec.whatwg.org/multipage/semantics.html#the-data-element
2112
2113         Firefox already supports it.
2114
2115         No new tests, already covered by existing tests.
2116
2117         * CMakeLists.txt:
2118         * DerivedSources.cpp:
2119         * DerivedSources.make:
2120         * WebCore.vcxproj/WebCore.vcxproj:
2121         * WebCore.vcxproj/WebCore.vcxproj.filters:
2122         * WebCore.xcodeproj/project.pbxproj:
2123         * html/HTMLDataElement.cpp: Added.
2124         (WebCore::HTMLDataElement::create):
2125         (WebCore::HTMLDataElement::HTMLDataElement):
2126         * html/HTMLDataElement.h: Added.
2127         * html/HTMLDataElement.idl: Added.
2128         * html/HTMLElementsAllInOne.cpp:
2129         * html/HTMLTagNames.in:
2130
2131 2016-01-26  Commit Queue  <commit-queue@webkit.org>
2132
2133         Unreviewed, rolling out r195610.
2134         https://bugs.webkit.org/show_bug.cgi?id=153513
2135
2136         The test added with this change is timing out on almost every
2137         run (Requested by ryanhaddad on #webkit).
2138
2139         Reverted changeset:
2140
2141         "Calling video.controls=true during a scrub operation cancels
2142         scrub."
2143         https://bugs.webkit.org/show_bug.cgi?id=153494
2144         http://trac.webkit.org/changeset/195610
2145
2146 2016-01-26  Brady Eidson  <beidson@apple.com>
2147
2148         History.pushState causes intense memory pressure.
2149         https://bugs.webkit.org/show_bug.cgi?id=153435
2150
2151         Reviewed by Sam Weinig, Oliver Hunt, and Geoff Garen.
2152
2153         Tests: fast/loader/stateobjects/pushstate-frequency-iframe.html
2154                fast/loader/stateobjects/pushstate-frequency-with-user-gesture.html
2155                fast/loader/stateobjects/pushstate-frequency.html
2156                fast/loader/stateobjects/replacestate-frequency-iframe.html
2157                fast/loader/stateobjects/replacestate-frequency-with-user-gesture.html
2158                fast/loader/stateobjects/replacestate-frequency.html
2159                loader/stateobjects/pushstate-size-iframe.html
2160                loader/stateobjects/pushstate-size.html
2161                loader/stateobjects/replacestate-size-iframe.html
2162                loader/stateobjects/replacestate-size.html
2163
2164         Add restrictions on how frequently push/replaceState can be called,
2165         as well as how much of a cumulative payload they can deliver.
2166         
2167         * bindings/js/JSHistoryCustom.cpp:
2168         (WebCore::JSHistory::pushState):
2169         (WebCore::JSHistory::replaceState):
2170         
2171         * page/History.cpp:
2172         (WebCore::History::stateObjectAdded):
2173         * page/History.h:
2174
2175 2016-01-26  Anders Carlsson  <andersca@apple.com>
2176
2177         Add a Dictionary overload that returns an Optional result
2178         https://bugs.webkit.org/show_bug.cgi?id=153507
2179
2180         Reviewed by Tim Horton.
2181
2182         * bindings/js/Dictionary.h:
2183         (WebCore::Dictionary::get):
2184
2185 2016-01-26  Philip Rogers  <pdr@chromium.org>
2186
2187         Let SVG images not taint canvases except when containing foreignObjects
2188         https://bugs.webkit.org/show_bug.cgi?id=119639
2189
2190         Reviewed by Brent Fulgham.
2191
2192         r153876 caused SVG images to not taint canvases but the patch allowed
2193         for subimage resources. This can be a problem if a subimage (e.g., data
2194         uri image) contains a foreignObject which can violate security (e.g.,
2195         visited links).
2196
2197         This patch updates SVGImage::hasSingleSecurityOrigin to check if the
2198         image contains any foreignObjects or images that themselves contain
2199         foreignObjects. SVG images without foreignObjects are allowed to not
2200         taint canvases.
2201
2202         Canvas patterns are problematic because an animated SVG image can switch
2203         between tainting and not tainting the canvas. A FIXME has been added to
2204         solve this, and in the meantime we cause SVG images to taint patterns.
2205
2206         Tests: svg/as-image/svg-canvas-pattern-with-link-tainted.html
2207                svg/as-image/svg-canvas-svg-with-feimage-with-link-tainted.html
2208                svg/as-image/svg-canvas-svg-with-image-with-link-tainted.html
2209
2210         * html/canvas/CanvasPattern.cpp:
2211         (WebCore::CanvasPattern::CanvasPattern):
2212         (WebCore::CanvasPattern::~CanvasPattern):
2213         * svg/SVGFEImageElement.cpp:
2214         (WebCore::SVGFEImageElement::~SVGFEImageElement):
2215         (WebCore::SVGFEImageElement::hasSingleSecurityOrigin):
2216         (WebCore::SVGFEImageElement::clearResourceReferences):
2217         * svg/SVGFEImageElement.h:
2218         * svg/SVGImageElement.cpp:
2219         (WebCore::SVGImageElement::create):
2220         (WebCore::SVGImageElement::hasSingleSecurityOrigin):
2221         (WebCore::SVGImageElement::isSupportedAttribute):
2222         * svg/SVGImageElement.h:
2223         * svg/graphics/SVGImage.cpp:
2224         (WebCore::SVGImage::hasSingleSecurityOrigin):
2225
2226 2016-01-26  Michael Catanzaro  <mcatanzaro@igalia.com>
2227
2228         CSSGrammar.y:1742.31-34: warning: unused value: $3
2229         https://bugs.webkit.org/show_bug.cgi?id=153462
2230
2231         Reviewed by Alex Christensen.
2232
2233         This warning indicates that we have a memory leak. From the bison manual:
2234
2235         "Right-hand side symbols of a rule that explicitly triggers a syntax error via YYERROR are
2236         not discarded automatically. As a rule of thumb, destructors are invoked only when user
2237         actions cannot manage the memory."
2238
2239         Arguably a design error, but that's how it is.
2240
2241         * css/CSSGrammar.y.in:
2242
2243 2016-01-26  Jer Noble  <jer.noble@apple.com>
2244
2245         Calling video.controls=true during a scrub operation cancels scrub.
2246         https://bugs.webkit.org/show_bug.cgi?id=153494
2247
2248         Reviewed by Eric Carlson.
2249
2250         Test: media/media-controls-drag-timeline-set-controls-property.html
2251
2252         Verify that the video.controls attribute actually changed before tearing down and
2253         re-adding the media controls to the Shadow DOM.
2254
2255         * Modules/mediacontrols/mediaControlsApple.js:
2256         (Controller.prototype.handleControlsChange):
2257         (Controller.prototype.hasControls):
2258
2259 2016-01-26  Jeremy Noble  <jer.noble@apple.com>
2260
2261         [EME][Mac] Crash in [AVStreamSession addStreamDataParser:]; uncaught exception
2262         https://bugs.webkit.org/show_bug.cgi?id=153495
2263
2264         Reviewed by Eric Carlson.
2265
2266         When AVContentKeySession is not available, fall back to pre-AVContentKeySession behavior;
2267         namely, immediately create an AVStreamSession object in
2268         willProvideContentKeyRequestInitializationData, rather than waiting for didProvide.
2269
2270         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2271         (WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
2272
2273 2016-01-26  Dean Jackson  <dino@apple.com>
2274
2275         [iOS] Documents without an explicit width should not get fast tapping
2276         https://bugs.webkit.org/show_bug.cgi?id=153465
2277         <rdar://problem/23962529>
2278
2279         Reviewed by Simon Fraser (and Wenson Hseih).
2280
2281         As the title says, documents that do not set a viewport should
2282         not get the fast click behaviour. There were complaints that we broke
2283         double-tap to scroll in ImageDocuments where the image was narrow and long.
2284
2285         The fix is to just keep a flag that tells the UI process if the
2286         width was explicit. However, it turns out that those ImageDocuments
2287         are given an explicit device-width, which is fine for scaling but
2288         really should behave as auto for fast tapping. So we also need
2289         to tell the UIProcess if the viewport arguments came from an
2290         ImageDocument.
2291
2292         Test: fast/events/ios/viewport-no-width-value-allows-double-tap.html
2293
2294         * dom/ViewportArguments.cpp:
2295         (WebCore::findSizeValue): Add a parameter that toggles a flag
2296         if the size was explicitly set.
2297         (WebCore::setViewportFeature): Remember if the width was
2298         explicit.
2299         * dom/ViewportArguments.h: Add a widthWasExplicit flag.
2300         (WebCore::ViewportArguments::operator==):
2301
2302 2016-01-25  Dave Hyatt  <hyatt@apple.com>
2303
2304         Speculative fixes for crashing in viewportChangeAffectedPicture
2305         https://bugs.webkit.org/show_bug.cgi?id=153450
2306
2307         Reviewed by Dean Jackson.
2308
2309         Don't attach any conditions to the removal of a picture element from
2310         the document's HashSet. This ensures that if the condition is ever
2311         wrong for any reason, we'll still remove the picture element on
2312         destruction.
2313
2314         Fix the media query evaluation to match the other evaluations (used by
2315         the preload scanner and HTMLImageElement). This includes using the
2316         document element's computed style instead of our own and also null
2317         checking the document element first. This is the likely cause of the
2318         crashes.
2319
2320         * html/HTMLPictureElement.cpp:
2321         (WebCore::HTMLPictureElement::~HTMLPictureElement):
2322         (WebCore::HTMLPictureElement::didMoveToNewDocument):
2323         (WebCore::HTMLPictureElement::viewportChangeAffectedPicture):
2324
2325 2016-01-26  Chris Dumez  <cdumez@apple.com>
2326
2327         Make sure a page is still PageCache-able after firing the 'pagehide' events
2328         https://bugs.webkit.org/show_bug.cgi?id=153449
2329
2330         Reviewed by Andreas Kling.
2331
2332         Make sure a page is still PageCache-able after firing the 'pagehide'
2333         events and abort if it isn't. This should improve robustness and it is
2334         easy for pagehide event handlers to do things that would make a Page no
2335         longer PageCache-able and this leads to bugs that are difficult to
2336         investigate.
2337
2338         To achieve this, the 'pagehide' event firing logic was moved out of the
2339         CachedFrame constructor. It now happens earlier in
2340         PageCache::addIfCacheable() after checking if the page is cacheable and
2341         before constructing the CachedPage / CachedFrames. After firing the
2342         'pagehide' event in PageCache::addIfCacheable(), we check again that
2343         the page is still cacheable and we abort early if it is not.
2344
2345         * history/CachedFrame.cpp:
2346         (WebCore::CachedFrame::CachedFrame):
2347         * history/PageCache.cpp:
2348         (WebCore::setInPageCache):
2349         (WebCore::firePageHideEventRecursively):
2350         (WebCore::PageCache::addIfCacheable):
2351         * history/PageCache.h:
2352         * loader/FrameLoader.cpp:
2353         (WebCore::FrameLoader::commitProvisionalLoad):
2354
2355 2016-01-26  Beth Dakin  <bdakin@apple.com>
2356
2357         Rubber-stamped by Tim Horton.
2358
2359         Add one more bit of SPI.
2360         * platform/spi/mac/NSSpellCheckerSPI.h:
2361
2362 2016-01-26  Olivier Blin  <olivier.blin@softathome.com>
2363
2364         Fix build with ENABLE_DEVICE_ORIENTATION on non-iOS platforms
2365         https://bugs.webkit.org/show_bug.cgi?id=153490
2366
2367         Reviewed by Michael Catanzaro.
2368
2369         This has been broken since r178702, which changed the Page
2370         argument from a pointer to a reference in logCanCachePageDecision().
2371
2372         No new tests since this is a build fix.
2373
2374         * history/PageCache.cpp:
2375         (WebCore::canCachePage):
2376
2377 2016-01-25  Ada Chan  <adachan@apple.com>
2378
2379         Move WebVideoFullscreenManager and related classes from iOS specific folders to cocoa folders
2380         https://bugs.webkit.org/show_bug.cgi?id=153473
2381
2382         Reviewed by Eric Carlson.
2383
2384         No new tests, just moving files.
2385
2386         * WebCore.xcodeproj/project.pbxproj:
2387         Update due to changes to the file locations.
2388         * platform/cocoa/WebVideoFullscreenModel.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModel.h.
2389         * platform/cocoa/WebVideoFullscreenModelVideoElement.h: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.h.
2390         (WebCore::WebVideoFullscreenModelVideoElement::create):
2391         Fix a style error by moving the opening curly brace down one line.
2392         * platform/cocoa/WebVideoFullscreenModelVideoElement.mm: Renamed from Source/WebCore/platform/ios/WebVideoFullscreenModelVideoElement.mm.
2393
2394 2016-01-26  Konstantin Tokarev  <annulen@yandex.ru>
2395
2396         Do not convert GlyphBufferAdvance to FloatSize
2397         https://bugs.webkit.org/show_bug.cgi?id=153429
2398
2399         GlyphBufferAdvance is not necessaryly convertible to FloatSize.
2400         Also, this code was doing extra work by transforming height value.
2401
2402         Reviewed by Antti Koivisto.
2403
2404         No new tests needed.
2405
2406         * rendering/svg/SVGTextRunRenderingContext.cpp:
2407         (WebCore::SVGGlyphToPathTranslator::extents):
2408
2409 2016-01-22  Ada Chan  <adachan@apple.com>
2410
2411         Enable API related to the video fullscreen layer in MediaPlayerPrivateAVFoundationObjC
2412         also on Mac with video presentation mode support.
2413         https://bugs.webkit.org/show_bug.cgi?id=153222
2414
2415         Reviewed by Eric Carlson.
2416
2417         No new tests. Covered by existing tests.
2418
2419         Introduce VideoFullscreenLayerManager to deal with the video layer when switching
2420         between inline and fullscreen mode. We'll reuse it in other MediaPlayerPrivateInterface
2421         implementations.
2422
2423         Now that MediaPlayerPrivateAVFoundationObjC's platform layer can be a WebVideoContainerLayer,
2424         this exposes a bug in PlatformCALayerCocoa::clone() where we assumed the platform layer
2425         is always an AVPlayerLayer if the PlatformCALayer's layer type is LayerTypeAVPlayerLayer.
2426         Add a helper method to get an AVPlayerLayer from a PlatformCALayerCocoa (which also handles
2427         WebVideoContainerLayer case) and use it in PlatformCALayerCocoa::clone().
2428
2429         * WebCore.xcodeproj/project.pbxproj:
2430         Add VideoFullscreenLayerManager to the project.
2431
2432         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2433         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2434         (WebCore::MediaPlayerPrivateAVFoundationObjC::MediaPlayerPrivateAVFoundationObjC):
2435         Create m_videoFullscreenLayerManager. The video inline layer, video fullscreen layer,
2436         and the video fullscreen frame are now managed by that class.
2437         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
2438         Just call VideoFullscreenLayerManager::setVideoLayer() to handle adding the video
2439         layer in either the inline or fullscreen layer.
2440         (WebCore::MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer):
2441         Call VideoFullscreenLayerManager::didDestroyVideoLayer().
2442         (WebCore::MediaPlayerPrivateAVFoundationObjC::platformLayer):
2443         Get the video inline layer from VideoFullscreenLayerManager.
2444         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer):
2445         Call VideoFullscreenLayerManager::setVideoFullscreenLayer().
2446         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame):
2447         Call VideoFullscreenLayerManager::setVideoFullscreenFrame().
2448         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode):
2449         Guard the iOS specific code properly.
2450         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateVideoLayerGravity):
2451         Get the video fullscreen layer from VideoFullscreenLayerManager.
2452         (WebCore::MediaPlayerPrivateAVFoundationObjC::requiresTextTrackRepresentation):
2453         Ditto.
2454         (WebCore::MediaPlayerPrivateAVFoundationObjC::syncTextTrackBounds):
2455         Get the video fullscreen layer and video fullscreen frame from VideoFullscreenLayerManager.
2456         (WebCore::MediaPlayerPrivateAVFoundationObjC::setTextTrackRepresentation):
2457         Get the video fullscreen layer from VideoFullscreenLayerManager.
2458
2459         * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.h: Added.
2460         (WebCore::VideoFullscreenLayerManager::videoInlineLayer):
2461         (WebCore::VideoFullscreenLayerManager::videoFullscreenLayer):
2462         (WebCore::VideoFullscreenLayerManager::videoFullscreenFrame):
2463         * platform/graphics/avfoundation/objc/VideoFullscreenLayerManager.mm: Added.
2464         (-[WebVideoContainerLayer setBounds:]):
2465         (-[WebVideoContainerLayer setPosition:]):
2466         WebVideoContainerLayer was moved from MediaPlayerPrivateAVFoundationObjC.mm.
2467         (WebCore::VideoFullscreenLayerManager::create):
2468         (WebCore::VideoFullscreenLayerManager::VideoFullscreenLayerManager):
2469         (WebCore::VideoFullscreenLayerManager::setVideoLayer):
2470         Code moved from MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer().
2471         (WebCore::VideoFullscreenLayerManager::setVideoFullscreenLayer):
2472         Code moved from MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer().
2473         (WebCore::VideoFullscreenLayerManager::setVideoFullscreenFrame):
2474         Code moved from MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenFrame().
2475         (WebCore::VideoFullscreenLayerManager::didDestroyVideoLayer):
2476         Code moved from MediaPlayerPrivateAVFoundationObjC::destroyVideoLayer().
2477
2478         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
2479         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2480         (PlatformCALayerCocoa::clone):
2481         Use the new PlatformCALayerCocoa::avPlayerLayer() method to get the AVPlayerLayer from both the
2482         destination and source PlatformCALayers.
2483         (PlatformCALayerCocoa::avPlayerLayer):
2484         Return nil if the layer type is not LayerTypeAVPlayerLayer. Otherwise, return the
2485         platform layer if it is indeed an AVPlayerLayer. If not, it should be a WebVideoContainerLayer
2486         and we should return its sublayer which should be an AVPlayerLayer.
2487
2488 2016-01-26  Chris Dumez  <cdumez@apple.com>
2489
2490         First parameter to window.showModalDialog() should be mandatory
2491         https://bugs.webkit.org/show_bug.cgi?id=153436
2492
2493         Reviewed by Youenn Fablet.
2494
2495         Make window.showModalDialog()'s first parameter mandatory to match the
2496         last specification containing it:
2497         http://dev.w3.org/html5/spec-preview/user-prompts.html#dialogs-implemented-using-separate-documents
2498
2499         The new behavior also matches Firefox, while Chrome no longer supports
2500         this operation.
2501
2502         With this change, the W3C HTML test suite no longer hangs in the middle
2503         because it mistakenly pops up a modal dialog during testing.
2504
2505         Test: fast/dom/Window/showModalDialog-mandatory-parameter.html
2506
2507         * bindings/js/JSDOMWindowCustom.cpp:
2508         (WebCore::JSDOMWindow::showModalDialog):
2509
2510 2016-01-26  Eric Carlson  <eric.carlson@apple.com>
2511
2512         LayoutTest media/airplay-target-availability.html is flaky
2513         https://bugs.webkit.org/show_bug.cgi?id=153100
2514         <rdar://problem/24346796>
2515
2516         Reviewed by Daniel Bates.
2517
2518         No new tests, media/airplay-target-availability.html was updated
2519
2520         * Modules/mediasession/WebMediaSessionManager.cpp:
2521         (WebCore::WebMediaSessionManager::clientStateDidChange): Schedule a configuration scan if
2522           any of the config flags have changed.
2523         (WebCore::WebMediaSessionManager::configurePlaybackTargetMonitoring): Update logging.
2524
2525 2016-01-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2526
2527         Main frame scrollbars not updated on hovering when using overlay scrollbars
2528         https://bugs.webkit.org/show_bug.cgi?id=153304
2529
2530         Reviewed by Michael Catanzaro.
2531
2532         Legacy scrollbars were fixed in r194155, but overlay scrollbars
2533         are not notified when they are hovered. This is because the layer
2534         hit test in RenderView::hitTest always returns true when using
2535         overlay scrollbars and we are returning early in such case,
2536         ignoring the HitTestRequest::AllowFrameScrollbars flag. So, in
2537         case of using overlay scrollbars we still need to check the
2538         RenderView scrollbars even when the layer hit test succeeded.
2539
2540         * rendering/RenderView.cpp:
2541         (WebCore::RenderView::hitTest):
2542
2543 2016-01-26  Daniel Bates  <dabates@apple.com>
2544
2545         LayoutTest http/tests/security/xssAuditor/embed-tag-in-path-unterminated.html crashing
2546         https://bugs.webkit.org/show_bug.cgi?id=153250
2547         <rdar://problem/12172843>
2548         And
2549         <rdar://problem/24248040>
2550
2551         Reviewed by Alexey Proskuryakov.
2552
2553         Remove an incorrect assertion that the absolute URL associated with a protection space cannot
2554         contain consecutive forward slash (/) characters. A URL can contain consecutive forward slashes.
2555         This also makes the invariants for CredentialStorage::findDefaultProtectionSpaceForURL() symmetric
2556         with the invariants for WebCore::protectionSpaceMapKeyFromURL().
2557
2558         Tests: http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html
2559                http/tests/xmlhttprequest/basic-auth-load-URL-with-consecutive-slashes.html
2560
2561         * platform/network/CredentialStorage.cpp:
2562         (WebCore::CredentialStorage::findDefaultProtectionSpaceForURL):
2563
2564 2016-01-26  Daniel Bates  <dabates@apple.com>
2565
2566         Remove XMLHttpRequestException
2567         https://bugs.webkit.org/show_bug.cgi?id=102698
2568         <rdar://problem/24338476>
2569
2570         Reviewed by Chris Dumez.
2571
2572         Inspired by a patch by Erik Arvidsson.
2573
2574         As per <https://xhr.spec.whatwg.org> (21 January 2016) and <https://html.spec.whatwg.org/multipage/workers.html#dom-workerglobalscope-importscripts> (25 January 2016)
2575         XMLHttpRequest and WorkerGlobalScope.importScripts() should throw a DOMException object instead
2576         of a XMLHttpRequestException object when a NetworkError, AbortError, or TimeoutError occur. This
2577         makes the behavior of WebKit more closely conform to these standards as well as the behavior of
2578         other browsers.
2579
2580         * CMakeLists.txt: Remove entries for XMLHttpRequestException.idl and XMLHttpRequestException.cpp.
2581         * DerivedSources.make: Remove entry for XMLHttpRequestException.idl.
2582         * WebCore.order: Remove exported symbols for XMLHttpRequestException.
2583         * WebCore.vcxproj/WebCore.vcxproj: Remove entries for JSXMLHttpRequestException.{cpp, h}, XMLHttpRequestException.{cpp, h}
2584         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
2585         * WebCore.xcodeproj/project.pbxproj: Ditto.
2586         * bindings/js/JSExceptionBase.cpp:
2587         (WebCore::toExceptionBase): Remove logic for XMLHttpRequestException.
2588         * dom/DOMExceptions.in: Remove entry for XMLHttpRequestException.
2589         * workers/WorkerGlobalScope.cpp:
2590         (WebCore::WorkerGlobalScope::importScripts): Throw DOMException.NETWORK_ERR instead of XMLHttpRequestException.NETWORK_ERR.
2591         * xml/XMLHttpRequest.cpp:
2592         (WebCore::XMLHttpRequest::createRequest): Ditto.
2593         (WebCore::XMLHttpRequest::didFail): Throw DOMException.ABORT_ERR instead of XMLHttpRequestException.ABORT_ERR.
2594         (WebCore::XMLHttpRequest::didReachTimeout): Throw DOMException.TIMEOUT_ERR instead of XMLHttpRequestException.TIMEOUT_ERR.
2595         * xml/XMLHttpRequestException.cpp: Removed.
2596         * xml/XMLHttpRequestException.h: Removed.
2597         * xml/XMLHttpRequestException.idl: Removed.
2598
2599 2016-01-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2600
2601         WebCoreJSBuiltins do not use to do conditional include
2602         https://bugs.webkit.org/show_bug.cgi?id=153306
2603
2604         Reviewed by Alex Christensen.
2605
2606         Removing compilation guards as builtin generator adds them in the files themselves.
2607         Fixing MediaDevices.js to generate MEDIA_STREAM compilation guard.
2608
2609         No change in behavior.
2610
2611         * Modules/mediastream/MediaDevices.js: Changing @optional to @conditional.
2612         * Modules/mediastream/NavigatorUserMedia.js: Making it @conditional.
2613         * bindings/js/WebCoreJSBuiltins.cpp:
2614         * bindings/js/WebCoreJSBuiltins.h:
2615
2616 2016-01-25  Alex Christensen  <achristensen@webkit.org>
2617
2618         Fix internal Windows build
2619         https://bugs.webkit.org/show_bug.cgi?id=153469
2620
2621         Reviewed by Brent Fulgham.
2622
2623         * CMakeLists.txt:
2624         Pass the GPERF_EXECUTABLE that we found to perl scripts so they can use it instead of just calling gperf.
2625         This is needed for builds where gperf is not in the PATH.
2626         * DerivedSources.make:
2627         Pass "gperf" as the gperf command to retain existing functionality on mac.
2628         * bindings/scripts/preprocess-idls.pl:
2629         (CygwinPathIfNeeded):
2630         * bindings/scripts/preprocessor.pm:
2631         (applyPreprocessor):
2632         Add /cygdrive/c/cygwin/bin to the PATH before calling cygpath.
2633         This is needed for builds where we are using cygwin, but C:/cygwin/bin is not in the PATH.
2634         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
2635         * css/makeSelectorPseudoElementsMap.py:
2636         * css/makeprop.pl:
2637         * platform/network/create-http-header-name-table:
2638         Use the gperf executable passed in as a command line parameter if it is given.
2639
2640 2016-01-25  Simon Fraser  <simon.fraser@apple.com>
2641
2642         DisplayList items can log paths now
2643         https://bugs.webkit.org/show_bug.cgi?id=153417
2644
2645         Reviewed by Zalan Bujtas.
2646
2647         Now that Path supports TextStream logging, clean up its output a little and
2648         enable dumping of Paths in DisplayListItems.
2649
2650         * platform/graphics/Path.cpp:
2651         (WebCore::operator<<):
2652         * platform/graphics/displaylists/DisplayListItems.cpp:
2653         (WebCore::DisplayList::operator<<):
2654
2655 2016-01-25  Antti Koivisto  <antti@apple.com>
2656
2657         Fix the comment.
2658
2659         * rendering/style/RenderStyle.h:
2660
2661 2016-01-25  Enrica Casucci  <enrica@apple.com>
2662
2663         Add support for DataDetectors in WK (iOS).
2664         https://bugs.webkit.org/show_bug.cgi?id=152989
2665         rdar://problem/22855960
2666
2667         Reviewed by Tim Horton.
2668
2669         Adding new helper functions for data detection related tasks.
2670         The patch also fixes a bug when creating DOM ranges from DDQueryRange
2671         spanning multiple fragments.
2672
2673         * editing/cocoa/DataDetection.h:
2674         * editing/cocoa/DataDetection.mm:
2675         (WebCore::DataDetection::isDataDetectorLink):
2676         (WebCore::DataDetection::dataDetectorIdentifier):
2677         (WebCore::detectItemAtPositionWithRange):
2678         (WebCore::DataDetection::detectItemAroundHitTestResult):
2679         (WebCore::resultIsURL):
2680         (WebCore::removeResultLinksFromAnchor):
2681         (WebCore::searchForLinkRemovingExistingDDLinks):
2682         (WebCore::DataDetection::detectContentInRange):
2683
2684 2016-01-25  Myles C. Maxfield  <mmaxfield@apple.com>
2685
2686         Remove broken cache from CSSFontFaceSource
2687         https://bugs.webkit.org/show_bug.cgi?id=153440
2688
2689         Reviewed by Simon Fraser.
2690
2691         This cache has been broken since 2013 (r158085). Given we didn't notice a perf
2692         hit when it broke, and the fact it's been broken for years, it clearly isn't
2693         necessary.
2694
2695         https://bugs.webkit.org/show_bug.cgi?id=153414 consists of a fairly invasive
2696         change to CSSFontFaceSource; this patch includes a working version of this
2697         cache, along with an easy way to enable/disable it (to measure possible perf
2698         changes).
2699
2700         This patch is a short-term cleanup patch in the mean time until the above
2701         invasive change gets landed.
2702
2703         No new tests because there is no behavior (or performance!) change.
2704
2705         * css/CSSFontFaceSource.cpp:
2706         (WebCore::CSSFontFaceSource::font):
2707         (WebCore::CSSFontFaceSource::~CSSFontFaceSource): Deleted.
2708         (WebCore::CSSFontFaceSource::pruneTable): Deleted.
2709         (WebCore::CSSFontFaceSource::fontLoaded): Deleted.
2710         * css/CSSFontFaceSource.h:
2711
2712 2016-01-25  Sam Weinig  <sam@webkit.org>
2713
2714         Try to fix the simulator build.
2715
2716         * platform/spi/cocoa/DataDetectorsCoreSPI.h:
2717
2718 2016-01-25  Sam Weinig  <sam@webkit.org>
2719
2720         Roll back in r195559 with a build fix.
2721
2722         * WebCore.xcodeproj/project.pbxproj:
2723         * editing/cocoa/DataDetection.mm:
2724         * platform/cocoa/DataDetectorsCoreSoftLink.mm: Added.
2725         * platform/cocoa/DataDetectorsCoreSoftLink.h: Added.
2726         * platform/spi/cocoa/DataDetectorsCoreSPI.h:
2727
2728 2016-01-25  Commit Queue  <commit-queue@webkit.org>
2729
2730         Unreviewed, rolling out r195559.
2731         https://bugs.webkit.org/show_bug.cgi?id=153458
2732
2733         This change broke the iOS build (Requested by ryanhaddad on
2734         #webkit).
2735
2736         Reverted changeset:
2737
2738         "Fix the ASAN build."
2739         http://trac.webkit.org/changeset/195559
2740
2741 2016-01-25  Antti Koivisto  <antti@apple.com>
2742
2743         Resolving direction and writing mode properties should not mutate document
2744         https://bugs.webkit.org/show_bug.cgi?id=153446
2745
2746         Reviewed by Andreas Kling.
2747
2748         Replace directionSetOnDocumentElement/writingModeSetOnDocumentElement document flags them with style flags.
2749
2750         * css/StyleBuilderCustom.h:
2751         (WebCore::StyleBuilderCustom::applyValueDirection):
2752         (WebCore::StyleBuilderCustom::resetEffectiveZoom):
2753         (WebCore::StyleBuilderCustom::applyValueWebkitWritingMode):
2754         (WebCore::StyleBuilderCustom::applyValueWebkitTextOrientation):
2755         * css/StyleResolver.cpp:
2756         (WebCore::StyleResolver::styleForElement):
2757         * dom/Document.cpp:
2758         (WebCore::Document::Document):
2759         * dom/Document.h:
2760         (WebCore::Document::markers):
2761         (WebCore::Document::directionSetOnDocumentElement): Deleted.
2762         (WebCore::Document::writingModeSetOnDocumentElement): Deleted.
2763         (WebCore::Document::setDirectionSetOnDocumentElement): Deleted.
2764         (WebCore::Document::setWritingModeSetOnDocumentElement): Deleted.
2765         * rendering/RenderBox.cpp:
2766         (WebCore::RenderBox::styleDidChange):
2767         * rendering/style/RenderStyle.h:
2768         * style/StyleResolveForDocument.cpp:
2769         (WebCore::Style::resolveForDocument):
2770
2771 2016-01-25  Sam Weinig  <sam@webkit.org>
2772
2773         Fix the ASAN build.
2774
2775         * WebCore.xcodeproj/project.pbxproj:
2776         * editing/cocoa/DataDetection.mm:
2777         * platform/cocoa/DataDetectorsCoreSoftLink.mm: Added.
2778         * platform/cocoa/DataDetectorsCoreSoftLink.h: Added.
2779         * platform/spi/cocoa/DataDetectorsCoreSPI.h:
2780
2781 2016-01-25  Alex Christensen  <achristensen@webkit.org>
2782
2783         [Win] Another build fix after r195545
2784
2785         * CMakeLists.txt:
2786         r195548 didn't change all the pre-builds back to post-builds.
2787
2788 2016-01-25  Alex Christensen  <achristensen@webkit.org>
2789
2790         [Win] Fix clean build after r195545.
2791
2792         * CMakeLists.txt:
2793         * PlatformWin.cmake:
2794         I got a little carried away.  WebCore already had a pre-build event.  It was correct before r195545.
2795
2796 2016-01-25  Beth Dakin  <bdakin@apple.com>
2797
2798         Handle soft spaces after accepted candidates
2799         https://bugs.webkit.org/show_bug.cgi?id=153331
2800         -and corresponding-
2801         rdar://problem/23958418
2802
2803         Reviewed by Darin Adler.
2804
2805         Candidates now come with built-in spaces, so we should not insert a space for 
2806         them.
2807         * editing/Editor.cpp:
2808         (WebCore::Editor::handleAcceptedCandidate):
2809
2810         New SPI to properly handle these soft spaces.
2811         * platform/spi/mac/NSSpellCheckerSPI.h:
2812
2813 2016-01-25  Alex Christensen  <achristensen@webkit.org>
2814
2815         [Win] Copy forwarding headers before building a project
2816         https://bugs.webkit.org/show_bug.cgi?id=153434
2817
2818         Reviewed by Brent Fulgham.
2819
2820         * CMakeLists.txt:
2821         * PlatformWin.cmake:
2822
2823 2016-01-25  Brady Eidson  <beidson@apple.com>
2824
2825         Modern IDB: Implement getIndexRecord in the SQLite backing store.
2826         https://bugs.webkit.org/show_bug.cgi?id=153425
2827
2828         Reviewed by Darin Adler.
2829
2830         No new tests (Some failures now pass, other failures progressed closer to passing).
2831
2832         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
2833         (WebCore::IDBServer::SQLiteIDBBackingStore::getIndexRecord):
2834
2835 2016-01-25  Eric Carlson  <eric.carlson@apple.com>
2836
2837         Media "ended" event incorrectly fires when currentTime is set
2838         https://bugs.webkit.org/show_bug.cgi?id=150348
2839         <rdar://problem/24247974>
2840
2841         Reviewed by Jer Noble.
2842
2843         Test: media/media-ended-fired-once.html
2844
2845         * html/HTMLMediaElement.cpp:
2846         (WebCore::HTMLMediaElement::invalidateCachedTime): Always mark m_cachedTime as invalid.
2847
2848 2016-01-25  Konstantin Tokarev  <annulen@yandex.ru>
2849
2850         Do not convert GlyphBufferAdvance to FloatSize
2851         https://bugs.webkit.org/show_bug.cgi?id=153421
2852
2853         Reviewed by Simon Fraser.
2854
2855         No new tests needed.
2856
2857         * platform/graphics/displaylists/DisplayListItems.cpp:
2858         (WebCore::DisplayList::DrawGlyphs::computeBounds):
2859
2860 2016-01-22  Ryosuke Niwa  <rniwa@webkit.org>
2861
2862         document.createElement should be able to create a custom element
2863         https://bugs.webkit.org/show_bug.cgi?id=153173
2864
2865         Reviewed by Darin Adler.
2866
2867         Added the support for constructing a custom element via document.createElement.
2868
2869         Extracted HTMLElementFactory::createKnownElement, which returns nullptr when the specified name doesn't match
2870         any builtin element instead of out of HTMLUnknownElement, out of HTMLElementFactory::createElement.
2871
2872         Test: fast/custom-elements/Document-createElement.html
2873
2874         * bindings/js/JSCustomElementInterface.cpp:
2875         (WebCore::JSCustomElementInterface::constructHTMLElement): Added. Constructs a custom element by invoking its
2876         constructor. We allow exceptions to be thrown by the constructor so the caller is responsible for checking
2877         any exceptions in the ExecState before preceeding if the returned value is null.
2878
2879         * bindings/js/JSCustomElementInterface.h:
2880         (WebCore::JSCustomElementInterface::constructSVGElement): Added.
2881         * bindings/js/JSElementCustom.cpp:
2882         (WebCore::toJSNewlyCreated): Exit early if the element is a custom element as the wrapper had already been
2883         created by super() call inside the custom element'c constructor.
2884
2885         * bindings/js/JSMainThreadExecState.h:
2886         (WebCore::JSMainThreadExecState):
2887         * bindings/js/JSMainThreadExecStateInstrumentation.h:
2888         (WebCore::JSMainThreadExecState::instrumentFunctionInternal): Generalized from instrumentFunctionCall so that
2889         we can use it for both call and construct.
2890         (WebCore::JSMainThreadExecState::instrumentFunctionCall): Specialized the above function for call.
2891         (WebCore::JSMainThreadExecState::instrumentFunctionConstruct): Ditto for construct.
2892
2893         * dom/CustomElementDefinitions.cpp:
2894         (WebCore::CustomElementDefinitions::findInterface): Added.
2895         * dom/CustomElementDefinitions.h:
2896
2897         * dom/Document.cpp:
2898         (WebCore::createHTMLElementWithNameValidation): Extracted from createElement.
2899         (WebCore::Document::createElementForBindings): Renamed from createElement. Specifies
2900         ShouldCreateCustomElement::Create to create a custom element before using fallback elements.
2901         * dom/Document.h:
2902         * dom/Document.idl:
2903
2904         * dom/Node.h:
2905         (WebCore::Node::isCustomElement): Added. This flag is used to identify a custom element.
2906         (WebCore::Node::setIsCustomElement): Added.
2907
2908         * dom/make_names.pl: Extracted createKnownElement from createElement for createHTMLElementWithNameValidation.
2909
2910         * inspector/InspectorCSSAgent.cpp:
2911         (WebCore::InspectorCSSAgent::createInspectorStyleSheetForDocument): Use qualified name object to instantiate
2912         a style element and set type content attribute.
2913         * inspector/InspectorDOMAgent.cpp:
2914         (WebCore::InspectorDOMAgent::setNodeName): Use createElementForBindings here since we might be creating an
2915         arbitrary element here. Also use RefPtr instead of raw pointers while mutating DOM for safety.
2916
2917 2016-01-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2918
2919         REGRESSION(r192773): [GTK] maps.google.com unresponsive/stalls since r192773
2920         https://bugs.webkit.org/show_bug.cgi?id=153194
2921
2922         Reviewed by Michael Catanzaro.
2923
2924         In r192773 we implemented the JavaScriptCore garbage collector
2925         timers for the GTK+ port. Those timers schedule sources in the
2926         current thread default main context, but JS web worker threads
2927         implementation doesn't use WTF::RunLoop, but its own WorkerRunLoop
2928         class that doesn't create a GMainContext for the new thread. This
2929         means that for web sites using workers, we are now doing garbage
2930         collection of worker VMs in the main thread which ends up in a
2931         deadlock at some point. We need to ensure that worker threads
2932         create a GMainContext and push it as the default one for the
2933         thread before the WorkerGlobalScope is created. This way when the
2934         worker Heap is created, the GC timers use the right context to
2935         schedule their sources. And then we need to check if there are
2936         sources pending in the thread main context on every worker run
2937         loop iteration.
2938
2939         * workers/WorkerRunLoop.cpp:
2940         (WebCore::WorkerRunLoop::runInMode):
2941         * workers/WorkerThread.cpp:
2942         (WebCore::WorkerThread::workerThread):
2943
2944 2016-01-25  Commit Queue  <commit-queue@webkit.org>
2945
2946         Unreviewed, rolling out r195533.
2947         https://bugs.webkit.org/show_bug.cgi?id=153423
2948
2949         It is again breaking builds of several ports (Requested by
2950         youenn on #webkit).
2951
2952         Reverted changeset:
2953
2954         "WebCoreJSBuiltins do not use to do conditional include"
2955         https://bugs.webkit.org/show_bug.cgi?id=153306
2956         http://trac.webkit.org/changeset/195533
2957
2958 2016-01-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2959
2960         WebCoreJSBuiltins do not use to do conditional include
2961         https://bugs.webkit.org/show_bug.cgi?id=153306
2962
2963         Reviewed by Alex Christensen.
2964
2965         Removing compilation guards as builtin generator adds them in the files themselves.
2966         Fixing MediaDevices.js to generate MEDIA_STREAM compilation guard.
2967
2968         No change in behavior.
2969
2970         * Modules/mediastream/MediaDevices.js: Changing @optional to @conditional.
2971         * bindings/js/WebCoreJSBuiltins.cpp:
2972         * bindings/js/WebCoreJSBuiltins.h:
2973
2974 2016-01-25  Commit Queue  <commit-queue@webkit.org>
2975
2976         Unreviewed, rolling out r195531.
2977         https://bugs.webkit.org/show_bug.cgi?id=153420
2978
2979         It is breaking builds of several ports (Requested by youenn on
2980         #webkit).
2981
2982         Reverted changeset:
2983
2984         "WebCoreJSBuiltins do not use to do conditional include"
2985         https://bugs.webkit.org/show_bug.cgi?id=153306
2986         http://trac.webkit.org/changeset/195531
2987
2988 2016-01-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2989
2990         WebCoreJSBuiltins do not use to do conditional include
2991         https://bugs.webkit.org/show_bug.cgi?id=153306
2992
2993         Reviewed by Alex Christensen.
2994
2995         Removing compilation guards as builtin generator adds them in the files themselves.
2996
2997         No change in behavior.
2998
2999         * bindings/js/WebCoreJSBuiltins.cpp:
3000         * bindings/js/WebCoreJSBuiltins.h:
3001
3002 2016-01-25  Youenn Fablet  <youenn.fablet@crf.canon.fr>
3003
3004         [Fetch API] Implement Fetch API Headers
3005         https://bugs.webkit.org/show_bug.cgi?id=152384
3006
3007         Reviewed by Darin Adler.
3008
3009         Adding Fetch Headers API as a wapper around HTTPHeaderMap.
3010
3011         Tests: imported/w3c/web-platform-tests/fetch/api/headers/headers-basic.html
3012                imported/w3c/web-platform-tests/fetch/api/headers/headers-casing.html
3013                imported/w3c/web-platform-tests/fetch/api/headers/headers-errors.html
3014                imported/w3c/web-platform-tests/fetch/api/headers/headers-idl.html
3015                imported/w3c/web-platform-tests/fetch/api/headers/headers-nameshake.html
3016                imported/w3c/web-platform-tests/fetch/api/headers/headers-normalize.html
3017                imported/w3c/web-platform-tests/fetch/api/headers/headers-structure.html
3018
3019         * CMakeLists.txt:
3020         * DerivedSources.cpp:
3021         * DerivedSources.make:
3022         * Modules/fetch/FetchHeaders.cpp: Added.
3023         (WebCore::FetchHeaders::initializeWith):
3024         (WebCore::isForbiddenHeaderName):
3025         (WebCore::isForbiddenResponseHeaderName):
3026         (WebCore::isSimpleHeader):
3027         (WebCore::canWriteHeader):
3028         (WebCore::FetchHeaders::append):
3029         (WebCore::FetchHeaders::remove):
3030         (WebCore::FetchHeaders::get):
3031         (WebCore::FetchHeaders::has):
3032         (WebCore::FetchHeaders::set):
3033         * Modules/fetch/FetchHeaders.h: Added.
3034         (WebCore::FetchHeaders::create):
3035         (WebCore::FetchHeaders::~FetchHeaders):
3036         (WebCore::FetchHeaders::internalHeaders):
3037         (WebCore::FetchHeaders::FetchHeaders):
3038         * Modules/fetch/FetchHeaders.idl: Added.
3039         * Modules/fetch/FetchHeaders.js: Added.
3040         (initializeFetchHeaders):
3041         * WebCore.xcodeproj/project.pbxproj:
3042         * bindings/js/WebCoreBuiltinNames.h:
3043         * bindings/js/WebCoreJSBuiltins.cpp:
3044         * bindings/js/WebCoreJSBuiltins.h:
3045         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions):
3046         (WebCore::JSBuiltinFunctions::fetchHeadersBuiltins):
3047         * platform/network/HTTPHeaderMap.cpp:
3048         (WebCore::HTTPHeaderMap::contains):
3049         (WebCore::HTTPHeaderMap::remove):
3050         * platform/network/HTTPHeaderMap.h:
3051
3052 2016-01-22  Sergio Villar Senin  <svillar@igalia.com>
3053
3054         [css-grid] grid shorthand must reset gap properties to their initial values
3055         https://bugs.webkit.org/show_bug.cgi?id=153354
3056
3057         Reviewed by Darin Adler.
3058
3059         Both 'grid-row-gap' & 'grid-column-gap' are considered reset-only subproperties of the
3060         'grid' shorthand meaning that, even thought the shorthand does not offer a way to set
3061         their values, it must in any case reset them to the initial ones.
3062
3063         * css/CSSParser.cpp:
3064         (WebCore::CSSParser::parseGridShorthand):
3065         * css/CSSPropertyNames.in:
3066
3067 2016-01-24  Brady Eidson  <beidson@apple.com>
3068
3069         Modern IDB: Implement deleteIndex and getCount for the SQLite backing store.
3070         https://bugs.webkit.org/show_bug.cgi?id=153415
3071
3072         Reviewed by Darin Adler.
3073
3074         No new tests (Handful of tests now pass, improvements on a handful of others).
3075
3076         * Modules/indexeddb/server/IDBBackingStore.h:
3077         
3078         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
3079         (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
3080         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
3081         
3082         * Modules/indexeddb/server/MemoryObjectStore.cpp:
3083         (WebCore::IDBServer::MemoryObjectStore::takeIndexByIdentifier):
3084         (WebCore::IDBServer::MemoryObjectStore::deleteIndex):
3085         (WebCore::IDBServer::MemoryObjectStore::deleteAllIndexes):
3086         (WebCore::IDBServer::MemoryObjectStore::takeIndexByName): Deleted.
3087         * Modules/indexeddb/server/MemoryObjectStore.h:
3088         
3089         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3090         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
3091         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteIndex):
3092         (WebCore::IDBServer::SQLiteIDBBackingStore::getCount):
3093         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
3094         
3095         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
3096         (WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor):
3097         (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
3098         * Modules/indexeddb/server/SQLiteIDBCursor.h:
3099         
3100         * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
3101         (WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenBackingStoreCursor):
3102         * Modules/indexeddb/server/SQLiteIDBTransaction.h:
3103         
3104         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3105         (WebCore::IDBServer::UniqueIDBDatabase::deleteIndex):
3106         (WebCore::IDBServer::UniqueIDBDatabase::performDeleteIndex):
3107         (WebCore::IDBServer::UniqueIDBDatabase::didPerformDeleteIndex):
3108         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3109         
3110         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
3111         (WebCore::IDBObjectStoreInfo::deleteIndex):
3112         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
3113
3114 2016-01-24  Brady Eidson  <beidson@apple.com>
3115
3116         Unreviewed, speculative fix for:
3117         Modern IDB: Some IDB tests crash in ~SQLiteIDBBackingStore
3118         https://bugs.webkit.org/show_bug.cgi?id=153418
3119
3120         No new tests.
3121
3122         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3123         (WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore): Clear the global object
3124           before wiping out the VM.
3125
3126 2016-01-24  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3127
3128         Reduce PassRefPtr uses in dom - 4
3129         https://bugs.webkit.org/show_bug.cgi?id=153270
3130
3131         Reviewed by Darin Adler.
3132
3133         As a step to remove PassRefPtr uses, this patch reduces the uses in WebCore/dom.
3134
3135         * bindings/js/JSDeviceMotionEventCustom.cpp:
3136         (WebCore::JSDeviceMotionEvent::initDeviceMotionEvent):
3137         * dom/DeviceMotionData.cpp:
3138         (WebCore::DeviceMotionData::create):
3139         (WebCore::DeviceMotionData::DeviceMotionData):
3140         * dom/DeviceMotionData.h:
3141         * dom/Document.cpp:
3142         (WebCore::Document::setBodyOrFrameset):
3143         (WebCore::Document::setFocusedElement):
3144         (WebCore::Document::setDecoder):
3145         (WebCore::Document::pushCurrentScript):
3146         * dom/Document.h:
3147         * dom/Event.cpp:
3148         (WebCore::Event::cloneFor):
3149         * dom/Event.h:
3150         * dom/MouseEvent.cpp:
3151         (WebCore::MouseEvent::cloneFor):
3152         * dom/MouseEvent.h:
3153         * dom/NodeIterator.cpp:
3154         (WebCore::NodeIterator::NodePointer::NodePointer):
3155         (WebCore::NodeIterator::NodeIterator):
3156         * dom/NodeIterator.h:
3157         (WebCore::NodeIterator::create):
3158         * html/RadioInputType.cpp:
3159         (WebCore::RadioInputType::handleKeydownEvent):
3160         * platform/ios/DeviceMotionClientIOS.mm:
3161         (WebCore::DeviceMotionClientIOS::motionChanged):
3162         * xml/XSLTProcessor.cpp:
3163         (WebCore::XSLTProcessor::createDocumentFromSource):
3164
3165 2016-01-24  Myles C. Maxfield  <mmaxfield@apple.com>
3166
3167         [Font Loading] General cleanup
3168         https://bugs.webkit.org/show_bug.cgi?id=153403
3169
3170         Reviewed by Darin Adler.
3171
3172         It turns out that CSSFontFaceSource::m_hasExternalSVGFont exactly equals
3173         whether or not CSSFontFaceSource::m_font is a CachedSVGFont. Therefore,
3174         the variable is redundant.
3175
3176         In addition, it was being passed to functions on CSSFontFaceSource::m_font,
3177         which means it was always true inside the CachedSVGFont subclass and
3178         always false for the CachedFont. Therefore, there is no reason pass this
3179         variable to these functions because its value can be determined at
3180         authorship time.
3181
3182         No new tests because there is no behavior change.
3183
3184         * css/CSSFontFaceSource.cpp:
3185         (WebCore::CSSFontFaceSource::font):
3186         (WebCore::CSSFontFaceSource::CSSFontFaceSource): Deleted.
3187         * css/CSSFontFaceSource.h:
3188         * css/CSSFontSelector.cpp:
3189         (WebCore::createFontFace):
3190         * loader/cache/CachedFont.cpp:
3191         (WebCore::CachedFont::ensureCustomFontData):
3192         (WebCore::CachedFont::createFont):
3193         * loader/cache/CachedFont.h:
3194         * loader/cache/CachedSVGFont.cpp:
3195         (WebCore::CachedSVGFont::createFont):
3196         (WebCore::CachedSVGFont::ensureCustomFontData):
3197         * loader/cache/CachedSVGFont.h:
3198         * platform/network/HTTPParsers.cpp:
3199         (WebCore::isValidHTTPToken):
3200         * xml/XMLHttpRequest.cpp:
3201         (WebCore::XMLHttpRequest::uppercaseKnownHTTPMethod):
3202
3203 2016-01-24  Chris Dumez  <cdumez@apple.com>
3204
3205         An XMLDocument interface should be exposed on the global Window object
3206         https://bugs.webkit.org/show_bug.cgi?id=153378
3207         <rdar://problem/24315465>
3208
3209         Reviewed by Darin Adler.
3210
3211         Expose an XMLDocument interface on the global Window object, as per:
3212         - https://dom.spec.whatwg.org/#xmldocument
3213
3214         DOMImplementation.createDocument() now returns an XMLDocument instead
3215         of a Document, as per:
3216         - https://dom.spec.whatwg.org/#dom-domimplementation-createdocument
3217
3218         Previously, WebKit would alias XMLDocument to Document which caused
3219         some W3C tests to fail.
3220
3221         Chrome and Firefox already match the specification here.
3222
3223         No new tests, already covered by existing tests.
3224
3225         * CMakeLists.txt:
3226         * DerivedSources.cpp:
3227         * DerivedSources.make:
3228         * WebCore.vcxproj/WebCore.vcxproj:
3229         * WebCore.vcxproj/WebCore.vcxproj.filters:
3230         * WebCore.xcodeproj/project.pbxproj:
3231         * bindings/js/JSBindingsAllInOne.cpp:
3232         * bindings/js/JSDocumentCustom.cpp:
3233         (WebCore::createNewDocumentWrapper):
3234         * dom/DOMImplementation.cpp:
3235         (WebCore::DOMImplementation::createDocument):
3236         * dom/DOMImplementation.h:
3237         * dom/DOMImplementation.idl:
3238         * dom/Document.cpp:
3239         (WebCore::Document::cloneDocumentWithoutChildren):
3240         * dom/Document.h:
3241         (WebCore::Document::isXMLDocument):
3242         (WebCore::Document::create): Deleted.
3243         (WebCore::Document::createNonRenderedPlaceholder): Deleted.
3244         * dom/XMLDocument.h: Added.
3245         (WebCore::XMLDocument::create):
3246         (WebCore::XMLDocument::createXHTML):
3247         (WebCore::XMLDocument::XMLDocument):
3248         (isType):
3249         * dom/XMLDocument.idl: Added.
3250         * inspector/DOMPatchSupport.cpp:
3251         (WebCore::DOMPatchSupport::patchDocument):
3252         * inspector/InspectorDOMAgent.cpp:
3253         (WebCore::InspectorDOMAgent::setOuterHTML):
3254         * page/DOMWindow.idl:
3255         * page/PageSerializer.cpp:
3256         (WebCore::SerializerMarkupAccumulator::SerializerMarkupAccumulator):
3257         * svg/SVGDocument.cpp:
3258         (WebCore::SVGDocument::SVGDocument):
3259         * svg/SVGDocument.h:
3260         * svg/SVGDocument.idl:
3261         * xml/XMLHttpRequest.cpp:
3262         (WebCore::XMLHttpRequest::responseXML):
3263         * xml/XSLTProcessor.cpp:
3264         (WebCore::XSLTProcessor::createDocumentFromSource):
3265
3266 2016-01-24  Brady Eidson  <beidson@apple.com>
3267
3268         Modern IDB: Support IDBObjectStore.createIndex in the SQLite backing store.
3269         https://bugs.webkit.org/show_bug.cgi?id=153410
3270
3271         Reviewed by Darin Adler.
3272
3273         No new tests (Covered by unskipping many existing tests).
3274
3275         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3276         (WebCore::IDBServer::SQLiteIDBBackingStore::~SQLiteIDBBackingStore):
3277         (WebCore::IDBServer::SQLiteIDBBackingStore::createIndex):
3278         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedHasIndexRecord):
3279         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedPutIndexRecord):
3280         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
3281
3282         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
3283         (WebCore::IDBServer::SQLiteIDBCursor::maybeCreateBackingStoreCursor):
3284         (WebCore::IDBServer::SQLiteIDBCursor::SQLiteIDBCursor):
3285         * Modules/indexeddb/server/SQLiteIDBCursor.h:
3286
3287         * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
3288         (WebCore::IDBServer::SQLiteIDBTransaction::maybeOpenBackingStoreCursor):
3289         * Modules/indexeddb/server/SQLiteIDBTransaction.h:
3290
3291 2016-01-24  Simon Fraser  <simon.fraser@apple.com>
3292
3293         Make the dumped display list representation a bit more compact
3294         https://bugs.webkit.org/show_bug.cgi?id=153409
3295
3296         Reviewed by Zalan Bujtas.
3297
3298         Don't make a group for every display list item.
3299
3300         * platform/graphics/displaylists/DisplayList.cpp:
3301         (WebCore::DisplayList::DisplayList::asText):
3302
3303 2016-01-24  Simon Fraser  <simon.fraser@apple.com>
3304
3305         Add testing for display list replay, and skip clipped-out items on replay
3306         https://bugs.webkit.org/show_bug.cgi?id=153408
3307
3308         Reviewed by Zalan Bujtas.
3309         
3310         Make it possible to save and serialize a DisplayList of Items which were
3311         actually applied on replay, so that replay-time optimizations can be tested.
3312         
3313         This exposes internals.setElementTracksDisplayListReplay() and
3314         internals.replayDisplayListForElement().
3315         
3316         Do a trivial replay-time optimization, which is to skip items whose extents are
3317         outside the replay clip.
3318
3319         Test: displaylists/replay-skip-clipped-rect.html
3320
3321         * platform/graphics/GraphicsLayer.cpp:
3322         (WebCore::GraphicsLayer::GraphicsLayer):
3323         * platform/graphics/GraphicsLayer.h:
3324         (WebCore::GraphicsLayer::setIsTrackingDisplayListReplay):
3325         (WebCore::GraphicsLayer::isTrackingDisplayListReplay):
3326         (WebCore::GraphicsLayer::replayDisplayListAsText):
3327         * platform/graphics/ca/GraphicsLayerCA.cpp:
3328         (WebCore::layerDisplayListMap): Use a singleton map to store the replay display lists
3329         to avoid bloating GraphicsLayerCA for test-only code. The map stores a pair of the
3330         replay list and a clip rect, which are both dumped. Dumping the clip rect ensures that
3331         we're reporting the replay for the correct tile in a test (since there will be a replay
3332         for each tile).
3333         (WebCore::GraphicsLayerCA::~GraphicsLayerCA):
3334         (WebCore::GraphicsLayerCA::platformCALayerPaintContents):
3335         (WebCore::GraphicsLayerCA::setIsTrackingDisplayListReplay):
3336         (WebCore::GraphicsLayerCA::replayDisplayListAsText):
3337         * platform/graphics/ca/GraphicsLayerCA.h:
3338         * platform/graphics/displaylists/DisplayList.h:
3339         (WebCore::DisplayList::DisplayList::appendItem):
3340         * platform/graphics/displaylists/DisplayListReplayer.cpp:
3341         (WebCore::DisplayList::Replayer::replay): In the unlikely event of tracking replays,
3342         allocate a new DisplayList and append to it items which actually get applied.
3343         * platform/graphics/displaylists/DisplayListReplayer.h:
3344         * rendering/RenderLayerBacking.cpp:
3345         (WebCore::RenderLayerBacking::setIsTrackingDisplayListReplay):
3346         (WebCore::RenderLayerBacking::replayDisplayListAsText):
3347         * rendering/RenderLayerBacking.h:
3348         * testing/Internals.cpp:
3349         (WebCore::Internals::setElementTracksDisplayListReplay):
3350         (WebCore::Internals::replayDisplayListForElement):
3351         * testing/Internals.h:
3352         * testing/Internals.idl:
3353
3354 2016-01-23  Wonchul Lee  <wonchul.lee@collabora.co.uk>
3355
3356         [GTK] Fix media controls displaying without controls attribute
3357         https://bugs.webkit.org/show_bug.cgi?id=152500
3358
3359         Media controls is not displayed without controls attribute by default
3360         when the video element has text track. It'll be displayed on fullscreen
3361         regardless of controls attribute.
3362
3363         Reviewed by Michael Catanzaro.
3364
3365         * Modules/mediacontrols/mediaControlsGtk.js:
3366         (ControllerGtk.prototype.shouldHaveControls):
3367         (ControllerGtk.prototype.reconnectControls):
3368         (ControllerGtk.prototype.removeControls):
3369         (ControllerGtk.prototype.configureControls): Deleted.
3370 2016-01-23  Alex Christensen  <achristensen@webkit.org>
3371
3372         Use credentials from a URL with NetworkSession like we did with ResourceHandle
3373         https://bugs.webkit.org/show_bug.cgi?id=153328
3374
3375         Reviewed by Alexey Proskuryakov.
3376
3377         This patch fixes at least http/tests/xmlhttprequest/basic-auth-credentials-escaping.html when using NetworkSession.
3378
3379         * platform/network/ProtectionSpaceBase.h:
3380         (WebCore::ProtectionSpaceBase::encodingRequiresPlatformData):
3381         * platform/network/ResourceRequestBase.h:
3382         Add some WEBCORE_EXPORT macros for functions that are now used in WebKit2.
3383
3384 2016-01-23  Brady Eidson  <beidson@apple.com>
3385
3386         Modern IDB: Implement clearing object stores and opening cursors in the SQLite backend.
3387         https://bugs.webkit.org/show_bug.cgi?id=153396
3388
3389         Reviewed by Alex Christensen.
3390
3391         No new tests (Some failing tests now pass, others improved).
3392
3393         Copy more LegacyIDB SQLite backend code over to the new SQLite backend.
3394         
3395         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
3396         (WebCore::IDBServer::SQLiteIDBBackingStore::clearObjectStore):
3397         (WebCore::IDBServer::SQLiteIDBBackingStore::openCursor):
3398         (WebCore::IDBServer::SQLiteIDBBackingStore::iterateCursor):
3399
3400 2016-01-22  Commit Queue  <commit-queue@webkit.org>
3401
3402         Unreviewed, rolling out r195493.
3403         https://bugs.webkit.org/show_bug.cgi?id=153397
3404
3405         Broke authenticaiton tests (leaks credentials) (Requested by
3406         ap on #webkit).
3407
3408         Reverted changeset:
3409
3410         "LayoutTest http/tests/security/xssAuditor/embed-tag-in-path-
3411         unterminated.html crashing"
3412         https://bugs.webkit.org/show_bug.cgi?id=153250
3413         http://trac.webkit.org/changeset/195493
3414
3415 2016-01-20  Ryosuke Niwa  <rniwa@webkit.org>
3416
3417         HTMLElement::nodeName should not upper case non-ASCII characters
3418         https://bugs.webkit.org/show_bug.cgi?id=153231
3419
3420         Reviewed by Darin Adler.
3421
3422         Use the newly added convertToASCIIUppercase to generate the string for tagName and nodeName.
3423
3424         Test: fast/dom/Element/tagName-must-be-ASCII-uppercase-in-HTML-document.html
3425
3426         * dom/QualifiedName.cpp:
3427         (WebCore::QualifiedName::localNameUpper): Use convertToASCIIUppercase.
3428         * html/HTMLElement.cpp:
3429         (WebCore::HTMLElement::nodeName): Use convertToASCIIUppercase.
3430
3431 2016-01-22  Brady Eidson  <beidson@apple.com>
3432
3433         Modern IDB: Disable simultaneous transactions in the SQLite backend for now.
3434         https://bugs.webkit.org/show_bug.cgi?id=153381
3435
3436         Reviewed by Alex Christensen.
3437
3438         No new tests (This resolves many of the currently crashing/asserting tests).
3439
3440         Right now we're porting the Legacy IDB SQLite backend to Modern IDB.
3441         
3442         The way the Legacy backend works is restricted to one transaction at a time.
3443