26c545e8f6ba1ede6b454393305ac23f7a745e65
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-06-04  Timothy Hatcher  <timothy@apple.com>
2
3         Selection color is dark when using Safari in dark mode.
4
5         https://bugs.webkit.org/show_bug.cgi?id=186288
6         rdar://problem/38438625
7
8         Reviewed by Simon Fraser.
9
10         Pass StyleColor::Options to all of the selection color functions.
11         Removed supportsSelectionForegroundColors() from RenderThemeMac,
12         to get the default of true, since the forground colors in dark mode
13         can be different now. Use new semantic color methods on NSColor.
14
15         * rendering/RenderElement.cpp:
16         (WebCore::RenderElement::selectionColor const):
17         (WebCore::RenderElement::selectionBackgroundColor const):
18         * rendering/RenderListBox.cpp:
19         (WebCore::RenderListBox::paintItemForeground):
20         (WebCore::RenderListBox::paintItemBackground):
21         * rendering/RenderTheme.cpp:
22         (WebCore::RenderTheme::activeSelectionBackgroundColor const):
23         (WebCore::RenderTheme::inactiveSelectionBackgroundColor const):
24         (WebCore::RenderTheme::activeSelectionForegroundColor const):
25         (WebCore::RenderTheme::inactiveSelectionForegroundColor const):
26         (WebCore::RenderTheme::activeListBoxSelectionBackgroundColor const):
27         (WebCore::RenderTheme::activeListBoxSelectionForegroundColor const):
28         (WebCore::RenderTheme::inactiveListBoxSelectionForegroundColor const):
29         (WebCore::RenderTheme::platformActiveSelectionBackgroundColor const):
30         (WebCore::RenderTheme::platformActiveSelectionForegroundColor const):
31         (WebCore::RenderTheme::platformInactiveSelectionBackgroundColor const):
32         (WebCore::RenderTheme::platformInactiveSelectionForegroundColor const):
33         (WebCore::RenderTheme::platformActiveListBoxSelectionBackgroundColor const):
34         (WebCore::RenderTheme::platformActiveListBoxSelectionForegroundColor const):
35         (WebCore::RenderTheme::platformInactiveListBoxSelectionBackgroundColor const):
36         (WebCore::RenderTheme::platformInactiveListBoxSelectionForegroundColor const):
37         * rendering/RenderTheme.h:
38         * rendering/RenderThemeGtk.cpp:
39         (WebCore::RenderThemeGtk::platformActiveSelectionBackgroundColor const):
40         (WebCore::RenderThemeGtk::platformInactiveSelectionBackgroundColor const):
41         (WebCore::RenderThemeGtk::platformActiveSelectionForegroundColor const):
42         (WebCore::RenderThemeGtk::platformInactiveSelectionForegroundColor const):
43         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionBackgroundColor const):
44         (WebCore::RenderThemeGtk::platformActiveListBoxSelectionForegroundColor const):
45         (WebCore::RenderThemeGtk::platformInactiveListBoxSelectionForegroundColor const):
46         * rendering/RenderThemeGtk.h:
47         * rendering/RenderThemeIOS.h:
48         * rendering/RenderThemeIOS.mm:
49         (WebCore::RenderThemeIOS::platformActiveSelectionBackgroundColor const):
50         (WebCore::RenderThemeIOS::platformInactiveSelectionBackgroundColor const):
51         * rendering/RenderThemeMac.h:
52         * rendering/RenderThemeMac.mm:
53         (WebCore::RenderThemeMac::platformActiveSelectionBackgroundColor const):
54         (WebCore::RenderThemeMac::platformInactiveSelectionBackgroundColor const):
55         (WebCore::RenderThemeMac::platformActiveSelectionForegroundColor const):
56         (WebCore::RenderThemeMac::platformInactiveSelectionForegroundColor const):
57         (WebCore::RenderThemeMac::platformActiveListBoxSelectionBackgroundColor const):
58         (WebCore::RenderThemeMac::platformInactiveListBoxSelectionBackgroundColor const):
59         (WebCore::RenderThemeMac::platformActiveListBoxSelectionForegroundColor const):
60         (WebCore::RenderThemeMac::platformInactiveListBoxSelectionForegroundColor const):
61         * rendering/RenderThemeWin.cpp:
62         (WebCore::RenderThemeWin::platformActiveSelectionBackgroundColor const):
63         (WebCore::RenderThemeWin::platformInactiveSelectionBackgroundColor const):
64         (WebCore::RenderThemeWin::platformActiveSelectionForegroundColor const):
65         (WebCore::RenderThemeWin::platformInactiveSelectionForegroundColor const):
66         * rendering/RenderThemeWin.h:
67
68 2018-06-04  Chris Dumez  <cdumez@apple.com>
69
70         Update Fetch code to provide more useful exception messages
71         https://bugs.webkit.org/show_bug.cgi?id=186156
72
73         Reviewed by Youenn Fablet.
74
75         Provide more useful error messages in our Loading / Fetch code.
76
77         * Modules/fetch/FetchBodyOwner.cpp:
78         (WebCore::FetchBodyOwner::arrayBuffer):
79         (WebCore::FetchBodyOwner::blob):
80         (WebCore::FetchBodyOwner::consumeOnceLoadingFinished):
81         (WebCore::FetchBodyOwner::formData):
82         (WebCore::FetchBodyOwner::json):
83         (WebCore::FetchBodyOwner::text):
84         * Modules/fetch/FetchHeaders.cpp:
85         (WebCore::canWriteHeader):
86         (WebCore::FetchHeaders::get const):
87         (WebCore::FetchHeaders::has const):
88         * Modules/fetch/FetchRequest.cpp:
89         (WebCore::FetchRequest::setBody):
90         (WebCore::FetchRequest::clone):
91         * Modules/fetch/FetchResponse.cpp:
92         (WebCore::FetchResponse::redirect):
93         (WebCore::FetchResponse::clone):
94         * workers/service/context/ServiceWorkerFetch.cpp:
95         (WebCore::ServiceWorkerFetch::processResponse):
96         (WebCore::ServiceWorkerFetch::dispatchFetchEvent):
97         * workers/service/context/ServiceWorkerFetch.h:
98
99 2018-06-04  Daniel Bates  <dabates@apple.com>
100
101         Update Strong Password appearance
102         https://bugs.webkit.org/show_bug.cgi?id=186239
103         <rdar://problem/38183795>
104
105         Reviewed by Brent Fulgham.
106
107         Fix up the gradient mask to start half-way through the visible text and size it to the
108         width of the visible text. Also change the color of the Strong Password label to 80% black.
109
110         We achieve sizing of the gradient to the width of the visible text by changing the CSS display
111         of the inner text element to be an inline-block and specifying "max-width: 100%" so that
112         its maximum width is less than or equal to the width of its containing block. Additionally,
113         only apply strong password-specific inner text element styles when the field is not disabled
114         or read-only and has a strong password appearance. Otherwise these styles, specifically the
115         display type, will adversely effect rendering of the text when the field is disabled or readonly.
116
117         * css/html.css:
118         (input::-webkit-strong-password-auto-fill-button):
119         * html/HTMLInputElement.cpp:
120         (WebCore::autoFillStrongPasswordMaskImage):
121         (WebCore::HTMLInputElement::createInnerTextStyle):
122
123 2018-06-04  Wenson Hsieh  <wenson_hsieh@apple.com>
124
125         [WebKit on watchOS] Remove all uses of the EXTRA_ZOOM_MODE compiler flag
126         https://bugs.webkit.org/show_bug.cgi?id=186279
127
128         Reviewed by Tim Horton.
129
130         Replaces uses of ENABLE(EXTRA_ZOOM_MODE) with PLATFORM(WATCHOS). No change in behavior.
131
132         * Modules/mediacontrols/MediaControlsHost.cpp:
133         (WebCore::MediaControlsHost::compactMode const):
134         * html/HTMLMediaElement.cpp:
135         (WebCore::HTMLMediaElement::updatePlayState):
136         * page/Page.cpp:
137         (WebCore::relevantViewRect):
138         * page/SettingsBase.cpp:
139         (WebCore::SettingsBase::defaultMinimumZoomFontSize):
140         (WebCore::SettingsBase::defaultDownloadableBinaryFontsEnabled):
141         * page/ViewportConfiguration.cpp:
142         (WebCore::platformDeviceWidthOverride):
143         (WebCore::shouldOverrideShrinkToFitArgument):
144         (WebCore::needsUpdateAfterChangingDisabledAdaptations):
145         * platform/LocalizedStrings.cpp:
146         * platform/LocalizedStrings.h:
147         * platform/audio/ios/MediaSessionManagerIOS.mm:
148         (WebCore::MediaSessionManageriOS::configureWireLessTargetMonitoring):
149         (-[WebMediaSessionHelper dealloc]):
150         (-[WebMediaSessionHelper hasWirelessTargetsAvailable]):
151         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
152         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerLayer):
153         (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayerItem):
154         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenMode):
155         * platform/ios/PlaybackSessionInterfaceAVKit.mm:
156         (WebCore::PlaybackSessionInterfaceAVKit::seekableRangesChanged):
157         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
158         (-[WebAVPlayerViewController initWithFullscreenInterface:]):
159         (-[WebAVPlayerViewController enterFullScreenAnimated:completionHandler:]):
160         (-[WebAVPlayerViewController exitFullScreenAnimated:completionHandler:]):
161         (-[WebAVPlayerViewController MY_NO_RETURN]):
162         (-[WebAVPlayerViewController isPictureInPicturePossible]):
163         (-[WebAVPlayerViewController isPictureInPictureActive]):
164         (-[WebAVPlayerViewController pictureInPictureActive]):
165         (-[WebAVPlayerViewController pictureInPictureWasStartedWhenEnteringBackground]):
166         (-[WebAVPlayerViewController showsPlaybackControls]):
167         (-[WebAVPlayerViewController setShowsPlaybackControls:]):
168         (-[WebAVPlayerViewController setAllowsPictureInPicturePlayback:]):
169         (-[WebAVPlayerViewController setDelegate:]):
170         (VideoFullscreenInterfaceAVKit::setupFullscreen):
171         (VideoFullscreenInterfaceAVKit::shouldExitFullscreenWithReason):
172         (VideoFullscreenInterfaceAVKit::doSetup):
173         (WebCore::supportsPictureInPicture):
174         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
175         (VideoFullscreenControllerContext::willExitFullscreen):
176         * rendering/RenderThemeIOS.h:
177         * rendering/RenderThemeIOS.mm:
178
179 2018-06-04  Youenn Fablet  <youenn@apple.com>
180
181         [WK1] Add an option to restrict communication to localhost sockets
182         https://bugs.webkit.org/show_bug.cgi?id=186249
183
184         Reviewed by Eric Carlson.
185
186         Covered by existing tests.
187         Set explicitly webrtc socket IP address to 127.0.0.1 in testing mode.
188         For that purpose, we need WK1 to create a wrapper around a socket factory,
189         this wrapper being responsible of setting or not the IP address to 127.0.0.1.
190
191         * platform/mediastream/libwebrtc/LibWebRTCProvider.cpp:
192         (WebCore::prepareSocketAddress):
193         (WebCore::BasicPacketSocketFactory::BasicPacketSocketFactory):
194         (WebCore::BasicPacketSocketFactory::setDisableNonLocalhostConnections):
195         (WebCore::BasicPacketSocketFactory::CreateClientTcpSocket):
196         (WebCore::LibWebRTCProvider::createPeerConnection):
197         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
198
199 2018-06-04  Zalan Bujtas  <zalan@apple.com>
200
201         [LFC] Merge width and margin computation for block-level, non-replaced and inline,replaced element in normal flow
202         https://bugs.webkit.org/show_bug.cgi?id=186225
203
204         Reviewed by Antti Koivisto.
205
206         This patch merges the width and horizontal margin computation for
207         https://www.w3.org/TR/CSS22/visudet.html#inline-replaced-width and https://www.w3.org/TR/CSS22/visudet.html#blockwidth
208
209         * layout/FormattingContextGeometry.cpp:
210         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
211         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
212         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
213
214 2018-06-01  Zalan Bujtas  <zalan@apple.com>
215
216         [LFC] Merge width and horizontal margin computation
217         https://bugs.webkit.org/show_bug.cgi?id=186217
218
219         Reviewed by Antti Koivisto.
220
221         We could certainly compute width and maring separately, but to match each steps defined
222         at https://www.w3.org/TR/CSS22/visudet.html, we should just merge width and horizontal margin computations
223         (followed by height and vertical margins).
224         Use 0 computed marings for now.
225
226         * layout/FormattingContext.cpp:
227         (WebCore::Layout::FormattingContext::computeFloatingWidthAndMargin const):
228         (WebCore::Layout::FormattingContext::computeOutOfFlowWidthAndMargin const):
229         (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
230         (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
231         (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const): Deleted.
232         (WebCore::Layout::FormattingContext::computeFloatingWidth const): Deleted.
233         * layout/FormattingContext.h:
234         * layout/FormattingContextGeometry.cpp:
235         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedWidthAndMargin):
236         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedWidthAndMargin):
237         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidthAndMargin):
238         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidthAndMargin):
239         (WebCore::Layout::FormattingContext::Geometry::outOfFlowWidthAndMargin):
240         (WebCore::Layout::FormattingContext::Geometry::floatingWidthAndMargin):
241         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidthAndMargin):
242         (WebCore::Layout::FormattingContext::Geometry::computedPadding):
243         (WebCore::Layout::outOfFlowNonReplacedWidth): Deleted.
244         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedWidth): Deleted.
245         (WebCore::Layout::floatingNonReplacedWidth): Deleted.
246         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidth): Deleted.
247         (WebCore::Layout::FormattingContext::Geometry::outOfFlowWidth): Deleted.
248         (WebCore::Layout::FormattingContext::Geometry::floatingWidth): Deleted.
249         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidth): Deleted.
250         * layout/LayoutContext.cpp:
251         (WebCore::Layout::LayoutContext::initializeRoot):
252         * layout/blockformatting/BlockFormattingContext.cpp:
253         (WebCore::Layout::BlockFormattingContext::layout const):
254         (WebCore::Layout::BlockFormattingContext::computeWidthAndMargin const):
255         (WebCore::Layout::BlockFormattingContext::computeInFlowWidthAndMargin const):
256         (WebCore::Layout::BlockFormattingContext::computeWidth const): Deleted.
257         (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const): Deleted.
258         (WebCore::Layout::BlockFormattingContext::computeMargin const): Deleted.
259         * layout/blockformatting/BlockFormattingContext.h:
260         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
261         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidthAndMargin):
262         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidthAndMargin):
263         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidth): Deleted.
264         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidth): Deleted.
265         (WebCore::Layout::BlockFormattingContext::Geometry::computedMargin): Deleted.
266         * layout/displaytree/DisplayBox.cpp:
267         (WebCore::Display::Box::marginBox const):
268         * layout/displaytree/DisplayBox.h:
269         (WebCore::Display::Box::setHasValidVerticalMargin):
270         (WebCore::Display::Box::setHasValidHorizontalMargin):
271         (WebCore::Display::Box::invalidateMargin):
272         (WebCore::Display::Box::setHorizontalMargin):
273         (WebCore::Display::Box::setVerticalMargin):
274         (WebCore::Display::Box::marginTop const):
275         (WebCore::Display::Box::marginLeft const):
276         (WebCore::Display::Box::marginBottom const):
277         (WebCore::Display::Box::marginRight const):
278         (WebCore::Display::Box::Edges::Edges): Deleted.
279         (WebCore::Display::Box::setHasValidMargin): Deleted.
280         (WebCore::Display::Box::setMargin): Deleted.
281
282 2018-06-03  Michael Catanzaro  <mcatanzaro@igalia.com>
283
284         REGRESSION(r232338): [GTK] Broke a few layout tests
285         https://bugs.webkit.org/show_bug.cgi?id=186244
286
287         Unreviewed, also rollout r232392.
288
289         * rendering/RenderTheme.cpp:
290         (WebCore::RenderTheme::adjustStyle):
291         * rendering/RenderTheme.h:
292         (WebCore::RenderTheme::adjustListboxStyle const): Deleted.
293         * rendering/RenderThemeGtk.cpp:
294         (WebCore::RenderThemeGtk::adjustListboxStyle const): Deleted.
295         * rendering/RenderThemeGtk.h:
296
297 2018-06-03  Michael Catanzaro  <mcatanzaro@igalia.com>
298
299         REGRESSION(r232338): [GTK] Broke a few layout tests
300         https://bugs.webkit.org/show_bug.cgi?id=186244
301
302         Unreviewed, rollout r232338.
303
304         * platform/gtk/RenderThemeGadget.cpp:
305         (WebCore::RenderThemeGadget::RenderThemeGadget):
306         (WebCore::baseStyleContext): Deleted.
307         * rendering/RenderThemeGtk.cpp:
308         (WebCore::RenderThemeGtk::adjustButtonStyle const):
309         (WebCore::RenderThemeGtk::adjustTextFieldStyle const):
310         (WebCore::RenderThemeGtk::adjustSearchFieldStyle const):
311         (WebCore::styleColor):
312         (WebCore::RenderThemeGtk::adjustTextAreaStyle const): Deleted.
313         * rendering/RenderThemeGtk.h:
314
315 2018-06-03  Eric Carlson  <eric.carlson@apple.com>
316
317         [iOS] MediaPlayer.framework is not always available
318         https://bugs.webkit.org/show_bug.cgi?id=186220
319         <rdar://problem/40571286>
320
321         Reviewed by Tim Horton.
322
323         * platform/ios/RemoteCommandListenerIOS.mm:
324         (WebCore::RemoteCommandListener::create):
325
326 2018-06-02  Darin Adler  <darin@apple.com>
327
328         [Cocoa] Update some code to be more ARC-compatible to prepare for future ARC adoption
329         https://bugs.webkit.org/show_bug.cgi?id=186227
330
331         Reviewed by Dan Bernstein.
332
333         * bridge/objc/objc_instance.mm:
334         (ObjcInstance::~ObjcInstance): Use @autoreleasepool instead of NSAutoreleasePool.
335         * platform/ios/wak/WAKView.mm:
336         (-[WAKView _appendDescriptionToString:atLevel:]): Ditto.
337
338 2018-06-03  Zan Dobersek  <zdobersek@igalia.com>
339
340         [WebGL] GL_EXT_robustness utilization should depend on CONTEXT_ROBUST_ACCESS value
341         https://bugs.webkit.org/show_bug.cgi?id=186187
342
343         Reviewed by Carlos Garcia Campos.
344
345         Don't utilize the GL_EXT_robustness extension for reading pixels from
346         the GPU if the underlying OpenGL context did not enable robust access
347         support upon creation. For EGL contexts, this would be done by passing
348         EGL_CONTEXT_OPENGL_ROBUST_ACCESS_EXT and EGL_TRUE key-value pair in the
349         attribute list passed to eglCreateContext() (as specified in the
350         EGL_EXT_create_context_robustness extension), but at the moment this
351         capability is not utilized.
352
353         As such, on drivers that implement GL_EXT_robustness support, pixel
354         reads done in WebGLRenderingContextBase end up using glReadnPixels(),
355         but that fails to successfully read anything due to the context
356         rejecting such calls.
357
358         GL_EXT_robustness is specific to OpenGL ES versions, so to fix this,
359         Extensions3DOpenGLES overrides the isEnabled() method. That override
360         returns false immediately if the inherited isEnabled() implementation
361         returns false. Otherwise it returns true, unless the tested extension
362         is GL_EXT_robustness, in which case we now check that the context's
363         CONTEXT_ROBUST_ACCESS state value is true, meaning the context was
364         created with robust access support enabled.
365
366         No new tests are possible because this is optional driver-provided
367         functionality that Web content cannot have effect on.
368
369         * platform/graphics/Extensions3D.h:
370         * platform/graphics/opengl/Extensions3DOpenGLES.cpp:
371         (WebCore::Extensions3DOpenGLES::isEnabled):
372         * platform/graphics/opengl/Extensions3DOpenGLES.h:
373
374 2018-06-01  Ryosuke Niwa  <rniwa@webkit.org>
375
376         Editor can hold references to Documents after you navigate away
377         https://bugs.webkit.org/show_bug.cgi?id=186215
378
379         Reviewed by Simon Fraser.
380
381         Clear the various member variables that can hold onto a document in Editor::clear and FrameSelection::prepareForDestruction.
382
383         Test: editing/selection/navigation-clears-editor-state.html
384
385         * editing/Editor.cpp:
386         (WebCore::Editor::clear):
387         * editing/Editor.h:
388         * editing/FrameSelection.cpp:
389         (WebCore::FrameSelection::FrameSelection):
390         (WebCore::FrameSelection::prepareForDestruction):
391         * editing/FrameSelection.h:
392
393 2018-06-01  Ryosuke Niwa  <rniwa@webkit.org>
394
395         ResourceLoader::cancel() shouldn't synchronously fire load event on document
396         https://bugs.webkit.org/show_bug.cgi?id=185284
397
398         Revert the erroneous change to SSFontSelector::beginLoadTimerFired(), which broke CancelLoading.CancelFontSubresource.
399         FrameLoader::loadDone calls checkCompleted, not checkLoadComplete so we still need to call checkLoadComplete here.
400
401         * css/CSSFontSelector.cpp:
402         (WebCore::CSSFontSelector::beginLoadTimerFired): 
403
404 2018-06-01  Jeremy Jones  <jeremyj@apple.com>
405
406         Keyboard focus should exit fullscreen.
407         https://bugs.webkit.org/show_bug.cgi?id=185617
408         rdar://problem/34697938
409
410         Reviewed by Ryosuke Niwa.
411
412         No opensource test because feature is not enabled.
413
414         While in element fullscreen, initiating keyboard focus should exit fullscreen in iOS.
415
416         Improve fullscreen testability by exposing isAnimatingFullScreen.
417
418         * dom/Document.h:
419         * testing/Internals.cpp:
420         (WebCore::Internals::isAnimatingFullScreen const):
421         * testing/Internals.h:
422         * testing/Internals.idl:
423
424 2018-06-01  Jeremy Jones  <jeremyj@apple.com>
425
426         Don't continue playing in background when auto-picture-in-picture is disabled.
427         https://bugs.webkit.org/show_bug.cgi?id=186089
428         rdar://problem/40314314
429
430         Reviewed by Eric Carlson.
431
432         No new tests because we don't have a way to test auto-pip.
433
434         With the refactoring work done in VideoFullscreenInterfaceAVKit, HTMLMediaElement no longer has to anticipate 
435         auto-pip when if it should pause on suspend. Instead VideoFullscreenInterfaceAVKit proactively updates 
436         videoFullscreenMode, so checking for PIP is sufficient.
437
438         * html/HTMLMediaElement.cpp:
439         (WebCore::HTMLMediaElement::shouldOverrideBackgroundPlaybackRestriction const):
440
441 2018-06-01  Chris Dumez  <cdumez@apple.com>
442
443         REGRESSION (r231456): Colloquy is broken
444         https://bugs.webkit.org/show_bug.cgi?id=186197
445         <rdar://problem/40722960>
446
447         Reviewed by Timothy Hatcher.
448
449         Restore pre-r231456 behavior for Colloquy app so that it works again.
450
451         * html/HTMLFrameElementBase.cpp:
452         (WebCore::HTMLFrameElementBase::openURL):
453         * page/Settings.yaml:
454
455 2018-06-01  Chris Dumez  <cdumez@apple.com>
456
457         Regression(r230567): Unable to log into twitter.com in private sessions
458         https://bugs.webkit.org/show_bug.cgi?id=186205
459         <rdar://problem/40670799>
460
461         Reviewed by Youenn Fablet.
462
463         We were using the same SWServer for all private sessions and the SWServer's sessionID would
464         be legacyPrivateSessionID(). As a result, the service worker's sessionID would be legacyPrivateSessionID()
465         as well and would not match the sessionID of its client pages. This sessionID mismatch was
466         causing the breakage.
467
468         Instead of using the same SWServer of all private sessions, we now go back to using a SWServer
469         per private session. However, we now make sure that the SWServer gets destroyed whenever its
470         corresponding session gets destroyed.
471
472         * workers/service/server/SWServer.cpp:
473         (WebCore::SWServer::~SWServer):
474
475 2018-06-01  Youenn Fablet  <youenn@apple.com>
476
477         Add an option to restrict communication to localhost sockets
478         https://bugs.webkit.org/show_bug.cgi?id=186208
479
480         Reviewed by Eric Carlson.
481
482         Covered by existing tests.
483         Add an option in LibWebRTCProvider to restrict to localhost sockets.
484         Use that option when Internals is used.
485
486         * platform/mediastream/libwebrtc/LibWebRTCProvider.h:
487         * testing/Internals.cpp:
488         (WebCore::Internals::resetToConsistentState):
489
490 2018-06-01  Ryosuke Niwa  <rniwa@webkit.org>
491
492         ResourceLoader::cancel() shouldn't synchronously fire load event on document
493         https://bugs.webkit.org/show_bug.cgi?id=185284
494
495         Reviewed by Antti Koivisto.
496
497         Because a resource loading can be canceled as a node is removed a document or CachedResource is destructed,
498         it's not safe to synchronously fire load event on document upon cancelation. This patch makes the cancellation
499         of a resource load schedule m_checkTimer in FrameLoader to fire a load event asynchronously instead.
500
501         Specifically, this patch makes FrameLoader::loadDone call FrameLoader::scheduleCheckCompleted when the load
502         had failed or cancled instead of calling FrameLoader::checkCompleted which can synchronously fire load event.
503         To differentiate the two cases, new enum LoadCompletionType has been added to FrameLoader::loadDone and related
504         functions. To avoid calling the navigation delegate too early, the same abstraction for checkLoadComplete()
505         has been added in the form of FrameLoader::subresourceLoadDone.
506
507         Unfortunately, delaying calls to checkCompleted() and checkLoadComplete() by a timer can result in client
508         callbacks such as didFinishLoadForFrame and didFailLoadWithError to never get called when the frame gets
509         detached from the parent after the last resource had stopped loading but before the timer fires. To preserve
510         these deleagte callbacks, this patch expedites the timer in FrameLoader::frameDetached and Page::goToItem by
511         by invoking newly added stopAllLoadersAndCheckCompleteness, which stops all loading and then immediately invokes
512         checkCompleted() and checkLoadComplete() synchronously if m_checkTimer had been started.
513
514         Tests: http/tests/preload/dynamic_removing_preload.html
515
516         * css/CSSFontSelector.cpp:
517         (WebCore::CSSFontSelector::beginLoadTimerFired): Removed superfluous call to checkLoadComplete since
518         cachedResourceLoader's loadDone would call checkLoadComplete anyway.
519         * html/HTMLFrameOwnerElement.cpp:
520         (WebCore::HTMLFrameOwnerElement::disconnectContentFrame): Removed the misleading comment added in r140090.
521         Firefox DOES indeed fire unload event in the content document of a removed frame. While this comment made
522         it sound like this function isn't called when a frame is removed from the tree when in reality we simply
523         remove a frame prior to removing the node via disconnectSubframesIfNeeded.
524         * loader/DocumentLoader.cpp:
525         (WebCore::DocumentLoader::removeSubresourceLoader):
526         * loader/DocumentLoader.h:
527         * loader/FrameLoader.cpp:
528         (WebCore::FrameLoader::FrameLoader):
529         (WebCore::FrameLoader::loadDone):
530         (WebCore::FrameLoader::subresourceLoadDone):
531         (WebCore::FrameLoader::checkCompleted): Added a release assert that this function is only called when it's safe
532         to execute scripts.
533         (WebCore::FrameLoader::checkTimerFired):
534         (WebCore::FrameLoader::checkCompletenessNow):Extracted from checkTimerFired.
535         (WebCore::FrameLoader::stopAllLoaders): Removed the code to stop m_checkTimer introduced in r53655.
536         Stopping the timer here would prevent FrameLoader::frameDetached to detect the case when stopping the loader
537         scheduled a load completion check. Also stopping this timer without clearing the corresponding booleans:
538         m_checkingLoadCompleteForDetachment and m_checkingLoadCompleteForDetachment is problematic. The assertion
539         r53655 addressed is now addressed by explicitly checking & clearing the timer in frameDetached.
540         (WebCore::FrameLoader::stopAllLoadersAndCheckCompleteness): Added.
541         (WebCore::FrameLoader::checkLoadCompleteForThisFrame): Avoid an early exit when the newly added boolean
542         m_checkingLoadCompleteForDetachment is set since m_isStopping is no longer set in frameDetached in order
543         to invoke didFailLoadWithError when detaching a frame.
544         (WebCore::FrameLoader::frameDetached): Call checkCompletenessNow in the case the frame had already been
545         completed loading. Also call stopAllLoadersAndCheckCompleteness in the case stopping loading would complete
546         the loading before stopping active DOM objects.
547         * loader/FrameLoader.h:
548         (WebCore::FrameLoader::m_checkingLoadCompleteForDetachment): Added.
549         * loader/FrameLoaderTypes.h:
550         (WebCore::LoadCompletionType): Added.
551         * loader/SubresourceLoader.cpp:
552         (WebCore::SubresourceLoader::didFinishLoading):
553         (WebCore::SubresourceLoader::didFail):
554         (WebCore::SubresourceLoader::didCancel):
555         (WebCore::SubresourceLoader::notifyDone):
556         * loader/SubresourceLoader.h:
557         * loader/cache/CachedResourceLoader.cpp:
558         (WebCore::CachedResourceLoader::loadDone):
559         * loader/cache/CachedResourceLoader.h:
560         * page/Page.cpp:
561         (WebCore::Page::goToItem): Call stopAllLoadersAndCheckCompleteness instead of stopAllLoaders since stopping
562         loading here may complete loading.
563
564 2018-06-01  Sihui Liu  <sihui_liu@apple.com>
565
566         Stop using StorageTracker.db in LocalStorageDatabaseTracker
567         https://bugs.webkit.org/show_bug.cgi?id=186104
568
569         Reviewed by Geoffrey Garen.
570
571         No behavior change.
572
573         * platform/sql/SQLiteFileSystem.h:
574
575 2018-06-01  Zalan Bujtas  <zalan@apple.com>
576
577         [LFC] Simplify the formatting class implementation by pushing down some of the logic to the Geometry class
578         https://bugs.webkit.org/show_bug.cgi?id=186179
579
580         Reviewed by Antti Koivisto.
581
582         * layout/FormattingContext.cpp:
583         (WebCore::Layout::FormattingContext::computeOutOfFlowPosition const):
584         (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
585         (WebCore::Layout::FormattingContext::computeFloatingWidth const):
586         (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
587         (WebCore::Layout::FormattingContext::computeFloatingHeight const):
588         * layout/FormattingContext.h:
589         * layout/FormattingContextGeometry.cpp:
590         (WebCore::Layout::outOfFlowNonReplacedHeight):
591         (WebCore::Layout::outOfFlowNonReplacedWidth):
592         (WebCore::Layout::outOfFlowReplacedHeight):
593         (WebCore::Layout::outOfFlowReplacedWidth):
594         (WebCore::Layout::floatingNonReplacedHeight):
595         (WebCore::Layout::floatingNonReplacedWidth):
596         (WebCore::Layout::floatingReplacedHeight):
597         (WebCore::Layout::floatingReplacedWidth):
598         (WebCore::Layout::outOfFlowNonReplacedPosition):
599         (WebCore::Layout::outOfFlowReplacedPosition):
600         (WebCore::Layout::FormattingContext::Geometry::outOfFlowHeight):
601         (WebCore::Layout::FormattingContext::Geometry::outOfFlowWidth):
602         (WebCore::Layout::FormattingContext::Geometry::floatingHeight):
603         (WebCore::Layout::FormattingContext::Geometry::floatingWidth):
604         (WebCore::Layout::FormattingContext::Geometry::outOfFlowPosition):
605         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeight):
606         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidth):
607         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedHeight): Deleted.
608         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedWidth): Deleted.
609         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHeight): Deleted.
610         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedWidth): Deleted.
611         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedHeight): Deleted.
612         (WebCore::Layout::FormattingContext::Geometry::floatingNonReplacedWidth): Deleted.
613         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeight): Deleted.
614         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidth): Deleted.
615         (WebCore::Layout::FormattingContext::Geometry::outOfFlowNonReplacedPosition): Deleted.
616         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedPosition): Deleted.
617         (WebCore::Layout::FormattingContext::Geometry::replacedHeight): Deleted.
618         (WebCore::Layout::FormattingContext::Geometry::replacedWidth): Deleted.
619         * layout/blockformatting/BlockFormattingContext.cpp:
620         (WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
621         (WebCore::Layout::BlockFormattingContext::computeInFlowPositionedPosition const):
622         (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
623         (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
624         * layout/blockformatting/BlockFormattingContext.h:
625         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
626         (WebCore::Layout::inFlowNonReplacedHeight):
627         (WebCore::Layout::inFlowNonReplacedWidth):
628         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowHeight):
629         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowWidth):
630         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeight): Deleted.
631         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidth): Deleted.
632
633 2018-06-01  Zalan Bujtas  <zalan@apple.com>
634
635         [LFC] Push FormattingContext::computeWidth/computeHeight logic from the base to the subclasses.
636         https://bugs.webkit.org/show_bug.cgi?id=186172
637
638         Reviewed by Antti Koivisto.
639
640         FormattingContext::computeWidth/computeHeight virtual functions have very little benefit and in the long run
641         it's better if we keep the number of virtual functions to the minimum necessary.
642
643         * layout/FormattingContext.cpp:
644         (WebCore::Layout::FormattingContext::computeFloatingWidth const):
645         (WebCore::Layout::FormattingContext::computeStaticPosition const): Deleted.
646         (WebCore::Layout::FormattingContext::computeInFlowPositionedPosition const): Deleted.
647         (WebCore::Layout::FormattingContext::computeWidth const): Deleted.
648         (WebCore::Layout::FormattingContext::computeHeight const): Deleted.
649         (WebCore::Layout::FormattingContext::computeMargin const): Deleted.
650         * layout/FormattingContext.h:
651         * layout/FormattingContextGeometry.cpp:
652         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedHeight):
653         (WebCore::Layout::FormattingContext::Geometry::outOfFlowReplacedWidth):
654         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedHeight):
655         (WebCore::Layout::FormattingContext::Geometry::floatingReplacedWidth):
656         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedHeight):
657         (WebCore::Layout::FormattingContext::Geometry::inlineReplacedWidth):
658         (WebCore::Layout::FormattingContext::Geometry::replacedHeight): Deleted.
659         (WebCore::Layout::FormattingContext::Geometry::replacedWidth): Deleted.
660         * layout/blockformatting/BlockFormattingContext.cpp:
661         (WebCore::Layout::BlockFormattingContext::computeWidth const):
662         (WebCore::Layout::BlockFormattingContext::computeHeight const):
663         (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
664         (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
665         * layout/blockformatting/BlockFormattingContext.h:
666         * layout/inlineformatting/InlineFormattingContext.cpp:
667         (WebCore::Layout::InlineFormattingContext::computeStaticPosition const):
668         (WebCore::Layout::InlineFormattingContext::computeInFlowPositionedPosition const):
669         (WebCore::Layout::InlineFormattingContext::computeInFlowWidth const): Deleted.
670         (WebCore::Layout::InlineFormattingContext::computeInFlowHeight const): Deleted.
671         * layout/inlineformatting/InlineFormattingContext.h:
672
673 2018-06-01  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
674
675         [GTK] Difficult to read combo box text in dark theme
676         https://bugs.webkit.org/show_bug.cgi?id=165072
677
678         Reviewed by Carlos Garcia Campos.
679
680         Set listbox foreground color to theme color to fix hard-to-read
681         text color in combo box while using dark theme.
682
683         No new tests required. ManualTests/gtk/theme.html already covers it.
684         See the "Option Lists" section.
685
686         * rendering/RenderTheme.cpp:
687         (WebCore::RenderTheme::adjustStyle):
688         Adjust style for ListboxPart as well.
689         * rendering/RenderTheme.h: Add adjustListboxStyle()
690         * rendering/RenderThemeGtk.cpp:
691         (WebCore::RenderThemeGtk::adjustListboxStyle const):
692         Set color to the theme foreground color.
693         * rendering/RenderThemeGtk.h: adjustListboxStyle() overriden.
694
695 2018-06-01  Carlos Garcia Campos  <cgarcia@igalia.com>
696
697         [GTK] Switch to use a popup window with a tree view instead of a menu for option menu default implementation
698         https://bugs.webkit.org/show_bug.cgi?id=186146
699
700         Reviewed by Michael Catanzaro.
701
702         Make it possible to use GUniquePtr with GtkTreePath.
703
704         * platform/gtk/GUniquePtrGtk.h:
705
706 2018-05-31  Per Arne Vollan  <pvollan@apple.com>
707
708         Add OpenGL display mask to WebPage creation parameters.
709         https://bugs.webkit.org/show_bug.cgi?id=186163
710         <rdar://problem/40634504>
711
712         Reviewed by Brent Fulgham.
713
714         To make sure the OpenGL display mask is always available, include it in the WebPage creation parameters.
715         The OpenGL display mask is sent to the WebProcess when the platform display ID changes, but that is not
716         early enough in all cases. If the OpenGL display mask is not set, only OpenGL software rendering is offered
717         on some hardware configurations.
718  
719         No new tests, since it is not trivial to test whether OpenGL rendering is hardware accelerated.
720
721         * platform/PlatformScreen.h:
722         * platform/mac/PlatformScreenMac.mm:
723         (WebCore::displayID):
724
725 2018-05-31  Megan Gardner  <megan_gardner@apple.com>
726
727         Add setting to allow override screen size to be disabled.
728         https://bugs.webkit.org/show_bug.cgi?id=186109
729
730         Reviewed by Andy Estes.
731
732         Not Testable, and for debug only.
733
734         Pipe settings and use them to ignore override screen size if setting is set. 
735
736         * page/DeprecatedGlobalSettings.cpp:
737         * page/DeprecatedGlobalSettings.h:
738         (WebCore::DeprecatedGlobalSettings::setDisableScreenSizeOverride):
739         (WebCore::DeprecatedGlobalSettings::disableScreenSizeOverride):
740         * page/Settings.yaml:
741         * platform/ios/PlatformScreenIOS.mm:
742
743 2018-05-31  Brent Fulgham  <bfulgham@apple.com>
744
745         REGRESSION(r216119): DocumentLoader::detachFromFrame still encounters nullptr frame
746         https://bugs.webkit.org/show_bug.cgi?id=186081
747         <rdar://problem/34918109>
748
749         Reviewed by David Kilzer.
750
751         The nullptr check that was removed in r216119 was still needed because when the DocumentLoader
752         is in 'm_waitingForNavigationPolicy' or in 'm_waitingForContentPolicy', a call to the policy checker
753         to stopCheck we will clear the frame as part of the cleanup phase.
754
755         If m_frame is nullptr after cancelPolicyCheckIfNeeded, our work is already done so just return.
756
757         * loader/DocumentLoader.cpp:
758         (WebCore::DocumentLoader::detachFromFrame):
759
760 2018-05-31  Dean Jackson  <dino@apple.com>
761
762         Don't paint the System Preview badge if the image isn't fully decoded
763         https://bugs.webkit.org/show_bug.cgi?id=186158
764         <rdar://problem/40454866>
765
766         Reviewed by Antoine Quint.
767
768         Only paint the system preview badge if the image itself said
769         that it succeeded in drawing.
770
771         * rendering/RenderImage.cpp:
772         (WebCore::RenderImage::paintIntoRect): Check the ImageDrawResult.
773
774 2018-05-31  David Kilzer  <ddkilzer@apple.com>
775
776         Implement checked cast for DDResultRef once DDResultGetCFTypeID() is available
777         <https://webkit.org/b/184554>
778         <rdar://problem/36241894>
779
780         Reviewed by Brent Fulgham.
781
782         * editing/cocoa/DataDetection.mm:
783         (WebCore::detectItemAtPositionWithRange): Implement checked cast
784         for DDResultRef.
785
786 2018-05-31  Alex Christensen  <achristensen@webkit.org>
787
788         Fix Windows build after r232246.
789         https://bugs.webkit.org/show_bug.cgi?id=186024
790
791         * rendering/svg/SVGTextLayoutEngineBaseline.cpp:
792         (WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift const):
793
794 2018-05-31  Chris Dumez  <cdumez@apple.com>
795
796         Fix memory leak under NetworkStateNotifier::updateStateWithoutNotifying()
797         https://bugs.webkit.org/show_bug.cgi?id=186149
798         <rdar://problem/40674537>
799
800         Reviewed by Geoffrey Garen.
801
802         * platform/network/mac/NetworkStateNotifierMac.cpp:
803         (WebCore::NetworkStateNotifier::updateStateWithoutNotifying):
804
805 2018-05-31  Zalan Bujtas  <zalan@apple.com>
806
807         [LFC] Layout code needs to know the type of the Element associated with a Layout::Box
808         https://bugs.webkit.org/show_bug.cgi?id=186117
809
810         Reviewed by Antti Koivisto.
811
812         Since these attributes don't change during layout, we could just pass them in to Layout::Box instead
813         of keep querying the Element.
814
815         * layout/layouttree/LayoutBlockContainer.cpp:
816         (WebCore::Layout::BlockContainer::BlockContainer):
817         * layout/layouttree/LayoutBlockContainer.h:
818         * layout/layouttree/LayoutBox.cpp:
819         (WebCore::Layout::Box::Box):
820         (WebCore::Layout::Box::isPaddingApplicable const):
821         (WebCore::Layout::Box::isDocumentBox const): Deleted.
822         (WebCore::Layout::Box::isBodyBox const): Deleted.
823         * layout/layouttree/LayoutBox.h:
824         (WebCore::Layout::Box::isAnonymous const):
825         (WebCore::Layout::Box::isDocumentBox const):
826         (WebCore::Layout::Box::isBodyBox const):
827         (WebCore::Layout::Box::ElementAttributes::ElementAttributes):
828         (WebCore::Layout::Box::setPreviousSibling):
829         (WebCore::Layout::Box::setIsAnonymous): Deleted.
830         * layout/layouttree/LayoutContainer.cpp:
831         (WebCore::Layout::Container::Container):
832         * layout/layouttree/LayoutContainer.h:
833         * layout/layouttree/LayoutInlineBox.cpp:
834         (WebCore::Layout::InlineBox::InlineBox):
835         * layout/layouttree/LayoutInlineBox.h:
836         * layout/layouttree/LayoutInlineContainer.cpp:
837         (WebCore::Layout::InlineContainer::InlineContainer):
838         * layout/layouttree/LayoutInlineContainer.h:
839         * layout/layouttree/LayoutTreeBuilder.cpp:
840         (WebCore::Layout::TreeBuilder::createLayoutTree):
841         (WebCore::Layout::TreeBuilder::createSubTree):
842
843 2018-05-31  Chris Dumez  <cdumez@apple.com>
844
845         Unreviewed iOS build fix after r232335.
846
847         * html/BaseChooserOnlyDateAndTimeInputType.h:
848         * html/BaseDateAndTimeInputType.h:
849
850 2018-05-31  Chris Dumez  <cdumez@apple.com>
851
852         Unreviewed, apply review comments from Darin after r232310.
853
854         * platform/ReferrerPolicy.cpp:
855         (WebCore::parseReferrerPolicy):
856
857 2018-05-31  Zalan Bujtas  <zalan@apple.com>
858
859         [LFC] Margin box is border box + margins.
860         https://bugs.webkit.org/show_bug.cgi?id=186124
861
862         Reviewed by Antti Koivisto.
863
864         * layout/displaytree/DisplayBox.cpp:
865         (WebCore::Display::Box::marginBox const):
866
867 2018-05-31  Zalan Bujtas  <zalan@apple.com>
868
869         [LFC] Add quirks mode setter/getting to LayoutContext
870         https://bugs.webkit.org/show_bug.cgi?id=186122
871
872         Reviewed by Antti Koivisto.
873
874         * layout/LayoutContext.h:
875         (WebCore::Layout::LayoutContext::setInQuirksMode):
876         (WebCore::Layout::LayoutContext::inQuirksMode const):
877         * page/FrameViewLayoutContext.cpp:
878         (WebCore::layoutUsingFormattingContext):
879
880 2018-05-30  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
881
882         [GTK] Hardcoded text color in input fields
883         https://bugs.webkit.org/show_bug.cgi?id=126907
884
885         Reviewed by Carlos Garcia Campos.
886
887         Set text color in input fields to foreground theme color.
888         Also, set "window.background" as base GtkStyleContext to mimic
889         GTK applications and fix some theme bugs.
890
891         No new tests required. ManualTests/gtk/theme.html already covers it.
892
893         * platform/gtk/RenderThemeGadget.cpp:
894         (WebCore::baseStyleContext): Added.
895         (WebCore::RenderThemeGadget::RenderThemeGadget):
896         Use "window.background" GtkStyleContext instead of
897         null parent for RenderThemeGadgets.
898         * rendering/RenderThemeGtk.cpp:
899         (WebCore::RenderThemeGtk::adjustButtonStyle const):
900         Set color as foreground theme color.
901         (WebCore::RenderThemeGtk::adjustTextFieldStyle const): Ditto.
902         (WebCore::RenderThemeGtk::adjustTextAreaStyle const): Ditto.
903         (WebCore::RenderThemeGtk::adjustSearchFieldStyle const): Ditto.
904         * rendering/RenderThemeGtk.h: adjustTextAreaStyle() overriden.
905
906 2018-05-30  Yusuke Suzuki  <utatane.tea@gmail.com>
907
908         [JSC] Pass VM& parameter as much as possible
909         https://bugs.webkit.org/show_bug.cgi?id=186085
910
911         Reviewed by Saam Barati.
912
913         No behavior change.
914
915         * bindings/js/JSCSSRuleListCustom.cpp:
916         (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
917         * bindings/js/JSCallbackData.cpp:
918         (WebCore::JSCallbackData::invokeCallback):
919         * bindings/js/JSCustomXPathNSResolver.cpp:
920         (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
921         * bindings/js/JSDOMBuiltinConstructorBase.cpp:
922         (WebCore::JSDOMBuiltinConstructorBase::callFunctionWithCurrentArguments):
923         * bindings/js/JSDOMConvertScheduledAction.h:
924         (WebCore::Converter<IDLScheduledAction>::convert):
925         * bindings/js/JSDOMIterator.h:
926         (WebCore::iteratorForEach):
927         * bindings/js/JSDOMMapLike.cpp:
928         (WebCore::forwardFunctionCallToBackingMap):
929         (WebCore::forwardForEachCallToBackingMap):
930         * bindings/js/JSDOMPromise.cpp:
931         (WebCore::callFunction):
932         * bindings/js/JSDOMPromiseDeferred.cpp:
933         (WebCore::DeferredPromise::callFunction):
934         (WebCore::createRejectedPromiseWithTypeError):
935         * bindings/js/JSDeprecatedCSSOMValueCustom.cpp:
936         (WebCore::JSDeprecatedCSSOMValueOwner::isReachableFromOpaqueRoots):
937         * bindings/js/JSEventListener.cpp:
938         (WebCore::JSEventListener::handleEvent):
939         * bindings/js/JSNodeListCustom.cpp:
940         (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
941         * bindings/js/JSPluginElementFunctions.cpp:
942         (WebCore::pluginElementCustomPut):
943         (WebCore::callPlugin):
944         * bindings/js/JSWindowProxy.cpp:
945         (WebCore::JSWindowProxy::setWindow):
946         * bindings/js/ReadableStream.cpp:
947         (WebCore::ReadableStreamInternal::callFunction):
948         * bindings/js/ReadableStreamDefaultController.cpp:
949         (WebCore::callFunction):
950         * bindings/js/ScheduledAction.cpp:
951         (WebCore::ScheduledAction::executeFunctionInContext):
952         * bindings/js/SerializedScriptValue.cpp:
953         (WebCore::CloneSerializer::getProperty):
954         (WebCore::CloneSerializer::serialize):
955         * bindings/js/StructuredClone.cpp:
956         (WebCore::structuredCloneArrayBufferView):
957         * bindings/js/WorkerScriptController.cpp:
958         (WebCore::WorkerScriptController::initScript):
959         * bridge/NP_jsobject.cpp:
960         * bridge/objc/WebScriptObject.mm:
961         (-[WebScriptObject callWebScriptMethod:withArguments:]):
962         * testing/Internals.cpp:
963         (WebCore::Internals::cloneArrayBuffer):
964         * testing/js/WebCoreTestSupport.cpp:
965         (WebCoreTestSupport::injectInternalsObject):
966
967 2018-05-28  Darin Adler  <darin@apple.com>
968
969         Straighten out HTMLInputElement attribute handling
970         https://bugs.webkit.org/show_bug.cgi?id=186043
971
972         Reviewed by Daniel Bates.
973
974         * dom/RadioButtonGroups.cpp:
975         (WebCore::RadioButtonGroup::requiredStateChanged): Renamed from requiredAttributeChanged,
976         and changed to take a reference.
977         (WebCore::RadioButtonGroups::requiredStateChanged): Ditto.
978         * dom/RadioButtonGroups.h: Updated for changes above.
979
980         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
981         (WebCore::BaseChooserOnlyDateAndTimeInputType::createShadowSubtree): Call
982         updateInnerTextValue by its new name.
983         (WebCore::BaseChooserOnlyDateAndTimeInputType::updateInnerTextValue): Renamed
984         from updateAppearance.
985         (WebCore::BaseChooserOnlyDateAndTimeInputType::setValue): Call
986         updateInnerTextValue by its new name.
987         (WebCore::BaseChooserOnlyDateAndTimeInputType::attributeChanged): Override this
988         instead of valueAttributeChanged.
989         * html/BaseChooserOnlyDateAndTimeInputType.h: Tighten up inheritance a bit.
990         Also use final a bit more and update for changes above.
991
992         * html/BaseDateAndTimeInputType.cpp:
993         (WebCore::BaseDateAndTimeInputType::attributeChanged): Replaced
994         minOrMaxAttributeChanged with this override, checking for the attribute names.
995         * html/BaseDateAndTimeInputType.h: Updated for changes above.
996
997         * html/FileInputType.cpp:
998         (WebCore::FileInputType::disabledStateChanged): Renamed from disabledAttributeChanged.
999         (WebCore::FileInputType::attributeChanged): Replaced
1000         multipleAttributeChanged with this override, checking for the attribute names.
1001         * html/FileInputType.h: Updated for changes above.
1002
1003         * html/HTMLFormControlElement.cpp:
1004         (WebCore::HTMLFormControlElement::parseAttribute): Updated function names to say
1005         "state changed" rather than "attribute changed" if they are called only when the
1006         computed value is changed, not the raw attribute value.
1007         (WebCore::HTMLFormControlElement::readOnlyStateChanged): Updated name.
1008         (WebCore::HTMLFormControlElement::requiredStateChanged): Ditto.
1009         * html/HTMLFormControlElement.h: Updated for changes above.
1010
1011         * html/HTMLInputElement.cpp:
1012         (WebCore::HTMLInputElement::parseAttribute): Removed the code to call lots of specific
1013         attribute changed functions that have now been deleted. Also removed empty code for a
1014         couple of attributes.
1015         (WebCore::HTMLInputElement::disabledStateChanged): Added. Forward call to input type.
1016         (WebCore::HTMLInputElement::readOnlyStateChanged): Ditto.
1017         (WebCore::HTMLInputElement::requiredStateChanged): Renamed from requiredAttributeChanged.
1018         * html/HTMLInputElement.h: Updated for changes above.
1019
1020         * html/HTMLTextFormControlElement.cpp:
1021         (WebCore::HTMLTextFormControlElement::readOnlyStateChanged): Renamed from
1022         readOnlyAttributeChanged. Also fixed incorrect call to base class. This may have
1023         fixed a bug: With some work we could probably create a test case to demonstrate that.
1024         * html/HTMLTextFormControlElement.h: Updated for changes above.
1025
1026         * html/ImageInputType.cpp:
1027         (WebCore::ImageInputType::attributeChanged): Replaced
1028         altAttributeChanged and srcAttributeChanged with this override, checking for the
1029         attribute names.
1030         * html/ImageInputType.h: Updated for changes above.
1031
1032         * html/InputType.cpp:
1033         (WebCore::InputType::altAttributeChanged): Deleted.
1034         (WebCore::InputType::srcAttributeChanged): Deleted.
1035         (WebCore::InputType::maxResultsAttributeChanged): Deleted.
1036         (WebCore::InputType::minOrMaxAttributeChanged): Deleted.
1037         (WebCore::InputType::stepAttributeChanged): Deleted.
1038         (WebCore::InputType::valueAttributeChanged): Deleted.
1039         (WebCore::InputType::attributeChanged): Moved to header as an inline so derived
1040         classes can call through to the base class with the empty function inlined.
1041         (WebCore::InputType::multipleAttributeChanged): Deleted.
1042         (WebCore::InputType::disabledAttributeChanged): Moved to header as an inline.
1043         (WebCore::InputType::readonlyAttributeChanged): Ditto.
1044         (WebCore::InputType::requiredAttributeChanged): Ditto.
1045         * html/InputType.h: Updated for changes above.
1046
1047         * html/NumberInputType.cpp:
1048         (WebCore::NumberInputType::attributeChanged): Replaced
1049         minOrMaxAttributeChanged and stepAttributeChanged with this override, checking
1050         for the attribute names.
1051         * html/NumberInputType.h: Updated for changes above.
1052
1053         * html/RangeInputType.cpp:
1054         (WebCore::RangeInputType::disabledStateChanged): Renamed from
1055         disabledAttributeChanged.
1056         (WebCore::RangeInputType::attributeChanged): Replaced
1057         minOrMaxAttributeChanged with this override, checking for the attribute names.
1058         * html/RangeInputType.h: Updated for changes above.
1059
1060         * html/SearchInputType.cpp:
1061         (WebCore::SearchInputType::SearchInputType): Removed unneeded initialization of
1062         RefPtr data members to nullptr.
1063         (WebCore::updateResultButtonPseudoType): Removed unneeded if statement; the two
1064         cases above cover 0, and less than 0, so there is no need to check for greater
1065         than 0 for the third case.
1066         (WebCore::SearchInputType::attributeChanged): Replaced
1067         maxResultsAttributeChanged with this override, checking for the attribute name.
1068         * html/SearchInputType.h: Updated for changes above and marked more
1069         member functions final.
1070
1071         * html/TextFieldInputType.cpp:
1072         (WebCore::TextFieldInputType::attributeChanged): Added a call through to the
1073         base class to match the style of other overrides of this function.
1074         (WebCore::TextFieldInputType::disabledStateChanged): Renamed from disabledAttributeChanged.
1075         (WebCore::TextFieldInputType::readOnlyStateChanged): Renamed from readonlyAttributeChanged.
1076         * html/TextFieldInputType.h: Updated for changes above. Also made attributeChanged no
1077         longer be marked final since derived classes now override it.
1078
1079         * html/shadow/SliderThumbElement.cpp:
1080         (WebCore::SliderThumbElement::SliderThumbElement): Moved some data member initialization
1081         from this constructor to the class definition.
1082         (WebCore::SliderThumbElement::hostDisabledStateChanged): Renamed from disabledAttributeChanged.
1083         * html/shadow/SliderThumbElement.h: Updated for changes above and marked more
1084         member functions final.
1085
1086 2018-05-30  Nan Wang  <n_wang@apple.com>
1087
1088         AX: VoiceOver on macOS does not announce fieldset description from aria-describedby when focussing inputs
1089         https://bugs.webkit.org/show_bug.cgi?id=185246
1090         <rdar://problem/39939028>
1091
1092         Reviewed by Chris Fleizach.
1093
1094         Exposed the fieldset's description to its form control children.
1095
1096         Test: accessibility/mac/aria-describedby-fieldset.html
1097
1098         * accessibility/AccessibilityNodeObject.cpp:
1099         (WebCore::AccessibilityNodeObject::helpText const):
1100
1101 2018-05-30  Chris Fleizach  <cfleizach@apple.com>
1102
1103         AX: Expose link rel type to voiceover
1104         https://bugs.webkit.org/show_bug.cgi?id=186084
1105         <rdar://problem/40640871>
1106
1107         Reviewed by Sam Weinig.
1108
1109         Make the link rel attribute available to accessibility clients.
1110
1111         Test: accessibility/mac/linkrel.html
1112
1113         * accessibility/AccessibilityObject.cpp:
1114         (WebCore::AccessibilityObject::linkRelValue const):
1115         * accessibility/AccessibilityObject.h:
1116         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1117         (-[WebAccessibilityObjectWrapper accessibilityLinkRelationshipType]):
1118         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1119         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1120         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1121
1122 2018-05-30  Brady Eidson  <beidson@apple.com>
1123
1124         REGRESSION (r224684): User-agent seen by page does not change when modified by the develop menu options after reloading.
1125         <rdar://problem/34918109> and https://bugs.webkit.org/show_bug.cgi?id=186111
1126
1127         Reviewed by Andy Estes.
1128
1129         Test: http/tests/navigation/useragent-reload.php
1130
1131         * Modules/websockets/WebSocketHandshake.cpp:
1132         (WebCore::WebSocketHandshake::clientHandshakeRequest const): Use setUserAgent() for consistency.
1133
1134         * loader/DocumentLoader.cpp:
1135         (WebCore::DocumentLoader::startLoadingMainResource): Clear the user agent from the original DocumentLoader request
1136           before adding additional fields, as reloads should pick up user agent changes.
1137
1138 2018-05-30  Dean Jackson  <dino@apple.com>
1139
1140         WebContent crashes with system preview content
1141         https://bugs.webkit.org/show_bug.cgi?id=186118
1142
1143         Reviewed by Myles Maxfield.
1144
1145         We were receiving crash reports on iOS devices when getting
1146         platformContext() from a GraphicsContext. This usually
1147         occurred when the page was invisible. Debugging showed that
1148         it was trying to draw with a disabled context.
1149
1150         * rendering/RenderThemeIOS.mm:
1151         (WebCore::RenderThemeIOS::paintSystemPreviewBadge): Early
1152         return if the context has painting disabled.
1153
1154 2018-05-30  Daniel Bates  <dabates@apple.com>
1155
1156         Web Inspector: Annotate Same-Site cookies
1157         https://bugs.webkit.org/show_bug.cgi?id=184897
1158         <rdar://problem/35178209>
1159
1160         Reviewed by Brian Burg.
1161
1162         Store and retrieve the Same-Site cookie policy from CFNetwork.
1163
1164         * inspector/agents/InspectorPageAgent.cpp:
1165         (WebCore::cookieSameSitePolicyJSON): Added.
1166         (WebCore::buildObjectForCookie): Modified to include cookie Same-Site policy. 
1167         * platform/Cookie.h:
1168         (WebCore::Cookie::encode const): Encode Same-Site policy.
1169         (WebCore::Cookie::decode): Decode Same-Site policy.
1170         * platform/network/cocoa/CookieCocoa.mm:
1171         (WebCore::portStringFromVector):
1172         (WebCore::coreSameSitePolicy):
1173         (WebCore::nsSameSitePolicy):
1174         (WebCore::Cookie::operator NSHTTPCookie * _Nullable  const):
1175         (WebCore::Cookie::operator NSHTTPCookie * const): Deleted.
1176
1177 2018-05-30  Daniel Bates  <dabates@apple.com>
1178
1179         NavigationAction does not need to hold initiating DOM Event
1180         https://bugs.webkit.org/show_bug.cgi?id=185958
1181         <rdar://problem/40531539>
1182
1183         Reviewed by Simon Fraser.
1184
1185         Take a similar approach as was done in <https://bugs.webkit.org/show_bug.cgi?id=185712>
1186         and have NavigationAction hold only as many details of the initiating DOM Event as
1187         necessary to support WebKit functionality. Retaining a DOM Event effectively retains
1188         the document that associated with the event. And DocumentLoader always keeps around
1189         the NavigationAction of the last navigation for the "benefit of the various policy handlers".
1190         Therefore, having NavigationAction hold only the relevant details of the DOM Event
1191         instead of the DOM Event itself we avoid keeping the document we navigated from alive
1192         longer than necessary. 
1193
1194         * dom/MouseRelatedEvent.h:
1195         * dom/UIEventWithKeyState.h:
1196         * loader/NavigationAction.cpp:
1197         (WebCore::NavigationAction::UIEventWithKeyStateData::UIEventWithKeyStateData): Added.
1198         (WebCore::NavigationAction::MouseEventData::MouseEventData): Added.
1199         (WebCore::keyStateDataForFirstEventWithKeyState): Added.
1200         (WebCore::mouseEventDataForFirstMouseEvent): Added.
1201         * loader/NavigationAction.h:
1202         (WebCore::NavigationAction::keyStateEventData const): Added.
1203         (WebCore::NavigationAction::mouseEventData const): Added
1204         (WebCore::NavigationAction::event const): Deleted.
1205
1206 2018-05-30  Youenn Fablet  <youenn@apple.com>
1207
1208         Revert changes made to URLWithUserTypedString made in https://trac.webkit.org/changeset/232281
1209         https://bugs.webkit.org/show_bug.cgi?id=186108
1210         <rdar://problem/40663065>
1211
1212         Reviewed by Alex Christensen.
1213
1214         Covered by existing API tests.
1215
1216         * platform/mac/WebCoreNSURLExtras.mm:
1217         (WebCore::URLWithUserTypedString):
1218         Return early if WebCore::URL is not able to create a CFURL.
1219         Use CFURL otherwise to keep the existing behavior as much as possible.
1220
1221 2018-05-30  Youenn Fablet  <youenn@apple.com>
1222
1223         Rename FromOrigin runtime flag to CrossOriginResourcePolicy and enable it by default
1224         https://bugs.webkit.org/show_bug.cgi?id=186082
1225
1226         Reviewed by Chris Dumez.
1227
1228         No change of behavior.
1229
1230         * page/RuntimeEnabledFeatures.h:
1231         (WebCore::RuntimeEnabledFeatures::setCrossOriginResourcePolicyEnabled):
1232         (WebCore::RuntimeEnabledFeatures::crossOriginResourcePolicyEnabled const):
1233         (WebCore::RuntimeEnabledFeatures::setFromOriginResponseHeaderEnabled): Deleted.
1234         (WebCore::RuntimeEnabledFeatures::fromOriginResponseHeaderEnabled const): Deleted.
1235
1236 2018-05-30  Chris Dumez  <cdumez@apple.com>
1237
1238         Referrer-Policy response header is ignored
1239         https://bugs.webkit.org/show_bug.cgi?id=186037
1240         <rdar://problem/40600335>
1241
1242         Reviewed by Youenn Fablet.
1243
1244         Add support for Referrer-Policy HTTP response header:
1245         - https://w3c.github.io/webappsec-referrer-policy/#referrer-policy-header
1246
1247         Tests: http/tests/security/referrer-policy-header-and-meta-tag-emptyString.html
1248                http/tests/security/referrer-policy-header-and-meta-tag.html
1249                http/tests/security/referrer-policy-header.html
1250
1251         * dom/Document.cpp:
1252         (WebCore::Document::setReferrerPolicy):
1253         (WebCore::Document::processReferrerPolicy):
1254         * dom/Document.h:
1255         (WebCore::Document::referrerPolicy const):
1256         * html/HTMLMetaElement.cpp:
1257         (WebCore::HTMLMetaElement::process):
1258         * loader/FrameLoader.cpp:
1259         (WebCore::FrameLoader::didBeginDocument):
1260         * loader/SubresourceLoader.cpp:
1261         (WebCore::SubresourceLoader::updateReferrerPolicy):
1262         * platform/ReferrerPolicy.cpp:
1263         (WebCore::parseReferrerPolicyToken):
1264         (WebCore::parseReferrerPolicy):
1265         * platform/ReferrerPolicy.h:
1266
1267 2018-05-30  Youenn Fablet  <youenn@apple.com>
1268
1269         Rename CrossOriginResourcePolicy same to same-origin
1270         https://bugs.webkit.org/show_bug.cgi?id=186080
1271
1272         Reviewed by Chris Dumez.
1273
1274         Covered by updated tests.
1275
1276         * platform/network/HTTPParsers.cpp:
1277         (WebCore::parseCrossOriginResourcePolicyHeader):
1278         * platform/network/HTTPParsers.h:
1279
1280 2018-05-30  Aditya Keerthi  <akeerthi@apple.com>
1281
1282         Fix the ENABLE(DATALIST_ELEMENT) build
1283         https://bugs.webkit.org/show_bug.cgi?id=186105
1284
1285         Reviewed by Wenson Hsieh.
1286
1287         * WebCore.xcodeproj/project.pbxproj:
1288         * html/ColorInputType.cpp:
1289         (WebCore::ColorInputType::suggestions const):
1290         * html/HTMLInputElement.h:
1291         * html/HTMLOptionElement.cpp:
1292         (WebCore::HTMLOptionElement::ownerDataListElement const):
1293         * rendering/RenderTheme.cpp:
1294         (WebCore::RenderTheme::paintSliderTicks):
1295
1296 2018-05-30  Alex Christensen  <achristensen@webkit.org>
1297
1298         Reduce String allocations
1299         https://bugs.webkit.org/show_bug.cgi?id=186059
1300
1301         Reviewed by Darin Adler.
1302
1303         Don't allocate Strings just to convert it to another form.
1304         Based mostly on Darin's feedback on bug 185986.
1305
1306         No change in behavior.
1307
1308         * Modules/websockets/WebSocketHandshake.cpp:
1309         (WebCore::hostName):
1310         (WebCore::WebSocketHandshake::host const):
1311         * css/parser/CSSSelectorParser.cpp:
1312         (WebCore::CSSSelectorParser::consumePseudo):
1313         (WebCore::CSSSelectorParser::consumeANPlusB):
1314         * loader/mac/LoaderNSURLExtras.mm:
1315         (suggestedFilenameWithMIMEType):
1316         * page/SecurityOriginData.h:
1317         (WebCore::SecurityOriginData::fromURL):
1318         * page/csp/ContentSecurityPolicySource.cpp:
1319         (WebCore::wildcardMatches):
1320         (WebCore::ContentSecurityPolicySource::hostMatches const):
1321         * platform/URL.cpp:
1322         (WebCore::URL::hostAndPort const):
1323         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
1324         (WebCore::SocketStreamHandleImpl::createStreams):
1325
1326 2018-05-30  Jer Noble  <jer.noble@apple.com>
1327
1328         Media elements outside fullscreen should not be considered main content.
1329         https://bugs.webkit.org/show_bug.cgi?id=186063
1330         <rdar://problem/40630437>
1331
1332         Reviewed by Eric Carlson.
1333
1334         Test: platform/mac/media/video-best-element-for-playback-controls-purpose.html
1335
1336         Media elements outside the current fullscreen element are not visible, and thus should not be considered
1337         main content.
1338
1339         Drive-by fix: set the m_hasEverNotifiedAboutPlaying before dispatching the 'playing' event, so that
1340         tests can check bestMediaElementForShowingPlaybackControlsManager() in the 'playing' handler.
1341
1342         * html/HTMLMediaElement.cpp:
1343         (WebCore::HTMLMediaElement::notifyAboutPlaying):
1344         * html/HTMLMediaElement.h:
1345         * html/MediaElementSession.cpp:
1346         (WebCore::MediaElementSession::canShowControlsManager const):
1347         * testing/Internals.cpp:
1348         (WebCore::Internals::bestMediaElementForShowingPlaybackControlsManager):
1349         * testing/Internals.h:
1350         * testing/Internals.idl:
1351
1352 2018-05-30  Michael Catanzaro  <mcatanzaro@igalia.com>
1353
1354         Unreviewed, silence a -Wreturn-type warning
1355
1356         * css/SVGCSSComputedStyleDeclaration.cpp:
1357         (WebCore::glyphOrientationToCSSPrimitiveValue):
1358
1359 2018-05-30  Alexey Proskuryakov  <ap@apple.com>
1360
1361         Build fix attempt after https://trac.webkit.org/r232198
1362
1363         * platform/network/cf/ResourceHandleCFNet.cpp:
1364         (WebCore::ResourceHandle::createCFURLConnection): Added some toString() calls.
1365
1366 2018-05-30  Zalan Bujtas  <zalan@apple.com>
1367
1368         [LFC] Miscellaneous fixes to get closer to geometry correctness
1369         https://bugs.webkit.org/show_bug.cgi?id=186083
1370
1371         Reviewed by Antti Koivisto.
1372
1373         * layout/FormattingContextGeometry.cpp:
1374         (WebCore::Layout::FormattingContext::Geometry::computedBorder):
1375         * layout/LayoutContext.cpp:
1376         (WebCore::Layout::LayoutContext::initializeRoot):
1377         * layout/Verification.cpp:
1378         (WebCore::Layout::outputMismatchingBoxInformationIfNeeded):
1379         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1380         (WebCore::Layout::isStretchedToViewport):
1381         (WebCore::Layout::initialContainingBlock):
1382         (WebCore::Layout::computedInFlowNonReplacedComputedHeight):
1383         (WebCore::Layout::inFlowNonReplacedComputedWidth):
1384         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeight): lambda should capture the specification part. 
1385         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedWidth):
1386         * layout/displaytree/DisplayBox.cpp:
1387         (WebCore::Display::Box::marginBox const):
1388         (WebCore::Display::Box::paddingBox const):
1389         (WebCore::Display::Box::contentBox const):
1390         * layout/layouttree/LayoutBox.cpp:
1391         (WebCore::Layout::Box::isDocumentBox const):
1392         (WebCore::Layout::Box::isBodyBox const):
1393         * layout/layouttree/LayoutBox.h:
1394         * rendering/style/BorderValue.h: ignore border-width when type is hidden or none. 
1395         (WebCore::BorderValue::boxModelWidth const):
1396
1397 2018-05-30  Stephen McGruer  <smcgruer@chromium.org>
1398
1399         iOS: setting 'defaultValue' of input type=date from script should cause a UI update
1400         https://bugs.webkit.org/show_bug.cgi?id=185982
1401
1402         Reviewed by Darin Adler.
1403
1404         Test: fast/forms/date/date-appearance-defaultValue.html
1405
1406         * html/BaseChooserOnlyDateAndTimeInputType.cpp:
1407         (WebCore::BaseChooserOnlyDateAndTimeInputType::valueAttributeChanged):
1408         * html/BaseChooserOnlyDateAndTimeInputType.h:
1409         * html/HTMLInputElement.cpp:
1410         (WebCore::HTMLInputElement::parseAttribute):
1411         * html/InputType.cpp:
1412         (WebCore::InputType::valueAttributeChanged):
1413         * html/InputType.h:
1414
1415 2018-05-29  Nan Wang  <n_wang@apple.com>
1416
1417         Unreviewed, follow-up after r232285
1418         https://bugs.webkit.org/show_bug.cgi?id=180871
1419
1420         Removed redundant null check.
1421
1422         * accessibility/AccessibilityObject.cpp:
1423         (WebCore::AccessibilityObject::isExpanded const):
1424
1425 2018-05-29  Nan Wang  <n_wang@apple.com>
1426
1427         AX: macOS VoiceOver doesn't announce when details element is expanded when using role group
1428         https://bugs.webkit.org/show_bug.cgi?id=180866
1429         <rdar://problem/36074338>
1430
1431         Reviewed by Chris Fleizach.
1432
1433         We should use is<HTMLDetailsElement> to check for the details parent instead
1434         of using the role.
1435
1436         Added test cases to the existing test.
1437
1438         * accessibility/AccessibilityObject.cpp:
1439         (WebCore::AccessibilityObject::isExpanded const):
1440
1441 2018-05-29  Youenn Fablet  <youenn@apple.com>
1442
1443         Add a consistency check between URL and CFURL
1444         https://bugs.webkit.org/show_bug.cgi?id=186057
1445         <rdar://problem/40258457>
1446
1447         Reviewed by Geoff Garen.
1448
1449         It is important that WebCore::URL used in WebCore and CFURL that gets serialized in the network pipe remain consistent.
1450         Otherwise, we will end-up with odd bugs.
1451
1452         We add such a check when creating a CFURL from an URL.
1453         To make things more consistent, we also rely now more on WebCore::URL instead of directly creating a CFURL.
1454
1455         * platform/URL.h:
1456         * platform/cf/CFURLExtras.cpp:
1457         (WebCore::isCFURLSameOrigin):
1458         * platform/cf/CFURLExtras.h:
1459         * platform/cf/URLCF.cpp:
1460         (WebCore::URL::createCFURL const):
1461         * platform/mac/URLMac.mm:
1462         (WebCore::URL::createCFURL const):
1463         * platform/mac/WebCoreNSURLExtras.mm:
1464         (WebCore::URLWithUserTypedString):
1465
1466 2018-05-29  Timothy Hatcher  <timothy@apple.com>
1467
1468         Printing does not apply the right colors in all cases.
1469
1470         https://bugs.webkit.org/show_bug.cgi?id=186066
1471         rdar://problem/40274975
1472
1473         Reviewed by Tim Horton.
1474
1475         * inspector/agents/InspectorPageAgent.cpp:
1476         (WebCore::InspectorPageAgent::setEmulatedMedia): Call RenderTheme::platformColorsDidChange
1477         to invalidate the color cache.
1478         * page/FrameView.cpp:
1479         (WebCore::FrameView::adjustMediaTypeForPrinting): Ditto.
1480         * page/Page.cpp:
1481         (WebCore::Page::defaultAppearance const): Added. Use default when not screen.
1482         * page/Page.h:
1483         (WebCore::Page::defaultAppearance const): Deleted.
1484
1485 2018-05-29  Per Arne Vollan  <pvollan@apple.com>
1486
1487         Create typedef for HashMap<PlatformDisplayID, ScreenProperties>
1488         https://bugs.webkit.org/show_bug.cgi?id=186056
1489
1490         Reviewed by Brent Fulgham.
1491
1492         No new tests, no change in behavior.
1493
1494         * platform/PlatformScreen.h:
1495         * platform/mac/PlatformScreenMac.mm:
1496         (WebCore::screenProperties):
1497         (WebCore::getScreenProperties):
1498         (WebCore::setScreenProperties):
1499
1500 2018-05-29  Ryosuke Niwa  <rniwa@webkit.org>
1501
1502         iOS WK1: Occasional crash in sanitizedMarkupForFragmentInDocument
1503         https://bugs.webkit.org/show_bug.cgi?id=186011
1504
1505         Reviewed by David Kilzer.
1506
1507         The crash was caused by the HTML parser in sanitizedMarkupForFragmentInDocument yielding in the web thread
1508         when _WebThreadLock() sets webThreadShouldYield to true in the main thread.
1509
1510         No new tests. This is occasionally caught by existing tests.
1511
1512         * editing/markup.cpp:
1513         (WebCore::createPageForSanitizingWebContent): Fixed the bug by making the HTML parser never yield.
1514         Also release-assert that the body is never null here.
1515         (WebCore::sanitizedMarkupForFragmentInDocument): Removed superflous call to WTFMove since appendChild
1516         takes a reference, not a Ref.
1517         * inspector/InspectorOverlay.cpp:
1518         (WebCore::InspectorOverlay::overlayPage): Deployed the same fix.
1519         * loader/DocumentWriter.cpp:
1520         (WebCore::DocumentWriter::insertDataSynchronously): Added.
1521         * loader/DocumentWriter.h:
1522
1523 2018-05-29  Chris Dumez  <cdumez@apple.com>
1524
1525         Avoid unnecessary String allocation in isPublicSuffix(const String&)
1526         https://bugs.webkit.org/show_bug.cgi?id=186054
1527
1528         Reviewed by Sam Weinig.
1529
1530         Avoid unnecessary String allocation in isPublicSuffix(const String&) by calling directly
1531         the decodeHostName() overload taking in a NSString*. This overload returns a NSString*,
1532         which is what we need. We would previously call the overloading taking in a String, which
1533         would return a String, which we would have to convert back to a NSString*.
1534
1535         * platform/mac/PublicSuffixMac.mm:
1536         (WebCore::isPublicSuffix):
1537
1538 2018-05-29  Alex Christensen  <achristensen@webkit.org>
1539
1540         Do even fewer allocations in URL host operations
1541         https://bugs.webkit.org/show_bug.cgi?id=186003
1542
1543         Reviewed by Geoffrey Garen.
1544
1545         * loader/ResourceLoadStatistics.cpp:
1546         (WebCore::ResourceLoadStatistics::primaryDomain):
1547         * loader/ResourceLoadStatistics.h:
1548         * platform/URL.cpp:
1549         (WebCore::URL::hostIsIPAddress):
1550         * platform/URL.h:
1551         * platform/mac/URLMac.mm:
1552         (WebCore::URL::hostIsIPAddress):
1553         * platform/soup/URLSoup.cpp:
1554         (WebCore::URL::hostIsIPAddress):
1555
1556 2018-05-29  Tadeu Zagallo  <tzagallo@apple.com>
1557
1558         Don't assert on m_actionsStart when setting actions on DFA nodes
1559         https://bugs.webkit.org/show_bug.cgi?id=185979
1560         <rdar://problem/39669458>
1561
1562         Reviewed by Geoffrey Garen.
1563
1564         DFANode::setActions is called immediately after the node is created, and once again to set
1565         the actions of catch-all regular expressions (.*) on the root node. That works because
1566         m_actionsStart is initially 0, since the root was the first node to be created, but may fail
1567         after minimizing the DFA, when the root may no longer be the first node, and therefore
1568         m_actionsStart would not be 0, even if there are no actions attached to that node.
1569
1570         Test: http/tests/contentextensions/root-actions.html
1571
1572         * contentextensions/DFANode.h:
1573
1574 2018-05-29  Nan Wang  <n_wang@apple.com>
1575
1576         AX: setValue on contenteditable should preserve whitespace
1577         https://bugs.webkit.org/show_bug.cgi?id=185897
1578
1579         Reviewed by Ryosuke Niwa.
1580
1581         We should mimic typing when setting value to a contenteditable from accessibility
1582         instead of mutating the DOM by using setInnerText.
1583
1584         Updated tests to cover this change.
1585
1586         * accessibility/AccessibilityRenderObject.cpp:
1587         (WebCore::AccessibilityRenderObject::setValue):
1588
1589 2018-05-29  Zalan Bujtas  <zalan@apple.com>
1590
1591         [LFC] Miscellaneous fixes to ensure no assertion in LayoutContext::layout
1592         https://bugs.webkit.org/show_bug.cgi?id=186052
1593
1594         Reviewed by Antti Koivisto.
1595
1596         With this patch, LayoutContext::layout() does not assert on <html><body><div></div></body></html> anymore.
1597
1598         * layout/LayoutContext.cpp:
1599         (WebCore::Layout::LayoutContext::initializeRoot): New context root is always a layout root.
1600         * layout/LayoutContext.h:
1601         * layout/Verification.cpp:
1602         (WebCore::Layout::outputMismatchingBoxInformationIfNeeded):
1603         * layout/blockformatting/BlockFormattingContext.cpp:
1604         (WebCore::Layout::BlockFormattingContext::layout const): we need computed margin/border/padding for width computation  
1605         * layout/displaytree/DisplayBox.cpp: Add clone() method to be able to carry over the 'hasValid*' bits.
1606         (WebCore::Display::Box::Style::Style):
1607         (WebCore::Display::Box::borderBox const):
1608         (WebCore::Display::Box::contentBox const):
1609         * layout/displaytree/DisplayBox.h:
1610         (WebCore::Display::Box::Rect::operator LayoutRect const):
1611         (WebCore::Display::Box::setSize):
1612         (WebCore::Display::Box::setHasValidMargin):
1613         (WebCore::Display::Box::setHasValidBorder):
1614         (WebCore::Display::Box::setHasValidPadding):
1615         (WebCore::Display::Box::Rect::setHasValidPosition):
1616         (WebCore::Display::Box::Rect::setHasValidSize):
1617         (WebCore::Display::Box::Rect::setSize):
1618         (WebCore::Display::Box::Rect::clone const):
1619         (WebCore::Display::Box::setMargin):
1620         (WebCore::Display::Box::setBorder):
1621         (WebCore::Display::Box::setPadding):
1622         (WebCore::Display::Box::Rect::Rect): Deleted.
1623
1624 2018-05-29  Wenson Hsieh  <wenson_hsieh@apple.com>
1625
1626         [Extra zoom mode] "Significant area painted" rendering progress event is rarely fired
1627         https://bugs.webkit.org/show_bug.cgi?id=186042
1628         <rdar://problem/40604182>
1629
1630         Reviewed by Tim Horton.
1631
1632         Makes a minor tweak to the size of the relevant view rect in extra zoom mode, such that it's no wider than the
1633         visible content rect. Previously, the width of this rect has hard-coded to a value optimized for macOS (980),
1634         which makes it difficult for content laid out at device width in extra zoom mode to cover a significant portion
1635         of the relevant view rect.
1636
1637         Test: RenderingProgressTests.FirstPaintWithSignificantArea
1638
1639         * page/Page.cpp:
1640         (WebCore::relevantViewRect):
1641
1642 2018-05-29  Antoine Quint  <graouts@apple.com>
1643
1644         [Web Animations] Handle relative length units
1645         https://bugs.webkit.org/show_bug.cgi?id=186047
1646
1647         Reviewed by Dean Jackson.
1648
1649         In order to correctly handle relative units, such as "em", "vw" and "vh", we need to do two things.
1650
1651         First, because we need to apply the cascade to correctly compute relative lengths, we need to delay the computation of
1652         "blending keyframes" to when we have both keyframes data and a valid target. This also means that we need to reset blending
1653         keyframes when the target changes. As a result, old call sites of updateBlendingKeyframes() have been replaced by a call to
1654         m_blendingKeyframes.clear() and the method now gets called as part of apply() with the RenderStyle of the targeted element
1655         as a parameter.
1656
1657         Second, and as a result of the first change, we need to update the accelerated animation state based on animation
1658         progress rather than when calling specific methods, such as Animation.play() and Animation.pause(), since blending
1659         keyframes may not be available at those more specific call sites. We now have a new updateAcceleratedAnimationState()
1660         method that gets called as part of apply(). We also rename animationPlayStateDidChange() to animationSuspensionStateDidChange()
1661         since this method was specific to suspension and had a confusing name.
1662
1663         * animation/AnimationEffectReadOnly.h: Rename animationPlayStateDidChange() to animationSuspensionStateDidChange().
1664         * animation/KeyframeEffectReadOnly.cpp:
1665         (WebCore::KeyframeEffectReadOnly::getKeyframes): Fix a crash that revealed itself after other changes in this patch. We would later
1666         call into ComputedStyleExtractor::animationSuspensionStateDidChange() and this would yield an assertion because we'd call potentially
1667         call it with a custom CSS property.
1668         (WebCore::KeyframeEffectReadOnly::processKeyframes): Reset blending keyframes instead of calling updateBlendingKeyframes() since
1669         blending keyframes is now performed asynchronously upon style resolution.
1670         (WebCore::KeyframeEffectReadOnly::updateBlendingKeyframes): Take the target's RenderStyle as a parameter and use it to reset the
1671         associated StyleResolver's state, just like we do in StyleResolver::keyframeStylesForAnimation(), so that the CSS cascade is correctly
1672         accounted for when computing values using relative length units. Since blending keyframes can now be computed several times for a
1673         given set of keyframes, since the effect's target may change, we also need to create a copy of the MutableStyleProperties to pass
1674         to StyleRuleKeyframe::create().
1675         (WebCore::KeyframeEffectReadOnly::setTarget): Reset blending keyframes instead of calling updateBlendingKeyframes() since
1676         blending keyframes is now performed asynchronously upon style resolution.
1677         (WebCore::KeyframeEffectReadOnly::apply): Update blending keyframes and the accelerated animation state.
1678         (WebCore::KeyframeEffectReadOnly::getAnimatedStyle): Make sure we have blending keyframes with a call to updateBlendingKeyframes()
1679         in case the animation hasn't naturally progressed when this method is called.
1680         (WebCore::KeyframeEffectReadOnly::setAnimatedPropertiesInStyle): Make sure we have blending keyframes with a call to
1681         updateBlendingKeyframes() in case the animation hasn't naturally progressed when this method is called.
1682         (WebCore::KeyframeEffectReadOnly::updateAcceleratedAnimationState): Account for the animation's local time and play state to update
1683         the accelerated animation state.
1684         (WebCore::KeyframeEffectReadOnly::addPendingAcceleratedAction): Record the last accelerated action in a member variable which we can
1685         use to determine if we're running accelerated accounting for uncommited changes.
1686         (WebCore::KeyframeEffectReadOnly::animationDidSeek): Only record an AcceleratedAction::Seek action if we're already running accelerated.
1687         (WebCore::KeyframeEffectReadOnly::animationSuspensionStateDidChange): Only record an AcceleratedAction::Pause or AcceleratedAction::Play
1688         action if we're already running accelerated.
1689         (WebCore::KeyframeEffectReadOnly::applyPendingAcceleratedActions): Ensure we clone and clear the list of accelerated actions and check that
1690         we have any cloned actions before proceeding any further. Then we can stop accounting for m_startedAccelerated since the list of accelerated
1691         actions already account for animation state changes.
1692         (WebCore::KeyframeEffectReadOnly::animationPlayStateDidChange): Deleted.
1693         * animation/KeyframeEffectReadOnly.h:
1694         (WebCore::KeyframeEffectReadOnly::isRunningAccelerated const): Account for the m_lastRecordedAcceleratedAction to identify whether we're running.
1695         * animation/WebAnimation.cpp:
1696         (WebCore::WebAnimation::play): Stop calling animationPlayStateDidChange() directly since the accelerated animation state is now updated when
1697         the animation's effect is applied.
1698         (WebCore::WebAnimation::pause): Stop calling animationPlayStateDidChange() directly since the accelerated animation state is now updated when
1699         the animation's effect is applied.
1700         (WebCore::WebAnimation::resolve): Make sure we update the finished state prior to applying the animation's effect since the play state can
1701         change when updating the finished state and KeyframeEffectReadOnly::updateAcceleratedAnimationState(), which is called when calling into
1702         KeyframeEffectReadOnly::apply(), relies on it to correctly update the accelerated animation state.
1703         (WebCore::WebAnimation::setSuspended): Rename animationPlayStateDidChange() to animationSuspensionStateDidChange().
1704         * css/StyleResolver.cpp:
1705         (WebCore::StyleResolver::setNewStateWithElement): Add a new public method to reset a StyleResolver's state such that we can call it when creating
1706         blending keyframes for JS-originated animations just like we do when creating blending keyframes for CSS Animations in keyframeStylesForAnimation().
1707         (WebCore::StyleResolver::keyframeStylesForAnimation): Use the new setNewStateWithElement() method.
1708         * css/StyleResolver.h:
1709
1710 2018-05-29  Thibault Saunier  <tsaunier@igalia.com>
1711
1712         [GStreamer] Update "qtdemux: Clarify field name about stream-encryption-system" patch
1713         https://bugs.webkit.org/show_bug.cgi?id=186040
1714
1715         Reviewed by Xabier Rodriguez-Calvar.
1716
1717         s/avalaible-stream-encryption-systems/available-stream-encryption-systems/g
1718
1719         Tests: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-*
1720
1721         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
1722         (WebCore::extractEventsAndSystemsFromMessage):
1723
1724 2018-05-28  Zalan Bujtas  <zalan@apple.com>
1725
1726         Unreviewed build fix.
1727
1728         * layout/displaytree/DisplayBox.h:
1729         (WebCore::Display::Box::Rect::operator LayoutRect const):
1730
1731 2018-05-28  Zalan Bujtas  <zalan@apple.com>
1732
1733         [LFC] Add Rect interface to Display::Box
1734         https://bugs.webkit.org/show_bug.cgi?id=186019
1735
1736         Reviewed by Antti Koivisto.
1737
1738         Having a dedicated Rect class and moving the geometry invalidation to it enables us to call
1739         displayBox.contentBox().left() even when the widht/height are not computed yet.
1740         Also having Rect with top/left/bottom/right interface is more aligned with the rest of the layout code than x/y/maxX/maxY.
1741
1742         * layout/FormattingContextGeometry.cpp:
1743         (WebCore::Layout::contentHeightForFormattingContextRoot):
1744         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1745         (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition):
1746         * layout/displaytree/DisplayBox.cpp:
1747         (WebCore::Display::Box::marginBox const):
1748         (WebCore::Display::Box::borderBox const):
1749         (WebCore::Display::Box::paddingBox const):
1750         (WebCore::Display::Box::contentBox const):
1751         * layout/displaytree/DisplayBox.h:
1752         (WebCore::Display::Box::Rect::invalidateTop):
1753         (WebCore::Display::Box::Rect::invalidateLeft):
1754         (WebCore::Display::Box::Rect::invalidateWidth):
1755         (WebCore::Display::Box::Rect::invalidateHeight):
1756         (WebCore::Display::Box::Rect::hasValidPosition const):
1757         (WebCore::Display::Box::Rect::hasValidSize const):
1758         (WebCore::Display::Box::Rect::hasValidGeometry const):
1759         (WebCore::Display::Box::rect const):
1760         (WebCore::Display::Box::top const):
1761         (WebCore::Display::Box::left const):
1762         (WebCore::Display::Box::bottom const):
1763         (WebCore::Display::Box::right const):
1764         (WebCore::Display::Box::topLeft const):
1765         (WebCore::Display::Box::bottomRight const):
1766         (WebCore::Display::Box::size const):
1767         (WebCore::Display::Box::width const):
1768         (WebCore::Display::Box::height const):
1769         (WebCore::Display::Box::setTopLeft):
1770         (WebCore::Display::Box::setTop):
1771         (WebCore::Display::Box::setLeft):
1772         (WebCore::Display::Box::setWidth):
1773         (WebCore::Display::Box::setHeight):
1774         (WebCore::Display::Box::Rect::invalidatePosition):
1775         (WebCore::Display::Box::Rect::setHasValidPosition):
1776         (WebCore::Display::Box::Rect::Rect):
1777         (WebCore::Display::Box::Rect::top const):
1778         (WebCore::Display::Box::Rect::left const):
1779         (WebCore::Display::Box::Rect::bottom const):
1780         (WebCore::Display::Box::Rect::right const):
1781         (WebCore::Display::Box::Rect::topLeft const):
1782         (WebCore::Display::Box::Rect::bottomRight const):
1783         (WebCore::Display::Box::Rect::size const):
1784         (WebCore::Display::Box::Rect::width const):
1785         (WebCore::Display::Box::Rect::height const):
1786         (WebCore::Display::Box::Rect::setTopLeft):
1787         (WebCore::Display::Box::Rect::setTop):
1788         (WebCore::Display::Box::Rect::setLeft):
1789         (WebCore::Display::Box::Rect::setWidth):
1790         (WebCore::Display::Box::Rect::setHeight):
1791         (WebCore::Display::Box::Rect::shiftLeftTo):
1792         (WebCore::Display::Box::Rect::shiftRightTo):
1793         (WebCore::Display::Box::Rect::shiftTopTo):
1794         (WebCore::Display::Box::Rect::shiftBottomTo):
1795         (WebCore::Display::Box::Rect::expand):
1796         (WebCore::Display::Box::invalidateTop): Deleted.
1797         (WebCore::Display::Box::invalidateLeft): Deleted.
1798         (WebCore::Display::Box::invalidateWidth): Deleted.
1799         (WebCore::Display::Box::invalidateHeight): Deleted.
1800         (WebCore::Display::Box::hasValidPosition const): Deleted.
1801         (WebCore::Display::Box::hasValidSize const): Deleted.
1802         (WebCore::Display::Box::hasValidGeometry const): Deleted.
1803         (WebCore::Display::Box::invalidatePosition): Deleted.
1804         (WebCore::Display::Box::setHasValidPosition): Deleted.
1805
1806 2018-05-28  Zalan Bujtas  <zalan@apple.com>
1807
1808         [LFC] Add formatting context testing codepath in FrameViewLayoutContext
1809         https://bugs.webkit.org/show_bug.cgi?id=186036
1810
1811         Reviewed by Antti Koivisto.
1812
1813         This is to verify the formatting context layout correctness.
1814
1815         * layout/LayoutContext.cpp:
1816         (WebCore::Layout::LayoutContext::LayoutContext):
1817         (WebCore::Layout::LayoutContext::initializeRoot):
1818         * layout/LayoutContext.h:
1819         (WebCore::Layout::LayoutContext::displayBoxForLayoutBox const):
1820         * page/FrameViewLayoutContext.cpp:
1821         (WebCore::layoutUsingFormattingContext):
1822         (WebCore::FrameViewLayoutContext::layout):
1823
1824 2018-05-28  Zalan Bujtas  <zalan@apple.com>
1825
1826         [LFC] Add layout tree verification.
1827         https://bugs.webkit.org/show_bug.cgi?id=186018
1828
1829         Reviewed by Antti Koivisto.
1830
1831         Compare layout and render tree geometry and output the mismtaching rectangles.
1832
1833         * Sources.txt:
1834         * WebCore.xcodeproj/project.pbxproj: Add missing headers and make then private.
1835         * layout/LayoutContext.h:
1836         * layout/Verification.cpp: Added.
1837         (WebCore::Layout::outputMismatchedBoxInformationIfNeeded):
1838         (WebCore::Layout::verifySubtree):
1839         (WebCore::Layout::LayoutContext::verifyAndOutputLayoutTree const):
1840
1841 2018-05-28  Sam Weinig  <sam@webkit.org>
1842
1843         Modernize SVGRenderStyleDefs.h
1844         https://bugs.webkit.org/show_bug.cgi?id=186024
1845
1846         Reviewed by Daniel Bates.
1847
1848         Modernized the set of enums in SVGRenderStyleDefs.h and WindRule.h by:
1849             - Converting them to enum classes
1850             - Renaming them to remove unnecessary prefix 'E's
1851             - Renaming values to take advantage of enum class scoping (e.g. StyleDifferenceEqual -> StyleDifference::Equal)
1852             - Renaming to match modern conventions (e.g BNONE -> None)
1853
1854         Modernizes the following enums:
1855             SVGPaintType
1856             BaselineShift (renamed from EBaselineShift)
1857             TextAnchor (renamed from ETextAnchor)
1858             ColorInterpolation (renamed from EColorInterpolation)
1859             ColorRendering (renamed from EColorRendering)
1860             ShapeRendering (renamed from EShapeRendering)
1861             GlyphOrientation (renamed from EGlyphOrientation)
1862             AlignmentBaseline (renamed from EAlignmentBaseline)
1863             DominantBaseline (renamed from EDominantBaseline)
1864             VectorEffect (renamed from EVectorEffect)
1865             BufferedRendering (renamed from EBufferedRendering)
1866             MaskType (renamed from EMaskType)
1867             WindRule
1868
1869         * css/CSSBasicShapes.cpp:
1870         (WebCore::buildPathString):
1871         (WebCore::buildPolygonString):
1872         * css/CSSBasicShapes.h:
1873         * css/CSSPrimitiveValueMappings.h:
1874         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
1875         (WebCore::CSSPrimitiveValue::operator WindRule const):
1876         (WebCore::CSSPrimitiveValue::operator AlignmentBaseline const):
1877         (WebCore::CSSPrimitiveValue::operator BufferedRendering const):
1878         (WebCore::CSSPrimitiveValue::operator ColorInterpolation const):
1879         (WebCore::CSSPrimitiveValue::operator ColorRendering const):
1880         (WebCore::CSSPrimitiveValue::operator DominantBaseline const):
1881         (WebCore::CSSPrimitiveValue::operator ShapeRendering const):
1882         (WebCore::CSSPrimitiveValue::operator TextAnchor const):
1883         (WebCore::CSSPrimitiveValue::operator VectorEffect const):
1884         (WebCore::CSSPrimitiveValue::operator MaskType const):
1885         (WebCore::CSSPrimitiveValue::operator EAlignmentBaseline const): Deleted.
1886         (WebCore::CSSPrimitiveValue::operator EBufferedRendering const): Deleted.
1887         (WebCore::CSSPrimitiveValue::operator EColorInterpolation const): Deleted.
1888         (WebCore::CSSPrimitiveValue::operator EColorRendering const): Deleted.
1889         (WebCore::CSSPrimitiveValue::operator EDominantBaseline const): Deleted.
1890         (WebCore::CSSPrimitiveValue::operator EShapeRendering const): Deleted.
1891         (WebCore::CSSPrimitiveValue::operator ETextAnchor const): Deleted.
1892         (WebCore::CSSPrimitiveValue::operator EVectorEffect const): Deleted.
1893         (WebCore::CSSPrimitiveValue::operator EMaskType const): Deleted.
1894         * css/SVGCSSComputedStyleDeclaration.cpp:
1895         (WebCore::glyphOrientationToCSSPrimitiveValue):
1896         (WebCore::ComputedStyleExtractor::adjustSVGPaintForCurrentColor const):
1897         (WebCore::ComputedStyleExtractor::svgPropertyValue):
1898         * css/StyleBuilderConverter.h:
1899         (WebCore::StyleBuilderConverter::convertGlyphOrientation):
1900         (WebCore::StyleBuilderConverter::convertGlyphOrientationOrAuto):
1901         * css/StyleBuilderCustom.h:
1902         (WebCore::StyleBuilderCustom::applyValueBaselineShift):
1903         (WebCore::StyleBuilderCustom::applyValueFill):
1904         (WebCore::StyleBuilderCustom::applyValueStroke):
1905         * css/parser/CSSPropertyParser.cpp:
1906         (WebCore::consumeBasicShapePolygon):
1907         (WebCore::consumeBasicShapePath):
1908         * html/canvas/CanvasRenderingContext2DBase.cpp:
1909         (WebCore::toWindRule):
1910         * page/animation/CSSPropertyAnimation.cpp:
1911         (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint):
1912         * platform/graphics/FloatPolygon.cpp:
1913         (WebCore::FloatPolygon::contains const):
1914         * platform/graphics/GraphicsContext.cpp:
1915         (WebCore::GraphicsContext::fillRectWithRoundedHole):
1916         * platform/graphics/GraphicsContext.h:
1917         * platform/graphics/GraphicsLayer.cpp:
1918         (WebCore::GraphicsLayer::shapeLayerWindRule const):
1919         * platform/graphics/GraphicsLayer.h:
1920         * platform/graphics/GraphicsTypes.cpp:
1921         (WebCore::operator<<):
1922         * platform/graphics/Path.h:
1923         * platform/graphics/ShadowBlur.cpp:
1924         (WebCore::ShadowBlur::drawInsetShadow):
1925         (WebCore::ShadowBlur::drawInsetShadowWithoutTiling):
1926         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
1927         * platform/graphics/WindRule.h:
1928         (): Deleted.
1929         * platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
1930         (PlatformCALayerCocoa::shapeWindRule const):
1931         (PlatformCALayerCocoa::setShapeWindRule):
1932         * platform/graphics/cg/GraphicsContextCG.cpp:
1933         (WebCore::calculateDrawingMode):
1934         (WebCore::GraphicsContext::fillPath):
1935         (WebCore::GraphicsContext::fillRectWithRoundedHole):
1936         (WebCore::GraphicsContext::clipPath):
1937         * platform/graphics/cg/PathCG.cpp:
1938         (WebCore::Path::contains const):
1939         * platform/mock/MockRealtimeVideoSource.cpp:
1940         (WebCore::MockRealtimeVideoSource::drawAnimation):
1941         * rendering/FilterEffectRenderer.cpp:
1942         (WebCore::FilterEffectRenderer::buildReferenceFilter):
1943         * rendering/RenderBoxModelObject.cpp:
1944         (WebCore::RenderBoxModelObject::paintBorder):
1945         (WebCore::RenderBoxModelObject::clipBorderSidePolygon):
1946         * rendering/RenderElement.cpp:
1947         (WebCore::RenderElement::paintOutline):
1948         * rendering/RenderLayer.cpp:
1949         (WebCore::RenderLayer::computeClipPath const):
1950         * rendering/style/BasicShapes.h:
1951         (WebCore::BasicShape::windRule const):
1952         * rendering/style/RenderStyle.h:
1953         (WebCore::RenderStyle::fillPaintType const):
1954         (WebCore::RenderStyle::setFillPaintColor):
1955         (WebCore::RenderStyle::strokePaintType const):
1956         (WebCore::RenderStyle::setStrokePaintColor):
1957         * rendering/style/SVGRenderStyle.h:
1958         (WebCore::SVGRenderStyle::initialAlignmentBaseline):
1959         (WebCore::SVGRenderStyle::initialDominantBaseline):
1960         (WebCore::SVGRenderStyle::initialBaselineShift):
1961         (WebCore::SVGRenderStyle::initialVectorEffect):
1962         (WebCore::SVGRenderStyle::initialBufferedRendering):
1963         (WebCore::SVGRenderStyle::initialClipRule):
1964         (WebCore::SVGRenderStyle::initialColorInterpolation):
1965         (WebCore::SVGRenderStyle::initialColorInterpolationFilters):
1966         (WebCore::SVGRenderStyle::initialColorRendering):
1967         (WebCore::SVGRenderStyle::initialFillRule):
1968         (WebCore::SVGRenderStyle::initialShapeRendering):
1969         (WebCore::SVGRenderStyle::initialTextAnchor):
1970         (WebCore::SVGRenderStyle::initialGlyphOrientationHorizontal):
1971         (WebCore::SVGRenderStyle::initialGlyphOrientationVertical):
1972         (WebCore::SVGRenderStyle::initialFillPaintType):
1973         (WebCore::SVGRenderStyle::initialStrokePaintType):
1974         (WebCore::SVGRenderStyle::initialMaskType):
1975         (WebCore::SVGRenderStyle::setAlignmentBaseline):
1976         (WebCore::SVGRenderStyle::setDominantBaseline):
1977         (WebCore::SVGRenderStyle::setBaselineShift):
1978         (WebCore::SVGRenderStyle::setVectorEffect):
1979         (WebCore::SVGRenderStyle::setBufferedRendering):
1980         (WebCore::SVGRenderStyle::setClipRule):
1981         (WebCore::SVGRenderStyle::setColorInterpolation):
1982         (WebCore::SVGRenderStyle::setColorInterpolationFilters):
1983         (WebCore::SVGRenderStyle::setColorRendering):
1984         (WebCore::SVGRenderStyle::setFillRule):
1985         (WebCore::SVGRenderStyle::setShapeRendering):
1986         (WebCore::SVGRenderStyle::setTextAnchor):
1987         (WebCore::SVGRenderStyle::setGlyphOrientationHorizontal):
1988         (WebCore::SVGRenderStyle::setGlyphOrientationVertical):
1989         (WebCore::SVGRenderStyle::setMaskType):
1990         (WebCore::SVGRenderStyle::alignmentBaseline const):
1991         (WebCore::SVGRenderStyle::dominantBaseline const):
1992         (WebCore::SVGRenderStyle::baselineShift const):
1993         (WebCore::SVGRenderStyle::vectorEffect const):
1994         (WebCore::SVGRenderStyle::bufferedRendering const):
1995         (WebCore::SVGRenderStyle::clipRule const):
1996         (WebCore::SVGRenderStyle::colorInterpolation const):
1997         (WebCore::SVGRenderStyle::colorInterpolationFilters const):
1998         (WebCore::SVGRenderStyle::colorRendering const):
1999         (WebCore::SVGRenderStyle::fillRule const):
2000         (WebCore::SVGRenderStyle::shapeRendering const):
2001         (WebCore::SVGRenderStyle::textAnchor const):
2002         (WebCore::SVGRenderStyle::glyphOrientationHorizontal const):
2003         (WebCore::SVGRenderStyle::glyphOrientationVertical const):
2004         (WebCore::SVGRenderStyle::fillPaintType const):
2005         (WebCore::SVGRenderStyle::strokePaintType const):
2006         (WebCore::SVGRenderStyle::maskType const):
2007         (WebCore::SVGRenderStyle::visitedLinkFillPaintType const):
2008         (WebCore::SVGRenderStyle::visitedLinkStrokePaintType const):
2009         (WebCore::SVGRenderStyle::hasStroke const):
2010         (WebCore::SVGRenderStyle::hasFill const):
2011         (WebCore::SVGRenderStyle::setBitDefaults):
2012         * rendering/style/SVGRenderStyleDefs.h:
2013         (WebCore::StyleFillData::create):
2014         (WebCore::StyleFillData::operator!= const):
2015         (WebCore::StyleStrokeData::create):
2016         (WebCore::StyleStrokeData::operator!= const):
2017         (WebCore::StyleStopData::create):
2018         (WebCore::StyleStopData::operator!= const):
2019         (WebCore::StyleTextData::create):
2020         (WebCore::StyleTextData::operator!= const):
2021         (WebCore::StyleMiscData::create):
2022         (WebCore::StyleMiscData::operator!= const):
2023         (WebCore::StyleShadowSVGData::create):
2024         (WebCore::StyleShadowSVGData::operator!= const):
2025         (WebCore::StyleResourceData::create):
2026         (WebCore::StyleResourceData::operator!= const):
2027         (WebCore::StyleInheritedResourceData::create):
2028         (WebCore::StyleInheritedResourceData::operator!= const):
2029         (WebCore::StyleLayoutData::create):
2030         (WebCore::StyleLayoutData::operator!= const):
2031         (): Deleted.
2032         * rendering/svg/RenderSVGImage.cpp:
2033         (WebCore::RenderSVGImage::paint):
2034         * rendering/svg/RenderSVGRect.cpp:
2035         (WebCore::RenderSVGRect::updateShapeFromElement):
2036         * rendering/svg/RenderSVGResource.cpp:
2037         (WebCore::requestPaintingResource):
2038         * rendering/svg/RenderSVGResourceClipper.cpp:
2039         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
2040         * rendering/svg/RenderSVGResourceFilter.cpp:
2041         (WebCore::RenderSVGResourceFilter::buildPrimitives const):
2042         * rendering/svg/RenderSVGResourceGradient.cpp:
2043         (WebCore::RenderSVGResourceGradient::applyResource):
2044         * rendering/svg/RenderSVGResourceMasker.cpp:
2045         (WebCore::RenderSVGResourceMasker::applyResource):
2046         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
2047         * rendering/svg/RenderSVGResourcePattern.cpp:
2048         (WebCore::RenderSVGResourcePattern::applyResource):
2049         * rendering/svg/RenderSVGShape.cpp:
2050         (WebCore::RenderSVGShape::paint):
2051         * rendering/svg/RenderSVGShape.h:
2052         (WebCore::RenderSVGShape::hasNonScalingStroke const):
2053         * rendering/svg/SVGRenderTreeAsText.cpp:
2054         (WebCore::writeStyle):
2055         (WebCore::writeSVGInlineTextBox):
2056         * rendering/svg/SVGResources.cpp:
2057         (WebCore::paintingResourceFromSVGPaint):
2058         * rendering/svg/SVGTextChunk.cpp:
2059         (WebCore::SVGTextChunk::SVGTextChunk):
2060         * rendering/svg/SVGTextLayoutEngineBaseline.cpp:
2061         (WebCore::SVGTextLayoutEngineBaseline::calculateBaselineShift const):
2062         (WebCore::SVGTextLayoutEngineBaseline::dominantBaselineToAlignmentBaseline const):
2063         (WebCore::SVGTextLayoutEngineBaseline::calculateAlignmentBaselineShift const):
2064         (WebCore::SVGTextLayoutEngineBaseline::calculateGlyphOrientationAngle const):
2065         * rendering/svg/SVGTextLayoutEngineBaseline.h:
2066
2067 2018-05-28  Carlos Garcia Campos  <cgarcia@igalia.com>
2068
2069         [Web Animations] Test webanimations/css-animations.html is crashing
2070         https://bugs.webkit.org/show_bug.cgi?id=186031
2071
2072         Reviewed by Antoine Quint.
2073
2074         This is another case of std::optional value being used while it's nullopt, I guess this started to fail when we
2075         stopped using the WTF implementation of std::optional. The problem is that we try to get the current iteration
2076         of a declarative animation when the active time is unresolved.
2077
2078         * animation/DeclarativeAnimation.cpp:
2079         (WebCore::DeclarativeAnimation::invalidateDOMEvents): Use value_or(0) instead of value() to get the current
2080         iteration of the effect.
2081
2082 2018-05-28  Thibault Saunier  <tsaunier@igalia.com>
2083
2084         [GStreamer] Handle changes in the "drm-preferred-decryption-system-id" NEED_CONTEXT message.
2085         https://bugs.webkit.org/show_bug.cgi?id=185948
2086
2087         Reviewed by Xabier Rodriguez-Calvar.
2088
2089         - The "stream-encryption-systems" field of the "drm-preferred-decryption-system-id" query was renamed to
2090           "avalaible-stream-encryption-systems"
2091         - It can now be NULL, meaning there is no decryptor avalaible.
2092
2093         Tests: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-*
2094
2095         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2096         (WebCore::extractEventsAndSystemsFromMessage): Handle NULL value for "avalaible-stream-encryption-systems",
2097         moved some code to make the order of the Arrays in the pair clearer.
2098
2099 2018-05-27  Dan Bernstein  <mitz@apple.com>
2100
2101         Reverted the changes made for https://webkit.org/b/186016
2102
2103         They broke the USE(APPLE_INTERNAL_SDK) Sierra build.
2104
2105 2018-05-27  David Kilzer  <ddkilzer@apple.com>
2106
2107         [iOS] Fix warnings about leaks found by clang static analyzer
2108         <https://webkit.org/b/186009>
2109         <rdar://problem/40574267>
2110
2111         Reviewed by Daniel Bates.
2112
2113         * Modules/webauthn/cocoa/LocalAuthenticator.mm:
2114         (WebCore::LocalAuthenticator::makeCredential):
2115         (WebCore::LocalAuthenticator::getAssertion):
2116         (WebCore::LocalAuthenticator::issueClientCertificate const):
2117         - Don't leak CF objects in early return paths, and get rid of
2118           `retained*` variables, by making original variables use
2119           RetainPtr<>.
2120         * bridge/objc/WebScriptObject.mm:
2121         (+[WebUndefined allocWithZone:]): Modernize WebUndefined by
2122         using NeverDestroyed<RetainPr<WebUndefined>> type.  Explicitly
2123         retain the object returned on each call.
2124         (+[WebUndefined undefined]): Explicitly autorelease the object
2125         returned.  Note that neither of these changes fixes the static
2126         analyzer warnings in this source file.
2127         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
2128         (WebCore::exernalDeviceDisplayNameForPlayer): Use RetainPtr<> to
2129         stop leaking NSString objects in a loop.
2130         * platform/ios/wak/WAKWindow.h:
2131         (-[WAKWindow _newFirstResponderAfterResigning]): Mark as
2132         NS_RETURNS_NOT_RETAINED like the corresponding AppKit method
2133         since this doesn't return a new object.  This fixes some
2134         false-positive leaks warnings.
2135
2136 2018-05-27  Dan Bernstein  <mitz@apple.com>
2137
2138         [Cocoa] Avoid importing directly from subumbrella frameworks
2139         https://bugs.webkit.org/show_bug.cgi?id=186016
2140
2141         Reviewed by Sam Weinig.
2142
2143         * Configurations/WebCore.xcconfig: Removed -iframework options from OTHER_CFLAGS and
2144           OTHER_CPLUSPLUSFLAGS.
2145         * editing/mac/DictionaryLookup.mm: Import Quartz.h instead of a PDFKit header.
2146         * html/HTMLKeygenElement.cpp: Removed "using namespace WebCore" from this WebCore
2147           implementation file.
2148         * platform/mac/PlatformEventFactoryMac.mm: Import Carbon.h instead of HIToolbox headers.
2149         * platform/mac/PlatformScreenMac.mm: Import ApplicationServices.h instead of ColorSync.h
2150           when using SDKs earlier than 10.13.
2151         * platform/mediastream/CaptureDeviceManager.cpp: Enclosed the definitions in the WebCore
2152           namespace and removed "using namespace WebCore" from this WebCore implementation file.
2153         * platform/text/mac/TextEncodingRegistryMac.mm: Import Carbon.h instead of CarbonCore.h.
2154
2155 2018-05-27  Fujii Hironori  <Hironori.Fujii@sony.com>
2156
2157         REGRESSION(r232198) [WinCairo] cannot convert from 'WTF::StringView' to 'const WTF::String'
2158         https://bugs.webkit.org/show_bug.cgi?id=186027
2159
2160         Unreviewed build fix
2161
2162         No new tests (No behavior change).
2163
2164         * platform/network/curl/AuthenticationChallengeCurl.cpp:
2165         (WebCore::AuthenticationChallenge::protectionSpaceFromHandle):
2166         * platform/network/curl/CurlRequest.cpp:
2167         (WebCore::CurlRequest::setupTransfer):
2168         (WebCore::CurlRequest::willSetupSslCtx):
2169
2170 2018-05-27  Sam Weinig  <sam@webkit.org>
2171
2172         Modernize RenderStyleConstants.h - Part 3
2173         https://bugs.webkit.org/show_bug.cgi?id=186015
2174
2175         Reviewed by Yusuke Suzuki.
2176
2177         Modernized the third and final set of enums in RenderStyleConstants.h by:
2178             - Converting them to enum classes
2179             - Renaming them to remove unnecessary prefix 'E's
2180             - Renaming values to take advantage of enum class scoping (e.g. StyleDifferenceEqual -> StyleDifference::Equal)
2181
2182         Modernizes the following enums:
2183             TextDecoration
2184             TextDecorationSkip (renamed from TextDecorationSkipItems)
2185             TextUnderlinePosition
2186             HangingPunctuation
2187             SpeakAs (renamed from ESpeakAs)
2188             TextEmphasisPosition (renamed from TextEmphasisPositions)
2189
2190         This final set of enums are mostly (TextUnderlinePosition isn't really) used as bitmasks,
2191         so this change also converts their uses to use OptionSet. 
2192
2193         * accessibility/AccessibilityObject.h:
2194         (WebCore::AccessibilityObject::speakAsProperty const):
2195         * accessibility/AccessibilityRenderObject.cpp:
2196         (WebCore::AccessibilityRenderObject::speakAsProperty const):
2197         (WebCore::AccessibilityRenderObject::hasPlainText const):
2198         (WebCore::AccessibilityRenderObject::hasUnderline const):
2199         * accessibility/AccessibilityRenderObject.h:
2200         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2201         (AXAttributeStringSetStyle):
2202         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
2203         (-[WebAccessibilityObjectWrapperBase baseAccessibilitySpeechHint]):
2204         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2205         (AXAttributeStringSetStyle):
2206         * css/CSSComputedStyleDeclaration.cpp:
2207         (WebCore::renderTextDecorationFlagsToCSSValue):
2208         (WebCore::renderTextDecorationSkipFlagsToCSSValue):
2209         (WebCore::renderEmphasisPositionFlagsToCSSValue):
2210         (WebCore::speakAsToCSSValue):
2211         (WebCore::hangingPunctuationToCSSValue):
2212         * css/CSSLineBoxContainValue.h:
2213         * css/CSSPrimitiveValueMappings.h:
2214         (WebCore::CSSPrimitiveValue::operator HangingPunctuation const):
2215         (WebCore::CSSPrimitiveValue::operator TextDecoration const):
2216         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2217         (WebCore::CSSPrimitiveValue::operator TextUnderlinePosition const):
2218         (WebCore::CSSPrimitiveValue::operator SpeakAs const):
2219         (WebCore::CSSPrimitiveValue::operator ESpeakAs const): Deleted.
2220         * css/StyleBuilderConverter.h:
2221         (WebCore::StyleBuilderConverter::convertTextDecoration):
2222         (WebCore::StyleBuilderConverter::valueToEmphasisPosition):
2223         (WebCore::StyleBuilderConverter::convertTextEmphasisPosition):
2224         (WebCore::StyleBuilderConverter::convertTextUnderlinePosition):
2225         (WebCore::StyleBuilderConverter::valueToDecorationSkip):
2226         (WebCore::StyleBuilderConverter::convertTextDecorationSkip):
2227         (WebCore::StyleBuilderConverter::convertSpeakAs):
2228         (WebCore::StyleBuilderConverter::convertHangingPunctuation):
2229         * editing/cocoa/EditorCocoa.mm:
2230         (WebCore::Editor::getTextDecorationAttributesRespectingTypingStyle const):
2231         * editing/cocoa/HTMLConverter.mm:
2232         (WebCore::editingAttributedStringFromRange):
2233         * rendering/InlineFlowBox.cpp:
2234         (WebCore::InlineFlowBox::maxLogicalBottomForTextDecorationLine const):
2235         (WebCore::InlineFlowBox::minLogicalTopForTextDecorationLine const):
2236         * rendering/InlineFlowBox.h:
2237         * rendering/InlineTextBox.cpp:
2238         (WebCore::emphasisPositionHasNeitherLeftNorRight):
2239         (WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove const):
2240         (WebCore::InlineTextBox::paint):
2241         (WebCore::InlineTextBox::paintMarkedTextDecoration):
2242         * rendering/RenderBlockFlow.cpp:
2243         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
2244         * rendering/RenderBlockLineLayout.cpp:
2245         (WebCore::setLogicalWidthForTextRun):
2246         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
2247         * rendering/RenderElement.cpp:
2248         (WebCore::RenderElement::enclosingRendererWithTextDecoration const):
2249         * rendering/RenderElement.h:
2250         * rendering/RenderTableSection.cpp:
2251         (WebCore::RenderTableSection::addCell):
2252         * rendering/SimpleLineLayout.cpp:
2253         (WebCore::SimpleLineLayout::canUseForStyle):
2254         (WebCore::SimpleLineLayout::canUseForWithReason):
2255         * rendering/SimpleLineLayoutFunctions.cpp:
2256         (WebCore::SimpleLineLayout::paintFlow):
2257         * rendering/TextDecorationPainter.cpp:
2258         (WebCore::TextDecorationPainter::TextDecorationPainter):
2259         (WebCore::TextDecorationPainter::paintTextDecoration):
2260         (WebCore::collectStylesForRenderer):
2261         (WebCore::TextDecorationPainter::stylesForRenderer):
2262         * rendering/TextDecorationPainter.h:
2263         * rendering/TextPaintStyle.cpp:
2264         (WebCore::computeTextPaintStyle):
2265         * rendering/line/BreakingContext.h:
2266         (WebCore::BreakingContext::handleText):
2267         * rendering/style/RenderStyle.cpp:
2268         (WebCore::RenderStyle::RenderStyle):
2269         (WebCore::RenderStyle::changeAffectsVisualOverflow const):
2270         * rendering/style/RenderStyle.h:
2271         (WebCore::RenderStyle::textDecorationsInEffect const):
2272         (WebCore::RenderStyle::textDecoration const):
2273         (WebCore::RenderStyle::textDecorationSkip const):
2274         (WebCore::RenderStyle::hangingPunctuation const):
2275         (WebCore::RenderStyle::textEmphasisPosition const):
2276         (WebCore::RenderStyle::speakAs const):
2277         (WebCore::RenderStyle::addToTextDecorationsInEffect):
2278         (WebCore::RenderStyle::setTextDecorationsInEffect):
2279         (WebCore::RenderStyle::setTextDecoration):
2280         (WebCore::RenderStyle::setTextDecorationSkip):
2281         (WebCore::RenderStyle::setSpeakAs):
2282         (WebCore::RenderStyle::setTextEmphasisPosition):
2283         (WebCore::RenderStyle::setHangingPunctuation):
2284         (WebCore::RenderStyle::initialHangingPunctuation):
2285         (WebCore::RenderStyle::initialTextDecoration):
2286         (WebCore::RenderStyle::initialTextDecorationSkip):
2287         (WebCore::RenderStyle::initialTextUnderlinePosition):
2288         (WebCore::RenderStyle::initialSpeakAs):
2289         (WebCore::RenderStyle::initialTextEmphasisPosition):
2290         * rendering/style/RenderStyleConstants.h:
2291         (WebCore::operator|): Deleted.
2292         (WebCore::operator|=): Deleted.
2293         * rendering/style/StyleRareInheritedData.cpp:
2294         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2295         * rendering/style/StyleVisualData.cpp:
2296         (WebCore::StyleVisualData::StyleVisualData):
2297         * rendering/svg/SVGInlineTextBox.cpp:
2298         (WebCore::SVGInlineTextBox::paint):
2299         (WebCore::positionOffsetForDecoration):
2300         (WebCore::thicknessForDecoration):
2301         (WebCore::findRendererDefininingTextDecoration):
2302         (WebCore::SVGInlineTextBox::paintDecoration):
2303         (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
2304         * rendering/svg/SVGInlineTextBox.h:
2305         * style/InlineTextBoxStyle.cpp:
2306         (WebCore::computeUnderlineOffset):
2307         (WebCore::visualOverflowForDecorations):
2308
2309 2018-05-26  Zalan Bujtas  <zalan@apple.com>
2310
2311         [LFC] Implement margin computation
2312         https://bugs.webkit.org/show_bug.cgi?id=186008
2313
2314         Reviewed by Antti Koivisto.
2315
2316         * WebCore.xcodeproj/project.pbxproj:
2317         * layout/FormattingContext.cpp:
2318         (WebCore::Layout::FormattingContext::computeMargin const):
2319         (WebCore::Layout::FormattingContext::marginTop const): Deleted.
2320         (WebCore::Layout::FormattingContext::marginLeft const): Deleted.
2321         (WebCore::Layout::FormattingContext::marginBottom const): Deleted.
2322         (WebCore::Layout::FormattingContext::marginRight const): Deleted.
2323         * layout/FormattingContext.h:
2324         * layout/blockformatting/BlockFormattingContext.cpp:
2325         (WebCore::Layout::BlockFormattingContext::layout const):
2326         (WebCore::Layout::BlockFormattingContext::computeMargin const):
2327         (WebCore::Layout::BlockFormattingContext::marginTop const): Deleted.
2328         (WebCore::Layout::BlockFormattingContext::marginBottom const): Deleted.
2329         * layout/blockformatting/BlockFormattingContext.h:
2330         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
2331         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowNonReplacedHeight):
2332         (WebCore::Layout::BlockFormattingContext::Geometry::computedMargin):
2333         * layout/blockformatting/BlockMarginCollapse.cpp:
2334         (WebCore::Layout::_isMarginBottomCollapsedWithParent):
2335         (WebCore::Layout::collapsedMarginBottomFromLastChild):
2336         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginTop):
2337         (WebCore::Layout::BlockFormattingContext::MarginCollapse::marginBottom):
2338         (WebCore::Layout::BlockFormattingContext::MarginCollapse::isMarginBottomCollapsedWithParent):
2339         (WebCore::Layout::BlockFormattingContext::MarginCollapse::isMarginTopCollapsedWithParentMarginBottom):
2340         (WebCore::Layout::BlockMarginCollapse::marginTop): Deleted.
2341         (WebCore::Layout::BlockMarginCollapse::marginBottom): Deleted.
2342         (WebCore::Layout::BlockMarginCollapse::isMarginBottomCollapsedWithParent): Deleted.
2343         (WebCore::Layout::BlockMarginCollapse::isMarginTopCollapsedWithParentMarginBottom): Deleted.
2344         * layout/blockformatting/BlockMarginCollapse.h: Removed.
2345
2346 2018-05-25  Myles C. Maxfield  <mmaxfield@apple.com>
2347
2348         [Cocoa] Delete unnecessary WebCascadeList in ComplexTextController
2349         https://bugs.webkit.org/show_bug.cgi?id=186007
2350
2351         Reviewed by Zalan Bujtas.
2352
2353         Inside ComplexTextController::collectComplexTextRuns(), we chop up text based on which fonts should be
2354         used to render which grapheme clusters. For each grapheme cluster, we run through the font-family list
2355         in FontCascade::fontForCombiningCharacterSequence() and find the first font that can render the cluster.
2356         If no items can render the cluster, we construct a WebCascadeList and let CoreText try to figure out
2357         which fonts can render which clusters.
2358
2359         Except there's no point, because we just determined that no font in the list can be used to render the
2360         cluster. CoreText isn't magic; it isn't going to somehow disagree with us. WebCascadeList is just
2361         useless code.
2362
2363         No new tests because there is no behavior change.
2364
2365         * platform/graphics/mac/ComplexTextControllerCoreText.mm:
2366         (WebCore::ComplexTextController::collectComplexTextRunsForCharacters):
2367         (-[WebCascadeList initWithFont:character:]): Deleted.
2368         (-[WebCascadeList count]): Deleted.
2369         (-[WebCascadeList objectAtIndex:]): Deleted.
2370
2371 2018-05-25  Myles C. Maxfield  <mmaxfield@apple.com>
2372
2373         Improve the performance of Font::canRenderCombiningCharacterSequence()
2374         https://bugs.webkit.org/show_bug.cgi?id=185933
2375
2376         Reviewed by Ryosuke Niwa.
2377
2378         We don't need to create a whole CTLine just to determine whether or not a font supports rendering a grapheme cluster.
2379         Instead, the right way to do it is just see if the font's cmap table supports every code point in the cluster.
2380
2381         This patch reports a 2% progression on the attached PerformanceTest.
2382
2383         Test: Layout/ComplexLongUnique.html
2384
2385         * platform/graphics/Font.cpp:
2386         (WebCore::Font::canRenderCombiningCharacterSequence const):
2387         * platform/graphics/Font.h:
2388         * platform/graphics/cocoa/FontCocoa.mm:
2389         (WebCore::provideStringAndAttributes): Deleted.
2390         (WebCore::Font::canRenderCombiningCharacterSequence const): Deleted.
2391         * platform/graphics/freetype/SimpleFontDataFreeType.cpp:
2392         (WebCore::Font::canRenderCombiningCharacterSequence const): Deleted.
2393
2394 2018-05-25  Eric Carlson  <eric.carlson@apple.com>
2395
2396         Captions are sized incorrectly in PiP mode
2397         https://bugs.webkit.org/show_bug.cgi?id=186005
2398         <rdar://problem/39729718>
2399
2400         Reviewed by Dean Jackson.
2401
2402         * html/shadow/MediaControlElements.cpp:
2403         (WebCore::MediaControlTextTrackContainerElement::updateSizes): Only sync text track bounds 
2404         when the size actually changes.
2405
2406         * platform/graphics/avfoundation/objc/VideoFullscreenLayerManagerObjC.mm:
2407         (WebCore::VideoFullscreenLayerManagerObjC::setVideoFullscreenFrame): Call syncTextTrackBounds.
2408         (WebCore::VideoFullscreenLayerManagerObjC::syncTextTrackBounds): Set the text track layer size
2409         to m_videoFullscreenFrame, it is always set the size of the PiP/Fullscreen layer.
2410
2411 2018-05-25  Timothy Hatcher  <timothy@apple.com>
2412
2413         Setting drawsBackground to YES on a WKView doesn't take effect immediately
2414         https://bugs.webkit.org/show_bug.cgi?id=185885
2415         rdar://problem/39706506
2416
2417         Reviewed by Simon Fraser.
2418
2419         * page/Frame.cpp:
2420         (WebCore::Frame::createView): Always call updateBackgroundRecursively, it handles
2421         invalid colors correctly already.
2422         * page/FrameView.cpp:
2423         (WebCore::FrameView::setTransparent): Call setNeedsLayout() since base background color
2424         and transparent is used to update layers.
2425         (WebCore::FrameView::setBaseBackgroundColor): Ditto.
2426         (WebCore::FrameView::updateBackgroundRecursively): Schedule layout if needed.
2427         * page/FrameView.h:
2428         * rendering/RenderLayerCompositor.cpp:
2429         (WebCore::RenderLayerCompositor::viewHasTransparentBackground const): Use baseBackgroundColor
2430         instead of hardcoding white.
2431         (WebCore::RenderLayerCompositor::rootBackgroundTransparencyChanged): Fixed incorrect changed logging.
2432
2433 2018-05-25  Youenn Fablet  <youenn@apple.com>
2434
2435         Migrate From-Origin to Cross-Origin-Resource-Policy
2436         https://bugs.webkit.org/show_bug.cgi?id=185840
2437
2438         Reviewed by Chris Dumez.
2439
2440         Tests: http/wpt/cross-origin-resource-policy/fetch-in-iframe.html
2441                http/wpt/cross-origin-resource-policy/fetch.html
2442                http/wpt/cross-origin-resource-policy/iframe-loads.html
2443                http/wpt/cross-origin-resource-policy/image-loads.html
2444                http/wpt/cross-origin-resource-policy/script-loads.html
2445
2446         * platform/network/HTTPHeaderNames.in:
2447         * platform/network/HTTPParsers.cpp:
2448         (WebCore::parseCrossOriginResourcePolicyHeader):
2449         * platform/network/HTTPParsers.h:
2450
2451 2018-05-25  Daniel Bates  <dabates@apple.com>
2452
2453         NavigationAction should not hold a strong reference to a Document
2454         https://bugs.webkit.org/show_bug.cgi?id=185712
2455         <rdar://problem/40320916>
2456
2457         Reviewed by Brent Fulgham.
2458
2459         Have NavigationAction store all the relevant details callers need to know about the document
2460         that initiated the navigation in an independent data structure, called NavigationAction::Requester,
2461         as opposed to holding a RefPtr to the document itself. The benefit of this approach is that it
2462         is a step towards ensuring that NavigationAction does not keep the document alive after navigating
2463         to a new document given that DocumentLoader stores the NavigationAction for the last navigation.
2464
2465         * loader/NavigationAction.cpp:
2466         (WebCore::NavigationAction::Requester::Requester): Track all relevant details of the document that
2467         requested this navigation that are needed to support WebKit API/SPI. We hold the SecurityOrigin in
2468         a RefPtr to avoid the need to explicitly define a copy constructor and copy-assignment constructor
2469         because Requester needs to be copyable as NavigationAction, which owns a Requester, is copyable.
2470         (WebCore::shouldTreatAsSameOriginNavigation): Fix some style nits.
2471         (WebCore::NavigationAction::NavigationAction): Instantiate a Requester from the specified document.
2472         * loader/NavigationAction.h:
2473         (WebCore::NavigationAction::Requester::url const): Added.
2474         (WebCore::NavigationAction::Requester::securityOrigin const): Added.
2475         (WebCore::NavigationAction::Requester::pageID const): Added.
2476         (WebCore::NavigationAction::Requester::frameID const): Added.
2477         (WebCore::NavigationAction::requester const): Returns details about the document that requested
2478         this navigation, if applicable.
2479         (WebCore::NavigationAction::isEmpty const): Update criterion for being empty to consider the
2480         requester.
2481         (WebCore::NavigationAction::setOpener): Extracted out the datatype of the parameter into a
2482         type alias to avoid duplication and updated this code to use the alias.
2483         (WebCore::NavigationAction::opener const): Ditto.
2484         (WebCore::NavigationAction::sourceDocument const): Deleted.
2485
2486 2018-05-25  Jeremy Jones  <jeremyj@apple.com>
2487
2488         Fullscreen element can be clipped by ancestor.
2489         https://bugs.webkit.org/show_bug.cgi?id=185980
2490         rdar://problem/40320006
2491
2492         Reviewed by Jer Noble.
2493
2494         Adds style to fullscreen css to prevent the fullscreen element from being clipped by an ancestor element.
2495
2496         * css/fullscreen.css:
2497         (:-webkit-full-screen-ancestor:not(iframe)):
2498
2499 2018-05-25  Jeremy Jones  <jeremyj@apple.com>
2500
2501         Use correct AVKit delegate for picture in picture failure.
2502         https://bugs.webkit.org/show_bug.cgi?id=185981
2503         rdar://problem/40549652
2504
2505         Reviewed by Eric Carlson.
2506
2507         No new tests since we don't have a way to simulate picture-in-picture failure.
2508
2509         Use the new name for this delegate callback.
2510
2511         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
2512         (-[WebAVPlayerViewControllerDelegate playerViewController:failedToStartPictureInPictureWithError:]):
2513         (-[WebAVPlayerViewControllerDelegate playerViewControllerFailedToStartPictureInPicture:withError:]): Deleted.
2514
2515 2018-05-25  Zalan Bujtas  <zalan@apple.com>
2516
2517         iBooks: text can disappear/flash during finger drag highlight
2518         https://bugs.webkit.org/show_bug.cgi?id=185993
2519         <rdar://problem/34026943>
2520
2521         Reviewed by Simon Fraser.
2522
2523         Reuse existing tiles when override rect is fully covered by the active grid.
2524         Also, recover dropped tiles if override rect forces us to create new ones. 
2525
2526         Unable to create a reproducible test case.
2527
2528         * platform/ios/LegacyTileCache.h:
2529         * platform/ios/LegacyTileCache.mm:
2530         (WebCore::LegacyTileCache::setOverrideVisibleRect):
2531         * platform/ios/LegacyTileLayer.mm:
2532         (-[LegacyTileHostLayer renderInContext:]):
2533
2534 2018-05-25  Eric Carlson  <eric.carlson@apple.com>
2535
2536         Encode ISOWebVTTCue "strings" when logging
2537         https://bugs.webkit.org/show_bug.cgi?id=185991
2538         <rdar://problem/40563902>
2539
2540         Reviewed by Jer Noble.
2541
2542         * platform/graphics/iso/ISOVTTCue.cpp:
2543         (WebCore::ISOWebVTTCue::toJSONString const): Use encodeWithURLEscapeSequences for all Strings
2544         taken from ISO boxes.
2545
2546 2018-05-25  Alex Christensen  <achristensen@webkit.org>
2547
2548         URL::host should return a StringView to reduce allocations
2549         https://bugs.webkit.org/show_bug.cgi?id=185986
2550
2551         Reviewed by Geoff Garen.
2552
2553         No change in behaviour.  Just fewer allocations.
2554
2555         * Modules/plugins/YouTubePluginReplacement.cpp:
2556         (WebCore::isYouTubeURL):
2557         (WebCore::processAndCreateYouTubeURL):
2558         * Modules/websockets/WebSocketHandshake.cpp:
2559         (WebCore::hostName):
2560         (WebCore::WebSocketHandshake::host const):
2561         * contentextensions/ContentExtension.cpp:
2562         (WebCore::ContentExtensions::ContentExtension::populateConditionCacheIfNeeded):
2563         * html/HTMLAnchorElement.cpp:
2564         (WebCore::HTMLAnchorElement::parseAttribute):
2565         * html/HTMLMediaElement.cpp:
2566         (WebCore::HTMLMediaElement::mediaSessionTitle const):
2567         (WebCore::needsSeekingSupportQuirk):
2568         * html/HTMLPlugInImageElement.cpp:
2569         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns):
2570         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot):
2571         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn):
2572         * html/ImageDocument.cpp:
2573         (WebCore::ImageDocument::finishedParsing):
2574         * html/URLUtils.h:
2575         (WebCore::URLUtils<T>::hostname const):
2576         * loader/FrameLoader.cpp:
2577         (WebCore::FrameLoader::setFirstPartyForCookies):
2578         * loader/LinkLoader.cpp:
2579         (WebCore::LinkLoader::loadLink):
2580         * loader/ResourceLoadStatistics.cpp:
2581         (WebCore::ResourceLoadStatistics::primaryDomain):
2582         * loader/mac/LoaderNSURLExtras.mm:
2583         (suggestedFilenameWithMIMEType):
2584         * page/Chrome.cpp:
2585         (WebCore::Chrome::mouseDidMoveOverElement):
2586         * page/Location.cpp:
2587         (WebCore::Location::hostname const):
2588         * page/Page.cpp:
2589         (WebCore::Page::mainFrameLoadStarted):
2590         * page/PerformanceMonitor.cpp:
2591         (WebCore::reportPageOverPostLoadResourceThreshold):
2592         * page/SecurityOrigin.cpp:
2593         (WebCore::isLoopbackIPAddress):
2594         (WebCore::shouldTreatAsPotentiallyTrustworthy):
2595         (WebCore::SecurityOrigin::isLocalHostOrLoopbackIPAddress):
2596         * page/SecurityOrigin.h:
2597         * page/SecurityOriginData.h:
2598         (WebCore::SecurityOriginData::fromURL):
2599         * page/UserContentURLPattern.cpp:
2600         (WebCore::UserContentURLPattern::matchesHost const):
2601         * page/csp/ContentSecurityPolicySource.cpp:
2602         (WebCore::ContentSecurityPolicySource::hostMatches const):
2603         * platform/PublicSuffix.h:
2604         * platform/URL.cpp:
2605         (WebCore::URL::host const):
2606         (WebCore::URL::hostAndPort const):
2607         (WebCore::URL::isMatchingDomain const):
2608         * platform/URL.h:
2609         * platform/mac/SSLKeyGeneratorMac.mm:
2610         (WebCore::signedPublicKeyAndChallengeString):
2611         * platform/network/ResourceRequestBase.h:
2612         (WebCore::registrableDomainsAreEqual):
2613         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
2614         (WebCore::getPartitioningDomain):
2615         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
2616         (WebCore::SocketStreamHandleImpl::createStreams):
2617         * workers/WorkerLocation.cpp:
2618         (WebCore::WorkerLocation::hostname const):
2619         * workers/service/server/SWServer.cpp:
2620         (WebCore::SWServer::performGetOriginsWithRegistrationsCallbacks):
2621
2622 2018-05-24  Dean Jackson  <dino@apple.com>
2623
2624         Need to provide a way to feature detect support for system preview
2625         https://bugs.webkit.org/show_bug.cgi?id=185970
2626         <rdar://problem/40538321>
2627
2628         Reviewed by Sam Weinig.
2629
2630         Update the supports function in the DOMTokenList that HTMLAnchorElement
2631         produces for relList to return true for the system preview token.
2632
2633         Tested internally.
2634
2635         * html/HTMLAnchorElement.cpp:
2636         (WebCore::HTMLAnchorElement::relList const):
2637
2638 2018-05-25  Chris Dumez  <cdumez@apple.com>
2639
2640         Minor ApplicationCacheStorage clean up
2641         https://bugs.webkit.org/show_bug.cgi?id=185984
2642
2643         Reviewed by Youenn Fablet.
2644
2645         * loader/appcache/ApplicationCacheStorage.cpp:
2646         (WebCore::ApplicationCacheStorage::getManifestURLs):
2647         (WebCore::ApplicationCacheStorage::deleteCacheGroup):
2648         (WebCore::ApplicationCacheStorage::originsWithCache):
2649         (WebCore::ApplicationCacheStorage::deleteAllCaches):
2650         (WebCore::ApplicationCacheStorage::deleteCacheForOrigin):
2651         (WebCore::ApplicationCacheStorage::ApplicationCacheStorage):
2652         (WebCore::ApplicationCacheStorage::cacheDirectory const): Deleted.
2653         (WebCore::ApplicationCacheStorage::cacheGroupSize): Deleted.
2654         (WebCore::ApplicationCacheStorage::getOriginsWithCache): Deleted.
2655         (WebCore::ApplicationCacheStorage::create): Deleted.
2656         * loader/appcache/ApplicationCacheStorage.h:
2657         (WebCore::ApplicationCacheStorage::create):
2658
2659 2018-05-25  Sihui Liu  <sihui_liu@apple.com>
2660
2661         [WKHTTPCookieStore getAllCookies] returns inconsistent creation time
2662         https://bugs.webkit.org/show_bug.cgi?id=185041
2663         <rdar://problem/34684214>
2664
2665         Reviewed by Geoffrey Garen.
2666
2667         Set creationtime property when creating Cookie object to keep consistency after conversion.
2668
2669         New API test: WebKit.WKHTTPCookieStoreCreationTime.
2670
2671         * platform/network/cocoa/CookieCocoa.mm:
2672         (WebCore::Cookie::operator NSHTTPCookie * const):
2673
2674 2018-05-25  Zalan Bujtas  <zalan@apple.com>
2675
2676         [LFC] Implement border and padding computation
2677         https://bugs.webkit.org/show_bug.cgi?id=185972
2678
2679         Reviewed by Antti Koivisto.
2680
2681         This patch also removes redundant Display::Box methods and adds a lightweight Edge struct.
2682         (Since padding is optional, if during layout we mistakenly try to access paddingTop/Left/Bottom/Right, Display::Box will assert!)
2683
2684         * layout/FormattingContext.cpp:
2685         (WebCore::Layout::FormattingContext::computeBorderAndPadding const):
2686         * layout/FormattingContext.h:
2687         * layout/FormattingContextGeometry.cpp:
2688         (WebCore::Layout::FormattingContext::Geometry::computedBorder):
2689         (WebCore::Layout::FormattingContext::Geometry::computedPadding):
2690         * layout/blockformatting/BlockFormattingContext.cpp:
2691         (WebCore::Layout::BlockFormattingContext::layout const):
2692         * layout/displaytree/DisplayBox.cpp:
2693         (WebCore::Display::Box::marginBox const):
2694         (WebCore::Display::Box::paddingBox const):
2695         (WebCore::Display::Box::contentBox const):
2696         * layout/displaytree/DisplayBox.h:
2697         (WebCore::Display::Box::Edges::Edges):
2698         (WebCore::Display::Box::setHasValidPosition):
2699         (WebCore::Display::Box::setWidth):
2700         (WebCore::Display::Box::setHeight):
2701         (WebCore::Display::Box::setMargin):
2702         (WebCore::Display::Box::setBorder):
2703         (WebCore::Display::Box::setPadding):
2704         (WebCore::Display::Box::marginTop const):
2705         (WebCore::Display::Box::marginLeft const):
2706         (WebCore::Display::Box::marginBottom const):
2707         (WebCore::Display::Box::marginRight const):
2708         (WebCore::Display::Box::paddingTop const):
2709         (WebCore::Display::Box::paddingLeft const):
2710         (WebCore::Display::Box::paddingBottom const):
2711         (WebCore::Display::Box::paddingRight const):
2712         (WebCore::Display::Box::borderTop const):
2713         (WebCore::Display::Box::borderLeft const):
2714         (WebCore::Display::Box::borderBottom const):
2715         (WebCore::Display::Box::borderRight const):
2716         (WebCore::Display::Box::invalidateSize): Deleted.
2717         (WebCore::Display::Box::setHasValidSize): Deleted.
2718         (WebCore::Display::Box::setHasValidGeometry): Deleted.
2719         (WebCore::Display::Box::setRect): Deleted.
2720         (WebCore::Display::Box::setSize): Deleted.
2721         * layout/layouttree/LayoutBox.cpp:
2722         (WebCore::Layout::Box::isPaddingEnabled const):
2723         * layout/layouttree/LayoutBox.h:
2724
2725 2018-05-25  David Kilzer  <ddkilzer@apple.com>
2726
2727         Fix issues with -dealloc methods found by clang static analyzer
2728         <https://webkit.org/b/185887>
2729
2730         Reviewed by Joseph Pecoraro.
2731
2732         * platform/ios/WebAVPlayerController.mm:
2733         (-[WebAVPlayerController dealloc]): Release `_minTiming` and
2734         `_maxTiming` to fix leaks.
2735         * platform/ios/WebBackgroundTaskController.mm:
2736         (-[WebBackgroundTaskController dealloc]): Release
2737         `_backgroundTaskStartBlock` and `_backgroundTaskEndBlock` to fix
2738         leaks.
2739         * platform/ios/WebItemProviderPasteboard.mm:
2740         (-[WebItemProviderRegistrationInfoList dealloc]): Release
2741         `_teamData` to fix leak.
2742
2743 2018-05-25  Antoine Quint  <graouts@apple.com>
2744
2745         [Web Animations] WebAnimation objects never get destroyed
2746         https://bugs.webkit.org/show_bug.cgi?id=185917
2747         <rdar://problem/39539371>
2748
2749         Reviewed by Dean Jackson and Antti Koivisto.
2750
2751         The AnimationTimeline class keeps references to WebAnimation objects organized in various ways. First, there
2752         are three main maps across which all animations are stored, one for non-subclass WebAnimation objects
2753         (m_elementToAnimationsMap), one for CSSSAnimation objects (m_elementToCSSAnimationsMap) and one for CSSTranstion
2754         objects (m_elementToCSSTransitionsMap). On top of that, we also keep a map to access CSSAnimation objects for
2755         a given element by CSS animation name (m_elementToCSSAnimationByName) and another map to access CSSTransition 
2756         objects for a given element by CSS property (m_elementToCSSTransitionByCSSPropertyID).
2757
2758         None of the RefPtr<WebAnimation> stored in these maps would get cleared when the document would get torn down,
2759         which would also prevent the AnimationTimeline (and its DocumentTimeline subclass) from being destroyed.
2760
2761         We now ensure that element and document tear-down correctly removes animations and clears those maps, which
2762         in turn allows the DocumentTimeline to be destroyed, fixing the significant memory leak introduced by Web Animations
2763         so far.
2764
2765         Finally, we change the collection type for those maps to be ListHashRef instead of Vector to guarantee we only
2766         add an animation once per collection due to changes in how setEffect() and setTimeline() operate.
2767
2768         Test: animations/leak-document-with-css-animation.html
2769
2770         * animation/AnimationTimeline.cpp:
2771         (WebCore::AnimationTimeline::~AnimationTimeline): There is no need to clear those tables as they'll need to be empty
2772         for the AnimationTimeline to even be destroyed.
2773         (WebCore::AnimationTimeline::relevantMapForAnimation): Change to use ListHashRef instead of Vector.
2774         (WebCore::AnimationTimeline::animationWasAddedToElement): Change to use ListHashRef instead of Vector.
2775         (WebCore::AnimationTimeline::animationWasRemovedFromElement): When an animation is removed from an element, ensure that
2776         references to this animation stored in the m_elementToCSSAnimationByName and m_elementToCSSTransitionByCSSPropertyID maps
2777         are cleared.
2778         (WebCore::AnimationTimeline::animationsForElement const): Change to use ListHashRef instead of Vector.
2779         (WebCore::AnimationTimeline::removeAnimationsForElement): Instead of just calling cancel() on all known declarative animations
2780         (this method used to be called cancelDeclarativeAnimationsForElement()), we now set the effect of known animations, declarative
2781         or not, for the provided element which will in turn call animationWasRemovedFromElement() and remove the animation from all
2782         maps that might keep a reference to it.
2783         (WebCore::AnimationTimeline::updateCSSTransitionsForElement): Replace call to removeDeclarativeAnimation() with a simple call
2784         to removeAnimation() which will remove references for this animation from the relevant maps.
2785         (WebCore::AnimationTimeline::cancelOrRemoveDeclarativeAnimation): Ditto.
2786         (WebCore::AnimationTimeline::cancelDeclarativeAnimationsForElement): Deleted.
2787         (WebCore::AnimationTimeline::removeDeclarativeAnimation): Deleted.
2788         * animation/AnimationTimeline.h:
2789         (WebCore::AnimationTimeline::elementToAnimationsMap): Change to use ListHashRef instead of Vector.
2790         (WebCore::AnimationTimeline::elementToCSSAnimationsMap): Change to use ListHashRef instead of Vector.
2791         (WebCore::AnimationTimeline::elementToCSSTransitionsMap): Change to use ListHashRef instead of Vector.
2792         * animation/WebAnimation.cpp:
2793         (WebCore::WebAnimation::setEffect): In the case of a declarative animation, we don't want to remove the animation from the relevant
2794         maps because while the effect was set via the API, the element still has a transition or animation set up and we must not break the
2795         timeline-to-animation relationship.
2796         (WebCore::WebAnimation::setEffectInternal): Factor parts of setEffect() out into a new method that can be called from
2797         AnimationTimeline::removeAnimationsForElement() to reset the m_effect member and correctly call animationWasRemovedFromElement()
2798         without all the Web Animations machinery of setEffect(), which is a public API that has unwanted side effects (such as rejecting
2799         promises).
2800         (WebCore::WebAnimation::setTimeline): In the case of a declarative animation, we don't want to remove the animation from the
2801         relevant maps because, while the timeline was set via the API, the element still has a transition or animation set up and we must
2802         not break the relationship.
2803         * animation/DocumentTimeline.cpp:
2804         (WebCore::DocumentTimeline::~DocumentTimeline):
2805         (WebCore::DocumentTimeline::detachFromDocument): Close the GenericTaskQueues when detaching from the document as it's too late to
2806         perform this work in the destructor. We also cancel the schedule timer which we had forgotten to do before.
2807         * animation/WebAnimation.h:
2808         * dom/Document.cpp:
2809         (WebCore::Document::prepareForDestruction):
2810         * dom/Element.cpp:
2811         (WebCore::Element::removedFromAncestor):
2812         * dom/PseudoElement.cpp:
2813         (WebCore::PseudoElement::clearHostElement):
2814         * rendering/updating/RenderTreeUpdater.cpp:
2815         (WebCore::RenderTreeUpdater::tearDownRenderers):
2816
2817 2018-05-24  Chris Dumez  <cdumez@apple.com>
2818
2819         Avoid doing unnecessary work in Document::shouldEnforceContentDispositionAttachmentSandbox() when setting is disabled
2820         https://bugs.webkit.org/show_bug.cgi?id=185964
2821
2822         Reviewed by Geoffrey Garen.
2823
2824         * dom/Document.cpp:
2825         (WebCore::Document::shouldEnforceContentDispositionAttachmentSandbox const):
2826
2827 2018-05-24  Chris Dumez  <cdumez@apple.com>
2828
2829         [iOS] Avoid dlopening QuickLooks in the common case where the main resource is HTML or plain text
2830         https://bugs.webkit.org/show_bug.cgi?id=185966
2831
2832         Reviewed by Geoffrey Garen.
2833
2834         Avoid dlopening QuickLooks in the common case where the main resource is HTML or plain text
2835         for performance reasons.
2836
2837         * loader/ios/PreviewLoader.mm:
2838         (WebCore::PreviewLoader::shouldCreateForMIMEType):
2839
2840 2018-05-24  Sam Weinig  <sam@webkit.org>
2841
2842         Modernize RenderStyleConstants.h - Part 2
2843         https://bugs.webkit.org/show_bug.cgi?id=185901
2844
2845         Reviewed by Simon Fraser.
2846
2847         Modernized the second set of enums in RenderStyleConstants.h by:
2848             - Converting them to enum classes
2849             - Renaming them to remove unnecessary prefix 'E's
2850             - Renaming values to take advantage of enum class scoping (e.g. StyleDifferenceEqual -> StyleDifference::Equal)
2851             - Renaming to match modern conventions (e.g BNONE -> None)
2852             - Reformatting them so that each value is on its own line.
2853
2854         Modernizes the following enums:
2855             PseudoId
2856             ListStyleType (renamed from EListStyleType)
2857             BorderFit (renamed from EBorderFit)
2858             AnimationFillMode (renamed from EAnimationFillMode)
2859             AnimationPlayState (renamed from EAnimPlayState)
2860             WhiteSpace (renamed from EWhiteSpace)
2861             TextAlignMode (renamed from ETextAlign)
2862             TextTransform (renamed from ETextTransform)
2863             TextDecorationStyle
2864             TextAlignLast
2865             TextJustify
2866             TextZoom
2867             BreakBetween
2868             BreakInside
2869             EmptyCell (renamed from EEmptyCell)
2870             CaptionSide (renamed from ECaptionSide)
2871             ListStylePosition (renamed from EListStylePosition)
2872             Visibility (renamed from EVisibility)
2873             CursorType (renamed from ECursor)
2874             CursorVisibility
2875             DisplayType (renamed from EDisplay)
2876             InsideLink (renamed from EInsideLink)
2877             PointerEvents (renamed from EPointerEvents)
2878             Hyphens
2879             TextEmphasisFill
2880             TextEmphasisMark
2881             ImageResolutionSource
2882             ImageResolutionSnap
2883             Order
2884             ColumnAxis
2885             ColumnProgression
2886             LineSnap
2887             LineAlign
2888             RubyPosition
2889             AutoRepeatType
2890             CSSBoxType
2891
2892         * accessibility/AXObjectCache.cpp:
2893         (WebCore::AXObjectCache::isNodeVisible const):
2894         * accessibility/AccessibilityList.cpp:
2895         (WebCore::AccessibilityList::determineAccessibilityRole):
2896         * accessibility/AccessibilityMediaControls.cpp:
2897         (WebCore::AccessibilityMediaControl::computeAccessibilityIsIgnored const):
2898         (WebCore::AccessibilityMediaTimeDisplay::computeAccessibilityIsIgnored const):
2899         * accessibility/AccessibilityObject.cpp:
2900         (WebCore::AccessibilityObject::isDOMHidden const):
2901         * accessibility/AccessibilityRenderObject.cpp:
2902         (WebCore::AccessibilityRenderObject::defaultObjectInclusion const):
2903         (WebCore::AccessibilityRenderObject::isUnvisited const):
2904         (WebCore::AccessibilityRenderObject::isVisited const):
2905         (WebCore::AccessibilityRenderObject::setValue):
2906         * accessibility/AccessibilityTable.cpp:
2907         (WebCore::AccessibilityTable::isDataTable const):
2908         * accessibility/atk/WebKitAccessibleInterfaceText.cpp:
2909         (getAttributeSetForAccessibilityObject):
2910         * animation/AnimationTimeline.cpp:
2911         (WebCore::AnimationTimeline::updateCSSAnimationsForElement):
2912         (WebCore::AnimationTimeline::updateCSSTransitionsForElement):
2913         * animation/CSSAnimation.cpp:
2914         (WebCore::CSSAnimation::syncPropertiesWithBackingAnimation):
2915         * animation/DeclarativeAnimation.cpp:
2916         (WebCore::DeclarativeAnimation::initialize):
2917         * animation/KeyframeEffectReadOnly.cpp:
2918         (WebCore::KeyframeEffectReadOnly::backingAnimationForCompositedRenderer const):
2919         * css/CSSComputedStyleDeclaration.cpp:
2920         (WebCore::renderTextDecorationStyleFlagsToCSSValue):
2921         (WebCore::convertToPageBreak):
2922         (WebCore::convertToColumnBreak):
2923         (WebCore::ComputedStyleExtractor::styledElement const):
2924         (WebCore::ComputedStyleExtractor::styledRenderer const):
2925         (WebCore::computeRenderStyleForProperty):
2926         (WebCore::shapePropertyValue):
2927         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
2928         * css/CSSComputedStyleDeclaration.h:
2929         * css/CSSPrimitiveValueMappings.h:
2930         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2931         (WebCore::CSSPrimitiveValue::operator CaptionSide const):
2932         (WebCore::CSSPrimitiveValue::operator CursorType const):
2933         (WebCore::CSSPrimitiveValue::operator CursorVisibility const):
2934         (WebCore::CSSPrimitiveValue::operator DisplayType const):
2935         (WebCore::CSSPrimitiveValue::operator EmptyCell const):
2936         (WebCore::CSSPrimitiveValue::operator ListStylePosition const):
2937         (WebCore::CSSPrimitiveValue::operator ListStyleType const):
2938         (WebCore::CSSPrimitiveValue::operator BreakBetween const):
2939         (WebCore::CSSPrimitiveValue::operator BreakInside const):
2940         (WebCore::CSSPrimitiveValue::operator TextAlignMode const):
2941         (WebCore::CSSPrimitiveValue::operator TextAlignLast const):
2942         (WebCore::CSSPrimitiveValue::operator TextJustify const):
2943         (WebCore::CSSPrimitiveValue::operator TextDecorationStyle const):
2944         (WebCore::CSSPrimitiveValue::operator TextTransform const):
2945         (WebCore::CSSPrimitiveValue::operator Visibility const):
2946         (WebCore::CSSPrimitiveValue::operator WhiteSpace const):
2947         (WebCore::CSSPrimitiveValue::operator RubyPosition const):
2948         (WebCore::CSSPrimitiveValue::operator TextEmphasisFill const):
2949         (WebCore::CSSPrimitiveValue::operator TextEmphasisMark const):
2950         (WebCore::CSSPrimitiveValue::operator PointerEvents const):
2951         (WebCore::CSSPrimitiveValue::operator Hyphens const):
2952         (WebCore::CSSPrimitiveValue::operator LineSnap const):
2953         (WebCore::CSSPrimitiveValue::operator LineAlign const):
2954         (WebCore::CSSPrimitiveValue::operator Order const):
2955         (WebCore::CSSPrimitiveValue::operator BorderFit const):
2956         (WebCore::CSSPrimitiveValue::operator ColumnAxis const):
2957         (WebCore::CSSPrimitiveValue::operator ColumnProgression const):
2958         (WebCore::CSSPrimitiveValue::operator CSSBoxType const):
2959         (WebCore::CSSPrimitiveValue::operator TextZoom const):
2960         (WebCore::CSSPrimitiveValue::operator ECaptionSide const): Deleted.
2961         (WebCore::CSSPrimitiveValue::operator ECursor const): Deleted.
2962         (WebCore::CSSPrimitiveValue::operator EDisplay const): Deleted.
2963         (WebCore::CSSPrimitiveValue::operator EEmptyCell const): Deleted.
2964         (WebCore::CSSPrimitiveValue::operator EListStylePosition const): Deleted.
2965         (WebCore::CSSPrimitiveValue::operator EListStyleType const): Deleted.
2966         (WebCore::CSSPrimitiveValue::operator ETextAlign const): Deleted.
2967         (WebCore::CSSPrimitiveValue::operator ETextTransform const): Deleted.
2968         (WebCore::CSSPrimitiveValue::operator EVisibility const): Deleted.
2969         (WebCore::CSSPrimitiveValue::operator EWhiteSpace const): Deleted.
2970         (WebCore::CSSPrimitiveValue::operator EPointerEvents const): Deleted.
2971         (WebCore::CSSPrimitiveValue::operator EBorderFit const): Deleted.
2972         * css/CSSSelector.cpp:
2973         (WebCore::CSSSelector::pseudoId):
2974         * css/CSSToStyleMap.cpp:
2975         (WebCore::CSSToStyleMap::mapAnimationFillMode):
2976         (WebCore::CSSToStyleMap::mapAnimationPlayState):
2977         * css/CSSValueKeywords.in:
2978         * css/ElementRuleCollector.cpp:
2979         (WebCore::ElementRuleCollector::collectMatchingRules):
2980         (WebCore::ElementRuleCollector::ruleMatches):
2981         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
2982         * css/ElementRuleCollector.h:
2983         * css/SelectorChecker.cpp:
2984         (WebCore::SelectorChecker::match const):
2985         (WebCore::SelectorChecker::matchHostPseudoClass const):
2986         (WebCore::hasScrollbarPseudoElement):
2987         (WebCore::SelectorChecker::matchRecursively const):
2988         * css/SelectorChecker.h:
2989         * css/StyleBuilderConverter.h:
2990         (WebCore::StyleBuilderConverter::convertTextAlign):
2991         (WebCore::StyleBuilderConverter::convertClipPath):
2992         (WebCore::StyleBuilderConverter::convertShapeValue):
2993         (WebCore::StyleBuilderConverter::createGridTrackList):
2994         (WebCore::StyleBuilderConverter::csstoLengthConversionDataWithTextZoomFactor):
2995         (WebCore::StyleBuilderConverter::convertPageBreakBetween):
2996         (WebCore::StyleBuilderConverter::convertPageBreakInside):
2997         (WebCore::StyleBuilderConverter::convertColumnBreakBetween):
2998         (WebCore::StyleBuilderConverter::convertColumnBreakInside):
2999         * css/StyleBuilderCustom.h:
3000         (WebCore::StyleBuilderCustom::applyValueImageResolution):
3001         (WebCore::computeBaseSpecifiedFontSize):
3002         (WebCore::StyleBuilderCustom::applyValueWebkitTextZoom):
3003         (WebCore::StyleBuilderCustom::isValidDisplayValue):
3004         (WebCore::StyleBuilderCustom::applyInheritDisplay):
3005         (WebCore::StyleBuilderCustom::applyValueDisplay):
3006         (WebCore::StyleBuilderCustom::applyValueWebkitTextEmphasisStyle):
3007         (WebCore::StyleBuilderCustom::applyValueCursor):
3008         (WebCore::StyleBuilderCustom::applyValueContent):
3009         (WebCore::StyleBuilderCustom::determineRubyTextSizeMultiplier):
3010         (WebCore::StyleBuilderCustom::applyValueAlt):
3011         * css/StyleResolver.cpp:
3012         (WebCore::StyleResolver::styleForElement):
3013         (WebCore::equivalentBlockDisplay):
3014         (WebCore::doesNotInheritTextDecoration):
3015         (WebCore::StyleResolver::adjustStyleForInterCharacterRuby):
3016         (WebCore::adjustDisplayContentsStyle):
3017         (WebCore::StyleResolver::adjustSVGElementStyle):
3018         (WebCore::StyleResolver::adjustRenderStyle):
3019         (WebCore::StyleResolver::styleRulesForElement):
3020         (WebCore::isCacheableInMatchedPropertiesCache):
3021         (WebCore::StyleResolver::applyMatchedProperties):
3022         (WebCore::StyleResolver::CascadedProperties::Property::apply):
3023         * css/StyleResolver.h:
3024         (WebCore::StyleResolver::State::elementLinkState const):
3025         * cssjit/SelectorCompiler.cpp:
3026         (WebCore::SelectorCompiler::constructFragmentsInternal):
3027         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateRequestedPseudoElementEqualsToSelectorPseudoElement):
3028         (WebCore::SelectorCompiler::SelectorCodeGenerator::generateMarkPseudoStyleForPseudoElement):
3029         * dom/Document.cpp:
3030         (WebCore::Document::styleForElementIgnoringPendingStylesheets):
3031         (WebCore::Document::isPageBoxVisible):
3032         (WebCore::Document::setVisuallyOrdered):
3033         * dom/Document.h:
3034         * dom/Element.cpp:
3035         (WebCore::Element::isFocusable const):
3036         (WebCore::Element::hasDisplayContents const):
3037         (WebCore::Element::storeDisplayContentsStyle):
3038         (WebCore::Element::rendererIsNeeded):
3039         (WebCore::beforeOrAfterPseudoElement):
3040         (WebCore::Element::computedStyle):
3041         * dom/Element.h:
3042         * dom/Node.cpp:
3043         (WebCore::computeEditabilityFromComputedStyle):
3044         * dom/Node.h:
3045         (WebCore::Node::isPseudoElement const):
3046         (WebCore::Node::isBeforePseudoElement const):
3047         (WebCore::Node::isAfterPseudoElement const):
3048         (WebCore::Node::pseudoId const):
3049         (WebCore::Node::customPseudoId const):
3050         * dom/Position.cpp:
3051         (WebCore::Position::upstream const):
3052         (WebCore::Position::downstream const):
3053         (WebCore::Position::isCandidate const):
3054         (WebCore::Position::rendersInDifferentPosition const):
3055         * dom/PositionIterator.cpp:
3056         (WebCore::PositionIterator::isCandidate const):
3057         * dom/PseudoElement.cpp:
3058         (WebCore::PseudoElement::pseudoElementNameForEvents):
3059         (WebCore::PseudoElement::PseudoElement):
3060         * dom/VisitedLinkState.cpp:
3061         (WebCore::VisitedLinkState::determineLinkStateSlowCase):
3062         * dom/VisitedLinkState.h:
3063         (WebCore::VisitedLinkState::determineLinkState):
3064         * editing/Editing.cpp:
3065         (WebCore::isSpecialHTMLElement):
3066         (WebCore::isNodeRendered):
3067         * editing/TextIterator.cpp:
3068         (WebCore::hasVisibleTextNode):
3069         (WebCore::TextIterator::handleTextNode):
3070         (WebCore::TextIterator::handleTextBox):
3071         (WebCore::TextIterator::handleTextNodeFirstLetter):
3072         (WebCore::TextIterator::handleReplacedElement):
3073         (WebCore::TextIterator::shouldRepresentNodeOffsetZero):
3074         (WebCore::SimplifiedBackwardsTextIterator::advance):
3075         * editing/VisibleUnits.cpp:
3076         (WebCore::findStartOfParagraph):
3077         (WebCore::findEndOfParagraph):
3078         * editing/ios/EditorIOS.mm:
3079         (WebCore::Editor::setTextAlignmentForChangedBaseWritingDirection):
3080         * html/HTMLAreaElement.cpp:
3081         (WebCore::HTMLAreaElement::isFocusable const):
3082         * html/HTMLFormElement.cpp:
3083         (WebCore::HTMLFormElement::rendererIsNeeded):
3084         * html/HTMLIFrameElement.cpp:
3085         (WebCore::HTMLIFrameElement::rendererIsNeeded):
3086         * html/HTMLInputElement.cpp:
3087         (WebCore::HTMLInputElement::createInnerTextStyle):
3088         * html/HTMLOptGroupElement.cpp:
3089         (WebCore::HTMLOptGroupElement::isFocusable const):
3090         * html/HTMLOptionElement.cpp:
3091         (WebCore::HTMLOptionElement::isFocusable const):
3092         * html/HTMLTextAreaElement.cpp:
3093         (WebCore::HTMLTextAreaElement::createInnerTextStyle):
3094         * html/HTMLTextFormControlElement.cpp:
3095         (WebCore::HTMLTextFormControlElement::setSelectionRange):
3096         (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
3097         * html/MediaElementSession.cpp:
3098         (WebCore::MediaElementSession::autoplayPermitted const):
3099         (WebCore::isMainContentForPurposesOfAutoplay):
3100         * html/RubyElement.cpp:
3101         (WebCore::RubyElement::createElementRenderer):
3102         * html/RubyTextElement.cpp:
3103         (WebCore::RubyTextElement::createElementRenderer):
3104         * html/shadow/TextControlInnerElements.cpp:
3105         (WebCore::TextControlInnerElement::resolveCustomStyle):
3106         (WebCore::TextControlPlaceholderElement::resolveCustomStyle):
3107         * inspector/InspectorOverlay.cpp:
3108         (WebCore::buildObjectForElementData):
3109         * inspector/agents/InspectorCSSAgent.cpp:
3110         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
3111         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
3112         * inspector/agents/InspectorDOMAgent.cpp:
3113         (WebCore::pseudoElementType):
3114         (WebCore::InspectorDOMAgent::buildObjectForNode):
3115         * inspector/agents/InspectorLayerTreeAgent.cpp:
3116         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
3117         * layout/layouttree/LayoutBox.cpp:
3118         (WebCore::Layout::Box::isInlineBlockBox const):
3119         (WebCore::Layout::Box::isBlockLevelBox const):
3120         (WebCore::Layout::Box::isInlineLevelBox const):
3121         (WebCore::Layout::Box::isBlockContainerBox const):
3122         * page/EventHandler.cpp:
3123         (WebCore::EventHandler::selectCursor):
3124         * page/Frame.cpp:
3125         (WebCore::Frame::searchForLabelsAboveCell):
3126         (WebCore::Frame::searchForLabelsBeforeElement):
3127         * page/FrameView.cpp:
3128         (WebCore::FrameView::createScrollbar):
3129         (WebCore::FrameView::adjustScrollStepForFixedContent):
3130         (WebCore::FrameView::updateScrollCorner):
3131         * page/animation/AnimationBase.cpp:
3132         (WebCore::AnimationBase::playStatePlaying const):
3133         (WebCore::AnimationBase::updatePlayState):
3134         * page/animation/AnimationBase.h:
3135         * page/animation/CSSPropertyAnimation.cpp:
3136         (WebCore::blendFunc):
3137         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
3138         * page/animation/CompositeAnimation.cpp:
3139         (WebCore::CompositeAnimation::updateTransitions):
3140         (WebCore::CompositeAnimation::updateKeyframeAnimations):
3141         (WebCore::CompositeAnimation::suspendAnimations):
3142         (WebCore::CompositeAnimation::resumeAnimations):
3143         * page/animation/KeyframeAnimation.cpp:
3144         (WebCore::KeyframeAnimation::animate):
3145         * page/ios/FrameIOS.mm:
3146         (WebCore::Frame::nodeRespondingToClickEvents):
3147         * platform/animation/Animation.cpp:
3148         (WebCore::Animation::Animation):
3149         * platform/animation/Animation.h:
3150         (WebCore::Animation::clearPlayState):
3151         (WebCore::Animation::fillMode const):
3152         (WebCore::Animation::playState const):
3153         (WebCore::Animation::setFillMode):
3154         (WebCore::Animation::setPlayState):
3155         (WebCore::Animation::fillsBackwards const):
3156         (WebCore::Animation::fillsForwards const):
3157         (WebCore::Animation::initialFillMode):
3158         (WebCore::Animation::initialPlayState):
3159         * platform/graphics/GraphicsTypes.h:
3160         * platform/graphics/ca/GraphicsLayerCA.cpp:
3161         (WebCore::GraphicsLayerCA::createTransformAnimationsFromKeyframes):
3162         * platform/ios/wak/WAKWindow.mm:
3163         (-[WAKWindow dumpTiles]):
3164         * platform/mac/WebCoreNSURLExtras.mm:
3165         (WebCore::isLookalikeCharacter):
3166         * rendering/ClipPathOperation.h:
3167         * rendering/InlineBox.h:
3168         (WebCore::InlineBox::visibleToHitTesting const):
3169         * rendering/InlineFlowBox.cpp:
3170         (WebCore::InlineFlowBox::addToLine):
3171         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
3172         (WebCore::InlineFlowBox::addTextBoxVisualOverflow):
3173         (WebCore::InlineFlowBox::paint):
3174         (WebCore::InlineFlowBox::paintBoxDecorations):
3175         (WebCore::InlineFlowBox::paintMask):
3176         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment const):
3177         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const):
3178         (WebCore::InlineFlowBox::collectLeafBoxesInLogicalOrder const):
3179         * rendering/InlineFlowBox.h:
3180         (WebCore::InlineFlowBox::InlineFlowBox):
3181         * rendering/InlineTextBox.cpp:
3182         (WebCore::InlineTextBox::emphasisMarkExistsAndIsAbove const):
3183         (WebCore::InlineTextBox::paint):
3184         (WebCore::InlineTextBox::createTextRun const):
3185         * rendering/PointerEventsHitRules.cpp:
3186         (WebCore::PointerEventsHitRules::PointerEventsHitRules):
3187         * rendering/PointerEventsHitRules.h:
3188         * rendering/RenderBlock.cpp:
3189         (WebCore::RenderBlock::computeStartPositionDeltaForChildAvoidingFloats):
3190         (WebCore::RenderBlock::paint):
3191         (WebCore::RenderBlock::paintObject):
3192         (WebCore::RenderBlock::shouldPaintSelectionGaps const):
3193         (WebCore::RenderBlock::adjustLogicalLeftOffsetForLine const):
3194         (WebCore::RenderBlock::adjustLogicalRightOffsetForLine const):
3195         (WebCore::isChildHitTestCandidate):
3196         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
3197         (WebCore::RenderBlock::firstLineBlock const):
3198         (WebCore::findFirstLetterBlock):
3199         (WebCore::RenderBlock::getFirstLetter):
3200         (WebCore::RenderBlock::createAnonymousBlockWithStyleAndDisplay):
3201         (WebCore::RenderBlock::childBoxIsUnsplittableForFragmentation const):
3202         (WebCore::RenderBlock::constructTextRun):
3203         (WebCore::RenderBlock::layoutExcludedChildren):
3204         * rendering/RenderBlock.h:
3205         (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
3206         (WebCore::RenderBlock::createAnonymousBlock const):
3207         * rendering/RenderBlockFlow.cpp:
3208         (WebCore::RenderBlockFlow::willCreateColumns const):
3209         (WebCore::RenderBlockFlow::layoutBlock):
3210         (WebCore::RenderBlockFlow::applyBeforeBreak):
3211         (WebCore::RenderBlockFlow::applyAfterBreak):
3212         (WebCore::RenderBlockFlow::adjustForUnsplittableChild):
3213         (WebCore::RenderBlockFlow::updateStylesForColumnChildren):
3214         (WebCore::RenderBlockFlow::computeLogicalLocationForFloat):
3215         (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom const):
3216         (WebCore::RenderBlockFlow::adjustForBorderFit const):
3217         (WebCore::RenderBlockFlow::fitBorderToLinesIfNeeded):
3218         (WebCore::RenderBlockFlow::lineAtIndex const):
3219         (WebCore::RenderBlockFlow::lineCount const):
3220         (WebCore::getHeightForLineCount):
3221         (WebCore::RenderBlockFlow::clearTruncation):
3222         (WebCore::RenderBlockFlow::findClosestTextAtAbsolutePoint):
3223         (WebCore::RenderBlockFlow::lineCountForTextAutosizing):
3224         (WebCore::RenderBlockFlow::setComputedColumnCountAndWidth):
3225         (WebCore::RenderBlockFlow::updateColumnProgressionFromStyle):
3226         (WebCore::RenderBlockFlow::isTopLayoutOverflowAllowed const):
3227         (WebCore::RenderBlockFlow::isLeftLayoutOverflowAllowed const):
3228         * rendering/RenderBlockFlow.h:
3229         * rendering/RenderBlockLineLayout.cpp:
3230         (WebCore::RenderBlockFlow::constructLine):
3231         (WebCore::RenderBlockFlow::textAlignmentForLine const):
3232         (WebCore::RenderBlockFlow::updateLogicalWidthForAlignment):
3233         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForLine):
3234         (WebCore::expansionBehaviorForInlineTextBox):
3235         (WebCore::RenderBlockFlow::computeInlineDirectionPositionsForSegment):
3236         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
3237         (WebCore::RenderBlockFlow::checkFloatInCleanLine):
3238         (WebCore::RenderBlockFlow::deleteEllipsisLineBoxes):
3239         (WebCore::RenderBlockFlow::checkLinesForTextOverflow):
3240         (WebCore::RenderBlockFlow::startAlignedOffsetForLine):
3241         * rendering/RenderBox.cpp:
3242         (WebCore::RenderBox::hasVerticalScrollbarWithAutoBehavior const):
3243         (WebCore::RenderBox::hasHorizontalScrollbarWithAutoBehavior const):
3244         (WebCore::isCandidateForOpaquenessTest):
3245         (WebCore::RenderBox::paintMask):
3246         (WebCore::RenderBox::paintClippingMask):
3247         (WebCore::RenderBox::positionLineBox):
3248         (WebCore::RenderBox::clippedOverflowRectForRepaint const):
3249         (WebCore::RenderBox::computeLogicalWidthInFragment const):
3250         (WebCore::RenderBox::computeInlineDirectionMargins const):
3251         (WebCore::RenderBox::skipContainingBlockForPercentHeightCalculation const):
3252         (WebCore::RenderBox::positionForPoint):
3253         (WebCore::RenderBox::isUnsplittableForPagination const):
3254         * rendering/RenderBoxModelObject.cpp:
3255         (WebCore::RenderBoxModelObject::localCaretRectForEmptyElement):
3256         * rendering/RenderBoxModelObject.h:
3257         * rendering/RenderCounter.cpp:
3258         (WebCore::planCounter):
3259         (WebCore::RenderCounter::originalText const):
3260         * rendering/RenderDeprecatedFlexibleBox.cpp:
3261         (WebCore::childDoesNotAffectWidthOrFlexing):
3262         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3263         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
3264         * rendering/RenderDetailsMarker.cpp:
3265         (WebCore::RenderDetailsMarker::paint):
3266         * rendering/RenderElement.cpp:
3267         (WebCore::RenderElement::createFor):
3268         (WebCore::RenderElement::computeFirstLineStyle const):
3269         (WebCore::RenderElement::propagateStyleToAnonymousChildren):
3270         (WebCore::RenderElement::styleWillChange):
3271         (WebCore::RenderElement::insertedIntoTree):
3272         (WebCore::RenderElement::willBeRemovedFromTree):
3273         (WebCore::RenderElement::repaintAfterLayoutIfNeeded):
3274         (WebCore::RenderElement::isVisibleInDocumentRect const):
3275         (WebCore::RenderElement::getCachedPseudoStyle const):
3276         (WebCore::RenderElement::getUncachedPseudoStyle const):
3277         (WebCore::RenderElement::selectionPseudoStyle const):
3278         * rendering/RenderElement.h:
3279         (WebCore::RenderElement::visibleToHitTesting const):
3280         * rendering/RenderFileUploadControl.cpp:
3281         (WebCore::RenderFileUploadControl::paintObject):
3282         * rendering/RenderFullScreen.cpp:
3283         (WebCore::createFullScreenStyle):
3284         * rendering/RenderGrid.cpp:
3285         (WebCore::RenderGrid::computeEmptyTracksForAutoRepeat const):
3286         * rendering/RenderImage.cpp:
3287         (WebCore::RenderImage::repaintOrMarkForLayout):
3288         * rendering/RenderInline.cpp:
3289         (WebCore::RenderInline::willBeDestroyed):
3290         (WebCore::updateStyleOfAnonymousBlockContinuations):
3291         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
3292         (WebCore::RenderInline::clippedOverflowRectForRepaint const):
3293         (WebCore::RenderInline::addAnnotatedRegions):
3294         * rendering/RenderLayer.cpp:
3295         (WebCore::RenderLayer::RenderLayer):
3296         (WebCore::RenderLayer::updateDescendantDependentFlags):
3297         (WebCore::RenderLayer::createScrollbar):
3298         (WebCore::styleRequiresScrollbar):
3299         (WebCore::styleDefinesAutomaticScrollbar):
3300         (WebCore::computeReferenceBox):
3301         (WebCore::RenderLayer::calculateClipRects const):
3302         * rendering/RenderLayerBacking.cpp:
3303         (WebCore::RenderLayerBacking::updateAfterDescendants):
3304         * rendering/RenderLayerCompositor.cpp:
3305         (WebCore::scrollbarHasDisplayNone):
3306         (WebCore::RenderLayerCompositor::requiresCompositingForPlugin const):
3307         (WebCore::RenderLayerCompositor::requiresCompositingForFrame const):
3308         * rendering/RenderListBox.cpp:
3309         (WebCore::RenderListBox::paintObject):
3310         (WebCore::itemOffsetForAlignment):
3311         (WebCore::RenderListBox::paintItemForeground):
3312         (WebCore::RenderListBox::paintItemBackground):
3313         (WebCore::RenderListBox::createScrollbar):
3314         * rendering/RenderListItem.cpp:
3315         (WebCore::RenderListItem::computeMarkerStyle const):
3316         * rendering/RenderListMarker.cpp:
3317         (WebCore::effectiveListMarkerType):
3318         (WebCore::listMarkerSuffix):
3319         (WebCore::listMarkerText):
3320         (WebCore::RenderListMarker::paint):
3321         (WebCore::RenderListMarker::updateContent):
3322         (WebCore::RenderListMarker::computePreferredLogicalWidths):
3323         (WebCore::RenderListMarker::updateMargins):
3324         (WebCore::RenderListMarker::suffix const):
3325         (WebCore::RenderListMarker::isInside const):
3326         (WebCore::RenderListMarker::getRelativeMarkerRect):
3327         * rendering/RenderListMarker.h:
3328         * rendering/RenderMediaControlElements.cpp:
3329         (WebCore::RenderMediaVolumeSliderContainer::layout):
3330         (WebCore::RenderTextTrackContainerElement::layout):
3331         * rendering/RenderMenuList.cpp:
3332         (WebCore::RenderMenuList::adjustInnerStyle):
3333         (WebCore::if):
3334         (RenderMenuList::itemStyle const):
3335         (RenderMenuList::menuStyle const):
3336         (RenderMenuList::createScrollbar):
3337         * rendering/RenderMultiColumnSpannerPlaceholder.cpp:
3338         (WebCore::RenderMultiColumnSpannerPlaceholder::createAnonymous):
3339         * rendering/RenderObject.cpp:
3340         (WebCore::RenderObject::addAnnotatedRegions):
3341         * rendering/RenderObject.h:
3342         (WebCore::RenderObject::isAnonymousBlock const):
3343         (WebCore::RenderObject::isBeforeContent const):
3344         (WebCore::RenderObject::isAfterContent const):
3345         * rendering/RenderReplaced.cpp:
3346         (WebCore::RenderReplaced::shouldPaint):
3347         (WebCore::RenderReplaced::clippedOverflowRectForRepaint const):
3348         * rendering/RenderRubyBase.cpp:
3349         (WebCore::RenderRubyBase::textAlignmentForLine const):
3350         * rendering/RenderRubyBase.h:
3351         * rendering/RenderRubyRun.cpp:
3352         (WebCore::RenderRubyRun::createRubyBase const):
3353         (WebCore::RenderRubyRun::staticCreateRubyRun):
3354         (WebCore::RenderRubyRun::layoutBlock):
3355         * rendering/RenderRubyText.cpp:
3356         (WebCore::RenderRubyText::textAlignmentForLine const):
3357         (WebCore::RenderRubyText::adjustInlineDirectionLineBounds const):
3358         * rendering/RenderRubyText.h:
3359         * rendering/RenderScrollbar.cpp:
3360         (WebCore::pseudoForScrollbarPart):
3361         (WebCore::RenderScrollbar::updateScrollbarPart):
3362         * rendering/RenderSearchField.cpp:
3363         (WebCore::RenderSearchField::updateCancelButtonVisibility const):
3364         (WebCore::RenderSearchField::visibilityForCancelButton const):
3365         (WebCore::RenderSearchField::menuStyle const):
3366         (WebCore::RenderSearchField::createScrollbar):
3367         * rendering/RenderSearchField.h:
3368         * rendering/RenderTable.cpp:
3369         (WebCore::RenderTable::willInsertTableSection):
3370         (WebCore::RenderTable::layoutCaptions):
3371         (WebCore::RenderTable::layout):
3372         (WebCore::RenderTable::paintObject):
3373         (WebCore::RenderTable::adjustBorderBoxRectForPainting):
3374         (WebCore::RenderTable::paintMask):
3375         (WebCore::RenderTable::recalcSections const):
3376         (WebCore::RenderTable::createTableWithStyle):
3377         * rendering/RenderTableCell.cpp:
3378         (WebCore::RenderTableCell::styleDidChange):
3379         (WebCore::RenderTableCell::paintCollapsedBorders):
3380         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
3381         (WebCore::RenderTableCell::paintBoxDecorations):
3382         (WebCore::RenderTableCell::paintMask):
3383         (WebCore::RenderTableCell::createTableCellWithStyle):
3384         * rendering/RenderTableCol.cpp:
3385         (WebCore::RenderTableCol::updateFromElement):
3386         (WebCore::RenderTableCol::isChildAllowed const):
3387         * rendering/RenderTableCol.h:
3388         * rendering/RenderTableRow.cpp:
3389         (WebCore::RenderTableRow::styleDidChange):
3390         (WebCore::RenderTableRow::paintOutlineForRowIfNeeded):
3391         (WebCore::RenderTableRow::createTableRowWithStyle):
3392         * rendering/RenderTableSection.cpp:
3393         (WebCore::RenderTableSection::addCell):
3394         (WebCore::RenderTableSection::paint):
3395         (WebCore::RenderTableSection::createTableSectionWithStyle):
3396         * rendering/RenderText.cpp:
3397         (WebCore::RenderText::styleDidChange):
3398         (WebCore::RenderText::computePreferredLogicalWidths):
3399         (WebCore::applyTextTransform):
3400         * rendering/RenderTextFragment.cpp:
3401         (WebCore::RenderTextFragment::styleDidChange):
3402         (WebCore::RenderTextFragment::blockForAccompanyingFirstLetter):
3403         * rendering/RenderTheme.cpp:
3404         (WebCore::RenderTheme::adjustStyle):
3405         * rendering/RenderThemeMac.mm:
3406         (WebCore::RenderThemeMac::adjustMenuListStyle const):
3407         * rendering/RenderThemeWin.cpp:
3408         (WebCore::RenderThemeWin::adjustMenuListButtonStyle const):
3409         * rendering/RenderView.cpp:
3410         (WebCore::rendererObscuresBackground):
3411         * rendering/RenderWidget.cpp:
3412         (WebCore::RenderWidget::setWidget):
3413         (WebCore::RenderWidget::styleDidChange):
3414         * rendering/RootInlineBox.cpp:
3415         (WebCore::RootInlineBox::paintEllipsisBox const):
3416         (WebCore::RootInlineBox::lineSnapAdjustment const):
3417         (WebCore::RootInlineBox::lineSelectionGap):
3418         (WebCore::RootInlineBox::computeCaretRect const):
3419         * rendering/SimpleLineLayout.cpp:
3420         (WebCore::SimpleLineLayout::canUseForFontAndText):
3421         (WebCore::SimpleLineLayout::canUseForStyle):
3422         (WebCore::SimpleLineLayout::computeLineLeft):
3423         (WebCore::SimpleLineLayout::updateLineConstrains):
3424         (WebCore::SimpleLineLayout::createLineRuns):
3425         (WebCore::SimpleLineLayout::textAlignForLine):
3426         (WebCore::SimpleLineLayout::closeLineEndingAndAdjustRuns):
3427         * rendering/SimpleLineLayoutFunctions.cpp:
3428         (WebCore::SimpleLineLayout::paintFlow):
3429         (WebCore::SimpleLineLayout::hitTestFlow):
3430         * rendering/SimpleLineLayoutTextFragmentIterator.cpp:
3431         (WebCore::SimpleLineLayout::TextFragmentIterator::Style::Style):
3432         * rendering/SimpleLineLayoutTextFragmentIterator.h:
3433         * rendering/TextDecorationPainter.cpp:
3434         (WebCore::textDecorationStyleToStrokeStyle):
3435         (WebCore::TextDecorationPainter::paintTextDecoration):
3436         (WebCore::collectStylesForRenderer):
3437         * rendering/TextDecorationPainter.h:
3438         * rendering/line/BreakingContext.h:
3439         (WebCore::BreakingContext::BreakingContext):
3440         (WebCore::BreakingContext::clearLineBreakIfFitsOnLine):
3441         (WebCore::BreakingContext::handleBR):
3442         (WebCore::BreakingContext::handleOutOfFlowPositioned):
3443         (WebCore::BreakingContext::handleText):
3444         (WebCore::BreakingContext::canBreakAtThisPosition):
3445         (WebCore::BreakingContext::handleEndOfLine):
3446         * rendering/line/LineInlineHeaders.h:
3447         (WebCore::shouldCollapseWhiteSpace):
3448         * rendering/line/LineWidth.cpp:
3449         (WebCore::newFloatShrinksLine):
3450         * rendering/mathml/MathOperator.cpp:
3451         (WebCore::MathOperator::paint):
3452         * rendering/mathml/RenderMathMLFraction.cpp:
3453         (WebCore::RenderMathMLFraction::paint):
3454         * rendering/mathml/RenderMathMLMath.cpp:
3455         (WebCore::RenderMathMLMath::layoutBlock):
3456         * rendering/mathml/RenderMathMLMenclose.cpp:
3457         (WebCore::RenderMathMLMenclose::paint):
3458         * rendering/mathml/RenderMathMLRoot.cpp:
3459         (WebCore::RenderMathMLRoot::paint):
3460         * rendering/mathml/RenderMathMLToken.cpp:
3461         (WebCore::RenderMathMLToken::paint):
3462         * rendering/shapes/BoxShape.cpp:
3463         (WebCore::computeRoundedRectForBoxShape):
3464         * rendering/shapes/ShapeOutsideInfo.cpp:
3465         (WebCore::referenceBox):
3466         (WebCore::ShapeOutsideInfo::setReferenceBoxLogicalSize):
3467         (WebCore::ShapeOutsideInfo::logicalTopOffset const):
3468         (WebCore::ShapeOutsideInfo::logicalLeftOffset const):
3469         * rendering/style/CounterContent.h:
3470         (WebCore::CounterContent::CounterContent):
3471         (WebCore::CounterContent::listStyle const):
3472         * rendering/style/RenderStyle.cpp:
3473         (WebCore::RenderStyle::createAnonymousStyleWithDisplay):
3474         (WebCore::RenderStyle::createStyleInheritingFromPseudoStyle):
3475         (WebCore::RenderStyle::RenderStyle):
3476         (WebCore::RenderStyle::hasUniquePseudoStyle const):
3477         (WebCore::RenderStyle::getCachedPseudoStyle const):
3478         (WebCore::RenderStyle::addCachedPseudoStyle):
3479         (WebCore::RenderStyle::changeRequiresLayout const):
3480         (WebCore::requiresPainting):
3481         (WebCore::RenderStyle::hyphenString const):
3482         (WebCore::RenderStyle::textEmphasisMarkString const):
3483         (WebCore::RenderStyle::visitedDependentColor const):
3484         (WebCore::RenderStyle::textEmphasisMark const):
3485         (WebCore::RenderStyle::setColumnStylesFromPaginationMode):
3486         * rendering/style/RenderStyle.h:
3487         (WebCore::RenderStyle::setStyleType):
3488         (WebCore::RenderStyle::setRTLOrdering):
3489         (WebCore::RenderStyle::display const):
3490         (WebCore::RenderStyle::visibility const):
3491         (WebCore::RenderStyle::textAlign const):
3492         (WebCore::RenderStyle::textTransform const):
3493         (WebCore::RenderStyle::whiteSpace const):
3494         (WebCore::RenderStyle::emptyCells const):
3495         (WebCore::RenderStyle::captionSide const):
3496         (WebCore::RenderStyle::listStyleType const):
3497         (WebCore::RenderStyle::listStylePosition const):
3498         (WebCore::RenderStyle::cursor const):
3499         (WebCore::RenderStyle::insideLink const):
3500         (WebCore::RenderStyle::borderFit const):
3501         (WebCore::RenderStyle::pointerEvents const):
3502         (WebCore::RenderStyle::setDisplay):
3503         (WebCore::RenderStyle::setOriginalDisplay):
3504         (WebCore::RenderStyle::setVisibility):
3505         (WebCore::RenderStyle::setTextAlign):
3506         (WebCore::RenderStyle::setTextTransform):
3507         (WebCore::RenderStyle::setTextDecorationStyle):
3508         (WebCore::RenderStyle::setTextDecorationSkip):
3509         (WebCore::RenderStyle::setTextUnderlinePosition):
3510         (WebCore::RenderStyle::setDirection):
3511         (WebCore::RenderStyle::setTextZoom):
3512         (WebCore::RenderStyle::setWhiteSpace):
3513         (WebCore::RenderStyle::setEmptyCells):
3514         (WebCore::RenderStyle::setCaptionSide):
3515         (WebCore::RenderStyle::setListStyleType):
3516         (WebCore::RenderStyle::setListStylePosition):
3517         (WebCore::RenderStyle::setCursor):
3518         (WebCore::RenderStyle::setCursorVisibility):
3519         (WebCore::RenderStyle::setInsideLink):
3520         (WebCore::RenderStyle::setHyphens):
3521         (WebCore::RenderStyle::setBorderFit):
3522         (WebCore::RenderStyle::setColumnAxis):
3523         (WebCore::RenderStyle::setColumnProgression):
3524         (WebCore::RenderStyle::setTextEmphasisFill):
3525         (WebCore::RenderStyle::setTextEmphasisMark):
3526         (WebCore::RenderStyle::setRubyPosition):
3527         (WebCore::RenderStyle::setBreakBefore):
3528         (WebCore::RenderStyle::setBreakAfter):
3529         (WebCore::RenderStyle::setBreakInside):
3530         (WebCore::RenderStyle::setHangingPunctuation):
3531         (WebCore::RenderStyle::setLineSnap):
3532         (WebCore::RenderStyle::setLineAlign):
3533         (WebCore::RenderStyle::setPointerEvents):
3534         (WebCore::RenderStyle::initialDisplay):
3535         (WebCore::RenderStyle::initialBreakBetween):
3536         (WebCore::RenderStyle::initialBreakInside):
3537         (WebCore::RenderStyle::initialCaptionSide):
3538         (WebCore::RenderStyle::initialColumnAxis):
3539         (WebCore::RenderStyle::initialColumnProgression):
3540         (WebCore::RenderStyle::initialEmptyCells):
3541         (WebCore::RenderStyle::initialListStylePosition):
3542         (WebCore::RenderStyle::initialListStyleType):
3543         (WebCore::RenderStyle::initialTextTransform):
3544         (WebCore::RenderStyle::initialVisibility):
3545         (WebCore::RenderStyle::initialWhiteSpace):
3546         (WebCore::RenderStyle::initialCursor):
3547         (WebCore::RenderStyle::initialTextAlign):
3548         (WebCore::RenderStyle::initialTextDecorationStyle):
3549         (WebCore::RenderStyle::initialTextZoom):
3550         (WebCore::RenderStyle::initialHyphens):
3551         (WebCore::RenderStyle::initialBorderFit):
3552         (WebCore::RenderStyle::initialRTLOrdering):
3553         (WebCore::RenderStyle::initialPointerEvents):
3554         (WebCore::RenderStyle::initialTextEmphasisColor):
3555         (WebCore::RenderStyle::initialTextEmphasisFill):
3556         (WebCore::RenderStyle::initialTextEmphasisMark):
3557         (WebCore::RenderStyle::initialRubyPosition):
3558         (WebCore::RenderStyle::initialImageResolutionSource):
3559         (WebCore::RenderStyle::initialImageResolutionSnap):
3560         (WebCore::RenderStyle::initialTextAlignLast):
3561         (WebCore::RenderStyle::initialTextJustify):
3562         (WebCore::RenderStyle::initialCursorVisibility):
3563         (WebCore::RenderStyle::initialGridAutoRepeatType):
3564         (WebCore::RenderStyle::initialLineSnap):
3565         (WebCore::RenderStyle::initialLineAlign):
3566         (WebCore::RenderStyle::NonInheritedFlags::hasAnyPublicPseudoStyles const):
3567         (WebCore::RenderStyle::originalDisplay const):
3568         (WebCore::RenderStyle::NonInheritedFlags::hasPseudoStyle const):
3569         (WebCore::RenderStyle::NonInheritedFlags::setHasPseudoStyle):
3570         (WebCore::RenderStyle::NonInheritedFlags::setHasPseudoStyles):
3571         (WebCore::RenderStyle::autoWrap):
3572         (WebCore::RenderStyle::preserveNewline):
3573         (WebCore::RenderStyle::collapseWhiteSpace):
3574         (WebCore::RenderStyle::breakOnlyAfterWhiteSpace const):
3575         (WebCore::RenderStyle::hasInlineColumnAxis const):
3576         (WebCore::RenderStyle::isDisplayRegionType const):
3577         (WebCore::RenderStyle::isDisplayReplacedType):
3578         (WebCore::RenderStyle::isDisplayInlineType):
3579         (WebCore::RenderStyle::isDisplayFlexibleBox):
3580         (WebCore::RenderStyle::isDisplayGridBox):
3581         (WebCore::RenderStyle::isDisplayFlexibleOrGridBox):
3582         (WebCore::pseudoElementRendererIsNeeded):
3583         * rendering/style/RenderStyleConstants.cpp:
3584         (WebCore::operator<<):
3585         (WebCore::alwaysPageBreak):
3586         * rendering/style/RenderStyleConstants.h:
3587         (WebCore::PseudoIdSet::has const):
3588         (WebCore::PseudoIdSet::add):
3589         * rendering/style/ShapeValue.h:
3590         * rendering/style/StyleMultiColData.cpp:
3591         (WebCore::StyleMultiColData::StyleMultiColData):
3592         * rendering/style/StyleRareInheritedData.cpp:
3593         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3594         * rendering/style/StyleRareNonInheritedData.cpp:
3595         (WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
3596         * rendering/style/StyleRareNonInheritedData.h:
3597         * rendering/svg/RenderSVGContainer.cpp:
3598         (WebCore::RenderSVGContainer::paint):
3599         * rendering/svg/RenderSVGImage.cpp:
3600         (WebCore::RenderSVGImage::paint):
3601         (WebCore::RenderSVGImage::nodeAtFloatPoint):
3602         * rendering/svg/RenderSVGInlineText.cpp:
3603         (WebCore::RenderSVGInlineText::styleDidChange):
3604         * rendering/svg/RenderSVGModelObject.cpp:
3605         (WebCore::RenderSVGModelObject::checkIntersection):
3606         (WebCore::RenderSVGModelObject::checkEnclosure):
3607         * rendering/svg/RenderSVGResource.cpp:
3608         (WebCore::requestPaintingResource):
3609         * rendering/svg/RenderSVGResourceClipper.cpp:
3610         (WebCore::RenderSVGResourceClipper::pathOnlyClipping):
3611         (WebCore::RenderSVGResourceClipper::drawContentIntoMaskImage):
3612         (WebCore::RenderSVGResourceClipper::calculateClipContentRepaintRect):
3613         * rendering/svg/RenderSVGResourceMasker.cpp:
3614         (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
3615         (WebCore::RenderSVGResourceMasker::calculateMaskContentRepaintRect):
3616         * rendering/svg/RenderSVGRoot.cpp:
3617         (WebCore::RenderSVGRoot::clippedOverflowRectForRepaint const):
3618         * rendering/svg/RenderSVGShape.cpp:
3619         (WebCore::RenderSVGShape::paint):
3620         (WebCore::RenderSVGShape::nodeAtFloatPoint):
3621         * rendering/svg/RenderSVGText.cpp:
3622         (WebCore::RenderSVGText::nodeAtFloatPoint):
3623         * rendering/svg/SVGInlineTextBox.cpp:
3624         (WebCore::SVGInlineTextBox::paintSelectionBackground):
3625         (WebCore::SVGInlineTextBox::paint):
3626         (WebCore::SVGInlineTextBox::constructTextRun const):
3627         (WebCore::SVGInlineTextBox::paintDecoration):
3628         (WebCore::SVGInlineTextBox::nodeAtPoint):
3629         * rendering/svg/SVGRenderSupport.cpp:
3630         (WebCore::SVGRenderSupport::clippedOverflowRectForRepaint):
3631         * rendering/svg/SVGRenderingContext.cpp:
3632         (WebCore::SVGRenderingContext::prepareToRenderSVGContent):
3633         * rendering/svg/SVGTextLayoutAttributesBuilder.cpp:
3634         (WebCore::processRenderSVGInlineText):
3635         * rendering/svg/SVGTextMetricsBuilder.cpp:
3636         (WebCore::SVGTextMetricsBuilder::measureTextRenderer):
3637         * rendering/updating/RenderTreeBuilderBlock.cpp:
3638         (WebCore::RenderTreeBuilder::Block::detach):
3639         * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
3640         (WebCore::styleForFirstLetter):
3641         (WebCore::RenderTreeBuilder::FirstLetter::updateAfterDescendants):
3642         (WebCore::RenderTreeBuilder::FirstLetter::updateStyle):
3643         (WebCore::RenderTreeBuilder::FirstLetter::createRenderers):
3644         * rendering/updating/RenderTreeBuilderInline.cpp:
3645         (WebCore::RenderTreeBuilder::Inline::attachIgnoringContinuation):
3646         (WebCore::RenderTreeBuilder::Inline::newChildIsInline):
3647         * rendering/updating/RenderTreeBuilderList.cpp:
3648         (WebCore::RenderTreeBuilder::List::updateItemMarker):
3649         * rendering/updating/RenderTreeBuilderMathML.cpp:
3650         (WebCore::RenderTreeBuilder::MathML::createMathMLOperator):
3651         * rendering/updating/RenderTreeBuilderMultiColumn.cpp:
3652         (WebCore::RenderTreeBuilder::MultiColumn::createFragmentedFlow):
3653         (WebCore::RenderTreeBuilder::MultiColumn::processPossibleSpannerDescendant):
3654         * rendering/updating/RenderTreeBuilderRuby.cpp:
3655         (WebCore::isAnonymousRubyInlineBlock):
3656         (WebCore::isRubyBeforeBlock):
3657         (WebCore::isRubyAfterBlock):
3658         (WebCore::createAnonymousRubyInlineBlock):
3659         * rendering/updating/RenderTreeBuilderTable.cpp:
3660         (WebCore::RenderTreeBuilder::Table::findOrCreateParentForChild):
3661         * rendering/updating/RenderTreeUpdater.cpp:
3662         (WebCore::RenderTreeUpdater::updateBeforeDescendants):
3663         (WebCore::RenderTreeUpdater::updateAfterDescendants):
3664         (WebCore::RenderTreeUpdater::updateElementRenderer):
3665         (WebCore::elementImplicitVisibility):
3666         (WebCore::CheckForVisibilityChange::CheckForVisibilityChange):
3667         (WebCore::CheckForVisibilityChange::~CheckForVisibilityChange):
3668         * rendering/updating/RenderTreeUpdaterGeneratedContent.cpp:
3669         (WebCore::RenderTreeUpdater::GeneratedContent::updatePseudoElement):
3670         * style/InlineTextBoxStyle.cpp:
3671         (WebCore::visualOverflowForDecorations):
3672         * style/StyleChange.cpp:
3673         (WebCore::Style::determineChange):
3674         * style/StyleFontSizeFunctions.cpp:
3675         (WebCore::Style::computedFontSizeFromSpecifiedSize):
3676         * style/StyleResolveForDocument.cpp:
3677         (WebCore::Style::resolveForDocument):
3678         * style/StyleSharingResolver.cpp:
3679         * style/StyleTreeResolver.cpp:
3680         (WebCore::Style::affectsRenderedSubtree):
3681         (WebCore::Style::TreeResolver::resolveElement):
3682         (WebCore::Style::TreeResolver::resolvePseudoStyle):
3683         (WebCore::Style::TreeResolver::parentBoxStyle const):
3684         (WebCore::Style::createInheritedDisplayContentsStyleIfNeeded):
3685         (WebCore::Style::TreeResolver::resolveComposedTree):
3686         * svg/SVGElement.h:
3687         * svg/SVGGElement.cpp:
3688         (WebCore::SVGGElement::createElementRenderer):
3689
3690 2018-05-24  Chris Dumez  <cdumez@apple.com>
3691
3692         Enable subsampling for progressive JPEG images
3693         https://bugs.webkit.org/show_bug.cgi?id=185956
3694
3695         Reviewed by Said Abou-Hallawa.
3696
3697         Enable subsampling for progressive JPEG images now that it is supposed (rdar://problem/5191418).
3698         I verified locally that such images are still loading and do not cause any hang on iOS.
3699
3700         * platform/graphics/cg/ImageDecoderCG.cpp:
3701         (WebCore::ImageDecoderCG::frameAllowSubsamplingAtIndex const):
3702
3703 2018-05-24  Chris Dumez  <cdumez@apple.com>
3704
3705         Reduce copying of FontCascadeDescription objects by moving them around
3706         https://bugs.webkit.org/show_bug.cgi?id=185963
3707
3708         Reviewed by Simon Fraser.
3709
3710         Reduce copying of FontCascadeDescription objects by moving them around when possible.
3711
3712         * css/StyleBuilderCustom.h:
3713         (WebCore::StyleBuilderCustom::applyValueWebkitLocale):
3714         (WebCore::StyleBuilderCustom::applyInitialFontFamily):
3715         (WebCore::StyleBuilderCustom::applyInheritFontFamily):
3716         (WebCore::StyleBuilderCustom::applyValueFontFamily):
3717         (WebCore::StyleBuilderCustom::applyInheritFontVariantLigatures):
3718         (WebCore::StyleBuilderCustom::applyInitialFontVariantLigatures):
3719         (WebCore::StyleBuilderCustom::applyValueFontVariantLigatures):
3720         (WebCore::StyleBuilderCustom::applyInheritFontVariantNumeric):
3721         (WebCore::StyleBuilderCustom::applyInitialFontVariantNumeric):
3722         (WebCore::StyleBuilderCustom::applyValueFontVariantNumeric):
3723         (WebCore::StyleBuilderCustom::applyInheritFontVariantEastAsian):
3724         (WebCore::StyleBuilderCustom::applyInitialFontVariantEastAsian):
3725         (WebCore::StyleBuilderCustom::applyValueFontVariantEastAsian):
3726         (WebCore::StyleBuilderCustom::applyInitialFontSize):
3727         (WebCore::StyleBuilderCustom::applyInheritFontSize):
3728         (WebCore::StyleBuilderCustom::applyInitialFontStyle):
3729         (WebCore::StyleBuilderCustom::applyInheritFontStyle):
3730         (WebCore::StyleBuilderCustom::applyValueFontStyle):
3731         (WebCore::StyleBuilderCustom::applyValueFontSize):
3732         * css/StyleResolver.cpp:
3733         (WebCore::checkForOrientationChange):
3734         (WebCore::StyleResolver::checkForTextSizeAdjust):
3735         (WebCore::StyleResolver::checkForZoomChange):
3736         (WebCore::StyleResolver::checkForGenericFamilyChange):
3737         (WebCore::StyleResolver::initializeFontStyle):
3738         * css/StyleResolver.h:
3739         (WebCore::StyleResolver::State::setFontDescription):
3740         (WebCore::StyleResolver::setFontDescription):
3741         * css/makeprop.pl:
3742         (generateInitialValueSetter):
3743         (generateInheritValueSetter):
3744         (generateValueSetter):
3745         * html/canvas/CanvasRenderingContext2D.cpp:
3746         (WebCore::CanvasRenderingContext2D::setFont):
3747         * page/DebugPageOverlays.cpp:
3748         (WebCore::NonFastScrollableRegionOverlay::drawRect):
3749         * page/linux/ResourceUsageOverlayLinux.cpp:
3750         * platform/graphics/FontCascade.cpp:
3751         (WebCore::FontCascade::FontCascade):
3752         * platform/graphics/FontCascade.h:
3753         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
3754         (PlatformCALayerWin::drawTextAtPoint const):
3755         * platform/mock/MockRealtimeVideoSource.cpp:
3756         (WebCore::MockRealtimeVideoSource::drawText):
3757         * platform/win/DragImageWin.cpp:
3758         (WebCore::dragLabelFont):
3759         * platform/win/PopupMenuWin.cpp:
3760         (WebCore::PopupMenuWin::calculatePositionAndSize):
3761         (WebCore::PopupMenuWin::paint):
3762         * rendering/RenderBox.cpp:
3763         (WebCore::RenderBox::styleDidChange):
3764         * rendering/RenderCombineText.cpp:
3765         (WebCore::RenderCombineText::combineTextIfNeeded):
3766         * rendering/RenderEmbeddedObject.cpp:
3767         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry const):
3768         * rendering/RenderListBox.cpp:
3769         (WebCore::bolder):
3770         (WebCore::RenderListBox::paintItemForeground):
3771         * rendering/RenderListItem.cpp:
3772         (WebCore::RenderListItem::computeMarkerStyle const):
3773         * rendering/RenderTheme.cpp:
3774         (WebCore::RenderTheme::adjustStyle):
3775         * rendering/RenderThemeMac.mm:
3776         (WebCore::RenderThemeMac::setFontFromControlSize const):
3777         * rendering/TextAutoSizing.cpp:
3778         (WebCore::TextAutoSizingValue::adjustTextNodeSizes):
3779         (WebCore::TextAutoSizingValue::reset):
3780         * rendering/style/RenderStyle.cpp:
3781         (WebCore::RenderStyle::setFontDescription):
3782         (WebCore::RenderStyle::setFontSize):
3783         (WebCore::RenderStyle::setFontVariationSettings):
3784         (WebCore::RenderStyle::setFontWeight):
3785         (WebCore::RenderStyle::setFontStretch):
3786         (WebCore::RenderStyle::setFontItalic):
3787         * rendering/style/RenderStyle.h:
3788         * rendering/svg/RenderSVGInlineText.cpp:
3789         (WebCore::RenderSVGInlineText::computeNewScaledFontForStyle):
3790         * rendering/updating/RenderTreeBuilderFirstLetter.cpp:
3791         (WebCore::styleForFirstLetter):
3792         * style/StyleResolveForDocument.cpp:
3793         (WebCore::Style::resolveForDocument):
3794
3795 2018-05-24  Chris Dumez  <cdumez@apple.com>
3796
3797         Avoid constructing the string "all" repeatedly in MediaQueryParser
3798         https://bugs.webkit.org/show_bug.cgi?id=185961
3799
3800         Reviewed by Simon Fraser.
3801
3802         Avoid constructing the string "all" repeatedly in MediaQueryParser by:
3803         - Having MediaQueryData use an std::optional<String> instead of a String
3804         - Updating MediaQueryParser to use a static to store the default media type
3805           and use it when the MediaQueryData's media type is std::nullopt.
3806
3807         Also do some cleanup.
3808
3809         * css/parser/MediaQueryParser.cpp:
3810         (WebCore::MediaQueryParser::commitMediaQuery):
3811         (WebCore::MediaQueryParser::MediaQueryData::MediaQueryData):
3812         (WebCore::MediaQueryParser::MediaQueryData::clear):
3813         (WebCore::MediaQueryParser::MediaQueryData::addExpression):
3814         (WebCore::MediaQueryParser::MediaQueryData::lastExpressionValid):
3815         (WebCore::MediaQueryParser::MediaQueryData::removeLastExpression):
3816         * css/parser/MediaQueryParser.h:
3817         (WebCore::MediaQueryParser::MediaQueryData::setMediaType):
3818         (WebCore::MediaQueryParser::MediaQueryData::restrictor const):
3819         (WebCore::MediaQueryParser::MediaQueryData::expressions):
3820         (WebCore::MediaQueryParser::MediaQueryData::mediaType const):
3821         (WebCore::MediaQueryParser::MediaQueryData::currentMediaQueryChanged const):
3822         (WebCore::MediaQueryParser::MediaQueryData::restrictor):
3823         (WebCore::MediaQueryParser::MediaQueryData::setRestrictor):
3824         (WebCore::MediaQueryParser::MediaQueryData::setMediaFeature):
3825         (WebCore::MediaQueryParser::MediaQueryData::setMediaQueryParserContext):
3826
3827 2018-05-24  Joseph Pecoraro  <pecoraro@apple.com>
3828
3829         [iOS] Hard link AppSupport instead of soft linking
3830         https://bugs.webkit.org/show_bug.cgi?id=185959
3831         <rdar://problem/40506538>
3832
3833         Reviewed by Timothy Horton.
3834
3835         * Configurations/WebCore.xcconfig:
3836         * platform/network/ios/NetworkStateNotifierIOS.mm:
3837         (-[WebNetworkStateObserver initWithBlock:]):
3838         (WebCore::NetworkStateNotifier::updateStateWithoutNotifying):
3839
3840 2018-05-24  Chris Dumez  <cdumez@apple.com>
3841
3842         Cache navigator.userAgent for performance
3843         https://bugs.webkit.org/show_bug.cgi?id=185952
3844
3845         Reviewed by Geoffrey Garen.
3846
3847         Cache navigator.userAgent for performance. Previously, we would ask the client 5 times
3848         while loading apple.com.
3849
3850         * page/Navigator.cpp:
3851         (WebCore::Navigator::userAgent const):
3852         * page/Navigator.h:
3853         * page/NavigatorBase.h:
3854         * page/NavigatorID.idl:
3855         * page/WorkerNavigator.cpp:
3856         (WebCore::WorkerNavigator::userAgent const):
3857         * page/WorkerNavigator.h:
3858
3859 2018-05-24  Chris Dumez  <cdumez@apple.com>
3860
3861         Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds
3862         https://bugs.webkit.org/show_bug.cgi?id=185951
3863
3864         Reviewed by Geoffrey Garen.
3865
3866         Some of the work in initializeLogChannelsIfNecessary() is unnecessary for release builds and slows down
3867         launch time. In particular, it is unnecessary to read NSDefaults to figure out which logging channels
3868         should be enabled.
3869
3870         * platform/mac/LoggingMac.mm:
3871         (WebCore::logLevelString):
3872         * platform/unix/LoggingUnix.cpp:
3873         (WebCore::logLevelString):
3874         * platform/win/LoggingWin.cpp:
3875         (WebCore::logLevelString):
3876
3877 2018-05-24  Chris Dumez  <cdumez@apple.com>
3878
3879         [iOS WK2] Layout Test imported/w3c/web-platform-tests/service-workers/service-worker/update-after-navigation-fetch-event.https.html is a flaky failure
3880         https://bugs.webkit.org/show_bug.cgi?id=181499
3881         <rdar://problem/36443428>
3882
3883         Reviewed by Youenn Fablet.
3884
3885         After resolving a registration promise, we send an IPC back to the StorageProcess
3886         for synchronization purposes, to make sure the registration does not get updated
3887         before the promise's JS code has been executed. However, resolving a promise
3888         schedules a microtask to run the JS and we would therefore send the IPC back too
3889         early, thus causing flakiness. We now only send the IPC back back only after that
3890         microtask has run and the JS has been executed.
3891
3892         * bindings/js/JSDOMPromiseDeferred.cpp:
3893         (WebCore::DeferredPromise::callFunction):
3894         (WebCore::DeferredPromise::whenSettled):
3895         * bindings/js/JSDOMPromiseDeferred.h:
3896         * workers/service/ServiceWorkerContainer.cpp:
3897         (WebCore::ServiceWorkerContainer::jobResolvedWithRegistration):
3898
3899 2018-05-24  Jinho Bang  <zino@chromium.org>
3900
3901         [PaymentRequest] Remove currencySystem member
3902         https://bugs.webkit.org/show_bug.cgi?id=185860
3903
3904         Reviewed by Andy Estes.
3905
3906         After a long discussion, Web Payment Working Group decided to remove
3907         the `currencySystem` member[1]. The currency code should be well-formed
3908         3-letter alphabetic code and is allowed even if that is not part of
3909         the official ISO 4217 list.
3910
3911         [1] https://github.com/w3c/payment-request/pull/694
3912
3913         Test: http/tests/inspector/paymentrequest/payment-request-internal-properties.https.html
3914
3915         * Modules/paymentrequest/PaymentCurrencyAmount.h:
3916         * Modules/paymentrequest/PaymentCurrencyAmount.idl:
3917         * Modules/paymentrequest/PaymentRequest.cpp:
3918         (WebCore::checkAndCanonicalizeAmount):
3919         (WebCore::checkAndCanonicalizeTotal):
3920         * inspector/WebInjectedScriptHost.cpp:
3921         (WebCore::objectForPaymentCurrencyAmount):
3922
3923 2018-05-24  Zalan Bujtas  <zalan@apple.com>
3924
3925         [LFC] Implement position computation for inflow positioned elements
3926         https://bugs.webkit.org/show_bug.cgi?id=185936
3927
3928         Reviewed by Antti Koivisto.
3929
3930         * layout/blockformatting/BlockFormattingContext.cpp:
3931         (WebCore::Layout::BlockFormattingContext::computeInFlowPositionedPosition const):
3932         * layout/blockformatting/BlockFormattingContext.h:
3933         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
3934         (WebCore::Layout::BlockFormattingContext::Geometry::inFlowPositionedPosition):
3935
3936 2018-05-24  Zalan Bujtas  <zalan@apple.com>
3937
3938         [LFC] Implement FormattingContext::placeInFlowPositionedChildren
3939         https://bugs.webkit.org/show_bug.cgi?id=185934
3940
3941         Reviewed by Antti Koivisto.
3942
3943         * layout/FormattingContext.cpp:
3944         (WebCore::Layout::FormattingContext::computeInFlowPositionedPosition const):