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