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