AX: Need to expose frames to iOS Accessibility
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-12-29  Chris Fleizach  <cfleizach@apple.com>
2
3         AX: Need to expose frames to iOS Accessibility
4         https://bugs.webkit.org/show_bug.cgi?id=166571
5         <rdar://problem/29823724>
6
7         Reviewed by Darin Adler.
8
9         To support navigation by frame for VoiceOver on iOS, we need to expose the frame ancestor. 
10
11         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
12         (-[WebAccessibilityObjectWrapper _accessibilityFrameAncestor]):
13
14 2016-12-09  Sergio Villar Senin  <svillar@igalia.com>
15
16         [css-grid] Move Grid into GridSizingData
17         https://bugs.webkit.org/show_bug.cgi?id=165654
18
19         Reviewed by Darin Adler.
20
21         The grid track sizing algorithm has been using the m_grid attribute from RenderGrid to
22         compute the sizes of the tracks unconditionally. However the goal is to make it work against
23         a generic instance of the Grid class, so that the intrinsic size computation and the layout
24         processes could be effectively decoupled.
25
26         Instead of passing the Grid as a new argument to all the track sizing algorithm methods we
27         leverage the existence of GridSizingData which is already passed to all of them. This data
28         structure holds from now on a reference to the Grid instance so that the track sizing
29         algorithm could use it.
30
31         No new tests as this is a refactoring.
32
33         * rendering/RenderGrid.cpp:
34         (WebCore::RenderGrid::GridSizingData::GridSizingData):
35         (WebCore::RenderGrid::GridSizingData::grid):
36         (WebCore::RenderGrid::computeTrackBasedLogicalHeight):
37         (WebCore::RenderGrid::computeTrackSizesForDirection):
38         (WebCore::RenderGrid::repeatTracksSizingIfNeeded):
39         (WebCore::RenderGrid::layoutBlock):
40         (WebCore::RenderGrid::guttersSize):
41         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
42         (WebCore::RenderGrid::computeIntrinsicLogicalHeight):
43         (WebCore::RenderGrid::computeUsedBreadthOfGridTracks):
44         (WebCore::RenderGrid::computeFlexSizedTracksGrowth):
45         (WebCore::RenderGrid::computeFlexFactorUnitSize):
46         (WebCore::RenderGrid::findFlexFactorUnitSize):
47         (WebCore::RenderGrid::rawGridTrackSize):
48         (WebCore::RenderGrid::gridTrackSize):
49         (WebCore::RenderGrid::spanningItemCrossesFlexibleSizedTracks):
50         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
51         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForNonSpanningItems):
52         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctionsForItems):
53         (WebCore::RenderGrid::tracksAreWiderThanMinTrackBreadth):
54         (WebCore::RenderGrid::trackSizesForComputedStyle):
55         (WebCore::RenderGrid::applyStretchAlignmentToTracksIfNeeded):
56         (WebCore::RenderGrid::layoutGridItems):
57         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
58         (WebCore::RenderGrid::assumedRowsSizeForOrthogonalChild):
59         (WebCore::RenderGrid::gridAreaBreadthForChild):
60         (WebCore::RenderGrid::gridAreaBreadthForChildIncludingAlignmentOffsets):
61         (WebCore::RenderGrid::populateGridPositionsForDirection):
62         (WebCore::RenderGrid::columnAxisOffsetForChild):
63         (WebCore::RenderGrid::rowAxisOffsetForChild):
64         (WebCore::RenderGrid::findChildLogicalPosition):
65         (WebCore::RenderGrid::numTracks):
66         (WebCore::RenderGrid::paintChildren):
67         * rendering/RenderGrid.h:
68
69 2016-12-27  Michael Catanzaro  <mcatanzaro@igalia.com>
70
71         [GTK] Improve user agent construction
72         https://bugs.webkit.org/show_bug.cgi?id=142074
73
74         Reviewed by Carlos Garcia Campos.
75
76         Use the macOS rather than the Chrome quirk for Google domains, to avoid problems with
77         Google Calendar and Google Maps.
78
79         * platform/UserAgentQuirks.cpp:
80         (WebCore::urlRequiresChromeBrowser):
81         (WebCore::urlRequiresMacintoshPlatform):
82
83 2016-12-26  Zalan Bujtas  <zalan@apple.com>
84
85         ASSERTION FAILED: !rect.isEmpty() in WebCore::GraphicsContext::drawRect
86         https://bugs.webkit.org/show_bug.cgi?id=163461
87
88         Reviewed by Darin Adler.
89
90         Make sure we don't paint empty rects.
91
92         Test: fast/lists/assert-on-empty-list-marker.html
93
94         * rendering/RenderListMarker.cpp:
95         (WebCore::RenderListMarker::paint):
96
97 2016-12-25  Chris Fleizach  <cfleizach@apple.com>
98
99         AX: Headers of table not read by VoiceOver
100         https://bugs.webkit.org/show_bug.cgi?id=158693
101         <rdar://problem/26771065>
102
103         Reviewed by Darin Adler.
104
105         If a table cell header is hidden, by pushing off screen then the content won't be accessible.
106         It seems that unless specifically requested (such as using aria-hidden), we should try to return
107         that table cell header.
108
109         Test: accessibility/hidden-th-still-column-header.html
110
111         * accessibility/AccessibilityTableColumn.cpp:
112         (WebCore::AccessibilityTableColumn::headerObjectForSection):
113
114 2016-12-25  Yusuke Suzuki  <utatane.tea@gmail.com>
115
116         Propagate the source origin as much as possible
117         https://bugs.webkit.org/show_bug.cgi?id=166348
118
119         Reviewed by Darin Adler.
120
121         * bindings/js/CachedScriptSourceProvider.h:
122         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
123         * bindings/js/JSLazyEventListener.cpp:
124         (WebCore::JSLazyEventListener::initializeJSFunction):
125         * bindings/js/ScriptSourceCode.h:
126         (WebCore::ScriptSourceCode::ScriptSourceCode):
127         * bridge/NP_jsobject.cpp:
128         (_NPN_Evaluate):
129         * bridge/objc/WebScriptObject.mm:
130         (-[WebScriptObject evaluateWebScript:]):
131
132 2016-12-24  Sam Weinig  <sam@webkit.org>
133
134         [WebIDL] Remove (most) custom bindings for the IndexedDB code
135         https://bugs.webkit.org/show_bug.cgi?id=166451
136
137         Reviewed by Darin Adler.
138
139         Removes the custom bindings for all but one attribute (IDBRequest.result) in
140         the IndexedDB code.
141         - Adds a new WebIDL extension type, IDBKey, to represent the complex key conversion
142           rules IndexedDB specifies.
143         - Replaces custom bindings for IDBCursor.source with use of a union.
144         - Replaces custom enum type checking for IDBCursor.direction with a WebIDL enum.
145         - Replaces custom code generation for IDBKeyPaths with a union.
146
147         * CMakeLists.txt:
148         * DerivedSources.make:
149         * WebCore.xcodeproj/project.pbxproj:
150         Add new files.
151
152         * Modules/indexeddb/IDBCursor.cpp:
153         (WebCore::IDBCursor::source):
154         (WebCore::IDBCursor::direction):
155         (WebCore::IDBCursor::directionNext): Deleted.
156         (WebCore::IDBCursor::directionNextUnique): Deleted.
157         (WebCore::IDBCursor::directionPrev): Deleted.
158         (WebCore::IDBCursor::directionPrevUnique): Deleted.
159         (WebCore::IDBCursor::stringToDirection): Deleted.
160         (WebCore::IDBCursor::directionToString): Deleted.
161         * Modules/indexeddb/IDBCursor.h:
162         (WebCore::IDBCursor::objectStore): Deleted.
163         (WebCore::IDBCursor::index): Deleted.
164         Replace custom enum checking with direct use of the enum, letting the generator
165         handle the checks. Also adds source function which returns a Variant.
166
167         * Modules/indexeddb/IDBCursor.idl:
168         Remove custom annotation and use correct types.
169
170         * Modules/indexeddb/IDBCursorDirection.h: Added.
171         * Modules/indexeddb/IDBCursorDirection.idl: Added.
172
173         * Modules/indexeddb/IDBIndex.cpp:
174         (WebCore::IDBIndex::openCursor):
175         (WebCore::IDBIndex::openKeyCursor):
176         * Modules/indexeddb/IDBIndex.h:
177         * Modules/indexeddb/IDBIndex.idl:
178         * Modules/indexeddb/IDBObjectStore.cpp:
179         (WebCore::IDBObjectStore::openCursor):
180         (WebCore::IDBObjectStore::openKeyCursor):
181         * Modules/indexeddb/IDBObjectStore.h:
182         * Modules/indexeddb/IDBObjectStore.idl:
183         Replace Strings with IDBCursorDirection enums.
184
185         * Modules/indexeddb/IDBKeyRange.idl:
186         Remove annotation and use new IDBKey extension type.
187
188         * Modules/indexeddb/IDBOpenDBRequest.cpp:
189         (WebCore::IDBOpenDBRequest::onSuccess):
190         (WebCore::IDBOpenDBRequest::onUpgradeNeeded):
191         (WebCore::IDBOpenDBRequest::onDeleteDatabaseSuccess):
192         Use ReadyState enum in place of the old m_isDone boolean.
193
194         * Modules/indexeddb/IDBRequest.cpp:
195         (WebCore::IDBRequest::IDBRequest):
196         (WebCore::IDBRequest::error):
197         (WebCore::IDBRequest::source):
198         (WebCore::IDBRequest::dispatchEvent):
199         (WebCore::IDBRequest::willIterateCursor):
200         (WebCore::IDBRequest::completeRequestAndDispatchEvent):
201         (WebCore::IDBRequest::readyState): Deleted.
202         * Modules/indexeddb/IDBRequest.h:
203         (WebCore::IDBRequest::readyState):
204         (WebCore::IDBRequest::isDone):
205         (WebCore::IDBRequest::objectStoreSource): Deleted.
206         (WebCore::IDBRequest::indexSource): Deleted.
207         (WebCore::IDBRequest::cursorSource): Deleted.
208         * Modules/indexeddb/IDBRequest.idl:
209         Replace the readyState String with a enum, and the custom source binding with a
210         source function that returns a Variant.
211
212         * Modules/indexeddb/IndexedDB.h:
213         Add the missing values to CursorDirection to make it comply with the IDL definition.
214
215         * bindings/generic/IDLTypes.h:
216         * bindings/js/JSDOMConvert.h:
217         (WebCore::JSConverter<IDLIDBKey<T>>::convert):
218         Add new extension type IDLIDBKey.
219
220         * bindings/js/JSIDBCursorCustom.cpp:
221         (WebCore::JSIDBCursor::source): Deleted.
222         * bindings/js/JSIDBRequestCustom.cpp:
223         (WebCore::JSIDBRequest::source): Deleted.
224         Remove custom bindings.
225
226         * bindings/scripts/CodeGenerator.pm:
227         (IsBuiltinType):
228         * bindings/scripts/CodeGeneratorJS.pm:
229         (GetBaseIDLType):
230         (NativeToJSValueDOMConvertNeedsState):
231         (NativeToJSValueDOMConvertNeedsGlobalObject):
232         (NativeToJSValue):
233         Add support for IDBKey, and remove custom code for IndexedDB in core conversion logic.
234
235         * bindings/scripts/IDLAttributes.txt:
236         Remove now unused ImplementationReturnType attribute.
237
238         * inspector/InspectorIndexedDBAgent.cpp:
239         Update to work with new functions taking enums rather than strings.
240
241 2016-12-23  Simon Fraser  <simon.fraser@apple.com>
242
243         REGRESSION (r209299): Selection is broken when you zoom in webpage using trackpad
244         https://bugs.webkit.org/show_bug.cgi?id=166472
245         rdar://problem/29675551
246
247         Reviewed by Tim Horton.
248
249         r209299 broke autoscroll in zoomed pages because it changed RenderLayer::scrollRectToVisible()
250         to shrink viewRect by page scale. This is incorrect for all callers of scrollRectToVisible, since
251         the "absoluteRect" passed in is actually in zoomed document coordinates for all the callers I tested.
252
253         This code is also fixed to account for headers and footers. getRectToExpose() takes rectangles
254         in "scroll view contents" coordinates (i.e. including header, and zoomed document), so doesn't need
255         the separate visibleRectRelativeToDocument parameter.
256
257         Tests: fast/events/autoscroll-main-document.html
258                fast/events/autoscroll-when-zoomed.html
259                fast/events/drag-select-when-zoomed-with-header.html
260                fast/events/drag-select-when-zoomed.html
261                fast/scrolling/scroll-to-anchor-zoomed-header.html
262
263         * rendering/RenderLayer.cpp:
264         (WebCore::RenderLayer::scrollRectToVisible):
265         (WebCore::RenderLayer::getRectToExpose):
266         * rendering/RenderLayer.h:
267
268 2016-12-24  Zalan Bujtas  <zalan@apple.com>
269
270         RenderBlockFlow::moveFloatsTo does not move floats.
271         https://bugs.webkit.org/show_bug.cgi?id=166467
272
273         Reviewed by Darin Adler.
274
275         RenderBlockFlow::moveFloatsTo name is misleading. Floats are not moved from "this" to
276         the new RenderBlockFlow parent, but rather they are copied so that overhanging floats
277         don't get lost.
278
279         Covered by existing tests.
280
281         * rendering/FloatingObjects.cpp:
282         (WebCore::FloatingObject::cloneForNewParent):
283         (WebCore::FloatingObject::unsafeClone): Deleted.
284         * rendering/FloatingObjects.h:
285         * rendering/RenderBlockFlow.cpp:
286         (WebCore::RenderBlockFlow::addFloatsToNewParent):
287         (WebCore::RenderBlockFlow::moveAllChildrenIncludingFloatsTo):
288         (WebCore::RenderBlockFlow::moveFloatsTo): Deleted.
289         * rendering/RenderBlockFlow.h:
290         * rendering/RenderRubyBase.cpp:
291         (WebCore::RenderRubyBase::mergeChildrenWithBase):
292         * rendering/RenderRubyBase.h:
293         * rendering/RenderRubyRun.cpp:
294         (WebCore::RenderRubyRun::removeChild):
295
296 2016-12-23  Andreas Kling  <akling@apple.com>
297
298         REGRESSION(r209865): Crash when navigating back to some pages with compositing layers.
299         <https://webkit.org/b/166469>
300         <rdar://problem/29109053>
301
302         Reviewed by Darin Adler.
303
304         Remove the old WK1-era clear/restoreBackingStores optimization from the page cache.
305         When enabling it on non-iOS platforms, we started hitting lots of assertions,
306         and none of our memory tests showed any significant improvement anyway.
307
308         Test: compositing/page-cache-back-crash.html
309
310         * history/CachedFrame.cpp:
311         (WebCore::CachedFrameBase::CachedFrameBase):
312         (WebCore::CachedFrameBase::restore):
313         (WebCore::CachedFrame::CachedFrame):
314         * history/CachedFrame.h:
315         * page/FrameView.cpp:
316         (WebCore::FrameView::restoreBackingStores): Deleted.
317         * page/FrameView.h:
318
319 2016-12-23  Sam Weinig  <sam@webkit.org>
320
321         Add missing std::optional to ApplePayPaymentRequest.lineItems
322         https://bugs.webkit.org/show_bug.cgi?id=166468
323
324         Reviewed by Alexey Proskuryakov.
325
326         No functional change, but is more consistent.
327
328         * Modules/applepay/ApplePayPaymentRequest.h:
329         Remove unnecessary #include of <heap/Strong.h>, add std::optional to lineItems.
330
331         * Modules/applepay/ApplePaySession.cpp:
332         (WebCore::convertAndValidate):
333         Update to deal with optional line items, remove unnecessary comment.
334
335         * Modules/applepay/ApplePaySession.h:
336         Remove unneeded forward declarations.
337
338 2016-12-22  Sam Weinig  <sam@webkit.org>
339
340         [WebIDL] Remove custom bindings for WebSQL code
341         https://bugs.webkit.org/show_bug.cgi?id=166441
342
343         Reviewed by Darin Adler.
344
345         - Replace custom variant type SQLValue with a type alias of a Variant.
346         - Use the newly representable SQLValue to remove custom bindings for 
347           SQLResultSetRowList::item and SQLTransaction::executeSql.
348
349         * CMakeLists.txt:
350         * WebCore.xcodeproj/project.pbxproj:
351         * bindings/js/JSBindingsAllInOne.cpp:
352         * bindings/js/JSSQLResultSetRowListCustom.cpp: Removed.
353         * bindings/js/JSSQLTransactionCustom.cpp: Removed.
354         * platform/sql/SQLValue.cpp: Removed.
355         Remove files.
356
357         * Modules/webdatabase/SQLResultSetRowList.cpp:
358         (WebCore::SQLResultSetRowList::length):
359         (WebCore::SQLResultSetRowList::item):
360         * Modules/webdatabase/SQLResultSetRowList.h:
361         * Modules/webdatabase/SQLResultSetRowList.idl:
362         Sink the implementation of item() into the implementation. Use a
363         record type to bridge to javascript.
364
365         * Modules/webdatabase/SQLStatement.cpp:
366         (WebCore::SQLStatement::SQLStatement):
367         * Modules/webdatabase/SQLStatement.h:
368         Update to take arguments by rvalue reference.
369
370         * Modules/webdatabase/SQLTransaction.cpp:
371         (WebCore::SQLTransaction::executeSql):
372         * Modules/webdatabase/SQLTransaction.h:
373         * Modules/webdatabase/SQLTransaction.idl:
374         Remove custom annotation, and update signature to match the IDL.
375
376         * Modules/webdatabase/SQLTransactionBackend.cpp:
377         * Modules/webdatabase/SQLTransactionBackend.h:
378         Remove unneeded #includes of SQLValue.h
379
380         * bindings/js/JSDOMConvert.h:
381         (WebCore::Converter<IDLNull>::convert):
382         (WebCore::JSConverter<IDLNull>::convert):
383         Implement conversion for the null type so it can be used in the SQLValue union.
384
385         * inspector/InspectorDatabaseAgent.cpp:
386         * platform/sql/SQLiteStatement.cpp:
387         (WebCore::SQLiteStatement::bindValue):
388         (WebCore::SQLiteStatement::getColumnValue):
389         * platform/sql/SQLiteStatement.h:
390         Replace old switch with a WTF::switchOn that operates on the new variant.
391
392         * platform/sql/SQLValue.h:
393         (WebCore::SQLValue::SQLValue): Deleted.
394         (WebCore::SQLValue::type): Deleted.
395         Replace implementation with a Variant.
396
397 2016-12-22  Michael Catanzaro  <mcatanzaro@igalia.com>
398
399         [GTK] GLES build broken since r208997
400         https://bugs.webkit.org/show_bug.cgi?id=166455
401
402         Unreviewed. Fix the preprocessor guards here; this code is incompatible with GLES2.
403
404         Looks like it's been broken for a month. Typical!
405
406         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
407         (WebCore::Extensions3DOpenGLCommon::initializeAvailableExtensions):
408
409 2016-12-23  Zan Dobersek  <zdobersek@igalia.com>
410
411         [EME][GStreamer] Enable various code paths for ENCRYPTED_MEDIA
412         https://bugs.webkit.org/show_bug.cgi?id=166054
413
414         Reviewed by Xabier Rodriguez-Calvar.
415
416         Add ENABLE_ENCRYPTED_MEDIA build guards in various places in GStreamer
417         code to enable decryption-related GStreamer elements and the proper
418         decryptor handling in AppendPipeline.
419
420         * platform/GStreamer.cmake:
421         * platform/graphics/gstreamer/GStreamerUtilities.cpp:
422         * platform/graphics/gstreamer/GStreamerUtilities.h:
423         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
424         (WebCore::registerWebKitGStreamerElements):
425         (WebCore::MediaPlayerPrivateGStreamerBase::handleSyncMessage):
426         Only call needKey() if LEGACY_ENCRYPTED_MEDIA is enabled, since this is
427         the way the legacy EME system expects to be notified of key necessity.
428         It's very likely ENCRYPTED_MEDIA will do this differently.
429         * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.cpp:
430         * platform/graphics/gstreamer/eme/WebKitClearKeyDecryptorGStreamer.h:
431         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
432         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.h:
433         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
434         (WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
435         (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
436         (WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread):
437         * platform/graphics/gstreamer/mse/AppendPipeline.h:
438
439 2016-12-23  Ryosuke Niwa  <rniwa@webkit.org>
440
441         Eliminate the use of lastChild in TextIterator
442         https://bugs.webkit.org/show_bug.cgi?id=166456
443
444         Reviewed by Antti Koivisto.
445
446         Just use the node we just existed in TextIterator::exitNode and in emitting additional new line
447         to eliminate the use of Node::lastChild.
448
449         Also initialize member variables in the declaration instead of the constructor to modernize the code.
450
451         * editing/TextIterator.cpp:
452         (WebCore::TextIterator::TextIterator):
453         (WebCore::TextIterator::advance):
454         (WebCore::TextIterator::exitNode):
455         * editing/TextIterator.h:
456
457 2016-12-22  Andy Estes  <aestes@apple.com>
458
459         Reduce QuickLook.h include overhead
460         https://bugs.webkit.org/show_bug.cgi?id=166454
461
462         Reviewed by Andreas Kling.
463
464         * dom/Document.cpp: Included QuickLook.h for QLPreviewProtocol().
465         * loader/DocumentLoader.cpp:
466         (WebCore::DocumentLoader::setQuickLookHandle): Moved from DocumentLoader.h to here.
467         * loader/DocumentLoader.h: Stopped including QuickLook.h and forward-declared
468         QuickLookHandle.
469         (WebCore::DocumentLoader::setQuickLookHandle): Moved definition out-of-line since it
470         requires QuickLookHandle to be a complete type.
471         * loader/ios/QuickLook.h: Updated to use #pragma once. Cleaned up includes and forward
472         declarations.
473         * platform/network/ResourceHandle.cpp: Included QuickLook.h so that QuickLookHandle is a
474         complete type in the ResourceHandle constructor.
475         * platform/network/ResourceHandle.h: Stopped including QuickLook.h and forward-declared
476         QuickLookHandle.
477         (WebCore::ResourceHandle::setQuickLookHandle): Moved definition out-of-line since it
478         requires QuickLookHandle to be a complete type.
479         * platform/network/mac/ResourceHandleMac.mm:
480         (WebCore::ResourceHandle::setQuickLookHandle): Moved from ResourceHandle.h to here.
481         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: Included QuickLook.h for
482         QuickLookHandle.
483
484 2016-12-22  Andy Estes  <aestes@apple.com>
485
486         [iOS] Move QuickLook from WebCore/platform to WebCore/loader
487         https://bugs.webkit.org/show_bug.cgi?id=166449
488
489         Reviewed by Darin Adler.
490
491         QuickLook.mm knows about ResourceLoader, so it's a layering violation to have it in
492         platform/. Move it to loader/ios/.
493
494         * WebCore.xcodeproj/project.pbxproj:
495         * loader/ios/QuickLook.h: Renamed from Source/WebCore/platform/network/ios/QuickLook.h.
496         * loader/ios/QuickLook.mm: Renamed from Source/WebCore/platform/network/ios/QuickLook.mm.
497
498 2016-12-22  Michael Catanzaro  <mcatanzaro@igalia.com>
499
500         Unreviewed, fix unused parameter warning in GLES build
501
502         Looks like it's been here since 2012. Impressive!
503
504         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
505         (WebCore::GraphicsContext3D::resolveMultisamplingIfNecessary):
506
507 2016-12-22  Alex Christensen  <achristensen@webkit.org>
508
509         Move GraphicsContext3DWin to GraphicsContext3DOpenGLES
510         https://bugs.webkit.org/show_bug.cgi?id=166425
511
512         Reviewed by Tim Horton.
513
514         Move code which is GLES-specific not Windows-specific to the GLES-specific file
515         so I can use it on Cocoa, with a temporary PLATFORM macro that I plan to remove once
516         all platforms use ANGLE's GLES implementation. There is another copy of this code in
517         GraphicsContext3DCairo, which will also be united with this code here soon.
518         Also remove the PlatformCALayerWin, which was never used for anything.
519
520         * platform/graphics/opengl/GraphicsContext3DOpenGLES.cpp:
521         (WebCore::GraphicsContext3D::create):
522         (WebCore::GraphicsContext3D::GraphicsContext3D):
523         (WebCore::GraphicsContext3D::~GraphicsContext3D):
524         (WebCore::GraphicsContext3D::setContextLostCallback):
525         (WebCore::GraphicsContext3D::setErrorMessageCallback):
526         (WebCore::GraphicsContext3D::makeContextCurrent):
527         (WebCore::GraphicsContext3D::checkGPUStatusIfNecessary):
528         (WebCore::GraphicsContext3D::platformGraphicsContext3D):
529         (WebCore::GraphicsContext3D::platformTexture):
530         (WebCore::GraphicsContext3D::isGLES2Compliant):
531         (WebCore::GraphicsContext3D::platformLayer):
532         * platform/graphics/win/GraphicsContext3DWin.cpp: Removed.
533         * PlatformMac.cmake:
534         Include the egl directory.  I'll need this, too, once Mac starts using ANGLE's EGL implementation.
535
536 2016-12-22  Brent Fulgham  <bfulgham@apple.com>
537
538         Nested calls to setDocument can omit firing 'unload' events
539         https://bugs.webkit.org/show_bug.cgi?id=166422
540         <rdar://problem/29763012>
541
542         Reviewed by Alex Christensen.
543
544         Test: fast/loader/nested-document-handling.html
545
546         Only allow a single document change to be taking place during a given runloop cycle.
547
548         * bindings/js/ScriptController.cpp:
549         (WebCore::ScriptController::executeIfJavaScriptURL): Block script changing the document
550         when we are in the middle of changing the document.
551         * page/Frame.cpp:
552         (WebCore::Frame::setDocument): Keep track of document change state.
553         * page/Frame.h:
554
555 2016-12-22  Tim Horton  <timothy_horton@apple.com>
556
557         TileGrid creates new cohorts even when not using temporarilyRetainTileCohorts mode
558         https://bugs.webkit.org/show_bug.cgi?id=166440
559
560         Reviewed by Simon Fraser.
561
562         No new tests.
563
564         * platform/graphics/ca/TileGrid.cpp:
565         (WebCore::TileGrid::revalidateTiles):
566         If we are not temporarily retaining unparented tile cohorts (e.g. on
567         iOS WebKit2), instead immediately removing all tiles that would go into
568         the new cohort, avoid starting the cohort at all.
569
570 2016-12-22  Zalan Bujtas  <zalan@apple.com>
571
572         Do not destroy the RenderNamedFlowFragment as leftover anonymous block.
573         https://bugs.webkit.org/show_bug.cgi?id=166436
574         rdar://problem/29772233
575
576         Reviewed by Simon Fraser.
577
578         When as the result of certain style change, the generated anonymous block is not needed anymore, we
579         move its descendants up to the parent and destroy the generated box. While RenderNamedFlowFragment is a generated
580         block, the cleanup code should just ignore it the same way we ignore boxes like multicolumn, mathml etc. 
581
582         Test: fast/regions/flow-fragment-as-anonymous-block-crash.html
583
584         * rendering/RenderObject.h:
585         (WebCore::RenderObject::isAnonymousBlock):
586
587 2016-12-22  Wenson Hsieh  <wenson_hsieh@apple.com>
588
589         CSS Scroll Snap does not work if scrollbar is hidden
590         https://bugs.webkit.org/show_bug.cgi?id=160442
591         <rdar://problem/23317034>
592
593         Reviewed by Simon Fraser.
594
595         Currently, the only reason scroll snapping works in overflow scrolling containers without forcing layout is
596         because we would initialize the scrolling container's ScrollAnimator in the process of updating scrollbars. If
597         there are no scrollbars to render, we won't bother creating a ScrollAnimator. Without an existing
598         ScrollAnimator, ScrollableArea::updateScrollSnapState will simply bail instead of setting up the scroll snap
599         state. Instead, we should take setting a non-empty vector of scroll offsets on the ScrollableArea as a cue that
600         the ScrollableArea also needs a ScrollAnimator, and initialize it there if necessary.
601
602         Test: tiled-drawing/scrolling/scroll-snap/scroll-snap-mandatory-hidden-scrollbars.html
603
604         * platform/ScrollableArea.cpp:
605         (WebCore::ScrollableArea::setHorizontalSnapOffsets):
606         (WebCore::ScrollableArea::setVerticalSnapOffsets):
607
608 2016-12-22  Daniel Bates  <dabates@apple.com>
609
610         Bypass pop-up blocker from cross-origin or sandboxed frame
611         https://bugs.webkit.org/show_bug.cgi?id=166290
612         <rdar://problem/29742039>
613
614         Reviewed by Darin Adler.
615
616         Tests: fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame.html
617                fast/events/popup-blocked-from-sandboxed-frame-via-window-open-named-sibling-frame2.html
618                fast/events/popup-blocked-from-unique-frame-via-window-open-named-sibling-frame.html
619
620         * page/DOMWindow.cpp:
621         (WebCore::DOMWindow::open): Use FrameLoader::findFrameForNavigation() to find the
622         target frame to navigate with respect to the active document just as we do in WebCore::createWindow().
623
624 2016-12-22  Andy Estes  <aestes@apple.com>
625
626         Make WebCore::EditorInsertAction an enum class
627         https://bugs.webkit.org/show_bug.cgi?id=166424
628
629         Reviewed by Brent Fulgham.
630
631         * editing/AlternativeTextController.cpp:
632         (WebCore::AlternativeTextController::applyDictationAlternative):
633         * editing/Editor.cpp:
634         (WebCore::Editor::pasteAsPlainTextWithPasteboard):
635         (WebCore::Editor::shouldInsertText):
636         (WebCore::Editor::insertTextWithoutSendingTextEvent):
637         (WebCore::Editor::insertLineBreak):
638         (WebCore::Editor::insertParagraphSeparator):
639         (WebCore::Editor::markMisspellingsAfterTypingToWord):
640         (WebCore::Editor::markAndReplaceFor):
641         (WebCore::Editor::changeBackToReplacedString):
642         (WebCore::Editor::transpose):
643         (WebCore::Editor::handleAcceptedCandidate):
644         * editing/EditorInsertAction.h:
645         (): Deleted.
646         * editing/gtk/EditorGtk.cpp:
647         (WebCore::Editor::pasteWithPasteboard):
648         * editing/ios/EditorIOS.mm:
649         (WebCore::Editor::pasteWithPasteboard):
650         (WebCore::Editor::replaceSelectionWithAttributedString):
651         * editing/mac/EditorMac.mm:
652         (WebCore::Editor::pasteWithPasteboard):
653         (WebCore::Editor::replaceNodeFromPasteboard):
654         (WebCore::Editor::replaceSelectionWithAttributedString):
655         * editing/win/EditorWin.cpp:
656         (WebCore::Editor::pasteWithPasteboard):
657         * page/ContextMenuController.cpp:
658         (WebCore::insertUnicodeCharacter):
659         (WebCore::ContextMenuController::contextMenuItemSelected):
660         * page/DragController.cpp:
661         (WebCore::DragController::concludeEditDrag):
662
663 2016-12-22  Jer Noble  <jer.noble@apple.com>
664
665         Only include those parts of AVFoundation.framework which are strictly needed.
666         https://bugs.webkit.org/show_bug.cgi?id=166423
667
668         Reviewed by Eric Carlson.
669
670         * Modules/plugins/QuickTimePluginReplacement.mm:
671         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
672         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
673         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
674         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
675         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
676         * platform/mac/SerializedPlatformRepresentationMac.mm:
677         * platform/mac/WebPlaybackSessionInterfaceMac.mm:
678         * platform/mac/WebVideoFullscreenController.mm:
679         * platform/mediastream/mac/AVAudioCaptureSource.mm:
680         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
681         * platform/mediastream/mac/AVMediaCaptureSource.mm:
682         * platform/mediastream/mac/AVVideoCaptureSource.mm:
683
684 2016-12-22  Jer Noble  <jer.noble@apple.com>
685
686         NULL-deref CRASH in WebCore::PlatformMediaSession::mediaType
687         https://bugs.webkit.org/show_bug.cgi?id=166407
688
689         Reviewed by Darin Adler.
690
691         In r207688, we added a facility in PlatformMediaSessionManager for safely walking through a
692         list of PlatformMediaSessions by replacing entries of deleted sessions with nullptr. We now
693         need to use those new iteration falicities in MediaSessionManageriOS.
694
695         In addition to the existing iterators, add one which takes a predicate, and returns the first
696         session which matches the predicate, or nullptr, if none do.
697
698         * platform/audio/PlatformMediaSessionManager.cpp:
699         (WebCore::PlatformMediaSessionManager::findSession):
700         (WebCore::PlatformMediaSessionManager::anyOfSessions):
701         * platform/audio/PlatformMediaSessionManager.h:
702         (WebCore::PlatformMediaSessionManager::sessions): Deleted.
703         * platform/audio/ios/MediaSessionManagerIOS.mm:
704         (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring):
705         (WebCore::MediaSessionManageriOS::nowPlayingEligibleSession):
706         (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange):
707         (WebCore::MediaSessionManageriOS::applicationDidEnterBackground):
708         (WebCore::MediaSessionManageriOS::applicationWillEnterForeground):
709
710 2016-12-22  Jer Noble  <jer.noble@apple.com>
711
712         Muted media element playback should not interrupt other audio playback
713         https://bugs.webkit.org/show_bug.cgi?id=166347
714
715         Reviewed by Eric Carlson.
716
717         Test: TestWebKitAPI/WebKit/ios/AudioSessionCategoryIOS.mm
718
719         * platform/audio/cocoa/MediaSessionManagerCocoa.cpp:
720         (PlatformMediaSessionManager::updateSessionState):
721
722 2016-12-22  Jer Noble  <jer.noble@apple.com>
723
724         Check for the existence of AVSampleBufferAudioRenderer.h before redeclaring AVSampleBufferAudioRenderer
725         https://bugs.webkit.org/show_bug.cgi?id=166421
726
727         Reviewed by Eric Carlson.
728
729         * platform/spi/mac/AVFoundationSPI.h:
730
731 2016-12-22  Eric Carlson  <eric.carlson@apple.com>
732
733         AVPlayerLayer isn't available on every system
734         https://bugs.webkit.org/show_bug.cgi?id=166399
735
736         Reviewed by Jer Noble.
737
738         No new tests, prevents a crash that can't be reproduced on a test system.
739
740         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm: Use SOFT_LINK_CLASS_OPTIONAL.
741
742 2016-12-21  Tim Horton  <timothy_horton@apple.com>
743
744         TileGrid revalidates tiles twice during flush, first with wrong visible rect
745         https://bugs.webkit.org/show_bug.cgi?id=166406
746
747         Reviewed by Simon Fraser.
748
749         No new tests; existing tests cover this code, this is just a perf win,
750         specifically reducing the amount of layer churn during zooming.
751
752         * platform/graphics/ca/TileGrid.cpp:
753         (WebCore::TileGrid::setScale):
754         Schedule a revalidation, which will happen later in the same flush,
755         instead of doing it immediately. Doing it immediately is problematic,
756         because we're currently in the middle of a GraphicsLayer tree flush,
757         and don't have the complete picture of the new state yet. We're guaranteed
758         to get the new scale *before* the flush calls revalidateTiles.
759
760 2016-12-21  Tim Horton  <timothy_horton@apple.com>
761
762         TileGrid creates new tiles when there are recyclable tiles about to be removed
763         https://bugs.webkit.org/show_bug.cgi?id=166408
764
765         Reviewed by Simon Fraser.
766
767         No new tests; existing tests cover this code, this is just a perf win,
768         specifically reducing the amount of layer churn during zooming.
769
770         * platform/graphics/ca/TileGrid.cpp:
771         (WebCore::TileGrid::revalidateTiles):
772         Remove all the tiles that will be removed first, then add new tiles.
773         Strictly ordering it this way means that tiles will be removed, go into
774         the LayerPool, then be pulled back out of the LayerPool to sit in the
775         newly-covered areas. Previously, we would sometimes make new layers
776         for newly-covered areas, and then remove unneeded but otherwise recyclable
777         tiles, which would then just go sit in the LayerPool (and often get
778         pruned, wastefully).
779
780 2016-12-21  Eric Carlson  <eric.carlson@apple.com>
781
782         [MediaStream] Update media-stream-event-constructor test
783         https://bugs.webkit.org/show_bug.cgi?id=166398
784
785         Reviewed by Jer Noble.
786
787         No new tests, updated existing test.
788
789         * Modules/mediastream/MediaStreamEvent.idl: Mark eventInitDict as optional.
790
791 2016-12-21  Jiewen Tan  <jiewen_tan@apple.com>
792
793         WebKit should set Original URL of a download request correctly
794         https://bugs.webkit.org/show_bug.cgi?id=166394
795         <rdar://problem/25391382>
796
797         Reviewed by Alex Christensen.
798
799         WebKit should set Original URL of a download request correctly if the download
800         is initiated by clicking on a link with target=_blank.
801
802         Manually tested as the requested test infrastructure doesn't exist yet. We need actual
803         loading process for API test such that we could simulate the real situation which
804         PolicyDownload is only set when we receive responds. Currently we can only set
805         PolicyDownload in a NavigationDelegate when the load starts. Hence we cannot simulate
806         the following process: load starts -> PolicyUse -> creates a new WebView ->
807         respond receives -> PolicyDownload -> downloads.
808
809         * loader/FrameLoader.cpp:
810         (WebCore::FrameLoader::setOriginalURLForDownloadRequest):
811
812 2016-12-21  Sam Weinig  <sam@webkit.org>
813
814         [WebIDL] Remove custom binding for ErrorEvent
815         https://bugs.webkit.org/show_bug.cgi?id=166345
816
817         Reviewed by Anders Carlsson.
818
819         * CMakeLists.txt:
820         * WebCore.xcodeproj/project.pbxproj:
821         * bindings/js/JSBindingsAllInOne.cpp:
822         * bindings/js/JSErrorEventCustom.cpp: Removed.
823         Remove JSErrorEventCustom.cpp
824
825         * ForwardingHeaders/heap/HandleTypes.h: Added.
826         Add forwarding header for HandleTypes.h
827
828         * bindings/js/JSErrorHandler.cpp:
829         (WebCore::JSErrorHandler::handleEvent):
830         Switch to using JSDOMConvert and call the updated name for the error getter.
831
832         * bindings/js/ScriptController.h:
833         * bindings/js/SerializedScriptValue.h:
834         Remove unnecessary forward declaration of ScriptValue.
835
836         * bindings/js/WorkerScriptController.cpp:
837         (WebCore::WorkerScriptController::evaluate):
838         * dom/ScriptExecutionContext.cpp:
839         (WebCore::ScriptExecutionContext::sanitizeScriptError):
840         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
841         * dom/ScriptExecutionContext.h:
842         * workers/WorkerMessagingProxy.cpp:
843         (WebCore::WorkerMessagingProxy::postExceptionToWorkerObject):
844         Update type that sanitizeScriptError takes from a ScriptValue to a Strong<Unknown>.
845
846         * bindings/scripts/CodeGeneratorJS.pm:
847         (GenerateCallWith):
848         * bindings/scripts/IDLAttributes.txt:
849         Add a new extended attributes option for the CallWith, GlobalObject, that passes the global object.
850
851         * dom/ErrorEvent.cpp:
852         (WebCore::ErrorEvent::ErrorEvent):
853         (WebCore::ErrorEvent::error):
854         (WebCore::ErrorEvent::trySerializeError):
855         (WebCore::ErrorEvent::sanitizedErrorValue): Deleted.
856         * dom/ErrorEvent.h:
857         Store a Strong<Unknown> directly, rather than a ScriptValue. Rename sanitizedErrorValue to 
858         just error to match the IDL.
859
860         * dom/ErrorEvent.idl:
861         Remove CustomGetter.
862
863 2016-12-21  Ryosuke Niwa  <rniwa@webkit.org>
864
865         Modernize findPlainText
866         https://bugs.webkit.org/show_bug.cgi?id=166299
867
868         Reviewed by Sam Weinig.
869
870         Modernized findPlainText by merging the static version of it into it
871         and extracting the main nested loop out as findPlainTextOffset.
872
873         No new tests since there should be no behavioral change.
874
875         * editing/TextIterator.cpp:
876         (WebCore::findPlainTextOffset):
877         (WebCore::findPlainText):
878
879 2016-12-21  John Wilander  <wilander@apple.com>
880
881         Switch to a blacklist model for restricted Accept headers in simple CORS requests
882         https://bugs.webkit.org/show_bug.cgi?id=166363
883
884         Reviewed by Alex Christensen.
885
886         Updated existing tests.
887
888         * platform/network/HTTPParsers.cpp:
889         (WebCore::isDelimiterCharacter):
890             Convenience function for checking delimiter characters according to:
891             https://tools.ietf.org/html/rfc7230#section-3.2.6 
892         (WebCore::isValidAcceptHeaderValue):
893             Now uses WebCore::isDelimiterCharacter() to blacklist delimiter characters
894             instead of a whitelist of accepted non-alphanumeric characters.
895
896 2016-12-21  Beth Dakin  <bdakin@apple.com>
897
898         Holding down on candidates in the TouchBar should show panel on screen
899         https://bugs.webkit.org/show_bug.cgi?id=166367
900         -and corresponding-
901         <rdar://problem/28479236>
902
903         Reviewed by Tim Horton.
904
905         Expose the version of setCandidates: that takes a rect.
906         * platform/spi/cocoa/NSTouchBarSPI.h:
907
908 2016-12-21  Michael Catanzaro  <mcatanzaro@igalia.com>
909
910         Extensions3DOpenGL[ES] constructor should not be explicit
911         https://bugs.webkit.org/show_bug.cgi?id=166296
912
913         Reviewed by Darin Adler.
914
915         These constructors used to only have one parameter. Now they have two and they're both
916         mandatory.
917
918         * platform/graphics/opengl/Extensions3DOpenGL.h:
919         * platform/graphics/opengl/Extensions3DOpenGLES.h:
920
921 2016-12-21  Eric Carlson  <eric.carlson@apple.com>
922
923         [MediaStream] MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer can be called before it has a media stream
924         https://bugs.webkit.org/show_bug.cgi?id=166344
925         <rdar://problem/29763143>
926
927         Reviewed by Jer Noble.
928
929         There is a very narrow window during which a MediaStream player can be asked for its layer 
930         before it has a steam, resulting in a NULL dereference and crash. Don't do that.
931
932         Unable to reproduce.
933
934         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
935         (WebCore::MediaPlayerPrivateMediaStreamAVFObjC::ensureLayer):
936
937 2016-12-21  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
938
939         [Readable Streams API] Fix test in readableByteStreamCallPullIfNeeded
940         https://bugs.webkit.org/show_bug.cgi?id=166312
941
942         Reviewed by Youenn Fablet.
943
944         Add a new function to evaluate if calling a pull function is
945         required as per specification.
946
947         No new test required.
948
949         * Modules/streams/ReadableByteStreamInternals.js:
950         (readableByteStreamControllerShouldCallPull): Added.
951         (readableByteStreamControllerCallPullIfNeeded):
952
953 2016-12-21  Simon Fraser  <simon.fraser@apple.com>
954
955         Fixed bars are positioned incorrectly when there are header and footer banners
956         https://bugs.webkit.org/show_bug.cgi?id=166302
957         rdar://problem/29727145
958
959         Reviewed by Tim Horton.
960         
961         The computation of the visual viewport was wrong in the presence of header and footer
962         banners. It needs to take into account the fact that "visibleContentRect" applies to the
963         scroll view contents, which includes header and footer (unscaled), and the potentially scaled
964         document, and we need to return a rectangle in unscaled document coordinates.
965         
966         Make a static method in FrameView to do this computation, and call it from FrameView::visualViewportRect()
967         and ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition().
968         
969         layoutViewportForScrollPosition() is only called on Mac, so remove the #ifdeffing related to scaling, 
970         and pass in an unscaled scroll position.
971
972         Test: fast/visual-viewport/zoomed-fixed-header-and-footer.html
973
974         * page/FrameView.cpp:
975         (WebCore::FrameView::updateLayoutViewport):
976         (WebCore::FrameView::maxStableLayoutViewportOrigin):
977         (WebCore::FrameView::visibleDocumentRect):
978         (WebCore::FrameView::visualViewportRect):
979         * page/FrameView.h:
980         * page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
981         (WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition):
982         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
983         (WebCore::ScrollingTreeFrameScrollingNodeMac::setScrollPositionWithoutContentEdgeConstraints):
984
985 2016-12-21  Carlos Alberto Lopez Perez  <clopez@igalia.com>
986
987         [CMake] Remove remaining INDIE_UI related entries.
988         https://bugs.webkit.org/show_bug.cgi?id=165881
989
990         Unreviewed.
991
992         * CMakeLists.txt:
993
994 2016-12-20  Carlos Garcia Campos  <cgarcia@igalia.com>
995
996         [Cairo] Conditional jump or move depends on uninitialised value(s)
997         https://bugs.webkit.org/show_bug.cgi?id=166058
998
999         Reviewed by Michael Catanzaro.
1000
1001         Initialize x and y members of cairo_glyph_t struct before passing it to cairo_glyph_path.
1002
1003         * platform/graphics/cairo/FontCairo.cpp:
1004         (WebCore::CairoGlyphToPathTranslator::path):
1005
1006 2016-12-20  Myles C. Maxfield  <mmaxfield@apple.com>
1007
1008         Skia lighter wght variation looks bolder than regular
1009         https://bugs.webkit.org/show_bug.cgi?id=165948
1010
1011         Reviewed by Antti Koivisto.
1012
1013         Test: fast/text/variations/default-value.html
1014
1015         This patch inspects the font's information regarding variations. It uses this information
1016         to work around a bug in CoreText where default variation values were not getting applied.
1017         This workaround is placed behind a version check and the macro name
1018         "WORKAROUND_CORETEXT_VARIATIONS_DEFAULT_VALUE_BUG" so we know to delete it whenever
1019         possible. It also uses the minimum and maximum supported values for the axis to clamp our
1020         variation values to the closest supported point, which is in line with a recent edit to
1021         the fonts spec:
1022         https://github.com/w3c/csswg-drafts/commit/52b802ac38619286a30662dceb71b8a29fa72f42
1023         This clamping behavior also revealed another bug in CoreText, which was worked around
1024         behind another version check and macro name WORKAROUND_CORETEXT_VARIATIONS_EXTENTS_BUG so
1025         we know to delete it whenever possible.
1026
1027         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1028         (WebCore::defaultVariationValues):
1029         (WebCore::preparePlatformFont):
1030
1031 2016-12-20  Tim Horton  <timothy_horton@apple.com>
1032
1033         Remove a duplicate reference to ScrollingMomentumCalculatorMac.h in the Xcode project
1034
1035         Rubber-stamped by Sam Weinig.
1036
1037         * WebCore.xcodeproj/project.pbxproj:
1038
1039 2016-12-20  Tim Horton  <timothy_horton@apple.com>
1040
1041         Remove a duplicate reference to ScrollingMomentumCalculatorMac.mm in the Xcode project
1042
1043         Rubber-stamped by Sam Weinig.
1044
1045         * WebCore.xcodeproj/project.pbxproj:
1046
1047 2016-12-20  Alex Christensen  <achristensen@webkit.org>
1048
1049         Remove initEvent quirk
1050         https://bugs.webkit.org/show_bug.cgi?id=166284
1051
1052         Reviewed by Dan Bernstein.
1053
1054         We added this quirk in r207908 and expanded it in r209946 and r210034.
1055         Many web compatibility issues have been found, which leads us to believe that many more exist.
1056         This reverts the behavior to match how it was before r203848.
1057         This change was proposed to the spec in https://github.com/whatwg/dom/issues/387
1058
1059         * dom/Event.cpp:
1060         (WebCore::Event::initEventForBindings): Deleted.
1061         * dom/Event.h:
1062         * dom/Event.idl:
1063         * platform/RuntimeApplicationChecks.h:
1064         * platform/RuntimeApplicationChecks.mm:
1065         (WebCore::IOSApplication::isBaiduNuomi): Deleted.
1066         (WebCore::IOSApplication::isAutoNaviAMap): Deleted.
1067         (WebCore::IOSApplication::isFlipboard): Deleted.
1068
1069 2016-12-20  JF Bastien  <jfbastien@apple.com>
1070
1071         INDIE_UI: fix cmake build
1072         https://bugs.webkit.org/show_bug.cgi?id=166288
1073
1074         Reviewed by Mark Lam.
1075
1076         Bug #165881 didn't remove a file from cmake.
1077
1078         * PlatformMac.cmake:
1079
1080 2016-12-20  Alex Christensen  <achristensen@webkit.org>
1081
1082         Fix clean Windows build after r210029
1083         https://bugs.webkit.org/show_bug.cgi?id=165881
1084
1085         * DerivedSources.cpp:
1086
1087 2016-12-20  Brent Fulgham  <bfulgham@apple.com>
1088
1089         Address some style problems found by static analysis
1090         https://bugs.webkit.org/show_bug.cgi?id=165975
1091
1092         Reviewed by Alex Christensen.
1093
1094         Correct the const-correctness of functions that are implemented using stricter
1095         const declarations.
1096
1097         Avoid passing large ANGLE data structures through the ANGLEWebKitBridge methods.
1098
1099         * inspector/InspectorCSSAgent.h: Declare the method overrides properly to match
1100         the stricter const declarations in the implementation files.
1101         * inspector/InspectorDOMAgent.h: Ditto.
1102         * inspector/InspectorPageAgent.h: Ditto.
1103         * inspector/InspectorTimelineAgent.h: Ditto.
1104         * inspector/PageDebuggerAgent.h: Ditto.
1105         * platform/graphics/ANGLEWebKitBridge.cpp:
1106         (WebCore::ANGLEWebKitBridge::setResources): Pass by const reference.
1107         * platform/graphics/ANGLEWebKitBridge.h:
1108         (WebCore::ANGLEWebKitBridge::getResources): Return a const reference.
1109         * platform/mediastream/RealtimeMediaSource.cpp:
1110         (WebCore::RealtimeMediaSource::selectSettings): Use a lambda that takes
1111         a const reference, rather than copying the maps while searching.
1112
1113 2016-12-20  Sam Weinig  <sam@webkit.org>
1114
1115         [WebIDL] Remove custom binding for WorkerGlobalScope::importScripts
1116         https://bugs.webkit.org/show_bug.cgi?id=166243
1117
1118         Reviewed by Alex Christensen.
1119
1120         * bindings/js/JSWorkerGlobalScopeCustom.cpp:
1121         (WebCore::JSWorkerGlobalScope::importScripts): Deleted.
1122         * workers/WorkerGlobalScope.idl:
1123         Import scripts can now be trivially generated.
1124
1125 2016-12-20  Zalan Bujtas  <zalan@apple.com>
1126
1127         SVG elements should inherit the root's flow thread state.
1128         https://bugs.webkit.org/show_bug.cgi?id=166173
1129         rdar://problem/29704862
1130
1131         Reviewed by Simon Fraser.
1132
1133         When the <svg> is not part of the multicolumn context (out of flow positioning), its descendants should not be in the flow either.
1134
1135         Test: fast/multicol/svg-inside-multicolumn.html
1136
1137         * rendering/RenderObject.cpp:
1138         (WebCore::RenderObject::computedFlowThreadState):
1139         * rendering/RenderObject.h:
1140         (WebCore::RenderObject::isProgress):
1141         (WebCore::RenderObject::isRenderSVGBlock):
1142         * rendering/svg/RenderSVGBlock.h:
1143
1144 2016-12-20  Alex Christensen  <achristensen@webkit.org>
1145
1146         Fix yet another app that uses initEvent with fewer than 3 parameters
1147         https://bugs.webkit.org/show_bug.cgi?id=166257
1148         <rdar://problem/29420268>
1149
1150         Reviewed by Sam Weinig.
1151
1152         * dom/Event.cpp:
1153         (WebCore::Event::initEventForBindings):
1154         * platform/RuntimeApplicationChecks.h:
1155         * platform/RuntimeApplicationChecks.mm:
1156         (WebCore::IOSApplication::isAutoNaviAMap):
1157         AutoNavi amap has content that uses initEvent with one parameter. This quirk is needed here, too.
1158
1159 2016-12-20  Dean Jackson  <dino@apple.com>
1160
1161         Remove INDIE_UI
1162         https://bugs.webkit.org/show_bug.cgi?id=165881
1163         <rdar://problem/29672532>
1164
1165         Reviewed by Simon Fraser.
1166
1167         The Indie UI work has been discontinued.
1168
1169         * Configurations/FeatureDefines.xcconfig:
1170         * Modules/indieui/UIRequestEvent.cpp: Removed.
1171         * Modules/indieui/UIRequestEvent.h: Removed.
1172         * Modules/indieui/UIRequestEvent.idl: Removed.
1173         * WebCore.xcodeproj/project.pbxproj:
1174         * dom/Element.cpp:
1175         (WebCore::Element::setUIActions): Deleted.
1176         (WebCore::Element::UIActions): Deleted.
1177         * dom/Element.h:
1178         * dom/Element.idl:
1179         * dom/EventNames.in:
1180         * dom/Node.cpp:
1181         (WebCore::Node::dispatchUIRequestEvent): Deleted.
1182         * dom/Node.h:
1183
1184 2016-12-20  Romain Bellessort  <romain.bellessort@crf.canon.fr>
1185
1186         [Readable Streams API] Implement readableByteStreamControllerCallPullIfNeeded()
1187         https://bugs.webkit.org/show_bug.cgi?id=166022
1188
1189         Reviewed by Youenn Fablet.
1190
1191         Implemented readableByteStreamControllerCallPullIfNeeded(). This function is
1192         in particular called when a new ReadableByteStreamController is created; hence,
1193         ReadableByteStreamController constructor has been updated.
1194
1195         Added 3 tests to check behaviour in case of success/failure of the start and pull functions
1196         associated to the underlyingByteSource.
1197
1198         * Modules/streams/ReadableByteStreamInternals.js:
1199         (privateInitializeReadableByteStreamController): Updated handling of underlyingByteSource
1200         start function (especially with call to readableByteStreamControllerCallPullIfNeeded).
1201         (isReadableStreamBYOBReader): Added.
1202         (readableStreamHasBYOBReader): Added.
1203         (readableStreamHasDefaultReader): Added.
1204         (readableByteStreamControllerCallPullIfNeeded): Added.
1205         * Modules/streams/ReadableStreamInternals.js:
1206         (privateInitializeReadableStreamDefaultController): Added missing asserts.
1207         * bindings/js/WebCoreBuiltinNames.h: Added readIntoRequests.
1208
1209 2016-12-20  Sam Weinig  <sam@webkit.org>
1210
1211         [DataCue] Un-prefix DataCue and remove custom bindings
1212         https://bugs.webkit.org/show_bug.cgi?id=166087
1213
1214         Reviewed by Eric Carlson.
1215
1216         * CMakeLists.txt:
1217         * WebCore.xcodeproj/project.pbxproj:
1218         * bindings/js/JSBindingsAllInOne.cpp:
1219         * bindings/js/JSDataCueCustom.cpp: Removed.
1220         Remove JSDataCueCustom.cpp
1221
1222         * bindings/js/JSTextTrackCueCustom.cpp:
1223         (WebCore::toJSNewlyCreated):
1224         Remove out of date comment.
1225
1226         * bindings/scripts/CodeGeneratorJS.pm:
1227         (GenerateConstructorDefinition):
1228         Update constructor generation code to use JSDOMConvert.
1229
1230         * html/track/DataCue.cpp:
1231         (WebCore::DataCue::DataCue):
1232         (WebCore::DataCue::~DataCue):
1233         (WebCore::DataCue::data):
1234         (WebCore::DataCue::setData):
1235         (WebCore::DataCue::cueContentsMatch):
1236         (WebCore::DataCue::value):
1237         (WebCore::DataCue::setValue):
1238         (WebCore::DataCue::valueOrNull):
1239         * html/track/DataCue.h:
1240         * html/track/DataCue.idl:
1241         * platform/SerializedPlatformRepresentation.h:
1242         Remove DATACUE_VALUE define from web exposed classes, so the interface can
1243         be the same on all platforms. Platforms that don't support DATACUE_VALUE will
1244         just never have any value. Also remove custom annotations.
1245
1246 2016-12-20  Wenson Hsieh  <wenson_hsieh@apple.com>
1247
1248         Implement the updated port/area-based Scroll Snap Module Level 1 Spec
1249         https://bugs.webkit.org/show_bug.cgi?id=165317
1250         <rdar://problem/29490956>
1251
1252         Reviewed by Dean Jackson.
1253
1254         Implements the changes drafted in the latest iteration of the Scroll Snap Module Level 1 spec, which uses a
1255         snap-area and snap-port-based method for determining snap positions in a scroll snapping container.
1256         Additionally, removes the now-obsolete and prefixed implementation of the scroll snap spec and refactors all
1257         affected layout tests to use the new CSS properties. Also adds new layout tests covering some behaviors detailed
1258         in the new version of the spec, such as scroll snapping with transformed child elements.
1259
1260         See below for more detailed descriptions of the changes.
1261
1262         Tests: css3/scroll-snap/scroll-snap-2d-change-axis-type.html
1263                css3/scroll-snap/scroll-snap-2d-offsets-computed-independently.html
1264                css3/scroll-snap/scroll-snap-children-with-scroll-snap-margin.html
1265                css3/scroll-snap/scroll-snap-children-with-transforms.html
1266                css3/scroll-snap/scroll-snap-positions-mainframe.html
1267                css3/scroll-snap/scroll-snap-positions-overflow-resize.html
1268                css3/scroll-snap/scroll-snap-positions.html
1269                css3/scroll-snap/scroll-snap-style-changed-align.html
1270                css3/scroll-snap/scroll-snap-with-scroll-padding.html
1271
1272         * WebCore.xcodeproj/project.pbxproj:
1273         * css/CSSCalculationValue.cpp:
1274         (WebCore::hasDoubleValue):
1275
1276         Removed use of length repeat.
1277
1278         * css/CSSComputedStyleDeclaration.cpp:
1279         (WebCore::valueForScrollSnapType):
1280         (WebCore::valueForScrollSnapAlignment):
1281         (WebCore::ComputedStyleExtractor::propertyValue):
1282         (WebCore::scrollSnapDestination): Deleted.
1283         (WebCore::scrollSnapPoints): Deleted.
1284         (WebCore::scrollSnapCoordinates): Deleted.
1285
1286         Removed helper functions used to create CSS values for scroll snap coordinates and destination, and added
1287         helpers for computed scroll snap type (a combination of axis and strictness values) as well as scroll snap align
1288         (an alignment value per axis).
1289
1290         * css/CSSPrimitiveValue.cpp:
1291         (WebCore::isValidCSSUnitTypeForDoubleConversion):
1292         (WebCore::isStringType):
1293         (WebCore::CSSPrimitiveValue::cleanup):
1294         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
1295         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
1296         (WebCore::CSSPrimitiveValue::equals):
1297
1298         Removed usages of the length repeat type, since repeat(*) is no longer being used anywhere.
1299
1300         * css/CSSPrimitiveValue.h:
1301         * css/CSSPrimitiveValueMappings.h:
1302         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1303         (WebCore::CSSPrimitiveValue::operator ScrollSnapStrictness):
1304         (WebCore::CSSPrimitiveValue::operator ScrollSnapAxis):
1305         (WebCore::CSSPrimitiveValue::operator ScrollSnapAxisAlignType):
1306         (WebCore::CSSPrimitiveValue::operator ScrollSnapType): Deleted.
1307
1308         Added CSSPrimitiveValue mappings to ScrollSnapAxisAlignType, ScrollSnapStrictness, and ScrollSnapAxis. Removed
1309         the old ScrollSnapType mapping.
1310
1311         * css/CSSProperties.json:
1312
1313         Replaced the old scroll snap CSS properties with the new ones. Note that scroll-snap-margin and scroll-padding
1314         have 4 shorthands each, for the individual top/bottom/left/right values.
1315
1316         * css/CSSValueKeywords.in:
1317
1318         Added CSS keywords {x, y}, which are necessary to support the new scroll snapping properties.
1319
1320         * css/LengthRepeat.h: Removed.
1321
1322         Removed LengthRepeat entirely. This represented the `repeat(<length>)` CSS value, which was only used for the
1323         scroll-snap-points-x and scroll-snap-points-y values.
1324
1325         * css/StyleBuilderConverter.h:
1326         (WebCore::StyleBuilderConverter::convertScrollSnapType):
1327         (WebCore::StyleBuilderConverter::convertScrollSnapAlign):
1328         (WebCore::StyleBuilderConverter::parseSnapCoordinate): Deleted.
1329         (WebCore::StyleBuilderConverter::convertScrollSnapPoints): Deleted.
1330         (WebCore::StyleBuilderConverter::convertSnapCoordinatePair): Deleted.
1331         (WebCore::StyleBuilderConverter::convertScrollSnapCoordinates): Deleted.
1332
1333         Added helper functions to convert scroll snap type and scroll snap alignment from parsed CSS values to their
1334         primary representation in WebCore as ScrollSnapType and ScrollSnapAlign. These methods assume that the given
1335         CSS values have successfully cleared the parsing step and are represented as CSSValueLists or length 1 or 2.
1336
1337         * css/StyleBuilderCustom.h:
1338         (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsX): Deleted.
1339         (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsX): Deleted.
1340         (WebCore::StyleBuilderCustom::applyInitialWebkitScrollSnapPointsY): Deleted.
1341         (WebCore::StyleBuilderCustom::applyInheritWebkitScrollSnapPointsY): Deleted.
1342         * css/StyleProperties.cpp:
1343         (WebCore::StyleProperties::getPropertyValue):
1344         (WebCore::StyleProperties::asText):
1345
1346         Adds support for the scroll-snap-margin and scroll-padding.
1347
1348         * css/parser/CSSParser.cpp:
1349         (WebCore::isValidKeywordPropertyAndValue):
1350         (WebCore::CSSParser::parseValue):
1351         (WebCore::isScrollSnapAxisAlign):
1352         (WebCore::isScrollSnapStrictness):
1353         (WebCore::CSSParser::parseScrollSnapAlign):
1354         (WebCore::CSSParser::parseScrollSnapType):
1355         (WebCore::CSSParser::parseNonElementSnapPoints): Deleted.
1356         (WebCore::CSSParser::parseScrollSnapPositions): Deleted.
1357         (WebCore::CSSParser::parseScrollSnapDestination): Deleted.
1358         (WebCore::CSSParser::parseScrollSnapCoordinate): Deleted.
1359         * css/parser/CSSParser.h:
1360
1361         Removed references to LengthRepeat, and added support for parsing new scroll snapping properties. Scroll snap
1362         margin and scroll padding, along with their shorthands, are parsed using the same helper functions as normal
1363         margin and padding. For type and align, I added new helper functions that build up lists of 1 or 2
1364         CSSPrimitiveValues for each of the properties.
1365
1366         Parsing scroll-snap-align is straightforward -- we either have one or two values in the set {none, start,
1367         center, end}. For scroll-snap-type, we allow a single axis value {x, y, inline, block, both}, or a single
1368         strictness value {none, proximity, mandatory}, or an axis value followed by a non-'none' strictness (i.e. either
1369         proximity or mandatory).
1370
1371         * css/parser/CSSParserFastPaths.cpp:
1372         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
1373         (WebCore::CSSParserFastPaths::isKeywordPropertyID):
1374         * css/parser/CSSParserValues.cpp:
1375         (WebCore::CSSParserValue::createCSSValue):
1376
1377         Removed references to LengthRepeat.
1378
1379         * css/parser/CSSPropertyParser.cpp:
1380         (WebCore::CSSPropertyParser::parseSingleValue):
1381         (WebCore::CSSPropertyParser::parseShorthand):
1382         (WebCore::consumeSnapPointCoordinateList): Deleted.
1383         (WebCore::consumeScrollSnapCoordinate): Deleted.
1384         (WebCore::consumeScrollSnapDestination): Deleted.
1385         (WebCore::consumeScrollSnapPoints): Deleted.
1386         (WebCore::consumeScrollSnapAlign):
1387         (WebCore::consumeScrollSnapType):
1388         (WebCore::CSSPropertyParser::parseSingleValue):
1389
1390         Added parsing for the longhand properties of scroll-snap-margin and scroll-padding, which use the existing
1391         consumeLength and consumeLengthOrPercent helpers, respectively. Removed code for parsing scroll snap
1392         coordinates, destinations and points. Added parsing logic for align and type.
1393
1394         * page/scrolling/AxisScrollSnapOffsets.cpp:
1395         (WebCore::computeScrollSnapPortOrAreaRect):
1396         (WebCore::computeScrollSnapAlignOffset):
1397         (WebCore::snapOffsetsToString):
1398         (WebCore::snapPortOrAreaToString):
1399         (WebCore::updateSnapOffsetsForScrollableArea):
1400         (WebCore::appendChildSnapOffsets): Deleted.
1401         (WebCore::destinationOffsetForViewSize): Deleted.
1402         (WebCore::updateFromStyle): Deleted.
1403         (WebCore::styleUsesElements): Deleted.
1404
1405         Overhauled updateSnapOffsetsForScrollableArea to work with the new scroll snapping model. In the new way of
1406         computing scroll snap offsets, we:
1407
1408         Compute the scroll container's scroll snap port, which is the padding box inset by the scroll padding
1409         For each child with snap positions (i.e. scroll-snap-align is not none on both axes)
1410           Compute the child's scroll snap area, which is the bounding box of the transformed border box
1411             If the container snaps along the horizontal axis and the snap area contributes a horizontal snap offset:
1412               Emit the distance from the alignment offset in the horizontal of the snap port to the corresponding offset
1413               in the snap area as a snap position.
1414             If the container snaps along the vertical axis and the snap area contributes a vertical snap offset:
1415               Emit the distance from the alignment offset in the vertical of the snap port to the corresponding offset
1416               in the snap area as a snap position.
1417         For the snap offsets in each axis, if there is at least one snap offset:
1418           Clamp the offsets to the min and max scroll offsets
1419           Ensure that the offsets are sorted and do not contain duplicated offsets
1420
1421         * platform/cocoa/ScrollController.mm:
1422         (WebCore::ScrollController::updateScrollSnapState):
1423
1424         Clear out the ScrollController's snap offsets and state along an axis when its ScrollableArea no longer has snap
1425         offsets in that axis.
1426
1427         * rendering/RenderBox.cpp:
1428         (WebCore::RenderBox::styleWillChange):
1429         (WebCore::RenderBox::willBeRemovedFromTree):
1430         * rendering/RenderLayerModelObject.cpp:
1431         (WebCore::scrollSnapContainerRequiresUpdateForStyleUpdate):
1432         (WebCore::RenderLayerModelObject::styleDidChange):
1433         * rendering/RenderView.cpp:
1434         (WebCore::RenderView::registerBoxWithScrollSnapPositions):
1435         (WebCore::RenderView::unregisterBoxWithScrollSnapPositions):
1436         (WebCore::RenderView::registerBoxWithScrollSnapCoordinates): Deleted.
1437         (WebCore::RenderView::unregisterBoxWithScrollSnapCoordinates): Deleted.
1438         * rendering/RenderView.h:
1439
1440         Tweaked the scroll snap child registration logic. registerBoxWithScrollSnapCoordinates is renamed to
1441         unregisterBoxWithScrollSnapPositions, since the notion of scroll snap coordinates no longer exists, and instead
1442         of checking if the list of scroll snap coordinates is empty for the absence of scroll positions, we instead
1443         check for a computed scroll snap align that is not none on both axes.
1444
1445         * rendering/style/RenderStyle.cpp:
1446         (WebCore::RenderStyle::initialScrollSnapType):
1447         (WebCore::RenderStyle::initialScrollSnapAlign):
1448         (WebCore::RenderStyle::scrollSnapArea):
1449         (WebCore::RenderStyle::scrollSnapPort):
1450         (WebCore::RenderStyle::scrollSnapType):
1451         (WebCore::RenderStyle::scrollPadding):
1452         (WebCore::RenderStyle::scrollPaddingTop):
1453         (WebCore::RenderStyle::scrollPaddingBottom):
1454         (WebCore::RenderStyle::scrollPaddingLeft):
1455         (WebCore::RenderStyle::scrollPaddingRight):
1456         (WebCore::RenderStyle::scrollSnapAlign):
1457         (WebCore::RenderStyle::scrollSnapMargin):
1458         (WebCore::RenderStyle::scrollSnapMarginTop):
1459         (WebCore::RenderStyle::scrollSnapMarginBottom):
1460         (WebCore::RenderStyle::scrollSnapMarginLeft):
1461         (WebCore::RenderStyle::scrollSnapMarginRight):
1462         (WebCore::RenderStyle::setScrollSnapType):
1463         (WebCore::RenderStyle::setScrollPaddingTop):
1464         (WebCore::RenderStyle::setScrollPaddingBottom):
1465         (WebCore::RenderStyle::setScrollPaddingLeft):
1466         (WebCore::RenderStyle::setScrollPaddingRight):
1467         (WebCore::RenderStyle::setScrollSnapAlign):
1468         (WebCore::RenderStyle::setScrollSnapMarginTop):
1469         (WebCore::RenderStyle::setScrollSnapMarginBottom):
1470         (WebCore::RenderStyle::setScrollSnapMarginLeft):
1471         (WebCore::RenderStyle::setScrollSnapMarginRight):
1472         (WebCore::RenderStyle::initialScrollSnapDestination): Deleted.
1473         (WebCore::RenderStyle::initialScrollSnapCoordinates): Deleted.
1474         (WebCore::RenderStyle::scrollSnapPointsX): Deleted.
1475         (WebCore::RenderStyle::scrollSnapPointsY): Deleted.
1476         (WebCore::RenderStyle::scrollSnapDestination): Deleted.
1477         (WebCore::RenderStyle::scrollSnapCoordinates): Deleted.
1478         (WebCore::RenderStyle::setScrollSnapPointsX): Deleted.
1479         (WebCore::RenderStyle::setScrollSnapPointsY): Deleted.
1480         (WebCore::RenderStyle::setScrollSnapDestination): Deleted.
1481         (WebCore::RenderStyle::setScrollSnapCoordinates): Deleted.
1482         * rendering/style/RenderStyle.h:
1483         (WebCore::RenderStyle::initialScrollSnapMargin):
1484         (WebCore::RenderStyle::initialScrollPadding):
1485         (WebCore::RenderStyle::scrollSnapType): Deleted.
1486         (WebCore::RenderStyle::setScrollSnapType): Deleted.
1487         (WebCore::RenderStyle::initialScrollSnapType): Deleted.
1488         (WebCore::RenderStyle::initialScrollSnapPointsX): Deleted.
1489         (WebCore::RenderStyle::initialScrollSnapPointsY): Deleted.
1490
1491         Added boilerplate code for returning various new scroll snap style properties, and removed similar code for
1492         handling the old scroll snap properties.
1493
1494         * rendering/style/RenderStyleConstants.h:
1495
1496         Added three new enum classes:
1497         - ScrollSnapStrictness represents the strictness of scroll snapping along one or both axes
1498         - ScrollSnapAxis designates the axes along which scroll snapping should occur
1499         - ScrollSnapAxisAlignType indicates which offsets along the x or y axes of the snap port and snap area should be
1500           used to compute the snap position emitted by a snap area.
1501
1502         * rendering/style/StyleRareNonInheritedData.cpp:
1503         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
1504         (WebCore::StyleRareNonInheritedData::operator==):
1505         * rendering/style/StyleRareNonInheritedData.h:
1506
1507         Replaces the StyleScrollSnapPoints object (which, confusingly, was in charge of storing both the scroll
1508         container's and child elements' scroll snap styles) with StyleScrollSnapPort and StyleScrollSnapArea objects,
1509         which keep track of the style properties on the scroll container and the child element, respectively.
1510
1511         * rendering/style/StyleScrollSnapPoints.h:
1512         (WebCore::operator==):
1513         (WebCore::StyleScrollSnapPort::copy):
1514         (WebCore::StyleScrollSnapPort::StyleScrollSnapPort):
1515         (WebCore::StyleScrollSnapArea::copy):
1516         (WebCore::StyleScrollSnapArea::StyleScrollSnapArea):
1517         * rendering/style/StyleScrollSnapping.h: Added.
1518         (WebCore::operator!=):
1519         (WebCore::StyleScrollSnapPort::create):
1520         (WebCore::StyleScrollSnapArea::create):
1521         (WebCore::StyleScrollSnapArea::hasSnapPosition):
1522
1523         Overhauled StyleScrollSnapPoints, breaking the logic here into two classes: StyleScrollSnapPort for the scroll
1524         container, handling the properties `scroll-snap-type` and `scroll-padding` and StyleScrollSnapArea for child
1525         elements, handling the properties `scroll-snap-align` and `scroll-snap-margin`. The ScrollSnapType itself is
1526         composed of an axis value and a strictness, while a ScrollSnapAlign keeps track of the alignment modes in each
1527         axis. By default, these are initialized to {Both, None} and {None, None}, respectively. The rest of the logic is
1528         boilerplate code for comparing these style objects to one another and copying style representations.
1529
1530         * testing/Internals.cpp:
1531         (WebCore::Internals::scrollSnapOffsets):
1532
1533         Perform a layout on the document if needed before returning the list of computed snap offsets. The absence of
1534         this layout pass was causing some layout tests in css3/scroll-snap/ to flake when testing that programmatic
1535         changes to the scroll snap style properties change the computed snap offsets.
1536
1537 2016-12-19  Dean Jackson  <dino@apple.com>
1538
1539         Use ENABLE() in place of ENABLE_CSS_SELECTORS_LEVEL4
1540         https://bugs.webkit.org/show_bug.cgi?id=166043
1541         <rdar://problems/29743655>
1542
1543         Reviewed by Alex Christensen.
1544
1545         This doesn't compile unless the ENABLE_CSS_SELECTORS_LEVEL4 is defined.
1546
1547         * css/SelectorChecker.cpp:
1548         (WebCore::SelectorChecker::matchRecursively):
1549         * css/SelectorFilter.cpp:
1550         (WebCore::SelectorFilter::collectIdentifierHashes):
1551         * css/parser/CSSSelectorParser.cpp:
1552         (WebCore::isOnlyPseudoClassFunction):
1553         (WebCore::CSSSelectorParser::consumePseudo):
1554         (WebCore::CSSSelectorParser::consumeCombinator):
1555         * cssjit/SelectorCompiler.cpp:
1556         (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
1557
1558 2016-12-20  Yusuke Suzuki  <utatane.tea@gmail.com>
1559
1560         Unreviewed, attempt to fix Windows Debug build part 2
1561         https://bugs.webkit.org/show_bug.cgi?id=166035
1562
1563         Ensured that this patch passes the build on the GTK port.
1564
1565         * rendering/RenderElement.cpp:
1566         * rendering/RenderElement.h:
1567
1568 2016-12-20  Yusuke Suzuki  <utatane.tea@gmail.com>
1569
1570         Unreviewed, fix Windows Debug build
1571         https://bugs.webkit.org/show_bug.cgi?id=166035
1572
1573         The size of SameSizeAsRenderElement should be in sync with sizeof(RenderElement).
1574
1575         * rendering/RenderElement.cpp:
1576
1577 2016-12-20  Nael Ouedraogo  <nael.ouedraogo@crf.canon.fr>
1578
1579         WebRTC: RTCPeerConnection constructor argument should be optional
1580         https://bugs.webkit.org/show_bug.cgi?id=164057
1581
1582         Reviewed by Youenn Fablet.
1583
1584         Modify RTCPeerConnection JSBuiltin constructor to allow RTCPeerConfiguration
1585         argument to be optional.
1586
1587         Update existing tests.
1588
1589         * Modules/mediastream/RTCPeerConnection.js:
1590         (initializeRTCPeerConnection):
1591
1592 2016-12-19  Yusuke Suzuki  <utatane.tea@gmail.com>
1593
1594         [ES6] Enable ES6 Modules
1595         https://bugs.webkit.org/show_bug.cgi?id=165849
1596
1597         Reviewed by Geoffrey Garen.
1598
1599         * dom/ScriptElement.cpp:
1600         (WebCore::ScriptElement::determineScriptType):
1601         * html/parser/HTMLPreloadScanner.cpp:
1602         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
1603         * page/Settings.in:
1604
1605 2016-12-17  Sam Weinig  <sam@webkit.org>
1606
1607         Remove a few trivial custom bindings
1608         https://bugs.webkit.org/show_bug.cgi?id=165999
1609
1610         Reviewed by Simon Fraser.
1611
1612         * CMakeLists.txt:
1613         * bindings/js/JSBindingsAllInOne.cpp:
1614         Remove files.
1615
1616         * WebCore.xcodeproj/project.pbxproj:
1617         Move custom bindings that only exist for GC or wrapping reasons
1618         to their own group, so we can focus on the ones with custom functions.
1619
1620         * bindings/js/JSDataTransferCustom.cpp: Removed.
1621         * bindings/js/JSTrackEventCustom.cpp: Removed.
1622
1623         * dom/DataTransfer.cpp:
1624         (WebCore::DataTransfer::types):
1625         Remove incorrect comment and use a more concise empty initialization syntax.
1626
1627         * dom/DataTransfer.idl:
1628         Update IDL to remove [Custom] annotation and match spec better.
1629
1630         * html/track/TrackEvent.cpp:
1631         (WebCore::convertToTrackEventTrack):
1632         (WebCore::TrackEvent::TrackEvent):
1633         * html/track/TrackEvent.h:
1634         Switch to store the Track in a Variant to make the binding easier.
1635
1636         * html/track/TrackEvent.idl:
1637         Remove [CustomGetter] annotation.
1638
1639 2016-12-19  Zalan Bujtas  <zalan@apple.com>
1640
1641         Do not position detached list item marker.
1642         https://bugs.webkit.org/show_bug.cgi?id=166035
1643         <rdar://problem/29175235>
1644
1645         Reviewed by Simon Fraser.
1646
1647         In certain (non-reproducible) cases, the list item marker can get detached from the tree
1648         during layout and when in RenderListItem::positionListMarker() we dereference the marker's parent, we crash.
1649         In addition to the null check, this patch adds an ASSERTION to catch such cases early on.
1650
1651         Unable to reproduce.
1652
1653         * rendering/RenderBoxModelObject.cpp:
1654         (WebCore::RenderBoxModelObject::moveChildTo):
1655         * rendering/RenderElement.cpp:
1656         (WebCore::RenderElement::removeChildInternal):
1657         * rendering/RenderElement.h:
1658         * rendering/RenderListItem.cpp:
1659         (WebCore::RenderListItem::layout):
1660         (WebCore::RenderListItem::positionListMarker):
1661         * rendering/RenderListItem.h:
1662         * rendering/RenderListMarker.h:
1663
1664 2016-12-19  Gavin Barraclough  <barraclough@apple.com>
1665
1666         [CSS Parser] Enable CSS Deferred Parsing
1667         https://bugs.webkit.org/show_bug.cgi?id=165869
1668
1669         Unreviewed rollout – looks like this regressed performance.
1670
1671         * css/parser/CSSParserMode.h:
1672         * page/Settings.in:
1673
1674 2016-12-18  Brent Fulgham  <bfulgham@apple.com>
1675
1676         Side effects while restting form elements
1677         https://bugs.webkit.org/show_bug.cgi?id=165959
1678         <rdar://problem/29705967>
1679
1680         Reviewed by Anders Carlsson.
1681
1682         JavaScript logic can run while resetting FormElement objects. This can
1683         lead to unintended side-effets and other unwanted behavior. We should
1684         protect these elements during the reset.
1685
1686         Test: fast/html/form-mutate.html
1687
1688         * html/HTMLFormElement.cpp:
1689         (WebCore::HTMLFormElement::HTMLFormElement): Switch to C++11 initialization.
1690         (WebCore::HTMLFormElement::reset): Protect elements until the reset
1691         operation is finished.
1692         (WebCore::HTMLFormElement::resetAssociatedFormControlElements): Added to share
1693         code with 'resumeFromDocument'.
1694         (WebCore::HTMLFormElement::resumeFromDocument): Protect elements until the
1695         reset operation is finished.
1696
1697 2016-12-19  Commit Queue  <commit-queue@webkit.org>
1698
1699         Unreviewed, rolling out r209983.
1700         https://bugs.webkit.org/show_bug.cgi?id=166024
1701
1702         There's intent to support persistent-usage-record (Requested
1703         by zdobersek on #webkit).
1704
1705         Reverted changeset:
1706
1707         "[EME] Remove MediaKeySessionType::persistent-usage-record"
1708         https://bugs.webkit.org/show_bug.cgi?id=166012
1709         http://trac.webkit.org/changeset/209983
1710
1711 2016-12-19  Sam Weinig  <sam@webkit.org>
1712
1713         Move custom files / callback objects into their respective groups.
1714
1715         Rubber-stamped by Simon Fraser.
1716
1717         * WebCore.xcodeproj/project.pbxproj:
1718
1719 2016-12-19  Sam Weinig  <sam@webkit.org>
1720
1721         [WebIDL] Remove custom binding for the named Image constructor
1722         https://bugs.webkit.org/show_bug.cgi?id=166023
1723
1724         Reviewed by Alex Christensen.
1725
1726         * bindings/js/JSBindingsAllInOne.cpp:
1727         * CMakeLists.txt:
1728         * WebCore.xcodeproj/project.pbxproj:
1729         Remove JSImageConstructor.
1730
1731         * bindings/js/JSImageConstructor.cpp: Removed.
1732         * bindings/js/JSImageConstructor.h: Removed.
1733         
1734         * bindings/js/JSDOMWindowCustom.cpp:
1735         (WebCore::JSDOMWindow::image): Deleted.
1736         * page/DOMWindow.idl:
1737         Remove custom getter for the constructor.
1738
1739         * html/HTMLImageElement.idl:
1740         Add NamedConstructor annotation.
1741
1742 2016-12-19  Antti Koivisto  <antti@apple.com>
1743
1744         Remove RenderObject::requiresForcedStyleRecalcPropagation
1745         https://bugs.webkit.org/show_bug.cgi?id=166021
1746
1747         Reviewed by Andreas Kling.
1748
1749         It is not called. It also makes no sense architecturally.
1750
1751         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
1752         * html/shadow/mac/ImageControlsRootElementMac.cpp:
1753         * rendering/RenderButton.h:
1754         * rendering/RenderFileUploadControl.h:
1755         * rendering/RenderListItem.h:
1756         * rendering/RenderMedia.h:
1757         * rendering/RenderMenuList.h:
1758         * rendering/RenderMeter.h:
1759         * rendering/RenderObject.h:
1760         (WebCore::RenderObject::requiresForcedStyleRecalcPropagation): Deleted.
1761         * rendering/RenderProgress.h:
1762         * rendering/RenderSlider.h:
1763         * rendering/RenderTextControl.h:
1764         * style/RenderTreeUpdater.cpp:
1765         (WebCore::RenderTreeUpdater::updateElementRenderer):
1766
1767             This is the only call site. Combination
1768
1769                 update.change == Style::NoChange && parent().styleChange == Style::Force
1770
1771             is impossible ('Force' inherits) so requiresForcedStyleRecalcPropagation doesn't ever even get called.
1772
1773 2016-12-19  Zan Dobersek  <zdobersek@igalia.com>
1774
1775         [EME] Remove MediaKeySessionType::persistent-usage-record
1776         https://bugs.webkit.org/show_bug.cgi?id=166012
1777
1778         Reviewed by Xabier Rodriguez-Calvar.
1779
1780         Remove the "persistent-usage-record" value from the MediaKeySessionType.
1781         This was removed from the spec as an at-risk feature.
1782         https://github.com/w3c/encrypted-media/issues/353
1783
1784         No non-imported tests need to be updated. This is still present in the
1785         tests imported from the W3C's web-platform-tests repository, but the
1786         tests haven't yet been updated upstream.
1787
1788         * Modules/encryptedmedia/CDM.cpp:
1789         (WebCore::CDM::isPersistentType):
1790         * Modules/encryptedmedia/MediaKeySessionType.h:
1791         * Modules/encryptedmedia/MediaKeySessionType.idl:
1792
1793 2016-12-19  Miguel Gomez  <magomez@igalia.com>
1794
1795         [GTK] GLXBadFBConfig error when creating an OpenGL context
1796         https://bugs.webkit.org/show_bug.cgi?id=165200
1797
1798         Reviewed by Carlos Garcia Campos.
1799
1800         glXCreateContextAttribsARB causes a GLXBadFBConfig X error when it's not able to provide the
1801         OpenGL version >= 3.2 we are requesting. Due to this, the app crashes instead of falling back to
1802         the legacy path.
1803         The patch modifies GLX context creation using a XErrorTrapper, so the first time a context is created
1804         we don't crash if OpenGL >= 3.2 is not available.
1805         If the gotten context is not valid, we fall back to whatever version glXCreateContextAttribsARB is
1806         able to provide.
1807         The legacy glXCreateContext is only used if the GLX_ARB_create_context extension is not available.
1808
1809         Covered by existent tests.
1810
1811         * platform/graphics/glx/GLContextGLX.cpp:
1812         (WebCore::tryCreateGLXARBContext):
1813         (WebCore::GLContextGLX::createWindowContext):
1814         (WebCore::GLContextGLX::createPbufferContext):
1815
1816 2016-12-18  Brady Eidson  <beidson@apple.com>
1817
1818         IndexedDB 2.0: Prefetch cursor records in the server.
1819         https://bugs.webkit.org/show_bug.cgi?id=166014
1820
1821         Reviewed by Andy Estes.
1822
1823         No new tests (Covered by existing LayoutTests and PerformanceTests).
1824
1825         This patch implements the followng:
1826         1 - After a backing store cursor completes a fetch in the server, it will schedule the next fetch 
1827             even before the client requests one. It will do this up to a limited number of prefetches.
1828         2 - Once a client request to advance the cursor comes in, we'll work our way through prefetched
1829             records instead of reading anything from disk, which might then cause us to continue prefetch.
1830         3 - If any changes to the object store occur, it will throw away all previously fetched records
1831             (There's room for future improvement here)
1832
1833         * Modules/indexeddb/server/IDBBackingStore.h:
1834         
1835         * Modules/indexeddb/server/IDBServer.cpp:
1836         (WebCore::IDBServer::IDBServer::postDatabaseTask):
1837         
1838         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
1839         
1840         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
1841         (WebCore::IDBServer::SQLiteIDBBackingStore::deleteRange):
1842         (WebCore::IDBServer::SQLiteIDBBackingStore::prefetchCursor):
1843         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
1844         
1845         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
1846         (WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged):
1847         (WebCore::IDBServer::SQLiteIDBCursor::prefetch):
1848         (WebCore::IDBServer::SQLiteIDBCursor::advance):
1849         * Modules/indexeddb/server/SQLiteIDBCursor.h:
1850         
1851         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
1852         (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
1853         (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
1854         (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTask):
1855         * Modules/indexeddb/server/UniqueIDBDatabase.h:
1856
1857 2016-12-18  Wenson Hsieh  <wenson_hsieh@apple.com>
1858
1859         Changing text direction fires input events with null inputTypes and no data
1860         https://bugs.webkit.org/show_bug.cgi?id=166007
1861         <rdar://problem/29557205>
1862
1863         Reviewed by Sam Weinig.
1864
1865         Adds support for the "formatSetInlineTextDirection" input type, triggered when using the context menu on Mac in
1866         an editable area (for both plain and rich text cases) to change paragraph direction. To do this, we add cases
1867         for EditActionSetWritingDirection in inputTypeNameForEditingAction and inputEventDataForEditingStyleAndAction.
1868
1869         When changing text direction for a plaintext editable element, we have logic in Editor::setBaseWritingDirection
1870         that sets the focused element's dir attribute to the requested value (ltr or rtl). We add similar hooks here to
1871         dispatch input events and handle preventing default.
1872
1873         Test: fast/events/before-input-events-prevent-text-direction.html
1874
1875         * editing/EditCommand.cpp:
1876         (WebCore::inputTypeNameForEditingAction):
1877
1878         Handle the EditActionSetWritingDirection case.
1879
1880         * editing/Editor.cpp:
1881         (WebCore::inputEventDataForEditingStyleAndAction):
1882         (WebCore::Editor::applyParagraphStyle):
1883
1884         Include input event data when dispatching an input event here.
1885
1886         (WebCore::Editor::setBaseWritingDirection):
1887         * testing/Internals.cpp:
1888         (WebCore::Internals::setBaseWritingDirection):
1889         * testing/Internals.h:
1890         * testing/Internals.idl:
1891
1892         Introduce an internal testing support hook for setting base writing direction (the same codepath taken when
1893         using the context menu to change paragraph direction). Currently, using testRunner.execCommand creates and
1894         applies style with an additional `unicode-bidi` attribute, and appears to also be intentionally disabled for
1895         plaintext editable elements.
1896
1897 2016-12-17  Simon Fraser  <simon.fraser@apple.com>
1898
1899         Build fix: linking WebCore was failing: you can't export inline functions.
1900
1901         * css/DeprecatedCSSOMPrimitiveValue.cpp:
1902         (WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType):
1903         (WebCore::DeprecatedCSSOMPrimitiveValue::setFloatValue):
1904         (WebCore::DeprecatedCSSOMPrimitiveValue::getFloatValue):
1905         (WebCore::DeprecatedCSSOMPrimitiveValue::setStringValue):
1906         (WebCore::DeprecatedCSSOMPrimitiveValue::getStringValue):
1907         * css/DeprecatedCSSOMPrimitiveValue.h:
1908         (WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType): Deleted.
1909         (WebCore::DeprecatedCSSOMPrimitiveValue::setFloatValue): Deleted.
1910         (WebCore::DeprecatedCSSOMPrimitiveValue::getFloatValue): Deleted.
1911         (WebCore::DeprecatedCSSOMPrimitiveValue::setStringValue): Deleted.
1912         (WebCore::DeprecatedCSSOMPrimitiveValue::getStringValue): Deleted.
1913
1914 2016-12-16  Dave Hyatt  <hyatt@apple.com>
1915
1916         [CSS Values] Make separate wrapper classes for the deprecated CSS Values OM
1917         https://bugs.webkit.org/show_bug.cgi?id=165968
1918
1919         Reviewed by Andreas Kling.
1920
1921         This patch changes the CSS OM for values to use distinct wrapper
1922         classes instead of cloning the existing classes. By actually wrapping
1923         values instead of cloning, we are freed up to change our CSS value hierarchy
1924         however we'd like (such as changing to match the new CSS Values OM that
1925         is coming soon).
1926
1927         All of the CSS Values wrapper classes are prefixed with "DeprecatedCSSOM"
1928         to reflect our desire (ultimately) to remove this API from our tree. We're
1929         the only ones that support it, and it's not used on the Web, but it is part
1930         of the WebKitLegacy API and might be used internally.
1931
1932         * CMakeLists.txt:
1933         * DerivedSources.cpp:
1934         * DerivedSources.make:
1935         * WebCore.xcodeproj/project.pbxproj:
1936         * bindings/js/DOMWrapperWorld.h:
1937         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1938         (WebCore::JSCSSStyleDeclaration::getPropertyCSSValue):
1939         * bindings/js/JSCSSValueCustom.cpp:
1940         (WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots):
1941         (WebCore::JSDeprecatedCSSOMValueOwner::finalize):
1942         (WebCore::toJSNewlyCreated):
1943         (WebCore::toJS):
1944         (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots): Deleted.
1945         (WebCore::JSCSSValueOwner::finalize): Deleted.
1946         * css/CSSComputedStyleDeclaration.cpp:
1947         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1948         * css/CSSComputedStyleDeclaration.h:
1949         * css/CSSGridLineNamesValue.cpp:
1950         (WebCore::CSSGridLineNamesValue::cloneForCSSOM): Deleted.
1951         * css/CSSGridLineNamesValue.h:
1952         * css/CSSImageSetValue.cpp:
1953         (WebCore::CSSImageSetValue::cloneForCSSOM): Deleted.
1954         * css/CSSImageSetValue.h:
1955         * css/CSSImageValue.cpp:
1956         (WebCore::CSSImageValue::createDeprecatedCSSOMWrapper):
1957         (WebCore::CSSImageValue::cloneForCSSOM): Deleted.
1958         * css/CSSImageValue.h:
1959         * css/CSSPrimitiveValue.cpp:
1960         (WebCore::CSSPrimitiveValue::createDeprecatedCSSOMPrimitiveWrapper):
1961         (WebCore::CSSPrimitiveValue::cloneForCSSOM): Deleted.
1962         * css/CSSPrimitiveValue.h:
1963         * css/CSSPrimitiveValue.idl: Removed.
1964         * css/CSSStyleDeclaration.h:
1965         * css/CSSStyleDeclaration.idl:
1966         * css/CSSValue.cpp:
1967         (WebCore::CSSValue::traverseSubresources):
1968         (WebCore::CSSValue::equals):
1969         (WebCore::CSSValue::cssText):
1970         (WebCore::CSSValue::destroy):
1971         (WebCore::CSSValue::createDeprecatedCSSOMWrapper):
1972         (): Deleted.
1973         (WebCore::CSSValue::cloneForCSSOM): Deleted.
1974         * css/CSSValue.h:
1975         (WebCore::CSSValue::CSSValue):
1976         (WebCore::CSSValue::setCssText): Deleted.
1977         (WebCore::CSSValue::isCSSOMSafe): Deleted.
1978         (WebCore::CSSValue::isSubtypeExposedToCSSOM): Deleted.
1979         * css/CSSValue.idl: Removed.
1980         * css/CSSValueList.cpp:
1981         (WebCore::CSSValueList::cloneForCSSOM): Deleted.
1982         * css/CSSValueList.h:
1983         (WebCore::CSSValueList::separator):
1984         * css/CSSValueList.idl: Removed.
1985         * css/Counter.h:
1986         * css/Counter.idl: Removed.
1987         * css/DeprecatedCSSOMCounter.h: Added.
1988         * css/DeprecatedCSSOMCounter.idl: Copied from Source/WebCore/css/Counter.idl.
1989         * css/DeprecatedCSSOMPrimitiveValue.cpp: Added.
1990         (WebCore::DeprecatedCSSOMPrimitiveValue::getCounterValue):
1991         (WebCore::DeprecatedCSSOMPrimitiveValue::getRectValue):
1992         (WebCore::DeprecatedCSSOMPrimitiveValue::getRGBColorValue):
1993         * css/DeprecatedCSSOMPrimitiveValue.h: Added.
1994         (WebCore::DeprecatedCSSOMPrimitiveValue::create):
1995         (WebCore::DeprecatedCSSOMPrimitiveValue::equals):
1996         (WebCore::DeprecatedCSSOMPrimitiveValue::cssValueType):
1997         (WebCore::DeprecatedCSSOMPrimitiveValue::cssText):
1998         (WebCore::DeprecatedCSSOMPrimitiveValue::primitiveType):
1999         (WebCore::DeprecatedCSSOMPrimitiveValue::setFloatValue):
2000         (WebCore::DeprecatedCSSOMPrimitiveValue::getFloatValue):
2001         (WebCore::DeprecatedCSSOMPrimitiveValue::setStringValue):
2002         (WebCore::DeprecatedCSSOMPrimitiveValue::getStringValue):
2003         (WebCore::DeprecatedCSSOMPrimitiveValue::stringValue):
2004         (WebCore::DeprecatedCSSOMPrimitiveValue::DeprecatedCSSOMPrimitiveValue):
2005         * css/DeprecatedCSSOMPrimitiveValue.idl: Copied from Source/WebCore/css/CSSPrimitiveValue.idl.
2006         * css/DeprecatedCSSOMRGBColor.h: Added.
2007         * css/DeprecatedCSSOMRGBColor.idl: Copied from Source/WebCore/css/RGBColor.idl.
2008         * css/DeprecatedCSSOMRect.h: Added.
2009         * css/DeprecatedCSSOMRect.idl: Copied from Source/WebCore/css/Rect.idl.
2010         * css/DeprecatedCSSOMValue.cpp: Added.
2011         (WebCore::compareCSSOMValues):
2012         (WebCore::DeprecatedCSSOMValue::equals):
2013         (WebCore::DeprecatedCSSOMValue::destroy):
2014         (WebCore::DeprecatedCSSOMValue::cssValueType):
2015         (WebCore::DeprecatedCSSOMValue::cssText):
2016         * css/DeprecatedCSSOMValue.h: Added.
2017         (WebCore::DeprecatedCSSOMValue::deref):
2018         (WebCore::DeprecatedCSSOMValue::setCssText):
2019         (WebCore::DeprecatedCSSOMValue::operator==):
2020         (WebCore::DeprecatedCSSOMValue::isComplexValue):
2021         (WebCore::DeprecatedCSSOMValue::isPrimitiveValue):
2022         (WebCore::DeprecatedCSSOMValue::isValueList):
2023         (WebCore::DeprecatedCSSOMValue::classType):
2024         (WebCore::DeprecatedCSSOMValue::DeprecatedCSSOMValue):
2025         (WebCore::DeprecatedCSSOMValue::~DeprecatedCSSOMValue):
2026         (WebCore::DeprecatedCSSOMComplexValue::create):
2027         (WebCore::DeprecatedCSSOMComplexValue::equals):
2028         (WebCore::DeprecatedCSSOMComplexValue::cssText):
2029         (WebCore::DeprecatedCSSOMComplexValue::cssValueType):
2030         (WebCore::DeprecatedCSSOMComplexValue::DeprecatedCSSOMComplexValue):
2031         * css/DeprecatedCSSOMValue.idl: Copied from Source/WebCore/css/CSSValue.idl.
2032         * css/DeprecatedCSSOMValueList.cpp: Added.
2033         (WebCore::DeprecatedCSSOMValueList::equals):
2034         (WebCore::DeprecatedCSSOMValueList::cssText):
2035         * css/DeprecatedCSSOMValueList.h: Added.
2036         (WebCore::DeprecatedCSSOMValueList::create):
2037         (WebCore::DeprecatedCSSOMValueList::cssValueType):
2038         (WebCore::DeprecatedCSSOMValueList::length):
2039         (WebCore::DeprecatedCSSOMValueList::item):
2040         (WebCore::DeprecatedCSSOMValueList::DeprecatedCSSOMValueList):
2041         * css/DeprecatedCSSOMValueList.idl: Copied from Source/WebCore/css/CSSValueList.idl.
2042         * css/LengthRepeat.h:
2043         * css/PropertySetCSSStyleDeclaration.cpp:
2044         (WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValue):
2045         (WebCore::PropertySetCSSStyleDeclaration::wrapForDeprecatedCSSOM):
2046         (WebCore::StyleRuleCSSStyleDeclaration::didMutate):
2047         (WebCore::InlineCSSStyleDeclaration::didMutate):
2048         (WebCore::PropertySetCSSStyleDeclaration::cloneAndCacheForCSSOM): Deleted.
2049         * css/PropertySetCSSStyleDeclaration.h:
2050         * css/RGBColor.cpp:
2051         (WebCore::RGBColor::red): Deleted.
2052         (WebCore::RGBColor::green): Deleted.
2053         (WebCore::RGBColor::blue): Deleted.
2054         (WebCore::RGBColor::alpha): Deleted.
2055         * css/RGBColor.h:
2056         * css/RGBColor.idl: Removed.
2057         * css/Rect.h:
2058         (WebCore::RectBase::RectBase):
2059         * css/Rect.idl: Removed.
2060         * svg/SVGElement.cpp:
2061         (WebCore::SVGElement::getPresentationAttribute):
2062         * svg/SVGElement.h:
2063         * svg/SVGElement.idl:
2064
2065 2016-12-17  Philippe Normand  <pnormand@igalia.com>
2066
2067         Unreviewed, rollout r209860 OWR player shouldn't be selected for normal video playback
2068
2069         * platform/GStreamer.cmake:
2070         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.cpp:
2071         (WebCore::MediaPlayerPrivateGStreamerOwr::~MediaPlayerPrivateGStreamerOwr):
2072         (WebCore::MediaPlayerPrivateGStreamerOwr::play):
2073         (WebCore::MediaPlayerPrivateGStreamerOwr::pause):
2074         (WebCore::MediaPlayerPrivateGStreamerOwr::load):
2075         (WebCore::MediaPlayerPrivateGStreamerOwr::stop):
2076         (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnded):
2077         (WebCore::MediaPlayerPrivateGStreamerOwr::trackEnabledChanged):
2078         (WebCore::MediaPlayerPrivateGStreamerOwr::setSize):
2079         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerOwr.h:
2080         * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp:
2081         (WebCore::MediaEndpointOwr::createMutedRemoteSource):
2082         * platform/mediastream/openwebrtc/RealtimeAudioSourceOwr.h: Removed.
2083         * platform/mediastream/openwebrtc/RealtimeMediaSourceCenterOwr.cpp:
2084         (WebCore::RealtimeMediaSourceCenterOwr::mediaSourcesAvailable):
2085         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.cpp: Removed.
2086         * platform/mediastream/openwebrtc/RealtimeMediaSourceOwr.h:
2087         * platform/mediastream/openwebrtc/RealtimeVideoSourceOwr.h: Removed.
2088
2089 2016-12-17  Michael Catanzaro  <mcatanzaro@igalia.com>
2090
2091         warning: the compiler can assume that the address of 'thisObject' will always evaluate to 'true' [-Waddress] in WebCore::JSHTMLDocument::getOwnPropertySlot
2092         https://bugs.webkit.org/show_bug.cgi?id=165987
2093
2094         Reviewed by Mark Lam.
2095
2096         Work around the warning by passing the JSObject pointer this function receives directly to
2097         ASSERT_GC_OBJECT_INHERITS, instead of casting it to a reference and then taking the address
2098         of that, to avoid the -Waddress warning.
2099
2100         * bindings/js/JSHTMLDocumentCustom.cpp:
2101         (WebCore::JSHTMLDocument::getOwnPropertySlot):
2102
2103 2016-12-17  Jer Noble  <jer.noble@apple.com>
2104
2105         Add implementation for navigator.requestMediaKeySystemAccess()
2106         https://bugs.webkit.org/show_bug.cgi?id=165850
2107
2108         Reviewed by Eric Carlson.
2109
2110         Test: media/encrypted-media/mock-navigator-requestMediaKeySystemAccess.html
2111
2112         Add an implementation of NavigatorEME::requestMediaKeySystemAccess() as well as the CDM
2113         object on which it depends.
2114
2115         * Modules/encryptedmedia/CDM.cpp: Added.
2116         (WebCore::cdmFactories):
2117         (WebCore::createCDMPrivateForKeySystem):
2118         (WebCore::CDM::registerCDMFactory):
2119         (WebCore::CDM::unregisterCDMFactory):
2120         (WebCore::CDM::supportsKeySystem):
2121         (WebCore::CDM::create):
2122         (WebCore::CDM::CDM):
2123         (WebCore::CDM::getSupportedConfiguration):
2124         (WebCore::CDM::doSupportedConfigurationStep):
2125         (WebCore::CDM::isPersistentType):
2126         (WebCore::CDM::getSupportedCapabilitiesForAudioVideoType):
2127         (WebCore::CDM::getConsentStatus):
2128         * Modules/encryptedmedia/CDM.h: Added.
2129         (WebCore::CDMFactory::~CDMFactory):
2130         (WebCore::CDM::keySystem):
2131         (WebCore::CDM::createWeakPtr):
2132         * Modules/encryptedmedia/CDMPrivate.h: Added.
2133         (WebCore::CDMPrivate::~CDMPrivate):
2134         * Modules/encryptedmedia/NavigatorEME.cpp:
2135         (WebCore::NavigatorEME::requestMediaKeySystemAccess):
2136         (WebCore::tryNextSupportedConfiguration):
2137         * Modules/encryptedmedia/NavigatorEME.h:
2138         * Modules/encryptedmedia/NavigatorEME.idl:
2139
2140         To aid in testing, a new Internals object is added, MockCDMFactory, which can be
2141         controlled by LayoutTests to change the behavior of the Mock objects it creates.
2142
2143         * testing/Internals.cpp:
2144         (WebCore::Internals::registerMockCDM):
2145         * testing/Internals.h:
2146         * testing/Internals.idl:
2147         * testing/MockCDMFactory.cpp: Added.
2148         (WebCore::MockCDMFactory::MockCDMFactory):
2149         (WebCore::MockCDMFactory::~MockCDMFactory):
2150         (WebCore::MockCDMFactory::unregister):
2151         (WebCore::MockCDMFactory::supportsKeySystem):
2152         (WebCore::MockCDMFactory::createCDM):
2153         (WebCore::MockCDM::MockCDM):
2154         (WebCore::MockCDM::supportsInitDataType):
2155         (WebCore::MockCDM::supportsConfiguration):
2156         (WebCore::MockCDM::supportsConfigurationWithRestrictions):
2157         (WebCore::MockCDM::supportsSessionTypeWithConfiguration):
2158         (WebCore::MockCDM::supportsRobustness):
2159         (WebCore::MockCDM::distinctiveIdentifiersRequirement):
2160         (WebCore::MockCDM::persistentStateRequirement):
2161         (WebCore::MockCDM::distinctiveIdentifiersAreUniquePerOriginAndClearable):
2162         * testing/MockCDMFactory.h: Added.
2163         (WebCore::MockCDMFactory::create):
2164         (WebCore::MockCDMFactory::supportedDataTypes):
2165         (WebCore::MockCDMFactory::setSupportedDataTypes):
2166         (WebCore::MockCDMFactory::supportedRobustness):
2167         (WebCore::MockCDMFactory::setSupportedRobustness):
2168         (WebCore::MockCDMFactory::distinctiveIdentifiersRequirement):
2169         (WebCore::MockCDMFactory::setDistinctiveIdentifiersRequirement):
2170         (WebCore::MockCDMFactory::persistentStateRequirement):
2171         (WebCore::MockCDMFactory::setPersistentStateRequirement):
2172         * testing/MockCDMFactory.idl: Added.
2173
2174         Move the MediaKeySessionType definition out of the MediaKeys.idl file and into its own.
2175         Move the MediaKeysRequiriment definition out of the MediaKeySystemConfiguration.idl file
2176         and into its own. Generally fix up the .idl files so that they properly work with their
2177         implementation files.
2178
2179         * Modules/encryptedmedia/MediaKeySessionType.idl: Added.
2180         * Modules/encryptedmedia/MediaKeySystemAccess.cpp:
2181         (WebCore::MediaKeySystemAccess::create):
2182         (WebCore::MediaKeySystemAccess::MediaKeySystemAccess):
2183         (WebCore::MediaKeySystemAccess::keySystem): Deleted.
2184         (WebCore::MediaKeySystemAccess::getConfiguration): Deleted.
2185         * Modules/encryptedmedia/MediaKeySystemAccess.h:
2186         (WebCore::MediaKeySystemAccess::keySystem):
2187         (WebCore::MediaKeySystemAccess::getConfiguration):
2188         (WebCore::MediaKeySystemAccess::create): Deleted.
2189         * Modules/encryptedmedia/MediaKeySystemAccess.idl:
2190         * Modules/encryptedmedia/MediaKeySystemConfiguration.h:
2191         * Modules/encryptedmedia/MediaKeySystemConfiguration.idl:
2192         * Modules/encryptedmedia/MediaKeySystemMediaCapability.idl:
2193         * Modules/encryptedmedia/MediaKeys.idl:
2194         * Modules/encryptedmedia/MediaKeysRequirement.idl: Added.
2195         * Modules/encryptedmedia/MediaKeysRestrictions.h: Added.
2196         * bindings/js/JSMediaKeySystemAccessCustom.cpp: Removed.
2197
2198         As some of these enums are referenced in the Internals project, they need to be exported
2199         from WebCore correctly. Teach the code generator how to export the symbols generated by
2200         enums.
2201
2202         * bindings/scripts/CodeGeneratorJS.pm:
2203         (GenerateEnumerationHeaderContent):
2204
2205         Add new files to the project.
2206
2207         * CMakeLists.txt:
2208         * DerivedSources.make:
2209         * WebCore.xcodeproj/project.pbxproj:
2210
2211 2016-12-17  Darin Adler  <darin@apple.com>
2212
2213         Remove WebCore::Dictionary, which is now unused
2214         https://bugs.webkit.org/show_bug.cgi?id=165988
2215
2216         Reviewed by Andreas Kling.
2217
2218         * CMakeLists.txt: Removed the files.
2219         * WebCore.xcodeproj/project.pbxproj: Ditto.
2220         * bindings/js/Dictionary.cpp: Removed.
2221         * bindings/js/Dictionary.h: Removed.
2222         * bindings/js/JSBindingsAllInOne.cpp: Removed include of Dictionary.cpp.
2223
2224 2016-12-17  Youenn Fablet  <youenn@apple.com>
2225
2226         Cloned CachedResource should not have an empty response
2227         https://bugs.webkit.org/show_bug.cgi?id=165947
2228
2229         Reviewed by Sam Weinig.
2230
2231         Test: http/tests/loading/reusing-cached-stylesheet-from-different-domain.html
2232
2233         * loader/cache/CachedResource.cpp:
2234         (WebCore::CachedResource::setBodyDataFrom): Copying the response to the cloned resource.
2235         Even though the issue is appearing for stylesheets only, it is safer to do that for all cloned ressources.
2236
2237 2016-12-16  Brady Eidson  <beidson@apple.com>
2238
2239         IndexedDB: Refactor SQLiteIDBCursor to prepare for cursor prefetching.
2240         https://bugs.webkit.org/show_bug.cgi?id=165978
2241
2242         Reviewed by Alex Christensen.
2243
2244         No new tests (Refactor, no behavior change).
2245         
2246         In preparation for cursor prefetching, we need to shift the cursor off of keeping "the current record"
2247         and onto keeping "a deque of fetched records", the first of which is "the current record".
2248         
2249         This patch does just that, but with no behavior change; The deque only ever holds 0 or 1 records.
2250
2251         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
2252         (WebCore::IDBServer::SQLiteIDBCursor::currentData):
2253         (WebCore::IDBServer::SQLiteIDBCursor::objectStoreRecordsChanged):
2254         (WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
2255         (WebCore::IDBServer::SQLiteIDBCursor::prefetch):
2256         (WebCore::IDBServer::SQLiteIDBCursor::advance):
2257         (WebCore::IDBServer::SQLiteIDBCursor::fetch):
2258         (WebCore::IDBServer::SQLiteIDBCursor::fetchNextRecord):
2259         (WebCore::IDBServer::SQLiteIDBCursor::markAsErrored):
2260         (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord):
2261         (WebCore::IDBServer::SQLiteIDBCursor::iterate):
2262         (WebCore::IDBServer::SQLiteIDBCursor::currentKey):
2263         (WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey):
2264         (WebCore::IDBServer::SQLiteIDBCursor::currentValue):
2265         (WebCore::IDBServer::SQLiteIDBCursor::didComplete):
2266         (WebCore::IDBServer::SQLiteIDBCursor::didError):
2267         (WebCore::IDBServer::SQLiteIDBCursor::currentRecordRowID):
2268         (WebCore::IDBServer::SQLiteIDBCursor::advanceUnique): Deleted.
2269         (WebCore::IDBServer::SQLiteIDBCursor::advanceOnce): Deleted.
2270         (WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce): Deleted.
2271         
2272         * Modules/indexeddb/server/SQLiteIDBCursor.h:
2273         (WebCore::IDBServer::SQLiteIDBCursor::SQLiteCursorRecord::isTerminalRecord):
2274         (WebCore::IDBServer::SQLiteIDBCursor::currentRecordRowID): Deleted.
2275         (WebCore::IDBServer::SQLiteIDBCursor::currentKey): Deleted.
2276         (WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey): Deleted.
2277         (WebCore::IDBServer::SQLiteIDBCursor::currentValue): Deleted.
2278         (WebCore::IDBServer::SQLiteIDBCursor::didComplete): Deleted.
2279         (WebCore::IDBServer::SQLiteIDBCursor::didError): Deleted.
2280
2281 2016-12-16  Darin Adler  <darin@apple.com>
2282
2283         Remove all custom bindings from media streams, using dictionaries instead
2284         https://bugs.webkit.org/show_bug.cgi?id=165943
2285
2286         Reviewed by Sam Weinig.
2287
2288         * CMakeLists.txt: Added and removed files.
2289         * DerivedSources.make: Ditto.
2290
2291         * Modules/mediastream/DoubleRange.h: Added. Moved dictionary here so it can be shared
2292         by both MediaStreamTrack and MediaTrackSupportedConstraints.
2293         * Modules/mediastream/DoubleRange.idl: Ditto.
2294         * Modules/mediastream/LongRange.h: Ditto.
2295         * Modules/mediastream/LongRange.idl: Ditto.
2296
2297         * Modules/mediastream/MediaDevices.cpp:
2298         (WebCore::MediaDevices::getSupportedConstraints): Changed to return a struct instead
2299         of a reference counted object.
2300         * Modules/mediastream/MediaDevices.h: Updated for the above.
2301         * Modules/mediastream/MediaDevices.idl: Added a conditional on the dictionary in this
2302         file; not needed because the conditional on the interface automatically affects the
2303         entire fiel, but for now the style seems to be to put these on all the dictionaries.
2304
2305         * Modules/mediastream/MediaSourceSettings.cpp: Removed.
2306         * Modules/mediastream/MediaSourceSettings.h: Removed.
2307
2308         * Modules/mediastream/MediaStreamTrack.cpp:
2309         (WebCore::MediaStreamTrack::getSettings): Changed to return a struct instead of a
2310         reference counted object.
2311         (WebCore::capabilityDoubleRange): Added. Helper for getCapabilities.
2312         (WebCore::capabilityIntRange): Ditto.
2313         (WebCore::capabilityStringVector): Ditto.
2314         (WebCore::capabilityBooleanVector): Ditto.
2315         (WebCore::MediaStreamTrack::getCapabilities): Changed to return a struct instead
2316         of a reference counted object.
2317         * Modules/mediastream/MediaStreamTrack.h: Updated for the above changes. Also
2318         defined the structs here in the class.
2319         * Modules/mediastream/MediaStreamTrack.idl: Defined the two dictionaries here and
2320         changed the functions to return them and not use [Custom] any more.
2321
2322         * Modules/mediastream/MediaTrackConstraints.h: Moved DoubleRange and LongRange out
2323         of this file and into their own headers. Also removed the currently unimplemented
2324         latency and channelCount; there are FIXME comments in the IDL file about eventually
2325         adding these to match the specification.
2326         * Modules/mediastream/MediaTrackConstraints.idl: Added conditionals, and removed
2327         the unimplemented latency and channelCount.
2328         style of marking everything consistently.
2329
2330         * Modules/mediastream/MediaTrackSupportedConstraints.h: Replaced this class with
2331         a struct.
2332         * Modules/mediastream/MediaTrackSupportedConstraints.idl: Replaced this interface
2333         with a dictionary.
2334
2335         * WebCore.xcodeproj/project.pbxproj: Added and removed files.
2336
2337         * bindings/js/JSMediaStreamTrackCustom.cpp: Removed.
2338         * bindings/js/JSMediaTrackSupportedConstraintsCustom.cpp: Removed.
2339
2340         * platform/mediastream/MediaStreamTrackPrivate.cpp: Removed include of the
2341         MediaSourceSettings.h header.
2342         * platform/mediastream/MediaStreamTrackPrivate.h: Removed forward declaration of
2343         the MediaSourceSettings class.
2344
2345 2016-12-16  Zalan Bujtas  <zalan@apple.com>
2346
2347         Possible nullptr dereference when applying pagination to viewport
2348         https://bugs.webkit.org/show_bug.cgi?id=165926
2349
2350         Reviewed by Simon Fraser.
2351
2352         Static analysis found a code path where a null dereference could occur.
2353         
2354         * page/FrameView.cpp:
2355         (WebCore::FrameView::applyPaginationToViewport):
2356
2357 2016-12-16  Ryan Haddad  <ryanhaddad@apple.com>
2358
2359         Fix the Windows build.
2360
2361         Unreviewed build fix.
2362
2363         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
2364
2365 2016-12-16  Ryan Haddad  <ryanhaddad@apple.com>
2366
2367         Yet another attempt to fix the Windows build after r209936.
2368
2369         Unreviewed build fix.
2370
2371         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.h:
2372
2373 2016-12-16  Alex Christensen  <achristensen@webkit.org>
2374
2375         Use initEvent quirk added in r207908 for Flipboard
2376         https://bugs.webkit.org/show_bug.cgi?id=165974
2377         <rdar://problem/28264190>
2378
2379         Reviewed by Chris Dumez.
2380
2381         * dom/Event.cpp:
2382         (WebCore::Event::initEventForBindings):
2383         * platform/RuntimeApplicationChecks.h:
2384         * platform/RuntimeApplicationChecks.mm:
2385         (WebCore::IOSApplication::isFlipboard):
2386         Flipboard also has JavaScript content that calls initEvent with not enough arguments.
2387
2388 2016-12-16  Chris Dumez  <cdumez@apple.com>
2389
2390         [iOS] Align HTML from validation popover style with Copy/Paste callout bar
2391         https://bugs.webkit.org/show_bug.cgi?id=165973
2392         <rdar://problem/29336638>
2393
2394         Reviewed by Simon Fraser.
2395
2396         Tweak font size and padding of the HTML from validation popover to
2397         match the style of the Copy/Paste callout bar on iOS.
2398
2399         * platform/ios/ValidationBubbleIOS.mm:
2400         (WebCore::ValidationBubble::ValidationBubble):
2401
2402 2016-12-16  Ryan Haddad  <ryanhaddad@apple.com>
2403
2404         Another attempt to fix the Windows build after r209936.
2405
2406         Unreviewed build fix.
2407
2408         * CMakeLists.txt:
2409
2410 2016-12-16  Andy Estes  <aestes@apple.com>
2411
2412         Add a setting to suppress keyboard input during provisional navigation
2413         https://bugs.webkit.org/show_bug.cgi?id=165830
2414
2415         Reviewed by Brent Fulgham.
2416
2417         Added a setting that suppresses keyboard input during provisional navigation. When the
2418         setting is enabled, DOM propogation of keyboard input events (KeyboardEvents,
2419         CompositionEvents, InputEvents, and some TextEvents) is suppressed, and text insertion is
2420         disabled in the editor.
2421
2422         Non-editing default event handling still occurs, for instance keyboard scrolling, access
2423         keys, and focus navigation.
2424
2425         Test: http/tests/navigation/keyboard-events-during-provisional-navigation.html
2426
2427         * dom/CompositionEvent.h: Added a type trait specialization.
2428         * dom/EventDispatcher.cpp:
2429         (WebCore::shouldSuppressEventDispatchInDOM): Added. Returns true if the event is trusted,
2430         FrameLoader::shouldSuppressKeyboardInput() returns true, and the event is a
2431         CompositionEvent, InputEvent, KeyboardEvent, or keyboard/composition TextEvent.
2432         (WebCore::EventDispatcher::dispatchEvent): Called stopPropogation() on the event if
2433         shouldSuppressEventDispatchInDOM() returns true.
2434         * dom/InputEvent.h: Removed the inline no-op destructor so that DataTransfer does not need
2435         to be a complete type in every translation unit that includes this header. Added a type
2436         trait specialization.
2437         * dom/TextEvent.h: Added isKeyboard() to determine if m_inputType is TextEventInputKeyboard.
2438         * editing/Editor.cpp:
2439         (WebCore::Editor::shouldInsertText): Returned false if
2440         FrameLoader::shouldSuppressKeyboardInput() returns true and the action is
2441         EditorInsertActionTyped.
2442         * loader/FrameLoader.cpp:
2443         (WebCore::FrameLoader::shouldSuppressKeyboardInput): Added. Returns true if
2444         Settings::shouldSuppressKeyboardInputDuringProvisionalNavigation() returns true and the
2445         state is FrameStateProvisional.
2446         * loader/FrameLoader.h: Declared shouldSuppressKeyboardInput().
2447         * page/EventHandler.h: Exported accessKeyModifiers().
2448         * page/Settings.in: Defined shouldSuppressKeyboardInputDuringProvisionalNavigation with an
2449         initial value of false.
2450         * testing/Internals.cpp:
2451         (WebCore::Internals::accessKeyModifiers): Added. Returns a vector of strings representing
2452         the access key modifiers.
2453         * testing/Internals.h: Declared accessKeyModifiers().
2454         * testing/Internals.idl: Exposed accessKeyModifiers() on the internals object.
2455
2456 2016-12-16  Brady Eidson  <beidson@apple.com>
2457
2458         More SQLiteIDBCursor refactoring.
2459         https://bugs.webkit.org/show_bug.cgi?id=165956
2460
2461         Reviewed by Tim Horton.
2462
2463         No new tests (No behavior change).
2464         
2465         This is a simple patch that encapsulates the current state of the cursor in one structure
2466         which will allow for storing multiple-such states in the future (to support prefetching).
2467
2468         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
2469         (WebCore::IDBServer::SQLiteIDBCursor::currentData):
2470         (WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
2471         (WebCore::IDBServer::SQLiteIDBCursor::advance):
2472         (WebCore::IDBServer::SQLiteIDBCursor::advanceUnique):
2473         (WebCore::IDBServer::SQLiteIDBCursor::markAsErrored):
2474         (WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
2475         (WebCore::IDBServer::SQLiteIDBCursor::iterate):
2476         
2477         * Modules/indexeddb/server/SQLiteIDBCursor.h:
2478         (WebCore::IDBServer::SQLiteIDBCursor::currentRecordRowID):
2479         (WebCore::IDBServer::SQLiteIDBCursor::currentKey):
2480         (WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey):
2481         (WebCore::IDBServer::SQLiteIDBCursor::currentValue):
2482         (WebCore::IDBServer::SQLiteIDBCursor::didComplete):
2483         (WebCore::IDBServer::SQLiteIDBCursor::didError):
2484
2485 2016-12-16  Jer Noble  <jer.noble@apple.com>
2486
2487         Follow-up build fix after r209936; also rename MockCDM -> LegacyMockCDM in
2488         CMakeLists.txt.
2489
2490         * CMakeLists.txt:
2491
2492 2016-12-16  Sam Weinig  <sam@webkit.org>
2493
2494         [Bindings] Remove use of Dictionary/ArrayValue in CDMSessionClearKey
2495         https://bugs.webkit.org/show_bug.cgi?id=165961
2496
2497         Reviewed by Darin Adler.
2498
2499         * CMakeLists.txt:
2500         * WebCore.xcodeproj/project.pbxproj:
2501         * bindings/js/JSBindingsAllInOne.cpp:
2502         Remove ArrayValue.h/cpp
2503
2504         * bindings/js/ArrayValue.cpp: Removed.
2505         * bindings/js/ArrayValue.h: Removed.
2506
2507         * bindings/js/Dictionary.cpp:
2508         * bindings/js/Dictionary.h:
2509         Remove support for ArrayValue.
2510
2511         * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp:
2512         (WebCore::CDMSessionClearKey::update):
2513         Replace use of Dictionary/ArrayValue with direct JSObject functions. This
2514         should really be replaced with a JSON parser that does not require round
2515         tripping through JavaScript objects.
2516
2517 2016-12-13  Jer Noble  <jer.noble@apple.com>
2518
2519         Move existing CDM* implementations into modules/encryptedmedia/legacy
2520         https://bugs.webkit.org/show_bug.cgi?id=165823
2521
2522         Rubber-stamped by Sam Weinig.
2523
2524         * Modules/encryptedmedia/legacy/LegacyCDM.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDM.cpp.
2525         (WebCore::CDMFactory::CDMFactory):
2526         (WebCore::installedCDMFactories):
2527         (WebCore::CDM::registerCDMFactory):
2528         (WebCore::CDMFactoryForKeySystem):
2529         (WebCore::CDM::supportsKeySystem):
2530         (WebCore::CDM::keySystemSupportsMimeType):
2531         (WebCore::CDM::create):
2532         (WebCore::CDM::CDM):
2533         (WebCore::CDM::~CDM):
2534         (WebCore::CDM::supportsMIMEType):
2535         (WebCore::CDM::createSession):
2536         (WebCore::CDM::mediaPlayer):
2537         * Modules/encryptedmedia/legacy/LegacyCDM.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDM.h.
2538         (WebCore::CDMClient::~CDMClient):
2539         (WebCore::CDM::keySystem):
2540         (WebCore::CDM::client):
2541         (WebCore::CDM::setClient):
2542         * Modules/encryptedmedia/legacy/LegacyCDMPrivate.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivate.h.
2543         (WebCore::CDMPrivateInterface::CDMPrivateInterface):
2544         (WebCore::CDMPrivateInterface::~CDMPrivateInterface):
2545         * Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.cpp.
2546         (WebCore::CDMPrivateClearKey::supportsKeySystem):
2547         (WebCore::CDMPrivateClearKey::supportsKeySystemAndMimeType):
2548         (WebCore::CDMPrivateClearKey::supportsMIMEType):
2549         (WebCore::CDMPrivateClearKey::createSession):
2550         * Modules/encryptedmedia/legacy/LegacyCDMPrivateClearKey.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateClearKey.h.
2551         (WebCore::CDMPrivateClearKey::CDMPrivateClearKey):
2552         (WebCore::CDMPrivateClearKey::~CDMPrivateClearKey):
2553         * Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateMediaPlayer.cpp.
2554         (WebCore::CDMPrivateMediaPlayer::supportsKeySystem):
2555         (WebCore::CDMPrivateMediaPlayer::supportsKeySystemAndMimeType):
2556         (WebCore::CDMPrivateMediaPlayer::supportsMIMEType):
2557         (WebCore::CDMPrivateMediaPlayer::createSession):
2558         * Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMPrivateMediaPlayer.h.
2559         (WebCore::CDMPrivateMediaPlayer::CDMPrivateMediaPlayer):
2560         (WebCore::CDMPrivateMediaPlayer::~CDMPrivateMediaPlayer):
2561         (WebCore::CDMPrivateMediaPlayer::cdm):
2562         * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.cpp: Renamed from Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.cpp.
2563         (WebCore::clearKeyVM):
2564         (WebCore::CDMSessionClearKey::CDMSessionClearKey):
2565         (WebCore::CDMSessionClearKey::~CDMSessionClearKey):
2566         (WebCore::CDMSessionClearKey::generateKeyRequest):
2567         (WebCore::CDMSessionClearKey::releaseKeys):
2568         (WebCore::CDMSessionClearKey::update):
2569         (WebCore::CDMSessionClearKey::cachedKeyForKeyID):
2570         * Modules/encryptedmedia/legacy/LegacyCDMSessionClearKey.h: Renamed from Source/WebCore/Modules/encryptedmedia/CDMSessionClearKey.h.
2571         * Modules/encryptedmedia/legacy/WebKitMediaKeySession.h:
2572         * Modules/encryptedmedia/legacy/WebKitMediaKeys.h:
2573         * WebCore.xcodeproj/project.pbxproj:
2574         * platform/graphics/LegacyCDMSession.h: Renamed from Source/WebCore/platform/graphics/CDMSession.h.
2575         (WebCore::CDMSessionClient::~CDMSessionClient):
2576         (WebCore::CDMSession::CDMSession):
2577         (WebCore::CDMSession::~CDMSession):
2578         (WebCore::CDMSession::type):
2579         (WebCore::CDMSession::cachedKeyForKeyID):
2580         * platform/graphics/MediaPlayer.h:
2581         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.h:
2582         * platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm:
2583         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
2584         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.h:
2585         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
2586         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
2587         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.h:
2588         * testing/Internals.cpp:
2589         * testing/LegacyMockCDM.cpp: Renamed from Source/WebCore/testing/MockCDM.cpp.
2590         (WebCore::MockCDMSession::~MockCDMSession):
2591         (WebCore::MockCDM::supportsKeySystem):
2592         (WebCore::MockCDM::supportsKeySystemAndMimeType):
2593         (WebCore::MockCDM::supportsMIMEType):
2594         (WebCore::MockCDM::createSession):
2595         (WebCore::initDataPrefix):
2596         (WebCore::keyPrefix):
2597         (WebCore::keyRequest):
2598         (WebCore::generateSessionId):
2599         (WebCore::MockCDMSession::MockCDMSession):
2600         (WebCore::MockCDMSession::generateKeyRequest):
2601         (WebCore::MockCDMSession::releaseKeys):
2602         (WebCore::MockCDMSession::update):
2603         * testing/LegacyMockCDM.h: Renamed from Source/WebCore/testing/MockCDM.h.
2604         (WebCore::MockCDM::MockCDM):
2605         (WebCore::MockCDM::~MockCDM):
2606
2607 2016-12-16  Andreas Kling  <akling@apple.com>
2608
2609         Subframes going into page cache don't need to resetScrollbars().
2610         <https://webkit.org/b/163750>
2611         <rdar://problem/29273020>
2612
2613         Reviewed by Antti Koivisto.
2614
2615         The main frame is the only frame that switches its FrameView when using the page cache,
2616         subframes just suspend their DOM and wait around to be either killed or restored.
2617
2618         Thus there is no reason for subframes to reset their FrameView's scrollbars when going
2619         into page cache, since nothing affects them while cached, and their layout should end up
2620         identical when restoring.
2621
2622         This was causing some flakiness with subframe scrollbars jumping between different sizes
2623         in when restoring from page cache in macOS/WK1. This change makes the behavior consistent
2624         in both WK1 and WK2, and removes the flakiness.
2625
2626         * dom/Document.cpp:
2627         (WebCore::Document::setPageCacheState):
2628
2629 2016-12-16  Wenson Hsieh  <wenson_hsieh@apple.com>
2630
2631         Visual viewports: carets and selection UI are incorrectly positioned when editing fixed elements
2632         https://bugs.webkit.org/show_bug.cgi?id=165767
2633         <rdar://problem/29602382>
2634
2635         Reviewed by Simon Fraser.
2636
2637         When changing the layout viewport override, mark viewport-constrained objects as needing layout. If only the
2638         width and height of the old and new layout viewports are compared, EditorState info (namely selection and caret
2639         rects) that depends on the document location of fixed elements may be stale immediately after the layout
2640         viewport override changes and before layout occurs.
2641
2642         This caused one of the tests (fixed-caret-position-after-scroll.html) to occasionally fail.
2643
2644         Tests: editing/caret/ios/absolute-caret-position-after-scroll.html
2645                editing/caret/ios/fixed-caret-position-after-scroll.html
2646                editing/selection/ios/absolute-selection-after-scroll.html
2647                editing/selection/ios/fixed-selection-after-scroll.html
2648
2649         * page/FrameView.cpp:
2650         (WebCore::FrameView::setLayoutViewportOverrideRect):
2651
2652 2016-12-14  Sam Weinig  <sam@webkit.org>
2653
2654         [ApplePay] Remove remaining custom bindings from the ApplePay code
2655         https://bugs.webkit.org/show_bug.cgi?id=165860
2656
2657         Reviewed by Darin Adler.
2658
2659         * DerivedSources.make:
2660         Add new IDL files.
2661
2662         * WebCore.xcodeproj/project.pbxproj:
2663         Add/remove files.
2664
2665         * bindings/js/JSApplePayPaymentAuthorizedEventCustom.cpp: Removed.
2666         * bindings/js/JSApplePayPaymentMethodSelectedEventCustom.cpp: Removed.
2667         * bindings/js/JSApplePayShippingContactSelectedEventCustom.cpp: Removed.
2668         * bindings/js/JSApplePayShippingMethodSelectedEventCustom.cpp: Removed.
2669         Remove custom bindings.
2670
2671         * Modules/applepay/ApplePayLineItem.h: Added.
2672         * Modules/applepay/ApplePayLineItem.idl: Added.
2673         * Modules/applepay/ApplePayPayment.h: Added.
2674         * Modules/applepay/ApplePayPayment.idl: Added.
2675         * Modules/applepay/ApplePayPaymentContact.h: Added.
2676         * Modules/applepay/ApplePayPaymentContact.idl: Added.
2677         * Modules/applepay/ApplePayPaymentMethod.h: Added.
2678         * Modules/applepay/ApplePayPaymentMethod.idl: Added.
2679         * Modules/applepay/ApplePayPaymentPass.h: Added.
2680         * Modules/applepay/ApplePayPaymentPass.idl: Added.
2681         * Modules/applepay/ApplePayPaymentRequest.h: Added.
2682         * Modules/applepay/ApplePayPaymentRequest.idl: Added.
2683         * Modules/applepay/ApplePayShippingMethod.h: Added.
2684         * Modules/applepay/ApplePayShippingMethod.idl: Added.
2685         Split out dictionaries and enums into separate files where needed.
2686
2687         * Modules/applepay/ApplePayPaymentAuthorizedEvent.cpp:
2688         (WebCore::ApplePayPaymentAuthorizedEvent::ApplePayPaymentAuthorizedEvent):
2689         * Modules/applepay/ApplePayPaymentAuthorizedEvent.h:
2690         * Modules/applepay/ApplePayPaymentAuthorizedEvent.idl:
2691         Convert the 'payment' property to return an ApplePayPayment dictionary, removing
2692         the need for custom bindings.
2693
2694         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.cpp:
2695         (WebCore::ApplePayPaymentMethodSelectedEvent::ApplePayPaymentMethodSelectedEvent):
2696         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.h:
2697         * Modules/applepay/ApplePayPaymentMethodSelectedEvent.idl:
2698         Convert the 'paymentMethod' property to return an ApplePayPaymentMethod dictionary, removing
2699         the need for custom bindings.
2700
2701         * Modules/applepay/ApplePaySession.cpp:
2702         (WebCore::convertAndValidate):
2703         (WebCore::ApplePaySession::create):
2704         (WebCore::ApplePaySession::ApplePaySession):
2705         (WebCore::ApplePaySession::completeShippingMethodSelection):
2706         (WebCore::ApplePaySession::completeShippingContactSelection):
2707         (WebCore::ApplePaySession::completePaymentMethodSelection):
2708         (WebCore::ApplePaySession::didSelectShippingMethod):
2709         * Modules/applepay/ApplePaySession.h:
2710         Update for new names, remove need for ExecState in the create function, and simplify
2711         billingContact and shippingContact now that they are strongly typed.
2712
2713         * Modules/applepay/ApplePaySession.idl:
2714         Move dictionaries and enums to their own files.
2715
2716         * Modules/applepay/ApplePayShippingContactSelectedEvent.cpp:
2717         (WebCore::ApplePayShippingContactSelectedEvent::ApplePayShippingContactSelectedEvent):
2718         * Modules/applepay/ApplePayShippingContactSelectedEvent.h:
2719         * Modules/applepay/ApplePayShippingContactSelectedEvent.idl:
2720         Convert the 'shippingContact' property to return an ApplePayPaymentContact dictionary, removing
2721         the need for custom bindings.
2722
2723         * Modules/applepay/ApplePayShippingMethodSelectedEvent.cpp:
2724         * Modules/applepay/ApplePayShippingMethodSelectedEvent.h:
2725         * Modules/applepay/ApplePayShippingMethodSelectedEvent.idl:
2726         Convert the 'shippingMethod' property to return an ApplePayShippingMethod dictionary, removing
2727         the need for custom bindings.
2728
2729         * Modules/applepay/Payment.h:
2730         * Modules/applepay/PaymentContact.h:
2731         * Modules/applepay/PaymentMethod.h:
2732         * Modules/applepay/cocoa/PaymentCocoa.mm:
2733         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
2734         * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
2735         Replace toJS/fromJS functions with ones that convert to/from the associated dictionary type.
2736
2737         * bindings/generic/IDLTypes.h:
2738         (WebCore::IDLJSON::nullValue):
2739         (WebCore::IDLJSON::isNullValue):
2740         (WebCore::IDLJSON::extractValueFromNullable):
2741         * bindings/js/JSDOMConvert.h:
2742         (WebCore::Converter<IDLJSON>::convert):
2743         (WebCore::JSConverter<IDLJSON>::convert):
2744         Add a new custom type, JSON, which converts from a String to a JS object.
2745
2746         * bindings/scripts/CodeGenerator.pm:
2747         * bindings/scripts/CodeGeneratorJS.pm:
2748         Add support for the new JSON type, and improve scoped naming to allow for enums
2749         in dictionary only IDL files.
2750
2751         * bindings/scripts/test/JS/JSTestStandaloneDictionary.cpp:
2752         Update test result for improved scoped naming.
2753
2754 2016-12-16  Zalan Bujtas  <zalan@apple.com>
2755
2756         Defer certain accessibility callbacks until after layout is finished.
2757         https://bugs.webkit.org/show_bug.cgi?id=165861
2758         rdar://problem/29646301
2759
2760         Reviewed by Chris Fleizach.
2761
2762         Currently with certain AXObjectCache callbacks, we can end up in a layout while the render tree is being mutated.  
2763         This patch ensures that such callbacks are deferred until after tree mutation/layout is finished.
2764
2765         Test: accessibility/accessibility-crash-with-dynamic-inline-content.html
2766
2767         * accessibility/AXObjectCache.cpp:
2768         (WebCore::AXObjectCache::remove):
2769         (WebCore::AXObjectCache::performDeferredIsIgnoredChange):
2770         (WebCore::AXObjectCache::insertDeferredIsIgnoredChange):
2771         * accessibility/AXObjectCache.h:
2772         * page/FrameView.cpp:
2773         (WebCore::FrameView::performPostLayoutTasks):
2774         * rendering/RenderBlock.cpp:
2775         (WebCore::RenderBlock::deleteLines):
2776         * rendering/RenderBlockLineLayout.cpp:
2777         (WebCore::RenderBlockFlow::createAndAppendRootInlineBox):
2778
2779 2016-12-16  Ryan Haddad  <ryanhaddad@apple.com>
2780
2781         Rebaseline bindings tests after r209897.
2782
2783         Unreviewed test gardening.
2784
2785         * bindings/scripts/test/JS/JSTestObj.cpp:
2786         (WebCore::JSTestObj::visitChildren):
2787         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
2788         (WebCore::JSTestSerializedScriptValueInterface::visitChildren):
2789
2790 2016-12-15  Brent Fulgham  <bfulgham@apple.com>
2791
2792         Arguments called in wrong order
2793         https://bugs.webkit.org/show_bug.cgi?id=165923
2794
2795         Reviewed by Simon Fraser.
2796
2797         Correct the ordering of several function calls.
2798
2799         * Modules/mediasource/SourceBuffer.cpp:
2800         (WebCore::SourceBuffer::sourceBufferPrivateDidReceiveSample): The 'nearestToPresentationStartTime'
2801         argument is being checked for validity, but 'nearestToPresentationEndTime' is being used in the
2802         calculation. This seems like a copy/paste error.
2803         * page/PrintContext.cpp:
2804         (WebCore::PrintContext::outputLinkedDestinations): FloatPoint::expandedTo returns a new object that
2805         has been expanded. This code continued using the 'unexpanded' point.
2806         * platform/graphics/GraphicsContext3D.cpp:
2807         (WebCore::GraphicsContext3D::computeImageSizeInBytes): The 'bytesPerComponent' and 'componentsPerPixel'
2808         variables were being passed in the wrong order.
2809         * platform/network/CacheValidation.cpp: The 'last-modified' header string was being concatenated with
2810         the following string, resulting in an incorrect 'last-modifiedproxy-authenticate' string value.
2811         * svg/SVGToOTFFontConversion.cpp:
2812         (WebCore::SVGToOTFFontConverter::firstGlyph): The ASSERT was assigning to the (by-value) input
2813         parameter 'codePoint', rather than comparing it to the firstGlyph value's codePoint.
2814
2815 2016-12-16  Youenn Fablet  <youenn@apple.com>
2816
2817         [Fetch API] Improve resource loading console logging
2818         https://bugs.webkit.org/show_bug.cgi?id=160546
2819
2820         Reviewed by Alex Christensen.
2821
2822         Covered by rebased tests.
2823
2824         Adding support for logging of resource loading failures in ThreadableLoader.
2825         This will allow doing consistent logging for clients such as fetch, XHR, event source...
2826
2827         Doing logging for Fetch API only at the moment in ThreadableLoader.
2828         Future patches should migrate XHR to this logging system.
2829
2830         Logging routine is implemented in ThreadableLoader.
2831         It is used directly by DocumentThreadableLoader before calling didFail client callback.
2832         DocumentThreadableLoader has a new option to not log errors, in the case the client is WorkerThreadableLoader::MainBridge.
2833         In that case, the logging is done in the worker context within WorkerThreadableLoader::MainBridge::didFail
2834
2835         * loader/DocumentThreadableLoader.cpp:
2836         (WebCore::DocumentThreadableLoader::loadResourceSynchronously): Enable logging.
2837         (WebCore::DocumentThreadableLoader::create): Passing logging parameter to constructor.
2838         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader): Adding initialization of logging parameter.
2839         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest): Making use of the new logErrorAndFail helper routine.
2840         (WebCore::DocumentThreadableLoader::cancel): No need to log error if it is being cancelled.
2841         (WebCore::DocumentThreadableLoader::redirectReceived): Made the reportXX routines methods of DocumentThreadableLoaders and using logErrorAndFail internally.
2842         (WebCore::DocumentThreadableLoader::didFail): Wrapper around logErrorAndFail since cancel is not calling it anymore.
2843         (WebCore::DocumentThreadableLoader::preflightFailure):
2844         (WebCore::DocumentThreadableLoader::loadRequest):
2845         (WebCore::DocumentThreadableLoader::reportRedirectionWithBadScheme):
2846         (WebCore::DocumentThreadableLoader::reportContentSecurityPolicyError):
2847         (WebCore::DocumentThreadableLoader::reportCrossOriginResourceSharingError):
2848         (WebCore::DocumentThreadableLoader::logErrorAndFail):
2849         (WebCore::reportContentSecurityPolicyError): Deleted.
2850         (WebCore::reportCrossOriginResourceSharingError): Deleted.
2851         (WebCore::reportRedirectionWithBadScheme): Deleted.
2852         * loader/DocumentThreadableLoader.h:
2853         * loader/ThreadableLoader.cpp:
2854         (WebCore::ThreadableLoader::logError):
2855         * loader/ThreadableLoader.h:
2856         * loader/ThreadableLoaderClientWrapper.h:
2857         (WebCore::ThreadableLoaderClientWrapper::create):
2858         (WebCore::ThreadableLoaderClientWrapper::initiator):
2859         (WebCore::ThreadableLoaderClientWrapper::ThreadableLoaderClientWrapper):
2860         * loader/WorkerThreadableLoader.cpp:
2861         (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):
2862         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge):
2863         (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
2864
2865 2016-12-16  Enrique Ocaña González  <eocanha@igalia.com>
2866
2867         [GStreamer][MSE] Fix build warning in MediaPlayerPrivateGStreamer.cpp using gcc 6.2
2868         https://bugs.webkit.org/show_bug.cgi?id=165900
2869
2870         Reviewed by Žan Doberšek.
2871
2872         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2873         (WebCore::MediaPlayerPrivateGStreamerMSE::supportsCodecs):
2874         Move the variable asignation out of the if condition.
2875
2876 2016-12-16  Romain Bellessort  <romain.bellessort@crf.canon.fr>
2877
2878         [Readable Streams API] Implement ReadableByteStreamController cancel internal method
2879         https://bugs.webkit.org/show_bug.cgi?id=165798
2880
2881         Reviewed by Youenn Fablet.
2882
2883         Implemented cancel method of ReadableByteStreamController.
2884         Also fixed small inconsistency in readableByteStreamControllerClose.
2885
2886         Added one test to check cancel behaviour. More tests may be added as the API is implemented.
2887
2888         * Modules/streams/ReadableByteStreamInternals.js:
2889         (privateInitializeReadableByteStreamController): Define cancel internal method.
2890         (readableByteStreamControllerCancel): Added.
2891         (readableByteStreamControllerClose): Fixed behaviour (no value should be dequeued).
2892         * bindings/js/WebCoreBuiltinNames.h: Removed bytesFilled (previous addition was not needed).
2893
2894 2016-12-16  Youenn Fablet  <youennf@gmail.com>
2895
2896         svg/as-image/svg-image-with-data-uri-use-data-uri.svg is flaky after r207754
2897         https://bugs.webkit.org/show_bug.cgi?id=163887
2898         <rdar://problem/29266436>
2899
2900         Reviewed by Alex Christensen.
2901
2902         Test: http/tests/security/cross-origin-cached-images-with-memory-pressure.html
2903
2904         With the introduction of cached resource cloning, an Image may be referenced by several CachedImage.
2905         This did not work well with Image observer system as it mandates a one-to-one relationship.
2906
2907         Introducing CachedImageObserver to restore the one-to-one relationship between Image and its observer.
2908         CachedImageObserver can keep references for more than one CachedImage.
2909
2910         In the future, it might be better to split more clearly CachedImageObserver and its API from CachedImage.
2911         Or remove the concept of CachedResource cloning and find new ways to provide CachedResource origin information to clients.
2912
2913         * loader/cache/CachedImage.cpp:
2914         (WebCore::CachedImage::load): Moved boolean image observer fields to CachedImageObserver.
2915         (WebCore::CachedImage::setBodyDataFrom): Keeping a reference of the image observer when cloning the resource.
2916         (WebCore::CachedImage::createImage): Creating the observer when creating the image.
2917         (WebCore::CachedImage::CachedImageObserver::CachedImageObserver):
2918         (WebCore::CachedImage::CachedImageObserver::decodedSizeChanged):
2919         (WebCore::CachedImage::CachedImageObserver::didDraw):
2920         (WebCore::CachedImage::CachedImageObserver::animationAdvanced):
2921         (WebCore::CachedImage::CachedImageObserver::changedInRect):
2922         (WebCore::CachedImage::clearImage):
2923         * loader/cache/CachedImage.h:
2924         * loader/cache/CachedResource.cpp:
2925         (WebCore::CachedResource::setBodyDataFrom): Now that each cached image receives decodedSizeChanged callback, we need to set its size correctly.
2926
2927 2016-12-15  Joonghun Park  <jh718.park@samsung.com>
2928
2929         [EFL] Fix debug build break since r209873. Unreviewed.
2930         https://bugs.webkit.org/show_bug.cgi?id=165945
2931
2932         No new tests, no new behaviours.
2933
2934         Use Primitive System Data Type uint64_t instead of unsigned long long.
2935
2936         * Modules/indexeddb/IDBFactory.cpp:
2937         (WebCore::IDBFactory::openInternal):
2938         * Modules/indexeddb/IDBFactory.h:
2939
2940 2016-12-15  Zalan Bujtas  <zalan@apple.com>
2941
2942         text-align: justify and word-spacing combine to overflow column
2943         https://bugs.webkit.org/show_bug.cgi?id=165796
2944         rdar://problem/29672168
2945
2946         Reviewed by Myles C. Maxfield.
2947
2948         The value of the word-spacing property is not applied on the inline-tree boxes (normal line layout)
2949         with kerning enabled. It causes hittest failures and selection/rendering glitches.
2950         We normally use the pre-computed 'WordMeasurements' values to figure out the run widths. However
2951         with kerning on, in some cases we need to re-measure a certain part of the text by calling RenderText::width().
2952         This function omits the word-spacing value for leading whitespace, so when this text fragment starts with a whitespace,
2953         (while it's not at the beginning of the run) we have to manually add the word-spacing value back.
2954         r146087 added this logic with the restriction of applying it only to whitespace-only runs.
2955
2956         Test: fast/css/word-spacing-with-normal-layout.html
2957
2958         * rendering/RenderBlockLineLayout.cpp:
2959         (WebCore::setLogicalWidthForTextRun):
2960
2961 2016-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
2962
2963         Stop reinterpret_casting UBreakIterators to the undefined type TextBreakIterator
2964         https://bugs.webkit.org/show_bug.cgi?id=165931
2965
2966         Reviewed by Alex Christensen.
2967
2968         No new tests because there is no behavior change.
2969
2970         * dom/CharacterData.cpp:
2971         (WebCore::CharacterData::parserAppendData):
2972         * editing/TextCheckingHelper.cpp:
2973         (WebCore::findMisspellings):
2974         * editing/VisibleUnits.cpp:
2975         (WebCore::wordBreakIteratorForMinOffsetBoundary):
2976         (WebCore::wordBreakIteratorForMaxOffsetBoundary):
2977         (WebCore::isLogicalStartOfWord):
2978         (WebCore::islogicalEndOfWord):
2979         (WebCore::visualWordPosition):
2980         (WebCore::startSentenceBoundary):
2981         (WebCore::endSentenceBoundary):
2982         (WebCore::previousSentencePositionBoundary):
2983         (WebCore::nextSentencePositionBoundary):
2984         * html/HTMLInputElement.cpp:
2985         * html/HTMLTextAreaElement.cpp:
2986         * html/InputType.cpp:
2987         * html/TextFieldInputType.cpp:
2988         * html/TextInputType.cpp:
2989         * platform/graphics/StringTruncator.cpp:
2990         (WebCore::textBreakAtOrPreceding):
2991         (WebCore::boundedTextBreakFollowing):
2992         (WebCore::rightClipToWordBuffer):
2993         * platform/graphics/mac/ComplexTextController.cpp:
2994         (WebCore::ComplexTextController::offsetForPosition):
2995         * platform/text/TextBoundaries.cpp:
2996         (WebCore::findNextWordFromIndex):
2997         (WebCore::findWordBoundary):
2998         (WebCore::findEndWordBoundary):
2999         * platform/text/mac/TextBoundaries.mm:
3000         (WebCore::findNextWordFromIndex):
3001         * rendering/BreakLines.h:
3002         (WebCore::nextBreakablePositionNonLoosely):
3003         (WebCore::nextBreakablePositionLoosely):
3004         * rendering/RenderBlock.cpp:
3005         * rendering/RenderText.cpp:
3006         (WebCore::makeCapitalized):
3007         (WebCore::RenderText::previousOffset):
3008         (WebCore::RenderText::previousOffsetForBackwardDeletion):
3009         (WebCore::RenderText::nextOffset):
3010         * rendering/SimpleLineLayoutTextFragmentIterator.h:
3011         * rendering/line/LineBreaker.h:
3012
3013 2016-12-15  Darin Adler  <darin@apple.com>
3014
3015         Use asString instead of toWTFString, toString, or getString when we already checked isString
3016         https://bugs.webkit.org/show_bug.cgi?id=165895
3017
3018         Reviewed by Yusuke Suzuki.
3019
3020         * Modules/fetch/FetchBody.cpp:
3021         (WebCore::FetchBody::extract): Use asString/value instead of toWTFString.
3022
3023         * Modules/mediastream/SDPProcessor.cpp:
3024         (WebCore::SDPProcessor::callScript): Use asString/value instead of getString.
3025
3026         * bindings/js/ArrayValue.cpp:
3027         (WebCore::ArrayValue::get): Use asString/value instead of toWTFString.
3028
3029         * bindings/js/IDBBindingUtilities.cpp:
3030         (WebCore::get): Use asString/length instead of toString/length.
3031         (WebCore::createIDBKeyFromValue): Use asString/value instead of toWTFString.
3032         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
3033         (WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier): Ditto.
3034         * bindings/js/JSDataCueCustom.cpp:
3035         (WebCore::constructJSDataCue): Use asString/value instead of getString.
3036         * bindings/js/JSInspectorFrontendHostCustom.cpp:
3037         (WebCore::populateContextMenuItems): Use asString/value instead of toWTFString.
3038
3039         * bindings/js/ScriptController.cpp:
3040         (WebCore::jsValueToModuleKey): Use asString/toIdentifier instead of
3041         jsCast<JSString*>/value/Identifier::fromString.
3042
3043         * bindings/js/SerializedScriptValue.cpp:
3044         (WebCore::CloneSerializer::dumpIfTerminal): Streamline by getting rid of local variable.
3045
3046         * contentextensions/ContentExtensionParser.cpp:
3047         (WebCore::ContentExtensions::getDomainList): Use asString instead of jsCast<JSString*>.
3048         (WebCore::ContentExtensions::loadTrigger): Use asString/value instead of toWTFString.
3049         (WebCore::ContentExtensions::loadAction): Ditto.
3050
3051         * css/FontFace.cpp:
3052         (WebCore::FontFace::create): Use asString/value instead of getString.
3053
3054 2016-12-15  Zalan Bujtas  <zalan@apple.com>
3055
3056         Change ::computeLogicalHeight's computedValues out argument to the return value.
3057         https://bugs.webkit.org/show_bug.cgi?id=165789
3058
3059         Reviewed by Simon Fraser.
3060
3061         No change in functionality.
3062
3063         * html/shadow/SliderThumbElement.cpp:
3064         (WebCore::RenderSliderContainer::computeLogicalHeight):
3065         * html/shadow/mac/ImageControlsButtonElementMac.cpp:
3066         (WebCore::RenderImageControlsButton::computeLogicalHeight):
3067         * html/shadow/mac/ImageControlsRootElementMac.cpp:
3068         (WebCore::RenderImageControls::computeLogicalHeight):
3069         * rendering/RenderBlock.cpp:
3070         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
3071         (WebCore::RenderBlock::estimateRegionRangeForBoxChild):
3072         * rendering/RenderBlockFlow.cpp:
3073         (WebCore::RenderBlockFlow::checkForPaginationLogicalHeightChange):
3074         * rendering/RenderBox.cpp:
3075         (WebCore::RenderBox::updateLogicalHeight):
3076         (WebCore::RenderBox::computeLogicalHeight):
3077         (WebCore::RenderBox::computePercentageLogicalHeight):
3078         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
3079         (WebCore::RenderBox::availableLogicalHeightUsing):
3080         * rendering/RenderBox.h:
3081         (WebCore::RenderBox::ComputedMarginValues::ComputedMarginValues): Deleted.
3082         (WebCore::RenderBox::LogicalExtentComputedValues::LogicalExtentComputedValues): Deleted.
3083         * rendering/RenderFlexibleBox.cpp:
3084         (WebCore::RenderFlexibleBox::mainAxisContentExtent):
3085         * rendering/RenderFlowThread.cpp:
3086         (WebCore::RenderFlowThread::computeLogicalHeight):
3087         * rendering/RenderFlowThread.h:
3088         * rendering/RenderListBox.cpp:
3089         (WebCore::RenderListBox::computeLogicalHeight):
3090         * rendering/RenderListBox.h:
3091         * rendering/RenderMeter.cpp:
3092         (WebCore::RenderMeter::computeLogicalHeight):
3093         * rendering/RenderMeter.h:
3094         * rendering/RenderMultiColumnFlowThread.cpp:
3095         (WebCore::RenderMultiColumnFlowThread::computeLogicalHeight):
3096         * rendering/RenderMultiColumnFlowThread.h:
3097         * rendering/RenderMultiColumnSet.cpp:
3098         (WebCore::RenderMultiColumnSet::computeLogicalHeight):
3099         * rendering/RenderMultiColumnSet.h:
3100         * rendering/RenderProgress.cpp:
3101         (WebCore::RenderProgress::computeLogicalHeight):
3102         * rendering/RenderProgress.h:
3103         * rendering/RenderTextControl.cpp:
3104         (WebCore::RenderTextControl::computeLogicalHeight):
3105         * rendering/RenderTextControl.h:
3106         * rendering/RenderView.cpp:
3107         (WebCore::RenderView::computeLogicalHeight):
3108         * rendering/RenderView.h:
3109         * rendering/svg/RenderSVGForeignObject.cpp:
3110         (WebCore::RenderSVGForeignObject::computeLogicalHeight):
3111         * rendering/svg/RenderSVGForeignObject.h:
3112
3113 2016-12-15  Chris Dumez  <cdumez@apple.com>
3114
3115         Make sure HTML validation bubble's state is updated after layout
3116         https://bugs.webkit.org/show_bug.cgi?id=165922
3117         <rdar://problem/29694730>
3118
3119         Reviewed by Simon Fraser.
3120
3121         Make sure HTML validation bubble's state is updated after layout.
3122         In particular, if the validation bubble's associated element has
3123         moved or is no longer visible, we now hide the bubble.
3124
3125         Tests: fast/forms/validation-bubble-disappears-when-input-detached.html
3126                fast/forms/validation-bubble-disappears-when-input-moved.html
3127                fast/forms/validation-bubble-disappears-when-input-no-longer-visible.html
3128
3129         * page/FrameView.cpp:
3130         (WebCore::FrameView::viewportContentsChanged):
3131         * page/Page.cpp:
3132         (WebCore::Page::updateValidationBubbleStateIfNeeded):
3133         * page/Page.h:
3134         * page/ValidationMessageClient.h:
3135
3136 2016-12-15  Sam Weinig  <sam@webkit.org>
3137
3138         [WebIDL] Remove use of Dictionary from JSCryptoAlgorithmDictionary
3139         https://bugs.webkit.org/show_bug.cgi?id=165919
3140
3141         Reviewed by Darin Adler.
3142
3143         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
3144         * bindings/js/JSCryptoAlgorithmDictionary.h:
3145         * bindings/js/JSCryptoOperationData.cpp:
3146         * bindings/js/JSCryptoOperationData.h:
3147         * bindings/js/JSWebKitSubtleCryptoCustom.cpp:
3148         Replace simplistic use of Dictionary with simplistic use of direct JSObject
3149         functions. Also, pass the ExecState by reference.
3150
3151 2016-12-15  Filip Pizlo  <fpizlo@apple.com>
3152
3153         Get rid of HeapRootVisitor and make SlotVisitor less painful to use
3154         https://bugs.webkit.org/show_bug.cgi?id=165911
3155
3156         Reviewed by Geoffrey Garen.
3157
3158         No new tests because no new behavior.
3159         
3160         This updates WebCore code to new JSC API.
3161
3162         * bindings/js/JSDOMBinding.cpp:
3163         (WebCore::DOMConstructorJSBuiltinObject::visitChildren):
3164         * bindings/js/JSDOMGlobalObject.cpp:
3165         (WebCore::JSDOMGlobalObject::visitChildren):
3166         * bindings/js/JSDOMPromise.h:
3167         (WebCore::DeferredPromise::visitAggregate):
3168         * bindings/js/JSEventListener.cpp:
3169         (WebCore::JSEventListener::visitJSFunction):
3170         * bindings/js/JSWorkerGlobalScopeBase.cpp:
3171         (WebCore::JSWorkerGlobalScopeBase::visitChildren):
3172         * bindings/scripts/CodeGeneratorJS.pm:
3173         (GenerateImplementation):
3174
3175 2016-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
3176
3177         Sort Xcode project files
3178         https://bugs.webkit.org/show_bug.cgi?id=165937
3179
3180         Reviewed by Simon Fraser.
3181
3182         No new tests because there is no behavior change.
3183
3184         * WebCore.xcodeproj/project.pbxproj:
3185
3186 2016-12-15  Chris Dumez  <cdumez@apple.com>
3187
3188         Move charCode / keyCode / which attributes from UIEvent to KeyboardEvent
3189         https://bugs.webkit.org/show_bug.cgi?id=165904
3190
3191         Reviewed by Sam Weinig.
3192
3193         Move 'charCode' / 'keyCode' attributes from UIEvent to KeyboardEvent and add
3194         'which' to KeyboardEvent to match the specification:
3195         - https://w3c.github.io/uievents/#legacy-interface-KeyboardEvent
3196
3197         We keep a 'which' attribute on UIEvent even though the specification does
3198         not say we should because Firefox and Chrome have 'which' on UIEvent still.
3199
3200         Specification:
3201         - 'charCode' / 'keyCode' / 'which' on KeyboardEvent only
3202
3203         Firefox:
3204         - 'charCode' / 'keyCode' on KeyboardEvent only
3205         - 'which' on UIEvent only
3206
3207         Chrome:
3208         - 'charCode' / 'keyCode' / 'which' on KeyboardEvent
3209         - 'which' on UIEvent as well
3210
3211         Old WebKit behavior:
3212         - 'charCode' / 'keyCode' / 'which' on UIEvent only
3213
3214         New WebKit behavior:
3215         - 'charCode' / 'keyCode' / 'which' on KeyboardEvent
3216         - 'which' on UIEvent as well
3217
3218         Our new behavior is identical to Chrome, much closer to the specification,
3219         and closer to Firefox as well.
3220
3221         No new tests, updated / rebaselined existing tests.
3222
3223         * dom/KeyboardEvent.cpp:
3224         (WebCore::KeyboardEvent::KeyboardEvent):
3225         (WebCore::KeyboardEvent::keyCode):
3226         (WebCore::KeyboardEvent::charCode):
3227         (WebCore::KeyboardEvent::which):
3228         * dom/KeyboardEvent.h:
3229         * dom/KeyboardEvent.idl:
3230         * dom/MouseEvent.cpp:
3231         (WebCore::MouseEvent::which):
3232         * dom/UIEvent.cpp:
3233         * dom/UIEvent.h:
3234         * dom/UIEvent.idl:
3235
3236 2016-12-15  Brady Eidson  <beidson@apple.com>
3237
3238         IndexedDB: Add an "IDBCursorRecord" struct.
3239         https://bugs.webkit.org/show_bug.cgi?id=165929
3240
3241         Reviewed by Alex Christensen.
3242
3243         No new tests (Refactor, no behavior change).
3244
3245         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
3246         (WebCore::IDBServer::SQLiteIDBCursor::currentData):
3247         (WebCore::IDBServer::SQLiteIDBCursor::resetAndRebindStatement):
3248         (WebCore::IDBServer::SQLiteIDBCursor::advanceUnique):
3249         (WebCore::IDBServer::SQLiteIDBCursor::internalAdvanceOnce):
3250         (WebCore::IDBServer::SQLiteIDBCursor::iterate):
3251         
3252         * Modules/indexeddb/server/SQLiteIDBCursor.h:
3253         (WebCore::IDBServer::SQLiteIDBCursor::currentKey):
3254         (WebCore::IDBServer::SQLiteIDBCursor::currentPrimaryKey):
3255         (WebCore::IDBServer::SQLiteIDBCursor::currentValue):
3256
3257         * Modules/indexeddb/shared/IDBCursorRecord.h: Added.
3258         (WebCore::IDBCursorRecord::encode):
3259         (WebCore::IDBCursorRecord::decode):
3260         
3261         * WebCore.xcodeproj/project.pbxproj:
3262
3263 2016-12-15  Keith Rollin  <krollin@apple.com>
3264
3265         Refactor Document::suspend/resume
3266         https://bugs.webkit.org/show_bug.cgi?id=165921
3267
3268         Reviewed by Chris Dumez.
3269
3270         Update Document::suspend to call Document::suspendScheduledTasks
3271         rather than duplicating the latter's code within itself. Similar
3272         treatment of Document::resume and Document::resumeScheduledTasks.
3273
3274         No new tests -- no new functionality, just refactoring existing code.
3275
3276         * dom/Document.cpp:
3277         (WebCore::Document::suspend):
3278         (WebCore::Document::resume):
3279
3280 2016-12-15  Alex Christensen  <achristensen@webkit.org>
3281
3282         Remove flex and bison build dependencies; commit generated XPath parser
3283         https://bugs.webkit.org/show_bug.cgi?id=165783
3284
3285         Reviewed by Brent Fulgham.
3286
3287         flex and bison are annoying to install and use, especially on Windows.
3288         Since only XPathGrammar uses them and that's not actively developed, let's just check in the one generated file
3289         and make building WebKit easier forever!
3290
3291         * CMakeLists.txt:
3292         * DerivedSources.make:
3293         * WebCore.xcodeproj/project.pbxproj:
3294         * css/makegrammar.pl: Removed.
3295         * xml/XPathGrammar.cpp: Added.
3296         (xpathyylex):
3297         (xpathyyerror):
3298         (yysyntax_error):
3299         * xml/XPathGrammar.h: Added.
3300         * xml/XPathGrammar.y: Rename TEXT to TEXT_ to fix a build error on Windows.  TEXT is already defined.
3301
3302 2016-12-15  Brady Eidson  <beidson@apple.com>
3303
3304         Enhance some of the logging statements just added for IndexedDB Operation scheduling.
3305
3306         Rubberstamped by Tim Horton.
3307
3308         No new tests (No behavior change).
3309
3310         * Modules/indexeddb/IDBTransaction.cpp:
3311         (WebCore::IDBTransaction::iterateCursor):
3312         (WebCore::IDBTransaction::requestGetRecord):
3313         (WebCore::IDBTransaction::requestIndexRecord):
3314         (WebCore::IDBTransaction::requestPutOrAdd):
3315         
3316         * Modules/indexeddb/shared/IDBCursorInfo.cpp:
3317         (WebCore::IDBCursorInfo::loggingString):
3318         
3319         * Modules/indexeddb/shared/IDBIterateCursorData.cpp:
3320         (WebCore::IDBIterateCursorData::loggingString):
3321
3322 2016-12-15  Myles C. Maxfield  <mmaxfield@apple.com>
3323
3324         [Cocoa] Implement font-synthesis: small-caps
3325         https://bugs.webkit.org/show_bug.cgi?id=165892
3326
3327         Reviewed by David Hyatt.
3328
3329         The CSS Fonts level 4 spec adds a new value to the "font-synthesis"
3330         property which controls whether or not small-caps is allowed to be
3331         synthesized. Luckily, we already have an implementation of this
3332         straightforward, so the implementation is quite simple.
3333
3334         Tests: css3/font-synthesis-small-caps.html
3335                fast/text/font-synthesis-parsing.html
3336
3337         * css/CSSComputedStyleDeclaration.cpp:
3338         (WebCore::fontSynthesisFromStyle):
3339         * css/StyleBuilderConverter.h:
3340         (WebCore::StyleBuilderConverter::convertFontSynthesis):
3341         * css/parser/CSSPropertyParser.cpp:
3342         (WebCore::consumeFontSynthesis):
3343         * platform/graphics/FontCache.h:
3344         (WebCore::FontDescriptionKey::makeFlagsKey):
3345         * platform/graphics/FontDescription.cpp:
3346         (WebCore::FontDescription::FontDescription):
3347         * platform/graphics/FontDescription.h:
3348         (WebCore::FontCascadeDescription::initialFontSynthesis):
3349         * platform/graphics/mac/ComplexTextController.cpp:
3350         (WebCore::shouldSynthesize):
3351         (WebCore::ComplexTextController::collectComplexTextRuns):
3352
3353 2016-12-15  Brady Eidson  <beidson@apple.com>
3354
3355         Add a new Logging Channel for IndexedDB Operation scheduling.
3356         https://bugs.webkit.org/show_bug.cgi?id=165912
3357
3358         Reviewed by Alex Christensen.
3359
3360         No new tests (No behavior change).
3361
3362         * Modules/indexeddb/IDBDatabase.cpp:
3363         (WebCore::IDBDatabase::transaction):
3364         
3365         * Modules/indexeddb/IDBFactory.cpp:
3366         (WebCore::IDBFactory::openInternal):
3367         (WebCore::IDBFactory::deleteDatabase):
3368         
3369         * Modules/indexeddb/IDBTransaction.cpp:
3370         (WebCore::IDBTransaction::internalAbort):
3371         (WebCore::IDBTransaction::commit):
3372         (WebCore::IDBTransaction::createObjectStore):
3373         (WebCore::IDBTransaction::renameObjectStore):
3374         (WebCore::IDBTransaction::createIndex):
3375         (WebCore::IDBTransaction::renameIndex):
3376         (WebCore::IDBTransaction::doRequestOpenCursor):
3377         (WebCore::IDBTransaction::iterateCursor):
3378         (WebCore::IDBTransaction::requestGetAllObjectStoreRecords):
3379         (WebCore::IDBTransaction::requestGetAllIndexRecords):
3380         (WebCore::IDBTransaction::requestGetRecord):
3381         (WebCore::IDBTransaction::requestIndexRecord):
3382         (WebCore::IDBTransaction::requestCount):
3383         (WebCore::IDBTransaction::requestDeleteRecord):
3384         (WebCore::IDBTransaction::requestClearObjectStore):
3385         (WebCore::IDBTransaction::requestPutOrAdd):
3386         (WebCore::IDBTransaction::deleteObjectStore):
3387         (WebCore::IDBTransaction::deleteIndex):
3388         
3389         * Modules/indexeddb/shared/IDBCursorInfo.cpp:
3390         (WebCore::IDBCursorInfo::loggingString):
3391         * Modules/indexeddb/shared/IDBCursorInfo.h:
3392         
3393         * Modules/indexeddb/shared/IDBGetAllRecordsData.cpp:
3394         (WebCore::IDBGetAllRecordsData::loggingString):
3395         * Modules/indexeddb/shared/IDBGetAllRecordsData.h:
3396         
3397         * Modules/indexeddb/shared/IDBGetRecordData.cpp:
3398         (WebCore::IDBGetRecordData::loggingString):
3399         * Modules/indexeddb/shared/IDBGetRecordData.h:
3400         
3401         * Modules/indexeddb/shared/IDBIndexInfo.cpp:
3402         (WebCore::IDBIndexInfo::condensedLoggingString):
3403         * Modules/indexeddb/shared/IDBIndexInfo.h:
3404         
3405         * Modules/indexeddb/shared/IDBIterateCursorData.cpp:
3406         (WebCore::IDBIterateCursorData::loggingString):
3407         * Modules/indexeddb/shared/IDBIterateCursorData.h:
3408         
3409         * Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
3410         (WebCore::IDBObjectStoreInfo::condensedLoggingString):
3411         * Modules/indexeddb/shared/IDBObjectStoreInfo.h:
3412         
3413         * platform/Logging.h:
3414
3415 2016-12-15  Konstantin Tokarev  <annulen@yandex.ru>
3416
3417         Added missing override and final specifiers
3418         https://bugs.webkit.org/show_bug.cgi?id=165903
3419
3420         Reviewed by Darin Adler.
3421
3422         No new tests needed.
3423
3424         * Modules/mediastream/OverconstrainedErrorEvent.h:
3425         * bindings/js/JSCallbackData.h:
3426         * bindings/js/JSCustomXPathNSResolver.h:
3427         * bindings/js/JSErrorHandler.h:
3428         * css/StyleRuleImport.h:
3429         * dom/SecurityPolicyViolationEvent.h:
3430         * editing/CreateLinkCommand.h:
3431         * editing/DeleteSelectionCommand.h:
3432         * editing/DictationCommand.h:
3433         * editing/Editor.cpp:
3434         * editing/FormatBlockCommand.h:
3435         * editing/IndentOutdentCommand.h:
3436         * editing/InsertLineBreakCommand.h:
3437         * editing/InsertParagraphSeparatorCommand.h:
3438         * editing/ModifySelectionListLevel.h:
3439         * editing/MoveSelectionCommand.h:
3440         * editing/RemoveFormatCommand.h:
3441         * editing/RemoveNodePreservingChildrenCommand.h:
3442         * editing/ReplaceSelectionCommand.h: