[LFC] Set the invalidation root as the result of style change.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-05-04  Zalan Bujtas  <zalan@apple.com>
2
3         [LFC] Set the invalidation root as the result of style change.
4         https://bugs.webkit.org/show_bug.cgi?id=185301
5
6         Reviewed by Antti Koivisto.
7
8         Compute/propagate the update type on the ancestor chain and return the invalidation root
9         so that LayoutContext could use it as the entry point for the next layout frame.
10
11         * layout/LayoutContext.cpp:
12         (WebCore::Layout::LayoutContext::updateLayout):
13         (WebCore::Layout::LayoutContext::styleChanged):
14         * layout/LayoutContext.h: order is not important.
15         * layout/blockformatting/BlockInvalidation.cpp:
16         (WebCore::Layout::invalidationStopsAtFormattingContextBoundary):
17         (WebCore::Layout::computeUpdateType):
18         (WebCore::Layout::computeUpdateTypeForAncestor):
19         (WebCore::Layout::BlockInvalidation::invalidate):
20         * layout/blockformatting/BlockInvalidation.h:
21         * layout/inlineformatting/InlineInvalidation.cpp:
22         (WebCore::Layout::InlineInvalidation::invalidate):
23         * layout/inlineformatting/InlineInvalidation.h:
24
25 2018-05-04  Youenn Fablet  <youenn@apple.com>
26
27         PeerConnection should have its connectionState closed even if doing gathering
28         https://bugs.webkit.org/show_bug.cgi?id=185267
29
30         Reviewed by Darin Adler.
31
32         Test: webrtc/addICECandidate-closed.html
33
34         In case m_iceConnectionState is closed, m_connectionState should also be set to closed
35         and RTCPeerConnection should be closed so as to reject any other call.
36
37         * Modules/mediastream/RTCPeerConnection.cpp:
38         (WebCore::RTCPeerConnection::close):
39         (WebCore::RTCPeerConnection::updateConnectionState):
40
41 2018-05-04  Yacine Bandou  <yacine.bandou_ext@softathome.com>
42
43         [MSE][GStreamer] Delete properly the stream from the WebKitMediaSource
44         https://bugs.webkit.org/show_bug.cgi?id=185242
45
46         Reviewed by Xabier Rodriguez-Calvar.
47
48         When the sourceBuffer is removed from mediasource, the appropriate stream is not
49         properly deleted from WebKitMediaSource, because the appsrc and parser elements
50         of the stream are not removed from the WebKitMediaSource bin.
51
52         This patch avoids the regression of r231089, see https://bugs.webkit.org/show_bug.cgi?id=185071
53
54         * platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
55         (webKitMediaSrcFreeStream):
56
57 2018-05-04  Carlos Garcia Campos  <cgarcia@igalia.com>
58
59         [GTK] Epiphany (GNOME Web) says "Error downloading: Service Unavailable." when trying to download an image from discogs.com
60         https://bugs.webkit.org/show_bug.cgi?id=174730
61
62         Reviewed by Michael Catanzaro.
63
64         Export ResourceRequestBase::hasHTTPHeaderField().
65
66         * platform/network/ResourceRequestBase.h:
67
68 2018-05-03  Yusuke Suzuki  <utatane.tea@gmail.com>
69
70         Use subprocess.call instead of os.system to handle path with spaces
71         https://bugs.webkit.org/show_bug.cgi?id=185291
72
73         Reviewed by Darin Adler.
74
75         If gperf path includes spaces, these python scripts fail to execute gperf.
76         We use subprocess module instead of os.system to invoke gperf.
77
78         * css/makeSelectorPseudoClassAndCompatibilityElementMap.py:
79         * css/makeSelectorPseudoElementsMap.py:
80         * platform/network/create-http-header-name-table:
81
82 2018-05-03  Yusuke Suzuki  <utatane.tea@gmail.com>
83
84         Unreviewed, attempt to fix WinCairo build failure
85         https://bugs.webkit.org/show_bug.cgi?id=185218
86
87         * platform/text/win/LocaleWin.cpp:
88         (WebCore::LocaleWin::getLocaleInfoString):
89
90 2018-05-03  Filip Pizlo  <fpizlo@apple.com>
91
92         Strings should not be allocated in a gigacage
93         https://bugs.webkit.org/show_bug.cgi?id=185218
94
95         Reviewed by Saam Barati.
96
97         No new tests because no new behavior.
98
99         * Modules/indexeddb/server/IDBSerialization.cpp:
100         (WebCore::decodeKey):
101         * bindings/js/SerializedScriptValue.cpp:
102         (WebCore::CloneDeserializer::readString):
103         * html/canvas/CanvasRenderingContext2D.cpp:
104         (WebCore::normalizeSpaces):
105         * html/parser/HTMLTreeBuilder.cpp:
106         (WebCore::HTMLTreeBuilder::ExternalCharacterTokenBuffer::takeRemainingWhitespace):
107         * platform/URLParser.cpp:
108         (WebCore::percentEncodeByte):
109         (WebCore::serializeURLEncodedForm):
110         (WebCore::URLParser::serialize):
111         * platform/URLParser.h:
112         * platform/graphics/FourCC.cpp:
113         (WebCore::FourCC::toString const):
114         * platform/graphics/ca/GraphicsLayerCA.cpp:
115         (WebCore::GraphicsLayerCA::ReplicaState::cloneID const):
116         * platform/text/LocaleICU.cpp:
117         (WebCore::LocaleICU::decimalSymbol):
118         (WebCore::LocaleICU::decimalTextAttribute):
119         (WebCore::getDateFormatPattern):
120         (WebCore::LocaleICU::createLabelVector):
121         (WebCore::getFormatForSkeleton):
122         * platform/win/FileSystemWin.cpp:
123         (WebCore::FileSystem::getFinalPathName):
124         (WebCore::FileSystem::pathByAppendingComponent):
125         (WebCore::FileSystem::storageDirectory):
126
127 2018-05-02  Brent Fulgham  <bfulgham@apple.com>
128
129         Widgets should hold a WeakPtr to their parents
130         https://bugs.webkit.org/show_bug.cgi?id=185239
131         <rdar://problem/39741250>
132
133         Reviewed by Zalan Bujtas.
134
135         * platform/ScrollView.h:
136         (WebCore::ScrollView::weakPtrFactory): Added.
137         * platform/Widget.cpp:
138         (WebCore::Widget::init): Don't perform an unnecessary assignment.
139         (WebCore::Widget::setParent): Grab a WeakPtr to the parent ScrollView.
140         * platform/Widget.h:
141         (WebCore::Widget::parent const): Change type to a WeakPtr.
142
143 2018-05-03  Yusuke Suzuki  <utatane.tea@gmail.com>
144
145         Use pointer instead of std::optional<T&>
146         https://bugs.webkit.org/show_bug.cgi?id=185186
147
148         Reviewed by Alex Christensen.
149
150         std::optional<T&> is not accepted in C++17 spec.
151         In this patch, we replace it with T*, which is well-aligned to
152         WebKit's convention.
153
154         * Modules/mediastream/RTCPeerConnection.cpp:
155         (WebCore::iceServersFromConfiguration):
156         (WebCore::RTCPeerConnection::initializeConfiguration):
157         (WebCore::RTCPeerConnection::setConfiguration):
158         * css/parser/CSSParser.cpp:
159         (WebCore::CSSParser::parseSystemColor):
160         * css/parser/CSSParser.h:
161         * dom/DatasetDOMStringMap.cpp:
162         (WebCore::DatasetDOMStringMap::item const):
163         (WebCore::DatasetDOMStringMap::namedItem const):
164         (WebCore:: const): Deleted.
165         * dom/DatasetDOMStringMap.h:
166         * dom/Element.cpp:
167         (WebCore::Element::insertAdjacentHTML):
168         * dom/Element.h:
169         * html/canvas/CanvasStyle.cpp:
170         (WebCore::parseColor):
171         * inspector/DOMEditor.cpp:
172         * platform/network/curl/CurlFormDataStream.cpp:
173         (WebCore::CurlFormDataStream::getPostData):
174         (): Deleted.
175         * platform/network/curl/CurlFormDataStream.h:
176         * platform/network/curl/CurlRequest.cpp:
177         (WebCore::CurlRequest::setupPOST):
178         * testing/MockCDMFactory.cpp:
179         (WebCore::MockCDMFactory::keysForSessionWithID const):
180         (WebCore::MockCDMInstance::updateLicense):
181         (WebCore:: const): Deleted.
182         * testing/MockCDMFactory.h:
183
184 2018-05-03  Chris Dumez  <cdumez@apple.com>
185
186         Stop using an iframe's id as fallback if its name attribute is not set
187         https://bugs.webkit.org/show_bug.cgi?id=11388
188
189         Reviewed by Geoff Garen.
190
191         WebKit had logic to use an iframe's id as fallback name when its name
192         content attribute is not set. This behavior was not standard and did not
193         match other browsers:
194         - https://html.spec.whatwg.org/#attr-iframe-name
195
196         Gecko / Trident never behaved this way. Blink was aligned with us until
197         they started to match the specification in:
198         - https://bugs.chromium.org/p/chromium/issues/detail?id=347169
199
200         This WebKit quirk was causing some Web-compatibility issues because it
201         would affect the behavior of Window's name property getter when trying
202         to look up an iframe by id. Because of Window's named property getter
203         behavior [1], we would return the frame's contentWindow instead of the
204         iframe element itself.
205
206         [1] https://html.spec.whatwg.org/multipage/window-object.html#named-access-on-the-window-object
207
208         Test: fast/dom/Window/named-getter-frame-id.html
209
210         * html/HTMLFrameElementBase.cpp:
211         (WebCore::HTMLFrameElementBase::openURL):
212         (WebCore::HTMLFrameElementBase::parseAttribute):
213         (WebCore::HTMLFrameElementBase::didFinishInsertingNode):
214         * html/HTMLFrameElementBase.h:
215
216 2018-05-03  Eric Carlson  <eric.carlson@apple.com>
217
218         [iOS] Internal text and audio tracks not in fullscreen menu
219         https://bugs.webkit.org/show_bug.cgi?id=185268
220         <rdar://problem/38673440>
221
222         Reviewed by Jer Noble.
223
224         * platform/cocoa/PlaybackSessionModelMediaElement.mm:
225         (WebCore::PlaybackSessionModelMediaElement::setMediaElement): 'addtrack' and 'removetrack'
226         events are fired at the track lists, not the media element.
227
228 2018-05-03  Ryosuke Niwa  <rniwa@webkit.org>
229
230         Using image map inside a shadow tree results hits a release assert in DocumentOrderedMap::add
231         https://bugs.webkit.org/show_bug.cgi?id=185238
232
233         Reviewed by Antti Koivisto.
234
235         The bug was caused by DocumentOrderedMap for the image elements with usemap being stored in Document
236         even if those image elements were in a shadow tree. Fixed the bug by moving the map to TreeScope.
237
238         Test: fast/images/imagemap-in-nested-shadow-tree.html
239               fast/images/imagemap-in-shadow-tree.html
240
241         * dom/Document.cpp:
242         (WebCore::Document::addImageElementByUsemap): Moved to TreeScope.
243         (WebCore::Document::removeImageElementByUsemap): Ditto.
244         (WebCore::Document::imageElementByUsemap const): Ditto.
245         * dom/Document.h:
246         * dom/TreeScope.cpp:
247         (WebCore::TreeScope::destroyTreeScopeData): Clear m_imagesByUsemap as well as m_elementsByName.
248         (WebCore::TreeScope::getImageMap const): Removed the code to parse usemap. RenderImage::imageMap()
249         which used to call this function with the raw value of the usemap content attribute now calls it
250         via HTMLImageElement::associatedMapElement(), which uses the parsed usemap.
251         (WebCore::TreeScope::addImageElementByUsemap): Moved from Document.
252         (WebCore::TreeScope::removeImageElementByUsemap): Ditto.
253         (WebCore::TreeScope::imageElementByUsemap const): Ditto.
254         * dom/TreeScope.h:
255         * html/HTMLImageElement.cpp:
256         (WebCore::HTMLImageElement::parseAttribute):
257         (WebCore::HTMLImageElement::insertedIntoAncestor): This image element can be associated with a map element
258         if it's connected to a document.
259         (WebCore::HTMLImageElement::removedFromAncestor):
260         (WebCore::HTMLImageElement::associatedMapElement const):
261         * html/HTMLImageElement.h:
262         * html/HTMLMapElement.cpp:
263         (WebCore::HTMLMapElement::imageElement):
264         * rendering/RenderImage.cpp:
265         (WebCore::RenderImage::imageMap const):
266
267 2018-05-03  Justin Fan  <justin_fan@apple.com>
268
269         [WebGL] Add runtime flag for enabling ASTC support in WebGL
270         https://bugs.webkit.org/show_bug.cgi?id=184840
271
272         Reviewed by Myles C. Maxfield.
273
274         Added runtime flag for ASTC support in WebGL, to turn on/off when extension is implemented.
275
276         * page/RuntimeEnabledFeatures.h:
277         (WebCore::RuntimeEnabledFeatures::setWebGLCompressedTextureASTCSupportEnabled):
278         (WebCore::RuntimeEnabledFeatures::webGLCompressedTextureASTCSupportEnabled const):
279
280 2018-05-03  Chris Nardi  <cnardi@chromium.org>
281
282         Remove [NoInterfaceObject] from DOMRectList
283         https://bugs.webkit.org/show_bug.cgi?id=185255
284
285         Reviewed by Chris Dumez.
286
287         In https://github.com/w3c/fxtf-drafts/issues/233, [NoInterfaceObject] was removed
288         from DOMRectList. Remove it from our implementation to match the spec, as well as
289         Chrome and Firefox.
290
291         Updated web platform tests IDL test for the Geometry spec.
292
293         * dom/DOMRectList.idl:
294
295 2018-05-03  Chris Dumez  <cdumez@apple.com>
296
297         REGRESSION(iOS 11.3): Crashes in TimerBase::~TimerBase() in Tencent x5gamehelper
298         https://bugs.webkit.org/show_bug.cgi?id=185073
299         <rdar://problem/39821223>
300
301         Reviewed by Alexey Proskuryakov.
302
303         The following changes were made:
304         - Make sure SocketStream callbacks are always scheduled on the right runloop:
305           WebThreadRunLoop() on WebKitLegacy iOS, loaderRunLoop() on Windows and
306           main runloop otherwise.
307         - When the SocketStream callbacks are called, unconditionally call callOnMainThreadAndWait()
308           before calling methods on the SocketStream client. Previously, this code path
309           was specific to Windows but there is no reason to have platform-specific code here.
310           callOnMainThreadAndWait() calls the function right away if we're already on the main
311           thread, which will be the case on other platform than Windows.
312
313         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
314         (WebCore::callbacksRunLoop):
315         (WebCore::callbacksRunLoopMode):
316         (WebCore::SocketStreamHandleImpl::scheduleStreams):
317         (WebCore::SocketStreamHandleImpl::pacExecutionCallback):
318         (WebCore::SocketStreamHandleImpl::executePACFileURL):
319         (WebCore::SocketStreamHandleImpl::removePACRunLoopSource):
320         (WebCore::SocketStreamHandleImpl::readStreamCallback):
321         (WebCore::SocketStreamHandleImpl::writeStreamCallback):
322         (WebCore::SocketStreamHandleImpl::platformClose):
323
324 2018-05-03  Zalan Bujtas  <zalan@apple.com>
325
326         [LFC] Enable multiple layout roots for incremental layout.
327         https://bugs.webkit.org/show_bug.cgi?id=185185
328
329         Reviewed by Antti Koivisto.
330
331         With certain type of style changes, we can stop the box invalidation at the formatting context boundary.
332         When multiple boxes need updating in different formatting contexts, instead of marking the parent containing block chain all
333         the way up to a common ancestor, we could just work with a list of layout entry points per layout frame.
334
335         * layout/FormattingState.h:
336         * layout/LayoutContext.cpp:
337         (WebCore::Layout::LayoutContext::updateLayout):
338         (WebCore::Layout::LayoutContext::addLayoutEntryPoint):
339         * layout/LayoutContext.h:
340
341 2018-05-03  Zalan Bujtas  <zalan@apple.com>
342
343         [LFC] Box invalidation logic should go to dedicated classes.
344         https://bugs.webkit.org/show_bug.cgi?id=185249
345
346         Reviewed by Antti Koivisto.
347
348         Each formatting context can initiate a different type of invalidation when
349         style attribute changes in a box.
350
351         * Sources.txt:
352         * WebCore.xcodeproj/project.pbxproj:
353         * layout/FormattingState.cpp:
354         (WebCore::Layout::FormattingState::FormattingState):
355         * layout/FormattingState.h:
356         (WebCore::Layout::FormattingState::isBlockFormattingState const):
357         (WebCore::Layout::FormattingState::isInlineFormattingState const):
358         * layout/LayoutContext.cpp:
359         (WebCore::Layout::LayoutContext::styleChanged):
360         (WebCore::Layout::LayoutContext::markNeedsUpdate):
361         * layout/LayoutContext.h:
362         * layout/blockformatting/BlockFormattingState.cpp:
363         (WebCore::Layout::BlockFormattingState::BlockFormattingState):
364         * layout/blockformatting/BlockFormattingState.h:
365         * layout/blockformatting/BlockInvalidation.cpp: Copied from Source/WebCore/layout/blockformatting/BlockFormattingState.cpp.
366         (WebCore::Layout::BlockInvalidation::invalidate):
367         * layout/blockformatting/BlockInvalidation.h: Copied from Source/WebCore/layout/inlineformatting/InlineFormattingState.h.
368         * layout/inlineformatting/InlineFormattingState.cpp:
369         (WebCore::Layout::InlineFormattingState::InlineFormattingState):
370         * layout/inlineformatting/InlineFormattingState.h:
371         * layout/inlineformatting/InlineInvalidation.cpp: Copied from Source/WebCore/layout/inlineformatting/InlineFormattingState.cpp.
372         (WebCore::Layout::InlineInvalidation::invalidate):
373         * layout/inlineformatting/InlineInvalidation.h: Copied from Source/WebCore/layout/blockformatting/BlockFormattingState.h.
374
375 2018-05-03  Michael Catanzaro  <mcatanzaro@igalia.com>
376
377         WebKit should send fake macOS user agent to docs.google.com
378         https://bugs.webkit.org/show_bug.cgi?id=185165
379
380         Reviewed by Carlos Garcia Campos.
381
382         * platform/UserAgentQuirks.cpp:
383         (WebCore::urlRequiresMacintoshPlatform):
384         (WebCore::urlRequiresLinuxDesktopPlatform):
385
386 2018-05-03  Commit Queue  <commit-queue@webkit.org>
387
388         Unreviewed, rolling out r231223 and r231288.
389         https://bugs.webkit.org/show_bug.cgi?id=185256
390
391         The change in r231223 breaks internal builds, and r231288 is a
392         dependent change. (Requested by ryanhaddad on #webkit).
393
394         Reverted changesets:
395
396         "Use default std::optional if it is provided"
397         https://bugs.webkit.org/show_bug.cgi?id=185159
398         https://trac.webkit.org/changeset/231223
399
400         "Use pointer instead of
401         std::optional<std::reference_wrapper<>>"
402         https://bugs.webkit.org/show_bug.cgi?id=185186
403         https://trac.webkit.org/changeset/231288
404
405 2018-05-03  Ryan Haddad  <ryanhaddad@apple.com>
406
407         Unreviewed, rolling out r231253.
408
409         The API test added with this change is crashing on the bots.
410
411         Reverted changeset:
412
413         "Web Inspector: opt out of process swap on navigation if a Web
414         Inspector frontend is connected"
415         https://bugs.webkit.org/show_bug.cgi?id=184861
416         https://trac.webkit.org/changeset/231253
417
418 2018-05-03  Youenn Fablet  <youenn@apple.com>
419
420         A MediaStream being played should allow removing some of its tracks
421         https://bugs.webkit.org/show_bug.cgi?id=185233
422
423         Reviewed by Eric Carlson.
424
425         Update the tracks out of the for loop.
426         Test: fast/mediastream/change-tracks-media-stream-being-played.html
427
428         * platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
429         (WebCore::updateTracksOfType):
430
431 2018-05-03  Miguel Gomez  <magomez@igalia.com>
432
433         WebCore::TextureMapperLayer object used after freed
434         https://bugs.webkit.org/show_bug.cgi?id=184729
435
436         Reviewed by Michael Catanzaro.
437
438         Replace the raw pointers with WeakPtr for effectTarget, maskLayer and replicaLayer
439         inside TextureMapperLayer.
440
441         * platform/graphics/texmap/TextureMapperLayer.cpp:
442         (WebCore::TextureMapperLayer::~TextureMapperLayer):
443         (WebCore::TextureMapperLayer::setMaskLayer):
444         (WebCore::TextureMapperLayer::setReplicaLayer):
445         * platform/graphics/texmap/TextureMapperLayer.h:
446
447 2018-05-03  Basuke Suzuki  <Basuke.Suzuki@sony.com>
448
449         [Curl] Add OpenSSL/LibreSSL multi-threading support
450         https://bugs.webkit.org/show_bug.cgi?id=185138
451
452         The older OpenSSL manual says the locking_function and threadid_function should
453         be set when use it in multi-threading environment. This applies to LibreSSL also.
454         https://www.openssl.org/docs/man1.0.2/crypto/threads.html
455
456         For unix and other similar os, the default threadId_function implementation is
457         good enough. We'll set custom callback only for Windows OS.
458
459         Note it's not required for OpenSSL 1.1.0 and after.
460         https://www.openssl.org/blog/blog/2017/02/21/threads/
461
462         Reviewed by Per Arne Vollan.
463
464         * platform/network/curl/CurlSSLHandle.cpp:
465         (WebCore::CurlSSLHandle::CurlSSLHandle):
466         (WebCore::CurlSSLHandle::ThreadSupport::ThreadSupport):
467         (WebCore::CurlSSLHandle::ThreadSupport::lockingCallback):
468         (WebCore::CurlSSLHandle::ThreadSupport::threadIdCallback):
469         * platform/network/curl/CurlSSLHandle.h:
470         (WebCore::CurlSSLHandle::ThreadSupport::setup):
471         (WebCore::CurlSSLHandle::ThreadSupport::singleton):
472         (WebCore::CurlSSLHandle::ThreadSupport::lock):
473         (WebCore::CurlSSLHandle::ThreadSupport::unlock):
474
475 2018-05-02  Ryosuke Niwa  <rniwa@webkit.org>
476
477         Remove superfluous check for a null attribute value check in Element::removeAttributeInternal
478         https://bugs.webkit.org/show_bug.cgi?id=185227
479
480         Reviewed by Chris Dumez.
481
482         Removed the check. The attribute value string can never be null.
483
484         * dom/Element.cpp:
485         (WebCore::Element::removeAttributeInternal):
486
487 2018-05-02  Zalan Bujtas  <zalan@apple.com>
488
489         [LFC] Implement LayoutContext::createDisplayBox
490         https://bugs.webkit.org/show_bug.cgi?id=185158
491
492         Reviewed by Antti Koivisto.
493
494         Now compute*() functions take both the const layout and the corresponding non-const display boxes.
495         Display boxes are owned by the LayoutContext and they don't form a tree structure (only implicitly through the layout tree).
496         (This might need to change in the future if we decide to arrange them in some sort of painting order)
497
498         * layout/FloatingContext.cpp:
499         (WebCore::Layout::FloatingContext::computePosition):
500         * layout/FloatingContext.h:
501         * layout/FormattingContext.cpp:
502         (WebCore::Layout::FormattingContext::computeStaticPosition const):
503         (WebCore::Layout::FormattingContext::computeInFlowPositionedPosition const):
504         (WebCore::Layout::FormattingContext::computeOutOfFlowPosition const):
505         (WebCore::Layout::FormattingContext::computeWidth const):
506         (WebCore::Layout::FormattingContext::computeHeight const):
507         (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
508         (WebCore::Layout::FormattingContext::computeFloatingWidth const):
509         (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
510         (WebCore::Layout::FormattingContext::computeFloatingHeight const):
511         * layout/FormattingContext.h:
512         * layout/LayoutContext.cpp:
513         (WebCore::Layout::LayoutContext::createDisplayBox):
514         * layout/LayoutContext.h:
515         (WebCore::Layout::LayoutContext::displayBoxForLayoutBox const):
516         * layout/blockformatting/BlockFormattingContext.cpp:
517         (WebCore::Layout::BlockFormattingContext::layout const):
518         (WebCore::Layout::BlockFormattingContext::computeStaticPosition const):
519         (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
520         (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
521         * layout/blockformatting/BlockFormattingContext.h:
522         * layout/displaytree/DisplayBox.h:
523         (WebCore::Display::Box::parent const): Deleted.
524         (WebCore::Display::Box::nextSibling const): Deleted.
525         (WebCore::Display::Box::previousSibling const): Deleted.
526         (WebCore::Display::Box::firstChild const): Deleted.
527         (WebCore::Display::Box::lastChild const): Deleted.
528         (WebCore::Display::Box::setParent): Deleted.
529         (WebCore::Display::Box::setNextSibling): Deleted.
530         (WebCore::Display::Box::setPreviousSibling): Deleted.
531         (WebCore::Display::Box::setFirstChild): Deleted.
532         (WebCore::Display::Box::setLastChild): Deleted.
533         (): Deleted.
534         * layout/inlineformatting/InlineFormattingContext.cpp:
535         (WebCore::Layout::InlineFormattingContext::computeInFlowWidth const):
536         (WebCore::Layout::InlineFormattingContext::computeInFlowHeight const):
537         * layout/inlineformatting/InlineFormattingContext.h:
538
539 2018-05-02  Said Abou-Hallawa  <sabouhallawa@apple.com>
540
541         Hiding then showing an <object> of type image makes the underlaying image disappear
542         https://bugs.webkit.org/show_bug.cgi?id=185216
543         <rdar://problem/39055630>
544
545         Reviewed by Youenn Fablet.
546
547         Ensure the HTMLPlugInImageElement updates the RenderImageResource of its
548         RenderImage with the CachedImage of its ImageLoader when the RenderImage
549         is recreated.
550
551         Test: fast/images/object-image-hide-show.html
552
553         * html/HTMLPlugInImageElement.cpp:
554         (WebCore::HTMLPlugInImageElement::didAttachRenderers):
555         This is very similar to what we do in HTMLImageElement::didAttachRenderers().
556
557
558 2018-05-02  Brent Fulgham  <bfulgham@apple.com>
559
560         Use RetainPtr for form input type
561         https://bugs.webkit.org/show_bug.cgi?id=185210
562         <rdar://problem/39734040>
563
564         Reviewed by Ryosuke Niwa.
565
566         Refactor our HTMLInputElement class to store its InputType member as a RefPtr.
567
568         Test: fast/forms/access-key-mutation-2.html.
569
570         * html/HTMLInputElement.cpp:
571         (WebCore::HTMLInputElement::HTMLInputElement):
572         (WebCore::HTMLInputElement::didAddUserAgentShadowRoot):
573         (WebCore::HTMLInputElement::accessKeyAction):
574         (WebCore::HTMLInputElement::parseAttribute):
575         (WebCore::HTMLInputElement::appendFormData):
576         * html/HTMLInputElement.h:
577         * html/InputType.cpp:
578         (WebCore::createInputType):
579         (WebCore::InputType::create):
580         (WebCore::InputType::createText):
581         * html/InputType.h:
582
583 2018-05-01  Yusuke Suzuki  <utatane.tea@gmail.com>
584
585         Use pointer instead of std::optional<std::reference_wrapper<>>
586         https://bugs.webkit.org/show_bug.cgi?id=185186
587
588         Reviewed by Alex Christensen.
589
590         std::optional<T&> is not accepted in C++17 spec. So we replaced it
591         with std::optional<std::reference_wrapper<T>>.
592
593         In this patch, we replace it with T*, which is well-aligned to
594         WebKit's convention.
595
596         * Modules/mediastream/RTCPeerConnection.cpp:
597         (WebCore::iceServersFromConfiguration):
598         (WebCore::RTCPeerConnection::initializeConfiguration):
599         (WebCore::RTCPeerConnection::setConfiguration):
600         * css/parser/CSSParser.cpp:
601         (WebCore::CSSParser::parseSystemColor):
602         * css/parser/CSSParser.h:
603         * dom/DatasetDOMStringMap.cpp:
604         (WebCore::DatasetDOMStringMap::item const):
605         (WebCore::DatasetDOMStringMap::namedItem const):
606         * dom/DatasetDOMStringMap.h:
607         * dom/Element.cpp:
608         (WebCore::Element::insertAdjacentHTML):
609         * dom/Element.h:
610         * html/canvas/CanvasStyle.cpp:
611         (WebCore::parseColor):
612         * inspector/DOMEditor.cpp:
613         * platform/network/curl/CurlFormDataStream.cpp:
614         (WebCore::CurlFormDataStream::getPostData):
615         * platform/network/curl/CurlFormDataStream.h:
616         * platform/network/curl/CurlRequest.cpp:
617         (WebCore::CurlRequest::setupPOST):
618         * testing/MockCDMFactory.cpp:
619         (WebCore::MockCDMFactory::keysForSessionWithID const):
620         (WebCore::MockCDMInstance::updateLicense):
621         * testing/MockCDMFactory.h:
622
623 2018-05-02  Keith Rollin  <krollin@apple.com>
624
625         Add facility for tracking times and results of page and resource loading
626         https://bugs.webkit.org/show_bug.cgi?id=184838
627         <rdar://problem/36548974>
628
629         Reviewed by Brent Fulgham.
630
631         Update FrameProgressTracker to send the necessary page load start/stop
632         signals so that we can track the entire page load at a network level.
633         Add an empty override of the pure virtual
634         LoaderStrategy::pageLoadCompleted method.
635
636         No new tests. There is no testable effect from these changes. On
637         Cocoa, measurable changes take place in another (non-WebKit) process.
638         On non-Cocoa systems, this facility is currently disabled.
639
640         * loader/FrameLoader.cpp:
641         (WebCore::FrameLoader::FrameProgressTracker::progressCompleted):
642         * loader/LoaderStrategy.h:
643
644 2018-05-02  Aditya Keerthi  <akeerthi@apple.com>
645
646         Can't copy and paste URLs that have no title into Mail (macOS)
647         https://bugs.webkit.org/show_bug.cgi?id=185205
648         <rdar://problem/36352406>
649
650         Reviewed by Tim Horton.
651
652         The pasteboardURL generated has an empty title for URLs without titles. Currently, the pasteboardURL.title is being saved to the pasteboard.
653
654         To fix the error, we check whether the title is empty and instead save the lastPathComponent to the pasteboard. This matches current behavior as the fallback title.
655
656         Augmented WebKitLegacy.ContextMenuCanCopyURL test
657
658         * platform/mac/PasteboardMac.mm:
659         (WebCore::writeURLForTypes):
660
661 2018-05-01  Ryosuke Niwa  <rniwa@webkit.org>
662
663         REGRESSION(r225868): Release assert when removing an SVGUseElement from Document::m_svgUseElements
664         https://bugs.webkit.org/show_bug.cgi?id=182188
665         <rdar://problem/36689240>
666
667         Reviewed by Antti Koivisto.
668
669         Fixed the crash by removing up the release assert.
670
671         The crash is likely caused by re-entrancy to Document::resolveStyle during SVGUseElement::updateShadowTree.
672         Because Document::resolveStyle invokes updateShadowTree on SVG use elements in Document::m_svgUseElements
673         without clearing the map, the nested call to resolveStyle ends up calling updateShadowTree() for all elements
674         in m_svgUseElements and removing them all from the map. When the stack frame eventually comes back to the outer
675         invocation of Document::resolveStyle, updateShadowTree gets invoked for the second time on SVG use elements
676         whose shadow tree had already been updated within the inner invocation to updateShadowTree, and release-asserts.
677
678         There is an alternative fix: avoid calling updateShadowTree on a svg element when shadowTreeNeedsUpdate returns
679         true on the element in resolveStyle. However, removing the release assert is a sure way to fix the crash so
680         this patch opts for that fix instead especially since we don't have any reproducible test case for this crash.
681
682         This release assertion was added in r225868 as a cautious measure to catch any use-after-frees of SVGUseElement's
683         since m_svgUseElements stored raw pointes to SVG use elements but this crash is not an indicative of any UAF,
684         and there is no evidence that r225868 has led to new UAFs even after five months.
685
686         No new tests. I couldn't find a way to trigger a nested style update inside SVGUseElement::updateShadowTree.
687
688         * dom/Document.cpp:
689         (WebCore::Document::removeSVGUseElement):
690
691 2018-05-02  Dirk Schulze  <dschulze@chromium.org>
692
693         getCharNumAtPosition should take DOMPointInit as argument
694         https://bugs.webkit.org/show_bug.cgi?id=184695
695
696         Reviewed by Antti Koivisto.
697
698         Extend existing tests for getCharNumAtPosition.
699
700         * svg/SVGTextContentElement.cpp:
701         (WebCore::SVGTextContentElement::getCharNumAtPosition):
702         * svg/SVGTextContentElement.h:
703         * svg/SVGTextContentElement.idl: Use DOMPointInit argument.
704
705 2018-05-02  Youenn Fablet  <youenn@apple.com>
706
707         Use NetworkLoadChecker for navigation loads
708         https://bugs.webkit.org/show_bug.cgi?id=184892
709         <rdar://problem/39652686>
710
711         Reviewed by Chris Dumez.
712
713         Sanitize headers according response tainting.
714         If tainting is basic, it means same origin load in which case we only filter Cookie related headers.
715         If tainting is Opaque, we filter all uncommon headers.
716         If tainting is CORS, we filter all uncommon headers except the one explicitely allowed by CORS headers.
717         Covered by updated test.
718
719         * platform/network/ResourceResponseBase.cpp:
720         (WebCore::ResourceResponseBase::sanitizeHTTPHeaderFieldsAccordingToTainting):
721         (WebCore::ResourceResponseBase::sanitizeHTTPHeaderFields):
722         * platform/network/ResourceResponseBase.h:
723
724 2018-05-02  Myles C. Maxfield  <mmaxfield@apple.com>
725
726         Collection fragment identifiers don't use PostScript names
727         https://bugs.webkit.org/show_bug.cgi?id=184624
728         <rdar://problem/39432089>
729
730         Reviewed by Simon Fraser.
731
732         In a previous version of the CSS Fonts spec, there was text saying that items in font collections
733         should be 1-indexed (so the first item would be MyFonts.ttc#1). However, this is unfortunate because
734         inserting an item into the middle of a collection would throw off all content that uses the file.
735         Instead, the spec has since changed to use PostScript names (so the content instead would say
736         MyFonts.ttc#MyFont-Regular).
737
738         Test: fast/text/font-collection.html
739
740         * css/CSSFontFaceSource.cpp:
741         (WebCore::CSSFontFaceSource::load):
742         * loader/cache/CachedFont.cpp:
743         (WebCore::CachedFont::calculateItemInCollection const):
744         (WebCore::CachedFont::ensureCustomFontData):
745         (WebCore::CachedFont::createCustomFontData):
746         (WebCore::CachedFont::calculateIndex const): Deleted.
747         * loader/cache/CachedFont.h:
748         * platform/graphics/mac/FontCustomPlatformData.cpp:
749         (WebCore::createFontCustomPlatformData):
750         * platform/graphics/mac/FontCustomPlatformData.h:
751
752 2018-05-02  Brian Burg  <bburg@apple.com>
753
754         Web Inspector: opt out of process swap on navigation if a Web Inspector frontend is connected
755         https://bugs.webkit.org/show_bug.cgi?id=184861
756         <rdar://problem/39153768>
757
758         Reviewed by Ryosuke Niwa.
759
760         Notify the client of the current connection count whenever a frontend connects or disconnects.
761
762         Covered by new API test.
763
764         * inspector/InspectorClient.h:
765         (WebCore::InspectorClient::frontendCountChanged):
766         * inspector/InspectorController.cpp:
767         (WebCore::InspectorController::connectFrontend):
768         (WebCore::InspectorController::disconnectFrontend):
769         (WebCore::InspectorController::disconnectAllFrontends):
770         * inspector/InspectorController.h:
771
772 2018-05-02  Carlos Alberto Lopez Perez  <clopez@igalia.com>
773
774         [GStreamer] Remove unneeded include of gstgldisplay_wayland.h after r228866 and r229022
775         https://bugs.webkit.org/show_bug.cgi?id=185207
776
777         Reviewed by Michael Catanzaro.
778
779         Remove unneeded include of gstgldisplay_wayland.h
780
781         No new tests, no change in behaviour.
782
783         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
784
785 2018-05-02  Chris Dumez  <cdumez@apple.com>
786
787         document.open() event listener removal is not immediate
788         https://bugs.webkit.org/show_bug.cgi?id=185191
789
790         Reviewed by Darin Adler.
791
792         We need to make sure we set the 'wasremoved' flag on RegisteredEventListeners
793         whenever they get removed from the EventListenerMap. We were doing so correctly
794         in EventListenerMap:remove() but not EventListenerMap::clear(). This patch
795         updates clear() accordingly.
796
797         The reason we need to set this flag is that RegisteredEventListeners is RefCounted
798         and EventTarget::fireEventListeners() may be currently running and calling
799         each listener one by one, holding a reference to all listener of a given event.
800
801         Test: fast/dom/Document/document-open-removes-all-listeners.html
802
803         * dom/EventListenerMap.cpp:
804         (WebCore::EventListenerMap::clear):
805
806 2018-05-02  Zalan Bujtas <zalan@apple.com>
807
808         Use WeakPtr in GridCell
809         https://bugs.webkit.org/show_bug.cgi?id=185180
810         <rdar://problem/39432165>
811
812         Reviewed by Antti Koivisto.
813
814         Since GridCell does not own the renderers, it should
815         construct weak pointers.
816
817         Unable to create a reliably reproducible test case.
818
819         * rendering/Grid.cpp:
820         (WebCore::Grid::insert):
821         (WebCore::GridIterator::nextGridItem):
822         * rendering/Grid.h:
823         * rendering/RenderGrid.cpp:
824         (WebCore::RenderGrid::firstLineBaseline const):
825
826 2018-05-02  Eric Carlson  <eric.carlson@apple.com>
827
828         [iOS] Provide audio route information when invoking AirPlay picker
829         https://bugs.webkit.org/show_bug.cgi?id=185199
830         <rdar://problem/39853103>
831
832         Reviewed by Jer Noble.
833
834         No new tests, this requires a specific hardware setup.
835
836         * dom/Document.cpp:
837         (WebCore::Document::showPlaybackTargetPicker): Pass route sharing policy and routing context UID.
838         * dom/Document.h:
839
840         * html/MediaElementSession.cpp:
841         (WebCore::MediaElementSession::showPlaybackTargetPicker): Ditto.
842
843         * loader/EmptyClients.h:
844         * page/ChromeClient.h:
845
846         * page/Page.cpp:
847         (WebCore::Page::showPlaybackTargetPicker): Ditto.
848         * page/Page.h:
849
850         * platform/audio/AudioSession.cpp:
851         (WebCore::AudioSession::routeSharingPolicy const): Empty implementation for non-iOS ports.
852         (WebCore::routingContextUID const): Ditto.
853         * platform/audio/AudioSession.h:
854
855         * platform/audio/ios/AudioSessionIOS.mm:
856         (WebCore::AudioSession::routeSharingPolicy const): Return the route sharing policy.
857         (WebCore::AudioSession::routingContextUID const): Return the route context UID.
858
859 2018-05-02  Dean Jackson  <dino@apple.com>
860
861         Draw SystemPreview badge to specification on iOS
862         https://bugs.webkit.org/show_bug.cgi?id=185203
863         <rdar://problem/39908855>
864
865         Reviewed by Tim Horton.
866
867         Use CoreImage to render a badge with a blurred background,
868         at particular sizes.
869
870         This will be tested internally while we're getting artwork
871         from WebKitAdditions.
872
873         * Configurations/WebCore.xcconfig: Link against CoreImage.
874         * rendering/RenderThemeIOS.h:
875         * rendering/RenderThemeIOS.mm:
876         (WebCore::RenderThemeIOS::paintSystemPreviewBadge): New function
877         in the iOS platform RenderTheme that draws the system preview.
878
879 2018-05-01  Brent Fulgham  <bfulgham@apple.com>
880
881         Prevent Debug ASSERT when changing forms
882         https://bugs.webkit.org/show_bug.cgi?id=185173
883         <rdar://problem/39738669>
884
885         Reviewed by Ryosuke Niwa.
886
887         Form submission could trigger a debug assertion during validation when
888         a form is changed during an input submission. Fix this by cleaning up
889         the event handling logic and make it more consistent with modern WebKit
890         coding style.
891
892         Test: fast/forms/form-submission-crash-3.html
893
894         * html/HTMLButtonElement.cpp:
895         (WebCore::HTMLButtonElement::defaultEventHandler): Make sure layout runs before
896         attempting to perform event handling.
897         * html/HTMLFormElement.cpp:
898         (WebCore::HTMLFormElement::reportValidity): Ditto.
899         (WebCore::HTMLFormElement::validateInteractively): Remove call to perform layout here,
900         since we expect this to happen earlier in the layout pass. Add an assertion that the
901         tree is not dirty.
902         * html/ImageInputType.cpp:
903         (WebCore::ImageInputType::handleDOMActivateEvent): Make sure layout runs before
904         attempting to perform event handling.
905         * html/SubmitInputType.cpp:
906         (WebCore::SubmitInputType::handleDOMActivateEvent): Ditto.
907
908 2018-05-02  Jer Noble  <jer.noble@apple.com>
909
910         Unreviewed; address review comments made before landing r231231.
911
912         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
913         (VideoFullscreenControllerContext::volume const):
914
915 2018-05-02  Jer Noble  <jer.noble@apple.com>
916
917         Pipe volume through PlaybackSessionManager/Proxy.
918         https://bugs.webkit.org/show_bug.cgi?id=185182
919
920         Reviewed by Eric Carlson.
921
922         Add support for the volume property to PlaybackSessionModel, and all its clients.
923
924         * platform/cocoa/PlaybackSessionModel.h:
925         (WebCore::PlaybackSessionModelClient::volumeChanged):
926         * platform/cocoa/PlaybackSessionModelMediaElement.h:
927         * platform/cocoa/PlaybackSessionModelMediaElement.mm:
928         (WebCore::PlaybackSessionModelMediaElement::updateForEventName):
929         (WebCore::PlaybackSessionModelMediaElement::setVolume):
930         (WebCore::PlaybackSessionModelMediaElement::volume const):
931         * platform/ios/PlaybackSessionInterfaceAVKit.h:
932         * platform/ios/PlaybackSessionInterfaceAVKit.mm:
933         (WebCore::PlaybackSessionInterfaceAVKit::volumeChanged):
934         * platform/ios/WebAVPlayerController.h:
935         * platform/ios/WebAVPlayerController.mm:
936         (-[WebAVPlayerController volume]):
937         (-[WebAVPlayerController setVolume:]):
938         (-[WebAVPlayerController volumeChanged:]):
939         (-[WebAVPlayerController resetMediaState]):
940         * platform/ios/WebVideoFullscreenControllerAVKit.mm:
941         (VideoFullscreenControllerContext::volumeChanged):
942         (VideoFullscreenControllerContext::volume const):
943         (VideoFullscreenControllerContext::setVolume):
944
945 2018-05-01  Yusuke Suzuki  <utatane.tea@gmail.com>
946
947         Unreviewed, fix build in WinCairo
948         https://bugs.webkit.org/show_bug.cgi?id=185169
949
950         * bindings/js/JSDOMWindowBase.cpp:
951         (WebCore::JSDOMWindowBase::instantiateStreaming):
952         * bindings/js/JSDOMWindowBase.h:
953
954 2018-05-01  Yusuke Suzuki  <utatane.tea@gmail.com>
955
956         Use default std::optional if it is provided
957         https://bugs.webkit.org/show_bug.cgi?id=185159
958
959         Reviewed by JF Bastien.
960
961         * Modules/mediastream/RTCPeerConnection.cpp:
962         (WebCore::iceServersFromConfiguration):
963         (WebCore::RTCPeerConnection::setConfiguration):
964         * css/parser/CSSParser.cpp:
965         (WebCore::CSSParser::parseSystemColor):
966         * css/parser/CSSParser.h:
967         * dom/DatasetDOMStringMap.cpp:
968         (WebCore::DatasetDOMStringMap::item const):
969         (WebCore::DatasetDOMStringMap::namedItem const):
970         (WebCore:: const): Deleted.
971         * dom/DatasetDOMStringMap.h:
972         * dom/Element.cpp:
973         (WebCore::Element::insertAdjacentHTML):
974         * dom/Element.h:
975         * inspector/DOMEditor.cpp:
976         * platform/network/curl/CurlFormDataStream.cpp:
977         (WebCore::CurlFormDataStream::getPostData):
978         (): Deleted.
979         * platform/network/curl/CurlFormDataStream.h:
980         * testing/MockCDMFactory.cpp:
981         (WebCore::MockCDMFactory::keysForSessionWithID const):
982         (WebCore::MockCDMInstance::updateLicense):
983         (WebCore:: const): Deleted.
984         * testing/MockCDMFactory.h:
985
986 2018-05-01  Chris Dumez  <cdumez@apple.com>
987
988         Add release assertions in CFNetwork's SocketStreamHandleImpl to help debug a threading issue
989         https://bugs.webkit.org/show_bug.cgi?id=185181
990
991         Reviewed by Geoffrey Garen.
992
993         Add release assertions in CFNetwork's SocketStreamHandleImpl to help debug a threading issue
994         on iOS WebKitLegacy (Bug 185073). It appears readStreamCallback() can get called on the UIThread,
995         which should not be possible if scheduleStreams() was called on the WebThread, as it is supposed
996         to. The new release assertion in scheduleStreams() should tell us if somebody is calling it from
997         the UIthread instead of the WebThread on iOS WebKitLegacy.
998
999         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
1000         (WebCore::SocketStreamHandleImpl::scheduleStreams):
1001         (WebCore::SocketStreamHandleImpl::readStreamCallback):
1002
1003 2018-05-01  Wenson Hsieh  <wenson_hsieh@apple.com>
1004
1005         Unreviewed, remove an unused variable in RuntimeEnabledFeatures.h
1006
1007         * page/RuntimeEnabledFeatures.h:
1008
1009 2018-05-01  Oleksandr Skachkov  <gskachkov@gmail.com>
1010
1011         Fix build error after r231194
1012         https://bugs.webkit.org/show_bug.cgi?id=185169
1013
1014         Reviewed by JF Bastien.
1015
1016         Prevent compile error in iOS Simulator debug build
1017         by tagging function
1018
1019         * bindings/js/JSDOMWindowBase.cpp:
1020         (WebCore::JSDOMWindowBase::compileStreaming):
1021         (WebCore::JSDOMWindowBase::instantiateStreaming):
1022
1023 2018-05-01  Oleksandr Skachkov  <gskachkov@gmail.com>
1024
1025         WebAssembly: add support for stream APIs - JavaScript API
1026         https://bugs.webkit.org/show_bug.cgi?id=183442
1027
1028         Reviewed by Yusuke Suzuki and JF Bastien.
1029
1030         Add WebAssembly streaming API to WebCore.
1031
1032         * Configurations/FeatureDefines.xcconfig:
1033         * bindings/js/JSDOMWindowBase.cpp:
1034         (WebCore::tryAllocate):
1035         (WebCore::isResponseCorrect):
1036         (WebCore::handleResponseOnStreamingAction):
1037         (WebCore::JSDOMWindowBase::compileStreaming):
1038         (WebCore::JSDOMWindowBase::instantiateStreaming):
1039         * bindings/js/JSDOMWindowBase.h:
1040         * bindings/js/JSRemoteDOMWindowBase.cpp:
1041         * bindings/js/JSWorkerGlobalScopeBase.cpp:
1042
1043 2018-04-30  Myles C. Maxfield  <mmaxfield@apple.com>
1044
1045         Improve the performance of FontCascadeDescription's effectiveFamilies
1046         https://bugs.webkit.org/show_bug.cgi?id=184720
1047         <rdar://problem/38970927>
1048
1049         Reviewed by Simon Fraser.
1050
1051         The page that had the performance problem renders many different Chinese characters in system-ui
1052         with only a small number of individual fonts. It turns out we were calling into the system-ui
1053         machinery for each character in order to opportunistically start loading data URLs (see also:
1054         https://bugs.webkit.org/show_bug.cgi?id=175845). These data URLS will never represent the system
1055         font, so we don't need to invoke the system-ui machinery at all.
1056
1057         This patch makes a 92x performance improvement on the associated performance test. This test is
1058         designed to test Chinese text rendered with system-ui.
1059
1060         Performance test: Layout/system-ui.html
1061
1062         * platform/graphics/FontCascadeFonts.cpp:
1063         (WebCore::opportunisticallyStartFontDataURLLoading):
1064
1065 2018-04-30  Jer Noble  <jer.noble@apple.com>
1066
1067         <img src=mp4> does not display on ios despite Accept: video/* advertisement
1068         https://bugs.webkit.org/show_bug.cgi?id=185029
1069         <rdar://problem/39771989>
1070
1071         Reviewed by Eric Carlson.
1072
1073         Returning "NO" from resourceLoader:shouldWaitForLoadingOfResource: signals that the load failed,
1074         even if the resource request is successfully fulfilled prior to the return. Always return YES in
1075         the case that loading succeeded.
1076
1077         * platform/graphics/avfoundation/objc/ImageDecoderAVFObjC.mm:
1078         (-[WebCoreSharedBufferResourceLoaderDelegate resourceLoader:shouldWaitForLoadingOfRequestedResource:]):
1079
1080 2018-04-30  Zalan Bujtas  <zalan@apple.com>
1081
1082         REGRESSION(r230914) Selecting text on this apple.com page makes it vanish
1083         https://bugs.webkit.org/show_bug.cgi?id=185142
1084         <rdar://problem/39821446>
1085
1086         Reviewed by Simon Fraser.
1087
1088         Set the overflow rect on the inline textbox when needed.
1089
1090         Test: fast/text/simple-line-layout-selection-with-overflow.html
1091
1092         * rendering/SimpleLineLayoutFunctions.cpp:
1093         (WebCore::SimpleLineLayout::initializeInlineTextBox):
1094         (WebCore::SimpleLineLayout::generateLineBoxTree):
1095         (WebCore::SimpleLineLayout::initializeInlineBox): Deleted.
1096
1097 2018-04-30  JF Bastien  <jfbastien@apple.com>
1098
1099         Use some C++17 features
1100         https://bugs.webkit.org/show_bug.cgi?id=185135
1101
1102         Reviewed by Alex Christensen.
1103
1104         As discussed here [0] let's move WebKit to a subset of C++17. We
1105         now require GCC 6 [1] which means that, according to [2] we can
1106         use the following C++17 language features (I removed some
1107         uninteresting ones):
1108
1109          - New auto rules for direct-list-initialization
1110          - static_assert with no message
1111          - typename in a template template parameter
1112          - Nested namespace definition
1113          - Attributes for namespaces and enumerators
1114          - u8 character literals
1115          - Allow constant evaluation for all non-type template arguments
1116          - Fold Expressions
1117          - Unary fold expressions and empty parameter packs
1118          - __has_include in preprocessor conditional
1119          - Differing begin and end types in range-based for
1120          - Improving std::pair and std::tuple
1121
1122         Consult the Tony Tables [3] to see before / after examples.
1123
1124         Of course we can use any library feature if we're willing to
1125         import them to WTF (and they don't require language support).
1126
1127
1128           [0]: https://lists.webkit.org/pipermail/webkit-dev/2018-March/029922.html
1129           [1]: https://trac.webkit.org/changeset/231152/webkit
1130           [2]: https://en.cppreference.com/w/cpp/compiler_support
1131           [3]: https://github.com/tvaneerd/cpp17_in_TTs/blob/master/ALL_IN_ONE.md
1132
1133         * DerivedSources.make:
1134         * platform/URLParser.cpp: work around an odd GCC 6 bug with class
1135           static value as a template parameter.
1136         (WebCore::URLParser::percentDecode):
1137         (WebCore::URLParser::domainToASCII):
1138         (WebCore::URLParser::hasForbiddenHostCodePoint):
1139         (WebCore::URLParser::parseHostAndPort):
1140         * platform/URLParser.h:
1141
1142 2018-04-30  Wenson Hsieh  <wenson_hsieh@apple.com>
1143
1144         [Extra zoom mode] Respect the existing shrink-to-fit attribute instead of using min-device-width
1145         https://bugs.webkit.org/show_bug.cgi?id=185132
1146         <rdar://problem/39834562>
1147
1148         Reviewed by Tim Horton.
1149
1150         Removes the `min-device-width` attribute added in r231095. Instead, we key this behavior off of the
1151         `shrink-to-fit` attribute introduced for multitasking on iPad, such that `shrink-to-fit=no` achieves the same
1152         behavior as `min-device-width=0` in extra zoom mode. See comments below for more detail.
1153
1154         Adjusted an existing layout test: fast/viewport/extrazoom/viewport-change-min-device-width.html.
1155
1156         * dom/ViewportArguments.cpp:
1157         (WebCore::setViewportFeature):
1158         (WebCore::operator<<):
1159         * dom/ViewportArguments.h:
1160
1161         Removes the `minDeviceWidth` viewport argument.
1162
1163         * page/RuntimeEnabledFeatures.h:
1164         (WebCore::RuntimeEnabledFeatures::setMinDeviceWidthEnabled): Deleted.
1165         (WebCore::RuntimeEnabledFeatures::minDeviceWidthEnabled const): Deleted.
1166
1167         Removes the runtime switch for `min-device-width`.
1168
1169         * page/ViewportConfiguration.cpp:
1170         (WebCore::platformDeviceWidthOverride):
1171
1172         Hard-code the override device width in extra zoom mode.
1173
1174         (WebCore::ViewportConfiguration::shouldOverrideDeviceWidthAndShrinkToFit const):
1175
1176         In extra zoom mode, override the device width only if shrink-to-fit has not been expliticly disabled, and the
1177         device width is less than the override device width.
1178
1179         (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints const):
1180         (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraintsRegardlessOfContentSize const):
1181         (WebCore::ViewportConfiguration::updateConfiguration):
1182         (WebCore::ViewportConfiguration::updateMinimumLayoutSize):
1183
1184         Do not override the minimum layout size if `shrink-to-fit` has been explicitly explicitly disabled, or if the
1185         device width is greater than the override device width.
1186
1187         (WebCore::computedMinDeviceWidth): Deleted.
1188         (WebCore::ViewportConfiguration::shouldOverrideDeviceWidthWithMinDeviceWidth const): Deleted.
1189         * page/ViewportConfiguration.h:
1190
1191 2018-04-30  Chris Nardi  <cnardi@chromium.org>
1192
1193         Serialize font-variation-settings with double-quotes per spec
1194         https://bugs.webkit.org/show_bug.cgi?id=182542
1195
1196         Reviewed by Myles C. Maxfield.
1197
1198         According to the CSSOM spec [1], all strings should be serialized with double-quotes.
1199         The axis name in font-variation-settings was previously serialized with single-quotes;
1200         change this to double-quotes to match the spec and non-WebKit browsers.
1201
1202         [1]: https://drafts.csswg.org/cssom/#common-serializing-idioms
1203
1204         Updated fast/text/variations/getComputedStyle.html to test the change.
1205
1206         * css/CSSFontVariationValue.cpp:
1207         (WebCore::CSSFontVariationValue::customCSSText const):
1208
1209 2018-04-30  Chris Dumez  <cdumez@apple.com>
1210
1211         Fix bad use of RunLoop::main().dispatch() in MessagePort::dispatchMessages()
1212         https://bugs.webkit.org/show_bug.cgi?id=185134
1213
1214         Reviewed by Geoffrey Garen.
1215
1216         Fix bad use of RunLoop::main().dispatch() in MessagePort::dispatchMessages(). This code runs on iOS WebKitLegacy
1217         and it is therefore unsafe to use RunLoop::main() here. We want to use callOnMainThread() instead to run code on
1218         the WebThread.
1219
1220         * dom/MessagePort.cpp:
1221         (WebCore::MessagePort::dispatchMessages):
1222
1223 2018-04-30  Simon Fraser  <simon.fraser@apple.com>
1224
1225         Make color-filter affect caret-color
1226         https://bugs.webkit.org/show_bug.cgi?id=185129
1227         rdar://problem/39829066
1228
1229         Reviewed by Tim Horton.
1230         
1231         Transform the colors used to compare the caret color with the background through
1232         color-filter (since we want contrasting colors after filters are applied), and
1233         transform caret-color itself.
1234
1235         Test: css3/color-filters/color-filter-caret-color.html
1236
1237         * editing/FrameSelection.cpp:
1238         (WebCore::CaretBase::paintCaret const):
1239
1240 2018-04-30  Michael Catanzaro  <mcatanzaro@igalia.com>
1241
1242         [GTK] Webkit should spoof as Safari on a Mac when on Chase.com
1243         https://bugs.webkit.org/show_bug.cgi?id=185103
1244
1245         Reviewed by Carlos Garcia Campos.
1246
1247         Send a fake user agent to chase.com to make it work.
1248
1249         * platform/UserAgentQuirks.cpp:
1250         (WebCore::urlRequiresMacintoshPlatform):
1251         (WebCore::UserAgentQuirks::stringForQuirk): Also, remove this stale comment.
1252
1253 2018-04-29  Simon Fraser  <simon.fraser@apple.com>
1254
1255         Make color-filter affect <attachment>
1256         https://bugs.webkit.org/show_bug.cgi?id=185122
1257         rdar://problem/39818763
1258
1259         Reviewed by Tim Horton.
1260         
1261         Convert the colors used to render <attachment> through color-filter, except
1262         for those parts that render over the icon (like the progress bar).
1263
1264         Not easily testable.
1265
1266         * rendering/RenderThemeMac.mm:
1267         (WebCore::titleTextColorForAttachment):
1268         (WebCore::AttachmentLayout::layOutTitle):
1269         (WebCore::AttachmentLayout::layOutSubtitle):
1270         (WebCore::paintAttachmentIconBackground):
1271         (WebCore::paintAttachmentTitleBackground):
1272         (WebCore::paintAttachmentPlaceholderBorder):
1273
1274 2018-04-28  Simon Fraser  <simon.fraser@apple.com>
1275
1276         Fix color-filter to apply to SVG colors
1277         https://bugs.webkit.org/show_bug.cgi?id=185113
1278         rdar://problem/39665082
1279
1280         Reviewed by Dean Jackson.
1281         
1282         Convert SVG colors through color-filter operations for the places in SVG
1283         that use color, namely fill and stroke, gradients, lighting colors and
1284         drop-shadow.
1285
1286         Test: css3/color-filters/svg/color-filter-inline-svg.html
1287
1288         * rendering/svg/RenderSVGResourceGradient.cpp:
1289         (WebCore::RenderSVGResourceGradient::applyResource):
1290         * rendering/svg/RenderSVGResourceGradient.h:
1291         * rendering/svg/RenderSVGResourceLinearGradient.cpp:
1292         (WebCore::RenderSVGResourceLinearGradient::buildGradient const):
1293         * rendering/svg/RenderSVGResourceLinearGradient.h:
1294         * rendering/svg/RenderSVGResourceRadialGradient.cpp:
1295         (WebCore::RenderSVGResourceRadialGradient::buildGradient const):
1296         * rendering/svg/RenderSVGResourceRadialGradient.h:
1297         * rendering/svg/RenderSVGResourceSolidColor.cpp:
1298         (WebCore::RenderSVGResourceSolidColor::applyResource):
1299         * svg/SVGFEDiffuseLightingElement.cpp:
1300         (WebCore::SVGFEDiffuseLightingElement::setFilterEffectAttribute):
1301         (WebCore::SVGFEDiffuseLightingElement::build):
1302         * svg/SVGFEDropShadowElement.cpp:
1303         (WebCore::SVGFEDropShadowElement::build):
1304         * svg/SVGFEFloodElement.cpp:
1305         (WebCore::SVGFEFloodElement::build):
1306         * svg/SVGFESpecularLightingElement.cpp:
1307         (WebCore::SVGFESpecularLightingElement::setFilterEffectAttribute):
1308         (WebCore::SVGFESpecularLightingElement::build):
1309
1310 2018-04-29  Michael Catanzaro  <mcatanzaro@igalia.com>
1311
1312         [CMake] Require GCC 6
1313         https://bugs.webkit.org/show_bug.cgi?id=184985
1314
1315         Reviewed by Alex Christensen.
1316
1317         Remove a GCC 5 fallback path. This seems to be the only such fallback path in WebKit.
1318
1319         * platform/graphics/FourCC.h:
1320         (WebCore::FourCC::FourCC):
1321
1322 2018-04-29  Zalan Bujtas  <zalan@apple.com>
1323
1324         [LFC] Implement Display::Box functions
1325         https://bugs.webkit.org/show_bug.cgi?id=185116
1326
1327         Reviewed by Antti Koivisto.
1328
1329         * layout/displaytree/DisplayBox.cpp:
1330         (WebCore::Display::Box::Box):
1331         (WebCore::Display::Box::~Box):
1332         (WebCore::Display::Box::marginBox const):
1333         (WebCore::Display::Box::borderBox const):
1334         (WebCore::Display::Box::paddingBox const):
1335         (WebCore::Display::Box::contentBox const):
1336         * layout/displaytree/DisplayBox.h:
1337         (WebCore::Display::Box::rect const):
1338         (WebCore::Display::Box::top const):
1339         (WebCore::Display::Box::left const):
1340         (WebCore::Display::Box::bottom const):
1341         (WebCore::Display::Box::right const):
1342         (WebCore::Display::Box::topLeft const):
1343         (WebCore::Display::Box::bottomRight const):
1344         (WebCore::Display::Box::size const):
1345         (WebCore::Display::Box::width const):
1346         (WebCore::Display::Box::height const):
1347         (WebCore::Display::Box::marginTop const):
1348         (WebCore::Display::Box::marginLeft const):
1349         (WebCore::Display::Box::marginBottom const):
1350         (WebCore::Display::Box::marginRight const):
1351         (WebCore::Display::Box::parent const):
1352         (WebCore::Display::Box::nextSibling const):
1353         (WebCore::Display::Box::previousSibling const):
1354         (WebCore::Display::Box::firstChild const):
1355         (WebCore::Display::Box::lastChild const):
1356         (WebCore::Display::Box::setRect):
1357         (WebCore::Display::Box::setTopLeft):
1358         (WebCore::Display::Box::setTop):
1359         (WebCore::Display::Box::setLeft):
1360         (WebCore::Display::Box::setSize):
1361         (WebCore::Display::Box::setWidth):
1362         (WebCore::Display::Box::setHeight):
1363         (WebCore::Display::Box::setMarginTop):
1364         (WebCore::Display::Box::setMarginLeft):
1365         (WebCore::Display::Box::setMarginBottom):
1366         (WebCore::Display::Box::setMarginRight):
1367         (WebCore::Display::Box::setBorderTop):
1368         (WebCore::Display::Box::setBorderLeft):
1369         (WebCore::Display::Box::setBorderBottom):
1370         (WebCore::Display::Box::setBorderRight):
1371         (WebCore::Display::Box::setPaddingTop):
1372         (WebCore::Display::Box::setPaddingLeft):
1373         (WebCore::Display::Box::setPaddingBottom):
1374         (WebCore::Display::Box::setPaddingRight):
1375         (WebCore::Display::Box::setParent):
1376         (WebCore::Display::Box::setNextSibling):
1377         (WebCore::Display::Box::setPreviousSibling):
1378         (WebCore::Display::Box::setFirstChild):
1379         (WebCore::Display::Box::setLastChild):
1380
1381 2018-04-29  Youenn Fablet  <youenn@apple.com>
1382
1383         Make RestrictedHTTPResponseAccess flag true by default
1384         https://bugs.webkit.org/show_bug.cgi?id=185089
1385
1386         Reviewed by Geoffrey Garen.
1387
1388         * page/RuntimeEnabledFeatures.h:
1389
1390 2018-04-28  Sihui Liu  <sihui_liu@apple.com>
1391
1392         [Cocoa] Set HTTPOnly flag when converting Cookie to NSHTTPCookie
1393         https://bugs.webkit.org/show_bug.cgi?id=185052
1394
1395         Reviewed by Geoffrey Garen.
1396
1397         Set HTTPOnly for NSHTTPCookie when it's converted from Cookie, so the WebKit APIs could 
1398         create NSHTTPCookie with correct HTTPOnly flag. Also, reverted the change made to operator
1399         function because we want the Cookie class to act as a wrapper for NSHTTPCookie and leverage
1400         its equal function. 
1401
1402         Modified API test: WebKit.WKHTTPCookieStoreHttpOnly
1403
1404         * platform/network/cocoa/CookieCocoa.mm:
1405         (WebCore::Cookie::operator NSHTTPCookie * const):
1406         (WebCore::Cookie::operator== const):
1407         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
1408         (WebCore::NetworkStorageSession::deleteCookie):
1409
1410 2018-04-28  Zalan Bujtas  <zalan@apple.com>
1411
1412         [LFC] Add LayoutTreeBuilder class to generate the layout tree
1413         https://bugs.webkit.org/show_bug.cgi?id=185108
1414
1415         Reviewed by Antti Koivisto.
1416
1417         This is for testing purposes.
1418
1419         * WebCore.xcodeproj/project.pbxproj:
1420         * layout/FormattingState.cpp:
1421         (WebCore::Layout::FormattingState::~FormattingState):
1422         * layout/FormattingState.h:
1423         * layout/LayoutContext.h:
1424         * layout/blockformatting/BlockFormattingState.cpp:
1425         (WebCore::Layout::BlockFormattingState::~BlockFormattingState):
1426         * layout/blockformatting/BlockFormattingState.h:
1427         * layout/inlineformatting/InlineFormattingState.cpp:
1428         (WebCore::Layout::InlineFormattingState::~InlineFormattingState):
1429         * layout/inlineformatting/InlineFormattingState.h:
1430         * layout/layouttree/LayoutBlockContainer.h:
1431         * layout/layouttree/LayoutBox.h:
1432         * layout/layouttree/LayoutContainer.h:
1433         * layout/layouttree/LayoutInlineContainer.h:
1434         * layout/layouttree/LayoutTreeBuilder.cpp: Added.
1435         (WebCore::Layout::TreeBuilder::createLayoutTree):
1436         (WebCore::Layout::TreeBuilder::createSubTree):
1437         (WebCore::Layout::outputLayoutBox):
1438         (WebCore::Layout::outputLayoutTree):
1439         (WebCore::Layout::TreeBuilder::showLayoutTree):
1440         (WebCore::Layout::printLayoutTreeForLiveDocuments):
1441         * layout/layouttree/LayoutTreeBuilder.h: Copied from Source/WebCore/layout/layouttree/LayoutBlockContainer.h.
1442         * page/mac/PageMac.mm:
1443         (WebCore::Page::platformInitialize):
1444
1445 2018-04-28  Zalan Bujtas  <zalan@apple.com>
1446
1447         [LFC] Implement BlockMarginCollapse functions.
1448         https://bugs.webkit.org/show_bug.cgi?id=185036
1449
1450         Reviewed by Antti Koivisto.
1451
1452         * layout/blockformatting/BlockMarginCollapse.cpp:
1453         (WebCore::Layout::marginValue):
1454         (WebCore::Layout::BlockMarginCollapse::BlockMarginCollapse):
1455         (WebCore::Layout::BlockMarginCollapse::marginTop const):
1456         (WebCore::Layout::BlockMarginCollapse::marginBottom const):
1457         (WebCore::Layout::BlockMarginCollapse::isMarginTopCollapsedWithSibling const):
1458         (WebCore::Layout::BlockMarginCollapse::isMarginBottomCollapsedWithSibling const):
1459         (WebCore::Layout::BlockMarginCollapse::isMarginTopCollapsedWithParent const):
1460         (WebCore::Layout::BlockMarginCollapse::isMarginBottomCollapsedWithParent const):
1461         (WebCore::Layout::BlockMarginCollapse::nonCollapsedMarginTop const):
1462         (WebCore::Layout::BlockMarginCollapse::nonCollapsedMarginBottom const):
1463         (WebCore::Layout::BlockMarginCollapse::collapsedMarginTopFromFirstChild const):
1464         (WebCore::Layout::BlockMarginCollapse::collapsedMarginBottomFromLastChild const):
1465         (WebCore::Layout::BlockMarginCollapse::hasAdjoiningMarginTopAndBottom const):
1466         * layout/blockformatting/BlockMarginCollapse.h:
1467         * layout/layouttree/LayoutBox.h:
1468         (WebCore::Layout::Box::style const):
1469
1470 2018-04-27  David Kilzer  <ddkilzer@apple.com>
1471
1472         Add logging when SpringBoard enables WebThread
1473         <https://webkit.org/b/185100>
1474         <rdar://problem/39746542>
1475
1476         Reviewed by Daniel Bates.
1477
1478         * platform/RuntimeApplicationChecks.h:
1479         (WebCore::IOSApplication::isSpringBoard): Add declaration.
1480         * platform/cocoa/RuntimeApplicationChecksCocoa.mm:
1481         (WebCore::IOSApplication::isSpringBoard): Add implementation.
1482         * platform/ios/wak/WebCoreThread.mm:
1483         (WebThreadEnable): Call RELEASE_LOG_FAULT() if this is called by
1484         SpringBoard.
1485
1486 2018-04-27  Keith Rollin  <krollin@apple.com>
1487
1488         Fix crash in DocumentLoader::startLoadingMainResource
1489         https://bugs.webkit.org/show_bug.cgi?id=185088
1490         rdar://problem/39689263
1491
1492         Reviewed by Chris Dumez.
1493
1494         Add a "protectedThis" to address a case where a deleted "this" was
1495         accessed in a RELEASE_LOG statement.
1496
1497         No new tests -- covered by existing tests, which now pass.
1498
1499         * loader/DocumentLoader.cpp:
1500         (WebCore::DocumentLoader::startLoadingMainResource):
1501
1502 2018-04-27  Simon Fraser  <simon.fraser@apple.com>
1503
1504         Implement color-filter for text stroke
1505         https://bugs.webkit.org/show_bug.cgi?id=185098
1506
1507         Reviewed by Alan Bujtas.
1508         
1509         Transform the text stroke color through color-filter.
1510
1511         Test: css3/color-filters/color-filter-text-stroke.html
1512
1513         * rendering/TextPaintStyle.cpp:
1514         (WebCore::computeTextPaintStyle):
1515
1516 2018-04-27  Simon Fraser  <simon.fraser@apple.com>
1517
1518         Implement animation for color-filter
1519         https://bugs.webkit.org/show_bug.cgi?id=185092
1520         rdar://problem/39773810
1521
1522         Reviewed by Tim Horton.
1523         
1524         Implement animation of color-filter.
1525         
1526         This requires tracking whether the color-filter function lists match for both old and new
1527         animation code paths.
1528         
1529         The filter-related ProperyWappers in CSSPropertyAnimation are cleaned up to use a single wrapper,
1530         which has to pass the propertyID to the blend function so we know which "lists match" to check.
1531         This wrapper reports that its accelerated for filter and backdrop-filter, but not color-filter.
1532
1533         Test: css3/color-filters/color-filter-animation.html
1534
1535         * animation/CSSPropertyBlendingClient.h:
1536         * animation/KeyframeEffectReadOnly.cpp:
1537         (WebCore::KeyframeEffectReadOnly::setBlendingKeyframes):
1538         (WebCore::KeyframeEffectReadOnly::checkForMatchingColorFilterFunctionLists):
1539         * animation/KeyframeEffectReadOnly.h:
1540         * page/animation/AnimationBase.h:
1541         * page/animation/CSSPropertyAnimation.cpp:
1542         (WebCore::blendFunc):
1543         (WebCore::PropertyWrapperFilter::PropertyWrapperFilter):
1544         (WebCore::CSSPropertyAnimationWrapperMap::CSSPropertyAnimationWrapperMap):
1545         (WebCore::PropertyWrapperAcceleratedFilter::PropertyWrapperAcceleratedFilter): Deleted.
1546         (WebCore::PropertyWrapperAcceleratedBackdropFilter::PropertyWrapperAcceleratedBackdropFilter): Deleted.
1547         (WebCore::PropertyWrapperAcceleratedBackdropFilter::animationIsAccelerated const): Deleted.
1548         (WebCore::PropertyWrapperAcceleratedBackdropFilter::blend const): Deleted.
1549         * page/animation/ImplicitAnimation.cpp:
1550         (WebCore::ImplicitAnimation::reset):
1551         (WebCore::ImplicitAnimation::checkForMatchingColorFilterFunctionLists):
1552         * page/animation/ImplicitAnimation.h:
1553         * page/animation/KeyframeAnimation.cpp:
1554         (WebCore::KeyframeAnimation::KeyframeAnimation):
1555         (WebCore::KeyframeAnimation::checkForMatchingColorFilterFunctionLists):
1556         * page/animation/KeyframeAnimation.h:
1557
1558 2018-04-27  Zalan Bujtas  <zalan@apple.com>
1559
1560         [LFC] Add FormattingContext::computeWidth/computeHeight logic.
1561         https://bugs.webkit.org/show_bug.cgi?id=185091
1562
1563         Reviewed by Antti Koivisto.
1564
1565         Inflow width and height can't really be computed without knowing the exact context. 
1566
1567         * layout/FormattingContext.cpp:
1568         (WebCore::Layout::FormattingContext::computeWidth const):
1569         (WebCore::Layout::FormattingContext::computeHeight const):
1570         (WebCore::Layout::FormattingContext::computeOutOfFlowWidth const):
1571         (WebCore::Layout::FormattingContext::computeFloatingWidth const):
1572         (WebCore::Layout::FormattingContext::computeOutOfFlowHeight const):
1573         (WebCore::Layout::FormattingContext::computeFloatingHeight const):
1574         * layout/FormattingContext.h:
1575         * layout/blockformatting/BlockFormattingContext.cpp:
1576         (WebCore::Layout::BlockFormattingContext::computeInFlowWidth const):
1577         (WebCore::Layout::BlockFormattingContext::computeInFlowHeight const):
1578         (WebCore::Layout::BlockFormattingContext::computeWidth const): Deleted.
1579         (WebCore::Layout::BlockFormattingContext::computeHeight const): Deleted.
1580         * layout/blockformatting/BlockFormattingContext.h:
1581         * layout/inlineformatting/InlineFormattingContext.cpp:
1582         (WebCore::Layout::InlineFormattingContext::computeInFlowWidth const):
1583         (WebCore::Layout::InlineFormattingContext::computeInFlowHeight const):
1584         * layout/inlineformatting/InlineFormattingContext.h:
1585
1586 2018-04-27  Chris Dumez  <cdumez@apple.com>
1587
1588         Use WindowProxy instead of DOMWindow in our IDL
1589         https://bugs.webkit.org/show_bug.cgi?id=185022
1590
1591         Reviewed by Sam Weinig.
1592
1593         Stop using DOMWindow in all of our IDL files and use WindowProxy as
1594         per their respective specifications. As a result, the implementation
1595         as also updated to use WindowProxy type instead of DOMWindow.
1596
1597         * WebCore.xcodeproj/project.pbxproj:
1598         * bindings/js/JSDOMConvertWindowProxy.h: Removed.
1599         * bindings/js/JSWindowProxy.cpp:
1600         (WebCore::JSWindowProxy::windowProxy const):
1601         (WebCore::JSWindowProxy::toWrapped):
1602         * bindings/js/JSWindowProxy.h:
1603         (WebCore::window):
1604         Use static_cast<>() instead of jsCast<>() because jsCast<>()
1605         relies on classInfo() which is not allowed to be called during
1606         JS sweep due to an assertion inside classInfo(). The JSWindowProxy
1607         objects are held strongly by the WindowProxy so we know the JSWindowProxy
1608         object is not getting destroyed here.
1609
1610         (WebCore::toJS):
1611         * bindings/js/WindowProxy.cpp:
1612         (WebCore::WindowProxy::globalObject):
1613         * bindings/js/WindowProxy.h:
1614         (WebCore::WindowProxy::frame const):
1615         * bindings/scripts/CodeGenerator.pm:
1616         (IsBuiltinType):
1617         (ComputeIsCallbackInterface):
1618         (ComputeIsCallbackFunction):
1619         * bindings/scripts/CodeGeneratorJS.pm:
1620         (AddToIncludesForIDLType):
1621         (GetBaseIDLType):
1622         (NativeToJSValueDOMConvertNeedsState):
1623         * bindings/scripts/test/JS/JSTestObj.cpp:
1624         (WebCore::jsTestObjPrototypeFunctionOverloadedMethod9Body):
1625         (WebCore::jsTestObjPrototypeFunctionOverloadedMethodOverloadDispatcher):
1626         * bindings/scripts/test/TestObj.idl:
1627         * dom/CompositionEvent.cpp:
1628         (WebCore::CompositionEvent::CompositionEvent):
1629         (WebCore::CompositionEvent::initCompositionEvent):
1630         * dom/CompositionEvent.h:
1631         * dom/CompositionEvent.idl:
1632         * dom/Document.cpp:
1633         (WebCore::Document::defaultView const):
1634         * dom/Document.h:
1635         * dom/Document.idl:
1636         * dom/DocumentTouch.cpp:
1637         (WebCore::DocumentTouch::createTouch):
1638         * dom/DocumentTouch.h:
1639         * dom/DocumentTouch.idl:
1640         * dom/FocusEvent.cpp:
1641         (WebCore::FocusEvent::FocusEvent):
1642         * dom/FocusEvent.h:
1643         * dom/InputEvent.cpp:
1644         (WebCore::InputEvent::create):
1645         (WebCore::InputEvent::InputEvent):
1646         * dom/InputEvent.h:
1647         * dom/KeyboardEvent.cpp:
1648         (WebCore::KeyboardEvent::KeyboardEvent):
1649         (WebCore::KeyboardEvent::create):
1650         (WebCore::KeyboardEvent::initKeyboardEvent):
1651         (WebCore::KeyboardEvent::charCode const):
1652         * dom/KeyboardEvent.h:
1653         * dom/KeyboardEvent.idl:
1654         * dom/MessageEvent.h:
1655         * dom/MessageEvent.idl:
1656         * dom/MouseEvent.cpp:
1657         (WebCore::MouseEvent::create):
1658         (WebCore::MouseEvent::MouseEvent):
1659         (WebCore::MouseEvent::initMouseEvent):
1660         (WebCore::MouseEvent::initMouseEventQuirk):
1661         * dom/MouseEvent.h:
1662         * dom/MouseEvent.idl:
1663         * dom/MouseRelatedEvent.cpp:
1664         (WebCore::MouseRelatedEvent::MouseRelatedEvent):
1665         (WebCore::MouseRelatedEvent::init):
1666         (WebCore::MouseRelatedEvent::frameViewFromWindowProxy):
1667         (WebCore::MouseRelatedEvent::initCoordinates):
1668         (WebCore::MouseRelatedEvent::documentToAbsoluteScaleFactor const):
1669         (WebCore::MouseRelatedEvent::computePageLocation):
1670         (WebCore::MouseRelatedEvent::locationInRootViewCoordinates const):
1671         * dom/MouseRelatedEvent.h:
1672         * dom/Node.cpp:
1673         * dom/SimulatedClick.cpp:
1674         * dom/TextEvent.cpp:
1675         (WebCore::TextEvent::create):
1676         (WebCore::TextEvent::createForPlainTextPaste):
1677         (WebCore::TextEvent::createForFragmentPaste):
1678         (WebCore::TextEvent::createForDrop):
1679         (WebCore::TextEvent::createForDictation):
1680         (WebCore::TextEvent::TextEvent):
1681         (WebCore::TextEvent::initTextEvent):
1682         * dom/TextEvent.h:
1683         * dom/TextEvent.idl:
1684         * dom/TouchEvent.idl:
1685         * dom/UIEvent.cpp:
1686         (WebCore::UIEvent::UIEvent):
1687         (WebCore::UIEvent::initUIEvent):
1688         * dom/UIEvent.h:
1689         (WebCore::UIEvent::create):
1690         (WebCore::UIEvent::view const):
1691         * dom/UIEvent.idl:
1692         * dom/UIEventInit.h:
1693         * dom/UIEventInit.idl:
1694         * dom/UIEventWithKeyState.h:
1695         (WebCore::UIEventWithKeyState::UIEventWithKeyState):
1696         * dom/WheelEvent.cpp:
1697         (WebCore::WheelEvent::WheelEvent):
1698         (WebCore::WheelEvent::create):
1699         (WebCore::WheelEvent::initWebKitWheelEvent):
1700         * dom/WheelEvent.h:
1701         * dom/WheelEvent.idl:
1702         * editing/AlternativeTextController.cpp:
1703         (WebCore::AlternativeTextController::insertDictatedText):
1704         * editing/Editor.cpp:
1705         (WebCore::Editor::pasteAsPlainText):
1706         (WebCore::Editor::pasteAsFragment):
1707         (WebCore::Editor::setComposition):
1708         * html/HTMLDocument.cpp:
1709         (WebCore::HTMLDocument::namedItem):
1710         * html/HTMLDocument.h:
1711         * html/HTMLDocument.idl:
1712         * html/HTMLFrameElement.idl:
1713         * html/HTMLFrameOwnerElement.cpp:
1714         (WebCore::HTMLFrameOwnerElement::contentWindow const):
1715         * html/HTMLFrameOwnerElement.h:
1716         * html/HTMLFrameSetElement.cpp:
1717         (WebCore::HTMLFrameSetElement::namedItem):
1718         * html/HTMLFrameSetElement.h:
1719         * html/HTMLFrameSetElement.idl:
1720         * html/HTMLIFrameElement.idl:
1721         * html/ImageDocument.cpp:
1722         * page/DOMWindow.cpp:
1723         (WebCore::PostMessageTimer::PostMessageTimer):
1724         (WebCore::PostMessageTimer::event):
1725         (WebCore::DOMWindow::postMessage):
1726         * page/DragController.cpp:
1727         (WebCore::DragController::dispatchTextInputEventFor):
1728         * page/EventHandler.cpp:
1729         (WebCore::EventHandler::handleTextInputEvent):
1730
1731 2018-04-27  Nan Wang  <n_wang@apple.com>
1732
1733         AX: Accessibility needs to know which part of the content view is visible on iOS
1734         https://bugs.webkit.org/show_bug.cgi?id=185085
1735         <rdar://problem/39801363>
1736
1737         Reviewed by Chris Fleizach.
1738
1739         Exposed unobscuredContentRect() to iOS accessibility object wrapper.
1740
1741         Test: accessibility/ios-simulator/unobscured-content-rect.html
1742
1743         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
1744         (-[WebAccessibilityObjectWrapper accessibilityVisibleContentRect]):
1745
1746 2018-04-27  Simon Fraser  <simon.fraser@apple.com>
1747
1748         Refactor filter list checking code
1749         https://bugs.webkit.org/show_bug.cgi?id=185087
1750
1751         Reviewed by Alan Bujtas.
1752
1753         Deduplicate code between filter and backdrop-filter for checking whether function lists
1754         match, by making a shared function that takes a std::function.
1755         
1756         The call sites have to declare the return type (-> const FilterOperations&) to avoid std::function
1757         converting the return type into a value.
1758
1759         * animation/KeyframeEffectReadOnly.cpp:
1760         (WebCore::KeyframeEffectReadOnly::checkForMatchingFilterFunctionLists const):
1761         (WebCore::KeyframeEffectReadOnly::checkForMatchingFilterFunctionLists):
1762         (WebCore::KeyframeEffectReadOnly::checkForMatchingBackdropFilterFunctionLists):
1763         * animation/KeyframeEffectReadOnly.h:
1764         * page/animation/KeyframeAnimation.cpp:
1765         (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists const):
1766         (WebCore::KeyframeAnimation::checkForMatchingFilterFunctionLists):
1767         (WebCore::KeyframeAnimation::checkForMatchingBackdropFilterFunctionLists):
1768         * page/animation/KeyframeAnimation.h:
1769
1770 2018-04-27  Chris Dumez  <cdumez@apple.com>
1771
1772         Regression(r222392?): Events can have a negative timestamp which causes app breakage
1773         https://bugs.webkit.org/show_bug.cgi?id=185040
1774         <rdar://problem/39638051>
1775
1776         Reviewed by Wenson Hsieh.
1777
1778         The real fix is in UIKit when generating the touch timestamps. However, this patch
1779         does some hardening to make sure that Event.timestamp can never return a negative
1780         value even if something goes wrong.
1781
1782         * dom/Event.cpp:
1783         (WebCore::Event::timeStampForBindings const):
1784
1785 2018-04-27  Christopher Reid  <chris.reid@sony.com>
1786
1787         URL::appendEncodedHostName is using the deprecated uidna_IDNToASCII function
1788         https://bugs.webkit.org/show_bug.cgi?id=184836
1789
1790         Reviewed by Alex Christensen.
1791
1792         Update URL::appendEncodedHostName to use uidna_nameToASCII as done in r208902.
1793
1794         Test: LayoutTests\fast\url\url-hostname-encoding.html
1795
1796         * platform/URL.cpp:
1797
1798 2018-04-27  Youenn Fablet  <youenn@apple.com>
1799
1800         CachedRawResource is not handling incremental data computation correctly
1801         https://bugs.webkit.org/show_bug.cgi?id=184936
1802         <rdar://problem/38798141>
1803
1804         Reviewed by Darin Adler.
1805
1806         * loader/cache/CachedRawResource.cpp:
1807         (WebCore::CachedRawResource::updateBuffer): Fixing style.
1808
1809 2018-04-27  Zalan Bujtas  <zalan@apple.com>
1810
1811         [LFC] Implement BlockFormattingContext::layout logic and its dependencies
1812         https://bugs.webkit.org/show_bug.cgi?id=185024
1813
1814         Reviewed by Antti Koivisto.
1815
1816         This patch implements the logic for block formatting context according to
1817         https://www.w3.org/TR/CSS22/visuren.html#block-formatting
1818
1819         1. Traverse the tree iteratively (in post-order fashion) and compute the width/static position for the containers as
1820         we visit the descendant nodes until we hit a leaf node.
1821         2. Compute the position/geometry of the leaf node and move over to its sibling(s).
1822         3. Finalize the container's height/final position as we climb back on the tree.
1823         4. Run layout on the out-of-flow descendants.  
1824
1825         Note that subtrees with a formatting context root need to be laid out completely before moving on to the next box.
1826         The formatting root box is laid out in the formatting context it lives in, however its descendants get laid out
1827         in a separate formatting context (excluding out-of-flow boxes that don't belong to the root). 
1828
1829         * layout/FloatingContext.cpp:
1830         (WebCore::Layout::FloatingContext::FloatingContext):
1831         (WebCore::Layout::FloatingContext::computePosition):
1832         * layout/FormattingContext.cpp:
1833         (WebCore::Layout::FormattingContext::placeInFlowPositionedChildren const):
1834         (WebCore::Layout::FormattingContext::layoutOutOfFlowDescendants const):
1835         * layout/FormattingContext.h:
1836         * layout/LayoutContext.cpp:
1837         (WebCore::Layout::LayoutContext::updateLayout):
1838         (WebCore::Layout::LayoutContext::establishedFormattingState):
1839         * layout/LayoutContext.h:
1840         * layout/blockformatting/BlockFormattingContext.cpp:
1841         (WebCore::Layout::BlockFormattingContext::layout const):
1842         (WebCore::Layout::BlockFormattingContext::layout): Deleted.
1843         * layout/blockformatting/BlockFormattingContext.h:
1844         * layout/inlineformatting/InlineFormattingContext.cpp:
1845         (WebCore::Layout::InlineFormattingContext::layout const):
1846         (WebCore::Layout::InlineFormattingContext::layout): Deleted.
1847         * layout/inlineformatting/InlineFormattingContext.h:
1848
1849 2018-04-27  Youenn Fablet  <youenn@apple.com>
1850
1851         Use NetworkLoadChecker for XHR/fetch loads
1852         https://bugs.webkit.org/show_bug.cgi?id=184741
1853
1854         Reviewed by Chris Dumez.
1855
1856         Covered by existing tests.
1857
1858         * loader/DocumentThreadableLoader.cpp:
1859         (WebCore::DocumentThreadableLoader::shouldSetHTTPHeadersToKeep const):
1860         We need to set this option for CORS done in NetworkProcess.
1861         (WebCore::DocumentThreadableLoader::DocumentThreadableLoader):
1862         Set httpHeadersTokeep when needed (service worker or CORS loads).
1863         Remove the synchronous disabling of preflight since this is now also done for asynchronous loads.
1864         (WebCore::DocumentThreadableLoader::checkURLSchemeAsCORSEnabled):
1865         Helper routine to make the same check for both simple and preflight case.
1866         This allows more consistent error logging between WK1 and WK2.
1867         (WebCore::DocumentThreadableLoader::makeCrossOriginAccessRequest):
1868         Skip preflight in case this is done in NetworkProcess.
1869         (WebCore::DocumentThreadableLoader::makeSimpleCrossOriginAccessRequest):
1870         (WebCore::isResponseComingFromNetworkProcess):
1871         (WebCore::DocumentThreadableLoader::redirectReceived):
1872         Bypass security checks when they are already done in NetworkProcess.
1873         (WebCore::DocumentThreadableLoader::didFail):
1874         In case of AccessControl error, it might be due to a CSP check done in NetworkProcess.
1875         Check it again to enable specific CSP console logging and error reporting.
1876         (WebCore::DocumentThreadableLoader::loadRequest):
1877         Recreating the error in case of synchronous loads to be able to log it adequately.
1878         (WebCore::DocumentThreadableLoader::isDoingSecurityChecksInNetworkProcess const):
1879         * loader/DocumentThreadableLoader.h:
1880         * loader/SubresourceLoader.cpp:
1881         (WebCore::SubresourceLoader::checkResponseCrossOriginAccessControl):
1882         Specific handling of SameOrigin credential mode for which cross-origin load will not use any credential.
1883         (WebCore::SubresourceLoader::checkRedirectionCrossOriginAccessControl):
1884         We keep the application headers so that DocumentThreadableLoader does not have to restart a brand new load.
1885         * loader/cache/CachedResourceLoader.cpp:
1886         (WebCore::CachedResourceLoader::requestResource):
1887         DocumentThreadableLoader is setting referrer and origin directly. Until we fix that, we remove them from the original requests
1888         as applications are not supposed to set these headers.
1889
1890 2018-04-27  Wenson Hsieh  <wenson_hsieh@apple.com>
1891
1892         Add an experimental feature flag for viewport "min-device-width"
1893         https://bugs.webkit.org/show_bug.cgi?id=185050
1894         <rdar://problem/39624038>
1895
1896         Reviewed by Tim Horton.
1897
1898         Add MinDeviceWidthEnabled as a new runtime-enabled feature.
1899
1900         * dom/ViewportArguments.cpp:
1901         (WebCore::setViewportFeature):
1902
1903         Gate the parsing of "min-device-width" on the runtime-enabled feature being flipped on.
1904
1905         * page/RuntimeEnabledFeatures.h:
1906         (WebCore::RuntimeEnabledFeatures::setMinDeviceWidthEnabled):
1907         (WebCore::RuntimeEnabledFeatures::minDeviceWidthEnabled const):
1908
1909 2018-04-27  Simon Fraser  <simon.fraser@apple.com>
1910
1911         Make color-filter transform gradient colors
1912         https://bugs.webkit.org/show_bug.cgi?id=185080
1913
1914         Reviewed by Zalan Bujtas.
1915         
1916         In CSSGradientValue::computeStops(), transform the color of each gradient color
1917         stop through the color filter. Having a color filter makes the gradient uncacheable.
1918         
1919         Color filters can add alpha, so we also have to fix up CSSGradientValue::knownToBeOpaque()
1920         to take a RenderStyle and convert the colors before testing opaqueness. Clean up some related
1921         functions to take const RenderStyle&.
1922
1923         Test: css3/color-filters/color-filter-gradients.html
1924
1925         * css/CSSCrossfadeValue.cpp:
1926         (WebCore::subimageKnownToBeOpaque):
1927         * css/CSSFilterImageValue.cpp:
1928         (WebCore::CSSFilterImageValue::knownToBeOpaque const):
1929         * css/CSSFilterImageValue.h:
1930         * css/CSSGradientValue.cpp:
1931         (WebCore::CSSGradientValue::image):
1932         (WebCore::CSSGradientValue::computeStops):
1933         (WebCore::CSSGradientValue::knownToBeOpaque const):
1934         (WebCore::CSSLinearGradientValue::createGradient):
1935         (WebCore::CSSRadialGradientValue::createGradient):
1936         * css/CSSGradientValue.h:
1937         * css/CSSImageGeneratorValue.cpp:
1938         (WebCore::CSSImageGeneratorValue::knownToBeOpaque const):
1939         * css/CSSImageValue.cpp:
1940         (WebCore::CSSImageValue::knownToBeOpaque const):
1941         * css/CSSImageValue.h:
1942
1943 2018-04-26  Simon Fraser  <simon.fraser@apple.com>
1944
1945         Fix color-filter to apply to text decorations
1946         https://bugs.webkit.org/show_bug.cgi?id=185068
1947         <rdar://problem/39782136>
1948
1949         Reviewed by Alan Bujtas.
1950         
1951         Transform the colors of text shadows, and the shadows of text-decorations through
1952         the color-filter.
1953         
1954         Rather than clone the ShadowData stored on TextPainter and TextDecorationPainter
1955         (which would have awkward ownership implications) we pass the color filters through
1956         and just map the color through it before painting.
1957         
1958         Re-order the members of TextPainter a little to optimize padding.
1959         
1960         Also fix a bug where FilterOperations::transformColor() could transform an invalid
1961         color to a valid one; we never want this.
1962
1963         Tests: css3/color-filters/color-filter-text-decoration-shadow.html
1964                css3/color-filters/color-filter-text-shadow.html
1965
1966         * platform/graphics/filters/FilterOperations.cpp:
1967         (WebCore::FilterOperations::transformColor const):
1968         * rendering/InlineTextBox.cpp:
1969         (WebCore::InlineTextBox::paintMarkedTextForeground):
1970         (WebCore::InlineTextBox::paintMarkedTextDecoration):
1971         * rendering/TextDecorationPainter.cpp:
1972         (WebCore::TextDecorationPainter::paintTextDecoration):
1973         * rendering/TextDecorationPainter.h:
1974         (WebCore::TextDecorationPainter::setTextShadow):
1975         (WebCore::TextDecorationPainter::setShadowColorFilter):
1976         (WebCore::TextDecorationPainter::addTextShadow): Deleted.
1977         * rendering/TextPainter.cpp:
1978         (WebCore::ShadowApplier::ShadowApplier):
1979         (WebCore::TextPainter::paintTextWithShadows):
1980         (WebCore::TextPainter::paintTextAndEmphasisMarksIfNeeded): Simplify the logic that only paints the shadow
1981         on the first iteration.
1982         (WebCore::TextPainter::paintRange):
1983         * rendering/TextPainter.h:
1984         (WebCore::TextPainter::setShadowColorFilter):
1985         * rendering/svg/SVGInlineTextBox.cpp:
1986         (WebCore::SVGInlineTextBox::paintTextWithShadows):
1987
1988 2018-04-27  Wenson Hsieh  <wenson_hsieh@apple.com>
1989
1990         Rename minimumLayoutSize to viewLayoutSize
1991         https://bugs.webkit.org/show_bug.cgi?id=185050
1992         <rdar://problem/39624038>
1993
1994         Reviewed by Tim Horton.
1995
1996         See WebKit/ChangeLog for more information. No change in behavior.
1997
1998         * page/ViewportConfiguration.cpp:
1999         (WebCore::ViewportConfiguration::ViewportConfiguration):
2000         (WebCore::ViewportConfiguration::setViewLayoutSize):
2001
2002         Remove a FIXME comment that is addressed by this refactoring.
2003
2004         (WebCore::ViewportConfiguration::shouldOverrideDeviceWidthWithMinDeviceWidth const):
2005         (WebCore::ViewportConfiguration::initialScaleFromSize const):
2006         (WebCore::ViewportConfiguration::minimumScale const):
2007         (WebCore::ViewportConfiguration::updateMinimumLayoutSize):
2008         (WebCore::ViewportConfiguration::setMinimumLayoutSize): Deleted.
2009         * page/ViewportConfiguration.h:
2010         (WebCore::ViewportConfiguration::viewLayoutSize const):
2011         (WebCore::ViewportConfiguration::viewSize const): Deleted.
2012
2013 2018-04-27  Zalan Bujtas  <zalan@apple.com>
2014
2015         [LFC] Formatting contexts should create floating states.
2016         https://bugs.webkit.org/show_bug.cgi?id=185032
2017
2018         Reviewed by Antti Koivisto.
2019
2020         This patch implements the logic for sharing floating states across multiple formatting contexts.
2021         At this point this is mostly about inline formatting contexts. They either create a new floating state
2022         or inherit it from the parent formatting context.
2023
2024         * layout/FloatingState.cpp:
2025         (WebCore::Layout::FloatingState::FloatingState):
2026         * layout/FloatingState.h:
2027         (WebCore::Layout::FloatingState::create):
2028         * layout/FormattingContext.cpp:
2029         (WebCore::Layout::FormattingContext::FormattingContext):
2030         * layout/FormattingContext.h:
2031         (WebCore::Layout::FormattingContext::layoutContext const):
2032         * layout/FormattingState.cpp:
2033         (WebCore::Layout::FormattingState::FormattingState):
2034         * layout/FormattingState.h:
2035         (WebCore::Layout::FormattingState::floatingState const):
2036         * layout/LayoutContext.cpp:
2037         (WebCore::Layout::LayoutContext::updateLayout):
2038         (WebCore::Layout::LayoutContext::formattingStateForBox const):
2039         (WebCore::Layout::LayoutContext::establishedFormattingState):
2040         (WebCore::Layout::LayoutContext::formattingContext):
2041         (WebCore::Layout::LayoutContext::formattingState): Deleted.
2042         * layout/LayoutContext.h:
2043         * layout/blockformatting/BlockFormattingContext.cpp:
2044         (WebCore::Layout::BlockFormattingContext::BlockFormattingContext):
2045         (WebCore::Layout::BlockFormattingContext::createFormattingState const):
2046         (WebCore::Layout::BlockFormattingContext::createOrFindFloatingState const):
2047         (WebCore::Layout::BlockFormattingContext::formattingState const): Deleted.
2048         * layout/blockformatting/BlockFormattingContext.h:
2049         * layout/blockformatting/BlockFormattingState.cpp:
2050         (WebCore::Layout::BlockFormattingState::BlockFormattingState):
2051         * layout/blockformatting/BlockFormattingState.h:
2052         * layout/inlineformatting/InlineFormattingContext.cpp:
2053         (WebCore::Layout::InlineFormattingContext::InlineFormattingContext):
2054         (WebCore::Layout::InlineFormattingContext::createFormattingState const):
2055         (WebCore::Layout::InlineFormattingContext::createOrFindFloatingState const):
2056         (WebCore::Layout::InlineFormattingContext::formattingState const): Deleted.
2057         * layout/inlineformatting/InlineFormattingContext.h:
2058         * layout/inlineformatting/InlineFormattingState.cpp:
2059         (WebCore::Layout::InlineFormattingState::InlineFormattingState):
2060         * layout/inlineformatting/InlineFormattingState.h:
2061         * layout/layouttree/LayoutBox.cpp:
2062         (WebCore::Layout::Box::formattingContextRoot const):
2063         * layout/layouttree/LayoutBox.h:
2064
2065 2018-04-27  Wenson Hsieh  <wenson_hsieh@apple.com>
2066
2067         [Extra zoom mode] Add a mechanism to override default viewport behaviors in extra zoom mode
2068         https://bugs.webkit.org/show_bug.cgi?id=185050
2069         <rdar://problem/39624038>
2070
2071         Reviewed by Tim Horton.
2072
2073         Currently, in extra zoom mode, there's no way for web pages to opt out of the default viewport behaviors
2074         (namely, laying out at a larger width and shrinking to fit) when the web view is very tall and narrow. This
2075         patch adds a new experimental viewport attribute, "min-device-width", that can be used to prevent WebKit from
2076         automatically clamping the web view width to a greater value for the device width in this scenario.
2077
2078         Note that after this patch, logic that plumbs a minimumLayoutSize from WKWebView to the viewport configuration
2079         will need to be renamed to reflect that this size is no longer the minimum layout size, but rather, the view
2080         size that is used for viewport device dimensions by default. This refactoring will be done in a followup part.
2081
2082         See per-method comments below for more detail.
2083
2084         Test: fast/viewport/extrazoom/viewport-change-min-device-width.html
2085
2086         * dom/ViewportArguments.cpp:
2087         (WebCore::setViewportFeature):
2088         (WebCore::operator<<):
2089         * dom/ViewportArguments.h:
2090
2091         Removes `m_forceHorizontalShrinkToFit` (more detail below).
2092
2093         * page/ViewportConfiguration.cpp:
2094         (WebCore::computedMinDeviceWidth):
2095         (WebCore::ViewportConfiguration::ViewportConfiguration):
2096         (WebCore::ViewportConfiguration::setMinimumLayoutSize):
2097
2098         Instead of directly setting the minimum layout size, setMinimumLayoutSize now first sets the view size (i.e. the
2099         size we use for `device-width` in the viewport meta tag), and then updates the minimum layout size.
2100
2101         (WebCore::ViewportConfiguration::shouldOverrideDeviceWidthWithMinDeviceWidth const):
2102
2103         Replaces `m_forceHorizontalShrinkToFit`. Whether or not we shrink to fit is now determined by whether the
2104         min-device-width attribute is actively clamping the width of the view.
2105
2106         (WebCore::ViewportConfiguration::shouldIgnoreHorizontalScalingConstraints const):
2107         (WebCore::ViewportConfiguration::shouldIgnoreScalingConstraintsRegardlessOfContentSize const):
2108         (WebCore::ViewportConfiguration::updateMinimumLayoutSize):
2109
2110         Computes and sets the minimum layout size using the view size, taking the minimum device width into account if
2111         needed.
2112
2113         (WebCore::ViewportConfiguration::description const):
2114         (WebCore::ViewportConfiguration::setForceHorizontalShrinkToFit): Deleted.
2115         * page/ViewportConfiguration.h:
2116
2117 2018-04-27  Zalan Bujtas  <zalan@apple.com>
2118
2119         [LFC] Formatting contexts should take const Box&
2120         https://bugs.webkit.org/show_bug.cgi?id=185031
2121
2122         Reviewed by Sam Weinig.
2123
2124         The formatting root boxes are supposed to be all const. The only reason why
2125         they are not is because WeakPtr<> does not support const objects yet.
2126         Use const_cast instead (remove it when WeakPtr<> gains const support).
2127
2128         * layout/FormattingContext.cpp:
2129         (WebCore::Layout::FormattingContext::FormattingContext):
2130         * layout/FormattingContext.h:
2131         * layout/LayoutContext.cpp:
2132         (WebCore::Layout::LayoutContext::LayoutContext):
2133         (WebCore::Layout::LayoutContext::formattingContext):
2134         * layout/LayoutContext.h:
2135         * layout/blockformatting/BlockFormattingContext.cpp:
2136         (WebCore::Layout::BlockFormattingContext::BlockFormattingContext):
2137         * layout/blockformatting/BlockFormattingContext.h:
2138         * layout/inlineformatting/InlineFormattingContext.cpp:
2139         (WebCore::Layout::InlineFormattingContext::InlineFormattingContext):
2140         * layout/inlineformatting/InlineFormattingContext.h:
2141
2142 2018-04-27  Zalan Bujtas  <zalan@apple.com>
2143
2144         [LFC] Add layout tree iterators.
2145         https://bugs.webkit.org/show_bug.cgi?id=185058
2146
2147         Reviewed by Antti Koivisto.
2148
2149         They work exactly like the renderer tree iterators.
2150
2151         * WebCore.xcodeproj/project.pbxproj:
2152         * layout/layouttree/LayoutAncestorIterator.h: Added.
2153         (WebCore::Layout::LayoutAncestorIterator<T>::LayoutAncestorIterator):
2154         (WebCore::Layout::LayoutAncestorIterator<T>::operator):
2155         (WebCore::Layout::LayoutAncestorIteratorAdapter<T>::LayoutAncestorIteratorAdapter):
2156         (WebCore::Layout::LayoutAncestorIteratorAdapter<T>::begin const):
2157         (WebCore::Layout::LayoutAncestorIteratorAdapter<T>::end const):
2158         (WebCore::Layout::LayoutAncestorIteratorAdapter<T>::first const):
2159         (WebCore::Layout::ancestorsOfType):
2160         (WebCore::Layout::lineageOfType):
2161         * layout/layouttree/LayoutBox.cpp:
2162         * layout/layouttree/LayoutChildIterator.h: Added.
2163         (WebCore::Layout::LayoutChildtIterator<T>::LayoutChildtIterator):
2164         (WebCore::Layout::LayoutChildtIterator<T>::operator):
2165         (WebCore::Layout::LayoutChildtIteratorAdapter<T>::LayoutChildtIteratorAdapter):
2166         (WebCore::Layout::LayoutChildtIteratorAdapter<T>::begin const):
2167         (WebCore::Layout::LayoutChildtIteratorAdapter<T>::end const):
2168         (WebCore::Layout::LayoutChildtIteratorAdapter<T>::first const):
2169         (WebCore::Layout::LayoutChildtIteratorAdapter<T>::last const):
2170         (WebCore::Layout::childrenOfType):
2171         * layout/layouttree/LayoutIterator.h: Added.
2172         (WebCore::Layout::isLayoutBoxOfType):
2173         (WebCore::Layout::Traversal::firstChild):
2174         (WebCore::Layout::Traversal::lastChild):
2175         (WebCore::Layout::Traversal::nextSibling):
2176         (WebCore::Layout::Traversal::previousSibling):
2177         (WebCore::Layout::Traversal::findAncestorOfType):
2178         (WebCore::Layout::Traversal::nextAncestorSibling):
2179         (WebCore::Layout::Traversal::nextWithin):
2180         (WebCore::Layout::Traversal::firstWithin):
2181         (WebCore::Layout::Traversal::next):
2182         (WebCore::Layout::LayoutIterator<T>::LayoutIterator):
2183         (WebCore::Layout::LayoutIterator<T>::traverseNextSibling):
2184         (WebCore::Layout::LayoutIterator<T>::traverseNext):
2185         (WebCore::Layout::LayoutIterator<T>::traversePreviousSibling):
2186         (WebCore::Layout::LayoutIterator<T>::traverseAncestor):
2187         (WebCore::Layout::LayoutIterator<T>::operator const):
2188         (WebCore::Layout:: const):
2189         (WebCore::Layout::= const):
2190
2191 2018-04-27  Commit Queue  <commit-queue@webkit.org>
2192
2193         Unreviewed, rolling out r231089.
2194         https://bugs.webkit.org/show_bug.cgi?id=185071
2195
2196         Broke and made crash some WPE EME tests (Requested by calvaris
2197         on #webkit).
2198
2199         Reverted changeset:
2200
2201         "[EME][GStreamer] Move the decryptor from AppendPipeline to
2202         PlaybackPipeline."
2203         https://bugs.webkit.org/show_bug.cgi?id=181855
2204         https://trac.webkit.org/changeset/231089
2205
2206 2018-04-27  Yacine Bandou  <yacine.bandou_ext@softathome.com>
2207
2208         [EME][GStreamer] Move the decryptor from AppendPipeline to PlaybackPipeline.
2209         https://bugs.webkit.org/show_bug.cgi?id=181855
2210
2211         Reviewed by Xabier Rodriguez-Calvar.
2212
2213         The goal of this move is to handle the limitation of SVP (Secure Video Path) memory size.
2214
2215         When the decryptor is in the AppendPipeline and we use SVP, we buffer in MediaSource queue
2216         the decrypted GstBuffers that are in SVP memory.
2217         This behavior cause an out-of-memory error, because we are limited in SVP memory size.
2218
2219         By moving the decryptor in PlaybackPipeline, we avoid to buffer the decrypted GstBuffers
2220         which use the SVP memory and we buffer the encrypted GstBuffers that are in system memory.
2221
2222         This new architecture also allows to start the buffering before obtaining the DRM license
2223         and it makes easier to manage dynamic change of the license or Key.
2224
2225         The decryptor is auto plugged by GStreamer playbin in PlaybackPipeline.
2226
2227         SVP: Secure Video Path also named trusted or protected video path, it is a memory which is
2228         protected by a hardware access control engine, it is not accessible to other unauthorised
2229         software or hardware components.
2230
2231         Tests:
2232             media/encrypted-media/clearKey/clearKey-cenc-audio-playback-mse.html
2233             media/encrypted-media/clearKey/clearKey-cenc-video-playback-mse.html
2234
2235         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
2236         (webkitMediaCommonEncryptionDecryptSinkEventHandler):
2237         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2238         (WebCore::dumpAppendState):
2239         (WebCore::AppendPipeline::AppendPipeline):
2240         (WebCore::AppendPipeline::handleNeedContextSyncMessage):
2241         (WebCore::AppendPipeline::handleAppsrcNeedDataReceived):
2242         (WebCore::AppendPipeline::setAppendState):
2243         (WebCore::AppendPipeline::parseDemuxerSrcPadCaps):
2244         (WebCore::AppendPipeline::appsinkNewSample):
2245         (WebCore::AppendPipeline::connectDemuxerSrcPadToAppsinkFromAnyThread):
2246         (WebCore::AppendPipeline::disconnectDemuxerSrcPadFromAppsinkFromAnyThread):
2247         (WebCore::appendPipelineElementMessageCallback): Deleted.
2248         (WebCore::AppendPipeline::handleElementMessage): Deleted.
2249         (WebCore::AppendPipeline::dispatchPendingDecryptionStructure): Deleted.
2250         (WebCore::AppendPipeline::dispatchDecryptionStructure): Deleted.
2251         * platform/graphics/gstreamer/mse/AppendPipeline.h:
2252         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2253         (WebCore::MediaPlayerPrivateGStreamerMSE::attemptToDecryptWithInstance):
2254         * platform/graphics/gstreamer/mse/PlaybackPipeline.cpp:
2255
2256 2018-04-27  Yacine Bandou  <yacine.bandou_ext@softathome.com>
2257
2258         [EME][GStreamer] Add a new message "decrypt-key-needed" send from the decryptor to the application.
2259         https://bugs.webkit.org/show_bug.cgi?id=181858
2260
2261         Reviewed by Xabier Rodriguez-Calvar.
2262
2263         Add a new message "decrypt-key-needed" that the decryptor can send when it doesn't have an available key.
2264         This message should be handled by the application in order to dispatch or send the key to the decryptor.
2265         This patch is a preparation for the patch 181855.
2266         With the patch 181855, the decryptor will be in the PlaybackPipeline instead of AppendPipeline, thus we can
2267         get the DRM license or key before to instantiate or load the decryptor plugin in PlaybackPipeline.
2268         When the decryptor plugin is instantiated or loaded, it should able to ask the application to resend
2269         the DRM license or key by using this new message "decrypt-key-needed".
2270
2271
2272         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2273         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2274         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
2275         (WebCore::MediaPlayerPrivateGStreamerBase::dispatchCDMInstance):
2276         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:
2277         * platform/graphics/gstreamer/eme/WebKitCommonEncryptionDecryptorGStreamer.cpp:
2278         (webkitMediaCommonEncryptionDecryptTransformInPlace):
2279
2280 2018-04-26  Justin Fan  <justin_fan@apple.com>
2281
2282         tex[Sub]Image2D slow when passing in a <canvas>, faster with ImageData.
2283         https://bugs.webkit.org/show_bug.cgi?id=184843
2284         <rdar://problem/34898868>
2285
2286         Reviewed by Simon Fraser.
2287
2288         On certain test pages passing 2d canvas objects to gl.texSubImage2D, we spend significant time doing an alpha unpremultiplication in FormatConverter::convert on a single thread. 
2289         For now, I am introducing use of the Accelerate framework to do canvas alpha unpremultiplication, specifically for RGBA8 > RGBA8.
2290         This improves this rendering path by a factor of ~4. The rest of FormatConverter could use similar improvements; filed https://bugs.webkit.org/show_bug.cgi?id=185064 for these. 
2291
2292         * platform/graphics/FormatConverter.cpp:
2293         (WebCore::FormatConverter::convert):
2294
2295 2018-04-26  Simon Fraser  <simon.fraser@apple.com>
2296
2297         Implement rendering support for the color-filter CSS property
2298         https://bugs.webkit.org/show_bug.cgi?id=185047
2299         rdar://problem/39664967
2300
2301         Reviewed by Tim Horton.
2302         
2303         The color-filter property transforms CSS colors just before painting. To support this,
2304         add to RenderStyle colorByApplyingColorFilter() and visitedDependentColorWithColorFilter().
2305         At most calls sites that transform colors for rendering, replace calls to
2306         visitedDependentColor() with visitedDependentColorWithColorFilter(). The few locations
2307         that don't use visitedDependentColor() (e.g. for shadows) call colorByApplyingColorFilter().
2308         
2309         Color transformation is implemented via a new virtual function on FilterOperation;
2310         BasicColorMatrixFilterOperation overrides this to use a new ColorMatrix class to
2311         do color math, and BasicComponentTransferFilterOperation to do the equivalent of component
2312         transfer operations. The math in both cases matches that for SVG filters, with the exception
2313         that color components are stored as floats through multiple filters and then mapped to
2314         normal 0-255 color components at the end.
2315
2316         Tests: css3/color-filters/color-filter-backgrounds-borders.html
2317                css3/color-filters/color-filter-box-shadow.html
2318                css3/color-filters/color-filter-brightness.html
2319                css3/color-filters/color-filter-color-property-list-item.html
2320                css3/color-filters/color-filter-color-property.html
2321                css3/color-filters/color-filter-color-text-decorations.html
2322                css3/color-filters/color-filter-column-rule.html
2323                css3/color-filters/color-filter-contrast.html
2324                css3/color-filters/color-filter-current-color.html
2325                css3/color-filters/color-filter-filter-list.html
2326                css3/color-filters/color-filter-grayscale.html
2327                css3/color-filters/color-filter-hue-rotate.html
2328                css3/color-filters/color-filter-inherits.html
2329                css3/color-filters/color-filter-invert.html
2330                css3/color-filters/color-filter-opacity.html
2331                css3/color-filters/color-filter-outline.html
2332                css3/color-filters/color-filter-saturate.html
2333                css3/color-filters/color-filter-sepia.html
2334                css3/color-filters/color-filter-text-emphasis.html
2335
2336         * html/HTMLTextFormControlElement.cpp:
2337         (WebCore::HTMLTextFormControlElement::adjustInnerTextStyle const):
2338         * page/FrameView.cpp:
2339         (WebCore::FrameView::documentBackgroundColor const):
2340         * platform/graphics/ColorUtilities.cpp:
2341         (WebCore::ColorMatrix::ColorMatrix):
2342         (WebCore::ColorMatrix::makeIdentity):
2343         (WebCore::ColorMatrix::grayscaleMatrix):
2344         (WebCore::ColorMatrix::saturationMatrix):
2345         (WebCore::ColorMatrix::hueRotateMatrix):
2346         (WebCore::ColorMatrix::sepiaMatrix):
2347         (WebCore::ColorMatrix::transformColorComponents const):
2348         * platform/graphics/ColorUtilities.h:
2349         * platform/graphics/filters/FilterOperation.cpp:
2350         (WebCore::BasicColorMatrixFilterOperation::transformColor const):
2351         (WebCore::BasicComponentTransferFilterOperation::transformColor const):
2352         * platform/graphics/filters/FilterOperation.h:
2353         (WebCore::FilterOperation::transformColor const):
2354         * platform/graphics/filters/FilterOperations.cpp:
2355         (WebCore::FilterOperations::transformColor const):
2356         * platform/graphics/filters/FilterOperations.h:
2357         * rendering/BorderEdge.cpp:
2358         (WebCore::BorderEdge::getBorderEdgeInfo):
2359         * rendering/EllipsisBox.cpp:
2360         (WebCore::EllipsisBox::paint):
2361         (WebCore::EllipsisBox::paintSelection):
2362         * rendering/InlineFlowBox.cpp:
2363         (WebCore::InlineFlowBox::paintBoxDecorations):
2364         * rendering/InlineTextBox.cpp:
2365         (WebCore::InlineTextBox::paintMarkedTextForeground):
2366         (WebCore::InlineTextBox::paintMarkedTextDecoration):
2367         (WebCore::InlineTextBox::paintCompositionUnderline const):
2368         * rendering/RenderBox.cpp:
2369         (WebCore::RenderBox::paintRootBoxFillLayers):
2370         (WebCore::RenderBox::paintBackground):
2371         (WebCore::RenderBox::getBackgroundPaintedExtent const):
2372         (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect const):
2373         (WebCore::RenderBox::backgroundHasOpaqueTopLayer const):
2374         * rendering/RenderBoxModelObject.cpp:
2375         (WebCore::applyBoxShadowForBackground):
2376         (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2377         (WebCore::RenderBoxModelObject::boxShadowShouldBeAppliedToBackground const):
2378         (WebCore::RenderBoxModelObject::paintBoxShadow):
2379         * rendering/RenderDetailsMarker.cpp:
2380         (WebCore::RenderDetailsMarker::paint):
2381         * rendering/RenderElement.cpp:
2382         (WebCore::RenderElement::selectionColor const):
2383         (WebCore::RenderElement::selectionBackgroundColor const):
2384         (WebCore::RenderElement::paintFocusRing):
2385         (WebCore::RenderElement::paintOutline):
2386         * rendering/RenderFileUploadControl.cpp:
2387         (WebCore::RenderFileUploadControl::paintObject):
2388         * rendering/RenderFrameSet.cpp:
2389         (WebCore::RenderFrameSet::paintColumnBorder):
2390         (WebCore::RenderFrameSet::paintRowBorder):
2391         * rendering/RenderImage.cpp:
2392         (WebCore::RenderImage::paintReplaced):
2393         (WebCore::RenderImage::paintAreaElementFocusRing):
2394         * rendering/RenderInline.cpp:
2395         (WebCore::RenderInline::paintOutline):
2396         * rendering/RenderLayerBacking.cpp:
2397         (WebCore::canDirectlyCompositeBackgroundBackgroundImage):
2398         (WebCore::RenderLayerBacking::rendererBackgroundColor const):
2399         * rendering/RenderLayerCompositor.cpp:
2400         (WebCore::RenderLayerCompositor::rootOrBodyStyleChanged):
2401         * rendering/RenderListBox.cpp:
2402         (WebCore::RenderListBox::paintItemForeground):
2403         (WebCore::RenderListBox::paintItemBackground):
2404         * rendering/RenderListMarker.cpp:
2405         (WebCore::RenderListMarker::paint):
2406         * rendering/RenderMenuList.cpp:
2407         (RenderMenuList::itemStyle const):
2408         (RenderMenuList::getItemBackgroundColor const):
2409         (RenderMenuList::menuStyle const):
2410         * rendering/RenderMultiColumnSet.cpp:
2411         (WebCore::RenderMultiColumnSet::paintColumnRules):
2412         * rendering/RenderSearchField.cpp:
2413         (WebCore::RenderSearchField::menuStyle const):
2414         * rendering/RenderTable.h:
2415         (WebCore::RenderTable::bgColor const):
2416         * rendering/RenderTableCell.cpp:
2417         (WebCore::RenderTableCell::computeCollapsedStartBorder const):
2418         (WebCore::RenderTableCell::computeCollapsedEndBorder const):
2419         (WebCore::RenderTableCell::computeCollapsedBeforeBorder const):
2420         (WebCore::RenderTableCell::computeCollapsedAfterBorder const):
2421         (WebCore::RenderTableCell::paintBackgroundsBehindCell):
2422         * rendering/RenderTableSection.cpp:
2423         (WebCore::RenderTableSection::paintRowGroupBorder):
2424         * rendering/RenderTheme.cpp:
2425         (WebCore::RenderTheme::paintSliderTicks):
2426         * rendering/TextDecorationPainter.cpp:
2427         (WebCore::decorationColor):
2428         * rendering/TextPaintStyle.cpp:
2429         (WebCore::computeTextPaintStyle):
2430         * rendering/mathml/MathOperator.cpp:
2431         (WebCore::MathOperator::paint):
2432         * rendering/mathml/RenderMathMLFraction.cpp:
2433         (WebCore::RenderMathMLFraction::paint):
2434         * rendering/mathml/RenderMathMLMenclose.cpp:
2435         (WebCore::RenderMathMLMenclose::paint):
2436         * rendering/mathml/RenderMathMLRoot.cpp:
2437         (WebCore::RenderMathMLRoot::paint):
2438         * rendering/mathml/RenderMathMLToken.cpp:
2439         (WebCore::RenderMathMLToken::paint):
2440         * rendering/style/RenderStyle.cpp:
2441         (WebCore::RenderStyle::visitedDependentColorWithColorFilter const):
2442         (WebCore::RenderStyle::colorByApplyingColorFilter const):
2443         * rendering/style/RenderStyle.h:
2444
2445 2018-04-26  Mark Lam  <mark.lam@apple.com>
2446
2447         Gardening: Speculative build fix for Windows.
2448         https://bugs.webkit.org/show_bug.cgi?id=184976
2449         <rdar://problem/39723901>
2450
2451         Not reviewed.
2452
2453         * cssjit/CSSPtrTag.h:
2454
2455 2018-04-26  Brent Fulgham  <bfulgham@apple.com>
2456
2457         Show punycode if URL contains Latin small letter o with dot below character
2458         https://bugs.webkit.org/show_bug.cgi?id=185051
2459         <rdar://problem/39459297>
2460
2461         Reviewed by David Kilzer.
2462
2463         Revise our "lookalike character" logic to include the small Latin o
2464         with dot below character.
2465
2466         Test: fast/url/host.html
2467
2468         * platform/mac/WebCoreNSURLExtras.mm:
2469         (WebCore::isLookalikeCharacter):
2470
2471 2018-04-26  Daniel Bates  <dabates@apple.com>
2472
2473         Fix the build following r231068
2474         (https://bugs.webkit.org/show_bug.cgi?id=185002)
2475
2476         Substitute mainResourceRequest.resourceRequest().url() for mainResourceRequest.url() as the
2477         latter does not exist.
2478
2479         * loader/DocumentLoader.cpp:
2480         (WebCore::DocumentLoader::loadMainResource):
2481
2482 2018-04-26  Daniel Bates  <dabates@apple.com>
2483
2484         DocumentLoader::loadMainResource() should WTFMove() the passed ResourceRequest
2485         https://bugs.webkit.org/show_bug.cgi?id=185002
2486
2487         Reviewed by Youenn Fablet and Alex Christensen.
2488
2489         In r224852 we extracted logic from DocumentLoader::startLoadingMainResource() into a new
2490         function DocumentLoader::loadMainResource() that could be shared by both DocumentLoader::startLoadingMainResource()
2491         and the service worker code. As part of this extraction, DocumentLoader::loadMainResource()
2492         takes a ResourceRequest by rvalue reference, but it never actually takes ownership of this
2493         ResourceRequest and subsequently makes a copy of it when instantiating a CachedResourceRequest.
2494         Instead we should WTFMove() the passed request into the CachedResourceRequest.
2495
2496         * loader/DocumentLoader.cpp:
2497         (WebCore::DocumentLoader::loadMainResource):
2498
2499 2018-04-26  Sihui Liu  <sihui_liu@apple.com>
2500
2501         -[WKHTTPCookieStore deleteCookie:completionHandler:] doesn't delete cookies
2502         https://bugs.webkit.org/show_bug.cgi?id=184938
2503         <rdar://problem/34737395>
2504
2505         Reviewed by Geoffrey Garen.
2506
2507         When a Cookie object was converted to NSHTTPCookie object, the HTTPOnly property information
2508         was lost so the delete function cannot find the proper cookie to delete.
2509         This patch implements a workaround that compares Cookie object instead of NSHTTPCookie 
2510         object. We might want to add the ability to set HTTPOnly header during conversion if there
2511         is an easy way to do it later.
2512         
2513         New API test: WebKit.WKHTTPCookieStoreHttpOnly
2514
2515         * platform/network/cocoa/CookieCocoa.mm:
2516         (WebCore::Cookie::operator== const):
2517         * platform/network/cocoa/NetworkStorageSessionCocoa.mm:
2518         (WebCore::NetworkStorageSession::deleteCookie):
2519
2520 2018-04-26  Commit Queue  <commit-queue@webkit.org>
2521
2522         Unreviewed, rolling out r231052.
2523         https://bugs.webkit.org/show_bug.cgi?id=185044
2524
2525         Broke test http/tests/security/credentials-main-resource.html
2526         (Requested by dydz on #webkit).
2527
2528         Reverted changeset:
2529
2530         "DocumentLoader::loadMainResource() should WTFMove() the
2531         passed ResourceRequest"
2532         https://bugs.webkit.org/show_bug.cgi?id=185002
2533         https://trac.webkit.org/changeset/231052
2534
2535 2018-04-26  Jer Noble  <jer.noble@apple.com>
2536
2537         WK_COCOA_TOUCH all the things.
2538         https://bugs.webkit.org/show_bug.cgi?id=185006
2539
2540         Reviewed by Tim Horton.
2541
2542         * Configurations/WebCore.xcconfig:
2543
2544 2018-04-26  David Kilzer  <ddkilzer@apple.com>
2545
2546         Make WAKScrollView delegate a weak property
2547         <https://webkit.org/b/184799>
2548         <rdar://problem/39469669>
2549
2550         Reviewed by Simon Fraser.
2551
2552         * platform/ios/wak/WAKScrollView.h:
2553         - Remove `delegate` instance variable declaration.
2554         - Declare `delegate` property as weak.
2555         (-[WAKScrollView setDelegate:]): Delete declaration.
2556         (-[WAKScrollView delegate]): Ditto.
2557         * platform/ios/wak/WAKScrollView.mm:
2558         - Synthesize getter/setter methods for `delegate` property.
2559         (-[WAKScrollView setDelegate:]): Delete implementation.
2560         (-[WAKScrollView delegate]): Ditto.
2561
2562 2018-04-26  Youenn Fablet  <youenn@apple.com>
2563
2564         CORS preflight checker should add a console message when preflight load is blocked
2565         https://bugs.webkit.org/show_bug.cgi?id=185021
2566
2567         Reviewed by Chris Dumez.
2568
2569         No change of behavior, adding a JS console message when preflight load is blocked.
2570         This mirrors what is being done in preflighting done from NetworkProcess.
2571         Covered by existing tests.
2572
2573         * loader/CrossOriginPreflightChecker.cpp:
2574         (WebCore::CrossOriginPreflightChecker::notifyFinished):
2575         (WebCore::CrossOriginPreflightChecker::doPreflight):
2576
2577 2018-04-26  Daniel Bates  <dabates@apple.com>
2578
2579         DocumentLoader::loadMainResource() should WTFMove() the passed ResourceRequest
2580         https://bugs.webkit.org/show_bug.cgi?id=185002
2581
2582         Reviewed by Youenn Fablet and Alex Christensen.
2583
2584         In r224852 we extracted logic from DocumentLoader::startLoadingMainResource() into a new
2585         function DocumentLoader::loadMainResource() that could be shared by both DocumentLoader::startLoadingMainResource()
2586         and the service worker code. As part of this extraction, DocumentLoader::loadMainResource()
2587         takes a ResourceRequest by rvalue reference, but it never actually takes ownership of this
2588         ResourceRequest and subsequently makes a copy of it when instantiating a CachedResourceRequest.
2589         Instead we should WTFMove() the passed request into the CachedResourceRequest.
2590
2591         * loader/DocumentLoader.cpp:
2592         (WebCore::DocumentLoader::loadMainResource):
2593
2594 2018-04-26  Per Arne Vollan  <pvollan@apple.com>
2595
2596         Disable content filtering in minimal simulator mode
2597         https://bugs.webkit.org/show_bug.cgi?id=185027
2598         <rdar://problem/39736091>
2599
2600         Reviewed by Jer Noble.
2601
2602         * Configurations/FeatureDefines.xcconfig:
2603
2604 2018-04-25  Brent Fulgham  <bfulgham@apple.com>
2605
2606         Add port 548 (afpovertcp) to port blacklist
2607         https://bugs.webkit.org/show_bug.cgi?id=185000
2608         <rdar://problem/39540481>
2609
2610         Reviewed by David Kilzer.
2611
2612         Tested by security/block-test.html.
2613
2614         * platform/URL.cpp:
2615         (WebCore::portAllowed):Also block port 548.
2616
2617 2018-04-26  Andy VanWagoner  <thetalecrafter@gmail.com>
2618
2619         [INTL] Implement Intl.PluralRules
2620         https://bugs.webkit.org/show_bug.cgi?id=184312
2621
2622         Reviewed by JF Bastien.
2623
2624         Added Intl.PluralRules feature flag.
2625
2626         Test: js/intl-pluralrules.html
2627
2628         * Configurations/FeatureDefines.xcconfig:
2629
2630 2018-04-15  Darin Adler  <darin@apple.com>
2631
2632         [Cocoa] Adopt CCRSAGetCRTComponents and stop using CCBigNum
2633         https://bugs.webkit.org/show_bug.cgi?id=184637
2634
2635         Reviewed by Alexey Proskuryakov.
2636
2637         * crypto/CommonCryptoUtilities.cpp: Compile out WebCore::CCBigNum class if
2638         HAVE(CCRSAGetCRTComponents) is true.
2639
2640         * crypto/CommonCryptoUtilities.h: Define HAVE(CCRSAGetCRTComponents) on new
2641         enough versions of iOS and macOS that have it and add declarations of the
2642         function for the non-Apple-internal-SDK case. Also don't define the
2643         WebCore::CCBigNum class if HAVE(CCRSAGetCRTComponents) is true.
2644
2645         * crypto/mac/CryptoKeyRSAMac.cpp:
2646         (WebCore::getPrivateKeyComponents): Use CCRSAGetCRTComponents if present.
2647
2648 2018-04-26  Per Arne Vollan  <pvollan@apple.com>
2649
2650         Add lazy initialization of caption display mode for videos.
2651         https://bugs.webkit.org/show_bug.cgi?id=184993
2652
2653         The call to MACaptionAppearanceGetDisplayType in CaptionUserPreferencesMediaAF::captionDisplayMode()
2654         is showing up in samples when called from HTMLMediaElement::finishInitialization().
2655
2656         Reviewed by Eric Carlson.
2657
2658         No new tests, covered by existing tests.
2659
2660         * html/HTMLMediaElement.cpp:
2661         (WebCore::HTMLMediaElement::finishInitialization):
2662         (WebCore::HTMLMediaElement::setSelectedTextTrack):
2663         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
2664         (WebCore::HTMLMediaElement::captionPreferencesChanged):
2665         (WebCore::HTMLMediaElement::captionDisplayMode):
2666         * html/HTMLMediaElement.h:
2667
2668 2018-04-26  Zan Dobersek  <zdobersek@igalia.com>
2669
2670         [GTK][WPE] Initial ASYNC_SCROLLING support
2671         https://bugs.webkit.org/show_bug.cgi?id=184961
2672
2673         Reviewed by Carlos Garcia Campos.
2674
2675         Add CoordinatedGraphics-specific code that will be required for async
2676         scrolling support. The ScrollingCoordinatorCoordinatedGraphics and
2677         ScrollingTreeCoordinatedGraphics classes are mostly complete already,
2678         but the new ScrollingTreeNode-inheriting classes will need further
2679         work that will have to be done in parallel with other improvements
2680         planned for the CoordinatedGraphics subsystem.
2681
2682         While the build-time flag is enabled, the feature is still not enabled
2683         at runtime due to being marked as unsupported by the DrawingArea
2684         implementation in the WebKit layer. It would also not work yet if it
2685         were enabled due to the before-mentioned pending changes.
2686
2687         Various build fixes that address non-Cocoa usage of ASYNC_SCROLLING
2688         code are included.
2689
2690         * Sources.txt: Add AsyncScrollingCoordinator.cpp to build.
2691         * SourcesCocoa.txt:
2692         * SourcesGTK.txt: Add new files to build.
2693         * SourcesWPE.txt: Ditto.
2694         * page/scrolling/AsyncScrollingCoordinator.cpp:
2695         Guard setStateScrollingNodeSnapOffsetsAsFloat() with CSS_SCROLL_SNAP.
2696         * page/scrolling/ScrollingTree.h:
2697         * page/scrolling/ThreadedScrollingTree.cpp:
2698         * page/scrolling/ThreadedScrollingTree.h:
2699         currentSnapPointIndicesDidChange() method is only invoked in
2700         Cocoa-specific code, and its implementation calls Cocoa-specific method
2701         on the AsyncScrollingCoordinator class.
2702         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
2703         (WebCore::ScrollingCoordinator::create):
2704         (WebCore::ScrollingCoordinatorCoordinatedGraphics::ScrollingCoordinatorCoordinatedGraphics):
2705         (WebCore::ScrollingCoordinatorCoordinatedGraphics::~ScrollingCoordinatorCoordinatedGraphics):
2706         (WebCore::ScrollingCoordinatorCoordinatedGraphics::pageDestroyed):
2707         (WebCore::ScrollingCoordinatorCoordinatedGraphics::commitTreeStateIfNeeded):
2708         (WebCore::ScrollingCoordinatorCoordinatedGraphics::handleWheelEvent):
2709         (WebCore::ScrollingCoordinatorCoordinatedGraphics::scheduleTreeStateCommit):
2710         (WebCore::ScrollingCoordinatorCoordinatedGraphics::commitTreeState):
2711         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h: Added.
2712         * page/scrolling/coordinatedgraphics/ScrollingTreeCoordinatedGraphics.cpp: Added.
2713         (WebCore::ScrollingTreeCoordinatedGraphics::create):
2714         (WebCore::ScrollingTreeCoordinatedGraphics::ScrollingTreeCoordinatedGraphics):
2715         (WebCore::ScrollingTreeCoordinatedGraphics::createScrollingTreeNode):
2716         * page/scrolling/coordinatedgraphics/ScrollingTreeCoordinatedGraphics.h: Added.
2717         * page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.cpp: Added.
2718         (WebCore::ScrollingTreeFixedNode::create):
2719         (WebCore::ScrollingTreeFixedNode::ScrollingTreeFixedNode):
2720         (WebCore::ScrollingTreeFixedNode::~ScrollingTreeFixedNode):
2721         (WebCore::ScrollingTreeFixedNode::commitStateBeforeChildren):
2722         (WebCore::ScrollingTreeFixedNode::updateLayersAfterAncestorChange):
2723         * page/scrolling/coordinatedgraphics/ScrollingTreeFixedNode.h: Added.
2724         * page/scrolling/coordinatedgraphics/ScrollingTreeFrameScrollingNodeCoordinatedGraphics.cpp: Added.
2725         (WebCore::ScrollingTreeFrameScrollingNodeCoordinatedGraphics::create):
2726         (WebCore::ScrollingTreeFrameScrollingNodeCoordinatedGraphics::ScrollingTreeFrameScrollingNodeCoordinatedGraphics):
2727         (WebCore::ScrollingTreeFrameScrollingNodeCoordinatedGraphics::handleWheelEvent):
2728         (WebCore::ScrollingTreeFrameScrollingNodeCoordinatedGraphics::scrollPosition const):
2729         (WebCore::ScrollingTreeFrameScrollingNodeCoordinatedGraphics::setScrollPosition):
2730         (WebCore::ScrollingTreeFrameScrollingNodeCoordinatedGraphics::setScrollPositionWithoutContentEdgeConstraints):
2731         (WebCore::ScrollingTreeFrameScrollingNodeCoordinatedGraphics::setScrollLayerPosition):
2732         (WebCore::ScrollingTreeFrameScrollingNodeCoordinatedGraphics::updateLayersAfterViewportChange):
2733         * page/scrolling/coordinatedgraphics/ScrollingTreeFrameScrollingNodeCoordinatedGraphics.h: Added.
2734         * page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.cpp: Added.
2735         (WebCore::ScrollingTreeStickyNode::create):
2736         (WebCore::ScrollingTreeStickyNode::ScrollingTreeStickyNode):
2737         (WebCore::ScrollingTreeStickyNode::~ScrollingTreeStickyNode):
2738         (WebCore::ScrollingTreeStickyNode::commitStateBeforeChildren):
2739         (WebCore::ScrollingTreeStickyNode::updateLayersAfterAncestorChange):
2740         * page/scrolling/coordinatedgraphics/ScrollingTreeStickyNode.h: Added.
2741         * platform/PlatformWheelEvent.h: Enable PlatformWheelEventPhase code
2742         for WPE. Guard latching-specific methods under ASYNC_SCROLLING.
2743         * platform/TextureMapper.cmake: Two build targets have been moved to
2744         SourcesGTK.txt and SourcesWPE.txt.
2745
2746 2018-04-25  Michael Catanzaro  <mcatanzaro@igalia.com>
2747
2748         [WPE] Build and link against latest WPEBackend and WPEBackend-fdo
2749         https://bugs.webkit.org/show_bug.cgi?id=184643
2750
2751         Reviewed by Žan Doberšek.
2752
2753         Adapt to single-header WPE includes.
2754
2755         * platform/graphics/egl/GLContextEGLWPE.cpp:
2756         * platform/graphics/wpe/PlatformDisplayWPE.cpp:
2757         * platform/wpe/PlatformPasteboardWPE.cpp:
2758
2759 2018-04-25  Youenn Fablet  <youenn@apple.com>
2760
2761         Use NetworkLoadChecker for all subresource loads except fetch/XHR
2762         https://bugs.webkit.org/show_bug.cgi?id=184870
2763         <rdar://problem/39370034>
2764
2765         Reviewed by Chris Dumez.
2766
2767         No change of behavior.
2768         Update CachedResourceLoader error messages to match NetworkProcess error messages.
2769
2770         * loader/cache/CachedResourceLoader.cpp:
2771         (WebCore::CachedResourceLoader::printAccessDeniedMessage const):
2772
2773 2018-04-25  Zalan Bujtas  <zalan@apple.com>
2774
2775         [LFC] Add support for is<> and downcast<>
2776         https://bugs.webkit.org/show_bug.cgi?id=185016
2777
2778         Reviewed by Antti Koivisto.
2779
2780         * layout/layouttree/LayoutBlockContainer.cpp:
2781         (WebCore::Layout::BlockContainer::BlockContainer):
2782         * layout/layouttree/LayoutBlockContainer.h:
2783         * layout/layouttree/LayoutBox.cpp:
2784         (WebCore::Layout::Box::Box):
2785         * layout/layouttree/LayoutBox.h:
2786         (WebCore::Layout::Box::isContainer const):
2787         (WebCore::Layout::Box::isBlockContainer const):
2788         (WebCore::Layout::Box::isInlineBox const):
2789         (WebCore::Layout::Box::isInlineContainer const):
2790         * layout/layouttree/LayoutContainer.cpp:
2791         (WebCore::Layout::Container::Container):
2792         * layout/layouttree/LayoutContainer.h:
2793         * layout/layouttree/LayoutInlineBox.cpp:
2794         (WebCore::Layout::InlineBox::InlineBox):
2795         * layout/layouttree/LayoutInlineBox.h:
2796         * layout/layouttree/LayoutInlineContainer.cpp:
2797         (WebCore::Layout::InlineContainer::InlineContainer):
2798         * layout/layouttree/LayoutInlineContainer.h:
2799
2800 2018-04-25  Chris Dumez  <cdumez@apple.com>
2801
2802         window.postMessage() / focus() / blur() throw a TypeError when called on a RemoteDOMWindow
2803         https://bugs.webkit.org/show_bug.cgi?id=184981
2804
2805         Reviewed by Sam Weinig.
2806
2807         window.postMessage() / focus() / blur() was throwing a TypeError when called on a RemoteDOMWindow,
2808         complaining that |this| is not a Window. This was caused by a copy & paste mistake in
2809         JSDOMWindowCustom where we were calling the JSDOMWindow methods instead of the JSRemoteDOMWindow
2810         ones.
2811
2812         No new tests, updated existing tests.
2813
2814         * bindings/js/JSDOMWindowCustom.cpp:
2815         (WebCore::jsDOMWindowGetOwnPropertySlotRestrictedAccess):
2816         * page/RemoteDOMWindow.cpp:
2817         (WebCore::RemoteDOMWindow::postMessage):
2818         * page/RemoteDOMWindow.h:
2819         * page/RemoteDOMWindow.idl:
2820
2821 2018-04-25  Simon Fraser  <simon.fraser@apple.com>
2822
2823         brightness() filter should default to 1, and not allow negative values
2824         https://bugs.webkit.org/show_bug.cgi?id=184937
2825
2826         Reviewed by Dean Jackson.
2827
2828         Remove the special-casing for brightness() in consumeFilterFunction(), so it now
2829         follows the same logic as the other color-related filters in not allowing negative
2830         values.
2831
2832         Removed the special-casing for brightness() in createFilterOperations() so its default
2833         value is now 1.
2834
2835         Modified existing tests.
2836
2837         * css/StyleResolver.cpp:
2838         (WebCore::StyleResolver::createFilterOperations):
2839         * css/parser/CSSPropertyParserHelpers.cpp:
2840         (WebCore::CSSPropertyParserHelpers::allowsValuesGreaterThanOne):
2841         (WebCore::CSSPropertyParserHelpers::consumeFilterFunction):
2842
2843 2018-04-25  Wenson Hsieh  <wenson_hsieh@apple.com>
2844
2845         Missing closing parenthesis when determining INSTALL_PATH build setting in WebCore.xcconfig
2846         https://bugs.webkit.org/show_bug.cgi?id=184999
2847
2848         Reviewed by Tim Horton.
2849
2850         Tweaks a line in WebCore.xcconfig that computes INSTALL_PATH, so that it doesn't use WK_NOT or WK_EMPTY.
2851
2852         * Configurations/WebCore.xcconfig:
2853
2854 2018-04-25  Zalan Bujtas  <zalan@apple.com>
2855
2856         [LFC] Implement LayoutContexet::layout() and its dependencies.
2857         https://bugs.webkit.org/show_bug.cgi?id=184951
2858
2859         Reviewed by Antti Koivisto.
2860
2861         * layout/FormattingContext.cpp:
2862         (WebCore::Layout::FormattingContext::FormattingContext):
2863         (WebCore::Layout::FormattingContext::~FormattingContext):
2864         (WebCore::Layout::FormattingContext::computeStaticPosition):
2865         (WebCore::Layout::FormattingContext::computeInFlowPositionedPosition):
2866         (WebCore::Layout::FormattingContext::computeOutOfFlowPosition):
2867         (WebCore::Layout::FormattingContext::computeWidth):
2868         (WebCore::Layout::FormattingContext::computeHeight):
2869         (WebCore::Layout::FormattingContext::marginTop):
2870         (WebCore::Layout::FormattingContext::marginLeft):
2871         (WebCore::Layout::FormattingContext::marginBottom):
2872         (WebCore::Layout::FormattingContext::marginRight):
2873         * layout/FormattingContext.h:
2874         * layout/FormattingState.cpp:
2875         (WebCore::Layout::FormattingState::FormattingState):
2876         * layout/FormattingState.h:
2877         * layout/LayoutContext.cpp:
2878         (WebCore::Layout::LayoutContext::LayoutContext):
2879         (WebCore::Layout::LayoutContext::updateLayout):
2880         (WebCore::Layout::LayoutContext::formattingState):
2881         (WebCore::Layout::LayoutContext::formattingContext):
2882         * layout/LayoutContext.h:
2883         * layout/blockformatting/BlockFormattingContext.cpp:
2884         (WebCore::Layout::BlockFormattingContext::BlockFormattingContext):
2885         (WebCore::Layout::BlockFormattingContext::layout):
2886         (WebCore::Layout::BlockFormattingContext::formattingState const):
2887         (WebCore::Layout::BlockFormattingContext::computeStaticPosition):
2888         (WebCore::Layout::BlockFormattingContext::computeWidth):
2889         (WebCore::Layout::BlockFormattingContext::computeHeight):
2890         (WebCore::Layout::BlockFormattingContext::marginTop):
2891         (WebCore::Layout::BlockFormattingContext::marginBottom):
2892         * layout/blockformatting/BlockFormattingContext.h:
2893         * layout/blockformatting/BlockFormattingState.cpp:
2894         (WebCore::Layout::BlockFormattingState::BlockFormattingState):
2895         * layout/blockformatting/BlockFormattingState.h:
2896         * layout/inlineformatting/InlineFormattingContext.cpp:
2897         (WebCore::Layout::InlineFormattingContext::InlineFormattingContext):
2898         (WebCore::Layout::InlineFormattingContext::layout):
2899         (WebCore::Layout::InlineFormattingContext::formattingState const):
2900         * layout/inlineformatting/InlineFormattingContext.h:
2901         * layout/inlineformatting/InlineFormattingState.cpp:
2902         (WebCore::Layout::InlineFormattingState::InlineFormattingState):
2903         * layout/inlineformatting/InlineFormattingState.h:
2904
2905 2018-04-25  Mark Lam  <mark.lam@apple.com>
2906
2907         Push the definition of PtrTag down to the WTF layer.
2908         https://bugs.webkit.org/show_bug.cgi?id=184976
2909         <rdar://problem/39723901>
2910
2911         Reviewed by Saam Barati.
2912
2913         No new tests needed.  This is covered by existing tests.
2914
2915         * cssjit/CSSPtrTag.h:
2916         * cssjit/SelectorCompiler.h:
2917         (WebCore::SelectorCompiler::ruleCollectorSimpleSelectorCheckerFunction):
2918         (WebCore::SelectorCompiler::querySelectorSimpleSelectorCheckerFunction):
2919         (WebCore::SelectorCompiler::ruleCollectorSelectorCheckerFunctionWithCheckingContext):
2920         (WebCore::SelectorCompiler::querySelectorSelectorCheckerFunctionWithCheckingContext):
2921
2922 2018-04-25  Eric Carlson  <eric.carlson@apple.com>
2923
2924         [iOS] remove media element parameter from MediaElementSession methods
2925         https://bugs.webkit.org/show_bug.cgi?id=184992
2926         <rdar://problem/39731624>
2927
2928         Reviewed by Jon Lee.
2929
2930         No new tests, no behavior change.
2931
2932         * Modules/mediacontrols/MediaControlsHost.cpp:
2933         (WebCore::MediaControlsHost::allowsInlineMediaPlayback const):
2934         (WebCore::MediaControlsHost::userGestureRequired const):
2935         * accessibility/AccessibilityMediaObject.cpp:
2936         (WebCore::AccessibilityMediaObject::isPlayingInline const):
2937         * html/HTMLMediaElement.cpp:
2938         (WebCore::HTMLMediaElement::~HTMLMediaElement):
2939         (WebCore::HTMLMediaElement::parseAttribute):
2940         (WebCore::HTMLMediaElement::prepareForLoad):
2941         (WebCore::HTMLMediaElement::selectMediaResource):
2942         (WebCore::HTMLMediaElement::loadResource):
2943         (WebCore::HTMLMediaElement::canTransitionFromAutoplayToPlay const):
2944         (WebCore::HTMLMediaElement::setReadyState):
2945         (WebCore::HTMLMediaElement::play):
2946         (WebCore::HTMLMediaElement::pause):
2947         (WebCore::HTMLMediaElement::pauseInternal):
2948         (WebCore::HTMLMediaElement::setVolume):
2949         (WebCore::HTMLMediaElement::mediaPlayerDidAddAudioTrack):
2950         (WebCore::HTMLMediaElement::sourceWasAdded):
2951         (WebCore::HTMLMediaElement::mediaEngineWasUpdated):
2952         (WebCore::HTMLMediaElement::mediaPlayerCharacteristicChanged):
2953         (WebCore::HTMLMediaElement::updatePlayState):
2954         (WebCore::HTMLMediaElement::clearMediaPlayer):
2955         (WebCore::HTMLMediaElement::resume):
2956         (WebCore::HTMLMediaElement::webkitShowPlaybackTargetPicker):
2957         (WebCore::HTMLMediaElement::addEventListener):
2958         (WebCore::HTMLMediaElement::removeEventListener):
2959         (WebCore::HTMLMediaElement::enqueuePlaybackTargetAvailabilityChangedEvent):
2960         (WebCore::HTMLMediaElement::exitFullscreen):
2961         (WebCore::HTMLMediaElement::configureMediaControls):
2962         (WebCore::HTMLMediaElement::createMediaPlayer):
2963         (WebCore::HTMLMediaElement::mediaPlayerIsFullscreenPermitted const):
2964         (WebCore::HTMLMediaElement::updateMediaState):
2965         (WebCore::HTMLMediaElement::mediaState const):
2966         (WebCore::HTMLMediaElement::allowsMediaDocumentInlinePlaybackChanged):
2967         (WebCore::HTMLMediaElement::updateShouldPlay):
2968         * html/HTMLVideoElement.cpp:
2969         (WebCore::HTMLVideoElement::parseAttribute):
2970         (WebCore::HTMLVideoElement::supportsFullscreen const):
2971         (WebCore::HTMLVideoElement::webkitEnterFullscreen):
2972         (WebCore::HTMLVideoElement::webkitWirelessVideoPlaybackDisabled const):
2973         (WebCore::HTMLVideoElement::webkitSupportsPresentationMode const):
2974         (WebCore::HTMLVideoElement::setFullscreenMode):
2975         * html/MediaElementSession.cpp:
2976         (WebCore::MediaElementSession::playbackPermitted const):
2977         (WebCore::MediaElementSession::dataLoadingPermitted const):
2978         (WebCore::MediaElementSession::fullscreenPermitted const):
2979         (WebCore::MediaElementSession::pageAllowsDataLoading const):
2980         (WebCore::MediaElementSession::pageAllowsPlaybackAfterResuming const):
2981         (WebCore::MediaElementSession::canShowControlsManager const):
2982         (WebCore::MediaElementSession::showPlaybackTargetPicker):
2983         (WebCore::MediaElementSession::hasWirelessPlaybackTargets const):
2984         (WebCore::MediaElementSession::wirelessVideoPlaybackDisabled const):
2985         (WebCore::MediaElementSession::setWirelessVideoPlaybackDisabled):
2986         (WebCore::MediaElementSession::setHasPlaybackTargetAvailabilityListeners):
2987         (WebCore::MediaElementSession::mediaStateDidChange):
2988         (WebCore::MediaElementSession::effectivePreloadForElement const):
2989         (WebCore::MediaElementSession::requiresFullscreenForVideoPlayback const):
2990         (WebCore::MediaElementSession::allowsAutomaticMediaDataLoading const):
2991         (WebCore::MediaElementSession::mediaEngineUpdated):
2992         (WebCore::MediaElementSession::allowsPictureInPicture const):
2993         * html/MediaElementSession.h:
2994         * platform/cocoa/PlaybackSessionModelMediaElement.mm:
2995         (WebCore::PlaybackSessionModelMediaElement::wirelessVideoPlaybackDisabled const):
2996
2997 2018-04-25  Jiewen Tan  <jiewen_tan@apple.com>
2998
2999         Remove access to keychain from the WebContent process
3000         https://bugs.webkit.org/show_bug.cgi?id=184428
3001         <rdar://problem/13150903>
3002
3003         Reviewed by Brent Fulgham.
3004
3005         Part 2.
3006
3007         This patch move the operation of HTMLKeygenElement from WebContent Process to UI Process.
3008         Function signedPublicKeyAndChallengeString is therefore marked as WEBCORE_EXPORT. Also, a
3009         localized string is marked WEBCORE_EXPORT as well to support the API test.
3010
3011         Covered by existing tests and api tests.
3012
3013         * WebCore.xcodeproj/project.pbxproj:
3014         * dom/Document.cpp:
3015         (WebCore::Document::signedPublicKeyAndChallengeString):
3016         * dom/Document.h:
3017         * html/HTMLKeygenElement.cpp:
3018         (WebCore::HTMLKeygenElement::appendFormData):
3019         * page/ChromeClient.h:
3020         * platform/LocalizedStrings.h:
3021         * platform/SSLKeyGenerator.h:
3022
3023 2018-04-25  Ryosuke Niwa  <rniwa@webkit.org>
3024
3025         PSON: Don't create a new process when navigating to a blob URL, data URL, and about:blank
3026         https://bugs.webkit.org/show_bug.cgi?id=184962
3027
3028         Reviewed by Youenn Fablet.
3029
3030         Added NavigationAction::treatAsSameOriginNavigation, which signifies WebKit code to avoid creating
3031         a new WebContent process when navigating to a blob URL, data URL, and about:blank.
3032
3033         Tests: ProcessSwap.SameOriginBlobNavigation
3034                ProcessSwap.CrossOriginBlobNavigation
3035                ProcessSwap.NavigateToAboutBlank
3036                ProcessSwap.NavigateToDataURL
3037
3038         * loader/NavigationAction.cpp:
3039         (WebCore::treatAsSameOriginNavigation):
3040         * loader/NavigationAction.h:
3041         (WebCore::NavigationAction::treatAsSameOriginNavigation const):
3042
3043 2018-04-25  Zalan Bujtas  <zalan@apple.com>
3044
3045         [LFC] Implement Layout::BlockContainer functions.
3046         https://bugs.webkit.org/show_bug.cgi?id=184994
3047
3048         Reviewed by Antti Koivisto.
3049
3050         * layout/layouttree/LayoutBlockContainer.cpp:
3051         (WebCore::Layout::BlockContainer::BlockContainer):
3052         (WebCore::Layout::BlockContainer::establishesInlineFormattingContext const):
3053
3054 2018-04-25  Zalan Bujtas  <zalan@apple.com>
3055
3056         [LFC] Implement Layout::Container functions.
3057         https://bugs.webkit.org/show_bug.cgi?id=184988
3058
3059         Reviewed by Antti Koivisto.
3060
3061         * layout/layouttree/LayoutContainer.cpp:
3062         (WebCore::Layout::Container::Container):
3063         (WebCore::Layout::Container::firstInFlowChild const):
3064         (WebCore::Layout::Container::firstInFlowOrFloatingChild const):
3065         (WebCore::Layout::Container::lastInFlowChild const):
3066         (WebCore::Layout::Container::lastInFlowOrFloatingChild const):
3067         (WebCore::Layout::Container::setFirstChild):
3068         (WebCore::Layout::Container::setLastChild):
3069         (WebCore::Layout::Container::setOutOfFlowDescendants):
3070         * layout/layouttree/LayoutContainer.h:
3071         (WebCore::Layout::Container::firstChild const):
3072         (WebCore::Layout::Container::lastChild const):
3073         (WebCore::Layout::Container::hasChild const):
3074         (WebCore::Layout::Container::hasInFlowChild const):
3075         (WebCore::Layout::Container::hasInFlowOrFloatingChild const):
3076         (WebCore::Layout::Container::outOfFlowDescendants):
3077
3078 2018-04-25  Brent Fulgham  <bfulgham@apple.com>
3079
3080         Don't Block First Party Cookies on Redirects
3081         https://bugs.webkit.org/show_bug.cgi?id=184948
3082         <rdar://problem/39534099>
3083
3084         Reviewed by Youenn Fablet.
3085
3086         The Navigation scheduler looses the 'requester' value when performing a ScheduledRedirect.
3087
3088         Test: http/tests/resourceLoadStatistics/do-not-block-top-level-navigation-redirect.html
3089
3090         * loader/NavigationScheduler.cpp:
3091
3092 2018-04-25  Youenn Fablet  <youenn@apple.com>
3093
3094         CachedRawResource is not handling incremental data computation correctly
3095         https://bugs.webkit.org/show_bug.cgi?id=184936
3096
3097         Reviewed by Chris Dumez.
3098
3099         Covered by updated test.
3100
3101         The previous logic was handling the case of only one additional segment being added to the SharedBuffer.
3102         In service worker case, a SharedBuffer may contain more than one segment.
3103         This is fixed by iterating until all new data is sent to clients.
3104
3105         * loader/cache/CachedRawResource.cpp:
3106         (WebCore::CachedRawResource::updateBuffer):
3107
3108 2018-04-25  Andy Estes  <aestes@apple.com>
3109
3110         [Mac] Number of drop items is always 0 when performing a DHTML drag
3111         https://bugs.webkit.org/show_bug.cgi?id=184943
3112
3113         Reviewed by Ryosuke Niwa.
3114
3115         New API test: DragAndDropPasteboardTests.NumberOfValidItemsForDrop
3116
3117         DragController tracks the number of items to be accepted by a file input element, taking
3118         into account whether the control is disabled or accepts multiple files. When this number
3119         changes, WebKit informs the NSDraggingInfo-conforming object passed to -draggingUpdated by
3120         calling -setNumberOfValidItemsForDrop:. This number is presented to the user in a badge
3121         rendered next to the dragging item thumbnails.
3122
3123         When performing a DHTML drag, we don't know how many items the page will accept, so prior
3124         to this patch we would render a "0" in the badge. This is misleading, because the page is
3125         more likely to accept all the items (or at least one of them) rather than none of them.
3126
3127         Let's do the straightforward thing and set numberOfValidItemsForDrop to equal the number of
3128         files in the drag operation when performing a DHTML file drag.
3129
3130         * page/DragController.cpp:
3131         (WebCore::DragController::tryDocumentDrag):
3132
3133 2018-04-25  Eric Carlson  <eric.carlson@apple.com>
3134
3135         [iOS] Set route sharing policy when setting audio session category
3136         https://bugs.webkit.org/show_bug.cgi?id=184979
3137         <rdar://problem/39709577>
3138
3139         Reviewed by Jer Noble.
3140
3141         * platform/audio/ios/AudioSessionIOS.mm:
3142         (WebCore::AudioSession::setCategory):
3143
3144 2018-04-25  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3145
3146         [Curl] Fix wrong schema checking on r230973
3147         https://bugs.webkit.org/show_bug.cgi?id=184977
3148
3149         Did write a wrong condition when making a string.
3150
3151         Reviewed by Alex Christensen.
3152
3153         No new tests because test interface is not ready.
3154
3155         * platform/network/curl/CurlProxySettings.cpp:
3156         (WebCore::createProxyUrl):
3157
3158 2018-04-25  Youenn Fablet  <youenn@apple.com>
3159
3160         Make DocumentThreadableLoader error logging more consistent
3161         https://bugs.webkit.org/show_bug.cgi?id=184853
3162
3163         Reviewed by Chris Dumez.
3164
3165         Covered by rebased tests.
3166         Make EventSource, XHR and Fetch log error messages consistently.
3167         This patch also prepares consistent error logging between WK1 and WK2 as WK2 NetworkProcess
3168         will issue more and more errors in places different from WK1.
3169         This is the reason for SubresourceLoader changes in this patch and DTL/didFail/preflightFailure changes.
3170
3171         Update ImageLoader error message to be more general than CORS.
3172
3173         * loader/CrossOriginPreflightChecker.cpp:
3174         (WebCore::CrossOriginPreflightChecker::doPreflight): Add some more logging for consistency between WK1 and WK2.
3175         (WebCore::CrossOriginPreflightChecker::validatePreflightResponse): Ditto.
3176         * loader/DocumentThreadableLoader.cpp:
3177         (WebCore::DocumentThreadableLoader::didFail):
3178         (WebCore::DocumentThreadableLoader::preflightFailure):
3179         (WebCore::DocumentThreadableLoader::logErrorAndFail):
3180         * loader/ImageLoader.cpp:
3181         (WebCore::ImageLoader::notifyFinished):
3182         * loader/SubresourceLoader.cpp:
3183         (WebCore::SubresourceLoader::didFail):
3184         * loader/ThreadableLoader.cpp:
3185         (WebCore::ThreadableLoader::logError):
3186         * loader/cache/CachedResource.cpp:
3187         (WebCore::CachedResource::load):
3188         * loader/cache/CachedResourceRequestInitiators.cpp:
3189         (WebCore::CachedResourceRequestInitiators::CachedResourceRequestInitiators):
3190         * loader/cache/CachedResourceRequestInitiators.h:
3191         * page/EventSource.cpp:
3192         (WebCore::EventSource::connect):
3193         (WebCore::EventSource::didFail):
3194         * xml/XMLHttpRequest.cpp:
3195         (WebCore::XMLHttpRequest::didFail):
3196
3197 2018-04-25  Zalan Bujtas  <zalan@apple.com>
3198
3199         [LFC] Implement Layout::Box functions.
3200         https://bugs.webkit.org/show_bug.cgi?id=184974
3201
3202         Reviewed by Antti Koivisto.
3203
3204         * layout/layouttree/LayoutBlockContainer.h:
3205         * layout/layouttree/LayoutBox.cpp:
3206         (WebCore::Layout::Box::Box):
3207         (WebCore::Layout::Box::~Box):
3208         (WebCore::Layout::Box::establishesFormattingContext const):
3209         (WebCore::Layout::Box::establishesBlockFormattingContext const):
3210         (WebCore::Layout::Box::isRelativelyPositioned const):
3211         (WebCore::Layout::Box::isStickyPositioned const):
3212         (WebCore::Layout::Box::isAbsolutelyPositioned const):
3213         (WebCore::Layout::Box::isFixedPositioned const):
3214         (WebCore::Layout::Box::isFloatingPositioned const):
3215         (WebCore::Layout::Box::containingBlock const):
3216         (WebCore::Layout::Box::isDescendantOf const):
3217         (WebCore::Layout::Box::isAnonymous const):
3218         (WebCore::Layout::Box::isInlineBlockBox const):
3219         (WebCore::Layout::Box::isBlockLevelBox const):
3220         (WebCore::Layout::Box::isInlineLevelBox const):
3221         (WebCore::Layout::Box::isBlockContainerBox const):
3222         (WebCore::Layout::Box::isInitialContainingBlock const):
3223         (WebCore::Layout::Box::nextInFlowSibling const):
3224         (WebCore::Layout::Box::nextInFlowOrFloatingSibling const):
3225         (WebCore::Layout::Box::previousInFlowSibling const):
3226         (WebCore::Layout::Box::previousInFlowOrFloatingSibling const):
3227         (WebCore::Layout::Box::setParent):
3228         (WebCore::Layout::Box::setNextSibling):
3229         (WebCore::Layout::Box::setPreviousSibling):
3230         (WebCore::Layout::Box::isOverflowVisible const):
3231         * layout/layouttree/LayoutBox.h:
3232         (WebCore::Layout::Box::establishesInlineFormattingContext const):
3233         (WebCore::Layout::Box::isInFlow const):
3234         (WebCore::Layout::Box::isPositioned const):
3235         (WebCore::Layout::Box::isInFlowPositioned const):
3236         (WebCore::Layout::Box::isOutOfFlowPositioned const):
3237         (WebCore::Layout::Box::isFloatingOrOutOfFlowPositioned const):
3238         (WebCore::Layout::Box::parent const):
3239         (WebCore::Layout::Box::nextSibling const):
3240         (WebCore::Layout::Box::previousSibling const):
3241         (WebCore::Layout::Box::weakPtrFactory const):
3242         * layout/layouttree/LayoutContainer.h:
3243         * layout/layouttree/LayoutInlineBox.h:
3244         * layout/layouttree/LayoutInlineContainer.h:
3245
3246 2018-04-25  Per Arne Vollan  <pvollan@apple.com>
3247
3248         [Win] Crash under WebCore::SimpleLineLayout::generateLineBoxTree
3249         https://bugs.webkit.org/show_bug.cgi?id=184953
3250
3251         This is possibly a MSVC compiler bug, since a simple rearrangement of the code fixes the crash.
3252         The crash is only happening in release builds, which also is an indication of this being a
3253         compiler issue.
3254
3255         Reviewed by Zalan Bujtas.
3256
3257         No new tests, covered by existing tests.
3258
3259         * rendering/SimpleLineLayoutFunctions.cpp:
3260         (WebCore::SimpleLineLayout::generateLineBoxTree):
3261
3262 2018-04-25  Dean Jackson  <dino@apple.com>
3263
3264         Make a better flag for system preview, and disable it where necessary
3265         https://bugs.webkit.org/show_bug.cgi?id=184968
3266         <rdar://problem/39686506>
3267
3268         Reviewed by Eric Carlson.
3269
3270         Use USE(SYSTEM_PREVIEW).
3271
3272         * html/HTMLAnchorElement.cpp:
3273         (WebCore::HTMLAnchorElement::isSystemPreviewLink const):
3274         * html/HTMLAnchorElement.h:
3275         * html/HTMLImageElement.cpp:
3276         * html/HTMLImageElement.h:
3277         * html/HTMLPictureElement.cpp:
3278         * html/HTMLPictureElement.h:
3279         * rendering/RenderImage.cpp:
3280         (WebCore::RenderImage::paintIntoRect):
3281         * rendering/RenderTheme.cpp:
3282         * rendering/RenderTheme.h:
3283         * testing/Internals.cpp:
3284         (WebCore::Internals::systemPreviewRelType):
3285         (WebCore::Internals::isSystemPreviewLink const):
3286         (WebCore::Internals::isSystemPreviewImage const):
3287
3288 2018-04-25  Zalan Bujtas  <zalan@apple.com>
3289
3290         Fix project file after r230931.
3291
3292         * WebCore.xcodeproj/project.pbxproj:
3293
3294 2018-04-25  Miguel Gomez  <magomez@igalia.com>
3295
3296         [GTK] fast/repaint/fixed-scale.html failing since r230479 "[TexMap] TextureMapperLayer unnecessarily duplicates state in GraphicsLayerTransform"
3297         https://bugs.webkit.org/show_bug.cgi?id=184780
3298
3299         Reviewed by Žan Doberšek.
3300
3301         Initialize the anchorPoint to (0.5, 0.5, 0) in TextureMapperLayer::State.
3302
3303         Covered by existent tests.
3304
3305         * platform/graphics/texmap/TextureMapperLayer.h:
3306
3307 2018-04-25  Carlos Garcia Campos  <cgarcia@igalia.com>
3308
3309         [GTK] Implement MouseEvent.buttons
3310         https://bugs.webkit.org/show_bug.cgi?id=184913
3311
3312         Reviewed by Žan Doberšek.
3313
3314         Add helper function to get the state modifier of a GDK button.
3315
3316         * platform/gtk/GtkUtilities.cpp:
3317         (WebCore::stateModifierForGdkButton):
3318         * platform/gtk/GtkUtilities.h:
3319
3320 2018-04-24  Ryosuke Niwa  <rniwa@webkit.org>
3321
3322         Release assert in ScriptController::canExecuteScripts via CachedSVGFont::ensureCustomFontData during
3323         Document::updateStyleIfNeeded
3324         https://bugs.webkit.org/show_bug.cgi?id=184950
3325
3326         Reviewed by Zalan Bujtas.
3327
3328         Convert an existing ScriptDisallowedScope::EventAllowedScope which only disables the debug assertions
3329         by ScriptDisallowedScope::DisableAssertionsInScope which also disables the release assertion.
3330
3331         Because SVG font is loaded in a document isolated from the rest of the page (m_externalSVGDocument),
3332         there is no security implication to execute scripts in this isolated document.
3333
3334         Unfortunately, no new tests. I could never make CachedSVGFont::ensureCustomFontData to get called inside
3335         style resolution with m_externalSVGDocument set to nullptr after many attempts. Even EventAllowedScope
3336         I added 13 months ago in r211965, which this patch replaces by DisableAssertionsInScope, is not utilized
3337         by the existing layout tests since removing the assertion doesn't cause any layout test to hit an assertion.
3338
3339         * dom/ScriptDisallowedScope.h: Updated the comment.
3340         * loader/cache/CachedSVGFont.cpp:
3341         (WebCore::CachedSVGFont::ensureCustomFontData): Replaced the asssertion.
3342
3343 2018-04-24  Simon Fraser  <simon.fraser@apple.com>
3344
3345         visitedDependentColor() should take a CSSPropertyID
3346         https://bugs.webkit.org/show_bug.cgi?id=184949
3347
3348         Reviewed by Sam Weinig.
3349         
3350         Change RenderStyle::colorIncludingFallback(), RenderStyle::visitedDependentColor()
3351         and RenderElement::selectionColor() to take CSSPropertyID rather than int.
3352
3353         No behavior change.
3354
3355         * rendering/RenderElement.cpp:
3356         (WebCore::RenderElement::selectionColor const):
3357         * rendering/RenderElement.h:
3358         * rendering/RenderTableCell.cpp:
3359         (WebCore::RenderTableCell::computeCollapsedStartBorder const):
3360         (WebCore::RenderTableCell::computeCollapsedEndBorder const):
3361         (WebCore::RenderTableCell::computeCollapsedBeforeBorder const):
3362         (WebCore::RenderTableCell::computeCollapsedAfterBorder const):
3363         * rendering/style/RenderStyle.cpp:
3364         (WebCore::RenderStyle::colorIncludingFallback const):
3365         (WebCore::RenderStyle::visitedDependentColor const):
3366         * rendering/style/RenderStyle.h:
3367
3368 2018-04-24  Simon Fraser  <simon.fraser@apple.com>
3369
3370         Add a new "color-filter" CSS property as an experimental feature
3371         https://bugs.webkit.org/show_bug.cgi?id=184940
3372         rdar://problem/39664904
3373
3374         Reviewed by Jon Lee.
3375         
3376         Add a new CSS property called "color-filter" as an experimental feature (off by default).
3377         
3378         This property specifies a list of filter functions (as specified in https://drafts.fxtf.org/filter-effects/#supported-filter-functions)
3379         to CSS colors, allowing authors to modify the provided page colors, for example to improve accessibility.
3380         Filters that move pixels (i.e. blur() and drop-shadow()) are invalid in this property.
3381         
3382         Colors will be mapped through the filter functions just before paint time, and gradient stop colors will also be mapped.
3383         
3384         This patch adds support for parsing color-filter.
3385
3386         Test: css3/color-filters/color-filter-parsing.html
3387
3388         * css/CSSComputedStyleDeclaration.cpp:
3389         (WebCore::ComputedStyleExtractor::valueForPropertyinStyle):
3390         * css/CSSProperties.json:
3391         * css/parser/CSSParser.cpp:
3392         (WebCore::CSSParserContext::CSSParserContext):
3393         (WebCore::operator==):
3394         * css/parser/CSSParserMode.h:
3395         * css/parser/CSSPropertyParser.cpp:
3396         (WebCore::CSSPropertyParser::parseSingleValue):
3397         * css/parser/CSSPropertyParserHelpers.cpp:
3398         (WebCore::CSSPropertyParserHelpers::isColorFilterFunction):
3399         (WebCore::CSSPropertyParserHelpers::consumeFilterFunction):
3400         (WebCore::CSSPropertyParserHelpers::consumeFilter):
3401         * css/parser/CSSPropertyParserHelpers.h:
3402         * page/Settings.yaml:
3403         * rendering/style/RenderStyle.cpp:
3404         (WebCore::RenderStyle::changeRequiresRepaint const):
3405         * rendering/style/RenderStyle.h:
3406         (WebCore::RenderStyle::mutableColorFilter):
3407         (WebCore::RenderStyle::colorFilter const):
3408         (WebCore::RenderStyle::hasColorFilter const):
3409         (WebCore::RenderStyle::setColorFilter):
3410         (WebCore::RenderStyle::initialColorFilter):
3411         * rendering/style/StyleRareInheritedData.cpp:
3412         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
3413         (WebCore::StyleRareInheritedData::operator== const):
3414         (WebCore::StyleRareInheritedData::hasColorFilters const):
3415         * rendering/style/StyleRareInheritedData.h:
3416
3417 2018-04-24  Simon Fraser  <simon.fraser@apple.com>
3418
3419         shape-outside and filter styles occur twice in the result of getComputedStyle
3420         https://bugs.webkit.org/show_bug.cgi?id=184931
3421
3422         Reviewed by Antti Koivisto.
3423
3424         CSSPropertyShapeOutside and CSSPropertyFilter were duplicated in the list of computedProperties[]
3425         used by getComputedStyle. Remove the duplication.
3426         
3427         Tested by existing tests.
3428
3429         * css/CSSComputedStyleDeclaration.cpp:
3430
3431 2018-04-24  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3432
3433         [Curl] Extract proxy settings into a separate class to hold advanced information.
3434         https://bugs.webkit.org/show_bug.cgi?id=184714
3435
3436         It was simplely structure to hold proxy setting. To support advanced feature of proxy
3437         such as authentication, more inteligent object is required to store intermediate state
3438         or errors. That's why we've introduced new class for that purpose.
3439
3440         Reviewed by Youenn Fablet.
3441
3442         No new tests because there's no new behavior.
3443
3444         * platform/Curl.cmake:
3445         * platform/network/curl/CurlContext.cpp:
3446         (WebCore::CurlHandle::enableProxyIfExists):
3447         (WebCore::CurlContext::ProxyInfo::url const): Deleted.
3448         (WebCore::CurlContext::setProxyInfo): Deleted.
3449         * platform/network/curl/CurlContext.h:
3450         (WebCore::CurlContext::proxySettings const):
3451         (WebCore::CurlContext::setProxySettings):
3452         (WebCore::CurlContext::setProxyUserPass):
3453         (WebCore::CurlContext::proxyInfo const): Deleted.
3454         (WebCore::CurlContext::setProxyInfo): Deleted.
3455         * platform/network/curl/CurlProxySettings.cpp: Added.
3456         (WebCore::CurlProxySettings::CurlProxySettings):
3457