3cce1d41a9cec917bfebbfb77fc5e836f8855d02
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2018-11-28  Christopher Reid  <chris.reid@sony.com>
2
3         SQLiteDatabase::open is constantly printing "SQLite database failed to checkpoint: database table is locked" errors
4         https://bugs.webkit.org/show_bug.cgi?id=192111
5
6         Reviewed by Alex Christensen.
7
8         Ensure the journal_mode=WAL statement is finalized before wal_checkpoint is executed.
9
10         * platform/sql/SQLiteDatabase.cpp:
11         (WebCore::SQLiteDatabase::open):
12
13 2018-11-28  Said Abou-Hallawa  <sabouhallawa@apple.com>
14
15         Updating href on linearGradient and radialGradient doesn't update its rendering
16         https://bugs.webkit.org/show_bug.cgi?id=191934
17
18         Reviewed by Ryosuke Niwa.
19
20         Mark the gradient renderer for repaint when the value of the 'href'
21         attribute changes.
22
23         Tests: fast/shadow-dom/svg-linear-gradient-dynamic-update-href-in-shadow-tree.html
24                fast/shadow-dom/svg-radial-gradient-dynamic-update-href-in-shadow-tree.html
25                svg/dynamic-updates/SVGLinearGradientElement-svgdom-href-prop.html
26                svg/dynamic-updates/SVGRadialGradientElement-svgdom-href-prop.html
27
28         * svg/SVGGradientElement.cpp:
29         (WebCore::SVGGradientElement::svgAttributeChanged):
30
31
32 2018-11-28  Youenn Fablet  <youenn@apple.com>
33
34         imported/w3c/web-platform-tests/webrtc/RTCPeerConnection-transceivers.https.html is flaky on iOS simulator
35         https://bugs.webkit.org/show_bug.cgi?id=192037
36
37         Reviewed by Eric Carlson.
38
39         The stats report JS map should be created when resolving the stats promise with WebCore RTCStatsReport.
40         But resolving the promise might fail in case of a page being suspended.
41         In that case, no JSRTCStatsReport is created and there is no backing map.
42         Update the code to reflect that.
43         Covered by existing test.
44
45         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
46         (WebCore::LibWebRTCMediaEndpoint::getStats):
47         * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.cpp:
48         (WebCore::LibWebRTCStatsCollector::~LibWebRTCStatsCollector):
49         (WebCore::LibWebRTCStatsCollector::OnStatsDelivered):
50         * Modules/mediastream/libwebrtc/LibWebRTCStatsCollector.h:
51
52 2018-11-28  Keith Rollin  <krollin@apple.com>
53
54         Update generate-{derived,unified}-sources scripts to support generating .xcfilelist files
55         https://bugs.webkit.org/show_bug.cgi?id=192031
56         <rdar://problem/46286816>
57
58         Reviewed by Alex Christensen.
59
60         The Generate Derived Sources and Generate Unified Sources build phases
61         in Xcode need to have their inputs and outputs specified. This
62         specification will come in the form of .xcfilelist files that will be
63         attached to these build phases. There is one .xcfilelist file that
64         lists the input file and one that lists the output files. As part of
65         this work, the various generate-{derived,unified}-sources scripts that
66         are executed in these Generate build phases are modified to help in
67         the creation of these .xcfilelist files. In particular, they can now
68         be invoked with command-line parameters. These parameters are then
69         used to alter the normal execution of these scripts, causing them to
70         produce the .xcfilelist files as opposed to actually generating the
71         files that are listed in those files.
72
73         No new tests -- no changed functionality.
74
75         * Scripts/generate-derived-sources.sh:
76         * Scripts/generate-unified-sources.sh:
77
78 2018-11-28  Keith Rollin  <krollin@apple.com>
79
80         Revert print_all_generated_files work in r238008; tighten up target specifications
81         https://bugs.webkit.org/show_bug.cgi?id=192025
82         <rdar://problem/46284301>
83
84         Reviewed by Alex Christensen.
85
86         In r238008, I added a facility for DerivedSources.make makefiles to
87         print out the list of files that they generate. This output was used
88         in the generation of .xcfilelist files used to specify the output of
89         the associated Generate Derived Sources build phases in Xcode. This
90         approach worked, but it meant that people would need to follow a
91         specific convention to keep this mechanism working.
92
93         Instead of continuing this approach, I'm going to implement a new
94         facility based on the output of `make` when passed the -d flag (which
95         prints dependency information). This new mechanism is completely
96         automatic and doesn't need maintainers to follow a convention. To that
97         end, remove most of the work performed in r238008 that supports the
98         print_all_generated_files target.
99
100         At the same time, it's important for the sets of targets and their
101         dependencies to be complete and correct. Therefore, also include
102         changes to bring those up-to-date. As part of that, you'll see
103         prevalent use of a particular technique. Here's an example:
104
105             BYTECODE_FILES = \
106                 Bytecodes.h \
107                 BytecodeIndices.h \
108                 BytecodeStructs.h \
109                 InitBytecodes.asm \
110             #
111             BYTECODE_FILES_PATTERNS = $(subst .,%,$(BYTECODE_FILES))
112
113             all : $(BYTECODE_FILES)
114
115             $(BYTECODE_FILES_PATTERNS): $(wildcard $(JavaScriptCore)/generator/*.rb) $(JavaScriptCore)/bytecode/BytecodeList.rb
116                 ...
117
118         These lines indicate a set of generated files (those specified in
119         BYTECODE_FILES). These files are generated by the BytecodeList.rb
120         tool. But, as opposed to the normal rule where a single foo.output is
121         generated by foo.input plus some additional dependencies, this rule
122         produces multiple output files from a tool whose connection to the
123         output files is not immediately clear. A special approach is needed
124         where a single rule produces multiple output files. The normal way to
125         implement this is to use an .INTERMEDIATE target. However, we used
126         this approach in the past and ran into a problem with it, addressing
127         it with an alternate approach in r210507. The above example shows this
128         approach. The .'s in the list of target files are replaced with %'s,
129         and the result is used as the left side of the dependency rule.
130
131         No new tests -- no changed functionality.
132
133         * DerivedSources.make:
134
135 2018-11-28  Alex Christensen  <achristensen@webkit.org>
136
137         Remove dead code from an earlier attempt at implementing safe browsing
138         https://bugs.webkit.org/show_bug.cgi?id=192067
139
140         Reviewed by Chris Dumez.
141
142         * WebCore.xcodeproj/project.pbxproj:
143         * loader/EmptyClients.cpp:
144         (WebCore::EmptyFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
145         * loader/EmptyFrameLoaderClient.h:
146         * loader/FrameLoadRequest.h:
147         (WebCore::FrameLoadRequest::setShouldSkipSafeBrowsingCheck): Deleted.
148         (WebCore::FrameLoadRequest::shouldSkipSafeBrowsingCheck): Deleted.
149         * loader/FrameLoader.cpp:
150         (WebCore::FrameLoader::loadArchive):
151         (WebCore::FrameLoader::loadURL):
152         (WebCore::FrameLoader::load):
153         (WebCore::FrameLoader::loadWithNavigationAction):
154         (WebCore::FrameLoader::loadWithDocumentLoader):
155         (WebCore::FrameLoader::loadPostRequest):
156         * loader/FrameLoader.h:
157         (WebCore::FrameLoader::loadWithDocumentLoader):
158         (WebCore::FrameLoader::loadWithNavigationAction):
159         * loader/FrameLoaderClient.h:
160         * loader/PolicyChecker.cpp:
161         (WebCore::PolicyChecker::checkNavigationPolicy):
162         * loader/PolicyChecker.h:
163         * loader/ShouldSkipSafeBrowsingCheck.h: Removed.
164
165 2018-11-28  Alex Christensen  <achristensen@webkit.org>
166
167         Add SessionIDs wherever BlobURLs are used in SerializedScriptValue
168         https://bugs.webkit.org/show_bug.cgi?id=192062
169
170         Reviewed by Dean Jackson.
171
172         Just adding infrastructure for fixing "the blob bug"
173
174         * Modules/indexeddb/IDBDatabaseIdentifier.cpp:
175         (WebCore::IDBDatabaseIdentifier::IDBDatabaseIdentifier):
176         (WebCore::IDBDatabaseIdentifier::isolatedCopy const):
177         * Modules/indexeddb/IDBDatabaseIdentifier.h:
178         (WebCore::IDBDatabaseIdentifier::hash const):
179         (WebCore::IDBDatabaseIdentifier::sessionID const):
180         (WebCore::IDBDatabaseIdentifier::encode const):
181         (WebCore::IDBDatabaseIdentifier::decode):
182         * Modules/indexeddb/IDBFactory.cpp:
183         (WebCore::IDBFactory::openInternal):
184         (WebCore::IDBFactory::deleteDatabase):
185         * Modules/indexeddb/IDBTransaction.cpp:
186         (WebCore::IDBTransaction::putOrAddOnServer):
187         * Modules/indexeddb/IDBValue.cpp:
188         (WebCore::IDBValue::IDBValue):
189         (WebCore::IDBValue::setAsIsolatedCopy):
190         * Modules/indexeddb/IDBValue.h:
191         (WebCore::IDBValue::sessionID const):
192         (WebCore::IDBValue::encode const):
193         (WebCore::IDBValue::decode):
194         * Modules/indexeddb/server/MemoryIndexCursor.cpp:
195         (WebCore::IDBServer::MemoryIndexCursor::currentData):
196         * Modules/indexeddb/server/MemoryObjectStoreCursor.cpp:
197         (WebCore::IDBServer::MemoryObjectStoreCursor::currentData):
198         * Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
199         (WebCore::IDBServer::SQLiteIDBBackingStore::getBlobRecordsForObjectStoreRecord):
200         (WebCore::IDBServer::SQLiteIDBBackingStore::getRecord):
201         (WebCore::IDBServer::SQLiteIDBBackingStore::getAllObjectStoreRecords):
202         (WebCore::IDBServer::SQLiteIDBBackingStore::uncheckedGetIndexRecordForOneKey):
203         * Modules/indexeddb/server/SQLiteIDBBackingStore.h:
204         * Modules/indexeddb/server/SQLiteIDBCursor.cpp:
205         (WebCore::IDBServer::SQLiteIDBCursor::internalFetchNextRecord):
206         * Modules/indexeddb/server/UniqueIDBDatabase.cpp:
207         (WebCore::IDBServer::UniqueIDBDatabase::performPutOrAdd):
208         * bindings/js/IDBBindingUtilities.cpp:
209         (WebCore::deserializeIDBValueToJSValue):
210         * bindings/js/SerializedScriptValue.cpp:
211         (WebCore::CloneSerializer::serialize):
212         (WebCore::CloneSerializer::CloneSerializer):
213         (WebCore::CloneSerializer::dumpIfTerminal):
214         (WebCore::CloneDeserializer::deserialize):
215         (WebCore::CloneDeserializer::CloneDeserializer):
216         (WebCore::SerializedScriptValue::SerializedScriptValue):
217         (WebCore::SerializedScriptValue::create):
218         (WebCore::SerializedScriptValue::deserialize):
219         (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDB):
220         (WebCore::SerializedScriptValue::writeBlobsToDiskForIndexedDBSynchronously):
221         * bindings/js/SerializedScriptValue.h:
222         (WebCore::SerializedScriptValue::sessionID const):
223
224 2018-11-28  Justin Fan  <justin_fan@apple.com>
225
226         [WebGPU] Begin implementation of WebGPURenderPassEncoder and barebones WebGPURenderPassDescriptor
227         https://bugs.webkit.org/show_bug.cgi?id=191990
228
229         Reviewed by Dean Jackson.
230
231         Begin implementation of WebGPURenderPassEncoder and its parent interface, WebGPUProgrammablePassEncoder.
232         Also add code to allow creation of a primitive WebGPURenderPassDescriptor with the sole purpose of providing 
233         a WebGPUTextureView reference to the render pass creation function, WebGPUCommandBuffer::beginRenderPass().
234
235         Test: webgpu/render-passes.html
236
237         * CMakeLists.txt:
238         * DerivedSources.make:
239         * Modules/webgpu/WebGPUCommandBuffer.cpp:
240         (WebCore::WebGPUCommandBuffer::WebGPUCommandBuffer):
241         (WebCore::WebGPUCommandBuffer::beginRenderPass): Added. Returns a WebGPURenderPassEncoder upon success.
242         * Modules/webgpu/WebGPUCommandBuffer.h:
243         * Modules/webgpu/WebGPUCommandBuffer.idl:
244         * Modules/webgpu/WebGPUProgrammablePassEncoder.cpp: Added.
245         * Modules/webgpu/WebGPUProgrammablePassEncoder.h: Added.
246         * Modules/webgpu/WebGPUProgrammablePassEncoder.idl: Added. Empty (for now) interface parenting WebGPURenderPassEncoder.
247         * Modules/webgpu/WebGPURenderPassDescriptor.h:
248         * Modules/webgpu/WebGPURenderPassDescriptor.idl: Added. Directly handles a WebGPUTextureView attachment; all other color attachment properties set by implementation for now.
249         * Modules/webgpu/WebGPURenderPassEncoder.cpp: Added.
250         (WebCore::WebGPURenderPassEncoder::create):
251         (WebCore::WebGPURenderPassEncoder::WebGPURenderPassEncoder):
252         (WebCore::WebGPURenderPassEncoder::passEncoder const):
253         * Modules/webgpu/WebGPURenderPassEncoder.h: Added. Interface to GPURenderPassEncoder.
254         * Modules/webgpu/WebGPURenderPassEncoder.idl: Added. Allows WebGPU developer to encode commands for the WebGPUCommandBuffer.
255         * Modules/webgpu/WebGPUTextureView.cpp:
256         (WebCore::WebGPUTextureView::WebGPUTextureView):
257         * Modules/webgpu/WebGPUTextureView.h:
258         (WebCore::WebGPUTextureView::texture):
259         * Sources.txt:
260         * SourcesCocoa.txt:
261         * WebCore.xcodeproj/project.pbxproj:
262         * bindings/js/WebCoreBuiltinNames.h:
263         * platform/graphics/gpu/GPUCommandBuffer.h:
264         (WebCore::GPUCommandBuffer::platformCommandBuffer const):
265         * platform/graphics/gpu/GPUProgrammablePassEncoder.h: Added. Base class for GPURenderPassEncoder.
266         * platform/graphics/gpu/GPURenderPassDescriptor.h: Added.
267         * platform/graphics/gpu/GPURenderPassEncoder.h: Added. Wrapper class for MTLRenderCommandEncoder.
268         * platform/graphics/gpu/GPUTexture.h:
269         (WebCore::GPUTexture::platformTexture const):
270         * platform/graphics/gpu/cocoa/GPUProgrammablePassEncoderMetal.mm: Added.
271         * platform/graphics/gpu/cocoa/GPURenderPassEncoderMetal.mm: Added.
272         (WebCore::GPURenderPassEncoder::create): Creates the backing MTLRenderCommandEncoder; returns null if this fails. 
273         (WebCore::GPURenderPassEncoder::GPURenderPassEncoder):
274         (WebCore::GPURenderPassEncoder::~GPURenderPassEncoder): End encoding before destroying the MTLCommandEncoder to prevent an exception.
275         (WebCore::GPURenderPassEncoder::platformPassEncoder const):
276
277 2018-11-28  Rob Buis  <rbuis@igalia.com>
278
279         [XHR] Document.lastModified doesn't work for non-rendered documents
280         https://bugs.webkit.org/show_bug.cgi?id=179375
281
282         Reviewed by Alexey Proskuryakov.
283
284         Add setOverrideLastModified to override last modified date for
285         standalone Documents.
286
287         Behavior matches Firefox and Chrome.
288
289         Test: web-platform-tests/xhr/responsexml-document-properties.htm
290
291         * dom/Document.cpp:
292         (WebCore::Document::overrideLastModified):
293         (WebCore::Document::lastModified const): no need to test m_frame since that's already done in loader().
294         (WebCore::Document::lastModified): Deleted.
295         * dom/Document.h:
296         * xml/XMLHttpRequest.cpp:
297
298 2018-11-28  Yongjun Zhang  <yongjun_zhang@apple.com>
299
300         Allow WebKit clients to specify a minimum effective width for layout.
301         https://bugs.webkit.org/show_bug.cgi?id=191499
302         <rdar://problem/45362678>
303
304         Reviewed by Wenson Hsieh.
305
306         If we ignore the meta viewport (_shouldIgnoreMetaViewport is true), the default layout width will be device
307         width. For clients that wish to lay out the content with a different width value, we would need to add a way
308         to specify the effective width for layout.
309
310         Tests: fast/viewport/ios/ipad/viewport-overriden-by-minimum-effective-width-if-ignore-meta-viewport.html
311                fast/viewport/ios/ipad/viewport-unchanged-by-minimum-effective-width-if-not-ignore-meta-viewport.html
312
313         * page/ViewportConfiguration.cpp:
314         (WebCore::ViewportConfiguration::setViewLayoutSize): Add a new argument effectiveWidth.
315         (WebCore::ViewportConfiguration::nativeWebpageParameters): Make sure minimumScale for nativeWebpageParameters
316             is small enough so that it won't clamp out the initial scale. If content is wider than the viewport, this
317             ensures we can still zoom out the page.
318         (WebCore::ViewportConfiguration::updateConfiguration): update _minimumEffectiveDeviceWidth and apply that to
319             the layout size scale computation.
320         (WebCore::ViewportConfiguration::effectiveLayoutSizeScaleFactor): A helper method to return the effective
321             layout scale factor which is also effected by _minimumEffectiveDeviceWidth.
322         (WebCore::ViewportConfiguration::updateMinimumLayoutSize): Update m_minimumLayoutSize based on effectiveLayoutSizeScaleFactor().
323         (WebCore::ViewportConfiguration::description const): Also dump m_minimumEffectiveDeviceWidth.
324         * page/ViewportConfiguration.h: Add a member variable m_minimumEffectiveDeviceWidth.
325
326 2018-11-28  Stephan Szabo  <stephan.szabo@sony.com>
327
328         Make generic EventHandler methods
329         https://bugs.webkit.org/show_bug.cgi?id=192032
330
331         Reviewed by Michael Catanzaro.
332
333         No new tests. No new behavior.
334
335         Move mostly generic for non-Apple platform implementations
336         of methods from EventHandlerGlib into EventHandler. Two
337         of these also had different Windows implementations, so
338         to limit behavior change from this, those are currently
339         overridden for Windows as well as Mac and IOS.
340
341         * page/EventHandler.cpp:
342         (WebCore::EventHandler::passMousePressEventToSubframe):
343         (WebCore::EventHandler::passMouseReleaseEventToSubframe):
344         (WebCore::EventHandler::widgetDidHandleWheelEvent):
345         (WebCore::EventHandler::tabsToAllFormControls const):
346         (WebCore::EventHandler::passWidgetMouseDownEventToWidget):
347         (WebCore::EventHandler::passMouseDownEventToWidget):
348         (WebCore::EventHandler::focusDocumentView):
349         (WebCore::EventHandler::eventActivatedView const):
350         (WebCore::EventHandler::passMouseMoveEventToSubframe):
351         * page/win/EventHandlerWin.cpp:
352         (WebCore::EventHandler::passMouseMoveEventToSubframe):
353         (WebCore::EventHandler::passMousePressEventToSubframe): Deleted.
354         (WebCore::EventHandler::passMouseReleaseEventToSubframe): Deleted.
355         (WebCore::EventHandler::widgetDidHandleWheelEvent): Deleted.
356         (WebCore::EventHandler::tabsToAllFormControls const): Deleted.
357         (WebCore::EventHandler::focusDocumentView): Deleted.
358         (WebCore::EventHandler::passWidgetMouseDownEventToWidget): Deleted.
359         (WebCore::EventHandler::accessKeyModifiers): Deleted.
360         * platform/glib/EventHandlerGLib.cpp:
361         (WebCore::EventHandler::tabsToAllFormControls const): Deleted.
362         (WebCore::EventHandler::focusDocumentView): Deleted.
363         (WebCore::EventHandler::passWidgetMouseDownEventToWidget): Deleted.
364         (WebCore::EventHandler::passMouseDownEventToWidget): Deleted.
365         (WebCore::EventHandler::eventActivatedView const): Deleted.
366         (WebCore::EventHandler::widgetDidHandleWheelEvent): Deleted.
367         (WebCore::EventHandler::passMousePressEventToSubframe): Deleted.
368         (WebCore::EventHandler::passMouseMoveEventToSubframe): Deleted.
369         (WebCore::EventHandler::passMouseReleaseEventToSubframe): Deleted.
370         (WebCore::EventHandler::accessKeyModifiers): Deleted.
371
372 2018-11-28  Zalan Bujtas  <zalan@apple.com>
373
374         [LFC][Quirk] Use non-collapsed vertical margin values when the container is stretched to the size of the ICB.
375         https://bugs.webkit.org/show_bug.cgi?id=192078
376
377         Reviewed by Antti Koivisto.
378
379         This quirk happens when the body height is 0 which means its vertical margins collapse through (top and bottom margins are adjoining).
380         However now that we stretch the body they don't collapse through anymore, so we need to use the non-collapsed values instead.
381
382         * layout/LayoutUnits.h:
383         (WebCore::Layout::HeightAndMargin::usedMarginValues const):
384         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
385         (WebCore::Layout::stretchHeightToInitialContainingBlock):
386
387 2018-11-28  Zalan Bujtas  <zalan@apple.com>
388
389         [LFC] Add support for quirk container's collapsing top margin in quirks mode.
390         https://bugs.webkit.org/show_bug.cgi?id=192070
391
392         Reviewed by Antti Koivisto.
393
394         In quirk mode when the top margin collapsing is computed for a quirk container (body, table cell) and the canditate margin value is
395         also a quirk value, we just ignore it.
396
397         * layout/blockformatting/BlockMarginCollapse.cpp:
398         (WebCore::Layout::isQuirkContainer):
399         (WebCore::Layout::hasMarginTopQuirkValue):
400         (WebCore::Layout::shouldIgnoreMarginTopInQuirkContext):
401         (WebCore::Layout::isMarginTopCollapsedWithParent):
402         (WebCore::Layout::BlockFormattingContext::Geometry::MarginCollapse::marginTop):
403         * layout/layouttree/LayoutBox.h:
404         (WebCore::Layout::Box::isTableCell const):
405
406 2018-11-28  Ali Juma  <ajuma@chromium.org>
407
408         Intersection Observer: rootMargin: '' gives weird results
409         https://bugs.webkit.org/show_bug.cgi?id=191975
410
411         Reviewed by Simon Fraser.
412
413         When converting the rootMargin string into a LengthBox, explicitly construct a Length
414         of size 0px for each dimension, instead of using Length's default constructor. The
415         default constructor creates a Length with value Auto, which causes us to incorrectly
416         apply a non-zero rootMargin.
417
418         Test: imported/w3c/web-platform-tests/intersection-observer/empty-root-margin.html
419
420         * page/IntersectionObserver.cpp:
421         (WebCore::parseRootMargin):
422
423 2018-11-28  Thibault Saunier  <tsaunier@igalia.com>
424
425         [WebRTC][GStreamer] Make sure to have the default microphone on the top of the list
426         https://bugs.webkit.org/show_bug.cgi?id=192026
427
428         Reviewed by Philippe Normand.
429
430         Otherwise we might end up picking a useless one in some applications
431         (not sure what those application do though).
432
433         GStreamer patch proposed as https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/merge_requests/34/diffs
434
435         * platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp:
436         (WebCore::sortDevices):
437         (WebCore::GStreamerCaptureDeviceManager::addDevice):
438         (WebCore::GStreamerCaptureDeviceManager::refreshCaptureDevices):
439         * platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.h:
440
441 2018-11-28  Thibault Saunier  <tsaunier@igalia.com>
442
443         [WebRTC][GStreamer] Tag all cameras with as 'Unknown' facing mode
444         https://bugs.webkit.org/show_bug.cgi?id=192028
445
446         Reviewed by Philippe Normand.
447
448         * platform/mediastream/gstreamer/GStreamerVideoCaptureSource.cpp:
449         (WebCore::GStreamerVideoCaptureSource::capabilities):
450
451 2018-11-28  Thibault Saunier  <tsaunier@igalia.com>
452
453         [WebRTC][GStreamer] Use a GUniquePtr to hold the GstAudioConverter in our OutgoingAudioSource
454         https://bugs.webkit.org/show_bug.cgi?id=192027
455
456         Reviewed by Xabier Rodriguez-Calvar.
457
458         Cleaning up a bit the code.
459
460         It is a minor refactoring, no new test required.
461
462         * platform/graphics/gstreamer/GUniquePtrGStreamer.h:
463         * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.cpp:
464         (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::~RealtimeOutgoingAudioSourceLibWebRTC):
465         (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::audioSamplesAvailable):
466         (WebCore::RealtimeOutgoingAudioSourceLibWebRTC::pullAudioData):
467         * platform/mediastream/gstreamer/RealtimeOutgoingAudioSourceLibWebRTC.h:
468
469 2018-11-28  Thibault Saunier  <tsaunier@igalia.com>
470
471         [GStreamer][WebRTC] Do not run device monitor for device type we do not handle
472         https://bugs.webkit.org/show_bug.cgi?id=191904
473
474         This is useless work and it throws warning about use GstDeviceMonitor without filters.
475
476         Reviewed by Philippe Normand.
477
478         * platform/mediastream/gstreamer/GStreamerCaptureDeviceManager.cpp:
479         (WebCore::GStreamerCaptureDeviceManager::refreshCaptureDevices):
480
481 2018-11-27  Rob Buis  <rbuis@igalia.com>
482
483         Block more ports (427, 548, 6697)
484         https://bugs.webkit.org/show_bug.cgi?id=186092
485
486         Reviewed by Frédéric Wang.
487
488         Block port 427, ports 548 and 6697 are aleady blocked and
489         are tested by the updated request-bad-port.html wpt test.
490
491         Behavior matches Firefox and Chrome.
492
493         Test: web-platform-tests/fetch/api/request/request-bad-port.html
494
495         * platform/URL.cpp:
496         (WebCore::portAllowed):
497
498 2018-11-27  Youenn Fablet  <youenn@apple.com>
499
500         Log WebRTC stats in inspector console only when setting is verbose
501         https://bugs.webkit.org/show_bug.cgi?id=192014
502
503         Reviewed by Eric Carlson.
504
505         Add a WebRTCStats channel that is used by default to output WebRTC stats in console.
506         When WebRTC Debug logging is enabled, log WebRTC stats in WebRTC channel,
507         so that they appear as debug information in Web Inspector.
508
509         No change of JS behavior.
510         Covered by manually testing what is logged in inspector and console.
511
512         * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp:
513         (WebCore::LibWebRTCMediaEndpoint::OnStatsDelivered):
514         * platform/Logging.h:
515
516 2018-11-27  Simon Fraser  <simon.fraser@apple.com>
517
518         Fix the mis-spelled "m_clienstWaitingForAsyncDecoding"
519         https://bugs.webkit.org/show_bug.cgi?id=192060
520
521         Reviewed by Wenson Hsieh.
522
523         Fix the mis-spelling of "m_clienstWaitingForAsyncDecoding".
524
525         * loader/cache/CachedImage.cpp:
526         (WebCore::CachedImage::didRemoveClient):
527         (WebCore::CachedImage::isClientWaitingForAsyncDecoding const):
528         (WebCore::CachedImage::addClientWaitingForAsyncDecoding):
529         (WebCore::CachedImage::removeAllClientsWaitingForAsyncDecoding):
530         (WebCore::CachedImage::allClientsRemoved):
531         (WebCore::CachedImage::clear):
532         (WebCore::CachedImage::createImage):
533         (WebCore::CachedImage::imageFrameAvailable):
534         * loader/cache/CachedImage.h:
535
536 2018-11-27  Mark Lam  <mark.lam@apple.com>
537
538         ENABLE_FAST_JIT_PERMISSIONS should be false for iosmac.
539         https://bugs.webkit.org/show_bug.cgi?id=192055
540         <rdar://problem/46288783>
541
542         Reviewed by Saam Barati.
543
544         No new tests needed.  Removing an invalid configuration that is not used in WebCore.
545
546         * Configurations/FeatureDefines.xcconfig:
547
548 2018-11-27  Jiewen Tan  <jiewen_tan@apple.com>
549
550         Remove kCCNotVerified
551         https://bugs.webkit.org/show_bug.cgi?id=192034
552         <rdar://problem/46235863>
553
554         Reviewed by Alexey Proskuryakov.
555
556         No change of behaviours.
557
558         * crypto/CommonCryptoUtilities.h:
559         * crypto/mac/CryptoAlgorithmRSASSA_PKCS1_v1_5Mac.cpp:
560         (WebCore::verifyRSASSA_PKCS1_v1_5):
561
562 2018-11-27  Simon Fraser  <simon.fraser@apple.com>
563
564         Avoid triggering compositing updates when only the root layer is composited
565         https://bugs.webkit.org/show_bug.cgi?id=191813
566
567         Reviewed by Zalan Bujtas.
568
569         If we know that the only composited layer is the root, we can avoid triggering deep
570         compositing updates sometimes, for example when layout changes size or position,
571         or when z-order lists change.
572
573         * rendering/RenderLayer.cpp:
574         (WebCore::RenderLayer::addChild):
575         (WebCore::RenderLayer::removeChild):
576         (WebCore::RenderLayer::updateLayerPosition):
577         (WebCore::RenderLayer::scrollTo):
578         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
579         (WebCore::outputPaintOrderTreeRecursive):
580         * rendering/RenderLayerCompositor.cpp:
581         (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): Consult the layer.hasCompositingDescendant()
582         flag to cut off descendants traversal when possible.
583         (WebCore::RenderLayerCompositor::layerStyleChanged):
584
585 2018-11-27  Eric Carlson  <eric.carlson@apple.com>
586
587         Refactor duplicate code for calling into media controls
588         https://bugs.webkit.org/show_bug.cgi?id=192040
589         <rdar://problem/46278931>
590
591         Reviewed by Youenn Fablet.
592
593         No new tests, no functional change.
594
595         * html/HTMLMediaElement.cpp:
596         (WebCore::HTMLMediaElement::setupAndCallJS):
597         (WebCore::HTMLMediaElement::updateCaptionContainer):
598         (WebCore::HTMLMediaElement::configureTextTrackDisplay):
599         (WebCore::HTMLMediaElement::ensureMediaControlsInjectedScript):
600         (WebCore::HTMLMediaElement::setControllerJSProperty):
601         (WebCore::HTMLMediaElement::didAddUserAgentShadowRoot):
602         (WebCore::HTMLMediaElement::updateMediaControlsAfterPresentationModeChange):
603         (WebCore::HTMLMediaElement::getCurrentMediaControlsStatus):
604         * html/HTMLMediaElement.h:
605
606 2018-11-27  Simon Fraser  <simon.fraser@apple.com>
607
608         Momentum scrolling ends at the wrong place when a scrolling overflow element has a non-zero border
609         https://bugs.webkit.org/show_bug.cgi?id=191322
610
611         Reviewed by Dean Jackson.
612         
613         The scrolling momentum logic in ScrollController::handleWheelEvent() which computes whether the scroll is pinned
614         to the end makes use of ScrollableArea::visibleContentRect(). RenderLayer's implementation of this was incorrect when
615         the layer's element had borders, causing the momentum scroll to stop early.
616         
617         Fix by using the correct size (visible size, not layer size).
618
619         Test: fast/scrolling/momentum-scroll-with-borders.html
620
621         * rendering/RenderLayer.cpp:
622         (WebCore::RenderLayer::visibleContentRectInternal const):
623
624 2018-11-27  Simon Fraser  <simon.fraser@apple.com>
625
626         Composited and tiled layers fail to update on scrolling in WebView
627         https://bugs.webkit.org/show_bug.cgi?id=191821
628         rdar://problem/46009272
629
630         Reviewed by Zalan Bujtas.
631         
632         We relied on AppKit calling -[NSView viewWillDraw] on scrolling to trigger compositing
633         layer flushes which are necessary to update backing store attachment, and tile coverage
634         for tiled layers. However, we no longer get these reliably in WebView, so explicitly trigger
635         flushes if necessary from FrameView::scrollOffsetChangedViaPlatformWidgetImpl().
636         didChangeVisibleRect() is the same code path used by iOS UIWebView for the same purpose.
637
638         Tests: compositing/backing/backing-store-attachment-scroll.html
639                compositing/tiling/tile-coverage-on-scroll.html
640
641         * page/FrameView.cpp:
642         (WebCore::FrameView::scrollOffsetChangedViaPlatformWidgetImpl):
643         * platform/graphics/ca/GraphicsLayerCA.cpp:
644         (WebCore::GraphicsLayerCA::updateCoverage):
645
646 2018-11-27  Timothy Hatcher  <timothy@apple.com>
647
648         Web Inspector: Add support for forcing color scheme appearance in DOM tree.
649         https://bugs.webkit.org/show_bug.cgi?id=191820
650         rdar://problem/46153172
651
652         Reviewed by Devin Rousso.
653
654         Test: inspector/css/force-page-appearance.html
655
656         * inspector/InspectorInstrumentation.cpp:
657         (WebCore::InspectorInstrumentation::defaultAppearanceDidChangeImpl):
658         * inspector/InspectorInstrumentation.h:
659         (WebCore::InspectorInstrumentation::defaultAppearanceDidChange):
660         * inspector/agents/InspectorPageAgent.cpp:
661         (WebCore::InspectorPageAgent::enable): Fire defaultAppearanceDidChange() on macOS Majave.
662         (WebCore::InspectorPageAgent::disable): Call setForcedAppearance() with empty string.
663         (WebCore::InspectorPageAgent::defaultAppearanceDidChange): Added.
664         (WebCore::InspectorPageAgent::setForcedAppearance): Added.
665         * inspector/agents/InspectorPageAgent.h:
666         * page/Page.cpp:
667         (WebCore::Page::setUseDarkAppearance): Call InspectorInstrumentation::defaultAppearanceDidChange().
668         (WebCore::Page::useDarkAppearance const): Return override value if not nullopt.
669         (WebCore::Page::setUseDarkAppearanceOverride): Added.
670         * page/Page.h:
671         (WebCore::Page::defaultUseDarkAppearance const): Added.
672
673 2018-11-27  Tim Horton  <timothy_horton@apple.com>
674
675         Serialize and deserialize editable image strokes
676         https://bugs.webkit.org/show_bug.cgi?id=192002
677         <rdar://problem/30900149>
678
679         Reviewed by Dean Jackson.
680
681         Test: editing/images/paste-editable-image.html
682
683         * html/HTMLImageElement.cpp:
684         (WebCore::HTMLImageElement::parseAttribute):
685         (WebCore::HTMLImageElement::insertedIntoAncestor):
686         (WebCore::HTMLImageElement::didFinishInsertingNode):
687         (WebCore::HTMLImageElement::removedFromAncestor):
688         (WebCore::HTMLImageElement::hasEditableImageAttribute const):
689         (WebCore::HTMLImageElement::updateEditableImage):
690         Call updateEditableImage() from didFinishInsertingNode instead of insertedIntoAncestor.
691         This is helpful because it means we get the final, deduplicated attachment identifier
692         instead of the original one when cloning or pasting.
693
694         This also means that isConnected() is now always accurate when updateEditableImage()
695         is called, so we can remove the argument that allowed us to lie from inside insertedIntoAncestor.
696
697         * html/HTMLImageElement.h:
698         * rendering/RenderImage.cpp:
699         (WebCore::RenderImage::isEditableImage const):
700         Make use of hasEditableImage instead of separately checking for the attribute.
701
702 2018-11-16  Jiewen Tan  <jiewen_tan@apple.com>
703
704         Disallow loading webarchives as iframes
705         https://bugs.webkit.org/show_bug.cgi?id=191728
706         <rdar://problem/45524528>
707
708         Reviewed by Youenn Fablet.
709
710         Disallow loading webarchives as iframes. We don't allow loading remote webarchives.
711         Now, this policy is hardened to disallow loading webarchives as iframes for local
712         documents as well.
713
714         To allow old tests still be able to run, a flag is added to always allow loading local
715         webarchives in document. The flag can be set via window.internals.
716
717         Tests: webarchive/loading/test-loading-archive-subresource.html
718                webarchive/loading/test-loading-top-archive.html
719
720         * dom/Document.h:
721         (WebCore::Document::setAlwaysAllowLocalWebarchive):
722         (WebCore::Document::alwaysAllowLocalWebarchive):
723         * loader/DocumentLoader.cpp:
724         (WebCore::disallowWebArchive):
725         (WebCore::DocumentLoader::continueAfterContentPolicy):
726         (WebCore::isRemoteWebArchive): Deleted.
727         * testing/Internals.cpp:
728         (WebCore::Internals::setAlwaysAllowLocalWebarchive const):
729         * testing/Internals.h:
730         * testing/Internals.idl:
731
732 2018-11-27  Jer Noble  <jer.noble@apple.com>
733
734         Unregister CDMSessionMediaSourceAVFObjC for error notifications during destruction.
735         https://bugs.webkit.org/show_bug.cgi?id=191985
736         <rdar://problem/45972018>
737
738         Reviewed by Eric Carlson.
739
740         * platform/graphics/avfoundation/objc/CDMSessionMediaSourceAVFObjC.mm:
741         (WebCore::CDMSessionMediaSourceAVFObjC::~CDMSessionMediaSourceAVFObjC):
742
743 2018-11-27  Thibault Saunier  <tsaunier@igalia.com>
744
745         [GStreamer][WebRTC] Use LibWebRTC provided vp8 decoders and encoders
746         https://bugs.webkit.org/show_bug.cgi?id=191861
747
748         The GStreamer implementations are less feature full and less tested, now that Apple
749         also use the LibWebRTC provided implementations it makes a lot of sense for us to
750         do the same.
751
752         Basically everything related to temporal scalability is not implemented in GStreamer.
753
754         We should make sure to use GStreamer elements on low powered platforms and for
755         accelerated encoders and decoders.
756
757         Reviewed by Philippe Normand.
758
759         This is mostly refactoring, no new test required.
760
761         * platform/graphics/gstreamer/GStreamerCommon.h: Added GstMappedFrame similar to GstMappedBuffer but for video frames.
762         (WebCore::GstMappedFrame::GstMappedFrame):
763         (WebCore::GstMappedFrame::get):
764         (WebCore::GstMappedFrame::ComponentData):
765         (WebCore::GstMappedFrame::ComponentStride):
766         (WebCore::GstMappedFrame::info):
767         (WebCore::GstMappedFrame::width):
768         (WebCore::GstMappedFrame::height):
769         (WebCore::GstMappedFrame::format):
770         (WebCore::GstMappedFrame::~GstMappedFrame):
771         (WebCore::GstMappedFrame::operator bool const):
772         * platform/graphics/gstreamer/GUniquePtrGStreamer.h:
773         * platform/mediastream/gstreamer/GStreamerVideoFrameLibWebRTC.cpp:
774         (WebCore::GStreamerVideoFrameLibWebRTC::ToI420): Implemented support for converting frame formats with the GstVideoConverter API
775         * platform/mediastream/libwebrtc/GStreamerVideoDecoderFactory.cpp:
776         (WebCore::GStreamerVideoDecoder::GstDecoderFactory):
777         (WebCore::GStreamerVideoDecoder::HasGstDecoder):
778         (WebCore::VP8Decoder::Create): Creates a `webrtc::LibvpxVp8Decoder()` if GStreamer decoder would be the LibVPX based one.
779         (WebCore::GStreamerVideoDecoderFactory::CreateVideoDecoder):
780         * platform/mediastream/libwebrtc/GStreamerVideoEncoder.cpp:
781         (gst_webrtc_video_encoder_class_init):
782         * platform/mediastream/libwebrtc/GStreamerVideoEncoderFactory.cpp: Stop using vp8enc and use LibWebRTC based implementation
783         (WebCore::GStreamerH264Encoder::GStreamerH264Encoder): Renamed H264Encoder to GStreamerH264Encoder to be more coherent with what is done in LibVPX
784         (WebCore::GStreamerVP8Encoder::GStreamerVP8Encoder): Renamed VP8Encoder to GStreamerVP8Encoder to be more coherent with what is done in LibVPX
785         (WebCore::GStreamerVideoEncoderFactory::CreateVideoEncoder):
786         (WebCore::GStreamerVideoEncoderFactory::GetSupportedFormats const):
787
788 2018-11-27  Javier Fernandez  <jfernandez@igalia.com>
789
790         [css-grid] align-self center and position sticky don't work together
791         https://bugs.webkit.org/show_bug.cgi?id=191963
792
793         Reviewed by Manuel Rego Casasnovas.
794
795         This is a fix for a regression introduced in r515391, where we landed
796         the implementation of alignment for positioned objects in a Grid Layout
797         container.
798
799         We assumed that items with non-static positions shouldn't honor the
800         CSS Box Alignment properties. This is only true for out-of-flow items,
801         absolute or fixed positioned elements. However, sticky positioned
802         elements are treated as relative positioned items, but they indeed use
803         non-static position to define their behavior.
804
805         No new tests, this change is covered by current tests and make several cases to pass now.
806
807         * rendering/RenderGrid.cpp:
808         (WebCore::RenderGrid::columnAxisPositionForChild const):
809         (WebCore::RenderGrid::rowAxisPositionForChild const):
810
811 2018-11-26  Daniel Bates  <dabates@apple.com>
812
813         REGRESSION (r238078): Do not draw caps lock indicator when Strong Password button is shown
814         https://bugs.webkit.org/show_bug.cgi?id=191969
815         <rdar://problem/46247569>
816
817         Reviewed by Dean Jackson.
818
819         Following r238078 we now support drawing the caps lock indicator in password fields on iOS.
820         However it is not meaningful to show the caps lock indicator when the Strong Password button
821         is visible because the password field is not editable. We should not paint the caps lock
822         indicator when the Strong Password button is visible.
823
824         Tests: fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-after-hiding-auto-fill-strong-password-button.html
825                fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html
826
827         * html/TextFieldInputType.cpp:
828         (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator const): Do not draw the caps
829         lock indicator when the password field has the Strong Password button.
830         (WebCore::TextFieldInputType::updateAutoFillButton): Call capsLockStateMayHaveChanged() to
831         update the visibility of the caps lock indicator when the auto fill button has changed.
832
833 2018-11-26  Ryan Haddad  <ryanhaddad@apple.com>
834
835         Unreviewed, rolling out r238357.
836
837         One of the layout tests added with this change is failing on Mojave.
838
839         Reverted changeset:
840         "REGRESSION (r238078): Do not draw caps lock indicator when Strong Password button is shown"
841         https://bugs.webkit.org/show_bug.cgi?id=191969
842         https://trac.webkit.org/changeset/238513
843
844 2018-11-26  Tim Horton  <timothy_horton@apple.com>
845
846         Insert <attachment> elements under editable images to make their backing data accessible
847         https://bugs.webkit.org/show_bug.cgi?id=191844
848         <rdar://problem/30900149>
849
850         Reviewed by Simon Fraser.
851
852         Test: editing/images/editable-image-creates-attachment.html
853
854         * html/HTMLImageElement.cpp:
855         (WebCore::HTMLImageElement::parseAttribute):
856         (WebCore::HTMLImageElement::insertedIntoAncestor):
857         (WebCore::HTMLImageElement::removedFromAncestor):
858         When the x-apple-editable-image attribute changes, or the element is
859         moved into or out of a document, call updateEditableImage.
860
861         (WebCore::HTMLImageElement::editableImageViewID const):
862         Adopt EditableImageReference.
863
864         (WebCore::HTMLImageElement::updateEditableImage):
865         When the image element moves into a document, the setting is on, and
866         the appropriate attribute is applied, add an <attachment> into the
867         shadow DOM, and inform the UI process both of the editable image's
868         creation and that it should be associated with the new attachment.
869
870         Use an EditableImageReference to extend the lifetime of the
871         corresponding editable image in the UI process, and to communicate
872         the attachment association.
873
874         If the element was cloned from another editable image element, use the
875         EditableImageReference and attachmentID from the original; the embedded
876         view will be re-parented under this element's layer, and the attachment
877         will be cloned (with a new ID) by editing code if the element is parented.
878
879         (WebCore::HTMLImageElement::attachmentIdentifier const):
880         (WebCore::HTMLImageElement::copyNonAttributePropertiesFromElement):
881         Store the aforementioned bits of information when cloned so that we can
882         reconstitute the appropriate attachment data and embedded view.
883
884         * html/HTMLImageElement.h:
885         * page/ChromeClient.h:
886
887         * Sources.txt:
888         * WebCore.xcodeproj/project.pbxproj:
889         * page/EditableImageReference.cpp: Added.
890         (WebCore::EditableImageReference::EditableImageReference):
891         (WebCore::EditableImageReference::~EditableImageReference):
892         (WebCore::EditableImageReference::associateWithAttachment):
893         * page/EditableImageReference.h: Added.
894         (WebCore::EditableImageReference::create):
895         (WebCore::EditableImageReference::embeddedViewID const):
896         Add EditableImageReference, which manages the lifetime of the UI-side
897         EditableImage and helps clients communicate about it. It is refcounted
898         so that cloned <img> elements can potentially borrow the UI-side state
899         (in the case where they end up getting parented).
900
901         * page/NavigatorBase.cpp:
902         Fix an unrelated unified build failure that I exposed.
903
904 2018-11-26  Jer Noble  <jer.noble@apple.com>
905
906         Adopt -setOverrideRouteSharingPolicy:routingContextUID: SPI
907         https://bugs.webkit.org/show_bug.cgi?id=190951
908         <rdar://problem/45213065>
909
910         Reviewed by Alex Christensen.
911
912         Request the correct route policy and context from the VideoFullscreenModel.
913
914         * platform/cocoa/VideoFullscreenModel.h:
915         (WebCore::VideoFullscreenModel::requestRouteSharingPolicyAndContextUID):
916         * platform/cocoa/VideoFullscreenModelVideoElement.h:
917         * platform/cocoa/VideoFullscreenModelVideoElement.mm:
918         (WebCore::VideoFullscreenModelVideoElement::requestRouteSharingPolicyAndContextUID):
919         * platform/ios/VideoFullscreenInterfaceAVKit.h:
920         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
921         (-[WebAVPlayerViewController setWebKitOverrideRouteSharingPolicy:routingContextUID:]):
922         (VideoFullscreenInterfaceAVKit::setVideoFullscreenModel):
923         (VideoFullscreenInterfaceAVKit::doSetup):
924
925 2018-11-24  Ryosuke Niwa  <rniwa@webkit.org>
926
927         SVG use element inside a shadow tree cannot reference an element in the same tree
928         https://bugs.webkit.org/show_bug.cgi?id=174977
929         <rdar://problem/33665636>
930
931         Reviewed by Zalan Bujtas.
932
933         Make fragment URL references used by SVGelements within a shadow tree to refer to other elements
934         in the same shadow tree. To do this, this patch makes targetElementFromIRIString take a TreeScope
935         instead of a Document, and updates its call sites.
936
937         This patch updates the most uses of targetElementFromIRIString except CSS cursor image, altGraph,
938         and glyphRef since the cursor image isn't really a SVG feature, and there aren't really real world
939         use cases in which altGraph and glyphRef are used within shadow trees.
940
941         Tests: fast/shadow-dom/svg-animate-href-change-in-shadow-tree.html
942                fast/shadow-dom/svg-animate-href-in-shadow-tree.html
943                fast/shadow-dom/svg-feimage-href-in-shadow-tree.html
944                fast/shadow-dom/svg-linear-gradient-href-in-shadow-tree.html
945                fast/shadow-dom/svg-mpath-href-change-in-shadow-tree.html
946                fast/shadow-dom/svg-mpath-href-in-shadow-tree.html
947                fast/shadow-dom/svg-radial-gradient-href-in-shadow-tree.html
948                fast/shadow-dom/svg-text-path-href-change-in-shadow-tree.html
949                fast/shadow-dom/svg-text-path-href-in-shadow-tree.html
950                fast/shadow-dom/svg-thref-href-change-in-shadow-tree.html
951                fast/shadow-dom/svg-thref-href-in-shadow-tree.html
952                fast/shadow-dom/svg-use-href-change-in-shadow-tree.html
953                fast/shadow-dom/svg-use-href-in-shadow-tree.html
954
955         * accessibility/AccessibilitySVGElement.cpp:
956         (WebCore::AccessibilitySVGElement::targetForUseElement const):
957         * css/CSSCursorImageValue.cpp:
958         * rendering/svg/RenderSVGTextPath.cpp:
959         (WebCore::RenderSVGTextPath::layoutPath const):
960         * svg/SVGAltGlyphElement.cpp:
961         (WebCore::SVGAltGlyphElement::hasValidGlyphElements const):
962         * svg/SVGFEImageElement.cpp:
963         (WebCore::SVGFEImageElement::buildPendingResource):
964         (WebCore::SVGFEImageElement::build):
965         * svg/SVGGlyphRefElement.cpp:
966         (WebCore::SVGGlyphRefElement::hasValidGlyphElement const):
967         * svg/SVGLinearGradientElement.cpp:
968         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
969         * svg/SVGMPathElement.cpp:
970         (WebCore::SVGMPathElement::buildPendingResource):
971         (WebCore::SVGMPathElement::pathElement):
972         * svg/SVGRadialGradientElement.cpp:
973         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
974         * svg/SVGTRefElement.cpp:
975         (WebCore::SVGTRefElement::buildPendingResource):
976         * svg/SVGTextPathElement.cpp:
977         (WebCore::SVGTextPathElement::buildPendingResource):
978         * svg/SVGURIReference.cpp:
979         (WebCore::SVGURIReference::targetElementFromIRIString):
980         * svg/SVGURIReference.h:
981         * svg/SVGUseElement.cpp:
982         (WebCore::SVGUseElement::updateShadowTree):
983         (WebCore::SVGUseElement::findTarget const):
984         * svg/animation/SVGSMILElement.cpp:
985         (WebCore::SVGSMILElement::buildPendingResource):
986         (WebCore::SVGSMILElement::insertedIntoAncestor):
987         * svg/graphics/filters/SVGFEImage.cpp:
988         (WebCore::FEImage::FEImage):
989         (WebCore::FEImage::createWithIRIReference):
990         (WebCore::FEImage::referencedRenderer const):
991         * svg/graphics/filters/SVGFEImage.h:
992
993 2018-11-26  Truitt Savell  <tsavell@apple.com>
994
995         Unreviewed, rolling out r238357.
996
997         Casued three css tests to fail and crash on ios sim
998
999         Reverted changeset:
1000
1001         "Avoid triggering compositing updates when only the root layer
1002         is composited"
1003         https://bugs.webkit.org/show_bug.cgi?id=191813
1004         https://trac.webkit.org/changeset/238357
1005
1006 2018-11-26  Daniel Bates  <dabates@apple.com>
1007
1008         Caret disappears at end of password field when caps lock indicator is shown; password field
1009         not scrolled when caps lock indicator is shown
1010         https://bugs.webkit.org/show_bug.cgi?id=191164
1011         <rdar://problem/45738179>
1012
1013         Reviewed by Dean Jackson.
1014
1015         Fixes an issue where the caret may be occluded by- or paint on top of- the caps lock indicator on
1016         Mac and iOS, respectively.
1017
1018         If there has not been a previous selection in a focused password field, including a caret
1019         selection made by pressing the arrow keys, then we never scroll the password field to reveal
1020         the current selection when the caps lock indicator is made visible. When the caps lock indicator
1021         is made visible or hidden the size of the inner text renderer changes as it shrinks or expands
1022         to make space for the caps lock indicator or to fill the void of the now hidden caps lock indicator,
1023         respectively. We should detect such size changes and schedule an update and reveal of the current
1024         selection after layout.
1025
1026         Test: fast/forms/password-scrolled-after-caps-lock-toggled.html
1027
1028         * editing/FrameSelection.cpp:
1029         (WebCore::FrameSelection::setNeedsSelectionUpdate): Modified to take an enum to override the current
1030         selection reveal mode for the next update.
1031         * editing/FrameSelection.h:
1032         * rendering/RenderTextControlSingleLine.cpp:
1033         (WebCore::RenderTextControlSingleLine::layout): Schedule post-layout a selection update that
1034         reveals the current selection. We pass FrameSelection::RevealSelectionAfterUpdate::Forced to ensure
1035         that the scheduled selection update scrolls to the reveal the current selection regardless of selection
1036         reveal mode. This is necessary because typing into a password field does not change the current
1037         selection reveal mode.
1038
1039 2018-11-26  Daniel Bates  <dabates@apple.com>
1040
1041         Placeholder text is not repainted after caps lock indicator is hidden
1042         https://bugs.webkit.org/show_bug.cgi?id=191968
1043         <rdar://problem/46247234>
1044
1045         Reviewed by Zalan Bujtas.
1046
1047         Fixes an issue where the placeholder text in a password field is not repainted when the
1048         caps lock indicator is hidden.
1049
1050         The placeholder renderer is special. It is an excluded child renderer and does not take
1051         part in normal flow layout. It is also created and destroyed as needed. The caps lock
1052         indicator is also special in that it is implemented as a RenderImage and we do not know
1053         its dimensions before it is loaded and the load happens asynchronously. As a result we
1054         detect when the inner text size changes and mark the placeholder as dirty as a way to
1055         keep the dimensions of the placeholder in sync with the dimensions of the inner text.
1056
1057         Test: fast/repaint/placeholder-after-caps-lock-hidden.html
1058
1059         * rendering/RenderTextControlSingleLine.cpp:
1060         (WebCore::RenderTextControlSingleLine::layout): Mark the placeholder as needing layout
1061         the size of the inner text changes.
1062
1063 2018-11-26  Jeremy Jones  <jeremyj@apple.com>
1064
1065         Picture-in-picture window size changes unnecesarily when URL changes.
1066         https://bugs.webkit.org/show_bug.cgi?id=191787
1067
1068         Reviewed by Jer Noble.
1069
1070         When loading a new URL, the video dimensions are temporarily 0,0. Instead of 
1071         defaulting back to 4:3 sized pip window temporarily, keep the old dimensions until
1072         there is a new valid size.
1073
1074         * platform/ios/VideoFullscreenInterfaceAVKit.mm:
1075         (VideoFullscreenInterfaceAVKit::videoDimensionsChanged):
1076
1077 2018-11-26  Andy Estes  <aestes@apple.com>
1078
1079         [Cocoa] Make it easier to encode NSObjects
1080         https://bugs.webkit.org/show_bug.cgi?id=191948
1081
1082         Reviewed by Dean Jackson.
1083
1084         * Modules/applepay/Payment.h: Changed the PKPayment * constructor to take a
1085         RetainPtr<PKPayment>&& instead.
1086         * Modules/applepay/PaymentContact.h: Ditto for PKContact.
1087         * Modules/applepay/PaymentMerchantSession.h: Ditto for PKPaymentMerchantSession.
1088         * Modules/applepay/PaymentMethod.h: Ditto for PKPaymentMethod.
1089         * Modules/applepay/cocoa/PaymentCocoa.mm:
1090         (WebCore::Payment::Payment): Moved definition out-of-line.
1091         (WebCore::Payment::pkPayment const): Ditto.
1092         * Modules/applepay/cocoa/PaymentContactCocoa.mm:
1093         (WebCore::PaymentContact::PaymentContact): Ditto.
1094         (WebCore::PaymentContact::pkContact const): Ditto.
1095         * Modules/applepay/cocoa/PaymentMethodCocoa.mm:
1096         (WebCore::PaymentMethod::PaymentMethod): Ditto.
1097         (WebCore::PaymentMethod::pkPaymentMethod const): Ditto.
1098
1099 2018-11-26  Daniel Bates  <dabates@apple.com>
1100
1101         REGRESSION (r238078): Do not draw caps lock indicator when Strong Password button is shown
1102         https://bugs.webkit.org/show_bug.cgi?id=191969
1103         <rdar://problem/46247569>
1104
1105         Reviewed by Dean Jackson.
1106
1107         Following r238078 we now support drawing the caps lock indicator in password fields on iOS.
1108         However it is not meaningful to show the caps lock indicator when the Strong Password button
1109         is visible because the password field is not editable. We should not paint the caps lock
1110         indicator when the Strong Password button is visible.
1111
1112         Tests: fast/forms/auto-fill-button/caps-lock-indicator-should-be-visible-when-after-hiding-auto-fill-strong-password-button.html
1113                fast/forms/auto-fill-button/caps-lock-indicator-should-not-be-visible-when-auto-fill-strong-password-button-is-visible.html
1114
1115         * html/TextFieldInputType.cpp:
1116         (WebCore::TextFieldInputType::shouldDrawCapsLockIndicator const): Do not draw the caps
1117         lock indicator when the password field has the Strong Password button.
1118         (WebCore::TextFieldInputType::updateAutoFillButton): Call capsLockStateMayHaveChanged() to
1119         update the visibility of the caps lock indicator when the auto fill button has changed.
1120
1121 2018-11-26  Sam Weinig  <sam@webkit.org>
1122
1123         Streamline ListHashSet use in floating object code
1124         https://bugs.webkit.org/show_bug.cgi?id=191957
1125
1126         Reviewed by Alex Christensen.
1127
1128         Simplify use of ListHashSet by using new raw pointer overloads and
1129         making use of reversed order of template arguments in the find() and
1130         contains() overloads that take hash translators.  
1131
1132         * rendering/FloatingObjects.cpp:
1133         (WebCore::FloatingObjects::remove):
1134         Use raw pointer overloads of contains and remove. Remove seperate call
1135         to find / check agains end() which is unnecessary as remove() already
1136         does that.
1137         
1138         * rendering/FloatingObjects.h:
1139         (WebCore::FloatingObjectHashFunctions::hash):
1140         (WebCore::FloatingObjectHashFunctions::equal):
1141         (WebCore::FloatingObjectHashTranslator::hash):
1142         (WebCore::FloatingObjectHashTranslator::equal):
1143         Add hash()/equal() overloads for the raw pointer cases. As the FIXME
1144         notes, this could be simplified by changing PtrHashBase to use designated
1145         bottleneck functions for hash() and equal().
1146
1147         * rendering/RenderBlockFlow.cpp:
1148         (WebCore::RenderBlockFlow::containsFloat const):
1149         (WebCore::RenderBlockFlow::insertFloatingObject):
1150         (WebCore::RenderBlockFlow::removeFloatingObject):
1151         (WebCore::RenderBlockFlow::hasOverhangingFloat):
1152         (WebCore::RenderBlockFlow::addIntrudingFloats):
1153         Use simplified calls.
1154         
1155         * rendering/RenderBlockLineLayout.cpp:
1156         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
1157         (WebCore::RenderBlockFlow::linkToEndLineIfNeeded):
1158         Use simplified calls.
1159
1160 2018-11-26  Jeremy Jones  <jeremyj@apple.com>
1161
1162         Use Full Screen consistently in localizable strings.
1163         https://bugs.webkit.org/show_bug.cgi?id=190363
1164         rdar://problem/43882333
1165
1166         Reviewed by Jon Lee.
1167
1168         No new tests because only change is to localizable strings.
1169
1170         Rename "Fullscreen" to "Full Screen" in localizable strings for consistency.
1171
1172         * English.lproj/Localizable.strings:
1173         * platform/LocalizedStrings.cpp:
1174         (WebCore::contextMenuItemTagEnterVideoFullscreen):
1175         (WebCore::contextMenuItemTagExitVideoFullscreen):
1176         (WebCore::localizedMediaControlElementHelpText):
1177
1178 2018-11-26  Brent Fulgham  <bfulgham@apple.com>
1179
1180         [Win] Reduce the use of WKSI library calls: CoreAnimation
1181         https://bugs.webkit.org/show_bug.cgi?id=191777
1182         <rdar://problem/46140542>
1183
1184         Reviewed by Zalan Bujtas.
1185
1186         Update the Windows build of WebKit to refer to the SPI headers, rather than WebKitSystemInterface.
1187         Move a small amount of glue code from WKSI to WebCore, and remove any includes or link
1188         directives for WebKitSystemInterface.lib.
1189         
1190         No new tests. No change in behavior.
1191
1192         * platform/graphics/BitmapImage.cpp:
1193         * platform/graphics/ca/win/CACFLayerTreeHost.h:
1194         * platform/graphics/ca/win/PlatformCALayerWin.cpp:
1195         (layerTreeHostForLayer):
1196         * platform/graphics/cg/GraphicsContextCG.cpp:
1197         * platform/graphics/cg/PathCG.cpp:
1198         * platform/graphics/cg/PatternCG.cpp:
1199         * platform/graphics/win/WKCAImageQueue.cpp:
1200
1201 2018-11-25  Zalan Bujtas  <zalan@apple.com>
1202
1203         [LFC][IFC] Use float box's margin box to adjust the line constraints.
1204         https://bugs.webkit.org/show_bug.cgi?id=191961
1205
1206         Reviewed by Antti Koivisto.
1207
1208         Test: fast/inline/inline-content-with-float-and-margin.html
1209
1210         (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
1211         (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):
1212         * layout/inlineformatting/InlineFormattingContext.cpp:
1213         (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
1214
1215 2018-11-26  Carlos Garcia Campos  <cgarcia@igalia.com>
1216
1217         [GTK] Accessing default web context before gtk_init results in drawing failure (Gtk-WARNING **: drawing failure for widget 'WebKitWebView': invalid value for an input Visual*)
1218         https://bugs.webkit.org/show_bug.cgi?id=150303
1219
1220         Reviewed by Michael Catanzaro.
1221
1222         Ensure gtk has been initialized before trying to get the default display.
1223
1224         * platform/graphics/PlatformDisplay.cpp:
1225         (WebCore::PlatformDisplay::createPlatformDisplay):
1226
1227 2018-11-26  Javier Fernandez  <jfernandez@igalia.com>
1228
1229         [css-grid] absolute positioned child is sized wrongly when using auto-fit, generating spurious collapsed tracks
1230         https://bugs.webkit.org/show_bug.cgi?id=191938
1231
1232         Reviewed by Manuel Rego Casasnovas.
1233
1234         The guttersSize function has a complex logic to compute the gaps in a
1235         specific GridSpan, considering different scenarios of collapsed tracks
1236         for such span.
1237
1238         The first case is avoiding the duplicated gap because of trailing
1239         collapsed tracks.
1240
1241         The second case considered is looking for non-empty tracks before the
1242         GridSpan end, if it points to an empty track, so we must add this gap.
1243
1244         The last case is to consider the gap of non-empty tracks after the
1245         GridSpan end line, if it points to an empty track.
1246
1247         There are several cases that are not considered or incorrectly computed.
1248         This patch addresses those cases; basically, we should only consider gaps
1249         when there are non-empty tracks before and after the collapsed tracks.
1250         Additionally, we should avoid duplicating the gaps size adding both,
1251         before and after non-empty track's gap.
1252
1253         No new tests, this change is covered by current tests and make several cases to pass now.
1254
1255         * rendering/RenderGrid.cpp:
1256         (WebCore::RenderGrid::guttersSize const):
1257
1258 2018-11-26  Manuel Rego Casasnovas  <rego@igalia.com>
1259
1260         [css-grid] Fix grid container sizing under min-content height
1261         https://bugs.webkit.org/show_bug.cgi?id=191889
1262
1263         Reviewed by Javier Fernandez.
1264
1265         The spec is quite clear
1266         (https://drafts.csswg.org/css-sizing/#valdef-width-min-content):
1267           "min-content
1268              If specified for the inline axis, use the min-content inline size;
1269              otherwise behaves as the property’s initial value."
1270
1271         So if a grid container has "height: min-content" it should behave
1272         the same than with "height: auto".
1273
1274         The patch removes computeIntrinsicLogicalContentHeightUsing() in
1275         RenderGrid as we don't need a custom one anymore.
1276         We can also get rid of m_minContentHeight and m_maxContentHeight
1277         attributes that were only used for this logic.
1278
1279         Test: fast/css-grid-layout/grid-track-sizing-with-orthogonal-flows.html
1280               fast/css-grid-layout/maximize-tracks-definite-indefinite-height.html
1281               imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-sizing-constraints-001.html
1282
1283         * rendering/RenderGrid.cpp:
1284         (WebCore::RenderGrid::layoutBlock):
1285         (WebCore::RenderGrid::computeIntrinsicLogicalWidths const):
1286         (WebCore::RenderGrid::computeTrackSizesForIndefiniteSize const):
1287         * rendering/RenderGrid.h:
1288
1289 2018-11-25  Zalan Bujtas  <zalan@apple.com>
1290
1291         [LFC] Remove PointInContainingBlock and PositionInContainingBlock
1292         https://bugs.webkit.org/show_bug.cgi?id=191954
1293
1294         Reviewed by Antti Koivisto.
1295
1296         Use Point and Position instead. Points and positions are by default in the containing block's coordinate system.
1297
1298         * layout/FormattingContextGeometry.cpp:
1299         (WebCore::Layout::contentHeightForFormattingContextRoot):
1300         * layout/LayoutUnits.h:
1301         (WebCore::Layout::Position::operator LayoutUnit const):
1302         (WebCore::Layout::operator<):
1303         (WebCore::Layout::operator==):
1304         * layout/floats/FloatAvoider.cpp:
1305         (WebCore::Layout::FloatAvoider::FloatAvoider):
1306         (WebCore::Layout::FloatAvoider::setHorizontalConstraints):
1307         (WebCore::Layout::FloatAvoider::horizontalPositionCandidate):
1308         (WebCore::Layout::FloatAvoider::initialHorizontalPosition const):
1309         * layout/floats/FloatBox.cpp:
1310         (WebCore::Layout::FloatBox::horizontalPositionCandidate):
1311         (WebCore::Layout::FloatBox::verticalPositionCandidate):
1312         (WebCore::Layout::FloatBox::initialVerticalPosition const):
1313         * layout/floats/FloatingContext.cpp:
1314         (WebCore::Layout::FloatingContext::positionForFloat const):
1315         (WebCore::Layout::FloatingContext::positionForFloatAvoiding const):
1316         (WebCore::Layout::FloatingContext::verticalPositionWithClearance const):
1317         (WebCore::Layout::FloatingContext::floatingPosition const):
1318         (WebCore::Layout::FloatingPair::horizontalConstraints const):
1319         (WebCore::Layout::FloatingPair::bottom const):
1320         * layout/floats/FloatingContext.h:
1321         * layout/floats/FloatingState.cpp:
1322         (WebCore::Layout::FloatingState::constraints const):
1323         (WebCore::Layout::FloatingState::bottom const):
1324         * layout/floats/FloatingState.h:
1325         (WebCore::Layout::FloatingState::FloatItem::bottom const):
1326         * layout/inlineformatting/InlineFormattingContext.cpp:
1327         (WebCore::Layout::InlineFormattingContext::initializeNewLine const):
1328
1329 2018-11-25  Zalan Bujtas  <zalan@apple.com>
1330
1331         [LFC] Rename Layout::Position to Layout::Point
1332         https://bugs.webkit.org/show_bug.cgi?id=191950
1333
1334         Reviewed by Antti Koivisto.
1335
1336         It actually represents a point.
1337
1338         * layout/FormattingContext.cpp:
1339         (WebCore::Layout::FormattingContext::mapTopLeftToAncestor):
1340         (WebCore::Layout::FormattingContext::mapCoordinateToAncestor):
1341         * layout/FormattingContext.h:
1342         * layout/LayoutUnits.h:
1343         (WebCore::Layout::Point::Point):
1344         (WebCore::Layout::Point::moveBy):
1345         (WebCore::Layout::Position::operator LayoutPoint const): Deleted.
1346         (WebCore::Layout::Position::Position): Deleted.
1347         (WebCore::Layout::Position::moveBy): Deleted.
1348         * layout/blockformatting/BlockFormattingContext.h:
1349         * layout/blockformatting/BlockFormattingContextGeometry.cpp:
1350         (WebCore::Layout::BlockFormattingContext::Geometry::staticPosition):
1351         * layout/floats/FloatingState.cpp:
1352         (WebCore::Layout::FloatingState::constraints const):
1353
1354 2018-11-25  Zalan Bujtas  <zalan@apple.com>
1355
1356         [LFC] Floating code should use typed positions (PositionInContextRoot).
1357         https://bugs.webkit.org/show_bug.cgi?id=191949
1358
1359         Reviewed by Antti Koivisto.
1360
1361         Use PositionInContextRoot instead of LayoutUnit.
1362
1363         * layout/floats/FloatingState.cpp:
1364         (WebCore::Layout::FloatingState::constraints const):
1365         (WebCore::Layout::FloatingState::bottom const):
1366         * layout/floats/FloatingState.h:
1367         (WebCore::Layout::FloatingState::leftBottom const):
1368         (WebCore::Layout::FloatingState::rightBottom const):
1369         (WebCore::Layout::FloatingState::bottom const):
1370
1371 2018-11-25  Zalan Bujtas  <zalan@apple.com>
1372
1373         Fix build after r238472.
1374
1375         * layout/inlineformatting/InlineFormattingContext.cpp:
1376         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
1377         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1378         (WebCore::Layout::InlineFormattingContext::Geometry::runWidth):
1379         * layout/inlineformatting/InlineLineBreaker.cpp:
1380         (WebCore::Layout::InlineLineBreaker::textWidth const):
1381
1382 2018-11-25  Tim Horton  <timothy_horton@apple.com>
1383
1384         Make it possible to insert editable images with a gesture
1385         https://bugs.webkit.org/show_bug.cgi?id=191937
1386
1387         Reviewed by Wenson Hsieh.
1388
1389         Tests:
1390             editing/images/redo-insert-editable-image-maintains-strokes.html,
1391             editing/images/undo-insert-editable-image.html,
1392             editing/images/basic-editable-image-from-execCommand.html
1393
1394         * Sources.txt:
1395         * WebCore.xcodeproj/project.pbxproj:
1396         * Source/WebCore/editing/EditorCommand.cpp:
1397         * Source/WebCore/en.lproj/Localizable.strings:
1398         * editing/EditAction.h:
1399         * editing/Editor.cpp:
1400         (WebCore::Editor::insertEditableImage):
1401         * editing/Editor.h:
1402         * editing/InsertEditableImageCommand.cpp: Added.
1403         (WebCore::InsertEditableImageCommand::InsertEditableImageCommand):
1404         (WebCore::InsertEditableImageCommand::doApply):
1405         * editing/InsertEditableImageCommand.h: Added.
1406         (WebCore::InsertEditableImageCommand::create):
1407         * editing/VisibleSelection.cpp:
1408         Add an editor command that inserts an editable image.
1409         It will likely get a bit more complicated, but for now it just inserts
1410         a 100% by 300px editable image.
1411
1412 2018-11-24  Wenson Hsieh  <wenson_hsieh@apple.com>
1413
1414         [Cocoa] Fix a few localizable string descriptions in WebEditCommandProxy.cpp and WebEditorClient.mm
1415         https://bugs.webkit.org/show_bug.cgi?id=191945
1416
1417         Reviewed by Anders Carlsson.
1418
1419         Run `update-webkit-localizable-strings`.
1420
1421         * en.lproj/Localizable.strings:
1422
1423 2018-11-24  Sam Weinig  <sam@webkit.org>
1424
1425         Remove now unnecessary specialized ListHashSet from InlineItem.h
1426         https://bugs.webkit.org/show_bug.cgi?id=191946
1427
1428         Reviewed by Zalan Bujtas.
1429
1430         Now that ListHashSet supports raw pointer overloads for smart pointers,
1431         we can fix the FIXME in InlineItem.h and remove the specialized ListHashSet
1432         and ListHashSet::find calls.
1433
1434         * layout/inlineformatting/InlineFormattingContext.cpp:
1435         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
1436         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
1437         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1438         (WebCore::Layout::InlineFormattingContext::Geometry::runWidth):
1439         * layout/inlineformatting/InlineItem.h:
1440         (WebCore::Layout::InlineItemHashFunctions::hash): Deleted.
1441         (WebCore::Layout::InlineItemHashFunctions::equal): Deleted.
1442         (WebCore::Layout::InlineItemHashTranslator::hash): Deleted.
1443         (WebCore::Layout::InlineItemHashTranslator::equal): Deleted.
1444         * layout/inlineformatting/InlineLineBreaker.cpp:
1445         (WebCore::Layout::InlineLineBreaker::textWidth const):
1446
1447 2018-11-24  Wenson Hsieh  <wenson_hsieh@apple.com>
1448
1449         [Cocoa] Add WKWebView SPI to trigger and remove data detection
1450         https://bugs.webkit.org/show_bug.cgi?id=191918
1451         <rdar://problem/36185051>
1452
1453         Reviewed by Tim Horton.
1454
1455         Add a helper method on DataDetection to remove all data detected links in the given document. See WebKit changes
1456         for more detail.
1457
1458         * editing/cocoa/DataDetection.h:
1459         * editing/cocoa/DataDetection.mm:
1460         (WebCore::DataDetection::removeDataDetectedLinksInDocument):
1461
1462 2018-11-24  Andy Estes  <aestes@apple.com>
1463
1464         [Cocoa] SOFT_LINK_CLASS_FOR_{HEADER,SOURCE} should generate a more concise getter function
1465         https://bugs.webkit.org/show_bug.cgi?id=191899
1466
1467         Reviewed by Dean Jackson.
1468
1469         * editing/cocoa/DataDetection.mm:
1470         * editing/cocoa/FontAttributesCocoa.mm:
1471         * editing/cocoa/FontShadowCocoa.mm:
1472         * platform/cocoa/DataDetectorsCoreSoftLink.h:
1473         * platform/graphics/cocoa/ColorCocoa.mm:
1474         * platform/ios/PlatformScreenIOS.mm:
1475
1476 2018-11-23  Jiewen Tan  <jiewen_tan@apple.com>
1477
1478         [WebAuthN] Enable Web Authentication as an experimental feature for macOS
1479         https://bugs.webkit.org/show_bug.cgi?id=191932
1480         rdar://problem/46225210
1481
1482         Reviewed by Brent Fulgham.
1483
1484         Add myself to the contact of Web Authentication.
1485
1486         * features.json:
1487
1488 2018-11-23  Ryosuke Niwa  <rniwa@webkit.org>
1489
1490         REGRESSION (r236785): Nullptr crash in StyledMarkupAccumulator::traverseNodesForSerialization
1491         https://bugs.webkit.org/show_bug.cgi?id=191921
1492
1493         Reviewed by Dean Jackson.
1494
1495         The bug was caused by traverseNodesForSerialization not being able to traverse past the end of shadow root
1496         when skipping children of a node for which enterNode returns false because  it was using NodeTraversal's
1497         nextSkippingChildren instead of a member function which supports traversing the composed tree.
1498
1499         Fixed the crash by using variant of nextSkippingChildren which knows how to traverse past the last node
1500         in a shadow tree. Also added more assertions to help debug issues like this in the future.
1501
1502         Test: editing/pasteboard/copy-paste-across-shadow-boundaries-5.html
1503
1504         * editing/markup.cpp:
1505         (WebCore::StyledMarkupAccumulator::traverseNodesForSerialization):
1506
1507 2018-11-22  Ryosuke Niwa  <rniwa@webkit.org>
1508
1509         Updating href on textPath doesn't update its rendering
1510         https://bugs.webkit.org/show_bug.cgi?id=191920
1511
1512         Reviewed by Dean Jackson.
1513
1514         Fixed the bug by invalidating the RenderSVGResource in SVGTextPathElement::svgAttributeChanged
1515         in addition to updating the pending resources.
1516
1517         Test: svg/text/textpath-reference-update.html
1518
1519         * svg/SVGTextPathElement.cpp:
1520         (WebCore::SVGTextPathElement::svgAttributeChanged):
1521
1522 2018-11-23  Ross Kirsling  <ross.kirsling@sony.com>
1523
1524         Introduce user-defined literal for LayoutUnit
1525         https://bugs.webkit.org/show_bug.cgi?id=191915
1526
1527         Reviewed by Dean Jackson.
1528
1529         * platform/LayoutUnit.h:
1530         Introduce a user-defined literal for LayoutUnit, _lu, replacing the existing "fromPixel" factory function.
1531
1532         * layout/FormattingContextGeometry.cpp:
1533         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1534         * layout/inlineformatting/InlineLineBreaker.cpp:
1535         * page/FrameView.cpp:
1536         * page/FrameViewLayoutContext.h:
1537         * page/Page.cpp:
1538         * page/SpatialNavigation.h:
1539         * platform/ScrollableArea.cpp:
1540         * rendering/EllipsisBox.cpp:
1541         * rendering/FlexibleBoxAlgorithm.cpp:
1542         * rendering/FloatingObjects.cpp:
1543         * rendering/GridLayoutFunctions.cpp:
1544         * rendering/GridTrackSizingAlgorithm.cpp:
1545         * rendering/InlineFlowBox.cpp:
1546         * rendering/InlineTextBox.cpp:
1547         * rendering/LayoutState.h:
1548         * rendering/LogicalSelectionOffsetCaches.h:
1549         * rendering/RenderBlock.cpp:
1550         * rendering/RenderBlock.h:
1551         * rendering/RenderBlockFlow.cpp:
1552         * rendering/RenderBlockFlow.h:
1553         * rendering/RenderBlockLineLayout.cpp:
1554         * rendering/RenderBox.cpp:
1555         * rendering/RenderBoxModelObject.cpp:
1556         * rendering/RenderDeprecatedFlexibleBox.cpp:
1557         * rendering/RenderDeprecatedFlexibleBox.h:
1558         * rendering/RenderElement.cpp:
1559         * rendering/RenderFlexibleBox.cpp:
1560         * rendering/RenderFlexibleBox.h:
1561         * rendering/RenderFragmentContainer.cpp:
1562         * rendering/RenderFragmentedFlow.cpp:
1563         * rendering/RenderGrid.cpp:
1564         * rendering/RenderGrid.h:
1565         * rendering/RenderImage.cpp:
1566         * rendering/RenderLayer.cpp:
1567         * rendering/RenderListMarker.cpp:
1568         * rendering/RenderMultiColumnFlow.cpp:
1569         * rendering/RenderMultiColumnSet.cpp:
1570         * rendering/RenderReplaced.cpp:
1571         * rendering/RenderReplaced.h:
1572         * rendering/RenderRubyRun.h:
1573         * rendering/RenderTable.cpp:
1574         * rendering/RenderTable.h:
1575         * rendering/RenderTableSection.cpp:
1576         * rendering/RenderTheme.cpp:
1577         * rendering/RenderTreeAsText.cpp:
1578         * rendering/RenderView.cpp:
1579         * rendering/RootInlineBox.h:
1580         * rendering/SimpleLineLayout.cpp:
1581         * rendering/SimpleLineLayoutPagination.cpp:
1582         * rendering/TableLayout.h:
1583         * rendering/line/BreakingContext.h:
1584         * rendering/line/LineLayoutState.h:
1585         * rendering/line/LineWidth.h:
1586         * rendering/mathml/MathOperator.cpp:
1587         * rendering/mathml/MathOperator.h:
1588         * rendering/mathml/RenderMathMLBlock.h:
1589         * rendering/mathml/RenderMathMLFraction.cpp:
1590         * rendering/mathml/RenderMathMLFraction.h:
1591         * rendering/mathml/RenderMathMLMath.cpp:
1592         * rendering/mathml/RenderMathMLMath.h:
1593         * rendering/mathml/RenderMathMLMenclose.h:
1594         * rendering/mathml/RenderMathMLOperator.cpp:
1595         * rendering/mathml/RenderMathMLOperator.h:
1596         * rendering/mathml/RenderMathMLPadded.h:
1597         * rendering/mathml/RenderMathMLRoot.cpp:
1598         * rendering/mathml/RenderMathMLRoot.h:
1599         * rendering/mathml/RenderMathMLRow.h:
1600         * rendering/mathml/RenderMathMLScripts.cpp:
1601         * rendering/mathml/RenderMathMLScripts.h:
1602         * rendering/mathml/RenderMathMLSpace.h:
1603         * rendering/mathml/RenderMathMLToken.cpp:
1604         * rendering/mathml/RenderMathMLToken.h:
1605         * rendering/mathml/RenderMathMLUnderOver.h:
1606         * rendering/shapes/ShapeOutsideInfo.cpp:
1607         * rendering/style/CollapsedBorderValue.h:
1608         Update all instances of LayoutUnit(), LayoutUnit(0), LayoutUnit { 0 }, etc. and add any other
1609         literal conversions that will be needed when making non-int LayoutUnit constructors explicit.
1610         For good measure, also mark all default values for LayoutUnit parameters.
1611
1612 2018-11-23  Jim Mason  <jmason@ibinx.com>
1613
1614         [GTK] Scrollbars not following gtk-primary-button-warps-slider setting
1615         https://bugs.webkit.org/show_bug.cgi?id=191067
1616
1617         Updated code per the style guide, removed unreachable break (non-semantic change)
1618
1619         Reviewed by Michael Catanzaro.
1620
1621         * platform/gtk/ScrollbarThemeGtk.cpp:
1622         (WebCore::ScrollbarThemeGtk::handleMousePressEvent):
1623
1624 2018-11-23  Wenson Hsieh  <wenson_hsieh@apple.com>
1625
1626         Enable drag and drop support for iOSMac
1627         https://bugs.webkit.org/show_bug.cgi?id=191818
1628         <rdar://problem/43907454>
1629
1630         Reviewed by Dean Jackson.
1631
1632         Enables drag and drop by default on iOSMac by switching on ENABLE_DATA_INTERACTION and ENABLE_DRAG_SUPPORT. This
1633         enables support for dragging links, text selections, and images, though many advanced features (e.g. custom
1634         pasteboard data) will require additional support from the platform.
1635
1636         * Configurations/FeatureDefines.xcconfig:
1637         * platform/ios/PlatformPasteboardIOS.mm:
1638         (WebCore::PlatformPasteboard::informationForItemAtIndex):
1639         (WebCore::registerItemToPasteboard):
1640         (WebCore::PlatformPasteboard::typesSafeForDOMToReadAndWrite const):
1641         * platform/ios/WebItemProviderPasteboard.mm:
1642         (-[WebItemProviderLoadResult canBeRepresentedAsFileUpload]):
1643         (-[WebItemProviderPasteboard numberOfFiles]):
1644
1645         Disable codepaths which attempt to access or set `teamData` or `preferredPresentationStyle` on `NSItemProvider`
1646         in iOSMac, since these are currently unimplemented.
1647
1648 2018-11-23  Zalan Butjas  <zalan@apple.com>
1649
1650         [LFC][IFC] Add support for variable height runs.
1651         https://bugs.webkit.org/show_bug.cgi?id=191925
1652
1653         Reviewed by Antti Koivisto.
1654
1655         https://www.w3.org/TR/CSS22/visudet.html#inline-box-height
1656
1657         10.8 Line height calculations: the 'line-height' and 'vertical-align' properties
1658
1659         The height of each inline-level box in the line box is calculated. For replaced elements, inline-block elements,
1660         and inline-table elements, this is the height of their margin box; for inline boxes, this is their 'line-height'.
1661
1662         The line box height is the distance between the uppermost box top and the lowermost box bottom.
1663
1664         The minimum height consists of a minimum height above the baseline and a minimum depth below it,
1665         exactly as if each line box starts with a zero-width inline box with the element's font and line height properties.
1666         We call that imaginary box a "strut." (The name is inspired by TeX.).
1667
1668         Test: fast/inline/inline-content-with-image-simple.html
1669
1670         * layout/Verification.cpp:
1671         (WebCore::Layout::checkForMatchingNonTextRuns):
1672         (WebCore::Layout::checkForMatchingTextRuns):
1673         (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
1674         * layout/inlineformatting/InlineFormattingContext.cpp:
1675         (WebCore::Layout::InlineFormattingContext::initializeNewLine const):
1676         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
1677         (WebCore::Layout::InlineFormattingContext::createFinalRuns const):
1678         (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
1679         (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
1680         * layout/inlineformatting/InlineFormattingContext.h:
1681         (WebCore::Layout::InlineFormattingContext::Line::logicalHeight const):
1682         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
1683         (WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns):
1684         * layout/inlineformatting/InlineRun.h:
1685         (WebCore::Layout::InlineRun::logicalWidth const):
1686         (WebCore::Layout::InlineRun::logicalHeight const):
1687         (WebCore::Layout::InlineRun::setLogicalWidth):
1688         (WebCore::Layout::InlineRun::width const): Deleted.
1689         (WebCore::Layout::InlineRun::height const): Deleted.
1690         (WebCore::Layout::InlineRun::setWidth): Deleted.
1691         * layout/inlineformatting/Line.cpp:
1692         (WebCore::Layout::InlineFormattingContext::Line::init):
1693         (WebCore::Layout::InlineFormattingContext::Line::appendContent):
1694         (WebCore::Layout::InlineFormattingContext::Line::close):
1695         * layout/layouttree/LayoutTreeBuilder.cpp:
1696         (WebCore::Layout::outputInlineRuns):
1697
1698 2018-11-23  Antti Koivisto  <antti@apple.com>
1699
1700         UI side compositing doesn't paint on Mac
1701         https://bugs.webkit.org/show_bug.cgi?id=191908
1702
1703         Reviewed by Tim Horton.
1704
1705         For clarity put RGB10 and RGB10A8 formats behind PLATFORM(IOS_FAMILY). They are not supported on Mac.
1706
1707         * platform/graphics/cocoa/IOSurface.h:
1708         * platform/graphics/cocoa/IOSurface.mm:
1709         (WebCore::IOSurface::IOSurface):
1710         (WebCore::IOSurface::ensurePlatformContext):
1711         (WebCore::IOSurface::format const):
1712         (WebCore::operator<<):
1713
1714 2018-11-23  Javier Fernandez  <jfernandez@igalia.com>
1715
1716         [css-grid] Implement Baseline Alignment for grid items
1717         https://bugs.webkit.org/show_bug.cgi?id=145566
1718
1719         Reviewed by Manuel Rego Casasnovas.
1720
1721         This patch impements the Baseline Self-Alignment feature for grid items according to
1722         the CSS Box Alignment specification [1].
1723
1724         This new layout logic is handled by the Self-Alignment (justify-self and align-self)
1725         and Default-Alignment (justify-items and align-items) CSS properties.
1726
1727         This feature allows users to align the grid items sharing a Baseline Alignment Context,
1728         either row or column contexts, based on their respective baselines.
1729
1730         [1] https://drafts.csswg.org/css-align-3/#baseline-align-self
1731
1732         Tests: fast/css-grid-layout/grid-self-baseline-and-flex-tracks-with-indefinite-container-crash.html
1733                fast/css-grid-layout/grid-self-baseline-and-flexible-tracks-should-not-crash.html
1734                fast/css-grid-layout/grid-self-baseline-and-item-relayout-should-not-crash.html
1735                fast/css-grid-layout/grid-self-baseline-and-relative-sized-items-crash.html
1736                fast/css-grid-layout/grid-self-baseline-and-relative-sized-tracks-crash.html
1737                fast/css-grid-layout/grid-self-baseline-followed-by-item-style-change-should-not-crash.html
1738
1739         * Sources.txt:
1740         * rendering/GridBaselineAlignment.cpp: Added.
1741         (WebCore::GridBaselineAlignment::marginOverForChild const):
1742         (WebCore::GridBaselineAlignment::marginUnderForChild const):
1743         (WebCore::GridBaselineAlignment::logicalAscentForChild const):
1744         (WebCore::GridBaselineAlignment::ascentForChild const):
1745         (WebCore::GridBaselineAlignment::descentForChild const):
1746         (WebCore::GridBaselineAlignment::isDescentBaselineForChild const):
1747         (WebCore::GridBaselineAlignment::isHorizontalBaselineAxis const):
1748         (WebCore::GridBaselineAlignment::isOrthogonalChildForBaseline const):
1749         (WebCore::GridBaselineAlignment::isParallelToBaselineAxisForChild const):
1750         (WebCore::GridBaselineAlignment::baselineGroupForChild const):
1751         (WebCore::GridBaselineAlignment::updateBaselineAlignmentContext):
1752         (WebCore::GridBaselineAlignment::baselineOffsetForChild const):
1753         (WebCore::GridBaselineAlignment::clear):
1754         (WebCore::BaselineGroup::BaselineGroup):
1755         (WebCore::BaselineGroup::update):
1756         (WebCore::BaselineGroup::isOppositeBlockFlow const):
1757         (WebCore::BaselineGroup::isOrthogonalBlockFlow const):
1758         (WebCore::BaselineGroup::isCompatible const):
1759         (WebCore::BaselineContext::BaselineContext):
1760         (WebCore::BaselineContext::sharedGroup const):
1761         (WebCore::BaselineContext::updateSharedGroup):
1762         (WebCore::BaselineContext::findCompatibleSharedGroup):
1763         * rendering/GridBaselineAlignment.h: Added.
1764         (WebCore::BaselineGroup::maxAscent const):
1765         (WebCore::BaselineGroup::maxDescent const):
1766         (WebCore::BaselineGroup::size const):
1767         (WebCore::isBaselinePosition):
1768         (WebCore::GridBaselineAlignment::setBlockFlow):
1769         * rendering/GridLayoutFunctions.h:
1770         * rendering/GridTrackSizingAlgorithm.cpp:
1771         (WebCore::gridAxisForDirection):
1772         (WebCore::gridDirectionForAxis):
1773         (WebCore::GridTrackSizingAlgorithm::availableSpace const):
1774         (WebCore::GridTrackSizingAlgorithm::isIntrinsicSizedGridArea const):
1775         (WebCore::GridTrackSizingAlgorithmStrategy::logicalHeightForChild const):
1776         (WebCore::GridTrackSizingAlgorithmStrategy::minContentForChild const):
1777         (WebCore::GridTrackSizingAlgorithmStrategy::maxContentForChild const):
1778         (WebCore::GridTrackSizingAlgorithmStrategy::minSizeForChild const):
1779         (WebCore::GridTrackSizingAlgorithm::canParticipateInBaselineAlignment const):
1780         (WebCore::GridTrackSizingAlgorithm::participateInBaselineAlignment const):
1781         (WebCore::GridTrackSizingAlgorithm::updateBaselineAlignmentContext):
1782         (WebCore::GridTrackSizingAlgorithm::baselineOffsetForChild const):
1783         (WebCore::GridTrackSizingAlgorithm::clearBaselineItemsCache):
1784         (WebCore::GridTrackSizingAlgorithm::cacheBaselineAlignedItem):
1785         (WebCore::GridTrackSizingAlgorithm::copyBaselineItemsCache):
1786         (WebCore::GridTrackSizingAlgorithm::setup):
1787         (WebCore::GridTrackSizingAlgorithm::computeBaselineAlignmentContext):
1788         * rendering/GridTrackSizingAlgorithm.h:
1789         * rendering/RenderBlockFlow.cpp:
1790         (WebCore::RenderBlockFlow::firstLineBaseline const):
1791         * rendering/RenderGrid.cpp:
1792         (WebCore::RenderGrid::layoutBlock):
1793         (WebCore::RenderGrid::computeIntrinsicLogicalWidths const):
1794         (WebCore::RenderGrid::placeItemsOnGrid const):
1795         (WebCore::RenderGrid::performGridItemsPreLayout const):
1796         (WebCore::synthesizedBaselineFromMarginBox):
1797         (WebCore::RenderGrid::isBaselineAlignmentForChild const):
1798         (WebCore::RenderGrid::baselinePosition const):
1799         (WebCore::RenderGrid::firstLineBaseline const):
1800         (WebCore::RenderGrid::inlineBlockBaseline const):
1801         (WebCore::RenderGrid::columnAxisBaselineOffsetForChild const):
1802         (WebCore::RenderGrid::rowAxisBaselineOffsetForChild const):
1803         (WebCore::RenderGrid::columnAxisOffsetForChild const):
1804         (WebCore::RenderGrid::rowAxisOffsetForChild const):
1805         * rendering/RenderGrid.h:
1806
1807 2018-11-22  Wenson Hsieh  <wenson_hsieh@apple.com>
1808
1809         Address post-review feedback after r238438
1810         https://bugs.webkit.org/show_bug.cgi?id=191913
1811
1812         Reviewed by Ryosuke Niwa.
1813
1814         Replace `bool` arguments to `FrameSelection::setSelectedRange`, `Editor::replaceSelectionWithText`, and
1815         `Editor::replaceSelectionWithFragment` with `enum class`es instead. In particular, introduce the following:
1816
1817         FrameSelection::ShouldCloseTyping { No, Yes }
1818         Editor::SelectReplacement { No, Yes }
1819         Editor::SmartReplace { No, Yes }
1820         Editor::MatchStyle { No, Yes }
1821
1822         * accessibility/AccessibilityObject.cpp:
1823         (WebCore::AccessibilityObject::selectText):
1824         * editing/Editor.cpp:
1825         (WebCore::Editor::handleTextEvent):
1826         (WebCore::Editor::replaceSelectionWithFragment):
1827         (WebCore::Editor::replaceSelectionWithText):
1828         (WebCore::Editor::setComposition):
1829         (WebCore::Editor::markMisspellingsAfterTypingToWord):
1830         (WebCore::Editor::changeBackToReplacedString):
1831         (WebCore::Editor::transpose):
1832         (WebCore::Editor::insertAttachment):
1833
1834         At various call sites, replace boolean arguments with named enums.
1835
1836         * editing/Editor.h:
1837         * editing/EditorCommand.cpp:
1838         (WebCore::expandSelectionToGranularity):
1839         (WebCore::executeDeleteToMark):
1840         (WebCore::executeSelectToMark):
1841         * editing/FrameSelection.cpp:
1842         (WebCore::FrameSelection::setSelectedRange):
1843         * editing/FrameSelection.h:
1844         * page/Page.cpp:
1845         (WebCore::replaceRanges):
1846
1847         Avoid a bit of ref-count churn, and adjust a few functions to take `const Vector&`s instead of `Vector&&`s.
1848
1849         (WebCore::Page::replaceRangesWithText):
1850         (WebCore::Page::replaceSelectionWithText):
1851         * page/Page.h:
1852
1853 2018-11-21  Ryosuke Niwa  <rniwa@webkit.org>
1854
1855         Modernize SVGURIReference::targetElementFromIRIString
1856         https://bugs.webkit.org/show_bug.cgi?id=191898
1857
1858         Reviewed by Daniel Bates.
1859
1860         Made targetElementFromIRIString return an element and the fragment identifier,
1861         and merged urlFromIRIStringWithFragmentIdentifier into it.
1862
1863         Also replaced the code computing the full URL using the base URL after removing
1864         the fragment identifier and rejoining it later with a single call to completeURL.
1865
1866         No new tests since there should be no observable behavior change.
1867
1868         * accessibility/AccessibilitySVGElement.cpp:
1869         (WebCore::AccessibilitySVGElement::targetForUseElement const):
1870         * css/CSSCursorImageValue.cpp:
1871         (WebCore::CSSCursorImageValue::updateCursorElement):
1872         * rendering/svg/RenderSVGTextPath.cpp:
1873         (WebCore::RenderSVGTextPath::layoutPath const):
1874         * svg/SVGAltGlyphElement.cpp:
1875         (WebCore::SVGAltGlyphElement::hasValidGlyphElements const):
1876         * svg/SVGFEImageElement.cpp:
1877         (WebCore::SVGFEImageElement::buildPendingResource):
1878         * svg/SVGGlyphRefElement.cpp:
1879         (WebCore::SVGGlyphRefElement::hasValidGlyphElement const):
1880         * svg/SVGLinearGradientElement.cpp:
1881         (WebCore::SVGLinearGradientElement::collectGradientAttributes):
1882         * svg/SVGMPathElement.cpp:
1883         (WebCore::SVGMPathElement::buildPendingResource):
1884         (WebCore::SVGMPathElement::pathElement):
1885         * svg/SVGRadialGradientElement.cpp:
1886         (WebCore::SVGRadialGradientElement::collectGradientAttributes):
1887         * svg/SVGTRefElement.cpp:
1888         (WebCore::SVGTRefElement::detachTarget):
1889         (WebCore::SVGTRefElement::buildPendingResource):
1890         * svg/SVGTextPathElement.cpp:
1891         (WebCore::SVGTextPathElement::buildPendingResource):
1892         * svg/SVGURIReference.cpp:
1893         (WebCore::SVGURIReference::targetElementFromIRIString):
1894         (WebCore::urlFromIRIStringWithFragmentIdentifier): Deleted.
1895         * svg/SVGURIReference.h:
1896         * svg/SVGUseElement.cpp:
1897         (WebCore::SVGUseElement::findTarget const):
1898         * svg/animation/SVGSMILElement.cpp:
1899         (WebCore::SVGSMILElement::buildPendingResource):
1900         * svg/graphics/filters/SVGFEImage.cpp:
1901         (WebCore::FEImage::referencedRenderer const):
1902
1903 2018-11-22  Dean Jackson  <dino@apple.com>
1904
1905         Implement WebGPUQueue and device.getQueue()
1906         https://bugs.webkit.org/show_bug.cgi?id=191911
1907         <rdar://problem/46214871>
1908
1909         Reviewed by Antoine Quint.
1910
1911         Implement WebGPUDevice::getQueue(), which creates a WebGPUQueue
1912         instance if necessary. Also link WebGPUQueue to the existing
1913         GPUQueue object, and expose the label IDL property.
1914
1915         This patch is based on some work from Justin Fan.
1916
1917         Test: webgpu/queue-creation.html
1918
1919         * DerivedSources.make:
1920         * Sources.txt:
1921         * WebCore.xcodeproj/project.pbxproj:
1922             New files.
1923
1924         * Modules/webgpu/WebGPUCommandBuffer.h:
1925         (WebCore::WebGPUCommandBuffer::commandBuffer const):
1926             Expose a GPUCommandBuffer getter, used when submitting (even though
1927             the actual GPU submission isn't implemented yet).
1928
1929         * Modules/webgpu/WebGPUDevice.cpp:
1930         (WebCore::WebGPUDevice::getQueue):
1931         * Modules/webgpu/WebGPUDevice.h:
1932         * Modules/webgpu/WebGPUDevice.idl:
1933             Implement getQueue().
1934
1935         * Modules/webgpu/WebGPUQueue.cpp:
1936         (WebCore::WebGPUQueue::create):
1937         (WebCore::WebGPUQueue::WebGPUQueue):
1938         (WebCore::WebGPUQueue::submit):
1939         * Modules/webgpu/WebGPUQueue.h:
1940         (WebCore::WebGPUQueue::label const):
1941         (WebCore::WebGPUQueue::setLabel):
1942         * Modules/webgpu/WebGPUQueue.idl:
1943             New class. Mostly sends stuff onto GPUQueue.
1944
1945         * bindings/js/WebCoreBuiltinNames.h:
1946             Add WebGPUQueue.
1947
1948         * platform/graphics/gpu/GPUQueue.h:
1949         * platform/graphics/gpu/cocoa/GPUQueueMetal.mm:
1950         (WebCore::GPUQueue::create):
1951         (WebCore::GPUQueue::submit):
1952         (WebCore::GPUQueue::label const):
1953         (WebCore::GPUQueue::setLabel const):
1954             "label" getter/setter that uses
1955             the underlying MTLCommandQueue label property, but prefixes
1956             it with a WebKit identifier, so it can be correctly
1957             identified in system crash logs as coming from WebGPU.
1958
1959 2018-11-22  Zalan Bujtas  <zalan@apple.com>
1960
1961         [LFC][IFC] Merge addNonBreakableStart/NonBreakableEnd calls.
1962         https://bugs.webkit.org/show_bug.cgi?id=191903
1963
1964         Reviewed by Antti Koivisto.
1965
1966         * layout/inlineformatting/InlineFormattingContext.cpp:
1967         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
1968
1969 2018-11-22  Zalan Bujtas  <zalan@apple.com>
1970
1971         [LFC][IFC] Offset formatting context root runs with horizontal margins.
1972         https://bugs.webkit.org/show_bug.cgi?id=191900
1973
1974         Reviewed by Antti Koivisto.
1975
1976         Inline runs generated by formatting roots (inline-block) need to be adjusted with the horizontal margins.
1977         (The test case has padding and border as well, but they are _inside_ the formatting context.)
1978
1979         Test: fast/inline/inline-content-and-nested-formatting-root-with-margin-left-right.html
1980
1981         * layout/inlineformatting/InlineFormattingContext.cpp:
1982         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
1983
1984 2018-11-22  Simon Fraser  <simon.fraser@apple.com>
1985
1986         Extremely small monospace text size when SVG is included as an img
1987         https://bugs.webkit.org/show_bug.cgi?id=191834
1988
1989         Reviewed by Myles C. Maxfield.
1990
1991         Give defaultFixedFontSize a reasonable default value in Settings, so that clients
1992         who omit to set it (like SVGImages) don't get broken rendering.
1993
1994         Test: svg/text/monospace-text-size-in-img.html
1995
1996         * page/Settings.yaml:
1997
1998 2018-11-22  Javier Fernandez  <jfernandez@igalia.com>
1999
2000         Tables with vertical-lr writing-mode doesn't apply correctly vertical-align: baseline
2001         https://bugs.webkit.org/show_bug.cgi?id=191881
2002
2003         Reviewed by Manuel Rego Casasnovas.
2004
2005         We should use the font's descent value when wriring-mode flips line flow (vertical-lr).
2006
2007         This change also fixes bug 170175, since Flexbox use the same code to determine the first
2008         line baseline of a flex item.
2009
2010         Test: fast/writing-mode/vertical-align-table-baseline-latin.html
2011
2012         * rendering/RenderBlockFlow.cpp:
2013         (WebCore::RenderBlockFlow::firstLineBaseline const):
2014
2015 2018-11-21  Ryosuke Niwa  <rniwa@webkit.org>
2016
2017         Phantom focus/blur events fire on clicking between text input fields when listening with addEventListener
2018         https://bugs.webkit.org/show_bug.cgi?id=179990
2019
2020         Reviewed by Tim Horton.
2021
2022         The bug was caused by TemporarySelectionChange which is used by TextIndicator::createWithRange
2023         to set and restore the selection putting the focus on the newly mouse-down'ed input element
2024         and restoring the focus back to the input element which originally had the focus immediately.
2025
2026         Fixed the bug by avoiding to set the focus since only selection highlights need to be updated here.
2027         Also made TemporarySelectionOption an enum class.
2028
2029         Unfortunately, no new tests since force click testing is broken :( See <rdar://problem/31301721>.
2030
2031         * editing/Editor.cpp:
2032         (WebCore::TemporarySelectionChange::TemporarySelectionChange):
2033         (WebCore::TemporarySelectionChange::~TemporarySelectionChange):
2034         (WebCore::TemporarySelectionChange::setSelection): Extracted. Fixed the bug by adding
2035         FrameSelection::DoNotSetFocus to the option when TemporarySelectionOption::DoNotSetFocus is set.
2036         * editing/Editor.h:
2037         * page/DragController.cpp:
2038         (WebCore::DragController::performDragOperation):
2039         * page/TextIndicator.cpp:
2040         (WebCore::TextIndicator::createWithRange): Set TemporarySelectionOption::DoNotSetFocus.
2041
2042 2018-11-21  Wenson Hsieh  <wenson_hsieh@apple.com>
2043
2044         [Cocoa] [WebKit2] Add support for replacing find-in-page text matches
2045         https://bugs.webkit.org/show_bug.cgi?id=191786
2046         <rdar://problem/45813871>
2047
2048         Reviewed by Ryosuke Niwa.
2049
2050         Add support for replacing Find-in-Page matches. See below for details. Covered by new layout tests as well as a
2051         new API test.
2052
2053         Tests: editing/find/find-and-replace-adjacent-words.html
2054                editing/find/find-and-replace-at-editing-boundary.html
2055                editing/find/find-and-replace-basic.html
2056                editing/find/find-and-replace-in-subframes.html
2057                editing/find/find-and-replace-no-matches.html
2058                editing/find/find-and-replace-noneditable-matches.html
2059                editing/find/find-and-replace-replacement-text-input-events.html
2060
2061         API test: WebKit.FindAndReplace
2062
2063         * page/Page.cpp:
2064         (WebCore::replaceRanges):
2065         (WebCore::Page::replaceRangesWithText):
2066
2067         Add a helper that, given a list of Ranges, replaces each range with the given text. To do this, we first map
2068         each Range to editing offsets within the topmost editable root for each Range. This results in a map of editable
2069         root to list of editing offsets we need to replace. To apply the replacements, for each editable root in the
2070         map, we iterate over each replacement range (i.e. an offset and length), set the current selection to contain
2071         that replacement range, and use `Editor::replaceSelectionWithText`. To prevent prior text replacements from
2072         clobbering the offsets of latter text replacement ranges, we also iterate backwards through text replacement
2073         ranges when performing each replacement.
2074
2075         Likewise, we also apply text replacement to each editing container in backwards order: for nodes in the same
2076         frame, we compare their position in the document, and for nodes in different frames, we instead compare their
2077         frames in frame tree traversal order.
2078
2079         We map Ranges to editing offsets and back when performing text replacement because each text replacement may
2080         split or merge text nodes, which causes adjacent Ranges to shrink or extend while replacing text. In an earlier
2081         attempt to implement this, I simply iterated over each Range to replace and carried out text replacement for
2082         each Range. This led to incorrect behavior in some cases, such as replacing adjacent matches. Thus, by computing
2083         the set of text replacement offsets prior to replacing any text, we're able to target the correct ranges for
2084         replacement.
2085
2086         (WebCore::Page::replaceSelectionWithText):
2087
2088         Add a helper method on Page to replace the current selection with some text. This simply calls out to
2089         `Editor::replaceSelectionWithText`.
2090
2091         * page/Page.h:
2092
2093 2018-11-21  Andy Estes  <aestes@apple.com>
2094
2095         [Cocoa] Create a soft-linking file for PassKit
2096         https://bugs.webkit.org/show_bug.cgi?id=191875
2097         <rdar://problem/46203215>
2098
2099         Reviewed by Myles Maxfield.
2100
2101         * Modules/applepay/cocoa/PaymentContactCocoa.mm: Removed SOFT_LINK macros and included PassKitSoftLink.h instead.
2102         * Modules/applepay/cocoa/PaymentMerchantSessionCocoa.mm: Ditto.
2103         * SourcesCocoa.txt: Removed @no-unify from PaymentMerchantSessionCocoa.mm.
2104         * WebCore.xcodeproj/project.pbxproj: Removed PaymentMerchantSessionCocoa.mm from the WebCore target.
2105         * rendering/RenderThemeCocoa.mm: Removed SOFT_LINK macros and included PassKitSoftLink.h instead.
2106
2107 2018-11-21  Zalan Bujtas  <zalan@apple.com>
2108
2109         [LFC] LayoutState should always be initialized with the initial containing block.
2110         https://bugs.webkit.org/show_bug.cgi?id=191896
2111
2112         Reviewed by Antti Koivisto.
2113
2114         There should always be only one LayoutState per layout tree (it does not mean that layout always starts at the ICB).
2115         The ICB is a special formatting context root because it does not have a parent formatting context. All the other formatting contexts
2116         first need to be laid out (partially at least e.g margin) in their parent formatting context.
2117         Having a non-null parent formatting context as root could lead to undefined behaviour.
2118
2119         * layout/LayoutFormattingState.cpp:
2120         (WebCore::Layout::LayoutState::LayoutState):
2121         (WebCore::Layout::LayoutState::initializeRoot): Deleted.
2122         * layout/LayoutFormattingState.h:
2123         * layout/Verification.cpp:
2124         (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):
2125         * page/FrameViewLayoutContext.cpp:
2126         (WebCore::layoutUsingFormattingContext):
2127
2128 2018-11-21  Zalan Bujtas  <zalan@apple.com>
2129
2130         [LFC][IFC] Horizontal margins should be considered as non-breakable space
2131         https://bugs.webkit.org/show_bug.cgi?id=191894
2132
2133         Reviewed by Antti Koivisto.
2134
2135         Like padding and border, horizontal margins also force run breaks and offset them.
2136
2137         Test: fast/inline/inline-content-with-margin-left-right.html
2138
2139         * layout/inlineformatting/InlineFormattingContext.cpp:
2140         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
2141
2142 2018-11-20  Ryosuke Niwa  <rniwa@webkit.org>
2143
2144         Mutation observers doesn't get notified of character data mutation made by the parser
2145         https://bugs.webkit.org/show_bug.cgi?id=191874
2146
2147         Reviewed by Antti Koivisto.
2148
2149         Fixed the bug that CharacterData::parserAppendData was never notifying MutationObserver.
2150
2151         Test: fast/dom/MutationObserver/observe-parser-character-data-change.html
2152
2153         * dom/CharacterData.cpp:
2154         (WebCore::CharacterData::parserAppendData):
2155
2156 2018-11-21  Claudio Saavedra  <csaavedra@igalia.com>
2157
2158         [SOUP] Follow-up robustness improvements to the certificate decoder
2159         https://bugs.webkit.org/show_bug.cgi?id=191892
2160
2161         Reviewed by Michael Catanzaro.
2162
2163         If at any point the certificate fails to be constructed from
2164         the DER data, bail out. Likewise, if the certificate returned
2165         is NULL, return false from the decoder to notify the failure
2166         to decode it.
2167
2168         * platform/network/soup/CertificateInfo.h:
2169         (WTF::Persistence::certificateFromCertificatesDataList):
2170         (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
2171
2172 2018-11-21  Zalan Bujtas  <zalan@apple.com>
2173
2174         [LFC][IFC] Border should be considered as non-breakable space
2175         https://bugs.webkit.org/show_bug.cgi?id=191891
2176
2177         Reviewed by Antti Koivisto.
2178
2179         Like padding, border also forces run breaks and offsets them.
2180
2181         Test: fast/inline/inline-content-with-border-left-right.html
2182
2183         * layout/inlineformatting/InlineFormattingContext.cpp:
2184         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
2185
2186 2018-11-21  Zalan Bujtas  <zalan@apple.com>
2187
2188         [LFC][IFC] Use contains and containsAll in InlineFormattingContext::splitInlineRunIfNeeded consistently
2189         https://bugs.webkit.org/show_bug.cgi?id=191890
2190
2191         Rearrange the comment numbers to match the logic below.
2192
2193         Reviewed by Antti Koivisto.
2194
2195         * layout/inlineformatting/InlineFormattingContext.cpp:
2196         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
2197
2198 2018-11-20  Dean Jackson  <dino@apple.com>
2199
2200         Move WebGPU platform code to platform/graphics/gpu
2201         https://bugs.webkit.org/show_bug.cgi?id=191867
2202         <rdar://problem/46190993>
2203
2204         Reviewed by Antoine Quint.
2205
2206         The underlying implementation of WebGPU doesn't need to live in
2207         Modules, since it technically could be used by other parts of the system. It
2208         makes more sense for it to be in platform/graphics/gpu.
2209
2210         Move...
2211         - Modules/webgpu/GPU* -> platform/graphics/gpu
2212         - Modules/webgpu/cocoa -> platform/graphics/gpu/cocoa
2213         - platform/graphics/gpu/GPULegacy* -> platform/graphics/gpu/legacy/
2214         - platform/graphics/gpu/cocoa/GPULegacy* -> platform/graphics/gpu/legacy/cocoa
2215
2216         * Sources.txt:
2217         * SourcesCocoa.txt:
2218         * WebCore.xcodeproj/project.pbxproj:
2219         * platform/graphics/gpu/GPUCommandBuffer.h: Renamed from Source/WebCore/Modules/webgpu/GPUCommandBuffer.h.
2220         * platform/graphics/gpu/GPUDevice.cpp: Renamed from Source/WebCore/Modules/webgpu/GPUDevice.cpp.
2221         (WebCore::GPUDevice::createShaderModule const):
2222         (WebCore::GPUDevice::createRenderPipeline const):
2223         (WebCore::GPUDevice::createCommandBuffer):
2224         (WebCore::GPUDevice::getQueue):
2225         * platform/graphics/gpu/GPUDevice.h: Renamed from Source/WebCore/Modules/webgpu/GPUDevice.h.
2226         (WebCore::GPUDevice::platformDevice const):
2227         * platform/graphics/gpu/GPUPipelineDescriptorBase.h: Renamed from Source/WebCore/Modules/webgpu/GPUPipelineDescriptorBase.h.
2228         * platform/graphics/gpu/GPUPipelineStageDescriptor.h: Renamed from Source/WebCore/Modules/webgpu/GPUPipelineStageDescriptor.h.
2229         * platform/graphics/gpu/GPUQueue.h: Renamed from Source/WebCore/Modules/webgpu/GPUQueue.h.
2230         (WebCore::GPUQueue::platformQueue const):
2231         * platform/graphics/gpu/GPURenderPipeline.h: Renamed from Source/WebCore/Modules/webgpu/GPURenderPipeline.h.
2232         (WebCore::GPURenderPipeline::platformRenderPipeline const):
2233         * platform/graphics/gpu/GPURenderPipelineDescriptor.h: Renamed from Source/WebCore/Modules/webgpu/GPURenderPipelineDescriptor.h.
2234         * platform/graphics/gpu/GPUShaderModule.h: Renamed from Source/WebCore/Modules/webgpu/GPUShaderModule.h.
2235         (WebCore::GPUShaderModule::platformShaderModule const):
2236         * platform/graphics/gpu/GPUShaderModuleDescriptor.h: Renamed from Source/WebCore/Modules/webgpu/GPUShaderModuleDescriptor.h.
2237         * platform/graphics/gpu/GPUSwapChain.h: Renamed from Source/WebCore/Modules/webgpu/GPUSwapChain.h.
2238         (WebCore::GPUSwapChain::platformLayer const):
2239         * platform/graphics/gpu/GPUTexture.h: Renamed from Source/WebCore/Modules/webgpu/GPUTexture.h.
2240         * platform/graphics/gpu/GPUTextureFormatEnum.h: Renamed from Source/WebCore/Modules/webgpu/GPUTextureFormatEnum.h.
2241         * platform/graphics/gpu/cocoa/GPUCommandBufferMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPUCommandBufferMetal.mm.
2242         (WebCore::GPUCommandBuffer::create):
2243         (WebCore::GPUCommandBuffer::GPUCommandBuffer):
2244         * platform/graphics/gpu/cocoa/GPUDeviceMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPUDeviceMetal.mm.
2245         (WebCore::GPUDevice::create):
2246         (WebCore::GPUDevice::GPUDevice):
2247         * platform/graphics/gpu/cocoa/GPUQueueMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPUQueueMetal.mm.
2248         (WebCore::GPUQueue::create):
2249         (WebCore::GPUQueue::GPUQueue):
2250         * platform/graphics/gpu/cocoa/GPURenderPipelineMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPURenderPipelineMetal.mm.
2251         (WebCore::setFunctionsForPipelineDescriptor):
2252         (WebCore::GPURenderPipeline::create):
2253         (WebCore::GPURenderPipeline::GPURenderPipeline):
2254         * platform/graphics/gpu/cocoa/GPUShaderModuleMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPUShaderModuleMetal.mm.
2255         (WebCore::GPUShaderModule::create):
2256         (WebCore::GPUShaderModule::GPUShaderModule):
2257         * platform/graphics/gpu/cocoa/GPUSwapChainMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPUSwapChainMetal.mm.
2258         (WebCore::GPUSwapChain::create):
2259         (WebCore::GPUSwapChain::GPUSwapChain):
2260         (WebCore::GPUSwapChain::setDevice):
2261         (WebCore::platformTextureFormatForGPUTextureFormat):
2262         (WebCore::GPUSwapChain::setFormat):
2263         (WebCore::GPUSwapChain::reshape):
2264         (WebCore::GPUSwapChain::getNextTexture):
2265         (WebCore::GPUSwapChain::present):
2266         * platform/graphics/gpu/cocoa/GPUTextureMetal.mm: Renamed from Source/WebCore/Modules/webgpu/cocoa/GPUTextureMetal.mm.
2267         (WebCore::GPUTexture::create):
2268         (WebCore::GPUTexture::GPUTexture):
2269         (WebCore::GPUTexture::createDefaultTextureView):
2270         * platform/graphics/gpu/legacy/GPULegacyBuffer.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyBuffer.cpp.
2271         (WebCore::GPULegacyBuffer::~GPULegacyBuffer):
2272         (WebCore::GPULegacyBuffer::length const):
2273         * platform/graphics/gpu/legacy/GPULegacyBuffer.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyBuffer.h.
2274         (WebCore::GPULegacyBuffer::contents const):
2275         (WebCore::GPULegacyBuffer::metal const):
2276         * platform/graphics/gpu/legacy/GPULegacyCommandBuffer.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyCommandBuffer.cpp.
2277         (WebCore::GPULegacyCommandBuffer::~GPULegacyCommandBuffer):
2278         * platform/graphics/gpu/legacy/GPULegacyCommandBuffer.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyCommandBuffer.h.
2279         (WebCore::GPULegacyCommandBuffer::metal const):
2280         * platform/graphics/gpu/legacy/GPULegacyCommandQueue.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyCommandQueue.cpp.
2281         (WebCore::GPULegacyCommandQueue::~GPULegacyCommandQueue):
2282         * platform/graphics/gpu/legacy/GPULegacyCommandQueue.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyCommandQueue.h.
2283         (WebCore::GPULegacyCommandQueue::metal const):
2284         * platform/graphics/gpu/legacy/GPULegacyComputeCommandEncoder.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyComputeCommandEncoder.cpp.
2285         (WebCore::GPULegacyComputeCommandEncoder::~GPULegacyComputeCommandEncoder):
2286         * platform/graphics/gpu/legacy/GPULegacyComputeCommandEncoder.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyComputeCommandEncoder.h.
2287         * platform/graphics/gpu/legacy/GPULegacyComputePipelineState.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyComputePipelineState.cpp.
2288         (WebCore::GPULegacyComputePipelineState::~GPULegacyComputePipelineState):
2289         * platform/graphics/gpu/legacy/GPULegacyComputePipelineState.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyComputePipelineState.h.
2290         (WebCore::GPULegacyComputePipelineState::metal const):
2291         * platform/graphics/gpu/legacy/GPULegacyDepthStencilDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDepthStencilDescriptor.cpp.
2292         (WebCore::GPULegacyDepthStencilDescriptor::~GPULegacyDepthStencilDescriptor):
2293         * platform/graphics/gpu/legacy/GPULegacyDepthStencilDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDepthStencilDescriptor.h.
2294         (WebCore::GPULegacyDepthStencilDescriptor::metal const):
2295         * platform/graphics/gpu/legacy/GPULegacyDepthStencilState.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDepthStencilState.cpp.
2296         (WebCore::GPULegacyDepthStencilState::~GPULegacyDepthStencilState):
2297         * platform/graphics/gpu/legacy/GPULegacyDepthStencilState.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDepthStencilState.h.
2298         (WebCore::GPULegacyDepthStencilState::metal const):
2299         * platform/graphics/gpu/legacy/GPULegacyDevice.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDevice.cpp.
2300         (WebCore::GPULegacyDevice::~GPULegacyDevice):
2301         * platform/graphics/gpu/legacy/GPULegacyDevice.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDevice.h.
2302         (WebCore::GPULegacyDevice::layer const):
2303         (WebCore::GPULegacyDevice::metal const):
2304         (WebCore::GPULegacyDevice::markLayerComposited const):
2305         * platform/graphics/gpu/legacy/GPULegacyDrawable.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDrawable.cpp.
2306         (WebCore::GPULegacyDrawable::~GPULegacyDrawable):
2307         * platform/graphics/gpu/legacy/GPULegacyDrawable.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyDrawable.h.
2308         * platform/graphics/gpu/legacy/GPULegacyEnums.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyEnums.h.
2309         * platform/graphics/gpu/legacy/GPULegacyFunction.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyFunction.cpp.
2310         (WebCore::GPULegacyFunction::~GPULegacyFunction):
2311         * platform/graphics/gpu/legacy/GPULegacyFunction.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyFunction.h.
2312         (WebCore::GPULegacyFunction::metal const):
2313         * platform/graphics/gpu/legacy/GPULegacyLibrary.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyLibrary.cpp.
2314         (WebCore::GPULegacyLibrary::~GPULegacyLibrary):
2315         * platform/graphics/gpu/legacy/GPULegacyLibrary.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyLibrary.h.
2316         (WebCore::GPULegacyLibrary::metal const):
2317         * platform/graphics/gpu/legacy/GPULegacyRenderCommandEncoder.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderCommandEncoder.cpp.
2318         (WebCore::GPULegacyRenderCommandEncoder::~GPULegacyRenderCommandEncoder):
2319         * platform/graphics/gpu/legacy/GPULegacyRenderCommandEncoder.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderCommandEncoder.h.
2320         * platform/graphics/gpu/legacy/GPULegacyRenderPassAttachmentDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassAttachmentDescriptor.cpp.
2321         (WebCore::GPULegacyRenderPassAttachmentDescriptor::~GPULegacyRenderPassAttachmentDescriptor):
2322         * platform/graphics/gpu/legacy/GPULegacyRenderPassAttachmentDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassAttachmentDescriptor.h.
2323         * platform/graphics/gpu/legacy/GPULegacyRenderPassColorAttachmentDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassColorAttachmentDescriptor.cpp.
2324         (WebCore::GPULegacyRenderPassColorAttachmentDescriptor::~GPULegacyRenderPassColorAttachmentDescriptor):
2325         * platform/graphics/gpu/legacy/GPULegacyRenderPassColorAttachmentDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassColorAttachmentDescriptor.h.
2326         * platform/graphics/gpu/legacy/GPULegacyRenderPassDepthAttachmentDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassDepthAttachmentDescriptor.cpp.
2327         (WebCore::GPULegacyRenderPassDepthAttachmentDescriptor::~GPULegacyRenderPassDepthAttachmentDescriptor):
2328         * platform/graphics/gpu/legacy/GPULegacyRenderPassDepthAttachmentDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassDepthAttachmentDescriptor.h.
2329         * platform/graphics/gpu/legacy/GPULegacyRenderPassDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassDescriptor.cpp.
2330         (WebCore::GPULegacyRenderPassDescriptor::~GPULegacyRenderPassDescriptor):
2331         * platform/graphics/gpu/legacy/GPULegacyRenderPassDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPassDescriptor.h.
2332         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineColorAttachmentDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPipelineColorAttachmentDescriptor.cpp.
2333         (WebCore::GPULegacyRenderPipelineColorAttachmentDescriptor::~GPULegacyRenderPipelineColorAttachmentDescriptor):
2334         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineColorAttachmentDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPipelineColorAttachmentDescriptor.h.
2335         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPipelineDescriptor.cpp.
2336         (WebCore::GPULegacyRenderPipelineDescriptor::~GPULegacyRenderPipelineDescriptor):
2337         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPipelineDescriptor.h.
2338         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineState.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPipelineState.cpp.
2339         (WebCore::GPULegacyRenderPipelineState::~GPULegacyRenderPipelineState):
2340         * platform/graphics/gpu/legacy/GPULegacyRenderPipelineState.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyRenderPipelineState.h.
2341         * platform/graphics/gpu/legacy/GPULegacySize.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacySize.h.
2342         * platform/graphics/gpu/legacy/GPULegacyTexture.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyTexture.cpp.
2343         (WebCore::GPULegacyTexture::~GPULegacyTexture):
2344         * platform/graphics/gpu/legacy/GPULegacyTexture.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyTexture.h.
2345         * platform/graphics/gpu/legacy/GPULegacyTextureDescriptor.cpp: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyTextureDescriptor.cpp.
2346         (WebCore::GPULegacyTextureDescriptor::~GPULegacyTextureDescriptor):
2347         * platform/graphics/gpu/legacy/GPULegacyTextureDescriptor.h: Renamed from Source/WebCore/platform/graphics/gpu/GPULegacyTextureDescriptor.h.
2348         * platform/graphics/gpu/legacy/cocoa/GPULegacyBufferMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyBufferMetal.mm.
2349         (WebCore::GPULegacyBuffer::GPULegacyBuffer):
2350         * platform/graphics/gpu/legacy/cocoa/GPULegacyCommandBufferMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyCommandBufferMetal.mm.
2351         (WebCore::GPULegacyCommandBuffer::GPULegacyCommandBuffer):
2352         (WebCore::GPULegacyCommandBuffer::presentDrawable const):
2353         (WebCore::GPULegacyCommandBuffer::commit const):
2354         * platform/graphics/gpu/legacy/cocoa/GPULegacyCommandQueueMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyCommandQueueMetal.mm.
2355         (WebCore::GPULegacyCommandQueue::GPULegacyCommandQueue):
2356         (WebCore::GPULegacyCommandQueue::label const):
2357         (WebCore::GPULegacyCommandQueue::setLabel const):
2358         * platform/graphics/gpu/legacy/cocoa/GPULegacyComputeCommandEncoderMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyComputeCommandEncoderMetal.mm.
2359         (WebCore::MTLSizeMake):
2360         (WebCore::GPULegacyComputeCommandEncoder::GPULegacyComputeCommandEncoder):
2361         (WebCore::GPULegacyComputeCommandEncoder::setComputePipelineState const):
2362         (WebCore::GPULegacyComputeCommandEncoder::setBuffer const):
2363         (WebCore::GPULegacyComputeCommandEncoder::dispatch const):
2364         (WebCore::GPULegacyComputeCommandEncoder::endEncoding const):
2365         * platform/graphics/gpu/legacy/cocoa/GPULegacyComputePipelineStateMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyComputePipelineStateMetal.mm.
2366         (WebCore::GPULegacyComputePipelineState::GPULegacyComputePipelineState):
2367         * platform/graphics/gpu/legacy/cocoa/GPULegacyDepthStencilDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyDepthStencilDescriptorMetal.mm.
2368         (WebCore::GPULegacyDepthStencilDescriptor::GPULegacyDepthStencilDescriptor):
2369         (WebCore::GPULegacyDepthStencilDescriptor::depthWriteEnabled const):
2370         (WebCore::GPULegacyDepthStencilDescriptor::setDepthWriteEnabled const):
2371         (WebCore::GPULegacyDepthStencilDescriptor::depthCompareFunction const):
2372         (WebCore::GPULegacyDepthStencilDescriptor::setDepthCompareFunction const):
2373         * platform/graphics/gpu/legacy/cocoa/GPULegacyDepthStencilStateMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyDepthStencilStateMetal.mm.
2374         (WebCore::GPULegacyDepthStencilState::GPULegacyDepthStencilState):
2375         (WebCore::GPULegacyDepthStencilState::label const):
2376         (WebCore::GPULegacyDepthStencilState::setLabel const):
2377         * platform/graphics/gpu/legacy/cocoa/GPULegacyDeviceMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyDeviceMetal.mm.
2378         (WebCore::GPULegacyDevice::GPULegacyDevice):
2379         (WebCore::GPULegacyDevice::disconnect):
2380         (WebCore::GPULegacyDevice::reshape const):
2381         (WebCore::GPULegacyDevice::platformLayer const):
2382         (WebCore::GPULegacyDevice::operator! const):
2383         * platform/graphics/gpu/legacy/cocoa/GPULegacyDrawableMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyDrawableMetal.mm.
2384         (WebCore::GPULegacyDrawable::GPULegacyDrawable):
2385         (WebCore::GPULegacyDrawable::release):
2386         (WebCore::GPULegacyDrawable::metal const):
2387         (WebCore::GPULegacyDrawable::texture const):
2388         * platform/graphics/gpu/legacy/cocoa/GPULegacyFunctionMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyFunctionMetal.mm.
2389         (WebCore::GPULegacyFunction::GPULegacyFunction):
2390         (WebCore::GPULegacyFunction::name const):
2391         (WebCore::GPULegacyFunction::operator! const):
2392         * platform/graphics/gpu/legacy/cocoa/GPULegacyLibraryMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyLibraryMetal.mm.
2393         (WebCore::GPULegacyLibrary::GPULegacyLibrary):
2394         (WebCore::GPULegacyLibrary::label const):
2395         (WebCore::GPULegacyLibrary::setLabel const):
2396         (WebCore::GPULegacyLibrary::functionNames const):
2397         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderCommandEncoderMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderCommandEncoderMetal.mm.
2398         (WebCore::GPULegacyRenderCommandEncoder::GPULegacyRenderCommandEncoder):
2399         (WebCore::GPULegacyRenderCommandEncoder::setRenderPipelineState const):
2400         (WebCore::GPULegacyRenderCommandEncoder::setDepthStencilState const):
2401         (WebCore::GPULegacyRenderCommandEncoder::setVertexBuffer const):
2402         (WebCore::GPULegacyRenderCommandEncoder::setFragmentBuffer const):
2403         (WebCore::GPULegacyRenderCommandEncoder::drawPrimitives const):
2404         (WebCore::GPULegacyRenderCommandEncoder::endEncoding const):
2405         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassAttachmentDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPassAttachmentDescriptorMetal.mm.
2406         (WebCore::GPULegacyRenderPassAttachmentDescriptor::GPULegacyRenderPassAttachmentDescriptor):
2407         (WebCore::GPULegacyRenderPassAttachmentDescriptor::loadAction const):
2408         (WebCore::GPULegacyRenderPassAttachmentDescriptor::setLoadAction const):
2409         (WebCore::GPULegacyRenderPassAttachmentDescriptor::storeAction const):
2410         (WebCore::GPULegacyRenderPassAttachmentDescriptor::setStoreAction const):
2411         (WebCore::GPULegacyRenderPassAttachmentDescriptor::setTexture const):
2412         (WebCore::GPULegacyRenderPassAttachmentDescriptor::metal const):
2413         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassColorAttachmentDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPassColorAttachmentDescriptorMetal.mm.
2414         (WebCore::GPULegacyRenderPassColorAttachmentDescriptor::GPULegacyRenderPassColorAttachmentDescriptor):
2415         (WebCore::GPULegacyRenderPassColorAttachmentDescriptor::clearColor const):
2416         (WebCore::GPULegacyRenderPassColorAttachmentDescriptor::setClearColor const):
2417         (WebCore::GPULegacyRenderPassColorAttachmentDescriptor::metal const):
2418         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassDepthAttachmentDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPassDepthAttachmentDescriptorMetal.mm.
2419         (WebCore::GPULegacyRenderPassDepthAttachmentDescriptor::GPULegacyRenderPassDepthAttachmentDescriptor):
2420         (WebCore::GPULegacyRenderPassDepthAttachmentDescriptor::clearDepth const):
2421         (WebCore::GPULegacyRenderPassDepthAttachmentDescriptor::setClearDepth const):
2422         (WebCore::GPULegacyRenderPassDepthAttachmentDescriptor::metal const):
2423         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPassDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPassDescriptorMetal.mm.
2424         (WebCore::GPULegacyRenderPassDescriptor::GPULegacyRenderPassDescriptor):
2425         (WebCore::GPULegacyRenderPassDescriptor::colorAttachments const):
2426         (WebCore::GPULegacyRenderPassDescriptor::depthAttachment const):
2427         (WebCore::GPULegacyRenderPassDescriptor::metal const):
2428         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPipelineColorAttachmentDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPipelineColorAttachmentDescriptorMetal.mm.
2429         (WebCore::GPULegacyRenderPipelineColorAttachmentDescriptor::GPULegacyRenderPipelineColorAttachmentDescriptor):
2430         (WebCore::GPULegacyRenderPipelineColorAttachmentDescriptor::pixelFormat const):
2431         (WebCore::GPULegacyRenderPipelineColorAttachmentDescriptor::setPixelFormat const):
2432         (WebCore::GPULegacyRenderPipelineColorAttachmentDescriptor::metal const):
2433         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPipelineDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPipelineDescriptorMetal.mm.
2434         (WebCore::GPULegacyRenderPipelineDescriptor::GPULegacyRenderPipelineDescriptor):
2435         (WebCore::GPULegacyRenderPipelineDescriptor::depthAttachmentPixelFormat const):
2436         (WebCore::GPULegacyRenderPipelineDescriptor::setDepthAttachmentPixelFormat const):
2437         (WebCore::GPULegacyRenderPipelineDescriptor::setVertexFunction const):
2438         (WebCore::GPULegacyRenderPipelineDescriptor::setFragmentFunction const):
2439         (WebCore::GPULegacyRenderPipelineDescriptor::colorAttachments const):
2440         (WebCore::GPULegacyRenderPipelineDescriptor::reset const):
2441         (WebCore::GPULegacyRenderPipelineDescriptor::metal const):
2442         * platform/graphics/gpu/legacy/cocoa/GPULegacyRenderPipelineStateMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyRenderPipelineStateMetal.mm.
2443         (WebCore::GPULegacyRenderPipelineState::GPULegacyRenderPipelineState):
2444         (WebCore::GPULegacyRenderPipelineState::label const):
2445         (WebCore::GPULegacyRenderPipelineState::setLabel const):
2446         (WebCore::GPULegacyRenderPipelineState::metal const):
2447         * platform/graphics/gpu/legacy/cocoa/GPULegacyTextureDescriptorMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyTextureDescriptorMetal.mm.
2448         (WebCore::GPULegacyTextureDescriptor::GPULegacyTextureDescriptor):
2449         (WebCore::GPULegacyTextureDescriptor::width const):
2450         (WebCore::GPULegacyTextureDescriptor::setWidth const):
2451         (WebCore::GPULegacyTextureDescriptor::height const):
2452         (WebCore::GPULegacyTextureDescriptor::setHeight const):
2453         (WebCore::GPULegacyTextureDescriptor::sampleCount const):
2454         (WebCore::GPULegacyTextureDescriptor::setSampleCount const):
2455         (WebCore::GPULegacyTextureDescriptor::textureType const):
2456         (WebCore::GPULegacyTextureDescriptor::setTextureType const):
2457         (WebCore::GPULegacyTextureDescriptor::storageMode const):
2458         (WebCore::GPULegacyTextureDescriptor::setStorageMode const):
2459         (WebCore::GPULegacyTextureDescriptor::usage const):
2460         (WebCore::GPULegacyTextureDescriptor::setUsage const):
2461         (WebCore::GPULegacyTextureDescriptor::metal const):
2462         * platform/graphics/gpu/legacy/cocoa/GPULegacyTextureMetal.mm: Renamed from Source/WebCore/platform/graphics/metal/GPULegacyTextureMetal.mm.
2463         (WebCore::GPULegacyTexture::GPULegacyTexture):
2464         (WebCore::GPULegacyTexture::width const):
2465         (WebCore::GPULegacyTexture::height const):
2466         (WebCore::GPULegacyTexture::metal const):
2467
2468 2018-11-21  Adrian Perez de Castro  <aperez@igalia.com>
2469
2470         [SOUP] Certificate decoder always returns GByteArray with zero size
2471         https://bugs.webkit.org/show_bug.cgi?id=191888
2472
2473         Reviewed by Žan Doberšek.
2474
2475         No new tests needed.
2476
2477         * platform/network/soup/CertificateInfo.h:
2478         (WTF::Persistence::Coder<GRefPtr<GByteArray>>::decode): Add missing
2479         call to g_byte_array_set_size() to make sure byteArray->len has the
2480         correct value.
2481
2482 2018-11-21  Zalan Butjas  <zalan@apple.com>
2483
2484         [LFC][IFC] Take nonBreakableStart/End into use.
2485         https://bugs.webkit.org/show_bug.cgi?id=191873
2486
2487         Reviewed by Antti Koivisto.
2488
2489         Offset the final inline runs with the nonBreakableStart/End values.
2490         (This patch also fixes relative positioned run verification.)
2491
2492         Test: fast/inline/inline-content-with-padding-left-right.html
2493
2494         * layout/Verification.cpp:
2495         (WebCore::Layout::LayoutState::verifyAndOutputMismatchingLayoutTree const):
2496         * layout/inlineformatting/InlineFormattingContext.cpp:
2497         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
2498
2499 2018-11-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2500
2501         REGRESSION(r237845): [cairo] Hyperlink underscore layout issue
2502         https://bugs.webkit.org/show_bug.cgi?id=191630
2503
2504         Reviewed by Michael Catanzaro.
2505
2506         Only flip Y in GlyphToPathTranslator for ports using CG.
2507
2508         * platform/graphics/FontCascade.cpp:
2509         (WebCore::GlyphToPathTranslator::GlyphToPathTranslator):
2510
2511 2018-11-21  Alicia Boya García  <aboya@igalia.com>
2512
2513         [MSE][GStreamer] Refactor AppendPipeline deinitialization
2514         https://bugs.webkit.org/show_bug.cgi?id=191759
2515
2516         Reviewed by Xabier Rodriguez-Calvar.
2517
2518         AppendPipeline currently has a method, clearPlayerPrivate(), that the
2519         client code uses to deinitialize most of the AppendPipeline... just
2520         before actually destructing it in the next line of code.
2521
2522         Since at that point there should not be alive RefPtr's pointing to the
2523         AppendPipeline there is no need for this kind of pre-deinitialization
2524         in this usage pattern. Instead, we can just rely on C++ destructors,
2525         cleaning the code a bit and removing the potential for the question
2526         "what if `clearPlayerPrivate() has been called before?`": it has not.
2527
2528         Assertions have been added to ensure that there is only one alive
2529         RefPtr pointing to AppendPipeline, therefore guaranteeing its immediate
2530         destruction.
2531
2532         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
2533         (WebCore::AppendPipeline::~AppendPipeline):
2534         (WebCore::AppendPipeline::deinitialize):
2535         (WebCore::AppendPipeline::clearPlayerPrivate): Deleted.
2536         * platform/graphics/gstreamer/mse/AppendPipeline.h:
2537         * platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
2538         (WebCore::MediaPlayerPrivateGStreamerMSE::~MediaPlayerPrivateGStreamerMSE):
2539         * platform/graphics/gstreamer/mse/MediaSourceClientGStreamerMSE.cpp:
2540         (WebCore::MediaSourceClientGStreamerMSE::removedFromMediaSource):
2541
2542 2018-11-20  Dean Jackson  <dino@apple.com>
2543
2544         Removing using namespace WebCore from WebLayer
2545         https://bugs.webkit.org/show_bug.cgi?id=191870
2546         <rdar://problem/46192206>
2547
2548         Rubber-stamped by Sam Weinig.
2549
2550         Remove "using namespace WebCore" from WebLayer.mm
2551         because it will cause type clashes in unified source
2552         builds.
2553
2554         * platform/graphics/mac/WebLayer.mm:
2555         (-[WebLayer drawInContext:]):
2556         (-[WebSimpleLayer setNeedsDisplay]):
2557         (-[WebSimpleLayer setNeedsDisplayInRect:]):
2558         (-[WebSimpleLayer display]):
2559         (-[WebSimpleLayer drawInContext:]):
2560
2561 2018-11-20  Ryosuke Niwa  <rniwa@webkit.org>
2562
2563         Input element gains focus when a selectstart event listener on document prevents the default action
2564         https://bugs.webkit.org/show_bug.cgi?id=191714
2565         <rdar://problem/46174389>
2566
2567         Reviewed by Antti Koivisto.
2568
2569         The bug was caused by WebKit keep firing selectstart upon mousemove after the drag had already started
2570         when preventDefault had been called in the previous firings of selectstart event. Because input element
2571         has its own editable element and fires selectstart on the input element itself, which won't be prevented
2572         by selectstart on docuemnt, this allowed the selection to be set inside the input element even though
2573         the mouse cursor was simply passing over the input element after the drag had already started.
2574
2575         Fixed the bug by not firing selectstart if the default action had been prevented by the initial firing
2576         of selectstart by setting m_mouseDownMayStartDrag to false. This also matches the behaviors of Chrome
2577         and Firefox.
2578
2579         Test: fast/events/selectstart-prevent-default-should-not-focus-input.html
2580
2581         * page/EventHandler.cpp:
2582         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
2583         (WebCore::EventHandler::updateSelectionForMouseDrag):
2584
2585 2018-11-20  Christopher Reid  <chris.reid@sony.com>
2586
2587         Remove the need for LocalizedStringsWPE.cpp
2588         https://bugs.webkit.org/show_bug.cgi?id=191854
2589
2590         Reviewed by Michael Catanzaro.
2591
2592         No change in behavior.
2593
2594         Consolidate "Search the Web" as the default search context menu text on non-COCOA ports.
2595
2596         GTK, WPE, and non-CF WIN all had the same default localizedString function
2597         of String::fromUTF8. Move that to LocalizedString.cpp as the default implementation
2598         for all ports not using CF.
2599
2600         * en.lproj/Localizable.strings:
2601         * platform/LocalizedStrings.cpp:
2602         * platform/gtk/LocalizedStringsGtk.cpp:
2603         * platform/win/LocalizedStringsWin.cpp:
2604         * platform/wpe/LocalizedStringsWPE.cpp: Removed.
2605
2606 2018-11-20  Zan Dobersek  <zdobersek@igalia.com>
2607
2608         Segfaults on https://terminalizer.com/
2609         https://bugs.webkit.org/show_bug.cgi?id=191805
2610
2611         Reviewed by Michael Catanzaro.
2612
2613         In HarfBuzzFace, the CacheEntry's HashMap object that caches Unicode
2614         codepoints and their corresponding glyph indices should allow zero
2615         values as valid keys since zero is a valid Unicode codepoint.
2616
2617         This change enables properly caching zero codepoints, avoiding
2618         repetitive additions to the HashMap cache that end up in a crash.
2619
2620         * platform/graphics/harfbuzz/HarfBuzzFace.h: Move the elongated
2621         GlyphCache type alias to the public section of HarfBuzzFace class
2622         declaration, making it reusable in the helper HarfBuzzFontData struct.
2623         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
2624
2625 2018-11-20  Antti Koivisto  <antti@apple.com>
2626
2627         Update hover state in composed tree
2628         https://bugs.webkit.org/show_bug.cgi?id=191860
2629
2630         Reviewed by Zalan Bujtas.
2631
2632         The code was already mostly switched over from render tree to composed tree.
2633         This patch replaces the remaining common ancestor search code with a DOM based equivalent.
2634
2635         * dom/Document.cpp:
2636         (WebCore::findNearestCommonComposedAncestor):
2637         (WebCore::Document::updateHoverActiveState):
2638         (WebCore::nearestCommonHoverAncestor): Deleted.
2639         * rendering/RenderBlock.cpp:
2640         (WebCore::RenderBlock::hoverAncestor const): Deleted.
2641         * rendering/RenderBlock.h:
2642         * rendering/RenderElement.cpp:
2643         (WebCore::RenderElement::hoverAncestor const): Deleted.
2644
2645         No longer needed.
2646
2647         * rendering/RenderElement.h:
2648
2649 2018-11-20  Zalan Bujtas  <zalan@apple.com>
2650
2651         [LFC][IFC] Measure run with non-breakable start/end.
2652         https://bugs.webkit.org/show_bug.cgi?id=191850
2653
2654         Reviewed by Antti Koivisto.
2655
2656         Line breaking needs to know the complete width of the run including padding etc.
2657
2658         * layout/Verification.cpp:
2659         (WebCore::Layout::collectFlowBoxSubtree):
2660         (WebCore::Layout::collectInlineBoxes):
2661         (WebCore::Layout::outputMismatchingComplexLineInformationIfNeeded):
2662         * layout/inlineformatting/InlineFormattingContext.cpp:
2663         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
2664         * layout/inlineformatting/InlineFormattingContext.h:
2665         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
2666         (WebCore::Layout::InlineFormattingContext::Geometry::runWidth):
2667         * layout/inlineformatting/InlineLineBreaker.cpp:
2668         (WebCore::Layout::InlineLineBreaker::InlineLineBreaker):
2669         (WebCore::Layout::InlineLineBreaker::runWidth const):
2670         (WebCore::Layout::InlineLineBreaker::textWidth const):
2671         * layout/inlineformatting/InlineLineBreaker.h:
2672         * layout/inlineformatting/text/TextUtil.cpp:
2673         (WebCore::Layout::TextUtil::hyphenPositionBefore):
2674         (WebCore::Layout::TextUtil::width):
2675         (WebCore::Layout::TextUtil::fixedPitchWidth):
2676         (WebCore::Layout::TextUtil::TextUtil): Deleted.
2677         (WebCore::Layout::TextUtil::width const): Deleted.
2678         (WebCore::Layout::TextUtil::hyphenPositionBefore const): Deleted.
2679         (WebCore::Layout::TextUtil::textWidth const): Deleted.
2680         (WebCore::Layout::TextUtil::fixedPitchWidth const): Deleted.
2681         * layout/inlineformatting/text/TextUtil.h:
2682
2683 2018-11-20  Zalan Bujtas  <zalan@apple.com>
2684
2685         [LFC][IFC] InlineFormattingContext::Line should hold the list of runs for the current line.
2686         https://bugs.webkit.org/show_bug.cgi?id=191845
2687
2688         Reviewed by Antti Koivisto.
2689
2690         Collect the runs in InlineFormattingContext::Line and transfer them to InlineFormattingState during line closing.
2691         (In the most common cases, this is only one extra vector::append() call.)
2692
2693         * layout/inlineformatting/InlineFormattingContext.cpp:
2694         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
2695         (WebCore::Layout::InlineFormattingContext::createFinalRuns const):
2696         (WebCore::Layout::InlineFormattingContext::postProcessInlineRuns const):
2697         (WebCore::Layout::InlineFormattingContext::closeLine const):
2698         (WebCore::Layout::InlineFormattingContext::appendContentToLine const):
2699         (WebCore::Layout::InlineFormattingContext::layoutInlineContent const):
2700         (WebCore::Layout::InlineFormattingContext::placeInFlowPositionedChildren const):
2701         (WebCore::Layout::InlineFormattingContext::splitInlineRunsIfNeeded const): Deleted.
2702         * layout/inlineformatting/InlineFormattingContext.h:
2703         (WebCore::Layout::InlineFormattingContext::Line::hasContent const):
2704         (WebCore::Layout::InlineFormattingContext::Line::runs):
2705         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
2706         (WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns):
2707         (WebCore::Layout::InlineFormattingContext::Geometry::computeExpansionOpportunities):
2708         (WebCore::Layout::InlineFormattingContext::Geometry::alignRuns):
2709         * layout/inlineformatting/Line.cpp:
2710         (WebCore::Layout::InlineFormattingContext::Line::init):
2711         (WebCore::Layout::InlineFormattingContext::Line::adjustLogicalLeft):
2712         (WebCore::Layout::InlineFormattingContext::Line::contentLogicalRight const):
2713         (WebCore::Layout::InlineFormattingContext::Line::appendContent):
2714         (WebCore::Layout::InlineFormattingContext::Line::close):
2715         (WebCore::Layout::InlineFormattingContext::Line::Line): Deleted.
2716
2717 2018-11-20  Zalan Butjas  <zalan@apple.com>
2718
2719         [LFC][IFC] Introduce InlineItem::nonBreakableStart/End
2720         https://bugs.webkit.org/show_bug.cgi?id=191839
2721
2722         Reviewed by Antti Koivisto.
2723
2724         Non-breakable start/end marks margin/padding/border space (even when it does not directly come from the associated layout box)
2725
2726         <span style="padding: 5px"><span>nested content with padding parent</span</span>
2727         <nested content with padding parent> <- inline run has 5px non-breakable start/end.
2728
2729         <span style="border: 5px solid green"><span style="padding-right: 10px; margin-right: 1px">1</span>2</span><span>    3</span>
2730         <1> <- inline run has 5px non-breakable start and 11px non-breakable end.
2731         <2> <- inline run has 0px non-breakable start and 5px non-breakable end.
2732         <3> <- no non-breakable values.
2733
2734         This is what the runs look like (input to line breaking)
2735         <     1           2     >
2736         < > (whitespace)
2737         <3>
2738         The line breaking treats the paddding/border etc space as part of the run and as non-breaking opportunity.
2739         With the given runs the first position where we can break the line is at the whitespace.
2740
2741         * layout/inlineformatting/InlineFormattingContext.cpp:
2742         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
2743         * layout/inlineformatting/InlineItem.h:
2744         (WebCore::Layout::InlineItem::nonBreakableStart const):
2745         (WebCore::Layout::InlineItem::nonBreakableEnd const):
2746         (WebCore::Layout::InlineItem::addNonBreakableStart):
2747         (WebCore::Layout::InlineItem::addNonBreakableEnd):
2748
2749 2018-11-20  Zalan Bujtas  <zalan@apple.com>
2750
2751         [LFC][IFC] Move detaching rules from InlineFormattingState to InlineItem
2752         https://bugs.webkit.org/show_bug.cgi?id=191838
2753
2754         Reviewed by Antti Koivisto.
2755
2756         This is in preparation for adding more context to InlineItem. In addition to
2757         detaching rules it will also hold non-breakable start/end information.
2758
2759         * layout/inlineformatting/InlineFormattingContext.cpp:
2760         (WebCore::Layout::InlineFormattingContext::splitInlineRunIfNeeded const):
2761         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
2762         * layout/inlineformatting/InlineFormattingState.cpp:
2763         (WebCore::Layout::InlineFormattingState::addDetachingRule): Deleted.
2764         (WebCore::Layout::InlineFormattingState::detachingRules const): Deleted.
2765         * layout/inlineformatting/InlineFormattingState.h:
2766         (WebCore::Layout::InlineFormattingState::setDetachingRules): Deleted.
2767         * layout/inlineformatting/InlineItem.h:
2768         (WebCore::Layout::InlineItem::addDetachingRule):
2769         (WebCore::Layout::InlineItem::detachingRules const):
2770
2771 2018-11-20  Zalan Bujjtas  <zalan@apple.com>
2772
2773         [LFC][IFC] InlineRunProvider::append() should just take const InlineItem&.
2774         https://bugs.webkit.org/show_bug.cgi?id=191837
2775
2776         Reviewed by Antti Koivisto.
2777
2778         This allows us to remove the InlineFormattingState dependency as well.
2779
2780         * layout/inlineformatting/InlineFormattingContext.cpp:
2781         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
2782         (WebCore::Layout::InlineFormattingContext::instrinsicWidthConstraints const):
2783         * layout/inlineformatting/InlineRunProvider.cpp:
2784         (WebCore::Layout::InlineRunProvider::InlineRunProvider):
2785         (WebCore::Layout::InlineRunProvider::append):
2786         * layout/inlineformatting/InlineRunProvider.h:
2787
2788 2018-11-20  Thibault Saunier  <tsaunier@igalia.com>
2789
2790         [GStreamer] Enhance debugging by making sure to print the pipeline in MediaPlayerPrivateGStreamer
2791         https://bugs.webkit.org/show_bug.cgi?id=191586
2792
2793         Reviewed by Xabier Rodriguez-Calvar.
2794
2795         This is minor changes that do not require tests.
2796
2797         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2798         (WebCore::MediaPlayerPrivateGStreamer::setAudioStreamProperties):
2799         (WebCore::MediaPlayerPrivateGStreamer::~MediaPlayerPrivateGStreamer):
2800         (WebCore::MediaPlayerPrivateGStreamer::setPlaybinURL):
2801         (WebCore::MediaPlayerPrivateGStreamer::loadFull):
2802         (WebCore::MediaPlayerPrivateGStreamer::commitLoad):
2803         (WebCore::MediaPlayerPrivateGStreamer::readyTimerFired):
2804         (WebCore::MediaPlayerPrivateGStreamer::changePipelineState):
2805         (WebCore::MediaPlayerPrivateGStreamer::prepareToPlay):
2806         (WebCore::MediaPlayerPrivateGStreamer::play):
2807         (WebCore::MediaPlayerPrivateGStreamer::pause):
2808         (WebCore::MediaPlayerPrivateGStreamer::durationMediaTime const):
2809         (WebCore::MediaPlayerPrivateGStreamer::seek):
2810         (WebCore::MediaPlayerPrivateGStreamer::updatePlaybackRate):
2811         (WebCore::MediaPlayerPrivateGStreamer::paused const):
2812         (WebCore::MediaPlayerPrivateGStreamer::enableTrack):
2813         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfVideo):
2814         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfAudio):
2815         (WebCore::MediaPlayerPrivateGStreamer::notifyPlayerOfText):
2816         (WebCore::MediaPlayerPrivateGStreamer::handleMessage):
2817         (WebCore::MediaPlayerPrivateGStreamer::processBufferingStats):
2818         (WebCore::MediaPlayerPrivateGStreamer::fillTimerFired):
2819         (WebCore::MediaPlayerPrivateGStreamer::maxMediaTimeSeekable const):
2820         (WebCore::MediaPlayerPrivateGStreamer::totalBytes const):
2821         (WebCore::MediaPlayerPrivateGStreamer::uriDecodeBinElementAddedCallback):
2822         (WebCore::MediaPlayerPrivateGStreamer::downloadBufferFileCreatedCallback):
2823         (WebCore::MediaPlayerPrivateGStreamer::sourceSetup):
2824         (WebCore::MediaPlayerPrivateGStreamer::asyncStateChangeDone):
2825         (WebCore::MediaPlayerPrivateGStreamer::updateStates):
2826         (WebCore::MediaPlayerPrivateGStreamer::loadNextLocation):
2827         (WebCore::MediaPlayerPrivateGStreamer::didEnd):
2828         (WebCore::MediaPlayerPrivateGStreamer::setDownloadBuffering):
2829         (WebCore::MediaPlayerPrivateGStreamer::setPreload):
2830         (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin):
2831
2832 2018-11-20  Manuel Rego Casasnovas  <rego@igalia.com>
2833
2834         [css-grid] Consider scrollbars in populateGridPositionsForDirection()
2835         https://bugs.webkit.org/show_bug.cgi?id=191656
2836
2837         Reviewed by Javier Fernandez.
2838
2839         We never care about scrollbars in RenderGrid::populateGridPositionsForDirection(),
2840         that's fine if the scrollbars are at the end (e.g. on the right in horizontal writing mode and LTR direction)
2841         but it causes problems when they're at the beginning (e.g. on the left in horizontal writing mode and RTL direction).
2842
2843         The patch modifies the method so it takes into account scrollbar size
2844         in order to compute the position of the columns/rows depending on the direction and the writing mode.
2845
2846         Tests: imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-001.html
2847                imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-lr-001.html
2848                imported/w3c/web-platform-tests/css/css-grid/grid-model/grid-container-scrollbar-vertical-rl-001.html
2849
2850         * rendering/RenderGrid.cpp:
2851         (WebCore::RenderGrid::populateGridPositionsForDirection):
2852
2853 2018-11-19  Ryosuke Niwa  <rniwa@webkit.org>
2854
2855         Click on node assigned to slot in button's shadow cause loss of button focus
2856         https://bugs.webkit.org/show_bug.cgi?id=191694
2857         <rdar://problem/46107920>
2858
2859         Reviewed by Wenson Hsieh.
2860
2861         Fixed the bug by traversing the parent in the composed tree when looking for an element to focus.
2862
2863         Test: fast/shadow-dom/focus-slot-parent.html
2864
2865         * page/EventHandler.cpp:
2866         (WebCore::EventHandler::dispatchMouseEvent): Fixed the bug. Also use RefPtr instead of a raw pointer.
2867
2868 2018-11-19  Fujii Hironori  <Hironori.Fujii@sony.com>
2869
2870         REGRESSION(r238350) [curl] CertificateInfo.h: error: template specialization requires 'template<>'
2871         https://bugs.webkit.org/show_bug.cgi?id=191849
2872
2873         Unreviewed build fix for clang-cl builds.
2874
2875         No new tests because there's no behaviour change.
2876
2877         * platform/network/curl/CertificateInfo.h:
2878         (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode):
2879         (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode):
2880
2881 2018-11-19  Basuke Suzuki  <basuke.suzuki@sony.com>
2882
2883         [Curl] Add API for CertificateInfo.
2884         https://bugs.webkit.org/show_bug.cgi?id=191647
2885
2886         Reviewed by Alex Christensen.
2887
2888         Minor changes for WebKit API.
2889
2890         Tests: TestWebKitAPI/Tests/WebKit/curl/Certificates.cpp
2891
2892         * platform/network/curl/CertificateInfo.h:
2893         * platform/network/curl/CertificateInfoCurl.cpp:
2894         (WebCore::CertificateInfo::CertificateInfo):
2895         (WebCore::CertificateInfo::makeCertificate):
2896         * platform/network/curl/CurlSSLVerifier.cpp:
2897         (WebCore::BIOHolder::asCertificate):
2898
2899 2018-11-19  Justin Fan  <justin_fan@apple.com>
2900
2901         [WebGPU] Begin implementing WebGPUTexture, WebGPUTextureView, and WebGPUTextureFormatEnum, and WebGPUSwapChain::configure upgrades
2902         https://bugs.webkit.org/show_bug.cgi?id=191794
2903
2904         Reviewed by Dean Jackson.
2905
2906         Test: webgpu/textures-textureviews.html
2907
2908         Implement basic functionality for getting the next WebGPUTexture and TextureView from the WebGPURenderingContext
2909         to use as a render destination for the next draw call. Also introduce WebGPUTextureFormatEnum and the ability to 
2910         configure the context with a chosen texture format. 
2911
2912         * CMakeLists.txt:
2913         * DerivedSources.make:
2914         * Modules/webgpu/GPUSwapChain.h: Texture/Pixel format can now be set.
2915         * Modules/webgpu/GPUTexture.h: Added. Interface to a MTLTexture.
2916         * Modules/webgpu/GPUTextureFormatEnum.h: Added.
2917         * Modules/webgpu/WebGPUDevice.cpp:
2918         (WebCore::WebGPUDevice::createRenderPipeline const): Removed now-unnecessary enum class cast.
2919         * Modules/webgpu/WebGPURenderPipelineDescriptor.h: Rather than duplicate GPURenderPipelineDescriptor::PrimitiveTopology, alias to it.
2920         * Modules/webgpu/WebGPUSwapChain.cpp:
2921         (WebCore::WebGPUSwapChain::configure): Can now specify a specific texture format for the underlying CAMetalLayer.
2922         (WebCore::WebGPUSwapChain::getNextTexture): Added. Request the next drawable texture.
2923         * Modules/webgpu/WebGPUSwapChain.h: Expose getNextTexture().
2924         * Modules/webgpu/WebGPUSwapChain.idl:
2925         * Modules/webgpu/WebGPUTexture.cpp: Added. 
2926         (WebCore::WebGPUTexture::create):
2927         (WebCore::WebGPUTexture::WebGPUTexture):
2928         (WebCore::WebGPUTexture::createDefaultTextureView):
2929         * Modules/webgpu/WebGPUTexture.h: Added.
2930         * Modules/webgpu/WebGPUTexture.idl: Added.
2931         * Modules/webgpu/WebGPUTextureFormatEnum.h: Added. Type alias for GPUTextureFormatEnum.
2932         * Modules/webgpu/WebGPUTextureFormatEnum.idl: Added. Used to represent any texture format used by WebGPU.
2933         * Modules/webgpu/WebGPUTextureView.cpp: Added.
2934         (WebCore::WebGPUTextureView::create):
2935         (WebCore::WebGPUTextureView::WebGPUTextureView):
2936         * Modules/webgpu/WebGPUTextureView.h: Added.
2937         * Modules/webgpu/WebGPUTextureView.idl: Added.
2938         * Modules/webgpu/cocoa/GPUSwapChainMetal.mm: 
2939         (WebCore::GPUSwapChain::create):
2940         (WebCore::GPUSwapChain::setFormat): Called by WebGPUSwapChain::configure().
2941         (WebCore::GPUSwapChain::getNextTexture):
2942         * Modules/webgpu/cocoa/GPUTextureFormatEnumMetal.mm: Added.
2943         (WebCore::convertAndValidate): Convert the WebGPUTextureFormatEnum to a MTLPixelFormat.
2944         * Modules/webgpu/cocoa/GPUTextureMetal.mm: Added.
2945         (WebCore::GPUTexture::create):
2946         (WebCore::GPUTexture::GPUTexture):
2947         (WebCore::GPUTexture::createDefaultTextureView): Uses the pixelFormat of the original texture.
2948         * Sources.txt:
2949         * SourcesCocoa.txt:
2950         * WebCore.xcodeproj/project.pbxproj:
2951         * bindings/js/WebCoreBuiltinNames.h:
2952
2953 2018-11-19  Joseph Pecoraro  <pecoraro@apple.com>
2954
2955         Web Inspector: "Reload Web Inspector" button no longer partially works
2956         https://bugs.webkit.org/show_bug.cgi?id=191773
2957         <rdar://problem/46139932>
2958
2959         Reviewed by Devin Rousso.
2960
2961         * inspector/InspectorFrontendClient.h:
2962         * inspector/InspectorFrontendHost.cpp:
2963         (WebCore::InspectorFrontendHost::reopen):
2964         * inspector/InspectorFrontendHost.h:
2965         * inspector/InspectorFrontendHost.idl:
2966         Provide a host call to reopen an inspector window to reload it.
2967
2968         * testing/Internals.cpp:
2969         Stub implementation, this is not used in tests.
2970
2971 2018-11-19  Rob Buis  <rbuis@igalia.com>
2972
2973         Setting document.title should have no effect for non SVG/HTML documents
2974         https://bugs.webkit.org/show_bug.cgi?id=191643
2975
2976         Reviewed by Chris Dumez.
2977
2978         Setting document.title should have no effect for non SVG/HTML documents,
2979         see https://html.spec.whatwg.org/multipage/dom.html#document.title.
2980
2981         Behavior matches Firefox and Chrome.
2982
2983         Test: imported/w3c/web-platform-tests/html/dom/documents/dom-tree-accessors/document.title-not-in-html-svg.html
2984
2985         * dom/Document.cpp:
2986         (WebCore::Document::setTitle):
2987
2988 2018-11-19  Wenson Hsieh  <wenson_hsieh@apple.com>
2989
2990         Dragging image with a border-image larger than the image element crashes
2991         https://bugs.webkit.org/show_bug.cgi?id=191817
2992         <rdar://problem/46159222>
2993
2994         Reviewed by Ryosuke Niwa.
2995
2996         When dragging an image element, if the image element has:
2997
2998         (1) box-sizing: border-box;
2999         (2) a border-image
3000         (3) a border-top-width that is at least as large as the height of the element and/or a border-left-width that is
3001             at least as large as the width of the element
3002
3003         ...then upon drag, we will fail to create a suitable drag image using the bounding box of the image element
3004         since the size is empty, thereby causing a crash. To fix this, we bail out of this bounding-rect-dependent
3005         codepath for generating a drag image in the case where the bounding rect is empty, and instead fall back to an
3006         icon representation for the drag image.
3007
3008         Test: fast/events/drag-image-with-border-image.html
3009
3010         * page/DragController.cpp:
3011         (WebCore::DragController::doImageDrag):
3012
3013 2018-11-18  Zan Dobersek  <zdobersek@igalia.com>
3014
3015         HarfBuzzFace::CacheEntry should use 32-bit values in its HashMap
3016         https://bugs.webkit.org/show_bug.cgi?id=191825
3017
3018         Reviewed by Michael Catanzaro.
3019
3020         The HashMap-based glyph cache contained in HarfBuzzFace::CacheEntry
3021         objects is used to map given Unicode codepoints to corresponding
3022         glyph indices (which occurs in the harfBuzzGetGlyph() function that's
3023         invoked by HarfBuzz).
3024
3025         The 16-bit unsigned integer as the map's value type is not enough here
3026         when the glyph index mapping is done through Freetype -- its API returns
3027         32-bit glyph indices, and Cairo assigns this value to the 64-bit
3028         unsigned index variable in the cairo_glyph_t struct. The value type is
3029         thus bumped to 32 bits to match the unsigned type size of the index's
3030         origin.
3031
3032         * platform/graphics/harfbuzz/HarfBuzzFace.h:
3033         * platform/graphics/harfbuzz/HarfBuzzFaceCairo.cpp:
3034
3035 2018-11-17  Wenson Hsieh  <wenson_hsieh@apple.com>
3036
3037         [iOS] Remove all usages of UIItemProvider, UIItemProviderReading, and related classes
3038         https://bugs.webkit.org/show_bug.cgi?id=191819
3039
3040         Reviewed by Dan Bernstein.
3041
3042         Replace UIItemProvider (and related classes) with NSItemProvider.
3043
3044         * platform/ios/PlatformPasteboardIOS.mm:
3045         (WebCore::registerItemToPasteboard):
3046         * platform/ios/WebItemProviderPasteboard.h:
3047         * platform/ios/WebItemProviderPasteboard.mm:
3048         (-[WebItemProviderDataRegistrar registerItemProvider:]):
3049         (-[WebItemProviderWritableObjectRegistrar initWithObject:]):
3050         (-[WebItemProviderWritableObjectRegistrar representingObject]):
3051         (-[WebItemProviderWritableObjectRegistrar registerItemProvider:]):
3052         (-[WebItemProviderRegistrationInfoList addRepresentingObject:]):
3053         (-[WebItemProviderRegistrationInfoList itemProvider]):
3054         (-[WebItemProviderPasteboard pasteboardTypes]):
3055         (-[WebItemProviderPasteboard _preLoadedDataConformingToType:forItemProviderAtIndex:]):
3056         (-[WebItemProviderPasteboard dataForPasteboardType:inItemSet:]):
3057         (allLoadableClasses):
3058         (classForTypeIdentifier):
3059         (-[WebItemProviderPasteboard valuesForPasteboardType:inItemSet:]):
3060         (-[WebItemProviderPasteboard numberOfFiles]):
3061         (-[WebItemProviderPasteboard itemProviderAtIndex:]):
3062         (-[WebItemProviderPasteboard enumerateItemProvidersWithBlock:]):
3063         * platform/mac/DragDataMac.mm:
3064         (WebCore::DragData::containsURL const):
3065
3066 2018-11-17  Ross Kirsling  <ross.kirsling@sony.com>
3067
3068         Remove superfluous LayoutUnit initializations
3069         https://bugs.webkit.org/show_bug.cgi?id=191791
3070
3071         Reviewed by Simon Fraser.
3072
3073         First step toward making LayoutUnit constructors explicit:
3074         eliminate `= 0` when constructing LayoutUnit lvalues.
3075
3076         * editing/Editor.cpp:
3077         (WebCore::Editor::firstRectForRange const):
3078         * editing/FrameSelection.cpp:
3079         (WebCore::FrameSelection::modify):
3080         (WebCore::FrameSelection::lineDirectionPointForBlockDirectionNavigation):
3081         * html/shadow/SliderThumbElement.cpp:
3082         (WebCore::RenderSliderContainer::computeLogicalHeight const):
3083         * layout/inlineformatting/InlineFormattingContextGeometry.cpp:
3084         (WebCore::Layout::InlineFormattingContext::Geometry::justifyRuns):
3085         * page/FrameView.cpp:
3086         (WebCore::FrameView::forceLayoutForPagination):
3087         * page/SpatialNavigation.cpp:
3088         (WebCore::scrollInDirection):
3089         (WebCore::distanceDataForNode):
3090         * rendering/AutoTableLayout.cpp:
3091         (WebCore::AutoTableLayout::layout):
3092         * rendering/GridTrackSizingAlgorithm.cpp:
3093         (WebCore::marginIntrinsicLogicalWidthForChild):
3094         (WebCore::GridTrackSizingAlgorithm::gridAreaBreadthForChild const):
3095         * rendering/InlineFlowBox.cpp:
3096         (WebCore::InlineFlowBox::placeBoxesInBlockDirection):
3097         (WebCore::InlineFlowBox::paintFillLayer):
3098         (WebCore::InlineFlowBox::paintBoxDecorations):
3099         (WebCore::InlineFlowBox::paintMask):
3100         (WebCore::InlineFlowBox::computeOverAnnotationAdjustment const):
3101         (WebCore::InlineFlowBox::computeUnderAnnotationAdjustment const):
3102         * rendering/RenderBlock.cpp:
3103         (WebCore::RenderBlock::marginIntrinsicLogicalWidthForChild const):
3104         (WebCore::RenderBlock::layoutPositionedObject):
3105         (WebCore::RenderBlock::selectionGapRectsForRepaint):
3106         (WebCore::RenderBlock::paintSelection):
3107         (WebCore::RenderBlock::textIndentOffset const):
3108         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths const):
3109         * rendering/RenderBlockFlow.cpp:
3110         (WebCore::RenderBlockFlow::rebuildFloatingObjectSetFromIntrudingFloats):
3111         (WebCore::RenderBlockFlow::layoutBlock):
3112         (WebCore::RenderBlockFlow::layoutBlockChildren):
3113         (WebCore::RenderBlockFlow::marginValuesForChild const):
3114         (WebCore::RenderBlockFlow::estimateLogicalTopPosition):
3115         (WebCore::RenderBlockFlow::applyBeforeBreak):
3116         (WebCore::RenderBlockFlow::applyAfterBreak):
3117         (WebCore::RenderBlockFlow::adjustBlockChildForPagination):
3118         (WebCore::RenderBlockFlow::clearFloats):
3119         (WebCore::RenderBlockFlow::lowestFloatLogicalBottom const):
3120         (WebCore::RenderBlockFlow::lowestInitialLetterLogicalBottom const):
3121         (WebCore::RenderBlockFlow::addOverhangingFloats):
3122         (WebCore::RenderBlockFlow::getClearDelta):
3123         (WebCore::RenderBlockFlow::computeInlinePreferredLogicalWidths const):
3124         * rendering/RenderBlockLineLayout.cpp:
3125         (WebCore::setLogicalWidthForTextRun):
3126         (WebCore::RenderBlockFlow::layoutRunsAndFloatsInRange):
3127         (WebCore::RenderBlockFlow::determineStartPosition):
3128         * rendering/RenderBox.cpp:
3129         (WebCore::RenderBox::fillAvailableMeasure const):
3130         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing const):
3131         (WebCore::RenderBox::computeLogicalWidthInFragmentUsing const):
3132         (WebCore::RenderBox::computePercentageLogicalHeight const):
3133         (WebCore::RenderBox::computeReplacedLogicalWidthUsing const):
3134         (WebCore::RenderBox::computePositionedLogicalWidthUsing const):
3135         (WebCore::RenderBox::computePositionedLogicalHeightUsing const):
3136         (WebCore::RenderBox::computePositionedLogicalWidthReplaced const):
3137         (WebCore::RenderBox::computePositionedLogicalHeightReplaced const):
3138         * rendering/RenderBoxModelObject.cpp:
3139         (WebCore::RenderBoxModelObject::computedCSSPadding const):
3140         (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry const):
3141         * rendering/RenderDeprecatedFlexibleBox.cpp:
3142         (WebCore::marginWidthForChild):
3143         (WebCore::RenderDeprecatedFlexibleBox::layoutHorizontalBox):
3144         (WebCore::RenderDeprecatedFlexibleBox::layoutVerticalBox):
3145         * rendering/RenderFileUploadControl.cpp:
3146         (WebCore::RenderFileUploadControl::paintObject):
3147         * rendering/RenderFragmentedFlow.cpp:
3148         (WebCore::RenderFragmentedFlow::validateFragments):
3149         (WebCore::RenderFragmentedFlow::adjustedPositionRelativeToOffsetParent const):
3150         (WebCore::RenderFragmentedFlow::updateFragmentsFragmentedFlowPortionRect):
3151         * rendering/RenderFrameSet.cpp:
3152         (WebCore::RenderFrameSet::paint):
3153         * rendering/RenderListItem.cpp:
3154         (WebCore::RenderListItem::positionListMarker):
3155         * rendering/RenderListMarker.cpp:
3156         (WebCore::RenderListMarker::computePreferredLogicalWidths):
3157         (WebCore::RenderListMarker::updateMargins):
3158         * rendering/RenderMultiColumnSet.cpp:
3159         (WebCore::RenderMultiColumnSet::initialBlockOffsetForPainting const):
3160         * rendering/RenderRubyRun.cpp:
3161         (WebCore::RenderRubyRun::layoutBlock):
3162         * rendering/RenderTable.cpp:
3163         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
3164         (WebCore::RenderTable::layout):
3165         (WebCore::RenderTable::offsetWidthForColumn const):
3166         (WebCore::RenderTable::offsetHeightForColumn const):
3167         (WebCore::RenderTable::outerBorderBefore const):
3168         (WebCore::RenderTable::outerBorderAfter const):
3169         (WebCore::RenderTable::outerBorderStart const):
3170         (WebCore::RenderTable::outerBorderEnd const):
3171         * rendering/RenderTableCell.cpp:
3172         (WebCore::RenderTableCell::logicalWidthFromColumns const):
3173         (WebCore::RenderTableCell::computeIntrinsicPadding):
3174         * rendering/RenderTableSection.cpp:
3175         (WebCore::RenderTableSection::calcRowLogicalHeight):
3176         (WebCore::RenderTableSection::distributeExtraLogicalHeightToPercentRows):
3177         (WebCore::RenderTableSection::distributeExtraLogicalHeightToAutoRows):
3178         (WebCore::RenderTableSection::distributeRemainingExtraLogicalHeight):
3179         (WebCore::RenderTableSection::layoutRows):
3180         (WebCore::RenderTableSection::calcOuterBorderBefore const):
3181         (WebCore::RenderTableSection::calcOuterBorderAfter const):
3182         (WebCore::RenderTableSection::calcOuterBorderStart const):
3183         (WebCore::RenderTableSection::calcOuterBorderEnd const):
3184         * rendering/RootInlineBox.cpp:
3185         (WebCore::RootInlineBox::alignBoxesInBlockDirection):
3186         (WebCore::RootInlineBox::beforeAnnotationsAdjustment const):
3187         (WebCore::RootInlineBox::lineSnapAdjustment const):
3188         (WebCore::RootInlineBox::verticalPositionForBox):
3189         * rendering/line/BreakingContext.h:
3190         (WebCore::inlineLogicalWidth):
3191         * rendering/mathml/RenderMathMLBlock.cpp:
3192         (WebCore::RenderMathMLBlock::layoutItems):
3193         * rendering/mathml/RenderMathMLFraction.cpp:
3194         (WebCore::RenderMathMLFraction::layoutBlock):
3195         * rendering/mathml/RenderMathMLOperator.cpp:
3196         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
3197         * rendering/mathml/RenderMathMLRoot.cpp:
3198         (WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
3199         (WebCore::RenderMathMLRoot::paint):
3200         * rendering/mathml/RenderMathMLRow.cpp:
3201         (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
3202         * rendering/mathml/RenderMathMLScripts.cpp:
3203         (WebCore::RenderMathMLScripts::layoutBlock):
3204         * rendering/mathml/RenderMathMLUnderOver.cpp:
3205         (WebCore::RenderMathMLUnderOver::stretchHorizontalOperatorsAndLayoutChildren):
3206         (WebCore::RenderMathMLUnderOver::layoutBlock):
3207         * rendering/style/RenderStyle.cpp:
3208         (WebCore::RenderStyle::getShadowInsetExtent const):
3209         * rendering/svg/RenderSVGText.cpp:
3210         (WebCore::RenderSVGText::layout):
3211
3212 2018-11-17  Simon Fraser  <simon.fraser@apple.com>
3213
3214         Avoid triggering compositing updates when only the root layer is composited
3215         https://bugs.webkit.org/show_bug.cgi?id=191813
3216
3217         Reviewed by Zalan Bujtas.
3218
3219         If we know that the only composited layer is the root, we can avoid triggering deep
3220         compositing updates sometimes, for example when layout changes size or position,
3221         or when z-order lists change.
3222
3223         * rendering/RenderLayer.cpp:
3224         (WebCore::RenderLayer::addChild):
3225         (WebCore::RenderLayer::removeChild):
3226         (WebCore::RenderLayer::updateLayerPosition):
3227         (WebCore::RenderLayer::scrollTo):
3228         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
3229         (WebCore::outputPaintOrderTreeRecursive):
3230         * rendering/RenderLayerCompositor.cpp:
3231         (WebCore::RenderLayerCompositor::updateBackingAndHierarchy): Consult the layer.hasCompositingDescendant()
3232         flag to cut off descendants traversal when possible.
3233         (WebCore::RenderLayerCompositor::layerStyleChanged):
3234
3235 2018-11-17  Simon Fraser  <simon.fraser@apple.com>
3236
3237         Fix an error in 238354 - !=, not ==.
3238         
3239         Fixes test failures.
3240
3241         * rendering/RenderLayerCompositor.cpp:
3242         (WebCore::RenderLayerCompositor::layerBecameNonComposited):
3243
3244 2018-11-17  Simon Fraser  <simon.fraser@apple.com>
3245
3246         Clarify RenderLayerCompositor::hasAnyAdditionalCompositedLayers() and related code.
3247         https://bugs.webkit.org/show_bug.cgi?id=191810
3248
3249         Reviewed by Zalan Bujtas.
3250
3251         Rename m_compositedLayerCount to m_contentLayersCount and have it track layers other
3252         than the RenderView's layer.
3253
3254         hasAnyAdditionalCompositedLayers() is really about whether we can drop out of compositing
3255         because no content layer is composited, and overlays don't require compositing, so
3256         rename it.
3257
3258         * rendering/RenderLayerCompositor.cpp:
3259         (WebCore::RenderLayerCompositor::updateCompositingLayers):
3260         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3261         (WebCore::RenderLayerCompositor::needsCompositingForContentOrOverlays const):
3262         (WebCore::RenderLayerCompositor::layerBecameComposited):
3263         (WebCore::RenderLayerCompositor::layerBecameNonComposited):
3264         (WebCore::RenderLayerCompositor::layerTreeAsText):
3265         (WebCore::RenderLayerCompositor::hasAnyAdditionalCompositedLayers const): Deleted.
3266         * rendering/RenderLayerCompositor.h:
3267
3268 2018-11-17  Simon Fraser  <simon.fraser@apple.com>
3269
3270         Rename RenderLayerCompositor::inCompositingMode() to usesCompositing()
3271         https://bugs.webkit.org/show_bug.cgi?id=191808
3272
3273         Reviewed by Zalan Bujtas.
3274
3275         Other code uses "usesCompositing" so standardize on that (future changes will make
3276         "compositing mode" more ambiguous). Also remove a FrameView function that only
3277         had one caller.
3278
3279         * page/FrameView.cpp:
3280         (WebCore::FrameView::clearBackingStores):
3281         (WebCore::FrameView::handleDeferredScrollbarsUpdateAfterDirectionChange):
3282         (WebCore::FrameView::delegatesScrollingDidChange):
3283         (WebCore::FrameView::hasCompositedContent const): Deleted.
3284         * page/FrameView.h:
3285         * rendering/RenderLayer.cpp:
3286         (WebCore::RenderLayer::addChild):
3287         (WebCore::RenderLayer::removeChild):
3288         (WebCore::RenderLayer::rebuildZOrderLists):
3289         (WebCore::RenderLayer::updateLayerPosition):
3290         (WebCore::RenderLayer::scrollTo):
3291         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
3292         * rendering/RenderLayerCompositor.cpp:
3293         (WebCore::RenderLayerCompositor::updateCompositingPolicy):
3294         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
3295         (WebCore::RenderLayerCompositor::layerStyleChanged):
3296         (WebCore::RenderLayerCompositor::updateBacking):
3297         (WebCore::RenderLayerCompositor::parentFrameContentLayers):
3298         (WebCore::RenderLayerCompositor::setIsInWindow):
3299         (WebCore::RenderLayerCompositor::needsToBeComposited const):
3300         (WebCore::RenderLayerCompositor::reasonsForCompositing const):
3301         (WebCore::RenderLayerCompositor::requiresCompositingForAnimation const):
3302         (WebCore::RenderLayerCompositor::rootOrBodyStyleChanged):
3303         (WebCore::RenderLayerCompositor::rootBackgroundColorOrTransparencyChanged):
3304         * rendering/RenderLayerCompositor.h:
3305         * rendering/RenderView.cpp:
3306         (WebCore::RenderView::repaintViewAndCompositedLayers):
3307         (WebCore::RenderView::usesCompositing const):
3308
3309 2018-11-17  Devin Rousso  <drousso@apple.com>
3310
3311         Web Inspector: Network: add button to show system certificate dialog
3312         https://bugs.webkit.org/show_bug.cgi?id=191458
3313         <rdar://problem/45977019>
3314
3315         Reviewed by Joseph Pecoraro.
3316
3317         Test: http/tests/inspector/network/getSerializedCertificate.html
3318
3319         * inspector/agents/InspectorNetworkAgent.h:
3320         * inspector/agents/InspectorNetworkAgent.cpp:
3321         (WebCore::InspectorNetworkAgent::getSerializedCertificate): Added.
3322
3323         * inspector/InspectorFrontendHost.idl:
3324         * inspector/InspectorFrontendHost.h:
3325         * inspector/InspectorFrontendHost.cpp:
3326         (WebCore::InspectorFrontendHost::supportsShowCertificate): Added.
3327         (WebCore::InspectorFrontendHost::showCertificate): Added.
3328         * inspector/InspectorFrontendClient.h:
3329         (InspectorFrontendClient::showCertificate): Added.
3330         * testing/Internals.cpp:
3331         (InspectorStubFrontend::showCertificate): Added.
3332
3333         * platform/network/cf/CertificateInfo.h:
3334         (WTF::Persistence::encodeCFData): Added.
3335         (WTF::Persistence::decodeCFData): Added.
3336         (WTF::Persistence::encodeSecTrustRef): Added.
3337         (WTF::Persistence::decodeSecTrustRef): Added.
3338         (WTF::Persistence::encodeCertificateChain): Added.
3339         (WTF::Persistence::decodeCertificateChain): Added.
3340         (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode): Added.
3341         (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode): Added.
3342         * platform/network/cf/CertificateInfoCFNet.cpp:
3343         * platform/network/cocoa/CertificateInfoCocoa.mm:
3344
3345         * platform/network/curl/CertificateInfo.h:
3346         (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode): Added.
3347         (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode): Added.
3348
3349         * platform/network/soup/CertificateInfo.h:
3350         (WTF::Persistence::Coder<GRefPtr<GByteArray>>::encode): Added.
3351         (WTF::Persistence::Coder<GRefPtr<GByteArray>>::decode): Added.
3352         (WTF::Persistence::certificatesDataListFromCertificateInfo): Added.
3353         (WTF::Persistence::certificateFromCertificatesDataList): Added.
3354         (WTF::Persistence::Coder<WebCore::CertificateInfo>::encode): Added.
3355         (WTF::Persistence::Coder<WebCore::CertificateInfo>::decode): Added.
3356
3357 2018-11-17  Zalan Bujtas  <zalan@apple.com>
3358
3359         [LFC][IFC] InlineFormattingState::addDetachingRule should accumulate rules.
3360         https://bugs.webkit.org/show_bug.cgi?id=191801
3361
3362         Reviewed by Antti Koivisto.
3363
3364         before<span style="position: relative">positioned</span>after
3365         In the example above the <positioned> inline box has both the BreakAtStart and the BreakAtEnd rules.
3366         While walking through the inline tree, we add BreakAtStart first and when we figure it's the last child too,
3367         we add BreakAtEnd as well. BreakAtEnd should not clear the BreakAtStart rule.
3368
3369         Test: fast/inline/simple-inline-with-out-of-flow-descendant2.html
3370
3371         * layout/inlineformatting/InlineFormattingContext.cpp:
3372         (WebCore::Layout::InlineFormattingContext::collectInlineContentForSubtree const):
3373         * layout/inlineformatting/InlineFormattingState.cpp:
3374         (WebCore::Layout::InlineFormattingState::addDetachingRule):
3375         * layout/inlineformatting/InlineFormattingState.h:
3376         (WebCore::Layout::InlineFormattingState::addDetachingRule): Deleted.
3377
3378 2018-11-17  Jonathan Hammer  <jonathan@e3software.com>
3379
3380         Caret stops blinking after context menu shown
3381         https://bugs.webkit.org/show_bug.cgi?id=191715
3382
3383         Reviewed by Ryosuke Niwa.
3384
3385         Changed EventHandler::sendContextMenuEvent to un-suspend caret blinking so that
3386         the caret continues to blink even after the context menu is dismissed. The normal
3387         way of un-suspendeding caret blinking (in EventHandler::handleMouseReleaseEvent) does
3388         not apply in the case of context menus because handleMouseReleaseEvent is not
3389         called once the context menu is up.
3390
3391         Test: fast/events/contextmenu-dismiss-blink-caret.html
3392
3393         * page/EventHandler.cpp:
3394         (WebCore::EventHandler::sendContextMenuEvent):
3395         * testing/Internals.cpp:
3396         (WebCore::Internals::isCaretBlinkingSuspended):
3397         * testing/Internals.h:
3398         * testing/Internals.idl:
3399
3400 2018-11-16  Antoine Quint  <graouts@apple.com>
3401
3402         [Pointer Events] event.isPrimary doesn't always represent the oldest active touch
3403         https://bugs.webkit.org/show_bug.cgi?id=191752
3404         <rdar://problem/46129270>
3405
3406         Reviewed by Dean Jackson.
3407
3408         Provide isPrimary to the constructor so its value can be determined at the call site.
3409
3410         Test: pointerevents/ios/pointer-events-is-primary.html
3411
3412         * dom/PointerEvent.h:
3413         * dom/ios/PointerEventIOS.cpp:
3414         (WebCore::PointerEvent::create):
3415         (WebCore::PointerEvent::PointerEvent):
3416         (WebCore::m_isPrimary):
3417
3418 2018-11-16  Alex Christensen  <achristensen@webkit.org>
3419
3420         Tweak _showSafeBrowsingWarningWithTitle SPI
3421         https://bugs.webkit.org/show_bug.cgi?id=191799
3422
3423         Reviewed by Wenson Hsieh.
3424
3425         It turns out I needed to expose both sentinel values used in safe browsing for my application of this SPI in Mac Safari.
3426         Allowing the caller to make its own sentinel values is insufficient because the malware confirmation needs to be over the warning.
3427         The completion handler parameter should just be a bool indicating whether the user has chosen to continue after all warnings.
3428
3429         Covered by updated API tests.
3430
3431         * en.lproj/Localizable.strings:
3432         * platform/LocalizedStrings.cpp:
3433         (WebCore::formControlCancelButtonTitle):
3434         Make "Cancel"'s description a little more generic.
3435
3436 2018-11-16  Simon Fraser  <simon.fraser@apple.com>
3437
3438         Optimize composited iframe layer hookup
3439         https://bugs.webkit.org/show_bug.cgi?id=191778
3440
3441         Reviewed by Zalan Bujtas.
3442
3443         The change made in r238229 can be more targeted; we only need to hook up iframe content
3444         layers when the layer is already composited (otherwise the updateBacking() above would have triggered
3445         the work), and when it's a RenderWidget layer.
3446         
3447         Tested by existing tests.
3448
3449         * rendering/RenderLayer.cpp:
3450         (WebCore::outputPaintOrderTreeRecursive):
3451         * rendering/RenderLayerCompositor.cpp:
3452         (WebCore::RenderLayerCompositor::layerStyleChanged):
3453
3454 2018-11-16  Ross Kirsling  <ross.kirsling@sony.com>
3455
3456         Provide default implementation of Widget
3457         https://bugs.webkit.org/show_bug.cgi?id=191784
3458
3459         Reviewed by Michael Catanzaro.
3460
3461         * SourcesWPE.txt:
3462         * platform/Widget.cpp:
3463         (WebCore::Widget::Widget):
3464         (WebCore::Widget::frameRect const):
3465         (WebCore::Widget::~Widget):
3466         (WebCore::Widget::setFrameRect):
3467         (WebCore::Widget::paint):
3468         (WebCore::Widget::setFocus):
3469         (WebCore::Widget::setCursor):
3470         (WebCore::Widget::show):
3471         (WebCore::Widget::hide):
3472         (WebCore::Widget::setIsSelected):
3473         * platform/gtk/WidgetGtk.cpp:
3474         (WebCore::Widget::Widget): Deleted.
3475         (WebCore::Widget::frameRect const): Deleted.
3476         * platform/win/WidgetWin.cpp:
3477         (WebCore::Widget::Widget): Deleted.
3478         (WebCore::Widget::frameRect const): Deleted.
3479         * platform/wpe/WidgetWPE.cpp: Removed.
3480
3481 2018-11-16  Chris Dumez  <cdumez@apple.com>
3482
3483         [macOS] Label "prewarmed" WebContent processes in Activity Monitor
3484         https://bugs.webkit.org/show_bug.cgi?id=191765
3485         <rdar://problem/45953463>
3486
3487         Reviewed by Geoffrey Garen.
3488
3489         * en.lproj/Localizable.strings:
3490
3491 2018-11-16  Jeremy Jones  <jeremyj@apple.com>
3492
3493         Enable external playback for video in element fullscreen.
3494         https://bugs.webkit.org/show_bug.cgi?id=190359
3495         rdar://problem/42560085
3496
3497         Reviewed by Jer Noble.
3498
3499         No new tests because we don't have a good way to test external playback.
3500
3501         Any video that might be auto-pipped from element fullscreen should also enable external playback for video out.
3502         PiP and external playback are mutually exclusive. Instead of preventing PiP when external playback is active,
3503         allow PiP, but disable external playback while PiP is active.
3504
3505         * html/HTMLMediaElement.cpp:
3506         (WebCore::HTMLMediaElement::setVideoFullscreenStandby):
3507         * html/HTMLMediaElement.h:
3508         * platform/graphics/MediaPlayer.cpp:
3509         (WebCore::MediaPlayer::setVideoFullscreenStandby):
3510         (WebCore::MediaPlayer::videoFullscreenStandby const):
3511         * platform/graphics/MediaPlayer.h:
3512         (WebCore::MediaPlayerClient::mediaPlayerVideoFullscreenStandby const):
3513         * platform/graphics/MediaPlayerPrivate.h:
3514         (WebCore::MediaPlayerPrivateInterface::setVideoFullscreenStandby):
3515         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
3516         (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenStandby):
3517         (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback):
3518
3519 2018-11-16  Jer Noble  <jer.noble@apple.com>
3520
3521         Regression(r233865): Causes synchronous IPC in the middle of layout
3522         https://bugs.webkit.org/show_bug.cgi?id=188307
3523         <rdar://problem/42807306>
3524
3525         Reviewed by Eric Carlson.
3526
3527         Revert the changes added in r233865. Rather than make a syncronous call to the UIProcess to
3528         query whether the view has been backgrounded while (e.g.) JS has been spinning, perform the
3529         steps of the requestFullscreen() method on the next run loop, allowing messages from the
3530         UIProcess about page visibilty to be delivered first.
3531
3532         * dom/Document.cpp:
3533         (WebCore::Document::requestFullScreenForElement):
3534         * html/HTMLMediaElement.cpp:
3535         (WebCore::HTMLMediaElement::enterFullscreen):
3536         * html/HTMLMediaElement.h:
3537         * page/ChromeClient.h:
3538
3539 2018-11-16  Ross Kirsling  <ross.kirsling@sony.com>
3540
3541         Provide default implementation of Cursor
3542         https://bugs.webkit.org/show_bug.cgi?id=191772
3543
3544         Reviewed by Michael Catanzaro.
3545
3546         * SourcesWPE.txt:
3547         * platform/Cursor.cpp:
3548         (WebCore::Cursor::ensurePlatformCursor const):
3549         * platform/wpe/CursorWPE.cpp: Removed.
3550
3551 2018-11-16  Don Olmstead  <don.olmstead@sony.com>
3552
3553         EditorWPE should be EditorLibWPE
3554         https://bugs.webkit.org/show_bug.cgi?id=191774
3555
3556         Reviewed by Michael Catanzaro.
3557
3558         The platform specific implementations of Editor are all around the
3559         platform's Pasteboard. Since the Pasteboard implementation is now based
3560         around USE(LIBWPE) EditorWPE should be renamed to EditorLibWPE.
3561
3562         * SourcesWPE.txt:
3563         * editing/libwpe/EditorLibWPE.cpp: Renamed from Source/WebCore/editing/wpe/EditorWPE.cpp.
3564
3565 2018-11-16  Jeremy Jones  <jeremyj@apple.com>
3566
3567         Include AirPlay destination name in AirPlay placard.
3568         https://bugs.webkit.org/show_bug.cgi?id=191574
3569         rdar://problem/45536144
3570
3571         Reviewed by Eric Carlson.
3572
3573         Updated existing tests.
3574
3575         Include the name of the AirPlay destination in the video element's AirPlay placard.
3576
3577         * Modules/modern-media-controls/controls/airplay-placard.js:
3578         (AirplayPlacard):
3579         * Modules/modern-media-controls/controls/placard.js:
3580         * Modules/modern-media-controls/media/placard-support.js:
3581         (PlacardSupport.prototype._updatePlacard):
3582         (PlacardSupport.prototype._updateAirPlayPlacard):
3583         (PlacardSupport):
3584         * en.lproj/modern-media-controls-localized-strings.js:
3585
3586 2018-11-16  Zalan Bujtas  <zalan@apple.com>
3587
3588         Add DidFirstMeaningfulPaint milestone.
3589         https://bugs.webkit.org/show_bug.cgi?id=191754
3590
3591         Reviewed by Simon Fraser.
3592
3593         This milestone fires sone after the paint triggered by the first visually non-empty layout.
3594
3595         * page/FrameView.cpp:
3596         (WebCore::FrameView::fireLayoutRelatedMilestonesIfNeeded):
3597         (WebCore::FrameView::firePaintRelatedMilestonesIfNeeded):
3598         * page/LayoutMilestone.h:
3599
3600 2018-11-16  Don Olmstead  <don.olmstead@sony.com>
3601
3602         Provide default implementations of Image and Icon
3603         https://bugs.webkit.org/show_bug.cgi?id=191764
3604
3605         Reviewed by Michael Catanzaro.
3606
3607         Makes IconWPE and ImageWPE implementations the default.
3608
3609         * Sources.txt:
3610         * SourcesWPE.txt:
3611         * platform/graphics/Icon.cpp: Renamed from Source/WebCore/platform/graphics/wpe/IconWPE.cpp.
3612         * platform/graphics/Image.cpp:
3613         (WebCore::BitmapImage::invalidatePlatformData): Placed here for consistency with implementing ports.
3614         (WebCore::Image::loadPlatformResource):
3615         * platform/graphics/wpe/ImageWPE.cpp: Removed.
3616
3617 2018-11-16  Brent Fulgham  <bfulgham@apple.com>
3618
3619         [Win] Reduce the use of WKSI library calls: CFNetwork
3620         https://bugs.webkit.org/show_bug.cgi?id=191718
3621         <rdar://problem/46108732>
3622
3623         Reviewed by Alex Christensen.
3624
3625         Remove custom WKSI CFNetwork calls, since the SPI is already documented in PAL. Just
3626         make the same calls on Windows, like we did for iOS and macOS back in 2017.
3627
3628         Stop including WebKitSystemInterface.h for files that used to rely on it
3629         for font-related features.
3630         
3631         Tested by existing Windows regression tests. There should be no change in behavior.
3632
3633         * platform/graphics/win/FontCacheWin.cpp:
3634         * platform/graphics/win/FontCustomPlatformData.cpp:
3635         * platform/graphics/win/FontPlatformDataCGWin.cpp:
3636         * platform/network/cf/CookieStorageCFNet.cpp:
3637         * platform/network/cf/CredentialStorageCFNet.cpp:
3638         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
3639         (WebCore::createPrivateStorageSession):
3640         (WebCore::NetworkStorageSession::switchToNewTestingSession):
3641         (WebCore::NetworkStorageSession::ensureSession):
3642         * platform/network/cf/ResourceError.h:
3643         * platform/network/cf/ResourceErrorCF.cpp:
3644         (WebCore::getSSLPeerCertificateData):
3645         (WebCore::setSSLPeerCertificateData):
3646         (WebCore::ResourceError::getSSLPeerCertificateDataBytePtr):
3647         (WebCore::ResourceError::platformLazyInit):
3648         (WebCore::ResourceError::cfError const):
3649         * platform/network/cf/ResourceHandleCFNet.cpp:
3650         (WebCore::setClientCertificateInSSLProperties):
3651         (WebCore::ResourceHandle::createCFURLConnection):
3652         * platform/network/cf/ResourceHandleCFURLConnectionDelegate.cpp:
3653         * platform/network/cf/ResourceRequestCFNet.cpp:
3654         * platform/network/cf/SocketStreamHandleImplCFNet.cpp:
3655
3656 2018-11-16  Timothy Hatcher  <timothy@apple.com>
3657
3658         Add html{color:text} to the simpleUserAgentStyleSheet on macOS.
3659         https://bugs.webkit.org/show_bug.cgi?id=191760
3660
3661         Reviewed by Antti Koivisto.
3662
3663         * css/CSSDefaultStyleSheets.cpp: Added html{color:text} to simpleUserAgentStyleSheet inside
3664         a PLATFORM(MAC) copy of the string.
3665
3666 2018-11-16  Jer Noble  <jer.noble@apple.com>
3667
3668         An early return from updateSchedulingInfo can leave some variables uninitialized.
3669         https://bugs.webkit.org/show_bug.cgi?id=191755
3670         <rdar://problem/39910089>
3671
3672         Reviewed by Brent Fulgham.
3673
3674         * Modules/webaudio/AudioBufferSourceNode.cpp:
3675         (WebCore::AudioBufferSourceNode::process):
3676         * Modules/webaudio/AudioScheduledSourceNode.cpp:
3677         (WebCore::AudioScheduledSourceNode::updateSchedulingInfo):
3678         * Modules/webaudio/OscillatorNode.cpp:
3679         (WebCore::OscillatorNode::process):
3680
3681 2018-11-16  Alicia Boya García  <aboya@igalia.com>
3682
3683         [MSE][GStreamer] Ignore caps notifications when tearing down the pipeline
3684         https://bugs.webkit.org/show_bug.cgi?id=191578
3685
3686         Reviewed by Xabier Rodriguez-Calvar.
3687
3688         Changing the demuxer to READY state (which is done only in the main
3689         thread) triggers the unlinking of its srcpads, which in turns emits a
3690         caps change notification in the previously linked element since they
3691         become unnegotiated again.
3692
3693         We are not interested in caps notifications in these cases, so let's
3694         just ignore caps notifications emitted from the main thread.
3695
3696         This fixes an assertion failure in the debug builds.
3697
3698         * platform/graphics/gstreamer/mse/AppendPipeline.cpp:
3699         (WebCore::AppendPipeline::AppendPipeline):
3700
3701 2018-11-16  Sihui Liu  <sihui_liu@apple.com>
3702
3703         Storing blobs in IDB on iOS: "Error preparing blob/file"
3704         https://bugs.webkit.org/show_bug.cgi?id=188438
3705         <rdar://problem/43097279>
3706
3707         Reviewed by Alex Christensen.
3708
3709         Grant sandbox extension of temp folder to network process, because we suggested network process had access to 
3710         the folder on iOS device but it didn't. 
3711
3712         This makes some existing tests about IDB blob pass on iOS device.
3713
3714         * Modules/indexeddb/server/IDBBackingStore.h:
3715         * Modules/indexeddb/server/SQLiteIDBTransaction.cpp:
3716         (WebCore::IDBServer::SQLiteIDBTransaction::moveBlobFilesIfNecessary):
3717         (WebCore::IDBServer::SQLiteIDBTransaction::deleteBlobFilesIfNecessary):
3718         (WebCore::IDBServer::SQLiteIDBTransaction::abort):
3719         * Modules/indexeddb/shared/InProcessIDBServer.h:
3720
3721 2018-11-16  Don Olmstead  <don.olmstead@sony.com>
3722
3723         Add USE(LIBWPE) to WebCore
3724         https://bugs.webkit.org/show_bug.cgi?id=191401
3725
3726         Reviewed by Michael Catanzaro.
3727
3728         No new tests. No change in behavior.
3729
3730         Migrates all PLATFORM(WPE) code that calls into wpe_* APIs to
3731         USE(LIBWPE) instead.
3732
3733         Renames classes and files to use the suffix LibWPE.
3734
3735         * PlatformWPE.cmake:
3736         * SourcesWPE.txt:
3737         * platform/Pasteboard.h:
3738         * platform/PasteboardStrategy.h:
3739         * platform/PlatformKeyboardEvent.h:
3740         * platform/PlatformPasteboard.h:
3741         * platform/graphics/PlatformDisplay.cpp:
3742         (WebCore::PlatformDisplay::createPlatformDisplay):
3743         * platform/graphics/PlatformDisplay.h:
3744         * platform/graphics/egl/GLContextEGL.h:
3745         * platform/graphics/egl/GLContextEGLLibWPE.cpp: Renamed from Source/WebCore/platform/graphics/egl/GLContextEGLWPE.cpp.
3746         (WebCore::GLContextEGL::createWPEContext):
3747         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
3748         (WebCore::MediaPlayerPrivateGStreamerBase::ensureGstGLContext):
3749         * platform/graphics/libwpe/PlatformDisplayLibWPE.cpp: Renamed from Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.cpp.
3750         (WebCore::PlatformDisplayLibWPE::create):
3751         (WebCore::PlatformDisplayLibWPE::PlatformDisplayLibWPE):
3752         (WebCore::PlatformDisplayLibWPE::~PlatformDisplayLibWPE):
3753         (WebCore::PlatformDisplayLibWPE::initialize):
3754         * platform/graphics/libwpe/PlatformDisplayLibWPE.h: Renamed from Source/WebCore/platform/graphics/wpe/PlatformDisplayWPE.h.
3755         * platform/libwpe/PasteboardLibWPE.cpp: Renamed from Source/WebCore/platform/wpe/PasteboardWPE.cpp.
3756         * platform/libwpe/PlatformKeyboardEventLibWPE.cpp: Renamed from Source/WebCore/platform/wpe/PlatformKeyboardEventWPE.cpp.
3757         * platform/libwpe/PlatformPasteboardLibWPE.cpp: Renamed from Source/WebCore/platform/wpe/PlatformPasteboardWPE.cpp.
3758
3759 2018-11-16  Zalan Bujtas  <zalan@apple.com>
3760
3761         [iOS] 2 subsequent taps are required to trigger certain tasks on the desktop version of YouTube.com (hover vs click).
3762         https://bugs.webkit.org/show_bug.cgi?id=191712
3763         <rdar://problem/45612900>
3764
3765         Reviewed by Simon Fraser.
3766
3767         In handleSyntheticClick() we use WKContentObservation to figure out whether the tap should be treated as a hover or a click.
3768         In general, if the mouse-move event triggers a visible content change, we assume we hit a hover-like drop down menu (or something similar)
3769         and no need to dispatch a click event.
3770         The idea here is that if the new content (result of the mouse-move event) does not respond to mouse click, it is most likely
3771         only for tooltip-like reasons and it's ok to proceed with the click event.
3772
3773         Test: fast/events/touch/ios/click-instead-of-hover-simple.html
3774
3775         * rendering/updating/RenderTreeUpdater.cpp:
3776         (WebCore::CheckForVisibilityChange::~CheckForVisibilityChange):
3777
3778 2018-11-16  Zalan Bujtas  <zalan@apple.com>
3779
3780         [LFC][IFC] Add support for out-of-flow positioned boxes
3781         https://bugs.webkit.org/show_bug.cgi?id=191726
3782
3783         Reviewed by Antti Koivisto.
3784
3785         While laying out formatting context roots (inline-block, floats) in an inline formatting context, we need to make sure
3786         that their out-of-flow descendants get laid out as well.
3787
3788         Test: fast/inline/simple-inline-with-out-of-flow-descendant.html
3789
3790         * layout/inlineformatting/InlineFormattingContext.cpp:
3791         (WebCore::Layout::InlineFormattingContext::layoutFormattingContextRoot const):
3792         * layout/layouttree/LayoutTreeBuilder.cpp: This was returning the wrong context root when the container was also a context root.
3793         (WebCore::Layout::TreeBuilder::createSubTree):
3794
3795 2018-11-16  Thibault Saunier  <tsaunier@igalia.com>
3796
3797         [GStreamer][WebRTC] Add API to enable/disable device mocks
3798         https://bugs.webkit.org/show_bug.cgi?id=191699
3799
3800         This basically us to test MediaStream/WebRTC support without
3801         requiring cameras or microphones and is quite useful.
3802
3803         Also fix the GStreamerAudioMock by:
3804           - Stop setting `leaky-upstream` on the GStreamerCapturer queue,
3805             this was usefull when we were trying to bring the MediaStream
3806             sources inside the main pipeline, it is not the case anymore
3807             (and not doable with latest version of LibWebRTC).
3808           - Use a 'ticks' wave on the gstreamer audiotestsrc so the test
3809             stream is similar to what Apple port does.
3810
3811         Reviewed by Xabier Rodriguez-Calvar.
3812
3813         The mocks are already tested and the API is really simple.
3814
3815         * platform/mediastream/gstreamer/GStreamerAudioCapturer.cpp:
3816         (WebCore::GStreamerAudioCapturer::createSource):
3817         * platform/mediastream/gstreamer/GStreamerAudioCapturer.h:
3818         * platform/mediastream/gstreamer/GStreamerCapturer.cpp:
3819         (WebCore::GStreamerCapturer::addSink):
3820         * platform/mediastream/gstreamer/GStreamerCapturer.h:
3821
3822 2018-11-16  Thibault Saunier  <tsaunier@igalia.com>
3823
3824         [GStreamer][MediaStream] Handle track addition and removal
3825         https://bugs.webkit.org/show_bug.cgi?id=191599
3826
3827         Reviewed by Xabier Rodriguez-Calvar.
3828
3829         Test: fast/mediastream/MediaStream-video-element-remove-track.html
3830
3831         * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp:
3832         (WebCore::WebKitMediaStreamObserver::~WebKitMediaStreamObserver):
3833         (WebCore::WebKitMediaStreamObserver::WebKitMediaStreamObserver):
3834         (WebCore::webkitMediaStreamSrcFinalize):
3835         (WebCore::webkitMediaStreamSrcChangeState):
3836         (WebCore::webkit_media_stream_src_init):
3837         (WebCore::webkitMediaStreamSrcSetupSrc):
3838         (WebCore::webkitMediaStreamSrcAddTrack):
3839         (WebCore::webkitMediaStreamSrcRemoveTrackByType):
3840         (WebCore::webkitMediaStreamSrcSetStream):
3841
3842 2018-11-16  Zan Dobersek  <zdobersek@igalia.com>
3843
3844         ScalableImageDecoder: don't forcefully decode image data when querying frame completeness, duration
3845         https://bugs.webkit.org/show_bug.cgi?id=191354
3846
3847         Reviewed by Michael Catanzaro.
3848
3849         ScalableImageDecoder::frameIsCompleteAtIndex() should only check the
3850         index validity and, if the index is valid, check for completeness of the
3851         corresponding frame. ScalableImageDecoder::frameDurationAtIndex() should
3852         also only retrieve duration for already-complete frames.
3853
3854         Both methods avoid calling ScalableImageDecoder::frameBufferAtIndex()
3855         as that method goes on and decodes image data to determine specific
3856         information. The ImageSource class that's querying this information
3857         doesn't anticipate this, and doesn't handle the increased memory
3858         consumption of the decoded data, leaving MemoryCache in the blind about
3859         the image resource's actual amount of consumed memory. ImageSource can
3860         instead gracefully handle any incomplete frame by marking the decoding
3861         status for this frame as only partial.
3862
3863         * platform/image-decoders/ScalableImageDecoder.cpp:
3864         (WebCore::ScalableImageDecoder::frameIsCompleteAtIndex const):
3865         (WebCore::ScalableImageDecoder::frameHasAlphaAtIndex const):
3866         (WebCore::ScalableImageDecoder::frameDurationAtIndex const):
3867
3868 2018-11-16  Antoine Quint  <graouts@apple.com>
3869
3870         PointerEvents should not require touch event listeners to be registered
3871         https://bugs.webkit.org/show_bug.cgi?id=191333
3872         <rdar://problem/45857523>
3873
3874         Reviewed by Dean Jackson.
3875
3876         Tests: pointerevents/ios/pointer-events-dispatch-on-touch.html
3877                pointerevents/ios/pointer-events-prevent-default.html
3878
3879         * dom/EventNames.h:
3880         (WebCore::EventNames::isTouchEventType const):
3881         (WebCore::EventNames::touchAndPointerEventNames const):
3882         (WebCore::EventNames::touchEventNames const): Deleted.
3883         * dom/Node.cpp:
3884         (WebCore::Node::moveNodeToNewDocument):
3885
3886 2018-11-15  Zalan Bujtas  <zalan@apple.com>
3887
3888         [iOS] Do not get stuck in indeterminate content observation state.
3889         https://bugs.webkit.org/show_bug.cgi?id=191719
3890
3891         Reviewed by Simon Fraser.
3892
3893         Reset the _WKContentChange flag to WKContentNoChange when the last observing timer is removed and we are in
3894         the "can't decide yet if it's a hover or click" state.
3895         This bug prevents us from firing click event when JS installs and removes the same set of timer(s) during mouse-move dispatch.
3896
3897         Test: fast/events/touch/ios/stuck-with-hover-state.html
3898
3899         * platform/ios/wak/WKContentObservation.cpp:
3900         (WebThreadRemoveObservedContentModifier):
3901
3902 2018-11-15  Simon Fraser  <simon.fraser@apple.com>
3903
3904         REGRESSION (r238090) Composited iframes that resize from zero don't show
3905         https://bugs.webkit.org/show_bug.cgi?id=191733
3906         rdar://problem/46107764
3907
3908         Reviewed by Zalan Bujtas.
3909         
3910         A zero-sized iframe whose contents are composited should not trigger compositing in the
3911         parent document (see code in requiresCompositingForFrame()), but when the <iframe> element
3912         was resized without a style change (e.g. because it's width: 100%, height: 100% and the
3913         parent resizes), there was no code that triggered a compositing update.
3914
3915         Fix by having RenderLayer::updateLayerPosition() trigger an update when the size changes,
3916         for a RenderWidget whose contents are composited.
3917
3918         Test: compositing/iframes/resize-from-zero-size.html
3919
3920         * rendering/RenderLayer.cpp:
3921         (WebCore::RenderLayer::updateLayerPosition):
3922
3923 2018-11-15  Simon Fraser  <simon.fraser@apple.com>
3924
3925         Overlay with -webkit-overflow-scrolling:touch doesn't become scrollable after added text makes it taller
3926         https://bugs.webkit.org/show_bug.cgi?id=158342
3927         rdar://problem/26652811
3928
3929         Reviewed by Zalan Bujtas.
3930         
3931         Patch partly by Frédéric Wang.
3932
3933         This commit fixes an issue when resizing the content of a -webkit-overflow-scrolling: touch
3934         overflow node on iOS. Indeed, the RenderLayerBacking's scrolling layer may not be properly
3935         created and hence the UIProcess receives a null UIScrollView pointer. This triggers an
3936         assertion in debug mode and prevents the user from scrolling the overflow node in release
3937         mode. This was partially fixed by the refactoring of bug 90342 but this commit addresses
3938         the remaining issues by forcing a configuration update after layout in order to ensure that
3939         RenderLayerBacking's scrolling layer is available. For an overflow element that is not yet
3940         composited, trigger a post-layout update that is necessary to check if we need to make it
3941         composited when it gains scrollable overflow.
3942
3943         Tests: fast/scrolling/ios/change-scrollability-on-content-resize-nested.html
3944                fast/scrolling/ios/change-scrollability-on-content-resize.html
3945
3946         * rendering/RenderLayer.cpp:
3947         (WebCore::RenderLayer::updateScrollInfoAfterLayout): Force a configuration update so that
3948 &