Reduce URL size
[WebKit.git] / Source / WebCore / ChangeLog
1 2017-07-11  Alex Christensen  <achristensen@webkit.org>
2
3         Reduce URL size
4         https://bugs.webkit.org/show_bug.cgi?id=174319
5
6         Reviewed by Andreas Kling.
7
8         m_fragmentEnd is redundant information. If a URL is valid, then it is always m_string.length().
9         If a URL is not valid, then it is always 0. Rather than storing additional information,
10         deduce the fragment end from the validity of the URL and the String's length.
11
12         No change in behavior.  This reduces sizeof(URL) from 56 to 48 and reduces operations when parsing.
13
14         * platform/URL.cpp:
15         (WebCore::URL::invalidate):
16         (WebCore::URL::fragmentIdentifier):
17         (WebCore::URL::hasFragmentIdentifier):
18         (WebCore::URL::removeFragmentIdentifier):
19         * platform/URL.h:
20         (WebCore::URL::encode):
21         (WebCore::URL::decode):
22         (WebCore::URL::hasFragment):
23         * platform/URLParser.cpp:
24         (WebCore::URLParser::urlLengthUntilPart):
25         (WebCore::URLParser::copyURLPartsUntil):
26         (WebCore::URLParser::parse):
27         (WebCore::URLParser::allValuesEqual):
28         (WebCore::URLParser::internalValuesConsistent):
29
30 2017-07-11  Alex Christensen  <achristensen@webkit.org>
31
32         SharedBuffer::size should return a size_t
33         https://bugs.webkit.org/show_bug.cgi?id=174328
34
35         Reviewed by Andreas Kling.
36
37         No change in behaviour.
38
39         * html/FTPDirectoryDocument.cpp:
40         (WebCore::createTemplateDocumentData):
41         * loader/ContentFilter.cpp:
42         (WebCore::ContentFilter::handleProvisionalLoadFailure):
43         * loader/ResourceLoader.cpp:
44         (WebCore::ResourceLoader::loadDataURL):
45         * loader/ResourceLoader.h:
46         * loader/appcache/ApplicationCacheStorage.cpp:
47         (WebCore::ApplicationCacheStorage::store):
48         * loader/cache/CachedScript.cpp:
49         (WebCore::CachedScript::script):
50         * platform/SharedBuffer.cpp:
51         (WebCore::SharedBuffer::tryCreateArrayBuffer):
52         * platform/SharedBuffer.h:
53
54 2017-07-11  Per Arne Vollan  <pvollan@apple.com>
55
56         [Win] Build error when building WebCore from WebCore.proj project file.
57         https://bugs.webkit.org/show_bug.cgi?id=174330
58
59         Reviewed by Brent Fulgham.
60
61         The CMake variable PAL_DIR should be set in the project file.
62
63         * WebCore.vcxproj/WebCore.proj:
64
65 2017-05-24  Sergio Villar Senin  <svillar@igalia.com>
66
67         [SVG] Leak in SVGAnimatedListPropertyTearOff
68         https://bugs.webkit.org/show_bug.cgi?id=172545
69
70         Reviewed by Said Abou-Hallawa.
71
72         SVGAnimatedListPropertyTearOff maintains a vector m_wrappers with references to
73         SVGPropertyTraits<PropertyType>::ListItemTearOff. Apart from that SVGPropertyTearOff has a
74         reference to SVGAnimatedProperty.
75
76         When SVGListProperty::getItemValuesAndWrappers() is called, it creates a
77         SVGPropertyTraits<PropertyType>::ListItemTearOff pointing to the same SVGAnimatedProperty (a
78         SVGAnimatedListPropertyTearOff) which stores the m_wrappers vector where the ListItemTearOff
79         is going to be added to. This effectively creates a reference cycle between the
80         SVGAnimatedListPropertyTearOff and all the ListItemTearOff it stores in m_wrappers.
81
82         We should detach those wrappers in propertyWillBeDeleted() in order to break the cycle.
83
84         * svg/properties/SVGAnimatedListPropertyTearOff.h:
85
86 2017-07-11  Carlos Alberto Lopez Perez  <clopez@igalia.com>
87
88         [GTK] Spin buttons on input type number appear over the value itself for small widths
89         https://bugs.webkit.org/show_bug.cgi?id=173572
90
91         Reviewed by Carlos Garcia Campos.
92
93         When drawing the spin buttons, override the width of the input
94         element to increment it with the width of the spin button.
95         This ensures that we don't end up covering the input values with
96         the spin buttons.
97
98         Do this also for user controlled styles, because most web authors
99         won't test how their site renders on WebKitGTK+, and they will
100         assume spin buttons in the order of 13 pixels wide (that is what
101         most browsers use), but the GTK+ spin button is much wider (66 pixels).
102
103         Test: platform/gtk/fast/forms/number/number-size-spinbutton-nocover.html
104
105         * rendering/RenderTheme.cpp:
106         (WebCore::RenderTheme::adjustStyle):
107         * rendering/RenderThemeGtk.cpp:
108         (WebCore::RenderThemeGtk::adjustTextFieldStyle): Call the theme's adjustTextFieldStyle() also for user controlled styles.
109         (WebCore::RenderThemeGtk::adjustInnerSpinButtonStyle):
110
111 2017-07-11  Youenn Fablet  <youenn@apple.com>
112
113         We should do ICE candidate filtering at the Document level
114         https://bugs.webkit.org/show_bug.cgi?id=173861
115         <rdar://problem/33122058>
116
117         Reviewed by Eric Carlson.
118
119         Tests: http/tests/webrtc/filtering-ice-candidate-cross-origin-frame.html
120                http/tests/webrtc/filtering-ice-candidate-same-origin-frame.html
121                http/tests/webrtc/filtering-ice-candidate-same-origin-frame2.html
122                webrtc/filtering-ice-candidate-after-reload.html
123
124         Making UserMediaRequest disable the ICE candidate filtering for the page RTCController.
125         All RTCPeerConnection of the page that are created on a document that are same-origin as the top document
126         are now registered to the RTCController.
127         This allows disabling filtering to only these RTCPeerConnection.
128
129         The page keeps the default ICE candidate filtering policy.
130         This policy allows disabling ICE candidate filtering for all RTCPeerConnection.
131
132         When the top document is changing, the RTCController filtering policy is reset
133         and its list of RTCPeerConnection is emptied.
134
135         Internals no longer disables ICE candidate filtering by default.
136         This allows finer grained testing.
137         ICE candidate filtering is disabled for tests including testharnessreport.js
138         to enable web-platform-tests to run without modifications.
139
140         * Modules/mediastream/RTCController.cpp:
141         (WebCore::RTCController::reset):
142         * Modules/mediastream/RTCController.h:
143         * Modules/mediastream/UserMediaRequest.cpp:
144         (WebCore::UserMediaRequest::allow):
145         * page/Frame.cpp:
146         (WebCore::Frame::setDocument):
147         * page/Page.cpp:
148         (WebCore::Page::disableICECandidateFiltering):
149         * page/Page.h:
150         (WebCore::Page::shouldEnableICECandidateFilteringByDefault):
151         (WebCore::Page::disableICECandidateFiltering): Deleted.
152         (WebCore::Page::enableICECandidateFiltering): Deleted.
153         (WebCore::Page::isICECandidateFilteringEnabled): Deleted.
154         * testing/Internals.cpp:
155         (WebCore::Internals::Internals):
156         (WebCore::Internals::setICECandidateFiltering):
157         (WebCore::Internals::setEnumeratingAllNetworkInterfacesEnabled):
158         (WebCore::Internals::isICECandidateFilteringEnabled): Deleted.
159         * testing/Internals.h:
160         * testing/Internals.idl:
161
162 2017-07-11  Sergio Villar Senin  <svillar@igalia.com>
163
164         Unreviewed, rolling out r219325.
165
166         The test is still flaky
167
168         Reverted changeset:
169
170         "[SVG] Leak in SVGAnimatedListPropertyTearOff"
171         https://bugs.webkit.org/show_bug.cgi?id=172545
172         http://trac.webkit.org/changeset/219325
173
174 2017-05-24  Sergio Villar Senin  <svillar@igalia.com>
175
176         [SVG] Leak in SVGAnimatedListPropertyTearOff
177         https://bugs.webkit.org/show_bug.cgi?id=172545
178
179         Reviewed by Said Abou-Hallawa.
180
181         SVGAnimatedListPropertyTearOff maintains a vector m_wrappers with references to
182         SVGPropertyTraits<PropertyType>::ListItemTearOff. Apart from that SVGPropertyTearOff has a
183         reference to SVGAnimatedProperty.
184
185         When SVGListProperty::getItemValuesAndWrappers() is called, it creates a
186         SVGPropertyTraits<PropertyType>::ListItemTearOff pointing to the same SVGAnimatedProperty (a
187         SVGAnimatedListPropertyTearOff) which stores the m_wrappers vector where the ListItemTearOff
188         is going to be added to. This effectively creates a reference cycle between the
189         SVGAnimatedListPropertyTearOff and all the ListItemTearOff it stores in m_wrappers.
190
191         We should detach those wrappers in propertyWillBeDeleted() in order to break the cycle.
192
193         * svg/properties/SVGAnimatedListPropertyTearOff.h:
194
195 2017-07-10  Simon Fraser  <simon.fraser@apple.com>
196
197         [WK2 iOS] REGRESSION (r216803) During momentum scroll, getBoundingClientRect returns wrong coordinates (missing images on pinterest, elle.com and many other sites)
198         https://bugs.webkit.org/show_bug.cgi?id=174286
199         rdar://problem/32864180
200
201         Reviewed by Dean Jackson.
202
203         r216803 made getBoundingClientRects relative to the layout viewport, but when scrolling we
204         only update that on stable viewport updates (at the end of the scroll). This meant that during
205         unstable updates, getBoundingClientRects() used a "frozen" viewport origin so things on-screen
206         would appear to be off-screen, causing sites to fail to dynamically load images etc. when
207         scrolling.
208
209         Fix by pushing an optional "unstable" layout viewport rect onto FrameView, which gets used by
210         FrameView::documentToClientOffset(). This is cleared when we do a stable update.
211
212         This is a short-term solution. Longer term, I would prefer to always call setLayoutViewportOverrideRect(),
213         but fix the scrolling tree logic to work correctly in this case.
214
215         Add a bit more scrolling logging.
216
217         Test: fast/visual-viewport/ios/get-bounding-client-rect-unstable.html
218
219         * page/FrameView.cpp:
220         (WebCore::FrameView::setUnstableLayoutViewportRect):
221         (WebCore::FrameView::documentToClientOffset):
222         * page/FrameView.h:
223         * page/scrolling/AsyncScrollingCoordinator.cpp:
224         (WebCore::AsyncScrollingCoordinator::reconcileScrollingState):
225         * page/scrolling/ScrollingStateFixedNode.cpp:
226         (WebCore::ScrollingStateFixedNode::updateConstraints):
227         (WebCore::ScrollingStateFixedNode::reconcileLayerPositionForViewportRect):
228
229 2017-07-10  John Wilander  <wilander@apple.com>
230
231         Resource Load Statistics: Prune statistics in orders of importance
232         https://bugs.webkit.org/show_bug.cgi?id=174215
233         <rdar://problem/33164403>
234
235         Reviewed by Chris Dumez.
236
237         Test: http/tests/loading/resourceLoadStatistics/prune-statistics.html
238
239         * loader/ResourceLoadObserver.cpp:
240         (WebCore::reduceTimeResolution):
241         (WebCore::ResourceLoadObserver::logFrameNavigation):
242         (WebCore::ResourceLoadObserver::logSubresourceLoading):
243         (WebCore::ResourceLoadObserver::logWebSocketLoading):
244         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
245             Now all set the new statistics field lastSeen.
246         * loader/ResourceLoadStatistics.cpp:
247         (WebCore::ResourceLoadStatistics::encode):
248         (WebCore::ResourceLoadStatistics::decode):
249         (WebCore::ResourceLoadStatistics::toString):
250         (WebCore::ResourceLoadStatistics::merge):
251             Handling of the new statistics field lastSeen.
252         * loader/ResourceLoadStatistics.h:
253
254 2017-07-10  Devin Rousso  <drousso@apple.com>
255
256         Web Inspector: Highlight matching CSS canvas clients when hovering contexts in the Resources tab
257         https://bugs.webkit.org/show_bug.cgi?id=174279
258
259         Reviewed by Matt Baker.
260
261         Test: inspector/dom/highlightNodeList.html
262
263         * inspector/InspectorDOMAgent.h:
264         * inspector/InspectorDOMAgent.cpp:
265         (WebCore::InspectorDOMAgent::highlightNodeList):
266
267 2017-07-10  Javier Fernandez  <jfernandez@igalia.com>
268
269         [css-align][css-flex][css-grid] 'auto' values of align-self and justify-self must not be resolved
270         https://bugs.webkit.org/show_bug.cgi?id=172707
271
272         Reviewed by Antti Koivisto.
273
274         The CSS Box Alignment specification has been changed recently so that
275         now all the propeties have the specificed value as computed value. The
276         rationale of this change are at the associated W3C github issue [1].
277
278         This change implies that we don't need to execute the StyleAdjuter
279         logic we implemented specifically for supporting 'auto' values
280         resolution for computed style. We can live now with resolution at
281         layout time only.
282
283         [1] https://github.com/w3c/csswg-drafts/issues/440
284
285         No new tests, just updating the already defined tests.
286
287         * css/CSSComputedStyleDeclaration.cpp:
288         (WebCore::ComputedStyleExtractor::propertyValue):
289         * css/StyleResolver.cpp:
290         (WebCore::StyleResolver::adjustRenderStyle): Removed
291         * css/StyleResolver.h:
292         * html/shadow/TextControlInnerElements.cpp:
293         (WebCore::TextControlInnerElement::resolveCustomStyle):
294         * rendering/RenderBox.cpp:
295         (WebCore::RenderBox::columnFlexItemHasStretchAlignment):
296         (WebCore::RenderBox::hasStretchedLogicalWidth):
297         * rendering/RenderFlexibleBox.cpp:
298         (WebCore::RenderFlexibleBox::styleDidChange): Added
299         (WebCore::RenderFlexibleBox::alignmentForChild):
300         * rendering/RenderFlexibleBox.h:
301
302 2017-07-10  Wenson Hsieh  <wenson_hsieh@apple.com>
303
304         [WK2] Ignore touch events that interrupt platform-driven momentum scrolling
305         https://bugs.webkit.org/show_bug.cgi?id=174300
306         <rdar://problem/33030639>
307
308         Reviewed by Simon Fraser.
309
310         See Source/WebKit2/ChangeLog for more detail.
311
312         Tests: fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-mainframe.html
313                fast/events/ios/no-touch-events-when-stopping-momentum-scroll-in-overflow.html
314                fast/events/ios/touch-events-during-scroll-deceleration-in-overflow.html
315
316         * page/scrolling/ScrollingTree.h:
317         (WebCore::ScrollingTree::scrollingTreeNodeDidEndPanGesture):
318
319 2017-07-10  Jeremy Jones  <jeremyj@apple.com>
320
321         Captions and subtitles not showing up in picture-in-picture for MSE content
322         https://bugs.webkit.org/show_bug.cgi?id=174317
323         rdar://problem/33188591
324
325         Reviewed by Eric Carlson.
326
327         Reverts a regression created by r218403.
328
329         * html/shadow/MediaControlElements.cpp:
330         (WebCore::MediaControlTextTrackContainerElement::updateTextTrackRepresentation):
331
332 2017-07-10  Per Arne Vollan  <pvollan@apple.com>
333
334         [Win] Link error when building WTF from WTF.proj project file.
335         https://bugs.webkit.org/show_bug.cgi?id=174316
336         <rdar://problem/33178200>
337
338         Reviewed by Brent Fulgham.
339
340         WTF_CPU_X86 cmake variable needs to be set for link libraries directories to be correct.
341
342         * WebCore.vcxproj/WebCore.proj:
343
344 2017-07-10  Jeremy Jones  <jeremyj@apple.com>
345
346         media element handle adding source immediately before src.
347         https://bugs.webkit.org/show_bug.cgi?id=174284
348         rdar://problem/33115439
349
350         Reviewed by David Kilzer.
351
352         Test: media/video-source-before-src.html
353
354         Adding a source causes a selectMediaResource block to be enqueued.
355         If dataLoadingPermitted prevents creating the m_player but sets the srcAttr, then
356         the enqueued selectMediaResource will be in a bad state, with a srcAttr but no m_player.
357
358         This fix prevents selectMediaResource from being called, if data loading is not permitted
359         when adding a source element, to match how it prevents player creation when setting srcAttr.
360
361         This fix also adds a debug assert to catch the problem earlier and adds an early return to
362         prevent the crash in release builds.
363
364         * html/HTMLMediaElement.cpp:
365         (WebCore::HTMLMediaElement::selectMediaResource):
366         (WebCore::HTMLMediaElement::sourceWasAdded):
367
368 2017-07-10  Megan Gardner  <megan_gardner@apple.com>
369
370         Add location to NavigationActionData
371         https://bugs.webkit.org/show_bug.cgi?id=174233
372         <rdar://problem/29165518>
373
374         Reviewed by Simon Fraser.
375         
376         Add the root view location of a tap to a NavigationAction to vend to Safari.
377
378         Test: small enough change to not be tested alone.
379
380         * dom/MouseRelatedEvent.cpp:
381         (WebCore::MouseRelatedEvent::absoluteLocationConvertedToRootView):
382         * dom/MouseRelatedEvent.h:
383
384 2017-07-10  Sam Weinig  <sam@webkit.org>
385
386         [WebIDL] Move plugin object customization into the generator
387         https://bugs.webkit.org/show_bug.cgi?id=174238
388
389         Reviewed by Chris Dumez.
390
391         - Added [Plugin] extended attribute to forward the necessary hooks
392           for get/set/delete to the plugin code.
393         - Removed [CustomNamedSetter] and replaced it's remaining uses
394           [CustomPut] (formally called [CustomPutFunction]).
395         - Renamed [CustomNamedGetterOnPrototype] to [CustomPutOnPrototype]
396           because that is actually what it does.
397         - Removed [CustomGetOwnPropertySlotByIndex] and made 
398           [CustomGetOwnPropertySlot] imply it, as the other custom hooks
399           do.
400         - Renamed [CustomEnumerateProperty] to [CustomGetOwnPropertyNames]
401           to conform with other attribute names.
402         - Renamed [CustomCall] to [CustomGetCallData] to conform with other 
403           attribute names.
404
405         * CMakeLists.txt:
406         * WebCore.xcodeproj/project.pbxproj:
407         * bindings/js/JSBindingsAllInOne.cpp:
408         * bindings/js/JSHTMLAppletElementCustom.cpp: Removed.
409         * bindings/js/JSHTMLEmbedElementCustom.cpp: Removed.
410         * bindings/js/JSHTMLObjectElementCustom.cpp: Removed.
411         Remove custom bindings.
412
413         * bindings/js/JSCSSStyleDeclarationCustom.cpp:
414         (WebCore::putCommon):
415         (WebCore::JSCSSStyleDeclaration::put):
416         (WebCore::JSCSSStyleDeclaration::putByIndex):
417         (WebCore::JSCSSStyleDeclaration::putDelegate): Deleted.
418         Use [CustomPut] rather than [CustomNamedSetter] to allow us
419         to get rid of [CustomNamedSetter]. Reuse put delegate as
420         common code to share between put and putByIndex.
421
422         * bindings/js/JSLocationCustom.cpp:
423         (WebCore::getOwnPropertySlotCommon):
424         (WebCore::JSLocation::getOwnPropertySlot):
425         (WebCore::JSLocation::getOwnPropertySlotByIndex):
426         Replace [CustomGetOwnPropertySlotAndDescriptor] with [CustomGetOwnPropertySlot]
427         which is more clear and reduces the number of variants of this hook override
428         we need.
429
430         (WebCore::putCommon):
431         (WebCore::JSLocation::put):
432         (WebCore::JSLocation::putByIndex):
433         Use [CustomPut] rather than [CustomNamedSetter] to allow us
434         to get rid of [CustomNamedSetter]. Reuse put delegate as
435         common code to share between put and putByIndex.
436
437         (WebCore::JSLocationPrototype::put):
438         [CustomPutOnPrototype] (which weirdly used incorrectly be called 
439         [CustomNamedGetterOnPrototype]) now works like [CustomPut] meaning
440         you need to call Base.
441
442         * bindings/js/JSPluginElementFunctions.cpp:
443         (WebCore::pluginElementPropertyGetter):
444         (WebCore::pluginElementCustomGetOwnPropertySlot):
445         (WebCore::pluginElementCustomPut):
446         * bindings/js/JSPluginElementFunctions.h:
447         (WebCore::pluginElementCustomGetOwnPropertySlot): Deleted.
448         Remove templatized pluginElementCustomGetOwnPropertySlot, which was 
449         completely unnecessary and merge its functionality into the out of
450         line overload. Remove pluginElementPropertyGetter from the header,
451         since it is only used in implementation, and unify the naming and
452         argument position (JSHTMLElement* comes first) of the hooks.
453
454         * bindings/scripts/CodeGeneratorJS.pm:
455         (GenerateIndexedGetter):
456         (GenerateNamedGetter):
457         (GenerateGetOwnPropertySlot):
458         (GenerateGetOwnPropertySlotByIndex):
459         (GenerateGetOwnPropertyNames):
460         (GeneratePut):
461         (GeneratePutByIndex):
462         (GenerateDeleteProperty):
463         (GenerateDeletePropertyByIndex):
464         (GenerateNamedDeleterDefinition):
465         (InstanceOverridesGetOwnPropertySlot):
466         (InstanceOverridesGetOwnPropertyNames):
467         (InstanceOverridesPut):
468         (InstanceOverridesDeleteProperty):
469         (GenerateHeader):
470         (GenerateImplementation):
471         (GenerateGetCallData):
472         (GeneratePluginCall):
473         (GenerateLegacyCallerDefinitions):
474         (GenerateLegacyCallerDefinition):
475         (GeneratePrototypeDeclaration):
476         (InstanceOverridesGetCallData):
477         (HeaderNeedsPrototypeDeclaration):
478         - Add support for [Plugin]
479         - Remove support for [CustomNamedSetter]
480         - Replace [CustomGetOwnPropertySlotByIndex] with [CustomGetOwnPropertySlot]
481         - Replace [CustomEnumerateProperty] with [CustomGetOwnPropertyNames]
482         - Replace [CustomPutFunction] with [CustomPut].
483         - Make subroutine names more consistent (remove a few Definition suffixes)
484
485         * bindings/scripts/IDLAttributes.json:
486         Update for new / removed attributes.
487
488         * bindings/scripts/test/JS/JSTestInterface.cpp:
489         * bindings/scripts/test/JS/JSTestInterface.h:
490         * bindings/scripts/test/JS/JSTestPluginInterface.cpp: Added.
491         * bindings/scripts/test/JS/JSTestPluginInterface.h: Added.
492         * bindings/scripts/test/TestInterface.idl:
493         * bindings/scripts/test/TestPluginInterface.idl: Added.
494         Update / add tests.
495
496         * css/CSSStyleDeclaration.idl:
497         * html/HTMLAppletElement.idl:
498         * html/HTMLEmbedElement.idl:
499         * html/HTMLObjectElement.idl:
500         * page/DOMWindow.idl:
501         * page/Location.idl:
502         * storage/Storage.idl:
503         Update for new / renamed attributes.
504
505 2017-07-03  Brian Burg  <bburg@apple.com>
506
507         Web Replay: remove some unused code
508         https://bugs.webkit.org/show_bug.cgi?id=173903
509
510         Rubber-stamped by Joseph Pecoraro.
511
512         * CMakeLists.txt:
513         * Configurations/FeatureDefines.xcconfig:
514         * DerivedSources.make:
515         * PlatformMac.cmake:
516         * WebCore.xcodeproj/project.pbxproj:
517         * dom/Document.cpp:
518         (WebCore::Document::Document):
519         (WebCore::Document::lastModified):
520         (WebCore::Document::inputCursor): Deleted.
521         (WebCore::Document::setInputCursor): Deleted.
522         * dom/Document.h:
523         * inspector/InspectorController.cpp:
524         (WebCore::InspectorController::InspectorController):
525         * inspector/InspectorInstrumentation.cpp:
526         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
527         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
528         (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
529         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
530         (WebCore::InspectorInstrumentation::sessionCreatedImpl): Deleted.
531         (WebCore::InspectorInstrumentation::sessionLoadedImpl): Deleted.
532         (WebCore::InspectorInstrumentation::sessionModifiedImpl): Deleted.
533         (WebCore::InspectorInstrumentation::segmentCreatedImpl): Deleted.
534         (WebCore::InspectorInstrumentation::segmentCompletedImpl): Deleted.
535         (WebCore::InspectorInstrumentation::segmentLoadedImpl): Deleted.
536         (WebCore::InspectorInstrumentation::segmentUnloadedImpl): Deleted.
537         (WebCore::InspectorInstrumentation::captureStartedImpl): Deleted.
538         (WebCore::InspectorInstrumentation::captureStoppedImpl): Deleted.
539         (WebCore::InspectorInstrumentation::playbackStartedImpl): Deleted.
540         (WebCore::InspectorInstrumentation::playbackPausedImpl): Deleted.
541         (WebCore::InspectorInstrumentation::playbackHitPositionImpl): Deleted.
542         (WebCore::InspectorInstrumentation::playbackFinishedImpl): Deleted.
543         (WebCore::InspectorInstrumentation::replayAgentEnabled): Deleted.
544         * inspector/InspectorInstrumentation.h:
545         (WebCore::InspectorInstrumentation::sessionCreated): Deleted.
546         (WebCore::InspectorInstrumentation::sessionLoaded): Deleted.
547         (WebCore::InspectorInstrumentation::sessionModified): Deleted.
548         (WebCore::InspectorInstrumentation::segmentCreated): Deleted.
549         (WebCore::InspectorInstrumentation::segmentCompleted): Deleted.
550         (WebCore::InspectorInstrumentation::segmentLoaded): Deleted.
551         (WebCore::InspectorInstrumentation::segmentUnloaded): Deleted.
552         (WebCore::InspectorInstrumentation::captureStarted): Deleted.
553         (WebCore::InspectorInstrumentation::captureStopped): Deleted.
554         (WebCore::InspectorInstrumentation::playbackStarted): Deleted.
555         (WebCore::InspectorInstrumentation::playbackPaused): Deleted.
556         (WebCore::InspectorInstrumentation::playbackFinished): Deleted.
557         (WebCore::InspectorInstrumentation::playbackHitPosition): Deleted.
558         * inspector/InspectorReplayAgent.cpp: Removed.
559         * inspector/InspectorReplayAgent.h: Removed.
560         * inspector/InstrumentingAgents.cpp:
561         (WebCore::InstrumentingAgents::reset):
562         * inspector/InstrumentingAgents.h:
563         (WebCore::InstrumentingAgents::inspectorReplayAgent): Deleted.
564         (WebCore::InstrumentingAgents::setInspectorReplayAgent): Deleted.
565         * page/EventHandler.h:
566         * page/Page.cpp:
567         (WebCore::Page::Page):
568         * page/Page.h:
569         (WebCore::Page::replayController): Deleted.
570         * page/scrolling/ScrollingCoordinator.cpp:
571         (WebCore::ScrollingCoordinator::synchronousScrollingReasons):
572         (WebCore::ScrollingCoordinator::replaySessionStateDidChange): Deleted.
573         * page/scrolling/ScrollingCoordinator.h:
574         * platform/Logging.h:
575         * plugins/DOMMimeTypeArray.cpp:
576         (WebCore::DOMMimeTypeArray::getPluginData):
577         * plugins/DOMPluginArray.cpp:
578         (WebCore::DOMPluginArray::pluginData):
579         * replay/AllReplayInputs.h: Removed.
580         * replay/CapturingInputCursor.cpp: Removed.
581         * replay/CapturingInputCursor.h: Removed.
582         * replay/EventLoopInput.cpp: Removed.
583         * replay/EventLoopInput.h: Removed.
584         * replay/EventLoopInputDispatcher.cpp: Removed.
585         * replay/EventLoopInputDispatcher.h: Removed.
586         * replay/FunctorInputCursor.h: Removed.
587         * replay/MemoizedDOMResult.cpp: Removed.
588         * replay/MemoizedDOMResult.h: Removed.
589         * replay/ReplayController.cpp: Removed.
590         * replay/ReplayController.h: Removed.
591         * replay/ReplayInputCreationMethods.cpp: Removed.
592         * replay/ReplayInputDispatchMethods.cpp: Removed.
593         * replay/ReplaySession.cpp: Removed.
594         * replay/ReplaySession.h: Removed.
595         * replay/ReplaySessionSegment.cpp: Removed.
596         * replay/ReplaySessionSegment.h: Removed.
597         * replay/ReplayingInputCursor.cpp: Removed.
598         * replay/ReplayingInputCursor.h: Removed.
599         * replay/SegmentedInputStorage.cpp: Removed.
600         * replay/SegmentedInputStorage.h: Removed.
601         * replay/SerializationMethods.cpp: Removed.
602         * replay/SerializationMethods.h: Removed.
603         * replay/WebInputs.json: Removed.
604
605 2017-07-10  Brady Eidson  <beidson@apple.com>
606
607         Cleanup lifetime issues of UniqueIDBDatabase and IDBBackingStore.
608         <rdar://problem/32908525> and https://bugs.webkit.org/show_bug.cgi?id=174244
609
610         Reviewed by David Kilzer and Alex Christensen. 
611
612         No targeted test possible, implicitly covered by all IDB tests.
613
614         The original idea behind UniqueIDBDatabase lifetime was that they are ThreadSafeRefCounted and
615         we take protector Refs when any operation that needs it alive is in flight.
616         
617         This added variability to their lifetime which made it difficult to enforce a few different 
618         design invariants, namely:
619             - UniqueIBDDatabase objects are always created and destroyed only on the main thread.
620             - IDBBackingStore objects are always created and destroyed only on the database thread.
621         
622         This patch removes the ref counting and instead ties UniqueIDBDatabase lifetime to a
623         std::unique_ptr that is owned by the IDBServer.
624         
625         Whenever any operations on the UniqueIDBDatabase are in flight it is kept alive by virtue
626         of that unique_ptr in the IDBServer. Once a UniqueIDBDatabase is completely done with all of
627         its work, the following happens:
628             - On the main thread the IDBServer removes the unique_ptr owning the UniqueIDBDatabase
629               from its map.
630             - It hands the unique_ptr to the UniqueIDBDatabase itself, which schedules one final 
631               database thread task.
632             - That database thread task is to destroy the IDBBackingStore, kill its message queues,
633               and then message back to the main thread for one final task.
634             - That main thread task is to release the unique_ptr, resulting in destruction of the
635               UniqueIDBDatabase object.
636         
637         This is safe, predictable, solves the lifetime issues that r218516 originally tried to solve,
638         and solves the lifetime issues that r218516 introduced.
639
640         (This patch also adds many more assertions to cover various design invariants throughout the
641         lifecycle of a particular UniqueIDBDatabase)
642
643         ASSERT that IDBBackingStores are only ever created and destroyed on the background thread:
644         * Modules/indexeddb/server/IDBBackingStore.h:
645         (WebCore::IDBServer::IDBBackingStore::~IDBBackingStore):
646         (WebCore::IDBServer::IDBBackingStore::IDBBackingStore):
647         
648         Transition UniqueIDBDatabase ownership from a RefPtr to a std::unique_ptr:
649         * Modules/indexeddb/server/IDBServer.cpp:
650         (WebCore::IDBServer::IDBServer::getOrCreateUniqueIDBDatabase):
651         (WebCore::IDBServer::IDBServer::closeAndTakeUniqueIDBDatabase):
652         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesModifiedSince):
653         (WebCore::IDBServer::IDBServer::closeAndDeleteDatabasesForOrigins):
654         (WebCore::IDBServer::IDBServer::closeUniqueIDBDatabase): Deleted.
655         * Modules/indexeddb/server/IDBServer.h:
656         
657         Make all the other changes mentioned above:
658         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
659         (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase): Bulk up on ASSERTs
660         (WebCore::IDBServer::UniqueIDBDatabase::openDatabaseConnection): 
661         (WebCore::IDBServer::UniqueIDBDatabase::performUnconditionalDeleteBackingStore):
662         (WebCore::IDBServer::UniqueIDBDatabase::scheduleShutdownForClose):
663         (WebCore::IDBServer::UniqueIDBDatabase::shutdownForClose):
664         (WebCore::IDBServer::UniqueIDBDatabase::didShutdownForClose):
665         (WebCore::IDBServer::UniqueIDBDatabase::didDeleteBackingStore):
666         (WebCore::IDBServer::UniqueIDBDatabase::handleCurrentOperation):
667         (WebCore::IDBServer::UniqueIDBDatabase::performIterateCursor):
668         (WebCore::IDBServer::UniqueIDBDatabase::performPrefetchCursor):
669         (WebCore::IDBServer::UniqueIDBDatabase::operationAndTransactionTimerFired):
670         (WebCore::IDBServer::UniqueIDBDatabase::activateTransactionInBackingStore):
671         (WebCore::IDBServer::UniqueIDBDatabase::transactionCompleted):
672         (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTask):
673         (WebCore::IDBServer::UniqueIDBDatabase::postDatabaseTaskReply):
674         (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTask):
675         (WebCore::IDBServer::UniqueIDBDatabase::executeNextDatabaseTaskReply):
676         (WebCore::IDBServer::UniqueIDBDatabase::maybeFinishHardClose):
677         (WebCore::IDBServer::UniqueIDBDatabase::isDoneWithHardClose):
678         (WebCore::IDBServer::UniqueIDBDatabase::immediateCloseForUserDelete):
679         (WebCore::IDBServer::UniqueIDBDatabase::didPerformUnconditionalDeleteBackingStore): Deleted.
680         * Modules/indexeddb/server/UniqueIDBDatabase.h:
681         (WebCore::IDBServer::UniqueIDBDatabase::create): Deleted.
682
683 2017-07-10  Chris Dumez  <cdumez@apple.com>
684
685         Further WebResourceLoadStatisticsStore / ResourceLoadStatisticsStore clean up
686         https://bugs.webkit.org/show_bug.cgi?id=174301
687
688         Reviewed by Brent Fulgham.
689
690         Moved some generic file system utility functions down to platform's FileSystem.h.
691
692         * platform/FileSystem.cpp:
693         (WebCore::openAndLockFile):
694         (WebCore::unlockAndCloseFile):
695         * platform/FileSystem.h:
696
697 2017-07-10  Andreas Kling  <akling@apple.com>
698
699         REGRESSION(r210226): Keyboard-focused element not preserved when navigating back through page cache, causing multiple elements to have focus
700         https://bugs.webkit.org/show_bug.cgi?id=174302
701         <rdar://problem/33204273>
702
703         Reviewed by Antti Koivisto.
704
705         Don't clear the active/hovered/focused elements when destroying the render tree,
706         since we might need to reconstruct it later, and would like to remember which
707         elements those were.
708
709         Only the focused state actually stuck when going in and out of the page cache,
710         but this patch removes all the element pointer clearing for consistency.
711
712         Test: fast/history/page-cache-element-state-focused.html
713
714         * dom/Document.cpp:
715         (WebCore::Document::destroyRenderTree):
716
717 2017-07-10  Daniel Bates  <dabates@apple.com>
718
719         REGRESSION (r218616): Cannot build WebCore for macOS 10.12 with macOS 10.13 SDK
720         https://bugs.webkit.org/show_bug.cgi?id=173939
721
722         Reviewed by Dan Bernstein.
723
724         (The code in this change was either suggested or written by Dan Bernstein with a very
725         minor adjustment to get it to build).
726
727         Allow WebCore to link even though CTFontCreatePhysicalFontForCharactersWithLanguage() is
728         undefined when building against the macOS 10.13 SDK targeting macOS 10.12. Let the dynamic
729         linker resolve the undefined symbol.
730
731         For completeness the SPI CTFontCreatePhysicalFontForCharactersWithLanguage() was removed
732         from the macOS 10.13 SDK.
733
734         * Configurations/WebCore.xcconfig: Tell the linker that CTFontCreatePhysicalFontForCharactersWithLanguage()
735         can be undefined when building against macOS 10.13 or later SDK.
736         * platform/spi/cocoa/CoreTextSPI.h: Annotate CTFontCreatePhysicalFontForCharactersWithLanguage()
737         with its availability information.
738
739 2017-07-10  Zalan Bujtas  <zalan@apple.com>
740
741         Block of text is missing in iBooks sample books.
742         https://bugs.webkit.org/show_bug.cgi?id=174295
743         <rdar://problem/32955620>
744
745         Reviewed by Antti Koivisto.
746
747         In the simple line layout context, translating y coordinate to a line index is
748         normally just a (y / line height) operation. However in case of strut offsets (pagination)
749         we need to take these extra paddings into account while resolving the line index.
750         This patch fixes the boundary checking for a given line by using the font size only
751         when the font is taller than the line.
752
753         * rendering/SimpleLineLayoutResolver.cpp:
754         (WebCore::SimpleLineLayout::RunResolver::adjustLineIndexForStruts):
755
756 2017-07-10  Carlos Garcia Campos  <cgarcia@igalia.com>
757
758         [SOUP] SoupCookieJar is never released (resulting in sqlite temp files lying around)
759         https://bugs.webkit.org/show_bug.cgi?id=166029
760
761         Reviewed by Michael Catanzaro.
762
763         Add clearSoupNetworkSessionAndCookieStorage() to clear the SoupNetworkSession and cookie storage of the main
764         network session, ensuring the cookies database is properly closed.
765
766         * platform/network/NetworkStorageSession.h:
767         * platform/network/soup/NetworkStorageSessionSoup.cpp:
768         (WebCore::NetworkStorageSession::clearSoupNetworkSessionAndCookieStorage):
769
770 2017-07-10  Carlos Garcia Campos  <cgarcia@igalia.com>
771
772         Move make-js-file-arrays.py from WebCore to JavaScriptCore
773         https://bugs.webkit.org/show_bug.cgi?id=174024
774
775         Reviewed by Michael Catanzaro.
776
777         * CMakeLists.txt: Explicitly add files generated by MAKE_JS_FILE_ARRAYS to the build, since the macro no longer
778         does it.
779         * DerivedSources.make: Updated to use make-js-file-arrays.py from JavaScriptCore. It's no longer needed to set
780         PYTHON_PATH to find jsmin.py.
781
782 2017-07-10  Charlie Turner  <cturner@igalia.com>
783
784         [GTK] http/tests/media/video-redirect.html is failing
785         https://bugs.webkit.org/show_bug.cgi?id=174260
786
787         Reviewed by Carlos Garcia Campos.
788
789         Make sure we're testing new URLs within the same security origin.
790
791         Covered by existing tests.
792
793         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
794         (WebCore::convertToInternalProtocol): Factor out setting our
795         internal URL schema.
796         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL): Use the
797         refactored helper.
798         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation): Use
799         refactored helper to ensure both URLs have the same origin.
800
801 2017-07-08  John Wilander  <wilander@apple.com>
802
803         Resource Load Statistics: User interaction should always go to top document
804         https://bugs.webkit.org/show_bug.cgi?id=174120
805         <rdar://problem/33117899>
806
807         Reviewed by Chris Dumez.
808
809         Test: http/tests/loading/resourceLoadStatistics/user-interaction-in-cross-origin-sub-frame.html
810
811         * dom/UserGestureIndicator.cpp:
812         (WebCore::UserGestureIndicator::UserGestureIndicator):
813             Now logs user interaction for the top document.
814         * loader/ResourceLoadObserver.cpp:
815         (WebCore::ResourceLoadObserver::setThrottledObserverNotifications):
816             Test infrastructure.
817         (WebCore::ResourceLoadObserver::setNotificationCallback):
818             Callback now takes a ResourceLoadObserver::NotificationType.
819         (WebCore::ResourceLoadObserver::logFrameNavigation):
820             Submits the configured ResourceLoadObserver::NotificationType.
821         (WebCore::ResourceLoadObserver::logSubresourceLoading):
822             Submits the configured ResourceLoadObserver::NotificationType.
823         (WebCore::ResourceLoadObserver::logWebSocketLoading):
824             Submits the configured ResourceLoadObserver::NotificationType.
825         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
826             Submits the configured ResourceLoadObserver::NotificationType.
827         * loader/ResourceLoadObserver.h:
828         * testing/Internals.cpp:
829         (WebCore::Internals::resetToConsistentState):
830             Resets to throttled notifications.
831         (WebCore::Internals::setResourceLoadStatisticsThrottledObserverNotifications):
832             Test infrastructure.
833         * testing/Internals.h:
834         * testing/Internals.idl:
835             Added internals.setResourceLoadStatisticsThrottledObserverNotifications().
836
837 2017-07-09  Brady Eidson  <beidson@apple.com>
838
839         Remove some obsolete WebKitVersionChecks.
840         https://bugs.webkit.org/show_bug.cgi?id=174294
841
842         Reviewed by Dan Bernstein.
843
844         No new tests (No change to testable behavior)
845
846         * dom/ScriptExecutionContext.cpp:
847         (WebCore::ScriptExecutionContext::dispatchErrorEvent):
848         
849         * page/Settings.in:
850         
851         * platform/RuntimeApplicationChecks.h:
852         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
853         (WebCore::IOSApplication::isOkCupid): Deleted.
854         (WebCore::IOSApplication::isFacebook): Deleted.
855         
856         * rendering/RenderBox.cpp:
857         (WebCore::RenderBox::layoutOverflowRectForPropagation):
858
859 2017-07-08  Brady Eidson  <beidson@apple.com>
860
861         Remove some obsolete RuntimeApplicationChecks.
862         https://bugs.webkit.org/show_bug.cgi?id=174293
863
864         Reviewed by Dan Bernstein.
865
866         No new tests (No change to testable behavior)
867
868         * html/HTMLObjectElement.cpp:
869         (WebCore::HTMLObjectElement::parametersForPlugin):
870         (WebCore::shouldNotPerformURLAdjustment): Deleted.
871
872         * platform/RuntimeApplicationChecks.h:
873         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
874         (WebCore::IOSApplication::isDaijisenDictionary): Deleted.
875         (WebCore::IOSApplication::isNASAHD): Deleted.
876         (WebCore::IOSApplication::isTheEconomistOnIphone): Deleted.
877
878         * platform/ios/wak/WebCoreThread.h:
879         * platform/ios/wak/WebCoreThread.mm:
880         (StartWebThread):
881         (WebThreadSetDelegateSourceRunLoopMode): Deleted.
882
883 2017-07-08  Basuke Suzuki  <Basuke.Suzuki@sony.com>
884
885         [Curl] Safe access and life cycle management of bare Curl handle
886         by wrapping with C++ class
887         https://bugs.webkit.org/show_bug.cgi?id=174002
888
889         Reviewed by Alex Christensen.
890
891         * platform/network/ResourceHandle.h:
892         * platform/network/ResourceHandleInternal.h:
893         * platform/network/curl/CookieJarCurl.cpp:
894         (WebCore::setCookiesFromDOM):
895         (WebCore::cookiesForSession):
896         * platform/network/curl/CurlContext.cpp:
897         (WebCore::CurlContext::CurlContext):
898         (WebCore::CurlContext::~CurlContext):
899         (WebCore::CurlContext::initCookieSession):
900         (WebCore::CurlShareHandle::CurlShareHandle):
901         (WebCore::CurlShareHandle::~CurlShareHandle):
902         (WebCore::CurlShareHandle::lockCallback):
903         (WebCore::CurlShareHandle::unlockCallback):
904         (WebCore::CurlShareHandle::mutexFor):
905         (WebCore::CurlMultiHandle::CurlMultiHandle):
906         (WebCore::CurlMultiHandle::~CurlMultiHandle):
907         (WebCore::CurlMultiHandle::addHandle):
908         (WebCore::CurlMultiHandle::removeHandle):
909         (WebCore::CurlMultiHandle::getFdSet):
910         (WebCore::CurlMultiHandle::perform):
911         (WebCore::CurlMultiHandle::readInfo):
912         (WebCore::CurlHandle::CurlHandle):
913         (WebCore::CurlHandle::~CurlHandle):
914         (WebCore::CurlHandle::perform):
915         (WebCore::CurlHandle::pause):
916         (WebCore::CurlHandle::enableShareHandle):
917         (WebCore::CurlHandle::setPrivateData):
918         (WebCore::CurlHandle::setUrl):
919         (WebCore::CurlHandle::clearUrl):
920         (WebCore::CurlHandle::clearRequestHeaders):
921         (WebCore::CurlHandle::appendRequestHeader):
922         (WebCore::CurlHandle::enableRequestHeaders):
923         (WebCore::CurlHandle::enableHttpGetRequest):
924         (WebCore::CurlHandle::enableHttpHeadRequest):
925         (WebCore::CurlHandle::enableHttpPostRequest):
926         (WebCore::CurlHandle::setPostFields):
927         (WebCore::CurlHandle::setPostFieldLarge):
928         (WebCore::CurlHandle::enableHttpPutRequest):
929         (WebCore::CurlHandle::setInFileSizeLarge):
930         (WebCore::CurlHandle::setHttpCustomRequest):
931         (WebCore::CurlHandle::enableAcceptEncoding):
932         (WebCore::CurlHandle::enableAllowedProtocols):
933         (WebCore::CurlHandle::enableFollowLocation):
934         (WebCore::CurlHandle::enableAutoReferer):
935         (WebCore::CurlHandle::enableHttpAuthentication):
936         (WebCore::CurlHandle::setHttpAuthUserPass):
937         (WebCore::CurlHandle::enableCAInfoIfExists):
938         (WebCore::CurlHandle::setSslVerifyPeer):
939         (WebCore::CurlHandle::setSslVerifyHost):
940         (WebCore::CurlHandle::setSslCert):
941         (WebCore::CurlHandle::setSslCertType):
942         (WebCore::CurlHandle::setSslKeyPassword):
943         (WebCore::CurlHandle::enableCookieJarIfExists):
944         (WebCore::CurlHandle::setCookieList):
945         (WebCore::CurlHandle::getCookieList):
946         (WebCore::CurlHandle::clearCookieList):
947         (WebCore::CurlHandle::enableProxyIfExists):
948         (WebCore::CurlHandle::enableTimeout):
949         (WebCore::CurlHandle::setHeaderCallbackFunction):
950         (WebCore::CurlHandle::setWriteCallbackFunction):
951         (WebCore::CurlHandle::setReadCallbackFunction):
952         (WebCore::CurlHandle::setSslCtxCallbackFunction):
953         (WebCore::CurlHandle::getEffectiveURL):
954         (WebCore::CurlHandle::getPrimaryPort):
955         (WebCore::CurlHandle::getResponseCode):
956         (WebCore::CurlHandle::getContentLenghtDownload):
957         (WebCore::CurlHandle::getHttpAuthAvail):
958         (WebCore::CurlHandle::getTimes):
959         (WebCore::CurlHandle::maxCurlOffT):
960         (WebCore::CurlHandle::expectedSizeOfCurlOffT):
961         (WebCore::CurlHandle::enableVerboseIfUsed):
962         (WebCore::CurlHandle::enableStdErrIfUsed):
963         (WebCore::CurlContext::getEffectiveURL): Deleted.
964         (WebCore::CurlContext::createMultiHandle): Deleted.
965         (WebCore::CurlContext::mutexFor): Deleted.
966         (WebCore::CurlContext::lock): Deleted.
967         (WebCore::CurlContext::unlock): Deleted.
968         * platform/network/curl/CurlContext.h:
969         (WebCore::CurlGlobal::CurlGlobal):
970         (WebCore::CurlGlobal::~CurlGlobal):
971         (WebCore::CurlShareHandle::handle):
972         (WebCore::CurlContext::shareHandle):
973         (WebCore::CurlHandle::handle):
974         (WebCore::CurlHandle::url):
975         (WebCore::CurlContext::curlShareHandle): Deleted.
976         * platform/network/curl/CurlDownload.cpp:
977         (WebCore::CurlDownload::~CurlDownload):
978         (WebCore::CurlDownload::init):
979         (WebCore::CurlDownload::start):
980         (WebCore::CurlDownload::cancel):
981         (WebCore::CurlDownload::getUrl):
982         (WebCore::CurlDownload::addHeaders):
983         (WebCore::CurlDownload::didReceiveHeader):
984         (WebCore::CurlDownload::writeCallback):
985         * platform/network/curl/CurlDownload.h:
986         * platform/network/curl/CurlJobManager.cpp:
987         (WebCore::CurlJobManager::CurlJobManager):
988         (WebCore::CurlJobManager::~CurlJobManager):
989         (WebCore::CurlJobManager::addToCurl):
990         (WebCore::CurlJobManager::removeFromCurl):
991         (WebCore::CurlJobManager::workerThread):
992         * platform/network/curl/CurlJobManager.h:
993         (WebCore::CurlJobManager::getMultiHandle): Deleted.
994         * platform/network/curl/ResourceHandleCurl.cpp:
995         (WebCore::ResourceHandleInternal::~ResourceHandleInternal):
996         (WebCore::ResourceHandle::platformSetDefersLoading):
997         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
998         (WebCore::ResourceHandle::receivedCredential):
999         (WebCore::ResourceHandle::receivedRequestToContinueWithoutCredential):
1000         (WebCore::calculateWebTimingInformations):
1001         (WebCore::handleLocalReceiveResponse):
1002         (WebCore::writeCallback):
1003         (WebCore::getProtectionSpace):
1004         (WebCore::headerCallback):
1005         (WebCore::readCallback):
1006         (WebCore::setupFormData):
1007         (WebCore::ResourceHandle::setupPUT):
1008         (WebCore::ResourceHandle::setupPOST):
1009         (WebCore::ResourceHandle::dispatchSynchronousJob):
1010         (WebCore::ResourceHandle::applyAuthentication):
1011         (WebCore::ResourceHandle::initialize):
1012         (WebCore::ResourceHandle::handleCurlMsg):
1013         * platform/network/curl/ResourceHandleManager.cpp:
1014         (WebCore::ResourceHandleManager::ResourceHandleManager):
1015         (WebCore::ResourceHandleManager::~ResourceHandleManager):
1016         (WebCore::ResourceHandleManager::downloadTimerCallback):
1017         (WebCore::ResourceHandleManager::removeFromCurl):
1018         (WebCore::ResourceHandleManager::startJob):
1019         * platform/network/curl/ResourceHandleManager.h:
1020         * platform/network/curl/SSLHandle.cpp:
1021         (WebCore::setSSLClientCertificate):
1022         (WebCore::certVerifyCallback):
1023         (WebCore::setSSLVerifyOptions):
1024
1025 2017-07-08  Antoine Quint  <graouts@apple.com>
1026
1027         REGRESSION: "visibility:hidden" does not hide play button for video elements
1028         https://bugs.webkit.org/show_bug.cgi?id=174258
1029         <rdar://problem/33181452>
1030
1031         Reviewed by Dean Jackson.
1032
1033         In order to not have most styles from the page affect the shadow root, we set "all: initial" on the
1034         media controls container. However, we need to still make the "visibility" property inherit from its
1035         host such that "visibility: hidden" on the host won't be overridden by setting the property back to
1036         its initial value, which is "visible".
1037
1038         Test: media/modern-media-controls/css/visibility-hidden.html
1039
1040         * Modules/modern-media-controls/controls/media-controls.css:
1041         (.media-controls-container):
1042
1043 2017-07-08  Yusuke Suzuki  <utatane.tea@gmail.com>
1044
1045         Drop NOSNIFF compile flag
1046         https://bugs.webkit.org/show_bug.cgi?id=174289
1047
1048         Reviewed by Michael Catanzaro.
1049
1050         * Configurations/FeatureDefines.xcconfig:
1051         * css/StyleSheetContents.cpp:
1052         (WebCore::StyleSheetContents::parseAuthorStyleSheet):
1053         (WebCore::StyleSheetContents::notifyLoadedSheet):
1054         * dom/LoadableClassicScript.cpp:
1055         (WebCore::LoadableClassicScript::notifyFinished):
1056         * loader/cache/CachedCSSStyleSheet.cpp:
1057         (WebCore::CachedCSSStyleSheet::mimeTypeAllowedByNosniff):
1058         (WebCore::CachedCSSStyleSheet::canUseSheet):
1059         * loader/cache/CachedCSSStyleSheet.h:
1060         * platform/network/HTTPParsers.cpp:
1061         (WebCore::parseContentTypeOptionsHeader):
1062         * platform/network/HTTPParsers.h:
1063         * platform/network/ResourceResponseBase.cpp:
1064         (WebCore::isScriptAllowedByNosniff):
1065         * platform/network/ResourceResponseBase.h:
1066         * workers/WorkerScriptLoader.cpp:
1067         (WebCore::WorkerScriptLoader::didReceiveResponse):
1068
1069 2017-07-07  Brent Fulgham  <bfulgham@apple.com>
1070
1071         [WK2] Use a rolling 30-day uptime for processing statistics
1072         https://bugs.webkit.org/show_bug.cgi?id=174235
1073         <rdar://problem/33164381>
1074
1075         Reviewed by Chris Dumez.
1076
1077         Add a KeyedDecoder specialization for Deque.
1078
1079         * platform/KeyedCoding.h:
1080         (WebCore::KeyedDecoder::decodeObjects):
1081
1082 2017-07-07  Daniel Bates  <dabates@apple.com>
1083
1084         [AppCache] Ignore fallback entries whose namespace is not prefixed with manifest path
1085         https://bugs.webkit.org/show_bug.cgi?id=174273
1086         <rdar://problem/33011682>
1087
1088         Reviewed by Brent Fulgham.
1089
1090         As per <https://html.spec.whatwg.org/multipage/offline.html#parsing-cache-manifests> (07/06/2017)
1091         we should ignore fallback entires whose fallback namespace URL is not prefixed with
1092         the manifest path. For now we only apply this policy when the manifest is served with
1093         a non-standard Content-Type to minimize web compatibility risk.
1094
1095         Test: http/tests/appcache/fallback-namespace-outside-manifest-path.html
1096
1097         * loader/appcache/ApplicationCacheGroup.cpp:
1098         (WebCore::ApplicationCacheGroup::didFinishLoadingManifest): Pass the MIME type of the manifest.
1099         * loader/appcache/ManifestParser.cpp:
1100         (WebCore::manifestPath): Computes the manifest path from a manifest URL.
1101         (WebCore::parseManifest): Modified to take the MIME type of the manifest. If the MIME type is
1102         non-standard (i.e. not text/cached-manifest) then skip fallback entries whose namespace is not
1103         prefixed with the manifest path. Otherwise, process fallback entries as we do now. Also cleaned
1104         up the code a bit while I was here, including renaming a local variable to be more descriptive
1105         and using a const character array for the manifest signature to avoid the need to document the
1106         length of the manifest signature in a comment.
1107         * loader/appcache/ManifestParser.h:
1108
1109 2017-07-07  Wenson Hsieh  <wenson_hsieh@apple.com>
1110
1111         [iOS DnD] For cross-app drags, 'drop' event handlers are never invoked if dataTransfer.dropEffect is not set while dragging
1112         https://bugs.webkit.org/show_bug.cgi?id=174219
1113         <rdar://problem/32083177>
1114
1115         Reviewed by Ryosuke Niwa.
1116
1117         Currently, in DragController.cpp, defaultOperationForDrag maps a drag source operation mask of
1118         DragOperationGeneric to DragOperationMove across all platforms. However, on iOS, where cross-app drag moves do
1119         not trigger a drop, this means drop handlers won't fire unless the dropEffect is explicitly set to copy.
1120
1121         To fix this, we introduce DragController::platformGenericDragOperation(), which returns DragOperationCopy on iOS
1122         and DragOperationMove (the existing behavior) elsewhere. defaultOperationForDrag then maps a drag source
1123         operation mask of DragOperationGeneric to platformGenericDragOperation().
1124
1125         Tests:  DataInteractionTests.ExternalSourceHTMLToUploadArea
1126                 DataInteractionTests.ExternalSourceImageAndHTMLToUploadArea
1127                 DataInteractionTests.ExternalSourceMoveOperationNotAllowed
1128
1129         * page/DragController.cpp:
1130         (WebCore::DragController::platformGenericDragOperation):
1131         (WebCore::defaultOperationForDrag):
1132         * page/DragController.h:
1133         * page/mac/DragControllerMac.mm:
1134         (WebCore::DragController::platformGenericDragOperation):
1135
1136 2017-07-07  Devin Rousso  <drousso@apple.com>
1137
1138         Web Inspector: Show all elements currently using a given CSS Canvas
1139         https://bugs.webkit.org/show_bug.cgi?id=173965
1140
1141         Reviewed by Joseph Pecoraro.
1142
1143         Test: inspector/canvas/css-canvas-clients.html
1144
1145         * css/CSSImageGeneratorValue.cpp:
1146         (WebCore::CSSImageGeneratorValue::addClient):
1147         (WebCore::CSSImageGeneratorValue::removeClient):
1148         * css/CSSImageGeneratorValue.h:
1149         (WebCore::CSSImageGeneratorValue::clients):
1150         * html/HTMLCanvasElement.cpp:
1151         (WebCore::HTMLCanvasElement::addObserver):
1152         (WebCore::HTMLCanvasElement::removeObserver):
1153         (WebCore::HTMLCanvasElement::cssCanvasClients):
1154         Each time an observer is added/removed for a given HTMLCanvasElement, send an event to the
1155         inspector frontend that the CSS canvas client nodes have changed. Additionally, anytime a
1156         client/use is added/removed from one of the observing CSSCanvasValue, fire the same event.
1157
1158         * css/CSSCanvasValue.h:
1159         (isType):
1160         * html/HTMLCanvasElement.h:
1161         (WebCore::CanvasObserver::isCSSCanvasValueObserver):
1162         Allows type traits to distinguish CanvasObserver from CSSCanvasValue::CanvasObserverProxy.
1163
1164         * inspector/InspectorCanvasAgent.h:
1165         * inspector/InspectorCanvasAgent.cpp:
1166         (WebCore::InspectorCanvasAgent::requestCSSCanvasClientNodes):
1167         (WebCore::InspectorCanvasAgent::didChangeCSSCanvasClientNodes):
1168         * inspector/InspectorInstrumentation.h:
1169         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodes):
1170         * inspector/InspectorInstrumentation.cpp:
1171         (WebCore::InspectorInstrumentation::didChangeCSSCanvasClientNodesImpl):
1172         Notify the frontend that the list of client nodes has changed for the given canvas. Let the
1173         frontend request the actual list of node IDs when it needs, possibly at a later time.
1174
1175 2017-07-07  Jer Noble  <jer.noble@apple.com>
1176
1177         AVPlayer can continue to be active after released by MediaPlayerPrivateAVFoundationObjC.
1178         https://bugs.webkit.org/show_bug.cgi?id=174264
1179
1180         Reviewed by Eric Carlson.
1181
1182         If the AVPlayer is retained (by an autorelease pool, or internally by other objects in
1183         AVFoundation), releasing the AVPlayer is not enough to cancel loading or playback. So before
1184         releasing the AVPlayer, make sure to disassociate the current AVPlayerItem, which should
1185         cancel all activity in the AVPlayer.
1186
1187         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1188         (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad):
1189
1190 2017-07-07  Basuke Suzuki  <Basuke.Suzuki@sony.com>
1191
1192         [Curl] Remove data url handler for async load
1193         https://bugs.webkit.org/show_bug.cgi?id=174263
1194
1195         data url is handled by ResourceLoader. No need for specific handling
1196         in platform dependent layer.
1197
1198         Reviewed by Alex Christensen.
1199
1200         * platform/network/curl/ResourceHandleManager.cpp:
1201         (WebCore::ResourceHandleManager::startJob):
1202
1203 2017-07-07  Matt Lewis  <jlewis3@apple.com>
1204
1205         Unreviewed, rolling out r219257.
1206
1207         The test added in the revision was still extreamly flaky on
1208         all testers.
1209
1210         Reverted changeset:
1211
1212         "[SVG] Leak in SVGAnimatedListPropertyTearOff"
1213         https://bugs.webkit.org/show_bug.cgi?id=172545
1214         http://trac.webkit.org/changeset/219257
1215
1216 2017-07-07  Commit Queue  <commit-queue@webkit.org>
1217
1218         Unreviewed, rolling out r219238, r219239, and r219241.
1219         https://bugs.webkit.org/show_bug.cgi?id=174265
1220
1221         "fast/workers/dedicated-worker-lifecycle.html is flaky"
1222         (Requested by yusukesuzuki on #webkit).
1223
1224         Reverted changesets:
1225
1226         "[WTF] Implement WTF::ThreadGroup"
1227         https://bugs.webkit.org/show_bug.cgi?id=174081
1228         http://trac.webkit.org/changeset/219238
1229
1230         "Unreviewed, build fix after r219238"
1231         https://bugs.webkit.org/show_bug.cgi?id=174081
1232         http://trac.webkit.org/changeset/219239
1233
1234         "Unreviewed, CLoop build fix after r219238"
1235         https://bugs.webkit.org/show_bug.cgi?id=174081
1236         http://trac.webkit.org/changeset/219241
1237
1238 2017-05-24  Sergio Villar Senin  <svillar@igalia.com>
1239
1240         [SVG] Leak in SVGAnimatedListPropertyTearOff
1241         https://bugs.webkit.org/show_bug.cgi?id=172545
1242
1243         Reviewed by Said Abou-Hallawa.
1244
1245         SVGAnimatedListPropertyTearOff maintains a vector m_wrappers with references to
1246         SVGPropertyTraits<PropertyType>::ListItemTearOff. Apart from that SVGPropertyTearOff has a
1247         reference to SVGAnimatedProperty.
1248
1249         When SVGListProperty::getItemValuesAndWrappers() is called, it creates a
1250         SVGPropertyTraits<PropertyType>::ListItemTearOff pointing to the same SVGAnimatedProperty (a
1251         SVGAnimatedListPropertyTearOff) which stores the m_wrappers vector where the ListItemTearOff
1252         is going to be added to. This effectively creates a reference cycle between the
1253         SVGAnimatedListPropertyTearOff and all the ListItemTearOff it stores in m_wrappers.
1254
1255         We should detach those wrappers in propertyWillBeDeleted() in order to break the cycle.
1256
1257         * svg/properties/SVGAnimatedListPropertyTearOff.h:
1258
1259 2017-07-07  Charlie Turner  <cturner@igalia.com>
1260
1261         [GStreamer] vid.me videos do not play
1262         https://bugs.webkit.org/show_bug.cgi?id=172240
1263
1264         Reviewed by Xabier Rodriguez-Calvar.
1265
1266         In r142251, code to hide the WK HTTP source elements from elsewhere in
1267         the pipeline was removed. This has the nasty side-effect of
1268         auto-plugging the WK HTTP source into things it really should not be
1269         used in, especially the adaptive streaming demuxers. The reasons this
1270         is bad are documented in several places on Bugzilla, see the parent
1271         bug report for more details. The high-level issue is that the WK HTTP
1272         source and its use of WebCore is not thread-safe. Although work has
1273         been recently done to improve this situation, it's still not perfect.
1274
1275         Another issue is the interface hlsdemux expects its HTTP source to
1276         implement, specifically seeking in READY.
1277
1278         This does rely on HTTP context sharing being available in GStreamer,
1279         upstream bug is here:
1280         https://bugzilla.gnome.org/show_bug.cgi?id=761099. The failing case
1281         can be demonstrated with
1282         https://github.com/thiagoss/adaptive-test-server but manual testing on
1283         popular video hosting sites, including vid.me, shows that this doesn't
1284         bite us at the moment, just something else to fix in the future.
1285
1286         There are some QoS issues with the adaptive streaming code in
1287         GStreamer, but it seems much better to offer a below par QoS in lieu
1288         of crashing/livelocking when playing certain streams, and issues can be
1289         raised upstream when they arise.
1290
1291         This patch does take us further away from the future goal of having all
1292         networking operations go through the network process, but in return it
1293         solves some nasty crashes and livelocks that have been irritating
1294         users for some time. With the pressure off on this issue, work can be
1295         planned to consider how to make the WK HTTP source a better citizen
1296         inside the GStreamer pipeline when we migrate the netcode to go
1297         through the network process.
1298
1299         A new test is added to check that the single file HLS playlists
1300         (new in version 4) can be played, which was the primary cause of
1301         this bug report.
1302
1303         Test: http/tests/media/hls/range-request.html
1304
1305         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1306         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL): Perform
1307         some trickery to make sure that we only ever fetch URLs handed to
1308         us by WebCore. Any further URLs discovered inside the pipeline
1309         will not get WKWS auto-plugged, since they'll be plain https?
1310         schemas.
1311         (WebCore::MediaPlayerPrivateGStreamer::load): Refactor to use the
1312         setPlaybinURL helper method.
1313         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation): Ditto.
1314         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add
1315         the setPlaybinURL helper method.
1316         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
1317         (webKitWebSrcGetProtocols): Only advertise webkit+https?, this
1318         ensures we won't get auto-plugged by pipeline elements asking for
1319         an element to fetch https? resources (like adaptive demuxers).
1320         (convertPlaybinURI): Undo the trick when another element asks us
1321         for our URI.
1322
1323 2017-07-05  Yusuke Suzuki  <utatane.tea@gmail.com>
1324
1325         [WTF] Implement WTF::ThreadGroup
1326         https://bugs.webkit.org/show_bug.cgi?id=174081
1327
1328         Reviewed by Mark Lam.
1329
1330         * page/ResourceUsageThread.h:
1331
1332 2017-07-06  Yusuke Suzuki  <utatane.tea@gmail.com>
1333
1334         [WTF] Clean up StringStatics.cpp by using LazyNeverDestroyed<> for Atoms
1335         https://bugs.webkit.org/show_bug.cgi?id=174150
1336
1337         Reviewed by Mark Lam.
1338
1339         * Modules/mediacontrols/MediaControlsHost.cpp:
1340         (WebCore::MediaControlsHost::captionDisplayMode):
1341         * Modules/mediastream/RTCDataChannel.cpp:
1342         (WebCore::RTCDataChannel::binaryType):
1343         * accessibility/AXObjectCache.cpp:
1344         (WebCore::createFromRenderer):
1345         * accessibility/AccessibilityMediaControls.cpp:
1346         (WebCore::AccessibilityMediaControl::controlTypeName):
1347         * accessibility/AccessibilityObject.cpp:
1348         (WebCore::AccessibilityObject::language):
1349         (WebCore::AccessibilityObject::defaultLiveRegionStatusForRole):
1350         (WebCore::AccessibilityObject::actionVerb):
1351         (WebCore::AccessibilityObject::getAttribute):
1352         (WebCore::AccessibilityObject::placeholderValue):
1353         * accessibility/AccessibilityObject.h:
1354         (WebCore::AccessibilityObject::accessKey):
1355         (WebCore::AccessibilityObject::ariaLiveRegionRelevant):
1356         * accessibility/AccessibilityRenderObject.cpp:
1357         (WebCore::AccessibilityRenderObject::accessKey):
1358         (WebCore::AccessibilityRenderObject::actionVerb):
1359         * bindings/js/JSCustomElementInterface.cpp:
1360         (WebCore::JSCustomElementInterface::constructElementWithFallback):
1361         * bindings/js/JSCustomElementRegistryCustom.cpp:
1362         (WebCore::JSCustomElementRegistry::define):
1363         * bindings/scripts/CodeGeneratorJS.pm:
1364         (GenerateDefaultValue):
1365         * bindings/scripts/test/JS/JSTestObj.cpp:
1366         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringBody):
1367         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNullBody):
1368         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyStringBody):
1369         * css/CSSPageRule.cpp:
1370         (WebCore::CSSPageRule::selectorText):
1371         * css/CSSPrimitiveValue.cpp:
1372         (WebCore::valueName):
1373         * css/CSSSelector.cpp:
1374         (WebCore::simpleSelectorSpecificityInternal):
1375         (WebCore::CSSSelector::specificityForPage):
1376         (WebCore::CSSSelector::RareData::RareData):
1377         * css/CSSSelector.h:
1378         (WebCore::CSSSelector::argument):
1379         * css/CSSSelectorList.cpp:
1380         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
1381         * css/PageRuleCollector.cpp:
1382         (WebCore::checkPageSelectorComponents):
1383         * css/RuleSet.cpp:
1384         (WebCore::computeMatchBasedOnRuleHash):
1385         (WebCore::RuleSet::addRule):
1386         * css/SelectorChecker.cpp:
1387         (WebCore::tagMatches):
1388         * css/SelectorFilter.cpp:
1389         (WebCore::collectDescendantSelectorIdentifierHashes):
1390         * css/StyleBuilderConverter.h:
1391         (WebCore::StyleBuilderConverter::convertStringOrAuto):
1392         (WebCore::StyleBuilderConverter::convertStringOrNone):
1393         * css/StyleBuilderCustom.h:
1394         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
1395         (WebCore::StyleBuilderCustom::applyValueWebkitTextEmphasisStyle):
1396         (WebCore::StyleBuilderCustom::applyValueContent):
1397         (WebCore::StyleBuilderCustom::applyValueAlt):
1398         * css/StyleSheetContents.cpp:
1399         (WebCore::StyleSheetContents::StyleSheetContents):
1400         (WebCore::StyleSheetContents::namespaceURIFromPrefix):
1401         * css/makeprop.pl:
1402         * css/parser/CSSParserImpl.cpp:
1403         (WebCore::CSSParserImpl::parsePageSelector):
1404         * css/parser/CSSSelectorParser.cpp:
1405         (WebCore::CSSSelectorParser::consumeCompoundSelector):
1406         (WebCore::CSSSelectorParser::consumeName):
1407         (WebCore::CSSSelectorParser::consumeAttribute):
1408         (WebCore::CSSSelectorParser::defaultNamespace):
1409         (WebCore::CSSSelectorParser::determineNamespace):
1410         (WebCore::CSSSelectorParser::prependTypeSelectorIfNeeded):
1411         * cssjit/SelectorCompiler.cpp:
1412         (WebCore::SelectorCompiler::attributeNameTestingRequiresNamespaceRegister):
1413         (WebCore::SelectorCompiler::equalTagNames):
1414         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
1415         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName):
1416         * dom/Attr.cpp:
1417         (WebCore::Attr::setPrefix):
1418         (WebCore::Attr::attachToElement):
1419         * dom/Attribute.h:
1420         (WebCore::Attribute::nameMatchesFilter):
1421         * dom/ConstantPropertyMap.cpp:
1422         (WebCore::ConstantPropertyMap::nameForProperty):
1423         * dom/ContainerNode.cpp:
1424         (WebCore::ContainerNode::getElementsByTagName):
1425         (WebCore::ContainerNode::getElementsByTagNameNS):
1426         * dom/CustomElementReactionQueue.cpp:
1427         (WebCore::CustomElementReactionQueue::enqueuePostUpgradeReactions):
1428         * dom/DatasetDOMStringMap.cpp:
1429         (WebCore::convertPropertyNameToAttributeName):
1430         * dom/Document.cpp:
1431         (WebCore::createUpgradeCandidateElement):
1432         (WebCore::Document::createElementForBindings):
1433         (WebCore::Document::importNode):
1434         (WebCore::Document::hasValidNamespaceForElements):
1435         (WebCore::Document::processBaseElement):
1436         (WebCore::Document::dir):
1437         (WebCore::Document::bgColor):
1438         (WebCore::Document::fgColor):
1439         (WebCore::Document::alinkColor):
1440         (WebCore::Document::linkColorForBindings):
1441         (WebCore::Document::vlinkColor):
1442         * dom/Document.h:
1443         * dom/Element.cpp:
1444         (WebCore::Element::setBooleanAttribute):
1445         (WebCore::Element::synchronizeAttribute):
1446         (WebCore::Element::getAttribute):
1447         (WebCore::Element::getAttributeNS):
1448         (WebCore::Element::setAttribute):
1449         (WebCore::Element::parserSetAttributes):
1450         (WebCore::Element::didMoveToNewDocument):
1451         (WebCore::Element::setPrefix):
1452         (WebCore::Element::insertedInto):
1453         (WebCore::Element::removedFrom):
1454         (WebCore::Element::removeAttributeInternal):
1455         (WebCore::Element::addAttributeInternal):
1456         (WebCore::Element::removeAttributeNS):
1457         (WebCore::Element::getAttributeNodeNS):
1458         (WebCore::Element::hasAttributeNS):
1459         (WebCore::Element::computeInheritedLanguage):
1460         (WebCore::Element::updateNameForDocument):
1461         (WebCore::Element::updateIdForDocument):
1462         (WebCore::Element::didAddAttribute):
1463         (WebCore::Element::didRemoveAttribute):
1464         (WebCore::Element::cloneAttributesFromElement):
1465         * dom/Element.h:
1466         (WebCore::Element::attributeWithoutSynchronization):
1467         (WebCore::Element::idForStyleResolution):
1468         (WebCore::Element::getIdAttribute):
1469         (WebCore::Element::getNameAttribute):
1470         * dom/EventTarget.cpp:
1471         (WebCore::legacyType):
1472         * dom/MutationRecord.h:
1473         (WebCore::MutationRecord::attributeName):
1474         (WebCore::MutationRecord::attributeNamespace):
1475         * dom/NamedNodeMap.cpp:
1476         (WebCore::NamedNodeMap::removeNamedItemNS):
1477         * dom/Node.cpp:
1478         (WebCore::Node::prefix):
1479         (WebCore::Node::localName):
1480         (WebCore::Node::namespaceURI):
1481         (WebCore::Node::checkSetPrefix):
1482         (WebCore::locateDefaultNamespace):
1483         (WebCore::Node::isDefaultNamespace):
1484         (WebCore::Node::lookupNamespaceURI):
1485         (WebCore::locateNamespacePrefix):
1486         (WebCore::Node::lookupPrefix):
1487         * dom/NodeRareData.h:
1488         (WebCore::NodeListsNodeData::addCachedTagCollectionNS):
1489         (WebCore::NodeListsNodeData::addCachedCollection):
1490         (WebCore::NodeListsNodeData::cachedCollection):
1491         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
1492         (WebCore::NodeListsNodeData::removeCachedTagCollectionNS):
1493         (WebCore::NodeListsNodeData::removeCachedCollection):
1494         * dom/PseudoElement.cpp:
1495         (WebCore::pseudoElementTagName):
1496         * dom/QualifiedName.cpp:
1497         (WebCore::QualifiedName::init):
1498         (WebCore::nullQName):
1499         (WebCore::createQualifiedName):
1500         * dom/QualifiedName.h:
1501         (WebCore::QualifiedName::hasPrefix):
1502         * dom/SelectorQuery.cpp:
1503         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
1504         * dom/SlotAssignment.cpp:
1505         (WebCore::slotNameFromAttributeValue):
1506         * dom/SlotAssignment.h:
1507         (WebCore::SlotAssignment::defaultSlotName):
1508         (WebCore::ShadowRoot::didRemoveAllChildrenOfShadowHost):
1509         (WebCore::ShadowRoot::didChangeDefaultSlot):
1510         * dom/TagCollection.cpp:
1511         (WebCore::TagCollection::TagCollection):
1512         (WebCore::HTMLTagCollection::HTMLTagCollection):
1513         * dom/TagCollection.h:
1514         (WebCore::TagCollectionNS::elementMatches):
1515         * dom/make_names.pl:
1516         (printNamesCppFile):
1517         (printDefinitions):
1518         (printFactoryCppFile):
1519         * editing/CompositeEditCommand.cpp:
1520         (WebCore::CompositeEditCommand::removeNodeAttribute):
1521         * editing/Editing.cpp:
1522         (WebCore::createHTMLElement):
1523         * editing/MarkupAccumulator.cpp:
1524         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
1525         (WebCore::MarkupAccumulator::shouldAddNamespaceElement):
1526         (WebCore::MarkupAccumulator::shouldAddNamespaceAttribute):
1527         (WebCore::MarkupAccumulator::appendNamespace):
1528         (WebCore::MarkupAccumulator::appendOpenTag):
1529         (WebCore::MarkupAccumulator::appendAttribute):
1530         * editing/gtk/EditorGtk.cpp:
1531         (WebCore::elementURL):
1532         * editing/markup.cpp:
1533         (WebCore::AttributeChange::AttributeChange):
1534         * html/Autocapitalize.cpp:
1535         (WebCore::stringForAutocapitalizeType):
1536         * html/Autofill.cpp:
1537         (WebCore::AutofillData::createFromHTMLFormControlElement):
1538         * html/DOMTokenList.h:
1539         (WebCore::DOMTokenList::item):
1540         * html/FormAssociatedElement.cpp:
1541         (WebCore::FormAssociatedElement::name):
1542         * html/HTMLButtonElement.cpp:
1543         (WebCore::HTMLButtonElement::formControlType):
1544         * html/HTMLDetailsElement.cpp:
1545         (WebCore::HTMLDetailsElement::toggleOpen):
1546         * html/HTMLDocument.cpp:
1547         (WebCore::HTMLDocument::isCaseSensitiveAttribute):
1548         * html/HTMLElement.cpp:
1549         (WebCore::HTMLElement::eventNameForEventHandlerAttribute):
1550         (WebCore::toValidDirValue):
1551         * html/HTMLImageElement.cpp:
1552         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
1553         * html/HTMLInputElement.cpp:
1554         (WebCore::HTMLInputElement::name):
1555         (WebCore::HTMLInputElement::updateType):
1556         * html/HTMLMediaElement.cpp:
1557         (WebCore::HTMLMediaElement::doesHaveAttribute):
1558         * html/HTMLOptionElement.cpp:
1559         (WebCore::HTMLOptionElement::createForJSConstructor):
1560         * html/HTMLParamElement.cpp:
1561         (WebCore::HTMLParamElement::name):
1562         * html/HTMLSelectElement.cpp:
1563         (WebCore::HTMLSelectElement::setMultiple):
1564         * html/HTMLTableCellElement.cpp:
1565         (WebCore::HTMLTableCellElement::scope):
1566         * html/HTMLTrackElement.cpp:
1567         (WebCore::HTMLTrackElement::mediaElementCrossOriginAttribute):
1568         * html/LabelableElement.cpp:
1569         (WebCore::LabelableElement::labels):
1570         * html/LabelsNodeList.cpp:
1571         (WebCore::LabelsNodeList::~LabelsNodeList):
1572         * html/MediaController.cpp:
1573         (MediaController::playbackState):
1574         (eventNameForReadyState):
1575         * html/MediaDocument.cpp:
1576         (WebCore::MediaDocumentParser::createDocumentStructure):
1577         * html/parser/AtomicHTMLToken.h:
1578         (WebCore::AtomicHTMLToken::initializeAttributes):
1579         * html/parser/HTMLConstructionSite.cpp:
1580         (WebCore::HTMLConstructionSite::createElement):
1581         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
1582         * html/parser/HTMLParserIdioms.cpp:
1583         (WebCore::stripLeadingAndTrailingHTMLSpaces):
1584         (WebCore::parseHTMLHashNameReference):
1585         * html/parser/HTMLTreeBuilder.cpp:
1586         (WebCore::createForeignAttributesMap):
1587         * html/track/InbandTextTrack.cpp:
1588         (WebCore::InbandTextTrack::InbandTextTrack):
1589         * html/track/LoadableTextTrack.cpp:
1590         (WebCore::LoadableTextTrack::id):
1591         * html/track/TextTrack.cpp:
1592         (WebCore::TextTrack::captionMenuOffItem):
1593         (WebCore::TextTrack::captionMenuAutomaticItem):
1594         * html/track/TrackBase.cpp:
1595         (WebCore::MediaTrackBase::setKindInternal):
1596         * html/track/VTTRegion.cpp:
1597         (WebCore::VTTRegion::scroll):
1598         * html/track/WebVTTElement.cpp:
1599         (WebCore::nodeTypeToTagName):
1600         * html/track/WebVTTElement.h:
1601         * html/track/WebVTTToken.h:
1602         (WebCore::WebVTTToken::StartTag):
1603         * loader/FrameLoader.cpp:
1604         (WebCore::FrameLoader::clear):
1605         * loader/FrameLoader.h:
1606         * loader/ImageLoader.cpp:
1607         (WebCore::ImageLoader::clearFailedLoadURL):
1608         * loader/NavigationAction.h:
1609         * loader/PolicyChecker.cpp:
1610         (WebCore::PolicyChecker::checkNavigationPolicy):
1611         * page/DOMWindow.cpp:
1612         (WebCore::DOMWindow::showModalDialog):
1613         * page/EventHandler.cpp:
1614         (WebCore::eventNameForTouchPointState):
1615         * page/FrameTree.cpp:
1616         (WebCore::FrameTree::setName):
1617         (WebCore::FrameTree::clearName):
1618         * page/Page.cpp:
1619         (WebCore::Page::groupName):
1620         * platform/graphics/ComplexTextController.cpp:
1621         (WebCore::ComplexTextController::offsetForPosition):
1622         * platform/graphics/FontCache.cpp:
1623         (WebCore::FontCache::alternateFamilyName):
1624         * platform/graphics/FontDescription.h:
1625         (WebCore::FontCascadeDescription::initialLocale):
1626         * platform/graphics/FontGenericFamilies.cpp:
1627         (WebCore::genericFontFamilyForScript):
1628         * platform/graphics/InbandTextTrackPrivate.h:
1629         (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType):
1630         * platform/graphics/TrackPrivateBase.h:
1631         (WebCore::TrackPrivateBase::id):
1632         (WebCore::TrackPrivateBase::label):
1633         (WebCore::TrackPrivateBase::language):
1634         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
1635         (WebCore::AVTrackPrivateAVFObjCImpl::id):
1636         (WebCore::AVTrackPrivateAVFObjCImpl::label):
1637         (WebCore::AVTrackPrivateAVFObjCImpl::language):
1638         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
1639         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
1640         (WebCore::InbandTextTrackPrivateAVCF::label):
1641         (WebCore::InbandTextTrackPrivateAVCF::language):
1642         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp:
1643         (WebCore::InbandTextTrackPrivateLegacyAVCF::label):
1644         (WebCore::InbandTextTrackPrivateLegacyAVCF::language):
1645         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
1646         (WebCore::InbandTextTrackPrivateAVFObjC::label):
1647         (WebCore::InbandTextTrackPrivateAVFObjC::language):
1648         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
1649         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label):
1650         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::language):
1651         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
1652         (WebCore::metadataType):
1653         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
1654         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1655         (WebCore::FontCache::platformAlternateFamilyName):
1656         * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
1657         (WebCore::FontCascadeDescription::effectiveFamilyAt):
1658         * platform/graphics/freetype/FontCacheFreeType.cpp:
1659         (WebCore::FontCache::platformAlternateFamilyName):
1660         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
1661         (WebCore::InbandMetadataTextTrackPrivateGStreamer::create):
1662         * platform/graphics/win/FontCacheWin.cpp:
1663         (WebCore::FontCache::platformAlternateFamilyName):
1664         * platform/mediastream/AudioTrackPrivateMediaStream.h:
1665         * platform/mediastream/RealtimeMediaSourceSettings.cpp:
1666         (WebCore::RealtimeMediaSourceSettings::facingMode):
1667         * platform/mediastream/VideoTrackPrivateMediaStream.h:
1668         * rendering/HitTestResult.cpp:
1669         (WebCore::HitTestResult::linkSuggestedFilename):
1670         * rendering/InlineTextBox.cpp:
1671         (WebCore::InlineTextBox::paint):
1672         * rendering/RenderListItem.cpp:
1673         (WebCore::RenderListItem::markerText):
1674         * rendering/RenderText.cpp:
1675         (WebCore::RenderText::previousOffset):
1676         (WebCore::RenderText::nextOffset):
1677         * rendering/RenderTreeAsText.cpp:
1678         (WebCore::RenderTreeAsText::writeRenderObject):
1679         * rendering/TextPainter.cpp:
1680         (WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
1681         * rendering/style/RenderStyle.cpp:
1682         (WebCore::RenderStyle::textEmphasisMarkString):
1683         * rendering/style/RenderStyle.h:
1684         (WebCore::RenderStyle::initialHyphenationString):
1685         (WebCore::RenderStyle::initialTextEmphasisCustomMark):
1686         (WebCore::RenderStyle::initialContentAltText):
1687         (WebCore::RenderStyle::initialLineGrid):
1688         (WebCore::RenderStyle::initialFlowThread):
1689         (WebCore::RenderStyle::initialRegionThread):
1690         * style/StyleScope.cpp:
1691         (WebCore::Style::Scope::collectActiveStyleSheets):
1692         * svg/SVGElement.cpp:
1693         (WebCore::SVGElement::getPresentationAttribute):
1694         * svg/SVGElement.h:
1695         (WebCore::SVGAttributeHashTranslator::hash):
1696         * svg/SVGUseElement.cpp:
1697         (WebCore::SVGUseElement::transferSizeAttributesToTargetClone):
1698         * svg/animation/SVGSMILElement.cpp:
1699         (WebCore::SVGSMILElement::constructAttributeName):
1700         * testing/MockCDMFactory.cpp:
1701         (WebCore::MockCDMInstance::requestLicense):
1702         * xml/XMLErrors.cpp:
1703         (WebCore::createXHTMLParserErrorHeader):
1704         * xml/XPathStep.cpp:
1705         (WebCore::XPath::nodeMatchesBasicTest):
1706         (WebCore::XPath::Step::nodesInAxis):
1707         * xml/parser/XMLDocumentParserLibxml2.cpp:
1708         (WebCore::XMLDocumentParser::XMLDocumentParser):
1709         (WebCore::handleNamespaceAttributes):
1710         (WebCore::handleElementAttributes):
1711
1712 2017-07-06  Chris Dumez  <cdumez@apple.com>
1713
1714         Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadObserver
1715         https://bugs.webkit.org/show_bug.cgi?id=174234
1716
1717         Reviewed by Brent Fulgham.
1718
1719         Drop unnecessary uses of targetStatistics.dataRecordsRemoved in ResourceLoadObserver. It is
1720         always 0 since this member is only initialized later on, in the UIProcess.
1721
1722         * loader/ResourceLoadObserver.cpp:
1723         (WebCore::ResourceLoadObserver::logFrameNavigation):
1724         (WebCore::ResourceLoadObserver::logSubresourceLoading):
1725         (WebCore::ResourceLoadObserver::logWebSocketLoading):
1726
1727 2017-07-06  Yoav Weiss  <yoav@yoav.ws>
1728
1729         [preload] Avoid reflecting "video" and "audio" when they are not supported `as` value
1730         https://bugs.webkit.org/show_bug.cgi?id=174199
1731
1732         Reviewed by Youenn Fablet.
1733
1734         No new tests as video/audio is supported in tests. I tested this manually.
1735
1736         * html/HTMLLinkElement.cpp:
1737         (WebCore::HTMLLinkElement::as): Make sure "video" and "audio" will not be reflected when they are not supported.
1738
1739 2017-07-06  Chris Dumez  <cdumez@apple.com>
1740
1741         Drop unused ResourceLoadStatistics members
1742         https://bugs.webkit.org/show_bug.cgi?id=174226
1743
1744         Reviewed by Brent Fulgham.
1745
1746         * loader/ResourceLoadObserver.cpp:
1747         (WebCore::ResourceLoadObserver::logFrameNavigation):
1748         (WebCore::ResourceLoadObserver::logSubresourceLoading):
1749         (WebCore::ResourceLoadObserver::logWebSocketLoading):
1750         (WebCore::ResourceLoadObserver::isPrevalentResource): Deleted.
1751         * loader/ResourceLoadObserver.h:
1752         * loader/ResourceLoadStatistics.cpp:
1753         (WebCore::ResourceLoadStatistics::encode):
1754         (WebCore::ResourceLoadStatistics::decode):
1755         (WebCore::ResourceLoadStatistics::toString):
1756         (WebCore::ResourceLoadStatistics::merge):
1757         * loader/ResourceLoadStatistics.h:
1758
1759 2017-07-06  Youenn Fablet  <youenn@apple.com>
1760
1761         Rendering of WebRTC audio in AudioSampleDataSource may trigger crackles
1762         https://bugs.webkit.org/show_bug.cgi?id=174223
1763
1764         Reviewed by Eric Carlson.
1765
1766         We try reading too quickly and need to back off a little bit if we do not enough data.
1767         This only affects real audio and not web audio, hence validated through manual testing only.
1768
1769         * platform/audio/mac/AudioSampleDataSource.mm:
1770         (WebCore::AudioSampleDataSource::pullSamplesInternal):
1771
1772 2017-07-06  Sam Weinig  <sam@webkit.org>
1773
1774         [WebIDL] Remove custom bindings for WebGL code dealing with WebGL extensions
1775         https://bugs.webkit.org/show_bug.cgi?id=174186
1776
1777         Reviewed by Alex Christensen.
1778
1779         * CMakeLists.txt:
1780         * WebCore.xcodeproj/project.pbxproj:
1781         Update files. Categorize some of the remaining custom bindings into groups.
1782
1783         * bindings/IDLTypes.h:
1784         Add a IDLWebGLExtension type, to model the special WebGLExtension type. In
1785         the future, WebGLExtension can probably be replaced by a Variant.
1786         
1787         * bindings/js/JSDOMConvertWebGL.cpp: Added.
1788         Move WebGLAny's convertToJSValue and add a convertToJSValue for WebGLExtension.
1789
1790         * bindings/js/JSDOMConvertWebGL.h:
1791         (WebCore::convertToJSValue):
1792         Since WebGLExtension is a wrapper type, we need both a pointer and reference variant
1793         of the conversion.
1794
1795         (WebCore::JSConverter<IDLWebGLExtension>::convert):
1796         Added.
1797
1798         * bindings/js/JSWebGL2RenderingContextCustom.cpp:
1799         (WebCore::toJS): Deleted.
1800         (WebCore::JSWebGL2RenderingContext::getExtension): Deleted.
1801         Remove custom operation and converter.
1802
1803         * bindings/js/JSWebGLRenderingContextCustom.cpp:
1804         (WebCore::toJS): Deleted.
1805         (WebCore::JSWebGLRenderingContext::getExtension): Deleted.
1806         Remove custom operation and converter.
1807
1808         * bindings/scripts/CodeGeneratorJS.pm:
1809         (AddToIncludesForIDLType):
1810         (NativeToJSValueDOMConvertNeedsState):
1811         (NativeToJSValueDOMConvertNeedsGlobalObject):
1812         Add support for IDLWebGLExtension.
1813
1814         * html/canvas/WebGLAny.cpp: Removed.
1815         * html/canvas/WebGLAny.h:
1816         Moved convertToJSValue to the bindings where it belongs.
1817
1818         * html/canvas/WebGLRenderingContextBase.idl:
1819         Annotate getExtension with [OverrideIDLType=IDLWebGLExtension].
1820
1821 2017-07-06  Joseph Pecoraro  <pecoraro@apple.com>
1822
1823         [Cocoa] CTParagraphStyle leak under WebCore::LinkImageLayout::LinkImageLayout
1824         https://bugs.webkit.org/show_bug.cgi?id=174228
1825
1826         Reviewed by Andreas Kling.
1827
1828         * platform/mac/DragImageMac.mm:
1829         (WebCore::LinkImageLayout::LinkImageLayout):
1830
1831 2017-07-06  Myles C. Maxfield  <mmaxfield@apple.com>
1832
1833         [Cocoa] Improve performance of font lookups
1834         https://bugs.webkit.org/show_bug.cgi?id=173960
1835         <rdar://problem/31996891>
1836
1837         Reviewed by Darin Adler.
1838
1839         Looking up kCTFontPostScriptNameAttribute is faster than kCTFontNameAttribute.
1840
1841         No new tests because there is no behavior change.
1842
1843         * platform/spi/cocoa/CoreTextSPI.h:
1844         * platform/graphics/cocoa/FontCacheCoreText.cpp:
1845         (WebCore::FontDatabase::fontForPostScriptName):
1846
1847 2017-07-06  Myles C. Maxfield  <mmaxfield@apple.com>
1848
1849         REGRESSION(r216944): Font loads can cause Chinese characters to draw as .notdef
1850         https://bugs.webkit.org/show_bug.cgi?id=173962
1851         <rdar://problem/32925318>
1852
1853         Reviewed by Simon Fraser.
1854
1855         Previously, there was no signalling between our font loading code
1856         which determined whether or not a font should be invisible (because
1857         its in the middle of loading) and our system fallback code which
1858         created fonts when we fall off the end of the fallback list. Because
1859         of this, we were doing two things wrong:
1860
1861         1. When we started downloading a font, we would try to use a fallback
1862         font. However, if the fallback font didn't suppor the character we're
1863         trying to render, we would just bail and draw .notdef
1864         2. Even if we continued down the fallback list, and fell of the end,
1865         we wouldn't realize that the system fallback font should also be drawn
1866         as invisible.
1867
1868         This patch solves these two problems by:
1869         1. Performing a search to find the best (local) fallback font with
1870         which to fall systemFallbackFontForCharacter(). This way, if you say
1871         "font-family: 'RemoteFont', 'Helvetica'" we will use Helvetica as
1872         the lookup to ask the system to search for.
1873         2. Give the Font class an accessor which can create a duplicate, but
1874         invisible font. Give FontCascadeFonts::glyphDataForVariant() the
1875         correct tracking to know when to use this invisible duplicate.
1876
1877         Tests: fast/text/font-loading-system-fallback.html
1878                http/tests/webfont/font-loading-system-fallback-visibility.html
1879
1880         * platform/graphics/Font.cpp:
1881         (WebCore::Font::invisibleFont):
1882         * platform/graphics/Font.h:
1883         * platform/graphics/FontCascadeFonts.cpp:
1884         (WebCore::findBestFallbackFont):
1885         (WebCore::FontCascadeFonts::glyphDataForSystemFallback):
1886         (WebCore::FontCascadeFonts::glyphDataForVariant):
1887         * platform/graphics/FontCascadeFonts.h:
1888
1889 2017-07-06  Chris Dumez  <cdumez@apple.com>
1890
1891         FileMonitor should not be ref counted
1892         https://bugs.webkit.org/show_bug.cgi?id=174166
1893
1894         Reviewed by Brent Fulgham.
1895
1896         Update FileMonitor to no longer be refcounted. It was previously easy to leak it
1897         because the object would ref itself in various lambdas. The client would have to
1898         explicitely call FileMonitor::stopMonitoring() which was fragile.
1899
1900         This patch also simplifies the code and API a bit since no longer actually
1901         requires startMonitoring() / stopMonitoring() API.
1902
1903         No new tests, covered by API tests.
1904
1905         * platform/FileMonitor.cpp:
1906         (WebCore::FileMonitor::FileMonitor):
1907         (WebCore::FileMonitor::~FileMonitor):
1908         (WebCore::FileMonitor::create): Deleted.
1909         (WebCore::FileMonitor::startMonitoring): Deleted.
1910         (WebCore::FileMonitor::stopMonitoring): Deleted.
1911         * platform/FileMonitor.h:
1912         * platform/cocoa/FileMonitorCocoa.mm:
1913         (WebCore::FileMonitor::FileMonitor):
1914         (WebCore::FileMonitor::~FileMonitor):
1915         (WebCore::FileMonitor::startMonitoring): Deleted.
1916         (WebCore::FileMonitor::stopMonitoring): Deleted.
1917
1918 2017-07-06  Matt Rajca  <mrajca@apple.com>
1919
1920         Fix build with VIDEO support disabled.
1921         https://bugs.webkit.org/show_bug.cgi?id=174217
1922
1923         Unreviewed build fix.
1924
1925         * page/Page.cpp:
1926
1927 2017-07-06  Matt Lewis  <jlewis3@apple.com>
1928
1929         Unreviewed, rolling out r219193.
1930
1931         The tests added with this revision were extreamly flaky on all
1932         platforms.
1933
1934         Reverted changeset:
1935
1936         "[SVG] Leak in SVGAnimatedListPropertyTearOff"
1937         https://bugs.webkit.org/show_bug.cgi?id=172545
1938         http://trac.webkit.org/changeset/219193
1939
1940 2017-07-06  Zalan Bujtas  <zalan@apple.com>
1941
1942         Use WTFLogAlways for debug logging so that it shows up in device system logs
1943         https://bugs.webkit.org/show_bug.cgi?id=173450
1944
1945         Reviewed by Simon Fraser.
1946
1947         If you want to showRenderTree() on-device, the result doesn't show in system log so you can't see it.
1948         Switch to WTFLogAlways to fix this, for showRenderTree and its dependencies.
1949         
1950         * platform/text/TextStream.cpp:
1951         (WebCore::writeIndent):
1952         * rendering/InlineBox.cpp:
1953         (WebCore::InlineBox::showLineTreeAndMark):
1954         (WebCore::InlineBox::showLineBox):
1955         * rendering/InlineBox.h:
1956         * rendering/InlineFlowBox.cpp:
1957         (WebCore::InlineFlowBox::showLineTreeAndMark):
1958         * rendering/InlineFlowBox.h:
1959         * rendering/InlineTextBox.cpp:
1960         (WebCore::InlineTextBox::showLineBox):
1961         * rendering/InlineTextBox.h:
1962         * rendering/RenderBlockFlow.cpp:
1963         (WebCore::RenderBlockFlow::showLineTreeAndMark):
1964         * rendering/RenderBlockFlow.h:
1965         * rendering/RenderObject.cpp:
1966         (WebCore::showRenderTreeLegend):
1967         (WebCore::RenderObject::showRenderTreeForThis):
1968         (WebCore::RenderObject::showLineTreeForThis):
1969         (WebCore::RenderObject::showRegionsInformation):
1970         (WebCore::RenderObject::showRenderObject):
1971         (WebCore::RenderObject::showRenderSubTreeAndMark):
1972         * rendering/RenderObject.h:
1973         * rendering/SimpleLineLayoutFunctions.cpp:
1974         (WebCore::SimpleLineLayout::printPrefix):
1975         (WebCore::SimpleLineLayout::showLineLayoutForFlow):
1976         * rendering/SimpleLineLayoutFunctions.h:
1977
1978 2017-07-06  Myles C. Maxfield  <mmaxfield@apple.com>
1979
1980         Unify FontCascadeFonts::glyphDataForVariant() and FontCascadeFonts::glyphDataForNormalVariant()
1981         https://bugs.webkit.org/show_bug.cgi?id=174213
1982
1983         Reviewed by Zalan Bujtas.
1984
1985         They have almost identical code. This is in preparation for https://bugs.webkit.org/show_bug.cgi?id=173962
1986
1987         No new tests because there is no behavior change.
1988
1989         * platform/graphics/FontCascadeFonts.cpp:
1990         (WebCore::FontCascadeFonts::glyphDataForVariant):
1991         (WebCore::FontCascadeFonts::glyphDataForCharacter):
1992         (WebCore::FontCascadeFonts::glyphDataForNormalVariant): Deleted.
1993         * platform/graphics/FontCascadeFonts.h:
1994
1995 2017-07-06  Don Olmstead  <don.olmstead@sony.com>
1996
1997         [PAL] Move KillRing into PAL
1998         https://bugs.webkit.org/show_bug.cgi?id=173900
1999
2000         Reviewed by Myles C. Maxfield.
2001
2002         No new tests. No change in functionality.
2003
2004         * Configurations/WebCore.xcconfig:
2005         * PlatformGTK.cmake:
2006         * PlatformMac.cmake:
2007         * PlatformWPE.cmake:
2008         * PlatformWin.cmake:
2009         * WebCore.xcodeproj/project.pbxproj:
2010         * editing/Editor.cpp:
2011         (WebCore::Editor::Editor):
2012         * editing/Editor.h:
2013         (WebCore::Editor::killRing):
2014         * editing/EditorCommand.cpp:
2015
2016 2017-07-06  Devin Rousso  <drousso@apple.com>
2017
2018         Web Inspector: Support getting the content of WebGL/WebGL2 contexts
2019         https://bugs.webkit.org/show_bug.cgi?id=173569
2020         <rdar://problem/33112420>
2021
2022         Reviewed by Joseph Pecoraro.
2023
2024         Tests: inspector/canvas/requestContent-2d.html
2025                inspector/canvas/requestContent-webgl.html
2026                inspector/canvas/requestContent-webgl2.html
2027
2028         * html/canvas/WebGLRenderingContextBase.cpp:
2029         (WebCore::WebGLRenderingContextBase::clearIfComposited):
2030         * html/canvas/WebGLRenderingContextBase.h:
2031         (WebCore::WebGLRenderingContextBase::preventBufferClearForInspector):
2032         (WebCore::WebGLRenderingContextBase::setPreventBufferClearForInspector):
2033         Add a flag that will prevent the context buffer from being cleared, allowing it to be copied
2034         within a toDataURL call. This is currently only used by InspectorCanvasAgent::requestContent.
2035
2036         * inspector/InspectorCanvasAgent.cpp:
2037         (WebCore::InspectorCanvasAgent::requestContent):
2038         Since toDataURL attempts to force the canvas to redraw, we can preserve the buffer after it
2039         finishes drawing so that it can be copied, instead of it normally being swapped out.
2040
2041 2017-07-06  Chris Dumez  <cdumez@apple.com>
2042
2043         Move ResourceLoadObserver notification throttling logic from WebProcess class to ResourceLoadObserver
2044         https://bugs.webkit.org/show_bug.cgi?id=174194
2045
2046         Reviewed by Brent Fulgham.
2047
2048         Move ResourceLoadObserver notification throttling logic from WebProcess class to
2049         ResourceLoadObserver. This makes more sense and decreases the complexity of the
2050         WebProcess class.
2051
2052         * loader/ResourceLoadObserver.cpp:
2053         (WebCore::ResourceLoadObserver::setNotificationCallback):
2054         (WebCore::ResourceLoadObserver::ResourceLoadObserver):
2055         (WebCore::ResourceLoadObserver::logFrameNavigation):
2056         (WebCore::ResourceLoadObserver::logSubresourceLoading):
2057         (WebCore::ResourceLoadObserver::logWebSocketLoading):
2058         (WebCore::ResourceLoadObserver::logUserInteractionWithReducedTimeResolution):
2059         (WebCore::ResourceLoadObserver::scheduleNotificationIfNeeded):
2060         (WebCore::ResourceLoadObserver::notificationTimerFired):
2061         * loader/ResourceLoadObserver.h:
2062
2063 2017-07-06  Said Abou-Hallawa  <sabouhallawa@apple.com>
2064
2065         REGRESSION(r208511): RenderImageResourceStyleImage should not assume image() won't return null if its m_cachedImage is valid
2066         https://bugs.webkit.org/show_bug.cgi?id=174168
2067
2068         Reviewed by Simon Fraser.
2069
2070         RenderImageResourceStyleImage::image() may return a null pointer even if
2071         its m_cachedImage is not null. The revision r208511, changed the function
2072         RenderImageResourceStyleImage::shutdown() so it calls Image::stopAnimation().
2073         But this change assumes that if m_cachedImage is not null then image() will
2074         return a valid pointer. This is not true because StyleCachedImage::isPending()
2075         can return true and hence, RenderImageResourceStyleImage::image() will return
2076         a null pointer.
2077
2078         * rendering/RenderImageResourceStyleImage.cpp:
2079         (WebCore::RenderImageResourceStyleImage::image): Like what RenderImageResource
2080         does, return Image::nullImage() if m_styleImage->isPending().
2081
2082 2017-07-06  Commit Queue  <commit-queue@webkit.org>
2083
2084         Unreviewed, rolling out r219201.
2085         https://bugs.webkit.org/show_bug.cgi?id=174211
2086
2087         "Causes crashes on Release builds and API tests" (Requested by
2088         ddkilzer on #webkit).
2089
2090         Reverted changeset:
2091
2092         "Add release assert to explore crash for
2093         <rdar://problem/32908525>"
2094         http://trac.webkit.org/changeset/219201
2095
2096 2017-07-06  Commit Queue  <commit-queue@webkit.org>
2097
2098         Unreviewed, rolling out r219194.
2099         https://bugs.webkit.org/show_bug.cgi?id=174207
2100
2101         it broke some layout tests (Requested by clopez on #webkit).
2102
2103         Reverted changeset:
2104
2105         "[GStreamer] vid.me videos do not play"
2106         https://bugs.webkit.org/show_bug.cgi?id=172240
2107         http://trac.webkit.org/changeset/219194
2108
2109 2017-07-06  David Kilzer  <ddkilzer@apple.com>
2110
2111         Add release assert to explore crash for <rdar://problem/32908525>
2112
2113         Reviewed by Brady Eidson.
2114
2115         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
2116         (WebCore::IDBServer::UniqueIDBDatabase::~UniqueIDBDatabase): Add
2117         release assert to catch cases when the IDBBackingStore is not
2118         deleted before the UniqueIDBDatabase is destroyed.  The
2119         IDBBackingStore should always be released on the database
2120         thread.
2121
2122 2017-07-06  Matt Lewis  <jlewis3@apple.com>
2123
2124         Unreviewed, rolling out r219178.
2125
2126         This caused a consistent failure with the API test
2127         StringBuilderTest.ToAtomicStringOnEmpty on all Debug testers.
2128
2129         Reverted changeset:
2130
2131         "[WTF] Clean up StringStatics.cpp by using
2132         LazyNeverDestroyed<> for Atoms"
2133         https://bugs.webkit.org/show_bug.cgi?id=174150
2134         http://trac.webkit.org/changeset/219178
2135
2136 2017-07-06  Charlie Turner  <cturner@igalia.com>
2137
2138         [GStreamer] vid.me videos do not play
2139         https://bugs.webkit.org/show_bug.cgi?id=172240
2140
2141         Reviewed by Xabier Rodriguez-Calvar.
2142
2143         In r142251, code to hide the WK HTTP source elements from elsewhere in
2144         the pipeline was removed. This has the nasty side-effect of
2145         auto-plugging the WK HTTP source into things it really should not be
2146         used in, especially the adaptive streaming demuxers. The reasons this
2147         is bad are documented in several places on Bugzilla, see the parent
2148         bug report for more details. The high-level issue is that the WK HTTP
2149         source and its use of WebCore is not thread-safe. Although work has
2150         been recently done to improve this situation, it's still not perfect.
2151
2152         Another issue is the interface hlsdemux expects its HTTP source to
2153         implement, specifically seeking in READY.
2154
2155         This does rely on HTTP context sharing being available in GStreamer,
2156         upstream bug is here:
2157         https://bugzilla.gnome.org/show_bug.cgi?id=761099. The failing case
2158         can be demonstrated with
2159         https://github.com/thiagoss/adaptive-test-server but manual testing on
2160         popular video hosting sites, including vid.me, shows that this doesn't
2161         bite us at the moment, just something else to fix in the future.
2162
2163         There are some QoS issues with the adaptive streaming code in
2164         GStreamer, but it seems much better to offer a below par QoS in lieu
2165         of crashing/livelocking when playing certain streams, and issues can be
2166         raised upstream when they arise.
2167
2168         This patch does take us further away from the future goal of having all
2169         networking operations go through the network process, but in return it
2170         solves some nasty crashes and livelocks that have been irritating
2171         users for some time. With the pressure off on this issue, work can be
2172         planned to consider how to make the WK HTTP source a better citizen
2173         inside the GStreamer pipeline when we migrate the netcode to go
2174         through the network process.
2175
2176         A new test is added to check that the single file HLS playlists
2177         (new in version 4) can be played, which was the primary cause of
2178         this bug report.
2179
2180         Test: http/tests/media/hls/range-request.html
2181
2182         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2183         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL): Perform
2184         some trickery to make sure that we only ever fetch URLs handed to
2185         us by WebCore. Any further URLs discovered inside the pipeline
2186         will not get WKWS auto-plugged, since they'll be plain https?
2187         schemas.
2188         (WebCore::MediaPlayerPrivateGStreamer::load): Refactor to use the
2189         setPlaybinURL helper method.
2190         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation): Ditto.
2191         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: Add
2192         the setPlaybinURL helper method.
2193         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
2194         (webKitWebSrcGetProtocols): Only advertise webkit+https?, this
2195         ensures we won't get auto-plugged by pipeline elements asking for
2196         an element to fetch https? resources (like adaptive demuxers).
2197         (convertPlaybinURI): Undo the trick when another element asks us
2198         for our URI.
2199
2200 2017-05-24  Sergio Villar Senin  <svillar@igalia.com>
2201
2202         [SVG] Leak in SVGAnimatedListPropertyTearOff
2203         https://bugs.webkit.org/show_bug.cgi?id=172545
2204
2205         Reviewed by Said Abou-Hallawa.
2206
2207         SVGAnimatedListPropertyTearOff maintains a vector m_wrappers with references to
2208         SVGPropertyTraits<PropertyType>::ListItemTearOff. Apart from that SVGPropertyTearOff has a
2209         reference to SVGAnimatedProperty.
2210
2211         When SVGListProperty::getItemValuesAndWrappers() is called, it creates a
2212         SVGPropertyTraits<PropertyType>::ListItemTearOff pointing to the same SVGAnimatedProperty (a
2213         SVGAnimatedListPropertyTearOff) which stores the m_wrappers vector where the ListItemTearOff
2214         is going to be added to. This effectively creates a reference cycle between the
2215         SVGAnimatedListPropertyTearOff and all the ListItemTearOff it stores in m_wrappers.
2216
2217         We should detach those wrappers in propertyWillBeDeleted() in order to break the cycle.
2218
2219         * svg/properties/SVGAnimatedListPropertyTearOff.h:
2220
2221 2017-07-05  Don Olmstead  <don.olmstead@sony.com>
2222
2223         [WTF] Move SoftLinking.h into WTF
2224         https://bugs.webkit.org/show_bug.cgi?id=174000
2225
2226         Reviewed by Alex Christensen.
2227
2228         No new tests. No change in functionality
2229
2230         * Modules/applepay/PaymentRequest.cpp:
2231         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
2232         * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm:
2233         * Modules/encryptedmedia/legacy/LegacyCDMPrivateMediaPlayer.cpp:
2234         * WebCore.xcodeproj/project.pbxproj:
2235         * editing/cocoa/EditorCocoa.mm:
2236         * editing/cocoa/HTMLConverter.mm:
2237         * editing/ios/EditorIOS.mm:
2238         * page/CaptionUserPreferencesMediaAF.cpp:
2239         * page/cocoa/SettingsCocoa.mm:
2240         * page/ios/UserAgentIOS.mm:
2241         * page/mac/ServicesOverlayController.mm:
2242         * platform/audio/ios/AudioDestinationIOS.cpp:
2243         * platform/audio/ios/AudioFileReaderIOS.cpp:
2244         * platform/audio/ios/AudioSessionIOS.mm:
2245         * platform/audio/ios/MediaSessionManagerIOS.mm:
2246         * platform/cf/CoreMediaSoftLink.cpp:
2247         * platform/cf/CoreMediaSoftLink.h:
2248         * platform/cf/MediaAccessibilitySoftLink.cpp:
2249         * platform/cf/MediaAccessibilitySoftLink.h:
2250         * platform/cocoa/ContentFilterUnblockHandlerCocoa.mm:
2251         * platform/cocoa/CoreVideoSoftLink.cpp:
2252         * platform/cocoa/CoreVideoSoftLink.h:
2253         * platform/cocoa/DataDetectorsCoreSoftLink.h:
2254         * platform/cocoa/NetworkExtensionContentFilter.mm:
2255         * platform/cocoa/ParentalControlsContentFilter.mm:
2256         * platform/cocoa/TelephoneNumberDetectorCocoa.cpp:
2257         * platform/cocoa/VideoToolboxSoftLink.cpp:
2258         * platform/cocoa/VideoToolboxSoftLink.h:
2259         * platform/cocoa/WebPlaybackSessionModelMediaElement.mm:
2260         * platform/cocoa/WebVideoFullscreenModelVideoElement.mm:
2261         * platform/gamepad/cocoa/GameControllerGamepadProvider.mm:
2262         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
2263         * platform/graphics/avfoundation/MediaPlaybackTargetMac.mm:
2264         * platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
2265         * platform/graphics/avfoundation/MediaSelectionGroupAVFObjC.mm:
2266         * platform/graphics/avfoundation/cf/AVFoundationCFSoftLinking.h:
2267         * platform/graphics/avfoundation/cf/CDMSessionAVFoundationCF.cpp:
2268         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
2269         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp:
2270         * platform/graphics/avfoundation/cf/WebCoreAVCFResourceLoader.cpp:
2271         * platform/graphics/avfoundation/objc/CDMSessionAVContentKeySession.mm:
2272         * platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
2273         * platform/graphics/avfoundation/objc/CDMSessionAVStreamSession.mm:
2274         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2275         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
2276         * platform/graphics/avfoundation/objc/MediaPlaybackTargetPickerMac.mm:
2277         * platform/graphics/avfoundation/objc/MediaSourcePrivateAVFObjC.mm:
2278         * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm:
2279         * platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
2280         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
2281         * platform/graphics/ca/win/WKCACFViewLayerTreeHost.cpp:
2282         * platform/graphics/cocoa/FontCascadeCocoa.mm:
2283         * platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp:
2284         * platform/graphics/cv/PixelBufferConformerCV.cpp:
2285         * platform/graphics/ios/FontCacheIOS.mm:
2286         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2287         * platform/graphics/mac/FontCacheMac.mm:
2288         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
2289         * platform/graphics/mac/MediaTimeQTKit.mm:
2290         * platform/graphics/mac/PDFDocumentImageMac.mm:
2291         * platform/graphics/win/MediaPlayerPrivateMediaFoundation.cpp:
2292         * platform/ios/DragImageIOS.mm:
2293         * platform/ios/PlatformPasteboardIOS.mm:
2294         * platform/ios/PlatformScreenIOS.mm:
2295         * platform/ios/PlatformSpeechSynthesizerIOS.mm:
2296         * platform/ios/QuickLookSoftLink.h:
2297         * platform/ios/QuickLookSoftLink.mm:
2298         * platform/ios/RemoteCommandListenerIOS.mm:
2299         * platform/ios/ThemeIOS.mm:
2300         * platform/ios/ValidationBubbleIOS.mm:
2301         * platform/ios/WebCoreMotionManager.mm:
2302         * platform/ios/WebItemProviderPasteboard.mm:
2303         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
2304         * platform/mac/DragImageMac.mm:
2305         * platform/mac/MediaRemoteSoftLink.cpp:
2306         * platform/mac/MediaRemoteSoftLink.h:
2307         * platform/mac/SerializedPlatformRepresentationMac.mm:
2308         * platform/mac/WebPlaybackControlsManager.mm:
2309         * platform/mac/WebVideoFullscreenController.mm:
2310         * platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
2311         * platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
2312         * platform/mediastream/libwebrtc/H264VideoToolBoxEncoder.mm:
2313         * platform/mediastream/mac/AVCaptureDeviceManager.mm:
2314         * platform/network/cf/CookieJarCFNet.cpp:
2315         * platform/network/ios/NetworkStateNotifierIOS.mm:
2316         * platform/network/ios/PreviewConverter.mm:
2317         * platform/network/mac/BlobDataFileReferenceMac.mm:
2318         * platform/spi/cocoa/AVKitSPI.h:
2319         (-[AVTouchBarPlaybackControlsControlling NS_ENUM]): Deleted.
2320         * platform/spi/cocoa/NSAttributedStringSPI.h:
2321         * platform/spi/ios/DataDetectorsUISPI.h:
2322         * platform/spi/mac/AVFoundationSPI.h:
2323         * platform/spi/mac/DataDetectorsSPI.h:
2324         * platform/spi/mac/LookupSPI.h:
2325         * platform/spi/mac/TUCallSPI.h:
2326         * platform/win/ScrollbarThemeWin.cpp:
2327         * rendering/RenderThemeCocoa.mm:
2328         * rendering/RenderThemeIOS.mm:
2329         * rendering/RenderThemeWin.cpp:
2330         * testing/Internals.mm:
2331         * xml/XSLStyleSheetLibxslt.cpp:
2332         * xml/XSLTExtensions.cpp:
2333         * xml/XSLTProcessorLibxslt.cpp:
2334         * xml/XSLTUnicodeSort.cpp:
2335
2336 2017-07-05  Zalan Bujtas  <zalan@apple.com>
2337
2338         REGRESSION: Stack overflow in RenderBlockFlow::layoutBlock after increasing the font size to max in some RTL vertical books.
2339         https://bugs.webkit.org/show_bug.cgi?id=174144
2340         <rdar://problem/32781038>
2341
2342         Reviewed by Simon Fraser.
2343
2344         We set the start/end margin on the ruby renderer to support overhanging content. The margins ensure that
2345         adjacent boxes on the line are placed properly respecting the overhanging content.
2346         The line breaking algorithm also takes this value into account as it affects the line's available width.
2347         We need to reset this value before laying out the lines, otherwise we might end up using this value on the line twice;
2348         first as the renderer's margins (as the result of the previous layout) and second as the renderer's overhanging value.
2349         Since this is not strictly part of the renderer's layout context (i.e. we set them during the line layout and not at
2350         RenderRubyRun::layout) we can't rely on the ruby's layout logic to reset them.
2351
2352         Test: fast/ruby/ruby-overhang-margin-crash.html
2353
2354         * rendering/RenderBlockLineLayout.cpp:
2355         (WebCore::RenderBlockFlow::layoutLineBoxes):
2356
2357 2017-07-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2358
2359         Upgrade GCC baseline
2360         https://bugs.webkit.org/show_bug.cgi?id=174155
2361
2362         Reviewed by Michael Catanzaro.
2363
2364         Remove workaround for old GCC.
2365
2366         * CMakeLists.txt:
2367
2368 2017-07-05  Chris Dumez  <cdumez@apple.com>
2369
2370         Unreviewed attempt to fix iOS build after r219177.
2371
2372         * page/ios/UserAgentIOS.mm:
2373         * platform/spi/ios/UIKitSPI.h:
2374
2375 2017-07-05  Chris Dumez  <cdumez@apple.com>
2376
2377         Unreviewed attempt to fix iOS build after r219177.
2378
2379         * page/ios/UserAgentIOS.mm:
2380         * platform/spi/ios/UIKitSPI.h:
2381
2382 2017-07-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2383
2384         Use std::lock_guard instead of std::unique_lock if move semantics and try_lock is not necessary
2385         https://bugs.webkit.org/show_bug.cgi?id=174148
2386
2387         Reviewed by Mark Lam.
2388
2389         * platform/graphics/avfoundation/AudioSourceProviderAVFObjC.mm:
2390         (WebCore::AudioSourceProviderAVFObjC::~AudioSourceProviderAVFObjC):
2391
2392 2017-07-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2393
2394         [WTF] Clean up StringStatics.cpp by using LazyNeverDestroyed<> for Atoms
2395         https://bugs.webkit.org/show_bug.cgi?id=174150
2396
2397         Reviewed by Mark Lam.
2398
2399         * Modules/mediacontrols/MediaControlsHost.cpp:
2400         (WebCore::MediaControlsHost::captionDisplayMode):
2401         * Modules/mediastream/RTCDataChannel.cpp:
2402         (WebCore::RTCDataChannel::binaryType):
2403         * accessibility/AXObjectCache.cpp:
2404         (WebCore::createFromRenderer):
2405         * accessibility/AccessibilityMediaControls.cpp:
2406         (WebCore::AccessibilityMediaControl::controlTypeName):
2407         * accessibility/AccessibilityObject.cpp:
2408         (WebCore::AccessibilityObject::language):
2409         (WebCore::AccessibilityObject::defaultLiveRegionStatusForRole):
2410         (WebCore::AccessibilityObject::actionVerb):
2411         (WebCore::AccessibilityObject::getAttribute):
2412         (WebCore::AccessibilityObject::placeholderValue):
2413         * accessibility/AccessibilityObject.h:
2414         (WebCore::AccessibilityObject::accessKey):
2415         (WebCore::AccessibilityObject::ariaLiveRegionRelevant):
2416         * accessibility/AccessibilityRenderObject.cpp:
2417         (WebCore::AccessibilityRenderObject::accessKey):
2418         (WebCore::AccessibilityRenderObject::actionVerb):
2419         * bindings/js/JSCustomElementInterface.cpp:
2420         (WebCore::JSCustomElementInterface::constructElementWithFallback):
2421         * bindings/js/JSCustomElementRegistryCustom.cpp:
2422         (WebCore::JSCustomElementRegistry::define):
2423         * bindings/scripts/CodeGeneratorJS.pm:
2424         (GenerateDefaultValue):
2425         * bindings/scripts/test/JS/JSTestObj.cpp:
2426         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringBody):
2427         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsNullBody):
2428         (WebCore::jsTestObjPrototypeFunctionMethodWithOptionalAtomicStringIsEmptyStringBody):
2429         * css/CSSPageRule.cpp:
2430         (WebCore::CSSPageRule::selectorText):
2431         * css/CSSPrimitiveValue.cpp:
2432         (WebCore::valueName):
2433         * css/CSSSelector.cpp:
2434         (WebCore::simpleSelectorSpecificityInternal):
2435         (WebCore::CSSSelector::specificityForPage):
2436         (WebCore::CSSSelector::RareData::RareData):
2437         * css/CSSSelector.h:
2438         (WebCore::CSSSelector::argument):
2439         * css/CSSSelectorList.cpp:
2440         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
2441         * css/PageRuleCollector.cpp:
2442         (WebCore::checkPageSelectorComponents):
2443         * css/RuleSet.cpp:
2444         (WebCore::computeMatchBasedOnRuleHash):
2445         (WebCore::RuleSet::addRule):
2446         * css/SelectorChecker.cpp:
2447         (WebCore::tagMatches):
2448         * css/SelectorFilter.cpp:
2449         (WebCore::collectDescendantSelectorIdentifierHashes):
2450         * css/StyleBuilderConverter.h:
2451         (WebCore::StyleBuilderConverter::convertStringOrAuto):
2452         (WebCore::StyleBuilderConverter::convertStringOrNone):
2453         * css/StyleBuilderCustom.h:
2454         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
2455         (WebCore::StyleBuilderCustom::applyValueWebkitTextEmphasisStyle):
2456         (WebCore::StyleBuilderCustom::applyValueContent):
2457         (WebCore::StyleBuilderCustom::applyValueAlt):
2458         * css/StyleSheetContents.cpp:
2459         (WebCore::StyleSheetContents::StyleSheetContents):
2460         (WebCore::StyleSheetContents::namespaceURIFromPrefix):
2461         * css/makeprop.pl:
2462         * css/parser/CSSParserImpl.cpp:
2463         (WebCore::CSSParserImpl::parsePageSelector):
2464         * css/parser/CSSSelectorParser.cpp:
2465         (WebCore::CSSSelectorParser::consumeCompoundSelector):
2466         (WebCore::CSSSelectorParser::consumeName):
2467         (WebCore::CSSSelectorParser::consumeAttribute):
2468         (WebCore::CSSSelectorParser::defaultNamespace):
2469         (WebCore::CSSSelectorParser::determineNamespace):
2470         (WebCore::CSSSelectorParser::prependTypeSelectorIfNeeded):
2471         * cssjit/SelectorCompiler.cpp:
2472         (WebCore::SelectorCompiler::attributeNameTestingRequiresNamespaceRegister):
2473         (WebCore::SelectorCompiler::equalTagNames):
2474         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementAttributeMatching):
2475         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateElementHasTagName):
2476         * dom/Attr.cpp:
2477         (WebCore::Attr::setPrefix):
2478         (WebCore::Attr::attachToElement):
2479         * dom/Attribute.h:
2480         (WebCore::Attribute::nameMatchesFilter):
2481         * dom/ConstantPropertyMap.cpp:
2482         (WebCore::ConstantPropertyMap::nameForProperty):
2483         * dom/ContainerNode.cpp:
2484         (WebCore::ContainerNode::getElementsByTagName):
2485         (WebCore::ContainerNode::getElementsByTagNameNS):
2486         * dom/CustomElementReactionQueue.cpp:
2487         (WebCore::CustomElementReactionQueue::enqueuePostUpgradeReactions):
2488         * dom/DatasetDOMStringMap.cpp:
2489         (WebCore::convertPropertyNameToAttributeName):
2490         * dom/Document.cpp:
2491         (WebCore::createUpgradeCandidateElement):
2492         (WebCore::Document::createElementForBindings):
2493         (WebCore::Document::importNode):
2494         (WebCore::Document::hasValidNamespaceForElements):
2495         (WebCore::Document::processBaseElement):
2496         (WebCore::Document::dir):
2497         (WebCore::Document::bgColor):
2498         (WebCore::Document::fgColor):
2499         (WebCore::Document::alinkColor):
2500         (WebCore::Document::linkColorForBindings):
2501         (WebCore::Document::vlinkColor):
2502         * dom/Document.h:
2503         * dom/Element.cpp:
2504         (WebCore::Element::setBooleanAttribute):
2505         (WebCore::Element::synchronizeAttribute):
2506         (WebCore::Element::getAttribute):
2507         (WebCore::Element::getAttributeNS):
2508         (WebCore::Element::setAttribute):
2509         (WebCore::Element::parserSetAttributes):
2510         (WebCore::Element::didMoveToNewDocument):
2511         (WebCore::Element::setPrefix):
2512         (WebCore::Element::insertedInto):
2513         (WebCore::Element::removedFrom):
2514         (WebCore::Element::removeAttributeInternal):
2515         (WebCore::Element::addAttributeInternal):
2516         (WebCore::Element::removeAttributeNS):
2517         (WebCore::Element::getAttributeNodeNS):
2518         (WebCore::Element::hasAttributeNS):
2519         (WebCore::Element::computeInheritedLanguage):
2520         (WebCore::Element::updateNameForDocument):
2521         (WebCore::Element::updateIdForDocument):
2522         (WebCore::Element::didAddAttribute):
2523         (WebCore::Element::didRemoveAttribute):
2524         (WebCore::Element::cloneAttributesFromElement):
2525         * dom/Element.h:
2526         (WebCore::Element::attributeWithoutSynchronization):
2527         (WebCore::Element::idForStyleResolution):
2528         (WebCore::Element::getIdAttribute):
2529         (WebCore::Element::getNameAttribute):
2530         * dom/EventTarget.cpp:
2531         (WebCore::legacyType):
2532         * dom/MutationRecord.h:
2533         (WebCore::MutationRecord::attributeName):
2534         (WebCore::MutationRecord::attributeNamespace):
2535         * dom/NamedNodeMap.cpp:
2536         (WebCore::NamedNodeMap::removeNamedItemNS):
2537         * dom/Node.cpp:
2538         (WebCore::Node::prefix):
2539         (WebCore::Node::localName):
2540         (WebCore::Node::namespaceURI):
2541         (WebCore::Node::checkSetPrefix):
2542         (WebCore::locateDefaultNamespace):
2543         (WebCore::Node::isDefaultNamespace):
2544         (WebCore::Node::lookupNamespaceURI):
2545         (WebCore::locateNamespacePrefix):
2546         (WebCore::Node::lookupPrefix):
2547         * dom/NodeRareData.h:
2548         (WebCore::NodeListsNodeData::addCachedTagCollectionNS):
2549         (WebCore::NodeListsNodeData::addCachedCollection):
2550         (WebCore::NodeListsNodeData::cachedCollection):
2551         (WebCore::NodeListsNodeData::removeCacheWithAtomicName):
2552         (WebCore::NodeListsNodeData::removeCachedTagCollectionNS):
2553         (WebCore::NodeListsNodeData::removeCachedCollection):
2554         * dom/PseudoElement.cpp:
2555         (WebCore::pseudoElementTagName):
2556         * dom/QualifiedName.cpp:
2557         (WebCore::QualifiedName::init):
2558         (WebCore::nullQName):
2559         (WebCore::createQualifiedName):
2560         * dom/QualifiedName.h:
2561         (WebCore::QualifiedName::hasPrefix):
2562         * dom/SelectorQuery.cpp:
2563         (WebCore::SelectorDataList::executeSingleTagNameSelectorData):
2564         * dom/SlotAssignment.cpp:
2565         (WebCore::slotNameFromAttributeValue):
2566         * dom/SlotAssignment.h:
2567         (WebCore::SlotAssignment::defaultSlotName):
2568         (WebCore::ShadowRoot::didRemoveAllChildrenOfShadowHost):
2569         (WebCore::ShadowRoot::didChangeDefaultSlot):
2570         * dom/TagCollection.cpp:
2571         (WebCore::TagCollection::TagCollection):
2572         (WebCore::HTMLTagCollection::HTMLTagCollection):
2573         * dom/TagCollection.h:
2574         (WebCore::TagCollectionNS::elementMatches):
2575         * dom/make_names.pl:
2576         (printNamesCppFile):
2577         (printDefinitions):
2578         (printFactoryCppFile):
2579         * editing/CompositeEditCommand.cpp:
2580         (WebCore::CompositeEditCommand::removeNodeAttribute):
2581         * editing/Editing.cpp:
2582         (WebCore::createHTMLElement):
2583         * editing/MarkupAccumulator.cpp:
2584         (WebCore::MarkupAccumulator::serializeNodesWithNamespaces):
2585         (WebCore::MarkupAccumulator::shouldAddNamespaceElement):
2586         (WebCore::MarkupAccumulator::shouldAddNamespaceAttribute):
2587         (WebCore::MarkupAccumulator::appendNamespace):
2588         (WebCore::MarkupAccumulator::appendOpenTag):
2589         (WebCore::MarkupAccumulator::appendAttribute):
2590         * editing/gtk/EditorGtk.cpp:
2591         (WebCore::elementURL):
2592         * editing/markup.cpp:
2593         (WebCore::AttributeChange::AttributeChange):
2594         * html/Autocapitalize.cpp:
2595         (WebCore::stringForAutocapitalizeType):
2596         * html/Autofill.cpp:
2597         (WebCore::AutofillData::createFromHTMLFormControlElement):
2598         * html/DOMTokenList.h:
2599         (WebCore::DOMTokenList::item):
2600         * html/FormAssociatedElement.cpp:
2601         (WebCore::FormAssociatedElement::name):
2602         * html/HTMLButtonElement.cpp:
2603         (WebCore::HTMLButtonElement::formControlType):
2604         * html/HTMLDetailsElement.cpp:
2605         (WebCore::HTMLDetailsElement::toggleOpen):
2606         * html/HTMLDocument.cpp:
2607         (WebCore::HTMLDocument::isCaseSensitiveAttribute):
2608         * html/HTMLElement.cpp:
2609         (WebCore::HTMLElement::eventNameForEventHandlerAttribute):
2610         (WebCore::toValidDirValue):
2611         * html/HTMLImageElement.cpp:
2612         (WebCore::HTMLImageElement::bestFitSourceFromPictureElement):
2613         * html/HTMLInputElement.cpp:
2614         (WebCore::HTMLInputElement::name):
2615         (WebCore::HTMLInputElement::updateType):
2616         * html/HTMLMediaElement.cpp:
2617         (WebCore::HTMLMediaElement::doesHaveAttribute):
2618         * html/HTMLOptionElement.cpp:
2619         (WebCore::HTMLOptionElement::createForJSConstructor):
2620         * html/HTMLParamElement.cpp:
2621         (WebCore::HTMLParamElement::name):
2622         * html/HTMLSelectElement.cpp:
2623         (WebCore::HTMLSelectElement::setMultiple):
2624         * html/HTMLTableCellElement.cpp:
2625         (WebCore::HTMLTableCellElement::scope):
2626         * html/HTMLTrackElement.cpp:
2627         (WebCore::HTMLTrackElement::mediaElementCrossOriginAttribute):
2628         * html/LabelableElement.cpp:
2629         (WebCore::LabelableElement::labels):
2630         * html/LabelsNodeList.cpp:
2631         (WebCore::LabelsNodeList::~LabelsNodeList):
2632         * html/MediaController.cpp:
2633         (MediaController::playbackState):
2634         (eventNameForReadyState):
2635         * html/MediaDocument.cpp:
2636         (WebCore::MediaDocumentParser::createDocumentStructure):
2637         * html/parser/AtomicHTMLToken.h:
2638         (WebCore::AtomicHTMLToken::initializeAttributes):
2639         * html/parser/HTMLConstructionSite.cpp:
2640         (WebCore::HTMLConstructionSite::createElement):
2641         (WebCore::HTMLConstructionSite::createHTMLElementOrFindCustomElementInterface):
2642         * html/parser/HTMLParserIdioms.cpp:
2643         (WebCore::stripLeadingAndTrailingHTMLSpaces):
2644         (WebCore::parseHTMLHashNameReference):
2645         * html/parser/HTMLTreeBuilder.cpp:
2646         (WebCore::createForeignAttributesMap):
2647         * html/track/InbandTextTrack.cpp:
2648         (WebCore::InbandTextTrack::InbandTextTrack):
2649         * html/track/LoadableTextTrack.cpp:
2650         (WebCore::LoadableTextTrack::id):
2651         * html/track/TextTrack.cpp:
2652         (WebCore::TextTrack::captionMenuOffItem):
2653         (WebCore::TextTrack::captionMenuAutomaticItem):
2654         * html/track/TrackBase.cpp:
2655         (WebCore::MediaTrackBase::setKindInternal):
2656         * html/track/VTTRegion.cpp:
2657         (WebCore::VTTRegion::scroll):
2658         * html/track/WebVTTElement.cpp:
2659         (WebCore::nodeTypeToTagName):
2660         * html/track/WebVTTElement.h:
2661         * html/track/WebVTTToken.h:
2662         (WebCore::WebVTTToken::StartTag):
2663         * loader/FrameLoader.cpp:
2664         (WebCore::FrameLoader::clear):
2665         * loader/FrameLoader.h:
2666         * loader/ImageLoader.cpp:
2667         (WebCore::ImageLoader::clearFailedLoadURL):
2668         * loader/NavigationAction.h:
2669         * loader/PolicyChecker.cpp:
2670         (WebCore::PolicyChecker::checkNavigationPolicy):
2671         * page/DOMWindow.cpp:
2672         (WebCore::DOMWindow::showModalDialog):
2673         * page/EventHandler.cpp:
2674         (WebCore::eventNameForTouchPointState):
2675         * page/FrameTree.cpp:
2676         (WebCore::FrameTree::setName):
2677         (WebCore::FrameTree::clearName):
2678         * page/Page.cpp:
2679         (WebCore::Page::groupName):
2680         * platform/graphics/ComplexTextController.cpp:
2681         (WebCore::ComplexTextController::offsetForPosition):
2682         * platform/graphics/FontCache.cpp:
2683         (WebCore::FontCache::alternateFamilyName):
2684         * platform/graphics/FontDescription.h:
2685         (WebCore::FontCascadeDescription::initialLocale):
2686         * platform/graphics/FontGenericFamilies.cpp:
2687         (WebCore::genericFontFamilyForScript):
2688         * platform/graphics/InbandTextTrackPrivate.h:
2689         (WebCore::InbandTextTrackPrivate::inBandMetadataTrackDispatchType):
2690         * platform/graphics/TrackPrivateBase.h:
2691         (WebCore::TrackPrivateBase::id):
2692         (WebCore::TrackPrivateBase::label):
2693         (WebCore::TrackPrivateBase::language):
2694         * platform/graphics/avfoundation/AVTrackPrivateAVFObjCImpl.mm:
2695         (WebCore::AVTrackPrivateAVFObjCImpl::id):
2696         (WebCore::AVTrackPrivateAVFObjCImpl::label):
2697         (WebCore::AVTrackPrivateAVFObjCImpl::language):
2698         * platform/graphics/avfoundation/InbandMetadataTextTrackPrivateAVF.h:
2699         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateAVCF.cpp:
2700         (WebCore::InbandTextTrackPrivateAVCF::label):
2701         (WebCore::InbandTextTrackPrivateAVCF::language):
2702         * platform/graphics/avfoundation/cf/InbandTextTrackPrivateLegacyAVCF.cpp:
2703         (WebCore::InbandTextTrackPrivateLegacyAVCF::label):
2704         (WebCore::InbandTextTrackPrivateLegacyAVCF::language):
2705         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateAVFObjC.mm:
2706         (WebCore::InbandTextTrackPrivateAVFObjC::label):
2707         (WebCore::InbandTextTrackPrivateAVFObjC::language):
2708         * platform/graphics/avfoundation/objc/InbandTextTrackPrivateLegacyAVFObjC.mm:
2709         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::label):
2710         (WebCore::InbandTextTrackPrivateLegacyAVFObjC::language):
2711         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2712         (WebCore::metadataType):
2713         (WebCore::MediaPlayerPrivateAVFoundationObjC::metadataDidArrive):
2714         * platform/graphics/cocoa/FontCacheCoreText.cpp:
2715         (WebCore::FontCache::platformAlternateFamilyName):
2716         * platform/graphics/cocoa/FontDescriptionCocoa.cpp:
2717         (WebCore::FontCascadeDescription::effectiveFamilyAt):
2718         * platform/graphics/freetype/FontCacheFreeType.cpp:
2719         (WebCore::FontCache::platformAlternateFamilyName):
2720         * platform/graphics/gstreamer/InbandMetadataTextTrackPrivateGStreamer.h:
2721         (WebCore::InbandMetadataTextTrackPrivateGStreamer::create):
2722         * platform/graphics/win/FontCacheWin.cpp:
2723         (WebCore::FontCache::platformAlternateFamilyName):
2724         * platform/mediastream/AudioTrackPrivateMediaStream.h:
2725         * platform/mediastream/RealtimeMediaSourceSettings.cpp:
2726         (WebCore::RealtimeMediaSourceSettings::facingMode):
2727         * platform/mediastream/VideoTrackPrivateMediaStream.h:
2728         * rendering/HitTestResult.cpp:
2729         (WebCore::HitTestResult::linkSuggestedFilename):
2730         * rendering/InlineTextBox.cpp:
2731         (WebCore::InlineTextBox::paint):
2732         * rendering/RenderListItem.cpp:
2733         (WebCore::RenderListItem::markerText):
2734         * rendering/RenderText.cpp:
2735         (WebCore::RenderText::previousOffset):
2736         (WebCore::RenderText::nextOffset):
2737         * rendering/RenderTreeAsText.cpp:
2738         (WebCore::RenderTreeAsText::writeRenderObject):
2739         * rendering/TextPainter.cpp:
2740         (WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded):
2741         * rendering/style/RenderStyle.cpp:
2742         (WebCore::RenderStyle::textEmphasisMarkString):
2743         * rendering/style/RenderStyle.h:
2744         (WebCore::RenderStyle::initialHyphenationString):
2745         (WebCore::RenderStyle::initialTextEmphasisCustomMark):
2746         (WebCore::RenderStyle::initialContentAltText):
2747         (WebCore::RenderStyle::initialLineGrid):
2748         (WebCore::RenderStyle::initialFlowThread):
2749         (WebCore::RenderStyle::initialRegionThread):
2750         * style/StyleScope.cpp:
2751         (WebCore::Style::Scope::collectActiveStyleSheets):
2752         * svg/SVGElement.cpp:
2753         (WebCore::SVGElement::getPresentationAttribute):
2754         * svg/SVGElement.h:
2755         (WebCore::SVGAttributeHashTranslator::hash):
2756         * svg/SVGUseElement.cpp:
2757         (WebCore::SVGUseElement::transferSizeAttributesToTargetClone):
2758         * svg/animation/SVGSMILElement.cpp:
2759         (WebCore::SVGSMILElement::constructAttributeName):
2760         * testing/MockCDMFactory.cpp:
2761         (WebCore::MockCDMInstance::requestLicense):
2762         * xml/XMLErrors.cpp:
2763         (WebCore::createXHTMLParserErrorHeader):
2764         * xml/XPathStep.cpp:
2765         (WebCore::XPath::nodeMatchesBasicTest):
2766         (WebCore::XPath::Step::nodesInAxis):
2767         * xml/parser/XMLDocumentParserLibxml2.cpp:
2768         (WebCore::XMLDocumentParser::XMLDocumentParser):
2769         (WebCore::handleNamespaceAttributes):
2770         (WebCore::handleElementAttributes):
2771
2772 2017-07-05  Chris Dumez  <cdumez@apple.com>
2773
2774         [iOS] User agent string incorrectly says "iPhone" instead of "iPad" on newer iPads
2775         https://bugs.webkit.org/show_bug.cgi?id=174182
2776         <rdar://problem/32868369>
2777
2778         Reviewed by Tim Horton.
2779
2780         In deviceNameForUserAgent() on iOS, we were forcefully returning "iPhone" if
2781         [UIApplication _isClassic] returns true. Update check to return "iPad" if
2782         [UIApplication _isClassic] returns true but [UIApplication _classMode] returns
2783         UIApplicationSceneClassicModeOriginalPad.
2784
2785         * page/ios/UserAgentIOS.mm:
2786         (WebCore::isClassicPad):
2787         (WebCore::isClassicPhone):
2788         (WebCore::osNameForUserAgent):
2789         (WebCore::deviceNameForUserAgent):
2790         * platform/spi/ios/UIKitSPI.h:
2791
2792 2017-07-05  Yusuke Suzuki  <utatane.tea@gmail.com>
2793
2794         WTF::Thread should have the threads stack bounds.
2795         https://bugs.webkit.org/show_bug.cgi?id=173975
2796
2797         Reviewed by Keith Miller.
2798
2799         When creating WebThread, we first allocate WebCore::ThreadGlobalData in UI thread
2800         and share it with WebThread.
2801         The problem is that WebCore::ThreadGlobalData has CachedResourceRequestInitiators.
2802         It allocates AtomicString, which requires WTFThreadData.
2803
2804         Before this patch, it was OK because WTFThreadData does not touch threading related
2805         things except for ThreadSpecific<>. However, after this patch, it touches
2806         WTF::Thread::current() which requires WTF::initializeThreading().
2807
2808         In this patch, we call WTF::initializeThreading() before allocating WebCore::ThreadGlobalData.
2809         And we also call AtomicString::init() before calling WebCore::ThreadGlobalData since
2810         WebCore::ThreadGlobalData allocates AtomicString.
2811
2812         This fixes crashes in the iOS web threading environment (UIWebView).
2813
2814         * platform/ios/wak/WebCoreThread.mm:
2815         (StartWebThread):
2816
2817 2017-07-05  Myles C. Maxfield  <mmaxfield@apple.com>
2818
2819         CSSFontStyleValue::isItalic seems a bit bogus.
2820         https://bugs.webkit.org/show_bug.cgi?id=174149
2821
2822         Reviewed by Tim Horton.
2823
2824         Simple typo.
2825
2826         Test: editing/execCommand/italicizeByCharacter-normal.html
2827
2828         * css/CSSFontStyleValue.h:
2829
2830 2017-07-05  Brady Eidson  <beidson@apple.com>
2831
2832         Allow navigations in subframes to get a ShouldOpenExternalURLsPolicy of "ShouldAllow".
2833         <rdar://problem/22485589> and https://bugs.webkit.org/show_bug.cgi?id=174178
2834
2835         Reviewed by Alex Christensen.
2836
2837         Test: loader/navigation-policy/should-open-external-urls/subframe-navigated-programatically-by-main-frame.html
2838
2839         This patch introduces a new flag to FrameLoadRequest to track when it is known with certainty that a 
2840         FrameLoadRequest originates from the main frame.
2841         
2842         Later, when calculating the final ShouldOpenExternalURLsPolicy, main frames navigating iframes get to propagate
2843         their permissions to the iframe.
2844         
2845         * bindings/js/CommonVM.cpp:
2846         (WebCore::lexicalFrameFromCommonVM): Helper to grab the current frame associated with the current JS callstack.
2847         * bindings/js/CommonVM.h:
2848
2849         * inspector/InspectorFrontendClientLocal.cpp:
2850         (WebCore::InspectorFrontendClientLocal::openInNewTab):
2851
2852         * inspector/InspectorPageAgent.cpp:
2853         (WebCore::InspectorPageAgent::navigate):
2854
2855         Add the new flag to FrameLoadRequest (and force almost everybody to explicitly include the flag):
2856         * loader/FrameLoadRequest.cpp:
2857         (WebCore::FrameLoadRequest::FrameLoadRequest):
2858         * loader/FrameLoadRequest.h:
2859         (WebCore::FrameLoadRequest::FrameLoadRequest):
2860         (WebCore::FrameLoadRequest::navigationInitiatedByMainFrame):
2861
2862         * loader/FrameLoader.cpp:
2863         (WebCore::FrameLoader::urlSelected):
2864         (WebCore::FrameLoader::loadURLIntoChildFrame):
2865         (WebCore::shouldOpenExternalURLsPolicyToApply): Helper that takes the new flag into account when deciding
2866           what the final ShouldOpenExternalURLsPolicy will be.
2867         (WebCore::applyShouldOpenExternalURLsPolicyToNewDocumentLoader):
2868         (WebCore::FrameLoader::loadURL):
2869         (WebCore::FrameLoader::load):
2870         (WebCore::FrameLoader::loadWithNavigationAction):
2871         (WebCore::FrameLoader::reloadWithOverrideEncoding):
2872         (WebCore::FrameLoader::reload):
2873         (WebCore::FrameLoader::loadPostRequest):
2874         (WebCore::FrameLoader::continueLoadAfterNewWindowPolicy):
2875         (WebCore::FrameLoader::loadDifferentDocumentItem):
2876         (WebCore::createWindow):
2877         (WebCore::FrameLoader::applyShouldOpenExternalURLsPolicyToNewDocumentLoader): Deleted.
2878         * loader/FrameLoader.h:
2879
2880         * loader/FrameLoaderTypes.h:
2881
2882         * loader/NavigationAction.h:
2883         (WebCore::NavigationAction::navigationInitiatedByMainFrame):
2884         * loader/NavigationScheduler.cpp:
2885         (WebCore::ScheduledNavigation::ScheduledNavigation): Grab the "initiating frame" at the time the 
2886           ScheduledNavigation is created, as it dictates the policy we decide later.
2887         (WebCore::ScheduledNavigation::navigationInitiatedByMainFrame):
2888         (WebCore::NavigationScheduler::scheduleLocationChange):
2889
2890         * page/ContextMenuController.cpp:
2891         (WebCore::openNewWindow):
2892         (WebCore::ContextMenuController::contextMenuItemSelected):
2893
2894         * page/DOMWindow.cpp:
2895         (WebCore::DOMWindow::createWindow):
2896
2897 2017-07-05  Simon Fraser  <simon.fraser@apple.com>
2898
2899         Another build fix, for Mac.
2900
2901         * platform/graphics/cocoa/IOSurface.mm:
2902         (WebCore::IOSurface::surfaceID):
2903
2904 2017-07-05  Simon Fraser  <simon.fraser@apple.com>
2905
2906         Further attempts to fix the iOS public SDK build.
2907
2908         * platform/graphics/cocoa/IOSurface.mm:
2909         (WebCore::IOSurface::surfaceID):
2910         * platform/spi/cocoa/IOSurfaceSPI.h:
2911
2912 2017-07-05  Don Olmstead  <don.olmstead@sony.com>
2913
2914         [WinCairo] Consolidate CMake code related to CURL
2915         https://bugs.webkit.org/show_bug.cgi?id=170860
2916
2917         Reviewed by Alex Christensen.
2918
2919         No new tests. No change in functionality.
2920
2921         * PlatformWinCairo.cmake:
2922         * platform/Curl.cmake: Added.
2923
2924 2017-07-03  Myles C. Maxfield  <mmaxfield@apple.com>
2925
2926         Remove copy of ICU headers from WebKit
2927         https://bugs.webkit.org/show_bug.cgi?id=116407
2928
2929         Reviewed by Alex Christensen.
2930
2931         Use WTF's copy of ICU headers.
2932
2933         No new tests because there is no behavior change.
2934
2935         * Configurations/WebCore.xcconfig:
2936         * icu/unicode/bytestream.h: Removed.
2937         * icu/unicode/localpointer.h: Removed.
2938         * icu/unicode/parseerr.h: Removed.
2939         * icu/unicode/platform.h: Removed.
2940         * icu/unicode/ptypes.h: Removed.
2941         * icu/unicode/putil.h: Removed.
2942         * icu/unicode/rep.h: Removed.
2943         * icu/unicode/std_string.h: Removed.
2944         * icu/unicode/strenum.h: Removed.
2945         * icu/unicode/stringpiece.h: Removed.
2946         * icu/unicode/ubrk.h: Removed.
2947         * icu/unicode/uchar.h: Removed.
2948         * icu/unicode/ucnv.h: Removed.
2949         * icu/unicode/ucnv_err.h: Removed.
2950         * icu/unicode/ucol.h: Removed.
2951         * icu/unicode/uconfig.h: Removed.
2952         * icu/unicode/ucurr.h: Removed.
2953         * icu/unicode/uenum.h: Removed.
2954         * icu/unicode/uiter.h: Removed.
2955         * icu/unicode/uloc.h: Removed.
2956         * icu/unicode/umachine.h: Removed.
2957         * icu/unicode/unistr.h: Removed.
2958         * icu/unicode/unorm.h: Removed.
2959         * icu/unicode/unorm2.h: Removed.
2960         * icu/unicode/uobject.h: Removed.
2961         * icu/unicode/urename.h: Removed.
2962         * icu/unicode/uscript.h: Removed.
2963         * icu/unicode/uset.h: Removed.
2964         * icu/unicode/ustring.h: Removed.
2965         * icu/unicode/utext.h: Removed.
2966         * icu/unicode/utf.h: Removed.
2967         * icu/unicode/utf16.h: Removed.
2968         * icu/unicode/utf8.h: Removed.
2969         * icu/unicode/utf_old.h: Removed.
2970         * icu/unicode/utypes.h: Removed.
2971         * icu/unicode/uvernum.h: Removed.
2972         * icu/unicode/uversion.h: Removed.
2973         * platform/graphics/FontCache.h:
2974         (WebCore::FontDescriptionKey::makeFlagsKey):
2975
2976 2017-07-05  Wenson Hsieh  <wenson_hsieh@apple.com>
2977
2978         When dragging a selection, clearing the selection in dragstart should not crash the web process
2979         https://bugs.webkit.org/show_bug.cgi?id=174142
2980         <rdar://problem/33067501>
2981
2982         Reviewed by Tim Horton.
2983
2984         Currenly, if the page clears the current selection after dragging starts on selected content, the web process
2985         will crash while attempting to write pasteboard data for a nonexistent selection. This patch adds a trivial
2986         check for this case, bailing if no DHTML dragging data was specified by the page during a selection drag and the
2987         selection has been cleared.
2988
2989         Also removes some unused code for estimating the bounds of the current selection. On iOS, dragging was actually
2990         crashing earlier, in this codepath. However, this information isn't even used anymore, since the drag anchor
2991         point is no longer necessary on iOS.
2992
2993         Test: DataInteractionTests.DoNotCrashWhenSelectionIsClearedInDragStart
2994
2995         * page/DragController.cpp:
2996         (WebCore::DragController::startDrag):
2997
2998 2017-07-05  Simon Fraser  <simon.fraser@apple.com>
2999
3000         Try to fix iOS 10.3 public SDK builds.
3001
3002         * platform/spi/cocoa/IOSurfaceSPI.h:
3003
3004 2017-07-05  Zalan Bujtas  <zalan@apple.com>
3005
3006         REGRESSION (r217522): "Show My Relationship" link in familysearch.org does not work.
3007         https://bugs.webkit.org/show_bug.cgi?id=174070
3008         <rdar://problem/32940653>
3009
3010         Reviewed by Simon Fraser.
3011
3012         Decouple in- and out-of-flow computed position values. Now we match blink's implementation on
3013         in-flow values.
3014         This also fixes the flickering content while scrolling on hbr.org.  
3015
3016         Covered by existing test cases.
3017
3018         * css/CSSComputedStyleDeclaration.cpp:
3019         (WebCore::positionOffsetValue):
3020
3021 2017-07-05  Devin Rousso  <drousso@apple.com>
3022
3023         Web Inspector: Allow users to log any tracked canvas context
3024         https://bugs.webkit.org/show_bug.cgi?id=173397
3025         <rdar://problem/33111581>
3026
3027         Reviewed by Joseph Pecoraro.
3028
3029         Tests: inspector/canvas/resolveCanvasContext-2d.html
3030                inspector/canvas/resolveCanvasContext-webgl.html
3031                inspector/canvas/resolveCanvasContext-webgl2.html
3032                inspector/canvas/resolveCanvasContext-webgpu.html
3033
3034         * inspector/InspectorCanvasAgent.h:
3035         * inspector/InspectorCanvasAgent.cpp:
3036         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
3037         (WebCore::contextAsScriptValue):
3038         (WebCore::InspectorCanvasAgent::resolveCanvasContext):
3039
3040 2017-07-05  Emilio Cobos Álvarez  <ecobos@igalia.com>
3041
3042         Style sharing check for fullscreen element seems bogus.
3043         https://bugs.webkit.org/show_bug.cgi?id=160196
3044
3045         Reviewed by Antti Koivisto.
3046
3047         No new tests (no easy way to test this reliably).
3048
3049         * style/StyleSharingResolver.cpp:
3050         (WebCore::Style::SharingResolver::canShareStyleWithElement):
3051
3052 2017-07-05  Simon Fraser  <simon.fraser@apple.com>
3053
3054         Add a logging channel for IOSurface allocations
3055         https://bugs.webkit.org/show_bug.cgi?id=174167
3056
3057         Reviewed by Tim Horton.
3058
3059         Add an "IOSurface" log channel, make IOSurface TextStream-loggable, and log cached
3060         and new IOSurface allocations. Do some namespace-related cleanup.
3061
3062         * platform/Logging.h:
3063         * platform/graphics/cocoa/IOSurface.h:
3064         * platform/graphics/cocoa/IOSurface.mm:
3065         (WebCore::WebCore::IOSurface::create):
3066         (WebCore::WebCore::IOSurface::surfaceID):
3067         (WebCore::operator<<):
3068
3069 2017-07-05  Antti Koivisto  <antti@apple.com>
3070
3071         Low memory notification shouldn't cause style recalc
3072         https://bugs.webkit.org/show_bug.cgi?id=173574
3073         <rdar://problem/32616997>
3074
3075         Reviewed by Andreas Kling.
3076
3077         Patch mostly by Myles.
3078
3079         When we receive a low memory warning, we clear the style resolver. Previously, we were using
3080         this as an opportunity to also purge the CSSFontSelector. However, purging the font selector
3081         is wasteful, since the exact same set of CSSFontFace objects will be recreated as soon as the
3082         CSSFontSelector is recreated. It's also harmful because this purge operation causes fonts to
3083         be removed from the document's working set, and therefore triggers a relayout. Instead, this
3084         call should be softened to only delete any transitory caches the CSSFontSelector owns.
3085
3086         We can simply delay the rebuild of the CSSFontSelector to
3087         StyleResolver::appendAuthorStyleSheets(), when it's really needed. This way, we can sidestep
3088         this whole problem.
3089
3090         There's also an added benefit: Now, buildStarted() doesn't have to be idempotent, so we can
3091         enforce a stricter calling sequence with ASSERT()s.
3092
3093         * css/CSSFontFaceSet.cpp:
3094         (WebCore::CSSFontFaceSet::emptyCaches):
3095         * css/CSSFontFaceSet.h:
3096         * css/CSSFontSelector.cpp:
3097         (WebCore::CSSFontSelector::emptyCaches):
3098
3099             Add a separate function to clear font selector caches.
3100
3101         (WebCore::CSSFontSelector::buildStarted):
3102         (WebCore::CSSFontSelector::buildCompleted):
3103         (WebCore::CSSFontSelector::addFontFaceRule):
3104         (WebCore::CSSFontSelector::fontModified):
3105
3106             No need to invalidate while building.
3107
3108         (WebCore::CSSFontSelector::fontRangesForFamily):
3109         * css/CSSFontSelector.h:
3110         * css/StyleResolver.cpp:
3111         (WebCore::StyleResolver::StyleResolver):
3112         (WebCore::StyleResolver::addCurrentSVGFontFaceRules):
3113
3114             Factor into a function from the constructor.
3115
3116         (WebCore::StyleResolver::appendAuthorStyleSheets):
3117
3118             Font selector build is now started and finished by StyleScope.
3119
3120         * css/StyleResolver.h:
3121         * dom/Document.cpp:
3122         (WebCore::Document::resolveStyle):
3123
3124             Call FrameView::styleDidChange() to update any custom scrollbars.
3125             This bug was hidden by spurious style recalcs, tested by fast/css/scrollbar-dynamic-style-change.html
3126
3127         (WebCore::Document::userAgentShadowTreeStyleResolver):
3128         (WebCore::Document::didClearStyleResolver):
3129
3130             Don't start the font selector rebuild after clearing the resolver. It would cause style recalc trashing.
3131             Instead the build starts when the new resolver is constructed.
3132
3133         * page/MemoryRelease.cpp:
3134         (WebCore::releaseCriticalMemory):
3135
3136             Release font selector caches.
3137
3138         * style/StyleScope.cpp:
3139         (WebCore::Style::Scope::resolver):
3140
3141 2017-07-05  Brent Fulgham  <bfulgham@apple.com>
3142
3143         [WK2] Prevent ResourceLoadStatistics from triggering a cascade of read/write events
3144         https://bugs.webkit.org/show_bug.cgi?id=174062\
3145         <rdar://problem/33086744>
3146
3147         Reviewed by Chris Dumez.
3148
3149         Treat DISPATCH_VNODE_DELETE, DISPATCH_VNODE_RENAME, and DISPATCH_VNODE_REVOKE as equivalent
3150         "file is unavailable" events, and act as though the file was deleted. Don't listen for
3151         DISPATCH_VNODE_EXTEND, since we always get a DISPATCH_VNODE_WRITE as well, and we only
3152         want to read once.
3153
3154         Finally, add some logging to support future investigations.
3155
3156         * platform/FileMonitor.h:
3157         (WebCore::FileMonitor::platformMonitor): Expose dispatch_source_t for logging purposes.
3158         * platform/cocoa/FileMonitorCocoa.mm:
3159         (WebCore::FileMonitor::startMonitoring): Add logging.
3160         (WebCore::FileMonitor::stopMonitoring): Ditto.
3161
3162 2017-07-05  Jonathan Bedard  <jbedard@apple.com>
3163
3164         Add WebKitPrivateFrameworkStubs for iOS 11
3165         https://bugs.webkit.org/show_bug.cgi?id=173988
3166
3167         Reviewed by David Kilzer.
3168
3169         * Configurations/WebCore.xcconfig: iphoneos and iphonesimulator should use the
3170         same directory for private framework stubs.
3171
3172 2017-07-05  Emilio Cobos Álvarez  <ecobos@igalia.com>
3173
3174         Don't resolve an extra computed style for getComputedStyle in a display: none subtree.
3175         https://bugs.webkit.org/show_bug.cgi?id=174145
3176
3177         Before this, we were also resolving the first ancestor's style as
3178         inheriting from itself, which felt pretty wrong (though I think it's
3179         not observable).
3180
3181         Reviewed by Antti Koivisto.
3182
3183         No new tests (non-observable behavior).
3184
3185         * dom/Element.cpp:
3186         (WebCore::Element::resolveComputedStyle):
3187
3188 2017-07-05  Frederic Wang  <fwang@igalia.com>
3189
3190         Move ScrolledContentsLayer property to ScrollingStateScrollingNode
3191         https://bugs.webkit.org/show_bug.cgi?id=174134
3192
3193         Reviewed by Simon Fraser.
3194
3195         ScrollingStateFrameScrollingNode and ScrollingStateOverflowScrollingNode both use a
3196         ScrolledContentsLayer property for the same purpose. This commit moves that property into
3197         their parent class ScrollingStateScrollingNode, so that more code is shared between the two
3198         classes. This will also help the refactoring in bug 174130.
3199
3200         No new tests, only dumped tree may change a bit.
3201
3202         * page/scrolling/ScrollingStateFrameScrollingNode.cpp: Remove scrolled contents layer.
3203         (WebCore::ScrollingStateFrameScrollingNode::ScrollingStateFrameScrollingNode):
3204         (WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
3205         (WebCore::ScrollingStateFrameScrollingNode::setScrolledContentsLayer): Deleted.
3206         * page/scrolling/ScrollingStateFrameScrollingNode.h: Ditto.
3207         * page/scrolling/ScrollingStateOverflowScrollingNode.cpp: Ditto.
3208         (WebCore::ScrollingStateOverflowScrollingNode::ScrollingStateOverflowScrollingNode):
3209         (WebCore::ScrollingStateOverflowScrollingNode::dumpProperties):
3210         (WebCore::ScrollingStateOverflowScrollingNode::setScrolledContentsLayer): Deleted.
3211         * page/scrolling/ScrollingStateOverflowScrollingNode.h: Ditto.
3212         (): Deleted.
3213         (WebCore::ScrollingStateOverflowScrollingNode::scrolledContentsLayer): Deleted.
3214         * page/scrolling/ScrollingStateScrollingNode.cpp: Add scrolled contents layer.
3215         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
3216         (WebCore::ScrollingStateScrollingNode::setScrolledContentsLayer):
3217         (WebCore::ScrollingStateScrollingNode::dumpProperties): Use the label from the overflow class
3218         which is different from the frame class. The dumping order may change a bit too.
3219         * page/scrolling/ScrollingStateScrollingNode.h: Add ScrolledContentsLayer to the enum and
3220         scrolled contents layer.
3221         (WebCore::ScrollingStateScrollingNode::scrolledContentsLayer):
3222         * page/scrolling/mac/ScrollingTreeFrameScrollingNodeMac.mm:
3223         (WebCore::ScrollingTreeFrameScrollingNodeMac::commitStateBeforeChildren): Adjust enum value
3224         to use ScrollingStateScrollingNode::ScrolledContentsLayer.
3225
3226 2017-07-05  Emilio Cobos Álvarez  <ecobos@igalia.com>
3227
3228         ProcessingInstruction::clearExistingCachedSheet doesn't really exist.
3229         https://bugs.webkit.org/show_bug.cgi?id=174146
3230
3231         Reviewed by Chris Dumez.
3232
3233         No new tests (no functionality change).
3234
3235         * dom/ProcessingInstruction.h: Remove dead declaration.
3236
3237 2017-07-05  Matt Lewis  <jlewis3@apple.com>
3238
3239         Unreviewed, rolling out r219128.
3240
3241         Spoke with engineer who originally submitted, Patch for APi
3242         test to follow.
3243
3244         Reverted changeset:
3245
3246         "Unreviewed, rolling out r219070."
3247         https://bugs.webkit.org/show_bug.cgi?id=174082
3248         http://trac.webkit.org/changeset/219128
3249
3250 2017-07-05  Matt Lewis  <jlewis3@apple.com>
3251
3252         Unreviewed, rolling out r219070.
3253
3254         This revision caused consistent failures of the API test
3255         UIPasteboardTests.DoNotPastePlainTextAsURL on iOS.
3256
3257         Reverted changeset:
3258
3259         "Pasting single words copied to UIPasteboard inserts URLs in
3260         editable areas"
3261         https://bugs.webkit.org/show_bug.cgi?id=174082
3262         http://trac.webkit.org/changeset/219070
3263
3264 2017-07-05  Youenn Fablet  <youenn@apple.com>
3265
3266         Receiving tracks should be ended when peer connection is being closed
3267         https://bugs.webkit.org/show_bug.cgi?id=174109
3268
3269         Reviewed by Eric Carlson.
3270
3271         Test: webrtc/peer-connection-track-end.html
3272
3273         As per https://www.w3.org/TR/webrtc/#dom-rtcpeerconnection-close, tracks should be ended when peer connection is closed.
3274         Also updating transceiver stopped state.
3275
3276         * Modules/mediastream/RTCPeerConnection.cpp:
3277         (WebCore::RTCPeerConnection::doClose):
3278         * Modules/mediastream/RTCRtpReceiver.cpp:
3279         (WebCore::RTCRtpReceiver::stop):
3280         * Modules/mediastream/RTCRtpReceiver.h:
3281
3282 2017-07-04  Said Abou-Hallawa  <sabouhallawa@apple.com>
3283
3284         Unreviewed, review follow-up after r218961
3285
3286         * platform/graphics/BitmapImage.cpp:
3287         (WebCore::BitmapImage::updateFromSettings):
3288
3289 2017-07-04  Antti Koivisto  <antti@apple.com>
3290
3291         RenderThemeCocoa::mediaControlsFormattedStringForDuration is leaking NSDateComponentsFormatters
3292         https://bugs.webkit.org/show_bug.cgi?id=174138
3293
3294         Reviewed by Ryosuke Niwa.
3295
3296         Saw a random spin here during media playback. Looks like we are leaking.
3297
3298         * rendering/RenderThemeCocoa.h:
3299         * rendering/RenderThemeCocoa.mm:
3300         (WebCore::RenderThemeCocoa::mediaControlsFormattedStringForDuration):
3301
3302             Reuse NSDateComponentsFormatter.
3303
3304 2017-07-04  Antti Koivisto  <antti@apple.com>
3305
3306         FrameView should not set RenderView::logicalWidth directly for printing
3307         https://bugs.webkit.org/show_bug.cgi?id=174135
3308
3309         Reviewed by Zalan Bujtas.
3310
3311         Renderer logicalWidth should be set by layout. Direct override by RenderView when printing means
3312         that we don't layout children in all cases when the width changes. This is currently mostly hidden
3313         by spurious layouts but causes problems when trying to fix other things that reduces those.
3314
3315         * page/FrameView.cpp:
3316         (WebCore::FrameView::forceLayoutForPagination):
3317
3318             Instead of calling setLogicalWidth directly call the new setPageLogicalSize that sets both the width
3319             and the height uniformly.
3320
3321         * rendering/RenderView.cpp:
3322         (WebCore::RenderView::updateLogicalWidth):
3323
3324             Use pageLogicalSize->width() in printing state instead of skipping the logical width update entirely.
3325             This ensures that the layout will progress to children when the page logical width changes.
3326
3327         (WebCore::RenderView::initializeLayoutState):
3328         (WebCore::RenderView::layout):
3329         (WebCore::RenderView::pageOrViewLogicalHeight):
3330         (WebCore::RenderView::setPageLogicalSize):
3331         * rendering/RenderView.h:
3332
3333             Replace the existing m_pageLogicalHeight with std::optional m_pageLogicalSize.
3334
3335 2017-07-04  Xabier Rodriguez Calvar  <calvaris@igalia.com>
3336
3337         [EME] Solve a couple of compiler warnings
3338         https://bugs.webkit.org/show_bug.cgi?id=174020
3339
3340         Reviewed by Michael Catanzaro.
3341
3342         * Modules/encryptedmedia/CDM.cpp:
3343         (WebCore::CDM::isPersistentType): Added default return and
3344         assertion.
3345         * Modules/encryptedmedia/MediaKeySession.cpp:
3346         (WebCore::MediaKeySession::updateKeyStatuses): This warning was
3347         already solved but I think adding an assertion for the default
3348         case can help catch errors in the future.
3349
3350 2017-07-04  Joseph Pecoraro  <pecoraro@apple.com>
3351
3352         Cleanup some StringBuilder use
3353         https://bugs.webkit.org/show_bug.cgi?id=174118
3354
3355         Reviewed by Andreas Kling.
3356
3357         * Modules/mediastream/PeerConnectionBackend.cpp:
3358         (WebCore::filterICECandidate):
3359         * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
3360         * contentextensions/ContentExtension.cpp:
3361         (WebCore::ContentExtensions::ContentExtension::compileGlobalDisplayNoneStyleSheet):
3362         * css/CSSFontStyleRangeValue.cpp:
3363         (WebCore::CSSFontStyleRangeValue::customCSSText):
3364         * css/CSSFontStyleValue.cpp:
3365         (WebCore::CSSFontStyleValue::customCSSText):
3366         * css/CSSGridAutoRepeatValue.cpp:
3367         (WebCore::CSSGridAutoRepeatValue::customCSSText):
3368         * css/parser/CSSParser.cpp:
3369         (WebCore::CSSParser::parseFontFaceDescriptor):
3370         * dom/Attr.cpp:
3371         * html/canvas/WebGPURenderingContext.cpp:
3372         * html/parser/HTMLParserIdioms.cpp:
3373         * platform/network/ParsedContentType.cpp:
3374         * platform/network/cocoa/CookieCocoa.mm:
3375         * platform/text/mac/LocaleMac.mm:
3376         * xml/XMLHttpRequest.cpp:
3377         (WebCore::XMLHttpRequest::getAllResponseHeaders):
3378
3379 2017-07-03  Andreas Kling  <akling@apple.com>
3380
3381         Null RenderLayer* deref in FrameView::adjustTiledBackingCoverage()
3382         https://bugs.webkit.org/show_bug.cgi?id=174106
3383         <rdar://problem/33085838>
3384
3385         Reviewed by Tim Horton.
3386
3387         I haven't been able to reproduce this crash locally, but I have seen
3388         video of someone who can, so here's a null check for the RenderView::layer()
3389         which could be null if we're called between RenderView construction
3390         and the first callback to RenderLayerModelObject::styleDidChange().
3391
3392         * page/FrameView.cpp:
3393         (WebCore::FrameView::adjustTiledBackingCoverage):
3394
3395 2017-07-03  Matt Rajca  <mrajca@apple.com>
3396
3397         Add/remove appropriate media element behavior restrictions when updateWebsitePolicies is called
3398         https://bugs.webkit.org/show_bug.cgi?id=174103
3399
3400         Reviewed by Alex Christensen.
3401
3402         Test: Added API test.
3403
3404         Added support for updating rate change behavior restrictions on media elements that have already
3405         been created.
3406
3407         * html/HTMLMediaElement.cpp:
3408         (WebCore::HTMLMediaElement::updateRateChangeRestrictions):
3409         * html/HTMLMediaElement.h:
3410         * page/Page.cpp:
3411         (WebCore::Page::updateMediaElementRateChangeRestrictions):
3412         * page/Page.h:
3413
3414 2017-07-03  Matt Lewis  <jlewis3@apple.com>
3415
3416         Unreviewed, rolling out r219103.
3417
3418         Caused multiple build failures.
3419
3420         Reverted changeset:
3421
3422         "Remove copy of ICU headers from WebKit"
3423         https://bugs.webkit.org/show_bug.cgi?id=116407
3424         http://trac.webkit.org/changeset/219103
3425
3426 2017-07-03  Myles C. Maxfield  <mmaxfield@apple.com>
3427
3428         Remove copy of ICU headers from WebKit
3429         https://bugs.webkit.org/show_bug.cgi?id=116407
3430
3431         Reviewed by Alex Christensen.
3432
3433         Use WTF's copy of ICU headers.
3434
3435         No new tests because there is no behavior change.
3436
3437         * Configurations/WebCore.xcconfig:
3438         * icu/unicode/bytestream.h: Removed.
3439         * icu/unicode/localpointer.h: Removed.
3440         * icu/unicode/parseerr.h: Removed.
3441         * icu/unicode/platform.h: Removed.
3442         * icu/unicode/ptypes.h: Removed.
3443         * icu/unicode/putil.h: Removed.
3444         * icu/unicode/rep.h: Removed.
3445         * icu/unicode/std_string.h: Removed.
3446         * icu/unicode/strenum.h: Removed.
3447         * icu/unicode/stringpiece.h: Removed.
3448         * icu/unicode/ubrk.h: Removed.
3449         * icu/unicode/uchar.h: Removed.
3450         * icu/unicode/ucnv.h: Removed.
3451         * icu/unicode/ucnv_err.h: Removed.
3452         * icu/unicode/ucol.h: Removed.
3453         * icu/unicode/uconfig.h: Removed.
3454         * icu/unicode/ucurr.h: Removed.
3455         * icu/unicode/uenum.h: Removed.
3456         * icu/unicode/uiter.h: Removed.
3457         * icu/unicode/uloc.h: Removed.
3458         * icu/unicode/umachine.h: Removed.
3459         * icu/unicode/unistr.h: Removed.
3460         * icu/unicode/unorm.h: Removed.
3461         * icu/unicode/unorm2.h: Removed.
3462         * icu/unicode/uobject.h: Removed.
3463         * icu/unicode/urename.h: Removed.
3464         * icu/unicode/uscript.h: Removed.
3465         * icu/unicode/uset.h: Removed.
3466         * icu/unicode/ustring.h: Removed.
3467         * icu/unicode/utext.h: Removed.
3468         * icu/unicode/utf.h: Removed.
3469         * icu/unicode/utf16.h: Removed.
3470         * icu/unicode/utf8.h: Removed.
3471         * icu/unicode/utf_old.h: Removed.
3472         * icu/unicode/utypes.h: Removed.
3473         * icu/unicode/uvernum.h: Removed.
3474         * icu/unicode/uversion.h: Removed.
3475
3476 2017-07-03  Myles C. Maxfield  <mmaxfield@apple.com>
3477
3478         REGRESSION(Variation Fonts): Specifying Skia by PostScript name does not yield the expected result
3479         https://bugs.webkit.org/show_bug.cgi?id=174079
3480         <rdar://problem/33040854>
3481
3482         Reviewed by Alex Christensen.
3483
3484         Because Skia is a variation font, its PostScript name contains values to apply to its variation
3485         axes. However, WebKit's variation code was overwriting these intrinsive values with ones specified
3486         by CSS. Therefore, the intrinsic ones were being ignored. The solution is just to pass a flag from
3487         the lookup code to the variations code describing if the font was created via a PostScript name,
3488         and to not apply the CSS properties to it if it was.
3489
3490         Test: fast/text/variations/skia-postscript-name.html
3491
3492         * platform/graphics/FontCache.h:
3493         * platform/graphics/cocoa/FontCacheCoreText.cpp:
3494         (WebCore::preparePlatformFont):
3495         (WebCore::platformFontLookupWithFamily):
3496         (WebCore::fontWithFamily):
3497
3498 2017-07-03  Brady Eidson  <beidson@apple.com>
3499
3500         Switch all WebKit API related to favicons from WebIconDatabase over to new WebCore::IconLoader mechanism.
3501         https://bugs.webkit.org/show_bug.cgi?id=174073
3502
3503         Reviewed by Andy Estes.
3504
3505         Covered by existing API test.
3506
3507         * loader/DocumentLoader.cpp:
3508         (WebCore::DocumentLoader::startIconLoading):
3509         * loader/EmptyClients.cpp:
3510         * loader/FrameLoaderClient.h:
3511
3512 2017-07-03  Sam Weinig  <sam@webkit.org>
3513
3514         [WebIDL] Remove more unnecessary uses of the preprocessor in idl files
3515         https://bugs.webkit.org/show_bug.cgi?id=174083
3516
3517         Reviewed by Alex Christensen.
3518
3519         Purge&nbs