Unreviewed. Fixing build breakage in GStreamer's WebKitCommonEncryptionDecryptorGStre...
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2016-12-12  Zan Dobersek  <zdobersek@igalia.com>
2
3         Unreviewed. Fixing build breakage in GStreamer's WebKitCommonEncryptionDecryptorGStreamer.
4
5         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
6         (webkitMediaCommonEncryptionDecryptTransformInPlace):
7         WTF::Seconds should be used instead of std::chrono::seconds.
8
9 2016-12-11  Simon Fraser  <simon.fraser@apple.com>
10
11         REGRESSION (r200283): Transform, overflow hidden and filter combination completely hides the element
12         https://bugs.webkit.org/show_bug.cgi?id=161509
13
14         Reviewed by David Hyatt.
15         
16         When the filter painting code needs to recompute a paintDirtyRect, it was using selfClipRect() 
17         which is obviously wrong because it returns a rect in absolute coordinates. Use code factored
18         out of localClipRect() instead, which returns a rect relative to the painting root.
19
20         Test: css3/filters/filter-on-overflow-hidden.html
21
22         * rendering/RenderLayer.cpp:
23         (WebCore::RenderLayer::paintLayerContents):
24
25 2016-12-11  Saam Barati  <sbarati@apple.com>
26
27         We should be able to throw exceptions from Wasm code and when Wasm frames are on the stack
28         https://bugs.webkit.org/show_bug.cgi?id=165429
29
30         Reviewed by Keith Miller.
31
32         * bindings/js/JSDOMBinding.cpp:
33         (WebCore::GetCallerGlobalObjectFunctor::operator()):
34
35 2016-12-11  Darin Adler  <darin@apple.com>
36
37         Remove uses of Dictionary in WebRTC IDL files
38         https://bugs.webkit.org/show_bug.cgi?id=165736
39
40         Reviewed by Sam Weinig.
41
42         Also removed quite a bit of unused code. There were some mocks that were out of date and
43         no longer matched the types used in the real code, that also were no longer hooked up,
44         and other types of dead code. We will have to implement anew when we want to restore tests
45         like the ones these were intended to enable.
46
47         * CMakeLists.txt: Updated for all the removed files.
48
49         * Modules/mediastream/MediaEndpointPeerConnection.cpp: Moved some types in here
50         that don't need to be in the header.
51         (WebCore::MediaEndpointPeerConnection::MediaEndpointPeerConnection): Use make_unique.
52         (WebCore::MediaEndpointPeerConnection::setConfiguration): Changed argument type,
53         obviating the need for most of the code that was here.
54         * Modules/mediastream/MediaEndpointPeerConnection.h: Updated for the above. Made more
55         things private and final. Marked the constructor explicit. Removed unneeded includes.
56
57         * Modules/mediastream/PeerConnectionBackend.h: Removed unneeded includes and forward
58         declarations. Changed the argument type for setConfiguration (see above).
59
60         * Modules/mediastream/RTCConfiguration.cpp: Removed.
61         None of the code here was needed except for the ICE server validation, and that was
62         moved into RTCPeerConnection::setConfiguration.
63         * Modules/mediastream/RTCConfiguration.h: Changed this from a class to a struct since
64         this is now a dictionary rather than an interface.
65         * Modules/mediastream/RTCConfiguration.idl: Changed this from an interface to a dictionary.
66
67         * Modules/mediastream/RTCDTMFSender.cpp: Removed some of the code from this file. This
68         class currently isn't implemented, but was depending on RTCPeerConnectionHandler. I removed
69         some of the dead code. Someone will have to straighten this out so we can turn it back on.
70         * Modules/mediastream/RTCDTMFSender.h: Ditto.
71
72         * Modules/mediastream/RTCDataChannel.cpp: Updated includes.
73
74         * Modules/mediastream/RTCIceCandidate.cpp:
75         (WebCore::RTCIceCandidate::create): Removed most of the code, since this now takes
76         a structure rather than a WebCore::Dictionary, and so the bindings take care of the work.
77         * Modules/mediastream/RTCIceCandidate.h: Updated for the above.
78         * Modules/mediastream/RTCIceCandidate.idl: Changed the constructor to take a
79         RTCIceCandidateInit instead of a Dictionary.
80
81         * Modules/mediastream/RTCIceServer.h: Changed this from a class to a struct since
82         this is now a dictionary rather than an interface.
83         * Modules/mediastream/RTCIceServer.idl: Changed this from an interface to a dictionary.
84
85         * Modules/mediastream/RTCPeerConnection.cpp:
86         (WebCore::RTCPeerConnection::initializeWith): Take an RTCConfiguration rather than
87         a Dictionary.
88         (WebCore::RTCPeerConnection::getConfiguration): Moved to header, now an inline.
89         (WebCore::RTCPeerConnection::setConfiguration): Use the configuration dictionary now instead
90         of the configuration class. Also moved validation of server URLs here, formerly in the
91         RTCConfiguration RTCConfiguration::initialize function. Also moved code to convert from
92         RTCConfiguration to MediaEndpointConfiguration here, formerly in
93         MediaEndpointPeerConnection::setConfiguration.
94         * Modules/mediastream/RTCPeerConnection.h: Updated for the above.
95         * Modules/mediastream/RTCPeerConnection.idl: Changed argument to initializeWith and
96         setConfiguration from Dictionary to RTCConfiguration.
97
98         * Modules/mediastream/RTCSessionDescription.cpp:
99         (WebCore::parseTypeString): Deleted.
100         (WebCore::RTCSessionDescription::create): Changed to take struct instead of Dictionary.
101         * Modules/mediastream/RTCSessionDescription.h: Added Init struct and changed create to
102         take it.
103         * Modules/mediastream/RTCSessionDescription.idl: Changed constructor argument to take
104         RTCSessionDescriptionInit dictionary instead of Dictionary.
105
106         * Modules/webaudio/MediaStreamAudioDestinationNode.cpp: Updated includes.
107
108         * WebCore.xcodeproj/project.pbxproj: Updated for all the removed files.
109
110         * bindings/scripts/CodeGeneratorJS.pm:
111         (GenerateDictionaryImplementationContent): Fixed convertDictionaryToJS to work with other
112         nullable types besides RefPtr.
113         * bindings/scripts/test/JS/JSTestObj.cpp: Regenerated.
114
115         * platform/mediastream/RTCConfigurationPrivate.h: Removed.
116         * platform/mediastream/RTCIceServerPrivate.h: Removed.
117         * platform/mediastream/RTCPeerConnectionHandler.cpp: Removed.
118         * platform/mediastream/RTCPeerConnectionHandler.h: Removed.
119         * platform/mock/RTCDTMFSenderHandlerMock.cpp: Removed.
120         * platform/mock/RTCDTMFSenderHandlerMock.h: Removed.
121
122         * platform/mock/RTCDataChannelHandlerMock.h: Updated includes, made more things private and final.
123
124         * platform/mock/RTCPeerConnectionHandlerMock.cpp: Removed.
125         * platform/mock/RTCPeerConnectionHandlerMock.h: Removed.
126
127         * testing/Internals.cpp:
128         (WebCore::Internals::Internals): Removed call to enableMockRTCPeerConnectionHandler.
129         (WebCore::Internals::enableMockRTCPeerConnectionHandler): Deleted.
130
131 2016-12-11  Darin Adler  <darin@apple.com>
132
133         Use std::vsnprintf instead of vasprintf
134         https://bugs.webkit.org/show_bug.cgi?id=165740
135
136         Reviewed by Sam Weinig.
137
138         * platform/FileHandle.cpp:
139         (WebCore::FileHandle::printf): Use vsnprintf, including StringExtras.h to
140         ensure compatibility with older versions of the Visual Studio library,
141         and Vector for the buffer. Use inline capacity in the vector so we normally
142         don't need to allocate any memory on the heap.
143         * xml/XSLTUnicodeSort.cpp:
144         (xsltTransformErrorTrampoline): Ditto.
145         * xml/parser/XMLDocumentParserLibxml2.cpp:
146         (WebCore::XMLDocumentParser::error): Ditto.
147
148 2016-12-11  Darin Adler  <darin@apple.com>
149
150         Make some refinements to HTMLPlugInImageElement
151         https://bugs.webkit.org/show_bug.cgi?id=165742
152
153         Reviewed by Sam Weinig.
154
155         * html/HTMLPlugInImageElement.cpp: Removed many unneeded includes.
156         (WebCore::titleText): Use HashMap::ensure, correct argument types.
157         (WebCore::subtitleText): Ditto.
158         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement): Moved
159         initialization of most scalars to the class definition.
160         (WebCore::HTMLPlugInImageElement::isImageType): Use auto.
161         (WebCore::HTMLPlugInImageElement::wouldLoadAsPlugIn): Removed
162         unneeded local variable and if statement.
163         (WebCore::HTMLPlugInImageElement::willDetachRenderers): Use auto.
164         (WebCore::HTMLPlugInImageElement::updateSnapshot): Do not call
165         renderer twice unnecessarily.
166         (WebCore::plugInImageElementIsolatedWorld): Use auto.
167         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot): Use auto.
168         (WebCore::HTMLPlugInImageElement::partOfSnapshotOverlay): Use auto.
169         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): Got rid of
170         unnecessary typedef.
171         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Take a
172         reference rather than PassRefPtr.
173         (WebCore::documentHadRecentUserGesture): Removed unneeded if.
174         (WebCore::HTMLPlugInImageElement::checkSizeChangeForSnapshotting): Use auto.
175         (WebCore::isSmallerThanTinySizingThreshold): Use auto.
176         (WebCore::HTMLPlugInImageElement::isTopLevelFullPagePlugin): Use auto.
177         (WebCore::HTMLPlugInImageElement::checkSnapshotStatus): Use auto.
178         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Got rid
179         of unnecessary local variable. Use auto.
180         (WebCore::HTMLPlugInImageElement::requestObject): Got rid of unnecessary
181         local variable.
182         * html/HTMLPlugInImageElement.h: Updated for the above. Removed incorrect
183         use of const. Initialized all scalars. Made function private and final.
184
185         * rendering/RenderSnapshottedPlugIn.cpp:
186         (WebCore::RenderSnapshottedPlugIn::handleEvent): Pass reference instead
187         of pointer.
188
189 2016-12-11  Joseph Pecoraro  <pecoraro@apple.com>
190
191         Web Inspector: Cleanup some InspectorInstrumentation network loading notifications
192         https://bugs.webkit.org/show_bug.cgi?id=165688
193
194         Reviewed by Brian Burg.
195
196         Eliminate InspectorInstrumentation::willReceiveResourceResponse by folding
197         it into InspectorInstrumentation::didReceiveResourceResponse. Simplify other
198         related InspectorInstrumentation calls by using references and using more
199         consistent InspectorInstrumentation patterns.
200
201         * inspector/InspectorInstrumentation.cpp:
202         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
203         (WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl): Deleted.
204         (WebCore::InspectorInstrumentation::didReceiveResourceResponseButCanceledImpl): Deleted.
205         (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDeniedImpl): Deleted.
206         (WebCore::InspectorInstrumentation::continueWithPolicyDownloadImpl): Deleted.
207         (WebCore::InspectorInstrumentation::continueWithPolicyIgnoreImpl): Deleted.
208         * inspector/InspectorInstrumentation.h:
209         (WebCore::InspectorInstrumentation::didReceiveResourceResponse):
210         (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
211         (WebCore::InspectorInstrumentation::continueWithPolicyDownload):
212         (WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
213         (WebCore::InspectorInstrumentation::willReceiveResourceResponse): Deleted.
214         * loader/CrossOriginPreflightChecker.cpp:
215         (WebCore::CrossOriginPreflightChecker::validatePreflightResponse):
216         * loader/DocumentLoader.cpp:
217         (WebCore::DocumentLoader::stopLoadingAfterXFrameOptionsOrContentSecurityPolicyDenied):
218         (WebCore::DocumentLoader::continueAfterContentPolicy):
219         * loader/ResourceLoadNotifier.cpp:
220         (WebCore::ResourceLoadNotifier::dispatchDidReceiveResponse):
221         * loader/appcache/ApplicationCacheGroup.cpp:
222         (WebCore::ApplicationCacheGroup::didReceiveResponse):
223
224 2016-12-11  Eric Carlson  <eric.carlson@apple.com>
225
226         [MediaStream] Protect MediaDevicesRequest during callback
227         https://bugs.webkit.org/show_bug.cgi?id=165711
228         <rdar://problem/28400468>
229
230         Reviewed by Sam Weinig.
231
232         No new tests, I was unable to create a reproducible test but this fix avoids
233         an occasional crash in existing tests.
234
235         * Modules/mediastream/MediaDevicesEnumerationRequest.cpp:
236         (WebCore::MediaDevicesEnumerationRequest::start): Take a reference to the object
237         before calling the controller in case the completion handler is called synchronously.
238
239 2016-12-09  Filip Pizlo  <fpizlo@apple.com>
240
241         The DOM should have an advancing wavefront opaque root barrier
242         https://bugs.webkit.org/show_bug.cgi?id=165712
243
244         Reviewed by Yusuke Suzuki.
245
246         No new tests because this was covered by crashing tests.
247         
248         Consider these two cases:
249         
250            Removal:
251            1) DOM at start: D->X->Y
252            2) Mark X, X->visitChildren, addOpaqueRoot(D)
253            3) remove X
254            4) Y thinks it's not reachable (its opaque root, X, is not in the set).
255            
256            Insertion:
257            1) DOM at start: D, X->Y
258            2) Mark X, X->visitChildren, addOpaqueRoot(X)
259            3) insert X into D
260            4) Y thinks it's not reachable (its opaque root, D, is not in the set).
261         
262         We can fix this with two barriers:
263         
264            Removal: add X (the removed child) to the opaque root set.
265            Insertion: add D (the insertion point) to the opaque root set.
266         
267         Thanks Rysosuke for coming up with this idea!
268         
269         Both barriers advance the wavefront. We could consider retreating wavefront barriers in
270         the future (where we cause visitChildren to be called again on wrappers that belonged to
271         roots that got affected by insertion/removal) but those would probably require more
272         bookkeeping.
273         
274         To make this barrier very fast, the WebCore caches the JSC VM's barrier state in
275         its own global variable for very fast access. This variable will be false most of the
276         time. It's false when there is no VM, so triggering the barrier won't cause the VM to be
277         created. It's only true when GC is running, which is rare by design.
278         
279         To make that caching more sensible, I finally gave WebCore a central header for
280         the common VM (CommonVM.h).
281
282         * CMakeLists.txt:
283         * Modules/mediastream/SDPProcessor.cpp:
284         (WebCore::SDPProcessor::callScript):
285         * WebCore.xcodeproj/project.pbxproj:
286         * bindings/js/CommonVM.cpp: Added.
287         (WebCore::commonVMSlow):
288         (WebCore::writeBarrierOpaqueRootSlow):
289         * bindings/js/CommonVM.h: Added.
290         (WebCore::commonVM):
291         (WebCore::writeBarrierOpaqueRoot):
292         * bindings/js/DOMWrapperWorld.cpp:
293         (WebCore::mainThreadNormalWorld):
294         * bindings/js/GCController.cpp:
295         (WebCore::collect):
296         (WebCore::GCController::garbageCollectSoon):
297         (WebCore::GCController::garbageCollectNow):
298         (WebCore::GCController::garbageCollectNowIfNotDoneRecently):
299         (WebCore::GCController::setJavaScriptGarbageCollectorTimerEnabled):
300         (WebCore::GCController::deleteAllCode):
301         (WebCore::GCController::deleteAllLinkedCode):
302         * bindings/js/JSCustomXPathNSResolver.cpp:
303         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
304         * bindings/js/JSDOMBinding.cpp:
305         (WebCore::addImpureProperty):
306         * bindings/js/JSDOMWindowBase.cpp:
307         (WebCore::JSDOMWindowBase::fireFrameClearedWatchpointsForWindow):
308         (WebCore::JSDOMWindowBase::commonVM): Deleted.
309         * bindings/js/JSDOMWindowBase.h:
310         * bindings/js/JSDOMWindowShell.cpp:
311         (WebCore::JSDOMWindowShell::setWindow):
312         * bindings/js/JSNodeCustom.h:
313         (WebCore::root):
314         * bindings/js/ScriptCachedFrameData.cpp:
315         (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
316         (WebCore::ScriptCachedFrameData::restore):
317         (WebCore::ScriptCachedFrameData::clear):
318         * bindings/js/ScriptController.cpp:
319         (WebCore::ScriptController::~ScriptController):
320         (WebCore::ScriptController::createWorld):
321         (WebCore::ScriptController::getAllWorlds):
322         (WebCore::ScriptController::clearWindowShell):
323         (WebCore::ScriptController::cacheableBindingRootObject):
324         (WebCore::ScriptController::bindingRootObject):
325         (WebCore::ScriptController::windowScriptNPObject):
326         (WebCore::ScriptController::jsObjectForPluginElement):
327         (WebCore::ScriptController::clearScriptObjects):
328         * dom/CollectionIndexCache.cpp:
329         (WebCore::reportExtraMemoryAllocatedForCollectionIndexCache):
330         * dom/ContainerNode.cpp:
331         * dom/ContainerNodeAlgorithms.cpp:
332         (WebCore::notifyChildNodeInserted):
333         (WebCore::notifyChildNodeRemoved):
334         * dom/Document.cpp:
335         (WebCore::Document::shouldBypassMainWorldContentSecurityPolicy):
336         * dom/Node.h:
337         (WebCore::Node::opaqueRoot):
338         * dom/ScriptExecutionContext.cpp:
339         (WebCore::ScriptExecutionContext::vm):
340         * html/HTMLImageLoader.cpp:
341         (WebCore::HTMLImageLoader::notifyFinished):
342         * html/HTMLMediaElement.cpp:
343         (WebCore::HTMLMediaElement::pauseAfterDetachedTask):
344         (WebCore::HTMLMediaElement::ensureIsolatedWorld):
345         * html/HTMLPlugInImageElement.cpp:
346         (WebCore::plugInImageElementIsolatedWorld):
347         * inspector/InspectorController.cpp:
348         (WebCore::InspectorController::vm):
349         * inspector/PageScriptDebugServer.cpp:
350         (WebCore::PageScriptDebugServer::PageScriptDebugServer):
351         * page/PerformanceLogging.cpp:
352         (WebCore::PerformanceLogging::memoryUsageStatistics):
353         (WebCore::PerformanceLogging::javaScriptObjectCounts):
354         * page/ResourceUsageThread.cpp:
355         (WebCore::ResourceUsageThread::createThreadIfNeeded):
356         * svg/graphics/SVGImage.cpp:
357         (WebCore::SVGImage::reportApproximateMemoryCost):
358         * testing/MemoryInfo.h:
359         (WebCore::MemoryInfo::MemoryInfo):
360
361 2016-12-11  Dan Bernstein  <mitz@apple.com>
362
363         [Cocoa] NSAttributedString representation of text copied from -webkit-nbsp-mode:space element contains non-breaking space characters, but shouldn’t
364         https://bugs.webkit.org/show_bug.cgi?id=165515
365         <rdar://problem/4108460>
366
367         Reviewed by Darin Adler.
368
369         Test: platform/mac/fast/text/attributed-substring-from-range.html
370
371         * editing/cocoa/HTMLConverter.mm:
372         (HTMLConverter::_processText): Emit a space instead of a non-breaking space if the text node
373           is styled with -webkit-nbsp-mode:space.
374         (WebCore::editingAttributedStringFromRange): Replace all non-breaking spaces with spaces if
375           they come from a text node with -webkit-nbsp-mode:space.
376
377 2016-12-11  Konstantin Tokarev  <annulen@yandex.ru>
378
379         Unreviewed, add KHR include dir to fix ANGLE build after r209665
380         https://bugs.webkit.org/show_bug.cgi?id=165686
381
382         * CMakeLists.txt:
383
384 2016-12-10  Dave Hyatt  <hyatt@apple.com>
385
386         Rolling out 165737, since it broke layout tests. I need to find a 
387         different place to put the init.
388
389         * contentextensions/ContentExtensionParser.cpp:
390         (WebCore::ContentExtensions::isValidSelector):
391
392 2016-12-10  Simon Fraser  <simon.fraser@apple.com>
393
394         Support the deprecated dictionary constructor for DOMPointReadOnly and DOMPoint
395         https://bugs.webkit.org/show_bug.cgi?id=165732
396
397         Reviewed by Sam Weinig.
398         
399         For compatibility with other browsers, support the DOMPointInit constructor to
400         DOMPoint and DOMPointReadOnly per <https://www.w3.org/TR/geometry-1/#DOMPoint>
401
402         Extended geometry/DOMPoint-001.html to test.
403
404         * dom/DOMPoint.h:
405         * dom/DOMPoint.idl:
406         * dom/DOMPointReadOnly.h:
407         (WebCore::DOMPointReadOnly::create):
408         * dom/DOMPointReadOnly.idl:
409
410 2016-12-10  Dave Hyatt  <hyatt@apple.com>
411
412         [CSS Parser] Make sure content extensions initialize AtomicString
413         https://bugs.webkit.org/show_bug.cgi?id=165737
414
415         Reviewed by Simon Fraser.
416
417         Fixes two broken tests in TestWebkitAPI.
418
419         * contentextensions/ContentExtensionParser.cpp:
420         (WebCore::ContentExtensions::isValidSelector):
421
422 2016-12-10  Simon Fraser  <simon.fraser@apple.com>
423
424         Animation followed by transition doesn't always fire transitionend event
425         https://bugs.webkit.org/show_bug.cgi?id=165731
426         rdar://problem/28471240
427
428         Reviewed by Zalan Bujtas.
429         
430         After r200047, a keyframe animation of an accelerated property followed by a
431         transition didn't always fire a transitionend event.
432         
433         This happened if CompositeAnimation::timeToNextService() happend to be called
434         when the transitions's timeToNextService() returned a positive value, but the
435         keyframe animation still existed, but its timeToNextService() returned -1. In
436         this case that -1 would clobber the positing minT.
437
438         Fix by just continuing in each loop when the timeToNextService() returns -1.
439
440         This code should probably be rewritten to use std::optional<double> rather than
441         magic values.
442
443         Test: animations/animation-followed-by-transition.html
444
445         * page/animation/CompositeAnimation.cpp:
446         (WebCore::CompositeAnimation::timeToNextService):
447         * platform/graphics/ca/GraphicsLayerCA.cpp:
448         (WebCore::GraphicsLayerCA::addAnimation):
449         (WebCore::GraphicsLayerCA::pauseAnimation):
450         (WebCore::GraphicsLayerCA::removeAnimation):
451         (WebCore::GraphicsLayerCA::platformCALayerAnimationStarted):
452         (WebCore::GraphicsLayerCA::platformCALayerAnimationEnded):
453
454 2016-12-10  Sam Weinig  <sam@webkit.org>
455
456         [WebIDL] Merge JSDictionary into Dictionary, and remove unused bits
457         https://bugs.webkit.org/show_bug.cgi?id=165641
458
459         Reviewed by Dan Bernstein.
460
461         * CMakeLists.txt:
462         * WebCore.xcodeproj/project.pbxproj:
463         * bindings/js/JSBindingsAllInOne.cpp:
464         Remove JSDictionary.h/cpp
465
466         * Modules/mediastream/RTCDataChannel.cpp:
467         Remove unused #include of Dictionary.h
468
469         * Modules/mediastream/RTCPeerConnection.cpp:
470         * Modules/mediastream/RTCPeerConnection.h:
471         Replace unnecessary #include of Dictionary in a header with forward declaration.
472
473         * bindings/js/Dictionary.cpp:
474         (WebCore::Dictionary::Dictionary):
475         (WebCore::Dictionary::tryGetProperty):
476         (WebCore::Dictionary::getOwnPropertyNames):
477         (WebCore::Dictionary::convertValue):
478         (WebCore::Dictionary::asJSObject<Notification>): Deleted.
479         (WebCore::Dictionary::getOwnPropertiesAsStringHashMap): Deleted.
480         (WebCore::Dictionary::getWithUndefinedOrNullCheck): Deleted.
481         * bindings/js/Dictionary.h:
482         (WebCore::Dictionary::isObject):
483         (WebCore::Dictionary::isUndefinedOrNull):
484         (WebCore::Dictionary::execState):
485         (WebCore::Dictionary::initializerObject):
486         (WebCore::Dictionary::isValid):
487         (WebCore::Dictionary::convertValue):
488         (WebCore::Dictionary::get):
489         (WebCore::Dictionary::tryGetPropertyAndResult):
490         (WebCore::Dictionary::getEventListener): Deleted.
491         Merge JSDictionary into Dictionary. Remove all unused functions (some getters, lots
492         of convertValue overrides). Modernize to taste.
493
494         * bindings/js/JSCryptoAlgorithmDictionary.cpp:
495         (WebCore::JSCryptoAlgorithmDictionary::getAlgorithmIdentifier):
496         (WebCore::getHashAlgorithm):
497         (WebCore::createHmacParams):
498         (WebCore::createHmacKeyParams):
499         (WebCore::createRsaKeyGenParams):
500         (WebCore::createRsaOaepParams):
501         (WebCore::createRsaSsaParams):
502         Update for rename. JSDictionary is now Dictionary.
503
504         * bindings/js/JSDictionary.cpp: Removed.
505         * bindings/js/JSDictionary.h: Removed.
506
507         * dom/MutationObserver.cpp:
508         Remove unused #include of Dictionary.h
509
510 2016-12-10  Dave Hyatt  <hyatt@apple.com>
511
512         [CSS Parser] Move CSSParserValues.h/.cpp to CSSParserSelector.h/.cpp
513         https://bugs.webkit.org/show_bug.cgi?id=165730
514
515         Reviewed by Simon Fraser.
516
517         * WebCore.xcodeproj/project.pbxproj:
518         * css/CSSCustomPropertyValue.cpp:
519         * css/CSSPrimitiveValue.cpp:
520         * css/CSSSelectorList.cpp:
521         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
522         * css/parser/CSSParserImpl.cpp:
523         * css/parser/CSSParserSelector.cpp: Copied from Source/WebCore/css/parser/CSSParserValues.cpp.
524         * css/parser/CSSParserSelector.h: Copied from Source/WebCore/css/parser/CSSParserValues.h.
525         * css/parser/CSSParserValues.cpp: Removed.
526         * css/parser/CSSParserValues.h: Removed.
527         * css/parser/CSSSelectorParser.h:
528
529 2016-12-10  Dave Hyatt  <hyatt@apple.com>
530
531         [CSS Parser] Remove the pseudoclass/element hacks
532         https://bugs.webkit.org/show_bug.cgi?id=165729
533
534         Reviewed by Sam Weinig.
535
536         * css/SelectorPseudoClassAndCompatibilityElementMap.in:
537         * css/SelectorPseudoElementTypeMap.in:
538         * css/parser/CSSSelectorParser.cpp:
539         (WebCore::CSSSelectorParser::consumePseudo):
540
541 2016-12-09  Sam Weinig  <sam@webkit.org>
542
543         [WebIDL] Remove custom bindings for Geolocation
544         https://bugs.webkit.org/show_bug.cgi?id=165625
545
546         Reviewed by Alex Christensen.
547
548         * CMakeLists.txt:
549         * DerivedSources.cpp:
550         * DerivedSources.make:
551         * WebCore.xcodeproj/project.pbxproj:
552         * bindings/js/JSBindingsAllInOne.cpp:
553         Add/remove files.
554
555         * Modules/geolocation/GeoNotifier.cpp:
556         (WebCore::GeoNotifier::GeoNotifier):
557         (WebCore::GeoNotifier::hasZeroTimeout):
558         (WebCore::GeoNotifier::startTimerIfNeeded):
559         * Modules/geolocation/GeoNotifier.h:
560         (WebCore::GeoNotifier::create):
561         (WebCore::GeoNotifier::options):
562         Update to store PositionOptions as a value, and pass the PositionCallback
563         as a Ref, rather than a RefPtr, since it is not optional.
564
565         * Modules/geolocation/Geolocation.cpp:
566         (WebCore::createGeoposition):
567         Use auto, to get the good type for Coordinates (Ref).
568
569         (WebCore::Geolocation::getCurrentPosition):
570         (WebCore::Geolocation::watchPosition):
571         (WebCore::Geolocation::haveSuitableCachedPosition):
572         (WebCore::Geolocation::startUpdating):
573         * Modules/geolocation/Geolocation.h:
574         Update to pass PositionOptions itself now that it is a plain struct.
575
576         * Modules/geolocation/Geolocation.idl:
577         Remove [Custom] extended attribute and add FIXME about nullable annotation. 
578
579         * Modules/geolocation/Geoposition.h:
580         Pass/store Coordinates as a Ref.
581  
582         * Modules/geolocation/PositionOptions.h:
583         Convert to be a simple struct.
584
585         * Modules/geolocation/PositionOptions.idl:
586         Added.
587         
588         * bindings/js/JSGeolocationCustom.cpp:
589         Removed.
590
591 2016-12-09  Dave Hyatt  <hyatt@apple.com>
592
593         [CSS Parser] Remove the old CSS Parser
594         https://bugs.webkit.org/show_bug.cgi?id=165645
595
596         Reviewed by Daniel Bates.
597
598         Remove the old CSS parser code. In doing so, code that used documentless
599         CSSParserContexts is now going through the new parser. This resulted in
600         some additional changes. These include:
601
602         (1) Canvas color parsing switched to new parser's code. This resulted in
603         progressions on canvas tests.
604
605         (2) Support for CSSNamespaceRule in the CSS OM, since the Inspector's
606         creation of CSS OM wrappers made it necessary to add this in. The old parser
607         did not create style rules for namespaces, but the new one (and other browsers)
608         did.
609
610         (3) <font face="X"> now uses the new parser's font-family parsing code. This
611         change was made in createFontFaceValue in CSSValuePool.
612
613         (4) FontFace now uses a new function on the new parser called
614         parseFontFaceDescriptor. This function sets things up so that parsing occurs
615         as though you are inside a @font-face. The old parser let you call parseValue
616         to parse "properties", but descriptors need to be handled differently in the
617         new parser.
618
619         (5) Illegal CSS rules in mediaControlsApple/ios.css forced me to add a quirk
620         to handle chained shadow DOM pseudo-elements. This should not be allowed, but
621         for now it is.
622
623         * CMakeLists.txt:
624         * DerivedSources.make:
625         * WebCore.xcodeproj/project.pbxproj:
626         * bindings/js/JSCSSRuleCustom.cpp:
627         (WebCore::toJSNewlyCreated):
628         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
629         * css/CSSCalculationValue.cpp:
630         (WebCore::unitCategory):
631         (WebCore::hasDoubleValue):
632         (WebCore::checkDepthAndIndexDeprecated): Deleted.
633         (WebCore::CSSCalcExpressionNodeParserDeprecated::parseCalc): Deleted.
634         (WebCore::CSSCalcExpressionNodeParserDeprecated::operatorValue): Deleted.
635         (WebCore::CSSCalcExpressionNodeParserDeprecated::parseValue): Deleted.
636         (WebCore::CSSCalcExpressionNodeParserDeprecated::parseValueTerm): Deleted.
637         (WebCore::CSSCalcExpressionNodeParserDeprecated::parseValueMultiplicativeExpression): Deleted.
638         (WebCore::CSSCalcExpressionNodeParserDeprecated::parseAdditiveValueExpression): Deleted.
639         (WebCore::CSSCalcExpressionNodeParserDeprecated::parseValueExpression): Deleted.
640         * css/CSSCalculationValue.h:
641         * css/CSSComputedStyleDeclaration.cpp:
642         (WebCore::specifiedValueForGridTrackSize):
643         * css/CSSCustomPropertyValue.cpp:
644         (WebCore::CSSCustomPropertyValue::checkVariablesForCycles):
645         (WebCore::CSSCustomPropertyValue::resolveVariableReferences):
646         * css/CSSCustomPropertyValue.h:
647         * css/CSSFunctionValue.cpp:
648         (WebCore::CSSFunctionValue::CSSFunctionValue):
649         (WebCore::CSSFunctionValue::customCSSText):
650         (WebCore::CSSFunctionValue::append):
651         (WebCore::CSSFunctionValue::buildParserValueSubstitutingVariables): Deleted.
652         * css/CSSFunctionValue.h:
653         * css/CSSGrammar.y.in: Removed.
654         * css/CSSGrammar.y.includes: Removed.
655         * css/CSSGroupingRule.cpp:
656         (WebCore::CSSGroupingRule::insertRule):
657         * css/CSSKeyframeRule.h:
658         * css/CSSKeyframesRule.cpp:
659         (WebCore::CSSKeyframesRule::appendRule):
660         * css/CSSNamespaceRule.cpp: Added.
661         (WebCore::CSSNamespaceRule::CSSNamespaceRule):
662         (WebCore::CSSNamespaceRule::~CSSNamespaceRule):
663         (WebCore::CSSNamespaceRule::namespaceURI):
664         (WebCore::CSSNamespaceRule::prefix):
665         (WebCore::CSSNamespaceRule::cssText):
666         (WebCore::CSSNamespaceRule::reattach):
667         * css/CSSNamespaceRule.h: Added.
668         * css/CSSNamespaceRule.idl: Added.
669         * css/CSSPrimitiveValue.cpp:
670         (WebCore::isValidCSSUnitTypeForDoubleConversion):
671         (WebCore::isStringType):
672         (WebCore::CSSPrimitiveValue::cleanup):
673         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
674         (WebCore::CSSPrimitiveValue::cloneForCSSOM):
675         (WebCore::CSSPrimitiveValue::equals):
676         (WebCore::CSSPrimitiveValue::buildParserValue): Deleted.
677         * css/CSSPrimitiveValue.h:
678         * css/CSSRule.h:
679         * css/CSSRule.idl:
680         * css/CSSStyleSheet.cpp:
681         (WebCore::CSSStyleSheet::insertRule):
682         * css/CSSValue.cpp:
683         (WebCore::CSSValue::equals):
684         (WebCore::CSSValue::cssText):
685         (WebCore::CSSValue::destroy):
686         * css/CSSValue.h:
687         (WebCore::CSSValue::isCustomPropertyValue):
688         (WebCore::CSSValue::hasVariableReferences):
689         (WebCore::CSSValue::isVariableDependentValue): Deleted.
690         (WebCore::CSSValue::isVariableValue): Deleted.
691         * css/CSSValueList.cpp:
692         (WebCore::CSSValueList::customCSSText):
693         (WebCore::CSSValueList::containsVariables): Deleted.
694         (WebCore::CSSValueList::checkVariablesForCycles): Deleted.
695         (WebCore::CSSValueList::buildParserValueSubstitutingVariables): Deleted.
696         (WebCore::CSSValueList::buildParserValueListSubstitutingVariables): Deleted.
697         * css/CSSValueList.h:
698         (WebCore::CSSValueList::createSlashSeparated):
699         (WebCore::CSSValueList::createFromParserValueList): Deleted.
700         * css/CSSValuePool.cpp:
701         (WebCore::CSSValuePool::createFontFaceValue):
702         * css/CSSVariableData.cpp:
703         * css/CSSVariableDependentValue.cpp: Removed.
704         * css/CSSVariableDependentValue.h: Removed.
705         * css/CSSVariableValue.cpp: Removed.
706         * css/CSSVariableValue.h: Removed.
707         * css/DOMCSSNamespace.cpp:
708         * css/FontFace.cpp:
709         (WebCore::FontFace::parseString):
710         * css/InspectorCSSOMWrappers.cpp:
711         * css/MediaQueryExp.cpp:
712         (WebCore::isFeatureValidWithIdentifier): Deleted.
713         (WebCore::isFeatureValidWithNonNegativeLengthOrNumber): Deleted.
714         (WebCore::isFeatureValidWithDensity): Deleted.
715         (WebCore::isFeatureValidWithNonNegativeInteger): Deleted.
716         (WebCore::isFeatureValidWithNonNegativeNumber): Deleted.
717         (WebCore::isFeatureValidWithZeroOrOne): Deleted.
718         (WebCore::isFeatureValidWithNumberWithUnit): Deleted.
719         (WebCore::isFeatureValidWithNumber): Deleted.
720         (WebCore::isSlash): Deleted.
721         (WebCore::isPositiveIntegerValue): Deleted.
722         * css/MediaQueryExp.h:
723         * css/PropertySetCSSStyleDeclaration.cpp:
724         (WebCore::PropertySetCSSStyleDeclaration::setCssText):
725         (WebCore::PropertySetCSSStyleDeclaration::setProperty):
726         * css/SelectorPseudoTypeMap.h:
727         * css/StyleProperties.cpp:
728         (WebCore::StyleProperties::getPropertyValue):
729         (WebCore::StyleProperties::getPropertyCSSValue):
730         (WebCore::MutableStyleProperties::setCustomProperty):
731         (WebCore::MutableStyleProperties::parseDeclaration):
732         (WebCore::StyleProperties::asText):
733         * css/StyleProperties.h:
734         * css/StyleResolver.cpp:
735         (WebCore::StyleResolver::applyProperty):
736         * css/StyleResolver.h:
737         * css/StyleRule.cpp:
738         (WebCore::StyleRuleBase::createCSSOMWrapper):
739         * css/StyleSheetContents.cpp:
740         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
741         (WebCore::StyleSheetContents::parseString):
742         (WebCore::StyleSheetContents::completeURL):
743         (WebCore::StyleSheetContents::parseStringAtPosition): Deleted.
744         * css/StyleSheetContents.h:
745         * css/WebKitCSSMatrix.cpp:
746         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
747         * css/parser/CSSParser.cpp:
748         (WebCore::CSSParserContext::CSSParserContext):
749         (WebCore::CSSParser::CSSParser):
750         (WebCore::CSSParser::parseSheet):
751         (WebCore::CSSParser::parseRule):
752         (WebCore::CSSParser::parseKeyframeRule):
753         (WebCore::CSSParser::parseSupportsCondition):
754         (WebCore::CSSParser::parseColor):
755         (WebCore::CSSParser::parseSystemColor):
756         (WebCore::CSSParser::parseSingleValue):
757         (WebCore::CSSParser::parseValue):
758         (WebCore::CSSParser::parseCustomPropertyValue):
759         (WebCore::CSSParser::parseSelector):
760         (WebCore::CSSParser::parseInlineStyleDeclaration):
761         (WebCore::CSSParser::parseDeclaration):
762         (WebCore::CSSParser::parseValueWithVariableReferences):
763         (WebCore::CSSParser::parseKeyframeKeyList):
764         (WebCore::CSSParser::parseFontFaceDescriptor):
765         (WebCore::equalLettersIgnoringASCIICase): Deleted.
766         (WebCore::hasPrefix): Deleted.
767         (WebCore::createPrimitiveValuePair): Deleted.
768         (WebCore::AnimationParseContext::commitFirstAnimation): Deleted.
769         (WebCore::AnimationParseContext::hasCommittedFirstAnimation): Deleted.
770         (WebCore::AnimationParseContext::commitAnimationPropertyKeyword): Deleted.
771         (WebCore::AnimationParseContext::animationPropertyKeywordAllowed): Deleted.
772         (WebCore::AnimationParseContext::hasSeenAnimationPropertyKeyword): Deleted.
773         (WebCore::AnimationParseContext::sawAnimationPropertyKeyword): Deleted.
774         (): Deleted.
775         (WebCore::convertToASCIILowercaseInPlace): Deleted.
776         (WebCore::CSSParserString::convertToASCIILowercaseInPlace): Deleted.
777         (WebCore::CSSParser::setupParser): Deleted.
778         (WebCore::isColorPropertyID): Deleted.
779         (WebCore::CSSParser::isValidSystemColorValue): Deleted.
780         (WebCore::validPrimitiveValueColor): Deleted.
781         (WebCore::parseColorValue): Deleted.
782         (WebCore::isSimpleLengthPropertyID): Deleted.
783         (WebCore::parseSimpleLength): Deleted.
784         (WebCore::parseSimpleLengthValue): Deleted.
785         (WebCore::isValidKeywordPropertyAndValue): Deleted.
786         (WebCore::isUniversalKeyword): Deleted.
787         (WebCore::isKeywordPropertyID): Deleted.
788         (WebCore::parseKeywordValue): Deleted.
789         (WebCore::parseTransformTranslateArguments): Deleted.
790         (WebCore::parseTranslateTransformValue): Deleted.
791         (WebCore::CSSParser::parseFontFaceValue): Deleted.
792         (WebCore::CSSParser::parseColorFromString): Deleted.
793         (WebCore::CSSParser::parseDeclarationDeprecated): Deleted.
794         (WebCore::filterProperties): Deleted.
795         (WebCore::CSSParser::createStyleProperties): Deleted.
796         (WebCore::CSSParser::addProperty): Deleted.
797         (WebCore::CSSParser::rollbackLastProperties): Deleted.
798         (WebCore::CSSParser::clearProperties): Deleted.
799         (WebCore::CSSParser::completeURL): Deleted.
800         (WebCore::CSSParser::validateCalculationUnit): Deleted.
801         (WebCore::CSSParser::shouldAcceptUnitLessValues): Deleted.
802         (WebCore::CSSParser::validateUnit): Deleted.
803         (WebCore::CSSParser::createPrimitiveNumericValue): Deleted.
804         (WebCore::CSSParser::createPrimitiveStringValue): Deleted.
805         (WebCore::isComma): Deleted.
806         (WebCore::isForwardSlashOperator): Deleted.
807         (WebCore::CSSParser::isValidSize): Deleted.
808         (WebCore::CSSParser::parseValidPrimitive): Deleted.
809         (WebCore::CSSParser::addExpandedPropertyForValue): Deleted.
810         (WebCore::isImageSetFunctionValue): Deleted.
811         (WebCore::CSSParser::addFillValue): Deleted.
812         (WebCore::isContentDistributionKeyword): Deleted.
813         (WebCore::isContentPositionKeyword): Deleted.
814         (WebCore::isBaselinePositionKeyword): Deleted.
815         (WebCore::isAlignmentOverflowKeyword): Deleted.
816         (WebCore::isItemPositionKeyword): Deleted.
817         (WebCore::CSSParser::parseLegacyPosition): Deleted.
818         (WebCore::CSSParser::parseContentDistributionOverflowPosition): Deleted.
819         (WebCore::CSSParser::parseItemPositionOverflowPosition): Deleted.
820         (WebCore::parseBackgroundClip): Deleted.
821         (WebCore::CSSParser::useLegacyBackgroundSizeShorthandBehavior): Deleted.
822         (WebCore::CSSParser::parseNonElementSnapPoints): Deleted.
823         (WebCore::CSSParser::parseScrollSnapPositions): Deleted.
824         (WebCore::CSSParser::parseScrollSnapDestination): Deleted.
825         (WebCore::CSSParser::parseScrollSnapCoordinate): Deleted.
826         (WebCore::CSSParser::parseFillShorthand): Deleted.
827         (WebCore::CSSParser::addAnimationValue): Deleted.
828         (WebCore::CSSParser::parseAnimationShorthand): Deleted.
829         (WebCore::CSSParser::parseColumnWidth): Deleted.
830         (WebCore::CSSParser::parseColumnCount): Deleted.
831         (WebCore::CSSParser::parseColumnsShorthand): Deleted.
832         (WebCore::CSSParser::parseTransitionShorthand): Deleted.
833         (WebCore::CSSParser::parseShorthand): Deleted.
834         (WebCore::CSSParser::parse4Values): Deleted.
835         (WebCore::CSSParser::parsePage): Deleted.
836         (WebCore::CSSParser::parseSize): Deleted.
837         (WebCore::CSSParser::parseSizeParameter): Deleted.
838         (WebCore::CSSParser::parseQuotes): Deleted.
839         (WebCore::CSSParser::parseAlt): Deleted.
840         (WebCore::CSSParser::parseCustomPropertyDeclaration): Deleted.
841         (WebCore::CSSParser::parseContent): Deleted.
842         (WebCore::CSSParser::parseAttr): Deleted.
843         (WebCore::CSSParser::parseBackgroundColor): Deleted.
844         (WebCore::CSSParser::parseFillImage): Deleted.
845         (WebCore::CSSParser::parsePositionX): Deleted.
846         (WebCore::CSSParser::parsePositionY): Deleted.
847         (WebCore::CSSParser::parseFillPositionComponent): Deleted.
848         (WebCore::isValueConflictingWithCurrentEdge): Deleted.
849         (WebCore::isFillPositionKeyword): Deleted.
850         (WebCore::CSSParser::parse4ValuesFillPosition): Deleted.
851         (WebCore::CSSParser::parse3ValuesFillPosition): Deleted.
852         (WebCore::CSSParser::isPotentialPositionValue): Deleted.
853         (WebCore::CSSParser::parseFillPosition): Deleted.
854         (WebCore::CSSParser::parse2ValuesFillPosition): Deleted.
855         (WebCore::CSSParser::parseFillRepeat): Deleted.
856         (WebCore::CSSParser::parseFillSize): Deleted.
857         (WebCore::CSSParser::parseFillProperty): Deleted.
858         (WebCore::CSSParser::parseAnimationDelay): Deleted.
859         (WebCore::CSSParser::parseAnimationDirection): Deleted.
860         (WebCore::CSSParser::parseAnimationDuration): Deleted.
861         (WebCore::CSSParser::parseAnimationFillMode): Deleted.
862         (WebCore::CSSParser::parseAnimationIterationCount): Deleted.
863         (WebCore::CSSParser::parseAnimationName): Deleted.
864         (WebCore::CSSParser::parseAnimationPlayState): Deleted.
865         (WebCore::CSSParser::parseAnimationTrigger): Deleted.
866         (WebCore::CSSParser::parseAnimationProperty): Deleted.
867         (WebCore::CSSParser::parseTransformOriginShorthand): Deleted.
868         (WebCore::CSSParser::isSpringTimingFunctionEnabled): Deleted.
869         (WebCore::CSSParser::parseCubicBezierTimingFunctionValue): Deleted.
870         (WebCore::CSSParser::parseSpringTimingFunctionValue): Deleted.
871         (WebCore::CSSParser::parseAnimationTimingFunction): Deleted.
872         (WebCore::isValidGridPositionCustomIdent): Deleted.
873         (WebCore::CSSParser::parseIntegerOrCustomIdentFromGridPosition): Deleted.
874         (WebCore::CSSParser::parseGridPosition): Deleted.
875         (WebCore::gridMissingGridPositionValue): Deleted.
876         (WebCore::CSSParser::parseGridItemPositionShorthand): Deleted.
877         (WebCore::CSSParser::parseGridGapShorthand): Deleted.
878         (WebCore::CSSParser::parseGridTemplateColumns): Deleted.
879         (WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns): Deleted.
880         (WebCore::CSSParser::parseGridTemplateShorthand): Deleted.
881         (WebCore::parseImplicitAutoFlow): Deleted.
882         (WebCore::CSSParser::parseGridShorthand): Deleted.
883         (WebCore::CSSParser::parseGridAreaShorthand): Deleted.
884         (WebCore::CSSParser::parseSingleGridAreaLonghand): Deleted.
885         (WebCore::CSSParser::parseGridLineNames): Deleted.
886         (WebCore::isGridTrackFixedSized): Deleted.
887         (WebCore::CSSParser::parseGridTrackList): Deleted.
888         (WebCore::CSSParser::parseGridTrackRepeatFunction): Deleted.
889         (WebCore::CSSParser::parseGridTrackSize): Deleted.
890         (WebCore::CSSParser::parseGridBreadth): Deleted.
891         (WebCore::isValidGridAutoFlowId): Deleted.
892         (WebCore::CSSParser::parseGridAutoFlow): Deleted.
893         (WebCore::skipCommaInDashboardRegion): Deleted.
894         (WebCore::CSSParser::parseDashboardRegions): Deleted.
895         (WebCore::parseGridTemplateAreasColumnNames): Deleted.
896         (WebCore::CSSParser::parseGridTemplateAreasRow): Deleted.
897         (WebCore::CSSParser::parseGridTemplateAreas): Deleted.
898         (WebCore::CSSParser::parseCounterContent): Deleted.
899         (WebCore::CSSParser::parseClipShape): Deleted.
900         (WebCore::completeBorderRadii): Deleted.
901         (WebCore::CSSParser::parseInsetRoundedCorners): Deleted.
902         (WebCore::CSSParser::parseBasicShapeInset): Deleted.
903         (WebCore::CSSParser::parseShapeRadius): Deleted.
904         (WebCore::CSSParser::parseBasicShapeCircle): Deleted.
905         (WebCore::CSSParser::parseBasicShapeEllipse): Deleted.
906         (WebCore::CSSParser::parseBasicShapePolygon): Deleted.
907         (WebCore::CSSParser::parseBasicShapePath): Deleted.
908         (WebCore::isBoxValue): Deleted.
909         (WebCore::CSSParser::parseBasicShapeAndOrBox): Deleted.
910         (WebCore::CSSParser::parseShapeProperty): Deleted.
911         (WebCore::CSSParser::parseClipPath): Deleted.
912         (WebCore::CSSParser::parseBasicShape): Deleted.
913         (WebCore::CSSParser::parseFont): Deleted.
914         (WebCore::CSSParser::parseSystemFont): Deleted.
915         (WebCore::FontFamilyValueBuilder::FontFamilyValueBuilder): Deleted.
916         (WebCore::FontFamilyValueBuilder::add): Deleted.
917         (WebCore::FontFamilyValueBuilder::commit): Deleted.
918         (WebCore::valueIsCSSKeyword): Deleted.
919         (WebCore::CSSParser::parseFontFamily): Deleted.
920         (WebCore::CSSParser::parseLineHeight): Deleted.
921         (WebCore::CSSParser::parseFontSize): Deleted.
922         (WebCore::createFontWeightValueKeyword): Deleted.
923         (WebCore::CSSParser::parseFontWeight): Deleted.
924         (WebCore::CSSParser::parseFontSynthesis): Deleted.
925         (WebCore::CSSParser::parseFontFaceSrcURI): Deleted.
926         (WebCore::CSSParser::parseFontFaceSrcLocal): Deleted.
927         (WebCore::CSSParser::parseFontFaceSrc): Deleted.
928         (WebCore::CSSParser::parseFontFaceUnicodeRange): Deleted.
929         (WebCore::checkForValidDouble): Deleted.
930         (WebCore::parseDouble): Deleted.
931         (WebCore::parseColorIntOrPercentage): Deleted.
932         (WebCore::isTenthAlpha): Deleted.
933         (WebCore::parseAlphaValue): Deleted.
934         (WebCore::mightBeRGBA): Deleted.
935         (WebCore::mightBeRGB): Deleted.
936         (WebCore::fastParseColorInternal): Deleted.
937         (WebCore::CSSParser::fastParseColor): Deleted.
938         (WebCore::CSSParser::parsedDouble): Deleted.
939         (WebCore::CSSParser::isCalculation): Deleted.
940         (WebCore::isPercent): Deleted.
941         (WebCore::CSSParser::parseColorInt): Deleted.
942         (WebCore::CSSParser::parseColorDouble): Deleted.
943         (WebCore::CSSParser::parseRGBParameters): Deleted.
944         (WebCore::CSSParser::parseColorFunctionParameters): Deleted.
945         (WebCore::CSSParser::parseHSLParameters): Deleted.
946         (WebCore::CSSParser::parseColorFromValue): Deleted.
947         (WebCore::ShadowParseContext::ShadowParseContext): Deleted.
948         (WebCore::ShadowParseContext::allowLength): Deleted.
949         (WebCore::ShadowParseContext::commitValue): Deleted.
950         (WebCore::ShadowParseContext::commitLength): Deleted.
951         (WebCore::ShadowParseContext::commitColor): Deleted.
952         (WebCore::ShadowParseContext::commitStyle): Deleted.
953         (WebCore::CSSParser::parseShadow): Deleted.
954         (WebCore::CSSParser::parseReflect): Deleted.
955         (WebCore::CSSParser::parseFlex): Deleted.
956         (WebCore::BorderImageParseContext::BorderImageParseContext): Deleted.
957         (WebCore::BorderImageParseContext::canAdvance): Deleted.
958         (WebCore::BorderImageParseContext::setCanAdvance): Deleted.
959         (WebCore::BorderImageParseContext::allowCommit): Deleted.
960         (WebCore::BorderImageParseContext::allowImage): Deleted.
961         (WebCore::BorderImageParseContext::allowImageSlice): Deleted.
962         (WebCore::BorderImageParseContext::allowRepeat): Deleted.
963         (WebCore::BorderImageParseContext::allowForwardSlashOperator): Deleted.
964         (WebCore::BorderImageParseContext::requireWidth): Deleted.
965         (WebCore::BorderImageParseContext::requireOutset): Deleted.
966         (WebCore::BorderImageParseContext::commitImage): Deleted.
967         (WebCore::BorderImageParseContext::commitImageSlice): Deleted.
968         (WebCore::BorderImageParseContext::commitForwardSlashOperator): Deleted.
969         (WebCore::BorderImageParseContext::commitBorderWidth): Deleted.
970         (WebCore::BorderImageParseContext::commitBorderOutset): Deleted.
971         (WebCore::BorderImageParseContext::commitRepeat): Deleted.
972         (WebCore::BorderImageParseContext::commitWebKitBorderImage): Deleted.
973         (WebCore::BorderImageParseContext::commitBorderImage): Deleted.
974         (WebCore::BorderImageParseContext::commitBorderImageProperty): Deleted.
975         (WebCore::CSSParser::parseBorderImage): Deleted.
976         (WebCore::isBorderImageRepeatKeyword): Deleted.
977         (WebCore::CSSParser::parseBorderImageRepeat): Deleted.
978         (WebCore::BorderImageSliceParseContext::BorderImageSliceParseContext): Deleted.
979         (WebCore::BorderImageSliceParseContext::allowNumber): Deleted.
980         (WebCore::BorderImageSliceParseContext::allowFill): Deleted.
981         (WebCore::BorderImageSliceParseContext::allowFinalCommit): Deleted.
982         (WebCore::BorderImageSliceParseContext::top): Deleted.
983         (WebCore::BorderImageSliceParseContext::commitNumber): Deleted.
984         (WebCore::BorderImageSliceParseContext::commitFill): Deleted.
985         (WebCore::BorderImageSliceParseContext::commitBorderImageSlice): Deleted.
986         (WebCore::CSSParser::parseBorderImageSlice): Deleted.
987         (WebCore::BorderImageQuadParseContext::BorderImageQuadParseContext): Deleted.
988         (WebCore::BorderImageQuadParseContext::allowNumber): Deleted.
989         (WebCore::BorderImageQuadParseContext::allowFinalCommit): Deleted.
990         (WebCore::BorderImageQuadParseContext::top): Deleted.
991         (WebCore::BorderImageQuadParseContext::commitNumber): Deleted.
992         (WebCore::BorderImageQuadParseContext::setAllowFinalCommit): Deleted.
993         (WebCore::BorderImageQuadParseContext::setTop): Deleted.
994         (WebCore::BorderImageQuadParseContext::commitBorderImageQuad): Deleted.
995         (WebCore::CSSParser::parseBorderImageQuad): Deleted.
996         (WebCore::CSSParser::parseBorderImageWidth): Deleted.
997         (WebCore::CSSParser::parseBorderImageOutset): Deleted.
998         (WebCore::CSSParser::parseBorderRadius): Deleted.
999         (WebCore::CSSParser::parseAspectRatio): Deleted.
1000         (WebCore::CSSParser::parseCounter): Deleted.
1001         (WebCore::parseDeprecatedGradientPoint): Deleted.
1002         (WebCore::parseDeprecatedGradientColorStop): Deleted.
1003         (WebCore::CSSParser::parseDeprecatedGradient): Deleted.
1004         (WebCore::valueFromSideKeyword): Deleted.
1005         (WebCore::parseGradientColorOrKeyword): Deleted.
1006         (WebCore::CSSParser::parseDeprecatedLinearGradient): Deleted.
1007         (WebCore::CSSParser::parseDeprecatedRadialGradient): Deleted.
1008         (WebCore::CSSParser::parseLinearGradient): Deleted.
1009         (WebCore::CSSParser::parseRadialGradient): Deleted.
1010         (WebCore::CSSParser::parseGradientColorStops): Deleted.
1011         (WebCore::CSSParser::isGeneratedImageValue): Deleted.
1012         (WebCore::CSSParser::parseGeneratedImage): Deleted.
1013         (WebCore::CSSParser::parseFilterImage): Deleted.
1014         (WebCore::CSSParser::parseCrossfade): Deleted.
1015         (WebCore::CSSParser::parseCanvas): Deleted.
1016         (WebCore::CSSParser::parseNamedImage): Deleted.
1017         (WebCore::CSSParser::parseImageResolution): Deleted.
1018         (WebCore::CSSParser::parseImageSet): Deleted.
1019         (WebCore::TransformOperationInfo::TransformOperationInfo): Deleted.
1020         (WebCore::TransformOperationInfo::type): Deleted.
1021         (WebCore::TransformOperationInfo::argCount): Deleted.
1022         (WebCore::TransformOperationInfo::unit): Deleted.
1023         (WebCore::TransformOperationInfo::unknown): Deleted.
1024         (WebCore::TransformOperationInfo::hasCorrectArgCount): Deleted.
1025         (WebCore::CSSParser::parseTransform): Deleted.
1026         (WebCore::CSSParser::parseTransformValue): Deleted.
1027         (WebCore::CSSParser::isBlendMode): Deleted.
1028         (WebCore::CSSParser::isCompositeOperator): Deleted.
1029         (WebCore::isValidPrimitiveFilterFunction): Deleted.
1030         (WebCore::CSSParser::parseBuiltinFilterArguments): Deleted.
1031         (WebCore::cssValueKeywordIDForFunctionName): Deleted.
1032         (WebCore::CSSParser::parseFilter): Deleted.
1033         (WebCore::validFlowName): Deleted.
1034         (WebCore::CSSParser::isTextAutosizingEnabled): Deleted.
1035         (WebCore::CSSParser::isCSSGridLayoutEnabled): Deleted.
1036         (WebCore::CSSParser::parseFlowThread): Deleted.
1037         (WebCore::CSSParser::parseRegionThread): Deleted.
1038         (WebCore::CSSParser::parseTransformOrigin): Deleted.
1039         (WebCore::CSSParser::parsePerspectiveOrigin): Deleted.
1040         (WebCore::CSSParser::addTextDecorationProperty): Deleted.
1041         (WebCore::CSSParser::parseTextDecoration): Deleted.
1042         (WebCore::CSSParser::parseTextDecorationSkip): Deleted.
1043         (WebCore::CSSParser::parseTextUnderlinePosition): Deleted.
1044         (WebCore::CSSParser::parseTextEmphasisStyle): Deleted.
1045         (WebCore::CSSParser::parseTextEmphasisPosition): Deleted.
1046         (WebCore::CSSParser::parseTextIndent): Deleted.
1047         (WebCore::CSSParser::parseHangingPunctuation): Deleted.
1048         (WebCore::CSSParser::parseLineBoxContain): Deleted.
1049         (WebCore::CSSParser::parseFontFeatureTag): Deleted.
1050         (WebCore::CSSParser::parseFontFeatureSettings): Deleted.
1051         (WebCore::CSSParser::parseFontVariationTag): Deleted.
1052         (WebCore::CSSParser::parseFontVariationSettings): Deleted.
1053         (WebCore::CSSParser::parseFontVariantLigatures): Deleted.
1054         (WebCore::CSSParser::parseFontVariantNumeric): Deleted.
1055         (WebCore::CSSParser::parseFontVariantEastAsian): Deleted.
1056         (WebCore::CSSParser::parseFontVariant): Deleted.
1057         (WebCore::isValidWillChangeAnimatableFeature): Deleted.
1058         (WebCore::CSSParser::parseWillChange): Deleted.
1059         (WebCore::CSSParser::parseCalculation): Deleted.
1060         (WebCore::isCSSLetter): Deleted.
1061         (WebCore::isCSSEscape): Deleted.
1062         (WebCore::isURILetter): Deleted.
1063         (WebCore::isIdentifierStartAfterDash): Deleted.
1064         (WebCore::isCustomPropertyIdentifier): Deleted.
1065         (WebCore::isEqualToCSSIdentifier): Deleted.
1066         (WebCore::isEqualToCSSCaseSensitiveIdentifier): Deleted.
1067         (WebCore::checkAndSkipEscape): Deleted.
1068         (WebCore::skipWhiteSpace): Deleted.
1069         (WebCore::CSSParserString::characters<LChar>): Deleted.
1070         (WebCore::CSSParserString::characters<UChar>): Deleted.
1071         (WebCore::CSSParser::currentCharacter<LChar>): Deleted.
1072         (WebCore::CSSParser::currentCharacter<UChar>): Deleted.
1073         (WebCore::CSSParser::currentCharacter16): Deleted.
1074         (WebCore::CSSParser::tokenStart<LChar>): Deleted.
1075         (WebCore::CSSParser::tokenStart<UChar>): Deleted.
1076         (WebCore::CSSParser::currentLocation): Deleted.
1077         (WebCore::CSSParser::isIdentifierStart): Deleted.
1078         (WebCore::checkAndSkipString): Deleted.
1079         (WebCore::CSSParser::parseEscape): Deleted.
1080         (WebCore::CSSParser::UnicodeToChars<LChar>): Deleted.
1081         (WebCore::CSSParser::UnicodeToChars<UChar>): Deleted.
1082         (WebCore::CSSParser::parseIdentifierInternal): Deleted.
1083         (WebCore::CSSParser::parseIdentifier): Deleted.
1084         (WebCore::CSSParser::parseStringInternal): Deleted.
1085         (WebCore::CSSParser::parseString): Deleted.
1086         (WebCore::CSSParser::findURI): Deleted.
1087         (WebCore::CSSParser::parseURIInternal): Deleted.
1088         (WebCore::CSSParser::parseURI): Deleted.
1089         (WebCore::CSSParser::parseUnicodeRange): Deleted.
1090         (WebCore::CSSParser::parseNthChild): Deleted.
1091         (WebCore::CSSParser::parseNthChildExtra): Deleted.
1092         (WebCore::CSSParser::detectFunctionTypeToken): Deleted.
1093         (WebCore::CSSParser::detectMediaQueryToken): Deleted.
1094         (WebCore::CSSParser::detectNumberToken): Deleted.
1095         (WebCore::CSSParser::detectDashToken): Deleted.
1096         (WebCore::CSSParser::detectAtToken): Deleted.
1097         (WebCore::CSSParser::detectSupportsToken): Deleted.
1098         (WebCore::CSSParser::realLex): Deleted.
1099         (WebCore::CSSParser::createImportRule): Deleted.
1100         (WebCore::CSSParser::createMediaRule): Deleted.
1101         (WebCore::CSSParser::createEmptyMediaRule): Deleted.
1102         (WebCore::CSSParser::createSupportsRule): Deleted.
1103         (WebCore::CSSParser::markSupportsRuleHeaderStart): Deleted.
1104         (WebCore::CSSParser::markSupportsRuleHeaderEnd): Deleted.
1105         (WebCore::CSSParser::popSupportsRuleData): Deleted.
1106         (WebCore::CSSParser::processAndAddNewRuleToSourceTreeIfNeeded): Deleted.
1107         (WebCore::CSSParser::addNewRuleToSourceTree): Deleted.
1108         (WebCore::CSSParser::popRuleData): Deleted.
1109         (WebCore::CSSParser::syntaxError): Deleted.
1110         (WebCore::CSSParser::isLoggingErrors): Deleted.
1111         (WebCore::CSSParser::logError): Deleted.
1112         (WebCore::CSSParser::createKeyframesRule): Deleted.
1113         (WebCore::CSSParser::createStyleRule): Deleted.
1114         (WebCore::CSSParser::createFontFaceRule): Deleted.
1115         (WebCore::CSSParser::addNamespace): Deleted.
1116         (WebCore::CSSParser::determineNameInNamespace): Deleted.
1117         (WebCore::CSSParser::rewriteSpecifiersWithNamespaceIfNeeded): Deleted.
1118         (WebCore::CSSParser::rewriteSpecifiersWithElementName): Deleted.
1119         (WebCore::CSSParser::rewriteSpecifiers): Deleted.
1120         (WebCore::CSSParser::createPageRule): Deleted.
1121         (WebCore::CSSParser::createSelectorVector): Deleted.
1122         (WebCore::CSSParser::recycleSelectorVector): Deleted.
1123         (WebCore::CSSParser::createRegionRule): Deleted.
1124         (WebCore::CSSParser::createMarginAtRule): Deleted.
1125         (WebCore::CSSParser::startDeclarationsForMarginBox): Deleted.
1126         (WebCore::CSSParser::endDeclarationsForMarginBox): Deleted.
1127         (WebCore::CSSParser::createKeyframe): Deleted.
1128         (WebCore::CSSParser::invalidBlockHit): Deleted.
1129         (WebCore::CSSParser::updateLastMediaLine): Deleted.
1130         (WebCore::fixUnparsedProperties): Deleted.
1131         (WebCore::CSSParser::fixUnparsedPropertyRanges): Deleted.
1132         (WebCore::CSSParser::markRuleHeaderStart): Deleted.
1133         (WebCore::CSSParser::setRuleHeaderEnd): Deleted.
1134         (WebCore::CSSParser::markRuleHeaderEnd): Deleted.
1135         (WebCore::CSSParser::markSelectorStart): Deleted.
1136         (WebCore::CSSParser::markSelectorEnd): Deleted.
1137         (WebCore::CSSParser::markRuleBodyStart): Deleted.
1138         (WebCore::CSSParser::markRuleBodyEnd): Deleted.
1139         (WebCore::CSSParser::markPropertyStart): Deleted.
1140         (WebCore::CSSParser::markPropertyEnd): Deleted.
1141         (WebCore::CSSParser::createViewportRule): Deleted.
1142         (WebCore::CSSParser::parseViewportProperty): Deleted.
1143         (WebCore::CSSParser::parseViewportShorthand): Deleted.
1144         (WebCore::isAppleLegacyCSSPropertyKeyword): Deleted.
1145         (WebCore::cssPropertyID): Deleted.
1146         (WebCore::cssPropertyNameIOSAliasing): Deleted.
1147         (WebCore::isAppleLegacyCSSValueKeyword): Deleted.
1148         (WebCore::cssValueKeywordID): Deleted.
1149         (WebCore::isValidNthToken): Deleted.
1150         * css/parser/CSSParser.h:
1151         (): Deleted.
1152         (WebCore::CSSParser::ValueWithCalculation::ValueWithCalculation): Deleted.
1153         (WebCore::CSSParser::ValueWithCalculation::value): Deleted.
1154         (WebCore::CSSParser::ValueWithCalculation::operator CSSParserValue&): Deleted.
1155         (WebCore::CSSParser::ValueWithCalculation::calculation): Deleted.
1156         (WebCore::CSSParser::ValueWithCalculation::setCalculation): Deleted.
1157         (WebCore::CSSParser::hasProperties): Deleted.
1158         (WebCore::CSSParser::startNestedSelectorList): Deleted.
1159         (WebCore::CSSParser::endNestedSelectorList): Deleted.
1160         (WebCore::CSSParser::resetPropertyRange): Deleted.
1161         (WebCore::CSSParser::isExtractingSourceData): Deleted.
1162         (WebCore::CSSParser::lex): Deleted.
1163         (WebCore::CSSParser::token): Deleted.
1164         (WebCore::CSSParser::markViewportRuleBodyStart): Deleted.
1165         (WebCore::CSSParser::markViewportRuleBodyEnd): Deleted.
1166         (WebCore::CSSParser::setCustomPropertyName): Deleted.
1167         (WebCore::CSSParser::is8BitSource): Deleted.
1168         (WebCore::CSSParser::setStyleSheet): Deleted.
1169         (WebCore::CSSParser::inStrictMode): Deleted.
1170         (WebCore::CSSParser::inQuirksMode): Deleted.
1171         (WebCore::CSSParser::setupParser): Deleted.
1172         (WebCore::CSSParser::inShorthand): Deleted.
1173         (WebCore::CSSParser::inViewport): Deleted.
1174         (WebCore::CSSParser::operator|): Deleted.
1175         (WebCore::CSSParser::validateUnit): Deleted.
1176         (WebCore::ShorthandScope::ShorthandScope): Deleted.
1177         (WebCore::ShorthandScope::~ShorthandScope): Deleted.
1178         (WebCore::CSSParser::setTokenStart<LChar>): Deleted.
1179         (WebCore::CSSParser::setTokenStart<UChar>): Deleted.
1180         (WebCore::CSSParser::tokenStartOffset): Deleted.
1181         (WebCore::CSSParser::currentCharacterOffset): Deleted.
1182         (WebCore::CSSParser::tokenStartChar): Deleted.
1183         (WebCore::isCustomPropertyName): Deleted.
1184         (WebCore::cssyylex): Deleted.
1185         * css/parser/CSSParserFastPaths.cpp:
1186         (WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
1187         * css/parser/CSSParserMode.h:
1188         (WebCore::CSSParserContextHash::hash):
1189         * css/parser/CSSParserValues.cpp:
1190         (WebCore::CSSParserSelector::setSelectorList):
1191         (WebCore::destroy): Deleted.
1192         (WebCore::CSSParserValueList::~CSSParserValueList): Deleted.
1193         (WebCore::CSSParserValueList::addValue): Deleted.
1194         (WebCore::CSSParserValueList::insertValueAt): Deleted.
1195         (WebCore::CSSParserValueList::extend): Deleted.
1196         (WebCore::CSSParserValueList::containsVariables): Deleted.
1197         (WebCore::CSSParserValue::createCSSValue): Deleted.
1198         (WebCore::CSSParserSelector::parsePseudoElementSelector): Deleted.
1199         (WebCore::CSSParserSelector::parsePseudoElementCueFunctionSelector): Deleted.
1200         (WebCore::CSSParserSelector::parsePseudoElementSlottedFunctionSelector): Deleted.
1201         (WebCore::CSSParserSelector::parsePseudoClassHostFunctionSelector): Deleted.
1202         (WebCore::CSSParserSelector::parsePseudoClassAndCompatibilityElementSelector): Deleted.
1203         (WebCore::CSSParserSelector::setPseudoClassValue): Deleted.
1204         * css/parser/CSSParserValues.h:
1205         (WebCore::CSSParserString::init): Deleted.
1206         (WebCore::CSSParserString::clear): Deleted.
1207         (WebCore::CSSParserString::is8Bit): Deleted.
1208         (WebCore::CSSParserString::characters8): Deleted.
1209         (WebCore::CSSParserString::characters16): Deleted.
1210         (WebCore::CSSParserString::length): Deleted.
1211         (WebCore::CSSParserString::setLength): Deleted.
1212         (WebCore::CSSParserString::operator[]): Deleted.
1213         (WebCore::CSSParserString::operator String): Deleted.
1214         (WebCore::CSSParserString::operator AtomicString): Deleted.
1215         (WebCore::CSSParserString::toStringView): Deleted.
1216         (): Deleted.
1217         (WebCore::CSSParserValueList::CSSParserValueList): Deleted.
1218         (WebCore::CSSParserValueList::size): Deleted.
1219         (WebCore::CSSParserValueList::currentIndex): Deleted.
1220         (WebCore::CSSParserValueList::current): Deleted.
1221         (WebCore::CSSParserValueList::next): Deleted.
1222         (WebCore::CSSParserValueList::previous): Deleted.
1223         (WebCore::CSSParserValueList::setCurrentIndex): Deleted.
1224         (WebCore::CSSParserValueList::valueAt): Deleted.
1225         (WebCore::CSSParserValueList::clear): Deleted.
1226         (WebCore::CSSParserValue::setFromValueList): Deleted.
1227         (WebCore::equalLettersIgnoringASCIICase): Deleted.
1228         * css/parser/CSSPropertyParser.cpp:
1229         (WebCore::isCustomPropertyName):
1230         (WebCore::cssPropertyNameIOSAliasing):
1231         * css/parser/CSSPropertyParser.h:
1232         * css/parser/SVGCSSParser.cpp: Removed.
1233         * dom/InlineStyleSheetOwner.cpp:
1234         (WebCore::InlineStyleSheetOwner::createSheet):
1235         * inspector/InspectorStyleSheet.cpp:
1236         (WebCore::InspectorStyleSheet::ensureSourceData):
1237         (WebCore::InspectorStyleSheetForInlineStyle::ruleSourceData):
1238         * page/animation/AnimationController.cpp:
1239         * rendering/style/RenderStyle.cpp:
1240         * svg/SVGAnimateElementBase.cpp:
1241         * svg/SVGAnimationElement.cpp:
1242         * svg/SVGElement.cpp:
1243
1244 2016-12-10  Konstantin Tokarev  <annulen@yandex.ru>
1245
1246         [cmake] Include WTF, JSC, and WebCore headers automatically to targers using them
1247         https://bugs.webkit.org/show_bug.cgi?id=165686
1248
1249         Reviewed by Michael Catanzaro.
1250
1251         This change reduces duplication of include path lists between modules,
1252         and reduces future need for fixes like r209605 (broken build because of
1253         WebCore header suddenly becoming used in WebKit2).
1254
1255         No new tests needed.
1256
1257         * CMakeLists.txt:
1258         * PlatformEfl.cmake:
1259         * PlatformGTK.cmake:
1260         * PlatformMac.cmake:
1261         * PlatformWinCairo.cmake:
1262
1263 2016-12-10  Ryosuke Niwa  <rniwa@webkit.org>
1264
1265         Replace isUnclosedNode by isClosedShadowHidden
1266         https://bugs.webkit.org/show_bug.cgi?id=165722
1267
1268         Reviewed by Antti Koivisto.
1269
1270         Replaced Node::isUnclosedNode by Node::isClosedShadowHidden and negated the semantics as done in the spec:
1271         https://dom.spec.whatwg.org/#concept-closed-shadow-hidden
1272         https://github.com/whatwg/dom/pull/306
1273
1274         Also added a version which follows the spec text for a debug assertion.
1275
1276         No new tests since this has no behavioral change.
1277
1278         * dom/EventContext.h:
1279         (WebCore::EventContext::isUnreachableNode):
1280         * dom/EventPath.cpp:
1281         (WebCore::EventPath::computePathUnclosedToTarget):
1282         (WebCore::RelatedNodeRetargeter::checkConsistency):
1283         * dom/Node.cpp:
1284         (WebCore::isClosedShadowHiddenUsingSpecDefinition): Added to assert our implementation matches the spec text.
1285         (WebCore::Node::isClosedShadowHidden): Renamed from Node::isUnclosedNode and negated the return value.
1286         * dom/Node.h:
1287
1288 2016-12-10  Antti Koivisto  <antti@apple.com>
1289
1290         CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebCore: WTF::match_constness<WebCore::CSSValue, WebCore::CSSContentDistributionValue>::type& WTF::downcast<WebCore::CSSContentDistributionValue, WebCore::CSSValue> + 65
1291         https://bugs.webkit.org/show_bug.cgi?id=165652
1292         rdar://problem/28465278
1293
1294         Reviewed by Darin Adler.
1295
1296         No, test don't know how to get here.
1297
1298         * css/StyleBuilderConverter.h:
1299         (WebCore::StyleBuilderConverter::convertContentAlignmentData):
1300
1301         Add type checks.
1302
1303 2016-12-10  Jiewen Tan  <jiewen_tan@apple.com>
1304
1305         [WebCrypto] RSA algorithms should allow importing keys without usages
1306         https://bugs.webkit.org/show_bug.cgi?id=165680
1307         <rdar://problem/29601354>
1308
1309         Reviewed by Brent Fulgham.
1310
1311         Tests: crypto/subtle/rsa-oaep-import-jwk-public-key-empty-usages.html
1312                crypto/subtle/rsa-oaep-import-spki-key-empty-usages.html
1313                crypto/subtle/rsaes-pkcs1-v1_5-import-jwk-public-key-empty-usages.html
1314                crypto/subtle/rsaes-pkcs1-v1_5-import-spki-key-empty-usages.html
1315                crypto/subtle/rsassa-pkcs1-v1_5-import-jwk-public-key-empty-usages.html
1316                crypto/subtle/rsassa-pkcs1-v1_5-import-spki-key-empty-usages.html
1317
1318         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
1319         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
1320         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
1321         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
1322         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
1323         (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
1324
1325 2016-12-10  Frederic Wang  <fred.wang@free.fr>
1326
1327         Add STIX Two Math to the list of math fonts in mathml.css
1328         https://bugs.webkit.org/show_bug.cgi?id=165676
1329
1330         Reviewed by Darin Adler.
1331
1332         No new tests, this is just changing default style.
1333
1334         * css/mathml.css:
1335         (math):
1336
1337 2016-12-09  Romain Bellessort  <romain.bellessort@crf.canon.fr>
1338
1339         [Readable Streams API] Implement ReadableByteStreamController desiredSize
1340         https://bugs.webkit.org/show_bug.cgi?id=165599
1341
1342         Reviewed by Darin Adler.
1343
1344         Implemented ReadableByteStreamController attribute desiredSize.
1345
1346         Added test to check desiredSize value.
1347
1348         * Modules/streams/ReadableByteStreamController.js:
1349         (desiredSize):
1350         * Modules/streams/ReadableByteStreamInternals.js:
1351         (readableByteStreamControllerGetDesiredSize):
1352
1353 2016-12-09  Ryosuke Niwa  <rniwa@webkit.org>
1354
1355         document.pointerLockElement exposes a node inside a shadow tree
1356         https://bugs.webkit.org/show_bug.cgi?id=165702
1357
1358         Reviewed by Simon Fraser.
1359
1360         Expose pointerLockElement on ShadowRoot as spec'ed (DocumentOrShadowRoot):
1361         https://w3c.github.io/pointerlock/#extensions-to-the-documentorshadowroot-mixin
1362
1363         Use ancestorElementInThisScope to find the correct node in pointerLockElement.
1364
1365         Tests: fast/shadow-dom/pointerlockelement-in-shadow-tree.html
1366                fast/shadow-dom/pointerlockelement-in-slot.html
1367
1368         * dom/Document.cpp:
1369         (WebCore::Document::pointerLockElement): Moved to TreeScope.
1370         * dom/Document.h:
1371         * dom/Document.idl: Moved ointerLockElement to DocumentOrShadowRoot.idl.
1372         * dom/DocumentOrShadowRoot.idl: Ditto.
1373         * dom/TreeScope.cpp:
1374         (WebCore::TreeScope::focusedElementInScope): Use documentScope instead of acessing it via m_rootNode.
1375         (WebCore::TreeScope::pointerLockElement): Moved from Document.
1376         * dom/TreeScope.h:
1377
1378 2016-12-09  Daniel Bates  <dabates@apple.com>
1379
1380         Add reflected nonce attribute to HTML Link element IDL
1381         https://bugs.webkit.org/show_bug.cgi?id=165709
1382
1383         Reviewed by Ryosuke Niwa.
1384
1385         Add the reflected nonce attribute to the HTML Link element IDL definition
1386         as per the HTML standard <https://html.spec.whatwg.org/multipage/semantics.html#the-link-element> (9 December 2016).
1387
1388         Test: fast/dom/nonce-attribute-reflection.html
1389
1390         * html/HTMLLinkElement.idl:
1391
1392 2016-12-09  Eric Carlson  <eric.carlson@apple.com>
1393
1394         Annotate MediaStream and WebRTC idl with EnabledAtRuntime flag
1395         https://bugs.webkit.org/show_bug.cgi?id=165251
1396
1397         Reviewed by Dean Jackson.
1398
1399         Based on a patch by Dr Alex Gouaillard <agouaillard@gmail.com>
1400         No new tests, covered by existing tests.
1401
1402         * Modules/mediastream/MediaStreamEvent.idl: Add "EnabledAtRuntime".
1403         * Modules/mediastream/NavigatorMediaDevices.idl: Ditto.
1404         * Modules/mediastream/NavigatorUserMedia.idl: Ditto.
1405         * Modules/mediastream/RTCDTMFToneChangeEvent.idl: Ditto.
1406         * Modules/mediastream/RTCIceCandidate.idl: Ditto.
1407         * Modules/mediastream/RTCPeerConnection.idl: Ditto.
1408         * Modules/mediastream/RTCRtpReceiver.idl: Ditto.
1409         * Modules/mediastream/RTCRtpSender.idl: Ditto.
1410         * Modules/mediastream/RTCRtpTransceiver.idl: Ditto.
1411         * Modules/mediastream/RTCSessionDescription.idl: Ditto.
1412         * Modules/mediastream/RTCTrackEvent.idl: Ditto.
1413
1414         * bindings/generic/RuntimeEnabledFeatures.cpp:
1415         (WebCore::RuntimeEnabledFeatures::RuntimeEnabledFeatures): Set m_isMediaStreamEnabled in the
1416           constructor instead of in reset() because the later is called by the Internals constructor,
1417           making it impossible to override the runtime flag from WTR or DRT.
1418         (WebCore::RuntimeEnabledFeatures::reset): Don't set m_isMediaStreamEnabled.
1419         * page/Settings.in: Add peerConnectionEnabled.
1420
1421 2016-12-09  Daniel Bates  <dabates@apple.com>
1422
1423         Remove QuickLook scheme from the list of secure schemes
1424         https://bugs.webkit.org/show_bug.cgi?id=165699
1425
1426         Reviewed by Andy Estes.
1427
1428         Following r207155 we use a unique origin for QuickLook documents. Unique origins are not
1429         subject to mixed content restrictions. Prior to r207155 QuickLook documents used the
1430         origin from which they were served. We added the QuickLook scheme to the list of secure
1431         schemes as a workaround to avoid mixed content errors when loading subresources in a
1432         QuickLook document served over HTTPS. Now that we use a unique origin for QuickLook
1433         documents we no longer need this workaround.
1434
1435         * platform/SchemeRegistry.cpp:
1436         (WebCore::secureSchemes):
1437
1438 2016-12-09  Brady Eidson  <beidson@apple.com>
1439
1440         Re-landing:
1441         Add _WKIconLoadingDelegate SPI.
1442         https://bugs.webkit.org/show_bug.cgi?id=164894
1443
1444         Reviewed by Alex Christensen.
1445
1446         No new tests (Manual testing possible in MiniBrowser now, WKTR tests coming soon in https://bugs.webkit.org/show_bug.cgi?id=164895).
1447
1448         With this client, WebCore will ask the FrameLoaderClient about each icon found in the <head>.
1449
1450         WebKit2 will then ask the embedding app - for each icon - if it wants that icon to load.
1451
1452         For icons the app decides to load, WebKit will pass the data to the app without storing locally.
1453
1454         * WebCore.xcodeproj/project.pbxproj:
1455
1456         * dom/Document.cpp:
1457         (WebCore::Document::implicitClose):
1458
1459         * html/LinkIconCollector.cpp:
1460         (WebCore::iconSize):
1461         (WebCore::compareIcons):
1462         * html/LinkIconCollector.h:
1463
1464         * loader/DocumentLoader.cpp:
1465         (WebCore::DocumentLoader::startIconLoading):
1466         (WebCore::DocumentLoader::didGetLoadDecisionForIcon):
1467         (WebCore::DocumentLoader::finishedLoadingIcon):
1468         * loader/DocumentLoader.h:
1469
1470         * loader/FrameLoaderClient.h:
1471
1472         * loader/icon/IconLoader.cpp:
1473         (WebCore::IconLoader::IconLoader):
1474         (WebCore::IconLoader::startLoading):
1475         (WebCore::IconLoader::notifyFinished):
1476         * loader/icon/IconLoader.h:
1477
1478         * platform/LinkIcon.h: Copied from Source/WebCore/html/LinkIconCollector.h.
1479         (WebCore::LinkIcon::encode):
1480         (WebCore::LinkIcon::decode):
1481
1482 2016-12-06  Jiewen Tan  <jiewen_tan@apple.com>
1483
1484         [Part 2 of 2] Add support for PKCS8 format while doing SubtleCrypto.importKey/exportKey
1485         https://bugs.webkit.org/show_bug.cgi?id=129978
1486         <rdar://problem/21799829>
1487
1488         Reviewed by Brent Fulgham.
1489
1490         This is part 2 of Bug 129978. In this patch, it adds the PKCS8 format support for
1491         SubtleCrypto.importKey/exportKey. Currently support algorithms are RSAES-PKCS1-v1_5,
1492         RSASSA-PKCS1-v1_5 and RSA-OAEP.
1493
1494         Tests: crypto/subtle/rsa-import-jwk-key-export-pkcs8-key.html
1495                crypto/subtle/rsa-import-pkcs8-key-export-jwk-key.html
1496                crypto/subtle/rsa-import-pkcs8-key-export-pkcs8-key.html
1497                crypto/subtle/rsa-oaep-generate-export-key-pkcs8.html
1498                crypto/subtle/rsa-oaep-import-pkcs8-key.html
1499                crypto/subtle/rsaes-pkcs1-v1_5-generate-export-key-pkcs8.html
1500                crypto/subtle/rsaes-pkcs1-v1_5-import-pkcs8-key.html
1501                crypto/subtle/rsassa-pkcs1-v1_5-generate-export-key-pkcs8.html
1502                crypto/subtle/rsassa-pkcs1-v1_5-import-pkcs8-key.html
1503                crypto/workers/subtle/rsa-export-pkcs8-key.html
1504                crypto/workers/subtle/rsa-import-pkcs8-key.html
1505
1506         * bindings/js/JSSubtleCryptoCustom.cpp:
1507         (WebCore::toKeyData):
1508         * crypto/algorithms/CryptoAlgorithmRSAES_PKCS1_v1_5.cpp:
1509         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::importKey):
1510         (WebCore::CryptoAlgorithmRSAES_PKCS1_v1_5::exportKey):
1511         * crypto/algorithms/CryptoAlgorithmRSASSA_PKCS1_v1_5.cpp:
1512         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::importKey):
1513         (WebCore::CryptoAlgorithmRSASSA_PKCS1_v1_5::exportKey):
1514         * crypto/algorithms/CryptoAlgorithmRSA_OAEP.cpp:
1515         (WebCore::CryptoAlgorithmRSA_OAEP::importKey):
1516         (WebCore::CryptoAlgorithmRSA_OAEP::exportKey):
1517         * crypto/gnutls/CryptoKeyRSAGnuTLS.cpp:
1518         (WebCore::CryptoKeyRSA::importPkcs8):
1519         (WebCore::CryptoKeyRSA::exportPkcs8):
1520         * crypto/keys/CryptoKeyRSA.h:
1521         * crypto/mac/CryptoKeyRSAMac.cpp:
1522         (WebCore::CryptoKeyRSA::importSpki):
1523         (WebCore::CryptoKeyRSA::importPkcs8):
1524         (WebCore::CryptoKeyRSA::exportPkcs8):
1525
1526 2016-12-09  Geoffrey Garen  <ggaren@apple.com>
1527
1528         Deploy OrdinalNumber in JSC::SourceCode
1529         https://bugs.webkit.org/show_bug.cgi?id=165687
1530
1531         Reviewed by Michael Saboff.
1532
1533         Updated for interface changes.
1534
1535         * bindings/js/ScriptController.cpp:
1536         (WebCore::ScriptController::evaluateModule):
1537         * bindings/js/ScriptSourceCode.h:
1538         (WebCore::ScriptSourceCode::startLine):
1539
1540 2016-12-09  Joseph Pecoraro  <pecoraro@apple.com>
1541
1542         Web Inspector: Some resources fetched via Fetch API do not have data
1543         https://bugs.webkit.org/show_bug.cgi?id=165230
1544         <rdar://problem/29449220>
1545
1546         Reviewed by Alex Christensen.
1547
1548         Tests: http/tests/inspector/network/fetch-response-body.html
1549                http/tests/inspector/network/xhr-response-body.html
1550
1551         * platform/network/ResourceRequestBase.h:
1552         Distinguish Fetch requests.
1553
1554         * Modules/fetch/FetchRequest.cpp:
1555         (WebCore::FetchRequest::initializeWith):
1556         Set the requester type as Fetch.
1557
1558         * loader/DocumentThreadableLoader.cpp:
1559         (WebCore::DocumentThreadableLoader::didReceiveResponse):
1560         * loader/DocumentThreadableLoader.h:
1561         * inspector/InspectorInstrumentation.cpp:
1562         (WebCore::InspectorInstrumentation::didReceiveThreadableLoaderResponseImpl):
1563         (WebCore::InspectorInstrumentation::didReceiveXHRResponseImpl): Deleted.
1564         * inspector/InspectorInstrumentation.h:
1565         (WebCore::InspectorInstrumentation::didReceiveResourceResponse):
1566         (WebCore::InspectorInstrumentation::didReceiveThreadableLoaderResponse):
1567         (WebCore::InspectorInstrumentation::didReceiveXHRResponse): Deleted.
1568         * inspector/InspectorNetworkAgent.cpp:
1569         (WebCore::InspectorNetworkAgent::didReceiveThreadableLoaderResponse):
1570         (WebCore::InspectorNetworkAgent::didFinishXHRLoading):
1571         (WebCore::InspectorNetworkAgent::didReceiveXHRResponse): Deleted.
1572         Add a generic way for a ThreadableLoader load to update the type of a network request.
1573         This will include both XHR and Fetch requests.
1574
1575         * inspector/InspectorPageAgent.cpp:
1576         (WebCore::hasTextContent):
1577         (WebCore::createXHRTextDecoder):
1578         (WebCore::InspectorPageAgent::resourceTypeJson):
1579         (WebCore::InspectorPageAgent::cachedResourceType):
1580         (WebCore::InspectorPageAgent::createTextDecoder):
1581         (WebCore::textContentForCachedResource):
1582         * inspector/InspectorPageAgent.h:
1583         * inspector/NetworkResourcesData.cpp:
1584         (WebCore::createOtherResourceTextDecoder): Deleted.
1585         Share the logic that creates a Text Decoders for XHR with other non-buffered requests
1586         (like Fetch). This moves us to identical behavior for now.
1587
1588         * platform/MIMETypeRegistry.cpp:
1589         (WebCore::MIMETypeRegistry::isSupportedJSONMIMEType):
1590         (WebCore::MIMETypeRegistry::isTextMIMEType):
1591         * platform/MIMETypeRegistry.h:
1592         Better detect different JSON content based on MIME Type.
1593
1594 2016-12-09  Ryosuke Niwa  <rniwa@webkit.org>
1595
1596         document.webkitFullscreenElement leaks elements inside a shadow tree
1597         https://bugs.webkit.org/show_bug.cgi?id=158471
1598
1599         Reviewed by Chris Dumez.
1600
1601         Fixed the bug by calling the newly added ancestorElementInThisScope in webkitCurrentFullScreenElementForBindings
1602         and webkitFullscreenElementForBinding.
1603
1604         The specification (https://fullscreen.spec.whatwg.org/#dom-document-fullscreenelement) uses "the result of
1605         retargeting fullscreen element" and returns null if the result is not in the same tree as the context object.
1606
1607         This is equivalent to the algorithm implemented by ancestorElementInThisScope. Observe that the retargeting
1608         algorithm (https://dom.spec.whatwg.org/#retarget) finds the lowest common tree scope of the retargetee and
1609         the context object. There are two cases to consider.
1610
1611         1. The context object's tree scope is the lowest common tree scope: In this case, an ancestor shadow host or
1612         the retargetee itself is in this tree scope. It's sufficient traverse every shadow host to find the one that
1613         resides in the same tree scope as the context object. This is precisely what ancestorElementInThisScope does.
1614
1615         2. The context object's tree scope is not the lowest common tree scope: In this case, the context object is
1616         inside a shadow tree whose ancestor shadow host is in the lowest common tree scope. In this case, retargeting
1617         algorithm finds a node which is not in the same tree as the context object. Thus, the result is null.
1618         ancestorElementInThisScope traveres ancestor shadow hosts and returns null if no shadow host's tree scope
1619         matches that of the context object's tree scope. Thus, it would return null in this case as desired.
1620
1621         Also renamed TreeScope::focusedElement to focusedElementInScope for clarity since Document which inherits
1622         from TreeScope also has a distinct member function named focusedElement called by TreeScope::focusedElement,
1623         and used ancestorElementInThisScope since it uses the same algorithm.
1624
1625         Tests: fast/shadow-dom/activeElement-for-focused-element-in-another-shadow.html
1626                fast/shadow-dom/blur-on-shadow-host-with-focused-shadow-content.html
1627                fast/shadow-dom/fullscreen-in-shadow-fullscreenElement.html
1628                fast/shadow-dom/fullscreen-in-shadow-webkitCurrentFullScreenElement.html
1629                fast/shadow-dom/fullscreen-in-slot-fullscreenElement.html
1630                fast/shadow-dom/fullscreen-in-slot-webkitCurrentFullScreenElement.html
1631
1632         * dom/Document.cpp:
1633         (WebCore::Document::removeFocusedNodeOfSubtree):
1634         (WebCore::Document::activeElement):
1635         * dom/Document.h:
1636         (WebCore::Document::webkitCurrentFullScreenElementForBindings): Added.
1637         (WebCore::Document::webkitFullscreenElementForBindings): Added.
1638         * dom/Document.idl:
1639         * dom/Element.cpp:
1640         (WebCore::Element::blur):
1641         * dom/ShadowRoot.h:
1642         (WebCore::ShadowRoot::activeElement):
1643         * dom/TreeScope.cpp:
1644         (WebCore::TreeScope::ancestorNodeInThisScope): Renamed from ancestorInThisScope for clarity.
1645         (WebCore::TreeScope::ancestorElementInThisScope):
1646         (WebCore::TreeScope::focusedElementInScope): Renamed from focusedElement to disambiguate it from Document's
1647         focusedElement.
1648         * dom/TreeScope.h:
1649         * editing/VisibleSelection.cpp:
1650         (WebCore::adjustPositionForEnd):
1651         (WebCore::adjustPositionForStart):
1652         * editing/htmlediting.cpp:
1653         (WebCore::comparePositions):
1654         (WebCore::firstEditablePositionAfterPositionInRoot):
1655         (WebCore::lastEditablePositionBeforePositionInRoot):
1656         * page/DOMSelection.cpp:
1657         (WebCore::selectionShadowAncestor):
1658         (WebCore::DOMSelection::shadowAdjustedNode):
1659         (WebCore::DOMSelection::shadowAdjustedOffset):
1660         * rendering/HitTestResult.cpp:
1661         (WebCore::HitTestResult::addNodeToRectBasedTestResult): Added a FIXME here since this is clearly wrong for
1662         shadow trees created by author scripts.
1663
1664 2016-12-09  Geoffrey Garen  <ggaren@apple.com>
1665
1666         TextPosition and OrdinalNumber should be more like idiomatic numbers
1667         https://bugs.webkit.org/show_bug.cgi?id=165678
1668
1669         Reviewed by Filip Pizlo.
1670
1671         * bindings/js/CachedScriptSourceProvider.h:
1672         (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
1673         * bindings/js/JSEventListener.h:
1674         (WebCore::JSEventListener::sourcePosition):
1675         * bindings/js/JSLazyEventListener.cpp:
1676         (WebCore::JSLazyEventListener::JSLazyEventListener):
1677         * bindings/js/ScriptController.cpp:
1678         (WebCore::ScriptController::eventHandlerPosition):
1679         * bindings/js/ScriptSourceCode.h:
1680         (WebCore::ScriptSourceCode::ScriptSourceCode):
1681         * css/CSSStyleSheet.cpp:
1682         (WebCore::CSSStyleSheet::create):
1683         * dom/ScriptElement.h:
1684         * html/parser/HTMLTreeBuilder.cpp:
1685         (WebCore::uninitializedPositionValue1):
1686         * inspector/InspectorStyleSheet.cpp:
1687         (WebCore::InspectorStyleSheet::buildObjectForStyleSheetInfo): Adopt
1688         default construtor.
1689
1690         * xml/XMLErrors.cpp:
1691         (WebCore::XMLErrors::XMLErrors):
1692         (WebCore::XMLErrors::handleError):
1693         * xml/XMLErrors.h: Use std::optional instead of belowRangePosition()
1694         because in-band signaling is harder to reason about.
1695
1696         * xml/parser/XMLDocumentParserLibxml2.cpp:
1697         (WebCore::XMLDocumentParser::textPosition): Adopt default constructor.
1698
1699 2016-12-09  Chris Dumez  <cdumez@apple.com>
1700
1701         [Cocoa] Validation message for required checkbox doesn’t conform the the Apple Style Guide
1702         https://bugs.webkit.org/show_bug.cgi?id=165661
1703
1704         Reviewed by Dan Bernstein.
1705
1706         Update validation message as per Apple Style Guide.
1707
1708         * English.lproj/Localizable.strings:
1709         * platform/LocalizedStrings.cpp:
1710         (WebCore::validationMessageValueMissingForCheckboxText):
1711
1712 2016-12-09  Zalan Bujtas  <zalan@apple.com>
1713
1714         ASSERTION FAILED: !beforeChild->isRubyRun() in WebCore::RenderRubyAsBlock::addChild
1715         https://bugs.webkit.org/show_bug.cgi?id=141433
1716         <rdar://problem/27711351>
1717
1718         Reviewed by Dean Jackson.
1719
1720         Do not try to inject the list marker into a block ruby subtree. Have it as the sibling
1721         of the ruby instead (with an anonymous block wrapper ofc).
1722
1723         Test: fast/ruby/assert-with-listitem-and-block-ruby.html
1724
1725         * rendering/RenderListItem.cpp:
1726         (WebCore::getParentOfFirstLineBox):
1727
1728 2016-12-09  Antoine Quint  <graouts@apple.com>
1729
1730         [Modern Media Controls] Implement the pageScaleFactor property
1731         https://bugs.webkit.org/show_bug.cgi?id=165660
1732
1733         Reviewed by Dean Jackson.
1734
1735         We implement the pageScaleFactor property on MediaController. This property is set
1736         by the HTMLMediaElement when the page scale factor changes, and we only choose to handle
1737         it on iOS by setting controlsDependOnPageScaleFactor to true on the MediaControlsHost.
1738
1739         To do so, we now size the media controls by multiplying the layout size of the media by
1740         the page scale factor, and apply an inverse CSS zoom on the media controls themselves.
1741
1742         Test: media/modern-media-controls/media-controller/media-controller-scale-factor.html
1743
1744         * Modules/modern-media-controls/controls/media-controls.css:
1745         (.media-controls-container,):
1746         * Modules/modern-media-controls/controls/media-controls.js:
1747         (MediaControls.prototype.get scaleFactor):
1748         (MediaControls.prototype.set scaleFactor):
1749         (MediaControls.prototype.commitProperty):
1750         * Modules/modern-media-controls/media/media-controller.js:
1751         (MediaController):
1752         (MediaController.prototype.set pageScaleFactor):
1753         (MediaController.prototype._updateControlsSize):
1754         * html/HTMLMediaElement.cpp:
1755         (WebCore::controllerJSValue):
1756         (WebCore::HTMLMediaElement::setControllerJSProperty):
1757
1758         We no longer hit a JSC assertion when trying to set the pageScaleFactor property before
1759         the JS controller was actually created.
1760
1761 2016-12-09  Daniel Bates  <dabates@apple.com>
1762
1763         Attempt to fix the Mac CMake build following <http://trac.webkit.org/changeset/209549>
1764         (https://bugs.webkit.org/show_bug.cgi?id=165572)
1765
1766         Add directory html/canvas to the list of forwarding headers directories so that
1767         the Legacy WebKit Objective-C DOM binding DOMHTMLCanvasElement.mm can ultimately
1768         include header WebGLContextAttributes.h.
1769
1770         * PlatformMac.cmake:
1771
1772 2016-12-09  Brady Eidson  <beidson@apple.com>
1773
1774         LinkIconCollector refactoring.
1775         https://bugs.webkit.org/show_bug.cgi?id=165657
1776
1777         Reviewed by Dean Jackson.
1778
1779         No new tests (Refactor, no behavior change)
1780
1781         * WebCore.xcodeproj/project.pbxproj:
1782
1783         * html/LinkIconCollector.cpp:
1784         (WebCore::iconSize):
1785         (WebCore::compareIcons):
1786         * html/LinkIconCollector.h:
1787
1788         * platform/LinkIcon.h: Move outside of LinkIconCollector for future expandability.
1789
1790 2016-12-09  Ryan Haddad  <ryanhaddad@apple.com>
1791
1792         Unreviewed, rolling out r209574.
1793
1794         This change broke the Windows build.
1795
1796         Reverted changeset:
1797
1798         "[WebIDL] Remove custom bindings for Geolocation"
1799         https://bugs.webkit.org/show_bug.cgi?id=165625
1800         http://trac.webkit.org/changeset/209574
1801
1802 2016-12-09  Ryosuke Niwa  <rniwa@webkit.org>
1803
1804         Custom Elements from a different document are not customized when created with innerHTML
1805         https://bugs.webkit.org/show_bug.cgi?id=165617
1806
1807         Reviewed by Antti Koivisto.
1808
1809         The bug was caused by a superflous null check on window in createHTMLElementOrFindCustomElementInterface.
1810         Removed the nullcheck to fix the bug.
1811
1812         Test: fast/custom-elements/adopting-from-frameless-document.html
1813
1814         * html/parser/HTMLConstructionSite.cpp:
1815         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
1816
1817 2016-12-09  Daniel Bates  <dabates@apple.com>
1818
1819         [CSP] Policy of window opener not applied to about:blank window
1820         https://bugs.webkit.org/show_bug.cgi?id=165531
1821         <rdar://problem/29426639>
1822
1823         Reviewed by Brent Fulgham.
1824
1825         Fixes an issue where the content security policy of the opener document was not applied to
1826         an about:blank window.
1827
1828         An about:blank window inherits its security origin from its opener document. It should also
1829         copy (inherit) the ContentSecurityPolicy from its opener document. When copying the ContentSecurityPolicy
1830         state from the opener document to the about:blank document we must take care to avoid copying
1831         any upgrade-insecure-request directive because new windows should not inherit it by definition.
1832         With respect to upgrade-insecure-requests, new windows should only inherit the insecure navigation set
1833         from their opener document.
1834
1835         Test: http/tests/security/contentSecurityPolicy/image-blocked-in-about-blank-window.html
1836
1837         * dom/Document.cpp:
1838         (WebCore::Document::initContentSecurityPolicy): Copy the ContentSecurityPolicy state from the
1839         owner document to this document when it inherits its security origin from its owner. An about:blank
1840         window is one example of a document that inherits its security origin from its owner.
1841         * loader/WorkerThreadableLoader.cpp:
1842         (WebCore::WorkerThreadableLoader::MainThreadBridge::MainThreadBridge): Call ContentSecurityPolicy::copyUpgradeInsecureRequestStateFrom()
1843         to copy the upgrade insecure requests state from the owner document to the worker now that
1844         ContentSecurityPolicy::copyStateFrom() no longer does this.
1845         * page/csp/ContentSecurityPolicy.cpp:
1846         (WebCore::ContentSecurityPolicy::copyStateFrom): Do not copy the upgrade insecure request state.
1847         Callers are now responsible for calling ContentSecurityPolicy::copyUpgradeInsecureRequestStateFrom()
1848         to copy this state.
1849         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
1850         (WebCore::ContentSecurityPolicyDirectiveList::parse): Ignore directive upgrade-insecure-requests when
1851         inheriting ContentSecurityPolicy state as this directive as the Upgrade Insecure Requests feature has
1852         its own inheritance semantics that differ from the semantics of copying a ContentSecurityPolicy object.
1853         * xml/XSLTProcessor.cpp:
1854         (WebCore::XSLTProcessor::createDocumentFromSource): Call ContentSecurityPolicy::copyUpgradeInsecureRequestStateFrom()
1855         to copy the upgrade insecure requests state from the original document to the transformed document now
1856         that ContentSecurityPolicy::copyStateFrom() no longer does this.
1857
1858 2016-12-09  Antoine Quint  <graouts@apple.com>
1859
1860         [Modern Media Controls] Remaining time label first appears way to the left
1861         https://bugs.webkit.org/show_bug.cgi?id=165637
1862
1863         Reviewed by Dean Jackson.
1864
1865         We would sometimes see the remaining time label be laid out in an incorrect position
1866         when a video would start playing. This happened because the time label was being committed
1867         from a previous value before, in the same frame, we would call the layout() function
1868         of MacOSInlineMediaControls. This would set the newly computed location for the
1869         remaining time label, but because we would reset the list of dirty properties after
1870         calling all layout functions, the new value set in MacOSInlineMediaControls.layout()
1871         would be disregarded and the wrong, committed value would persist until it was reset
1872         in a much later frame.
1873
1874         We now correctly clear the list of dirty nodes before laying them out, giving all nodes
1875         a chance to become dirty again during layout, and updated again in the next frame.
1876
1877         Test: media/modern-media-controls/layout-node/node-made-dirty-during-layout.html
1878
1879         * Modules/modern-media-controls/controls/layout-node.js:
1880         (performScheduledLayout):
1881
1882 2016-12-09  Per Arne Vollan  <pvollan@apple.com>
1883
1884         Fix compile errors on Windows when building with .proj files.
1885
1886         Unreviewed build fix.
1887
1888         Fix include paths.
1889
1890         * platform/graphics/win/IntPointWin.cpp:
1891         * platform/graphics/win/IntRectWin.cpp:
1892         * platform/graphics/win/IntSizeWin.cpp:
1893
1894 2016-12-09  Csaba Osztrogonác  <ossy@webkit.org>
1895
1896         Unreviewed buildfix after r209570.
1897
1898         * bindings/js/JSDOMGlobalObject.cpp:
1899         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
1900
1901 2016-12-01  Sergio Villar Senin  <svillar@igalia.com>
1902
1903         [css-grid] Pass Grid as argument to items' placement methods
1904         https://bugs.webkit.org/show_bug.cgi?id=165250
1905
1906         Reviewed by Darin Adler.
1907
1908         In order to constify computeIntrinsicLogicalWidths() it is required to constify
1909         placeItemsOnGrid() first, which is the base method of the grid items' positioning logic. The
1910         first step is to constify all the methods invoked by the latter, which basically means to
1911         pass the Grid as argument to all of them instead of directly using the m_grid attribute from
1912         RenderGrid. As this is an intermediate step, a new const_cast<> was required in the
1913         intrinsic size computation. However it will be promptly removed after the const-ification of
1914         placeItemsOnGrid().
1915
1916         After this, only the methods used by the track sizing algorithm will directly access
1917         m_grid. All those would get a reference to the Grid via GridSizingData, but that's a matter
1918         of a follow up patch.
1919
1920         Apart from that, m_gridIsDirty was removed because it was always too confusing. It was
1921         replaced by Grid's m_needsItemsPlacement which is much more concise. The clearGrid() call
1922         was indeed only forcing a new placement of the grid items.
1923
1924         No new tests as this is a refactoring.
1925
1926         * rendering/RenderGrid.cpp:
1927         (WebCore::RenderGrid::Grid::setNeedsItemsPlacement): New method to flag the Grid whenever
1928         grid items' placement algorithm needs to be run.
1929         (WebCore::RenderGrid::canPerformSimplifiedLayout):
1930         (WebCore::RenderGrid::layoutBlock):
1931         (WebCore::RenderGrid::computeIntrinsicLogicalWidths):
1932         (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat):
1933         (WebCore::RenderGrid::placeItemsOnGrid):
1934         (WebCore::RenderGrid::populateExplicitGridAndOrderIterator): Constified. Got Grid as
1935         argument.
1936         (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid): Ditto.
1937         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid): Ditto.
1938         (WebCore::RenderGrid::placeAutoMajorAxisItemsOnGrid): Ditto.
1939         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid): Ditto.
1940         (WebCore::RenderGrid::clearGrid):
1941         (WebCore::RenderGrid::offsetAndBreadthForPositionedChild):
1942         (WebCore::RenderGrid::numTracks):
1943         * rendering/RenderGrid.h:
1944
1945 2016-12-09  Gavin Barraclough  <barraclough@apple.com>
1946
1947         Revert - Add _WKIconLoadingDelegate SPI
1948         https://bugs.webkit.org/show_bug.cgi?id=164894
1949
1950         Unreviewed rollout due to performance regression.
1951
1952         * WebCore.xcodeproj/project.pbxproj:
1953         * dom/Document.cpp:
1954         (WebCore::Document::implicitClose):
1955         * html/LinkIconCollector.cpp:
1956         (WebCore::iconSize):
1957         (WebCore::compareIcons):
1958         * html/LinkIconCollector.h:
1959         * loader/DocumentLoader.cpp:
1960         (WebCore::DocumentLoader::startIconLoading): Deleted.
1961         (WebCore::DocumentLoader::didGetLoadDecisionForIcon): Deleted.
1962         (WebCore::DocumentLoader::finishedLoadingIcon): Deleted.
1963         * loader/DocumentLoader.h:
1964         * loader/FrameLoaderClient.h:
1965         * loader/icon/IconLoader.cpp:
1966         (WebCore::IconLoader::IconLoader):
1967         (WebCore::IconLoader::startLoading):
1968         (WebCore::IconLoader::notifyFinished):
1969         * loader/icon/IconLoader.h:
1970         * platform/LinkIcon.h: Removed.
1971
1972 2016-12-08  Jiewen Tan  <jiewen_tan@apple.com>
1973
1974         [WebCrypto] Remove NoInterfaceObject attribute from SubtleCrypto Interface
1975         https://bugs.webkit.org/show_bug.cgi?id=165629
1976         <rdar://problem/29586203>
1977
1978         Reviewed by Chris Dumez.
1979
1980         Covered by existing tests.
1981
1982         * crypto/SubtleCrypto.idl:
1983
1984 2016-12-08  Keith Rollin  <krollin@apple.com>
1985
1986         FileHandle::printf doesn't build on Windows
1987         https://bugs.webkit.org/show_bug.cgi?id=165642
1988
1989         Reviewed by Ryosuke Niwa.
1990
1991         Fix the build -- vasprintf does not exist on Windows, so make
1992         FileHandle::printf a no-op on that platform.
1993
1994         No new tests -- affected facility is currently only used in testing
1995         code and is not user reachable.
1996
1997         * platform/FileHandle.cpp:
1998         (WebCore::FileHandle::printf):
1999
2000 2016-12-08  Antoine Quint  <graouts@apple.com>
2001
2002         [Modern Media Controls] Exiting fullscreen with paused media shows the start button
2003         https://bugs.webkit.org/show_bug.cgi?id=165640
2004
2005         Reviewed by Dean Jackson.
2006
2007         Like all supporting objects, the StartSupport instance gets recreated when creating controls
2008         for new layout traits, which happens when going from fullscreen to inline. Due to this, the
2009         "_isPlayed" property is not longer set to true, even if the media has played prior to being
2010         paused in fullscreen. We now also check the media's played range to identify whether media
2011         has been played.
2012
2013         * Modules/modern-media-controls/media/start-support.js:
2014         (StartSupport.prototype._shouldShowStartButton):
2015         (StartSupport):
2016
2017 2016-12-08  Myles C. Maxfield  <mmaxfield@apple.com>
2018
2019         ASSERTION FAILED: locale in WebCore::lastHyphenLocation
2020         https://bugs.webkit.org/show_bug.cgi?id=164182
2021
2022         Reviewed by Zalan Bujtas.
2023
2024         Our hyphenation code assumes the locale is in a small set of known locales.
2025         However, web content can put whatever string it wants in the locale field.
2026
2027         Test: fast/text/hyphenation-unknown-locale.html
2028
2029         * platform/text/cf/HyphenationCF.cpp:
2030         (WebCore::lastHyphenLocation):
2031         * rendering/RenderText.cpp:
2032         (WebCore::maxWordFragmentWidth): When computing the minimum preferred width of
2033         an element, we want to know the size of the widest nonbreakable unit. When
2034         hyphenation is enabled, we have to measure the width of each fragment of each
2035         word (where "fragment" is determined by a substring between two successive
2036         hyphenation points, appended with a hyphen character). A hyphenation point at
2037         string offset 0 is irrelevant for this purpose, because it would lead to an
2038         empty fragment. Therefore, skip this situation.
2039
2040 2016-12-08  David Kilzer  <ddkilzer@apple.com>
2041
2042         Always check the return value of pthread_key_create()
2043         <https://webkit.org/b/165274>
2044
2045         Reviewed by Darin Adler.
2046
2047         * platform/ios/wak/WebCoreThread.mm:
2048         (InitThreadContextKey): Call CRASH() if pthread_key_create()
2049         returns an error.  The error code will be stored in a register
2050         available in a crash log, so no need to log the value
2051         explicitly.
2052
2053 2016-12-08  Alex Christensen  <achristensen@webkit.org>
2054
2055         Reduce PassRefPtr use in platform/graphics
2056         https://bugs.webkit.org/show_bug.cgi?id=165636
2057
2058         Reviewed by Dean Jackson.
2059
2060         No change in behavior.
2061
2062         * platform/graphics/GraphicsContext3D.h:
2063         * platform/graphics/mac/DisplayRefreshMonitorMac.h:
2064         (WebCore::DisplayRefreshMonitorMac::create):
2065         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
2066         (WebCore::GraphicsContext3D::createForCurrentGLContext):
2067         (WebCore::GraphicsContext3D::paintRenderingResultsToImageData):
2068
2069 2016-12-08  Keith Rollin  <krollin@apple.com>
2070
2071         Move FileHandle to WebCore FileHandle.h
2072         https://bugs.webkit.org/show_bug.cgi?id=165562
2073
2074         Reviewed by Alex Christensen.
2075
2076         Add FileHandle, a small wrapper around FileSystem facilities to manage
2077         the lifetime of an open file and give the facilities a C++ interface.
2078
2079         No new tests -- affected facility is currently only used in testing
2080         code and is not user reachable.
2081
2082         * CMakeLists.txt:
2083         * WebCore.xcodeproj/project.pbxproj:
2084         * platform/FileHandle.cpp: Added.
2085         (WebCore::FileHandle::FileHandle):
2086         (WebCore::FileHandle::~FileHandle):
2087         (WebCore::FileHandle::operator=):
2088         (WebCore::FileHandle::operator bool):
2089         (WebCore::FileHandle::open):
2090         (WebCore::FileHandle::read):
2091         (WebCore::FileHandle::write):
2092         (WebCore::FileHandle::printf):
2093         (WebCore::FileHandle::close):
2094         * platform/FileHandle.h: Added.
2095
2096 2016-12-07  Ryosuke Niwa  <rniwa@webkit.org>
2097
2098         ASSERTION FAILED: m_items.isEmpty() in CustomElementReactionQueue destructor
2099         https://bugs.webkit.org/show_bug.cgi?id=162029
2100         <rdar://problem/28945851>
2101
2102         Reviewed by Chris Dumez.
2103
2104         The bug was caused by Document::removedLastRef enqueuing disconnectedCallback during a tear down.
2105         Don't enqueue a disconnectedCallback while a document is getting torn down since that should not be
2106         observable to author scripts. The connected, adopted, and attributeChanged callbacks are immune from
2107         this problem since they don't happen during a document destruction.
2108
2109         Note that this was also the case prior to this patch since the disconnectedCallback would have been
2110         added to the current CustomElementReactionQueue which will be destructed without invoking callbacks
2111         (or hit a release assertion added in r208785 and r209426 for now).
2112
2113         Tests: fast/custom-elements/disconnected-callback-in-detached-iframe.html
2114                fast/custom-elements/element-queue-during-document-destruction.html
2115
2116         * dom/CustomElementReactionQueue.cpp:
2117         (WebCore::CustomElementReactionQueue::enqueueConnectedCallbackIfNeeded): Added an assertion that
2118         document's refCount hasn't reached zero yet.
2119         (WebCore::CustomElementReactionQueue::enqueueDisconnectedCallbackIfNeeded): Fixed the bug.
2120         (WebCore::CustomElementReactionQueue::enqueueAdoptedCallbackIfNeeded): Added the same assertion.
2121         (WebCore::CustomElementReactionQueue::enqueueAttributeChangedCallbackIfNeeded): Ditto.
2122
2123 2016-12-08  Daniel Bates  <dabates@apple.com>
2124
2125         Add Strict Mixed Content Checking and Upgrade Insecure Requests to WebKit Feature Status dashboard
2126         https://bugs.webkit.org/show_bug.cgi?id=165635
2127
2128         Rubber-stamped by Ryosuke Niwa.
2129
2130         * features.json:
2131
2132 2016-12-08  Daniel Bates  <dabates@apple.com>
2133
2134         Implement Strict Mixed Content Checking
2135         https://bugs.webkit.org/show_bug.cgi?id=165438
2136         <rdar://problem/26103867>
2137
2138         Reviewed by Brent Fulgham and Andy Estes.
2139
2140         Add support for the CSP directive block-all-mixed-content to enable strict mixed content checking
2141         as per <https://www.w3.org/TR/2016/CR-mixed-content-20160802/#strict-checking> (2 August 2016).
2142
2143         Currently WebKit only blocks blockable content as such content can contaminate the security origin
2144         that loaded it. Optionally-blockable content, including images, would be allowed to load as mixed
2145         content. When strict mixed content checking is enabled all mixed content is blocked. That is, both
2146         blockable and optionally-blockable content will be blocked. A web site can opt into strict mixed
2147         content checking by adding the directive block-all-mixed-content to their content security policy.
2148
2149         Tests: http/tests/security/contentSecurityPolicy/block-all-mixed-content/data-url-iframe-in-main-frame.html
2150                http/tests/security/contentSecurityPolicy/block-all-mixed-content/duplicate-directive.html
2151                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe-report-only.html
2152                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-iframe.html
2153                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-css-in-main-frame.html
2154                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-iframe.html
2155                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-main-frame.html
2156                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-blob-url-iframe-in-iframe.html
2157                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-with-enforced-and-report-policies.html
2158                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe-with-inherited-policy.html
2159                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-iframe.html
2160                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-javascript-url-iframe-in-iframe.html
2161                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-main-frame.html
2162                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-image-in-xslt-document-in-iframe-with-inherited-policy.html
2163                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-plugin-in-iframe.html
2164                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-plugin-in-main-frame.html
2165                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-iframe-with-inherited-policy.html
2166                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-iframe.html
2167                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-script-in-main-frame.html
2168                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-iframe.html
2169                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-asynchronous-in-main-frame.html
2170                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-synchronous-in-iframe.html
2171                http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-xhr-synchronous-in-main-frame.html
2172                http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-in-iframe.html
2173                http/tests/security/contentSecurityPolicy/block-all-mixed-content/secure-image-after-upgrade-redirect-in-iframe.html
2174
2175         * dom/Document.cpp:
2176         (WebCore::Document::initSecurityContext): Inherit strict mixed content checking mode from parent document.
2177         * dom/SecurityContext.h:
2178         (WebCore::SecurityContext::isStrictMixedContentMode): Added.
2179         (WebCore::SecurityContext::setStrictMixedContentMode): Added.
2180         * loader/DocumentLoader.cpp:
2181         (WebCore::DocumentLoader::willSendRequest): Check mixed content policy with respect to the current frame.
2182         The document in the current frame may have opted into strict mixed content checking or inherited it from
2183         its parent document.
2184         * loader/DocumentWriter.cpp:
2185         (WebCore::DocumentWriter::begin): Inherit the strict mixed content checking mode from the owner document
2186         when loading a JavaScript URL in a frame (e.g. <iframe src="javascript:...">) because such URLs inherit
2187         the security origin of their parent document.
2188         * loader/MixedContentChecker.cpp:
2189         (WebCore::MixedContentChecker::canDisplayInsecureContent): Check the content security policy of the document
2190         and the strict mixed content checking mode bit on the document (in that order) to determine if we are in
2191         strict mode. Block display of insecure content when in strict mode. Modified to take enum AlwaysDisplayInNonStrictMode (defaults
2192         to AlwaysDisplayInNonStrictMode::No) as to whether to allow our current relaxed behavior of displaying insecure
2193         content in non-strict mode.
2194         (WebCore::MixedContentChecker::canRunInsecureContent): Check the content security policy of the document
2195         and the strict mixed content checking mode bit on the document (in that order) to determine if we are in
2196         strict mode. Block running of insecure content when in strict mode.
2197         * loader/MixedContentChecker.h:
2198         * loader/cache/CachedResourceLoader.cpp:
2199         (WebCore::CachedResourceLoader::checkInsecureContent): Always check mixed content policy with respect to
2200         the current frame. The document in the current frame may have opted into strict mixed content checking or
2201         inherited it from its parent document. Also renamed a local variable f to frame to better describe its
2202         purpose.
2203         * page/csp/ContentSecurityPolicy.cpp:
2204         (WebCore::ContentSecurityPolicy::allowRunningOrDisplayingInsecureContent): Added. Iterate through all the
2205         policies and report violations with respect to policies that have directive block-all-mixed-content.
2206         (WebCore::ContentSecurityPolicy::didReceiveHeader): Move logic to set eval() error message from here...
2207         (WebCore::ContentSecurityPolicy::applyPolicyToScriptExecutionContext): ...to here so that we only perform
2208         it once we are ready to apply the CSP policy to the script execution context. Additionally, enable
2209         strict mixed content checking on the script execution context if applicable.
2210         (WebCore::ContentSecurityPolicy::reportViolation): Added overrides that take a string and a directive list
2211         object (ContentSecurityPolicyDirectiveList) for the effective violated directive and its associated directive
2212         list, respectively. We make use of these overrides so as to support reporting block-all-mixed-content
2213         violations, which are not implemented using a ContentSecurityPolicyDirective object as it seemed sufficient
2214         to implement it as a boolean on ContentSecurityPolicyDirectiveList.
2215         * page/csp/ContentSecurityPolicy.h:
2216         * page/csp/ContentSecurityPolicyDirectiveList.cpp:
2217         (WebCore::ContentSecurityPolicyDirectiveList::setBlockAllMixedContentEnabled): Added.
2218         (WebCore::ContentSecurityPolicyDirectiveList::addDirective): Parse the directive block-all-mixed-content.
2219         * page/csp/ContentSecurityPolicyDirectiveList.h:
2220         (WebCore::ContentSecurityPolicyDirectiveList::hasBlockAllMixedContentDirective): Added.
2221         * page/csp/ContentSecurityPolicyDirectiveNames.cpp:
2222         * page/csp/ContentSecurityPolicyDirectiveNames.h: Add constant for "block-all-mixed-content".
2223
2224 2016-12-08  Sam Weinig  <sam@webkit.org>
2225
2226         [WebIDL] Remove custom bindings for Geolocation
2227         https://bugs.webkit.org/show_bug.cgi?id=165625
2228
2229         Reviewed by Alex Christensen.
2230
2231         * CMakeLists.txt:
2232         * DerivedSources.cpp:
2233         * DerivedSources.make:
2234         * WebCore.xcodeproj/project.pbxproj:
2235         * bindings/js/JSBindingsAllInOne.cpp:
2236         Add/remove files.
2237
2238         * Modules/geolocation/GeoNotifier.cpp:
2239         (WebCore::GeoNotifier::GeoNotifier):
2240         (WebCore::GeoNotifier::hasZeroTimeout):
2241         (WebCore::GeoNotifier::startTimerIfNeeded):
2242         * Modules/geolocation/GeoNotifier.h:
2243         (WebCore::GeoNotifier::create):
2244         (WebCore::GeoNotifier::options):
2245         Update to store PositionOptions as a value, and pass the PositionCallback
2246         as a Ref, rather than a RefPtr, since it is not optional.
2247
2248         * Modules/geolocation/Geolocation.cpp:
2249         (WebCore::createGeoposition):
2250         Use auto, to get the good type for Coordinates (Ref).
2251
2252         (WebCore::Geolocation::getCurrentPosition):
2253         (WebCore::Geolocation::watchPosition):
2254         (WebCore::Geolocation::haveSuitableCachedPosition):
2255         (WebCore::Geolocation::startUpdating):
2256         * Modules/geolocation/Geolocation.h:
2257         Update to pass PositionOptions itself now that it is a plain struct.
2258
2259         * Modules/geolocation/Geolocation.idl:
2260         Remove [Custom] extended attribute and add FIXME about nullable annotation. 
2261
2262         * Modules/geolocation/Geoposition.h:
2263         Pass/store Coordinates as a Ref.
2264  
2265         * Modules/geolocation/PositionOptions.h:
2266         Convert to be a simple struct.
2267
2268         * Modules/geolocation/PositionOptions.idl:
2269         Added.
2270         
2271         * bindings/js/JSGeolocationCustom.cpp:
2272         Removed.
2273
2274 2016-12-08  Alex Christensen  <achristensen@webkit.org>
2275
2276         REGRESSION (URL parser): Relative URLs aren’t resolved correctly when the base URL is an applewebdata: URL
2277         https://bugs.webkit.org/show_bug.cgi?id=165621
2278
2279         Reviewed by Dan Bernstein.
2280
2281         Covered by new API tests.
2282
2283         * platform/URLParser.cpp:
2284         (WebCore::URLParser::parse):
2285         URLs with nonspecial schemes and no slash after the host get no slash as the path to maintain compatibility with all browsers.
2286         This was proposed to the URL spec in https://github.com/whatwg/url/issues/148
2287         When such as URL is used as a base URL with a relative path, in order to maintain compatibility with URL::parse we need to prepend
2288         a slash to the path.  For completeness I added tests with a relative path, a relative query, a relative fragment, and a relative empty string,
2289         and because the fate of the spec is unclear in this case, I decided to maintain compatibility with URL::parse in all these cases.
2290
2291 2016-12-06  Filip Pizlo  <fpizlo@apple.com>
2292
2293         Concurrent GC should be stable enough to land enabled on X86_64
2294         https://bugs.webkit.org/show_bug.cgi?id=164990
2295
2296         Reviewed by Geoffrey Garen.
2297         
2298         Made WebCore down with concurrent marking by adding some locking and adapting to some new API.
2299
2300         This has new test modes in run-sjc-stress-tests. Also, the way that LayoutTests run is already
2301         a fantastic GC test.
2302
2303         * ForwardingHeaders/heap/DeleteAllCodeEffort.h: Added.
2304         * ForwardingHeaders/heap/LockDuringMarking.h: Added.
2305         * bindings/js/GCController.cpp:
2306         (WebCore::GCController::deleteAllCode):
2307         (WebCore::GCController::deleteAllLinkedCode):
2308         * bindings/js/GCController.h:
2309         * bindings/js/JSDOMBinding.cpp:
2310         (WebCore::getCachedDOMStructure):
2311         (WebCore::cacheDOMStructure):
2312         * bindings/js/JSDOMGlobalObject.cpp:
2313         (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
2314         (WebCore::JSDOMGlobalObject::visitChildren):
2315         * bindings/js/JSDOMGlobalObject.h:
2316         (WebCore::getDOMConstructor):
2317         * bindings/js/JSDOMPromise.cpp:
2318         (WebCore::DeferredPromise::DeferredPromise):
2319         (WebCore::DeferredPromise::clear):
2320         * bindings/js/JSXPathResultCustom.cpp:
2321         (WebCore::JSXPathResult::visitAdditionalChildren):
2322         * dom/EventListenerMap.cpp:
2323         (WebCore::EventListenerMap::clear):
2324         (WebCore::EventListenerMap::replace):
2325         (WebCore::EventListenerMap::add):
2326         (WebCore::EventListenerMap::remove):
2327         (WebCore::EventListenerMap::find):
2328         (WebCore::EventListenerMap::removeFirstEventListenerCreatedFromMarkup):
2329         (WebCore::EventListenerMap::copyEventListenersNotCreatedFromMarkupToTarget):
2330         (WebCore::EventListenerIterator::EventListenerIterator):
2331         * dom/EventListenerMap.h:
2332         (WebCore::EventListenerMap::lock):
2333         * dom/EventTarget.cpp:
2334         (WebCore::EventTarget::visitJSEventListeners):
2335         * dom/EventTarget.h:
2336         (WebCore::EventTarget::visitJSEventListeners): Deleted.
2337         * dom/Node.cpp:
2338         (WebCore::Node::eventTargetDataConcurrently):
2339         (WebCore::Node::ensureEventTargetData):
2340         (WebCore::Node::clearEventTargetData):
2341         * dom/Node.h:
2342         * page/MemoryRelease.cpp:
2343         (WebCore::releaseCriticalMemory):
2344         * page/cocoa/MemoryReleaseCocoa.mm:
2345         (WebCore::jettisonExpensiveObjectsOnTopLevelNavigation):
2346         (WebCore::registerMemoryReleaseNotifyCallbacks):
2347
2348 2016-12-08  Dave Hyatt  <hyatt@apple.com>
2349
2350         [CSS Parser] Add strict checking for right parens to selector functions like :matches, :not etc.
2351         https://bugs.webkit.org/show_bug.cgi?id=165624
2352
2353         Reviewed by Dean Jackson.
2354
2355         Unskipped fast/selectors/invalid-functional-pseudo-class.html.
2356
2357         * css/parser/CSSSelectorParser.cpp:
2358         (WebCore::CSSSelectorParser::consumePseudo):
2359         Bail if we don't actually consume a right parenthesis.
2360
2361 2016-12-08  Jeremy Jones  <jeremyj@apple.com>
2362
2363         Exit fullscreen on escape key down, not up.
2364         https://bugs.webkit.org/show_bug.cgi?id=165618
2365         rdar://problem/29581688
2366
2367         This problem was introduced by https://bugs.webkit.org/show_bug.cgi?id=165416
2368         The fix to only exit fullscreen on key down, not key up.
2369
2370         Reviewed by Jer Noble.
2371
2372         * page/EventHandler.cpp:
2373         (WebCore::EventHandler::keyEvent):
2374
2375 2016-12-08  Dave Hyatt  <hyatt@apple.com>
2376
2377         [CSS Parser] Unskip background parsing tests
2378         https://bugs.webkit.org/show_bug.cgi?id=165619
2379
2380         Reviewed by Zalan Bujtas.
2381
2382         Change background-position so that the origin being set is tracked
2383         on a per-x/y basis instead of as a single boolean. The single boolean
2384         caused lousy computed style dumping, since we would switch into verbose
2385         mode for both x and y, even if only one of them had a pair set for it.
2386
2387         * css/CSSComputedStyleDeclaration.cpp:
2388         (WebCore::createPositionListForLayer):
2389         * css/StyleBuilderConverter.h:
2390         (WebCore::StyleBuilderConverter::convertPositionComponent):
2391         * rendering/style/FillLayer.cpp:
2392         (WebCore::FillLayer::FillLayer):
2393         (WebCore::FillLayer::operator=):
2394         (WebCore::FillLayer::fillUnsetProperties):
2395         * rendering/style/FillLayer.h:
2396         (WebCore::FillLayer::isBackgroundXOriginSet):
2397         (WebCore::FillLayer::isBackgroundYOriginSet):
2398         (WebCore::FillLayer::setBackgroundXOrigin):
2399         (WebCore::FillLayer::setBackgroundYOrigin):
2400         (WebCore::FillLayer::clearXPosition):
2401         (WebCore::FillLayer::clearYPosition):
2402         (WebCore::FillLayer::isBackgroundOriginSet): Deleted.
2403
2404 2016-12-08  Jeremy Jones  <jeremyj@apple.com>
2405
2406         pointer lock should exit when a js alert is shown
2407         https://bugs.webkit.org/show_bug.cgi?id=165423
2408         rdar://problem/29430803
2409
2410         Reviewed by Jer Noble.
2411
2412         Test: pointer-lock/lock-lost-on-alert.html
2413
2414         * page/DOMWindow.cpp:
2415         (WebCore::DOMWindow::alert):
2416         (WebCore::DOMWindow::confirm):
2417         (WebCore::DOMWindow::prompt):
2418
2419 2016-12-07  Sam Weinig  <sam@webkit.org>
2420
2421         [WebIDL] WebGLContextAttributes should be a dictionary
2422         https://bugs.webkit.org/show_bug.cgi?id=165572
2423
2424         Reviewed by Dean Jackson.
2425
2426         * CMakeLists.txt:
2427         * WebCore.xcodeproj/project.pbxproj:
2428         Remove unused files.
2429
2430         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2431         (WebCore::JSHTMLCanvasElement::getContext):
2432         (WebCore::attributesFor3DContext): Deleted.
2433         Re-work getContext to use JSDOMConvert and use the WebGLContextAttributes dictionary.
2434
2435         * bindings/scripts/CodeGeneratorJS.pm:
2436         (NativeToJSValueDOMConvertNeedsState):
2437         (NativeToJSValueDOMConvertNeedsGlobalObject):
2438         Add missing inclusion of dictionaries.
2439
2440         * html/HTMLCanvasElement.cpp:
2441         (WebCore::maxActivePixelMemory):
2442         (WebCore::HTMLCanvasElement::getContext):
2443         (WebCore::HTMLCanvasElement::is2dType):
2444         (WebCore::HTMLCanvasElement::getContext2d):
2445         (WebCore::shouldEnableWebGL):
2446         (WebCore::HTMLCanvasElement::is3dType):
2447         (WebCore::HTMLCanvasElement::getContextWebGL):
2448         * html/HTMLCanvasElement.h:
2449         Refactor context creation of 2d and WebGL contexts into their own functions. Make the 
2450         WebGL one take a WebGLContextAttributes struct.
2451
2452         * html/HTMLCanvasElement.idl:
2453         No functionality change. Make IDL match the latest spec.
2454
2455         * html/canvas/CanvasContextAttributes.cpp: Removed.
2456         * html/canvas/CanvasContextAttributes.h: Removed.
2457         Remove unneeded base class.
2458
2459         * html/canvas/WebGLContextAttributes.cpp: Removed.
2460         * html/canvas/WebGLContextAttributes.h:
2461         Instead of a class, we can use a type alias of GraphicsContext3D::Attributes for
2462         WebGLContextAttributes.
2463
2464         * html/canvas/WebGLContextAttributes.idl:
2465         Convert to a dictionary.
2466
2467         * html/canvas/WebGL2RenderingContext.cpp:
2468         * html/canvas/WebGL2RenderingContext.h:
2469         * html/canvas/WebGLRenderingContextBase.cpp:
2470         (WebCore::WebGLRenderingContextBase::create):
2471         (WebCore::WebGLRenderingContextBase::WebGLRenderingContextBase):
2472         (WebCore::WebGLRenderingContextBase::clearIfComposited):
2473         (WebCore::WebGLRenderingContextBase::getContextAttributes):
2474         (WebCore::WebGLRenderingContextBase::applyStencilTest):
2475         * html/canvas/WebGLRenderingContextBase.h:
2476         Update to WebGLContextAttributes by value, since it is a simple struct now. Update getContextAttributes
2477         to return a std::optional<WebGLContextAttributes>.
2478
2479         * html/canvas/WebGLRenderingContextBase.idl:
2480         Make getContextAttributes return a nullable WebGLContextAttributes, as per spec.
2481         
2482         * platform/graphics/GraphicsContext3D.h:
2483         Sort attributes into categories, one that match WebGLContextAttributes, and the remainder.
2484
2485 2016-12-08  Zalan Bujtas  <zalan@apple.com>
2486
2487         Do not create multicolumn context for certain type of renderers.
2488         https://bugs.webkit.org/show_bug.cgi?id=135601
2489         <rdar://problem/27686300>
2490
2491         Reviewed by David Hyatt.
2492
2493         Certain type of renderers including forms should not initialize multicolumn context for
2494         their inner (shadow) content. It just does not makes sense and is inline with what other browsers do.
2495
2496         Test: fast/multicol/no-multicol-for-textareas.html
2497
2498         * rendering/RenderBlockFlow.cpp:
2499         (WebCore::RenderBlockFlow::willCreateColumns):
2500         (WebCore::RenderBlockFlow::requiresColumns):
2501         * rendering/RenderBlockFlow.h:
2502
2503 2016-12-08  Dave Hyatt  <hyatt@apple.com>
2504
2505         [CSS Parser] REGRESSION: Values of 0 should not be allowed for -webkit-aspect-ratio
2506         https://bugs.webkit.org/show_bug.cgi?id=165607
2507
2508         Reviewed by Simon Fraser.
2509
2510         Unskipped fast/css/aspect-ratio-parsing-tests.html.
2511
2512         * css/parser/CSSPropertyParser.cpp:
2513         (WebCore::consumeWebkitAspectRatio):
2514         Don't allow 0 as either the left or right value of the ratio.
2515
2516 2016-12-08  Antti Koivisto  <antti@apple.com>
2517
2518         ::after and ::before don't work on :host
2519         https://bugs.webkit.org/show_bug.cgi?id=164675
2520         <rdar://problem/29231874>
2521
2522         Reviewed by Andreas Kling.
2523
2524         We didn't allow combining :host with any other selectors. Pseudo elements should be allowed.
2525
2526         Test: fast/shadow-dom/shadow-host-with-before-after.html
2527
2528         * css/ElementRuleCollector.cpp:
2529         (WebCore::ElementRuleCollector::matchAuthorRules):
2530
2531             Allow pseudo element matching.
2532
2533         (WebCore::ElementRuleCollector::matchHostPseudoClassRules):
2534
2535             Use the normal collectMatchingRulesForList path instead of a direct call to SelectorChecker::matchHostPseudoClass.
2536             This path supports pseudo elements.
2537
2538             Pass the information that we are matching :host rules with m_isMatchingHostPseudoClass bit
2539             similarly to how this is done with slots.
2540
2541         (WebCore::ElementRuleCollector::ruleMatches):
2542         * css/ElementRuleCollector.h:
2543         * css/RuleSet.cpp:
2544
2545             Collect :host rules similarly to other rules.
2546
2547         (WebCore::RuleSet::addRule):
2548         * css/SelectorChecker.cpp:
2549
2550             Rename didMoveToShadowHost->mayMatchHostPseudoClass for clarity.
2551
2552         (WebCore::SelectorChecker::match):
2553
2554             Enable :host matching in the current context immediately if needed.
2555
2556         (WebCore::SelectorChecker::matchHostPseudoClass):
2557
2558             The check for illegal combinations with :host is now done in checkOne().
2559
2560         (WebCore::localContextForParent):
2561         (WebCore::SelectorChecker::checkOne):
2562
2563             In context where :host matches nothing else can match, except pseudo elements.
2564
2565         * css/SelectorChecker.h:
2566
2567 2016-12-08  Alex Christensen  <achristensen@webkit.org>
2568
2569         Fix CMake build.
2570
2571         * PlatformMac.cmake:
2572         Add PerformanceLoggingCocoa.mm after r209181.
2573
2574 2016-12-08  Per Arne Vollan  <pvollan@apple.com>
2575
2576         [Win] Some versions of Cygwin Perl generate incorrect C++ code.
2577         https://bugs.webkit.org/show_bug.cgi?id=165524
2578         rdar://problem/29508043
2579
2580         Reviewed by Daniel Bates.
2581
2582         Perl strings with variables seems to be handled differently, depending on which version of
2583         Cygwin Perl you are running. To make sure they are handled identically, specify variables
2584         in strings as "${var}" instead of "$var".
2585
2586         * bindings/scripts/CodeGeneratorJS.pm:
2587         (GenerateHeader):
2588         (GenerateImplementation):
2589
2590 2016-12-08  Alex Christensen  <achristensen@webkit.org>
2591
2592         Fix EFL build after r209526
2593         https://bugs.webkit.org/show_bug.cgi?id=165594
2594
2595         * css/parser/CSSPropertyParserHelpers.cpp:
2596         (WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
2597         nullptr is being automatically converted to false everywhere but EFL.
2598         It should be false.  This function returns a bool.
2599
2600 2016-12-07  Dave Hyatt  <hyatt@apple.com>
2601
2602         REGRESSION: font shorthand parsing is broken
2603         https://bugs.webkit.org/show_bug.cgi?id=165594
2604
2605         Reviewed by Zalan Bujtas.
2606
2607         Unskipping fast/css/font-calculated-value.html.
2608
2609         * css/parser/CSSPropertyParser.cpp:
2610         (WebCore::consumeFontWeight):
2611         The new parser did not support calc() in the font-weight property.
2612         In order to support a positive integer, add new functions to consume
2613         and handle positive integers without making a CSSPrimitiveValue out of
2614         the number. These correspond to consumeNumberRaw but are limited to positive
2615         integers.
2616
2617         (WebCore::CSSPropertyParser::consumeFont):
2618         The implicit bool was incorrectly set to true when properties were
2619         defined because releaseNonNull() cleared the variables being null
2620         checked. Add separate booleans to avoid this.
2621
2622         * css/parser/CSSPropertyParserHelpers.cpp:
2623         (WebCore::CSSPropertyParserHelpers::CalcParser::consumePositiveIntegerRaw):
2624         (WebCore::CSSPropertyParserHelpers::consumePositiveIntegerRaw):
2625         * css/parser/CSSPropertyParserHelpers.h:
2626         Add the new helpers that consume positive integers without creating
2627         CSSPrimitiveValues out of them.
2628
2629 2016-12-07  Jeremy Jones  <jeremyj@apple.com>
2630
2631         Exit pointer lock when page goes into page cache.
2632         https://bugs.webkit.org/show_bug.cgi?id=165425
2633         rdar://problem/29430834
2634
2635         Reviewed by Jer Noble.
2636
2637         Test: pointer-lock/lock-lost-on-navigation.html
2638
2639         Cancel pointer lock when page goes into page cache and add methods to Internals
2640         so it can be tested.
2641
2642         * dom/Document.cpp:
2643         (WebCore::Document::setPageCacheState):
2644         * page/PointerLockController.h:
2645         * testing/Internals.cpp:
2646         (WebCore::Internals::pageHasPendingPointerLock):
2647         (WebCore::Internals::pageHasPointerLock):
2648         * testing/Internals.h:
2649         * testing/Internals.idl:
2650
2651 2016-12-07  Antoine Quint  <graouts@apple.com>
2652
2653         [Modern Media Controls] Tracks panel does not display in the right location in fullscreen and cannot be dismissed
2654         https://bugs.webkit.org/show_bug.cgi?id=165575
2655
2656         Reviewed by Dean Jackson.
2657
2658         We position the tracks panel programmatically based on the current bounds of the fullscreen button in fullscreen.
2659         This allows for the tracks panel to be shown in the right spot even after dragging the controls bar. We also use
2660         the fullscreen media controls as the target for tracking "mousedown" events when the tracks panel is shown in a
2661         fullscreen presentation.
2662
2663         Tests: media/modern-media-controls/tracks-support/tracks-support-show-panel-after-dragging-controls.html
2664                media/modern-media-controls/tracks-support/tracks-support-show-panel-fullscreen.html
2665
2666         * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.css:
2667         (.media-controls.mac.fullscreen .scrubber):
2668         (.media-controls.mac.fullscreen .tracks-panel): Deleted.
2669         * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
2670         (MacOSFullscreenMediaControls.prototype.showTracksPanel):
2671         * Modules/modern-media-controls/controls/tracks-panel.js:
2672         (TracksPanel.prototype.presentInParent):
2673         (TracksPanel.prototype.hide):
2674         (TracksPanel.prototype.get bottomY):
2675         (TracksPanel.prototype.set bottomY):
2676         (TracksPanel.prototype.commitProperty):
2677         (TracksPanel.prototype._mousedownTarget):
2678
2679 2016-12-07  Antoine Quint  <graouts@apple.com>
2680
2681         [Modern Media Controls] Use a small picture-in-picture button in fullscreen
2682         https://bugs.webkit.org/show_bug.cgi?id=165587
2683
2684         Reviewed by Dean Jackson.
2685
2686         Use a newer, smaller asset for picture-in-picture in fullscreen.
2687
2688         * Modules/modern-media-controls/controls/icon-service.js:
2689         * Modules/modern-media-controls/images/macOS/pip-in-fullscreen@1x.png: Added.
2690         * Modules/modern-media-controls/images/macOS/pip-in-fullscreen@2x.png: Added.
2691
2692 2016-12-07  Dean Jackson  <dino@apple.com>
2693
2694         Remove runtime toggle for pointer-lock
2695         https://bugs.webkit.org/show_bug.cgi?id=165577
2696         <rdar://problems/29566996>
2697
2698         Reviewed by Jon Lee.
2699
2700         Remove any runtime calls to check if pointer-lock is enabled. It's
2701         either compiled in or out.
2702
2703         Covered by existing tests.
2704
2705         * bindings/generic/RuntimeEnabledFeatures.h:
2706         (WebCore::RuntimeEnabledFeatures::setPointerLockEnabled): Deleted.
2707         (WebCore::RuntimeEnabledFeatures::pointerLockEnabled): Deleted.
2708         * dom/Document.idl:
2709         * dom/Element.idl:
2710         * page/Page.h:
2711         * page/PointerLockController.cpp:
2712         (WebCore::PointerLockController::requestPointerLock):
2713         (WebCore::PointerLockController::requestPointerUnlock):
2714         (WebCore::PointerLockController::requestPointerUnlockAndForceCursorVisible):
2715
2716 2016-12-07  John Wilander  <wilander@apple.com>
2717
2718         Allow commas in Accept, Accept-Language, and Content-Language request headers for simple CORS
2719         https://bugs.webkit.org/show_bug.cgi?id=165566
2720         <rdar://problem/29560983>
2721
2722         Reviewed by Alex Christensen.
2723
2724         Updated the existing tests.
2725
2726         * platform/network/HTTPParsers.cpp:
2727         (WebCore::isValidAcceptHeaderValue):
2728             Now also accepts ','.
2729         (WebCore::isValidLanguageHeaderValue):
2730             Ditto.
2731
2732 2016-12-07  Dave Hyatt  <hyatt@apple.com>
2733
2734         [CSS Parser] Stop skipping tests in the css3 LayoutTests subdirectory
2735         https://bugs.webkit.org/show_bug.cgi?id=165574
2736
2737         Reviewed by Dean Jackson.
2738
2739         * css/CSSGroupingRule.cpp:
2740         (WebCore::CSSGroupingRule::insertRule):
2741         The old parser didn't support the creation of @namespace rules in the
2742         CSS OM, but the new parser does. We need to ensure that just like for
2743         @import rules, that the insertion of a @namespace rule inside a
2744         @supports rule is not allowed. This test passed in the old parser because
2745         the rule just didn't get created, but in the new parser, we need to
2746         add a check along with the @import rule check to ensure it isn't allowed.
2747
2748 2016-12-07  Antoine Quint  <graouts@apple.com>
2749
2750         [Modern Media Controls] Remove aspect ratio button
2751         https://bugs.webkit.org/show_bug.cgi?id=165571
2752
2753         Reviewed by Dean Jackson.
2754
2755         Since we do not have a way to toggle letterboxing on an HTMLMediaElement, we remove the
2756         corresponding button in the media controls.
2757
2758         * Modules/modern-media-controls/controls/aspect-ratio-button.js: Removed.
2759         * Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
2760         * Modules/modern-media-controls/js-files:
2761
2762 2016-12-07  Jeremy Jones  <jeremyj@apple.com>
2763
2764         One esc to exit fullscreen and pointer lock
2765         https://bugs.webkit.org/show_bug.cgi?id=165416
2766         rdar://problem/29430711
2767
2768         Reviewed by Jer Noble.
2769
2770         Test: pointer-lock/lock-lost-on-esc-in-fullscreen.html
2771
2772         When handling escape, also exit fullscreen on escape.
2773         This also means that escape can exit fullscreen in TestRunner.
2774
2775         * page/EventHandler.cpp:
2776         (WebCore::EventHandler::keyEvent):
2777
2778 2016-12-07  Yusuke Suzuki  <utatane.tea@gmail.com>
2779
2780         [JSC] Drop translate phase in module loader
2781         https://bugs.webkit.org/show_bug.cgi?id=164861
2782
2783         Reviewed by Saam Barati.
2784
2785         * bindings/js/JSDOMWindowBase.cpp:
2786         * bindings/js/JSWorkerGlobalScopeBase.cpp:
2787
2788 2016-12-07  Keith Rollin  <krollin@apple.com>
2789
2790         Network event record/replay
2791         https://bugs.webkit.org/show_bug.cgi?id=164527
2792         <rdar://problem/29168157>
2793
2794         Reviewed by Alex Christensen.
2795
2796         Export parseURLEncodedForm.
2797
2798         No new tests -- no functionality added, changed, or removed.
2799
2800         * platform/URLParser.h:
2801
2802 2016-12-07  Dave Hyatt  <hyatt@apple.com>
2803
2804         [CSS Parser] Consolidate string/ident/url serialization functions
2805         https://bugs.webkit.org/show_bug.cgi?id=165552
2806
2807         Reviewed by Zalan Bujtas.
2808
2809         Right now CSSParser has string, ident and url serialization functions
2810         called quoteCSStringIfNeeded (which actually serializes both strings and
2811         identifiers), as well as quoteCSSURLIfNeeded.
2812
2813         CSSMarkup already has serialization functions that exist outside of the
2814         CSSParser and that handle serialization of strings, idents and URLs. This
2815         patch eliminates the CSSParser functions and consolidates all of the
2816         serialization to use CSSMarkup's functions.
2817
2818         Note that we are not spec-compliant at all here, and so I had to amend
2819         the functions to support our non-spec-compliant serialization. The goal
2820         of this patch is consolidation and not to fix our broken serialization.
2821
2822         Notable changes include parameterizing string serialization so that
2823         both single and double quotes are supported, since in the existing code
2824         we're sometimes spec-compliant (CSSSelectors) and sometimes not
2825         (CSSPrimitiveValue).
2826
2827         We also overload CSS_STRING primitive value type and have it act as both
2828         a string and a custom identifier. This is lame, since the parser should
2829         have made two different types of objects instead, but since our parser
2830         doesn't do that yet, I added a serializeAsStringOrCustomIdent that
2831         preserves our old behavior of "quote the string only if needed." In this
2832         case what that really meant was "Try to guess that we were originally a
2833         custom ident and leave off quotes if so." This function will go away
2834         once we properly create CSSStringValues and CSSCustomIdentValues instead
2835         of turning the latter into strings.
2836
2837         * css/CSSBasicShapes.cpp:
2838         (WebCore::buildPathString):
2839         * css/CSSImageValue.cpp:
2840         (WebCore::CSSImageValue::customCSSText):
2841         * css/CSSMarkup.cpp:
2842         (WebCore::isCSSTokenizerURL):
2843         (WebCore::serializeString):
2844         (WebCore::serializeURL):
2845         (WebCore::serializeAsStringOrCustomIdent):
2846         (WebCore::serializeURI): Deleted.
2847         * css/CSSMarkup.h:
2848         * css/CSSPrimitiveValue.cpp:
2849         (WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
2850         * css/CSSSelector.cpp:
2851         (WebCore::CSSSelector::selectorText):
2852         * css/parser/CSSParser.cpp:
2853         (WebCore::isCSSTokenizerIdent): Deleted.
2854         (WebCore::isCSSTokenizerURL): Deleted.
2855         (WebCore::quoteCSSStringInternal): Deleted.
2856         (WebCore::quoteCSSString): Deleted.
2857         (WebCore::quoteCSSStringIfNeeded): Deleted.
2858         (WebCore::quoteCSSURLIfNeeded): Deleted.
2859         * css/parser/CSSParser.h:
2860         * html/HTMLElement.cpp:
2861         (WebCore::HTMLElement::mapLanguageAttributeToLocale):
2862
2863 2016-12-07  Dean Jackson  <dino@apple.com>
2864
2865         Expose internal API to detect media documents
2866         https://bugs.webkit.org/show_bug.cgi?id=165559
2867         <rdar://problems/29564054>
2868
2869         Reviewed by Antoine Quint.
2870
2871         Expose via MediaControlsHost whether or not we're in
2872         a MediaDocument.
2873
2874         Since MediaControlsHost is only exposed to our
2875         internal controls, it's not possible to test this
2876         directly. However, a subsequent test for media documents
2877         with audio-only content will cover this change.
2878
2879         * Modules/mediacontrols/MediaControlsHost.cpp: Add isInMediaDocument and put const on
2880         various methods that should have it.
2881         (WebCore::MediaControlsHost::captionDisplayMode):
2882         (WebCore::MediaControlsHost::supportsFullscreen):
2883         (WebCore::MediaControlsHost::isVideoLayerInline):
2884         (WebCore::MediaControlsHost::isInMediaDocument):
2885         * Modules/mediacontrols/MediaControlsHost.h:
2886         * Modules/mediacontrols/MediaControlsHost.idl: Add isInMediaDocument.
2887
2888 2016-12-07  Zalan Bujtas  <zalan@apple.com>
2889
2890         ASSERTION FAILED: count >= 1 in WebCore::RenderMultiColumnSet::columnCount
2891         https://bugs.webkit.org/show_bug.cgi?id=136365
2892         <rdar://problem/27686727>
2893
2894         Reviewed by Simon Fraser.
2895
2896         Margin value overflow ends up confusing the column count computing logic.
2897
2898         Test: fast/multicol/assert-on-column-count-when-zoomed-in.html
2899
2900         * css/StyleResolver.cpp:
2901         (WebCore::addIntrinsicMargins):
2902
2903 2016-12-07  Ryosuke Niwa  <rniwa@webkit.org>
2904
2905         document.caretRangeFromPoint doesn't retarget the resultant Range correctly.
2906         https://bugs.webkit.org/show_bug.cgi?id=165146
2907
2908         Reviewed by Sam Weinig.
2909
2910         The bug was caused by caretRangeFromPoint not retargeting the resultant Range correctly.
2911         Namely, it's possible for RenderObject::positionForPoint to move across shadow boundary
2912         even if node was identically equal to ancestorInThisScope(node).
2913
2914         Fixed the bug by directly retargeting the range's container node and its offset as done
2915         for elementFromPoint in r206795.
2916
2917         Test: fast/shadow-dom/caret-range-from-point-in-shadow-tree.html
2918
2919         * dom/Document.cpp:
2920         (WebCore::Document::caretRangeFromPoint):
2921
2922 2016-12-07  Antoine Quint  <graouts@apple.com>
2923
2924         [Modern Media Controls] Entering fullscreen and returning to inline shows fullscreen controls
2925         https://bugs.webkit.org/show_bug.cgi?id=165536
2926
2927         Reviewed by Tim Horton.
2928
2929         We regressed when we implemented the fix for webkit.org/b/165494 and we started to rely solely
2930         on the "webkitpresentationmodechanged" event to identify presention mode changes. As it turns out,
2931         when the "webkitpresentationmodechanged" event is dispatched when exiting fullscreen and returning
2932         to the inline presentation mode, querying the "webkitPresentationMode" property says "inline" while
2933         "webkitDisplayingFullscreen" still returns true (raised as webkit.org/b/165538).
2934         
2935         We now use the "webkitPresentationMode" property when that property is supported and we're using the
2936         "webkitpresentationmodechanged" event, and we use the "webkitDisplayingFullscreen" property otherwise.
2937
2938         Test: media/modern-media-controls/media-controller/media-controller-inline-to-fullscreen-to-inline.html
2939
2940         * Modules/modern-media-controls/media/media-controller.js:
2941         (MediaController.prototype.get layoutTraits):
2942
2943 2016-12-07  Wenson Hsieh  <wenson_hsieh@apple.com>
2944
2945         Scroll position jumps to the origin when scrolling without momentum at the end of a scroll snapping container
2946         https://bugs.webkit.org/show_bug.cgi?id=165474
2947         <rdar://problem/29534305>
2948
2949         Reviewed by Simon Fraser.
2950
2951         When initializing an AppKit _NSScrollingMomentumCalculator, if the initial and target positions are the same and
2952         the initial velocity is (0, 0), the momentum calculator will output (0, 0) as the animated scroll position when
2953         animating. This causes the scroll position to jump to the top left in some cases when scrolling in scroll snap
2954         containers. To fix this, we teach the ScrollingMomentumCalculatorMac to return an animation duration of 0 and
2955         an animated scroll position equal to the final scroll position when this is the case.
2956
2957         Test: tiled-drawing/scrolling/scroll-snap/scrolling-jumps-to-top.html
2958
2959         * page/scrolling/mac/ScrollingMomentumCalculatorMac.h:
2960         * page/scrolling/mac/ScrollingMomentumCalculatorMac.mm:
2961         (WebCore::ScrollingMomentumCalculatorMac::ScrollingMomentumCalculatorMac):
2962         (WebCore::ScrollingMomentumCalculatorMac::scrollOffsetAfterElapsedTime):
2963         (WebCore::ScrollingMomentumCalculatorMac::animationDuration):
2964
2965 2016-12-07  Nan Wang  <n_wang@apple.com>
2966
2967         AX: menu type toolbar should be mapped correctly on Mac
2968         https://bugs.webkit.org/show_bug.cgi?id=165537
2969
2970         Reviewed by Chris Fleizach.
2971
2972         The menu tag with a toolbar type should have the corresponding role.
2973
2974         Test: accessibility/mac/menu-type-toolbar.html
2975
2976         * accessibility/AccessibilityRenderObject.cpp:
2977         (WebCore::AccessibilityRenderObject::determineAccessibilityRole):
2978
2979 2016-12-07  Wenson Hsieh  <wenson_hsieh@apple.com>
2980
2981         Add a new project for recording and playing back editing commands in editable web content
2982         https://bugs.webkit.org/show_bug.cgi?id=165114
2983         <rdar://problem/29408135>
2984
2985         Reviewed by Beth Dakin.
2986
2987         Adds new scripts used to record and play back editing, as well as a new Xcode Copy files phase that pushes these
2988         scripts to the internal system directory when installing. See the Tools ChangeLog and individual comments below
2989         for more details. Covered by 3 new unit tests in the EditingHistory project.
2990
2991         * InternalScripts/DumpEditingHistory.js: Added.
2992         (beginProcessingTopLevelUpdate):
2993         (endProcessingTopLevelUpdate):
2994         (appendDOMUpdatesFromRecords):
2995         (appendSelectionUpdateIfNecessary):
2996
2997         Adds new entries into the top-level list of DOM updates captured when editing. Respectively, these are input
2998         events and selection changes.
2999
3000         (EditingHistory.getEditingHistoryAsJSONString):
3001         * InternalScripts/EditingHistoryUtil.js: Added.
3002         (prototype._scramble):
3003         (prototype.applyToText):
3004         (prototype.applyToFilename):
3005         (prototype._scrambedNumberIndexForCode):
3006         (prototype._scrambedLowercaseIndexForCode):
3007         (prototype._scrambedUppercaseIndexForCode):
3008
3009         Naive implementation of an obfuscator. Currently, this only affects alphanumeric characters. Obfuscation is off
3010         by default, but can be toggled on in JavaScript.
3011
3012         (elementFromMarkdown):
3013         (GlobalNodeMap):
3014         (GlobalNodeMap.prototype.nodesForGUIDs):
3015         (GlobalNodeMap.prototype.guidsForTNodes):
3016         (GlobalNodeMap.prototype.nodeForGUID):
3017         (GlobalNodeMap.prototype.guidForNode):
3018         (GlobalNodeMap.prototype.hasGUIDForNode):
3019         (GlobalNodeMap.prototype.nodes):
3020         (GlobalNodeMap.prototype.toObject):
3021         (GlobalNodeMap.fromObject):
3022         (GlobalNodeMap.dataForNode):
3023         (GlobalNodeMap.elementFromTagName):
3024         (GlobalNodeMap.nodeAttributesToObject):
3025         (GlobalNodeMap.prototype.descriptionHTMLForGUID):
3026         (GlobalNodeMap.prototype.descriptionHTMLForNode):
3027
3028         The GlobalNodeMap keeps track of every node that has appeared in the DOM, assigning each node a globally unique
3029         identifier (GUID). This GUID is used when reconstructing the DOM, as well as unapplying or applying editing.
3030
3031         (SelectionState):
3032         (SelectionState.prototype.isEqual):
3033         (SelectionState.prototype.applyToSelection):
3034         (SelectionState.fromSelection):
3035         (SelectionState.prototype.toObject):
3036         (SelectionState.fromObject):
3037
3038         Represents a snapshot of the Selection state (determined by getSelection()).
3039
3040         (DOMUpdate):
3041         (DOMUpdate.prototype.apply):
3042         (DOMUpdate.prototype.unapply):
3043         (DOMUpdate.prototype.targetNode):
3044         (DOMUpdate.prototype.detailsElement):
3045         (DOMUpdate.ofType):
3046         (DOMUpdate.fromRecords):
3047
3048         A DOMUpdate is an abstract object representing a change in the DOM that may be applied and unapplied. These are
3049         also serializable as hashes, which may then be converted to JSON when generating editing history data.
3050
3051         (ChildListUpdate):
3052         (ChildListUpdate.prototype.apply):
3053         (ChildListUpdate.prototype.unapply):
3054         (ChildListUpdate.prototype._nextSibling):
3055         (ChildListUpdate.prototype._removedNodes):
3056         (ChildListUpdate.prototype._addedNodes):
3057         (ChildListUpdate.prototype.toObject):
3058         (ChildListUpdate.prototype.detailsElement):
3059         (ChildListUpdate.fromObject):
3060
3061         These three update types correspond to the three types of DOM mutations. These may appear as top-level updates
3062         if they are not captured during an input event, but for the majority of user-input-driven changes, they will be
3063         children of an input event.
3064
3065         (CharacterDataUpdate):
3066         (CharacterDataUpdate.prototype.apply):
3067         (CharacterDataUpdate.prototype.unapply):
3068         (CharacterDataUpdate.prototype.detailsElement):
3069         (CharacterDataUpdate.prototype.toObject):
3070         (CharacterDataUpdate.fromObject):
3071         (AttributeUpdate):
3072         (AttributeUpdate.prototype.apply):
3073         (AttributeUpdate.prototype.unapply):
3074         (AttributeUpdate.prototype.detailsElement):
3075         (AttributeUpdate.prototype.toObject):
3076         (AttributeUpdate.fromObject):
3077         (SelectionUpdate):
3078         (SelectionUpdate.prototype.apply):
3079         (SelectionUpdate.prototype.unapply):
3080         (SelectionUpdate.prototype.toObject):
3081         (SelectionUpdate.fromObject):
3082         (SelectionUpdate.prototype._rangeDescriptionHTML):
3083         (SelectionUpdate.prototype._anchorDescriptionHTML):
3084         (SelectionUpdate.prototype._focusDescriptionHTML):
3085         (SelectionUpdate.prototype.detailsElement):
3086
3087         Represents a change in the Selection. While no changes to the DOM structure occur as a result of a
3088         SelectionUpdate, the information contained in these updates is used to determine where the selection should be
3089         when rewinding or playing back the editing history.
3090
3091         (InputEventUpdate):
3092         (InputEventUpdate.prototype._obfuscatedData):
3093         (InputEventUpdate.prototype.apply):
3094         (InputEventUpdate.prototype.unapply):
3095         (InputEventUpdate.prototype.toObject):
3096         (InputEventUpdate.fromObject):
3097         (InputEventUpdate.prototype.detailsElement):
3098
3099         Represents an update due to user input, which consists of some number of child DOM mutation updates.
3100
3101         * WebCore.xcodeproj/project.pbxproj:
3102
3103 2016-12-07  Jer Noble  <jer.noble@apple.com>
3104
3105         ASSERT crash while running media-source/mediasource-activesourcebuffers.html under Stress GC bot.
3106         https://bugs.webkit.org/show_bug.cgi?id=165514
3107
3108         Reviewed by Eric Carlson.
3109
3110         If a track associated with MSE is disabled after a SourceBuffer begins parsing a queued
3111         append operation, SourceBuffer can get into a state where it asks SourceBufferPrivateAVFObjC
3112         if it is ready to accept data for that disabled track. This causes an ASSERT_NOT_REACHED in
3113         isReadyForMoreData().
3114
3115         However, this seems to be a valid condition; we can safely just return "false" from
3116         isReadyForMoreSamples() (and also bail from notifyClientWhenReadyForMoreSamples()) when asked
3117         about a disabled track.
3118
3119         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
3120         (WebCore::SourceBufferPrivateAVFObjC::isReadyForMoreSamples):
3121         (WebCore::SourceBufferPrivateAVFObjC::notifyClientWhenReadyForMoreSamples):
3122
3123 2016-12-07  Dave Hyatt  <hyatt@apple.com>
3124
3125         [CSS Parser] Eliminate the Scope class and fold it into CSSTokenizer
3126         https://bugs.webkit.org/show_bug.cgi?id=165532
3127
3128         Reviewed by Dean Jackson.
3129
3130         The Scope class, nested inside CSSTokenizer, is both poorly named and serves
3131         no purpose. It's especially weird that it was the entry point into tokenization
3132         instead of CSSTokenizer.
3133
3134         Eliminate the class, fold its members and functions into CSSTokenizer, and have
3135         callers just make a CSSTokenizer instead.
3136
3137         * css/parser/CSSParser.cpp:
3138         (WebCore::CSSParser::parseSupportsCondition):
3139         (WebCore::CSSParser::parseSelector):
3140         * css/parser/CSSParserImpl.cpp:
3141         (WebCore::CSSParserImpl::parseValue):
3142         (WebCore::CSSParserImpl::parseCustomPropertyValue):
3143         (WebCore::CSSParserImpl::parseInlineStyleDeclaration):
3144         (WebCore::CSSParserImpl::parseDeclarationList):
3145         (WebCore::CSSParserImpl::parseRule):
3146         (WebCore::CSSParserImpl::parseStyleSheet):
3147         (WebCore::CSSParserImpl::parseKeyframeKeyList):
3148         (WebCore::CSSParserImpl::parseDeclarationListForInspector):
3149         (WebCore::CSSParserImpl::parseStyleSheetForInspector):
3150         * css/parser/CSSTokenizer.cpp:
3151         (WebCore::CSSTokenizer::CSSTokenizer):
3152         (WebCore::CSSTokenizer::tokenRange):
3153         (WebCore::CSSTokenizer::tokenCount):
3154         (WebCore::CSSTokenizer::registerString):
3155         (WebCore::CSSTokenizer::Scope::Scope): Deleted.
3156         (WebCore::CSSTokenizer::Scope::tokenRange): Deleted.
3157         (WebCore::CSSTokenizer::Scope::tokenCount): Deleted.
3158         * css/parser/CSSTokenizer.h:
3159         (WebCore::CSSTokenizer::Scope::storeString): Deleted.
3160         * css/parser/CSSTokenizerInputStream.cpp:
3161         (WebCore::CSSTokenizerInputStream::CSSTokenizerInputStream):
3162         * css/parser/CSSTokenizerInputStream.h:
3163         * css/parser/MediaQueryParser.cpp:
3164         (WebCore::MediaQueryParser::parseMediaQuerySet):
3165         * css/parser/SizesAttributeParser.cpp:
3166         (WebCore::SizesAttributeParser::SizesAttributeParser):
3167
3168 2016-12-07  Joseph Pecoraro  <pecoraro@apple.com>
3169
3170         Web Inspector: Remove unused and mostly untested Page domain commands and events
3171         https://bugs.webkit.org/show_bug.cgi?id=165507
3172
3173         Reviewed by Brian Burg.
3174
3175         Remove any code associated with the commands/events being removed.
3176
3177         * inspector/DOMPatchSupport.cpp:
3178         * inspector/DOMPatchSupport.h:
3179         * inspector/InspectorClient.h:
3180         (WebCore::InspectorClient::handleJavaScriptDialog): Deleted.
3181         * inspector/InspectorInstrumentation.cpp:
3182         (WebCore::InspectorInstrumentation::scriptsEnabledImpl): Deleted.
3183         (WebCore::InspectorInstrumentation::willRunJavaScriptDialogImpl): Deleted.
3184         (WebCore::InspectorInstrumentation::didRunJavaScriptDialogImpl): Deleted.
3185         * inspector/InspectorInstrumentation.h:
3186         (WebCore::InspectorInstrumentation::scriptsEnabled): Deleted.
3187         (WebCore::InspectorInstrumentation::willRunJavaScriptDialog): Deleted.
3188         (WebCore::InspectorInstrumentation::didRunJavaScriptDialog): Deleted.
3189         * inspector/InspectorPageAgent.cpp:
3190         (WebCore::InspectorPageAgent::disable):
3191         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
3192         (WebCore::InspectorPageAgent::didPaint):
3193         (WebCore::InspectorPageAgent::buildObjectForFrame):
3194         (WebCore::InspectorPageAgent::archive):
3195         (WebCore::createXHRTextDecoder): Deleted.
3196         (WebCore::InspectorPageAgent::getScriptExecutionStatus): Deleted.
3197         (WebCore::InspectorPageAgent::setScriptExecutionDisabled): Deleted.
3198         (WebCore::InspectorPageAgent::willRunJavaScriptDialog): Deleted.
3199         (WebCore::InspectorPageAgent::didRunJavaScriptDialog): Deleted.
3200         (WebCore::InspectorPageAgent::scriptsEnabled): Deleted.
3201         (WebCore::InspectorPageAgent::handleJavaScriptDialog): Deleted.
3202         * inspector/InspectorPageAgent.h:
3203         * page/Chrome.cpp:
3204         (WebCore::Chrome::runBeforeUnloadConfirmPanel):
3205         (WebCore::Chrome::runJavaScriptAlert):
3206         (WebCore::Chrome::runJavaScriptConfirm):
3207         (WebCore::Chrome::runJavaScriptPrompt):
3208         * page/Settings.cpp:
3209         (WebCore::Settings::setScriptEnabled):
3210
3211 2016-12-07  Jer Noble  <jer.noble@apple.com>
3212
3213         [pointer-lock] Cursor should become visible when exiting pointer-lock via ESC key.
3214         https://bugs.webkit.org/show_bug.cgi?id=165377
3215
3216         Reviewed by Eric Carlson.
3217
3218         Follow up to previous patch; clear the m_forceCursorVisibleUponUnlock flag upon losing
3219         pointer lock, so that subsequent unlocks don't erroneously cause the cursor to become
3220         visible. 
3221
3222         * page/PointerLockController.cpp:
3223         (WebCore::PointerLockController::didLosePointerLock):
3224
3225 2016-12-06  Geoffrey Garen  <ggaren@apple.com>
3226
3227         performance.now() should truncate to 100us
3228         https://bugs.webkit.org/show_bug.cgi?id=165503
3229         <rdar://problem/29544531>
3230
3231         Reviewed by Mark Lam.
3232
3233         * page/Performance.cpp:
3234         (WebCore::Performance::reduceTimeResolution):
3235
3236 2016-12-07  Dave Hyatt  <hyatt@apple.com>
3237
3238         [CSS Parser] Turn back on a bunch of layout tests
3239         https://bugs.webkit.org/show_bug.cgi?id=165529
3240
3241         Reviewed by Zalan Bujtas.
3242
3243         Fixes fast/css/transform-origin-parsing.html.
3244
3245         * css/parser/CSSPropertyParser.cpp:
3246         (WebCore::CSSPropertyParser::consumeTransformOrigin):
3247         The implicit check was relying on a null check of the z value, but
3248         we called releaseNonNull on it already. This meant all z properties were
3249         marked as implicit incorrectly. Fix by storing whether or not we had a z
3250         value in a local variable.
3251
3252 2016-12-07  Andreas Kling  <akling@apple.com>
3253
3254         [iOS] Remove bitrotted FrameLoader attempt to limit page caching under memory pressure.
3255         <https://webkit.org/b/165527>
3256
3257         Reviewed by Antti Koivisto.
3258
3259         This code no longer does anything, as the page cache is hard capped
3260         at 0 entries while under memory pressure.
3261
3262         * loader/FrameLoader.cpp:
3263         (WebCore::FrameLoader::commitProvisionalLoad):
3264
3265 2016-12-06  Antoine Quint  <graouts@apple.com>
3266
3267         [Modern Media Controls] Use tap and pinch gestures on iOS
3268         https://bugs.webkit.org/show_bug.cgi?id=165518
3269
3270         Reviewed by Dean Jackson.
3271
3272         We now use touch events to identify taps and pinches on media controls to respond immediately
3273         to user interaction on buttons and enter fullscreen when pinching out.
3274
3275         * Modules/modern-media-controls/controls/button.css:
3276         (button):
3277         * Modules/modern-media-controls/controls/button.js:
3278         (Button):
3279         (Button.prototype.handleEvent):
3280         (Button.prototype.gestureRecognizerStateDidChange):
3281         (Button.prototype._notifyDelegateOfActivation):
3282         (Button.prototype._handleUIEvent): Deleted.
3283         * Modules/modern-media-controls/controls/controls-bar.js:
3284         (ControlsBar.prototype.set fadesWhileIdle):
3285         (ControlsBar.prototype.gestureRecognizerStateDidChange):
3286         * Modules/modern-media-controls/controls/icon-button.js:
3287         (IconButton.prototype._updateImage):
3288         (IconButton):
3289         * Modules/modern-media-controls/controls/ios-inline-media-controls.js:
3290         (IOSInlineMediaControls.prototype.gestureRecognizerStateDidChange):
3291         * Modules/modern-media-controls/gesture-recognizers/gesture-recognizer.js: Added.
3292         (GestureRecognizer):
3293         (GestureRecognizer.prototype.get state):
3294         (GestureRecognizer.prototype.set state):
3295         (GestureRecognizer.prototype.get target):
3296         (GestureRecognizer.prototype.set target):
3297         (GestureRecognizer.prototype.get numberOfTouches):
3298         (GestureRecognizer.prototype.get enabled):
3299         (GestureRecognizer.prototype.set enabled):
3300         (GestureRecognizer.prototype.reset):
3301         (GestureRecognizer.prototype.locationInElement):
3302         (GestureRecognizer.prototype.locationInClient):
3303         (GestureRecognizer.prototype.locationOfTouchInElement):
3304         (GestureRecognizer.prototype.touchesBegan):
3305         (GestureRecognizer.prototype.touchesMoved):
3306         (GestureRecognizer.prototype.touchesEnded):
3307         (GestureRecognizer.prototype.touchesCancelled):
3308         (GestureRecognizer.prototype.gestureBegan):
3309         (GestureRecognizer.prototype.gestureChanged):
3310         (GestureRecognizer.prototype.gestureEnded):
3311         (GestureRecognizer.prototype.enterPossibleState):
3312         (GestureRecognizer.prototype.enterBeganState):
3313         (GestureRecognizer.prototype.enterEndedState):
3314         (GestureRecognizer.prototype.enterCancelledState):
3315         (GestureRecognizer.prototype.enterFailedState):
3316         (GestureRecognizer.prototype.enterChangedState):
3317         (GestureRecognizer.prototype.enterRecognizedState):
3318         (GestureRecognizer.prototype.handleEvent):
3319         (GestureRecognizer.prototype._initRecognizer):
3320         (GestureRecognizer.prototype._updateBaseListeners):
3321         (GestureRecognizer.prototype._removeTrackingListeners):
3322         (GestureRecognizer.prototype._updateTargetTouches):
3323         (GestureRecognizer.prototype._updateKeyboardModifiers):
3324         * Modules/modern-media-controls/gesture-recognizers/pinch.js: Added.
3325         (PinchGestureRecognizer):
3326         (PinchGestureRecognizer.prototype.get velocity):
3327         (PinchGestureRecognizer.prototype.touchesBegan):
3328         (PinchGestureRecognizer.prototype.touchesMoved):
3329         (PinchGestureRecognizer.prototype.touchesEnded):
3330         (PinchGestureRecognizer.prototype.gestureBegan):
3331         (PinchGestureRecognizer.prototype.gestureChanged):
3332         (PinchGestureRecognizer.prototype.gestureEnded):
3333         (PinchGestureRecognizer.prototype.reset):
3334         (PinchGestureRecognizer.prototype._recordGesture):
3335         (PinchGestureRecognizer.prototype._updateStateWithEvent):
3336         (PinchGestureRecognizer.prototype._distance):
3337         * Modules/modern-media-controls/gesture-recognizers/tap.js: Added.
3338         (TapGestureRecognizer):
3339         (TapGestureRecognizer.prototype.touchesBegan):
3340         (TapGestureRecognizer.prototype.touchesMoved):
3341         (TapGestureRecognizer.prototype.touchesEnded):
3342         (TapGestureRecognizer.prototype.reset):
3343         (TapGestureRecognizer.prototype.locationInElement):
3344         (TapGestureRecognizer.prototype.locationInClient):
3345         (TapGestureRecognizer.prototype._clearTimer):
3346         (TapGestureRecognizer.prototype._rewindTimer):
3347         (TapGestureRecognizer.prototype._timerFired):
3348         * Modules/modern-media-controls/js-files:
3349         * Modules/modern-media-controls/media/airplay-support.js:
3350         (AirplaySupport.prototype.buttonWasClicked): Deleted.
3351         * Modules/modern-media-controls/media/controls-visibility-support.js:
3352         (ControlsVisibilitySupport):
3353         (ControlsVisibilitySupport.prototype.handleEvent):
3354         (ControlsVisibilitySupport.prototype.syncControl): Deleted.
3355         * Modules/modern-media-controls/media/fullscreen-support.js:
3356         (FullscreenSupport):
3357         (FullscreenSupport.prototype.iOSInlineMediaControlsRecognizedPinchInGesture):
3358         (FullscreenSupport.prototype.buttonWasClicked): Deleted.
3359         * Modules/modern-media-controls/media/media-controller-support.js:
3360         (MediaControllerSupport):
3361         (MediaControllerSupport.prototype.handleEvent):
3362         (MediaControllerSupport.prototype.buttonWasClicked): Deleted.
3363         * Modules/modern-media-controls/media/mute-support.js:
3364         (MuteSupport.prototype.buttonWasClicked): Deleted.
3365         * Modules/modern-media-controls/media/pip-support.js:
3366         (PiPSupport.prototype.buttonWasClicked): Deleted.
3367         * Modules/modern-media-controls/media/playback-support.js:
3368         (PlaybackSupport.prototype.buttonWasClicked): Deleted.
3369         * Modules/modern-media-controls/media/skip-back-support.js:
3370         (SkipBackSupport.prototype.buttonWasClicked): Deleted.
3371         * Modules/modern-media-controls/media/start-support.js:
3372         (StartSupport.prototype.buttonWasClicked): Deleted.
3373         * Modules/modern-media-controls/media/tracks-support.js:
3374         (TracksSupport.prototype.buttonWasClicked): Deleted.
3375
3376 2016-12-06  Dean Jackson  <dino@apple.com>
3377
3378         Apply styling to media documents with modern controls
3379         https://bugs.webkit.org/show_bug.cgi?id=165499
3380         <rdar://problems/29543847>
3381
3382         Reviewed by Antoine Quint.
3383
3384         Forgot to commit most of the changes in MediaDocument.cpp :(
3385
3386         * html/MediaDocument.cpp:
3387         (WebCore::MediaDocumentParser::createDocumentStructure):
3388
3389 2016-12-06  Simon Fraser  <simon.fraser@apple.com>
3390
3391         Two tiled drawing tests failing with visual viewports enabled.
3392         https://bugs.webkit.org/show_bug.cgi?id=165489
3393
3394         Reviewed by Dean Jackson.
3395
3396         computeLayoutViewportOrigin() gets called for iframes when the layout viewport
3397         is zero-sized, but the visual viewport is non-zero. It doesn't really make sense
3398         to compute a layout viewport when the visual viewport is larger than the