[css-align][css-grid] Overflow alignment value 'true' renamed to 'unsafe'
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-12-15  Javier Fernandez  <jfernandez@igalia.com>
2
3         [css-align][css-grid] Overflow alignment value 'true' renamed to 'unsafe'
4         https://bugs.webkit.org/show_bug.cgi?id=152251
5
6         Reviewed by Darin Adler.
7
8         The 'True' Overflow Alignment keyword is now defined in the Box Alignment
9         specification as 'Unsafe'.
10
11         This patch applies the required changes in the CSS parsing logic, as well
12         Grid Layout specific codebase, so it complies with the last version of the
13         spec.
14
15         No new tests, no change in functionality.
16
17         * css/CSSParser.cpp:
18         (WebCore::isAlignmentOverflowKeyword):
19         (WebCore::CSSParser::parseItemPositionOverflowPosition):
20         * css/CSSPrimitiveValueMappings.h:
21         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
22         (WebCore::CSSPrimitiveValue::operator OverflowAlignment):
23         * css/CSSValueKeywords.in:
24         * rendering/RenderGrid.cpp:
25         (WebCore::computeOverflowAlignmentOffset):
26         * rendering/style/RenderStyleConstants.h:
27
28 2015-12-15  Zan Dobersek  <zdobersek@igalia.com>
29
30         [TexMap] Operate with a reference to the TextureMapper wherever possible
31         https://bugs.webkit.org/show_bug.cgi?id=152118
32
33         Reviewed by Martin Robinson.
34
35         In most cases where used, the pointer to the TextureMapper is non-null, so it
36         should really be a reference. The pointer is still used for the
37         TextureMapperLayer member variable which is null until the TextureMapper object
38         is created and set on the root layer.
39
40         * platform/graphics/GraphicsContext3DPrivate.cpp:
41         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
42         * platform/graphics/GraphicsContext3DPrivate.h:
43         * platform/graphics/cairo/ImageBufferCairo.cpp:
44         (WebCore::ImageBufferData::paintToTextureMapper):
45         * platform/graphics/cairo/ImageBufferDataCairo.h:
46         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
47         (WebCore::GraphicsContext3DPrivate::paintToTextureMapper):
48         * platform/graphics/efl/GraphicsContext3DPrivate.h:
49         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
50         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
51         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
52         * platform/graphics/surfaces/GraphicsSurface.cpp:
53         (WebCore::GraphicsSurface::paintToTextureMapper):
54         * platform/graphics/surfaces/GraphicsSurface.h:
55         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
56         (WebCore::GraphicsSurface::platformPaintToTextureMapper):
57         * platform/graphics/texmap/BitmapTexture.cpp:
58         (WebCore::BitmapTexture::updateContents):
59         * platform/graphics/texmap/BitmapTexture.h:
60         (WebCore::BitmapTexture::applyFilters):
61         * platform/graphics/texmap/BitmapTextureGL.cpp:
62         (WebCore::BitmapTextureGL::applyFilters):
63         * platform/graphics/texmap/BitmapTextureGL.h:
64         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
65         (WebCore::GraphicsLayerTextureMapper::updateBackingStoreIfNeeded):
66         * platform/graphics/texmap/TextureMapperBackingStore.h:
67         (WebCore::TextureMapperBackingStore::drawRepaintCounter):
68         * platform/graphics/texmap/TextureMapperFPSCounter.cpp:
69         (WebCore::TextureMapperFPSCounter::updateFPSAndDisplay):
70         * platform/graphics/texmap/TextureMapperFPSCounter.h:
71         * platform/graphics/texmap/TextureMapperLayer.cpp:
72         (WebCore::TextureMapperPaintOptions::TextureMapperPaintOptions):
73         (WebCore::TextureMapperLayer::paint):
74         (WebCore::TextureMapperLayer::paintSelf):
75         (WebCore::TextureMapperLayer::paintSelfAndChildren):
76         (WebCore::TextureMapperLayer::paintUsingOverlapRegions):
77         (WebCore::TextureMapperLayer::applyMask):
78         (WebCore::TextureMapperLayer::paintIntoSurface):
79         (WebCore::commitSurface):
80         (WebCore::TextureMapperLayer::paintWithIntermediateSurface):
81         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
82         (WebCore::TextureMapperPlatformLayer::drawBorder):
83         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp:
84         (WebCore::TextureMapperPlatformLayerBuffer::paintToTextureMapper):
85         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h:
86         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.cpp:
87         (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
88         * platform/graphics/texmap/TextureMapperSurfaceBackingStore.h:
89         * platform/graphics/texmap/TextureMapperTile.cpp:
90         (WebCore::TextureMapperTile::updateContents):
91         (WebCore::TextureMapperTile::paint):
92         * platform/graphics/texmap/TextureMapperTile.h:
93         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
94         (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
95         (WebCore::TextureMapperTiledBackingStore::paintToTextureMapper):
96         (WebCore::TextureMapperTiledBackingStore::drawBorder):
97         (WebCore::TextureMapperTiledBackingStore::drawRepaintCounter):
98         (WebCore::TextureMapperTiledBackingStore::updateContents):
99         * platform/graphics/texmap/TextureMapperTiledBackingStore.h:
100
101 2015-12-15  Youenn Fablet  <youenn.fablet@crf.canon.fr>
102
103         WebIDL generator should support the possibility for C++ classes to have a JS Builtin constructor
104         https://bugs.webkit.org/show_bug.cgi?id=152171
105
106         Reviewed by Darin Adler.
107
108         Reintroducing JSBuiltinConstructor keyword as a way to run automatically a JS builtin initialization function
109         to process the arguments passed to the DOM C++ constructor.
110
111         Specialized createJSObject for those classes.
112
113         Fixing typo in TestCustomConstructor.idl.
114
115         Covered by binding tests.
116
117         * bindings/scripts/CodeGeneratorJS.pm:
118         (GenerateConstructorDefinition):
119         (IsConstructable):
120         (IsJSBuiltinConstructor):
121         (AddJSBuiltinIncludesIfNeeded):
122         * bindings/scripts/test/GObject/WebKitDOMTestClassWithJSBuiltinConstructor.cpp: Added.
123         * bindings/scripts/test/GObject/WebKitDOMTestClassWithJSBuiltinConstructor.h: Added.
124         * bindings/scripts/test/GObject/WebKitDOMTestClassWithJSBuiltinConstructorPrivate.h: Added.
125         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: Added.
126         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.h: Added.
127         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructor.h: Added.
128         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructor.mm: Added.
129         * bindings/scripts/test/ObjC/DOMTestClassWithJSBuiltinConstructorInternal.h: Added.
130         * bindings/scripts/test/TestClassWithJSBuiltinConstructor.idl: Copied from Source/WebCore/bindings/scripts/test/TestCustomConstructor.idl.
131         * bindings/scripts/test/TestCustomConstructor.idl:
132
133 2015-12-14  Andreas Kling  <akling@apple.com>
134
135         ResourceUsageOverlay should show GC timers.
136         <https://webkit.org/b/152151>
137
138         Reviewed by Darin Adler.
139
140         Add countdowns until next Eden and Full GC to the overlay. It also shows if there
141         is no garbage collection scheduled. This will be helpful in understanding why GC
142         sometimes takes a very long time to happen.
143
144         * page/ResourceUsageOverlay.h:
145         * page/cocoa/ResourceUsageOverlayCocoa.mm:
146         (WebCore::formatByteNumber): Drive-by silly math fix. :|
147         (WebCore::gcTimerString):
148         (WebCore::ResourceUsageOverlay::platformDraw):
149         (WebCore::nextFireTimeForGCTimer):
150         (WebCore::runSamplerThread):
151
152 2015-12-14  Chris Fleizach  <cfleizach@apple.com>
153
154         AX: iOS: Text field variations do not have the correct traits
155         https://bugs.webkit.org/show_bug.cgi?id=152237
156
157         Reviewed by Mario Sanchez Prada.
158
159         Make search fields and text areas use the appropriate iOS traits to 
160         distinguish them.
161
162         Test: accessibility/ios-simulator/textentry-traits.html
163
164         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
165         (-[WebAccessibilityObjectWrapper _accessibilityTraitsFromAncestors]):
166         (-[WebAccessibilityObjectWrapper _accessibilityTextEntryTraits]):
167         (-[WebAccessibilityObjectWrapper accessibilityTraits]):
168
169 2015-12-14  Tim Horton  <timothy_horton@apple.com>
170
171         Remove some Mavericks guards in ServicesOverlayController
172         https://bugs.webkit.org/show_bug.cgi?id=152238
173
174         Reviewed by Darin Adler.
175
176         * page/mac/ServicesOverlayController.mm:
177         (WebCore::ServicesOverlayController::selectionRectsDidChange): Deleted.
178         (WebCore::ServicesOverlayController::selectedTelephoneNumberRangesChanged): Deleted.
179         The whole file is already PLATFORM(MAC) guarded, and the 10.9 guards
180         are no longer necessary.
181
182 2015-12-14  Daniel Bates  <dabates@apple.com>
183
184         [iOS] DOM click event may not be dispatched when page has :active style and <input type="search">
185         https://bugs.webkit.org/show_bug.cgi?id=144451
186         <rdar://problem/23099482>
187
188         Reviewed by Simon Fraser.
189
190         Fixes an issue where a DOM click event is not dispatched to an element in a subframe on a page
191         that has a <input type="search"> and defines a CSS :active pseudo-class for the HTML body element.
192
193         On iOS we only dispatch a DOM click event if the content of the page does not change as part of
194         dispatching a DOM mousemove event at the tapped element as a means of providing a good user
195         experience on web pages that reveal or hide content based on mouse hover. Currently we consider
196         the content of the page to have changed if the visibility of any element on the page changes.
197         In particular we consider the content of the page to have changed if the visibility of a user
198         agent shadow DOM element changes (e.g. the search field cancel button). Instead we should only
199         consider visibility changes to the actual web page content and ignore visibility changes to
200         user agent shadow DOM elements.
201
202         Tests: fast/events/can-click-element-on-page-with-active-pseudo-class-and-search-field.html
203                fast/forms/search/search-cancel-button-visible-when-input-becomes-disabled.html
204                fast/forms/search/search-cancel-button-visible-when-input-becomes-readonly.html
205                fast/forms/search/search-cancel-in-formerly-invisible-element.html
206                fast/forms/search/search-cancel-toggle-visibility-initially-hidden.html
207                fast/forms/search/search-cancel-toggle-visibility-initially-visible.html
208
209         * style/StyleResolveTree.cpp:
210         (WebCore::Style::CheckForVisibilityChangeOnRecalcStyle::~CheckForVisibilityChangeOnRecalcStyle):
211         Ignore visibility changes to user agent shadow DOM elements.
212
213 2015-12-14  Youenn Fablet  <youenn.fablet@crf.canon.fr>
214
215         [Streams API] Directly use @then as much as possible
216         https://bugs.webkit.org/show_bug.cgi?id=151631
217
218         Reviewed by Darin Adler.
219
220         Moved from @Promise.prototype.@then.@call(promise,...) to promise.@then.(...)
221         for promise objects that are not exposed to user scripts.
222
223         Updated promiseInvokeXX stream utility functions to ensure that returned promise always has a @then.
224         This allows improving the readability of code calling promiseInvokeXX functions.
225         Changed invokeOrNoop to promiseInvokeOrNoopNoCatch as invokeOrNoop
226         result is always wrapped as a promise using Promise.resolve.
227
228         No change in behavior.
229
230         * Modules/streams/ReadableStream.js:
231         (initializeReadableStream):
232         * Modules/streams/ReadableStreamInternals.js:
233         (teeReadableStream):
234         (teeReadableStreamBranch2CancelFunction):
235         (cancelReadableStream):
236         * Modules/streams/StreamInternals.js:
237         (shieldingPromiseResolve): introduced this routine to ensure the returned promise has a @then property.
238         (promiseInvokeOrNoopNoCatch):
239         (promiseInvokeOrNoop):
240         (promiseInvokeOrFallbackOrNoop):
241         * Modules/streams/WritableStream.js:
242         (initializeWritableStream):
243         (abort):
244         * Modules/streams/WritableStreamInternals.js:
245         (callOrScheduleWritableStreamAdvanceQueue):
246
247 2015-12-14  Xabier Rodriguez Calvar  <calvaris@igalia.com> and Youenn Fablet  <youenn.fablet@crf.canon.fr>
248
249         [Streams API] Expose ReadableStream and relatives to Worker
250         https://bugs.webkit.org/show_bug.cgi?id=152066
251
252         Reviewed by Darin Adler.
253
254         Moving the code that links internal functions to the GlobalObject in WebCoreJSBuiltinInternals.cpp.
255         This file should be generated by the builtin generator once refactoring is done.
256         This code is located in JSBuiltinFunctions::initialize.
257
258         Moving ReadableStream private constructors and constants code from JSDOMWindowBase to JSDOMGlobalObject.
259         Calling JSBuiltinInternalFunctions::initialize in JSDOMGlobalObject so that internals are also available in Worker.
260
261         Made ReadableStream and relatives exposed in Worker.
262
263         Patch by Youenn Fablet.
264         Rebased and fixed style by Xabier Rodriguez Calvar.
265
266         Covered by rebased tests.
267
268         * CMakeLists.txt:
269         * Modules/streams/ByteLengthQueuingStrategy.idl:
270         * Modules/streams/CountQueuingStrategy.idl:
271         * Modules/streams/ReadableStream.idl:
272         * Modules/streams/ReadableStreamController.idl:
273         * Modules/streams/ReadableStreamReader.idl:
274         * WebCore.xcodeproj/project.pbxproj:
275         * bindings/js/JSDOMGlobalObject.cpp:
276         (WebCore::JSDOMGlobalObject::JSDOMGlobalObject):
277         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
278         (WebCore::JSDOMGlobalObject::finishCreation):
279         (WebCore::JSDOMGlobalObject::visitChildren):
280         * bindings/js/JSDOMGlobalObject.h:
281         * bindings/js/JSDOMWindowBase.cpp:
282         (WebCore::JSDOMWindowBase::finishCreation): Deleted.
283         (WebCore::JSDOMWindowBase::visitChildren): Deleted.
284         * bindings/js/JSDOMWindowBase.h:
285         * bindings/js/WebCoreJSBuiltinInternals.cpp: Added.
286         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions):
287         (WebCore::JSBuiltinInternalFunctions::visit):
288         (WebCore::JSBuiltinInternalFunctions::initialize):
289         * bindings/js/WebCoreJSBuiltinInternals.h:
290         * bindings/js/WebCoreJSBuiltins.h:
291
292 2015-12-14  Frederic Wang  <fred.wang@free.fr>
293
294         Move MathMLOperatorDictionary features into a separate module.
295         https://bugs.webkit.org/show_bug.cgi?id=152242
296
297         Reviewed by Martin Robinson.
298
299         The definitions, properties and search of the MathML operator dictionary are really independent of the renderer object for math operators.
300         This patch moves them in a separate module/file to make them more manageable and readable.
301         No new tests. We already have sufficient test coverage.
302
303         * CMakeLists.txt:
304         * WebCore.vcxproj/WebCore.vcxproj:
305         * WebCore.vcxproj/WebCore.vcxproj.filters:
306         * WebCore.xcodeproj/project.pbxproj:
307         * rendering/mathml/MathMLOperatorDictionary.cpp:
308         (WebCore::ExtractKey):
309         (WebCore::ExtractChar):
310         (WebCore::ExtractKeyHorizontal):
311         (WebCore::MathMLOperatorDictionary::getEntry):
312         (WebCore::MathMLOperatorDictionary::isVertical):
313         * rendering/mathml/MathMLOperatorDictionary.h: Added.
314         * rendering/mathml/RenderMathMLOperator.cpp:
315         (WebCore::RenderMathMLOperator::setOperatorProperties):
316         (WebCore::MathMLOperatorDictionary::ExtractKey): Deleted.
317         (WebCore::MathMLOperatorDictionary::ExtractChar): Deleted.
318         (WebCore::MathMLOperatorDictionary::ExtractKeyHorizontal): Deleted.
319         * rendering/mathml/RenderMathMLOperator.h:
320
321 2015-12-14  Sergio Villar Senin  <svillar@igalia.com>
322
323         [css-grid] Fix height computation of grid items with borders
324         https://bugs.webkit.org/show_bug.cgi?id=151800
325
326         Reviewed by Darin Adler.
327
328         When computing the logical height of grid items for the
329         default "min-height: auto;" case we were constraning the
330         min-content size using constrainLogicalHeightByMinMax()
331         instead of constrainContentLogicalHeightByMinMax(). The
332         problem of using the former is that we were adding the borders
333         twice.
334
335         Test: fast/css-grid-layout/grid-item-with-border-in-intrinsic.html
336
337         * rendering/RenderBox.cpp:
338         (WebCore::RenderBox::computeLogicalHeight):
339
340 2015-12-13  Tim Horton  <timothy_horton@apple.com>
341
342         Adopt CGIOSurfaceContextCreateImageReference to avoid unnecessary readback
343         https://bugs.webkit.org/show_bug.cgi?id=150988
344         <rdar://problem/18993594>
345
346         Reviewed by Darin Adler.
347
348         * platform/graphics/GraphicsContext.cpp:
349         (WebCore::GraphicsContext::drawConsumingImageBuffer):
350         * platform/graphics/GraphicsContext.h:
351         * platform/graphics/ImageBuffer.h:
352         * platform/graphics/cg/ImageBufferCG.cpp:
353         (WebCore::createBitmapImageAfterScalingIfNeeded):
354         (WebCore::ImageBuffer::copyImage):
355         (WebCore::ImageBuffer::sinkIntoImage):
356         (WebCore::ImageBuffer::sinkIntoNativeImage):
357         (WebCore::ImageBuffer::drawConsuming):
358         * platform/graphics/cocoa/IOSurface.h:
359         * platform/graphics/cocoa/IOSurface.mm:
360         (IOSurface::createFromImageBuffer):
361         (IOSurface::sinkIntoImage):
362         Add sinkIntoImage, sinkIntoNativeImage, and drawConsuming to ImageBuffer,
363         which all consume the ImageBuffer and allow us to tell the system to
364         make a CGImage that references the IOSurface, which is in many cases
365         more efficient than making an image with a "copy" of the IOSurface.
366         (The copy is done lazily, but we often hit a corner case that causes
367         it to happen unnecessarily.)
368
369         * html/shadow/MediaControlElements.cpp:
370         (WebCore::MediaControlTextTrackContainerElement::createTextTrackRepresentationImage):
371         * page/TextIndicator.cpp:
372         (WebCore::takeSnapshot):
373         * platform/DragImage.cpp:
374         (WebCore::createDragImageFromSnapshot):
375         * platform/graphics/filters/FETile.cpp:
376         (WebCore::FETile::platformApplySoftware):
377         * platform/mac/ThemeMac.mm:
378         (WebCore::ThemeMac::drawCellOrFocusRingWithViewIntoContext):
379         * platform/mediastream/mac/AVVideoCaptureSource.mm:
380         (WebCore::AVVideoCaptureSource::currentFrameImage):
381         * rendering/RenderBoxModelObject.cpp:
382         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
383         * rendering/RenderThemeMac.mm:
384         (WebCore::RenderThemeMac::paintProgressBar):
385         * rendering/svg/RenderSVGResourcePattern.cpp:
386         (WebCore::RenderSVGResourcePattern::buildPattern):
387         * svg/graphics/SVGImage.cpp:
388         (WebCore::SVGImage::drawPatternForContainer):
389         Adopt sinkIntoImage and drawConsumingImageBuffer in a few places.
390
391 2015-12-13  Andreas Kling  <akling@apple.com>
392
393         CachedScript could have a copy-free path for all-ASCII scripts.
394         <https://webkit.org/b/152203>
395
396         Reviewed by ANtti Koivisto.
397
398         Many (if not most) of script resources on the web contain nothing but ASCII characters.
399         Such resources, when streamed through a text decoder, will yield the exact same byte
400         sequence, except in anonymous heap memory instead of delicious file-backed pages.
401
402         Care is taken to ensure that the wrapper StringImpl is updated to target newly cached
403         resource data if an asynchronous caching notification comes in.
404
405         * loader/cache/CachedResource.cpp:
406         (WebCore::CachedResource::tryReplaceEncodedData):
407         * loader/cache/CachedResource.h:
408         (WebCore::CachedResource::didReplaceSharedBufferContents):
409         * loader/cache/CachedScript.cpp:
410         (WebCore::encodingMayBeAllASCII):
411         (WebCore::CachedScript::script):
412         (WebCore::CachedScript::didReplaceSharedBufferContents):
413         * loader/cache/CachedScript.h:
414         * platform/SharedBuffer.h:
415         * platform/cf/SharedBufferCF.cpp:
416         (WebCore::SharedBuffer::tryReplaceContentsWithPlatformBuffer):
417
418 2015-12-13  Zalan Bujtas  <zalan@apple.com>
419
420         Clean up absolute positioned map properly.
421         https://bugs.webkit.org/show_bug.cgi?id=152219
422         rdar://problem/23861165
423
424         Reviewed by Simon Fraser.
425
426         We insert positioned renderers into a static map (RenderBlock::gPositionedDescendantsMap) to keep track of them.
427         Since this static map is at block level, (positioned)inline renderers use their containing block to store
428         their positioned descendants.
429         This patch ensures that when an inline element can no longer hold positioned children, we remove them from
430         the inline's containing block's map. -unless the container itself can hold positioned renderers(see RenderElement::canContainAbsolutelyPositionedObjects).
431
432         Test: fast/block/positioning/crash-when-positioned-inline-has-positioned-child.html
433
434         * rendering/RenderInline.cpp:
435         (WebCore::RenderInline::styleWillChange):
436         * rendering/RenderInline.h:
437
438 2015-12-13  Joanmarie Diggs  <jdiggs@igalia.com>
439
440         AX: [EFL] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
441         https://bugs.webkit.org/show_bug.cgi?id=152079
442
443         Reviewed by Chris Fleizach.
444
445         Map the element to WebCore AccessibilityRole DivRole for EFL. As with GTK, this
446         is being done in the shared layer rather than in the platform layer because we
447         want all subsequent logic to treat anonymous render block flow elements as divs.
448
449         No new tests. We already have sufficient test coverage. The expectations
450         been updated accordingly.
451
452         * accessibility/AccessibilityRenderObject.cpp:
453         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
454
455 2015-12-12  Brady Eidson  <beidson@apple.com>
456
457         Modern IDB: storage/indexeddb/index-duplicate-keypaths.html fails.
458         https://bugs.webkit.org/show_bug.cgi?id=152201
459
460         Reviewed by Alex Christensen.
461
462         No new tests (At least one failing test now passes).
463         
464         The spec states that if an object store uses a key generator, and then a record is stored whose
465         key was an explicitly set number, then the key generator value should be bumped to the next
466         integer higher than the explicit number.
467         
468         We didn't do that.
469         
470         Now we do.
471
472         * Modules/indexeddb/IndexedDB.h: Add an "OverwriteForCursor" option for overwrite mode.
473         
474         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
475         (WebCore::IDBClient::IDBObjectStore::putForCursorUpdate): Use the "OverwriteForCursor" mode.
476                 
477         * Modules/indexeddb/server/IDBBackingStore.h: Add maybeUpdateKeyGeneratorNumber
478
479         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
480         (WebCore::IDBServer::MemoryIDBBackingStore::maybeUpdateKeyGeneratorNumber): If the number value
481           from the provided key should bump the key generator value, do so now.
482         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
483
484         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
485         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd): After successfully adding the new record,
486           possibly bump the key generator value.
487
488 2015-12-12  Katlyn Graff  <kgraff@apple.com>
489
490         Safari background tabs should be fully suspended where possible.
491         https://bugs.webkit.org/show_bug.cgi?id=150515
492
493         Reviewed by Ryosuke Niwa.
494
495         Support for tab suspension for Mac, enabled by defaults writing to WebKitTabSuspension.
496         Page-down suspension consolidated with PageCache suspension code in Document::
497         suspend and Document::resume. Pages canTabSuspend if cacheable, nonvisible, nonprerender,
498         and nonactive.
499
500         * dom/Document.cpp: moved scrollbar handling from setInPageCache to suspend/resume
501         (WebCore::Document::suspend): moved scrollbar, dom, animation, timer, and visual update suspending into here
502         (WebCore::Document::resume): moved scrollbar, dom, animation, timer, and visual update resuming into here
503         * dom/Document.h: added m_isSuspended to prevent repeat calls from PageCache/Tab Suspension contention
504         * history/CachedFrame.cpp: moved dom, animation, and timer suspension into Document::suspend
505         (WebCore::CachedFrame::CachedFrame):
506        * history/PageCache.cpp: Added a few nullchecks to prevent crashes if canCacheFrame is called but document is null
507         (WebCore::PageCache::canCacheFrame):
508         * page/Page.cpp:
509         (WebCore::Page::Page): Added timer to fire delayed suspension
510         (WebCore::Page::setPageActivityState): Added a call to schedule tab suspension
511         (WebCore::Page::setIsVisibleInternal): Added a call to schedule tab suspension
512         (WebCore::Page::canTabSuspend): Added support for suspending if cacheable, nonvisible, nonprerender, and nonactive
513         (WebCore::Page::setIsTabSuspended): Added a function to suspend or resume tabs
514         (WebCore::Page::setTabSuspensionEnabled): Added support for a defaults write enable
515         (WebCore::Page::scheduleTabSuspension): Added ability to schedule the suspension timer to fire or resume
516         (WebCore::Page::timerFired): Added a suspension timer
517         * page/Page.h:
518         * page/PageThrottler.h:
519         (WebCore::PageThrottler::activityState): Added access to m_activityState for canTabSuspend
520
521 2015-12-11  Simon Fraser  <simon.fraser@apple.com>
522
523         Mousewheel events don't work in iframes in RTL documents
524         https://bugs.webkit.org/show_bug.cgi?id=152200
525
526         Reviewed by Beth Dakin.
527         
528         When dispatching wheel events, the testing of the event point against the
529         non-fast scrollable region was broken in an RTL document. Fix by taking
530         the scrollOrigin into account in ScrollingTreeFrameScrollingNode::viewToContentsOffset().
531
532         Test: fast/scrolling/rtl-point-in-iframe.html
533
534         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
535         (WebCore::ScrollingTreeFrameScrollingNode::viewToContentsOffset):
536
537 2015-12-11  Zalan Bujtas  <zalan@apple.com>
538
539         ASSERTION FAILED: !rect.isEmpty() in WebCore::GraphicsContext::drawRect
540         https://bugs.webkit.org/show_bug.cgi?id=151201
541
542         Reviewed by Simon Fraser.
543
544         Drawing empty rect is a waste.
545
546         Test: fast/borders/empty-drawrect-assert-after-pixelsnap.html
547
548         * rendering/RenderElement.cpp:
549         (WebCore::RenderElement::drawLineForBoxSide):
550
551 2015-12-11  Jiewen Tan  <jiewen_tan@apple.com>
552
553         Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
554         https://bugs.webkit.org/show_bug.cgi?id=152102
555         <rdar://problem/22124230>
556
557         Reviewed by Andy Estes.
558
559         Keep the ReferrerPolicy for a document as ReferrerPolicyNever if the document is loaded with
560         "Content-Disposition: attachment".
561
562         Test: http/tests/contentdispositionattachmentsandbox/subresource-request-not-include-referer-header.html
563
564         * dom/Document.cpp:
565         (WebCore::Document::processReferrerPolicy):
566         (WebCore::Document::applyContentDispositionAttachmentSandbox):
567
568 2015-12-11  Eric Carlson  <eric.carlson@apple.com>
569
570         [MediaStream] Add a setting to allow the mock media capture devices to be enabled and disabled
571         https://bugs.webkit.org/show_bug.cgi?id=152197
572
573         Reviewed by Dean Jackson.
574
575         Test: fast/mediastream/mock-media-source.html
576
577         * page/Settings.cpp:
578         (WebCore::Settings::mockCaptureDevicesEnabled):
579         (WebCore::Settings::setMockCaptureDevicesEnabled):
580         * page/Settings.h:
581
582         * platform/mediastream/RealtimeMediaSourceCenter.cpp:
583         (WebCore::RealtimeMediaSourceCenter::setSharedStreamCenterOverride): Renamed.
584         (WebCore::RealtimeMediaSourceCenter::setSharedStreamCenter): Deleted.
585         * platform/mediastream/RealtimeMediaSourceCenter.h:
586
587         * platform/mock/MockRealtimeMediaSourceCenter.cpp:
588         (WebCore::MockRealtimeMediaSourceCenter::setMockRealtimeMediaSourceCenterEnabled): Renamed. Allow
589           it to be enabled and disabled.
590         (WebCore::MockRealtimeMediaSourceCenter::registerMockRealtimeMediaSourceCenter): Deleted.
591         * platform/mock/MockRealtimeMediaSourceCenter.h:
592
593         * testing/Internals.cpp:
594         (WebCore::Internals::Internals):
595         (WebCore::Internals::setMockMediaCaptureDevicesEnabled):
596         * testing/Internals.h:
597         * testing/Internals.idl:
598
599 2015-12-11  Jer Noble  <jer.noble@apple.com>
600
601         [EME] Do not pass in the initialization data to AVContentKeyRequest as the contentIdentifier.
602         https://bugs.webkit.org/show_bug.cgi?id=152204
603         rdar://problem/23867877
604
605         Reviewed by Eric Carlson.
606
607         The AVContentKeyRequest API has been updated to no longer require a contentId parameter if the
608         ID can be derived from the initialization data.
609
610         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
611         (WebCore::CDMSessionAVContentKeySession::update):
612
613 2015-12-11  Alexey Proskuryakov  <ap@apple.com>
614
615         Roll out http://trac.webkit.org/r193984, because the new test is timing out.
616
617         Was: Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
618         https://bugs.webkit.org/show_bug.cgi?id=152102
619         <rdar://problem/22124230>
620
621         * dom/Document.cpp:
622         (WebCore::Document::processReferrerPolicy):
623         (WebCore::Document::applyContentDispositionAttachmentSandbox):
624
625 2015-12-11  Brady Eidson  <beidson@apple.com>
626
627         Modern IDB: storage/indexeddb/optional-arguments.html fails.
628         https://bugs.webkit.org/show_bug.cgi?id=152194
629
630         Reviewed by Alex Christensen.
631
632         No new tests (At least one failing test now passes).
633
634         * Modules/indexeddb/client/IDBCursorImpl.cpp:
635         (WebCore::IDBClient::IDBCursor::continueFunction): Allow 'undefined' for the key.
636         
637         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
638         (WebCore::IDBClient::IDBObjectStore::add): Ditto.
639         (WebCore::IDBClient::IDBObjectStore::put): Ditto.
640
641 2015-12-11  Brady Eidson  <beidson@apple.com>
642
643         Followup to:
644         Modern IDB: storage/indexeddb/index-count.html fails.
645         https://bugs.webkit.org/show_bug.cgi?id=152175
646
647         Noticed by Darin Adler.
648
649         * Modules/indexeddb/client/IDBIndexImpl.cpp:
650         (WebCore::IDBClient::IDBIndex::count): Replace a curly brace to its proper place.
651
652 2015-12-11  Brady Eidson  <beidson@apple.com>
653
654         Modern IDB: storage/indexeddb/cursor-continue.html fails.
655         https://bugs.webkit.org/show_bug.cgi?id=152192
656
657         Reviewed by Alex Christensen.
658
659         No new tests (At least one failing test now passes).
660
661         * Modules/indexeddb/client/IDBCursorImpl.cpp:
662         (WebCore::IDBClient::IDBCursor::continueFunction): Check against the current key, not the current primary key.
663         (WebCore::IDBClient::IDBCursor::setGetResult): Also save off the current IDBKeyData.
664         * Modules/indexeddb/client/IDBCursorImpl.h:
665
666 2015-12-11  Brady Eidson  <beidson@apple.com>
667
668         Modern IDB: storage/indexeddb/index-basics.html fails.
669         https://bugs.webkit.org/show_bug.cgi?id=152190
670
671         Reviewed by Alex Christensen.
672
673         No new tests (At least one failing test now passes).
674
675         * bindings/js/JSIDBObjectStoreCustom.cpp:
676         (WebCore::JSIDBObjectStore::createIndex): Custom error message for the TypeError
677
678 2015-12-11  Jiewen Tan  <jiewen_tan@apple.com>
679
680         Strip out Referer header when requesting subresources or following links for documents with "Content-Disposition: attachment"
681         https://bugs.webkit.org/show_bug.cgi?id=152102
682         <rdar://problem/22124230>
683
684         Reviewed by Andy Estes.
685
686         Keep the ReferrerPolicy for a document as ReferrerPolicyNever if the document is loaded with
687         "Content-Disposition: attachment".
688
689         Test: http/tests/contentdispositionattachmentsandbox/subresource-request-not-include-referer-header.html
690
691         * dom/Document.cpp:
692         (WebCore::Document::processReferrerPolicy):
693         (WebCore::Document::applyContentDispositionAttachmentSandbox):
694
695 2015-12-11  Brady Eidson  <beidson@apple.com>
696
697         Modern IDB: storage/indexeddb/key-type-array.html fails.
698         https://bugs.webkit.org/show_bug.cgi?id=152187
699
700         Reviewed by Alex Christensen.
701
702         No new tests (At least one failing test now passes).
703
704         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
705         (WebCore::IDBClient::IDBObjectStore::putOrAdd): Perform the correct validity check on array keys.
706
707 2015-12-11  Joseph Pecoraro  <pecoraro@apple.com>
708
709         check-for-inappropriate-objc-class-names should check all class names, not just externally visible ones
710         https://bugs.webkit.org/show_bug.cgi?id=152156
711
712         Reviewed by Dan Bernstein.
713
714         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h:
715         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
716         (WebCore::CDMSessionAVContentKeySession::CDMSessionAVContentKeySession):
717         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h:
718         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
719         (WebCore::CDMSessionAVStreamSession::CDMSessionAVStreamSession):
720         Rename classes with a "Web" prefix.
721
722 2015-12-11  Brady Eidson  <beidson@apple.com>
723
724         Modern IDB: storage/indexeddb/intversion-abort-in-initial-upgradeneeded.html fails.
725         https://bugs.webkit.org/show_bug.cgi?id=152177
726
727         Reviewed by Alex Christensen.
728
729         No new tests (At least one failing test now passes).
730
731         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
732         (WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionDidFinish): Renamed from below.
733         (WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionWillFinish): Deleted.
734         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
735         
736         * Modules/indexeddb/client/IDBRequestImpl.cpp:
737         (WebCore::IDBClient::IDBRequest::setVersionChangeTransaction): OpenDBRequests usually don't have transactions, 
738           unless they end up being upgrade requests.
739         * Modules/indexeddb/client/IDBRequestImpl.h:
740         
741         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
742         (WebCore::IDBClient::IDBTransaction::IDBTransaction): Call setVersionChangeTransaction on the request if appropriate.
743         (WebCore::IDBClient::IDBTransaction::dispatchEvent): Call versionChangeTransactionDidFinish after the 
744           abort/complete events fire.
745         (WebCore::IDBClient::IDBTransaction::abort): Deleted.
746         (WebCore::IDBClient::IDBTransaction::commit): Deleted.
747
748 2015-12-11  Brady Eidson  <beidson@apple.com>
749
750         Modern IDB: storage/indexeddb/index-count.html fails.
751         https://bugs.webkit.org/show_bug.cgi?id=152175
752
753         Reviewed by Alex Christensen.
754
755         No new tests (At least one failing test now passes).
756
757         * Modules/indexeddb/client/IDBIndexImpl.cpp:
758         (WebCore::IDBClient::IDBIndex::count): If the passed in IDBKeyRange* is nullptr, use IDBKeyRangeData::allKeys.
759         (WebCore::IDBClient::IDBIndex::doCount): Change an isNull check to a more correct !isValid() check.
760
761 2015-12-11  Per Arne Vollan  <peavo@outlook.com>
762
763         [WinCairo][MediaFoundation] Setting playback rate does not work.
764         https://bugs.webkit.org/show_bug.cgi?id=152172
765
766         Reviewed by Brent Fulgham.
767
768         Implement method to set playback rate.
769
770         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
771         (WebCore::MediaPlayerPrivateMediaFoundation::seekDouble):
772         (WebCore::MediaPlayerPrivateMediaFoundation::setRateDouble):
773         (WebCore::MediaPlayerPrivateMediaFoundation::durationDouble):
774         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
775
776 2015-12-11  Darin Adler  <darin@apple.com>
777
778         Reduce the number of events that can be created by Document.createEvent
779         https://bugs.webkit.org/show_bug.cgi?id=151931
780
781         Reviewed by Alex Christensen.
782
783         Document.createEvent is intended for use only with a certain set of legacy events.
784         Ideally it should only be the ones mentioned in the DOM specification.
785
786         For now, at least remove all the events that can't usefully be created and initialized
787         this way. Later, we should cut it down even smaller. And stop automatically generating
788         this, which was causing everyone who made an event IDL file to get supported here!
789
790         The modern alternative is to use event class constructors instead.
791
792         * CMakeLists.txt: Don't compile EventFactory.cpp. For now, we still generate
793         EventFactory.cpp but we do not use it.
794         * DerivedSources.make: Ditto.
795         * WebCore.vcxproj/WebCore.vcxproj: Ditto.
796         * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
797         * WebCore.xcodeproj/project.pbxproj: Ditto. Also don't include EventFactory.h in the
798         project file.
799
800         * dom/DOMImplementation.cpp:
801         (WebCore::DOMImplementation::hasFeature): Added a comment about the SVGZoomEvents feature.
802
803         * dom/Document.cpp: Re-sorted includes and added the new ones needed for createEvent.
804         (WebCore::Document::createEvent): Moved all the logic here from EventFactory, and
805         took a crack at comments that explain what this should and should not be used for.
806
807         * dom/EventFactory.h: Removed.
808
809 2015-12-10  Brady Eidson  <beidson@apple.com>
810
811         Modern IDB: storage/indexeddb/objectstore-count.html fails.
812         https://bugs.webkit.org/show_bug.cgi?id=152167
813
814         Reviewed by Alex Christensen.
815
816         No new tests (At least one failing test now passes).
817
818         * Modules/indexeddb/IDBKeyRangeData.h:
819         (WebCore::IDBKeyRangeData::allKeys):
820         
821         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
822         (WebCore::IDBClient::IDBObjectStore::count): If the passed in IDBKeyRange* is nullptr, use IDBKeyRangeData::allKeys.
823         (WebCore::IDBClient::IDBObjectStore::doCount): Change an isNull check to a more correct !isValid() check.
824
825 2015-12-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
826
827         Binding and builtin generators should lowercase RTCXX as rtcXX and not rTCXX
828         https://bugs.webkit.org/show_bug.cgi?id=152121
829
830         Reviewed by Darin Adler.
831
832         No change in behavior.
833
834         * bindings/js/JSDOMWindowBase.cpp:
835         (WebCore::JSDOMWindowBase::finishCreation): Using rtcXX in lieu of rTCXX.
836         * bindings/js/WebCoreJSBuiltinInternals.h:
837         (WebCore::JSBuiltinInternalFunctions::JSBuiltinInternalFunctions): Ditto.
838         (WebCore::JSBuiltinInternalFunctions::rtcPeerConnectionInternals): Added.
839         (WebCore::JSBuiltinInternalFunctions::visit): Ditto.
840         (WebCore::JSBuiltinInternalFunctions::init): Ditto.
841         (WebCore::JSBuiltinInternalFunctions::rTCPeerConnectionInternals): Deleted.
842         * bindings/js/WebCoreJSBuiltins.h:
843         (WebCore::JSBuiltinFunctions::JSBuiltinFunctions): Using rtcXX in lieu of rTCXX.
844         (WebCore::JSBuiltinFunctions::rtcPeerConnectionBuiltins): Added.
845         (WebCore::JSBuiltinFunctions::rtcPeerConnectionInternalsBuiltins): Added.
846         (WebCore::JSBuiltinFunctions::rTCPeerConnectionBuiltins): Deleted.
847         (WebCore::JSBuiltinFunctions::rTCPeerConnectionInternalsBuiltins): Deleted.
848         * bindings/scripts/CodeGenerator.pm:
849         (WK_lcfirst): Added RTC special rule.
850
851 2015-12-10  Zalan Bujtas  <zalan@apple.com>
852
853         ASSERTION FAILED: !simpleLineLayout() in WebCore::RenderText::collectSelectionRectsForLineBoxes
854         https://bugs.webkit.org/show_bug.cgi?id=152115
855
856         Reviewed by Simon Fraser.
857
858         document.execCommand("indent") generates a blockquote wrapper and moves the indented content inside.
859         If the indented content is already inside a selection, we need to make sure that newly created flow uses
860         normal line layout.
861         This patch fixes the generic case as re-parenting an already selected renderer is not specific to document.execCommand("indent").
862
863         Test: fast/block/selection-inside-simple-line-layout.html
864
865         * rendering/SimpleLineLayout.cpp:
866         (WebCore::SimpleLineLayout::canUseForWithReason):
867         (WebCore::SimpleLineLayout::printReason):
868
869 2015-12-10  Eric Carlson  <eric.carlson@apple.com>
870
871         [MediaStream] Expose media capture devices persistent permissions to WebCore
872         https://bugs.webkit.org/show_bug.cgi?id=152087
873
874         Reviewed by Chris Dumez.
875
876         No new tests, an existing test was updated to test the change.
877
878         * CMakeLists.txt: Add UserMediaPermissionCheck.cpp.
879
880         * Modules/mediastream/MediaDevicesRequest.cpp:
881         (WebCore::MediaDevicesRequest::~MediaDevicesRequest): Clear the permission checker client.
882         (WebCore::MediaDevicesRequest::contextDestroyed): Ditto.
883         (WebCore::MediaDevicesRequest::start): Create a permission checker and start it running.
884         (WebCore::MediaDevicesRequest::didCompleteCheck): Start the media source checker.
885         (WebCore::MediaDevicesRequest::didCompleteRequest): Only include a track's label if the
886           page has permission to use a capture device.
887         * Modules/mediastream/MediaDevicesRequest.h:
888
889         * Modules/mediastream/UserMediaClient.h: Include prototypes for permission checker.
890         (WebCore::UserMediaClient::~UserMediaClient):
891         
892         * Modules/mediastream/MediaStreamTrackSourcesRequest.cpp: Removed, not longer used.
893         * Modules/mediastream/MediaStreamTrackSourcesRequest.h:
894
895         * Modules/mediastream/UserMediaController.h:
896         (WebCore::UserMediaController::checkUserMediaPermission): New.
897         (WebCore::UserMediaController::cancelUserMediaPermissionCheck): Ditto.
898
899         * Modules/mediastream/UserMediaPermissionCheck.cpp: Added.
900         (WebCore::UserMediaPermissionCheck::create):
901         (WebCore::UserMediaPermissionCheck::UserMediaPermissionCheck):
902         (WebCore::UserMediaPermissionCheck::~UserMediaPermissionCheck):
903         (WebCore::UserMediaPermissionCheck::securityOrigin):
904         (WebCore::UserMediaPermissionCheck::contextDestroyed):
905         (WebCore::UserMediaPermissionCheck::start):
906         (WebCore::UserMediaPermissionCheck::setDeviceAccessMode):
907         * Modules/mediastream/UserMediaPermissionCheck.h: Added.
908         (WebCore::UserMediaPermissionCheckClient::~UserMediaPermissionCheckClient):
909         (WebCore::UserMediaPermissionCheck::setClient):
910
911         * WebCore.xcodeproj/project.pbxproj: Add UserMediaPermissionCheck.cpp|.h
912
913         * platform/mock/UserMediaClientMock.h: Removed, it is no longer used.
914
915         * testing/Internals.cpp: Remove UserMediaClientMock.h include, it is gone.
916
917 2015-12-10  Myles C. Maxfield  <mmaxfield@apple.com>
918
919         Build fix
920
921         Unreviewed.
922
923         * platform/graphics/cocoa/FontCocoa.mm:
924         (WebCore::smallCapsTrueTypeDictionary):
925
926 2015-12-10  Simon Fraser  <simon.fraser@apple.com>
927
928         Mordernize viewport dumping
929         https://bugs.webkit.org/show_bug.cgi?id=152159
930
931         Reviewed by Zalan Bujtas.
932
933         Use groupings to simplify the viewport configuration dumping code.
934
935         * page/ViewportConfiguration.cpp:
936         (WebCore::operator<<):
937         (WebCore::ViewportConfiguration::description):
938
939 2015-12-10  Joseph Pecoraro  <pecoraro@apple.com>
940
941         Remote Inspector: Verify the identity of the other side of XPC connections
942         https://bugs.webkit.org/show_bug.cgi?id=152153
943
944         Reviewed by Brian Burg.
945
946         * WebCore.xcodeproj/project.pbxproj:
947         * platform/network/mac/CertificateInfoMac.mm:
948         Use the new header.
949
950 2015-12-10  Brady Eidson  <beidson@apple.com>
951
952         Modern IDB: storage/indexeddb/delete-in-upgradeneeded-close-in-versionchange.html fails
953         https://bugs.webkit.org/show_bug.cgi?id=152144
954
955         Reviewed by Alex Christensen.
956
957         No new tests (At least two failing tests now pass, and other incorrect tests updated to be more correct).
958
959         - An IDBOpenDBRequest resulting in a versionchange transaction should not have the onsuccess event fire if 
960           the database connection was closed during the versionchange transaction. onerror should fire instead.
961         - When firing an event at an IDBRequest, it should not have the transaction as an additional target if the
962           transaction has finished.
963         - When firing an event at an IDBRequest, it should not have the database as an additional target if the
964           database is closed or is closing.
965
966         * Modules/indexeddb/client/IDBDatabaseImpl.h:
967         (WebCore::IDBClient::IDBDatabase::isClosingOrClosed):
968         
969         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
970         (WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeCompletion):
971         (WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeAbort): Deleted.
972         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
973         
974         * Modules/indexeddb/client/IDBRequestImpl.cpp:
975         (WebCore::IDBClient::IDBRequest::dispatchEvent): Don't add finished transactions or closed databases as event targets.
976         
977         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
978         (WebCore::IDBClient::IDBTransaction::notifyDidAbort):
979         (WebCore::IDBClient::IDBTransaction::dispatchEvent): If this was a versionchange transaction completing, possibly fire
980           the error event on the OpenDBRequest instead of the success event.
981         * Modules/indexeddb/client/IDBTransactionImpl.h:
982         (WebCore::IDBClient::IDBTransaction::isFinished):
983
984 2015-12-10  Zalan Bujtas  <zalan@apple.com>
985
986         Simple line layout: Use TextPainter to draw simple line text.
987         https://bugs.webkit.org/show_bug.cgi?id=152150
988
989         Reviewed by Simon Fraser.
990
991         No change in functionality.
992
993         * rendering/SimpleLineLayoutFunctions.cpp:
994         (WebCore::SimpleLineLayout::paintFlow):
995         * rendering/TextPainter.h:
996
997 2015-12-10  Myles C. Maxfield  <mmaxfield@apple.com>
998
999         [Font Features] r193894 introduces leaks
1000         https://bugs.webkit.org/show_bug.cgi?id=152154
1001
1002         Reviewed by Joe Pecoraro.
1003
1004         * platform/graphics/cocoa/FontCocoa.mm:
1005         (WebCore::smallCapsTrueTypeDictionary):
1006         (WebCore::createCTFontWithoutSynthesizableFeatures):
1007
1008 2015-12-10  Myles C. Maxfield  <mmaxfield@apple.com>
1009
1010         Build fix
1011
1012         Unreviewed.
1013
1014         * platform/graphics/cocoa/FontCocoa.mm:
1015         (WebCore::Font::variantCapsSupportsCharacterForSynthesis):
1016
1017 2015-12-10  Zalan Bujtas  <zalan@apple.com>
1018
1019         TextPainter: Add support for painting multiple text runs.
1020         https://bugs.webkit.org/show_bug.cgi?id=152148
1021
1022         Reviewed by Simon Fraser.
1023
1024         This is in preparation for adding simple line layout as a client.
1025
1026         No change in functionality.
1027
1028         * rendering/InlineTextBox.cpp:
1029         (WebCore::drawSkipInkUnderline): Decouple underline skipping intersection calculation and text painter.
1030         (WebCore::InlineTextBox::paint):
1031         (WebCore::InlineTextBox::paintDecoration):
1032         * rendering/InlineTextBox.h:
1033         * rendering/TextPainter.cpp:
1034         (WebCore::TextPainter::TextPainter):
1035         (WebCore::TextPainter::paintTextWithShadows):
1036         (WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
1037         (WebCore::TextPainter::paintText):
1038         (WebCore::TextPainter::dashesForIntersectionsWithRect): Deleted.
1039         * rendering/TextPainter.h:
1040         (WebCore::TextPainter::setTextPaintStyle):
1041         (WebCore::TextPainter::setSelectionPaintStyle):
1042         (WebCore::TextPainter::setIsHorizontal):
1043         (WebCore::TextPainter::setFont):
1044         (WebCore::TextPainter::addEmphasis):
1045         (WebCore::TextPainter::addTextShadow):
1046
1047 2015-12-10  Enrica Casucci  <enrica@apple.com>
1048
1049         Change skin tone support for two emoji.
1050         https://bugs.webkit.org/show_bug.cgi?id=152147
1051         rdar://problem/23716993
1052         rdar://problem/23716344
1053
1054         Reviewed by Darin Adler.
1055
1056         Horse race emoji (1F3C7) should no longer have skin tone variation.
1057         Sleuth/Spy emoji (!F575) should instead have skin tone variation.
1058
1059         * platform/text/TextBreakIterator.cpp:
1060         (WebCore::cursorMovementIterator):
1061
1062 2015-12-10  Commit Queue  <commit-queue@webkit.org>
1063
1064         Unreviewed, rolling out r193500.
1065         https://bugs.webkit.org/show_bug.cgi?id=152143
1066
1067         do not want to have to disable canvas-to-large-to-draw test
1068         (Requested by bfulgham on #webkit).
1069
1070         Reverted changeset:
1071
1072         "Place an upper bound on canvas pixel count"
1073         https://bugs.webkit.org/show_bug.cgi?id=151825
1074         http://trac.webkit.org/changeset/193500
1075
1076 2015-12-10  Brady Eidson  <beidson@apple.com>
1077
1078         Followup for:
1079         Modern IDB: storage/indexeddb/intversion-close-between-events.html fails.
1080         https://bugs.webkit.org/show_bug.cgi?id=152096
1081
1082         Implementing Darin Adler's review feedback that came after the patch landed.
1083
1084         * bindings/js/JSIDBDatabaseCustom.cpp:
1085         (WebCore::JSIDBDatabase::transaction): No need to explicitly cast to Vector<String>.
1086
1087 2015-12-10  Youenn Fablet  <youenn.fablet@crf.canon.fr>
1088
1089         JSC Builtins should use safe array methods
1090         https://bugs.webkit.org/show_bug.cgi?id=151501
1091
1092         Reviewed by Darin Adler.
1093
1094         Using @push and @shift in internal arrays in lieu of push and shift.
1095         This cannot be disrupted by user scripts except if arrays are also made accessible to user scripts.
1096
1097         Covered by added tests for ReadableStream constructs.
1098
1099         * Modules/mediastream/RTCPeerConnectionInternals.js:
1100         (runNext):
1101         (enqueueOperation):
1102         * Modules/streams/ReadableStreamInternals.js:
1103         (enqueueInReadableStream):
1104         (readFromReadableStreamReader):
1105         * Modules/streams/StreamInternals.js:
1106         (dequeueValue):
1107         (enqueueValueWithSize):
1108
1109 2015-12-10  Zan Dobersek  <zdobersek@igalia.com>
1110
1111         [TexMap] pixel coverage multiplication in TiledBackingStore can overflow
1112         https://bugs.webkit.org/show_bug.cgi?id=152055
1113
1114         Reviewed by Carlos Garcia Campos.
1115
1116         The computation of the pixel coverage in TiledBackingStore can easily overflow
1117         when the candidate size is relatively large (for instance when the backed
1118         layer is transformed in a way that increases its perceived size). This can result
1119         in missing tiles for this specific backing store, at least until the layer in
1120         question is transformed again into a shape that produces a smaller candidate size.
1121
1122         To avoid the integer overflow, the multiplication is done in a safe manner,
1123         defaulting to the max positive value an integer can hold in case the overflow
1124         is detected.
1125
1126         * platform/graphics/texmap/coordinated/TiledBackingStore.cpp:
1127         (WebCore::TiledBackingStore::adjustForContentsRect):
1128
1129 2015-12-10  Zan Dobersek  <zdobersek@igalia.com>
1130
1131         [TexMap] Clean up BitmapTexturePool
1132         https://bugs.webkit.org/show_bug.cgi?id=152073
1133
1134         Reviewed by Daniel Bates.
1135
1136         Move BitmapTexturePoolEntry class under the BitmapTexturePool class, renaming
1137         it to simply Entry and keeping it private. Have the constructor take in an
1138         rvalue reference to the RefPtr<BitmapTexture> object. Remove the static
1139         compareTimeLastUsed() function and use a lambda directly in its place.
1140
1141         Remove the default BitmapTexturePool constructor, which isn't used anywhere.
1142         Have the constructor and some methods accept or return RefPtr objects, possibly
1143         via rvalue references. Clean up the header file by removing a few unnecessary
1144         header includes and using forward declarations where possible.
1145
1146         In the BitmapTexturePool implementation file, mark the two const variables as
1147         static. The ::acquireTexture() method now uses the std::find_if() algorithm
1148         to find a fitting Entry object in the Vector. The same method is also moved
1149         upwards so we follow the order of declaration in the header. ::createTexture()
1150         inlines the return of the new expression into the adoptRef() call in the return
1151         statement.
1152
1153         TextureMapperGL constructor is updated to pass a copied RefPtr object into the
1154         BitmapTexturePool constructor.
1155
1156         * platform/graphics/texmap/BitmapTexturePool.cpp:
1157         (WebCore::BitmapTexturePool::BitmapTexturePool):
1158         (WebCore::BitmapTexturePool::acquireTexture):
1159         (WebCore::BitmapTexturePool::releaseUnusedTexturesTimerFired):
1160         (WebCore::BitmapTexturePool::createTexture):
1161         * platform/graphics/texmap/BitmapTexturePool.h:
1162         (WebCore::BitmapTexturePool::Entry::Entry):
1163         (WebCore::BitmapTexturePool::Entry::markUsed):
1164         (WebCore::BitmapTexturePoolEntry::BitmapTexturePoolEntry): Deleted.
1165         (WebCore::BitmapTexturePoolEntry::markUsed): Deleted.
1166         (WebCore::BitmapTexturePoolEntry::compareTimeLastUsed): Deleted.
1167         * platform/graphics/texmap/TextureMapperGL.cpp:
1168         (WebCore::TextureMapperGL::TextureMapperGL):
1169
1170 2015-12-10  Michael Catanzaro  <mcatanzaro@igalia.com>
1171
1172         [GTK] RenderThemeGtk::platformActiveSelectionBackgroundColor, et. al. should not clobber state of cached GtkStyleContexts
1173         https://bugs.webkit.org/show_bug.cgi?id=151533
1174
1175         Reviewed by Carlos Garcia Campos.
1176
1177         Remove the style context cache to simplify the code, drastically reduce the number of
1178         expensive save/restore operations performed on style contexts, and avoid unwanted
1179         side-effects in RenderThemeGtk::styleColor. This is also a speculative fix for improper
1180         button rendering with certain custom themes, and a simplification that will make it easier
1181         to fix bug #150550.
1182
1183         This change does have performance implications, which I intend to check on the perf bot
1184         after landing to ensure that removing the cache does not have a significant negative impact
1185         on performance; I have no clue whether this will be a net performance win or loss. However,
1186         this is a bit tricky, because the bot is running GTK+ 3.16, whereas I expect save/restore
1187         might be much more expensive in GTK+ 3.20, and I do not want to make performance decisions
1188         except based on the latest GTK+ due to large changes in the implementation of
1189         GtkStyleContext.
1190
1191         * rendering/RenderThemeGtk.cpp:
1192         (WebCore::createStyleContext):
1193         (WebCore::getStockIconForWidgetType):
1194         (WebCore::getStockSymbolicIconForWidgetType):
1195         (WebCore::RenderThemeGtk::initMediaColors):
1196         (WebCore::RenderThemeGtk::adjustRepaintRect):
1197         (WebCore::setToggleSize):
1198         (WebCore::paintToggle):
1199         (WebCore::RenderThemeGtk::setCheckboxSize):
1200         (WebCore::RenderThemeGtk::setRadioSize):
1201         (WebCore::RenderThemeGtk::paintButton):
1202         (WebCore::getComboBoxMetrics):
1203         (WebCore::RenderThemeGtk::paintMenuList):
1204         (WebCore::RenderThemeGtk::paintTextField):
1205         (WebCore::RenderThemeGtk::paintSliderTrack):
1206         (WebCore::RenderThemeGtk::paintSliderThumb):
1207         (WebCore::RenderThemeGtk::adjustSliderThumbSize):
1208         (WebCore::RenderThemeGtk::paintProgressBar):
1209         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
1210         (WebCore::RenderThemeGtk::paintInnerSpinButton):
1211         (WebCore::styleColor):
1212         (WebCore::gtkStyleChangedCallback): Deleted.
1213         (WebCore::styleContextMap): Deleted.
1214         (WebCore::getStyleContext): Deleted.
1215
1216 2015-12-10  Myles C. Maxfield  <mmaxfield@apple.com>
1217
1218         font-variant-caps does not work if the font does not support font features
1219         https://bugs.webkit.org/show_bug.cgi?id=149774
1220
1221         Reviewed by Antti Koivisto.
1222
1223         This test implements synthesis for small-caps and all-small-caps. It does so by
1224         moving font variant selection into a higher level (ComplexTextController).
1225         In general, the approach is to use the pure font feature until we encounter
1226         a character which needs to be uppercased, and which the font feature does not
1227         support uppercasing. In this situation, we try again with synthesis. In this
1228         case, synthesis means artificially uppercasing letters and rendering them with
1229         a smaller font.
1230
1231         We require system support to know which glyphs a particular font feature supports.
1232         Therefore, on operating systems which do not include this support, we will simply
1233         say that the font feature does not support any glyphs.
1234
1235         Test: css3/font-variant-small-caps-synthesis.html
1236               css3/font-variant-petite-caps-synthesis.html
1237
1238         * platform/graphics/Font.cpp:
1239         (WebCore::Font::noSmallCapsFont): Return the same font, but without smcp or c2sc.
1240         This function utilizes a cache.
1241         * platform/graphics/Font.h:
1242         (WebCore::Font::variantFont): Small caps should never go through this function
1243         anymore.
1244         * platform/graphics/FontCascade.h: Because we're moving variant selection into
1245         a higher level, we remove the FontVariant argument from the lower-level call.
1246         * platform/graphics/FontCascadeFonts.cpp:
1247         (WebCore::FontCascadeFonts::glyphDataForVariant): Use early-return style.
1248         (WebCore::FontCascadeFonts::glyphDataForNormalVariant): Ditto.
1249         * platform/graphics/cocoa/FontCascadeCocoa.mm:
1250         (WebCore::FontCascade::fontForCombiningCharacterSequence): Because we're moving
1251         variant selection into a higher level, we remove the FontVariant argument from
1252         the lower-level call.
1253         * platform/graphics/cocoa/FontCocoa.mm:
1254         (WebCore::Font::smallCapsSupportsCharacter):
1255         (WebCore::Font::allSmallCapsSupportsCharacter):
1256         (WebCore::smallCapsOpenTypeDictionary): Helper function for
1257         smallCapsSupportsCharacter().
1258         (WebCore::smallCapsTrueTypeDictionary): Ditto.
1259         (WebCore::unionBitVectors):
1260         (WebCore::Font::glyphsSupportedBySmallCaps): Compute a bit vector of supported
1261         glyphs.
1262         (WebCore::Font::glyphsSupportedByAllSmallCaps): Ditto.
1263         (WebCore::createDerivativeFont): Moving common code into its own helper function.
1264         (WebCore::Font::createFontWithoutSmallCaps):
1265         (WebCore::Font::platformCreateScaledFont): Use the common code.
1266         * platform/graphics/mac/ComplexTextController.cpp:
1267         (WebCore::capitalized): What is the capitalized form of a character?
1268         (WebCore::ComplexTextController::collectComplexTextRuns): Implement the core
1269         logic of this patch. This includes the retry when we encounter a character which
1270         is not supported by the font feature.
1271         * platform/spi/cocoa/CoreTextSPI.h:
1272
1273 2015-12-10  Zan Dobersek  <zdobersek@igalia.com>
1274
1275         [TexMap] Remove the TEXMAP_OPENGL_ES_2 define
1276         https://bugs.webkit.org/show_bug.cgi?id=152069
1277
1278         Reviewed by Alex Christensen.
1279
1280         Remove the TEXMAP_OPENGL_ES_2 macro define and clean up the code
1281         that it was (not) guarding.
1282
1283         * platform/graphics/texmap/BitmapTexture.h:
1284         * platform/graphics/texmap/BitmapTextureGL.cpp: Remove the TEXMAP_OPENGL_ES_2
1285         guard. Keep the GL_UNSIGNED_INT_8_8_8_8_REV define for OS(DARWIN), but use
1286         the GraphicsContext3D constants for other values.
1287         (WebCore::BitmapTextureGL::updateContentsNoSwizzle):
1288         (WebCore::BitmapTextureGL::initializeStencil): Remove the TEXMAP_OPENGL_ES_2
1289         guard and default to calling the renderbufferStorage() function with the
1290         GraphicsContext3D::STENCIL_INDEX8 argument.
1291         * platform/graphics/texmap/BitmapTexturePool.h:
1292         * platform/graphics/texmap/TextureMapper.h:
1293         * platform/graphics/texmap/TextureMapperGL.cpp: Remove both the TEXMAP_OPENGL_ES_2
1294         guard and the code it guarded. Because we were defining TEXMAP_OPENGL_ES_2 and not
1295         USE_TEXMAP_OPENGL_ES_2, the guarded defines were always enforced, but they're never
1296         actually used in this file anyway.
1297
1298 2015-12-09  Brady Eidson  <beidson@apple.com>
1299
1300         Modern IDB: storage/indexeddb/objectstore-basics.html fails.
1301         https://bugs.webkit.org/show_bug.cgi?id=152101
1302
1303         Reviewed by Alex Christensen.
1304
1305         No new tests (Multiple tests updated to the new error messaging cover it).
1306
1307         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1308         (WebCore::IDBClient::IDBObjectStore::putOrAdd): Add plenty of detailed error messaging.
1309
1310 2015-12-09  Zalan Bujtas  <zalan@apple.com>
1311
1312         TextPainter: Make before and after selection painting more explicit.
1313         https://bugs.webkit.org/show_bug.cgi?id=152104
1314
1315         Reviewed by Myles C. Maxfield.
1316
1317         Instead of swapping start end end positions and expecting TextPainter::drawTextOrEmphasisMarks()
1318         to recognize it, we call painting with 0 - startPosition and endPosition - length.
1319
1320         No change in functionality.
1321
1322         * rendering/TextPainter.cpp:
1323         (WebCore::TextPainter::drawTextOrEmphasisMarks):
1324         (WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
1325         (WebCore::TextPainter::paintText):
1326         (WebCore::TextPainter::paintEmphasisMarksIfNeeded): Deleted.
1327         (WebCore::TextPainter::paintTextWithStyle): Deleted.
1328         * rendering/TextPainter.h:
1329
1330 2015-12-09  Daniel Bates  <dabates@apple.com>
1331
1332         [iOS] Suspend and resume device motion and device orientation updates when page is hidden and visible, respectively
1333         https://bugs.webkit.org/show_bug.cgi?id=151840
1334         <rdar://problem/23753931>
1335
1336         Reviewed by Simon Fraser.
1337
1338         * dom/Document.cpp:
1339         (WebCore::Document::suspendDeviceMotionAndOrientationUpdates): Added.
1340         (WebCore::Document::resumeDeviceMotionAndOrientationUpdates): Added.
1341         (WebCore::Document::platformSuspendOrStopActiveDOMObjects): Moved logic to suspend device motion and
1342         orientation updates from here to Document::suspendDeviceMotionAndOrientationUpdates().
1343         (WebCore::Document::suspendActiveDOMObjects): Modified to call Document::suspendDeviceMotionAndOrientationUpdates().
1344         (WebCore::Document::resumeActiveDOMObjects): Modified to call Document::resumeDeviceMotionAndOrientationUpdates().
1345         * dom/Document.h:
1346         * page/Page.cpp:
1347         (WebCore::Page::setIsVisibleInternal): Suspend device motion and orientation updates when the page is hidden and
1348         resume updates when the page is visible.
1349         (WebCore::Page::suspendDeviceMotionAndOrientationUpdates): Added.
1350         (WebCore::Page::resumeDeviceMotionAndOrientationUpdates): Added.
1351         * page/Page.h:
1352
1353 2015-12-09  Daniel Bates  <dabates@apple.com>
1354
1355         Unify iOS Frame::setTimersPaused() logic and Frame::{suspend, resume}ActiveDOMObjectsAndAnimations()
1356         https://bugs.webkit.org/show_bug.cgi?id=152006
1357
1358         Reviewed by Simon Fraser.
1359
1360         Currently we have almost identical logic to suspend and resume a web page for iOS and non-iOS ports.
1361         We should unify this logic instead of duplicating it.
1362
1363         * dom/ActiveDOMObject.h: Remove iOS-specific enumeration DocumentWillBePaused and standardize on
1364         enumerator PageWillBeSuspended.
1365         * dom/Document.cpp:
1366         (WebCore::Document::didBecomeCurrentDocumentInFrame): Unify iOS and non-iOS-specific code.
1367         (WebCore::Document::suspendScheduledTasks): Ignore subsequent calls to this function so long as the reason for
1368         the first invocation was ActiveDOMObject::PageWillBeSuspended. Such a subsequent call may occur as part of
1369         handling a scroll or zoom gesture.
1370         * dom/ScriptExecutionContext.cpp:
1371         (WebCore::ScriptExecutionContext::suspendActiveDOMObjects): Ignore subsequent calls to this function
1372         so long as the reason for the first invocation was ActiveDOMObject::PageWillBeSuspended. Such a subsequent
1373         call may occur as part of the process of a page being added to the page cache.
1374         * html/HTMLMediaElement.cpp:
1375         (WebCore::HTMLMediaElement::suspend): Remove case for ActiveDOMObject::DocumentWillBePaused as this
1376         enumerator is being removed.
1377         * page/DOMTimer.cpp:
1378         (WebCore::DOMTimer::install): Write logic that used Frame::timersPaused() terms of
1379         ScriptExecutionContext::activeDOMObjectsAreSuspended() as we are removing Frame::timersPaused().
1380         (WebCore::DOMTimer::fired): Remove iOS-specific assertion with respect to Frame::timersPaused().
1381         This function already asserts the equivalent condition that ScriptExecutionContext::activeDOMObjectsAreSuspended()
1382         evaluates to false. Clean up iOS-specific code that depends on the ScriptExecutionContext being a
1383         Document object by taking advantage of the fact that this assumption is true when shouldBeginObservingChanges
1384         evaluates to true.
1385         * page/Frame.cpp:
1386         (WebCore::Frame::Frame): Remove instance variable m_timersPausedCount and unify the iOS and non-iOS logic.
1387         (WebCore::Frame::suspendActiveDOMObjectsAndAnimations): Standardize on the iOS logic for suspending
1388         DOM objects and animations because it is more comprehensive on what it suspends and works with the deferred
1389         loading machinery (Page::setDefersLoading() - see remarks in Frame::resumeActiveDOMObjectsAndAnimations() for
1390         more details). Specifically, make use of Frame::clearTimers() to suspend non-scripted animations (i.e. non-requestAnimationFrame()
1391         animations), auto-scroll timer, and pending relayouts. And use Document::suspendScheduledTasks() to suspend
1392         all other tasks, including WebSQL database callbacks, active DOM objects, scripted animations and execution of
1393         <script async>/<script defer> JavaScript scripts.
1394         (WebCore::Frame::resumeActiveDOMObjectsAndAnimations): Standardize on the iOS logic for resuming
1395         DOM objects and animations for symmetry and because it works with the deferred loading machinery. We call
1396         Document::resumeScheduledTasks() (which calls Document::resumeActiveDOMObjects()) instead of calling
1397         Document::resumeActiveDOMObjects() directly because the former will ultimately process the queue of pending
1398         tasks (Document::m_pendingTasks).
1399         * page/Frame.h: Remove instance variable m_timersPausedCount.
1400         (WebCore::Frame::timersPaused): Deleted.
1401         * page/ios/FrameIOS.mm:
1402         (WebCore::Frame::setTimersPaused): Write this function in terms of Page::{suspend, resume}ActiveDOMObjectsAndAnimations().
1403         We need to keep this function for Legacy WebKit on iOS.
1404         (WebCore::Frame::setTimersPausedInternal): Deleted.
1405         * rendering/RenderElement.cpp:
1406         (WebCore::shouldRepaintForImageAnimation): Remove iOS-specific code to early return when Frame::timersPaused()
1407         evaluates to true. This function already has the equivalent code to early return when Document::activeDOMObjectsAreSuspended()
1408         evaluates to true.
1409
1410 2015-12-09  Brady Eidson  <beidson@apple.com>
1411
1412         Modern IDB: storage/indexeddb/metadata.html fails
1413         https://bugs.webkit.org/show_bug.cgi?id=152099
1414
1415         Reviewed by Alex Christensen.
1416
1417         Test: storage/indexeddb/modern/abort-objectstore-info.html
1418               And at least one existing failure now passes.
1419
1420         We did not properly reset object store info when version change transactions aborted.
1421
1422         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
1423         (WebCore::IDBClient::IDBObjectStore::IDBObjectStore):
1424         (WebCore::IDBClient::IDBObjectStore::rollbackInfoForVersionChangeAbort):
1425         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
1426         
1427         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
1428         (WebCore::IDBClient::IDBTransaction::abort):
1429
1430 2015-12-09  Simon Fraser  <simon.fraser@apple.com>
1431
1432         Adjust layer backing store format
1433         https://bugs.webkit.org/show_bug.cgi?id=152097
1434         rdar://problem/23305376
1435
1436         Reviewed by Tim Horton.
1437         
1438         Call setBackingStoreFormat() on UIWebView tile grid layers, and on compositing
1439         layers which can allocate backing store.
1440
1441         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1442         (WebCore::setBackingStoreFormat):
1443         (PlatformCALayerCocoa::commonInit):
1444         * platform/ios/LegacyTileGridTile.mm:
1445         (WebCore::setBackingStoreFormat):
1446         (WebCore::LegacyTileGridTile::LegacyTileGridTile):
1447
1448 2015-12-09  Brady Eidson  <beidson@apple.com>
1449
1450         Modern IDB: storage/indexeddb/intversion-close-between-events.html fails.
1451         https://bugs.webkit.org/show_bug.cgi?id=152096
1452
1453         Reviewed by Alex Christensen.
1454
1455         No new tests (At least one failing test now passes).
1456
1457         * bindings/js/JSIDBDatabaseCustom.cpp:
1458         (WebCore::JSIDBDatabase::transaction): In addition to JSArrays, treat DOMStringLists as a valid string sequence.
1459     
1460 2015-12-09  Andreas Kling  <akling@apple.com>
1461
1462         [iOS] ResourceUsageOverlay should work on iOS.
1463         <https://webkit.org/b/152021>
1464
1465         Reviewed by Antti Koivisto.
1466
1467         Make ResourceUsageOverlay work on iOS and on Mac desktops with UI-side compositing.
1468
1469         * page/ResourceUsageOverlay.cpp:
1470         (WebCore::ResourceUsageOverlay::initialize): Move the overlay to the top of the view on iOS for now.
1471         * page/ResourceUsageOverlay.h:
1472         * page/cocoa/ResourceUsageOverlayCocoa.mm:
1473         (WebCore::createColor): Make a custom CGColor factory since we can't use CGColorCreateGenericRGB on iOS.
1474         (WebCore::MemoryCategoryInfo::MemoryCategoryInfo):
1475         (WebCore::ResourceUsageOverlay::platformInitialize): Put the overlay CALayer into a container layer and
1476         hook it up with GraphicsLayer::setContentsToPlatformLayer so it works with all compositing modes.
1477         (WebCore::showText): Move CGContextSaveGState call to the top of the function to preserve everything.
1478         (WebCore::drawGraphLabel):
1479         (WebCore::drawCpuHistory):
1480         (WebCore::drawGCHistory):
1481         (WebCore::ResourceUsageOverlay::platformDraw): Flip the CGContext if needed.
1482         (WebCore::runSamplerThread): Update the layer rects on each thread iteration. This shouldn't be
1483         necessary but it papers over an issue where the containing layer would shrink down to 0x0 and
1484         disappear. Added a FIXME for this.
1485         * platform/spi/cocoa/MachVMSPI.h: Add purgeable VM SPI.
1486
1487 2015-12-09  Brady Eidson  <beidson@apple.com>
1488
1489         Modern IDB: storage/indexeddb/database-closepending-flag.html fails.
1490         https://bugs.webkit.org/show_bug.cgi?id=152095
1491
1492         Reviewed by Alex Christensen.
1493
1494         No new tests (At least one failing test now passes).
1495         
1496         The server-side checks the closepending flag before dispatching the event to the client, 
1497         but due to the inherent asynchronous race between server and client, the client needs to 
1498         check its closePending flag as well.
1499
1500         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
1501         (WebCore::IDBClient::IDBDatabase::fireVersionChangeEvent): Don't fire if m_closePending is set.
1502
1503 2015-12-09  David Hyatt  <hyatt@apple.com>
1504
1505         Picture element needs to respond to dynamic viewport changes.
1506         https://bugs.webkit.org/show_bug.cgi?id=152013
1507         <rdar://problem/23766375>
1508
1509         Reviewed by Dean Jackson.
1510
1511         Added new tests in fast/picture.
1512
1513         * css/MediaQueryEvaluator.cpp:
1514         (WebCore::MediaQueryEvaluator::evalCheckingViewportDependentResults):
1515         Add new evaluation method that adds viewport dependent results to a vector. A follow-up patch
1516         will refactor the style resolver code to use this function instead of the special style resolver one, in order to
1517         get rid of the code duplication. Tracked by https://bugs.webkit.org/show_bug.cgi?id=152089.
1518
1519         * css/MediaQueryEvaluator.h:
1520         (WebCore::MediaQueryResult::MediaQueryResult):
1521         * css/StyleResolver.h:
1522         (WebCore::MediaQueryResult::MediaQueryResult): Deleted.
1523         Move MediaQueryResult into a header since it is used in multiple places now and not just by the style
1524         resolver.
1525
1526         * dom/Document.cpp:
1527         (WebCore::Document::evaluateMediaQueryList):
1528         (WebCore::Document::checkViewportDependentPictures):
1529         (WebCore::Document::optimizedStyleSheetUpdateTimerFired):
1530         (WebCore::Document::applyContentDispositionAttachmentSandbox):
1531         (WebCore::Document::addViewportDependentPicture):
1532         (WebCore::Document::removeViewportDependentPicture):
1533         * dom/Document.h:
1534         The document now maintains a HashSet of viewport-dependent pictures, and it checks them whenever the
1535         viewport changes. If their media queries stay the same, then nothing happens. If they change, then
1536         the <picture> will go back and re-check all its <source> elements to see what the new best candidate is.
1537
1538         * html/HTMLImageElement.cpp:
1539         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
1540         Revised to check for viewport dependencies and to cache viewport-dependent results on the <picture> elements.
1541         When a <picture> is found to be viewport-dependent (or not) it is also added to or removed from the document's
1542         set of tracked pictures.
1543
1544         * html/HTMLPictureElement.cpp:
1545         (WebCore::HTMLPictureElement::HTMLPictureElement):
1546         (WebCore::HTMLPictureElement::~HTMLPictureElement):
1547         (WebCore::HTMLPictureElement::didMoveToNewDocument):
1548         (WebCore::HTMLPictureElement::create):
1549         (WebCore::HTMLPictureElement::sourcesChanged):
1550         (WebCore::HTMLPictureElement::viewportChangeAffectedPicture):
1551         * html/HTMLPictureElement.h:
1552         New caching of results and updating of the document HashSet when the picture gets destroyed or moves to
1553         a different document.
1554
1555         * html/HTMLSourceElement.cpp:
1556         (WebCore::HTMLSourceElement::parseAttribute):
1557         * html/HTMLSourceElement.h:
1558         Cache the media attribute in a parsed form. A follow-up patch will improve the <video>/<audio>
1559         code to make use of this parsed result. Tracked by https://bugs.webkit.org/show_bug.cgi?id=152090.
1560
1561 2015-12-09  Zalan Bujtas  <zalan@apple.com>
1562
1563         TextPainter: Rename start and end position to selectionStart and selectionEnd.
1564         https://bugs.webkit.org/show_bug.cgi?id=152088
1565
1566         Reviewed by Myles C. Maxfield.
1567
1568         They actually mean selection start/end.
1569
1570         No change in functionality.
1571
1572         * rendering/InlineTextBox.cpp:
1573         (WebCore::InlineTextBox::paint):
1574         * rendering/TextPainter.cpp:
1575         (WebCore::TextPainter::TextPainter):
1576         (WebCore::TextPainter::paintText):
1577         * rendering/TextPainter.h:
1578
1579 2015-12-09  Joanmarie Diggs  <jdiggs@igalia.com>
1580
1581         AX: [GTK] Anonymous render block flow elements should be exposed as ATK_ROLE_SECTION; not ATK_ROLE_PANEL
1582         https://bugs.webkit.org/show_bug.cgi?id=152070
1583
1584         Reviewed by Mario Sanchez Prada.
1585
1586         Map the element to WebCore AccessibilityRole DivRole for GTK. This is being
1587         done in the shared layer rather than in the platform layer because we want all
1588         subsequent logic to treat anonymous render block flow elements as divs.
1589
1590         No new tests. We already have sufficient test coverage. The expectations
1591         been updated accordingly.
1592
1593         * accessibility/AccessibilityRenderObject.cpp:
1594         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
1595
1596 2015-12-09  Keith Rollin  <krollin@apple.com>
1597
1598         form.elements should reflect the element ordering after the HTML tree builder algorithm
1599         https://bugs.webkit.org/show_bug.cgi?id=148870
1600         rdar://problem/22589879
1601
1602         Reviewed by Ryosuke Niwa.
1603
1604         form.elements should return form-associated elements in tree order.
1605         However, when presented with an HTML fragment like the following,
1606         forms.elements is not built in tree order. Instead, the elements
1607         appear in forms.element in the same order they appear in the HTML --
1608         that is in the same order as they are parsed.
1609
1610         <form id=form>
1611             <table>
1612                 <tr>
1613                     <td><input type="radio" name="radio1" id="r1" value=1></td>
1614                     <td><input type="radio" name="radio2" id="r2" value=2></td>
1615                     <input type="radio" name="radio0" id="r0" value=0>
1616                 </tr>
1617             </table>
1618         </form>
1619
1620         The reason why elements appear in forms.elements in parse order is
1621         because they register themselves with the designated form when they
1622         are created. At this time, they are not in the DOM tree, so the form
1623         can only assume that the element will be appended to the DOM tree,
1624         with the result that it records the elements in the HTML fragment
1625         above as [r1, r2, r0].
1626
1627         However, it's not always the case that the newly-created element will
1628         be appended to the current tree. In the HTML fragment above, the r0
1629         input element is hoised out of the table element. It ends up being the
1630         preceding sibling of the table element, with the result that the
1631         actual tree-order of the input elements is [r0, r1, r2].
1632
1633         Because the problem is due to registering form-associated elements
1634         with the form *before* the elements are added to the DOM tree, the
1635         solution is to defer that registration until afterwards. With the new
1636         element in the tree, the form can now use its current location in the
1637         tree to correctly place the element in form.elements.
1638
1639         Existing tests now pass:
1640         - imported/w3c/web-platform-tests/html/semantics/forms/the-form-element/form-elements-nameditem-02-html
1641
1642         * html/FormAssociatedElement.cpp:
1643         (WebCore::FormAssociatedElement::FormAssociatedElement):
1644         (WebCore::FormAssociatedElement::insertedInto):
1645         (WebCore::FormAssociatedElement::removedFrom):
1646         (WebCore::FormAssociatedElement::formRemovedFromTree):
1647         (WebCore::FormAssociatedElement::formWillBeDestroyed):
1648         * html/FormAssociatedElement.h:
1649         * html/HTMLFormControlElement.cpp:
1650         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
1651         * html/HTMLImageElement.cpp:
1652         (WebCore::HTMLImageElement::HTMLImageElement):
1653         (WebCore::HTMLImageElement::insertedInto):
1654         (WebCore::HTMLImageElement::removedFrom):
1655         * html/HTMLImageElement.h:
1656         * html/HTMLObjectElement.cpp:
1657         (WebCore::HTMLObjectElement::HTMLObjectElement):
1658
1659 2015-12-09  Gwang Yoon Hwang  <yoon@igalia.com>
1660
1661         [ThreadedCompositor] Support HTML5 Video
1662         https://bugs.webkit.org/show_bug.cgi?id=143301
1663
1664         Reviewed by Žan Doberšek.
1665
1666         This patch implements HTML5 Video supports in Threaded Compositor.
1667
1668         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1669         (WebCore::GstVideoFrameHolder::GstVideoFrameHolder):
1670         Added to support GStreamer GL by ensuring unmapping of the swapped
1671         GstVideoFrame performed at GStreamer GL's gl thread.
1672         (WebCore::MediaPlayerPrivateGStreamerBase::updateTexture):
1673         Modified to upload decoded frame to the given texture instead of
1674         creating a texture itself because we should use a texture from the
1675         proxy when we are using the threaded compositor.
1676         (WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):
1677         Implements two ways to send a texture from GStreamer to the compositor.
1678         1. If we are not using GStreamer GL, we are going to acquire a free texture
1679         from a TextureMapperPlatformLayerProxy and upload the decoded frame to the
1680         texture. This should be done at the compositing thread because we
1681         don't have a Gst's GL thread.
1682         2. If we are using GStreamer GL, we map a texture for the given frame
1683         and passes it to the compositing thread. The mapped frame will be
1684         freed if it is swapped out or the layer is removed.
1685
1686         (WebCore::MediaPlayerPrivateGStreamerBase::paintToTextureMapper):
1687         Modified to aquire a new texture itself.
1688
1689         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp:
1690         Adds a way to pass a function to the compositing thread to allocate /
1691         upload textures at the compositing thread.
1692
1693
1694 2015-12-09  Xabier Rodriguez Calvar  <calvaris@igalia.com>
1695
1696         [Streams API] pipeThrough test failing
1697         https://bugs.webkit.org/show_bug.cgi?id=152061
1698
1699         Reviewed by Youenn Fablet.
1700
1701         Test: imported/w3c/web-platform-tests/streams-api/readable-streams/pipe-through.html
1702
1703         * Modules/streams/ReadableStream.js:
1704         (pipeThrough): Mimic destructuring for the streams parameter.
1705
1706 2015-12-09  Frederic Wang  <fred.wang@free.fr>
1707
1708         Bad position of large operators inside an munderover element
1709         https://bugs.webkit.org/show_bug.cgi?id=151916
1710
1711         Reviewed by Alejandro G. Castro.
1712
1713         Test: mathml/opentype/large-operators-munderover.html
1714
1715         * rendering/mathml/RenderMathMLOperator.h:
1716         (WebCore::RenderMathMLOperator::isVertical): Expose the direction of the operator.
1717         * rendering/mathml/RenderMathMLUnderOver.cpp:
1718         (WebCore::RenderMathMLUnderOver::layout): Remove call to horizontal stretching for vertical operators.
1719
1720 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
1721
1722         [TexMap] TextureMapperTiledBackingStore should notify the ImageObserver of the data access
1723         https://bugs.webkit.org/show_bug.cgi?id=152053
1724
1725         Reviewed by Martin Robinson.
1726
1727         TextureMapperTiledBackingStore should call ImageObserver::didDraw() on the Image's
1728         observer after updating the tile with the Image's data. This way the CachedImage
1729         (i.e. the observer) can mark the data access with the current timestamp, avoiding
1730         removing the decoded data in the very near future during a cache purge.
1731
1732         * platform/graphics/texmap/TextureMapperTiledBackingStore.cpp:
1733         (WebCore::TextureMapperTiledBackingStore::updateContentsFromImageIfNeeded):
1734
1735 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
1736
1737         Make MainThreadSharedTimerGtk implementation GLib-specific
1738         https://bugs.webkit.org/show_bug.cgi?id=152044
1739
1740         Reviewed by Carlos Garcia Campos.
1741
1742         MainThreadSharedTimerGtk has implementation that only directly depends
1743         on GLib, and not GTK+. Because of that it can be moved under
1744         Source/WebCore/platform/glib and slightly renamed.
1745
1746         * PlatformGTK.cmake:
1747         * platform/glib/MainThreadSharedTimerGLib.cpp: Renamed from Source/WebCore/platform/gtk/MainThreadSharedTimerGtk.cpp.
1748         (WebCore::MainThreadSharedTimer::MainThreadSharedTimer):
1749         (WebCore::MainThreadSharedTimer::setFireInterval):
1750         (WebCore::MainThreadSharedTimer::stop):
1751         (WebCore::MainThreadSharedTimer::invalidate):
1752         * platform/gtk/MainThreadSharedTimerGtk.cpp:
1753         (WebCore::MainThreadSharedTimer::MainThreadSharedTimer): Deleted.
1754         (WebCore::MainThreadSharedTimer::setFireInterval): Deleted.
1755         (WebCore::MainThreadSharedTimer::stop): Deleted.
1756         (WebCore::MainThreadSharedTimer::invalidate): Deleted.
1757
1758 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
1759
1760         [TextureMapper] TextureMapperShaderProgram::setMatrix() should use TransformationMatrix::FloatMatrix4
1761         https://bugs.webkit.org/show_bug.cgi?id=152042
1762
1763         Reviewed by Martin Robinson.
1764
1765         * platform/graphics/texmap/TextureMapperShaderProgram.cpp:
1766         (WebCore::TextureMapperShaderProgram::setMatrix): Instead of manually writing out
1767         the complete matrix in a C array, simply use TransformationMatrix::FloatMatrix4
1768         and fill that via the TransformationMatrix::toColumnMajorFloatArray() method
1769         called on the passed-in TransformationMatrix.
1770
1771 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
1772
1773         [Soup] Attach the SocketStreamHandleSoup write-ready source to the thread-default context
1774         https://bugs.webkit.org/show_bug.cgi?id=152041
1775
1776         Reviewed by Carlos Garcia Campos.
1777
1778         * platform/network/soup/SocketStreamHandleSoup.cpp:
1779         (WebCore::SocketStreamHandle::beginWaitingForSocketWritability): Attach the
1780         write-ready source to the thread-default context, instead of implicitly
1781         relying on the default context for dispatching.
1782
1783 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
1784
1785         [Soup] SocketStreamHandle should call g_source_destroy() on the write-ready source
1786         https://bugs.webkit.org/show_bug.cgi?id=152040
1787
1788         Reviewed by Carlos Garcia Campos.
1789
1790         * platform/network/soup/SocketStreamHandleSoup.cpp:
1791         (WebCore::SocketStreamHandle::stopWaitingForSocketWritability): Instead of
1792         calling the g_source_get_id()-g_source_remove() pair, destroy the source via
1793         the g_source_destroy() call. Also use nullptr to clear out the pointer
1794         variable.
1795
1796 2015-12-09  Zan Dobersek  <zdobersek@igalia.com>
1797
1798         Make AudioBusGtk implementation GLib-specific
1799         https://bugs.webkit.org/show_bug.cgi?id=152049
1800
1801         Reviewed by Philippe Normand.
1802
1803         AudioBusGtk only depends on GLib, so it should be moved to
1804         Source/WebCore/platform/audio/glib and the implementation file
1805         renamed to AudioBusGLib.cpp.
1806
1807         The hard-coded webkitgtk path component can be addressed later.
1808
1809         * PlatformGTK.cmake: Update the build target.
1810         * platform/audio/glib/AudioBusGLib.cpp: Renamed from Source/WebCore/platform/audio/gtk/AudioBusGtk.cpp.
1811         (WebCore::AudioBus::loadPlatformResource):
1812         * platform/audio/gtk/AudioBusGtk.cpp:
1813         (WebCore::AudioBus::loadPlatformResource): Deleted.
1814
1815 2015-12-09  Joanmarie Diggs  <jdiggs@igalia.com>
1816
1817         AX: [EFL] Consider deferring to WebCore Accessibility for table exposure
1818         https://bugs.webkit.org/show_bug.cgi?id=144898
1819
1820         Reviewed by Darin Adler.
1821
1822         Stop unconditionally exposing all HTMLTableElement nodes as AccessibilityTables
1823         for WebKitEfl.
1824
1825         No new tests. Several existing tests already cover table exposure. They have
1826         been updated accordingly.
1827
1828         * accessibility/AccessibilityTable.cpp:
1829         (WebCore::AccessibilityTable::computeIsTableExposableThroughAccessibility):
1830
1831 2015-12-08  Simon Fraser  <simon.fraser@apple.com>
1832
1833         Convert resetAnimValToBaseVal take a reference to a SVGAnimatedType
1834         https://bugs.webkit.org/show_bug.cgi?id=152036
1835
1836         Reviewed by Zalan Bujtas.
1837         
1838         Change resetAnimValToBaseVal() to take a reference at the last argument.
1839
1840         * svg/SVGAnimateElementBase.cpp:
1841         (WebCore::SVGAnimateElementBase::resetAnimatedType):
1842         * svg/SVGAnimatedAngle.cpp:
1843         (WebCore::SVGAnimatedAngleAnimator::resetAnimValToBaseVal):
1844         * svg/SVGAnimatedAngle.h:
1845         * svg/SVGAnimatedBoolean.cpp:
1846         (WebCore::SVGAnimatedBooleanAnimator::resetAnimValToBaseVal):
1847         * svg/SVGAnimatedBoolean.h:
1848         * svg/SVGAnimatedColor.h:
1849         * svg/SVGAnimatedEnumeration.cpp:
1850         (WebCore::SVGAnimatedEnumerationAnimator::resetAnimValToBaseVal):
1851         * svg/SVGAnimatedEnumeration.h:
1852         * svg/SVGAnimatedInteger.cpp:
1853         (WebCore::SVGAnimatedIntegerAnimator::resetAnimValToBaseVal):
1854         * svg/SVGAnimatedInteger.h:
1855         * svg/SVGAnimatedIntegerOptionalInteger.cpp:
1856         (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::resetAnimValToBaseVal):
1857         * svg/SVGAnimatedIntegerOptionalInteger.h:
1858         * svg/SVGAnimatedLength.cpp:
1859         (WebCore::SVGAnimatedLengthAnimator::resetAnimValToBaseVal):
1860         * svg/SVGAnimatedLength.h:
1861         * svg/SVGAnimatedLengthList.cpp:
1862         (WebCore::SVGAnimatedLengthListAnimator::resetAnimValToBaseVal):
1863         * svg/SVGAnimatedLengthList.h:
1864         * svg/SVGAnimatedNumber.cpp:
1865         (WebCore::SVGAnimatedNumberAnimator::resetAnimValToBaseVal):
1866         * svg/SVGAnimatedNumber.h:
1867         * svg/SVGAnimatedNumberList.cpp:
1868         (WebCore::SVGAnimatedNumberListAnimator::resetAnimValToBaseVal):
1869         * svg/SVGAnimatedNumberList.h:
1870         * svg/SVGAnimatedNumberOptionalNumber.cpp:
1871         (WebCore::SVGAnimatedNumberOptionalNumberAnimator::resetAnimValToBaseVal):
1872         * svg/SVGAnimatedNumberOptionalNumber.h:
1873         * svg/SVGAnimatedPath.cpp:
1874         (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
1875         * svg/SVGAnimatedPath.h:
1876         * svg/SVGAnimatedPointList.cpp:
1877         (WebCore::SVGAnimatedPointListAnimator::resetAnimValToBaseVal):
1878         * svg/SVGAnimatedPointList.h:
1879         * svg/SVGAnimatedPreserveAspectRatio.cpp:
1880         (WebCore::SVGAnimatedPreserveAspectRatioAnimator::resetAnimValToBaseVal):
1881         * svg/SVGAnimatedPreserveAspectRatio.h:
1882         * svg/SVGAnimatedRect.cpp:
1883         (WebCore::SVGAnimatedRectAnimator::resetAnimValToBaseVal):
1884         * svg/SVGAnimatedRect.h:
1885         * svg/SVGAnimatedString.cpp:
1886         (WebCore::SVGAnimatedStringAnimator::resetAnimValToBaseVal):
1887         * svg/SVGAnimatedString.h:
1888         * svg/SVGAnimatedTransformList.cpp:
1889         (WebCore::SVGAnimatedTransformListAnimator::resetAnimValToBaseVal):
1890         * svg/SVGAnimatedTransformList.h:
1891         * svg/SVGAnimatedTypeAnimator.h:
1892         (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValue):
1893         (WebCore::SVGAnimatedTypeAnimator::resetFromBaseValues):
1894
1895 2015-12-08  Myles C. Maxfield  <mmaxfield@apple.com>
1896
1897         Remove Mavericks-specific code from FontCacheMac
1898         https://bugs.webkit.org/show_bug.cgi?id=152030
1899
1900         Reviewed by Simon Fraser.
1901
1902         Mavericks is no longer a supported platform.
1903
1904         No new tests because there is no behavior change.
1905
1906         * platform/graphics/mac/FontCacheMac.mm:
1907         (WebCore::platformLookupFallbackFont):
1908         (WebCore::platformFontWithFamilySpecialCase): Deleted.
1909
1910 2015-12-08  Brady Eidson  <beidson@apple.com>
1911
1912         Modern IDB: storage/indexeddb/objectstore-cursor.html fails.
1913         https://bugs.webkit.org/show_bug.cgi?id=152023
1914
1915         Reviewed by Alex Christensen.
1916
1917         No new tests (At least one failing test now passes).
1918
1919         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
1920         (WebCore::IDBServer::MemoryObjectStoreCursor::MemoryObjectStoreCursor):
1921         (WebCore::IDBServer::MemoryObjectStoreCursor::setReverseIteratorFromRemainingRange): Make sure the
1922           found iterator is actually in the target range.
1923
1924 2015-12-08  Jer Noble  <jer.noble@apple.com>
1925
1926         Changing <video> src during 'ended' event can leave screen sleep disabled
1927         https://bugs.webkit.org/show_bug.cgi?id=152018
1928
1929         Reviewed by Eric Carlson.
1930
1931         Resetting a HTMLMediaElement's src during 'ended' introduces a race condition: whether
1932         the 'mediaPlayerRateChanged()' notification will fire before createMediaPlayer() destroys
1933         the old MediaPlayer firing said notification.
1934
1935         To break the race condition, always update the sleep disabling assertion after destroying
1936         the media player (by creating a new one).
1937
1938         * html/HTMLMediaElement.cpp:
1939         (WebCore::HTMLMediaElement::createMediaPlayer):
1940
1941 2015-12-08  Brady Eidson  <beidson@apple.com>
1942
1943         Modern IDB: Fire blocked events for delete requests that are blocked.
1944         https://bugs.webkit.org/show_bug.cgi?id=152015
1945
1946         Reviewed by Alex Christensen.
1947
1948         No new tests (Previous failing tests now pass, and previously timing-out tests now complete).
1949
1950         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1951         (WebCore::IDBServer::UniqueIDBDatabase::maybeDeleteDatabase):
1952         (WebCore::IDBServer::UniqueIDBDatabase::handleDelete):
1953         (WebCore::IDBServer::UniqueIDBDatabase::deleteOrRunTransactionsTimerFired):
1954         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1955
1956 2015-12-08  Brady Eidson  <beidson@apple.com>
1957
1958         Modern IDB: Fire blocked events for upgrade requests that are blocked.
1959         https://bugs.webkit.org/show_bug.cgi?id=152007
1960
1961         Reviewed by Alex Christensen.
1962
1963         Test: storage/indexeddb/modern/blocked-open-db-requests.html
1964               And some that used to fail now pass.
1965               And some that used to timeout now complete.
1966
1967         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
1968         (WebCore::IDBClient::IDBConnectionToServer::notifyOpenDBRequestBlocked):
1969         * Modules/indexeddb/client/IDBConnectionToServer.h:
1970
1971         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
1972         (WebCore::IDBClient::IDBDatabase::IDBDatabase):
1973
1974         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
1975         (WebCore::IDBClient::IDBOpenDBRequest::requestBlocked):
1976         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
1977
1978         * Modules/indexeddb/client/IDBRequestImpl.cpp:
1979         (WebCore::IDBClient::IDBRequest::dispatchEvent):
1980
1981         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
1982         (WebCore::IDBServer::IDBConnectionToClient::notifyOpenDBRequestBlocked):
1983         * Modules/indexeddb/server/IDBConnectionToClient.h:
1984         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
1985
1986         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1987         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations): When a request that would
1988           result in a version change transaction is blocked by open connections, notify it.
1989
1990         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
1991         (WebCore::InProcessIDBServer::notifyOpenDBRequestBlocked):
1992         * Modules/indexeddb/shared/InProcessIDBServer.h:
1993
1994 2015-12-08  Per Arne Vollan  <peavo@outlook.com>
1995
1996         [WinCairo] Compile error.
1997         https://bugs.webkit.org/show_bug.cgi?id=152008
1998
1999         Reviewed by Brent Fulgham.
2000
2001         GLuint is undefined.
2002
2003         * platform/graphics/GraphicsContext3D.h:
2004
2005 2015-12-08  Zalan Bujtas  <zalan@apple.com>
2006
2007         Light cleanup in TextPainter.
2008         https://bugs.webkit.org/show_bug.cgi?id=151994
2009
2010         Reviewed by Darin Adler.
2011
2012         No change in functionality.
2013
2014         * rendering/TextPainter.cpp:
2015         (WebCore::TextPainter::TextPainter):
2016         * rendering/TextPainter.h: Address post review comment.
2017         (WebCore::ShadowApplier::isLastShadowIteration):
2018         (WebCore::ShadowApplier::shadowIsCompletelyCoveredByText):
2019
2020 2015-12-08  Zalan Bujtas  <zalan@apple.com>
2021
2022         Do not insert positioned renderers to multiple gPositionedDescendantsMap.
2023         https://bugs.webkit.org/show_bug.cgi?id=151878
2024         rdar://problem/22229889
2025
2026         Reviewed by Simon Fraser.
2027
2028         We insert positioned renderers into a static map (RenderBlock::gPositionedDescendantsMap) to keep track of them.
2029         This static map is at block level. A particular absolute positioned object is added to its closest ancestor that
2030         returns true for RenderElement::canContainAbsolutelyPositionedObjects().
2031         canContainAbsolutelyPositionedObjects() returns true if the ancestor is either positioned or has transform.
2032         If this container's style changes so that it's no longer positioned and it has no transform anymore,
2033         we need to clear its static map of positioned objects (they'll get re-inserted to another ancestor at next layout).
2034
2035         This patch addresses the case when the renderer does not have transforms anymore.
2036
2037         Test: fast/block/positioning/crash-when-transform-is-removed.html
2038
2039         * rendering/RenderBlock.cpp:
2040         (WebCore::RenderBlock::styleWillChange):
2041
2042 2015-12-08  Eric Carlson  <eric.carlson@apple.com>
2043
2044         [MediaStream] Rename UserMediaClient and UserMediaController methods
2045         https://bugs.webkit.org/show_bug.cgi?id=152001
2046
2047         Reviewed by Brady Eidson.
2048
2049         No new tests, no behavior change.
2050
2051         * Modules/mediastream/UserMediaClient.h:
2052         (WebCore::UserMediaClient::~UserMediaClient):
2053         * Modules/mediastream/UserMediaController.h:
2054         (WebCore::UserMediaController::client):
2055         (WebCore::UserMediaController::from):
2056         (WebCore::UserMediaController::requestUserMediaAccess):
2057         (WebCore::UserMediaController::cancelUserMediaAccessRequest):
2058         (WebCore::UserMediaController::requestPermission): Deleted.
2059         (WebCore::UserMediaController::cancelRequest): Deleted.
2060         * Modules/mediastream/UserMediaRequest.cpp:
2061         (WebCore::UserMediaRequest::constraintsValidated):
2062         (WebCore::UserMediaRequest::contextDestroyed):
2063         * platform/mock/UserMediaClientMock.h:
2064
2065 2015-12-08  Jer Noble  <jer.noble@apple.com>
2066
2067         [iOS] Do not exit fullscreen mode during auto-PiP.
2068         https://bugs.webkit.org/show_bug.cgi?id=151889
2069
2070         Reviewed by Darin Adler.
2071
2072         When auto-PiPing, do not exit fullscreen mode, as that causes a two-step animation upon returing from auto-PiP.
2073
2074         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2075         (WebVideoFullscreenInterfaceAVKit::applicationDidBecomeActive): Handle the case where we open Safari after an
2076             auto-PiP by clicking on a link; if so, hide the fullscreen window.
2077         (WebVideoFullscreenInterfaceAVKit::didStartPictureInPicture): Do not exit fullscreen during auto-PiP.
2078         (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Ditto.
2079
2080 2015-12-08  Per Arne Vollan  <peavo@outlook.com>
2081
2082         [WinCairo] Remove unneeded function.
2083         https://bugs.webkit.org/show_bug.cgi?id=151989
2084
2085         Reviewed by Brent Fulgham.
2086
2087         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2088         (WebCore::MediaPlayerPrivateMediaFoundation::CustomVideoPresenter::createOptimalVideoType):
2089         (MFCreateMediaType): Deleted.
2090
2091 2015-12-08  Jer Noble  <jer.noble@apple.com>
2092
2093         [iOS] Adopt WebFullScreenVideoRootViewController.
2094         https://bugs.webkit.org/show_bug.cgi?id=151996
2095
2096         Reviewed by Dan Bernstein.
2097
2098         Adopt WebFullScreenVideoRootViewController from WebKitAdditions. If it is not available, create and use
2099         a generic UIViewController subclass.
2100
2101         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2102         (createFullScreenVideoRootViewControllerClass):
2103         (allocWebFullScreenVideoRootViewControllerInstance):
2104         (WebVideoFullscreenInterfaceAVKit::setupFullscreen):
2105
2106 2015-12-08  Andy Estes  <aestes@apple.com>
2107
2108         ImmutableNFANodeBuilder's move constructor moves an uninitialized member variable into itself
2109         https://bugs.webkit.org/show_bug.cgi?id=151982
2110
2111         Reviewed by Darin Adler.
2112
2113         * contentextensions/ImmutableNFANodeBuilder.h:
2114         (WebCore::ContentExtensions::ImmutableNFANodeBuilder::ImmutableNFANodeBuilder):
2115
2116 2015-12-08  Andreas Kling  <akling@apple.com>
2117
2118         [Cocoa] ResourceUsageOverlay should query kernel for VM page size.
2119         <https://webkit.org/b/151920>
2120
2121         Reviewed by Andy Estes.
2122
2123         Read the vm.pagesize sysctl to find the correct page size for memory usage calculations.
2124         This fixes broken math on systems that have different hw.pagesize and vm.pagesize.
2125
2126         * page/cocoa/ResourceUsageOverlayCocoa.mm:
2127         (WebCore::vmPageSize):
2128         (WebCore::pagesPerVMTag):
2129         (WebCore::runSamplerThread):
2130
2131 2015-12-08  Chris Dumez  <cdumez@apple.com>
2132
2133         Add diagnostic logging to measure speculative revalidation accuracy
2134         https://bugs.webkit.org/show_bug.cgi?id=151953
2135         <rdar://problem/23092196>
2136
2137         Reviewed by Darin Adler.
2138
2139         Add diagnostic logging to measure speculative revalidation accuracy.
2140
2141         * page/DiagnosticLoggingKeys.cpp:
2142         (WebCore::DiagnosticLoggingKeys::entryRightlyNotWarmedUpKey):
2143         (WebCore::DiagnosticLoggingKeys::entryWronglyNotWarmedUpKey):
2144         (WebCore::DiagnosticLoggingKeys::successfulSpeculativeWarmupWithRevalidationKey):
2145         (WebCore::DiagnosticLoggingKeys::successfulSpeculativeWarmupWithoutRevalidationKey):
2146         (WebCore::DiagnosticLoggingKeys::unknownEntryRequestKey):
2147         (WebCore::DiagnosticLoggingKeys::wastedSpeculativeWarmupWithRevalidationKey):
2148         (WebCore::DiagnosticLoggingKeys::wastedSpeculativeWarmupWithoutRevalidationKey):
2149         * page/DiagnosticLoggingKeys.h:
2150
2151 2015-12-08  Brady Eidson  <beidson@apple.com>
2152
2153         Modern IDB: storage/indexeddb/index-cursor.html fails.
2154         https://bugs.webkit.org/show_bug.cgi?id=151973
2155
2156         Reviewed by Darin Adler.
2157
2158         No new tests (At least one failing test now passes).
2159
2160         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
2161         (WebCore::IDBServer::MemoryIndexCursor::MemoryIndexCursor): When the initial cursor creation
2162           generates an iterator outside of the cursor's IDBKeyRange, invalidate the iterator.
2163           
2164 2015-12-08  Joanmarie Diggs  <jdiggs@igalia.com>
2165
2166         [EFL] some ax tests have been failed since r186692
2167         https://bugs.webkit.org/show_bug.cgi?id=146887
2168
2169         Reviewed by Mario Sanchez Prada.
2170
2171         The tests were failing because there are now two WebCore accessibility
2172         roles which need to implement the AtkTable interface: TableRole and
2173         GridRole. Because the latter was not added in r186692, any tests with
2174         ARIA role grid that accessed cells via coordinates stopped working.
2175
2176         No new tests; instead unskipped all the broken table tests which now pass.
2177
2178         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2179         (getInterfaceMaskFromObject):
2180
2181 2015-12-08  Gwang Yoon Hwang  <yoon@igalia.com>
2182
2183         [ThreadedCompositor] Add support for Cairo GL-backed ImageBuffer.
2184         https://bugs.webkit.org/show_bug.cgi?id=151986
2185
2186         Reviewed by Žan Doberšek.
2187
2188         This patch adds a support for accelerated 2d canvas which uses cairo-gl as its
2189         backend to the threaded compositor. Basically, it applies same way to support
2190         WebGL for the threaded compositor.
2191
2192         Unfortunately, we cannot swap the buffer for the accelerated 2d canvas because
2193         it should preserve the buffer of the previous frame when drawing new contents.
2194         Because of that, the surface of the accelerated 2d canvas will be copied for
2195         each frame.
2196
2197         * platform/graphics/cairo/ImageBufferCairo.cpp:
2198         (WebCore::ImageBufferData::ImageBufferData):
2199         (WebCore::ImageBufferData::createCompositorBuffer): Prepare a texture
2200         surface to push the rendered result to the compositing thread.
2201         (WebCore::ImageBufferData::swapBuffersIfNeeded): Copies the contents
2202         of the canvas's surface to the compositing texture.
2203         (WebCore::ImageBufferData::createCairoGLSurface): Moved to the inside
2204         of ImageBufferData.
2205
2206 2015-12-08  Joanmarie Diggs  <jdiggs@igalia.com>
2207
2208         [GTK] 15 accessibility tests fail since r186692.
2209         https://bugs.webkit.org/show_bug.cgi?id=148938
2210
2211         Reviewed by Mario Sanchez Prada.
2212
2213         Failing tests rebaselined.
2214
2215         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
2216         (atkRole): Treat GridCellRole and CellRole the same.
2217         (roleIsTextType): Treat GridCellRole and CellRole the same.
2218
2219 2015-12-08  Frederic Wang  <fred.wang@free.fr>
2220
2221         [cairo] Solid stroke of lines with thickness less than 1 pixel broken after r191658
2222         https://bugs.webkit.org/show_bug.cgi?id=151947
2223
2224         Reviewed by Martin Robinson.
2225
2226         Test: mathml/presentation/radical-bar-visibility.html
2227
2228         * platform/graphics/cairo/GraphicsContextCairo.cpp:
2229         (WebCore::GraphicsContext::drawLine): Force a minimal thickness of 1px
2230
2231 2015-12-08  Gwang Yoon Hwang  <yoon@igalia.com>
2232
2233         [ThreadedCompositor] Support WebGL for OpenGL.
2234         https://bugs.webkit.org/show_bug.cgi?id=143300
2235
2236         Reviewed by Žan Doberšek.
2237
2238         To remove pixel transfer operation, this patch adds m_compositorFBO which uses same depth and stencil
2239         buffer with m_fbo but uses m_compositorTexture as a color attachment in GraphicsContext3D.
2240         Because switching target framebuffer is cheaper than pixel transfer operation and switching color
2241         attachment of m_fbo. In Threaded Compositor, when WebGL renders a scene, prepareTexture swaps
2242         m_fbo with m_compositorFBO and send the color attachment to the compositor thread.
2243         This patch only supports WebGL for OpenGL. OpenGLES will be covered in following-up patches.
2244
2245         No new tests needed.
2246
2247         * platform/graphics/GraphicsContext3D.h:
2248         * platform/graphics/GraphicsContext3DPrivate.cpp:
2249         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2250         (WebCore::GraphicsContext3DPrivate::proxy):
2251         (WebCore::GraphicsContext3DPrivate::swapBuffersIfNeeded):
2252         Implement interfaces to pass a rendered texture to the compositing
2253         thread.
2254         * platform/graphics/GraphicsContext3DPrivate.h:
2255         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
2256         (WebCore::GraphicsContext3D::GraphicsContext3D):
2257         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2258         Create additional compositing texture and FBO to swaping buffers for
2259         threaded compositor.
2260         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
2261         (WebCore::GraphicsContext3D::reshapeFBOs):
2262         (WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
2263         Split attaching depth and stencil buffer codes from reshapeFBOs
2264         to make complete framebuffer with not only m_fbo but m_compositorFBO also.
2265         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2266         (WebCore::GraphicsContext3D::prepareTexture):
2267         If we are in the threaded compositor, we will swap m_fbo with
2268         m_compositorFBO instead of copying it.
2269
2270 2015-12-07  Zalan Bujtas  <zalan@apple.com>
2271
2272         Make paintTextWithShadows a member function (TextPainter).
2273         https://bugs.webkit.org/show_bug.cgi?id=151979
2274
2275         Reviewed by Simon Fraser.
2276
2277         This patch also simplifies paintTextWithShadows and
2278         rearranges some of the functions' arguments. 
2279
2280         No change in functionality.
2281
2282         * rendering/TextPainter.cpp:
2283         (WebCore::TextPainter::drawTextOrEmphasisMarks):
2284         (WebCore::TextPainter::paintTextWithShadows):
2285         (WebCore::TextPainter::paintEmphasisMarksIfNeeded):
2286         (WebCore::TextPainter::paintTextWithStyle):
2287         (WebCore::TextPainter::paintText):
2288         (WebCore::drawTextOrEmphasisMarks): Deleted.
2289         (WebCore::paintTextWithShadows): Deleted.
2290         * rendering/TextPainter.h:
2291
2292 2015-12-07  Brady Eidson  <beidson@apple.com>
2293
2294         Modern IDB: storage/indexeddb/factory-deletedatabase.html fails.
2295         https://bugs.webkit.org/show_bug.cgi?id=151966
2296
2297         Reviewed by Sam Weinig.
2298
2299         No new tests (At least one failing test now passes).
2300
2301         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2302         (WebCore::IDBClient::IDBOpenDBRequest::onDeleteDatabaseSuccess): The spec says that the result of
2303           deleteDatabase should be undefined. Without explicitly making it undefined, it's incorrectly null.
2304
2305 2015-12-07  Brady Eidson  <beidson@apple.com>
2306
2307         Modern IDB: storage/indexeddb/cursor-continue-validity.html fails.
2308         https://bugs.webkit.org/show_bug.cgi?id=151961
2309
2310         Reviewed by Alex Christensen.
2311
2312         No new tests (At least one failing test now passes).
2313
2314         When an index cursor's iterator was invalidated, there were some cases where it did 
2315         not correctly find the next iterator to pick up where it left off.
2316
2317         * Modules/indexeddb/client/IDBCursorImpl.cpp:
2318         (WebCore::IDBClient::IDBCursor::update):
2319         (WebCore::IDBClient::IDBCursor::deleteFunction):
2320         
2321         * Modules/indexeddb/server/IndexValueStore.cpp:
2322         (WebCore::IDBServer::IndexValueStore::find):
2323         (WebCore::IDBServer::IndexValueStore::loggingString):
2324         * Modules/indexeddb/server/IndexValueStore.h:
2325
2326 2015-12-07  Zalan Bujtas  <zalan@apple.com>
2327
2328         Refactor TextPainter::paintText() into sub methods.
2329         https://bugs.webkit.org/show_bug.cgi?id=151962
2330
2331         Reviewed by Myles C. Maxfield.
2332
2333         No change in functionality.
2334
2335         * rendering/TextPainter.cpp:
2336         (WebCore::TextPainter::paintTextWithEmphasisIfNeeded):
2337         (WebCore::TextPainter::paintTextWithStyle):
2338         (WebCore::TextPainter::paintText):
2339         * rendering/TextPainter.h:
2340
2341 2015-12-07  Gwang Yoon Hwang  <yoon@igalia.com>
2342
2343         [GTK] Clean up virtual functions in MediaPlayerPrivateGStreamerBase
2344         https://bugs.webkit.org/show_bug.cgi?id=151940
2345
2346         Reviewed by Carlos Garcia Campos.
2347
2348         - Using 'override' when appropriate
2349         - Explicitly marking methods as virtual when they are inherently virtual
2350
2351         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2352
2353 2015-12-07  Saam barati  <sbarati@apple.com>
2354
2355         Add op_watchdog opcode that is generated when VM has a watchdog
2356         https://bugs.webkit.org/show_bug.cgi?id=151954
2357
2358         Reviewed by Mark Lam.
2359
2360         No new tests because JSC already has tests for this.
2361
2362         * bindings/js/WorkerScriptController.cpp:
2363         (WebCore::WorkerScriptController::scheduleExecutionTermination):
2364         (WebCore::WorkerScriptController::isTerminatingExecution):
2365
2366 2015-12-07  Brian Burg  <bburg@apple.com>
2367
2368         Web Inspector: Uncaught Exception page should have better styles and handle more error cases
2369         https://bugs.webkit.org/show_bug.cgi?id=151923
2370
2371         Reviewed by Timothy Hatcher.
2372
2373         Add a check for InspectorFrontendAPI before calling it. This can fail
2374         easily if an uncaught exception stalls initial loading, or whenever
2375         the Inspector frontend is reloaded.
2376
2377         * inspector/InspectorFrontendClientLocal.cpp:
2378         (WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
2379
2380 2015-12-07  Beth Dakin  <bdakin@apple.com>
2381
2382         Hook up request and show for typing candidates in WK1
2383         https://bugs.webkit.org/show_bug.cgi?id=151831
2384         -and corresponding-
2385         <rdar://problem/23751214>
2386
2387         Reviewed by Enrica Casucci.
2388
2389         New SPI that is needed.
2390         * WebCore.xcodeproj/project.pbxproj:
2391         * platform/spi/mac/NSSpellCheckerSPI.h: Added.
2392
2393         Request candidates for editable content whenever selection changes.
2394         * editing/Editor.cpp:
2395         (WebCore::Editor::respondToChangedSelection):
2396
2397         Implement requestCandidatesForSelection on the EditorClient.
2398         * loader/EmptyClients.h:
2399         * page/EditorClient.h:
2400         (WebCore::EditorClient::requestCandidatesForSelection):
2401
2402 2015-12-07  Brady Eidson  <beidson@apple.com>
2403
2404         Modern IDB: Fix "old versions" when upgrading databases.
2405         https://bugs.webkit.org/show_bug.cgi?id=151948
2406
2407         Reviewed by Alex Christensen.
2408
2409         No new tests (5 failing tests now pass, and updated results for a 6th test).
2410
2411         This includes the old version on the IDBVersionChangeEvent, as well as the version the 
2412         IDBDatabase is left with if the version change transaction is aborted.
2413
2414         Primary mechanism of the fix is to include the original IDBDatabaseInfo along with 
2415         IDBTransactionInfos that represent version change transactions.
2416
2417         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2418         (WebCore::IDBClient::IDBDatabase::willAbortTransaction):
2419         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
2420
2421         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2422         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
2423
2424         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2425         (WebCore::IDBClient::IDBTransaction::IDBTransaction): Deleted.
2426         (WebCore::IDBClient::IDBTransaction::finishAbortOrCommit): Deleted.
2427         * Modules/indexeddb/client/IDBTransactionImpl.h:
2428         (WebCore::IDBClient::IDBTransaction::info):
2429         (WebCore::IDBClient::IDBTransaction::originalDatabaseInfo):
2430
2431         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2432         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
2433         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
2434         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
2435         (WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
2436
2437         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
2438         (WebCore::IDBTransactionInfo::versionChange):
2439         (WebCore::IDBTransactionInfo::IDBTransactionInfo):
2440         (WebCore::IDBTransactionInfo::isolatedCopy):
2441         * Modules/indexeddb/shared/IDBTransactionInfo.h:
2442         (WebCore::IDBTransactionInfo::originalDatabaseInfo):
2443
2444 2015-12-07  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
2445
2446         Update Objective-C code generator to pass a reference to calling object for partial interfaces
2447         https://bugs.webkit.org/show_bug.cgi?id=151739
2448
2449         Reviewed by Darin Adler.
2450
2451         The fix updates the Objective-C code generator to pass a reference to calling object for partial interfaces.
2452         The change from pass by pointer to pass by reference was introduced in r192849.
2453
2454         * bindings/scripts/CodeGeneratorObjC.pm:
2455         (GenerateImplementation):
2456         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
2457         (-[DOMTestInterface supplementalStr1]):
2458         (-[DOMTestInterface supplementalStr2]):
2459         (-[DOMTestInterface setSupplementalStr2:]):
2460         (-[DOMTestInterface supplementalStr3]):
2461         (-[DOMTestInterface setSupplementalStr3:]):
2462         (-[DOMTestInterface supplementalNode]):
2463         (-[DOMTestInterface setSupplementalNode:]):
2464         (-[DOMTestInterface builtinAttribute]):
2465         (-[DOMTestInterface setBuiltinAttribute:]):
2466         (-[DOMTestInterface supplementalMethod1]):
2467         (-[DOMTestInterface supplementalMethod2:objArg:]):
2468         (-[DOMTestInterface supplementalMethod3]):
2469         (-[DOMTestInterface supplementalMethod4]):
2470         (-[DOMTestInterface builtinFunction]):
2471
2472 2015-12-07  Chris Dumez  <cdumez@apple.com>
2473
2474         Crash in MemoryCache::pruneDeadResourcesToSize()
2475         https://bugs.webkit.org/show_bug.cgi?id=151833
2476         <rdar://problem/22392235>
2477
2478         Reviewed by David Kilzer.
2479
2480         MemoryCache::pruneDeadResourcesToSize() is iterating over m_allResources
2481         (which is a vector of LRUList). It first destroys decoded data for each
2482         resource in the LRUList. Then, if it does not suffice to reach the
2483         target size, and starts actually removing resources from the cache.
2484
2485         The issue is that this code alters m_allResources (and its LRULists) as
2486         it is iterating over it. We tried to deal with this in various ways:
2487         1. Increment the iterator before removing the resource pointed by the
2488           iterator.
2489         2. Protect the next resource in the LRUList and abort early if it is no
2490           longer in the cache.
2491
2492         This adds code complexity and apparently does not correctly handle all
2493         the edge cases as we still see crashes in this code. In particular, I
2494         suspect that 2. may not be sufficient if it is possible for the next
2495         resource to be moved to another LRUList (in which case, next->inCache()
2496         would still return true but the iterator would however become invalid).
2497
2498         To make the code simpler and more robust, this patch copies the LRUList
2499         (and refs the CachedResources) before iterating over it. This is a lot
2500         safer and should hopefully fix the crashes we see in this function.
2501
2502         No new tests, no reproduction case.
2503
2504         * loader/cache/MemoryCache.cpp:
2505         (WebCore::MemoryCache::pruneDeadResourcesToSize):
2506
2507 2015-12-07  Brady Eidson  <beidson@apple.com>
2508
2509         Modern IDB: Add some more custom exception messages, passing some more tests..
2510         https://bugs.webkit.org/show_bug.cgi?id=151912
2511
2512         Reviewed by Andy Estes.
2513
2514         No new tests (Covered by existing tests).
2515
2516         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2517         (WebCore::IDBClient::IDBObjectStore::index):
2518         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2519         (WebCore::IDBClient::IDBTransaction::objectStore):
2520
2521 2015-12-07  Gwang Yoon Hwang  <yoon@igalia.com>
2522
2523         [ThreadedCompositor] Add support for PlatformLayer.
2524         https://bugs.webkit.org/show_bug.cgi?id=143299
2525
2526         Reviewed by Žan Doberšek.
2527
2528         This patch implements TextureMapperPlatformLayerProxy and TextureMapperPlatformLayerBuffer to
2529         send a texture (actual texture or BitmapTexture) to the compositing thread directly.
2530         Platform layer renderers should implement TextureMapperPlatformLayerProxyProvider to establish
2531         a connection to the compositing thread. After the connection has been established, the renderer
2532         can render its contents to the TextureMapperPlatformLayerBuffer and pass it to the compositing thread
2533         via TextureMapperPlatformLayer proxy.
2534         The buffer can be an unmanaged texture (a.k.a. platform texture) or BitmapTexture.
2535         For the unmanaged texture, the renderer should manage its life cycle itself. For the BitmapTexture,
2536         it will be managed by TextureMapperPlatformLayerProxy. In that case, used (swapped) buffer will be
2537         recycled because the renderer will use same size and format until it changes its size.
2538
2539         No new tests needed.
2540
2541         * PlatformGTK.cmake:
2542         Adds TextureMapperPlatformLayerBuffer and TextureMapperPlaytformLayerProxy.
2543
2544         * platform/graphics/GraphicsContext3DPrivate.cpp:
2545         * platform/graphics/GraphicsContext3DPrivate.h:
2546         * platform/graphics/cairo/ImageBufferCairo.cpp:
2547         * platform/graphics/cairo/ImageBufferDataCairo.h:
2548         Adds mock implementation.
2549
2550         * platform/graphics/PlatformLayer.h:
2551         Adds TextureMapperPlatformLayerProxyProvider as a PlatformLayer for the Threaded Compositor
2552
2553         * platform/graphics/texmap/BitmapTextureGL.h:
2554         (WebCore::BitmapTextureGL::internalFormat): Adds a getter to check the
2555         internal format of texture to check reusability.
2556
2557         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2558         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
2559         * platform/graphics/texmap/TextureMapperLayer.cpp:
2560         * platform/graphics/texmap/TextureMapperLayer.h:
2561         Exclude GraphicsLayerTextureMapper from build when we are using Coordinated Graphics.
2562
2563         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: Added.
2564         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: Added.
2565         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: Added.
2566         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h: Added.
2567
2568         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2569         (WebCore::GraphicsLayer::create):
2570         Because we removed GraphicsLayerTextureMapper from build, we need to add own factory function.
2571
2572         (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
2573         (WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
2574         (WebCore::CoordinatedGraphicsLayer::platformLayerWillBeDestroyed):
2575         (WebCore::CoordinatedGraphicsLayer::setPlatformLayerNeedsDisplay):
2576         Implements sync operations for TextureMapperPlatformLayerProxy
2577
2578 2015-12-07  Gwang Yoon Hwang  <yoon@igalia.com>
2579
2580         Fix GTK+ build with GStreamer GL
2581         https://bugs.webkit.org/show_bug.cgi?id=151939
2582
2583         Reviewed by Žan Doberšek.
2584
2585         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2586         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
2587         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
2588         (WebCore::MediaPlayerPrivateGStreamerBase::drawCallback):
2589         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2590
2591 2015-12-06  Simon Fraser  <simon.fraser@apple.com>
2592
2593         Show more information about SVG renderers in showLayerTree() output
2594         https://bugs.webkit.org/show_bug.cgi?id=151930
2595
2596         Reviewed by Zalan Bujtas.
2597         
2598         In showLayerTree() output, for SVG renderers show:
2599         - visual and layout overflow, for boxes
2600         - frame rect, for boxes
2601         - layout state
2602         - class and id
2603
2604         * rendering/RenderLayer.cpp:
2605         (WebCore::showLayerTree):
2606         * rendering/RenderTreeAsText.cpp:
2607         (WebCore::RenderTreeAsText::writeRenderObject):
2608         (WebCore::writeDebugInfo): New function to share dumping with svg output.
2609         (WebCore::write):
2610         * rendering/RenderTreeAsText.h:
2611         * rendering/svg/SVGRenderTreeAsText.cpp:
2612         (WebCore::writePositionAndStyle): Show the frameRect for boxes (e.g. RenderSVGRoot).
2613         Much more useful that showing the clippedOverflowRect.
2614         (WebCore::writeStandardPrefix):
2615         (WebCore::writeChildren):
2616         (WebCore::writeSVGResourceContainer):
2617         (WebCore::writeSVGContainer):
2618         (WebCore::write):
2619         (WebCore::writeSVGText):
2620         (WebCore::writeSVGInlineText):
2621         (WebCore::writeSVGImage):
2622         (WebCore::writeSVGGradientStop):
2623         (WebCore::writeResources):
2624         (WebCore::operator<<): Deleted.
2625         * rendering/svg/SVGRenderTreeAsText.h:
2626
2627 2015-12-06  Simon Fraser  <simon.fraser@apple.com>
2628
2629         Clipping along compositing borders in svg-edit
2630         https://bugs.webkit.org/show_bug.cgi?id=151791
2631
2632         Reviewed by Zalan Bujtas.
2633         
2634         RenderSVGRoot::layout() failed to clear overflow before recomputing
2635         visual overflow, which could cause it to get stuck with stale overflow.
2636         This would cause underpainting if its size went from small to large.
2637
2638         Test: svg/overflow/visual-overflow-change.html
2639
2640         * rendering/svg/RenderSVGRoot.cpp:
2641         (WebCore::RenderSVGRoot::layout):
2642
2643 2015-12-06  Simon Fraser  <simon.fraser@apple.com>
2644
2645         REGRESSION (r187121): Can't get to the main content of the page at https://theintercept.com/drone-papers/
2646         https://bugs.webkit.org/show_bug.cgi?id=151849
2647         rdar://problem/23132828
2648
2649         Reviewed by Zalan Bujtas.
2650         
2651         This page uses a fill-forwards animation where the last keyframe has height: auto.
2652         After r187121, we tried to blend the height Length value from the last keyframe to the
2653         first keyframe with progress=0 (which should pick up the 'auto' from the last keyframe).
2654         
2655         However, Length::blend() just considered both 0 and 'auto' to be zero, and returned
2656         the 0 length.
2657         
2658         So fix Length::blend() to return the "from" length if progress is zero.
2659
2660         Test: animations/fill-forwards-auto-height.html
2661
2662         * page/animation/CSSPropertyAnimation.cpp:
2663         (WebCore::blendFunc): Length::blend takes a double, so don't narrow to float.
2664         * page/animation/KeyframeAnimation.cpp:
2665         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty): Declare two variables
2666         at first use.
2667         * platform/Length.h:
2668         (WebCore::Length::blend):
2669
2670 2015-12-06  Simon Fraser  <simon.fraser@apple.com>
2671
2672         Give SVGTransformList some inline vector capacity
2673         https://bugs.webkit.org/show_bug.cgi?id=151644
2674
2675         Reviewed by Andreas Kling.
2676
2677         Giving SVGTransformList inline capacity of one drops time under SVGTransformList::parse() by
2678         about 1% on http://animateplus.com/demos/stress-test/
2679
2680         * svg/SVGTransformList.h:
2681
2682 2015-12-06  Zalan Bujtas  <zalan@apple.com>
2683
2684         Addressing post-review comments on r193374.
2685
2686         Reviewed by Antti Koivisto.
2687
2688         * rendering/SimpleLineLayout.cpp:
2689         (WebCore::SimpleLineLayout::canUseForText):
2690         (WebCore::SimpleLineLayout::canUseForFontAndText):
2691         (WebCore::SimpleLineLayout::canUseForStyle):
2692         (WebCore::SimpleLineLayout::canUseForWithReason):
2693         (WebCore::SimpleLineLayout::canUseFor):
2694         (WebCore::SimpleLineLayout::printSimpleLineLayoutBlockList):
2695         (WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):
2696
2697 2015-12-04  Myles C. Maxfield  <mmaxfield@apple.com>
2698
2699         Remove CORETEXT_WEB_FONTS
2700         https://bugs.webkit.org/show_bug.cgi?id=151891
2701
2702         Reviewed by Simon Fraser.
2703
2704         The only platform where this was turned off (Mavericks) is no longer supported.
2705
2706         No new tests because there is no behavior difference.
2707
2708         * platform/graphics/cocoa/FontCocoa.mm:
2709         (WebCore::Font::platformCreateScaledFont): Deleted.
2710         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
2711         (WebCore::FontPlatformData::registeredFont):
2712         (WebCore::FontPlatformData::ctFont):
2713         * platform/graphics/mac/FontCustomPlatformData.cpp:
2714         (WebCore::FontCustomPlatformData::fontPlatformData): Deleted.
2715         (WebCore::createFontCustomPlatformData): Deleted.
2716         * platform/graphics/mac/FontCustomPlatformData.h:
2717         (WebCore::FontCustomPlatformData::FontCustomPlatformData): Deleted.
2718         * platform/text/TextFlags.h:
2719
2720 2015-12-04  Zalan Bujtas  <zalan@apple.com>
2721
2722         Garbage in page tiles when document is too long.
2723         https://bugs.webkit.org/show_bug.cgi?id=151906
2724         rdar://problem/23695858
2725
2726         Reviewed by Simon Fraser.
2727
2728         This patch partially fixes the broken concept(webkit.org/b/151908) of having a nearlyMax/2 sized rectangle to define infiniteness.
2729         (see LayoutRect::infiniteRect() and ClipRect::isInfinite())
2730
2731         Covered by existing test.
2732
2733         * rendering/ClipRect.h: Branch for infinite clipping.
2734         (WebCore::ClipRect::intersect):
2735         (WebCore::ClipRect::intersects):
2736         * rendering/RenderLayer.cpp:
2737         (WebCore::RenderLayer::clipToRect): Do not clip when clipping is infinite.
2738         (WebCore::RenderLayer::restoreClip):
2739         (WebCore::RenderLayer::calculateClipRects):
2740
2741 2015-12-04  Brady Eidson  <beidson@apple.com>
2742
2743         Modern IDB: Add some more custom exception messages, passing some more tests.
2744         https://bugs.webkit.org/show_bug.cgi?id=151898
2745
2746         Reviewed by Alex Christensen.
2747
2748         No new tests (Some failing tests now pass).
2749
2750         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2751         (WebCore::IDBClient::IDBTransaction::objectStore):
2752
2753 2015-12-04  Brent Fulgham  <bfulgham@apple.com>
2754
2755         Place an upper bound on canvas pixel count
2756         https://bugs.webkit.org/show_bug.cgi?id=151825
2757         <rdar://problem/23324916>
2758
2759         Reviewed by Simon Fraser.
2760
2761         Malformed JavaScript can attempt to create lots of canvas contexts. Limit the amount of memory
2762         we will use for this purpose to some percentage of system RAM.
2763
2764         * html/HTMLCanvasElement.cpp:
2765         (WebCore::removeFromActivePixelMemory): Added helper function
2766         (WebCore::HTMLCanvasElement::~HTMLCanvasElement): Call new 'releaseImageBufferAndContext' method
2767         to ensure ImageBuffer and graphics context state are properly cleaned up.
2768         (WebCore::maxActivePixels): Use one quarter of the system RAM, or 1 GB (whichever is more) as
2769         an upper bound on active pixel memory.
2770         (WebCore::HTMLCanvasElement::getContext): If we are attempting to create a context that will cause
2771         us to exceed the allowed active pixel count, fail.
2772         (WebCore::HTMLCanvasElement::releaseImageBufferAndContext): Added helper function
2773         (WebCore::HTMLCanvasElement::setSurfaceSize): Use the new 'releaseImageBufferAndContext' method
2774         to handle active pixel memory counts.
2775         (WebCore::HTMLCanvasElement::createImageBuffer): Refuse to create a backing buffer if it will
2776         exceed our available pixel memory.
2777
2778 2015-12-04  Brady Eidson  <beidson@apple.com>
2779
2780         Modern IDB: Add some more custom exception messages, passing some more tests.
2781         https://bugs.webkit.org/show_bug.cgi?id=151895
2782
2783         Reviewed by Alex Christensen.
2784
2785         No new tests (Some failing tests now pass).
2786
2787         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2788         (WebCore::IDBClient::IDBDatabase::transaction):
2789
2790         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2791         (WebCore::IDBClient::IDBObjectStore::deleteIndex):
2792
2793 2015-12-04  Jonathan Davis  <jond@apple.com>
2794
2795         Update feature status for up-to-date status information.
2796         https://bugs.webkit.org/show_bug.cgi?id=151821
2797
2798         Reviewed by Timothy Hatcher.
2799
2800         * features.json:
2801
2802 2015-12-04  Brady Eidson  <beidson@apple.com>
2803
2804         Modern IDB: Flip test expectations around so we only list failures.
2805         https://bugs.webkit.org/show_bug.cgi?id=151880
2806
2807         Reviewed by Alex Christensen.
2808
2809         No new tests (Covered by all existing tests).
2810
2811         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2812         (WebCore::IDBClient::IDBRequest::stop):
2813         (WebCore::IDBClient::IDBRequest::enqueueEvent):
2814         (WebCore::IDBClient::IDBRequest::dispatchEvent):
2815         * Modules/indexeddb/client/IDBRequestImpl.h:
2816         
2817         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2818         (WebCore::IDBClient::IDBTransaction::abortDueToFailedRequest):
2819         (WebCore::IDBClient::IDBTransaction::hasPendingActivity):
2820         (WebCore::IDBClient::IDBTransaction::stop):
2821         (WebCore::IDBClient::IDBTransaction::enqueueEvent):
2822         (WebCore::IDBClient::IDBTransaction::dispatchEvent):
2823         * Modules/indexeddb/client/IDBTransactionImpl.h:
2824         
2825         * bindings/js/IDBBindingUtilities.cpp:
2826         (WebCore::idbKeyToScriptValue): Protection against a ScriptExecutionContext that no longer has an ExecState.
2827           A full reworking on the binding utilities to prevent this through is covered by b/151890
2828
2829 2015-12-04  Myles C. Maxfield  <mmaxfield@apple.com>
2830
2831         [Cocoa] Some fonts cause CTFontCopyAvailableTables() to return nullptr
2832         https://bugs.webkit.org/show_bug.cgi?id=151884
2833         <rdar://problem/23752253>
2834
2835         Reviewed by Brian Burg.
2836
2837         No new tests.
2838
2839         * platform/graphics/opentype/OpenTypeCG.cpp:
2840         (WebCore::OpenType::fontHasMathTable):
2841
2842 2015-12-04  Jer Noble  <jer.noble@apple.com>
2843
2844         Unreviewed build-fix; Add new parameter to overloaded createSession() method in MediaPlayerPrivateAVFoundationCF.
2845
2846         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
2847         (WebCore::CDMSessionAVFoundationCF::CDMSessionAVFoundationCF):
2848         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
2849         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
2850         (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
2851         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
2852
2853 2015-12-01  Jer Noble  <jer.noble@apple.com>
2854
2855         Adopt AVContentKeySession
2856         https://bugs.webkit.org/show_bug.cgi?id=151221
2857
2858         Reviewed by Eric Carlson.
2859
2860         Adopt a new API for managing key state, AVContentKeySession. Because this necessitates a change
2861         in both the initialization data returned by the needkey event, and passed into the createSession()
2862         method, bump the protocol version number (to 3), and keep supporting the old key management API
2863         for legacy content.
2864
2865         To do so, move most of the implementation of CDMPrivateMediaSourceAVFObjC into a new subclass,
2866         CDMSessionAVStreamSession, and add a new subclass, CDMSessionAVContentKeySession, to support the
2867         new API.
2868
2869         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
2870         (WebCore::CDMPrivateMediaSourceAVFObjC::CDMPrivateMediaSourceAVFObjC): Moved to implementation file.
2871         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
2872         (WebCore::validKeySystemRE): Support "com.apple.fps.3_x".
2873         (WebCore::CDMPrivateMediaSourceAVFObjC::~CDMPrivateMediaSourceAVFObjC): Invalidate all outstanding sessions.
2874         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Only support "com.apple.fps.3_x" if the AVContentKeySession class is available.
2875         (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Create an instance of CDMSessionAVContentKeySession if "com.apple.fps.3_x" is specified and AVContentKeySession is available.
2876         (WebCore::CDMPrivateMediaSourceAVFObjC::invalidateSession): Remove session from the list of outstanding sessions.
2877         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): Deleted.
2878         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h: Copied from Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h.
2879         (WebCore::CDMSessionAVContentKeySession::hasContentKeySession): Simple accessor.
2880         (WebCore::toCDMSessionAVContentKeySession): Safe casting.
2881         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: Added.
2882         (-[CDMSessionAVContentKeySessionDelegate initWithParent:]): Simple constructor.
2883         (-[CDMSessionAVContentKeySessionDelegate invalidate]): Remove reference to parent.
2884         (-[CDMSessionAVContentKeySessionDelegate contentKeySession:willProvideKeyRequestInitializationDataForTrackID:]): Pass to parent.
2885         (-[CDMSessionAVContentKeySessionDelegate contentKeySession:didProvideKeyRequestInitializationData:requestHandling:]): Ditto.
2886         (-[CDMSessionAVContentKeySessionDelegate contentKeySessionContentProtectionSessionIdentifierDidChange:]): Ditto.
2887         (WebCore::CDMSessionAVContentKeySession::CDMSessionAVContentKeySession): Create the delegate.
2888         (WebCore::CDMSessionAVContentKeySession::~CDMSessionAVContentKeySession): Invalidate the delegate and remove all parsers.
2889         (WebCore::CDMSessionAVContentKeySession::isAvailable): Return true if AVContentKeySession class is available.
2890         (WebCore::CDMSessionAVContentKeySession::generateKeyRequest): Support "keyrelease" message, setting of the certificate, and creating key request object. 
2891         (WebCore::CDMSessionAVContentKeySession::releaseKeys): Retrieve keys from storage location.
2892         (WebCore::isEqual): Compares a Uint8Array to a char*.
2893         (WebCore::CDMSessionAVContentKeySession::update): Support "acknowledged" message, "renew" message, and key addition.
2894         (WebCore::CDMSessionAVContentKeySession::addParser): Add the parser to the AVContentKeySession.
2895         (WebCore::CDMSessionAVContentKeySession::removeParser): Remove parser from same.
2896         (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage): Retrieve key release message from AVContentKeySession.
2897         (WebCore::CDMSessionAVContentKeySession::didProvideContentKeyRequest): Simple setter.
2898         (WebCore::CDMSessionAVContentKeySession::contentKeySession): Lazily create the AVContentKeySession.
2899         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
2900         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
2901         (WebCore::CDMSessionAVFoundationObjC::CDMSessionAVFoundationObjC):
2902         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h: Copied from Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h.
2903         (WebCore::toCDMSessionAVStreamSession):
2904         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: Copied from Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm.
2905         (-[CDMSessionAVStreamSessionObserver initWithParent:]): Moved from CDMSessionMediaSourceAVFObjcObserver.
2906         (-[CDMSessionAVStreamSessionObserver contentProtectionSessionIdentifierChanged:]): Ditto.
2907         (WebCore::CDMSessionAVStreamSession::CDMSessionAVStreamSession): Ditto.
2908         (WebCore::CDMSessionAVStreamSession::~CDMSessionAVStreamSession): Ditto.
2909         (WebCore::CDMSessionAVStreamSession::generateKeyRequest): Ditto.
2910         (WebCore::CDMSessionAVStreamSession::releaseKeys): Ditto.
2911         (WebCore::isEqual): Ditto.
2912         (WebCore::CDMSessionAVStreamSession::update): Ditto.
2913         (WebCore::CDMSessionAVStreamSession::setStreamSession): Ditto.
2914         (WebCore::CDMSessionAVStreamSession::addParser): Ditto.
2915         (WebCore::CDMSessionAVStreamSession::removeParser): Ditto.
2916         (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage): Ditto.
2917         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2918         (WebCore::CDMSessionMediaSourceAVFObjC::invalidateCDM): Clear the m_cdm.
2919         (WebCore::toCDMSessionMediaSourceAVFObjC):
2920         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
2921         (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
2922         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Instruct our CDM to invalidate their references to us.
2923         (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): Call addParser().
2924         (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Call removeParser().
2925         (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Deleted.
2926         (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Deleted.
2927         
2928         To give us a chance to create a CDMPrivate before we continue decoding media data, "block" further decoding
2929         on the background thread by creating a semaphore and passing it to the main thread, to be triggered when
2930         a CDM is created and attached to this source buffer.
2931
2932         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
2933         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2934         (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
2935         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
2936         (WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
2937         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
2938         (WebCore::SourceBufferPrivateAVFObjC::setCDMSession):
2939         (-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Deleted.
2940         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2941
2942         Drive-by fix: Only throw an error from keyRequestTimerFired() if the underlying call to
2943         generateKeyRequest() returned an error, rather than just failed to create a message.
2944
2945         * Modules/encryptedmedia/MediaKeySession.cpp:
2946         (WebCore::MediaKeySession::keyRequestTimerFired):
2947
2948         Drive-by fix: Pass the CDMSessionClient into CDM::createSession() so that it is immediately available
2949         in the CDMSessionPrivate constructor, rather than setting the client immediately after construction.
2950
2951         * Modules/encryptedmedia/CDM.cpp:
2952         (WebCore::CDM::createSession):
2953         * Modules/encryptedmedia/CDM.h:
2954         * Modules/encryptedmedia/CDMPrivate.h:
2955         * Modules/encryptedmedia/CDMPrivateClearKey.cpp:
2956         (WebCore::CDMPrivateClearKey::createSession):
2957         * Modules/encryptedmedia/CDMPrivateClearKey.h:
2958         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:
2959         (WebCore::CDMPrivateMediaPlayer::createSession):
2960         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
2961         * Modules/encryptedmedia/CDMSessionClearKey.cpp:
2962         (WebCore::CDMSessionClearKey::CDMSessionClearKey):
2963         * Modules/encryptedmedia/CDMSessionClearKey.h:
2964         * Modules/encryptedmedia/MediaKeySession.cpp:
2965         (WebCore::MediaKeySession::MediaKeySession):
2966         * platform/graphics/CDMSession.h:
2967         * platform/graphics/MediaPlayer.cpp:
2968         (WebCore::MediaPlayer::createSession):
2969         * platform/graphics/MediaPlayer.h:
2970         * platform/graphics/MediaPlayerPrivate.h:
2971         (WebCore::MediaPlayerPrivateInterface::createSession):
2972         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
2973         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2974         (WebCore::MediaPlayerPrivateAVFoundationObjC::createSession):
2975         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
2976         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmSession):
2977         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
2978         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
2979         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::keyNeeded): Deleted.
2980         * testing/MockCDM.cpp:
2981         (WebCore::MockCDM::createSession):
2982         (WebCore::MockCDMSession::MockCDMSession):
2983         * testing/MockCDM.h:
2984
2985         Add new files to the project:
2986
2987         * WebCore.xcodeproj/project.pbxproj:
2988
2989
2990 2015-12-04  Brady Eidson  <beidson@apple.com>
2991
2992         Modern IDB: storage/indexeddb/cursor-update.html fails.
2993         https://bugs.webkit.org/show_bug.cgi?id=151879
2994
2995         Reviewed by Oliver Hunt.
2996
2997         No new tests (At least one failing test now passes).
2998
2999         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3000         (WebCore::IDBClient::IDBRequest::IDBRequest):
3001
3002 2015-12-04  Brady Eidson  <beidson@apple.com>
3003
3004         Modern IDB: storage/indexeddb/version-change-exclusive.html fails
3005         https://bugs.webkit.org/show_bug.cgi?id=151870
3006
3007         Reviewed by Alex Christensen.
3008
3009         Test: storage/indexeddb/modern/double-open.html
3010               storage/indexeddb/version-change-exclusive.html
3011
3012         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
3013         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): Delay handling open operations
3014           while the first is still in progress.
3015         (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
3016         * Modules/indexeddb/server/UniqueIDBDatabase.h:
3017
3018 2015-12-04  Brady Eidson  <beidson@apple.com>
3019
3020         Modern IDB: storage/indexeddb/exceptions.html fails.
3021         https://bugs.webkit.org/show_bug.cgi?id=151732
3022
3023         Reviewed by Alex Christensen.
3024
3025         No new tests (At least one failing test now passes).
3026
3027         - Lots of customized exception messages for IDB code to match the text expectations.
3028         - Updates to the test expectations where we can't/won't match them exactly.
3029         - And a couple of little required behavior changes exposed by the test
3030
3031         * Modules/indexeddb/IDBCursor.h:
3032         * Modules/indexeddb/IDBCursor.idl:
3033         * Modules/indexeddb/IDBDatabase.h:
3034         * Modules/indexeddb/IDBDatabase.idl:
3035         * Modules/indexeddb/IDBDatabaseException.cpp:
3036         (WebCore::IDBDatabaseException::initializeDescription):
3037         * Modules/indexeddb/IDBFactory.h:
3038         * Modules/indexeddb/IDBFactory.idl:
3039         * Modules/indexeddb/IDBIndex.h:
3040         * Modules/indexeddb/IDBIndex.idl:
3041         * Modules/indexeddb/IDBObjectStore.h:
3042         * Modules/indexeddb/IDBObjectStore.idl:
3043         * Modules/indexeddb/IDBRequest.h:
3044         * Modules/indexeddb/IDBRequest.idl:
3045         * Modules/indexeddb/IDBTransaction.h:
3046         * Modules/indexeddb/IDBTransaction.idl:
3047         
3048         * Modules/indexeddb/client/IDBCursorImpl.cpp:
3049         (WebCore::IDBClient::IDBCursor::update):
3050         (WebCore::IDBClient::IDBCursor::advance):
3051         (WebCore::IDBClient::IDBCursor::continueFunction):
3052         (WebCore::IDBClient::IDBCursor::deleteFunction):
3053         * Modules/indexeddb/client/IDBCursorImpl.h:
3054         
3055         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
3056         (WebCore::IDBClient::IDBDatabase::createObjectStore):
3057         (WebCore::IDBClient::IDBDatabase::transaction):
3058         (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
3059         * Modules/indexeddb/client/IDBDatabaseImpl.h:
3060         
3061         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
3062         (WebCore::IDBClient::IDBFactory::cmp):
3063         * Modules/indexeddb/client/IDBFactoryImpl.h:
3064         
3065         * Modules/indexeddb/client/IDBIndexImpl.cpp:
3066         (WebCore::IDBClient::IDBIndex::openCursor):
3067         (WebCore::IDBClient::IDBIndex::count):
3068         (WebCore::IDBClient::IDBIndex::doCount):
3069         (WebCore::IDBClient::IDBIndex::openKeyCursor):
3070         (WebCore::IDBClient::IDBIndex::get):
3071         (WebCore::IDBClient::IDBIndex::doGet):
3072         (WebCore::IDBClient::IDBIndex::getKey):
3073         (WebCore::IDBClient::IDBIndex::doGetKey):
3074         * Modules/indexeddb/client/IDBIndexImpl.h:
3075         
3076         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
3077         (WebCore::IDBClient::IDBObjectStore::openCursor):
3078         (WebCore::IDBClient::IDBObjectStore::get):
3079         (WebCore::IDBClient::IDBObjectStore::add):
3080         (WebCore::IDBClient::IDBObjectStore::put):
3081         (WebCore::IDBClient::IDBObjectStore::putForCursorUpdate):
3082         (WebCore::IDBClient::IDBObjectStore::putOrAdd):
3083         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
3084         (WebCore::IDBClient::IDBObjectStore::clear):
3085         (WebCore::IDBClient::IDBObjectStore::createIndex):
3086         (WebCore::IDBClient::IDBObjectStore::index):
3087         (WebCore::IDBClient::IDBObjectStore::deleteIndex):
3088         (WebCore::IDBClient::IDBObjectStore::count):
3089         (WebCore::IDBClient::IDBObjectStore::doCount):
3090         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
3091
3092         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3093         (WebCore::IDBClient::IDBRequest::result):
3094         (WebCore::IDBClient::IDBRequest::error):
3095         * Modules/indexeddb/client/IDBRequestImpl.h:
3096
3097         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3098         (WebCore::IDBClient::IDBTransaction::objectStore):
3099         (WebCore::IDBClient::IDBTransaction::abortDueToFailedRequest):
3100         (WebCore::IDBClient::IDBTransaction::abort):
3101         * Modules/indexeddb/client/IDBTransactionImpl.h:
3102
3103         * Modules/indexeddb/legacy/LegacyCursor.cpp:
3104         (WebCore::LegacyCursor::update):
3105         (WebCore::LegacyCursor::continueFunction):
3106         (WebCore::LegacyCursor::deleteFunction):
3107         * Modules/indexeddb/legacy/LegacyCursor.h:
3108
3109         * Modules/indexeddb/legacy/LegacyDatabase.cpp:
3110         (WebCore::LegacyDatabase::createObjectStore):
3111         (WebCore::LegacyDatabase::deleteObjectStore):
3112         (WebCore::LegacyDatabase::transaction):
3113         (WebCore::LegacyDatabase::forceClose):
3114         * Modules/indexeddb/legacy/LegacyDatabase.h:
3115
3116         * Modules/indexeddb/legacy/LegacyFactory.cpp:
3117         (WebCore::LegacyFactory::cmp):
3118         * Modules/indexeddb/legacy/LegacyFactory.h:
3119
3120         * Modules/indexeddb/legacy/LegacyIndex.cpp:
3121         (WebCore::LegacyIndex::openCursor):
3122         (WebCore::LegacyIndex::count):
3123         (WebCore::LegacyIndex::openKeyCursor):
3124         (WebCore::LegacyIndex::get):
3125         (WebCore::LegacyIndex::getKey):
3126         * Modules/indexeddb/legacy/LegacyIndex.h:
3127
3128         * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
3129         (WebCore::LegacyObjectStore::get):
3130         (WebCore::LegacyObjectStore::add):
3131         (WebCore::LegacyObjectStore::put):
3132         (WebCore::LegacyObjectStore::deleteFunction):
3133         (WebCore::LegacyObjectStore::clear):
3134         (WebCore::LegacyObjectStore::createIndex):
3135         (WebCore::LegacyObjectStore::index):
3136         (WebCore::LegacyObjectStore::deleteIndex):
3137         (WebCore::LegacyObjectStore::openCursor):
3138         (WebCore::LegacyObjectStore::count):
3139         * Modules/indexeddb/legacy/LegacyObjectStore.h:
3140         (WebCore::LegacyObjectStore::createIndex):
3141         (WebCore::LegacyObjectStore::count):
3142
3143         * Modules/indexeddb/legacy/LegacyRequest.cpp:
3144         (WebCore::LegacyRequest::result):
3145         (WebCore::LegacyRequest::error):
3146         (WebCore::LegacyRequest::dispatchEvent):
3147         (WebCore::LegacyRequest::uncaughtExceptionInEventHandler):
3148         * Modules/indexeddb/legacy/LegacyRequest.h:
3149
3150         * Modules/indexeddb/legacy/LegacyTransaction.cpp:
3151         (WebCore::LegacyTransaction::objectStore):
3152         (WebCore::LegacyTransaction::abort):
3153         (WebCore::LegacyTransaction::stop):
3154         * Modules/indexeddb/legacy/LegacyTransaction.h:
3155
3156         * bindings/js/JSDOMBinding.cpp:
3157         (WebCore::createDOMException): For IDBDatabase exceptions, use createWithDescriptionAsMessage
3158
3159         * bindings/js/JSIDBDatabaseCustom.cpp:
3160         (WebCore::JSIDBDatabase::createObjectStore):
3161         (WebCore::JSIDBDatabase::transaction):
3162
3163         * bindings/js/JSIDBObjectStoreCustom.cpp:
3164         (WebCore::putOrAdd):
3165         (WebCore::JSIDBObjectStore::createIndex):
3166
3167         * dom/DOMCoreException.h:
3168         (WebCore::DOMCoreException::createWithDescriptionAsMessage): Create an exception whose message
3169           is the description.
3170         (WebCore::DOMCoreException::DOMCoreException):
3171
3172         * dom/ExceptionBase.cpp:
3173         (WebCore::ExceptionBase::ExceptionBase): Add a flag to determine where the message comes from
3174         * dom/ExceptionBase.h:
3175
3176         * dom/make_dom_exceptions.pl:
3177         (generateHeader): Add an IDBDatabaseException type
3178
3179         * inspector/InspectorIndexedDBAgent.cpp:
3180
3181 2015-12-04  Joseph Pecoraro  <pecoraro@apple.com>
3182
3183         Web Inspector: Remove untested and unused Worker inspection
3184         https://bugs.webkit.org/show_bug.cgi?id=151848
3185
3186         Reviewed by Brian Burg.
3187
3188         * CMakeLists.txt:
3189         * WebCore.vcxproj/WebCore.vcxproj:
3190         * WebCore.vcxproj/WebCore.vcxproj.filters:
3191         * WebCore.xcodeproj/project.pbxproj:
3192         * bindings/js/JSBindingsAllInOne.cpp:
3193         * bindings/js/WorkerScriptController.cpp:
3194         * bindings/js/WorkerScriptDebugServer.cpp: Removed.
3195         * bindings/js/WorkerScriptDebugServer.h: Removed.
3196         * inspector/InspectorAllInOne.cpp:
3197         * inspector/InspectorConsoleInstrumentation.h:
3198         (WebCore::InspectorInstrumentation::addMessageToConsole):
3199         * inspector/InspectorController.cpp:
3200         (WebCore::InspectorController::InspectorController): Deleted.
3201         * inspector/InspectorInstrumentation.cpp:
3202         (WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStartImpl): Deleted.
3203         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScopeImpl): Deleted.
3204         (WebCore::InspectorInstrumentation::willEvaluateWorkerScript): Deleted.
3205         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminatedImpl): Deleted.
3206         (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope): Deleted.
3207         (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext): Deleted.
3208         * inspector/InspectorInstrumentation.h:
3209         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
3210         (WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart): Deleted.
3211         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScope): Deleted.
3212         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminated): Deleted.
3213         * inspector/InspectorTimelineAgent.h:
3214         * inspector/InspectorWebAgentBase.h:
3215         (WebCore::WorkerAgentContext::WorkerAgentContext): Deleted.
3216         * inspector/InspectorWorkerAgent.cpp: Removed.
3217         * inspector/InspectorWorkerAgent.h: Removed.
3218         * inspector/InspectorWorkerResource.h: Removed.
3219         * inspector/InstrumentingAgents.cpp:
3220         (WebCore::InstrumentingAgents::reset): Deleted.
3221         * inspector/InstrumentingAgents.h:
3222         (WebCore::InstrumentingAgents::workerRuntimeAgent): Deleted.
3223         (WebCore::InstrumentingAgents::setWorkerRuntimeAgent): Deleted.
3224         (WebCore::InstrumentingAgents::inspectorWorkerAgent): Deleted.
3225         (WebCore::InstrumentingAgents::setInspectorWorkerAgent): Deleted.
3226         * inspector/PageConsoleAgent.h:
3227         * inspector/PageScriptDebugServer.cpp:
3228         (WebCore::PageScriptDebugServer::PageScriptDebugServer):
3229         * inspector/WorkerConsoleAgent.cpp: Removed.
3230         * inspector/WorkerConsoleAgent.h: Removed.
3231         * inspector/WorkerDebuggerAgent.cpp: Removed.
3232         * inspector/WorkerDebuggerAgent.h: Removed.
3233         * inspector/WorkerInspectorController.cpp: Removed.
3234         * inspector/WorkerInspectorController.h: Removed.
3235         * inspector/WorkerRuntimeAgent.cpp: Removed.
3236         * inspector/WorkerRuntimeAgent.h: Removed.
3237         * workers/Worker.cpp:
3238         (WebCore::Worker::notifyFinished): Deleted.
3239         * workers/WorkerGlobalScope.cpp:
3240         (WebCore::WorkerGlobalScope::WorkerGlobalScope): Deleted.
3241         (WebCore::WorkerGlobalScope::~WorkerGlobalScope): Deleted.
3242         * workers/WorkerGlobalScope.h:
3243         (WebCore::WorkerGlobalScope::workerInspectorController): Deleted.
3244         * workers/WorkerGlobalScopeProxy.h:
3245         (WebCore::WorkerGlobalScopeProxy::PageInspector::~PageInspector): Deleted.
3246         (WebCore::WorkerGlobalScopeProxy::connectToInspector): Deleted.
3247         (WebCore::WorkerGlobalScopeProxy::disconnectFromInspector): Deleted.
3248         (WebCore::WorkerGlobalScopeProxy::sendMessageToInspector): Deleted.
3249         * workers/WorkerMessagingProxy.cpp:
3250         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy): Deleted.
3251         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope): Deleted.
3252         (WebCore::WorkerMessagingProxy::connectToInspector): Deleted.
3253         (WebCore::WorkerMessagingProxy::disconnectFromInspector): Deleted.
3254         (WebCore::WorkerMessagingProxy::sendMessageToInspector): Deleted.
3255         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyedInternal): Deleted.
3256         (WebCore::WorkerMessagingProxy::terminateWorkerGlobalScope): Deleted.
3257         (WebCore::WorkerMessagingProxy::postMessageToPageInspector): Deleted.
3258         * workers/WorkerMessagingProxy.h:
3259         * workers/WorkerReportingProxy.h:
3260         * workers/WorkerThread.cpp:
3261         (WebCore::WorkerThread::workerThread): Deleted.
3262
3263 2015-12-03  Sergio Villar Senin  <svillar@igalia.com>
3264
3265         [css-grid] Fix height computation of grid items with borders inside fr tracks
3266         https://bugs.webkit.org/show_bug.cgi?id=151798
3267
3268         Reviewed by Zalan Bujtas.
3269
3270         Since r192154 we run a second pass of the track sizing
3271         algorithm whenever the height of the grid is indefinite in
3272         order to properly compute row sizes. The available space
3273         passed to the track sizing algorithm must not contain neither
3274         borders nor paddings, otherwise it will think that it has more
3275         space available than the existing one. We should use the
3276         height of the content box instead.
3277
3278         Test: fast/css-grid-layout/grid-item-with-border-in-fr.html
3279
3280         * rendering/RenderGrid.cpp:
3281         (WebCore::RenderGrid::layoutBlock):
3282
3283 2015-12-03  Brady Eidson  <beidson@apple.com>
3284
3285         Modern IDB: storage/indexeddb/cursor-index-delete.html fails.
3286         https://bugs.webkit.org/show_bug.cgi?id=151847
3287
3288         Reviewed by Andy Estes.
3289
3290         No new tests (At least one failing test now passes).
3291
3292         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
3293         (WebCore::IDBServer::MemoryIndexCursor::MemoryIndexCursor):
3294         (WebCore::IDBServer::MemoryIndexCursor::currentData):
3295
3296 2015-12-03  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
3297
3298         Reduce uses of PassRefPtr in DOM - 1
3299         https://bugs.webkit.org/show_bug.cgi?id=149788
3300
3301         Reviewed by Darin Adler.
3302
3303         As a step to purge PassRefPtr, this patch reduces the uses in WebCore/dom.
3304
3305         * dom/ChildListMutationScope.cpp:
3306         (WebCore::ChildListMutationAccumulator::getOrCreate):
3307         * dom/ChildListMutationScope.h:
3308         * dom/ClipboardEvent.cpp:
3309         (WebCore::ClipboardEvent::ClipboardEvent):
3310         * dom/ClipboardEvent.h:
3311         * dom/CompositionEvent.cpp:
3312         (WebCore::CompositionEvent::CompositionEvent):
3313         (WebCore::CompositionEvent::initCompositionEvent):
3314         * dom/CompositionEvent.h:
3315         * dom/DOMNamedFlowCollection.cpp:
3316         (WebCore::DOMNamedFlowCollection::item):
3317         * dom/DOMNamedFlowCollection.h:
3318         * dom/DOMStringList.h:
3319         * dom/DeviceMotionController.cpp:
3320         (WebCore::DeviceMotionController::getLastEvent):
3321         * dom/DeviceMotionController.h:
3322         * dom/DeviceOrientationController.cpp:
3323         (WebCore::DeviceOrientationController::getLastEvent):
3324         * dom/DeviceOrientationController.h:
3325         * editing/Editor.cpp:
3326         (WebCore::Editor::dispatchCPPEvent):
3327         * page/DeviceController.h:
3328         (WebCore::DeviceController::getLastEvent):
3329
3330 2015-12-03  Said Abou-Hallawa  <sabouhallawa@apple.com>
3331
3332         Remove the use of GraphicsContextStateSaver from RenderLayer::paintLayerByApplyingTransform
3333         https://bugs.webkit.org/show_bug.cgi?id=151829
3334
3335         Reviewed by Simon Fraser.
3336
3337         Set the CTM of the GraphicsContext to its original value before changing
3338         it. This is a lot cheaper than using GraphicsContextStateSaver to save the
3339         whole state of the GraphicsContext and restore it back;
3340
3341         * rendering/RenderLayer.cpp:
3342         (WebCore::RenderLayer::paintLayerByApplyingTransform):
3343
3344 2015-12-03  Eric Carlson  <eric.carlson@apple.com>
3345
3346         [MediaStream] Update MediaStreamTrack.getCapabilities
3347         https://bugs.webkit.org/show_bug.cgi?id=151728
3348
3349         Reviewed by Jer Noble.
3350
3351         Test: fast/mediastream/MediaStreamTrack-getCapabilities.html
3352
3353         * CMakeLists.txt: Remove files deleted from the repository.
3354
3355         * DerivedSources.make: Ditto.
3356
3357         * Modules/mediastream/AllAudioCapabilities.h: Removed.
3358         * Modules/mediastream/AllAudioCapabilities.idl: Removed.
3359         * Modules/mediastream/AllVideoCapabilities.h: Removed.
3360         * Modules/mediastream/AllVideoCapabilities.idl: Removed.
3361         * Modules/mediastream/CapabilityRange.cpp: Removed.
3362         * Modules/mediastream/CapabilityRange.h: Removed.
3363         * Modules/mediastream/CapabilityRange.idl: Removed.
3364
3365         * Modules/mediastream/MediaSourceSettings.h:
3366         (WebCore::MediaSourceSettings::supportsVolume): Volume is a double.
3367         (WebCore::MediaSourceSettings::volume): Double.
3368
3369         * Modules/mediastream/MediaStreamCapabilities.cpp: Removed.
3370         * Modules/mediastream/MediaStreamCapabilities.h: Removed.
3371         * Modules/mediastream/MediaStreamCapabilities.idl: Removed.
3372
3373         * Modules/mediastream/MediaStreamTrack.cpp:
3374         (WebCore::MediaStreamTrack::getCapabilities): MediaStreamCapabilities is gone, return a RealtimeMediaSourceCapabilities.
3375         * Modules/mediastream/MediaStreamTrack.h:
3376         * Modules/mediastream/MediaStreamTrack.idl:
3377
3378         * WebCore.xcodeproj/project.pbxproj: Remove files deleted from the repository.
3379         * bindings/js/JSMediaStreamTrackCustom.cpp:
3380         (WebCore::capabilityValue):
3381         (WebCore::JSMediaStreamTrack::getCapabilities): Create and return a dictionary of capatilities.
3382
3383         * platform/mediastream/RealtimeMediaSourceCapabilities.h:
3384         (WebCore::CapabilityValueOrRange::type):
3385         (WebCore::CapabilityValueOrRange::CapabilityValueOrRange):
3386         (WebCore::CapabilityValueOrRange::rangeMin):
3387         (WebCore::CapabilityValueOrRange::rangeMax):
3388         (WebCore::CapabilityValueOrRange::value):
3389         (WebCore::RealtimeMediaSourceCapabilities::create):
3390         (WebCore::RealtimeMediaSourceCapabilities::~RealtimeMediaSourceCapabilities):
3391         (WebCore::RealtimeMediaSourceCapabilities::supportsWidth):
3392         (WebCore::RealtimeMediaSourceCapabilities::width):
3393         (WebCore::RealtimeMediaSourceCapabilities::setWidth):
3394         (WebCore::RealtimeMediaSourceCapabilities::supportsHeight):
3395         (WebCore::RealtimeMediaSourceCapabilities::height):
3396         (WebCore::RealtimeMediaSourceCapabilities::setHeight):
3397         (WebCore::RealtimeMediaSourceCapabilities::supportsFrameRate):
3398         (WebCore::RealtimeMediaSourceCapabilities::frameRate):
3399         (WebCore::RealtimeMediaSourceCapabilities::setFrameRate):
3400         (WebCore::RealtimeMediaSourceCapabilities::supportsFacingMode):
3401         (WebCore::RealtimeMediaSourceCapabilities::facingMode):
3402         (WebCore::RealtimeMediaSourceCapabilities::addFacingMode):
3403         (WebCore::RealtimeMediaSourceCapabilities::supportsAspectRatio):
3404         (WebCore::RealtimeMediaSourceCapabilities::aspectRatio):
3405         (WebCore::RealtimeMediaSourceCapabilities::setAspectRatio):
3406         (WebCore::RealtimeMediaSourceCapabilities::supportsVolume):
3407         (WebCore::RealtimeMediaSourceCapabilities::volume):
3408         (WebCore::RealtimeMediaSourceCapabilities::setVolume):
3409         (WebCore::RealtimeMediaSourceCapabilities::supportsSampleRate):
3410         (WebCore::RealtimeMediaSourceCapabilities::sampleRate):
3411         (WebCore::RealtimeMediaSourceCapabilities::setSampleRate):
3412         (WebCore::RealtimeMediaSourceCapabilities::supportsSampleSize):
3413         (WebCore::RealtimeMediaSourceCapabilities::sampleSize):
3414         (WebCore::RealtimeMediaSourceCapabilities::setSampleSize):
3415         (WebCore::RealtimeMediaSourceCapabilities::supportsEchoCancellation):
3416         (WebCore::RealtimeMediaSourceCapabilities::echoCancellation):
3417         (WebCore::RealtimeMediaSourceCapabilities::setEchoCancellation):
3418         (WebCore::RealtimeMediaSourceCapabilities::supportsDeviceId):
3419         (WebCore::RealtimeMediaSourceCapabilities::deviceId):
3420         (WebCore::RealtimeMediaSourceCapabilities::setDeviceId):
3421         (WebCore::RealtimeMediaSourceCapabilities::supportsGroupId):