[cairo] Solid stroke of lines with thickness less than 1 pixel broken after r191658
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2015-12-08  Frederic Wang  <fred.wang@free.fr>
2
3         [cairo] Solid stroke of lines with thickness less than 1 pixel broken after r191658
4         https://bugs.webkit.org/show_bug.cgi?id=151947
5
6         Reviewed by Martin Robinson.
7
8         Test: mathml/presentation/radical-bar-visibility.html
9
10         * platform/graphics/cairo/GraphicsContextCairo.cpp:
11         (WebCore::GraphicsContext::drawLine): Force a minimal thickness of 1px
12
13 2015-12-08  Gwang Yoon Hwang  <yoon@igalia.com>
14
15         [ThreadedCompositor] Support WebGL for OpenGL.
16         https://bugs.webkit.org/show_bug.cgi?id=143300
17
18         Reviewed by Žan Doberšek.
19
20         To remove pixel transfer operation, this patch adds m_compositorFBO which uses same depth and stencil
21         buffer with m_fbo but uses m_compositorTexture as a color attachment in GraphicsContext3D.
22         Because switching target framebuffer is cheaper than pixel transfer operation and switching color
23         attachment of m_fbo. In Threaded Compositor, when WebGL renders a scene, prepareTexture swaps
24         m_fbo with m_compositorFBO and send the color attachment to the compositor thread.
25         This patch only supports WebGL for OpenGL. OpenGLES will be covered in following-up patches.
26
27         No new tests needed.
28
29         * platform/graphics/GraphicsContext3D.h:
30         * platform/graphics/GraphicsContext3DPrivate.cpp:
31         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
32         (WebCore::GraphicsContext3DPrivate::proxy):
33         (WebCore::GraphicsContext3DPrivate::swapBuffersIfNeeded):
34         Implement interfaces to pass a rendered texture to the compositing
35         thread.
36         * platform/graphics/GraphicsContext3DPrivate.h:
37         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
38         (WebCore::GraphicsContext3D::GraphicsContext3D):
39         (WebCore::GraphicsContext3D::~GraphicsContext3D):
40         Create additional compositing texture and FBO to swaping buffers for
41         threaded compositor.
42         * platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
43         (WebCore::GraphicsContext3D::reshapeFBOs):
44         (WebCore::GraphicsContext3D::attachDepthAndStencilBufferIfNeeded):
45         Split attaching depth and stencil buffer codes from reshapeFBOs
46         to make complete framebuffer with not only m_fbo but m_compositorFBO also.
47         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
48         (WebCore::GraphicsContext3D::prepareTexture):
49         If we are in the threaded compositor, we will swap m_fbo with
50         m_compositorFBO instead of copying it.
51
52 2015-12-07  Zalan Bujtas  <zalan@apple.com>
53
54         Make paintTextWithShadows a member function (TextPainter).
55         https://bugs.webkit.org/show_bug.cgi?id=151979
56
57         Reviewed by Simon Fraser.
58
59         This patch also simplifies paintTextWithShadows and
60         rearranges some of the functions' arguments. 
61
62         No change in functionality.
63
64         * rendering/TextPainter.cpp:
65         (WebCore::TextPainter::drawTextOrEmphasisMarks):
66         (WebCore::TextPainter::paintTextWithShadows):
67         (WebCore::TextPainter::paintEmphasisMarksIfNeeded):
68         (WebCore::TextPainter::paintTextWithStyle):
69         (WebCore::TextPainter::paintText):
70         (WebCore::drawTextOrEmphasisMarks): Deleted.
71         (WebCore::paintTextWithShadows): Deleted.
72         * rendering/TextPainter.h:
73
74 2015-12-07  Brady Eidson  <beidson@apple.com>
75
76         Modern IDB: storage/indexeddb/factory-deletedatabase.html fails.
77         https://bugs.webkit.org/show_bug.cgi?id=151966
78
79         Reviewed by Sam Weinig.
80
81         No new tests (At least one failing test now passes).
82
83         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
84         (WebCore::IDBClient::IDBOpenDBRequest::onDeleteDatabaseSuccess): The spec says that the result of
85           deleteDatabase should be undefined. Without explicitly making it undefined, it's incorrectly null.
86
87 2015-12-07  Brady Eidson  <beidson@apple.com>
88
89         Modern IDB: storage/indexeddb/cursor-continue-validity.html fails.
90         https://bugs.webkit.org/show_bug.cgi?id=151961
91
92         Reviewed by Alex Christensen.
93
94         No new tests (At least one failing test now passes).
95
96         When an index cursor's iterator was invalidated, there were some cases where it did 
97         not correctly find the next iterator to pick up where it left off.
98
99         * Modules/indexeddb/client/IDBCursorImpl.cpp:
100         (WebCore::IDBClient::IDBCursor::update):
101         (WebCore::IDBClient::IDBCursor::deleteFunction):
102         
103         * Modules/indexeddb/server/IndexValueStore.cpp:
104         (WebCore::IDBServer::IndexValueStore::find):
105         (WebCore::IDBServer::IndexValueStore::loggingString):
106         * Modules/indexeddb/server/IndexValueStore.h:
107
108 2015-12-07  Zalan Bujtas  <zalan@apple.com>
109
110         Refactor TextPainter::paintText() into sub methods.
111         https://bugs.webkit.org/show_bug.cgi?id=151962
112
113         Reviewed by Myles C. Maxfield.
114
115         No change in functionality.
116
117         * rendering/TextPainter.cpp:
118         (WebCore::TextPainter::paintTextWithEmphasisIfNeeded):
119         (WebCore::TextPainter::paintTextWithStyle):
120         (WebCore::TextPainter::paintText):
121         * rendering/TextPainter.h:
122
123 2015-12-07  Gwang Yoon Hwang  <yoon@igalia.com>
124
125         [GTK] Clean up virtual functions in MediaPlayerPrivateGStreamerBase
126         https://bugs.webkit.org/show_bug.cgi?id=151940
127
128         Reviewed by Carlos Garcia Campos.
129
130         - Using 'override' when appropriate
131         - Explicitly marking methods as virtual when they are inherently virtual
132
133         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
134
135 2015-12-07  Saam barati  <sbarati@apple.com>
136
137         Add op_watchdog opcode that is generated when VM has a watchdog
138         https://bugs.webkit.org/show_bug.cgi?id=151954
139
140         Reviewed by Mark Lam.
141
142         No new tests because JSC already has tests for this.
143
144         * bindings/js/WorkerScriptController.cpp:
145         (WebCore::WorkerScriptController::scheduleExecutionTermination):
146         (WebCore::WorkerScriptController::isTerminatingExecution):
147
148 2015-12-07  Brian Burg  <bburg@apple.com>
149
150         Web Inspector: Uncaught Exception page should have better styles and handle more error cases
151         https://bugs.webkit.org/show_bug.cgi?id=151923
152
153         Reviewed by Timothy Hatcher.
154
155         Add a check for InspectorFrontendAPI before calling it. This can fail
156         easily if an uncaught exception stalls initial loading, or whenever
157         the Inspector frontend is reloaded.
158
159         * inspector/InspectorFrontendClientLocal.cpp:
160         (WebCore::InspectorFrontendClientLocal::evaluateOnLoad):
161
162 2015-12-07  Beth Dakin  <bdakin@apple.com>
163
164         Hook up request and show for typing candidates in WK1
165         https://bugs.webkit.org/show_bug.cgi?id=151831
166         -and corresponding-
167         <rdar://problem/23751214>
168
169         Reviewed by Enrica Casucci.
170
171         New SPI that is needed.
172         * WebCore.xcodeproj/project.pbxproj:
173         * platform/spi/mac/NSSpellCheckerSPI.h: Added.
174
175         Request candidates for editable content whenever selection changes.
176         * editing/Editor.cpp:
177         (WebCore::Editor::respondToChangedSelection):
178
179         Implement requestCandidatesForSelection on the EditorClient.
180         * loader/EmptyClients.h:
181         * page/EditorClient.h:
182         (WebCore::EditorClient::requestCandidatesForSelection):
183
184 2015-12-07  Brady Eidson  <beidson@apple.com>
185
186         Modern IDB: Fix "old versions" when upgrading databases.
187         https://bugs.webkit.org/show_bug.cgi?id=151948
188
189         Reviewed by Alex Christensen.
190
191         No new tests (5 failing tests now pass, and updated results for a 6th test).
192
193         This includes the old version on the IDBVersionChangeEvent, as well as the version the 
194         IDBDatabase is left with if the version change transaction is aborted.
195
196         Primary mechanism of the fix is to include the original IDBDatabaseInfo along with 
197         IDBTransactionInfos that represent version change transactions.
198
199         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
200         (WebCore::IDBClient::IDBDatabase::willAbortTransaction):
201         (WebCore::IDBClient::IDBDatabase::didAbortTransaction):
202
203         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
204         (WebCore::IDBClient::IDBOpenDBRequest::onUpgradeNeeded):
205
206         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
207         (WebCore::IDBClient::IDBTransaction::IDBTransaction): Deleted.
208         (WebCore::IDBClient::IDBTransaction::finishAbortOrCommit): Deleted.
209         * Modules/indexeddb/client/IDBTransactionImpl.h:
210         (WebCore::IDBClient::IDBTransaction::info):
211         (WebCore::IDBClient::IDBTransaction::originalDatabaseInfo):
212
213         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
214         (WebCore::IDBServer::UniqueIDBDatabase::startVersionChangeTransaction):
215         (WebCore::IDBServer::UniqueIDBDatabase::commitTransaction):
216         * Modules/indexeddb/server/UniqueIDBDatabaseConnection.cpp:
217         (WebCore::IDBServer::UniqueIDBDatabaseConnection::createVersionChangeTransaction):
218
219         * Modules/indexeddb/shared/IDBTransactionInfo.cpp:
220         (WebCore::IDBTransactionInfo::versionChange):
221         (WebCore::IDBTransactionInfo::IDBTransactionInfo):
222         (WebCore::IDBTransactionInfo::isolatedCopy):
223         * Modules/indexeddb/shared/IDBTransactionInfo.h:
224         (WebCore::IDBTransactionInfo::originalDatabaseInfo):
225
226 2015-12-07  Nikos Andronikos  <nikos.andronikos-webkit@cisra.canon.com.au>
227
228         Update Objective-C code generator to pass a reference to calling object for partial interfaces
229         https://bugs.webkit.org/show_bug.cgi?id=151739
230
231         Reviewed by Darin Adler.
232
233         The fix updates the Objective-C code generator to pass a reference to calling object for partial interfaces.
234         The change from pass by pointer to pass by reference was introduced in r192849.
235
236         * bindings/scripts/CodeGeneratorObjC.pm:
237         (GenerateImplementation):
238         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
239         (-[DOMTestInterface supplementalStr1]):
240         (-[DOMTestInterface supplementalStr2]):
241         (-[DOMTestInterface setSupplementalStr2:]):
242         (-[DOMTestInterface supplementalStr3]):
243         (-[DOMTestInterface setSupplementalStr3:]):
244         (-[DOMTestInterface supplementalNode]):
245         (-[DOMTestInterface setSupplementalNode:]):
246         (-[DOMTestInterface builtinAttribute]):
247         (-[DOMTestInterface setBuiltinAttribute:]):
248         (-[DOMTestInterface supplementalMethod1]):
249         (-[DOMTestInterface supplementalMethod2:objArg:]):
250         (-[DOMTestInterface supplementalMethod3]):
251         (-[DOMTestInterface supplementalMethod4]):
252         (-[DOMTestInterface builtinFunction]):
253
254 2015-12-07  Chris Dumez  <cdumez@apple.com>
255
256         Crash in MemoryCache::pruneDeadResourcesToSize()
257         https://bugs.webkit.org/show_bug.cgi?id=151833
258         <rdar://problem/22392235>
259
260         Reviewed by David Kilzer.
261
262         MemoryCache::pruneDeadResourcesToSize() is iterating over m_allResources
263         (which is a vector of LRUList). It first destroys decoded data for each
264         resource in the LRUList. Then, if it does not suffice to reach the
265         target size, and starts actually removing resources from the cache.
266
267         The issue is that this code alters m_allResources (and its LRULists) as
268         it is iterating over it. We tried to deal with this in various ways:
269         1. Increment the iterator before removing the resource pointed by the
270           iterator.
271         2. Protect the next resource in the LRUList and abort early if it is no
272           longer in the cache.
273
274         This adds code complexity and apparently does not correctly handle all
275         the edge cases as we still see crashes in this code. In particular, I
276         suspect that 2. may not be sufficient if it is possible for the next
277         resource to be moved to another LRUList (in which case, next->inCache()
278         would still return true but the iterator would however become invalid).
279
280         To make the code simpler and more robust, this patch copies the LRUList
281         (and refs the CachedResources) before iterating over it. This is a lot
282         safer and should hopefully fix the crashes we see in this function.
283
284         No new tests, no reproduction case.
285
286         * loader/cache/MemoryCache.cpp:
287         (WebCore::MemoryCache::pruneDeadResourcesToSize):
288
289 2015-12-07  Brady Eidson  <beidson@apple.com>
290
291         Modern IDB: Add some more custom exception messages, passing some more tests..
292         https://bugs.webkit.org/show_bug.cgi?id=151912
293
294         Reviewed by Andy Estes.
295
296         No new tests (Covered by existing tests).
297
298         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
299         (WebCore::IDBClient::IDBObjectStore::index):
300         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
301         (WebCore::IDBClient::IDBTransaction::objectStore):
302
303 2015-12-07  Gwang Yoon Hwang  <yoon@igalia.com>
304
305         [ThreadedCompositor] Add support for PlatformLayer.
306         https://bugs.webkit.org/show_bug.cgi?id=143299
307
308         Reviewed by Žan Doberšek.
309
310         This patch implements TextureMapperPlatformLayerProxy and TextureMapperPlatformLayerBuffer to
311         send a texture (actual texture or BitmapTexture) to the compositing thread directly.
312         Platform layer renderers should implement TextureMapperPlatformLayerProxyProvider to establish
313         a connection to the compositing thread. After the connection has been established, the renderer
314         can render its contents to the TextureMapperPlatformLayerBuffer and pass it to the compositing thread
315         via TextureMapperPlatformLayer proxy.
316         The buffer can be an unmanaged texture (a.k.a. platform texture) or BitmapTexture.
317         For the unmanaged texture, the renderer should manage its life cycle itself. For the BitmapTexture,
318         it will be managed by TextureMapperPlatformLayerProxy. In that case, used (swapped) buffer will be
319         recycled because the renderer will use same size and format until it changes its size.
320
321         No new tests needed.
322
323         * PlatformGTK.cmake:
324         Adds TextureMapperPlatformLayerBuffer and TextureMapperPlaytformLayerProxy.
325
326         * platform/graphics/GraphicsContext3DPrivate.cpp:
327         * platform/graphics/GraphicsContext3DPrivate.h:
328         * platform/graphics/cairo/ImageBufferCairo.cpp:
329         * platform/graphics/cairo/ImageBufferDataCairo.h:
330         Adds mock implementation.
331
332         * platform/graphics/PlatformLayer.h:
333         Adds TextureMapperPlatformLayerProxyProvider as a PlatformLayer for the Threaded Compositor
334
335         * platform/graphics/texmap/BitmapTextureGL.h:
336         (WebCore::BitmapTextureGL::internalFormat): Adds a getter to check the
337         internal format of texture to check reusability.
338
339         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
340         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
341         * platform/graphics/texmap/TextureMapperLayer.cpp:
342         * platform/graphics/texmap/TextureMapperLayer.h:
343         Exclude GraphicsLayerTextureMapper from build when we are using Coordinated Graphics.
344
345         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.cpp: Added.
346         * platform/graphics/texmap/TextureMapperPlatformLayerBuffer.h: Added.
347         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.cpp: Added.
348         * platform/graphics/texmap/TextureMapperPlatformLayerProxy.h: Added.
349
350         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
351         (WebCore::GraphicsLayer::create):
352         Because we removed GraphicsLayerTextureMapper from build, we need to add own factory function.
353
354         (WebCore::CoordinatedGraphicsLayer::setContentsToPlatformLayer):
355         (WebCore::CoordinatedGraphicsLayer::syncPlatformLayer):
356         (WebCore::CoordinatedGraphicsLayer::platformLayerWillBeDestroyed):
357         (WebCore::CoordinatedGraphicsLayer::setPlatformLayerNeedsDisplay):
358         Implements sync operations for TextureMapperPlatformLayerProxy
359
360 2015-12-07  Gwang Yoon Hwang  <yoon@igalia.com>
361
362         Fix GTK+ build with GStreamer GL
363         https://bugs.webkit.org/show_bug.cgi?id=151939
364
365         Reviewed by Žan Doberšek.
366
367         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
368         (WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
369         (WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
370         (WebCore::MediaPlayerPrivateGStreamerBase::drawCallback):
371         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
372
373 2015-12-06  Simon Fraser  <simon.fraser@apple.com>
374
375         Show more information about SVG renderers in showLayerTree() output
376         https://bugs.webkit.org/show_bug.cgi?id=151930
377
378         Reviewed by Zalan Bujtas.
379         
380         In showLayerTree() output, for SVG renderers show:
381         - visual and layout overflow, for boxes
382         - frame rect, for boxes
383         - layout state
384         - class and id
385
386         * rendering/RenderLayer.cpp:
387         (WebCore::showLayerTree):
388         * rendering/RenderTreeAsText.cpp:
389         (WebCore::RenderTreeAsText::writeRenderObject):
390         (WebCore::writeDebugInfo): New function to share dumping with svg output.
391         (WebCore::write):
392         * rendering/RenderTreeAsText.h:
393         * rendering/svg/SVGRenderTreeAsText.cpp:
394         (WebCore::writePositionAndStyle): Show the frameRect for boxes (e.g. RenderSVGRoot).
395         Much more useful that showing the clippedOverflowRect.
396         (WebCore::writeStandardPrefix):
397         (WebCore::writeChildren):
398         (WebCore::writeSVGResourceContainer):
399         (WebCore::writeSVGContainer):
400         (WebCore::write):
401         (WebCore::writeSVGText):
402         (WebCore::writeSVGInlineText):
403         (WebCore::writeSVGImage):
404         (WebCore::writeSVGGradientStop):
405         (WebCore::writeResources):
406         (WebCore::operator<<): Deleted.
407         * rendering/svg/SVGRenderTreeAsText.h:
408
409 2015-12-06  Simon Fraser  <simon.fraser@apple.com>
410
411         Clipping along compositing borders in svg-edit
412         https://bugs.webkit.org/show_bug.cgi?id=151791
413
414         Reviewed by Zalan Bujtas.
415         
416         RenderSVGRoot::layout() failed to clear overflow before recomputing
417         visual overflow, which could cause it to get stuck with stale overflow.
418         This would cause underpainting if its size went from small to large.
419
420         Test: svg/overflow/visual-overflow-change.html
421
422         * rendering/svg/RenderSVGRoot.cpp:
423         (WebCore::RenderSVGRoot::layout):
424
425 2015-12-06  Simon Fraser  <simon.fraser@apple.com>
426
427         REGRESSION (r187121): Can't get to the main content of the page at https://theintercept.com/drone-papers/
428         https://bugs.webkit.org/show_bug.cgi?id=151849
429         rdar://problem/23132828
430
431         Reviewed by Zalan Bujtas.
432         
433         This page uses a fill-forwards animation where the last keyframe has height: auto.
434         After r187121, we tried to blend the height Length value from the last keyframe to the
435         first keyframe with progress=0 (which should pick up the 'auto' from the last keyframe).
436         
437         However, Length::blend() just considered both 0 and 'auto' to be zero, and returned
438         the 0 length.
439         
440         So fix Length::blend() to return the "from" length if progress is zero.
441
442         Test: animations/fill-forwards-auto-height.html
443
444         * page/animation/CSSPropertyAnimation.cpp:
445         (WebCore::blendFunc): Length::blend takes a double, so don't narrow to float.
446         * page/animation/KeyframeAnimation.cpp:
447         (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty): Declare two variables
448         at first use.
449         * platform/Length.h:
450         (WebCore::Length::blend):
451
452 2015-12-06  Simon Fraser  <simon.fraser@apple.com>
453
454         Give SVGTransformList some inline vector capacity
455         https://bugs.webkit.org/show_bug.cgi?id=151644
456
457         Reviewed by Andreas Kling.
458
459         Giving SVGTransformList inline capacity of one drops time under SVGTransformList::parse() by
460         about 1% on http://animateplus.com/demos/stress-test/
461
462         * svg/SVGTransformList.h:
463
464 2015-12-06  Zalan Bujtas  <zalan@apple.com>
465
466         Addressing post-review comments on r193374.
467
468         Reviewed by Antti Koivisto.
469
470         * rendering/SimpleLineLayout.cpp:
471         (WebCore::SimpleLineLayout::canUseForText):
472         (WebCore::SimpleLineLayout::canUseForFontAndText):
473         (WebCore::SimpleLineLayout::canUseForStyle):
474         (WebCore::SimpleLineLayout::canUseForWithReason):
475         (WebCore::SimpleLineLayout::canUseFor):
476         (WebCore::SimpleLineLayout::printSimpleLineLayoutBlockList):
477         (WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):
478
479 2015-12-04  Myles C. Maxfield  <mmaxfield@apple.com>
480
481         Remove CORETEXT_WEB_FONTS
482         https://bugs.webkit.org/show_bug.cgi?id=151891
483
484         Reviewed by Simon Fraser.
485
486         The only platform where this was turned off (Mavericks) is no longer supported.
487
488         No new tests because there is no behavior difference.
489
490         * platform/graphics/cocoa/FontCocoa.mm:
491         (WebCore::Font::platformCreateScaledFont): Deleted.
492         * platform/graphics/cocoa/FontPlatformDataCocoa.mm:
493         (WebCore::FontPlatformData::registeredFont):
494         (WebCore::FontPlatformData::ctFont):
495         * platform/graphics/mac/FontCustomPlatformData.cpp:
496         (WebCore::FontCustomPlatformData::fontPlatformData): Deleted.
497         (WebCore::createFontCustomPlatformData): Deleted.
498         * platform/graphics/mac/FontCustomPlatformData.h:
499         (WebCore::FontCustomPlatformData::FontCustomPlatformData): Deleted.
500         * platform/text/TextFlags.h:
501
502 2015-12-04  Zalan Bujtas  <zalan@apple.com>
503
504         Garbage in page tiles when document is too long.
505         https://bugs.webkit.org/show_bug.cgi?id=151906
506         rdar://problem/23695858
507
508         Reviewed by Simon Fraser.
509
510         This patch partially fixes the broken concept(webkit.org/b/151908) of having a nearlyMax/2 sized rectangle to define infiniteness.
511         (see LayoutRect::infiniteRect() and ClipRect::isInfinite())
512
513         Covered by existing test.
514
515         * rendering/ClipRect.h: Branch for infinite clipping.
516         (WebCore::ClipRect::intersect):
517         (WebCore::ClipRect::intersects):
518         * rendering/RenderLayer.cpp:
519         (WebCore::RenderLayer::clipToRect): Do not clip when clipping is infinite.
520         (WebCore::RenderLayer::restoreClip):
521         (WebCore::RenderLayer::calculateClipRects):
522
523 2015-12-04  Brady Eidson  <beidson@apple.com>
524
525         Modern IDB: Add some more custom exception messages, passing some more tests.
526         https://bugs.webkit.org/show_bug.cgi?id=151898
527
528         Reviewed by Alex Christensen.
529
530         No new tests (Some failing tests now pass).
531
532         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
533         (WebCore::IDBClient::IDBTransaction::objectStore):
534
535 2015-12-04  Brent Fulgham  <bfulgham@apple.com>
536
537         Place an upper bound on canvas pixel count
538         https://bugs.webkit.org/show_bug.cgi?id=151825
539         <rdar://problem/23324916>
540
541         Reviewed by Simon Fraser.
542
543         Malformed JavaScript can attempt to create lots of canvas contexts. Limit the amount of memory
544         we will use for this purpose to some percentage of system RAM.
545
546         * html/HTMLCanvasElement.cpp:
547         (WebCore::removeFromActivePixelMemory): Added helper function
548         (WebCore::HTMLCanvasElement::~HTMLCanvasElement): Call new 'releaseImageBufferAndContext' method
549         to ensure ImageBuffer and graphics context state are properly cleaned up.
550         (WebCore::maxActivePixels): Use one quarter of the system RAM, or 1 GB (whichever is more) as
551         an upper bound on active pixel memory.
552         (WebCore::HTMLCanvasElement::getContext): If we are attempting to create a context that will cause
553         us to exceed the allowed active pixel count, fail.
554         (WebCore::HTMLCanvasElement::releaseImageBufferAndContext): Added helper function
555         (WebCore::HTMLCanvasElement::setSurfaceSize): Use the new 'releaseImageBufferAndContext' method
556         to handle active pixel memory counts.
557         (WebCore::HTMLCanvasElement::createImageBuffer): Refuse to create a backing buffer if it will
558         exceed our available pixel memory.
559
560 2015-12-04  Brady Eidson  <beidson@apple.com>
561
562         Modern IDB: Add some more custom exception messages, passing some more tests.
563         https://bugs.webkit.org/show_bug.cgi?id=151895
564
565         Reviewed by Alex Christensen.
566
567         No new tests (Some failing tests now pass).
568
569         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
570         (WebCore::IDBClient::IDBDatabase::transaction):
571
572         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
573         (WebCore::IDBClient::IDBObjectStore::deleteIndex):
574
575 2015-12-04  Jonathan Davis  <jond@apple.com>
576
577         Update feature status for up-to-date status information.
578         https://bugs.webkit.org/show_bug.cgi?id=151821
579
580         Reviewed by Timothy Hatcher.
581
582         * features.json:
583
584 2015-12-04  Brady Eidson  <beidson@apple.com>
585
586         Modern IDB: Flip test expectations around so we only list failures.
587         https://bugs.webkit.org/show_bug.cgi?id=151880
588
589         Reviewed by Alex Christensen.
590
591         No new tests (Covered by all existing tests).
592
593         * Modules/indexeddb/client/IDBRequestImpl.cpp:
594         (WebCore::IDBClient::IDBRequest::stop):
595         (WebCore::IDBClient::IDBRequest::enqueueEvent):
596         (WebCore::IDBClient::IDBRequest::dispatchEvent):
597         * Modules/indexeddb/client/IDBRequestImpl.h:
598         
599         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
600         (WebCore::IDBClient::IDBTransaction::abortDueToFailedRequest):
601         (WebCore::IDBClient::IDBTransaction::hasPendingActivity):
602         (WebCore::IDBClient::IDBTransaction::stop):
603         (WebCore::IDBClient::IDBTransaction::enqueueEvent):
604         (WebCore::IDBClient::IDBTransaction::dispatchEvent):
605         * Modules/indexeddb/client/IDBTransactionImpl.h:
606         
607         * bindings/js/IDBBindingUtilities.cpp:
608         (WebCore::idbKeyToScriptValue): Protection against a ScriptExecutionContext that no longer has an ExecState.
609           A full reworking on the binding utilities to prevent this through is covered by b/151890
610
611 2015-12-04  Myles C. Maxfield  <mmaxfield@apple.com>
612
613         [Cocoa] Some fonts cause CTFontCopyAvailableTables() to return nullptr
614         https://bugs.webkit.org/show_bug.cgi?id=151884
615         <rdar://problem/23752253>
616
617         Reviewed by Brian Burg.
618
619         No new tests.
620
621         * platform/graphics/opentype/OpenTypeCG.cpp:
622         (WebCore::OpenType::fontHasMathTable):
623
624 2015-12-04  Jer Noble  <jer.noble@apple.com>
625
626         Unreviewed build-fix; Add new parameter to overloaded createSession() method in MediaPlayerPrivateAVFoundationCF.
627
628         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
629         (WebCore::CDMSessionAVFoundationCF::CDMSessionAVFoundationCF):
630         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
631         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
632         (WebCore::MediaPlayerPrivateAVFoundationCF::createSession):
633         * platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.h:
634
635 2015-12-01  Jer Noble  <jer.noble@apple.com>
636
637         Adopt AVContentKeySession
638         https://bugs.webkit.org/show_bug.cgi?id=151221
639
640         Reviewed by Eric Carlson.
641
642         Adopt a new API for managing key state, AVContentKeySession. Because this necessitates a change
643         in both the initialization data returned by the needkey event, and passed into the createSession()
644         method, bump the protocol version number (to 3), and keep supporting the old key management API
645         for legacy content.
646
647         To do so, move most of the implementation of CDMPrivateMediaSourceAVFObjC into a new subclass,
648         CDMSessionAVStreamSession, and add a new subclass, CDMSessionAVContentKeySession, to support the
649         new API.
650
651         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
652         (WebCore::CDMPrivateMediaSourceAVFObjC::CDMPrivateMediaSourceAVFObjC): Moved to implementation file.
653         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
654         (WebCore::validKeySystemRE): Support "com.apple.fps.3_x".
655         (WebCore::CDMPrivateMediaSourceAVFObjC::~CDMPrivateMediaSourceAVFObjC): Invalidate all outstanding sessions.
656         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsKeySystem): Only support "com.apple.fps.3_x" if the AVContentKeySession class is available.
657         (WebCore::CDMPrivateMediaSourceAVFObjC::createSession): Create an instance of CDMSessionAVContentKeySession if "com.apple.fps.3_x" is specified and AVContentKeySession is available.
658         (WebCore::CDMPrivateMediaSourceAVFObjC::invalidateSession): Remove session from the list of outstanding sessions.
659         (WebCore::CDMPrivateMediaSourceAVFObjC::supportsMIMEType): Deleted.
660         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.h: Copied from Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h.
661         (WebCore::CDMSessionAVContentKeySession::hasContentKeySession): Simple accessor.
662         (WebCore::toCDMSessionAVContentKeySession): Safe casting.
663         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm: Added.
664         (-[CDMSessionAVContentKeySessionDelegate initWithParent:]): Simple constructor.
665         (-[CDMSessionAVContentKeySessionDelegate invalidate]): Remove reference to parent.
666         (-[CDMSessionAVContentKeySessionDelegate contentKeySession:willProvideKeyRequestInitializationDataForTrackID:]): Pass to parent.
667         (-[CDMSessionAVContentKeySessionDelegate contentKeySession:didProvideKeyRequestInitializationData:requestHandling:]): Ditto.
668         (-[CDMSessionAVContentKeySessionDelegate contentKeySessionContentProtectionSessionIdentifierDidChange:]): Ditto.
669         (WebCore::CDMSessionAVContentKeySession::CDMSessionAVContentKeySession): Create the delegate.
670         (WebCore::CDMSessionAVContentKeySession::~CDMSessionAVContentKeySession): Invalidate the delegate and remove all parsers.
671         (WebCore::CDMSessionAVContentKeySession::isAvailable): Return true if AVContentKeySession class is available.
672         (WebCore::CDMSessionAVContentKeySession::generateKeyRequest): Support "keyrelease" message, setting of the certificate, and creating key request object. 
673         (WebCore::CDMSessionAVContentKeySession::releaseKeys): Retrieve keys from storage location.
674         (WebCore::isEqual): Compares a Uint8Array to a char*.
675         (WebCore::CDMSessionAVContentKeySession::update): Support "acknowledged" message, "renew" message, and key addition.
676         (WebCore::CDMSessionAVContentKeySession::addParser): Add the parser to the AVContentKeySession.
677         (WebCore::CDMSessionAVContentKeySession::removeParser): Remove parser from same.
678         (WebCore::CDMSessionAVContentKeySession::generateKeyReleaseMessage): Retrieve key release message from AVContentKeySession.
679         (WebCore::CDMSessionAVContentKeySession::didProvideContentKeyRequest): Simple setter.
680         (WebCore::CDMSessionAVContentKeySession::contentKeySession): Lazily create the AVContentKeySession.
681         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
682         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
683         (WebCore::CDMSessionAVFoundationObjC::CDMSessionAVFoundationObjC):
684         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.h: Copied from Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h.
685         (WebCore::toCDMSessionAVStreamSession):
686         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm: Copied from Source/WebCore/platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm.
687         (-[CDMSessionAVStreamSessionObserver initWithParent:]): Moved from CDMSessionMediaSourceAVFObjcObserver.
688         (-[CDMSessionAVStreamSessionObserver contentProtectionSessionIdentifierChanged:]): Ditto.
689         (WebCore::CDMSessionAVStreamSession::CDMSessionAVStreamSession): Ditto.
690         (WebCore::CDMSessionAVStreamSession::~CDMSessionAVStreamSession): Ditto.
691         (WebCore::CDMSessionAVStreamSession::generateKeyRequest): Ditto.
692         (WebCore::CDMSessionAVStreamSession::releaseKeys): Ditto.
693         (WebCore::isEqual): Ditto.
694         (WebCore::CDMSessionAVStreamSession::update): Ditto.
695         (WebCore::CDMSessionAVStreamSession::setStreamSession): Ditto.
696         (WebCore::CDMSessionAVStreamSession::addParser): Ditto.
697         (WebCore::CDMSessionAVStreamSession::removeParser): Ditto.
698         (WebCore::CDMSessionAVStreamSession::generateKeyReleaseMessage): Ditto.
699         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
700         (WebCore::CDMSessionMediaSourceAVFObjC::invalidateCDM): Clear the m_cdm.
701         (WebCore::toCDMSessionMediaSourceAVFObjC):
702         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
703         (WebCore::CDMSessionMediaSourceAVFObjC::CDMSessionMediaSourceAVFObjC):
704         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC): Instruct our CDM to invalidate their references to us.
705         (WebCore::CDMSessionMediaSourceAVFObjC::addSourceBuffer): Call addParser().
706         (WebCore::CDMSessionMediaSourceAVFObjC::removeSourceBuffer): Call removeParser().
707         (WebCore::CDMSessionMediaSourceAVFObjC::layerDidReceiveError): Deleted.
708         (WebCore::CDMSessionMediaSourceAVFObjC::rendererDidReceiveError): Deleted.
709         
710         To give us a chance to create a CDMPrivate before we continue decoding media data, "block" further decoding
711         on the background thread by creating a semaphore and passing it to the main thread, to be triggered when
712         a CDM is created and attached to this source buffer.
713
714         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.h:
715         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
716         (-[WebAVStreamDataParserListener streamDataParser:didProvideContentKeyRequestInitializationData:forTrackID:]):
717         (WebCore::SourceBufferPrivateAVFObjC::~SourceBufferPrivateAVFObjC):
718         (WebCore::SourceBufferPrivateAVFObjC::willProvideContentKeyRequestInitializationDataForTrackID):
719         (WebCore::SourceBufferPrivateAVFObjC::didProvideContentKeyRequestInitializationDataForTrackID):
720         (WebCore::SourceBufferPrivateAVFObjC::setCDMSession):
721         (-[WebAVStreamDataParserListener streamDataParserWillProvideContentKeyRequestInitializationData:forTrackID:]): Deleted.
722         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
723
724         Drive-by fix: Only throw an error from keyRequestTimerFired() if the underlying call to
725         generateKeyRequest() returned an error, rather than just failed to create a message.
726
727         * Modules/encryptedmedia/MediaKeySession.cpp:
728         (WebCore::MediaKeySession::keyRequestTimerFired):
729
730         Drive-by fix: Pass the CDMSessionClient into CDM::createSession() so that it is immediately available
731         in the CDMSessionPrivate constructor, rather than setting the client immediately after construction.
732
733         * Modules/encryptedmedia/CDM.cpp:
734         (WebCore::CDM::createSession):
735         * Modules/encryptedmedia/CDM.h:
736         * Modules/encryptedmedia/CDMPrivate.h:
737         * Modules/encryptedmedia/CDMPrivateClearKey.cpp:
738         (WebCore::CDMPrivateClearKey::createSession):
739         * Modules/encryptedmedia/CDMPrivateClearKey.h:
740         * Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp:
741         (WebCore::CDMPrivateMediaPlayer::createSession):
742         * Modules/encryptedmedia/CDMPrivateMediaPlayer.h:
743         * Modules/encryptedmedia/CDMSessionClearKey.cpp:
744         (WebCore::CDMSessionClearKey::CDMSessionClearKey):
745         * Modules/encryptedmedia/CDMSessionClearKey.h:
746         * Modules/encryptedmedia/MediaKeySession.cpp:
747         (WebCore::MediaKeySession::MediaKeySession):
748         * platform/graphics/CDMSession.h:
749         * platform/graphics/MediaPlayer.cpp:
750         (WebCore::MediaPlayer::createSession):
751         * platform/graphics/MediaPlayer.h:
752         * platform/graphics/MediaPlayerPrivate.h:
753         (WebCore::MediaPlayerPrivateInterface::createSession):
754         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
755         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
756         (WebCore::MediaPlayerPrivateAVFoundationObjC::createSession):
757         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.h:
758         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::cdmSession):
759         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaSourceAVFObjC.mm:
760         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::setCDMSession):
761         (WebCore::MediaPlayerPrivateMediaSourceAVFObjC::keyNeeded): Deleted.
762         * testing/MockCDM.cpp:
763         (WebCore::MockCDM::createSession):
764         (WebCore::MockCDMSession::MockCDMSession):
765         * testing/MockCDM.h:
766
767         Add new files to the project:
768
769         * WebCore.xcodeproj/project.pbxproj:
770
771
772 2015-12-04  Brady Eidson  <beidson@apple.com>
773
774         Modern IDB: storage/indexeddb/cursor-update.html fails.
775         https://bugs.webkit.org/show_bug.cgi?id=151879
776
777         Reviewed by Oliver Hunt.
778
779         No new tests (At least one failing test now passes).
780
781         * Modules/indexeddb/client/IDBRequestImpl.cpp:
782         (WebCore::IDBClient::IDBRequest::IDBRequest):
783
784 2015-12-04  Brady Eidson  <beidson@apple.com>
785
786         Modern IDB: storage/indexeddb/version-change-exclusive.html fails
787         https://bugs.webkit.org/show_bug.cgi?id=151870
788
789         Reviewed by Alex Christensen.
790
791         Test: storage/indexeddb/modern/double-open.html
792               storage/indexeddb/version-change-exclusive.html
793
794         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
795         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): Delay handling open operations
796           while the first is still in progress.
797         (WebCore::IDBServer::UniqueIDBDatabase::didOpenBackingStore):
798         * Modules/indexeddb/server/UniqueIDBDatabase.h:
799
800 2015-12-04  Brady Eidson  <beidson@apple.com>
801
802         Modern IDB: storage/indexeddb/exceptions.html fails.
803         https://bugs.webkit.org/show_bug.cgi?id=151732
804
805         Reviewed by Alex Christensen.
806
807         No new tests (At least one failing test now passes).
808
809         - Lots of customized exception messages for IDB code to match the text expectations.
810         - Updates to the test expectations where we can't/won't match them exactly.
811         - And a couple of little required behavior changes exposed by the test
812
813         * Modules/indexeddb/IDBCursor.h:
814         * Modules/indexeddb/IDBCursor.idl:
815         * Modules/indexeddb/IDBDatabase.h:
816         * Modules/indexeddb/IDBDatabase.idl:
817         * Modules/indexeddb/IDBDatabaseException.cpp:
818         (WebCore::IDBDatabaseException::initializeDescription):
819         * Modules/indexeddb/IDBFactory.h:
820         * Modules/indexeddb/IDBFactory.idl:
821         * Modules/indexeddb/IDBIndex.h:
822         * Modules/indexeddb/IDBIndex.idl:
823         * Modules/indexeddb/IDBObjectStore.h:
824         * Modules/indexeddb/IDBObjectStore.idl:
825         * Modules/indexeddb/IDBRequest.h:
826         * Modules/indexeddb/IDBRequest.idl:
827         * Modules/indexeddb/IDBTransaction.h:
828         * Modules/indexeddb/IDBTransaction.idl:
829         
830         * Modules/indexeddb/client/IDBCursorImpl.cpp:
831         (WebCore::IDBClient::IDBCursor::update):
832         (WebCore::IDBClient::IDBCursor::advance):
833         (WebCore::IDBClient::IDBCursor::continueFunction):
834         (WebCore::IDBClient::IDBCursor::deleteFunction):
835         * Modules/indexeddb/client/IDBCursorImpl.h:
836         
837         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
838         (WebCore::IDBClient::IDBDatabase::createObjectStore):
839         (WebCore::IDBClient::IDBDatabase::transaction):
840         (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
841         * Modules/indexeddb/client/IDBDatabaseImpl.h:
842         
843         * Modules/indexeddb/client/IDBFactoryImpl.cpp:
844         (WebCore::IDBClient::IDBFactory::cmp):
845         * Modules/indexeddb/client/IDBFactoryImpl.h:
846         
847         * Modules/indexeddb/client/IDBIndexImpl.cpp:
848         (WebCore::IDBClient::IDBIndex::openCursor):
849         (WebCore::IDBClient::IDBIndex::count):
850         (WebCore::IDBClient::IDBIndex::doCount):
851         (WebCore::IDBClient::IDBIndex::openKeyCursor):
852         (WebCore::IDBClient::IDBIndex::get):
853         (WebCore::IDBClient::IDBIndex::doGet):
854         (WebCore::IDBClient::IDBIndex::getKey):
855         (WebCore::IDBClient::IDBIndex::doGetKey):
856         * Modules/indexeddb/client/IDBIndexImpl.h:
857         
858         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
859         (WebCore::IDBClient::IDBObjectStore::openCursor):
860         (WebCore::IDBClient::IDBObjectStore::get):
861         (WebCore::IDBClient::IDBObjectStore::add):
862         (WebCore::IDBClient::IDBObjectStore::put):
863         (WebCore::IDBClient::IDBObjectStore::putForCursorUpdate):
864         (WebCore::IDBClient::IDBObjectStore::putOrAdd):
865         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
866         (WebCore::IDBClient::IDBObjectStore::clear):
867         (WebCore::IDBClient::IDBObjectStore::createIndex):
868         (WebCore::IDBClient::IDBObjectStore::index):
869         (WebCore::IDBClient::IDBObjectStore::deleteIndex):
870         (WebCore::IDBClient::IDBObjectStore::count):
871         (WebCore::IDBClient::IDBObjectStore::doCount):
872         * Modules/indexeddb/client/IDBObjectStoreImpl.h:
873
874         * Modules/indexeddb/client/IDBRequestImpl.cpp:
875         (WebCore::IDBClient::IDBRequest::result):
876         (WebCore::IDBClient::IDBRequest::error):
877         * Modules/indexeddb/client/IDBRequestImpl.h:
878
879         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
880         (WebCore::IDBClient::IDBTransaction::objectStore):
881         (WebCore::IDBClient::IDBTransaction::abortDueToFailedRequest):
882         (WebCore::IDBClient::IDBTransaction::abort):
883         * Modules/indexeddb/client/IDBTransactionImpl.h:
884
885         * Modules/indexeddb/legacy/LegacyCursor.cpp:
886         (WebCore::LegacyCursor::update):
887         (WebCore::LegacyCursor::continueFunction):
888         (WebCore::LegacyCursor::deleteFunction):
889         * Modules/indexeddb/legacy/LegacyCursor.h:
890
891         * Modules/indexeddb/legacy/LegacyDatabase.cpp:
892         (WebCore::LegacyDatabase::createObjectStore):
893         (WebCore::LegacyDatabase::deleteObjectStore):
894         (WebCore::LegacyDatabase::transaction):
895         (WebCore::LegacyDatabase::forceClose):
896         * Modules/indexeddb/legacy/LegacyDatabase.h:
897
898         * Modules/indexeddb/legacy/LegacyFactory.cpp:
899         (WebCore::LegacyFactory::cmp):
900         * Modules/indexeddb/legacy/LegacyFactory.h:
901
902         * Modules/indexeddb/legacy/LegacyIndex.cpp:
903         (WebCore::LegacyIndex::openCursor):
904         (WebCore::LegacyIndex::count):
905         (WebCore::LegacyIndex::openKeyCursor):
906         (WebCore::LegacyIndex::get):
907         (WebCore::LegacyIndex::getKey):
908         * Modules/indexeddb/legacy/LegacyIndex.h:
909
910         * Modules/indexeddb/legacy/LegacyObjectStore.cpp:
911         (WebCore::LegacyObjectStore::get):
912         (WebCore::LegacyObjectStore::add):
913         (WebCore::LegacyObjectStore::put):
914         (WebCore::LegacyObjectStore::deleteFunction):
915         (WebCore::LegacyObjectStore::clear):
916         (WebCore::LegacyObjectStore::createIndex):
917         (WebCore::LegacyObjectStore::index):
918         (WebCore::LegacyObjectStore::deleteIndex):
919         (WebCore::LegacyObjectStore::openCursor):
920         (WebCore::LegacyObjectStore::count):
921         * Modules/indexeddb/legacy/LegacyObjectStore.h:
922         (WebCore::LegacyObjectStore::createIndex):
923         (WebCore::LegacyObjectStore::count):
924
925         * Modules/indexeddb/legacy/LegacyRequest.cpp:
926         (WebCore::LegacyRequest::result):
927         (WebCore::LegacyRequest::error):
928         (WebCore::LegacyRequest::dispatchEvent):
929         (WebCore::LegacyRequest::uncaughtExceptionInEventHandler):
930         * Modules/indexeddb/legacy/LegacyRequest.h:
931
932         * Modules/indexeddb/legacy/LegacyTransaction.cpp:
933         (WebCore::LegacyTransaction::objectStore):
934         (WebCore::LegacyTransaction::abort):
935         (WebCore::LegacyTransaction::stop):
936         * Modules/indexeddb/legacy/LegacyTransaction.h:
937
938         * bindings/js/JSDOMBinding.cpp:
939         (WebCore::createDOMException): For IDBDatabase exceptions, use createWithDescriptionAsMessage
940
941         * bindings/js/JSIDBDatabaseCustom.cpp:
942         (WebCore::JSIDBDatabase::createObjectStore):
943         (WebCore::JSIDBDatabase::transaction):
944
945         * bindings/js/JSIDBObjectStoreCustom.cpp:
946         (WebCore::putOrAdd):
947         (WebCore::JSIDBObjectStore::createIndex):
948
949         * dom/DOMCoreException.h:
950         (WebCore::DOMCoreException::createWithDescriptionAsMessage): Create an exception whose message
951           is the description.
952         (WebCore::DOMCoreException::DOMCoreException):
953
954         * dom/ExceptionBase.cpp:
955         (WebCore::ExceptionBase::ExceptionBase): Add a flag to determine where the message comes from
956         * dom/ExceptionBase.h:
957
958         * dom/make_dom_exceptions.pl:
959         (generateHeader): Add an IDBDatabaseException type
960
961         * inspector/InspectorIndexedDBAgent.cpp:
962
963 2015-12-04  Joseph Pecoraro  <pecoraro@apple.com>
964
965         Web Inspector: Remove untested and unused Worker inspection
966         https://bugs.webkit.org/show_bug.cgi?id=151848
967
968         Reviewed by Brian Burg.
969
970         * CMakeLists.txt:
971         * WebCore.vcxproj/WebCore.vcxproj:
972         * WebCore.vcxproj/WebCore.vcxproj.filters:
973         * WebCore.xcodeproj/project.pbxproj:
974         * bindings/js/JSBindingsAllInOne.cpp:
975         * bindings/js/WorkerScriptController.cpp:
976         * bindings/js/WorkerScriptDebugServer.cpp: Removed.
977         * bindings/js/WorkerScriptDebugServer.h: Removed.
978         * inspector/InspectorAllInOne.cpp:
979         * inspector/InspectorConsoleInstrumentation.h:
980         (WebCore::InspectorInstrumentation::addMessageToConsole):
981         * inspector/InspectorController.cpp:
982         (WebCore::InspectorController::InspectorController): Deleted.
983         * inspector/InspectorInstrumentation.cpp:
984         (WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStartImpl): Deleted.
985         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScopeImpl): Deleted.
986         (WebCore::InspectorInstrumentation::willEvaluateWorkerScript): Deleted.
987         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminatedImpl): Deleted.
988         (WebCore::InspectorInstrumentation::instrumentingAgentsForWorkerGlobalScope): Deleted.
989         (WebCore::InspectorInstrumentation::instrumentingAgentsForNonDocumentContext): Deleted.
990         * inspector/InspectorInstrumentation.h:
991         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
992         (WebCore::InspectorInstrumentation::shouldPauseDedicatedWorkerOnStart): Deleted.
993         (WebCore::InspectorInstrumentation::didStartWorkerGlobalScope): Deleted.
994         (WebCore::InspectorInstrumentation::workerGlobalScopeTerminated): Deleted.
995         * inspector/InspectorTimelineAgent.h:
996         * inspector/InspectorWebAgentBase.h:
997         (WebCore::WorkerAgentContext::WorkerAgentContext): Deleted.
998         * inspector/InspectorWorkerAgent.cpp: Removed.
999         * inspector/InspectorWorkerAgent.h: Removed.
1000         * inspector/InspectorWorkerResource.h: Removed.
1001         * inspector/InstrumentingAgents.cpp:
1002         (WebCore::InstrumentingAgents::reset): Deleted.
1003         * inspector/InstrumentingAgents.h:
1004         (WebCore::InstrumentingAgents::workerRuntimeAgent): Deleted.
1005         (WebCore::InstrumentingAgents::setWorkerRuntimeAgent): Deleted.
1006         (WebCore::InstrumentingAgents::inspectorWorkerAgent): Deleted.
1007         (WebCore::InstrumentingAgents::setInspectorWorkerAgent): Deleted.
1008         * inspector/PageConsoleAgent.h:
1009         * inspector/PageScriptDebugServer.cpp:
1010         (WebCore::PageScriptDebugServer::PageScriptDebugServer):
1011         * inspector/WorkerConsoleAgent.cpp: Removed.
1012         * inspector/WorkerConsoleAgent.h: Removed.
1013         * inspector/WorkerDebuggerAgent.cpp: Removed.
1014         * inspector/WorkerDebuggerAgent.h: Removed.
1015         * inspector/WorkerInspectorController.cpp: Removed.
1016         * inspector/WorkerInspectorController.h: Removed.
1017         * inspector/WorkerRuntimeAgent.cpp: Removed.
1018         * inspector/WorkerRuntimeAgent.h: Removed.
1019         * workers/Worker.cpp:
1020         (WebCore::Worker::notifyFinished): Deleted.
1021         * workers/WorkerGlobalScope.cpp:
1022         (WebCore::WorkerGlobalScope::WorkerGlobalScope): Deleted.
1023         (WebCore::WorkerGlobalScope::~WorkerGlobalScope): Deleted.
1024         * workers/WorkerGlobalScope.h:
1025         (WebCore::WorkerGlobalScope::workerInspectorController): Deleted.
1026         * workers/WorkerGlobalScopeProxy.h:
1027         (WebCore::WorkerGlobalScopeProxy::PageInspector::~PageInspector): Deleted.
1028         (WebCore::WorkerGlobalScopeProxy::connectToInspector): Deleted.
1029         (WebCore::WorkerGlobalScopeProxy::disconnectFromInspector): Deleted.
1030         (WebCore::WorkerGlobalScopeProxy::sendMessageToInspector): Deleted.
1031         * workers/WorkerMessagingProxy.cpp:
1032         (WebCore::WorkerMessagingProxy::WorkerMessagingProxy): Deleted.
1033         (WebCore::WorkerMessagingProxy::startWorkerGlobalScope): Deleted.
1034         (WebCore::WorkerMessagingProxy::connectToInspector): Deleted.
1035         (WebCore::WorkerMessagingProxy::disconnectFromInspector): Deleted.
1036         (WebCore::WorkerMessagingProxy::sendMessageToInspector): Deleted.
1037         (WebCore::WorkerMessagingProxy::workerGlobalScopeDestroyedInternal): Deleted.
1038         (WebCore::WorkerMessagingProxy::terminateWorkerGlobalScope): Deleted.
1039         (WebCore::WorkerMessagingProxy::postMessageToPageInspector): Deleted.
1040         * workers/WorkerMessagingProxy.h:
1041         * workers/WorkerReportingProxy.h:
1042         * workers/WorkerThread.cpp:
1043         (WebCore::WorkerThread::workerThread): Deleted.
1044
1045 2015-12-03  Sergio Villar Senin  <svillar@igalia.com>
1046
1047         [css-grid] Fix height computation of grid items with borders inside fr tracks
1048         https://bugs.webkit.org/show_bug.cgi?id=151798
1049
1050         Reviewed by Zalan Bujtas.
1051
1052         Since r192154 we run a second pass of the track sizing
1053         algorithm whenever the height of the grid is indefinite in
1054         order to properly compute row sizes. The available space
1055         passed to the track sizing algorithm must not contain neither
1056         borders nor paddings, otherwise it will think that it has more
1057         space available than the existing one. We should use the
1058         height of the content box instead.
1059
1060         Test: fast/css-grid-layout/grid-item-with-border-in-fr.html
1061
1062         * rendering/RenderGrid.cpp:
1063         (WebCore::RenderGrid::layoutBlock):
1064
1065 2015-12-03  Brady Eidson  <beidson@apple.com>
1066
1067         Modern IDB: storage/indexeddb/cursor-index-delete.html fails.
1068         https://bugs.webkit.org/show_bug.cgi?id=151847
1069
1070         Reviewed by Andy Estes.
1071
1072         No new tests (At least one failing test now passes).
1073
1074         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
1075         (WebCore::IDBServer::MemoryIndexCursor::MemoryIndexCursor):
1076         (WebCore::IDBServer::MemoryIndexCursor::currentData):
1077
1078 2015-12-03  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
1079
1080         Reduce uses of PassRefPtr in DOM - 1
1081         https://bugs.webkit.org/show_bug.cgi?id=149788
1082
1083         Reviewed by Darin Adler.
1084
1085         As a step to purge PassRefPtr, this patch reduces the uses in WebCore/dom.
1086
1087         * dom/ChildListMutationScope.cpp:
1088         (WebCore::ChildListMutationAccumulator::getOrCreate):
1089         * dom/ChildListMutationScope.h:
1090         * dom/ClipboardEvent.cpp:
1091         (WebCore::ClipboardEvent::ClipboardEvent):
1092         * dom/ClipboardEvent.h:
1093         * dom/CompositionEvent.cpp:
1094         (WebCore::CompositionEvent::CompositionEvent):
1095         (WebCore::CompositionEvent::initCompositionEvent):
1096         * dom/CompositionEvent.h:
1097         * dom/DOMNamedFlowCollection.cpp:
1098         (WebCore::DOMNamedFlowCollection::item):
1099         * dom/DOMNamedFlowCollection.h:
1100         * dom/DOMStringList.h:
1101         * dom/DeviceMotionController.cpp:
1102         (WebCore::DeviceMotionController::getLastEvent):
1103         * dom/DeviceMotionController.h:
1104         * dom/DeviceOrientationController.cpp:
1105         (WebCore::DeviceOrientationController::getLastEvent):
1106         * dom/DeviceOrientationController.h:
1107         * editing/Editor.cpp:
1108         (WebCore::Editor::dispatchCPPEvent):
1109         * page/DeviceController.h:
1110         (WebCore::DeviceController::getLastEvent):
1111
1112 2015-12-03  Said Abou-Hallawa  <sabouhallawa@apple.com>
1113
1114         Remove the use of GraphicsContextStateSaver from RenderLayer::paintLayerByApplyingTransform
1115         https://bugs.webkit.org/show_bug.cgi?id=151829
1116
1117         Reviewed by Simon Fraser.
1118
1119         Set the CTM of the GraphicsContext to its original value before changing
1120         it. This is a lot cheaper than using GraphicsContextStateSaver to save the
1121         whole state of the GraphicsContext and restore it back;
1122
1123         * rendering/RenderLayer.cpp:
1124         (WebCore::RenderLayer::paintLayerByApplyingTransform):
1125
1126 2015-12-03  Eric Carlson  <eric.carlson@apple.com>
1127
1128         [MediaStream] Update MediaStreamTrack.getCapabilities
1129         https://bugs.webkit.org/show_bug.cgi?id=151728
1130
1131         Reviewed by Jer Noble.
1132
1133         Test: fast/mediastream/MediaStreamTrack-getCapabilities.html
1134
1135         * CMakeLists.txt: Remove files deleted from the repository.
1136
1137         * DerivedSources.make: Ditto.
1138
1139         * Modules/mediastream/AllAudioCapabilities.h: Removed.
1140         * Modules/mediastream/AllAudioCapabilities.idl: Removed.
1141         * Modules/mediastream/AllVideoCapabilities.h: Removed.
1142         * Modules/mediastream/AllVideoCapabilities.idl: Removed.
1143         * Modules/mediastream/CapabilityRange.cpp: Removed.
1144         * Modules/mediastream/CapabilityRange.h: Removed.
1145         * Modules/mediastream/CapabilityRange.idl: Removed.
1146
1147         * Modules/mediastream/MediaSourceSettings.h:
1148         (WebCore::MediaSourceSettings::supportsVolume): Volume is a double.
1149         (WebCore::MediaSourceSettings::volume): Double.
1150
1151         * Modules/mediastream/MediaStreamCapabilities.cpp: Removed.
1152         * Modules/mediastream/MediaStreamCapabilities.h: Removed.
1153         * Modules/mediastream/MediaStreamCapabilities.idl: Removed.
1154
1155         * Modules/mediastream/MediaStreamTrack.cpp:
1156         (WebCore::MediaStreamTrack::getCapabilities): MediaStreamCapabilities is gone, return a RealtimeMediaSourceCapabilities.
1157         * Modules/mediastream/MediaStreamTrack.h:
1158         * Modules/mediastream/MediaStreamTrack.idl:
1159
1160         * WebCore.xcodeproj/project.pbxproj: Remove files deleted from the repository.
1161         * bindings/js/JSMediaStreamTrackCustom.cpp:
1162         (WebCore::capabilityValue):
1163         (WebCore::JSMediaStreamTrack::getCapabilities): Create and return a dictionary of capatilities.
1164
1165         * platform/mediastream/RealtimeMediaSourceCapabilities.h:
1166         (WebCore::CapabilityValueOrRange::type):
1167         (WebCore::CapabilityValueOrRange::CapabilityValueOrRange):
1168         (WebCore::CapabilityValueOrRange::rangeMin):
1169         (WebCore::CapabilityValueOrRange::rangeMax):
1170         (WebCore::CapabilityValueOrRange::value):
1171         (WebCore::RealtimeMediaSourceCapabilities::create):
1172         (WebCore::RealtimeMediaSourceCapabilities::~RealtimeMediaSourceCapabilities):
1173         (WebCore::RealtimeMediaSourceCapabilities::supportsWidth):
1174         (WebCore::RealtimeMediaSourceCapabilities::width):
1175         (WebCore::RealtimeMediaSourceCapabilities::setWidth):
1176         (WebCore::RealtimeMediaSourceCapabilities::supportsHeight):
1177         (WebCore::RealtimeMediaSourceCapabilities::height):
1178         (WebCore::RealtimeMediaSourceCapabilities::setHeight):
1179         (WebCore::RealtimeMediaSourceCapabilities::supportsFrameRate):
1180         (WebCore::RealtimeMediaSourceCapabilities::frameRate):
1181         (WebCore::RealtimeMediaSourceCapabilities::setFrameRate):
1182         (WebCore::RealtimeMediaSourceCapabilities::supportsFacingMode):
1183         (WebCore::RealtimeMediaSourceCapabilities::facingMode):
1184         (WebCore::RealtimeMediaSourceCapabilities::addFacingMode):
1185         (WebCore::RealtimeMediaSourceCapabilities::supportsAspectRatio):
1186         (WebCore::RealtimeMediaSourceCapabilities::aspectRatio):
1187         (WebCore::RealtimeMediaSourceCapabilities::setAspectRatio):
1188         (WebCore::RealtimeMediaSourceCapabilities::supportsVolume):
1189         (WebCore::RealtimeMediaSourceCapabilities::volume):
1190         (WebCore::RealtimeMediaSourceCapabilities::setVolume):
1191         (WebCore::RealtimeMediaSourceCapabilities::supportsSampleRate):
1192         (WebCore::RealtimeMediaSourceCapabilities::sampleRate):
1193         (WebCore::RealtimeMediaSourceCapabilities::setSampleRate):
1194         (WebCore::RealtimeMediaSourceCapabilities::supportsSampleSize):
1195         (WebCore::RealtimeMediaSourceCapabilities::sampleSize):
1196         (WebCore::RealtimeMediaSourceCapabilities::setSampleSize):
1197         (WebCore::RealtimeMediaSourceCapabilities::supportsEchoCancellation):
1198         (WebCore::RealtimeMediaSourceCapabilities::echoCancellation):
1199         (WebCore::RealtimeMediaSourceCapabilities::setEchoCancellation):
1200         (WebCore::RealtimeMediaSourceCapabilities::supportsDeviceId):
1201         (WebCore::RealtimeMediaSourceCapabilities::deviceId):
1202         (WebCore::RealtimeMediaSourceCapabilities::setDeviceId):
1203         (WebCore::RealtimeMediaSourceCapabilities::supportsGroupId):
1204         (WebCore::RealtimeMediaSourceCapabilities::groupId):
1205         (WebCore::RealtimeMediaSourceCapabilities::setGroupId):
1206         (WebCore::RealtimeMediaSourceCapabilities::RealtimeMediaSourceCapabilities):
1207         (WebCore::RealtimeMediaSourceCapabilityRange::RealtimeMediaSourceCapabilityRange): Deleted.
1208         (WebCore::RealtimeMediaSourceCapabilityRange::min): Deleted.
1209         (WebCore::RealtimeMediaSourceCapabilityRange::max): Deleted.
1210         (WebCore::RealtimeMediaSourceCapabilityRange::type): Deleted.
1211         (WebCore::RealtimeMediaSourceCapabilityRange::supported): Deleted.
1212         (WebCore::RealtimeMediaSourceCapabilities::sourceId): Deleted.
1213         (WebCore::RealtimeMediaSourceCapabilities::setSourceId): Deleted.
1214         (WebCore::RealtimeMediaSourceCapabilities::facingModes): Deleted.
1215         (WebCore::RealtimeMediaSourceCapabilities::setWidthRange): Deleted.
1216         (WebCore::RealtimeMediaSourceCapabilities::setHeightRange): Deleted.
1217         (WebCore::RealtimeMediaSourceCapabilities::setFrameRateRange): Deleted.
1218         (WebCore::RealtimeMediaSourceCapabilities::setAspectRatioRange): Deleted.
1219         (WebCore::RealtimeMediaSourceCapabilities::setVolumeRange): Deleted.
1220         (WebCore::RealtimeMediaSourceCapabilities::hasVideoSource): Deleted.
1221         (WebCore::RealtimeMediaSourceCapabilities::setHasVideoSource): Deleted.
1222
1223         * platform/mediastream/RealtimeMediaSourceSettings.h:
1224         (WebCore::RealtimeMediaSourceSettings::volume): Volume is a double.
1225         (WebCore::RealtimeMediaSourceSettings::setVolume): Ditt.
1226
1227         * platform/mediastream/mac/AVAudioCaptureSource.mm:
1228         (WebCore::AVAudioCaptureSource::initializeCapabilities): Initialize volume capability.
1229
1230         * platform/mediastream/mac/AVMediaCaptureSource.mm:
1231         (WebCore::AVMediaCaptureSource::capabilities): RealtimeMediaSourceCapabilities constructor takes
1232           supportedConstraints. sourceId -> deviceId.
1233
1234         * platform/mediastream/mac/AVVideoCaptureSource.mm:
1235         (WebCore::AVVideoCaptureSource::initializeCapabilities): DeviceId is set by the base class.
1236
1237         * platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm: Drive-by cleanup, remove unused code.
1238
1239         * platform/mock/MockRealtimeAudioSource.cpp:
1240         (WebCore::MockRealtimeAudioSource::initializeCapabilities): Updated.
1241         (WebCore::MockRealtimeAudioSource::initializeSupportedConstraints): Ditto.
1242
1243         * platform/mock/MockRealtimeMediaSource.cpp:
1244         (WebCore::MockRealtimeMediaSource::capabilities): sourceId -> deviceId.
1245
1246         * platform/mock/MockRealtimeVideoSource.cpp:
1247         (WebCore::MockRealtimeVideoSource::initializeCapabilities): Updated.
1248         (WebCore::MockRealtimeVideoSource::initializeSupportedConstraints): Ditto.
1249
1250 2015-12-03  Simon Fraser  <simon.fraser@apple.com>
1251
1252         Have layer memory use consult the backing store format
1253         https://bugs.webkit.org/show_bug.cgi?id=151827
1254         rdar://problem/23746497
1255
1256         Reviewed by Dean Jackson.
1257         
1258         When computing the backing store memory size, take the pixel format into account,
1259         rather than assuming 4 bytes per pixel.
1260
1261         * platform/graphics/ca/GraphicsLayerCA.cpp:
1262         * platform/graphics/ca/PlatformCALayer.h:
1263
1264 2015-12-03  Anders Carlsson  <andersca@apple.com>
1265
1266         Remove Objective-C GC support
1267         https://bugs.webkit.org/show_bug.cgi?id=151819
1268         rdar://problem/23746991
1269
1270         Reviewed by Dan Bernstein.
1271
1272         * Configurations/Base.xcconfig:
1273         * bindings/objc/WebScriptObject.mm:
1274         (+[WebScriptObject initialize]): Deleted.
1275         (-[WebScriptObject finalize]): Deleted.
1276         * bindings/scripts/CodeGeneratorObjC.pm:
1277         (GenerateImplementation):
1278         * bindings/scripts/test/ObjC/DOMTestActiveDOMObject.mm:
1279         (-[DOMTestActiveDOMObject finalize]): Deleted.
1280         * bindings/scripts/test/ObjC/DOMTestCallback.mm:
1281         (-[DOMTestCallback finalize]): Deleted.
1282         * bindings/scripts/test/ObjC/DOMTestCallbackFunction.mm:
1283         (-[DOMTestCallbackFunction finalize]): Deleted.
1284         * bindings/scripts/test/ObjC/DOMTestCustomConstructorWithNoInterfaceObject.mm:
1285         (-[DOMTestCustomConstructorWithNoInterfaceObject finalize]): Deleted.
1286         * bindings/scripts/test/ObjC/DOMTestCustomNamedGetter.mm:
1287         (-[DOMTestCustomNamedGetter finalize]): Deleted.
1288         * bindings/scripts/test/ObjC/DOMTestEventConstructor.mm:
1289         (-[DOMTestEventConstructor finalize]): Deleted.
1290         * bindings/scripts/test/ObjC/DOMTestEventTarget.mm:
1291         (-[DOMTestEventTarget finalize]): Deleted.
1292         * bindings/scripts/test/ObjC/DOMTestException.mm:
1293         (-[DOMTestException finalize]): Deleted.
1294         * bindings/scripts/test/ObjC/DOMTestGenerateIsReachable.mm:
1295         (-[DOMTestGenerateIsReachable finalize]): Deleted.
1296         * bindings/scripts/test/ObjC/DOMTestInterface.mm:
1297         (-[DOMTestInterface finalize]): Deleted.
1298         * bindings/scripts/test/ObjC/DOMTestJSBuiltinConstructor.mm:
1299         (-[DOMTestJSBuiltinConstructor finalize]): Deleted.
1300         * bindings/scripts/test/ObjC/DOMTestMediaQueryListListener.mm:
1301         (-[DOMTestMediaQueryListListener finalize]): Deleted.
1302         * bindings/scripts/test/ObjC/DOMTestNamedConstructor.mm:
1303         (-[DOMTestNamedConstructor finalize]): Deleted.
1304         * bindings/scripts/test/ObjC/DOMTestNondeterministic.mm:
1305         (-[DOMTestNondeterministic finalize]): Deleted.
1306         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1307         (-[DOMTestObj finalize]): Deleted.
1308         * bindings/scripts/test/ObjC/DOMTestOverloadedConstructors.mm:
1309         (-[DOMTestOverloadedConstructors finalize]): Deleted.
1310         * bindings/scripts/test/ObjC/DOMTestOverrideBuiltins.mm:
1311         (-[DOMTestOverrideBuiltins finalize]): Deleted.
1312         * bindings/scripts/test/ObjC/DOMTestSerializedScriptValueInterface.mm:
1313         (-[DOMTestSerializedScriptValueInterface finalize]): Deleted.
1314         * bindings/scripts/test/ObjC/DOMTestTypedefs.mm:
1315         (-[DOMTestTypedefs finalize]): Deleted.
1316         * bindings/scripts/test/ObjC/DOMattribute.mm:
1317         (-[DOMattribute finalize]): Deleted.
1318         * bindings/scripts/test/ObjC/DOMreadonly.mm:
1319         (-[DOMreadonly finalize]): Deleted.
1320         * bridge/objc/objc_instance.mm:
1321         (ObjcInstance::virtualBegin):
1322         (allocateAutoReleasePool): Deleted.
1323         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1324         * platform/mac/SharedBufferMac.mm:
1325         (+[WebCoreSharedBufferData initialize]): Deleted.
1326         (-[WebCoreSharedBufferData finalize]): Deleted.
1327         * platform/mac/WebCoreObjCExtras.h:
1328         (WebCoreObjCFinalizeOnMainThread): Deleted.
1329
1330 2015-12-03  Zalan Bujtas  <zalan@apple.com>
1331
1332         Simple line layout: Print out simple line layout statistics for the current page from command line.
1333         https://bugs.webkit.org/show_bug.cgi?id=151806
1334
1335         Reviewed Simon Fraser.
1336
1337         com.apple.WebKit.showSimpleLineLayoutCoverage prints out a coverage summary of the current page,
1338         while com.apple.WebKit.showSimpleLineLayoutReasons lists the non-simple line layout blocks including the reasons why
1339         they are not covered.
1340
1341         No change in functionality.
1342
1343         * rendering/SimpleLineLayout.cpp:
1344         (WebCore::SimpleLineLayout::canUseForText):
1345         (WebCore::SimpleLineLayout::canUseForFontAndText):
1346         (WebCore::SimpleLineLayout::canUseForStyle):
1347         (WebCore::SimpleLineLayout::canUseForWithReason):
1348         (WebCore::SimpleLineLayout::canUseFor):
1349         (WebCore::SimpleLineLayout::printReason):
1350         (WebCore::SimpleLineLayout::printReasons):
1351         (WebCore::SimpleLineLayout::printTextForSubtree):
1352         (WebCore::SimpleLineLayout::textLengthForSubtree):
1353         (WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlows):
1354         (WebCore::SimpleLineLayout::collectNonEmptyLeafRenderBlockFlowsForCurrentPage):
1355         (WebCore::SimpleLineLayout::printSimpleLineLayoutBlockList):
1356         (WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):
1357
1358 2015-12-03  Jonathan Davis  <jond@apple.com>
1359
1360         Add WebCrypto to status page
1361         https://bugs.webkit.org/show_bug.cgi?id=151760
1362
1363         Reviewed by Timothy Hatcher.
1364
1365         * features.json:
1366
1367 2015-12-03  Keith Rollin  <krollin@apple.com>
1368
1369         [Win] fast/forms/HTMLOptionElement_label03.html failing on win7
1370         https://bugs.webkit.org/show_bug.cgi?id=150909
1371         rdar://problem/23539673
1372
1373         Reviewed by Darin Adler.
1374
1375         When returning text to be displayed, an <option> element will return
1376         the value of a label attribute if it exists, or the text content as a
1377         fallback. The failing test concerned the display of a <select>
1378         element when it contained a sole <option> element that had a label
1379         attribute set to a single space. When displayed, various
1380         platform-specific bits of code will strip off the leading and trailing
1381         whitespace. However, when WebKit would use this text to measure how
1382         wide the <select> popup menu button should be, it would not strip off
1383         spaces, leading to the calculated width being wider than necessary.
1384         The approach taken to fix this is to strip whitespace in the label
1385         attribute before it is returned from the <option> element.
1386
1387         No new tests. fast/forms/HTMLOptionElement_label03.html had been
1388         marked as being expected to fail in TestExpectations; that test now
1389         succeeds.
1390
1391         * html/HTMLOptionElement.cpp:
1392         (WebCore::HTMLOptionElement::label):
1393
1394 2015-12-03  Sam Weinig  <sam@webkit.org>
1395
1396         Try to fix the Windows build.
1397
1398         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1399         (WebCore::JSWorkerGlobalScopeBase::javaScriptRuntimeFlags):
1400         (WebCore::JSWorkerGlobalScopeBase::queueTaskToEventLoop):
1401
1402 2015-12-03  Brady Eidson  <beidson@apple.com>
1403
1404         Modern IDB: storage/indexeddb/cursor-advance.html fails.
1405         https://bugs.webkit.org/show_bug.cgi?id=151731
1406
1407         Reviewed by Alex Christensen.
1408
1409         No new tests (At least one failing test now passes).
1410
1411         * Modules/indexeddb/IDBCursor.h:
1412         * Modules/indexeddb/IDBCursor.idl:
1413         
1414         * Modules/indexeddb/client/IDBCursorImpl.cpp:
1415         (WebCore::IDBClient::IDBCursor::advance): Return a custom exception message for TypeError.
1416         * Modules/indexeddb/client/IDBCursorImpl.h:
1417         
1418         * Modules/indexeddb/legacy/LegacyCursor.cpp:
1419         (WebCore::LegacyCursor::advance):
1420         * Modules/indexeddb/legacy/LegacyCursor.h:
1421         
1422         * bindings/js/JSDOMBinding.cpp:
1423         (WebCore::createDOMException):
1424         (WebCore::setDOMException):
1425         * bindings/js/JSDOMBinding.h:
1426         
1427         * bindings/scripts/IDLAttributes.txt:
1428         
1429         * inspector/InspectorIndexedDBAgent.cpp:
1430
1431 2015-12-03  Brent Fulgham  <bfulgham@apple.com>
1432
1433         Allow JavaScript to iterate over plugins for local files
1434         https://bugs.webkit.org/show_bug.cgi?id=151783
1435         <rdar://problem/23692113>
1436
1437         Reviewed by Alexey Proskuryakov.
1438
1439         Test: http/tests/plugins/plugin-javascript-access.html
1440               plugins/plugin-javascript-access.html
1441
1442         * page/Page.cpp:
1443         (WebCore::Page::showAllPlugins): True if we set the debugging flag to show
1444         all plugins, or if the document's origin is from a local file.
1445         * page/Page.h:
1446
1447 2015-12-03  Jer Noble  <jer.noble@apple.com>
1448
1449         Unreviewed build-fix; missing include.
1450
1451         * html/HTMLVideoElement.cpp:
1452
1453 2015-12-03  Brady Eidson  <beidson@apple.com>
1454
1455         Modern IDB: storage/indexeddb/cursor-skip-deleted.html crashes.
1456         https://bugs.webkit.org/show_bug.cgi?id=151794
1457
1458         Reviewed by Alex Christensen.
1459
1460         STL reverse_iterators are a tricky beast.
1461         
1462         They are implemented in terms of a normal forward iterator (called the "base" iterator),
1463         and they decrement a copy of that iterator when dereferenced.
1464             
1465         So when monitoring deletes from  a std::set to check if we should invalidate our current 
1466         reverse_iterator, we were incorrectly comparing the deleted key to the value pointed by the
1467         reverse_iterator instead of its base iterator.
1468         
1469         Since the iterators in question are bidirectional, anyways, we can just use a single iterator
1470         and either increment or decrement it as needed.
1471         
1472         No new tests (At least one failing (crashing) test now passes).
1473
1474         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
1475         (WebCore::IDBServer::MemoryObjectStoreCursor::objectStoreCleared):
1476         (WebCore::IDBServer::MemoryObjectStoreCursor::keyDeleted):
1477         (WebCore::IDBServer::MemoryObjectStoreCursor::keyAdded):
1478         (WebCore::IDBServer::MemoryObjectStoreCursor::setFirstInRemainingRange):
1479         (WebCore::IDBServer::MemoryObjectStoreCursor::setForwardIteratorFromRemainingRange):
1480         (WebCore::IDBServer::MemoryObjectStoreCursor::setReverseIteratorFromRemainingRange):
1481         (WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
1482         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementForwardIterator):
1483         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):
1484         (WebCore::IDBServer::MemoryObjectStoreCursor::iterate):
1485         (WebCore::IDBServer::MemoryObjectStoreCursor::firstForwardIteratorInRemainingRange): Deleted.
1486         (WebCore::IDBServer::MemoryObjectStoreCursor::firstReverseIteratorInRemainingRange): Deleted.
1487         (WebCore::IDBServer::MemoryObjectStoreCursor::hasIterators): Deleted.
1488         (WebCore::IDBServer::MemoryObjectStoreCursor::hasValidPosition): Deleted.
1489         (WebCore::IDBServer::MemoryObjectStoreCursor::clearIterators): Deleted.
1490         * Modules/indexeddb/server/MemoryObjectStoreCursor.h:
1491
1492 2015-12-03  Per Arne Vollan  <peavo@outlook.com>
1493
1494         [WinCairo][MediaFoundation] Main thread can block when session is destroyed.
1495         https://bugs.webkit.org/show_bug.cgi?id=151803
1496
1497         Reviewed by Alex Christensen.
1498
1499         Set flag to make sure that the scheduler thread stops when the session ends.
1500
1501         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
1502         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::stopScheduler):
1503         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::processSamplesInQueue):
1504         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::schedulerThreadProcPrivate):
1505         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.h:
1506         (WebCore::MediaPlayerPrivateMediaFoundation::VideoScheduler::stopThread):
1507
1508 2015-12-03  Jer Noble  <jer.noble@apple.com>
1509
1510         [iOS] Fullscreen -> PiP should resume to Fullscreen, not inline
1511         https://bugs.webkit.org/show_bug.cgi?id=150906
1512
1513         Reviewed by Simon Fraser.
1514
1515         When restoring the user interface when exiting PiP, we should return to Fullscreen if that
1516         is where fullscreen was initiated from. Additionally, when we "auto-PiP" by backgrounding the
1517         app in Fullscreen mode, we should "auto-un-PiP" when restoring the application to foreground.
1518
1519         Rather than have a separate method to request exiting fullscreen, entering standard fullscreen,
1520         and switching to & from PiP, add a new method setFullscreenMode() which does all three.
1521
1522         * html/HTMLVideoElement.cpp:
1523         (WebCore::presentationModeToFullscreenMode):
1524         (WebCore::HTMLVideoElement::webkitSetPresentationMode):
1525         (WebCore::HTMLVideoElement::setFullscreenMode):
1526         * html/HTMLVideoElement.h:
1527
1528         Add methods to for clients to request a specific fullscreen mode, and to query whether
1529         the page is currently visible.
1530
1531         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
1532         (WebVideoFullscreenControllerContext::requestFullscreenMode):
1533         (WebVideoFullscreenControllerContext::isVisible):
1534         (WebVideoFullscreenControllerContext::requestExitFullscreen): Deleted.
1535         * platform/ios/WebVideoFullscreenModel.h:
1536         * platform/ios/WebVideoFullscreenModelVideoElement.h:
1537         * platform/ios/WebVideoFullscreenModelVideoElement.mm:
1538         (WebVideoFullscreenModelVideoElement::requestFullscreenMode):
1539         (WebVideoFullscreenModelVideoElement::isVisible):
1540         (WebVideoFullscreenModelVideoElement::requestExitFullscreen): Deleted.
1541
1542         Track whether returning from PiP should enter fullscreen, or whether foregrounding the app
1543         should cause PiP to return to fullscreen.
1544
1545         * platform/ios/WebVideoFullscreenInterfaceAVKit.h:
1546         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1547         (-[WebAVPlayerLayer layoutSublayers]): Renamed from -setBounds:. -layoutSublayers is called
1548             more consistently than -setBounds:, including when a sublayer is added to the layer.
1549         (WebAVPlayerLayerView_stopRoutingVideoToPictureInPicturePlayerLayerView): The PiP WebAVPlayerLayer's
1550             modelVideoLayerFrame property may have been modified, so pass it back up to the fullscreen
1551             layer when exiting PiP.
1552         (WebVideoFullscreenInterfaceAVKit::applicationDidBecomeActive): Request fullscreen if we auto-PiPed.
1553         (WebVideoFullscreenInterfaceAVKit::setupFullscreen): Only recreate owned objects if they did not already exist.
1554         (WebVideoFullscreenInterfaceAVKit::enterFullscreenStandard): If we are in PiP mode, enter fullscreen by stopping PiP.
1555         (WebVideoFullscreenInterfaceAVKit::requestHideAndExitFullscreen): requestExitFullscreen() -> requestFullscreenMode().
1556         (WebVideoFullscreenInterfaceAVKit::willStartPictureInPicture): Animate out the fullscreen window, if exiting Fullscreen -> PiP.
1557         (WebVideoFullscreenInterfaceAVKit::didStartPictureInPicture): Set m_shouldReturnToFullscreenAfterEnteringForeground if we auto-PiPed.
1558         (WebVideoFullscreenInterfaceAVKit::failedToStartPictureInPicture): requestExitFullscreen() -> requestFullscreenMode().
1559         (WebVideoFullscreenInterfaceAVKit::willStopPictureInPicture): If we are returning from PiP -> Fullscreen, do not hide the fullscreen window.
1560         (WebVideoFullscreenInterfaceAVKit::didStopPictureInPicture): If we are returning from PiP -> Fullscreen, show the controls and notify clients.
1561         (WebVideoFullscreenInterfaceAVKit::prepareForPictureInPictureStopWithCompletionHandler): Animate in the fullscreen window, if returning from PiP -> Fullscreen.
1562         (WebVideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason): Set m_shouldReturnToFullscreenWhenStoppingPiP if we are entering PiP from Fullscreen.
1563         * platform/spi/cocoa/AVKitSPI.h:
1564
1565 2015-12-02  Sam Weinig  <sam@webkit.org>
1566
1567         Promise callbacks should be called at microtask checkpoints
1568         https://bugs.webkit.org/show_bug.cgi?id=147933
1569
1570         Reviewed by Chris Dumez.
1571
1572         - Re-names MicroTaskQueue and MicroTask to MicrotaskQueue and Microtask to match the spec language.
1573         - Re-implements MicrotaskQueue and Microtask support suspended Microtasks (via the new KeepInQueue
1574           result value a Microtask can have when running) and correct behavior when Microtasks are added to
1575           the queue during a Microtask checkpoint.
1576         - MicrotaskQueue now has a mainThreadQueue() static function, replacing the old singleton() function,
1577           which can be used for the Document (non-Worker) Microtasks. For Workers, the a MicrotaskQueue 
1578           can be separately allocated for each WorkerGlobalScope (though this was not done in this change).
1579         - Adds a helper subclass of Microtask, ActiveDOMCallbackMicrotask, for Microtasks that are
1580           per-ScriptExecutationContext, and need to act as ActiveDOMCallbacks.
1581         - Re-implement Document (non-Worker) Promises on top of ActiveDOMCallbackMicrotask.
1582         - Re-implement MutationObserver delivery on top of Microtask.
1583
1584         Layout Test:
1585             fast/dom/microtask-promise-mutation-observer-order.html
1586
1587         * CMakeLists.txt:
1588         * WebCore.vcxproj/WebCore.vcxproj:
1589         * WebCore.xcodeproj/project.pbxproj:
1590         * dom/DOMAllInOne.cpp:
1591         Add new files.
1592
1593         * bindings/js/JSDOMWindowBase.cpp:
1594         (WebCore::JSDOMWindowBase::queueTaskToEventLoop):
1595         Switch to using ActiveDOMCallbackMicrotask/MicrotaskQueue rather than ScriptExecutionContext's Task mechanism
1596         for JavaScriptCore tasks.
1597
1598         * bindings/js/JSMainThreadExecState.cpp:
1599         (WebCore::JSMainThreadExecState::didLeaveScriptContext):
1600         Perform a microtask checkpoint rather than calling MutationObserver code explicitly now that mutation observers
1601         use microtasks.
1602
1603         * dom/ActiveDOMCallbackMicrotask.cpp: Added.
1604         (WebCore::ActiveDOMCallbackMicrotask::ActiveDOMCallbackMicrotask):
1605         (WebCore::ActiveDOMCallbackMicrotask::~ActiveDOMCallbackMicrotask):
1606         (WebCore::ActiveDOMCallbackMicrotask::run):
1607         (WebCore::ActiveDOMCallbackMicrotask::contextDestroyed):
1608         * dom/ActiveDOMCallbackMicrotask.h: Added.
1609         Add a helper subclass of Microtask which behaves like a ActiveDOMCallback (e.g. supports suspension
1610         and context destruction).
1611
1612         * dom/MicroTask.cpp: Renamed to Microtasks.cpp.
1613         * dom/MicroTask.h: Renamed to Microtasks.h.
1614         * dom/Microtasks.cpp: Renamed from Source/WebCore/dom/MicroTask.cpp.
1615         (WebCore::Microtask::removeSelfFromQueue):
1616         (WebCore::MicrotaskQueue::mainThreadQueue):
1617         (WebCore::MicrotaskQueue::append):
1618         (WebCore::MicrotaskQueue::remove):
1619         (WebCore::MicrotaskQueue::performMicrotaskCheckpoint):
1620         (WebCore::MicroTaskQueue::singleton): Deleted.
1621         (WebCore::MicroTaskQueue::queueMicroTask): Deleted.
1622         (WebCore::MicroTaskQueue::runMicroTasks): Deleted.
1623         * dom/Microtasks.h: Renamed from Source/WebCore/dom/MicroTask.h.
1624         (WebCore::Microtask::~Microtask):
1625         (WebCore::MicrotaskQueue::MicrotaskQueue):
1626         (WebCore::MicrotaskQueue::~MicrotaskQueue):
1627         (WebCore::MicroTask::~MicroTask): Deleted.
1628         (WebCore::MicroTaskQueue::~MicroTaskQueue): Deleted.
1629         (WebCore::MicroTaskQueue::MicroTaskQueue): Deleted.
1630         Re-implement MicrotaskQueue and Microtask to support Microtask suspension (via the KeepInQueue result
1631         value) and correct behavior when Microtasks are queued during checkpoints.
1632
1633         * dom/MutationObserver.cpp:
1634         (WebCore::suspendedMutationObservers):
1635         (WebCore::MutationObserverMicrotask::MutationObserverMicrotask):
1636         (WebCore::MutationObserverMicrotask::~MutationObserverMicrotask):
1637         (WebCore::MutationObserverMicrotask::run):
1638         (WebCore::queueMutationObserverCompoundMicrotask):
1639         (WebCore::MutationObserver::enqueueMutationRecord):
1640         (WebCore::MutationObserver::setHasTransientRegistration):
1641         * dom/MutationObserver.h:
1642         Re-implement MutationObserver delivery on top of Microtasks.
1643
1644         * dom/ScriptRunner.cpp:
1645         (WebCore::ScriptRunner::timerFired):
1646         Remove unnecessary call to runMicroTasks().
1647
1648         * html/parser/HTMLScriptRunner.cpp:
1649         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
1650         (WebCore::HTMLScriptRunner::runScript):
1651         Remove calls to MutationObserver::deliverAllMutations() now that the MicrotaskQueue will take care of it.
1652
1653         (WebCore::HTMLScriptRunner::executeScriptsWaitingForParsing):
1654         Remove unnecessary call to runMicroTasks().
1655
1656         * testing/Internals.cpp:
1657         (WebCore::Internals::queueMicroTask):
1658         Use ActiveDOMCallbackMicrotask rather than a custom test subclass.
1659
1660         * testing/MicroTaskTest.cpp: Removed.
1661         * testing/MicroTaskTest.h: Removed.
1662         Remove custom test subclass of Microtask, just use ActiveDOMCallbackMicrotask directly.
1663
1664 2015-12-03  Brady Eidson  <beidson@apple.com>
1665
1666         Add GetterRaisesExceptionWithMessage and SetterRaisesExceptionWithMessage to the code generator.
1667         https://bugs.webkit.org/show_bug.cgi?id=151807
1668
1669         Reviewed by Alex Christensen.
1670
1671         No new tests (Covered by changes to existing bindings tests).
1672
1673         While we're at it, rework the existing 'RaisesExceptionWithMessage' concept to use a struct instead of
1674         two separate variables to reduce complexity.
1675         
1676         * bindings/scripts/CodeGeneratorJS.pm:
1677         (GenerateImplementation):
1678         (GenerateImplementationFunctionCall):
1679         (GenerateConstructorDefinition):
1680         (GenerateParametersCheck): Deleted.
1681         (GenerateReturnParameters): Deleted.
1682         
1683         * bindings/scripts/IDLAttributes.txt:
1684         
1685         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
1686         (webkit_dom_test_obj_set_property):
1687         (webkit_dom_test_obj_get_property):
1688         (webkit_dom_test_obj_class_init):
1689         (webkit_dom_test_obj_get_attr_with_getter_exception_with_message):
1690         (webkit_dom_test_obj_set_attr_with_getter_exception_with_message):
1691         (webkit_dom_test_obj_get_attr_with_setter_exception_with_message):
1692         (webkit_dom_test_obj_set_attr_with_setter_exception_with_message):
1693         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
1694         
1695         * bindings/scripts/test/JS/JSTestObj.cpp:
1696         (WebCore::jsTestObjAttrWithGetterExceptionWithMessage):
1697         (WebCore::jsTestObjAttrWithSetterExceptionWithMessage):
1698         (WebCore::setJSTestObjAttrWithGetterExceptionWithMessage):
1699         (WebCore::setJSTestObjAttrWithSetterExceptionWithMessage):
1700         (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionWithMessage):
1701         * bindings/scripts/test/ObjC/DOMTestObj.h:
1702         
1703         * bindings/scripts/test/ObjC/DOMTestObj.mm:
1704         (-[DOMTestObj attrWithGetterExceptionWithMessage]):
1705         (-[DOMTestObj setAttrWithGetterExceptionWithMessage:]):
1706         (-[DOMTestObj attrWithSetterExceptionWithMessage]):
1707         (-[DOMTestObj setAttrWithSetterExceptionWithMessage:]):
1708         
1709         * bindings/scripts/test/TestObj.idl:
1710         
1711         * dom/ExceptionCode.h:
1712
1713 2015-12-03  Javier Fernandez  <jfernandez@igalia.com>
1714
1715         [css-grid] margin-left:auto and margin-top:auto discards the margin on opposite side
1716         https://bugs.webkit.org/show_bug.cgi?id=151802
1717
1718         Reviewed by Sergio Villar Senin.
1719
1720         When resolving auto margins so that they use the available space, in the
1721         corresponding axis, we must consider that there might be other specified
1722         margins. Such margins must account to determine the actual available space.
1723
1724         Test: fast/css-grid-layout/grid-item-auto-margins-must-respect-specified-margins.html
1725
1726         * rendering/RenderGrid.cpp:
1727         (WebCore::RenderGrid::updateAutoMarginsInRowAxisIfNeeded):
1728         (WebCore::RenderGrid::updateAutoMarginsInColumnAxisIfNeeded):
1729
1730 2015-12-02  Antti Koivisto  <antti@apple.com>
1731
1732         Move ResourceLoadScheduler to WebKit1
1733         https://bugs.webkit.org/show_bug.cgi?id=151743
1734
1735         Reviewed by Alex Christensen.
1736
1737         It is no longer used by WebKit2. Simplify the WebKit/WebCore interface.
1738
1739         * WebCore.xcodeproj/project.pbxproj:
1740         * dom/ContainerNode.cpp:
1741         * dom/Document.cpp:
1742         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
1743         * dom/Document.h:
1744         * loader/DocumentLoader.h:
1745         * loader/LoaderStrategy.cpp:
1746         (WebCore::LoaderStrategy::~LoaderStrategy):
1747         (WebCore::ResourceLoadSuspender::ResourceLoadSuspender):
1748         (WebCore::ResourceLoadSuspender::~ResourceLoadSuspender):
1749         (WebCore::LoaderStrategy::resourceLoadScheduler): Deleted.
1750         (WebCore::LoaderStrategy::loadResourceSynchronously): Deleted.
1751         (WebCore::LoaderStrategy::createBlobRegistry): Deleted.
1752         (WebCore::LoaderStrategy::createPingHandle): Deleted.
1753         * loader/LoaderStrategy.h:
1754
1755             Loading functions implemented on WebKit side move to pure virtual LoaderStrategy.
1756
1757         * loader/ResourceLoadScheduler.cpp: Removed.
1758         * loader/ResourceLoadScheduler.h: Removed.
1759
1760             ResourceLoadScheduler moves to WebKit1 as WebResourceLoadScheduler.
1761
1762         * loader/ResourceLoader.cpp:
1763         (WebCore::ResourceLoader::finishNetworkLoad):
1764         (WebCore::ResourceLoader::setDefersLoading):
1765         (WebCore::ResourceLoader::frameLoader):
1766         (WebCore::ResourceLoader::willSwitchToSubstituteResource):
1767         (WebCore::ResourceLoader::willSendRequestInternal):
1768         * loader/archive/ArchiveResourceCollection.h:
1769         * loader/cache/CachedResource.cpp:
1770         (WebCore::CachedResource::load):
1771         * loader/cache/CachedResourceLoader.cpp:
1772         (WebCore::CachedResourceLoader::performPostLoadActions):
1773         (WebCore::CachedResourceLoader::incrementRequestCount):
1774         * platform/PlatformStrategies.h:
1775         (WebCore::PlatformStrategies::pluginStrategy):
1776         (WebCore::PlatformStrategies::blobRegistry):
1777
1778             Move BlobRegistry factory function here from LoaderStrategy as this allows network process to have null loaderStrategy.
1779             (it could be renamed BlobStrategy for consistency later).
1780
1781         (WebCore::PlatformStrategies::PlatformStrategies):
1782         * platform/network/BlobRegistry.cpp:
1783         (WebCore::blobRegistry):
1784         (WebCore::BlobRegistry::~BlobRegistry):
1785         * platform/network/ResourceRequestBase.h:
1786         * style/StyleResolveTree.cpp:
1787         (WebCore::Style::PostResolutionCallbackDisabler::PostResolutionCallbackDisabler):
1788         (WebCore::Style::PostResolutionCallbackDisabler::~PostResolutionCallbackDisabler):
1789
1790 2015-12-02  Myles C. Maxfield  <mmaxfield@apple.com>
1791
1792         Unify font-variant-* with font-variant shorthand
1793         https://bugs.webkit.org/show_bug.cgi?id=149773
1794
1795         Reviewed by Darin Adler.
1796
1797         This patch makes font-variant a shorthand for the following properties:
1798         font-variant-ligatures
1799         font-variant-position
1800         font-variant-caps
1801         font-variant-numeric
1802         font-variant-alternates
1803         font-variant-east-asian
1804
1805         This is consistent with the CSS Fonts Level 3 spec.
1806
1807         This patch also migrates the "font" longhand to use the font-variant-caps
1808         property.
1809
1810         Test: fast/text/font-variant-shorthand.html
1811
1812         * css/CSSComputedStyleDeclaration.cpp:
1813         (WebCore::fontVariantEastAsianPropertyValue): Rename FontVariantEastAsian values.
1814         (WebCore::fontVariantFromStyle): We must consult with the longhand properties to determine
1815         font-variant computed style.
1816         (WebCore::ComputedStyleExtractor::propertyValue): Don't put any-old font-variant-caps inside
1817         the font shorthand.
1818         * css/CSSFontSelector.cpp:
1819         (WebCore::CSSFontSelector::addFontFaceRule): Guard against incorrect downcasts (due to inherit
1820         of the new shorthand property).
1821         * css/CSSParser.cpp: Parse font-variant as a shorthand. Also implement its "normal" and "none" values.
1822         (WebCore::CSSParser::parseValue):
1823         (WebCore::CSSParser::parseFont):
1824         (WebCore::CSSParser::parseSystemFont):
1825         (WebCore::CSSParser::parseFontVariantLigatures):
1826         (WebCore::CSSParser::parseFontVariantNumeric):
1827         (WebCore::CSSParser::parseFontVariantEastAsian):
1828         (WebCore::CSSParser::parseFontVariant):
1829         (WebCore::isValidKeywordPropertyAndValue): Deleted.
1830         (WebCore::isKeywordPropertyID): Deleted.
1831         * css/CSSParser.h:
1832         * css/CSSPropertyNames.in: Turn font-variant into a shorthand property.
1833         * css/FontVariantBuilder.h: Guard against incorrect downcasts. Also update for renamed
1834         FontVariantEastAsian type.
1835         (WebCore::applyValueFontVariantLigatures):
1836         (WebCore::applyValueFontVariantNumeric):
1837         (WebCore::applyValueFontVariantEastAsian):
1838         * css/StyleProperties.cpp: Update to use the more specific property.
1839         (WebCore::StyleProperties::appendFontLonghandValueIfExplicit):
1840         (WebCore::StyleProperties::fontValue):
1841         (WebCore::StyleProperties::asText):
1842         * css/StyleResolver.cpp: Ditto.
1843         (WebCore::StyleResolver::isValidCueStyleProperty):
1844         * editing/EditingStyle.cpp: Ditto.
1845         * editing/cocoa/HTMLConverter.mm: Ditto.
1846         (HTMLConverterCaches::propertyValueForNode):
1847         (HTMLConverter::computedAttributesForElement):
1848         * editing/ios/EditorIOS.mm: Ditto.
1849         (WebCore::Editor::removeUnchangeableStyles):
1850         * html/canvas/CanvasRenderingContext2D.cpp: Ditto.
1851         (WebCore::CanvasRenderingContext2D::font):
1852         (WebCore::CanvasRenderingContext2D::setFont):
1853         * platform/graphics/FontCache.h: Removing duplicate cache key value.
1854         (WebCore::FontDescriptionKey::makeFlagsKey):
1855         * platform/graphics/FontCascade.cpp: Migrate to the new font-variant-caps from the old member variable.
1856         (WebCore::FontCascade::glyphDataForCharacter):
1857         * platform/graphics/FontCascade.h: Ditto.
1858         (WebCore::FontCascade::isSmallCaps):
1859         * platform/graphics/FontDescription.cpp: Ditto.
1860         (WebCore::FontDescription::FontDescription):
1861         * platform/graphics/FontDescription.h: Ditto.
1862         (WebCore::FontCascadeDescription::equalForTextAutoSizing):
1863         (WebCore::FontDescription::smallCaps): Deleted.
1864         (WebCore::FontDescription::setSmallCaps): Deleted.
1865         (WebCore::FontDescription::setIsSmallCaps): Deleted.
1866         (WebCore::FontDescription::operator==): Deleted.
1867         * platform/graphics/cocoa/FontCacheCoreText.cpp: Rename FontVariantEastAsianWidth.
1868         (WebCore::computeFeatureSettingsFromVariants):
1869         * platform/text/TextFlags.h: Ditto.
1870         (WebCore::FontVariantSettings::operator==):
1871         * rendering/RenderText.cpp: Migrage to the new font-variant-caps from the old member variable.
1872         (WebCore::RenderText::widthFromCache):
1873
1874 2015-12-02  Alex Christensen  <achristensen@webkit.org>
1875
1876         Reduce size of ScriptElement
1877         https://bugs.webkit.org/show_bug.cgi?id=151786
1878
1879         Reviewed by Andreas Kling.
1880
1881         * dom/ScriptElement.cpp:
1882         (WebCore::ScriptElement::ScriptElement):
1883         (WebCore::ScriptElement::requestScript):
1884         * dom/ScriptElement.h:
1885         Use callOnMainThread instead of a Timer to save memory on a timer that is rarely used.
1886         Use bit fields for the boolean values to save another 8 bytes per ScriptElement.
1887         This reduces sizeof(ScriptElement) from 168 to 48 bytes.
1888
1889 2015-12-02  Alex Christensen  <achristensen@webkit.org>
1890
1891         Asynchronously call onerror when a content blocker blocks ascript element's load
1892         https://bugs.webkit.org/show_bug.cgi?id=151649
1893
1894         Reviewed by Brady Eidson.
1895
1896         Test: http/tests/contentextensions/script-onerror.html
1897
1898         * dom/ScriptElement.cpp:
1899         (WebCore::ScriptElement::ScriptElement):
1900         (WebCore::ScriptElement::requestScript):
1901         * dom/ScriptElement.h:
1902
1903 2015-12-02  Jer Noble  <jer.noble@apple.com>
1904
1905         [iOS] Abrupt transition between Fullscreen -> PiP
1906         https://bugs.webkit.org/show_bug.cgi?id=151719
1907
1908         Reviewed by Eric Carlson.
1909
1910         Follow-up to r192922: When moving from inline -> PiP, don't forget to hide the fullscreen
1911         window once the PiP transition completes.
1912
1913         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
1914         (WebVideoFullscreenInterfaceAVKit::didStartPictureInPicture):
1915
1916 2015-12-02  Commit Queue  <commit-queue@webkit.org>
1917
1918         Unreviewed, rolling out r192955.
1919         https://bugs.webkit.org/show_bug.cgi?id=151776
1920
1921         A large number of the tests added with this change are failing
1922         on Windows (Requested by ryanhaddad on #webkit).
1923
1924         Reverted changeset:
1925
1926         "[css border] border-image doesn't honor border-style"
1927         https://bugs.webkit.org/show_bug.cgi?id=99922
1928         http://trac.webkit.org/changeset/192955
1929
1930 2015-12-02  Yoav Weiss  <yoav@yoav.ws>
1931
1932         Fix preloader issue with srcdoc documents.
1933         https://bugs.webkit.org/show_bug.cgi?id=151744
1934
1935         Reviewed by Ryosuke Niwa.
1936
1937         Make sure that PreloadRequest is resolving URLs based on the document's
1938         baseURL() rather than using url() as the base URL, which is not how URLs
1939         are resolved by the parser, and fails when document->url() diverges from
1940         the document's base URL (e.g. in the case of srcdoc based documents).
1941
1942         Test: fast/preloader/iframe-srcdoc.html
1943
1944         * html/parser/HTMLResourcePreloader.cpp:
1945         (WebCore::PreloadRequest::completeURL):
1946
1947 2015-12-02  Jer Noble  <jer.noble@apple.com>
1948
1949         Add a setting and restriction which will pause invisible autoplaying video
1950         https://bugs.webkit.org/show_bug.cgi?id=151412
1951
1952         Reviewed by Eric Carlson.
1953
1954         Test: media/video-restricted-invisible-autoplay-not-allowed.html
1955
1956         Drive-by fix: m_autoplaying is reset in many places by calling pause() or play(), where those
1957         calls did not originate from an explicit request to pause or play, e.g., during an interruption.
1958         This causes m_autoplaying to be set to false, thus breaking resumption of autoplaying when the
1959         interruption ends. Update PlatformMediaSession to remember its client's "autoplaying" state and
1960         restore it when an interruption ends.
1961
1962         Add a means to register for viewport visibility notifications to FrameView, RenderView,
1963         and RenderElement. Elements who wish to recieve these notifications must do so through their
1964         renderer, and thus will have to re-register whenever a new renderer is attached.
1965
1966         Add a restriction to HTMLMediaElement which will pause autoplaying video when that video scrolls
1967         out of the viewport, or is hidden with CSS.
1968
1969         Add a setting which controls whether that new restriction is set.
1970
1971         * dom/Element.h:
1972         (WebCore::Element::isVisibleInViewportChanged): Add default empty virtual method.
1973         * html/HTMLMediaElement.cpp:
1974         (WebCore::HTMLMediaElement::HTMLMediaElement):
1975         (WebCore::HTMLMediaElement::didMoveToNewDocument):
1976         (WebCore::HTMLMediaElement::documentDidResumeFromPageCache):
1977         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture):
1978         (WebCore::HTMLMediaElement::resumeAutoplaying):
1979         (WebCore::mediaElementIsAllowedToAutoplay):
1980         (WebCore::HTMLMediaElement::isVisibleInViewportChanged):
1981         (WebCore::HTMLMediaElement::updateShouldAutoplay):
1982         (WebCore::HTMLMediaElement::HTMLMediaElement): Set the new restriction based on the current Settings.
1983         (WebCore::HTMLMediaElement::resumeAutoplaying): Continue autoplay, or begin playback.
1984         (WebCore::HTMLMediaElement::didMoveToNewDocument): Update our autoplay state.
1985         (WebCore::HTMLMediaElement::documentDidResumeFromPageCache): Ditto.
1986         (WebCore::HTMLMediaElement::removedFrom): Ditto.
1987         (WebCore::HTMLMediaElement::didAttachRenderers): Ditto.
1988         (WebCore::HTMLMediaElement::didDetachRenderers): Ditto.
1989         (WebCore::HTMLMediaElement::visibilityDidChange): Ditto.
1990         (WebCore::HTMLMediaElement::willDetachRenderers): Unregister for visibility callbacks.
1991         (WebCore::HTMLMediaElement::removeBehaviorsRestrictionsAfterFirstUserGesture): Clear new restriction.
1992         (WebCore::mediaElementIsAllowedToAutoplay): Check for autoplay requirements.
1993         (WebCore::HTMLMediaElement::isVisibleInViewportChanged): Added, update our autoplay state.
1994         (WebCore::HTMLMediaElement::updateShouldAutoplay): Set interruption if necessary, clear otherwise.
1995         * html/HTMLMediaElement.h:
1996         * html/MediaElementSession.cpp:
1997         (WebCore::restrictionName): Added support for new restriction.
1998         * html/MediaElementSession.h:
1999         * page/FrameView.cpp:
2000         (WebCore::FrameView::viewportContentsChanged): Update clients of viewport visibility.
2001         * page/Settings.in:
2002         * platform/audio/PlatformMediaSession.cpp:
2003         (WebCore::stateName): Add new "Autoplay" state.
2004         (WebCore::interruptionName): Added new interruption type.
2005         (WebCore::PlatformMediaSession::beginInterruption): Set the m_interruptionType.
2006         (WebCore::PlatformMediaSession::clientWillBeginAutoplaying): Set the m_state to Autoplaying.
2007         * platform/audio/PlatformMediaSession.h:
2008         (WebCore::PlatformMediaSession::interruptionType): Added getter.
2009         (WebCore::PlatformMediaSessionClient::resumeAutoplaying): Added default.
2010         * platform/audio/PlatformMediaSessionManager.cpp:
2011         (WebCore::PlatformMediaSessionManager::sessionWillBeginPlayback): Only pause session if its state is playing.
2012         * rendering/RenderElement.cpp:
2013         (WebCore::RenderElement::RenderElement): Set new ivars.
2014         (WebCore::RenderElement::~RenderElement): Unregister for callbacks if necessary.
2015         (WebCore::RenderElement::registerForVisibleInViewportCallback): Register for callbacks from RenderView.
2016         (WebCore::RenderElement::unregisterForVisibleInViewportCallback): Unregister from same.
2017         (WebCore::RenderElement::visibleInViewportStateChanged): Notify Element if value has changed.
2018         * rendering/RenderElement.h:
2019         * rendering/RenderView.cpp:
2020         (WebCore::RenderView::registerForVisibleInViewportCallback): Add renderer to list of callbacks.
2021         (WebCore::RenderView::unregisterForVisibleInViewportCallback): Remove renderer from same.
2022         (WebCore::RenderView::updateVisibleViewportRect): Walk renderers setting their visiblility based on the viewport visible rect.
2023         * rendering/RenderView.h:
2024         * testing/Internals.cpp:
2025         (WebCore::Internals::setMediaElementRestrictions): Support new restriction.
2026
2027 2015-12-02  Brady Eidson  <beidson@apple.com>
2028
2029         Modern IDB: IDBTransaction::error is not exposed.
2030         https://bugs.webkit.org/show_bug.cgi?id=151752
2031
2032         Reviewed by Alex Christensen.
2033
2034         No new tests (At least 3 failing tests now pass, plus changes to other faulty tests).
2035
2036         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2037         (WebCore::IDBClient::IDBRequest::dispatchEvent):
2038         (WebCore::IDBClient::IDBRequest::uncaughtExceptionInEventHandler):
2039         * Modules/indexeddb/client/IDBRequestImpl.h:
2040         
2041         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2042         (WebCore::IDBClient::IDBTransaction::error):
2043         (WebCore::IDBClient::IDBTransaction::abortDueToFailedRequest):
2044         (WebCore::IDBClient::IDBTransaction::abort):
2045         (WebCore::IDBClient::IDBTransaction::didCreateIndexOnServer):
2046         * Modules/indexeddb/client/IDBTransactionImpl.h:
2047
2048 2015-12-02  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2049
2050         [css border] border-image doesn't honor border-style
2051         https://bugs.webkit.org/show_bug.cgi?id=99922
2052
2053         Reviewed by Simon Fraser.
2054
2055         Ensure that WebKit will be compliant to css-backgrounds spec where a
2056         border with an image will only be rendered if there is a style defined.
2057
2058         Quote: "None: No border. Color and width are ignored (i.e., the border has width 0)".
2059         Reference: http://www.w3.org/TR/css3-background/#border-style
2060
2061         From W3C discussion: "The fact that these properties set the style of the border is
2062         normative". Reference: https://lists.w3.org/Archives/Public/www-style/2015Nov/0260.html
2063
2064         Test: fast/borders/border-image-should-not-display.html
2065
2066         * rendering/style/BorderData.h:
2067         (WebCore::BorderData::hasBorder):
2068         (WebCore::BorderData::borderLeftWidth):
2069         (WebCore::BorderData::borderRightWidth):
2070         (WebCore::BorderData::borderTopWidth):
2071         (WebCore::BorderData::borderBottomWidth):
2072         * rendering/style/BorderValue.h:
2073         (WebCore::BorderValue::nonZero):
2074         (WebCore::BorderValue::isVisible):
2075
2076 2015-12-02  Eric Carlson  <eric.carlson@apple.com>
2077
2078         [MediaStream] Implement MediaStreamTrack.getSettings()
2079         https://bugs.webkit.org/show_bug.cgi?id=151727
2080
2081         Reviewed by Jer Noble.
2082
2083         MediaStreamTrack.getStates has been replaced by MediaStreamTrack.getSettings. 
2084
2085         Test: fast/mediastream/MediaStreamTrack-getSettings.html
2086
2087         * CMakeLists.txt: MediaSourceStates.* -> MediaSourceSettings.*.
2088         * DerivedSources.make: No more MediaSourceStates.idl.
2089         * Modules/mediastream/CapabilityRange.cpp: MediaSourceStates.* -> MediaSourceSettings.*.
2090         * Modules/mediastream/MediaSourceSettings.cpp: Copied from Source/WebCore/Modules/mediastream/MediaSourceStates.cpp.
2091         (WebCore::MediaSourceSettings::create):
2092         (WebCore::MediaSourceSettings::MediaSourceSettings):
2093         (WebCore::MediaSourceSettings::facingMode):
2094         (WebCore::MediaSourceStates::create): Deleted.
2095         (WebCore::MediaSourceStates::MediaSourceStates): Deleted.
2096         (WebCore::MediaSourceStates::sourceType): Deleted.
2097         (WebCore::MediaSourceStates::facingMode): Deleted.
2098         * Modules/mediastream/MediaSourceSettings.h: Copied from Source/WebCore/Modules/mediastream/MediaSourceStates.h.
2099
2100         MediaSourceStates.* renamed to MediaSourceSettings.* and updated to new API.
2101         * Modules/mediastream/MediaSourceStates.cpp: Removed.
2102         * Modules/mediastream/MediaSourceStates.h: Removed.
2103         * Modules/mediastream/MediaSourceStates.idl: Removed.
2104
2105         * Modules/mediastream/MediaStreamCapabilities.cpp:
2106         (WebCore::MediaStreamCapabilities::sourceType): Return an empty vector for now, will be fixed
2107           by the changes for https://bugs.webkit.org/show_bug.cgi?id=151728.
2108         (WebCore::MediaStreamCapabilities::sourceId): RealtimeMediaSourceStates -> MediaSourceSettings.
2109         (WebCore::MediaStreamCapabilities::facingMode): Ditto.
2110
2111         * Modules/mediastream/MediaStreamTrack.cpp:
2112         (WebCore::MediaStreamTrack::getSettings): New.
2113         (WebCore::MediaStreamTrack::getCapabilities): Don't modify states, just pass through whatever
2114           private track returns.
2115         (WebCore::MediaStreamTrack::trackSettingsChanged):
2116         (WebCore::MediaStreamTrack::states): Deleted.
2117         (WebCore::MediaStreamTrack::trackStatesChanged): Deleted.
2118         * Modules/mediastream/MediaStreamTrack.h:
2119         * Modules/mediastream/MediaStreamTrack.idl: MediaSourceStates -> MediaSourceSettings.
2120
2121         * Modules/webaudio/MediaStreamAudioSource.cpp:
2122         (WebCore::MediaStreamAudioSource::settings):
2123         (WebCore::MediaStreamAudioSource::states): Deleted.
2124         * Modules/webaudio/MediaStreamAudioSource.h: MediaSourceStates -> MediaSourceSettings.
2125
2126         * WebCore.xcodeproj/project.pbxproj: MediaSourceStates.* -> MediaSourceSettings.*.
2127
2128         * bindings/js/JSMediaSourceStatesCustom.cpp: Removed.
2129         * bindings/js/JSMediaStreamTrackCustom.cpp: Added.
2130         (WebCore::JSMediaStreamTrack::getSettings): MediaSourceSettings is a generic dictionary so 
2131           it has to be generated manually.
2132
2133         * platform/mediastream/MediaStreamPrivate.cpp:
2134         (WebCore::MediaStreamPrivate::intrinsicSize): states -> settings.
2135         (WebCore::MediaStreamPrivate::trackStatesChanged): Deleted.
2136         * platform/mediastream/MediaStreamPrivate.h:
2137
2138         * platform/mediastream/MediaStreamTrackPrivate.cpp:
2139         (WebCore::MediaStreamTrackPrivate::settings):
2140         (WebCore::MediaStreamTrackPrivate::sourceSettingsChanged):
2141         (WebCore::MediaStreamTrackPrivate::states): Deleted.
2142         (WebCore::MediaStreamTrackPrivate::sourceStatesChanged): Deleted.
2143         * platform/mediastream/MediaStreamTrackPrivate.h:
2144
2145         * platform/mediastream/RealtimeMediaSource.cpp:
2146         (WebCore::RealtimeMediaSource::settingsDidChanged):
2147         (WebCore::RealtimeMediaSource::statesDidChanged): Deleted.
2148         * platform/mediastream/RealtimeMediaSource.h:
2149
2150         * platform/mediastream/RealtimeMediaSourceCapabilities.h:
2151         (WebCore::RealtimeMediaSourceCapabilities::facingModes): States -> Settings.
2152         (WebCore::RealtimeMediaSourceCapabilities::addFacingMode): Ditto.
2153         (WebCore::RealtimeMediaSourceCapabilities::sourceTypes): Deleted.
2154         (WebCore::RealtimeMediaSourceCapabilities::setSourceType): Deleted.
2155         (WebCore::RealtimeMediaSourceCapabilities::addSourceType): Deleted.
2156
2157         * platform/mediastream/RealtimeMediaSourceCenter.h: States -> Settings.
2158         * platform/mediastream/RealtimeMediaSourceSettings.cpp: Copied from Source/WebCore/platform/mediastream/RealtimeMediaSourceStates.cpp.
2159         (WebCore::RealtimeMediaSourceSettings::facingMode):
2160         (WebCore::RealtimeMediaSourceStates::facingMode): Deleted.
2161         (WebCore::RealtimeMediaSourceStates::sourceType): Deleted.
2162
2163         * platform/mediastream/RealtimeMediaSourceSettings.h: Copied from Source/WebCore/platform/mediastream/RealtimeMediaSourceStates.h.
2164         * platform/mediastream/RealtimeMediaSourceStates.cpp: Removed.
2165
2166         * platform/mediastream/RealtimeMediaSourceStates.h: Removed.
2167         * platform/mediastream/mac/AVAudioCaptureSource.h:
2168         * platform/mediastream/mac/AVAudioCaptureSource.mm:
2169         (WebCore::AVAudioCaptureSource::updateStates): Deleted.
2170
2171         * platform/mediastream/mac/AVCaptureDeviceManager.h:
2172         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2173
2174         * platform/mediastream/mac/AVMediaCaptureSource.h:
2175         * platform/mediastream/mac/AVMediaCaptureSource.mm:
2176         (WebCore::AVMediaCaptureSource::states): Deleted.
2177
2178         * platform/mediastream/mac/AVVideoCaptureSource.h:
2179         * platform/mediastream/mac/AVVideoCaptureSource.mm:
2180         (WebCore::AVVideoCaptureSource::updateStates): Deleted.
2181
2182         * platform/mediastream/mac/MockRealtimeVideoSourceMac.mm:
2183
2184         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
2185
2186         * platform/mock/MockRealtimeAudioSource.cpp:
2187         (WebCore::MockRealtimeAudioSource::initializeSupportedConstraints):
2188         (WebCore::MockRealtimeAudioSource::updateStates): Deleted.
2189         * platform/mock/MockRealtimeAudioSource.h:
2190
2191         * platform/mock/MockRealtimeMediaSource.cpp:
2192         (WebCore::MockRealtimeMediaSource::capabilities): Minor cleanup.
2193         (WebCore::MockRealtimeMediaSource::settings):
2194         (WebCore::MockRealtimeMediaSource::supportedConstraints):
2195         (WebCore::MockRealtimeMediaSource::states): Deleted.
2196         * platform/mock/MockRealtimeMediaSource.h:
2197         (WebCore::MockRealtimeMediaSource::constraints):
2198         (WebCore::MockRealtimeMediaSource::currentStates): Deleted.
2199
2200         * platform/mock/MockRealtimeVideoSource.cpp:
2201         (WebCore::MockRealtimeVideoSource::updateSettings):
2202         (WebCore::MockRealtimeVideoSource::initializeCapabilities):
2203         (WebCore::MockRealtimeVideoSource::initializeSupportedConstraints):
2204         (WebCore::MockRealtimeVideoSource::setFrameRate): states -> settings.
2205         (WebCore::MockRealtimeVideoSource::setSize): Ditto.
2206         (WebCore::MockRealtimeVideoSource::drawAnimation): Ditto.
2207         (WebCore::MockRealtimeVideoSource::drawText): Ditto.
2208         (WebCore::MockRealtimeVideoSource::updateStates): Deleted.
2209         (WebCore::MockRealtimeVideoSource::setFacingMode): Deleted.
2210         * platform/mock/MockRealtimeVideoSource.h:
2211
2212 2015-11-30  David Hyatt  <hyatt@apple.com>
2213
2214         Implement the picture element.
2215         https://bugs.webkit.org/show_bug.cgi?id=116963
2216
2217         Reviewed by Dean Jackson.
2218
2219         Added fast/picture tests.
2220
2221         * WebCore.xcodeproj/project.pbxproj:
2222         Add HTMLPictureElement.* to the project.
2223
2224         * html/HTMLImageElement.cpp:
2225         (WebCore::HTMLImageElement::setBestFitURLAndDPRFromImageCandidate):
2226         Remove the CURRENT_SRC ifdef.
2227
2228         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
2229         New helper function that checks the <source> elements of a <picture> parent
2230         for the best match.
2231
2232         (WebCore::HTMLImageElement::selectImageSource):
2233         Pull out the process of image selection into its own function so that this can
2234         be called from many places (to ensure that dynamic changes are reflected as elements
2235         get changed, added or removed).
2236
2237         (WebCore::HTMLImageElement::parseAttribute):
2238         Call selectImageSource when attributes change.
2239
2240         (WebCore::HTMLImageElement::insertedInto):
2241         If inserted into a picture element, make sure to update the source.
2242
2243         * html/HTMLImageElement.h:
2244         (WebCore::HTMLImageElement::currentSrc):
2245         Remove the CURRENT_SRC ifdef.
2246
2247         * html/HTMLImageElement.idl:
2248         Remove the CURRENT_SRC ifdef.
2249
2250         * html/HTMLPictureElement.cpp: Added.
2251         (WebCore::HTMLPictureElement::HTMLPictureElement):
2252         (WebCore::HTMLPictureElement::create):
2253         (WebCore::HTMLPictureElement::sourcesChanged):
2254         * html/HTMLPictureElement.h: Added.
2255         The new picture element. Has a sourcesChanged() function that is invoked whenever anything
2256         about the <source> elements changes.
2257
2258         * html/HTMLSourceElement.cpp:
2259         (WebCore::HTMLSourceElement::insertedInto):
2260         (WebCore::HTMLSourceElement::removedFrom):
2261         (WebCore::HTMLSourceElement::parseAttribute):
2262         Make sure to call sourcesChanged when new sources come and go or when attributes on
2263         source elements change.
2264
2265         * html/HTMLSourceElement.h:
2266         Added parseAttribute function so we can see when attributes change that force us to
2267         do a dynamic update.
2268
2269         * html/HTMLTagNames.in:
2270         Add the picture element.
2271
2272         * html/parser/HTMLSrcsetParser.h:
2273         (WebCore::ImageCandidate::srcOrigin):
2274         (WebCore::ImageCandidate::isEmpty):
2275         Some helpers for picture parsing.
2276
2277 2015-12-02  Per Arne Vollan  <peavo@outlook.com>
2278
2279         [WinCairo][MediaFoundation] Video is not rendered correctly on some graphics cards.
2280         https://bugs.webkit.org/show_bug.cgi?id=151757
2281
2282         Reviewed by Alex Christensen.
2283
2284         We need to make sure we use the same bitmap format as in the Direct3D surface
2285         in video memory when copying surface data and rendering with Cairo.
2286
2287         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2288         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::presentSample):
2289         (WebCore::MediaPlayerPrivateMediaFoundation::Direct3DPresenter::paintCurrentFrame):
2290
2291 2015-12-02  Brady Eidson  <beidson@apple.com>
2292
2293         Modern IDB: Get rid of IDBExceptionCode.
2294         https://bugs.webkit.org/show_bug.cgi?id=151753
2295
2296         Reviewed by Alex Christensen.
2297
2298         No new tests (No change in behavior).
2299
2300         * Modules/indexeddb/client/IDBIndexImpl.cpp:
2301         (WebCore::IDBClient::IDBIndex::count):
2302         (WebCore::IDBClient::IDBIndex::doCount):
2303         (WebCore::IDBClient::IDBIndex::get):
2304         (WebCore::IDBClient::IDBIndex::doGet):
2305         (WebCore::IDBClient::IDBIndex::getKey):
2306         (WebCore::IDBClient::IDBIndex::doGetKey):
2307         
2308         * Modules/indexeddb/client/IDBObjectStoreImpl.cpp:
2309         (WebCore::IDBClient::IDBObjectStore::get):
2310         (WebCore::IDBClient::IDBObjectStore::deleteFunction):
2311         (WebCore::IDBClient::IDBObjectStore::clear):
2312         (WebCore::IDBClient::IDBObjectStore::createIndex):
2313         (WebCore::IDBClient::IDBObjectStore::index):
2314         (WebCore::IDBClient::IDBObjectStore::deleteIndex):
2315         (WebCore::IDBClient::IDBObjectStore::count):
2316         (WebCore::IDBClient::IDBObjectStore::doCount):
2317         
2318         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2319         (WebCore::IDBClient::IDBOpenDBRequest::fireErrorAfterVersionChangeAbort):
2320         
2321         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2322         (WebCore::IDBClient::IDBTransaction::abortOnServerAndCancelRequests):
2323         
2324         * Modules/indexeddb/server/IndexValueStore.cpp:
2325         (WebCore::IDBServer::IndexValueStore::addRecord):
2326         
2327         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
2328         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
2329         (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
2330         (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
2331         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
2332         (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
2333         (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
2334         (WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
2335         (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
2336         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
2337         (WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
2338         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
2339         (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
2340         (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
2341         (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
2342         (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
2343         
2344         * Modules/indexeddb/server/MemoryIndex.cpp:
2345         (WebCore::IDBServer::MemoryIndex::putIndexKey):
2346         
2347         * Modules/indexeddb/server/MemoryObjectStore.cpp:
2348         (WebCore::IDBServer::MemoryObjectStore::createIndex):
2349         (WebCore::IDBServer::MemoryObjectStore::deleteIndex):
2350         
2351         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2352         (WebCore::IDBServer::UniqueIDBDatabase::handleOpenDatabaseOperations):
2353         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
2354         
2355         * Modules/indexeddb/shared/IDBError.cpp:
2356         (WebCore::IDBError::IDBError):
2357         (WebCore::IDBError::name):
2358         (WebCore::IDBError::message):
2359         (WebCore::idbErrorName): Deleted.
2360         (WebCore::idbErrorDescription): Deleted.
2361         
2362         * Modules/indexeddb/shared/IDBError.h:
2363         (WebCore::IDBError::code):
2364         (WebCore::IDBError::isNull):
2365
2366 2015-12-02  Jiewen Tan  <jiewen_tan@apple.com>
2367
2368         Null dereference loading Blink layout test fast/loader/unload-mutation-crash.html
2369         https://bugs.webkit.org/show_bug.cgi?id=149305
2370         <rdar://problem/22747892>
2371
2372         Reviewed by Brent Fulgham.
2373
2374         Add an extra guard to replaceDocument() against rude JS in unload event handlers.
2375
2376         Test: fast/loader/unload-mutation-crash.html
2377
2378         * loader/DocumentWriter.cpp:
2379         (WebCore::DocumentWriter::replaceDocument):
2380         (WebCore::DocumentWriter::begin):
2381
2382 2015-12-02  Per Arne Vollan  <peavo@outlook.com>
2383
2384         [WinCairo] Compile error.
2385         https://bugs.webkit.org/show_bug.cgi?id=151742
2386
2387         Reviewed by Csaba Osztrogonác.
2388
2389         System font flag has moved from Font class to FontData class.
2390
2391         * platform/graphics/win/SimpleFontDataCairoWin.cpp:
2392         (WebCore::Font::platformInit):
2393
2394 2015-12-01  Commit Queue  <commit-queue@webkit.org>
2395
2396         Unreviewed, rolling out r192894 and r192904.
2397         https://bugs.webkit.org/show_bug.cgi?id=151738
2398
2399         Crashes sometimes on Windows (Requested by litherum on
2400         #webkit).
2401
2402         Reverted changesets:
2403
2404         "[Win] Web fonts with small caps have excess whitespace with
2405         the complex text codepath"
2406         https://bugs.webkit.org/show_bug.cgi?id=151698
2407         http://trac.webkit.org/changeset/192894
2408
2409         "Test gardening after r192894"
2410         http://trac.webkit.org/changeset/192904
2411
2412 2015-12-01  Yusuke Suzuki  <utatane.tea@gmail.com>
2413
2414         [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
2415         https://bugs.webkit.org/show_bug.cgi?id=150792
2416
2417         Reviewed by Saam Barati.
2418
2419         * Configurations/FeatureDefines.xcconfig:
2420
2421 2015-12-01  Commit Queue  <commit-queue@webkit.org>
2422
2423         Unreviewed, rolling out r192914.
2424         https://bugs.webkit.org/show_bug.cgi?id=151734
2425
2426         JSC tests for this change are failing on 32 and 64-bit bots
2427         (Requested by ryanhaddad on #webkit).
2428
2429         Reverted changeset:
2430
2431         "[ES6] Implement LLInt/Baseline Support for ES6 Generators and
2432         enable this feature"
2433         https://bugs.webkit.org/show_bug.cgi?id=150792
2434         http://trac.webkit.org/changeset/192914
2435
2436 2015-12-01  Myles C. Maxfield  <mmaxfield@apple.com>
2437
2438         [SVG -> OTF Converter] Force UnitsPerEm to 1000
2439         https://bugs.webkit.org/show_bug.cgi?id=151650
2440
2441         Reviewed by Antti Koivisto.
2442
2443         According to the Adobe Type 1 Font Format:
2444
2445         "Type 1 font programs generally use a 1000 to 1 scaling matrix
2446         for the definition of the relationship of character space unites
2447         to user space units."
2448
2449         Windows actually disregards the "unitsPerEm" value in the "head"
2450         table for some calculations, and hardcodes 1000 instead. In order
2451         to have consistent renderings on Windows and OS X, this patch
2452         forces all generated fonts to have a unitsPerEm of 1000, and
2453         appropriately scales all necessary values.
2454
2455         Test: svg/W3C-SVG-1.1/fonts-elem-03-b.svg
2456
2457         * svg/SVGToOTFFontConversion.cpp:
2458         (WebCore::SVGToOTFFontConverter::scaleUnitsPerEm):
2459         (WebCore::SVGToOTFFontConverter::appendHEADTable):
2460         (WebCore::SVGToOTFFontConverter::appendOS2Table):
2461         (WebCore::SVGToOTFFontConverter::appendVORGTable):
2462         (WebCore::SVGToOTFFontConverter::appendVHEATable):
2463         (WebCore::SVGToOTFFontConverter::appendVMTXTable):
2464         (WebCore::SVGToOTFFontConverter::addKerningPair):
2465         (WebCore::CFFBuilder::CFFBuilder):
2466         (WebCore::CFFBuilder::boundingBox):
2467         (WebCore::CFFBuilder::updateBoundingBox):
2468         (WebCore::CFFBuilder::unscaledLineTo):
2469         (WebCore::SVGToOTFFontConverter::transcodeGlyphPaths):
2470         (WebCore::SVGToOTFFontConverter::processGlyphElement):
2471         (WebCore::SVGToOTFFontConverter::appendLigatureGlyphs):
2472         (WebCore::SVGToOTFFontConverter::SVGToOTFFontConverter):
2473
2474 2015-12-01  Brady Eidson  <beidson@apple.com>
2475
2476         Give a more detailed message for TypeErrors that result from EnforceRange.
2477         https://bugs.webkit.org/show_bug.cgi?id=151725
2478
2479         Reviewed by Tim Horton.
2480
2481         No new tests (Covered by changes to existing tests).
2482
2483         * bindings/js/JSDOMBinding.cpp:
2484         (WebCore::rangeErrorString):
2485         (WebCore::enforceRange):
2486
2487 2015-12-01  Jer Noble  <jer.noble@apple.com>
2488
2489         [iOS] Abrupt transition between Fullscreen -> PiP
2490         https://bugs.webkit.org/show_bug.cgi?id=151719
2491
2492         Reviewed by Eric Carlson.
2493
2494         Rather than abruptly hiding the fullscreen window, explicitly exit fullscreen mode upon entering PiP.
2495
2496         * platform/ios/WebVideoFullscreenInterfaceAVKit.mm:
2497         (WebVideoFullscreenInterfaceAVKit::didStartPictureInPicture):
2498
2499 2015-12-01  Myles C. Maxfield  <mmaxfield@apple.com>
2500
2501         Give String and AtomicString an existingHash() function
2502         https://bugs.webkit.org/show_bug.cgi?id=151717
2503
2504         Reviewed by Andreas Kling.
2505
2506         No new tests because there is no behavior change.
2507
2508         * platform/graphics/Font.cpp:
2509         (WebCore::CharacterFallbackMapKeyHash::hash):
2510
2511 2015-12-01  Myles C. Maxfield  <mmaxfield@apple.com>
2512
2513         [Win] Build fix after r192895
2514
2515         Unreviewed.
2516
2517         * platform/graphics/FontPlatformData.h:
2518         (WebCore::FontPlatformData::isSystemFont):
2519         (WebCore::FontPlatformData::setIsSystemFont):
2520         * platform/graphics/win/SimpleFontDataCGWin.cpp:
2521         (WebCore::Font::platformInit):
2522         (WebCore::Font::platformWidthForGlyph):
2523
2524 2015-12-01  Alexey Proskuryakov  <ap@apple.com>
2525
2526         Update bindings test results after r192903.
2527
2528         * bindings/scripts/test/JS/JSTestEventConstructor.cpp:
2529         (WebCore::JSTestEventConstructorConstructor::construct):
2530
2531 2015-12-01  Yusuke Suzuki  <utatane.tea@gmail.com>
2532
2533         [ES6] Implement LLInt/Baseline Support for ES6 Generators and enable this feature
2534         https://bugs.webkit.org/show_bug.cgi?id=150792
2535
2536         Reviewed by Saam Barati.
2537
2538         * Configurations/FeatureDefines.xcconfig:
2539
2540 2015-12-01  Brady Eidson  <beidson@apple.com>
2541
2542         Add "RaisesExceptionWithMessage" IDL attribute.
2543         https://bugs.webkit.org/show_bug.cgi?id=151720
2544
2545         Reviewed by Alex Christensen.
2546
2547         No new tests (Covered by changes to existing bindings tests).
2548
2549         * bindings/scripts/CodeGeneratorJS.pm:
2550         (GenerateImplementation):
2551         (GenerateParametersCheck):
2552         (GenerateReturnParameters):
2553         (GenerateImplementationFunctionCall):
2554         (GenerateConstructorDefinition):
2555         
2556         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
2557         (webkit_dom_test_obj_method_with_exception_with_message):
2558         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
2559         
2560         * bindings/scripts/test/JS/JSTestObj.cpp:
2561         (WebCore::jsTestObjPrototypeFunctionMethodWithExceptionWithMessage):
2562         
2563         * bindings/scripts/test/ObjC/DOMTestObj.h:
2564         * bindings/scripts/test/ObjC/DOMTestObj.mm:
2565         (-[DOMTestObj methodWithExceptionWithMessage]):
2566         
2567         * bindings/scripts/test/TestObj.idl:
2568
2569 2015-12-01  Darin Adler  <darin@apple.com>
2570
2571         Fix anomaly where isMouseEvent returns false for wheel events
2572         https://bugs.webkit.org/show_bug.cgi?id=151685
2573
2574         Reviewed by Alexey Proskuryakov.
2575
2576         Back three years ago when we made WheelEvent inherit from MouseEvent,
2577         someone decided that isMouseEvent should return false for the wheel events.
2578         An audit of all the callers of isMouseEvent indicated that in almost every
2579         case, it's better to return true, so this patch does that.
2580
2581         All the other call sites that were checking isMouseEvent, here and in the
2582         higher levels of WebKit, benefit from getting true even for wheel events.
2583
2584         * bindings/objc/DOMEvents.mm:
2585         (kitClass): Use eventInterface instead of isMouseEvent to create the appropriate
2586         wrapper class.
2587
2588         * bindings/scripts/CodeGeneratorJS.pm:
2589         (GenerateConstructorDefinition): Eliminated a peculiar search and replace
2590         mistake; "stateution" instead of "execution".
2591
2592         * dom/Node.cpp:
2593         (WebCore::Node::handleLocalEvents): Add an isWheelEvent check here so that we
2594         will not ignore wheel events. This preserves behavior. A FIXME questions whether
2595         that is the behavior we want.
2596
2597         * dom/WheelEvent.cpp:
2598         (WebCore::WheelEvent::isMouseEvent): Deleted. No need to override and return false.
2599         * dom/WheelEvent.h: Ditto.
2600
2601         * html/HTMLTextAreaElement.cpp:
2602         (WebCore::HTMLTextAreaElement::defaultEventHandler): Removed unneeded checks for
2603         drag events and wheel events; both are types of mouse event, and so a single
2604         isMouseEvent check takes care of all three of these.
2605         * html/TextFieldInputType.cpp:
2606         (WebCore::TextFieldInputType::forwardEvent): Ditto.
2607
2608 2015-12-01  Alex Christensen  <achristensen@webkit.org>
2609
2610         Use Optional for matrix inverses
2611         https://bugs.webkit.org/show_bug.cgi?id=151575
2612
2613         Reviewed by Myles C. Maxfield.
2614
2615         This patch should have no change in behavior.  Some unnecessary checks are removed.
2616         There are a few places where we are no longer multiplying by the identity matrix.
2617         This should remind future coders that not all matrices are invertible.
2618
2619         * css/WebKitCSSMatrix.cpp:
2620         (WebCore::WebKitCSSMatrix::inverse):
2621         (WebCore::WebKitCSSMatrix::translate):
2622         * html/canvas/CanvasRenderingContext2D.cpp:
2623         (WebCore::CanvasRenderingContext2D::restore):
2624         (WebCore::CanvasRenderingContext2D::scale):
2625         (WebCore::CanvasRenderingContext2D::rotate):
2626         (WebCore::CanvasRenderingContext2D::translate):
2627         (WebCore::CanvasRenderingContext2D::transform):
2628         (WebCore::CanvasRenderingContext2D::setTransform):
2629         (WebCore::CanvasRenderingContext2D::isPointInPathInternal):
2630         (WebCore::CanvasRenderingContext2D::isPointInStrokeInternal):
2631         * platform/graphics/GraphicsContext.cpp:
2632         (WebCore::GraphicsContext::computeLineBoundsAndAntialiasingModeForText):
2633         * platform/graphics/ShadowBlur.cpp:
2634         (WebCore::ShadowBlur::calculateLayerBoundingRect):
2635         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2636         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
2637         * platform/graphics/cg/ImageBufferCG.cpp:
2638         (WebCore::ImageBuffer::putByteArray):
2639         * platform/graphics/filters/Filter.h:
2640         (WebCore::Filter::setFilterScale):
2641         (WebCore::Filter::absoluteTransform):
2642         (WebCore::Filter::mapAbsolutePointToLocalPoint):
2643         (WebCore::Filter::renderingMode):
2644         (WebCore::Filter::setRenderingMode):
2645         * platform/graphics/texmap/TextureMapperLayer.cpp:
2646         (WebCore::TextureMapperLayer::paintSelfAndChildrenWithReplica):
2647         (WebCore::TextureMapperLayer::replicaTransform):
2648         (WebCore::TextureMapperLayer::setAnimatedFilters):
2649         (WebCore::TextureMapperLayer::mapScrollOffset):
2650         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
2651         (WebCore::CoordinatedGraphicsLayer::transformedVisibleRect):
2652         (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect):
2653         * platform/graphics/transforms/AffineTransform.cpp:
2654         (WebCore::AffineTransform::yScale):
2655         (WebCore::det):
2656         (WebCore::AffineTransform::isInvertible):
2657         (WebCore::AffineTransform::inverse):
2658         (WebCore::AffineTransform::det): Deleted.
2659         * platform/graphics/transforms/AffineTransform.h:
2660         * platform/graphics/transforms/TransformState.cpp:
2661         (WebCore::TransformState::mappedPoint):
2662         (WebCore::TransformState::mappedQuad):
2663         (WebCore::TransformState::mapQuad):
2664         (WebCore::TransformState::flattenWithTransform):
2665         * platform/graphics/transforms/TransformationMatrix.cpp:
2666         (WebCore::TransformationMatrix::isInvertible):
2667         (WebCore::TransformationMatrix::inverse):
2668         * platform/graphics/transforms/TransformationMatrix.h:
2669         * rendering/HitTestingTransformState.cpp:
2670         (WebCore::HitTestingTransformState::flattenWithTransform):
2671         (WebCore::HitTestingTransformState::mappedPoint):
2672         (WebCore::HitTestingTransformState::mappedQuad):
2673         (WebCore::HitTestingTransformState::mappedArea):
2674         (WebCore::HitTestingTransformState::boundsOfMappedArea):
2675         * rendering/PaintInfo.h:
2676         (WebCore::PaintInfo::applyTransform):
2677         * rendering/RenderLayer.cpp:
2678         (WebCore::RenderLayer::paintLayerByApplyingTransform):
2679         (WebCore::RenderLayer::hitTestLayer):
2680         * rendering/svg/RenderSVGContainer.cpp:
2681         (WebCore::RenderSVGContainer::nodeAtFloatPoint):
2682         * rendering/svg/RenderSVGForeignObject.cpp:
2683         (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
2684         * rendering/svg/RenderSVGImage.cpp:
2685         (WebCore::RenderSVGImage::nodeAtFloatPoint):
2686         * rendering/svg/RenderSVGResourceClipper.cpp:
2687         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
2688         * rendering/svg/RenderSVGResourceFilter.cpp:
2689         (WebCore::RenderSVGResourceFilter::postApplyResource):
2690         * rendering/svg/RenderSVGRoot.cpp:
2691         (WebCore::RenderSVGRoot::nodeAtPoint):
2692         * rendering/svg/RenderSVGShape.cpp:
2693         (WebCore::RenderSVGShape::setupNonScalingStrokeContext):
2694         (WebCore::RenderSVGShape::nodeAtFloatPoint):
2695         (WebCore::RenderSVGShape::calculateStrokeBoundingBox):
2696         * rendering/svg/RenderSVGText.cpp:
2697         (WebCore::RenderSVGText::nodeAtFloatPoint):
2698         * rendering/svg/SVGRenderSupport.cpp:
2699         (WebCore::SVGRenderSupport::intersectRepaintRectWithShadows):
2700         * rendering/svg/SVGRenderingContext.cpp:
2701         (WebCore::SVGRenderingContext::clipToImageBuffer):
2702         * svg/SVGLocatable.cpp:
2703         (WebCore::SVGLocatable::getTransformToElement):
2704         * svg/SVGMatrix.h:
2705         (WebCore::SVGMatrix::inverse):
2706         (WebCore::SVGMatrix::rotateFromVector):
2707
2708 2015-12-01  Tim Horton  <timothy_horton@apple.com>
2709
2710         Remove swipe snapshot before main document load if scroll position is already restored
2711         https://bugs.webkit.org/show_bug.cgi?id=151224
2712
2713         Reviewed by Darin Adler.
2714
2715         * loader/FrameLoaderClient.h:
2716         * loader/HistoryController.cpp:
2717         (WebCore::HistoryController::restoreScrollPositionAndViewState):
2718         Each time we try to restore the scroll position, see if the requested
2719         scroll position is something we can scroll to by going through ScrollView's
2720         scroll position constraint logic. If we can scroll there, tell our client
2721         (and eventually ViewGestureController) that we successfully restored the
2722         scroll position!
2723
2724 2015-12-01  Myles C. Maxfield  <mmaxfield@apple.com>
2725
2726         [iOS] Adjacent emoji overlap each other
2727         https://bugs.webkit.org/show_bug.cgi?id=151690
2728         <rdar://problem/23430453>
2729
2730         Reviewed by Simon Fraser.
2731
2732         This is a partial revert of r188737. It turns out that only CoreText gives correct
2733         glyph advances for emoji. In r188737, I reverted the special iOS emoji processing,
2734         but also removed the logic of using CoreText for emoji advances. This patch adds
2735         the m_isEmoji boolean back, so we can tell if we need to force
2736         platformWidthForGlyph() to use CoreText.
2737
2738         This patch also performs a little bit of cleanup by moving Font's m_isSystemFont
2739         to FontPlatformData where it belongs.
2740
2741         Test: fast/text/emoji-overlap.html
2742
2743         * platform/graphics/Font.cpp:
2744         (WebCore::fillGlyphPage): Removed unnecessary argument.
2745         (WebCore::Font::Font): Deleted.
2746         * platform/graphics/Font.h: Moved getters and booleans to FontPlatformData.
2747         (WebCore::Font::hasCustomTracking): Deleted.
2748         (WebCore::Font::isSystemFont): Deleted.
2749         * platform/graphics/FontPlatformData.cpp:
2750         (WebCore::FontPlatformData::FontPlatformData): Initialize new booleans.
2751         (WebCore::FontPlatformData::operator=): Ditto.
2752         * platform/graphics/FontPlatformData.h: Getters for new booleans.
2753         (WebCore::FontPlatformData::isSystemFont):
2754         (WebCore::FontPlatformData::hasCustomTracking):
2755         (WebCore::FontPlatformData::isEmoji):
2756         * platform/graphics/GlyphPage.h: Remove unnecessary argument.
2757         * platform/graphics/cocoa/FontCocoa.mm:
2758         (WebCore::advanceForColorBitmapFont): Return an Optional instead of using an out
2759         argument.
2760         (WebCore::canUseFastGlyphAdvanceGetter): Make sure that we use CoreText if we are
2761         using the Emoji font.
2762         (WebCore::Font::platformWidthForGlyph):
2763         (WebCore::Font::platformInit): Deleted.
2764         * platform/graphics/cocoa/FontPlatformDataCocoa.mm: Deal with the new booleans.
2765         (WebCore::FontPlatformData::FontPlatformData):
2766         (WebCore::FontPlatformData::platformDataInit):
2767         (WebCore::FontPlatformData::platformDataAssign):
2768         (WebCore::FontPlatformData::setFont):
2769         * platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp:
2770         (WebCore::GlyphPage::fill): Removed unnecessary argument.
2771         * platform/graphics/mac/GlyphPageMac.cpp:
2772         (WebCore::shouldUseCoreText): Use a reference instead of a pointer.
2773         (WebCore::GlyphPage::fill): Removed unnecessary argument.
2774         * platform/graphics/win/FontCGWin.cpp:
2775         (WebCore::FontCascade::drawGlyphs): Update for new location of booleans.
2776         * platform/graphics/win/GlyphPageTreeNodeCGWin.cpp:
2777         (WebCore::GlyphPage::fill): Removed unnecessary argument.
2778         * platform/graphics/win/GlyphPageTreeNodeCairoWin.cpp:
2779         (WebCore::GlyphPage::fill): Removed unnecessary argument.
2780         * platform/graphics/win/UniscribeController.cpp:
2781         (WebCore::UniscribeController::shapeAndPlaceItem): Update for new location of
2782         booleans.
2783
2784 2015-12-01  Myles C. Maxfield  <mmaxfield@apple.com>
2785
2786         [Win] Web fonts with small caps have excess whitespace with the complex text codepath
2787         https://bugs.webkit.org/show_bug.cgi?id=151698
2788
2789         Reviewed by Darin Adler.
2790
2791         When performing small-caps on OS X, we bake in the smaller font size into the platform's native font
2792         object. On Windows, we currently don't do that; instead, we just change some ancillary data inside
2793         the FontPlatformData, and our advance & drawing calculations are sensitive to this ancillary data.
2794         However, in the complex text codepath, Uniscribe only takes the native font object as input, and
2795         therefore operates with the wrong font size.
2796
2797         The solution is to bake the smaller font size into the native platform font on Windows, similar to
2798         OS X. It isn't clear why we didn't do this previously, but it seems like we weren't sure that
2799         Windows would select the correct font when we provide new selection criteria. However, for web fonts,
2800         we already use the same mechanism (CreateFontIndirect()) when we create the font in the first place;
2801         therefore, this scaled font request will always work as well.
2802
2803         Test: fast/text/small-caps-complex.html
2804
2805         * platform/graphics/win/SimpleFontDataWin.cpp:
2806         (WebCore::Font::platformCreateScaledFont): Deleted.
2807
2808 2015-12-01  Brady Eidson  <beidson@apple.com>
2809
2810         Modern IDB: storage/indexeddb/create-and-remove-object-store.html fails.
2811         https://bugs.webkit.org/show_bug.cgi?id=151704
2812
2813         Reviewed by Alex Christensen.
2814
2815         No new tests (At least one previously failing test now passes).
2816
2817         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
2818         (WebCore::IDBClient::IDBDatabase::deleteObjectStore):
2819
2820 2015-12-01  Brady Eidson  <beidson@apple.com>
2821
2822         Modern IDB: storage/indexeddb/basics.html fails.
2823         https://bugs.webkit.org/show_bug.cgi?id=151694
2824
2825         Reviewed by Alex Christensen.
2826
2827         No new tests (At least one failing test now passes, and covered by changes to 3 previously incorrect tests).
2828
2829         * Modules/indexeddb/client/IDBOpenDBRequestImpl.cpp:
2830         (WebCore::IDBClient::IDBOpenDBRequest::versionChangeTransactionWillFinish): Set the flag determining whether
2831           or not the request's transaction should be exposed to the DOM.
2832         * Modules/indexeddb/client/IDBOpenDBRequestImpl.h:
2833         
2834         * Modules/indexeddb/client/IDBRequestImpl.cpp:
2835         (WebCore::IDBClient::IDBRequest::result): Throw an exception if the request is not done.
2836         (WebCore::IDBClient::IDBRequest::error): Ditto.
2837         (WebCore::IDBClient::IDBRequest::transaction): Only return the transaction to the DOM if the flag says so.
2838         * Modules/indexeddb/client/IDBRequestImpl.h:
2839         
2840         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
2841         (WebCore::IDBClient::IDBTransaction::abort):
2842         (WebCore::IDBClient::IDBTransaction::commit):
2843
2844 2015-12-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2845
2846         [GTK] ASSERTION FAILED: m_table running /webkit2/BackForwardList/navigation in Debug build
2847         https://bugs.webkit.org/show_bug.cgi?id=151700
2848
2849         Reviewed by Martin Robinson.
2850
2851         This happens when the frame notifies its observers that the page
2852         will be detached. The m_table that asserts is the
2853         FrameDestructionObserver HashSet. It happens when clearing the
2854         GObject DOM cache wrappers during frame destruction, and there's a
2855         Document object wrapped whose last reference is held by the DOM
2856         wrapper. In that case, the Document object is destroyed while the
2857         frame is being destroyed. Deleting the wrapper objects after the
2858         frame destruction fixes the crash.
2859
2860         * bindings/gobject/DOMObjectCache.cpp:
2861
2862 2015-12-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2863
2864         [Streams API] pull function of tee should call readFromReadableStreamReader directly
2865         https://bugs.webkit.org/show_bug.cgi?id=151497
2866
2867         Reviewed by Darin Adler.
2868
2869         Covered by added test.
2870
2871         * Modules/streams/ReadableStreamInternals.js:
2872         (teeReadableStreamPullFunction): directly calling readFromReadableStreamReader.
2873
2874 2015-12-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2875
2876         [Streams API] Clean-up JS built-in code using arrow functions
2877         https://bugs.webkit.org/show_bug.cgi?id=151489
2878
2879         Reviewed by Darin Adler.
2880
2881         Using arrow functions to remove need for _this.
2882         Made errorWritableStream take two parameters to simplify code and align it with the spec.
2883
2884         No change in behavior.
2885
2886         * Modules/streams/ReadableStream.js:
2887         (initializeReadableStream):
2888         * Modules/streams/WritableStream.js:
2889         (initializeWritableStream):
2890         (abort):
2891         (write):
2892         * Modules/streams/WritableStreamInternals.js:
2893         (errorWritableStream):
2894         (writableStreamAdvanceQueue):
2895         (closeWritableStream):
2896
2897 2015-12-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2898
2899         [Streams API] teeReadableStream should not directly use stream.getReader()
2900         https://bugs.webkit.org/show_bug.cgi?id=151487
2901
2902         Reviewed by Darin Adler.
2903
2904         Covered by added test.
2905
2906         * Modules/streams/ReadableStreamInternals.js:
2907         (teeReadableStream): Create a @ReadableStreamReader instead of calling getReader() which may be disrupted by user scripts.
2908
2909 2015-12-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2910
2911         [Streams API] streams should not directly use Number and related methods
2912         https://bugs.webkit.org/show_bug.cgi?id=151499
2913
2914         Reviewed by Darin Adler.
2915
2916         Covered by updated test.
2917
2918         Using @Number, @isFinite and @isNaN in place of Number, Number.isFinite and Number.isNaN.
2919
2920         * Modules/streams/ReadableStreamInternals.js:
2921         (enqueueInReadableStream):
2922         * Modules/streams/StreamInternals.js:
2923         (validateAndNormalizeQueuingStrategy):
2924         (enqueueValueWithSize):
2925
2926 2015-12-01  Carlos Garcia Campos  <cgarcia@igalia.com>
2927
2928         Unreviewed. Fix GTK+ build after r192849.
2929
2930         * bindings/scripts/CodeGeneratorGObject.pm:
2931         (GenerateFunction):
2932         * bindings/scripts/test/GObject/WebKitDOMTestInterface.cpp:
2933         (webkit_dom_test_interface_supplemental_method1):
2934         (webkit_dom_test_interface_supplemental_method2):
2935         (webkit_dom_test_interface_set_supplemental_str2):
2936         (webkit_dom_test_interface_get_supplemental_node):
2937         (webkit_dom_test_interface_set_supplemental_node):
2938
2939 2015-12-01  Youenn Fablet  <youenn.fablet@crf.canon.fr>
2940
2941         [Streams API] Remove use of @catch for exposed promises
2942         https://bugs.webkit.org/show_bug.cgi?id=151625
2943
2944         Reviewed by Darin Adler.
2945
2946         Promise @catch is calling "then" which may be controlled by user scripts.
2947         This patch simply replaces @catch by calling @then directly.
2948
2949         Covered by modified tests.
2950
2951         * Modules/streams/ReadableStream.js:
2952         (pipeTo):
2953         * Modules/streams/ReadableStreamInternals.js:
2954         (teeReadableStream):
2955
2956 2015-11-30  Jaehun Lim  <ljaehun.lim@samsung.com>
2957
2958         Unreviewed, fix build after r192848 and r192849
2959
2960         - Rename canSuspendForPageCache to canSuspendForDocumentSuspension
2961         - Use references instead of pointers
2962
2963         * Modules/battery/BatteryManager.cpp:
2964         (WebCore::BatteryManager::canSuspendForDocumentSuspension):
2965         (WebCore::BatteryManager::canSuspendForPageCache): Deleted.
2966         * Modules/battery/BatteryManager.h:
2967         * Modules/battery/NavigatorBattery.cpp:
2968         (WebCore::NavigatorBattery::webkitBattery):
2969         * Modules/battery/NavigatorBattery.h:
2970         * Modules/gamepad/deprecated/NavigatorGamepad.cpp:
2971         (WebCore::NavigatorGamepad::webkitGetGamepads):
2972         * Modules/gamepad/deprecated/NavigatorGamepad.h:
2973         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
2974         (WebCore::NavigatorContentUtils::registerProtocolHandler):
2975         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered):
2976         (WebCore::NavigatorContentUtils::unregisterProtocolHandler):
2977         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
2978         * Modules/vibration/NavigatorVibration.cpp:
2979         (WebCore::NavigatorVibration::vibrate):
2980         * Modules/vibration/NavigatorVibration.h:
2981
2982 2015-11-30  Jiewen Tan  <jiewen_tan@apple.com>
2983
2984         Amazon.com Additional Information links aren't clickable
2985         https://bugs.webkit.org/show_bug.cgi?id=151401
2986         <rdar://problem/23454261>
2987
2988         Reviewed by Darin Adler.
2989
2990         The cause of this issue is that the painting order is different from the hittest order so we can end up
2991         with visible but unreachable content. To fix this, the executation flow of hittest has been reordered.
2992         According to the paint system, which renders the webpage from the bottom RenderLayer to the top, contents
2993         are rendered before floats. Hence, for the hittest, which determines the hitted location from top RenderLayer
2994         to the bottom, should do it reversedly. Now, hittest will first test floats then contents.
2995
2996         Test: fast/block/float/hit-test-on-overlapping-floats.html
2997
2998         * rendering/RenderBlock.cpp:
2999         (WebCore::RenderBlock::nodeAtPoint):
3000
3001 2015-11-30  Simon Fraser  <simon.fraser@apple.com>
3002
3003         Fix possible crash with animated layers in reflections
3004         https://bugs.webkit.org/show_bug.cgi?id=151689
3005         rdar://problem/23018612
3006
3007         Reviewed by Darin Adler.
3008
3009         Reflections create additional PlatformCALayers whose owner is set to the GraphicsLayerCA.
3010         Those PlatformCALayers need their owner pointer cleared out when the GraphicsLayerCA
3011         is destroyed.
3012         
3013         Tested by compositing/reflections/nested-reflection-transition.html
3014
3015         * platform/graphics/ca/GraphicsLayerCA.cpp:
3016         * platform/graphics/ca/GraphicsLayerCA.h:
3017
3018 2015-11-30  Brady Eidson  <beidson@apple.com>
3019
3020         Modern IDB: Iterating index cursors to a specific key is busted.
3021         https://bugs.webkit.org/show_bug.cgi?id=151684
3022
3023         Reviewed by Darin Adler.
3024
3025         No new tests (At least one failing test now passes).
3026
3027         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
3028         (WebCore::IDBServer::MemoryIndexCursor::iterate):
3029
3030 2015-11-30  Brady Eidson  <beidson@apple.com>
3031
3032         Modern IDB: ObjectStore cursors should not be able to iterate out of their range.
3033         https://bugs.webkit.org/show_bug.cgi?id=151683
3034
3035         Reviewed by Darin Adler.
3036
3037         No new tests (Covered by at least one failing test that now passes).
3038
3039         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
3040         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementForwardIterator):
3041         (WebCore::IDBServer::MemoryObjectStoreCursor::incrementReverseIterator):
3042
3043 2015-11-30  Anders Carlsson  <andersca@apple.com>
3044
3045         CTTE autogenerated bindings code
3046         https://bugs.webkit.org/show_bug.cgi?id=151682
3047
3048         Reviewed by Darin Adler.
3049
3050         Make sure that JS bindings pass a reference to the object when calling static member functions.
3051
3052         * Modules/gamepad/NavigatorGamepad.cpp:
3053         (WebCore::NavigatorGamepad::getGamepads):
3054         * Modules/gamepad/NavigatorGamepad.h:
3055         * Modules/geolocation/NavigatorGeolocation.cpp:
3056         (WebCore::NavigatorGeolocation::geolocation):
3057         * Modules/geolocation/NavigatorGeolocation.h:
3058         * Modules/mediasource/AudioTrackMediaSource.h:
3059         (WebCore::AudioTrackMediaSource::sourceBuffer):
3060         * Modules/mediasource/TextTrackMediaSource.h:
3061         (WebCore::TextTrackMediaSource::sourceBuffer):
3062         * Modules/mediasource/VideoTrackMediaSource.h:
3063         (WebCore::VideoTrackMediaSource::sourceBuffer):
3064         * Modules/mediastream/HTMLMediaElementMediaStream.cpp:
3065         (WebCore::HTMLMediaElementMediaStream::srcObject):
3066         (WebCore::HTMLMediaElementMediaStream::setSrcObject):
3067         * Modules/mediastream/HTMLMediaElementMediaStream.h:
3068         * Modules/mediastream/NavigatorMediaDevices.cpp:
3069         (WebCore::NavigatorMediaDevices::mediaDevices):
3070         * Modules/mediastream/NavigatorMediaDevices.h:
3071         * Modules/notifications/DOMWindowNotifications.cpp:
3072         (WebCore::DOMWindowNotifications::webkitNotifications):
3073         * Modules/notifications/DOMWindowNotifications.h:
3074         * Modules/notifications/Notification.cpp:
3075         (WebCore::Notification::Notification):
3076         * Modules/notifications/WorkerGlobalScopeNotifications.cpp:
3077         (WebCore::WorkerGlobalScopeNotifications::webkitNotifications):
3078         * Modules/notifications/WorkerGlobalScopeNotifications.h:
3079         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
3080         (WebCore::DOMWindowSpeechSynthesis::speechSynthesis):
3081         * Modules/speech/DOMWindowSpeechSynthesis.h:
3082         * Modules/webdatabase/DOMWindowWebDatabase.cpp:
3083         (WebCore::DOMWindowWebDatabase::openDatabase):
3084         * Modules/webdatabase/DOMWindowWebDatabase.h:
3085         * bindings/scripts/CodeGeneratorJS.pm:
3086         (GenerateImplementation):
3087         (GenerateParametersCheck):
3088         * testing/Internals.cpp:
3089         (WebCore::Internals::enableMockSpeechSynthesizer):
3090
3091 2015-11-30  Katlyn Graff  <kgraff@apple.com>
3092
3093         Rename ActiveDOMObject/DOMWindow PageCacheSuspension code to support more reasons for suspension
3094         https://bugs.webkit.org/show_bug.cgi?id=151677
3095
3096         Reviewed by Ryosuke Niwa.
3097
3098         Simply a refactoring patch, so no new tests.
3099
3100         * Modules/encryptedmedia/MediaKeySession.cpp:
3101         (WebCore::MediaKeySession::canSuspendForDocumentSuspension):
3102         (WebCore::MediaKeySession::canSuspendForPageCache): Deleted.
3103         * Modules/encryptedmedia/MediaKeySession.h:
3104         * Modules/geolocation/Geolocation.cpp:
3105         (WebCore::Geolocation::canSuspendForDocumentSuspension):
3106         (WebCore::Geolocation::canSuspendForPageCache): Deleted.
3107         * Modules/geolocation/Geolocation.h:
3108         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
3109         (WebCore::DOMWindowIndexedDatabase::disconnectFrameForDocumentSuspension):
3110         (WebCore::DOMWindowIndexedDatabase::reconnectFrameFromDocumentSuspension):
3111         (WebCore::DOMWindowIndexedDatabase::disconnectFrameForPageCache): Deleted.
3112         (WebCore::DOMWindowIndexedDatabase::reconnectFrameFromPageCache): Deleted.
3113         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
3114         * Modules/indexeddb/client/IDBDatabaseImpl.cpp:
3115         (WebCore::IDBClient::IDBDatabase::canSuspendForDocumentSuspension):
3116         (WebCore::IDBClient::IDBDatabase::canSuspendForPageCache): Deleted.
3117         * Modules/indexeddb/client/IDBDatabaseImpl.h:
3118         * Modules/indexeddb/client/IDBRequestImpl.cpp:
3119         (WebCore::IDBClient::IDBRequest::canSuspendForDocumentSuspension):
3120         (WebCore::IDBClient::IDBRequest::canSuspendForPageCache): Deleted.
3121         * Modules/indexeddb/client/IDBRequestImpl.h:
3122         * Modules/indexeddb/client/IDBTransactionImpl.cpp:
3123         (WebCore::IDBClient::IDBTransaction::canSuspendForDocumentSuspension):
3124         (WebCore::IDBClient::IDBTransaction::canSuspendForPageCache): Deleted.
3125         * Modules/indexeddb/client/IDBTransactionImpl.h:
3126         * Modules/indexeddb/legacy/LegacyDatabase.cpp:
3127         (WebCore::LegacyDatabase::canSuspendForDocumentSuspension):
3128         (WebCore::LegacyDatabase::canSuspendForPageCache): Deleted.
3129         * Modules/indexeddb/legacy/LegacyDatabase.h:
3130         * Modules/indexeddb/legacy/LegacyRequest.cpp:
3131         (WebCore::LegacyRequest::canSuspendForDocumentSuspension):
3132         (WebCore::LegacyRequest::canSuspendForPageCache): Deleted.
3133         * Modules/indexeddb/legacy/LegacyRequest.h:
3134         * Modules/indexeddb/legacy/LegacyTransaction.cpp:
3135         (WebCore::LegacyTransaction::canSuspendForDocumentSuspension):
3136         (WebCore::LegacyTransaction::canSuspendForPageCache): Deleted.
3137         * Modules/indexeddb/legacy/LegacyTransaction.h:
3138         * Modules/mediasource/MediaSource.cpp:
3139         (WebCore::MediaSource::canSuspendForDocumentSuspension):
3140         (WebCore::MediaSource::canSuspendForPageCache): Deleted.
3141         * Modules/mediasource/MediaSource.h:
3142         * Modules/mediasource/SourceBuffer.cpp:
3143         (WebCore::SourceBuffer::canSuspendForDocumentSuspension):
3144         (WebCore::SourceBuffer::canSuspendForPageCache): Deleted.
3145         * Modules/mediasource/SourceBuffer.h:
3146         * Modules/mediastream/MediaStreamTrack.cpp:
3147         (WebCore::MediaStreamTrack::canSuspendForDocumentSuspension):
3148         (WebCore::MediaStreamTrack::canSuspendForPageCache): Deleted.
3149         * Modules/mediastream/MediaStreamTrack.h:
3150         * Modules/mediastream/RTCDTMFSender.cpp:
3151         (WebCore::RTCDTMFSender::canSuspendForDocumentSuspension):
3152         (WebCore::RTCDTMFSender::canSuspendForPageCache): Deleted.
3153         * Modules/mediastream/RTCDTMFSender.h:
3154         * Modules/mediastream/RTCPeerConnection.cpp:
3155         (WebCore::RTCPeerConnection::canSuspendForDocumentSuspension):
3156         (WebCore::RTCPeerConnection::canSuspendForPageCache): Deleted.
3157         * Modules/mediastream/RTCPeerConnection.h:
3158         * Modules/notifications/DOMWindowNotifications.cpp:
3159         (WebCore::DOMWindowNotifications::disconnectFrameForDocumentSuspension):
3160         (WebCore::DOMWindowNotifications::reconnectFrameFromDocumentSuspension):
3161         (WebCore::DOMWindowNotifications::disconnectFrameForPageCache): Deleted.
3162         (WebCore::DOMWindowNotifications::reconnectFrameFromPageCache): Deleted.
3163         * Modules/notifications/DOMWindowNotifications.h:
3164         * Modules/notifications/Notification.cpp:
3165         (WebCore::Notification::canSuspendForDocumentSuspension):
3166         (WebCore::Notification::canSuspendForPageCache): Deleted.
3167         * Modules/notifications/Notification.h:
3168         * Modules/notifications/NotificationCenter.cpp:
3169         (WebCore::NotificationCenter::canSuspendForDocumentSuspension):
3170         (WebCore::NotificationCenter::canSuspendForPageCache): Deleted.
3171         * Modules/notifications/NotificationCenter.h:
3172         * Modules/webaudio/AudioContext.cpp:
3173         (WebCore::AudioContext::canSuspendForDocumentSuspension):
3174         (WebCore::AudioContext::canSuspendForPageCache): Deleted.
3175         * Modules/webaudio/AudioContext.h:
3176         * Modules/webdatabase/DatabaseContext.cpp:
3177         (WebCore::DatabaseContext::canSuspendForDocumentSuspension):
3178         (WebCore::DatabaseContext::canSuspendForPageCache): Deleted.
3179         * Modules/webdatabase/DatabaseContext.h:
3180         * Modules/websockets/WebSocket.cpp:
3181         (WebCore::WebSocket::canSuspendForDocumentSuspension):
3182         (WebCore::WebSocket::canSuspendForPageCache): Deleted.
3183         * Modules/websockets/WebSocket.h:
3184         * css/FontLoader.cpp:
3185         (WebCore::FontLoader::canSuspendForDocumentSuspension):
3186         (WebCore::FontLoader::canSuspendForPageCache): Deleted.
3187         * css/FontLoader.h:
3188         * dom/ActiveDOMObject.cpp:
3189         (WebCore::ActiveDOMObject::canSuspendForDocumentSuspension):
3190         (WebCore::ActiveDOMObject::canSuspendForPageCache): Deleted.
3191         * dom/ActiveDOMObject.h:
3192         * dom/Document.cpp:
3193         (WebCore::Document::~Document):
3194         * dom/ScriptExecutionContext.cpp:
3195         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForTabSuspension):
3196         (WebCore::ScriptExecutionContext::canSuspendActiveDOMObjectsForPageCache): Deleted.
3197         * dom/ScriptExecutionContext.h:
3198         * fileapi/FileReader.cpp:
3199         (WebCore::FileReader::canSuspendForDocumentSuspension):
3200         (WebCore::FileReader::canSuspendForPageCache): Deleted.
3201         * fileapi/FileReader.h:
3202         * history/CachedFrame.cpp:
3203         (WebCore::CachedFrame::CachedFrame):
3204         * history/PageCache.cpp:
3205         (WebCore::canCacheFrame):
3206         * html/HTMLMarqueeElement.cpp:
3207         (WebCore::HTMLMarqueeElement::canSuspendForDocumentSuspension):
3208         (WebCore::HTMLMarqueeElement::canSuspendForPageCache): Deleted.
3209         * html/HTMLMarqueeElement.h:
3210         * html/HTMLMediaElement.cpp:
3211         (WebCore::HTMLMediaElement::canSuspendForDocumentSuspension):
3212         (WebCore::HTMLMediaElement::canSuspendForPageCache): Deleted.
3213         * html/HTMLMediaElement.h:
3214         * html/HTMLSourceElement.cpp:
3215         (WebCore::HTMLSourceElement::canSuspendForDocumentSuspension):
3216         (WebCore::HTMLSourceElement::canSuspendForPageCache): Deleted.
3217         * html/HTMLSourceElement.h:
3218         * html/PublicURLManager.cpp:
3219         (WebCore::PublicURLManager::canSuspendForDocumentSuspension):
3220         (WebCore::PublicURLManager::canSuspendForPageCache): Deleted.
3221         * html/PublicURLManager.h:
3222         * html/canvas/WebGLRenderingContextBase.cpp:
3223         (WebCore::WebGLRenderingContextBase::canSuspendForDocumentSuspension):
3224         (WebCore::WebGLRenderingContextBase::canSuspendForPageCache): Deleted.
3225         * html/canvas/WebGLRenderingContextBase.h:
3226         * loader/FrameLoader.cpp:
3227         (WebCore::FrameLoader::clear):
3228         (WebCore::FrameLoader::open):
3229         * loader/appcache/DOMApplicationCache.cpp:
3230         (WebCore::DOMApplicationCache::disconnectFrameForDocumentSuspension):
3231         (WebCore::DOMApplicationCache::reconnectFrameFromDocumentSuspension):
3232         (WebCore::DOMApplicationCache::disconnectFrameForPageCache): Deleted.
3233         (WebCore::DOMApplicationCache::reconnectFrameFromPageCache): Deleted.
3234         * loader/appcache/DOMApplicationCache.h:
3235         * page/DOMWindow.cpp:
3236         (WebCore::DOMWindow::DOMWindow):
3237         (WebCore::DOMWindow::~DOMWindow):
3238         (WebCore::DOMWindow::resetUnlessSuspendedForDocumentSuspension):
3239         (WebCore::DOMWindow::suspendForDocumentSuspension):
3240         (WebCore::DOMWindow::resumeFromDocumentSuspension):
3241         (WebCore::DOMWindow::disconnectDOMWindowProperties):
3242         (WebCore::DOMWindow::reconnectDOMWindowProperties):
3243         (WebCore::DOMWindow::resetUnlessSuspendedForPageCache): Deleted.
3244         (WebCore::DOMWindow::suspendForPageCache): Deleted.
3245         (WebCore::DOMWindow::resumeFromPageCache): Deleted.
3246         * page/DOMWindow.h:
3247         * page/DOMWindowExtension.cpp:
3248         (WebCore::DOMWindowExtension::disconnectFrameForDocumentSuspension):
3249         (WebCore::DOMWindowExtension::reconnectFrameFromDocumentSuspension):
3250         (WebCore::DOMWindowExtension::disconnectFrameForPageCache): Deleted.
3251         (WebCore::DOMWindowExtension::reconnectFrameFromPageCache): Deleted.
3252         * page/DOMWindowExtension.h:
3253         * page/DOMWindowProperty.cpp:
3254         (WebCore::DOMWindowProperty::disconnectFrameForDocumentSuspension):
3255         (WebCore::DOMWindowProperty::reconnectFrameFromDocumentSuspension):
3256         (WebCore::DOMWindowProperty::disconnectFrameForPageCache): Deleted.
3257         (WebCore::DOMWindowProperty::reconnectFrameFromPageCache): Deleted.
3258         * page/DOMWindowProperty.h:
3259         * page/EventSource.cpp:
3260         (WebCore::EventSource::canSuspendForDocumentSuspension):
3261         (WebCore::EventSource::canSuspendForPageCache): Deleted.
3262         * page/EventSource.h:
3263         * page/SuspendableTimer.cpp:
3264         (WebCore::SuspendableTimer::canSuspendForDocumentSuspension):
3265         (WebCore::SuspendableTimer::canSuspendForPageCache): Deleted.
3266         * page/SuspendableTimer.h:
3267         * workers/Worker.cpp:
3268         (WebCore::Worker::canSuspendForDocumentSuspension):
3269         (WebCore::Worker::canSuspendForPageCache): Deleted.
3270         * workers/Worker.h:
3271         * xml/XMLHttpRequest.cpp:
3272         (WebCore::XMLHttpRequest::canSuspendForDocumentSuspension):
3273         (WebCore::XMLHttpRequest::canSuspendForPageCache): Deleted.
3274         * xml/XMLHttpRequest.h:
3275
3276 2015-11-30  Brady Eidson  <beidson@apple.com>
3277
3278         Modern IDB: "prevunique" cursors should point at the lowest primary key that matches, not the highest.
3279         https://bugs.webkit.org/show_bug.cgi?id=151675.
3280
3281         Reviewed by Darin Adler.
3282
3283         No new tests (Covered by at least one failing test that now passes, and updates to previously incorrect tests).
3284
3285         * Modules/indexeddb/server/IndexValueEntry.cpp:
3286         (WebCore::IDBServer::IndexValueEntry::reverseBegin): If CursorDuplicity is NoDuplicates, start at the lowest
3287           entry instead of the highest.
3288         (WebCore::IDBServer::IndexValueEntry::reverseFind):
3289         * Modules/indexeddb/server/IndexValueEntry.h:
3290         
3291         * Modules/indexeddb/server/IndexValueStore.cpp:
3292         (WebCore::IDBServer::IndexValueStore::reverseFind):
3293         (WebCore::IDBServer::IndexValueStore::Iterator::Iterator):
3294         (WebCore::IDBServer::IndexValueStore::Iterator::nextIndexEntry):
3295         * Modules/indexeddb/server/IndexValueStore.h:
3296         
3297         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
3298         (WebCore::IDBServer::MemoryIndexCursor::MemoryIndexCursor):
3299         (WebCore::IDBServer::MemoryIndexCursor::iterate):
3300         
3301         * Modules/indexeddb/shared/IDBCursorInfo.cpp:
3302         (WebCore::IDBCursorInfo::duplicity):
3303         (WebCore::IDBCursorInfo::isDirectionNoDuplicate): Deleted.
3304         * Modules/indexeddb/shared/IDBCursorInfo.h:
3305
3306 2015-11-30  Jiewen Tan  <jiewen_tan@apple.com>
3307
3308         Null dereference loading Blink layout test http/tests/misc/detach-during-notifyDone.html
3309         https://bugs.webkit.org/show_bug.cgi?id=149309
3310         <rdar://problem/22748363>
3311
3312         Reviewed by Brent Fulgham.
3313
3314         A weird order of event execution introduced by the test case will kill the webpage in a
3315         subframe of the page while executing its |frame.loader().checkLoadCompleteForThisFrame()|.
3316         Therefore, any frames comes after the failing subframe will have no page. Check it before
3317         calling to those frames' |frame.loader().checkLoadCompleteForThisFrame()|, otherwise the
3318         assertion in |frame.loader().checkLoadCompleteForThisFrame()| will fail.
3319
3320         Test: http/tests/misc/detach-during-notifyDone.html
3321
3322         * loader/FrameLoader.cpp:
3323         (WebCore::FrameLoader::checkLoadComplete):
3324
3325 2015-11-30  Commit Queue  <commit-queue@webkit.org>
3326
3327         Unreviewed, rolling out r192819.
3328         https://bugs.webkit.org/show_bug.cgi?id=151681
3329
3330         This change broke existing layout tests on Windows (Requested
3331         by ryanhaddad on #webkit).
3332
3333         Reverted changeset:
3334
3335         "Unify font-variant-* with font-variant shorthand"
3336         https://bugs.webkit.org/show_bug.cgi?id=149773
3337         http://trac.webkit.org/changeset/192819
3338
3339 2015-11-30  Darin Adler  <darin@apple.com>
3340
3341         Use Optional instead of isNull out argument for nullable getters
3342         https://bugs.webkit.org/show_bug.cgi?id=151676
3343
3344         Reviewed by Anders Carlsson.
3345
3346         No behavior change, just cleaner code.
3347
3348         * Modules/geolocation/Coordinates.cpp:
3349         (WebCore::Coordinates::altitude): Return an Optional.
3350         (WebCore::Coordinates::altitudeAccuracy): Ditto.
3351         (WebCore::Coordinates::heading): Ditto.
3352         (WebCore::Coordinates::speed): Ditto.
3353         * Modules/geolocation/Coordinates.h: Ditto.
3354
3355         * Modules/indexeddb/IDBVersionChangeEvent.cpp:
3356         (WebCore::IDBVersionChangeEvent::create): Added. The code before was calling
3357         through to Event::create, which is clearly not what was wanted. Also removed
3358         unneeded explicit destructor.
3359         * Modules/indexeddb/IDBVersionChangeEvent.h: Changed return type of newVersion
3360         to Optional and updated for above change.
3361
3362         * Modules/indexeddb/client/IDBVersionChangeEventImpl.cpp:
3363         (WebCore::IDBClient::IDBVersionChangeEvent::newVersion): Changed to return
3364         an Optional.
3365         * Modules/indexeddb/client/IDBVersionChangeEventImpl.h: Removed unused
3366         default argument values; the event type one, at least, was clearly incorrect.
3367         Made more things private, got rid of unneeded destructor, marked class final
3368         instead of marking all functions final.
3369
3370         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.cpp:
3371         (WebCore::LegacyVersionChangeEvent::newVersion): Same as above.
3372         * Modules/indexeddb/legacy/LegacyVersionChangeEvent.h: Ditto.
3373
3374         * Modules/mediastream/MediaTrackConstraints.cpp:
3375         (WebCore::MediaTrackConstraints::optional): Removed bogus bool value. If we
3376         come back to finish later we will have to implement optional return values
3377         for arrays in the JavaScript bindings generator, which should be straightforward.
3378         * Modules/mediastream/MediaTrackConstraints.h: Ditto.
3379
3380         * bindings/js/JSDOMBinding.h:
3381         (WebCore::toNullableJSNumber): Added. This function template is used for
3382         return values that are nullable numbers.
3383
3384         * bindings/scripts/CodeGeneratorGObject.pm:
3385         (GenerateFunction): Replaced some existing bogus code to handle nullables with
3386         new equally-bogus code that should be no worse and will compile.
3387
3388         * bindings/scripts/CodeGeneratorJS.pm:
3389         (GenerateImplementation): Removed old support for nullables.
3390         (NativeToJSValue): Added new support for nullable numbers.
3391
3392         * bindings/scripts/CodeGeneratorObjC.pm:
3393         (GenerateImplementation): Removed support for nullables. We almost certainly
3394         won't need it for Objective-C bindings.
3395
3396         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp: Updated.
3397         * bindings/scripts/test/JS/JSTestObj.cpp: Updated.
3398         * bindings/scripts/test/ObjC/DOMTestObj.mm: Updated.
3399
3400 2015-11-30  Wenson Hsieh  <wenson_hsieh@apple.com>
3401
3402         Split platform-independent logic in AVCaptureDeviceManager out into a new class
3403         https://bugs.webkit.org/show_bug.cgi?id=151388
3404         <rdar://problem/23593980>
3405
3406         Reviewed by Eric Carlson.
3407
3408         To prepare for creating a MockCaptureDeviceManager to be able to test
3409         MediaDevices.getUserMedia, we create a platform-independent capture device manager
3410         which all platforms should extend and add platform-specific logic to.
3411
3412         The methods CaptureDeviceManager::createMediaSourceForCaptureDeviceWithConstraints and
3413         CaptureDeviceManager::captureDeviceList should be overridden by each platform
3414         CaptureDeviceManager to respectively create a RealtimeMediaSource and return a list of
3415         capture devices. createMediaSourceForCaptureDeviceWithConstraints attempts to create
3416         a media source for a given device with some constraints; if the contraints cannot be
3417         satisfied, this returns null.
3418
3419         The refactored capture device manager also introduces the notion of a platform-
3420      &nbs