Percent-encode non-ASCII code points in hosts of URLs with unrecognized schemes
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-11-01  Alex Christensen  <achristensen@webkit.org>
2
3         Percent-encode non-ASCII code points in hosts of URLs with unrecognized schemes
4         https://bugs.webkit.org/show_bug.cgi?id=164290
5
6         Reviewed by Tim Horton.
7
8         NSURL fails to parse these URLs, WebKit used to punycode encode them, but now we match Chrome and Firefox,
9         as well as what will likely become the standard once https://github.com/whatwg/url/issues/148 is resolved.
10         We continue to parse IPv6 address hosts because otherwise we wouldn't be able to tell where a port
11         starts in a URL with colons in the IPv6 address and before the port like "a://[b::c]:4"
12
13         Covered by new API tests and updated LayoutTests.
14
15         * platform/URLParser.cpp:
16         (WebCore::URLParser::domainToASCII):
17         (WebCore::URLParser::parseHostAndPort):
18
19 2016-11-01  Gavin Barraclough  <barraclough@apple.com>
20
21         Add IsAudible, IsLoading to ActivityState
22         https://bugs.webkit.org/show_bug.cgi?id=164286
23
24         Reviewed by Geoff Garen.
25
26         By computing these values in the UIProcess and passing them to WebContent we can
27         more closely unify iOS & macOS throttling, and remove the PageThrottler class.
28
29         * page/ActivityState.h:
30             - added IsAudible, IsLoading
31
32 2016-10-31  Gavin Barraclough  <barraclough@apple.com>
33
34         Rename ViewState to ActivityState
35         https://bugs.webkit.org/show_bug.cgi?id=164254
36
37         Reviewed by Andreas Kling.
38
39         We plan to add a couple more flags to ViewState that aren't directly related to the view
40         itself - whether there is an ongoing page load, and whether whether there is audio playback.
41         This will allow viewState (now activityState) to fully drive throttling decisions.
42
43         Renaming this bitfield accordingly.
44         * Modules/geolocation/GeolocationController.cpp:
45         (WebCore::GeolocationController::GeolocationController):
46         (WebCore::GeolocationController::~GeolocationController):
47         (WebCore::GeolocationController::activityStateDidChange):
48         (WebCore::GeolocationController::viewStateDidChange): Deleted.
49         * Modules/geolocation/GeolocationController.h:
50         * WebCore.xcodeproj/project.pbxproj:
51         * page/ActivityState.h: Copied from Source/WebCore/page/ViewState.h.
52         * page/ActivityStateChangeObserver.h: Copied from Source/WebCore/page/ViewStateChangeObserver.h.
53         (WebCore::ActivityStateChangeObserver::~ActivityStateChangeObserver):
54         (WebCore::ViewStateChangeObserver::~ViewStateChangeObserver): Deleted.
55         * page/FocusController.cpp:
56         (WebCore::FocusController::FocusController):
57         (WebCore::FocusController::setFocused):
58         (WebCore::FocusController::setActivityState):
59         (WebCore::FocusController::setActive):
60         (WebCore::FocusController::setViewState): Deleted.
61         * page/FocusController.h:
62         (WebCore::FocusController::isActive):
63         (WebCore::FocusController::isFocused):
64         (WebCore::FocusController::contentIsVisible):
65         * page/Page.cpp:
66         (WebCore::Page::Page):
67         (WebCore::Page::setIsInWindow):
68         (WebCore::Page::addActivityStateChangeObserver):
69         (WebCore::Page::removeActivityStateChangeObserver):
70         (WebCore::Page::updateTimerThrottlingState):
71         (WebCore::Page::setActivityState):
72         (WebCore::Page::isVisibleAndActive):
73         (WebCore::Page::setIsVisible):
74         (WebCore::Page::addViewStateChangeObserver): Deleted.
75         (WebCore::Page::removeViewStateChangeObserver): Deleted.
76         (WebCore::Page::setViewState): Deleted.
77         * page/Page.h:
78         (WebCore::Page::isVisible):
79         (WebCore::Page::isInWindow):
80         * page/PageThrottler.h:
81         * page/ViewState.h: Removed.
82         * page/ViewStateChangeObserver.h: Removed.
83
84 2016-11-01  Ryan Haddad  <ryanhaddad@apple.com>
85
86         Unreviewed, rolling out r208100.
87
88         This change caused LayoutTest crashes under GuardMalloc.
89
90         Reverted changeset:
91
92         "MediaEndpoint::generateDtlsInfo is not needed"
93         https://bugs.webkit.org/show_bug.cgi?id=164130
94         http://trac.webkit.org/changeset/208100
95
96 2016-11-01  Claudio Saavedra  <csaavedra@igalia.com>
97
98         Add missing inline include to JSDeviceMotionEventCustom
99         https://bugs.webkit.org/show_bug.cgi?id=164269
100
101         Reviewed by Michael Catanzaro.
102
103         Inlined JSObject functions are used through JSObject::get() get here,
104         so this fixes the build with -fvisibility-inlines-hidden.
105
106         * bindings/js/JSDeviceMotionEventCustom.cpp: Include JSObjectInlines.h
107
108 2016-11-01  Fujii Hironori  <Hironori.Fujii@sony.com>
109
110         [CMake] generate-bindings-all.pl uses USES_TERMINAL which leaves a noisy line in interactive Ninja build
111         https://bugs.webkit.org/show_bug.cgi?id=163868
112
113         Reviewed by Michael Catanzaro.
114
115         It takes long time for generate-bindings-all.pl to generate all
116         bindings.  So, it shows the progress while running and
117         USES_TERMINAL option of add_custom_target have been used to invoke
118         the command.  However, USES_TERMINAL leaves a noisy line in
119         Ninja's neat build log of interactive build.
120
121         A new CMake option SHOW_BINDINGS_GENERATION_PROGRESS is added to
122         stop using USES_TERMINAL only in case of interactive Ninja build.
123
124         * bindings/scripts/generate-bindings-all.pl: Added a new switch
125         --showProgress.  Removed $terminalWidth and getTerminalWidth which
126         are mainly for interactive Ninja build.  Added printProgress.
127
128 2016-11-01  Ryosuke Niwa  <rniwa@webkit.org>
129
130         Web Inspector: Add the support for custom elements
131         https://bugs.webkit.org/show_bug.cgi?id=164266
132         <rdar://problem/29038883>
133
134         Reviewed by Joseph Pecoraro.
135
136         Set "customElementState" property on each DOMNode object when building a protocol object for the node.
137         Also added InspectorInstrumentation::didChangeCustomElementState to track the changes to custom element states.
138
139         Tests: inspector/dom/customElementState.html
140
141         * dom/Element.cpp:
142         (WebCore::Element::setIsDefinedCustomElement): Invoke didChangeCustomElementState to update the state.
143         (WebCore::Element::setIsFailedCustomElement): Ditto.
144         (WebCore::Element::setIsCustomElementUpgradeCandidate): Ditto.
145         (WebCore::Element::enqueueToUpgrade): Ditto.
146         * inspector/InspectorDOMAgent.cpp:
147         (WebCore::customElementState): Added.
148         (WebCore::InspectorDOMAgent::buildObjectForNode): Set the custom element state.
149         (WebCore::InspectorDOMAgent::didChangeCustomElementState): Invoke customElementStateChanged.
150         * inspector/InspectorDOMAgent.h:
151         * inspector/InspectorInstrumentation.cpp:
152         (WebCore::InspectorInstrumentation::didChangeCustomElementStateImpl): Added.
153         * inspector/InspectorInstrumentation.h:
154         (WebCore::InspectorInstrumentation::didChangeCustomElementState): Added.
155
156 2016-10-31  Ryosuke Niwa  <rniwa@webkit.org>
157
158         Add StaticPasteboard.cpp to the cmake after r207841.
159
160         * CMakeLists.txt:
161
162 2016-10-31  Zalan Bujtas  <zalan@apple.com>
163
164         Simple line layout: Clear needs layout flag even when only overflow is getting recomputed.
165         https://bugs.webkit.org/show_bug.cgi?id=164253
166
167         Reviewed by Antti Koivisto.
168
169         When a style change triggers visual overflow re-computation, we set StyleDifferenceLayout style diff
170         but in practice we don't actually make changes to the simple line structure. We just re-compute the visual overflow later.
171         This patch moves the 'clean the renderes' logic back to RenderBlockFlow::layoutSimpleLines so that
172         we set the needs layout bit to false regardless of whether we preformed layout.
173
174         Covered by fast/events/tabindex-focus-blur-all.html
175
176         * rendering/RenderBlockFlow.cpp:
177         (WebCore::RenderBlockFlow::layoutSimpleLines):
178         * rendering/SimpleLineLayout.cpp:
179         (WebCore::SimpleLineLayout::create):
180
181 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
182
183         Add basic visual/layout viewport support for fixed position layout
184         https://bugs.webkit.org/show_bug.cgi?id=164261
185
186         Reviewed by Dean Jackson.
187
188         This patch adds a new behavior for position:fixed objects on zooming. Instead of
189         interpolating between two implicit viewports as we do now, have explicit and distinct
190         layout and visual viewports.
191
192         The layout viewport is always the size of the initial containing block (i.e. the RenderView).
193         Position:fixed and sticky elements are laid out relative to the layout viewport.
194
195         The visual viewport is the visible part of the view, in content coordinates.
196
197         When the user pans and zooms, the visual viewport changes. If it hits the edge of the
198         layout viepwort, it pushes the layout viewport in that direction; it's as if the user
199         is dragging the layout viewport around.
200
201         The layout viewport is maintained on FrameView, and has to be recomputed when the
202         scroll position changes, when the view size changes, and when the content size (which
203         affets min/max scroll position) changes. Layout viewport size and position are computed
204         in unzoomed coordinates, requiring some new functions on FrameView to return these.
205
206         Updated the TileCoverageMap to show the layout viewport visually.
207
208         Subsequent patches will plumb the layout and visual viewports through the scrolling tree.
209
210         Tests: fast/visual-viewport/nonzoomed-rects.html
211                fast/visual-viewport/zoomed-fixed-scroll-down-then-up.html
212                fast/visual-viewport/zoomed-fixed.html
213                fast/visual-viewport/zoomed-rects.html
214
215         * page/FrameView.cpp:
216         (WebCore::FrameView::fixedScrollableAreaBoundsInflatedForScrolling):
217         (WebCore::FrameView::scrollPositionRespectingCustomFixedPosition):
218         (WebCore::FrameView::computeLayoutViewportOrigin):
219         (WebCore::FrameView::setLayoutViewportOrigin):
220         (WebCore::FrameView::updateLayoutViewport):
221         (WebCore::FrameView::minStableLayoutViewportOrigin):
222         (WebCore::FrameView::maxStableLayoutViewportOrigin):
223         (WebCore::FrameView::layoutViewportRect):
224         (WebCore::FrameView::visualViewportRect):
225         (WebCore::FrameView::viewportConstrainedVisibleContentRect):
226         (WebCore::FrameView::rectForFixedPositionLayout):
227         (WebCore::FrameView::scrollPositionForFixedPosition):
228         (WebCore::FrameView::unscaledMinimumScrollPosition):
229         (WebCore::FrameView::unscaledMaximumScrollPosition):
230         (WebCore::FrameView::scrollPositionChanged):
231         (WebCore::FrameView::availableContentSizeChanged):
232         (WebCore::FrameView::performPostLayoutTasks):
233         (WebCore::FrameView::scrollTo):
234         (WebCore::FrameView::useCustomFixedPositionLayoutRect):
235         * page/FrameView.h:
236         * page/Settings.in:
237         * page/scrolling/AsyncScrollingCoordinator.cpp:
238         (WebCore::AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll):
239         * platform/graphics/TiledBacking.h:
240         * platform/graphics/ca/TileController.cpp:
241         (WebCore::TileController::setLayoutViewportRect):
242         * platform/graphics/ca/TileController.h:
243         * platform/graphics/ca/TileCoverageMap.cpp:
244         (WebCore::TileCoverageMap::TileCoverageMap):
245         (WebCore::TileCoverageMap::update):
246         * platform/graphics/ca/TileCoverageMap.h:
247         * rendering/RenderBoxModelObject.cpp:
248         (WebCore::RenderBoxModelObject::constrainingRectForStickyPosition):
249         * rendering/RenderLayerBacking.cpp:
250         (WebCore::RenderLayerBacking::updateCompositedBounds):
251         * rendering/RenderLayerCompositor.cpp:
252         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
253         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
254         * rendering/RenderTreeAsText.cpp:
255         (WebCore::externalRepresentation): Logging here is useful when debugging tests.
256         * testing/Internals.cpp:
257         (WebCore::Internals::layoutViewportRect): Expose these rects so tests can dump them.
258         (WebCore::Internals::visualViewportRect):
259         * testing/Internals.h:
260         * testing/Internals.idl:
261
262 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
263
264         Fix bindings tests after r208209.
265
266         * bindings/scripts/test/JS/JSTestObj.cpp:
267         (WebCore::setJSTestObjTypedArrayAttrFunction):
268         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
269         (WebCore::constructJSTestOverloadedConstructors1):
270         (WebCore::constructJSTestOverloadedConstructors2):
271
272 2016-10-31  Joseph Pecoraro  <pecoraro@apple.com>
273
274         Warning: Multiple build commands for output file RenderThemeCocoa.h
275         https://bugs.webkit.org/show_bug.cgi?id=164265
276
277         Reviewed by Ryosuke Niwa.
278
279         * WebCore.xcodeproj/project.pbxproj:
280
281 2016-10-29  Filip Pizlo  <fpizlo@apple.com>
282
283         JSC should support SharedArrayBuffer
284         https://bugs.webkit.org/show_bug.cgi?id=163986
285
286         Reviewed by Keith Miller.
287
288         New tests added in the LayoutTests/workers/sab directory.
289         
290         This teaches WebCore that a typed array could be shared or not. By default, WebCore will
291         reject shared typed arrays as if they were not typed arrays. This ensures that we don't get
292         race conditions in code that can't handle it.
293         
294         If you postMessage a SharedArrayBuffer or something that wraps it, you will send the shared
295         memory to the other worker.
296
297         * Modules/encryptedmedia/CDMSessionClearKey.cpp:
298         (WebCore::CDMSessionClearKey::cachedKeyForKeyID):
299         * Modules/fetch/FetchBody.cpp:
300         (WebCore::FetchBody::extract):
301         * Modules/mediastream/RTCDataChannel.cpp:
302         (WebCore::RTCDataChannel::send):
303         * Modules/webaudio/AudioBuffer.cpp:
304         (WebCore::AudioBuffer::getChannelData):
305         * Modules/websockets/WebSocket.cpp:
306         (WebCore::WebSocket::send):
307         * bindings/js/JSBlobCustom.cpp:
308         (WebCore::constructJSBlob):
309         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
310         (WebCore::createRsaKeyGenParams):
311         * bindings/js/JSCryptoCustom.cpp:
312         (WebCore::JSCrypto::getRandomValues):
313         * bindings/js/JSCryptoOperationData.cpp:
314         (WebCore::cryptoOperationDataFromJSValue):
315         * bindings/js/JSDOMBinding.h:
316         (WebCore::toJS):
317         (WebCore::toPossiblySharedArrayBufferView):
318         (WebCore::toUnsharedArrayBufferView):
319         (WebCore::toPossiblySharedInt8Array):
320         (WebCore::toPossiblySharedInt16Array):
321         (WebCore::toPossiblySharedInt32Array):
322         (WebCore::toPossiblySharedUint8Array):
323         (WebCore::toPossiblySharedUint8ClampedArray):
324         (WebCore::toPossiblySharedUint16Array):
325         (WebCore::toPossiblySharedUint32Array):
326         (WebCore::toPossiblySharedFloat32Array):
327         (WebCore::toPossiblySharedFloat64Array):
328         (WebCore::toUnsharedInt8Array):
329         (WebCore::toUnsharedInt16Array):
330         (WebCore::toUnsharedInt32Array):
331         (WebCore::toUnsharedUint8Array):
332         (WebCore::toUnsharedUint8ClampedArray):
333         (WebCore::toUnsharedUint16Array):
334         (WebCore::toUnsharedUint32Array):
335         (WebCore::toUnsharedFloat32Array):
336         (WebCore::toUnsharedFloat64Array):
337         (WebCore::toArrayBufferView): Deleted.
338         (WebCore::toInt8Array): Deleted.
339         (WebCore::toInt16Array): Deleted.
340         (WebCore::toInt32Array): Deleted.
341         (WebCore::toUint8Array): Deleted.
342         (WebCore::toUint8ClampedArray): Deleted.
343         (WebCore::toUint16Array): Deleted.
344         (WebCore::toUint32Array): Deleted.
345         (WebCore::toFloat32Array): Deleted.
346         (WebCore::toFloat64Array): Deleted.
347         * bindings/js/JSDataCueCustom.cpp:
348         (WebCore::constructJSDataCue):
349         * bindings/js/JSDictionary.cpp:
350         (WebCore::JSDictionary::convertValue):
351         * bindings/js/JSFileCustom.cpp:
352         (WebCore::constructJSFile):
353         * bindings/js/JSMessagePortCustom.cpp:
354         (WebCore::extractTransferables):
355         * bindings/js/JSWebGLRenderingContextBaseCustom.cpp:
356         (WebCore::dataFunctionf):
357         (WebCore::dataFunctioni):
358         (WebCore::dataFunctionMatrix):
359         * bindings/js/JSXMLHttpRequestCustom.cpp:
360         (WebCore::JSXMLHttpRequest::send):
361         * bindings/js/SerializedScriptValue.cpp:
362         (WebCore::CloneSerializer::dumpArrayBufferView):
363         (WebCore::CloneSerializer::dumpIfTerminal):
364         (WebCore::CloneDeserializer::readArrayBufferView):
365         (WebCore::CloneDeserializer::readTerminal):
366         (WebCore::SerializedScriptValue::transferArrayBuffers):
367         * bindings/js/StructuredClone.cpp:
368         (WebCore::structuredCloneArrayBuffer):
369         (WebCore::structuredCloneArrayBufferView):
370         * bindings/scripts/CodeGeneratorJS.pm:
371         (JSValueToNative):
372         * css/FontFace.cpp:
373         (WebCore::FontFace::create):
374         * html/canvas/WebGL2RenderingContext.cpp:
375         (WebCore::WebGL2RenderingContext::bufferData):
376         (WebCore::WebGL2RenderingContext::bufferSubData):
377         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
378         (WebCore::MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData):
379
380 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
381
382         Make UIScriptController::zoomToScale() work on Mac WK1 and WK2
383         https://bugs.webkit.org/show_bug.cgi?id=164238
384
385         Reviewed by Dean Jackson.
386
387         Test: fast/zooming/uiscript-zooming.html
388         
389         Expose pageScaleFactor() for tests.
390
391         * testing/Internals.cpp:
392         (WebCore::Internals::pageScaleFactor):
393         * testing/Internals.h:
394         * testing/Internals.idl:
395
396 2016-10-31  Myles C. Maxfield  <mmaxfield@apple.com>
397
398         Migrate CanvasRenderingContext's internal canvas pointer to a reference
399         https://bugs.webkit.org/show_bug.cgi?id=164259
400
401         Reviewed by Dean Jackson.
402
403         It is never nullptr.
404
405         No new tests because there is no behavior change.
406
407         * html/HTMLCanvasElement.cpp:
408         (WebCore::HTMLCanvasElement::getContext):
409         * html/canvas/CanvasRenderingContext.cpp:
410         (WebCore::CanvasRenderingContext::CanvasRenderingContext):
411         (WebCore::CanvasRenderingContext::wouldTaintOrigin):
412         (WebCore::CanvasRenderingContext::checkOrigin):
413         * html/canvas/CanvasRenderingContext.h:
414         (WebCore::CanvasRenderingContext::ref):
415         (WebCore::CanvasRenderingContext::deref):
416         (WebCore::CanvasRenderingContext::canvas):
417         (WebCore::CanvasRenderingContext::checkOrigin):
418         * html/canvas/CanvasRenderingContext2D.cpp:
419         (WebCore::CanvasRenderingContext2D::CanvasRenderingContext2D):
420         (WebCore::CanvasRenderingContext2D::unwindStateStack):
421         (WebCore::CanvasRenderingContext2D::isAccelerated):
422         (WebCore::CanvasRenderingContext2D::realizeSaves):
423         (WebCore::CanvasRenderingContext2D::setStrokeStyle):
424         (WebCore::CanvasRenderingContext2D::setFillStyle):
425         (WebCore::CanvasRenderingContext2D::setShadowColor):
426         (WebCore::CanvasRenderingContext2D::resetTransform):
427         (WebCore::CanvasRenderingContext2D::setStrokeColor):
428         (WebCore::CanvasRenderingContext2D::setFillColor):
429         (WebCore::CanvasRenderingContext2D::setShadow):
430         (WebCore::CanvasRenderingContext2D::clearCanvas):
431         (WebCore::CanvasRenderingContext2D::transformAreaToDevice):
432         (WebCore::CanvasRenderingContext2D::rectContainsCanvas):
433         (WebCore::CanvasRenderingContext2D::calculateCompositingBufferRect):
434         (WebCore::CanvasRenderingContext2D::compositeBuffer):
435         (WebCore::CanvasRenderingContext2D::createPattern):
436         (WebCore::CanvasRenderingContext2D::didDrawEntireCanvas):
437         (WebCore::CanvasRenderingContext2D::didDraw):
438         (WebCore::CanvasRenderingContext2D::paintRenderingResultsToCanvas):
439         (WebCore::CanvasRenderingContext2D::drawingContext):
440         (WebCore::CanvasRenderingContext2D::getImageData):
441         (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
442         (WebCore::CanvasRenderingContext2D::putImageData):
443         (WebCore::CanvasRenderingContext2D::setFont):
444         (WebCore::CanvasRenderingContext2D::toTextDirection):
445         (WebCore::CanvasRenderingContext2D::direction):
446         (WebCore::CanvasRenderingContext2D::platformLayer):
447         * html/canvas/WebGL2RenderingContext.cpp:
448         (WebCore::WebGL2RenderingContext::WebGL2RenderingContext):
449         * html/canvas/WebGL2RenderingContext.h:
450         * html/canvas/WebGLRenderingContext.cpp:
451         (WebCore::WebGLRenderingContext::WebGLRenderingContext):
452         * html/canvas/WebGLRenderingContext.h:
453         * html/canvas/WebGLRenderingContextBase.cpp:
454         (WebCore::WebGLRenderingContextBase::create):
455         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
456         (WebCore::WebGLRenderingContextBase::setupFlags):
457         (WebCore::WebGLRenderingContextBase::markContextChanged):
458         (WebCore::WebGLRenderingContextBase::paintRenderingResultsToCanvas):
459         (WebCore::WebGLRenderingContextBase::reshape):
460         (WebCore::WebGLRenderingContextBase::isContextLostOrPending):
461         (WebCore::WebGLRenderingContextBase::readPixels):
462         (WebCore::WebGLRenderingContextBase::loseContextImpl):
463         (WebCore::WebGLRenderingContextBase::printWarningToConsole):
464         (WebCore::WebGLRenderingContextBase::dispatchContextLostEvent):
465         (WebCore::WebGLRenderingContextBase::maybeRestoreContext):
466         (WebCore::WebGLRenderingContextBase::clampedCanvasSize):
467         * html/canvas/WebGLRenderingContextBase.h:
468
469 2016-10-31  Brady Eidson  <beidson@apple.com>
470
471         Address style feedback in https://bugs.webkit.org/show_bug.cgi?id=164097
472         https://bugs.webkit.org/show_bug.cgi?id=164248
473
474         Unreviewed. Addressing review feedback (and then some) from Darin Adler on earlier patch.
475
476         No new tests (No behavior change).
477
478         * Modules/indexeddb/IDBTransaction.cpp:
479         (WebCore::IDBTransaction::commit):
480         (WebCore::IDBTransaction::createObjectStore):
481         (WebCore::IDBTransaction::renameObjectStore):
482         (WebCore::IDBTransaction::createIndex):
483         (WebCore::IDBTransaction::renameIndex):
484         (WebCore::IDBTransaction::requestOpenCursor):
485         (WebCore::IDBTransaction::doRequestOpenCursor):
486         (WebCore::IDBTransaction::iterateCursor):
487         (WebCore::IDBTransaction::requestGetAllObjectStoreRecords):
488         (WebCore::IDBTransaction::requestGetRecord):
489         (WebCore::IDBTransaction::requestGetValue):
490         (WebCore::IDBTransaction::requestGetKey):
491         (WebCore::IDBTransaction::requestIndexRecord):
492         (WebCore::IDBTransaction::requestCount):
493         (WebCore::IDBTransaction::requestDeleteRecord):
494         (WebCore::IDBTransaction::requestClearObjectStore):
495         (WebCore::IDBTransaction::requestPutOrAdd):
496         (WebCore::IDBTransaction::deleteObjectStore):
497         (WebCore::IDBTransaction::deleteIndex):
498
499         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
500         (WebCore::IDBClient::IDBConnectionProxy::createObjectStore):
501         (WebCore::IDBClient::IDBConnectionProxy::renameObjectStore):
502         (WebCore::IDBClient::IDBConnectionProxy::renameIndex):
503         (WebCore::IDBClient::IDBConnectionProxy::deleteObjectStore):
504         (WebCore::IDBClient::IDBConnectionProxy::clearObjectStore):
505         (WebCore::IDBClient::IDBConnectionProxy::createIndex):
506         (WebCore::IDBClient::IDBConnectionProxy::deleteIndex):
507         (WebCore::IDBClient::IDBConnectionProxy::putOrAdd):
508         (WebCore::IDBClient::IDBConnectionProxy::getRecord):
509         (WebCore::IDBClient::IDBConnectionProxy::getAllRecords):
510         (WebCore::IDBClient::IDBConnectionProxy::getCount):
511         (WebCore::IDBClient::IDBConnectionProxy::deleteRecord):
512         (WebCore::IDBClient::IDBConnectionProxy::openCursor):
513         (WebCore::IDBClient::IDBConnectionProxy::iterateCursor):
514
515         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
516         (WebCore::IDBServer::MemoryIDBBackingStore::beginTransaction):
517         (WebCore::IDBServer::MemoryIDBBackingStore::abortTransaction):
518         (WebCore::IDBServer::MemoryIDBBackingStore::commitTransaction):
519         (WebCore::IDBServer::MemoryIDBBackingStore::createObjectStore):
520         (WebCore::IDBServer::MemoryIDBBackingStore::deleteObjectStore):
521         (WebCore::IDBServer::MemoryIDBBackingStore::renameObjectStore):
522         (WebCore::IDBServer::MemoryIDBBackingStore::clearObjectStore):
523         (WebCore::IDBServer::MemoryIDBBackingStore::createIndex):
524         (WebCore::IDBServer::MemoryIDBBackingStore::deleteIndex):
525         (WebCore::IDBServer::MemoryIDBBackingStore::renameIndex):
526         (WebCore::IDBServer::MemoryIDBBackingStore::keyExistsInObjectStore):
527         (WebCore::IDBServer::MemoryIDBBackingStore::deleteRange):
528         (WebCore::IDBServer::MemoryIDBBackingStore::addRecord):
529         (WebCore::IDBServer::MemoryIDBBackingStore::getRecord):
530         (WebCore::IDBServer::MemoryIDBBackingStore::getAllRecords):
531         (WebCore::IDBServer::MemoryIDBBackingStore::getIndexRecord):
532         (WebCore::IDBServer::MemoryIDBBackingStore::getCount):
533         (WebCore::IDBServer::MemoryIDBBackingStore::generateKeyNumber):
534         (WebCore::IDBServer::MemoryIDBBackingStore::openCursor):
535         (WebCore::IDBServer::MemoryIDBBackingStore::iterateCursor):
536
537         * Modules/indexeddb/shared/IDBResultData.cpp:
538         (WebCore::IDBResultData::error):
539         (WebCore::IDBResultData::openDatabaseSuccess):
540         (WebCore::IDBResultData::openDatabaseUpgradeNeeded):
541         (WebCore::IDBResultData::deleteDatabaseSuccess):
542         (WebCore::IDBResultData::putOrAddSuccess):
543         (WebCore::IDBResultData::getRecordSuccess):
544         (WebCore::IDBResultData::getAllRecordsSuccess):
545         (WebCore::IDBResultData::getCountSuccess):
546         (WebCore::IDBResultData::openCursorSuccess):
547         (WebCore::IDBResultData::iterateCursorSuccess):
548
549 2016-10-31  Ryosuke Niwa  <rniwa@webkit.org>
550
551         Enable custom elements by default everywhere
552         https://bugs.webkit.org/show_bug.cgi?id=164242
553
554         Reviewed by Antti Koivisto.
555
556         Set the status of Custom Elements API to "Done".
557
558         * features.json:
559
560 2016-10-31  Ryan Haddad  <ryanhaddad@apple.com>
561
562         Unreviewed, rolling out r207967.
563
564         This change seems to be the cause of at least one LayoutTest
565         becoming flaky.
566
567         Reverted changeset:
568
569         "REGRESSION(r207753-207755): ASSERTION FAILED:
570         m_parsedStyleSheetCache->isInMemoryCache()"
571         https://bugs.webkit.org/show_bug.cgi?id=163905
572         http://trac.webkit.org/changeset/207967
573
574 2016-10-31  Joseph Pecoraro  <pecoraro@apple.com>
575
576         Web Inspector: Shadow DOM scoped styles are missing
577         https://bugs.webkit.org/show_bug.cgi?id=164247
578         <rdar://problem/29035061>
579
580         Reviewed by Antti Koivisto.
581
582         Test: inspector/css/shadow-scoped-style.html
583
584         * css/ElementRuleCollector.cpp:
585         (WebCore::ElementRuleCollector::matchAuthorRules):
586         Only match :host pseudo class for NOPSEUDO. It doesn't make sense
587         with a pseudo element request (:host::before does not make sense).
588
589         * css/InspectorCSSOMWrappers.h:
590         * css/InspectorCSSOMWrappers.cpp:
591         (WebCore::InspectorCSSOMWrappers::collectFromStyleSheetContents):
592         (WebCore::InspectorCSSOMWrappers::collectDocumentWrappers):
593         (WebCore::InspectorCSSOMWrappers::getWrapperForRuleInSheets):
594         Simplify existing "once per document" wrapper collection.
595
596         (WebCore::InspectorCSSOMWrappers::maybeCollectFromStyleSheets):
597         (WebCore::InspectorCSSOMWrappers::collectScopeWrappers):
598         Include a path to add style sheets that weren't already collected.
599         This will be useful when trying the StyleScope stylesheets which
600         are different for different nodes.
601
602         * inspector/InspectorCSSAgent.cpp:
603         (WebCore::containingStyleScopeForElement):        
604         (WebCore::InspectorCSSAgent::buildObjectForRule):
605         Collect rules for document and StyleScope sheets separately.
606         For elements with a shadow root, add the root's sheets as
607         well in case there are :host rules that affect the element.
608
609 2016-10-31  Ryan Haddad  <ryanhaddad@apple.com>
610
611         Unreviewed, rolling out r208180.
612
613         This change caused fast/shadow-dom/slotted-pseudo-element-css-
614         text.html to crash on macOS and iOS on every test run.
615
616         Reverted changeset:
617
618         "[CSS Parser] Support the shadow DOM"
619         https://bugs.webkit.org/show_bug.cgi?id=164240
620         http://trac.webkit.org/changeset/208180
621
622 2016-10-31  Nan Wang  <n_wang@apple.com>
623
624         AX: aria-sort is not exposed on iOS
625         https://bugs.webkit.org/show_bug.cgi?id=164245
626
627         Reviewed by Chris Fleizach.
628
629         Exposed the aria-sort attribute value in accessibilitySortDirection.
630
631         Test: accessibility/ios-simulator/aria-sort-ios.html
632
633         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
634         (-[WebAccessibilityObjectWrapper accessibilitySortDirection]):
635
636 2016-10-31  Ryan Haddad  <ryanhaddad@apple.com>
637
638         Unreviewed, rolling out r208178.
639
640         The test added with this change fails or times out on macOS
641         and iOS.
642
643         Reverted changeset:
644
645         "[Modern Media Controls] Media Controller: Airplay support"
646         https://bugs.webkit.org/show_bug.cgi?id=163729
647         http://trac.webkit.org/changeset/208178
648
649 2016-10-31  Ryan Haddad  <ryanhaddad@apple.com>
650
651         Unreviewed, rolling out r208182.
652
653         Both of the tests added with this change time out on macOS
654         Release.
655
656         Reverted changeset:
657
658         "[Modern Media Controls] Media Controller: Placard support"
659         https://bugs.webkit.org/show_bug.cgi?id=163731
660         http://trac.webkit.org/changeset/208182
661
662 2016-10-31  Brady Eidson  <beidson@apple.com>
663
664         IndexedDB 2.0: Support IDBObjectStore getAll/getAllKeys.
665         <rdar://problem/28806934> and https://bugs.webkit.org/show_bug.cgi?id=164097
666
667         Reviewed by Darin Adler.
668
669         Tests: storage/indexeddb/modern/idbobjectstore-getall-1-private.html
670                storage/indexeddb/modern/idbobjectstore-getall-1.html
671                storage/indexeddb/modern/idbobjectstore-getallkeys-1-private.html
672                storage/indexeddb/modern/idbobjectstore-getallkeys-1.html
673                Existing imported W3C tests.
674
675         - Add new objects for "IDBGetAllRequestData" and "IDBGetAllResult" to represent these
676           new requests and responses.
677         - Add lots of boilerplate code to move these new objects around in the IDB machinery.
678         - Update "GetRecord" code to be shared with "GetAll" code where necessary.
679         - Other tweaks here and there.
680
681         * WebCore.xcodeproj/project.pbxproj:
682         * CMakeLists.txt:
683
684         * Modules/indexeddb/IDBGetAllResult.cpp: Added.
685         (WebCore::isolatedCopyOfVariant):
686         (WebCore::IDBGetAllResult::isolatedCopy):
687         (WebCore::IDBGetAllResult::addKey):
688         (WebCore::IDBGetAllResult::addValue):
689         (WebCore::IDBGetAllResult::keys):
690         (WebCore::IDBGetAllResult::values):
691         (WebCore::IDBGetAllResult::allBlobFilePaths):
692         * Modules/indexeddb/IDBGetAllResult.h: Added.
693         (WebCore::IDBGetAllResult::IDBGetAllResult):
694         (WebCore::IDBGetAllResult::type):
695         (WebCore::IDBGetAllResult::encode):
696         (WebCore::IDBGetAllResult::decode):
697
698         * Modules/indexeddb/IDBObjectStore.cpp:
699         (WebCore::IDBObjectStore::getAll):
700         (WebCore::IDBObjectStore::getAllKeys):
701         * Modules/indexeddb/IDBObjectStore.h:
702         * Modules/indexeddb/IDBObjectStore.idl:
703
704         * Modules/indexeddb/IDBRequest.cpp:
705         (WebCore::IDBRequest::setResult):
706         * Modules/indexeddb/IDBRequest.h:
707
708         * Modules/indexeddb/IDBTransaction.cpp:
709         (WebCore::IDBTransaction::requestGetAllObjectStoreRecords):
710         (WebCore::IDBTransaction::getAllRecordsOnServer):
711         (WebCore::IDBTransaction::didGetAllRecordsOnServer):
712         * Modules/indexeddb/IDBTransaction.h:
713
714         * Modules/indexeddb/IndexedDB.h:
715
716         * Modules/indexeddb/client/IDBConnectionProxy.cpp:
717         (WebCore::IDBClient::IDBConnectionProxy::getAllRecords):
718         * Modules/indexeddb/client/IDBConnectionProxy.h:
719
720         * Modules/indexeddb/client/IDBConnectionToServer.cpp:
721         (WebCore::IDBClient::IDBConnectionToServer::getAllRecords):
722         (WebCore::IDBClient::IDBConnectionToServer::didGetAllRecords):
723         * Modules/indexeddb/client/IDBConnectionToServer.h:
724         * Modules/indexeddb/client/IDBConnectionToServerDelegate.h:
725
726         * Modules/indexeddb/server/IDBBackingStore.h:
727
728         * Modules/indexeddb/server/IDBConnectionToClient.cpp:
729         (WebCore::IDBServer::IDBConnectionToClient::didGetAllRecords):
730         * Modules/indexeddb/server/IDBConnectionToClient.h:
731         * Modules/indexeddb/server/IDBConnectionToClientDelegate.h:
732
733         * Modules/indexeddb/server/IDBServer.cpp:
734         (WebCore::IDBServer::IDBServer::getAllRecords):
735         * Modules/indexeddb/server/IDBServer.h:
736
737         * Modules/indexeddb/server/MemoryIDBBackingStore.cpp:
738         (WebCore::IDBServer::MemoryIDBBackingStore::getAllRecords):
739         * Modules/indexeddb/server/MemoryIDBBackingStore.h:
740
741         * Modules/indexeddb/server/MemoryObjectStore.cpp:
742         (WebCore::IDBServer::MemoryObjectStore::getAllRecords):
743         * Modules/indexeddb/server/MemoryObjectStore.h:
744
745         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
746         (WebCore::IDBServer::queryForGetAllRecords):
747         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllRecords):
748         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
749
750         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
751         (WebCore::IDBServer::UniqueIDBDatabase::hasAnyPendingCallbacks):
752         (WebCore::IDBServer::UniqueIDBDatabase::storeCallbackOrFireError):
753         (WebCore::IDBServer::UniqueIDBDatabase::getAllRecords):
754         (WebCore::IDBServer::UniqueIDBDatabase::performGetAllRecords):
755         (WebCore::IDBServer::UniqueIDBDatabase::didPerformGetAllRecords):
756         (WebCore::IDBServer::UniqueIDBDatabase::performGetAllResultsCallback):
757         * Modules/indexeddb/server/UniqueIDBDatabase.h:
758
759         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.cpp:
760         (WebCore::IDBServer::UniqueIDBDatabaseTransaction::getAllRecords):
761         * Modules/indexeddb/server/UniqueIDBDatabaseTransaction.h:
762
763         * Modules/indexeddb/shared/IDBGetAllRecordsData.cpp: Added.
764         (WebCore::IDBGetAllRecordsData::isolatedCopy):
765         * Modules/indexeddb/shared/IDBGetAllRecordsData.h: Added.
766         (WebCore::IDBGetAllRecordsData::encode):
767         (WebCore::IDBGetAllRecordsData::decode):
768
769         * Modules/indexeddb/shared/IDBResultData.cpp:
770         (WebCore::IDBResultData::IDBResultData):
771         (WebCore::IDBResultData::getAllRecordsSuccess):
772         (WebCore::IDBResultData::getAllResult):
773         * Modules/indexeddb/shared/IDBResultData.h:
774         (WebCore::IDBResultData::encode):
775         (WebCore::IDBResultData::decode):
776
777         * Modules/indexeddb/shared/InProcessIDBServer.cpp:
778         (WebCore::InProcessIDBServer::didGetAllRecords):
779         (WebCore::InProcessIDBServer::getAllRecords):
780         * Modules/indexeddb/shared/InProcessIDBServer.h:
781
782         * bindings/js/IDBBindingUtilities.cpp:
783         (WebCore::deserializeIDBValueToJSValue):
784         (WebCore::toJS):
785         * bindings/js/IDBBindingUtilities.h:
786
787 2016-10-31  Ryosuke Niwa  <rniwa@webkit.org>
788
789         GTK+ and EFL build fixes after r208176.
790
791         * css/PropertySetCSSStyleDeclaration.cpp:
792
793 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
794
795         Fix #include case.
796
797         * page/IntersectionObserverEntry.h:
798
799 2016-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
800
801         [WK1] Candidate visibility should not update as a result of selection during a dictionary lookup
802         https://bugs.webkit.org/show_bug.cgi?id=164236
803         <rdar://problem/28747712>
804
805         Reviewed by Beth Dakin.
806
807         Moves state that keeps track of whether or not a dictionary lookup is active from the WebPage to the Editor, so
808         that when clicking a text field or contenteditable in WK1 or WK2, we are able to avoid notifying the
809         WebEditorClient of the selection change.
810
811         Changes to WK2 are covered by existing unit tests in WKWebViewCandidateTests which verify that clicking does not
812         thrash candidate list visibility. A similar test will be added in the future for the WK1 case in CandidateTests.
813
814         * editing/Editor.h:
815         (WebCore::Editor::setIsGettingDictionaryPopupInfo):
816         (WebCore::Editor::isGettingDictionaryPopupInfo):
817
818 2016-10-31  Antoine Quint  <graouts@apple.com>
819
820         [Modern Media Controls] Media Controller: Placard support
821         https://bugs.webkit.org/show_bug.cgi?id=163731
822         <rdar://problem/28869598>
823
824         Reviewed by Dean Jackson.
825
826         We introduce the PlacardSupport class which brings support for showing the
827         appropriate placard when the media is played via AirPlay or in picture-in-picture.
828
829         Tests: media/modern-media-controls/placard-support/placard-support-airplay.html
830                media/modern-media-controls/placard-support/placard-support-pip.html
831
832         * Modules/modern-media-controls/js-files:
833         * Modules/modern-media-controls/media/media-controller.js:
834         (MediaController):
835         * Modules/modern-media-controls/media/placard-support.js: Added.
836         (PlacardSupport):
837         (PlacardSupport.prototype.get mediaEvents):
838         (PlacardSupport.prototype.handleEvent):
839         (PlacardSupport.prototype._updatePlacard):
840         * WebCore.xcodeproj/project.pbxproj:
841
842 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
843
844         Implement IntersectionObserver
845         https://bugs.webkit.org/show_bug.cgi?id=159475
846
847         Reviewed by Ryosuke Niwa.
848         
849         Add bindings support for Intersection Observer
850         <https://wicg.github.io/IntersectionObserver/>
851         
852         Code is wrapped in ENABLE(INTERSECTION_OBSERVER), and controlled by a runtime
853         Setting (off by default for now).
854         
855         A minor bindings change was required to fix the callback code.
856         
857         IntersectionObserver is just a shell for now.
858
859         Tests: intersection-observer/intersection-observer-entry-interface.html
860                intersection-observer/intersection-observer-interface.html
861
862         * CMakeLists.txt:
863         * Configurations/FeatureDefines.xcconfig:
864         * DerivedSources.make:
865         * WebCore.xcodeproj/project.pbxproj:
866         * bindings/scripts/CodeGeneratorJS.pm:
867         (ShouldPassWrapperByReference):
868         * bindings/scripts/test/JS/JSTestObj.cpp:
869         (WebCore::JSTestObjConstructor::construct):
870         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
871         (WebCore::JSTestTypedefsConstructor::construct):
872         * page/IntersectionObserver.cpp: Added.
873         (WebCore::IntersectionObserver::IntersectionObserver):
874         (WebCore::IntersectionObserver::observe):
875         (WebCore::IntersectionObserver::unobserve):
876         (WebCore::IntersectionObserver::disconnect):
877         (WebCore::IntersectionObserver::takeRecords):
878         * page/IntersectionObserver.h: Added.
879         (WebCore::IntersectionObserver::create):
880         (WebCore::IntersectionObserver::root):
881         (WebCore::IntersectionObserver::rootMargin):
882         (WebCore::IntersectionObserver::thresholds):
883         * page/IntersectionObserver.idl: Added.
884         * page/IntersectionObserverCallback.h: Added.
885         (WebCore::IntersectionObserverCallback::~IntersectionObserverCallback):
886         * page/IntersectionObserverCallback.idl: Added.
887         * page/IntersectionObserverEntry.cpp: Added.
888         (WebCore::IntersectionObserverEntry::IntersectionObserverEntry):
889         * page/IntersectionObserverEntry.h: Added.
890         (WebCore::IntersectionObserverEntry::create):
891         (WebCore::IntersectionObserverEntry::time):
892         (WebCore::IntersectionObserverEntry::rootBounds):
893         (WebCore::IntersectionObserverEntry::boundingClientRect):
894         (WebCore::IntersectionObserverEntry::intersectionRect):
895         (WebCore::IntersectionObserverEntry::target):
896         (WebCore::IntersectionObserverEntry::intersectionRatio):
897         * page/IntersectionObserverEntry.idl: Added.
898         * page/Settings.in:
899
900 2016-10-31  Dave Hyatt  <hyatt@apple.com>
901
902         [CSS Parser] Support the shadow DOM
903         https://bugs.webkit.org/show_bug.cgi?id=164240
904
905         Reviewed by Dean Jackson.
906
907         * css/CSSSelector.cpp:
908         (WebCore::CSSSelector::selectorText):
909         Remove ShadowDeep, ShadowSlot and ShadowPseudo in favor of our
910         ShadowDescendant combinator.
911
912         * css/CSSSelector.h:
913         * css/SelectorChecker.cpp:
914         (WebCore::SelectorChecker::matchRecursively):
915         Remove ShadowDeep, ShadowSlot and ShadowPseudo in favor of our
916         ShadowDescendant combinator.
917
918         * css/SelectorFilter.cpp:
919         (WebCore::SelectorFilter::collectIdentifierHashes):
920         Remove ShadowDeep, ShadowSlot and ShadowPseudo in favor of our
921         ShadowDescendant combinator.
922
923         * css/SelectorPseudoElementTypeMap.in:
924         Add support for slotted.
925
926         * css/parser/CSSParserValues.cpp:
927         (WebCore::CSSParserSelector::appendTagHistory):
928         * css/parser/CSSParserValues.h:
929         (WebCore::CSSParserSelector::needsImplicitShadowCombinatorForMatching):
930         Remove ShadowDeep, ShadowSlot and ShadowPseudo in favor of our
931         ShadowDescendant combinator. Take :slotted out of
932         needsImplicitShadowCombinatorForMatching(), since our code doesn't do
933         this for :slotted.
934
935         * css/parser/CSSSelectorParser.cpp:
936         (WebCore::isPseudoClassFunction):
937         :host can be both an id and a function, so don't restrict it.
938
939         (WebCore::CSSSelectorParser::consumePseudo):
940         Put in a hack for :host (inside the hack we already plan on removing
941         once we turn on).
942
943         (WebCore::CSSSelectorParser::consumeCombinator):
944         Remove deep shadow combinator support, as we don't support matching
945         on it.
946
947         (WebCore::CSSSelectorParser::prependTypeSelectorIfNeeded):
948         (WebCore::CSSSelectorParser::splitCompoundAtImplicitShadowCrossingCombinator):
949         Make the split use our combinator, ShadowDescendant, and no longer do anything
950         special with :slotted.
951
952         * cssjit/SelectorCompiler.cpp:
953         (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation):
954         Remove ShadowDeep, ShadowSlot and ShadowPseudo in favor of our
955         ShadowDescendant combinator.
956
957 2016-10-31  Joseph Pecoraro  <pecoraro@apple.com>
958
959         Use #pragma once in WebCore
960         https://bugs.webkit.org/show_bug.cgi?id=164194
961
962         Rubber-stamped by Sam Weinig.
963
964         * accessibility/*.h:
965         * bindings/*.h:
966         * contentextensions/*.h:
967         * dom/*.h:
968         * html/*.h:
969         * page/*.h:
970         Use #pragma once in headers.
971
972         * html/parser/ParsingUtilities.h:
973         Add missing namespace.
974
975         * html/track/VTTScanner.h:
976         (WebCore::VTTScanner::skipWhile):
977         (WebCore::VTTScanner::skipUntil):
978         (WebCore::VTTScanner::collectWhile):
979         (WebCore::VTTScanner::collectUntil):
980         Include namespace.
981
982 2016-10-31  Antoine Quint  <graouts@apple.com>
983
984         [Modern Media Controls] Media Controller: Airplay support
985         https://bugs.webkit.org/show_bug.cgi?id=163729
986
987         Reviewed by Dean Jackson.
988
989         We introduce the AirplaySupport class which brings support for playing the media
990         via Airplay by clicking on the Airplay button in the media controls and correctly
991         reflecting when the media is played through Airplay via the media API. The enabled
992         state of the Airplay button is also tied to Airplay sources being available.
993
994         Test: media/modern-media-controls/airplay-support/airplay-support.html
995
996         * Modules/modern-media-controls/controls/airplay-button.js:
997         (AirplayButton.prototype.get on):
998         * Modules/modern-media-controls/js-files:
999         * Modules/modern-media-controls/media/airplay-support.js: Added.
1000         (AirplaySupport.prototype.get control):
1001         (AirplaySupport.prototype.get mediaEvents):
1002         (AirplaySupport.prototype.buttonWasClicked):
1003         (AirplaySupport.prototype.handleEvent):
1004         (AirplaySupport.prototype.syncControl):
1005         (AirplaySupport):
1006         * Modules/modern-media-controls/media/media-controller.js:
1007         (MediaController):
1008         * WebCore.xcodeproj/project.pbxproj:
1009
1010 2016-10-31  Joseph Pecoraro  <pecoraro@apple.com>
1011
1012         Web Inspector: Provide an opportunity to clear ScriptValues associated with debugged target
1013         https://bugs.webkit.org/show_bug.cgi?id=164167
1014         <rdar://problem/29010148>
1015
1016         Reviewed by Mark Lam.
1017
1018         * inspector/InspectorController.cpp:
1019         (WebCore::InspectorController::inspectedPageDestroyed):
1020         Page is going away, discard values.
1021
1022         * inspector/WorkerInspectorController.h:
1023         * inspector/WorkerInspectorController.cpp:
1024         (WebCore::WorkerInspectorController::workerTerminating):
1025         Worker is going away, discard values.
1026
1027 2016-10-31  Ryosuke Niwa  <rniwa@webkit.org>
1028
1029         CSSStyleDeclaration should be annotated with CEReactions
1030         https://bugs.webkit.org/show_bug.cgi?id=163968
1031
1032         Reviewed by Antti Koivisto.
1033
1034         Added CEReactions to CSSStyleDeclaration.idl.
1035
1036         Test: fast/custom-elements/reactions/CSSStyleDeclaration.html
1037
1038         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
1039         (WebCore::JSCSSStyleDeclaration::putDelegate):
1040         * css/CSSStyleDeclaration.idl:
1041         * css/PropertySetCSSStyleDeclaration.cpp:
1042         (WebCore::StyleAttributeMutationScope::StyleAttributeMutationScope): Remember the old value when this is
1043         an inline style declaration for a custom element. Also store m_oldValue and m_customElement instead of
1044         a mutation record so that we don't create a superfluous mutation record for custom elements.
1045         (WebCore::StyleAttributeMutationScope::~StyleAttributeMutationScope): Enqueue attributeChangedCallback
1046         when m_customElement is not null.
1047         * dom/CustomElementReactionQueue.cpp:
1048         (WebCore::CustomElementReactionQueue::observesStyleAttribute):
1049         * dom/CustomElementReactionQueue.h:
1050
1051 2016-10-31  Jer Noble  <jer.noble@apple.com>
1052
1053         Unreviewed build fix for the build fix; AVStreamDataParser not defined on iOS.
1054
1055         * platform/spi/mac/AVFoundationSPI.h:
1056
1057 2016-10-31  Zalan Bujtas  <zalan@apple.com>
1058
1059         LayoutTests/fast/frames/invalid-frameset.html is not clean by the end of FrameView::layout().
1060         https://bugs.webkit.org/show_bug.cgi?id=164230
1061
1062         Reviewed by Simon Fraser.
1063
1064         When a <frameset> has invalid children, in addition to clear the needs layout flag on the children
1065         we also need to do clear the descendants too.
1066
1067         Covered by LayoutTests/fast/frames/invalid-frameset.html.
1068
1069         * rendering/RenderFrameSet.cpp:
1070         (WebCore::RenderFrameSet::positionFrames):
1071
1072 2016-10-31  Jer Noble  <jer.noble@apple.com>
1073
1074         Unreviewed build fix after r208151; outputMIMECodecParameterForInputMIMECodecParameter not
1075         defined pre-Sierra.
1076
1077         * platform/spi/mac/AVFoundationSPI.h:
1078
1079 2016-10-31  Zalan Bujtas  <zalan@apple.com>
1080
1081         ASSERTION FAILED: !m_trailingWhitespaceWidth in WebCore::SimpleLineLayout::LineState::removeTrailingWhitespace
1082         https://bugs.webkit.org/show_bug.cgi?id=164076
1083
1084         Reviewed by Antti Koivisto.
1085
1086         FontCascade's text measure methods return NaN for zero sized fonts. We could actually early return and not
1087         measure text with zero font size at all.
1088
1089         Test: fast/text/simple-line-layout-with-zero-sized-font.html
1090
1091         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
1092         (WebCore::SimpleLineLayout::TextFragmentIterator::textWidth):
1093         (WebCore::SimpleLineLayout::TextFragmentIterator::runWidth):
1094
1095 2016-10-31  Dave Hyatt  <hyatt@apple.com>
1096
1097         [CSS Parser] Support -webkit-named-image
1098         https://bugs.webkit.org/show_bug.cgi?id=164235
1099
1100         Reviewed by Dean Jackson.
1101
1102         * css/CSSValueKeywords.in:
1103         * css/parser/CSSPropertyParserHelpers.cpp:
1104         (WebCore::CSSPropertyParserHelpers::consumeWebkitNamedImage):
1105         (WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
1106         (WebCore::CSSPropertyParserHelpers::isGeneratedImage):
1107
1108 2016-10-28  Brent Fulgham  <bfulgham@apple.com>
1109
1110         Do a better job of protecting Frame objects in the context of JavaScript calls
1111         https://bugs.webkit.org/show_bug.cgi?id=164163
1112         <rdar://problem/28955249>
1113
1114         Reviewed by Darin Adler.
1115
1116         * editing/AlternativeTextController.cpp:
1117         (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection): Protected the Frame.
1118         * editing/Editor.cpp:
1119         (WebCore::Editor::setTextAsChildOfElement): Ditto.
1120         * editing/EditorCommand.cpp:
1121         (WebCore::executeSwapWithMark): Ditto.
1122         * editing/TypingCommand.cpp:
1123         (WebCore::TypingCommand::deleteKeyPressed): Ditto.
1124         (WebCore::TypingCommand::forwardDeleteKeyPressed): Ditto.
1125         * editing/mac/EditorMac.mm:
1126         (WebCore::Editor::replaceNodeFromPasteboard): Ditto.
1127         * page/ContextMenuController.cpp:
1128         (WebCore::ContextMenuController::contextMenuItemSelected): Ditto.
1129         * page/DOMSelection.cpp:
1130         (WebCore::DOMSelection::collapse): Ditto.
1131         (WebCore::DOMSelection::collapseToEnd): Ditto.
1132         (WebCore::DOMSelection::collapseToStart): Ditto.
1133         (WebCore::DOMSelection::setBaseAndExtent): Ditto.
1134         (WebCore::DOMSelection::setPosition): Ditto.
1135         (WebCore::DOMSelection::modify): Ditto.
1136         (WebCore::DOMSelection::extend): Ditto.
1137         (WebCore::DOMSelection::addRange): Ditto.
1138         (WebCore::DOMSelection::deleteFromDocument): Ditto.
1139         * page/DragController.cpp:
1140         (WebCore::setSelectionToDragCaret): Ditto.
1141         (WebCore::DragController::startDrag): Ditto.
1142         * page/Frame.cpp:
1143         (WebCore::Frame::checkOverflowScroll): Ditto.
1144         * page/TextIndicator.cpp:
1145         (WebCore::TextIndicator::createWithRange): Ditto.
1146
1147 2016-10-31  Dave Hyatt  <hyatt@apple.com>
1148
1149         [CSS Parser] Make sure to fail on :role(a,b) and :dir(a,b)
1150         https://bugs.webkit.org/show_bug.cgi?id=164233
1151
1152         Reviewed by Dean Jackson.
1153
1154         * css/parser/CSSSelectorParser.cpp:
1155         (WebCore::CSSSelectorParser::consumePseudo):
1156
1157 2016-10-31  Dave Hyatt  <hyatt@apple.com>
1158
1159         [CSS Parser] Allow unitless values on background-size in quirks mode
1160         https://bugs.webkit.org/show_bug.cgi?id=164232
1161
1162         Reviewed by Dean Jackson.
1163
1164         * css/parser/CSSPropertyParser.cpp:
1165         (WebCore::consumeBackgroundSize):
1166
1167 2016-10-31  Jer Noble  <jer.noble@apple.com>
1168
1169         Unreviewed build fix after r208151; _setPreventsSleepDuringVideoPlayback: only defined in non-simulator SDKs.
1170
1171         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1172         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
1173         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
1174         * platform/spi/mac/AVFoundationSPI.h:
1175
1176 2016-10-31  Nan Wang  <n_wang@apple.com>
1177
1178         AX: iOS Voiceover does not announce previously selected value from input type="date" form field
1179         https://bugs.webkit.org/show_bug.cgi?id=164176
1180
1181         Reviewed by Chris Fleizach.
1182
1183         Input type date is a popup button on iOS and its value was not exposed in stringValue() since
1184         it's not considered a text control. Instead, the value was exposed in AXTitle. Fixed this by adding
1185         the case in stringValue() and removing the AXTitle exposure.
1186
1187         Changes are covered in modified test.
1188
1189         * accessibility/AccessibilityObject.h:
1190         * accessibility/AccessibilityRenderObject.cpp:
1191         (WebCore::AccessibilityRenderObject::stringValue):
1192         * accessibility/ios/AccessibilityObjectIOS.mm:
1193         (WebCore::AccessibilityObject::isInputTypePopupButton):
1194         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1195         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
1196
1197 2016-10-31  Simon Fraser  <simon.fraser@apple.com>
1198
1199         Add requestIdleCallback to features.json.
1200
1201         * features.json:
1202
1203 2016-10-31  Dave Hyatt  <hyatt@apple.com>
1204
1205         [CSS Parser] Fully support prefixed background-size and box-shadows
1206         https://bugs.webkit.org/show_bug.cgi?id=164228
1207
1208         Reviewed by Zalan Bujtas.
1209
1210         * css/parser/CSSPropertyParser.cpp:
1211         (WebCore::CSSPropertyParser::parseSingleValue):
1212
1213 2016-10-31  Dave Hyatt  <hyatt@apple.com>
1214
1215         [CSS Parser] Get rid of CSSCustomIdentValue::creates
1216         https://bugs.webkit.org/show_bug.cgi?id=164225
1217
1218         Reviewed by Zalan Bujtas.
1219
1220         Get rid of all instances of CSSCustomIdent::create, since our style
1221         resolution code isn't prepared to handle that value type yet.
1222
1223         * css/parser/CSSPropertyParser.cpp:
1224         (WebCore::consumeAnimationName):
1225         (WebCore::consumeTransitionProperty):
1226         (WebCore::consumeAttr):
1227
1228 2016-10-31  Jer Noble  <jer.noble@apple.com>
1229
1230         Opt-out of AVPlayer automatic sleep disabling
1231         https://bugs.webkit.org/show_bug.cgi?id=163983
1232
1233         Reviewed by Eric Carlson.
1234
1235         In addition to the DisplaySleepDisabler, notify the MediaPlayerPrivateAVFoundationObjC object whether
1236         it should disable display sleep.  Provide all the necessary boilerplate to allow the media player private
1237         to query the HTMLMediaPlayer so that the correct value can be set on AVPlayer upon creation.
1238
1239         * html/HTMLMediaElement.cpp:
1240         (WebCore::HTMLMediaElement::updateSleepDisabling):
1241         * html/HTMLMediaElement.h:
1242         * platform/graphics/MediaPlayer.cpp:
1243         (WebCore::MediaPlayer::setShouldDisableSleep):
1244         (WebCore::MediaPlayer::shouldDisableSleep):
1245         * platform/graphics/MediaPlayer.h:
1246         (WebCore::MediaPlayerClient::mediaPlayerShouldDisableSleep):
1247         * platform/graphics/MediaPlayerPrivate.h:
1248         (WebCore::MediaPlayerPrivateInterface::setShouldDisableSleep):
1249         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
1250         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1251         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer):
1252         (WebCore::MediaPlayerPrivateAVFoundationObjC::setShouldDisableSleep):
1253
1254         Drive-by fix: Re-organize the contents of AVFoundationSPI.h so that there's a single top-level
1255         #if USE(APPLE_INTERNAL_SDK) statement, rather than that conditional being sprinkled about the
1256         file.
1257
1258         * platform/spi/mac/AVFoundationSPI.h:
1259
1260 2016-10-31  Jer Noble  <jer.noble@apple.com>
1261
1262         REGRESSION (r206300): LayoutTest media/media-source/media-source-duplicate-seeked.html timing out
1263         https://bugs.webkit.org/show_bug.cgi?id=162496
1264
1265         Reviewed by Darin Adler.
1266
1267         The change to MockMediaSourcePrivate in r206300 revealed a true bug: seeks to the MediaSource's duration
1268         will always fail. We should discard out of hand seeks which are greater than the duration, but allow seeks
1269         directly to the duration.
1270
1271         * Modules/mediasource/MediaSource.cpp:
1272         (WebCore::MediaSource::hasBufferedTime):
1273
1274 2016-10-31  Jer Noble  <jer.noble@apple.com>
1275
1276         Allow multiple playing videos on a page with 'autoplay' and 'playsinline' attributes
1277         https://bugs.webkit.org/show_bug.cgi?id=162366
1278         <rdar://problem/28639600>
1279
1280         Reviewed by Eric Carlson.
1281
1282         Tests: media/video-concurrent-visible-playback.html
1283                media/video-multiple-concurrent-playback.html
1284
1285         Separate out the concept of "video-only" from "video-with-audio" in PlatformMediaSession::MediaType,
1286         and only set the ConcurrentPlaybackNotPermitted restriction for "video-with-audio".  This allows multiple
1287         silent video elements to play back simultaneously.
1288
1289         However, the bug in question also shows bad behavior when both concurrent playback and invisible playback
1290         are not allowed. Namely, an invisible element will attempt to autoplay, interrupt visible elements, and
1291         then fail to play due to it's non-visibility.  Add an extra check to canTransitionFromAutoplayToPlay()
1292         which asks the session if autoplay is allowed (which will return false if the element is not visible).
1293
1294         * html/HTMLMediaElement.cpp:
1295         (WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay):
1296         (WebCore::HTMLMediaElement::mediaType):
1297         (WebCore::HTMLMediaElement::presentationType):
1298         (WebCore::HTMLMediaElement::updateShouldAutoplay):
1299         (WebCore::mediaElementIsAllowedToAutoplay): Deleted.
1300         * html/MediaElementSession.cpp:
1301         (WebCore::MediaElementSession::autoplayPermitted):
1302         * html/MediaElementSession.h:
1303         * platform/audio/PlatformMediaSession.h:
1304         * platform/audio/ios/MediaSessionManagerIOS.mm:
1305         (WebCore::MediaSessionManageriOS::resetRestrictions):
1306         * testing/Internals.cpp:
1307         (WebCore::Internals::setMediaSessionRestrictions):
1308
1309 2016-10-31  Dave Hyatt  <hyatt@apple.com>
1310
1311         [CSS Parser] Support unprefixed cross-fade
1312         https://bugs.webkit.org/show_bug.cgi?id=164224
1313
1314         Reviewed by Zalan Bujtas.
1315
1316         * css/CSSValueKeywords.in:
1317         * css/parser/CSSPropertyParserHelpers.cpp:
1318         (WebCore::CSSPropertyParserHelpers::consumeCrossFade):
1319         (WebCore::CSSPropertyParserHelpers::consumeGeneratedImage):
1320
1321 2016-10-31  Dave Hyatt  <hyatt@apple.com>
1322
1323         [CSS Parser] Simplify background-position-x/y style mapping
1324         https://bugs.webkit.org/show_bug.cgi?id=164223
1325
1326         Reviewed by Zalan Bujtas.
1327
1328         * css/CSSToStyleMap.cpp:
1329         (WebCore::CSSToStyleMap::mapFillXPosition):
1330         (WebCore::CSSToStyleMap::mapFillYPosition):
1331         * css/StyleBuilderConverter.h:
1332         (WebCore::StyleBuilderConverter::convertFontSynthesis):
1333
1334 2016-10-31  Darin Adler  <darin@apple.com>
1335
1336         Move ChildNode and ParentNode from ExceptionCode to Exception, add support for ExceptionOr<T&>
1337         https://bugs.webkit.org/show_bug.cgi?id=164214
1338
1339         Reviewed by Alex Christensen.
1340
1341         * Modules/fetch/FetchRequest.cpp:
1342         (WebCore::FetchRequest::initializeOptions): Use FetchHeaders& instead of
1343         Ref<FetchHeaders> for return value.
1344         (WebCore::FetchRequest::initializeWith): Ditto.
1345         * Modules/fetch/FetchRequest.h: Updated for above.
1346
1347         * Modules/mediasource/MediaSource.cpp:
1348         (WebCore::MediaSource::addSourceBuffer): Use SourceBuffer& instead of
1349         SourceBuffer* for return value.
1350         * Modules/mediasource/MediaSource.h: Updated for above.
1351
1352         * bindings/js/JSDOMBinding.h: Added overloads of checkSecurityForNode so
1353         it works with a function returning a reference.
1354
1355         * css/CSSPrimitiveValue.cpp:
1356         (WebCore::CSSPrimitiveValue::getCounterValue): Use Counter& instead of
1357         Counter* for return value.
1358         (WebCore::CSSPrimitiveValue::getRectValue): Use Rect& instead of
1359         Rect* for return value.
1360         * css/CSSPrimitiveValue.h: Updated for above.
1361
1362         * dom/ChildNode.idl: Use non-legacy exceptions.
1363
1364         * dom/ContainerNode.cpp:
1365         (WebCore::ContainerNode::querySelector): Use ExceptionOr.
1366         (WebCore::ContainerNode::querySelectorAll): Ditto.
1367         (WebCore::ContainerNode::append): Ditto.
1368         (WebCore::ContainerNode::prepend): Ditto.
1369         * dom/ContainerNode.h: Updated for above.
1370
1371         * dom/Document.cpp:
1372         (WebCore::Document::selectorQueryForString): Use ExceptionOr.
1373         * dom/Document.h: Updated for above.
1374
1375         * dom/Element.cpp:
1376         (WebCore::Element::attachShadow): Return ShadowRoot& instead of
1377         Ref<ShadowRoot> since the shadow root is owned by the element, not
1378         the caller.
1379         (WebCore::Element::matches): Updated for change to make the
1380         selectorQueryForString function use ExceptionOr.
1381         (WebCore::Element::closest): Ditto.
1382         (WebCore::contextNodeForInsertion): Return ContainerNode& instead of
1383         ContainerNode*.
1384         (WebCore::contextElementForInsertion): Updated for above.
1385         * dom/Element.h: Updated for above.
1386         * dom/Element.idl: Changed return type for closest and for
1387         insertAdjacentElement to be nullable since both can return null.
1388
1389         * dom/ExceptionOr.h: Added a specialization for ExceptionOr<T&>.
1390
1391         * dom/Node.cpp:
1392         (WebCore::Node::convertNodesOrStringsIntoNode): Use ExceptionOr.
1393         (WebCore::Node::before): Ditto.
1394         (WebCore::Node::after): Ditto.
1395         (WebCore::Node::replaceWith): Ditto.
1396         * dom/Node.h: Updated for above changes.
1397
1398         * dom/ParentNode.idl: Use non-legacy exceptions.
1399
1400         * dom/SelectorQuery.cpp:
1401         (WebCore::SelectorDataList::queryAll): Changed return type to Ref.
1402         (WebCore::SelectorQueryCache::add): Use ExceptionOr.
1403         * dom/SelectorQuery.h: Updated for above changes.
1404
1405         * html/HTMLFrameOwnerElement.cpp:
1406         (WebCore::HTMLFrameOwnerElement::getSVGDocument): Return
1407         Document& instead of Document*.
1408         * html/HTMLFrameOwnerElement.h: Updated for above change.
1409
1410         * html/HTMLMediaElement.cpp:
1411         (WebCore::HTMLMediaElement::addTextTrack): Return TextTrack&
1412         instead of Ref<TextTrack>.
1413         * html/HTMLMediaElement.h: Updated for above.
1414
1415         * html/HTMLPlugInImageElement.cpp:
1416         (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay):
1417         Updated for new exceptions.
1418         * inspector/InspectorDOMAgent.cpp:
1419         (WebCore::InspectorDOMAgent::querySelector): Ditto.
1420         (WebCore::InspectorDOMAgent::querySelectorAll): Ditto.
1421         (WebCore::InspectorDOMAgent::performSearch): Ditto.
1422         (WebCore::InspectorDOMAgent::highlightSelector): Ditto.
1423
1424         * inspector/InspectorNodeFinder.cpp:
1425         (WebCore::InspectorNodeFinder::performSearch): Put a null check
1426         here so callers don't have to do it. Pass references to the
1427         individual functions since the pointer can't be null.
1428         (WebCore::InspectorNodeFinder::searchUsingDOMTreeTraversal):
1429         Updated to use reference and streamlined code a bit, using
1430         containsIgnoringASCIICase instead of findIgnoringCase.
1431         (WebCore::InspectorNodeFinder::matchesAttribute): Ditto.
1432         (WebCore::InspectorNodeFinder::matchesElement): Ditto.
1433         (WebCore::InspectorNodeFinder::searchUsingXPath): Ditto.
1434         (WebCore::InspectorNodeFinder::searchUsingCSSSelectors): Ditto.
1435         Also updated  for new exceptions in querySelectorAll.
1436         * inspector/InspectorNodeFinder.h: Updated for above.
1437
1438         * page/Crypto.cpp:
1439         (WebCore::Crypto::webkitSubtle): Return WebKitSubtleCrypto&
1440         insetad of WebKitSubtleCrypto*.
1441         * page/Crypto.h: Updated for above.
1442
1443         * testing/Internals.h: Removed declarations for functions already
1444         removed: ensureShadowRoot and createShadowRoot.
1445
1446 2016-10-31  Darin Adler  <darin@apple.com>
1447
1448         Convert Document from ExceptionCode to Exception
1449         https://bugs.webkit.org/show_bug.cgi?id=164212
1450
1451         Reviewed by Alex Christensen.
1452
1453         * Modules/websockets/WebSocketChannel.cpp:
1454         (WebCore::WebSocketChannel::processBuffer): Removed IGNORE_EXCEPTION.
1455
1456         * dom/ContainerNode.cpp:
1457         (WebCore::ContainerNode::takeAllChildrenFrom): Use releaseReturnValue
1458         instead of ASSERT_NO_EXCEPTION.
1459         (WebCore::ContainerNode::parserInsertBefore): Removed ASSERT_NO_EXCEPTION.
1460         (WebCore::ContainerNode::parserAppendChild): Ditto.
1461
1462         * dom/DOMImplementation.cpp:
1463         (WebCore::DOMImplementation::createDocumentType): Updated for new
1464         exception handling.
1465         (WebCore::DOMImplementation::createDocument): Ditto.
1466
1467         * dom/Document.cpp:
1468         (WebCore::createHTMLElementWithNameValidation): Return ExceptionOr.
1469         (WebCore::Document::createElementForBindings): Ditto.
1470         (WebCore::Document::createCDATASection): Ditto.
1471         (WebCore::Document::createProcessingInstruction): Ditto.
1472         (WebCore::Document::importNode): Ditto.
1473         (WebCore::Document::adoptNode): Ditto.
1474         (WebCore::Document::createElementNS): Ditto.
1475         (WebCore::Document::setXMLVersion): Ditto.
1476         (WebCore::Document::setBodyOrFrameset): Ditto.
1477         (WebCore::Document::processHttpEquiv): Ditto.
1478         (WebCore::Document::createEvent): Ditto.
1479         (WebCore::Document::cookie): Ditto.
1480         (WebCore::Document::setCookie): Ditto.
1481         (WebCore::Document::setDomain): Ditto.
1482         (WebCore::Document::parseQualifiedName): Ditto. Also added an overload
1483         that constructs a QualifiedName directly that most call sites can use.
1484         (WebCore::Document::createAttribute): Return ExceptionOr.
1485         (WebCore::Document::createAttributeNS): Ditto.
1486         (WebCore::Document::createTouch): Removed unneeded ExceptionCode&.
1487         * dom/Document.h: Updated for above.
1488         * dom/Document.idl: Use non-legacy exceptions. Removed exception
1489         entirely from createTouch.
1490
1491         * dom/Element.cpp:
1492         (WebCore::Element::parseAttributeName): Updated to use the new
1493         Document::parseQualifiedName.
1494         * editing/EditorCommand.cpp:
1495         (WebCore::executeFormatBlock): Ditto.
1496
1497         * inspector/InspectorDOMAgent.cpp:
1498         (WebCore::InspectorDOMAgent::setNodeName): Updated for the new
1499         exception handling.
1500         * inspector/InspectorPageAgent.cpp:
1501         (WebCore::InspectorPageAgent::getCookies): Ditto.
1502
1503         * page/ios/FrameIOS.mm:
1504         (WebCore::Frame::initWithSimpleHTMLDocument): Use the
1505         HTMLHtmlElement::create and HTMLBodyElement::create instead of using
1506         createElementNS to make the simple document.
1507
1508         * svg/animation/SVGSMILElement.cpp:
1509         (WebCore::SVGSMILElement::constructAttributeName): Renamed, made this
1510         a member function, updated to use the new Document::parseQualifiedName,
1511         and also moved the code to get the attribute in here.
1512         (WebCore::SVGSMILElement::constructAttributeName): Added. Helper function
1513         for the two places we update the attribute name from attributeNameAttr.
1514         (WebCore::SVGSMILElement::insertedInto): Use updateAttributeName.
1515         (WebCore::SVGSMILElement::svgAttributeChanged): Ditto.
1516         * svg/animation/SVGSMILElement.h: Updated for the above.
1517
1518         * xml/parser/XMLDocumentParserLibxml2.cpp:
1519         (WebCore::XMLDocumentParser::processingInstruction): Updated to understand
1520         ExceptionOr rather than an out argument.
1521         (WebCore::XMLDocumentParser::startDocument): Removed ASSERT_NO_EXCEPTION.
1522
1523 2016-10-31  Wenson Hsieh  <wenson_hsieh@apple.com>
1524
1525         Holding down a key to choose an accented character should fire "insertReplacementText" input events
1526         https://bugs.webkit.org/show_bug.cgi?id=164209
1527         <rdar://problem/29019305>
1528
1529         Reviewed by Darin Adler.
1530
1531         For TypingCommands that correspond to "insertReplacementText" inputTypes, vend dataTransfers for resulting
1532         beforeinput and input events if the edited area is not an input field or textarea. To do this, convert the plain
1533         text representation of the content to be inserted to HTML text using a helper function,
1534         MarkupAccumulator::appendCharactersReplacingEntities, that is used when creating markup for Text nodes.
1535
1536         Tests: fast/events/before-input-prevent-insert-replacement.html
1537                fast/events/input-event-insert-replacement.html
1538
1539         * editing/TypingCommand.cpp:
1540         (WebCore::TypingCommand::inputEventData):
1541         (WebCore::TypingCommand::inputEventDataTransfer):
1542         * editing/TypingCommand.h:
1543
1544 2016-10-30  Dave Hyatt  <hyatt@apple.com>
1545
1546         [CSS Parser] Miscellaneous bug fixes
1547         https://bugs.webkit.org/show_bug.cgi?id=164211
1548
1549         Reviewed by Darin Adler.
1550
1551         * css/parser/CSSPropertyParser.cpp:
1552         (WebCore::CSSPropertyParser::consumeTransformOrigin):
1553         Make sure to properly reject invalid transform-origin-z values.
1554
1555         * css/parser/CSSSelectorParser.cpp:
1556         (WebCore::CSSSelectorParser::consumeAttribute):
1557         Make attribute selector parsing strict about requiring a ] to end
1558         the selector.
1559
1560         (WebCore::CSSSelectorParser::consumePseudo):
1561         Force the nth-child "of" syntax to have whitespace after "of" but
1562         before the selector. It is unclear if this should be a requirement
1563         or not (spec is ambiguous), but for now we match the old parser.
1564
1565         (WebCore::CSSSelectorParser::consumeCombinator):
1566         Fix a bug that caused the double child combinator to match even
1567         when there was whitespace between the two > symbols.
1568
1569 2016-10-31  Youenn Fablet  <youenn@apple.com>
1570
1571         RTCOfferAnswerOptions does not need to be refcounted
1572         https://bugs.webkit.org/show_bug.cgi?id=164216
1573
1574         Reviewed by Darin Adler.
1575
1576         Covered by existing tests.
1577
1578         Making RTCOffer/Answer options dictionaries as per specification.
1579         Removing code that handles RTCOffer/Answer options dictionary since this is done by the binding generator.
1580         Updated users of the options accordingly.
1581
1582         * CMakeLists.txt:
1583         * Modules/mediastream/MediaEndpointPeerConnection.cpp:
1584         (WebCore::MediaEndpointPeerConnection::createOffer):
1585         (WebCore::MediaEndpointPeerConnection::createOfferTask):
1586         (WebCore::MediaEndpointPeerConnection::createAnswer):
1587         (WebCore::MediaEndpointPeerConnection::createAnswerTask):
1588         * Modules/mediastream/MediaEndpointPeerConnection.h:
1589         * Modules/mediastream/PeerConnectionBackend.h:
1590         * Modules/mediastream/RTCOfferAnswerOptions.cpp: Removed.
1591         * Modules/mediastream/RTCOfferAnswerOptions.h:
1592         * Modules/mediastream/RTCPeerConnection.cpp:
1593         (WebCore::RTCPeerConnection::queuedCreateOffer):
1594         (WebCore::RTCPeerConnection::queuedCreateAnswer):
1595         * Modules/mediastream/RTCPeerConnection.h:
1596         * Modules/mediastream/RTCPeerConnection.idl:
1597         * WebCore.xcodeproj/project.pbxproj:
1598
1599 2016-10-31  Youenn Fablet  <youenn@apple.com>
1600
1601         fast/mediastream/RTCPeerConnection-* tests crashing under ASan
1602         https://bugs.webkit.org/show_bug.cgi?id=164215
1603
1604         Reviewed by Philippe Normand.
1605
1606         Covered by ASAN bot tests.
1607
1608         * platform/mediastream/SDPProcessorScriptResource.cpp:
1609         (WebCore::SDPProcessorScriptResource::scriptString):
1610
1611 2016-10-28  Philippe Normand  <pnormand@igalia.com>
1612
1613         [OpenWebRTC] Initialize library one time only
1614         https://bugs.webkit.org/show_bug.cgi?id=164118
1615
1616         Reviewed by Darin Adler.
1617
1618         * platform/mediastream/openwebrtc/OpenWebRTCUtilities.cpp:
1619         (WebCore::initializeOpenWebRTC): Prevent multiple initialisations of the library.
1620
1621 2016-10-30  Brent Fulgham  <bfulgham@apple.com>
1622
1623         Unreviewed fix: Correct ChangeLog after my bad merge.
1624
1625         * ChangeLog
1626
1627 2016-10-30  Darin Adler  <darin@apple.com>
1628
1629         Move Element, NamedNodeMap, and DOMStringMap from ExceptionCode to Exception
1630         https://bugs.webkit.org/show_bug.cgi?id=164206
1631
1632         Reviewed by Chris Dumez.
1633
1634         * bindings/js/JSDOMStringMapCustom.cpp:
1635         (WebCore::JSDOMStringMap::getOwnPropertyNames): Use modern for loop, and
1636         updates since the names function now returns a vector.
1637         (WebCore::JSDOMStringMap::putDelegate): Use propagateException. Also return
1638         true any time an exception is raised. Since true tells the caller to return
1639         without doing any work, we always want to return that on an exception.
1640         * dom/DatasetDOMStringMap.cpp:
1641         (WebCore::DatasetDOMStringMap::names): Renamed from getNames and made this
1642         return a Vector instead of populating a passed-in vector.
1643         (WebCore::DatasetDOMStringMap::setItem): Use ExceptionOr.
1644         * dom/DatasetDOMStringMap.h: Updated for above.
1645
1646         * dom/Document.cpp:
1647         (WebCore::Document::adoptNode): Updated to use ExceptionOr for
1648         removeAttributeNode. Changed to use remove rather than removeChild for
1649         better clarity.
1650
1651         * dom/Element.cpp:
1652         (WebCore::Element::setAttribute): Use ExceptionOr.
1653         (WebCore::Element::createShadowRoot): Deleted. Unused.
1654         (WebCore::Element::attachShadow): Use ExceptionOr.
1655         (WebCore::Element::shadowRootForBindings): Tweaked a bit.
1656         (WebCore::Element::userAgentShadowRoot): Removed unneeded if statemment.
1657         (WebCore::Element::ensureUserAgentShadowRoot): Tweaked a bit.
1658         (WebCore::Element::setAttributeNode): Use ExceptionOr.
1659         (WebCore::Element::setAttributeNodeNS): Ditto.
1660         (WebCore::Element::removeAttributeNode): Ditto.
1661         (WebCore::Element::parseAttributeName): Ditto. Also changed return result
1662         to be a QualifiedName instead of using an out argument.
1663         (WebCore::Element::setAttributeNS): Ditto.
1664         (WebCore::Element::mergeWithNextTextNode): Ditto.
1665         (WebCore::Element::setOuterHTML): Ditto.
1666         (WebCore::Element::setInnerHTML): Ditto.
1667         (WebCore::Element::matches): Ditto.
1668         (WebCore::Element::closest): Ditto.
1669         (WebCore::Element::insertAdjacent): Ditto.
1670         (WebCore::Element::insertAdjacentElement): Ditto.
1671         (WebCore::contextNodeForInsertion): Ditto.
1672         (WebCore::contextElementForInsertion): Added. Helper for the
1673         insertAdjacentHTML function to eliminate a local variable.
1674         (WebCore::Element::insertAdjacentHTML): Use ExceptionOr.
1675         (WebCore::Element::insertAdjacentText): Ditto.
1676         * dom/Element.h: Updated for above.
1677         * dom/Element.idl: Use non-legacy exceptions.
1678
1679         * dom/NamedNodeMap.cpp:
1680         (WebCore::NamedNodeMap::removeNamedItem): Use ExceptionOr.
1681         (WebCore::NamedNodeMap::supportedPropertyNames): Updated to check
1682         which strings should be removed without copying the strings.
1683         (WebCore::NamedNodeMap::removeNamedItemNS): Use ExceptionOr.
1684         (WebCore::NamedNodeMap::setNamedItem): Ditto. Removed overload for
1685         legacy bindings; move that to the bindings themselves.
1686         * dom/NamedNodeMap.h: Updated for above.
1687         * dom/NamedNodeMap.idl: Use non-legacy exceptions.
1688
1689         * html/HTMLElement.cpp:
1690         (WebCore::HTMLElement::setOuterText): Updated since mergeWithNextTextNode
1691         now uses ExceptionOr.
1692
1693         * inspector/DOMEditor.cpp: Updated to use ExceptionOr.
1694
1695         * inspector/InspectorDOMAgent.cpp:
1696         (WebCore::InspectorDOMAgent::toErrorString): Added an overload for
1697         Exception.
1698         (WebCore::InspectorDOMAgent::setAttributesAsText): Updated to use ExceptionOr.
1699         * inspector/InspectorDOMAgent.h: Updated for above.
1700
1701         * inspector/InspectorStyleSheet.cpp:
1702         (WebCore::InspectorStyleSheetForInlineStyle::setStyleText): Updated to
1703         use the correct version of setAttribute; there was never a risk that there
1704         would be an exception, but now that's clearer.
1705
1706         * testing/Internals.cpp:
1707         (WebCore::Internals::ensureShadowRoot): Deleted. Was unused.
1708         (WebCore::Internals::createShadowRoot): Ditto.
1709         * testing/Internals.idl: Updated for above.
1710
1711         * xml/parser/XMLDocumentParserLibxml2.cpp:
1712         (WebCore::handleNamespaceAttributes): Use updated parseAttributeName,
1713         which uses ExceptionOr and a return value instead of an out argument.
1714         (WebCore::handleElementAttributes): Ditto.
1715
1716 2016-10-30  Sam Weinig  <sam@webkit.org>
1717
1718         [WebIDL] Restructure IDLParser structs to better match modern WebIDL concepts
1719         https://bugs.webkit.org/show_bug.cgi?id=164208
1720
1721         Reviewed by Darin Adler.
1722
1723         Restructure IDLParsers structs to match modern WebIDL conventions:
1724         - Rename structs to have more WebCore like naming, consistently using
1725           the prefix IDL.
1726         - Remove domSignature. Sinking it's properties into the structs that
1727           contained it.
1728         - Add IDLArgument, replacing the use of domSignatures for arguments.
1729           IDLArgument is the subset of domSignatures needed for arguments.
1730         - Rename domFunction to IDLOperation (matching WebILD nomenclature),
1731           replace signature with its own name, type (for returnType), specials,
1732           and extended attributes properties.
1733         - Give IDLAttribute it's own name, type and extended attributes properties.
1734         - Add IDLDictionaryMember, replacing the use of domSignature as the
1735           type of members in IDLDictionary. Give it name, type, isRequired,
1736           default and extendedAttributes properties.
1737         - Renamed Typedef to be IDLTypedef. Remove the extended attributes 
1738           property as those are not allowed in typedefs per-PebIDL.
1739
1740         Also fix some parsing issues:
1741         - Stop parsing 'in' directives in function arguments.
1742         - Stop parsing extended attributes in typedefs.
1743         - Support applying typedefs to types deep in aggregate types
1744           (e.g. (sequence<(LONG or STRING)> or DOMString)?).
1745
1746         * bindings/scripts/CodeGenerator.pm:
1747         * bindings/scripts/IDLParser.pm:
1748         * bindings/scripts/generate-bindings.pl:
1749         Update for new struct types.
1750
1751         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
1752         * bindings/scripts/test/TestTypedefs.idl:
1753         Remove test which tested extended attributes in typedefs,
1754         and add a test which tests typedefs used in deep type structures.
1755
1756         * page/make_settings.pl:
1757         Don't generate the 'in' prefix for arguments in IDL files.
1758
1759 2016-10-30  Dave Hyatt  <hyatt@apple.com>
1760
1761         [CSS Parser] Fix nth-child serialization
1762         https://bugs.webkit.org/show_bug.cgi?id=164210
1763
1764         Reviewed by Darin Adler.
1765
1766         Our nth-child serialization preserves what the author originally
1767         typed. Even though this is not spec-compliant (the latest CSS Syntax
1768         spec has a dumbed down serialization process that doesn't preserve what
1769         the author originally typed), I think it's better behavior to preserve
1770         this text.
1771
1772         * css/parser/CSSParserToken.cpp:
1773         (WebCore::CSSParserToken::serialize):
1774         Fix a bug in the serialization of number tokens that started with
1775         a plus sign. Make sure the plus sign is preserved.
1776
1777         * css/parser/CSSSelectorParser.cpp:
1778         (WebCore::CSSSelectorParser::consumePseudo):
1779         Grab the range of tokens from after the ( and up to the ) or the "of"
1780         and then serialize them. Strip whitepsace from the ends and set that
1781         as the selector argument.
1782
1783 2016-10-30  Brent Fulgham  <bfulgham@apple.com>
1784
1785         [Win][Direct2D] Correct bookkeeping for begin/end draw pairs
1786         https://bugs.webkit.org/show_bug.cgi?id=163898
1787
1788         Reviewed by Darin Adler.
1789
1790         Simon pointed out that GraphicsContext objects are generally only created at
1791         the time we intend to do drawing, so calling 'BeginDraw' as part of object
1792         construction, and 'EndDraw' at time of destruction should be sufficient.
1793
1794         As usual, he was correct.
1795         
1796         This patch gets rid of unneeded code and greatly simplifies the Direct2D
1797         drawing path.
1798         
1799         Tested by existing layout tests.
1800
1801         * platform/graphics/GraphicsContext.h:
1802         * platform/graphics/win/GradientDirect2D.cpp:
1803         (WebCore::Gradient::fill):Remove unneeded use
1804         of 'RenderTargetScopedDrawing.h'.
1805         * platform/graphics/win/GraphicsContextDirect2D.cpp:
1806         (WebCore::GraphicsContext::releaseWindowsContext): Remove unneeded use
1807         of RenderTargetScopedDrawing class.
1808         (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): Enter
1809         the 'BeginDraw' state at object creation.
1810         (WebCore::GraphicsContextPlatformPrivate::~GraphicsContextPlatformPrivate): End
1811         draw state at object destruction.
1812         (WebCore::GraphicsContextPlatformPrivate::clip): Remove unneeded call to 'beginDraw'.
1813         (WebCore::GraphicsContextPlatformPrivate::beginDraw): Renamed from 'beginDrawIfNeeded'.
1814         (WebCore::GraphicsContextPlatformPrivate::endDraw): Get rid of draw state flags.
1815         (WebCore::GraphicsContext::beginDraw): Renamed from 'beginDrawIfNeeded'.
1816         (WebCore::GraphicsContext::flush): Added.
1817         (WebCore::GraphicsContext::drawWithoutShadow): Remove unneeded use of
1818         RenderTargetScopedDrawing class.
1819         (WebCore::GraphicsContext::drawWithShadow): Ditto.
1820         (WebCore::GraphicsContext::platformFillRoundedRect): Ditto.
1821         (WebCore::GraphicsContext::fillRectWithRoundedHole): Ditto.
1822         (WebCore::GraphicsContext::didBeginDraw): Deleted.
1823         (WebCore::GraphicsContextPlatformPrivate::beginDrawIfNeeded): Deleted.
1824         (WebCore::GraphicsContext::beginDrawIfNeeded): Deleted.
1825         * platform/graphics/win/GraphicsContextPlatformPrivateDirect2D.h:
1826         (WebCore::GraphicsContextPlatformPrivate::didBeginDraw): Deleted.
1827         * platform/graphics/win/ImageBufferDataDirect2D.cpp:
1828         (WebCore::ImageBufferData::getData): Remove unneeded use of RenderTargetScopedDrawing class.
1829         (WebCore::ImageBufferData::putData):
1830         * platform/graphics/win/ImageBufferDirect2D.cpp:
1831         (WebCore::ImageBuffer::flushContext): Call new GraphicsContext 'flush' command.
1832         (WebCore::ImageBuffer::draw): Remove unneeded use of RenderTargetScopedDrawing class.
1833         * platform/graphics/win/NativeImageDirect2D.cpp: Ditto.
1834         * platform/graphics/win/RenderTargetScopedDrawing.h: Removed.
1835         * svg/graphics/SVGImage.cpp:
1836         (WebCore::SVGImage::nativeImage): Remove unneeded use of RenderTargetScopedDrawing class.
1837
1838 2016-10-30  Dave Hyatt  <hyatt@apple.com> 
1839
1840         [CSS Parser] Clean up the two types of descendant relations in CSSSelector 
1841         https://bugs.webkit.org/show_bug.cgi?id=164203 
1842
1843         Reviewed by Zalan Bujtas. 
1844
1845         This patch gets rid of the separate boolean for double child and allows it 
1846         to be a unique relation type. Rename Descendant to DescendantSpace and 
1847         name the new relation DescendantDoubleChild. 
1848
1849         * css/CSSSelector.cpp: 
1850         (WebCore::CSSSelector::CSSSelector): 
1851         (WebCore::CSSSelector::selectorText): 
1852         * css/CSSSelector.h: 
1853         (WebCore::CSSSelector::hasDescendantRelation): 
1854         (WebCore::CSSSelector::hasDescendantOrChildRelation): 
1855         (WebCore::CSSSelector::CSSSelector): 
1856         (WebCore::CSSSelector::setDescendantUseDoubleChildSyntax): Deleted. 
1857         * css/RuleFeature.cpp: 
1858         (WebCore::RuleFeatureSet::recursivelyCollectFeaturesFromSelector): 
1859         * css/SelectorChecker.cpp: 
1860         (WebCore::SelectorChecker::matchRecursively): 
1861         (WebCore::SelectorChecker::determineLinkMatchType): 
1862         * css/SelectorFilter.cpp: 
1863         (WebCore::SelectorFilter::collectIdentifierHashes): 
1864         * css/parser/CSSParserValues.cpp: 
1865         (WebCore::CSSParserSelector::appendTagHistory): 
1866         * css/parser/CSSParserValues.h: 
1867         (WebCore::CSSParserSelector::setDescendantUseDoubleChildSyntax): Deleted. 
1868         * css/parser/CSSSelectorParser.cpp: 
1869         (WebCore::isDescendantCombinator): 
1870         (WebCore::CSSSelectorParser::consumeComplexSelector): 
1871         (WebCore::CSSSelectorParser::consumeCombinator): 
1872         * cssjit/SelectorCompiler.cpp: 
1873         (WebCore::SelectorCompiler::fragmentRelationForSelectorRelation): 
1874
1875 2016-10-30  Frederic Wang  <fwang@igalia.com> 
1876
1877         Unreviewed gardening 
1878
1879         Fix build error on WinCairo. 
1880
1881         * platform/graphics/opentype/OpenTypeMathData.cpp: 
1882
1883 2016-10-30  Frederic Wang  <fwang@igalia.com> 
1884
1885         Use HarfBuzz ot-math API to parse the OpenType MATH table 
1886         https://bugs.webkit.org/show_bug.cgi?id=162671 
1887
1888         Reviewed by Michael Catanzaro. 
1889
1890         No new tests, already covered by existing tests. 
1891
1892         * platform/graphics/opentype/OpenTypeMathData.cpp: Add alternative implementation relying on 
1893         HarfBuzz's new OpenType MATH API. 
1894         * platform/graphics/opentype/OpenTypeMathData.h: Ditto. 
1895         (WebCore::OpenTypeMathData::hasMathData): 
1896         (WebCore::OpenTypeMathData::HbFontDeleter::operator()): 
1897
1898 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
1899
1900         [CSS Parser] Support unprefixed image-sets 
1901         https://bugs.webkit.org/show_bug.cgi?id=164198 
1902
1903         Reviewed by Dean Jackson. 
1904
1905         * css/CSSValueKeywords.in: 
1906         * css/parser/CSSPropertyParserHelpers.cpp: 
1907         (WebCore::CSSPropertyParserHelpers::consumeImage): 
1908
1909 2016-10-30  Yusuke Suzuki  <utatane.tea@gmail.com> 
1910
1911         [DOM] Introduce WebCore::jsDynamicDowncast 
1912         https://bugs.webkit.org/show_bug.cgi?id=164137 
1913  
1914         Reviewed by Darin Adler. 
1915
1916         In WebCore, we have several extended JSTypes, like JSElementType. 
1917         For these types, WebCore offers the faster casting function compared 
1918         to JSC::jsDynamicCast. For example, for JSElementType, we have 
1919         jsElementCast. 
1920
1921         The problem is that we may fall into the slow code if we choose 
1922         JSC::jsDynamicCast by accident. Selecting the appropriate function 
1923         requires special care in the IDL code generator when we would like 
1924         to use faster casting functions. 
1925
1926         This patch implements a new casting function, WebCore::jsDynamicDowncast. 
1927         It is a thin wrapper to the JSC::jsDynamicCast. But it selects the 
1928         faster casting functions correctly by template specialization. 
1929
1930         We do not choose the way specializing JSC::jsDynamicCast directly. 
1931         If we forget to include the header that specializes JSC::jsDyanmicCast, 
1932         it does not cause any compile errors, but it causes performance regression. 
1933         This bug is hard to figure out. To avoid this problem, we add a new function. 
1934
1935         Outside JSC, only Tools' DumpRenderTree uses JSC::jsDynamicCast. 
1936         This code has FIXME that we should use JSC APIs instead of directly calling 
1937         JSC thingy. So this should be solved in the layer of JSC APIs and changing 
1938         this jsDynamicCast to WebCore's jsDynamicDowncast and exposing WebCore's thingy 
1939         are not good change. So we leave the code as is. 
1940
1941         * WebCore.xcodeproj/project.pbxproj: 
1942         * bindings/js/JSApplePaySessionCustom.cpp: 
1943         (WebCore::JSApplePaySession::completeShippingMethodSelection): 
1944         (WebCore::JSApplePaySession::completeShippingContactSelection): 
1945         (WebCore::JSApplePaySession::completePaymentMethodSelection): 
1946         * bindings/js/JSDOMBinding.cpp: 
1947         (WebCore::reportException): 
1948         * bindings/js/JSDOMBinding.h: 
1949         (WebCore::castThisValue): 
1950         (WebCore::toArrayBufferView): 
1951         * bindings/js/JSDOMIterator.h: 
1952         (WebCore::IteratorTraits>::next): 
1953         * bindings/js/JSDOMWindowShell.cpp: 
1954         (WebCore::JSDOMWindowShell::toWrapped): 
1955         * bindings/js/JSDictionary.cpp: 
1956         (WebCore::JSDictionary::convertValue): 
1957         * bindings/js/JSDocumentCustom.h: 
1958         (WebCore::jsDocumentCast): 
1959         * bindings/js/JSDynamicDowncast.h: Added. 
1960         (WebCore::JSDynamicCastTrait::cast): 
1961         (WebCore::JSDynamicCastTrait<JSNode>::cast): 
1962         (WebCore::JSDynamicCastTrait<JSElement>::cast): 
1963         (WebCore::JSDynamicCastTrait<JSDocument>::cast): 
1964         (WebCore::JSDynamicCastTrait<JSEvent>::cast): 
1965         (WebCore::jsDynamicDowncast): 
1966         * bindings/js/JSElementCustom.h: 
1967         (WebCore::jsElementCast): 
1968         * bindings/js/JSEventCustom.h: 
1969         (WebCore::jsEventCast): 
1970         * bindings/js/JSEventListener.cpp: 
1971         (WebCore::setDocumentEventHandlerAttribute): 
1972         * bindings/js/JSEventTargetCustom.cpp: 
1973         (WebCore::jsEventTargetCast): 
1974         * bindings/js/JSMediaStreamTrackCustom.cpp: 
1975         (WebCore::JSMediaStreamTrack::getSettings): 
1976         (WebCore::JSMediaStreamTrack::getCapabilities): 
1977         * bindings/js/JSNodeCustom.h: 
1978         (WebCore::jsNodeCast): 
1979         * bindings/js/JSPluginElementFunctions.cpp: 
1980         (WebCore::pluginElementPropertyGetter): 
1981         * bindings/js/JSReadableStreamPrivateConstructors.cpp: 
1982         (WebCore::constructJSReadableStreamDefaultReader): 
1983         * bindings/js/JSReadableStreamSourceCustom.cpp: 
1984         (WebCore::startReadableStream): 
1985         (WebCore::JSReadableStreamSource::start): 
1986         (WebCore::pullReadableStream): 
1987         * bindings/js/JSWorkerGlobalScopeBase.cpp: 
1988         (WebCore::toJSDedicatedWorkerGlobalScope): 
1989         * bindings/js/ScriptModuleLoader.cpp: 
1990         (WebCore::ScriptModuleLoader::evaluate): 
1991         * bindings/js/SerializedScriptValue.cpp: 
1992         (WebCore::CloneSerializer::serialize): 
1993         * bindings/js/StructuredClone.cpp: 
1994         (WebCore::structuredCloneArrayBufferView): 
1995         * bindings/scripts/CodeGeneratorJS.pm: 
1996         (GetCastingHelperForThisObject): 
1997         (GenerateImplementation): 
1998         * bindings/scripts/test/JS/JSInterfaceName.cpp: 
1999         (WebCore::jsInterfaceNameConstructor): 
2000         (WebCore::setJSInterfaceNameConstructor): 
2001         (WebCore::JSInterfaceName::toWrapped): 
2002         * bindings/scripts/test/JS/JSTestActiveDOMObject.cpp: 
2003         (WebCore::BindingCaller<JSTestActiveDOMObject>::castForAttribute): 
2004         (WebCore::BindingCaller<JSTestActiveDOMObject>::castForOperation): 
2005         (WebCore::jsTestActiveDOMObjectConstructor): 
2006         (WebCore::setJSTestActiveDOMObjectConstructor): 
2007         (WebCore::JSTestActiveDOMObject::toWrapped): 
2008         * bindings/scripts/test/JS/JSTestCEReactions.cpp: 
2009         (WebCore::BindingCaller<JSTestCEReactions>::castForAttribute): 
2010         (WebCore::BindingCaller<JSTestCEReactions>::castForOperation): 
2011         (WebCore::jsTestCEReactionsConstructor): 
2012         (WebCore::setJSTestCEReactionsConstructor): 
2013         (WebCore::JSTestCEReactions::toWrapped): 
2014         * bindings/scripts/test/JS/JSTestCEReactionsStringifier.cpp: 
2015         (WebCore::BindingCaller<JSTestCEReactionsStringifier>::castForAttribute): 
2016         (WebCore::BindingCaller<JSTestCEReactionsStringifier>::castForOperation): 
2017         (WebCore::jsTestCEReactionsStringifierConstructor): 
2018         (WebCore::setJSTestCEReactionsStringifierConstructor): 
2019         (WebCore::JSTestCEReactionsStringifier::toWrapped): 
2020         * bindings/scripts/test/JS/JSTestClassWithJSBuiltinConstructor.cpp: 
2021         (WebCore::jsTestClassWithJSBuiltinConstructorConstructor): 
2022         (WebCore::setJSTestClassWithJSBuiltinConstructorConstructor): 
2023         (WebCore::JSTestClassWithJSBuiltinConstructor::toWrapped): 
2024         * bindings/scripts/test/JS/JSTestCustomConstructorWithNoInterfaceObject.cpp: 
2025         (WebCore::jsTestCustomConstructorWithNoInterfaceObjectConstructor): 
2026         (WebCore::setJSTestCustomConstructorWithNoInterfaceObjectConstructor): 
2027         (WebCore::JSTestCustomConstructorWithNoInterfaceObject::toWrapped): 
2028         * bindings/scripts/test/JS/JSTestCustomNamedGetter.cpp: 
2029         (WebCore::BindingCaller<JSTestCustomNamedGetter>::castForOperation): 
2030         (WebCore::jsTestCustomNamedGetterConstructor): 
2031         (WebCore::setJSTestCustomNamedGetterConstructor): 
2032         (WebCore::JSTestCustomNamedGetter::toWrapped): 
2033         * bindings/scripts/test/JS/JSTestDOMJIT.cpp: 
2034         (WebCore::BindingCaller<JSTestDOMJIT>::castForAttribute): 
2035         (WebCore::jsTestDOMJITConstructor): 
2036         (WebCore::setJSTestDOMJITConstructor): 
2037         * bindings/scripts/test/JS/JSTestEventConstructor.cpp: 
2038         (WebCore::BindingCaller<JSTestEventConstructor>::castForAttribute): 
2039         (WebCore::jsTestEventConstructorConstructor): 
2040         (WebCore::setJSTestEventConstructorConstructor): 
2041         * bindings/scripts/test/JS/JSTestEventTarget.cpp: 
2042         (WebCore::BindingCaller<JSTestEventTarget>::castForOperation): 
2043         (WebCore::jsTestEventTargetConstructor): 
2044         (WebCore::setJSTestEventTargetConstructor): 
2045         (WebCore::JSTestEventTarget::toWrapped): 
2046         * bindings/scripts/test/JS/JSTestException.cpp: 
2047         (WebCore::BindingCaller<JSTestException>::castForAttribute): 
2048         (WebCore::jsTestExceptionConstructor): 
2049         (WebCore::setJSTestExceptionConstructor): 
2050         (WebCore::JSTestException::toWrapped): 
2051         * bindings/scripts/test/JS/JSTestGenerateIsReachable.cpp: 
2052         (WebCore::jsTestGenerateIsReachableConstructor): 
2053         (WebCore::setJSTestGenerateIsReachableConstructor): 
2054         (WebCore::JSTestGenerateIsReachable::toWrapped): 
2055         * bindings/scripts/test/JS/JSTestGlobalObject.cpp: 
2056         (WebCore::BindingCaller<JSTestGlobalObject>::castForAttribute): 
2057         (WebCore::BindingCaller<JSTestGlobalObject>::castForOperation): 
2058         (WebCore::jsTestGlobalObjectConstructor): 
2059         (WebCore::setJSTestGlobalObjectConstructor): 
2060         (WebCore::JSTestGlobalObject::toWrapped): 
2061         * bindings/scripts/test/JS/JSTestInterface.cpp: 
2062         (WebCore::BindingCaller<JSTestInterface>::castForAttribute): 
2063         (WebCore::BindingCaller<JSTestInterface>::castForOperation): 
2064         (WebCore::jsTestInterfaceConstructor): 
2065         (WebCore::setJSTestInterfaceConstructor): 
2066         (WebCore::JSTestInterface::toWrapped): 
2067         * bindings/scripts/test/JS/JSTestInterfaceLeadingUnderscore.cpp: 
2068         (WebCore::BindingCaller<JSTestInterfaceLeadingUnderscore>::castForAttribute): 
2069         (WebCore::jsTestInterfaceLeadingUnderscoreConstructor): 
2070         (WebCore::setJSTestInterfaceLeadingUnderscoreConstructor): 
2071         (WebCore::JSTestInterfaceLeadingUnderscore::toWrapped): 
2072         * bindings/scripts/test/JS/JSTestIterable.cpp: 
2073         (WebCore::BindingCaller<JSTestIterable>::castForOperation): 
2074         (WebCore::jsTestIterableConstructor): 
2075         (WebCore::setJSTestIterableConstructor): 
2076         (WebCore::JSTestIterable::toWrapped): 
2077         * bindings/scripts/test/JS/JSTestJSBuiltinConstructor.cpp: 
2078         (WebCore::BindingCaller<JSTestJSBuiltinConstructor>::castForAttribute): 
2079         (WebCore::BindingCaller<JSTestJSBuiltinConstructor>::castForOperation): 
2080         (WebCore::jsTestJSBuiltinConstructorConstructor): 
2081         (WebCore::setJSTestJSBuiltinConstructorConstructor): 
2082         * bindings/scripts/test/JS/JSTestMediaQueryListListener.cpp: 
2083         (WebCore::BindingCaller<JSTestMediaQueryListListener>::castForOperation): 
2084         (WebCore::jsTestMediaQueryListListenerConstructor): 
2085         (WebCore::setJSTestMediaQueryListListenerConstructor): 
2086         (WebCore::JSTestMediaQueryListListener::toWrapped): 
2087         * bindings/scripts/test/JS/JSTestNamedConstructor.cpp: 
2088         (WebCore::jsTestNamedConstructorConstructor): 
2089         (WebCore::setJSTestNamedConstructorConstructor): 
2090         (WebCore::JSTestNamedConstructor::toWrapped): 
2091         * bindings/scripts/test/JS/JSTestNode.cpp: 
2092         (WebCore::BindingCaller<JSTestNode>::castForAttribute): 
2093         (WebCore::BindingCaller<JSTestNode>::castForOperation): 
2094         (WebCore::jsTestNodeConstructor): 
2095         (WebCore::setJSTestNodeConstructor): 
2096         * bindings/scripts/test/JS/JSTestNondeterministic.cpp: 
2097         (WebCore::BindingCaller<JSTestNondeterministic>::castForAttribute): 
2098         (WebCore::BindingCaller<JSTestNondeterministic>::castForOperation): 
2099         (WebCore::jsTestNondeterministicConstructor): 
2100         (WebCore::setJSTestNondeterministicConstructor): 
2101         (WebCore::JSTestNondeterministic::toWrapped): 
2102         * bindings/scripts/test/JS/JSTestObj.cpp: 
2103         (WebCore::BindingCaller<JSTestObj>::castForAttribute): 
2104         (WebCore::BindingCaller<JSTestObj>::castForOperation): 
2105         (WebCore::jsTestObjConstructor): 
2106         (WebCore::setJSTestObjConstructor): 
2107         (WebCore::JSTestObj::toWrapped): 
2108         * bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp: 
2109         (WebCore::jsTestOverloadedConstructorsConstructor): 
2110         (WebCore::setJSTestOverloadedConstructorsConstructor): 
2111         (WebCore::JSTestOverloadedConstructors::toWrapped): 
2112         * bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp: 
2113         (WebCore::jsTestOverloadedConstructorsWithSequenceConstructor): 
2114         (WebCore::setJSTestOverloadedConstructorsWithSequenceConstructor): 
2115         (WebCore::JSTestOverloadedConstructorsWithSequence::toWrapped): 
2116         * bindings/scripts/test/JS/JSTestOverrideBuiltins.cpp: 
2117         (WebCore::BindingCaller<JSTestOverrideBuiltins>::castForOperation): 
2118         (WebCore::jsTestOverrideBuiltinsConstructor): 
2119         (WebCore::setJSTestOverrideBuiltinsConstructor): 
2120         (WebCore::JSTestOverrideBuiltins::toWrapped): 
2121         * bindings/scripts/test/JS/JSTestSerialization.cpp: 
2122         (WebCore::BindingCaller<JSTestSerialization>::castForAttribute): 
2123         (WebCore::BindingCaller<JSTestSerialization>::castForOperation): 
2124         (WebCore::jsTestSerializationConstructor): 
2125         (WebCore::setJSTestSerializationConstructor): 
2126         (WebCore::JSTestSerialization::toWrapped): 
2127         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp: 
2128         (WebCore::BindingCaller<JSTestSerializedScriptValueInterface>::castForAttribute): 
2129         (WebCore::jsTestSerializedScriptValueInterfaceConstructor): 
2130         (WebCore::setJSTestSerializedScriptValueInterfaceConstructor): 
2131         (WebCore::JSTestSerializedScriptValueInterface::toWrapped): 
2132         * bindings/scripts/test/JS/JSTestTypedefs.cpp: 
2133         (WebCore::BindingCaller<JSTestTypedefs>::castForAttribute): 
2134         (WebCore::BindingCaller<JSTestTypedefs>::castForOperation): 
2135         (WebCore::jsTestTypedefsConstructor): 
2136         (WebCore::setJSTestTypedefsConstructor): 
2137         (WebCore::JSTestTypedefs::toWrapped): 
2138         * bridge/objc/WebScriptObject.mm: 
2139         (-[WebScriptObject setValue:forKey:]): 
2140         * bridge/runtime_array.cpp: 
2141         (JSC::RuntimeArray::lengthGetter): 
2142         * bridge/runtime_method.cpp: 
2143         (JSC::RuntimeMethod::lengthGetter): 
2144         * html/HTMLMediaElement.cpp: 
2145         (WebCore::controllerJSValue): 
2146         (WebCore::HTMLMediaElement::updateCaptionContainer): 
2147         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot): 
2148         * inspector/InspectorDOMAgent.cpp: 
2149         (WebCore::InspectorDOMAgent::buildObjectForEventListener): 
2150
2151 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
2152
2153         [CSS Parser] Add font-variant-* keyword property support 
2154         https://bugs.webkit.org/show_bug.cgi?id=164195 
2155  
2156         Reviewed by Zalan Bujtas. 
2157  
2158         * css/parser/CSSParserFastPaths.cpp: 
2159         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 
2160
2161 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
2162
2163         [CSS Parser] Fix text-emphasis-position parsing 
2164         https://bugs.webkit.org/show_bug.cgi?id=164197 
2165
2166         Reviewed by Zalan Bujtas. 
2167
2168         * css/parser/CSSParserFastPaths.cpp: 
2169         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 
2170         (WebCore::CSSParserFastPaths::isKeywordPropertyID): 
2171         * css/parser/CSSPropertyParser.cpp: 
2172         (WebCore::consumeTextEmphasisPosition): 
2173         (WebCore::CSSPropertyParser::parseSingleValue): 
2174
2175 2016-10-29  Darin Adler  <darin@apple.com> 
2176
2177         Convert more of DOM from ExceptionCode to Exception 
2178         https://bugs.webkit.org/show_bug.cgi?id=164173 
2179  
2180         Reviewed by Ryosuke Niwa. 
2181  
2182         * Modules/mediastream/MediaDevices.cpp: 
2183         (WebCore::MediaDevices::getUserMedia): Use ExceptionOr. 
2184         (WebCore::MediaDevices::enumerateDevices): Ditto. 
2185         * Modules/mediastream/MediaDevices.h: Updated for above. 
2186         * Modules/mediastream/MediaDevices.idl: Use non-legacy exceptions. 
2187  
2188         * Modules/mediastream/MediaEndpointSessionDescription.cpp: 
2189         Added now-needed include of ExceptionCode.h. 
2190  
2191         * Modules/mediastream/RTCConfiguration.cpp: 
2192         (WebCore::parseIceServer): Use ExceptionOr. 
2193         (WebCore::RTCConfiguration::create): Ditto. 
2194         (WebCore::RTCConfiguration::initialize): Ditto. 
2195         * Modules/mediastream/RTCConfiguration.h: Updated for above. 
2196         * Modules/mediastream/RTCConfiguration.idl: Use non-legacy exceptions. 
2197  
2198         * Modules/mediastream/RTCDTMFSender.cpp: 
2199         (WebCore::RTCDTMFSender::create): Use ExceptionOr. 
2200         (WebCore::RTCDTMFSender::insertDTMF): Ditto. 
2201         * Modules/mediastream/RTCDTMFSender.h: Updated for above. 
2202         * Modules/mediastream/RTCDTMFSender.idl: Use non-legacy exceptions. 
2203  
2204         * Modules/mediastream/RTCDataChannel.cpp: 
2205         (WebCore::RTCDataChannel::create): Use ExceptionOr. 
2206         (WebCore::RTCDataChannel::setBinaryType): Ditto. 
2207         (WebCore::RTCDataChannel::send): Ditto. 
2208         (WebCore::RTCDataChannel::didReceiveRawData): Ditto. 
2209         * Modules/mediastream/RTCDataChannel.h: Updated for above. 
2210         Also changed return values to use const AtomicString& and 
2211         unsigned instead of unsigned long. Also made more private. 
2212         Also changed BinaryType into an enum class. 
2213         * Modules/mediastream/RTCDataChannel.idl: Use non-legacy exceptions. 
2214  
2215         * Modules/mediastream/RTCIceCandidate.cpp: 
2216         (WebCore::RTCIceCandidate::create): Use ExceptionOr. 
2217         * Modules/mediastream/RTCIceCandidate.h: Updated for above. 
2218         * Modules/mediastream/RTCIceCandidate.idl: Use non-legacy exception. 
2219  
2220         * Modules/mediastream/RTCOfferAnswerOptions.cpp: 
2221         (WebCore::RTCOfferOptions::create): Use ExceptionOr. 
2222         (WebCore::RTCAnswerOptions::create): Ditto. 
2223         * Modules/mediastream/RTCOfferAnswerOptions.h: Updated for above. 
2224         Also removed all virtual functions since nothing here is polymorphic 
2225         and initalized data members in the header. 
2226  
2227         * Modules/mediastream/RTCPeerConnection.cpp: 
2228         (WebCore::RTCPeerConnection::initializeWith): Use ExceptionOr. 
2229         (WebCore::RTCPeerConnection::addTrack): Ditto. 
2230         (WebCore::RTCPeerConnection::removeTrack): Ditto. 
2231         (WebCore::RTCPeerConnection::addTransceiver): Ditto. 
2232         (WebCore::RTCPeerConnection::completeAddTransceiver): Ditto. 
2233         (WebCore::RTCPeerConnection::queuedCreateOffer): Ditto. 
2234         (WebCore::RTCPeerConnection::queuedCreateAnswer): Ditto. 
2235         (WebCore::RTCPeerConnection::setConfiguration): Ditto. 
2236         (WebCore::RTCPeerConnection::createDataChannel): Ditto. 
2237         * Modules/mediastream/RTCPeerConnection.h: Updated for above. 
2238         * Modules/mediastream/RTCPeerConnection.idl: Use non-legacy exceptions. 
2239  
2240         * Modules/mediastream/RTCRtpSender.cpp: 
2241         (WebCore::RTCRtpSender::replaceTrack): Use ExceptionOr. 
2242         * Modules/mediastream/RTCRtpSender.h: Updated for above. 
2243         * Modules/mediastream/RTCRtpSender.idl: Use non-legacy exception. 
2244  
2245         * Modules/mediastream/RTCSessionDescription.cpp: 
2246         (WebCore::RTCSessionDescription::create): Use ExceptoinOr. 
2247         * Modules/mediastream/RTCSessionDescription.h: Updated for above. 
2248         (WebCore::RTCSessionDescription::~RTCSessionDescription): 
2249         * Modules/mediastream/RTCSessionDescription.idl: Use non-legacy exceptions. 
2250  
2251         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp: 
2252         (WebCore::verifyCustomHandlerURL): Just return a boolean, no exception. 
2253         (WebCore::verifyProtocolHandlerScheme): Ditto. 
2254         (WebCore::NavigatorContentUtils::registerProtocolHandler): Use ExceptionOr. 
2255         (WebCore::NavigatorContentUtils::isProtocolHandlerRegistered): Ditto. 
2256         (WebCore::NavigatorContentUtils::unregisterProtocolHandler): Ditto. 
2257         * Modules/navigatorcontentutils/NavigatorContentUtils.h: Updated for above. 
2258         * Modules/navigatorcontentutils/NavigatorContentUtils.idl: Use non-legacy exceptions. 
2259  
2260         * bindings/js/JSMediaDevicesCustom.cpp: 
2261         (WebCore::JSMediaDevicesGetUserMediaPromiseFunction): Use propagateException. 
2262  
2263         * bindings/scripts/CodeGeneratorJS.pm: 
2264         (NeedsExplicitPropagateExceptionCall): Added. Helper function to decide whether 
2265         we need to call propagateException explicitly, if return value processing is not 
2266         going to propagate the exception for us. 
2267         (GenerateParametersCheck): Moved the code from GenerateReturnParameters inline 
2268         because it's almost as short as the function call. Use the newly created 
2269         NeedsExplicitPropagateExceptionCall function, which properly handles the case 
2270         where the return value is a promise. 
2271         (GenerateReturnParameters): Deleted. 
2272  
2273         * dom/CharacterData.cpp: 
2274         (WebCore::CharacterData::substringData): Use ExceptionOr. 
2275         (WebCore::CharacterData::insertData): Ditto. 
2276         (WebCore::CharacterData::deleteData): Ditto. 
2277         (WebCore::CharacterData::replaceData): Ditto. 
2278         * dom/CharacterData.h: Updated for above. 
2279         * dom/CharacterData.idl: Use non-legacy exceptions. 
2280  
2281         * dom/DataTransferItemList.h: Tried to use ExceptionOr, but this seems 
2282         like dead code that doesn't compile. 
2283         * dom/DataTransferItemList.idl: Use non-legacy exceptions. 
2284  
2285         * dom/MessagePort.idl: Use non-legacy exceptions, except this has 
2286         already been converted and was a custom binding. 
2287  
2288         * dom/MutationObserver.cpp: 
2289         (WebCore::MutationObserver::observe): Use ExceptionOr. 
2290         * dom/MutationObserver.h: Updated for above. 
2291         * dom/MutationObserver.idl: Use non-legacy exception. 
2292  
2293         * dom/Range.cpp: 
2294         (WebCore::deleteCharacterData): Updated use of calls that now use 
2295         ExceptionOr. 
2296         (WebCore::Range::processContentsBetweenOffsets): Ditto. 
2297         (WebCore::Range::insertNode): Ditto. 
2298  
2299         * dom/ShadowRoot.cpp: 
2300         (WebCore::ShadowRoot::setInnerHTML): Use ExceptionOr. 
2301         * dom/ShadowRoot.h: Updated for above. 
2302         * dom/ShadowRoot.idl: Use non-legacy exception. 
2303  
2304         * dom/Text.cpp: 
2305         (WebCore::Text::splitText): Use ExceptionOr. 
2306         (WebCore::Text::replaceWholeText): Removed unused ExceptionCode&. 
2307         * dom/Text.h: Updated for above. 
2308         * dom/Text.idl: Use non-legacy exception. 
2309  
2310         * editing/ApplyBlockElementCommand.cpp: 
2311         (WebCore::isNewLineAtPosition): Rewrote to use data rather than 
2312         substringData; more efficient. 
2313  
2314         * editing/DeleteFromTextNodeCommand.cpp: 
2315         (WebCore::DeleteFromTextNodeCommand::doApply): Updated to work with 
2316         functions that return ExceptionOr. 
2317         (WebCore::DeleteFromTextNodeCommand::doUnapply): Removed IGNORE_EXCEPTION. 
2318  
2319         * editing/InsertIntoTextNodeCommand.cpp: 
2320         (WebCore::InsertIntoTextNodeCommand::InsertIntoTextNodeCommand): 
2321         Use WTFMove to avoid a little bit of reference count churn. 
2322         (WebCore::InsertIntoTextNodeCommand::doApply): Removed IGNORE_EXCEPTION. 
2323         (WebCore::InsertIntoTextNodeCommand::doReapply): Removed ExceptionCode. 
2324         (WebCore::InsertIntoTextNodeCommand::doUnapply): Removed IGNORE_EXCEPTION. 
2325  
2326         * editing/SplitTextNodeCommand.cpp: 
2327         (WebCore::SplitTextNodeCommand::doApply): Updated to work with functions 
2328         that return ExceptionCode. 
2329         (WebCore::SplitTextNodeCommand::doUnapply): Removed ASSERT_NO_EXCEPTION. 
2330         (WebCore::SplitTextNodeCommand::insertText1AndTrimText2): Updated to work 
2331         with functions that return ExceptionCode. 
2332  
2333         * html/HTMLTextFormControlElement.cpp: 
2334         Added now-needed include of ExceptionCode.h. 
2335  
2336         * inspector/DOMEditor.cpp: Removed ExceptionCode out argument from calls 
2337         to replaceWholeText, which never throws an exception. 
2338  
2339 2016-10-29  Dean Jackson  <dino@apple.com> 
2340  
2341         Parse color() function 
2342         https://bugs.webkit.org/show_bug.cgi?id=164146 
2343         <rdar://problems/29007218> 
2344  
2345         Reviewed by Darin Adler. 
2346  
2347         Support the new CSS color() function: 
2348         https://drafts.csswg.org/css-color/#color-function 
2349  
2350         There are separate code paths for the old and new CSS parser. 
2351  
2352         Tests: css3/color/color-function-computed-style.html 
2353                css3/color/color-function-parsing.html 
2354  
2355         * css/CSSComputedStyleDeclaration.cpp: Use Color directly, not via rgb(). 
2356         (WebCore::ComputedStyleExtractor::currentColorOrValidColor): 
2357         (WebCore::ComputedStyleExtractor::valueForShadow): 
2358         (WebCore::ComputedStyleExtractor::propertyValue): 
2359  
2360         * css/CSSValueKeywords.in: Note that there is a color function, but the 
2361         keyword is already defined. Also add keywords for the color spaces. 
2362         * css/SVGCSSValueKeywords.in: sRGB is used outside of SVG now. 
2363  
2364         * css/parser/CSSParser.cpp: Old CSS parser code to handle color(). 
2365         (WebCore::isPercent): Helper to tell if a ValueWithCalculation is a percentage or not. 
2366         (WebCore::CSSParser::parseColorInt): Renamed. 
2367         (WebCore::CSSParser::parseColorDouble): Helper to get a Number/Percentage into a double 
2368         (WebCore::CSSParser::parseRGBParameters): 
2369         (WebCore::CSSParser::parseColorFunctionParameters): 
2370         (WebCore::CSSParser::parseHSLParameters): 
2371         (WebCore::CSSParser::parseColorFromValue): 
2372         (WebCore::CSSParser::colorIntFromValue): Deleted. 
2373         * css/parser/CSSParser.h: 
2374  
2375         * css/parser/CSSPropertyParserHelpers.cpp: New CSS parser code to handle color(). 
2376         (WebCore::CSSPropertyParserHelpers::parseColorFunctionParameters): 
2377         (WebCore::CSSPropertyParserHelpers::parseColorFunction): 
2378  
2379         * platform/graphics/Color.h: 
2380         (WebCore::Color::isValid): An extended color is valid. 
2381         (WebCore::Color::rgb): Move the code to a standalone inline 
2382         so that I could add a longer comment. 
2383  
2384         * platform/graphics/ExtendedColor.cpp: 
2385         (WebCore::ExtendedColor::cssText): Alpha output is only needed if != 1. 
2386  
2387         * platform/graphics/cg/ColorCG.cpp: Handle ExtendedColor -> CGColor. 
2388         (WebCore::leakCGColor): 
2389         (WebCore::cachedCGColor): 
2390  
2391 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
2392  
2393         [CSS Parser] Disable -webkit-text-size-adjust when the context says to. 
2394         https://bugs.webkit.org/show_bug.cgi?id=164191 
2395  
2396         Reviewed by Dean Jackson. 
2397  
2398         * css/parser/CSSPropertyParser.cpp: 
2399         (WebCore::CSSPropertyParser::parseSingleValue): 
2400  
2401 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
2402  
2403         [CSS Parser] Match old parser's image-rendering values 
2404         https://bugs.webkit.org/show_bug.cgi?id=164190 
2405  
2406         Reviewed by Dean Jackson. 
2407  
2408         * css/parser/CSSParserFastPaths.cpp: 
2409         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 
2410  
2411 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
2412  
2413         [CSS Parser] Support -webkit-text value for background-clip and -webkit-background-clip 
2414         https://bugs.webkit.org/show_bug.cgi?id=164189 
2415  
2416         Reviewed by Dean Jackson. 
2417  
2418         * css/parser/CSSPropertyParser.cpp: 
2419         (WebCore::consumeBackgroundBox): 
2420         (WebCore::consumePrefixedBackgroundBox): 
2421  
2422 2016-10-29  Joseph Pecoraro  <pecoraro@apple.com> 
2423  
2424         Remove some unnecessary includes 
2425         https://bugs.webkit.org/show_bug.cgi?id=164174 
2426  
2427         Reviewed by Darin Adler. 
2428  
2429 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
2430  
2431         [CSS Parser] Support -webkit-aspect-ratio 
2432         https://bugs.webkit.org/show_bug.cgi?id=164187 
2433  
2434         Reviewed by Simon Fraser. 
2435  
2436         * css/parser/CSSPropertyParser.cpp: 
2437         (WebCore::consumeWebkitAspectRatio): 
2438         (WebCore::CSSPropertyParser::parseSingleValue): 
2439  
2440 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
2441  
2442         [CSS Parser] Support the caps lock indicator appearance 
2443         https://bugs.webkit.org/show_bug.cgi?id=164186 
2444  
2445         Reviewed by Simon Fraser. 
2446  
2447         * css/parser/CSSParserFastPaths.cpp: 
2448         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue): 
2449  
2450 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
2451  
2452         [CSS Parser] Support the alt property 
2453         https://bugs.webkit.org/show_bug.cgi?id=164184 
2454  
2455         Reviewed by Simon Fraser. 
2456  
2457         * css/parser/CSSPropertyParser.cpp: 
2458         (WebCore::consumeAlt): 
2459         (WebCore::CSSPropertyParser::parseSingleValue): 
2460  
2461 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
2462  
2463         [CSS Parser] Add support for -webkit-hyphenate-limit-* properties 
2464         https://bugs.webkit.org/show_bug.cgi?id=164183 
2465  
2466         Reviewed by Simon Fraser. 
2467  
2468         * css/parser/CSSPropertyParser.cpp: 
2469         (WebCore::consumeHyphenateLimit): 
2470         (WebCore::CSSPropertyParser::parseSingleValue): 
2471  
2472 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
2473  
2474         [CSS Parser] Fix transform-origin and perspective-origin to parse as shorthands 
2475         https://bugs.webkit.org/show_bug.cgi?id=164178 
2476  
2477         Reviewed by Zalan Bujtas. 
2478  
2479         * css/CSSPropertyNames.in: 
2480         Patch the transform-origin-x/y and perspective-origin-x/y properties 
2481         to use new converters that can handle keywords. 
2482  
2483         * css/StyleBuilderConverter.h: 
2484         (WebCore::StyleBuilderConverter::convertPositionComponentX): 
2485         (WebCore::StyleBuilderConverter::convertPositionComponentY): 
2486         Add the new converters. They just call convertPositionComponent method 
2487         that we already use for object-position and background-position. 
2488  
2489         * css/parser/CSSPropertyParser.cpp: 
2490         (WebCore::CSSPropertyParser::consumeTransformOrigin): 
2491         (WebCore::CSSPropertyParser::consumePerspectiveOrigin): 
2492         Changed to treat the properties as shorthands and add the longhand 
2493         properties once parsed. 
2494  
2495         (WebCore::CSSPropertyParser::parseSingleValue): 
2496         (WebCore::CSSPropertyParser::parseShorthand): 
2497         * css/parser/CSSPropertyParser.h: 
2498         Move the parsing into the shorthand method, since we're still treating 
2499         these properties as shorthands. 
2500  
2501 2016-10-29  Dave Hyatt  <hyatt@apple.com> 
2502  
2503         [CSS Parser] Support -webkit-background-composite 
2504         https://bugs.webkit.org/show_bug.cgi?id=164179 
2505  
2506         Reviewed by Zalan Bujtas. 
2507  
2508         * css/parser/CSSPropertyParser.cpp: 
2509         (WebCore::consumeBackgroundComponent): 
2510         (WebCore::CSSPropertyParser::parseSingleValue): 
2511  
2512 2016-10-29  Youenn Fablet  <youenn@apple.com> 
2513  
2514         REGRESSION (r207754): LayoutTest http/tests/security/svg-image-with-css-cross-domain.html is a flaky failure 
2515         https://bugs.webkit.org/show_bug.cgi?id=163922 
2516  
2517         Reviewed by Alex Christensen. 
2518  
2519         Test: http/tests/security/cached-svg-image-with-css-cross-domain.html 
2520  
2521         Raw data was not copied in cloned CachedCSSStyleSheet while it is used by some of its clients. 
2522         Updated CachedCSSStyleSheet and CachedImage cloning to copy its raw data. 
2523  
2524         * loader/cache/CachedCSSStyleSheet.cpp: 
2525         (WebCore::CachedCSSStyleSheet::setBodyDataFrom): 
2526         * loader/cache/CachedImage.cpp: 
2527         (WebCore::CachedImage::setBodyDataFrom): 
2528         * loader/cache/CachedResource.h: 
2529         (WebCore::CachedResource::mayTryReplaceEncodedData): 
2530  
2531 2016-10-29  Youenn Fablet  <youenn@apple.com> 
2532  
2533         REGRESSION (Safari 10 / r189445): WKWebView and WebView no longer allow async XMLHttpRequest timeout to exceed 60 seconds 
2534         https://bugs.webkit.org/show_bug.cgi?id=163814 
2535         <rdar://problem/28917420> 
2536  
2537         Reviewed by Darin Adler. 
2538  
2539         Tests: http/tests/xmlhttprequest/resetting-timeout-to-zero.html 
2540                http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout.html 
2541  
2542         * xml/XMLHttpRequest.cpp: 
2543         (WebCore::XMLHttpRequest::setTimeout): If the XHR timeout is active, resetting the timeout to zero should lead to using the default network timeout. 
2544         Since it is difficult to update the timeout once the request is sent, we mimic the default network timeout with a 60 seconds XHR timeout. 
2545         (WebCore::XMLHttpRequest::createRequest): Setting network timeout to infinity if the XHR timeout is active. 
2546  
2547 2016-10-29  Youenn Fablet  <youenn@apple.com> 
2548  
2549         MediaEndpoint::generateDtlsInfo is not needed 
2550         https://bugs.webkit.org/show_bug.cgi?id=164130 
2551  
2552         Reviewed by Eric Carlson. 
2553  
2554         No change of behavior. 
2555  
2556         Removing MediaEndpoint::generateDtlsInfo as it can be called directly from createMediaEndpointOwr. 
2557  
2558         * Modules/mediastream/MediaEndpointPeerConnection.cpp: 
2559         (WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection): 
2560         * platform/mediastream/MediaEndpoint.cpp: 
2561         * platform/mediastream/MediaEndpoint.h: 
2562         * platform/mediastream/openwebrtc/MediaEndpointOwr.cpp: 
2563         (WebCore::createMediaEndpointOwr): 
2564         * platform/mediastream/openwebrtc/MediaEndpointOwr.h: 
2565         * platform/mock/MockMediaEndpoint.cpp: 
2566         (WebCore::MockMediaEndpoint::MockMediaEndpoint): 
2567         (WebCore::MockMediaEndpoint::generateDtlsInfo): Deleted. 
2568         * platform/mock/MockMediaEndpoint.h: 
2569  
2570 2016-10-28  Wenson Hsieh  <wenson_hsieh@apple.com> 
2571  
2572         Unreviewed, add Input Events to the features list. 
2573  
2574         * features.json: 
2575  
2576 2016-10-28  Darin Adler  <darin@apple.com> 
2577  
2578         Fix mismerge that broke a CEReactions test. 
2579  
2580         * html/HTMLOptionsCollection.idl: Add back CEReactions to the remove function. 
2581  
2582 2016-10-28  Darin Adler  <darin@apple.com> 
2583  
2584         Move all classes in the HTML directory from ExceptionCode to Exception 
2585         https://bugs.webkit.org/show_bug.cgi?id=163876 
2586  
2587         Reviewed by Sam Weinig. 
2588  
2589         * bindings/js/JSDOMBinding.cpp: 
2590         (WebCore::shouldAllowAccessToNode): Deleted. 
2591         (WebCore::BindingSecurity::shouldAllowAccessToFrame): Moved function into the 
2592         BindingSecurity namespace. Also changed arguments to references. 
2593         (WebCore::BindingSecurity::shouldAllowAccessToDOMWindow): Ditto. 
2594         (WebCore::BindingSecurity::shouldAllowAccessToNode): Changed argument type 
2595         from pointer to reference. 
2596  
2597         * bindings/js/JSDOMBinding.h: Removed top level shouldAllowAccessTo functions, 
2598         moving all of them into the BindingSecurity namespace. Changed BindingSecurity 
2599         from a class into a namespace. Added new checkSecurityForNode functions that 
2600         can be used directly to implement CheckSecurityForNode; they turn the node 
2601         into a null, which is no change in behavior from what bindings already did. 
2602  
2603         * bindings/js/JSDOMWindowCustom.cpp: 
2604         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess): Changed argument 
2605         type for passed-in string to const String& instead of String&. 
2606         (WebCore::JSDOMWindow::getOwnPropertySlot): Updated for BindingSecurity changes. 
2607         (WebCore::JSDOMWindow::getOwnPropertySlotByIndex): Ditto. 
2608         (WebCore::JSDOMWindow::put): Ditto. 
2609  
2610         * bindings/js/JSHTMLCanvasElementCustom.cpp: 
2611         (WebCore::attributesFor3DContext): Renamed from get3DContextAttributes and 
2612         changed to use a return value instead of an out argument. 
2613         (WebCore::JSHTMLCanvasElement::getContext): Updated for the above. 
2614         (WebCore::JSHTMLCanvasElement::toDataURL): Rewrote to handle ExceptionOr 
2615         and also to use Optional<double> instead of const double*. 
2616  
2617         * bindings/js/JSHTMLFrameElementCustom.cpp: 
2618         (WebCore::JSHTMLFrameElement::setLocation): Moved the logic from 
2619         allowSettingJavascriptURL in here and updated for BindingSecurity changes. 
2620  
2621         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: 
2622         (WebCore::JSHTMLOptionsCollection::setLength): Use propagateException. 
2623         Also streamlined the code a bit. 
2624         (WebCore::JSHTMLOptionsCollection::indexSetter): Updated for new name and 
2625         argument types for selectElementIndexSetter. 
2626  
2627         * bindings/js/JSHTMLSelectElementCustom.cpp: 
2628         (WebCore::selectElementIndexSetter): Updated name and argument types and 
2629         to use propagateException. 
2630         (WebCore::JSHTMLSelectElement::indexSetter): Updated for above. 
2631         * bindings/js/JSHTMLSelectElementCustom.h: Ditto. 
2632  
2633         * bindings/js/JSLocationCustom.cpp: 
2634         (WebCore::JSLocation::getOwnPropertySlotDelegate): Updated for changes to 
2635         BindingSecurity. 
2636         (WebCore::JSLocation::putDelegate): Ditto. Also rearranged logic a bit. 
2637  
2638         * bindings/js/ScriptController.cpp: 
2639         (WebCore::ScriptController::canAccessFromCurrentOrigin): Updated for 
2640         changes to BindingSecurity. 
2641  
2642         * bindings/scripts/CodeGeneratorJS.pm: 
2643         (GenerateImplementation): Removed old support for CheckSecurityForNode. 
2644         (NativeToJSValue): Added new support for CheckSecurityForNode, which uses 
2645         the new checkSecurityForNode function, and works properly with ExceptionOr. 
2646  
2647         * bindings/scripts/test/JS/JSTestObj.cpp: Updated for change below. 
2648  
2649         * dom/ChildNode.idl: Move the remove function to non-legacy exception. 
2650         Needed now because this needs to match the one in HTMLSelectElement. 
2651  
2652         * dom/Element.cpp: 
2653         (WebCore::Element::dispatchMouseForceWillBegin): Refactored a little bit. 
2654         (WebCore::Element::mergeWithNextTextNode): Support ExceptionOr for remove. 
2655         (WebCore::Element::setOuterHTML): Support ExceptionOr for 
2656         createFragmentForInnerOuterHTML. 
2657         (WebCore::Element::setInnerHTML): Ditto. 
2658         (WebCore::Element::insertAdjacentHTML): Ditto. 
2659  
2660         * dom/Node.cpp: 
2661         (WebCore::Node::remove): Use ExceptionOr. 
2662         (WebCore::Node::normalize): Remove use of IGNORE_EXCEPTION. 
2663         * dom/Node.h: Use ExceptionOr for remove. 
2664  
2665         * dom/Range.cpp: 
2666         (WebCore::Range::insertNode): Updated for change to remove. 
2667         (WebCore::Range::createContextualFragment): Updated for change 
2668         to WebCore::createContextualFragment. 
2669  
2670         * dom/ShadowRoot.cpp: 
2671         (WebCore::ShadowRoot::setInnerHTML): Use ExceptionOr for 
2672         createFragmentForInnerOuterHTML and replaceChildrenWithFragment. 
2673  
2674         * editing/AppendNodeCommand.cpp: 
2675         (WebCore::AppendNodeCommand::doUnapply): Remove IGNORE_EXCEPTION. 
2676         * editing/InsertNodeBeforeCommand.cpp: 
2677         (WebCore::InsertNodeBeforeCommand::doUnapply): Ditto. 
2678         * editing/MergeIdenticalElementsCommand.cpp: 
2679         (WebCore::MergeIdenticalElementsCommand::doApply): Ditto. 
2680         * editing/RemoveNodeCommand.cpp: 
2681         (WebCore::RemoveNodeCommand::doApply): Ditto. 
2682         * editing/SplitElementCommand.cpp: 
2683         (WebCore::SplitElementCommand::doUnapply): Ditto. 
2684         * editing/SplitTextNodeCommand.cpp: 
2685         (WebCore::SplitTextNodeCommand::doUnapply): Ditto. 
2686         * editing/WrapContentsInDummySpanCommand.cpp: 
2687         (WebCore::WrapContentsInDummySpanCommand::doUnapply): Ditto. 
2688  
2689         * editing/Editor.cpp: 
2690         (WebCore::Editor::insertDictationPhrases): Deleted. Moved this 
2691         iOS-specific function to EditorIOS.mm. 
2692         (WebCore::Editor::setDictationPhrasesAsChildOfElement): Ditto. 
2693         (WebCore::Editor::confirmMarkedText): Ditto. 
2694         (WebCore::Editor::setTextAsChildOfElement): Ditto. 
2695         (WebCore::Editor::ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping): Ditto. 
2696  
2697         * editing/ios/EditorIOS.mm: 
2698         (WebCore::Editor::fontForSelection): Remove ASSERT_NO_EXCEPTION. 
2699         (WebCore::Editor::fontAttributesForSelectionStart): Ditto. 
2700         (WebCore::Editor::insertDictationPhrases): Moved here from Editor.cpp. 
2701         (WebCore::Editor::setDictationPhrasesAsChildOfElement): Ditto. Also 
2702         updated code that used remove to not pass an ExceptionCode. 
2703         (WebCore::Editor::confirmMarkedText): Ditto. 
2704         (WebCore::Editor::setTextAsChildOfElement): Ditto. 
2705         (WebCore::Editor::ensureLastEditCommandHasCurrentSelectionIfOpenForMoreTyping): Ditto. 
2706  
2707         * editing/mac/EditorMac.mm: 
2708         (WebCore::Editor::fontForSelection): Remove ASSERT_NO_EXCEPTION. 
2709         (WebCore::Editor::fontAttributesForSelectionStart): Ditto. 
2710  
2711         * editing/markup.cpp: 
2712         (WebCore::createFragmentForInnerOuterHTML): Use ExceptionOr. 
2713         (WebCore::createContextualFragment): Ditto. 
2714         (WebCore::replaceChildrenWithFragment): Ditto. 
2715         (WebCore::replaceChildrenWithText): Ditto. 
2716         * editing/markup.h: Updated for above changes. 
2717  
2718         * html/BaseChooserOnlyDateAndTimeInputType.cpp: 
2719         (WebCore::BaseChooserOnlyDateAndTimeInputType::updateAppearance): 
2720         Removed ASSERT_NO_EXCEPTION. 
2721  
2722         * html/BaseDateAndTimeInputType.cpp: 
2723         (WebCore::BaseDateAndTimeInputType::setValueAsDate): Use ExceptionOr. 
2724         (WebCore::BaseDateAndTimeInputType::setValueAsDecimal): Ditto. 
2725         * html/BaseDateAndTimeInputType.h: Updated for above changes. 
2726  
2727         * html/DateTimeLocalInputType.cpp: 
2728         (WebCore::DateTimeLocalInputType::setValueAsDate): Use ExceptionOr. 
2729         * html/DateTimeLocalInputType.h: Updated for above changes. 
2730  
2731         * html/DOMTokenList.cpp: 
2732         (WebCore::DOMTokenList::validateToken): Use ExceptionOr. 
2733         (WebCore::DOMTokenList::validateTokens): Ditto. 
2734         (WebCore::DOMTokenList::addInternal): Ditto. 
2735         (WebCore::DOMTokenList::add): Ditto. 
2736         (WebCore::DOMTokenList::removeInternal): Ditto. 
2737         (WebCore::DOMTokenList::remove): Ditto. 
2738         (WebCore::DOMTokenList::toggle): Ditto. 
2739         (WebCore::DOMTokenList::replace): Ditto. 
2740         (WebCore::DOMTokenList::supports): Ditto. 
2741         * html/DOMTokenList.h: Updated for above changes. 
2742         * html/DOMTokenList.idl: Use non-legacy exceptions. 
2743  
2744         * html/DOMURL.cpp: 
2745         (WebCore::DOMURL::DOMURL): Just take the two URL objects and let 
2746         the create functions do all the processing. 
2747         (WebCore::DOMURL::create): Use ExceptionOr, and move the processing 
2748         of the URLs here out of the constructors. 
2749         (WebCore::DOMURL::setHref): Use ExceptionOr. 
2750         * html/DOMURL.h: Updated for above changes. 
2751         * html/DOMURL.idl: Use non-legacy exceptions. 
2752  
2753         * html/FTPDirectoryDocument.cpp: 
2754         (WebCore::FTPDirectoryDocumentParser::appendEntry): Remove 
2755         IGNORE_EXCEPTION and use releaseReturnValue(). 
2756  
2757         * html/HTMLCanvasElement.cpp: 
2758         (WebCore::HTMLCanvasElement::toDataURL): Use ExceptionOr. 
2759         * html/HTMLCanvasElement.h: Updated for above changes. 
2760         * html/HTMLCanvasElement.idl: Use non-legacy exception. 
2761  
2762         * html/HTMLElement.cpp: 
2763         (WebCore::HTMLElement::textToFragment): Use ExceptionOr. 
2764         (WebCore::HTMLElement::setInnerText): Ditto. 
2765         (WebCore::HTMLElement::setOuterText): Ditto. 
2766         (WebCore::HTMLElement::setContentEditable): Ditto. 
2767         (WebCore::HTMLElement::translateAttributeMode): Deleted. 
2768         (WebCore::HTMLElement::translate): Moved the logic from the 
2769         translateAttributeMode function in here. 
2770         * html/HTMLElement.h: Updated for above changes. 
2771         * html/HTMLElement.idl: Use non-legacy exceptions. 
2772  
2773         * html/HTMLEmbedElement.idl: Use non-legacy exception. 
2774         * html/HTMLFrameElement.idl: Ditto. 
2775  
2776         * html/HTMLFrameOwnerElement.cpp: 
2777         (WebCore::HTMLFrameOwnerElement::getSVGDocument): Use ExceptionOr. 
2778         * html/HTMLFrameOwnerElement.h: Updated for above. 
2779  
2780         * html/HTMLIFrameElement.idl: Use non-legacy exception. 
2781  
2782         * html/HTMLInputElement.cpp: 
2783         (WebCore::HTMLInputElement::stepUp): Use ExceptionOr. 
2784         (WebCore::HTMLInputElement::stepDown): Ditto. 
2785         (WebCore::HTMLInputElement::setValue): Ditto. 
2786         (WebCore::HTMLInputElement::setValueAsDate): Ditto. 
2787         (WebCore::HTMLInputElement::setValueAsNumber): Ditto. 
2788         (WebCore::HTMLInputElement::setSize): Ditto. 
2789         (WebCore::HTMLInputElement::maxLengthAttributeChanged): Use the 
2790         new internalSetMaxLength function; old code relied on a setMaxLength 
2791         that was different from the one exposed to bindings. 
2792         (WebCore::HTMLInputElement::minLengthAttributeChanged): Ditto. 
2793         (WebCore::HTMLInputElement::setRangeText): Use ExceptionOr. 
2794         * html/HTMLInputElement.h: Updated for above changes. Also use 
2795         data member initialization for InputElementClickState instead of 
2796         a constructor. 
2797         * html/HTMLInputElement.idl: Use non-legacy exception. 
2798  
2799         * html/HTMLMarqueeElement.cpp: 
2800         (WebCore::HTMLMarqueeElement::setLoop): Use ExceptionOr. 
2801         (WebCore::HTMLMarqueeElement::renderMarquee): Tweaked. 
2802         * html/HTMLMarqueeElement.h: Updated for above changes. 
2803         * html/HTMLMarqueeElement.idl: Ditto. 
2804  
2805         * html/HTMLMediaElement.cpp: 
2806         (WebCore::HTMLMediaElement::TrackGroup::TrackGroup): 
2807         Initialize most data members in class definition rather than 
2808         the constructor. 
2809         (WebCore::HTMLMediaElement::HTMLMediaElement): Ditto. 
2810         (WebCore::HTMLMediaElement::~HTMLMediaElement): Updated since 
2811         removeMediaElement now takes a reference. 
2812         (WebCore::HTMLMediaElement::updateActiveTextTrackCues): Use 
2813         a modern for loop to streamline code. 
2814         (WebCore::HTMLMediaElement::textTrackModeChanged): Updated since 
2815         track now returns a reference. 
2816         (WebCore::HTMLMediaElement::setCurrentTimeForBindings): Renamed 
2817         to prevent ambiguity with the other version that has slightly 
2818         different semantics and overloading and changed to use ExceptionOr. 
2819         (WebCore::HTMLMediaElement::playInternal): Updated to use reference. 
2820         (WebCore::HTMLMediaElement::setVolume): Use ExceptionOr. 
2821         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack): Take a 
2822         reference instead of a PassRefPtr. 
2823         (WebCore::HTMLMediaElement::mediaPlayerDidAddTextTrack): Ditto. 
2824         (WebCore::HTMLMediaElement::mediaPlayerDidAddVideoTrack): Ditto. 
2825         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveAudioTrack): Ditto. 
2826         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveTextTrack): Ditto. 
2827         (WebCore::HTMLMediaElement::mediaPlayerDidRemoveVideoTrack): Ditto. 
2828         (WebCore::HTMLMediaElement::addTextTrack): Use ExceptionOr. 
2829         (WebCore::HTMLMediaElement::didAddTextTrack): Use a reference. 
2830         (WebCore::HTMLMediaElement::didRemoveTextTrack): Ditto. 
2831         (WebCore::HTMLMediaElement::maxBufferedTime): Update to use different 
2832         interface to time ranges that does not need to deal with exceptions. 
2833         (WebCore::HTMLMediaElement::setController): Pass references. 
2834         (WebCore::HTMLMediaElement::outOfBandTrackSources): Use reference. 
2835         * html/HTMLMediaElement.h: Updated for above. 
2836         * html/HTMLMediaElement.idl: Use non-legacy exceptions. 
2837
2838         * html/HTMLObjectElement.idl: Use non-legacy exception. 
2839      
2840         * html/HTMLOptionElement.cpp: 
2841         (WebCore::HTMLOptionElement::createForJSConstructor): Use ExceptionOr. 
2842         * html/HTMLOptionElement.h: Updated for above change. 
2843         * html/HTMLOptionElement.idl: Use non-legacy exception. 
2844
2845         * html/HTMLOptionsCollection.cpp: 
2846         (WebCore::HTMLOptionsCollection::setLength): Use ExceptionOr. 
2847         * html/HTMLOptionsCollection.h: Updated for above change. 
2848         * html/HTMLOptionsCollection.idl: Use non-legacy exception. 
2849  
2850         * html/HTMLProgressElement.cpp: 
2851         (WebCore::HTMLProgressElement::setValue): Removed non-finite handling 
2852         because that is now handled by the bindings. 
2853         (WebCore::HTMLProgressElement::setMax): Ditto. 
2854         * html/HTMLProgressElement.h: Updated for above. 
2855         * html/HTMLProgressElement.idl: Changed attributes to be double instead 
2856         of unrestricted double, and this was able to remove exceptions. 
2857  
2858         * html/HTMLSelectElement.cpp: 
2859         (WebCore::HTMLSelectElement::removeByIndex): Drop IGNORE_EXCEPTION. 
2860         (WebCore::HTMLSelectElement::remove): Use ExceptionOr. 
2861         (WebCore::HTMLSelectElement::setOption): Ditto. 
2862         (WebCore::HTMLSelectElement::setLength): Ditto. 
2863         * html/HTMLSelectElement.h: Updated for above changes. 
2864         * html/HTMLSelectElement.idl: Use non-legacy exceptions. 
2865  
2866         * html/HTMLTableElement.cpp: 
2867         (WebCore::HTMLTableElement::setCaption): Use ExceptionOr. 
2868         (WebCore::HTMLTableElement::setTHead): Ditto. 
2869         (WebCore::HTMLTableElement::setTFoot): Ditto. 
2870         (WebCore::HTMLTableElement::createTHead): Streamline a bit. 
2871         (WebCore::HTMLTableElement::deleteTHead): Ditto. 
2872         (WebCore::HTMLTableElement::createTFoot): Ditto. 
2873         (WebCore::HTMLTableElement::deleteTFoot): Ditto. 
2874         (WebCore::HTMLTableElement::createTBody): Ditto. 
2875         (WebCore::HTMLTableElement::createCaption): Ditto. 
2876         (WebCore::HTMLTableElement::insertRow): Use ExceptionOr. 
2877         (WebCore::HTMLTableElement::deleteRow): Ditto. 
2878         * html/HTMLTableElement.h: Updated for above changes. 
2879         * html/HTMLTableElement.idl: Use non-legacy exceptions. 
2880  
2881         * html/HTMLTableRowElement.cpp: 
2882         (WebCore::findTable): Added. 
2883         (WebCore::HTMLTableRowElement::rowIndex): Streamline a bit using the 
2884         findTable function above. 
2885         (WebCore::findRows): Added. 
2886         (WebCore::HTMLTableRowElement::sectionRowIndex): Streamline a bit using 
2887         the findRows function above. 
2888         (WebCore::HTMLTableRowElement::insertCell): Use ExceptionOr. 
2889         (WebCore::HTMLTableRowElement::deleteCell): Ditto. 
2890         (WebCore::HTMLTableRowElement::setCells): Deleted. 
2891         * html/HTMLTableRowElement.h: Updated for the above. The setCells function 
2892         was dead code. 
2893         * html/HTMLTableRowElement.idl: Use non-legacy exceptions. 
2894  
2895         * html/HTMLTableSectionElement.cpp: 
2896         (WebCore::HTMLTableSectionElement::additionalPresentationAttributeStyle): 
2897         Tweaked a bit to use early return. 
2898         (WebCore::HTMLTableSectionElement::insertRow): Use ExceptionOr. 
2899         (WebCore::HTMLTableSectionElement::deleteRow): Ditto. 
2900         (WebCore::HTMLTableSectionElement::numRows): Use childrenOfType. 
2901         (WebCore::HTMLTableSectionElement::align): Deleted. 
2902         (WebCore::HTMLTableSectionElement::setAlign): Deleted. 
2903         (WebCore::HTMLTableSectionElement::ch): Deleted. 
2904         (WebCore::HTMLTableSectionElement::setCh): Deleted. 
2905         (WebCore::HTMLTableSectionElement::chOff): Deleted. 
2906         (WebCore::HTMLTableSectionElement::setChOff): Deleted. 
2907         (WebCore::HTMLTableSectionElement::vAlign): Deleted. 
2908         (WebCore::HTMLTableSectionElement::setVAlign): Deleted. 
2909         * html/HTMLTableSectionElement.h: Updated for the above. 
2910         * html/HTMLTableSectionElement.idl: Use non-legacy exception. 
2911  
2912         * html/HTMLTextAreaElement.cpp: 
2913         (WebCore::HTMLTextAreaElement::maxLengthAttributeChanged): Use the new 
2914         internalSetMaxLength function; old code relied on a setMaxLength 
2915         that was different from the one exposed to bindings. 
2916         (WebCore::HTMLTextAreaElement::minLengthAttributeChanged): Ditto. 
2917         (WebCore::HTMLTextAreaElement::updatePlaceholderText): Removed 
2918         ASSERT_NO_EXCEPTION. 
2919         * html/HTMLTextAreaElement.idl: Use non-legacy exceptions. 
2920  
2921         * html/HTMLTextFormControlElement.cpp: 
2922         (WebCore::HTMLTextFormControlElement::setRangeText): Use ExceptionOr. 
2923         (WebCore::HTMLTextFormControlElement::setInnerTextValue): Ditto. 
2924         (WebCore::HTMLTextFormControlElement::setMaxLength): Ditto. 
2925         (WebCore::HTMLTextFormControlElement::setMinLength): Ditto. 
2926         * html/HTMLTextFormControlElement.h: Updated for above changes. 
2927         Also renamed the setMin/MaxLength function overloads for internal use 
2928         to internSetMin/MaxLength and made them protected. 
2929  
2930         * html/HTMLTrackElement.cpp: 
2931         (WebCore::HTMLTrackElement::~HTMLTrackElement): Call clearElement on the 
2932         track to break the connection. Before this was done as a side effect of 
2933         clearClient, but that is called in other cases where we do not want to 
2934         clear the link back to the track element. 
2935         (WebCore::HTMLTrackElement::insertedInto): Removed code that uses the 
2936         track function for its side effect of creating a track; no longer needed. 
2937         Rewrote this so it's more symmetric with removedFrom. 
2938         (WebCore::HTMLTrackElement::removedFrom): Pass reference. Also reordered 
2939         and removed an unnecessary check for null parent. 
2940         (WebCore::HTMLTrackElement::parseAttribute): Use track. 
2941         (WebCore::HTMLTrackElement::kind): Ditto. 
2942         (WebCore::HTMLTrackElement::track): Renamed ensureTrack to this. Also 
2943         removed the redundant code to call setTrackElement; we no longer change 
2944         the track element on a track until the track element is destroyed. 
2945         (WebCore::HTMLTrackElement::scheduleLoad): Use track. 
2946         (WebCore::HTMLTrackElement::loadTimerFired): Ditto. 
2947         (WebCore::HTMLTrackElement::setReadyState): Ditto. 
2948         (WebCore::HTMLTrackElement::readyState): Ditto. 
2949         (WebCore::HTMLTrackElement::mediaElement): Rearranged to use early return. 
2950         * html/HTMLTrackElement.h: Updated for above changes. 
2951  
2952         * html/HTMLVideoElement.cpp: 
2953         (WebCore::HTMLVideoElement::webkitEnterFullscreen): Use ExceptionOr. 
2954         * html/HTMLVideoElement.h: Removed the functions used just for 
2955         capitalization reasons; that's now handled in the bindings. 
2956         * html/HTMLVideoElement.idl: Use non-legacy bindings and ImplementedAs. 
2957  
2958         * html/ImageData.cpp: 
2959         (WebCore::ImageData::create): Return ExceptionOr. 
2960         * html/ImageData.h: Updated for above changes. 
2961         * html/ImageData.idl: Use non-legacy exceptions. 
2962  
2963         * html/InputType.cpp: 
2964         (WebCore::InputType::setValueAsDate): Use ExceptionOr. 
2965         (WebCore::InputType::setValueAsDouble): Ditto. 
2966         (WebCore::InputType::setValueAsDecimal): Ditto. 
2967         (WebCore::InputType::applyStep): Ditto. 
2968         (WebCore::InputType::stepUp): Ditto. 
2969         (WebCore::InputType::stepUpFromRenderer): Removed IGNORE_EXCEPTION. 
2970         * html/InputType.h: Updated for the above. 
2971  
2972         * html/MediaController.cpp: 
2973         (MediaController::addMediaElement): Take a reference instead of a pointer. 
2974         (MediaController::removeMediaElement): Ditto. 
2975         (MediaController::containsMediaElement): Ditto. 
2976         (MediaController::setVolume): Use ExceptionOr. 
2977         (MediaController::bringElementUpToSpeed): Take a reference. 
2978         * html/MediaController.h: Updated for above changes. Also made lots of 
2979         function overrides private. 
2980         * html/MediaController.idl: Use non-legacy exception. 
2981  
2982         * html/MediaControllerInterface.h: Use ExceptionOr for setVolume. 
2983  
2984         * html/NumberInputType.cpp: 
2985         (WebCore::RealNumberRenderSize::max): Use aggregate initialization instead 
2986         of a constructor. 
2987         (WebCore::calculateRenderSize): Ditto. 
2988         (WebCore::NumberInputType::setValueAsDouble): Use ExceptionOr. 
2989         (WebCore::NumberInputType::setValueAsDecimal): Ditto. 
2990         * html/NumberInputType.h: Updated for above changes. 
2991  
2992         * html/RangeInputType.cpp: 
2993         (WebCore::RangeInputType::RangeInputType): Initialize scalar data member 
2994         in class definition instead of here. 
2995         (WebCore::RangeInputType::setValueAsDecimal): Use ExceptionOr. 
2996         (WebCore::RangeInputType::handleKeydownEvent): Removed IGNORE_EXCEPTION. 
2997         * html/RangeInputType.h: Updated for above changes. 
2998  
2999         * html/TextFieldInputType.cpp: 
3000         (WebCore::TextFieldInputType::updatePlaceholderText): Removed 
3001         ASSERT_NO_EXCEPTION. 
3002  
3003         * html/TimeRanges.cpp: 
3004         (WebCore::TimeRanges::start): Use ExceptionOr. 
3005         (WebCore::TimeRanges::end): Ditto. 
3006         * html/TimeRanges.h: Updated for the above. 
3007         * html/TimeRanges.idl: Use non-legacy exceptions. 
3008  
3009         * html/URLUtils.idl: Use non-legacy exception. 
3010  
3011         * html/ValidationMessage.cpp: 
3012         (WebCore::ValidationMessage::setMessageDOMAndStartTimer): Removed 
3013         ASSERT_NO_EXCEPTION, IGNORE_EXCEPTION, and other exception-ignoring idioms. 
3014         * html/parser/HTMLTreeBuilder.cpp: 
3015         (WebCore::HTMLTreeBuilder::processStartTagForInBody): Ditto. 
3016         * html/shadow/MediaControlElementTypes.cpp: 
3017         (WebCore::MediaControlVolumeSliderElement::defaultEventHandler): Ditto. 
3018         * html/shadow/MediaControlElements.cpp: 
3019         (WebCore::MediaControlPanelElement::setPosition): Ditto. 
3020         (WebCore::MediaControlPanelElement::resetPosition): Ditto. 
3021         (WebCore::MediaControlStatusDisplayElement::update): Ditto. 
3022         (WebCore::MediaControlClosedCaptionsTrackListElement::updateDisplay): Ditto. 
3023         (WebCore::MediaControlFullscreenVolumeMinButtonElement::defaultEventHandler): Ditto. 
3024         (WebCore::MediaControlFullscreenVolumeMaxButtonElement::defaultEventHandler): Ditto. 
3025         * html/shadow/MediaControls.cpp: 
3026         (WebCore::MediaControls::updateCurrentTimeDisplay): Ditto. 
3027         * html/shadow/MediaControlsApple.cpp: 
3028         (WebCore::MediaControlsApple::updateCurrentTimeDisplay): Ditto. 
3029  
3030         * html/track/LoadableTextTrack.cpp: 
3031         (WebCore::LoadableTextTrack::LoadableTextTrack): Take reference. 
3032         (WebCore::LoadableTextTrack::~LoadableTextTrack): Deleted. 
3033         (WebCore::LoadableTextTrack::clearClient): Deleted override. We no longer 
3034         want to clear m_trackElement when clearing the client. 
3035         (WebCore::LoadableTextTrack::setTrackElement): Deleted. 
3036         (WebCore::LoadableTextTrack::id): Changed to use 
3037         attributeWithoutSynchronization for better performance and idAttr instead 
3038         of a string constant. 
3039         * html/track/LoadableTextTrack.h: Updated for above changes. Added a new 
3040         clearElement function. Made the element and isDefault functions private. 
3041  
3042         * html/track/VTTCue.cpp: 
3043         (WebCore::VTTCue::~VTTCue): Removed ASSERT_NO_EXCEPTION, IGNORE_EXCEPTION, 
3044         and other exception-ignoring idioms. 
3045         (WebCore::VTTCue::removeDisplayTree): Ditto. 
3046         * html/track/VTTRegion.cpp: 
3047         (WebCore::VTTRegion::displayLastTextTrackCueBox): Ditto. 
3048         (WebCore::VTTRegion::willRemoveTextTrackCueBox): Ditto. 
3049  
3050         * inspector/InspectorDOMAgent.cpp: 
3051         (WebCore::InspectorDOMAgent::pushNodeByBackendIdToFrontend): 
3052         Rewrote to avoid multiplehash table lookups and added a FIXME about 
3053         the peculiar code here. 
3054         (WebCore::InspectorDOMAgent::resolveNode): Streamlined. 
3055         (WebCore::InspectorDOMAgent::nodeAsScriptValue): Use the new 
3056         checkSecurityForNode instead of the old shouldAllowAccessToNode. 
3057  
3058         * platform/graphics/ImageBuffer.h: Take Optional<double> instead of 
3059         const double* in toDataURL. Renamed ImageDataToDataURL to just dataURL. 
3060  
3061         * platform/graphics/MediaPlayer.cpp: 
3062         (WebCore::MediaPlayer::addAudioTrack): Take a reference instead of PassRefPtr. 
3063         (WebCore::MediaPlayer::removeAudioTrack): Ditto. 
3064         (WebCore::MediaPlayer::addTextTrack): Ditto. 
3065         (WebCore::MediaPlayer::removeTextTrack): Ditto. 
3066         (WebCore::MediaPlayer::addVideoTrack): Ditto. 
3067         (WebCore::MediaPlayer::removeVideoTrack): Ditto. 
3068         * platform/graphics/MediaPlayer.h: Updated for the above. 
3069  
3070         * platform/graphics/PlatformTimeRanges.h: Exported a couple of functions 
3071         that are now used in WebKit. 
3072  
3073         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp: 
3074         (WebCore::MediaPlayerPrivateAVFoundation::clearTextTracks): Use a modern for loop. 
3075         (WebCore::MediaPlayerPrivateAVFoundation::processNewAndRemovedTextTracks): 
3076         Fixed a bug that would cause this function to fail to process half the tracks. 
3077         Also updated for the change from PassRefPtr to references. 
3078  
3079         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 
3080         (WebCore::determineChangedTracksFromNewTracksAndOldItems): Pass references. 
3081         (WebCore::MediaPlayerPrivateAVFoundationObjC::audioSourceProvider): Ditto. 
3082         (WebCore::MediaPlayerPrivateAVFoundationObjC::processMetadataTrack): Ditto. 
3083         (WebCore::assetMetadataKeyNames): Tweaked formatting. 
3084         (WebCore::itemKVOProperties): Ditto. 
3085         (WebCore::playerKVOProperties): Ditto. 
3086  
3087         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm: 
3088         (WebCore::updateTracksOfType): Pass references. 
3089  
3090         * platform/graphics/cairo/ImageBufferCairo.cpp: 
3091         (WebCore::ImageBuffer::toDataURL): Use Optional<double> 
3092  
3093         * platform/graphics/cg/ImageBufferCG.cpp: 
3094         (WebCore::createBitmapImageAfterScalingIfNeeded): Use auto. 
3095         (WebCore::encodeImage): Ditto. Also renamed from CGImageEncodeToData. 
3096         (WebCore::dataURL): Ditto. Also renamed from CGImageToDataURL and from 
3097         ImageDataToDataURL. 
3098         (WebCore::ImageBuffer::toDataURL): Ditto. 
3099  
3100         * platform/graphics/efl/ImageBufferEfl.cpp: 
3101         (WebCore::encodeImageJPEG): Use Optional<double> 
3102         (WebCore::ImageBuffer::toDataURL): Ditto. 
3103  
3104         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: 
3105         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo): Pass 
3106         a reference instead of pointer. 
3107         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio): Ditto. 
3108         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText): Ditto. 
3109         (WebCore::MediaPlayerPrivateGStreamer::processMpegTsSection): Ditto. 
3110         (WebCore::MediaPlayerPrivateGStreamer::processTableOfContents): Ditto. 
3111  
3112         * platform/graphics/gtk/ImageBufferGtk.cpp: 
3113         (WebCore::encodeImage): Use Optional<double> 
3114         (WebCore::ImageBuffer::toDataURL): Ditto. 
3115  
3116 2016-10-28  Dave Hyatt  <hyatt@apple.com> 
3117  
3118         [CSS Parser] Allow @font-face src descriptor's format function to contain identifiers 
3119         https://bugs.webkit.org/show_bug.cgi?id=164169 
3120  
3121         Reviewed by Simon Fraser. 
3122  
3123         * css/parser/CSSPropertyParser.cpp: 
3124         (WebCore::consumeFontFaceSrcURI): 
3125  
3126 2016-10-28  Jer Noble  <jer.noble@apple.com> 
3127  
3128         WebAudio does not resume when moving from background to foreground tab. 
3129         https://bugs.webkit.org/show_bug.cgi?id=164043 
3130  
3131         Reviewed by Darin Adler. 
3132  
3133         Test: webaudio/page-canstartmedia.html 
3134  
3135         * Modules/webaudio/AudioContext.cpp: 
3136         (WebCore::AudioContext::mediaCanStart): 
3137  
3138 2016-10-28  Wenson Hsieh  <wenson_hsieh@apple.com> 
3139  
3140         iOS autocorrection does not trigger an input event of inputType "insertReplacementText" 
3141         https://bugs.webkit.org/show_bug.cgi?id=164077 
3142         <rdar://problem/28987810> 
3143  
3144         Reviewed by Simon Fraser. 
3145  
3146         Fixes candidate insertion on iOS, so that it fires input events of type "insertReplacementText" and adds two 
3147         iOS unit tests covering this change as well as the test infrastructure needed to support these tests. See 
3148         comments below for more details. 
3149  
3150         Tests: fast/events/ios/before-input-events-prevent-candidate-insertion.html 
3151                fast/events/ios/input-events-insert-replacement-text.html 
3152  
3153         * dom/TextEvent.h: 
3154  
3155         Adds isAutocompletion() to TextEvent, as well as the TextEventInputAutocompletion text input type. When the 
3156         Editor handles this TextEvent, it will use this information when creating or modifying the corresponding typing 
3157         command. 
3158  
3159         * dom/TextEventInputType.h: 
3160         * editing/Editor.cpp: 
3161         (WebCore::Editor::insertText): 
3162         (WebCore::Editor::insertTextWithoutSendingTextEvent): 
3163         * editing/Editor.h: 
3164         * editing/TypingCommand.cpp: 
3165         (WebCore::editActionForTypingCommand): 
3166  
3167         Now takes whether the command is autocorrection into account. If so, the corresponding edit action should be 
3168         EditActionInsertReplacement rather than EditActionTypingInsertText. 
3169  
3170         (WebCore::TypingCommand::TypingCommand): 
3171         (WebCore::TypingCommand::deleteSelection): 
3172         (WebCore::TypingCommand::deleteKeyPressed): 
3173         (WebCore::TypingCommand::forwardDeleteKeyPressed): 
3174         (WebCore::TypingCommand::insertText): 
3175         (WebCore::TypingCommand::insertLineBreak): 
3176         (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent): 
3177         (WebCore::TypingCommand::insertParagraphSeparator): 
3178         (WebCore::TypingCommand::inputEventData): 
3179         (WebCore::TypingCommand::willAddTypingToOpenCommand): 
3180         * editing/TypingCommand.h: 
3181  
3182         Adds a new TypingCommand option, IsAutocompletion. 
3183  
3184 2016-10-28  Commit Queue  <commit-queue@webkit.org> 
3185  
3186         Unreviewed, rolling out r207700. 
3187         https://bugs.webkit.org/show_bug.cgi?id=164168 
3188  
3189         We are ready after r208086 (Requested by alexchristensen on 
3190         #webkit). 
3191  
3192         Reverted changeset: 
3193  
3194         "Unreviewed, rolling out r207582." 
3195         https://bugs.webkit.org/show_bug.cgi?id=163819 
3196         http://trac.webkit.org/changeset/207700 
3197  
3198 2016-10-28  Dave Hyatt  <hyatt@apple.com> 
3199  
3200         [CSS Parser] Allow unknown properties in will-change 
3201         https://bugs.webkit.org/show_bug.cgi?id=164165 
3202  
3203         Reviewed by Simon Fraser. 
3204  
3205         * css/parser/CSSPropertyParser.cpp: 
3206         (WebCore::consumeWillChange): 
3207  
3208 2016-10-28  Alex Christensen  <achristensen@webkit.org> 
3209  
3210         Partially revert 207805 after resolution in URL spec issue 87 
3211         https://bugs.webkit.org/show_bug.cgi?id=164142 
3212  
3213         Reviewed by Andy Estes. 
3214  
3215         Covered by updated layout tests and API tests. 
3216  
3217         * platform/URLParser.cpp: 
3218         (WebCore::URLParser::isSingleDotPathSegment): 
3219         (WebCore::URLParser::isDoubleDotPathSegment): 
3220         (WebCore::URLParser::consumeSingleDotPathSegment): 
3221         (WebCore::URLParser::consumeDoubleDotPathSegment): 
3222         Treat %2e%2e as .. and %2e as . but only if it is entirety of the path segment. 
3223         There are tests for URLs like http://host/abc%2edef which have not changed because 
3224         the %2e is not the entirety of the path segment. 
3225  
3226 2016-10-28  Alex Christensen  <achristensen@webkit.org> 
3227  
3228         URLParser should not try to interpret host of URLs with unrecognized schemes as IPv4 address 
3229         https://bugs.webkit.org/show_bug.cgi?id=164154 
3230  
3231         Reviewed by Andy Estes. 
3232  
3233         This is needed to match behavior of all browsers. 
3234         This is being discussed in the spec at https://github.com/whatwg/url/issues/148 
3235  
3236         Covered by new API tests. 
3237  
3238         * platform/URLParser.cpp: 
3239         (WebCore::URLParser::parseHostAndPort): 
3240         Only try to parse and canonicalize the host as an IPv4 address if the scheme is special (http, wss, etc.) 
3241  
3242 2016-10-28  Chris Dumez  <cdumez@apple.com> 
3243  
3244         DOMStringMap reports properties as non-enumerable 
3245         https://bugs.webkit.org/show_bug.cgi?id=164114 
3246  
3247         Reviewed by Sam Weinig. 
3248  
3249         DOMStringMap's named properties should be configurable, enumerable 
3250         and writable as per: 
3251         - https://heycam.github.io/webidl/#getownproperty-guts (2.7-9) 
3252         - https://html.spec.whatwg.org/multipage/dom.html#domstringmap 
3253  
3254         Firefox and Chrome agree with the specification. However, WebKit 
3255         was doing the complete opposite. 
3256  
3257         No new tests, updated existing test. 
3258  
3259         * bindings/js/JSDOMStringMapCustom.cpp: 
3260         (WebCore::JSDOMStringMap::getOwnPropertySlotDelegate): 
3261  
3262 2016-10-28  Ryosuke Niwa  <rniwa@webkit.org> 
3263  
3264         Add CEReactions to the remaining HTML DOM APIs 
3265         https://bugs.webkit.org/show_bug.cgi?id=163969 
3266  
3267         Reviewed by Chris Dumez. 
3268  
3269         Added CEReactions to the remaining DOM and HTML APIs as needed. 
3270  
3271         Tests: fast/custom-elements/reactions-for-indieui.html 
3272                fast/custom-elements/reactions/Document.html 
3273                fast/custom-elements/reactions/HTMLAnchorElement.html 
3274                fast/custom-elements/reactions/HTMLOptionElement.html 
3275                fast/custom-elements/reactions/HTMLOptionsCollection.html 
3276                fast/custom-elements/reactions/HTMLOutputElement.html 
3277                fast/custom-elements/reactions/HTMLSelectElement.html 
3278                fast/custom-elements/reactions/HTMLTableElement.html 
3279                fast/custom-elements/reactions/HTMLTableRowElement.html 
3280                fast/custom-elements/reactions/HTMLTableSectionElement.html 
3281                fast/custom-elements/reactions/HTMLTitleElement.html 
3282                fast/custom-elements/reactions/ShadowRoot.html 
3283  
3284         * bindings/js/JSHTMLOptionsCollectionCustom.cpp: 
3285         (WebCore::JSHTMLOptionsCollection::setLength): 
3286         (WebCore::JSHTMLOptionsCollection::indexSetter): 
3287         * bindings/js/JSHTMLSelectElementCustom.cpp: 
3288         (WebCore::JSHTMLSelectElement::indexSetter): 
3289         * dom/CharacterData.idl: 
3290         * dom/Document.idl: 
3291         * dom/Element.idl: 
3292         * dom/ShadowRoot.idl: 
3293         * html/HTMLAnchorElement.idl: 
3294         * html/HTMLDocument.idl: 
3295         * html/HTMLOptionElement.idl: 
3296         * html/HTMLOptionsCollection.idl: 
3297         * html/HTMLOutputElement.idl: 
3298         * html/HTMLSelectElement.idl: 
3299         * html/HTMLTableElement.idl: 
3300         * html/HTMLTableRowElement.idl: 
3301         * html/HTMLTableSectionElement.idl: 
3302         * html/HTMLTitleElement.idl: 
3303  
3304 2016-10-28  Antoine Quint  <graouts@apple.com> 
3305  
3306         [Modern Media Controls] Media Controller: volume control support 
3307         https://bugs.webkit.org/show_bug.cgi?id=163727 
3308  
3309         Reviewed by Dean Jackson. 
3310  
3311         We introduce the VolumeSupport class which brings support for modifying the media 
3312         volume by interacting with the mute volume slider in the media controls and correctly 
3313         reflecting the media's volume should it be changed via the media API. 
3314  
3315         Tests: media/modern-media-controls/volume-support/volume-support-click.html 
3316                media/modern-media-controls/volume-support/volume-support-drag.html 
3317                media/modern-media-controls/volume-support/volume-support-media-api-mute.html 
3318                media/modern-media-controls/volume-support/volume-support-media-api.html 
3319  
3320         * Modules/modern-media-controls/js-files: 
3321         * Modules/modern-media-controls/media/media-controller.js: 
3322         (MediaController): 
3323         * Modules/modern-media-controls/media/volume-support.js: Added. 
3324         (VolumeSupport.prototype.get control): 
3325         (VolumeSupport.prototype.get mediaEvents): 
3326         (VolumeSupport.prototype.controlValueWillStartChanging): 
3327         (VolumeSupport.prototype.controlValueDidChange): 
3328         (VolumeSupport.prototype.syncControl): 
3329         (VolumeSupport): 
3330         * WebCore.xcodeproj/project.pbxproj: 
3331  
3332 2016-10-28  Yusuke Suzuki  <utatane.tea@gmail.com> 
3333  
3334         [DOMJIT] Rename CallDOM to CallDOMGetter 
3335         https://bugs.webkit.org/show_bug.cgi?id=164157 
3336  
3337         Reviewed by Keith Miller. 
3338  
3339         No behavior change. 
3340  
3341         * bindings/scripts/CodeGeneratorJS.pm: 
3342         (GenerateHeader): 
3343         * bindings/scripts/test/JS/JSTestDOMJIT.h: 
3344         * domjit/JSDocumentDOMJIT.cpp: 
3345         (WebCore::DocumentDocumentElementDOMJIT::callDOMGetter): 
3346         (WebCore::DocumentDocumentElementDOMJIT::callDOM): Deleted. 
3347         * domjit/JSNodeDOMJIT.cpp: 
3348         (WebCore::createCallDOMGetterForOffsetAccess): 
3349         (WebCore::NodeFirstChildDOMJIT::callDOMGetter): 
3350         (WebCore::NodeLastChildDOMJIT::callDOMGetter): 
3351         (WebCore::NodeNextSiblingDOMJIT::callDOMGetter): 
3352         (WebCore::NodePreviousSiblingDOMJIT::callDOMGetter): 
3353         (WebCore::NodeParentNodeDOMJIT::callDOMGetter): 
3354         (WebCore::NodeNodeTypeDOMJIT::callDOMGetter): 
3355         (WebCore::NodeOwnerDocumentDOMJIT::callDOMGetter): 
3356         (WebCore::createCallDOMForOffsetAccess): Deleted. 
3357         (WebCore::NodeFirstChildDOMJIT::callDOM): Deleted. 
3358         (WebCore::NodeLastChildDOMJIT::callDOM): Deleted. 
3359         (WebCore::NodeNextSiblingDOMJIT::callDOM): Deleted. 
3360         (WebCore::NodePreviousSiblingDOMJIT::callDOM): Deleted. 
3361         (WebCore::NodeParentNodeDOMJIT::callDOM): Deleted. 
3362         (WebCore::NodeNodeTypeDOMJIT::callDOM): Deleted. 
3363         (WebCore::NodeOwnerDocumentDOMJIT::callDOM): Deleted. 
3364  
3365 2016-10-28  Dave Hyatt  <hyatt@apple.com> 
3366  
3367         [CSS Parser] Fix font-family parsing inside @font-face 
3368         https://bugs.webkit.org/show_bug.cgi?id=164155 
3369  
3370         Reviewed by Simon Fraser. 
3371  
3372         * css/parser/CSSPropertyParser.cpp: 
3373         (WebCore::CSSPropertyParser::parseFontFaceDescriptor): 
3374         Use the full font-family parsing that returns a CSSValueList, 
3375         since we can handle multiple families. 
3376  
3377 2016-10-28  Per Arne Vollan  <pvollan@apple.com> 
3378  
3379         [Win][Direct2D] Implement ImageBufferData::putData. 
3380         https://bugs.webkit.org/show_bug.cgi?id=164151 
3381  
3382         Reviewed by Brent Fulgham. 
3383  
3384         * platform/graphics/win/ImageBufferDataDirect2D.cpp: 
3385         (WebCore::ImageBufferData::getData): 
3386         (WebCore::ImageBufferData::putData): 
3387  
3388 2016-10-28  Dave Hyatt  <hyatt@apple.com> 
3389  
3390         [CSS Parser] Support hanging-punctuation 
3391         https://bugs.webkit.org/show_bug.cgi?id=164153 
3392  
3393         Reviewed by Simon Fraser. 
3394  
3395         * css/parser/CSSPropertyParser.cpp: 
3396         (WebCore::consumeHangingPunctuation): 
3397         (WebCore::CSSPropertyParser::parseSingleValue): 
3398
3399 2016-10-28  Yusuke Suzuki  <utatane.tea@gmail.com>
3400
3401         [DOMJIT] Implement Document::documentElement
3402         https://bugs.webkit.org/show_bug.cgi?id=164113
3403
3404         Reviewed by Sam Weinig.
3405
3406         Test: js/dom/domjit-accessor-document-element.html
3407
3408         This patch implements document.documentElement DOMJIT accessor.
3409         Similar to ownerDocument accessor, the way to access to document.documentElement
3410         from JIT code is already prepared for CSSJIT. DOMJIT just utilizes the existing
3411         functionality: using documentElementMemoryOffset().
3412