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