f3956064f7d27d03e620966b7e8e85b05fd94bee
[WebKit-https.git] / Tools / ChangeLog
1 2018-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         [GLIB] Add API to clear JSCContext uncaught exception
4         https://bugs.webkit.org/show_bug.cgi?id=184685
5
6         Reviewed by Žan Doberšek.
7
8         Add test cases for the new API.
9
10         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
11         (testJSCExceptions):
12
13 2018-04-17  Carlos Garcia Campos  <cgarcia@igalia.com>
14
15         [GLIB] Add API to query, delete and enumerate properties
16         https://bugs.webkit.org/show_bug.cgi?id=184647
17
18         Reviewed by Michael Catanzaro.
19
20         Add test cases for the new API.
21
22         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
23         (testJSCObject):
24         (testJSCClass):
25         (testJSCPrototypes):
26
27 2018-04-16  Zalan Bujtas  <zalan@apple.com>
28
29         [LayoutReloaded] Add support for replaced box.
30         https://bugs.webkit.org/show_bug.cgi?id=184680
31
32         Reviewed by Antti Koivisto.
33
34         Basic support for inline replaced.
35
36         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
37         (InlineFormattingContext.prototype._handleInlineBox):
38         (InlineFormattingContext.prototype._handleInlineBlock):
39         (InlineFormattingContext.prototype._handleReplaced):
40         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
41         (Line.prototype.lastLineBox):
42         (Line.prototype.addInlineBox):
43         (Line.prototype.addInlineContainerBox): Deleted.
44         * LayoutReloaded/TreeBuilder.js:
45         (TreeBuilder.prototype._createAndAttachBox):
46         * LayoutReloaded/Utils.js:
47         (Utils._dumpBox):
48         * LayoutReloaded/test/index.html:
49         * LayoutReloaded/test/inline-simple-replaced.html: Added.
50
51 2018-04-16  Zalan Bujtas  <zalan@apple.com>
52
53         [LayoutReloaded] Minor InlineFormattingContext::layout() cleanup.
54         https://bugs.webkit.org/show_bug.cgi?id=184679
55
56         Reviewed by Antti Koivisto.
57
58         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
59         (InlineFormattingContext):
60         (InlineFormattingContext.prototype.layout):
61         (InlineFormattingContext.prototype._handleInlineContainer):
62         (InlineFormattingContext.prototype._handleInlineContent):
63         (InlineFormattingContext.prototype._handleInlineBlock):
64         (InlineFormattingContext.prototype._handleReplacedBox):
65         (InlineFormattingContext.prototype._clearNeedsLayoutAndMoveToNextSibling):
66         (InlineFormattingContext.prototype._handleInlineBlockContainer): Deleted.
67         (InlineFormattingContext.prototype._clearAndMoveToNext): Deleted.
68
69 2018-04-16  Zalan Bujtas  <zalan@apple.com>
70
71         [LayoutReloaded] Introduce fragmentation state/context.
72         https://bugs.webkit.org/show_bug.cgi?id=184677
73
74         Reviewed by Antti Koivisto.
75
76         State/context for fragmented content (multicol, regions, pagination etc).
77
78         * LayoutReloaded/FormattingContext/FragmentationContext.js: Added.
79         (FragmentationContext):
80         * LayoutReloaded/FormattingState/FragmentationState.js: Added.
81         (FragmentationState):
82         (FragmentationState.prototype.formattingState):
83
84 2018-04-16  Andy Estes  <aestes@apple.com>
85
86         [iOS] Enable WKPDFView by default
87         https://bugs.webkit.org/show_bug.cgi?id=184675
88         <rdar://problem/27885452>
89
90         Reviewed by Darin Adler.
91
92         * TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:
93
94 2018-04-16  Leo Balter  <leonardo.balter@gmail.com>
95
96         Perl-based Test262 runner
97         https://bugs.webkit.org/show_bug.cgi?id=183343
98
99         Reviewed by Michael Saboff.
100
101         * Scripts/test262-helpers/README.md: Added.
102         * Scripts/test262-helpers/agent.js: Added.
103         (262.getGlobal):
104         (262.setGlobal):
105         (262.destroy):
106         (262.IsHTMLDDA):
107         * Scripts/test262-helpers/cpanfile: Added.
108         * Scripts/test262-helpers/cpanfile.snapshot: Added.
109         * Scripts/test262-helpers/test262-runner.pl: Added.
110         (main):
111         (processFile):
112         (getScenarios):
113         (addScenario):
114         (compileTest):
115         (runTest):
116         (processResult):
117         (getTempFile):
118         (getContents):
119         (parseData):
120         (getHarness):
121         * Scripts/test262-helpers/tests.log: Added.
122
123 2018-04-15  Andy Estes  <aestes@apple.com>
124
125         [iOS] Add API tests for PDF find-in-page
126         https://bugs.webkit.org/show_bug.cgi?id=184634
127
128         Reviewed by Dan Bernstein.
129
130         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
131         * TestWebKitAPI/Tests/WebKit/find.pdf: Added.
132         * TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:
133         (-[TestFindDelegate findString]):
134         (-[TestFindDelegate _webView:didCountMatches:forString:]):
135         (-[TestFindDelegate _webView:didFindMatches:forString:withMatchIndex:]):
136         (-[TestFindDelegate _webView:didFailToFindString:]):
137         (loadWebView):
138         (TEST):
139
140 2018-04-13  Zalan Bujtas  <zalan@apple.com>
141
142         [LayoutReloaded] Update class documentation
143         https://bugs.webkit.org/show_bug.cgi?id=184625
144
145         Reviewed by Antti Koivisto.
146
147         * LayoutReloaded/DisplayTree/Box.js:
148         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
149         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
150         * LayoutReloaded/FormattingContext/FloatingContext.js:
151         * LayoutReloaded/FormattingContext/FormattingContext.js:
152         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
153         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
154         * LayoutReloaded/FormattingState/BlockFormattingState.js:
155         * LayoutReloaded/FormattingState/FloatingState.js:
156         * LayoutReloaded/FormattingState/FormattingState.js:
157         * LayoutReloaded/FormattingState/InlineFormattingState.js:
158         * LayoutReloaded/LayoutState.js:
159         * LayoutReloaded/LayoutTree/BlockContainer.js:
160         * LayoutReloaded/LayoutTree/Box.js:
161         * LayoutReloaded/LayoutTree/Container.js:
162         * LayoutReloaded/LayoutTree/InlineBox.js:
163         * LayoutReloaded/LayoutTree/InlineContainer.js:
164         * LayoutReloaded/LayoutTree/Text.js:
165         * LayoutReloaded/misc/headers/BlockContainer.h: Removed.
166         * LayoutReloaded/misc/headers/BlockFormattingContext.h: Removed.
167         * LayoutReloaded/misc/headers/BlockMarginCollapse.h: Removed.
168         * LayoutReloaded/misc/headers/Box.h: Removed.
169         * LayoutReloaded/misc/headers/Container.h: Removed.
170         * LayoutReloaded/misc/headers/FloatingContext.h: Removed.
171         * LayoutReloaded/misc/headers/FormattingContext.h: Removed.
172         * LayoutReloaded/misc/headers/InitialBlockContainer.h: Removed.
173         * LayoutReloaded/misc/headers/InlineBox.h: Removed.
174         * LayoutReloaded/misc/headers/LayoutContext.h: Removed.
175         * LayoutReloaded/misc/headers/Line.h: Removed.
176         * LayoutReloaded/misc/headers/Text.h: Removed.
177
178 2018-04-13  Zalan Bujtas  <zalan@apple.com>
179
180         [LayoutReloaded] Add simple implementation for FormattingState::markNeedsLayout()
181         https://bugs.webkit.org/show_bug.cgi?id=184621
182
183         Reviewed by Antti Koivisto.
184
185         This is just a simple, mark ancestors dirty implementation.
186
187         * LayoutReloaded/FormattingState/FormattingState.js:
188         (FormattingState.prototype.markNeedsLayout):
189         * LayoutReloaded/LayoutState.js:
190         (LayoutState.prototype.markNeedsLayout):
191         (LayoutState.prototype.setNeedsLayoutById): Deleted.
192         (LayoutState.prototype.setNeedsLayout): Deleted.
193         * LayoutReloaded/TreeBuilder.js:
194         (TreeBuilder.prototype._createAndAttachBox):
195         (TreeBuilder.prototype._findBox): Deleted.
196         * LayoutReloaded/Utils.js:
197         (Utils.layoutBoxById):
198         * LayoutReloaded/test/index.html:
199         * LayoutReloaded/test/simple-incremental-layout-with-static-content.html:
200
201 2018-04-13  Carlos Alberto Lopez Perez  <clopez@igalia.com>
202
203         [WPE] [webkitpy] The driver requirements should be checked before starting the tests
204         https://bugs.webkit.org/show_bug.cgi?id=184595
205
206         Reviewed by Michael Catanzaro.
207
208         Ensure Driver.check_driver() is checked at check_sys_deps() time.
209
210         * Scripts/webkitpy/port/wpe.py:
211         (WPEPort.check_sys_deps):
212
213 2018-04-13  Zalan Bujtas  <zalan@apple.com>
214
215         Rebaseline LayoutReloaded patch file (collectRenderersWithNeedsLayout).
216
217         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
218
219 2018-04-13  Jonathan Bedard  <jbedard@apple.com>
220
221         Boot fewer simulators in CI/EWS machines
222         https://bugs.webkit.org/show_bug.cgi?id=184594
223         <rdar://problem/39188082>
224
225         Reviewed by Alexey Proskuryakov.
226
227         This is a temporary workaround fro <rdar://problem/39393590>.
228
229         * Scripts/webkitpy/xcode/simulated_device.py:
230         (SimulatedDeviceManager): Treat simulators as taking 6 gigs instead of 2.
231
232 2018-04-13  Brady Eidson  <beidson@apple.com>
233
234         Introduce SuspendedPageProxy to keep old web processes around after their WebPageProxy has been swapped to a new one.
235         https://bugs.webkit.org/show_bug.cgi?id=184559
236
237         Reviewed by Alex Christensen.
238
239         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
240
241 2018-04-13  Chris Dumez  <cdumez@apple.com>
242
243         input.webkitEntries does not work as expected when folder contains accented chars
244         https://bugs.webkit.org/show_bug.cgi?id=184517
245         <rdar://problem/39265537>
246
247         Reviewed by Alex Christensen.
248
249         Add API test coverage.
250
251         * TestWebKitAPI/Tests/WebCore/FileSystem.cpp:
252         (TestWebKitAPI::TEST_F):
253
254 2018-04-13  Thibault Saunier  <tsaunier@igalia.com>
255
256         Update my emails ordering in contributors.json
257         https://bugs.webkit.org/show_bug.cgi?id=184587
258
259         Rubber-stamped by Philippe Normand.
260
261         Bugzilla seems to pick up tsaunier@igalia.com which is not the one I use there.
262
263         * Scripts/webkitpy/common/config/contributors.json:
264
265 2018-04-13  Michael Catanzaro  <mcatanzaro@igalia.com>
266
267         [WPE] xkbcommon: ERROR: failed to add default include path /home/mcatanzaro/Projects/WebKit/WebKitBuild/DependenciesWPE/Root/share/X11/xkb
268         https://bugs.webkit.org/show_bug.cgi?id=184388
269
270         Reviewed by Carlos Alberto Lopez Perez.
271
272         Remove libxkbcommon from the JHBuild environment. We could alternatively add
273         xkeyboard-config, but there doesn't seem to be any need to build libxkbcommon because I do
274         not believe it depends on anything else in the JHBuild environment.
275
276         * wpe/install-dependencies:
277         * wpe/jhbuild.modules:
278
279 2018-04-12  Antoine Quint  <graouts@apple.com>
280
281         [Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
282         https://bugs.webkit.org/show_bug.cgi?id=184569
283         <rdar://problem/38671301>
284
285         Reviewed by Jon Lee.
286
287         We set the default value for the CSS Animations and CSS Transitions as Web Animations flag to true
288         but override it to be false always in the LayoutTests/legacy-animation-engine directory.
289
290         * DumpRenderTree/TestOptions.h:
291         * DumpRenderTree/mac/DumpRenderTree.mm:
292         (shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference):
293         (runTest):
294         * WebKitTestRunner/TestController.cpp:
295         (WTR::TestController::resetPreferencesToConsistentValues):
296         * WebKitTestRunner/TestOptions.cpp:
297         (WTR::isLegacyAnimationEngineTestPath):
298         (WTR::TestOptions::TestOptions):
299         * WebKitTestRunner/TestOptions.h:
300
301 2018-04-13  Carlos Garcia Campos  <cgarcia@igalia.com>
302
303         [GLIB] Tests WTF_RefPtr.ReleaseInNonMainThread and WTF_RefPtr.ReleaseInNonMainThreadDestroyInMainThread are crashing since they were added
304         https://bugs.webkit.org/show_bug.cgi?id=184531
305
306         Reviewed by Michael Catanzaro.
307
308         It's not a bug in WebKit, but in the tests. The problem is that those tests are using RunLoop::main() but main
309         run loop hasn't been initialized. ReleaseInNonMainThread doesn't really need to initialize the main run loop if
310         we change Util::run() to always use RunLop::current() instead of RunLoop::main(). But
311         ReleaseInNonMainThreadDestroyInMainThread ends up scheduling a task to the main thread, and the generic
312         implementation fo that uses RunLoop::main(), so we need to initialize the main loop in this case.
313
314         * TestWebKitAPI/Tests/WTF/RefPtr.cpp:
315         (TestWebKitAPI::TEST): Call RunLoop::initializeMainRunLoop().
316         * TestWebKitAPI/glib/UtilitiesGLib.cpp:
317         (TestWebKitAPI::Util::run): Use RunLop::current() to stop the current run loop.
318         (TestWebKitAPI::Util::sleep): Ditto.
319
320 2018-04-12  Zalan Bujtas  <zalan@apple.com>
321
322         [LayoutReloaded] Add support for incremental layout
323         https://bugs.webkit.org/show_bug.cgi?id=184578
324
325         Reviewed by Antti Koivisto.
326
327         * LayoutReloaded/Layout.js:
328         (layout):
329         * LayoutReloaded/LayoutState.js:
330         (LayoutState.prototype.rootContainer):
331         (LayoutState.prototype.setNeedsLayoutById):
332         * LayoutReloaded/Utils.js:
333         (Utils.layoutTreeDump):
334         * LayoutReloaded/test/TestHarness.js:
335         (verifyLayout):
336         (runLayout):
337         (verifyLayoutTreeDump): Deleted.
338         * LayoutReloaded/test/index.html:
339         * LayoutReloaded/test/simple-incremental-layout-with-static-content.html: Added.
340
341 2018-04-12  Zalan Bujtas  <zalan@apple.com>
342
343         [LayoutReloaded] Move root container ownership to layout state
344         https://bugs.webkit.org/show_bug.cgi?id=184575
345
346         Reviewed by Antti Koivisto.
347
348         Now the root container is on the associated layout state (ICB only at this point though).
349
350         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
351         (BlockFormattingContext.prototype.layout):
352         * LayoutReloaded/FormattingContext/FormattingContext.js:
353         (FormattingContext.prototype._layoutOutOfFlowDescendants):
354         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
355         (InlineFormattingContext.prototype._handleInlineBlockContainer):
356         (InlineFormattingContext.prototype._handleFloatingBox):
357         * LayoutReloaded/Layout.js:
358         (layout):
359         * LayoutReloaded/LayoutState.js:
360         (LayoutState):
361         (LayoutState.prototype.formattingContext):
362         (LayoutState.prototype.establishedFormattingState):
363         (LayoutState.prototype.formattingStateForBox):
364         (LayoutState.prototype.needsLayout):
365         (LayoutState.prototype.displayBox):
366         (LayoutState.prototype._formattingContext):
367         (LayoutState.prototype.layout): Deleted.
368         (LayoutState.prototype.formattingStates): Deleted.
369         (LayoutState.prototype.initialDisplayBox): Deleted.
370         * LayoutReloaded/Utils.js:
371         (Utils._dumpBox):
372         (Utils._findDisplayBox): Deleted.
373
374 2018-04-12  Jonathan Bedard  <jbedard@apple.com>
375
376         Fix --build-directory flag for run-webkit-tests
377         https://bugs.webkit.org/show_bug.cgi?id=184545
378         <rdar://problem/39385080>
379
380         Rubber-stamped by Aakash Jain.
381
382         The --build-directory path does not work with iOS-Simulator.
383
384         * Scripts/webkitpy/port/base.py:
385         (Port._build_path): Use the port configuration to calculate the root directory.
386         * Scripts/webkitpy/port/base_unittest.py:
387         (PortTest.test_build_path): Test build directories for embedded configurations.
388
389 2018-04-12  Ross Kirsling  <ross.kirsling@sony.com>
390
391         pemfile.py should not assume POSIX line endings
392         https://bugs.webkit.org/show_bug.cgi?id=184507
393
394         Reviewed by Daniel Bates.
395
396         * Scripts/webkitpy/common/system/pemfile.py:
397         (_parse_pem_format):
398         * Scripts/webkitpy/common/system/pemfile_unittest.py:
399         (PemFileTest.test_parse_crlf):
400         (PemFileTest.test_parse_cr):
401
402 2018-04-12  Zalan Bujtas  <zalan@apple.com>
403
404         [LayoutReloaded] Minor cleanup in LayoutSate
405         https://bugs.webkit.org/show_bug.cgi?id=184546
406
407         Reviewed by Antti Koivisto.
408
409         * LayoutReloaded/FormattingContext/FormattingContext.js:
410         (FormattingContext.isInFormattingContext):
411         * LayoutReloaded/FormattingState/FormattingState.js:
412         (FormattingState.prototype.displayBoxes):
413         (FormattingState.prototype.displayBox):
414         (FormattingState.prototype._markSubTreeNeedsLayout):
415         (FormattingState):
416         (FormattingState.prototype.displayBoxMap): Deleted.
417         * LayoutReloaded/LayoutState.js:
418         (LayoutState.prototype.formattingStateForBox):
419         (LayoutState.prototype.needsLayout):
420         (LayoutState.prototype.displayBox):
421         (LayoutState.prototype._createFormattingState):
422         (LayoutState):
423         * LayoutReloaded/LayoutTree/Box.js:
424         (Layout.Box.prototype.isFormattingContextDescendant): Deleted.
425         * LayoutReloaded/LayoutTree/Container.js:
426         (Layout.Container.prototype.isContainingBlockDescendant): Deleted.
427         * LayoutReloaded/Utils.js:
428         (Utils._findDisplayBox):
429
430 2018-04-12  Zalan Bujtas  <zalan@apple.com>
431
432         [LayoutReloaded] Introduce needsLayout to InlineFormattingContext
433         https://bugs.webkit.org/show_bug.cgi?id=184538
434
435         Reviewed by Antti Koivisto.
436
437         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
438         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
439         (BlockFormattingContext):
440         (BlockFormattingContext.prototype._firstInFlowChildWithNeedsLayout): Deleted.
441         (BlockFormattingContext.prototype._nextInFlowSiblingWithNeedsLayout): Deleted.
442         * LayoutReloaded/FormattingContext/FormattingContext.js:
443         (FormattingContext.prototype._firstInFlowChildWithNeedsLayout):
444         (FormattingContext.prototype._nextInFlowSiblingWithNeedsLayout):
445         (FormattingContext):
446         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
447         (InlineFormattingContext.prototype.layout):
448         (InlineFormattingContext.prototype._handleInlineContainer):
449         (InlineFormattingContext.prototype._handleInlineBlockContainer):
450         (InlineFormattingContext.prototype._handleInlineContent):
451         (InlineFormattingContext.prototype._clearAndMoveToNext):
452         (InlineFormattingContext):
453
454 2018-04-12  Xabier Rodriguez Calvar  <calvaris@igalia.com>
455
456         [GStreamer] Speed up GStreamer dependency build by removing examples compilation
457         https://bugs.webkit.org/show_bug.cgi?id=184528
458
459         Reviewed by Philippe Normand.
460
461         * gstreamer/jhbuild.modules: Added --disable-examples for GStreamer package.
462
463 2018-04-12  Zan Dobersek  <zdobersek@igalia.com>
464
465         [WPE] Switch testing process to using WPEBackend-fdo
466         https://bugs.webkit.org/show_bug.cgi?id=184357
467
468         Reviewed by Carlos Alberto Lopez Perez.
469
470         Switch WPE testing to using the WPEBackend-fdo implementation that
471         depends on the WL_bind_wayland_display EGL extension, as defined under
472         the freedesktop.org project.
473         https://cgit.freedesktop.org/mesa/mesa/tree/docs/specs/WL_bind_wayland_display.spec
474
475         HeadlessViewBackend is refactored to use the WPEBackend-fdo API, but
476         otherwise is not changed in functionality.
477
478         Unit tests now have to unconditionally use HeadlessViewBackend as a
479         wpe_view_backend provider, since WPEBackend-fdo does not provide a
480         default wpe_view_backend implementation. Unit tests covering that are
481         adjusted to instead use a mock wpe_view_backend interface.
482
483         * Scripts/webkitdirs.pm:
484         (builtDylibPathForName): Fix the libWPEWebKit.so name to also include
485         the API version that was added in r230449.
486         * Scripts/webkitpy/port/waylanddriver.py:
487         (WaylandDriver._setup_environ_for_test): Export EGL_PLATFORM=wayland.
488         * Scripts/webkitpy/port/wpe.py:
489         (WPEPort._driver_class): Use WaylandDriver by default.
490         * TestWebKitAPI/PlatformWebView.h:
491         (): Deleted.
492         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
493         (testWebViewWebBackend):
494         * TestWebKitAPI/glib/WebKitGLib/TestMain.h:
495         (Test::createWebViewBackend):
496         * TestWebKitAPI/wpe/PlatformWebViewWPE.cpp:
497         (TestWebKitAPI::PlatformWebView::~PlatformWebView):
498         (TestWebKitAPI::PlatformWebView::initialize):
499         * wpe/HeadlessViewBackend/CMakeLists.txt:
500         * wpe/HeadlessViewBackend/HeadlessViewBackend.cpp:
501         (getEGLDisplay):
502         (HeadlessViewBackend::HeadlessViewBackend):
503         (HeadlessViewBackend::~HeadlessViewBackend):
504         (HeadlessViewBackend::backend const):
505         (HeadlessViewBackend::createSnapshot):
506         (HeadlessViewBackend::performUpdate):
507         (HeadlessViewBackend::makeCurrent): Deleted.
508         * wpe/HeadlessViewBackend/HeadlessViewBackend.h:
509         * wpe/jhbuild.modules: Module name cleanup. Dyz version is bumped.
510
511 2018-04-12  Carlos Garcia Campos  <cgarcia@igalia.com>
512
513         [GTK] Switch to use always complex text code path
514         https://bugs.webkit.org/show_bug.cgi?id=183285
515
516         Reviewed by Michael Catanzaro.
517
518         Keep the auto mode for the layout tests to avoid having to rebaseline a lot of tests.
519
520         * WebKitTestRunner/gtk/main.cpp:
521         (main): Set WEBKIT_FORCE_COMPLEX_TEXT to 0 unless it's already present in the environment.
522
523 2018-04-11  Carlos Garcia Campos  <cgarcia@igalia.com>
524
525         [GLIB] Handle strings containing null characters
526         https://bugs.webkit.org/show_bug.cgi?id=184450
527
528         Reviewed by Michael Catanzaro.
529
530         Add test case for strings with null characters and update all calls to evaluate to pass the script length.
531
532         * TestWebKitAPI/PlatformGTK.cmake:
533         * TestWebKitAPI/PlatformWPE.cmake:
534         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
535         (testJSCBasic):
536         (testJSCFunction):
537         (testJSCObject):
538         (testJSCClass):
539         (testJSCPrototypes):
540         (testJSCExceptions):
541         (testJSCPromises):
542         (testJSCGarbageCollector):
543         (testJSCWeakValue):
544         (testsJSCVirtualMachine):
545         (testsJSCAutocleanups):
546         * TestWebKitAPI/Tests/JavaScriptCore/glib/script.js: Added.
547         * TestWebKitAPI/Tests/WebKitGLib/DOMElementTest.cpp:
548         (DOMElementTest::testAutoFill):
549         * TestWebKitAPI/Tests/WebKitGLib/EditorTest.cpp:
550         (WebKitWebEditorTest::testSelectionChanged):
551         * TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
552         (WebKitFrameTest::testJavaScriptValues):
553         * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
554         (consoleMessageSentCallback):
555         (methodCallCallback):
556
557 2018-04-11  Zan Dobersek  <zdobersek@igalia.com>
558
559         [WPE] Make WebKitWebViewBackend object mandatory for webkit_web_view_new*() constructors
560         https://bugs.webkit.org/show_bug.cgi?id=184513
561
562         Reviewed by Michael Catanzaro.
563
564         Update the WPE-specific testWebViewWebBackend() test case, removing the
565         test that passes a null WebKitWebViewBackend object to the
566         webkit_web_view_new() call.
567
568         Helper createWebViewBackend() that's called via Test::createWebView()
569         variations is updated to, in case of not using the headless backend,
570         return a WebKitWebViewBackend instance that wraps around a
571         default wpe_view_backend object.
572
573         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
574         (testWebViewWebBackend):
575         * TestWebKitAPI/glib/WebKitGLib/TestMain.h:
576         (Test::createWebViewBackend):
577
578 2018-04-11  Zalan Bujtas  <zalan@apple.com>
579
580         [LayoutReloaded] Introduce needsLayout flag
581         https://bugs.webkit.org/show_bug.cgi?id=184527
582
583         Reviewed by Antti Koivisto.
584
585         Use the formatting state to mark boxes dirty.
586
587         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
588         (BlockFormattingContext.prototype.layout):
589         (BlockFormattingContext.prototype._firstInFlowChildWithNeedsLayout):
590         (BlockFormattingContext.prototype._nextInFlowSiblingWithNeedsLayout):
591         (BlockFormattingContext):
592         * LayoutReloaded/FormattingContext/FormattingContext.js:
593         (FormattingContext.prototype._layoutOutOfFlowDescendants):
594         * LayoutReloaded/FormattingState/FormattingState.js:
595         (FormattingState):
596         (FormattingState.prototype.markNeedsLayout):
597         (FormattingState.prototype.clearNeedsLayout):
598         (FormattingState.prototype.needsLayout):
599         (FormattingState.prototype.layoutNeeded):
600         (FormattingState.prototype._markSubTreeNeedsLayout):
601         * LayoutReloaded/LayoutState.js:
602         (LayoutState.prototype.formattingStateForBox):
603         (LayoutState.prototype.setNeedsLayout):
604         (LayoutState.prototype.needsLayout):
605         * LayoutReloaded/LayoutTree/Box.js:
606         (Layout.Box.prototype.isFormattingContextDescendant):
607         * LayoutReloaded/LayoutTree/Container.js:
608         (Layout.Container.prototype.isContainingBlockDescendant):
609
610 2018-04-11  Jonathan Bedard  <jbedard@apple.com>
611
612         Fix TestInvocation class for newer versions of clang.
613         https://bugs.webkit.org/show_bug.cgi?id=184508
614         <rdar://problem/39328648>
615
616         Reviewed by Alexey Proskuryakov.
617
618         Declare TestInvocation to be final so it does not require a virtual destructor.
619
620         * WebKitTestRunner/TestInvocation.h:
621
622 2018-04-10  Alex Christensen  <achristensen@webkit.org>
623
624         IDN spoofing with Hebrew combining characters
625         https://bugs.webkit.org/show_bug.cgi?id=184472
626         <rdar://problem/39148687>
627
628         Reviewed by Brent Fulgham.
629
630         * TestWebKitAPI/Tests/WebCore/cocoa/URLExtras.mm:
631         (TestWebKitAPI::TEST):
632
633 2018-04-11  Wenson Hsieh  <wenson_hsieh@apple.com>
634
635         [Extra zoom mode] Missing label when focusing a <select> with a title attribute but no associated <label>
636         https://bugs.webkit.org/show_bug.cgi?id=184352
637         <rdar://problem/39237683>
638
639         Reviewed by Andy Estes.
640
641         Add support for UIScriptController::selectFormPopoverTitle, which returns the title of the current select
642         popover's UITableViewController (for testing purposes).
643
644         * DumpRenderTree/ios/UIScriptControllerIOS.mm:
645         (WTR::UIScriptController::selectFormPopoverTitle const):
646         * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
647         * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
648         (WTR::UIScriptController::selectFormPopoverTitle const):
649         * TestRunnerShared/UIScriptContext/UIScriptController.h:
650         * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
651         (WTR::UIScriptController::selectFormPopoverTitle const):
652
653 2018-04-10  Nan Wang  <n_wang@apple.com>
654
655         AX: Expose strong password fields on iOS
656         https://bugs.webkit.org/show_bug.cgi?id=184465
657         <rdar://problem/39325104>
658
659         Reviewed by Chris Fleizach.
660
661         * DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
662         (AccessibilityUIElement::boolAttributeValue):
663         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
664         (WTR::AccessibilityUIElement::boolAttributeValue):
665
666 2018-04-10  Zalan Bujtas  <zalan@apple.com>
667
668         [LayoutReloaded] Add support for out-of-flow descendants in inline formatting context.
669         https://bugs.webkit.org/show_bug.cgi?id=184454
670
671         Reviewed by Antti Koivisto.
672
673         When the containing block of an out-of-flow positioned element establishes an inline formatting context.
674         This is mostly about moving out-of-flow logic from BlockFormattingContext to the base class.
675
676         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
677         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
678         (BlockFormattingContext):
679         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants): Deleted.
680         (BlockFormattingContext.prototype._computeOutOfFlowWidth): Deleted.
681         (BlockFormattingContext.prototype._computeInFlowWidth): Deleted.
682         (BlockFormattingContext.prototype._computeOutOfFlowHeight): Deleted.
683         (BlockFormattingContext.prototype._computeOutOfFlowPosition): Deleted.
684         (BlockFormattingContext.prototype._shrinkToFitWidth): Deleted.
685         * LayoutReloaded/FormattingContext/FormattingContext.js:
686         (FormattingContext.prototype._placeInFlowPositionedChildren):
687         (FormattingContext.prototype._computeInFlowWidth):
688         (FormattingContext.prototype._layoutOutOfFlowDescendants):
689         (FormattingContext.prototype._computeOutOfFlowWidth):
690         (FormattingContext.prototype._computeOutOfFlowHeight):
691         (FormattingContext.prototype._computeOutOfFlowPosition):
692         (FormattingContext.prototype._shrinkToFitWidth):
693         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
694         (InlineFormattingContext.prototype.layout):
695         (InlineFormattingContext.prototype._handleInlineContainer):
696         (InlineFormattingContext.prototype._handleInlineBlockContainer):
697         (InlineFormattingContext.prototype._placeOutOfFlowDescendants): Deleted.
698         * LayoutReloaded/test/index.html:
699         * LayoutReloaded/test/inline-with-out-of-flow-descendant.html: Added.
700
701 2018-04-09  Zan Dobersek  <zdobersek@igalia.com>
702
703         WKTR: Enable DOM cache, SW registration directory cleanup on non-Cocoa platforms
704         https://bugs.webkit.org/show_bug.cgi?id=184414
705
706         Reviewed by Michael Catanzaro.
707
708         Enable clearServiceWorkerRegistrations(), clearDOMCache() and
709         clearDOMCaches() implementations in WebKitTestRunner's TestController
710         class for non-Cocoa platforms. Implementations depend on the generic
711         WK2 C API that other ports can leverage as well.
712
713         The clearDOMCache() and clearDOMCaches() calls are now operational for
714         tests that invoke them. clearServiceWorkerRegistrations() and
715         clearDOMCaches() are also called between each test, cleaning up relevant
716         resources.
717
718         The TestController::getAllStorageAccessEntries() stub for non-Cocoa
719         platforms is moved into the main !PLATFORM(COCOA) block.
720
721         * WebKitTestRunner/TestController.cpp:
722         (WTR::TestController::getAllStorageAccessEntries):
723         (WTR::clearServiceWorkerRegistrationsCallback):
724         (WTR::TestController::clearServiceWorkerRegistrations):
725         (WTR::clearDOMCacheCallback):
726         (WTR::TestController::clearDOMCache):
727         (WTR::TestController::clearDOMCaches):
728
729 2018-04-09  Zalan Bujtas  <zalan@apple.com>
730
731         [LayoutReloaded] Add support for relatively positioned containers in inline formatting context.
732         https://bugs.webkit.org/show_bug.cgi?id=184439
733
734         Reviewed by Antti Koivisto.
735
736         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
737         (BlockFormattingContext.prototype._placeInFlowPositionedChildren): Deleted.
738         (BlockFormattingContext.prototype._computeInFlowPositionedPosition): Deleted.
739         * LayoutReloaded/FormattingContext/FormattingContext.js:
740         (FormattingContext.prototype._computeInFlowPositionedPosition):
741         (FormattingContext.prototype._placeInFlowPositionedChildren):
742         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
743         (InlineFormattingContext.prototype._placeInFlowPositionedChildren): Deleted.
744         * LayoutReloaded/Utils.js:
745         (Utils._dumpBox):
746         (Utils._dumpLines.):
747         (Utils._dumpLines):
748         (Utils.precisionRoundWithDecimals):
749         (Utils.precisionRound):
750         (Utils):
751         * LayoutReloaded/test/index.html:
752         * LayoutReloaded/test/inline-with-relative-positioning.html: Added.
753
754 2018-04-09  Zalan Bujtas  <zalan@apple.com>
755
756         [LayoutReloaded] Remove Layout.InitialContainingBlock class
757         https://bugs.webkit.org/show_bug.cgi?id=184436
758
759         Reviewed by Antti Koivisto.
760
761         * LayoutReloaded/LayoutTree/Box.js:
762         (Layout.Box.prototype.establishesBlockFormattingContext):
763         * LayoutReloaded/LayoutTree/InitialBlockContainer.js: Removed.
764         * LayoutReloaded/TreeBuilder.js:
765         (TreeBuilder.prototype.createTree):
766         * LayoutReloaded/test/index.html:
767
768 2018-04-09  Zalan Bujtas  <zalan@apple.com>
769
770         [LayoutReloaded] Add support for inline-block.
771         https://bugs.webkit.org/show_bug.cgi?id=184434
772
773         Reviewed by Antti Koivisto.
774
775         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
776         (InlineFormattingContext):
777         (InlineFormattingContext.prototype.layout):
778         (InlineFormattingContext.prototype._handleInlineContainer):
779         (InlineFormattingContext.prototype._handleInlineBlockContainer):
780         (InlineFormattingContext.prototype._handleInlineContent):
781         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
782         (Line.prototype.addInlineContainerBox):
783         (Line.prototype.addTextLineBox):
784         (Line):
785         * LayoutReloaded/LayoutTree/Box.js:
786         (Layout.Box.prototype.isInlineBlockBox):
787         * LayoutReloaded/Utils.js:
788         (LayoutRect.prototype.growHorizontally):
789         (Utils.isBlockContainerElement):
790         (Utils.isInlineBlockElement):
791         (Utils._dumpLines.):
792         (Utils._dumpLines):
793         * LayoutReloaded/test/index.html:
794         * LayoutReloaded/test/inline-block-with-fixed-width-height.html: Added.
795
796 2018-04-09  Timothy Hatcher  <timothy@apple.com>
797
798         Add support for setting a background color on WKWebView and WKView
799         https://bugs.webkit.org/show_bug.cgi?id=184426
800
801         Reviewed by Wenson Hsieh.
802
803         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
804         * TestWebKitAPI/Tests/mac/BackgroundColor.mm: Added.
805
806 2018-04-09  Charlie Turner  <cturner@igalia.com>
807
808         [WPE] Add some missing install dependencies
809         https://bugs.webkit.org/show_bug.cgi?id=184383
810
811         Reviewed by Michael Catanzaro.
812
813         * wpe/install-dependencies:
814
815 2018-04-09  Sihui Liu  <sihui_liu@apple.com>
816
817         REGRESSION(r229929): localStorage is broken for WebInspector
818         https://bugs.webkit.org/show_bug.cgi?id=184382
819         <rdar://problem/39257355>
820
821         Reviewed by Chris Dumez.
822
823         * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:
824         (TEST):
825         * TestWebKitAPI/Tests/WebKitCocoa/localstorage-empty-string-value.html:
826
827 2018-04-09  Zan Dobersek  <zdobersek@igalia.com>
828
829         Unreviewed follow-up to r230389.
830
831         * WebKitTestRunner/TestController.cpp:
832         (WTR::TestController::platformAdjustContext): Use the 'ServiceWorkers'
833         subdirectory for the temporary testing-purpose SW registration directory
834         like it's used in Cocoa's TestController, addressing the review comment
835         that I forgot about.
836
837 2018-04-08  Zan Dobersek  <zdobersek@igalia.com>
838
839         Non-Cocoa ports use default directory for ServiceWorker data during testing
840         https://bugs.webkit.org/show_bug.cgi?id=183784
841
842         Reviewed by Youenn Fablet.
843
844         * WebKitTestRunner/TestController.cpp:
845         (WTR::TestController::platformAdjustContext): Set the service worker registration
846         directory through the new WKWebsiteDataStore API for non-Cocoa ports.
847
848 2018-04-08  Zalan Bujtas  <zalan@apple.com>
849
850         [LayoutReloaded] Adjust line with inline container's margin border and padding
851         https://bugs.webkit.org/show_bug.cgi?id=184409
852
853         Reviewed by Antti Koivisto.
854
855         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
856         (InlineFormattingContext.prototype.layout):
857         (InlineFormattingContext.prototype._handleFloatingBox):
858         (InlineFormattingContext.prototype._adjustLineForInlineContainerStart):
859         (InlineFormattingContext.prototype._adjustLineForInlineContainerEnd):
860         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
861         (Line.prototype.shrink):
862         (Line.prototype.adjustWithOffset):
863         (Line.prototype.moveContentHorizontally):
864         (Line.prototype.addTextLineBox):
865         (Line):
866         (Line.prototype.addFloatingBox): Deleted.
867         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
868         * LayoutReloaded/test/index.html:
869         * LayoutReloaded/test/inline-with-padding-border-margin-offsets.html: Added.
870
871 2018-04-07  Zalan Bujtas  <zalan@apple.com>
872
873         [LayoutReloaded] Add support for InlineContainer
874         https://bugs.webkit.org/show_bug.cgi?id=184394
875
876         Reviewed by Antti Koivisto.
877
878         * LayoutReloaded/FormattingContext/FormattingContext.js:
879         (FormattingContext.prototype._addToLayoutQueue):
880         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
881         (InlineFormattingContext.prototype.layout):
882         (InlineFormattingContext.prototype._handleInlineContent):
883         (InlineFormattingContext.prototype._handleFloatingBox):
884         (InlineFormattingContext.prototype._adjustLineForInlineContainerStart):
885         (InlineFormattingContext.prototype._adjustLineForInlineContainerEnd):
886         (InlineFormattingContext.prototype._placeInFlowPositionedChildren):
887         (InlineFormattingContext.prototype._placeOutOfFlowDescendants):
888         (InlineFormattingContext.prototype._createNewLine):
889         (InlineFormattingContext.prototype._handleContent): Deleted.
890         * LayoutReloaded/LayoutState.js:
891         (LayoutState.prototype._createFormattingState):
892         * LayoutReloaded/LayoutTree/Box.js:
893         (Layout.Box.prototype.isContainer):
894         (Layout.Box.prototype.isInlineContainer):
895         (Layout.Box.prototype.isInlineBox):
896         * LayoutReloaded/LayoutTree/Container.js:
897         (Layout.Container.prototype.isContainer): Deleted.
898         * LayoutReloaded/LayoutTree/InlineContainer.js: Added.
899         (Layout.InlineContainer):
900         * LayoutReloaded/TreeBuilder.js:
901         (TreeBuilder.prototype._createAndAttachBox):
902         * LayoutReloaded/Utils.js:
903         (Utils._dumpBox):
904         (Utils.precisionRound):
905         (Utils):
906         * LayoutReloaded/test/index.html:
907         * LayoutReloaded/test/inline-content-simple2.html: Added.
908         * LayoutReloaded/test/inline-floating1.html: Added.
909         * LayoutReloaded/test/inline-formatting-context-floats1.html: Added.
910         * LayoutReloaded/test/inline-formatting-context-floats2.html: Added.
911
912 2018-04-07  Timothy Hatcher  <timothy@apple.com>
913
914         Use the system's link color when system appearance is desired for a WebView.
915
916         https://bugs.webkit.org/show_bug.cgi?id=184353
917         rdar://problem/9420053
918
919         Reviewed by Wenson Hsieh.
920
921         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
922         * TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm: Added.
923         (TestWebKitAPI::WebKit::LinkColor):
924         (TestWebKitAPI::WebKit::LinkColorWithSystemAppearance):
925
926 2018-04-06  Zalan Bujtas  <zalan@apple.com>
927
928         Rebaseline LayoutReloaded patch file.
929
930         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
931
932 2018-04-06  Fujii Hironori  <Hironori.Fujii@sony.com>
933
934         [Win][WebCore] Expose a constant for scrollbar pixels per line (cScrollbarPixelsPerLine)
935         https://bugs.webkit.org/show_bug.cgi?id=184296
936
937         Reviewed by Alex Christensen.
938
939         * DumpRenderTree/win/EventSender.cpp:
940         (mouseScrollBy): Removed the duplicated cScrollbarPixelsPerLine
941         definition. Use WebCore::cScrollbarPixelsPerLine.
942
943 2018-04-06  Zalan Bujtas  <zalan@apple.com>
944
945         Rebaseline LayoutReloaded patch file.
946
947         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
948
949 2018-04-05  Youenn Fablet  <youenn@apple.com>
950
951         Test expectation updater should handle Win bot results
952         https://bugs.webkit.org/show_bug.cgi?id=184274
953
954         Reviewed by Ryosuke Niwa.
955
956         Add processing of win bot results.
957         They will update platform/win results.
958
959         Updated the script so that if there is no mac-wk2 results, it will still process specific results.
960
961         * Scripts/webkitpy/common/net/bugzilla/test_expectation_updater.py:
962         (TestExpectationUpdater.__init__):
963         (TestExpectationUpdater._bot_type):
964         (TestExpectationUpdater.do_update):
965         * Scripts/webkitpy/common/net/bugzilla/test_expectation_updater_unittest.py:
966         (MockAttachment):
967         (MockAttachment.__init__):
968         (MockAttachment.contents):
969         (MockBugzilla):
970         (MockBugzilla.__init__):
971         (MockBugzilla.fetch_bug):
972         (MockBugzilla.attachments):
973         (MockZip):
974         (MockZip.__init__):
975         (MockZip.unzip):
976         (MockZip.read):
977         (TestExpectationUpdaterTest.test_update_test_expectations):
978         (TestExpectationUpdaterTest):
979         (TestExpectationUpdaterTest.test_update_win_future_test_expectations):
980
981 2018-04-05  Zalan Bujtas  <zalan@apple.com>
982
983         [LayoutReloaded] Fix static position for floating boxes when they don't fit the current line
984         https://bugs.webkit.org/show_bug.cgi?id=184354
985
986         Reviewed by Antti Koivisto.
987
988         Do not shrink the current line with the floating box unless it is on the current line.
989
990         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
991         (InlineFormattingContext.prototype._handleFloatingBox):
992         (InlineFormattingContext.prototype._mapFloatingVerticalPosition):
993         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
994         (Line.prototype.addFloatingBox):
995         (Line):
996         * LayoutReloaded/test/index.html:
997         * LayoutReloaded/test/inline-with-right-floats3.html: Added.
998
999 2018-04-05  Zalan Bujtas  <zalan@apple.com>
1000
1001         [LayoutReloaded] Add support for right floating boxes in inline formatting context
1002         https://bugs.webkit.org/show_bug.cgi?id=184351
1003
1004         Reviewed by Antti Koivisto.
1005
1006         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1007         (InlineFormattingContext.prototype._handleFloatingBox):
1008         (InlineFormattingContext.prototype._mapFloatingVerticalPosition):
1009         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
1010         (Line.prototype.addFloatingBox):
1011         (Line):
1012         * LayoutReloaded/test/index.html:
1013         * LayoutReloaded/test/inline-with-right-float-simple.html: Added.
1014         * LayoutReloaded/test/inline-with-right-floats2.html: Added.
1015
1016 2018-04-05  Zalan Bujtas  <zalan@apple.com>
1017
1018         [LayoutReloaded] Move floating box to the next line when needed
1019         https://bugs.webkit.org/show_bug.cgi?id=184349
1020
1021         Reviewed by Antti Koivisto.
1022
1023         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1024         (InlineFormattingContext.prototype.layout):
1025         (InlineFormattingContext.prototype._handleContent):
1026         (InlineFormattingContext.prototype._handleText):
1027         (InlineFormattingContext.prototype._handleFloatingBox):
1028         (InlineFormattingContext.prototype._mapFloatingHorizontalPosition):
1029         (InlineFormattingContext):
1030         (InlineFormattingContext.prototype._handleFloatingBoxes): Deleted.
1031         (InlineFormattingContext.prototype._floatingBoxes): Deleted.
1032         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
1033         (Line.prototype.addTextLineBox):
1034         (Line.prototype.addFloatingBox):
1035         (Line):
1036         * LayoutReloaded/Utils.js:
1037         (LayoutRect.prototype.moveHorizontally):
1038         (LayoutRect.prototype.moveVertically):
1039         * LayoutReloaded/test/index.html:
1040         * LayoutReloaded/test/inline-with-floats-when-they-dont-fit.html: Added.
1041
1042 2018-04-05  Brady Eidson  <beidson@apple.com>
1043
1044         Process Swap on Navigation causes many webpages to hang due to attempted process swap for iframe navigations.
1045         <rdar://problem/39162236> and https://bugs.webkit.org/show_bug.cgi?id=184318
1046
1047         Reviewed by Andy Estes.
1048
1049         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1050         (-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
1051         (-[PSONScheme addMappingFromURLString:toData:]):
1052         (-[PSONScheme webView:startURLSchemeTask:]):
1053
1054 2018-04-05  Yusuke Suzuki  <utatane.tea@gmail.com>
1055
1056         [WTF] Remove StaticLock
1057         https://bugs.webkit.org/show_bug.cgi?id=184332
1058
1059         Reviewed by Mark Lam.
1060
1061         * DumpRenderTree/JavaScriptThreading.cpp:
1062
1063 2018-04-05  Zalan Bujtas  <zalan@apple.com>
1064
1065         [LayoutReloaded] Find the correct left edge for a line when floating boxes are in parent formatting context.
1066         https://bugs.webkit.org/show_bug.cgi?id=184330
1067
1068         Reviewed by Antti Koivisto.
1069
1070         In inline formatting context, the floating boxes can come from the parent (block) formatting context. Let's
1071         take them into account when computing the line edges.
1072
1073         * LayoutReloaded/FormattingContext/FloatingContext.js:
1074         (FloatingContext.prototype.left):
1075         (FloatingContext.prototype.right):
1076         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1077         (InlineFormattingContext.prototype._createNewLine):
1078         (InlineFormattingContext.prototype._mapFloatingVerticalPosition):
1079         (InlineFormattingContext.prototype._mapFloatingHorizontalPosition):
1080         (InlineFormattingContext.prototype._mapFloatingPosition): Deleted.
1081         * LayoutReloaded/test/index.html:
1082         * LayoutReloaded/test/multiple-left-floats-on-line-from-parent-formatting-context.html: Added.
1083
1084 2018-04-05  Zalan Bujtas  <zalan@apple.com>
1085
1086         [LayoutReloaded] Collect floating boxes in inline formatting context and layout them first.
1087         https://bugs.webkit.org/show_bug.cgi?id=184329
1088
1089         Reviewed by Antti Koivisto.
1090
1091         Let's do this for now. There might be some cases where this violates layout.
1092
1093         * LayoutReloaded/FormattingContext/FormattingContext.js:
1094         (FormattingContext.prototype._outOfFlowDescendants):
1095         (FormattingContext):
1096         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1097         (InlineFormattingContext.prototype.layout):
1098         (InlineFormattingContext.prototype._handleFloatingBoxes):
1099         (InlineFormattingContext.prototype._handleFloatingBox):
1100         (InlineFormattingContext.prototype._floatingBoxes):
1101         (InlineFormattingContext):
1102         * LayoutReloaded/test/index.html:
1103         * LayoutReloaded/test/multiple-left-floats-on-line-simple.html: Added.
1104
1105 2018-04-04  Youenn Fablet  <youenn@apple.com>
1106
1107         WebRTC data channel only applications require capture permissions for direct connections
1108         https://bugs.webkit.org/show_bug.cgi?id=174500
1109         <rdar://problem/34134281>
1110
1111         Reviewed by Eric Carlson.
1112
1113         Adding options to enable MDNS ICE candidates.
1114
1115         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1116         * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
1117         (WTR::TestRunner::setMediaDevicesEnabled):
1118         (WTR::TestRunner::setMDNSICECandidatesEnabled):
1119         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1120         * WebKitTestRunner/TestController.cpp:
1121         (WTR::TestController::resetPreferencesToConsistentValues):
1122
1123 2018-04-04  Ryan Haddad  <ryanhaddad@apple.com>
1124
1125         Disable failing WKWebViewAutofillTests
1126         https://bugs.webkit.org/show_bug.cgi?id=184196
1127
1128         Unreviewed test gardening.
1129
1130         * TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:
1131         (TestWebKitAPI::TEST):
1132
1133 2018-04-04  Youenn Fablet  <youenn@apple.com>
1134
1135         Introduce a ThreadSafeRefCounted parameter to ensure being destroyed on the main thread
1136         https://bugs.webkit.org/show_bug.cgi?id=183988
1137
1138         Reviewed by Darin Adler.
1139
1140         * TestWebKitAPI/Tests/WTF/RefPtr.cpp:
1141         (TestWebKitAPI::ThreadSafeRefCountedObject::create):
1142         (TestWebKitAPI::ThreadSafeRefCountedObject::~ThreadSafeRefCountedObject):
1143         (TestWebKitAPI::MainThreadSafeRefCountedObject::create):
1144         (TestWebKitAPI::MainThreadSafeRefCountedObject::~MainThreadSafeRefCountedObject):
1145         (TestWebKitAPI::TEST):
1146
1147 2018-04-04  Ms2ger  <Ms2ger@igalia.com>
1148
1149         Test gardening for GTK.
1150         https://bugs.webkit.org/show_bug.cgi?id=184298
1151
1152         Unreviewed test gardening.
1153
1154         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: Add pointer to
1155         https://bugs.webkit.org/show_bug.cgi?id=184295.
1156
1157 2018-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1158
1159         ASSERTION FAILED: !m_mainFrame->coreFrame()->loader().frameHasLoaded() || !m_pendingNavigationID when reloading page while a page is loading
1160         https://bugs.webkit.org/show_bug.cgi?id=153210
1161
1162         Reviewed by Alex Christensen.
1163
1164         Add unit tests to WebKit C API and WebKitGLib.
1165
1166         * TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
1167         (TestWebKitAPI::TEST):
1168         * TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp:
1169         (LoadTwiceAndReloadTest::reloadOnFinishLoad):
1170         (LoadTwiceAndReloadTest::LoadTwiceAndReloadTest):
1171         (LoadTwiceAndReloadTest::~LoadTwiceAndReloadTest):
1172         (LoadTwiceAndReloadTest::waitUntilFinished):
1173         (testWebViewLoadTwiceAndReload):
1174         (beforeAll):
1175
1176 2018-04-03  Carlos Garcia Campos  <cgarcia@igalia.com>
1177
1178         [GTK] Test /webkit/WebKitWebPage/context-menu is failing since r229831
1179         https://bugs.webkit.org/show_bug.cgi?id=184260
1180
1181         Reviewed by Michael Catanzaro.
1182
1183         This is not a regression introduced in r229831, though, it's a bug in the test itself revealed by r229831. We
1184         should wait for the load to complete before trying to show the context menu.
1185
1186         * TestWebKitAPI/Tests/WebKitGtk/TestContextMenu.cpp:
1187         (testContextMenuWebExtensionMenu):
1188
1189 2018-04-03  Zalan Bujtas  <zalan@apple.com>
1190
1191         [LayoutReloaded] Introduce floating to InlineFormattingContext
1192         https://bugs.webkit.org/show_bug.cgi?id=184288
1193
1194         Reviewed by Antti Koivisto.
1195
1196         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1197         (BlockFormattingContext.prototype._computeFloatingWidth): Deleted.
1198         (BlockFormattingContext.prototype._computeFloatingHeight): Deleted.
1199         * LayoutReloaded/FormattingContext/FormattingContext.js:
1200         (FormattingContext.prototype._computeFloatingWidth):
1201         (FormattingContext.prototype._computeFloatingHeight):
1202         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1203         (InlineFormattingContext.prototype.layout):
1204         (InlineFormattingContext.prototype._handleFloatingBox):
1205         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
1206         (Line.prototype.addFloatingBox):
1207         (Line):
1208         * LayoutReloaded/test/float-is-inside-inline-formatting-context-simple.html: Added.
1209         * LayoutReloaded/test/index.html:
1210
1211 2018-04-03  Youenn Fablet  <youenn@apple.com>
1212
1213         NetworkResourceLoader does not need to expose all redirect response headers
1214         https://bugs.webkit.org/show_bug.cgi?id=184114
1215         <rdar://problem/39010557>
1216
1217         Reviewed by Ryosuke Niwa.
1218
1219         Add an option to dump the number of headers in a response.
1220         This allows validating that filtering does happen or not.
1221
1222         * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
1223         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
1224         (WTR::dumpResponseDescriptionSuitableForTestResult):
1225         (WTR::InjectedBundlePage::responseHeaderCount):
1226         (WTR::InjectedBundlePage::willSendRequestForFrame):
1227         * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
1228         * WebKitTestRunner/InjectedBundle/TestRunner.h:
1229         (WTR::TestRunner::dumpAllHTTPRedirectedResponseHeaders):
1230         (WTR::TestRunner::shouldDumpAllHTTPRedirectedResponseHeaders const):
1231         * WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm:
1232         (WTR::InjectedBundlePage::responseHeaderCount):
1233         * WebKitTestRunner/TestController.cpp:
1234         (WTR::TestController::resetPreferencesToConsistentValues):
1235
1236 2018-04-03  Andy Estes  <aestes@apple.com>
1237
1238         [Mac] Prioritize file promises over filenames during drag and drop
1239         https://bugs.webkit.org/show_bug.cgi?id=184237
1240         <rdar://problem/38278076>
1241
1242         Reviewed by Wenson Hsieh.
1243
1244         * DumpRenderTree/mac/EventSendingController.mm:
1245         (-[EventSendingController beginDragWithFilePromises:]):
1246
1247 2018-04-03  Brady Eidson  <beidson@apple.com>
1248
1249         Make SessionStorage work with process swapping.
1250         https://bugs.webkit.org/show_bug.cgi?id=184270
1251
1252         Reviewed by Andy Estes.
1253
1254         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1255         (-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
1256
1257 2018-04-03  Chris Dumez  <cdumez@apple.com>
1258
1259         Drop MainFrame class
1260         https://bugs.webkit.org/show_bug.cgi?id=184191
1261
1262         Reviewed by Darin Adler.
1263
1264         * TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm:
1265
1266 2018-04-03  Charlie Turner  <cturner@igalia.com>
1267
1268         [WPE] Add WPE port to garden-o-matic
1269         https://bugs.webkit.org/show_bug.cgi?id=182998
1270
1271         Reviewed by Michael Catanzaro.
1272
1273         * BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
1274         Add WPE as a port to check.
1275         (config.kPlatforms.string_appeared_here._builderApplies): Use less
1276         surprising equality operator.
1277         (config.kPlatforms.string_appeared_here.resultsDirectoryNameFromBuilderName):
1278         Ditto.
1279         (config.kPlatforms.string_appeared_here.resultsDirectoryForBuildNumber):
1280         Ditto.
1281
1282 2018-04-03  Adrian Perez de Castro  <aperez@igalia.com>
1283
1284         [GTK][JHBuild] Tools/gtk/install-dependencies: Replace libxfont with libxfont2 in Arch Linux
1285         https://bugs.webkit.org/show_bug.cgi?id=184258
1286
1287         Reviewed by Carlos Alberto Lopez Perez.
1288
1289         * gtk/install-dependencies: Use libxfont2 on Arch Linux as well.
1290
1291 2018-04-02  Brady Eidson  <beidson@apple.com>
1292
1293         Process swapping on navigation needs to handle server redirects.
1294         <rdar://problem/38690465> and https://bugs.webkit.org/show_bug.cgi?id=184142
1295
1296         Reviewed by Alex Christensen.
1297
1298         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1299         (-[PSONNavigationDelegate webView:didFinishNavigation:]):
1300         (-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
1301         (-[PSONNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]):
1302         (-[PSONScheme addRedirectFromURLString:toURLString:]):
1303         (-[PSONScheme webView:startURLSchemeTask:]):
1304
1305 2018-04-02  Daniel Bates  <dabates@apple.com>
1306
1307         Add infrastructure to relax SSL for allowed hosts in DumpRenderTree and WebKitTestRunner
1308         https://bugs.webkit.org/show_bug.cgi?id=184239
1309
1310         Reviewed by Alexey Proskuryakov.
1311
1312         Adds a new optional command line option --allow-any-certificate-for-allowed-hosts (defaults to disabled)
1313         to allow the allowed hosts to accept any HTTPS certificate. You can specify an allowed host
1314         by using the existing command line option --allowed-host.
1315
1316         Currently both DumpRenderTree and WebKitTestRunner relax SSL certificate validation
1317         for 127.0.0.1 and localhost so that we can run HTTPS tests from these hosts using
1318         a self-signed certificate. They do not relax these restrictions for any allowed host,
1319         specified using the optional command line option --allowed-host. For testing purposes
1320         it is useful to be able to run a local HTTPS server with a self-signed certificate and
1321         mimic a non-localhost hostname (by adding an alias(es) for 127.0.0.1 to /etc/hosts).
1322         We should support relaxing SSL restrictions for such testing purposes.
1323
1324         For example, to allow host example.test to present any HTTPS certificate when running
1325         tests you would invoke:
1326
1327             run-webkit-tests --allowed-host example.test --additional-drt-flag '--allow-any-certificate-for-allowed-hosts'
1328
1329         * DumpRenderTree/mac/DumpRenderTree.mm:
1330         (initializeGlobalsFromCommandLineOptions): Parse the command line option --allow-any-certificate-for-allowed-hosts.
1331         (dumpRenderTree): Allow any HTTPS certificate from each allowed host.
1332         * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
1333         (WTR::InjectedBundle::didReceiveMessageToPage): Clear out the existing list of allowed hosts
1334         before appending entries to it to avoid growing the list of allowed hosts without bound. Call
1335         platformAllowAnyHTTPSCertificateForAllowedHosts() to apply SSL relaxation for each allowed host.
1336         * WebKitTestRunner/Options.cpp:
1337         (WTR::handleOptionAllowAnyHTTPSCertificateForAllowedHosts): Added.
1338         (WTR::handleOptionAllowedHost): Update code as needed now that Options::allowedHosts is a std::set.
1339         (WTR::OptionsHandler::OptionsHandler):
1340         * WebKitTestRunner/Options.h: Change the data type of allowedHosts from a std::vector to a std::set
1341         so that we can make use of the convenience functon std::set::find() in TestController::canAuthenticateAgainstProtectionSpace().
1342         * WebKitTestRunner/TestController.cpp:
1343         (WTR::TestController::initialize):
1344         (WTR::TestController::canAuthenticateAgainstProtectionSpace): Allow any HTTPS certificate from each allowed host.
1345         * WebKitTestRunner/TestController.h:
1346
1347 2018-04-02  Ryan Haddad  <ryanhaddad@apple.com>
1348
1349         Unreviewed, rolling out r230174.
1350
1351         Caused LayoutTests to exit early with assertion failures.
1352
1353         Reverted changeset:
1354
1355         "Process swapping on navigation needs to handle server
1356         redirects."
1357         https://bugs.webkit.org/show_bug.cgi?id=184142
1358         https://trac.webkit.org/changeset/230174
1359
1360 2018-04-02  Daniel Bates  <dabates@apple.com>
1361
1362         Remove pre-Network Session code path for allowing any HTTPS certificate on Mac and iOS
1363         https://bugs.webkit.org/show_bug.cgi?id=184242
1364
1365         Reviewed by Alexey Proskuryakov.
1366
1367         Following r227364 we use the Network Session (NSURLSession) code path by default in
1368         modern WebKit on Mac and iOS. That is, we no longer use {CF, NS}URLConnection in modern
1369         WebKit on these platforms. So, we can remove code that used NSURLRequest SPI to allow
1370         any HTTPS certificate from localhost and 127.0.0.1 when using {CF, NS}URLConnection.
1371         The equivalent functionality is implemented in TestController::canAuthenticateAgainstProtectionSpace().
1372
1373         * WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
1374         (WTR::InjectedBundle::platformInitialize):
1375         * WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
1376         (WTR::InjectedBundle::platformInitialize):
1377
1378 2018-04-02  Brady Eidson  <beidson@apple.com>
1379
1380         Process swapping on navigation needs to handle server redirects.
1381         <rdar://problem/38690465> and https://bugs.webkit.org/show_bug.cgi?id=184142
1382
1383         Reviewed by Alex Christensen.
1384
1385         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1386         (-[PSONNavigationDelegate webView:didFinishNavigation:]):
1387         (-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
1388         (-[PSONNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]):
1389         (-[PSONScheme addRedirectFromURLString:toURLString:]):
1390         (-[PSONScheme webView:startURLSchemeTask:]):
1391
1392 2018-04-02  Thibault Saunier  <tsaunier@igalia.com>
1393
1394         webkitpy: Use current environment value for GST_DEBUG(_FILE) and DOT_DIR env vars
1395         https://bugs.webkit.org/show_bug.cgi?id=184036
1396
1397         Reviewed by Philippe Normand.
1398
1399         Those variables are for debug purpose and should not change the behaviour
1400         itself, and developers expect them to have effect.
1401
1402         * Scripts/webkitpy/port/gtk.py:
1403         (GtkPort.setup_environ_for_server):
1404
1405 2018-04-02  Daniel Bates  <dabates@apple.com>
1406
1407         Remove Options constructor and use internal linkage for option handlers
1408         https://bugs.webkit.org/show_bug.cgi?id=184229
1409
1410         Reviewed by Andy Estes.
1411
1412         Use C++11 default initializer syntax to remove the need to explicitly have a constructor
1413         for the struct Options. Use internal linkage for option handler functions as these
1414         are never invoked outside the translation unit they are defined in.
1415
1416         * WebKitTestRunner/Options.cpp:
1417         (WTR::handleOptionNoTimeout):
1418         (WTR::handleOptionVerbose):
1419         (WTR::handleOptionGcBetweenTests):
1420         (WTR::handleOptionPixelTests):
1421         (WTR::handleOptionPrintSupportedFeatures):
1422         (WTR::handleOptionComplexText):
1423         (WTR::handleOptionAcceleratedDrawing):
1424         (WTR::handleOptionRemoteLayerTree):
1425         (WTR::handleOptionShowWebView):
1426         (WTR::handleOptionShowTouches):
1427         (WTR::handleOptionAllowedHost):
1428         (WTR::handleOptionUnmatched):
1429         (WTR::Options::Options): Deleted.
1430         * WebKitTestRunner/Options.h:
1431
1432 2018-04-02  Alejandro G. Castro  <alex@igalia.com>
1433
1434         Unreviewed GTK port dependencies fix after r230152.
1435
1436         Add alsa library dependency for gtk.
1437
1438         * gtk/install-dependencies:
1439
1440 2018-04-02  Alejandro G. Castro  <alex@igalia.com>
1441
1442         [GTK] Make libwebrtc backend buildable for GTK  port
1443         https://bugs.webkit.org/show_bug.cgi?id=178860
1444
1445         Reviewed by Youenn Fablet.
1446
1447         * gstreamer/jhbuild.modules: Modified the libvpx module for the
1448         libwebrtc compilation.
1449         * gtk/install-dependencies: Add libevent as a system requirement.
1450         * Scripts/webkitpy/style/checker.py: Added libwebrtc to the list of third
1451         party libraries with reduced style checks.
1452
1453 2018-04-01  Zalan Bujtas  <zalan@apple.com>
1454
1455         [LayoutReloaded] Use containing block's contentBox left edge when the float is to the right.
1456         https://bugs.webkit.org/show_bug.cgi?id=184230
1457
1458         Reviewed by Antti Koivisto.
1459
1460         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1461         (InlineFormattingContext.prototype._mapFloatingPosition):
1462         (InlineFormattingContext):
1463         * LayoutReloaded/test/index.html:
1464         * LayoutReloaded/test/inline-formatting-context-with-floats2.html: Added.
1465
1466 2018-04-01  Zalan Bujtas  <zalan@apple.com>
1467
1468         [LayoutReloaded] Right floating box reduces available line width.
1469         https://bugs.webkit.org/show_bug.cgi?id=184226
1470
1471         Reviewed by Antti Koivisto.
1472
1473         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1474         (InlineFormattingContext.prototype._createNewLine):
1475         * LayoutReloaded/test/index.html:
1476         * LayoutReloaded/test/inline-with-floats-right-left-simple.html: Added.
1477
1478 2018-03-31  Zalan Bujtas  <zalan@apple.com>
1479
1480         [LayoutReloaded] Floating box reduces line with in inline formatting context
1481         https://bugs.webkit.org/show_bug.cgi?id=184223
1482
1483         Reviewed by Antti Koivisto.
1484
1485         * LayoutReloaded/FormattingContext/FloatingContext.js:
1486         (FloatingContext.prototype.left):
1487         (FloatingContext.prototype.right):
1488         (FloatingContext.prototype._mapDisplayMarginBoxToFormattingRoot):
1489         (FloatingContext.prototype._mapBorderBoxToFormattingRoot):
1490         (FloatingContext.prototype._mapContentBoxToFormattingRoot):
1491         (FloatingContext.prototype.formattingRoot):
1492         (FloatingContext.prototype._floatingState):
1493         (FloatingContext.prototype._formattingRoot): Deleted.
1494         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1495         (InlineFormattingContext.prototype._createNewLine):
1496         (InlineFormattingContext.prototype._mapFloatingPosition):
1497         (InlineFormattingContext):
1498         * LayoutReloaded/FormattingState/FormattingState.js:
1499         (FormattingState.prototype.displayBox):
1500         (FormattingState):
1501         * LayoutReloaded/test/index.html:
1502         * LayoutReloaded/test/inline-formatting-context-with-floats.html: Added.
1503
1504 2018-03-31  Zalan Bujtas  <zalan@apple.com>
1505
1506         [LayoutReloaded] InlineFormattingState should inherit the floating state from its parent formatting state
1507         https://bugs.webkit.org/show_bug.cgi?id=184220
1508
1509         Reviewed by Antti Koivisto.
1510
1511         If the block container box that initiates an inline formatting context also establishes a block context,
1512         create a new float state, otherwise use the existing one.
1513
1514         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1515         (BlockFormattingContext.prototype._contentHeight):
1516         * LayoutReloaded/FormattingState/InlineFormattingState.js:
1517         (InlineFormattingState):
1518         * LayoutReloaded/LayoutState.js:
1519         (LayoutState.prototype.establishedFormattingState):
1520         (LayoutState.prototype.formattingStateForBox):
1521         (LayoutState.prototype.formattingState): Deleted.
1522         * LayoutReloaded/Utils.js:
1523
1524 2018-03-31  Zalan Bujtas  <zalan@apple.com>
1525
1526         [LayoutReloaded] FloatingContext does not need a parent formatting context.
1527         https://bugs.webkit.org/show_bug.cgi?id=184219
1528
1529         Reviewed by Antti Koivisto.
1530
1531         We don't need the formatting context in the FloatingContext now that margins are moved over to Display.Box.
1532         This is in preparation for being able to create a FloatingContext for an inline formatting context,
1533         when the inline context actually inherits the floating state from its formatting root.
1534
1535         * LayoutReloaded/FormattingContext/FloatingContext.js:
1536         (FloatingContext):
1537         (FloatingContext.prototype._availableSpace):
1538         (FloatingContext.prototype._adjustedFloatingPosition):
1539         (FloatingContext.prototype._addFloatingBox):
1540         (FloatingContext.prototype._formattingContext): Deleted.
1541         * LayoutReloaded/FormattingContext/FormattingContext.js:
1542         (FormattingContext):
1543
1544 2018-03-31  Zalan Bujtas  <zalan@apple.com>
1545
1546         [LayoutReloaded] Do not clone Display.Box for FloatingState stacks.
1547         https://bugs.webkit.org/show_bug.cgi?id=184218
1548
1549         Reviewed by Antti Koivisto.
1550
1551         Now that Display.Box is in a tree context, we can't just clone it for the purpose of caching its absolute position.
1552
1553         * LayoutReloaded/DisplayTree/Box.js:
1554         (Display.Box.prototype.clone): Deleted.
1555         * LayoutReloaded/FormattingContext/FloatingContext.js:
1556         (FloatingContext.prototype._positionForFloating):
1557         (FloatingContext.prototype._moveToNextVerticalPosition):
1558         (FloatingContext.prototype._availableSpace):
1559         (FloatingContext.prototype._findFloatingAtVerticalPosition):
1560         (FloatingContext.prototype._adjustedFloatingPosition):
1561         (FloatingContext.prototype._bottom):
1562         (FloatingContext.prototype._addFloatingBox):
1563         (FloatingContext.prototype._mapMarginBoxToFormattingRoot):
1564         (FloatingContext.prototype._mapDisplayMarginBoxToFormattingRoot):
1565         * LayoutReloaded/FormattingState/FloatingState.js:
1566         (FloatingState.prototype.addFloating):
1567
1568 2018-03-31  Zalan Bujtas  <zalan@apple.com>
1569
1570         [LayoutReloaded] Remove all FormattingContext::absolute*Box functions.
1571         https://bugs.webkit.org/show_bug.cgi?id=184215
1572
1573         Reviewed by Antti Koivisto.
1574
1575         Use Display.Box instead.
1576
1577         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1578         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
1579         * LayoutReloaded/FormattingContext/FloatingContext.js:
1580         (FloatingContext.prototype._availableSpace):
1581         (FloatingContext.prototype._adjustedFloatingPosition):
1582         (FloatingContext.prototype._mapBorderBoxToFormattingRoot):
1583         (FloatingContext.prototype._mapContentBoxToFormattingRoot):
1584         * LayoutReloaded/FormattingContext/FormattingContext.js:
1585         (FormattingContext.prototype.absoluteBorderBox): Deleted.
1586         (FormattingContext.prototype.absolutePaddingBox): Deleted.
1587         (FormattingContext.prototype.absoluteContentBox): Deleted.
1588         (FormattingContext.prototype._toAbsolutePosition): Deleted.
1589         (FormattingContext.prototype._toRootAbsolutePosition): Deleted.
1590         * LayoutReloaded/Utils.js:
1591         (Utils.mapPosition):
1592         (Utils.marginBox):
1593         (Utils.borderBox):
1594         (Utils.contentBox):
1595
1596 2018-03-31  Zalan Bujtas  <zalan@apple.com>
1597
1598         [LayoutReloaded] Remove FormattingContext::absoluteMarginBox
1599         https://bugs.webkit.org/show_bug.cgi?id=184213
1600
1601         Reviewed by Antti Koivisto.
1602
1603         Display.Box already has the margin values.
1604
1605         * LayoutReloaded/FormattingContext/FloatingContext.js:
1606         (FloatingContext.prototype._positionForFloating):
1607         (FloatingContext.prototype._addFloatingBox):
1608         (FloatingContext.prototype._mapMarginBoxToFormattingRoot):
1609         (FloatingContext.prototype._formattingRoot):
1610         * LayoutReloaded/FormattingContext/FormattingContext.js:
1611         (FormattingContext.prototype.absoluteMarginBox): Deleted.
1612         * LayoutReloaded/Utils.js:
1613         (Utils.marginBox):
1614
1615 2018-03-31  Zalan Bujtas  <zalan@apple.com>
1616
1617         [layoutReloaded] Introduce margin to Display.Box
1618         https://bugs.webkit.org/show_bug.cgi?id=184212
1619
1620         Reviewed by Antti Koivisto.
1621
1622         This is in preparation for moving margin box out of formatting context to Display.Box.
1623
1624         * LayoutReloaded/DisplayTree/Box.js:
1625         (Display.Box):
1626         (Display.Box.prototype.setRect):
1627         (Display.Box.prototype.setTopLeft):
1628         (Display.Box.prototype.setTop):
1629         (Display.Box.prototype.setLeft):
1630         (Display.Box.prototype.setSize):
1631         (Display.Box.prototype.setWidth):
1632         (Display.Box.prototype.setHeight):
1633         (Display.Box.prototype.width):
1634         (Display.Box.prototype.setMarginTop):
1635         (Display.Box.prototype.setMarginLeft):
1636         (Display.Box.prototype.setMarginBottom):
1637         (Display.Box.prototype.setMarginRight):
1638         (Display.Box.prototype.marginTop):
1639         (Display.Box.prototype.marginLeft):
1640         (Display.Box.prototype.marginBottom):
1641         (Display.Box.prototype.marginRight):
1642         (Display.Box.prototype.marginBox):
1643         * LayoutReloaded/FormattingContext/FormattingContext.js:
1644         (FormattingContext.prototype.absoluteMarginBox):
1645         (FormattingContext.prototype._addToLayoutQueue):
1646         * LayoutReloaded/FormattingState/FormattingState.js:
1647         (FormattingState.prototype.createDisplayBox):
1648
1649 2018-03-31  Zalan Bujtas  <zalan@apple.com>
1650
1651         [LayoutReloaded] Add tree context to Display.Box
1652         https://bugs.webkit.org/show_bug.cgi?id=184211
1653
1654         Reviewed by Antti Koivisto.
1655
1656         This is preparation for using the Display.Box tree to resolve absolute coordinates.
1657
1658         * LayoutReloaded/DisplayTree/Box.js:
1659         (Display.Box):
1660         (Display.Box.prototype.setParent):
1661         (Display.Box.prototype.setNextSibling):
1662         (Display.Box.prototype.setPreviousSibling):
1663         (Display.Box.prototype.setFirstChild):
1664         (Display.Box.prototype.setLastChild):
1665         (Display.Box.prototype.parent):
1666         (Display.Box.prototype.nextSibling):
1667         (Display.Box.prototype.previousSibling):
1668         (Display.Box.prototype.firstChild):
1669         (Display.Box.prototype.lastChild):
1670         * LayoutReloaded/FormattingState/FormattingState.js:
1671         (FormattingState.prototype.createDisplayBox):
1672
1673 2018-03-30  Ryosuke Niwa  <rniwa@webkit.org>
1674
1675         Copying a list from Microsoft Word to TinyMCE fails when mso-list is the first property
1676         https://bugs.webkit.org/show_bug.cgi?id=182938
1677         <rdar://problem/37683007>
1678
1679         Reviewed by Wenson Hsieh.
1680
1681         Added more assertions to PasteHTML.PreservesMSOList for preserving an inline style which starts with mso-list
1682         or the one which line-breaks right before it.
1683
1684         * TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
1685         * TestWebKitAPI/Tests/WebKitCocoa/mso-list.html:
1686
1687 2018-03-29  Ryosuke Niwa  <rniwa@webkit.org>
1688
1689         Copying a list from Microsoft Word to TinyMCE fails when mso-list is on tags other than P
1690         https://bugs.webkit.org/show_bug.cgi?id=182954
1691         <rdar://problem/37713141>
1692
1693         Reviewed by Wenson Hsieh.
1694
1695         Added a test case for a HTML generated by Microsoft Word which sets mso-list on h4.
1696
1697         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1698         * TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
1699         * TestWebKitAPI/Tests/WebKitCocoa/mso-list-compat-mode.html: Fixed the file path.
1700         * TestWebKitAPI/Tests/WebKitCocoa/mso-list-on-h4.html: Added.
1701
1702 2018-03-29  Ross Kirsling  <ross.kirsling@sony.com>
1703
1704         run-jsc-benchmarks should recognize Windows-style build directory structure.
1705         https://bugs.webkit.org/show_bug.cgi?id=184117
1706
1707         Reviewed by Yusuke Suzuki.
1708
1709         * Scripts/run-jsc-benchmarks:
1710         Allow not only bin/jsc but also bin64/jsc.exe.
1711
1712 2018-03-29  Zalan Bujtas  <zalan@apple.com>
1713
1714         [LayoutReloaded] Decouple formatting state and context lifetime.
1715         https://bugs.webkit.org/show_bug.cgi?id=184136
1716
1717         Reviewed by Antti Koivisto.
1718
1719         FormattingContext is about the layout logic. We don't need to hold on to it.
1720
1721         * LayoutReloaded/FormattingContext/FloatingContext.js:
1722         (FloatingContext):
1723         (FloatingContext.prototype.computePosition):
1724         (FloatingContext.prototype._positionForClear):
1725         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
1726         (FloatingContext.prototype._addFloatingBox):
1727         (FloatingContext.prototype._formattingContext):
1728         (FloatingContext.prototype._formattingState):
1729         * LayoutReloaded/FormattingContext/FormattingContext.js:
1730         (FormattingContext):
1731         * LayoutReloaded/FormattingState/BlockFormattingState.js:
1732         (BlockFormattingState):
1733         * LayoutReloaded/FormattingState/FloatingState.js:
1734         (FloatingState):
1735         (FloatingState.prototype.addFloating):
1736         (FloatingState.prototype.formattingState):
1737         (FloatingState.prototype.formattingContext): Deleted.
1738         * LayoutReloaded/FormattingState/FormattingState.js:
1739         (FormattingState):
1740         (FormattingState.prototype.formattingContext): Deleted.
1741         * LayoutReloaded/FormattingState/InlineFormattingState.js:
1742         (InlineFormattingState):
1743         * LayoutReloaded/LayoutState.js:
1744         (LayoutState.prototype.layout):
1745         (LayoutState.prototype.formattingContext):
1746
1747 2018-03-28  Zalan Bujtas  <zalan@apple.com>
1748
1749         [LayoutReloaded] Introduce FloatingState.
1750         https://bugs.webkit.org/show_bug.cgi?id=184126
1751
1752         Reviewed by Antti Koivisto.
1753
1754         It holds the floating state (left/right floating stack) for a given formatting state (Block or Inline).
1755         (FormattingState -> FloatingState/FormattingContext -> FloatingContext)
1756
1757         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
1758         (BlockFormattingContext):
1759         * LayoutReloaded/FormattingContext/FloatingContext.js:
1760         (FloatingContext):
1761         (FloatingContext.prototype.computePosition):
1762         (FloatingContext.prototype.bottom):
1763         (FloatingContext.prototype._positionForFloating):
1764         (FloatingContext.prototype._positionForClear):
1765         (FloatingContext.prototype._findInnerMostLeftAndRight):
1766         (FloatingContext.prototype._isEmpty):
1767         (FloatingContext.prototype._floatingState):
1768         (FloatingContext.prototype._formattingContext):
1769         (FloatingContext.prototype._lastFloating):
1770         (FloatingContext.prototype._leftFloatingStack):
1771         (FloatingContext.prototype._rightFloatingStack):
1772         (FloatingContext.prototype._addFloating): Deleted.
1773         * LayoutReloaded/FormattingContext/FormattingContext.js:
1774         (FormattingContext):
1775         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1776         (InlineFormattingContext):
1777         * LayoutReloaded/FormattingState/BlockFormattingState.js:
1778         (BlockFormattingState):
1779         * LayoutReloaded/FormattingState/FloatingState.js: Copied from Tools/LayoutReloaded/FormattingState/InlineFormattingState.js.
1780         (FloatingState):
1781         (FloatingState.prototype.addFloating):
1782         (FloatingState.prototype.leftFloatingStack):
1783         (FloatingState.prototype.rightFloatingStack):
1784         (FloatingState.prototype.lastFloating):
1785         (FloatingState.prototype.formattingContext):
1786         * LayoutReloaded/FormattingState/FormattingState.js:
1787         (FormattingState):
1788         (FormattingState.prototype.floatingState):
1789         * LayoutReloaded/FormattingState/InlineFormattingState.js:
1790         (InlineFormattingState):
1791         * LayoutReloaded/test/index.html:
1792
1793 2018-03-28  Zalan Bujtas  <zalan@apple.com>
1794
1795         [LayoutReloaded] Convert floating left/right stack display boxes absolute to the formatting context's root.
1796         https://bugs.webkit.org/show_bug.cgi?id=184123
1797
1798         Reviewed by Antti Koivisto.
1799
1800         1. The left/right floating array should hold the Display.Box (and not the Layout.Box)
1801         2. Clone the Display.Box and convert its rect absolute to the formatting context's root so that we
1802         don't have to keep converting the coordinates while computing the positions. 
1803
1804         * LayoutReloaded/DisplayTree/Box.js:
1805         (Display.Box.prototype.clone):
1806         (Display.Box.prototype.setRect):
1807         * LayoutReloaded/FormattingContext/FloatingContext.js:
1808         (FloatingContext.prototype.computePosition):
1809         (FloatingContext.prototype._positionForFloating):
1810         (FloatingContext.prototype._addFloating):
1811         (FloatingContext.prototype._moveToNextVerticalPosition):
1812         (FloatingContext.prototype._availableSpace):
1813         (FloatingContext.prototype._findFloatingAtVerticalPosition):
1814         (FloatingContext.prototype._adjustedFloatingPosition):
1815         (FloatingContext.prototype._bottom):
1816
1817 2018-03-28  Chris Dumez  <cdumez@apple.com>
1818
1819         Unreviewed iOS build fix after r230060.
1820
1821         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1822
1823 2018-03-28  Chris Dumez  <cdumez@apple.com>
1824
1825         Unreviewed, disable new window.open() API tests introduced in r230051 on iOS.
1826
1827         I will investigate if this is testable on iOS.
1828
1829         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1830
1831 2018-03-28  Chris Dumez  <cdumez@apple.com>
1832
1833         Do process swap when opening a cross-origin URL via window.open(url, '_blank', 'noopener')
1834         https://bugs.webkit.org/show_bug.cgi?id=183962
1835         <rdar://problem/38817833>
1836
1837         Reviewed by Brady Eidson.
1838
1839         Add API test coverage.
1840
1841         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
1842         (-[PSONUIDelegate initWithNavigationDelegate:]):
1843         (-[PSONUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
1844
1845 2018-03-28  Carlos Eduardo Ramalho  <cadubentzen@gmail.com>
1846
1847         Add Carlos Eduardo Ramalho as contributor
1848         https://bugs.webkit.org/show_bug.cgi?id=184082
1849
1850         Reviewed by Carlos Alberto Lopez Perez.
1851
1852         * Scripts/webkitpy/common/config/contributors.json:
1853
1854 2018-03-28  Wenson Hsieh  <wenson_hsieh@apple.com>
1855
1856         [Extra zoom mode] Make boosted text autosizing values switchable at runtime
1857         https://bugs.webkit.org/show_bug.cgi?id=184092
1858         <rdar://problem/38939917>
1859
1860         Reviewed by Tim Horton.
1861
1862         Add an API test to check that toggling the boosted text autosizing preference causes text to lay out larger than
1863         it would with normal text autosizing.
1864
1865         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1866         * TestWebKitAPI/Tests/ios/TextAutosizingBoost.mm: Added.
1867         (TEST):
1868
1869 2018-03-28  Zalan Bujtas  <zalan@apple.com>
1870
1871         [LayoutReloaded] InlineFormattingContext::_handleText should support runs on multiple lines
1872         https://bugs.webkit.org/show_bug.cgi?id=184101
1873
1874         Reviewed by Antti Koivisto.
1875
1876         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1877         (InlineFormattingContext):
1878         (InlineFormattingContext.prototype.layout):
1879         (InlineFormattingContext.prototype._handleText):
1880         (InlineFormattingContext.prototype._createNewLine):
1881         * LayoutReloaded/test/index.html:
1882         * LayoutReloaded/test/simple-multiline-text.html: Added.
1883
1884 2018-03-28  Zalan Bujtas  <zalan@apple.com>
1885
1886         [LayoutReloaded] Add InlineTextBreaker::skipLeadingWhitespaceIfNeeded
1887         https://bugs.webkit.org/show_bug.cgi?id=184099
1888
1889         Reviewed by Antti Koivisto.
1890
1891         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
1892
1893 2018-03-27  Carlos Garcia Campos  <cgarcia@igalia.com>
1894
1895         [GLIB] Add JSCWeakValue to JavaScriptCore GLib API
1896         https://bugs.webkit.org/show_bug.cgi?id=184041
1897
1898         Reviewed by Michael Catanzaro.
1899
1900         Add test case for JSCWeakValue.
1901
1902         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
1903         (weakValueClearedCallback):
1904         (testJSCWeakValue):
1905         (main):
1906
1907 2018-03-27  Zalan Bujtas  <zalan@apple.com>
1908
1909         [LayoutReloaded] Start using window.collectTextRuns() to layout text lines in inline formatting context
1910         https://bugs.webkit.org/show_bug.cgi?id=184070
1911
1912         Reviewed by Antti Koivisto.
1913
1914         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
1915         (InlineFormattingContext.prototype._handleText):
1916         (InlineFormattingContext.prototype._commitLine):
1917         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
1918         (Line.prototype.addTextLineBox):
1919         (Line):
1920         (Line.prototype.addLineBox): Deleted.
1921         * LayoutReloaded/FormattingState/BlockFormattingState.js:
1922         (BlockFormattingState):
1923         * LayoutReloaded/FormattingState/FormattingState.js:
1924         (FormattingState.prototype.displayBox):
1925         (FormattingState):
1926         (FormattingState.prototype._setFormattingContext): Deleted.
1927         * LayoutReloaded/FormattingState/InlineFormattingState.js:
1928         (InlineFormattingState):
1929         * LayoutReloaded/LayoutTree/Text.js:
1930         (Text.prototype.content):
1931         * LayoutReloaded/Utils.js:
1932         (Utils.textRuns):
1933         (Utils.textRunsForLine):
1934         (Utils._dumpLines.):
1935         (Utils._dumpLines):
1936         * LayoutReloaded/test/simple-inline-text.html:
1937
1938 2018-03-27  Eric Carlson  <eric.carlson@apple.com>
1939
1940         https://bugs.webkit.org/show_bug.cgi?id=183876
1941         <rdar://problem/38726459>
1942         
1943         Unreviewed, fix for the test added in r229995 in the iOS simulator.
1944
1945         * TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm:
1946         (TestWebKitAPI::AVFoundationPref::testWithPreference):
1947
1948 2018-03-27  Jiewen Tan  <jiewen_tan@apple.com>
1949
1950         [WebAuthN] Implement authenticatorGetAssertion
1951         https://bugs.webkit.org/show_bug.cgi?id=183881
1952         <rdar://problem/37258628>
1953
1954         Reviewed by Brent Fulgham.
1955
1956         * TestWebKitAPI/Tests/ios/LocalAuthenticator.mm:
1957         (TestWebKitAPI::getTestKey):
1958         (TestWebKitAPI::addTestKeyToKeychain):
1959         (TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::evaluatePolicyFailed):
1960         (TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::evaluatePolicyPassed):
1961         (TestWebKitAPI::LAEvaluateAccessControlFailedSwizzler::LAEvaluateAccessControlFailedSwizzler):
1962         (TestWebKitAPI::LAEvaluateAccessControlFailedSwizzler::evaluateAccessControlFailed):
1963         (TestWebKitAPI::LAEvaluateAccessControlPassedSwizzler::LAEvaluateAccessControlPassedSwizzler):
1964         (TestWebKitAPI::LAEvaluateAccessControlPassedSwizzler::evaluateAccessControlPassed):
1965         (TestWebKitAPI::TEST):
1966
1967 2018-03-27  Brian Burg  <bburg@apple.com>
1968
1969         REGRESSION(r229937): WebDriver tests no longer run, test runner hangs when launching wpt web server
1970         https://bugs.webkit.org/show_bug.cgi?id=184056
1971         <rdar://problem/38925058>
1972
1973         Reviewed by Timothy Hatcher and Youenn Fablet.
1974
1975         * Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
1976         (WebDriverW3CWebServer.start):
1977         The config key used in upstream WPT has changed from 'host' to 'browser_host'.
1978
1979 2018-03-27  Timothy Hatcher  <timothy@hatcher.name>
1980
1981         Update my email address in contributors.json and scripts
1982         https://bugs.webkit.org/show_bug.cgi?id=184054
1983
1984         * Scripts/validate-committer-lists:
1985         (CommitterListFromGit):
1986         * Scripts/webkitpy/common/config/contributors.json:
1987
1988 2018-03-27  Eric Carlson  <eric.carlson@apple.com>
1989
1990         Make AVFoundationEnabled preference available on iOS
1991         https://bugs.webkit.org/show_bug.cgi?id=183876
1992         <rdar://problem/38726459>
1993
1994         Reviewed by Youenn Fablet.
1995
1996         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
1997         * TestWebKitAPI/Tests/WebKit/video.html: Added.
1998         * TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm: Added.
1999         (-[PreferenceTestMessageHandler userContentController:didReceiveScriptMessage:]):
2000         (TestWebKitAPI::AVFoundationPref::SetUp):
2001         (TestWebKitAPI::AVFoundationPref::testWithPreference):
2002         (TestWebKitAPI::TEST_F):
2003
2004 2018-03-26  Brent Fulgham  <bfulgham@apple.com>
2005
2006         Warn against cookie access in the WebContent process using ProcessPrivilege assertions
2007         https://bugs.webkit.org/show_bug.cgi?id=183911
2008         <rdar://problem/38762306>
2009
2010         Reviewed by Youenn Fablet.
2011
2012         Add a set of ProcessPrivilege assertions to enforce the rule that the WebContent process
2013         should never call Cookie API directly. That should only happen in the Networking or
2014         UIProcess. 
2015
2016         * DumpRenderTree/mac/DumpRenderTree.mm:
2017         (DumpRenderTreeMain):
2018         * TestWebKitAPI/TestsController.cpp:
2019         (TestWebKitAPI::TestsController::TestsController):
2020         * WebKitTestRunner/TestController.cpp:
2021         (WTR::TestController::initialize):
2022
2023 2018-03-26  Zalan Bujtas  <zalan@apple.com>
2024
2025         [LayoutReloaded] Add InlineText DOM interface and dependencies
2026         https://bugs.webkit.org/show_bug.cgi?id=184010
2027
2028         Reviewed by Antti Koivisto.
2029
2030         to help inline text layout.
2031
2032         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
2033
2034 2018-03-25  Carlos Garcia Campos  <cgarcia@igalia.com>
2035
2036         [GTK][WPE] Add API to convert between DOM and JSCValue
2037         https://bugs.webkit.org/show_bug.cgi?id=183448
2038
2039         Reviewed by Michael Catanzaro.
2040
2041         Add unit tests for non-deprecated DOM API and switch existing tests to use non-deprecated API except for the
2042         ones that test the deprecated API.
2043
2044         * TestWebKitAPI/Tests/WebKitGLib/DOMElementTest.cpp: Added.
2045         (DOMElementTest::create):
2046         (DOMElementTest::testAutoFill):
2047         (registerTests):
2048         * TestWebKitAPI/Tests/WebKitGLib/EditorTest.cpp: Added.
2049         (WebKitWebEditorTest::create):
2050         (WebKitWebEditorTest::selectionChangedCallback):
2051         (WebKitWebEditorTest::testSelectionchanged):
2052         (registerTests):
2053         * TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
2054         (WebKitFrameTest::testJavaScriptValues):
2055         (registerTests):
2056         * TestWebKitAPI/Tests/WebKitGLib/TestDOMElement.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObjectPrivate.h.
2057         (testWebKitDOMElementAutoFill):
2058         (beforeAll):
2059         (afterAll):
2060         * TestWebKitAPI/Tests/WebKitGLib/TestEditor.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebKitGtk/TestEditor.cpp.
2061         * TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp:
2062         (testWebKitFrameJavaScriptValues):
2063         (beforeAll):
2064         * TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:
2065         (inputElementIsUserEdited):
2066         (testWebExtensionInputElementIsUserEdited):
2067         (testWebExtensionFormSubmissionSteps):
2068         (beforeAll):
2069         * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
2070         (documentLoadedCallback):
2071         (serializeNode):
2072         (contextMenuCallback):
2073         (consoleMessageSentCallback):
2074         (formControlsAssociatedCallback):
2075         (willSubmitFormCallback):
2076         (pageCreatedCallback):
2077         (methodCallCallback):
2078         * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
2079         (checkLeaks):
2080         (webProcessTestRunnerFinalize):
2081         (checkLeaksAtExit):
2082         * TestWebKitAPI/Tests/WebKitGtk/AutocleanupsTest.cpp:
2083         (AutocleanupsTest::testWebProcessAutocleanups):
2084         * TestWebKitAPI/Tests/WebKitGtk/DOMClientRectTest.cpp:
2085         * TestWebKitAPI/Tests/WebKitGtk/DOMNodeFilterTest.cpp:
2086         * TestWebKitAPI/Tests/WebKitGtk/DOMNodeTest.cpp:
2087         * TestWebKitAPI/Tests/WebKitGtk/DOMXPathNSResolverTest.cpp:
2088         * TestWebKitAPI/Tests/WebKitGtk/EditorTest.cpp: Removed.
2089         * TestWebKitAPI/glib/CMakeLists.txt:
2090         * TestWebKitAPI/glib/PlatformGTK.cmake:
2091         * TestWebKitAPI/glib/PlatformWPE.cmake:
2092
2093 2018-03-24  Jonathan Bedard  <jbedard@apple.com>
2094
2095         webkitpy: Unrecognized mac versions always use WebKitTestRunner
2096         https://bugs.webkit.org/show_bug.cgi?id=183681
2097         <rdar://problem/38509162>
2098
2099         Reviewed by Daniel Bates.
2100
2101         When an unrecognized version is used, we were unconditionally adding '-wk2'
2102         to the mac version name. This would mean that the port object would always
2103         use WebKitTestRunner as the driver, even if DumpRenderTree was explicitly
2104         requested.
2105
2106         * Scripts/webkitpy/port/apple.py:
2107         (ApplePort.determine_full_port_name): Only add wk2 to port names if
2108         WebKitTestRunner is specified.
2109         * Scripts/webkitpy/port/mac.py:
2110         (MacPort.__init__): Compare length of split string, and do not treat wk2 as a
2111         version name.
2112         * Scripts/webkitpy/port/mac_unittest.py:
2113         (MacTest):
2114         (MacTest.test_factory_with_future_version): Confirm that future versions correctly
2115         assign the driver and have undefined version names.
2116         (MacTest.test_factory_with_portname_version): Confirm that general versions correctly assign
2117         the driver and have defined versions.
2118         (MacTest.test_factory_with_portname_wk2): Ensure that mac ports ending in 'wk2' set
2119         the driver to be WebKitTestRunner even if webkit_test_runner=False.
2120
2121 2018-03-23  Zan Dobersek  <zdobersek@igalia.com>
2122
2123         Fix the run-benchmark script, properly specifying the plan directory
2124         where the Skipped file is located.
2125
2126         Rubber-stamped by Carlos Alberto Lopez Perez.
2127
2128         * Scripts/webkitpy/benchmark_runner/run_benchmark.py:
2129         (start):
2130
2131 2018-03-23  Tim Horton  <timothy_horton@apple.com>
2132
2133         Fix the build with no pasteboard
2134         https://bugs.webkit.org/show_bug.cgi?id=183973
2135
2136         Reviewed by Dan Bernstein.
2137
2138         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2139
2140 2018-03-23  Youenn Fablet  <youenn@apple.com>
2141
2142         Update WPT tools to a1ec330
2143         https://bugs.webkit.org/show_bug.cgi?id=183934
2144
2145         Reviewed by Chris Dumez.
2146
2147         Update script to run WPT server  according updated WPT tools.
2148
2149         * Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py:
2150         (main):
2151         * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
2152         (base_http_url):
2153         (base_https_url):
2154
2155 2018-03-23  Sihui Liu  <sihui_liu@apple.com>
2156
2157         Local storage getItem() for an empty string returned UNDEFINED value.
2158         https://bugs.webkit.org/show_bug.cgi?id=69138
2159         <rdar://problem/13410974>
2160
2161         Reviewed by Brady Eidson.
2162
2163         Add API test coverage.
2164
2165         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2166         * TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: Added.
2167         (-[LocalStorageMessageHandler userContentController:didReceiveScriptMessage:]):
2168         (TEST):
2169         * TestWebKitAPI/Tests/WebKitCocoa/localstorage-empty-string-value.html: Added.
2170
2171 2018-03-23  Chris Dumez  <cdumez@apple.com>
2172
2173         Promptly terminate service worker processes when they are no longer needed
2174         https://bugs.webkit.org/show_bug.cgi?id=183873
2175         <rdar://problem/38676995>
2176
2177         Reviewed by Youenn Fablet.
2178
2179         Add API test coverage.
2180
2181         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2182
2183 2018-03-23  Brady Eidson  <beidson@apple.com>
2184
2185         Go to back/forward list items after a process-swapped navigation.
2186         <rdar://problem/38690544> and https://bugs.webkit.org/show_bug.cgi?id=183920
2187
2188         Reviewed by Andy Estes.
2189
2190         Add a new API test that does some process-swapping navigations (including a back navigation)
2191         and verifies the state of the engine afterwards.
2192
2193         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2194         (-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
2195         (-[PSONScheme initWithBytes:]):
2196         (-[PSONScheme webView:startURLSchemeTask:]):
2197         (log):
2198         (function):
2199         (TEST): Deleted.
2200
2201 2018-03-23  Brendan McLoughlin  <brendan@bocoup.com>
2202
2203         Lint web-platform-tests changes with the wpt linter before exporting
2204         https://bugs.webkit.org/show_bug.cgi?id=183796
2205
2206         Reviewed by Youenn Fablet.
2207
2208         * Scripts/webkitpy/w3c/test_exporter.py:
2209         (TestExporter.__init__):
2210         (TestExporter.do_export):
2211         * Scripts/webkitpy/w3c/test_exporter_unittest.py:
2212         (TestExporterTest.MockWPTLinter):
2213         (TestExporterTest.MockWPTLinter.__init__):
2214         (TestExporterTest.MockWPTLinter.lint):
2215         (TestExporterTest.test_export):
2216         (TestExporterTest.test_export_with_specific_branch):
2217         * Scripts/webkitpy/w3c/wpt_linter.py: Added.
2218         (WPTLinter):
2219         (WPTLinter.__init__):
2220         (WPTLinter.lint):
2221
2222 2018-03-23  David Kilzer  <ddkilzer@apple.com>
2223
2224         Stop using dispatch_set_target_queue()
2225         <https://webkit.org/b/183908>
2226         <rdar://problem/33553533>
2227
2228         Reviewed by Daniel Bates.
2229
2230         * Scripts/webkitpy/style/checkers/cpp.py:
2231         (check_language): Add check for use of
2232         dispatch_set_target_queue().
2233         (CppChecker): Add 'runtime/dispatch_set_target_queue' category.
2234         * Scripts/webkitpy/style/checkers/cpp_unittest.py:
2235         (CppStyleTest): Add test.
2236
2237 2018-03-23  Youenn Fablet  <youenn@apple.com>
2238
2239         Allow fully whitelisted plug-ins to match non HTTP URLs
2240         https://bugs.webkit.org/show_bug.cgi?id=183938
2241         rdar://problem/38534312
2242
2243         Reviewed by Chris Dumez.
2244
2245         * TestWebKitAPI/Tests/WebCore/URL.cpp:
2246         (TestWebKitAPI::TEST_F):
2247
2248 2018-03-23  JF Bastien  <jfbastien@apple.com>
2249
2250         dump-class-layout is just wrong
2251         https://bugs.webkit.org/show_bug.cgi?id=183939
2252
2253         Reviewed by Yusuke Suzuki.
2254
2255         Looks like r229291 contained a half-renamed variable in it, so it
2256         just doesn't work.
2257
2258         * Scripts/dump-class-layout:
2259         (verify_type):
2260         (verify_type_recursive):
2261
2262 2018-03-23  Carlos Garcia Campos  <cgarcia@igalia.com>
2263
2264         Unreviewed. Run JSC GLib API tests in GTK+ and WPE bots.
2265
2266         The test runners were still considering the JSC tests as google tests, but they are now GLib tests.
2267
2268         * Scripts/run-gtk-tests:
2269         (GtkTestRunner.is_glib_test):
2270         (GtkTestRunner.is_google_test):
2271         * Scripts/run-wpe-tests:
2272         (WPETestRunner.is_glib_test):
2273         (WPETestRunner.is_google_test):
2274
2275 2018-03-22  Daniel Bates  <dabates@apple.com>
2276
2277         Expose SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest() as WebKit SPI
2278         https://bugs.webkit.org/show_bug.cgi?id=183907
2279         <rdar://problem/38759127>
2280
2281         Reviewed by Alex Christensen.
2282
2283         Adds unit tests for the modern Objective-C and C SPI to ensure we do not regress it.
2284
2285         We use the deprecated -[WKBrowsingContextController registerSchemeForCustomProtocol:]
2286         in both the modern Objective-C API and C API tests to share code. Once we no longer
2287         need to support the C API we should remove the tests and transition the modern Objective-
2288         C tests to use -[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:].
2289
2290         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2291         * TestWebKitAPI/Tests/WebKitCocoa/SchemeRegistry.mm: Added.
2292         (+[EchoURLProtocol canInitWithRequest:]):
2293         (+[EchoURLProtocol canonicalRequestForRequest:]):
2294         (+[EchoURLProtocol requestIsCacheEquivalent:toRequest:]):
2295         (-[EchoURLProtocol startLoading]):
2296         (-[EchoURLProtocol stopLoading]):
2297         (-[WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequestLoadDelegate browsingContextController:didFailProvisionalLoadWithError:]):
2298         (-[WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequestLoadDelegate browsingContextControllerDidFinishLoad:]):
2299         (TestWebKitAPI::TEST):
2300
2301 2018-03-22  Adrian Perez de Castro  <aperez@igalia.com>
2302
2303         [WPE] Enable WOFF2 support
2304         https://bugs.webkit.org/show_bug.cgi?id=178158
2305
2306         Reviewed by Frédéric Wang.
2307
2308         * wpe/jhbuild.modules: Add "brotli" and "woff2" to the JHBuild moduleset.
2309
2310 2018-03-22  Brendan McLoughlin  <brendan@bocoup.com>
2311
2312         Do not export web-platform-test files generated by the wpt importer to assist the webkit test runner
2313         https://bugs.webkit.org/show_bug.cgi?id=183916
2314
2315         Reviewed by Youenn Fablet.
2316
2317         * Scripts/webkitpy/w3c/test_exporter.py:
2318         (TestExporter.create_branch_with_patch):
2319         * Scripts/webkitpy/w3c/test_exporter_unittest.py:
2320         (TestExporterTest.test_export):
2321         (TestExporterTest.test_export_with_specific_branch):
2322
2323 2018-03-22  Tim Horton  <timothy_horton@apple.com>
2324
2325         Improve readability of WebCore's OTHER_LDFLAGS
2326         https://bugs.webkit.org/show_bug.cgi?id=183909
2327         <rdar://problem/38760992>
2328
2329         Reviewed by Dan Bernstein.
2330
2331         * TestWebKitAPI/Configurations/Base.xcconfig:
2332         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2333
2334 2018-03-21  Fujii Hironori  <Hironori.Fujii@sony.com>
2335
2336         Unreviewed. Marked myself as a committer.
2337
2338         * Scripts/webkitpy/common/config/contributors.json:
2339
2340 2018-03-21  Yoshiaki Jitsukawa  <yoshiaki.jitsukawa@sony.com>
2341
2342         Unreviewed, make the email address of Yoshiaki Jitsukawa all lower case.
2343
2344         * Scripts/webkitpy/common/config/contributors.json:
2345
2346 2018-03-21  Yoshiaki Jitsukawa  <Yoshiaki.Jitsukawa@sony.com>
2347
2348         Unreviewed, add myself as a WebKit committer.
2349
2350         * Scripts/webkitpy/common/config/contributors.json:
2351
2352 2018-03-21  Chris Dumez  <cdumez@apple.com>
2353
2354         ScrollViewInsetTests.RestoreInitialContentOffsetAfterCrash API test is failing with async delegates
2355         https://bugs.webkit.org/show_bug.cgi?id=183787
2356
2357         Reviewed by Wenson Hsieh.
2358
2359         Add API test coverage.
2360
2361         * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:
2362         (-[AsyncPolicyDelegateForInsetTest webView:didFinishNavigation:]):
2363         (-[AsyncPolicyDelegateForInsetTest webView:decidePolicyForNavigationAction:decisionHandler:]):
2364         (-[AsyncPolicyDelegateForInsetTest webView:decidePolicyForNavigationResponse:decisionHandler:]):
2365         (-[AsyncPolicyDelegateForInsetTest webViewWebContentProcessDidTerminate:]):
2366         (TestWebKitAPI::TEST):
2367
2368 2018-03-21  Chris Dumez  <cdumez@apple.com>
2369
2370         Fix DataInteractionTests.InjectedBundleAllowPerformTwoStepDrop to use synchronouslyLoadTestPageNamed
2371         https://bugs.webkit.org/show_bug.cgi?id=183858
2372
2373         Reviewed by Wenson Hsieh.
2374
2375         Fix DataInteractionTests.InjectedBundleAllowPerformTwoStepDrop to use synchronouslyLoadTestPageNamed
2376         instead of loadTestPageNamed because injecting script.
2377
2378         * TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
2379         (TestWebKitAPI::TEST):
2380
2381 2018-03-21  Zalan Bujtas  <zalan@apple.com>
2382
2383         [LayoutReloaded] Enable formatting state for InlineFormattingContext
2384         https://bugs.webkit.org/show_bug.cgi?id=183853
2385
2386         Reviewed by Antti Koivisto.
2387
2388         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
2389         (BlockFormattingContext.prototype._contentHeight):
2390         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
2391         (InlineFormattingContext):
2392         (InlineFormattingContext.prototype.layout):
2393         (InlineFormattingContext.prototype._createNewLine):
2394         * LayoutReloaded/LayoutState.js:
2395         (LayoutState.prototype.formattingState):
2396         * LayoutReloaded/README.md:
2397         * LayoutReloaded/Utils.js:
2398         (Utils._dumpTree):
2399         * LayoutReloaded/test/index.html:
2400         * LayoutReloaded/test/simple-inline-text.html: Added.
2401
2402 2018-03-21  Zalan Bujtas  <zalan@apple.com>
2403
2404         [LayoutReloaded] Move inline lines to InlineFormattingState.
2405         https://bugs.webkit.org/show_bug.cgi?id=183814
2406
2407         Reviewed by Antti Koivisto.
2408
2409         InlineFormattingContext is not supposed to hold state.
2410
2411         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
2412         (InlineFormattingContext):
2413         (InlineFormattingContext.prototype._commitLine):
2414         (InlineFormattingContext.prototype._createNewLine):
2415         (InlineFormattingContext.prototype.lines): Deleted.
2416         (InlineFormattingContext.prototype._initializeLine): Deleted.
2417         * LayoutReloaded/FormattingState/InlineFormattingState.js:
2418         (InlineFormattingState):
2419         (InlineFormattingState.prototype.lines):
2420         (InlineFormattingState.prototype.appendLine):
2421
2422 2018-03-21  Ms2ger  <Ms2ger@igalia.com>
2423
2424         [WPE] Disable most of TestWebKitFaviconDatabase.
2425         https://bugs.webkit.org/show_bug.cgi?id=183813
2426
2427         Unreviewed test gardening.
2428
2429         The relevant APIs were mostly removed in r223953, making this test
2430         time out consistently.
2431
2432         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitFaviconDatabase.cpp:
2433
2434 2018-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2435
2436         [GTK][WPE] JSC bindings not introspectable
2437         https://bugs.webkit.org/show_bug.cgi?id=136989
2438
2439         Reviewed by Michael Catanzaro.
2440
2441         Use the new API instead of the deprecated one.
2442
2443         * MiniBrowser/gtk/main.c:
2444         (aboutDataScriptMessageReceivedCallback):
2445         * TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
2446         (WebKitFrameTest::testJavaScriptContext):
2447         * TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
2448         (testWebViewRunJavaScript):
2449         * TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
2450         (consoleMessageSentCallback):
2451         (echoCallback):
2452         (windowObjectCleared):
2453         (methodCallCallback):
2454         * TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
2455         (runTest):
2456         (webProcessTestRunnerFinalize):
2457         (windowObjectClearedCallback):
2458         * TestWebKitAPI/glib/PlatformGTK.cmake:
2459         * TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
2460         (WebViewTest::javascriptResultToCString):
2461         (WebViewTest::javascriptResultToNumber):
2462         (WebViewTest::javascriptResultToBoolean):
2463         (WebViewTest::javascriptResultIsNull):
2464         (WebViewTest::javascriptResultIsUndefined):
2465
2466 2018-03-21  Carlos Garcia Campos  <cgarcia@igalia.com>
2467
2468         [GTK][WPE] Initial implementation of JavaScriptCore glib bindings
2469         https://bugs.webkit.org/show_bug.cgi?id=164061
2470
2471         Reviewed by Michael Catanzaro.
2472
2473         Add unit tests for the new API and generate the API documentation with generate-gtkdoc.
2474
2475         * Scripts/webkitpy/style/checker.py: Ignore some style errors in public GLib API headers.
2476         * TestWebKitAPI/PlatformGTK.cmake:
2477         * TestWebKitAPI/PlatformWPE.cmake:
2478         * TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: Added.
2479         (LeakChecker::~LeakChecker):
2480         (LeakChecker::watch):
2481         (ExceptionHandler::ExceptionHandler):
2482         (ExceptionHandler::~ExceptionHandler):
2483         (ExceptionHandler::push):
2484         (ExceptionHandler::pop):
2485         (jscContextGarbageCollect):
2486         (testJSCBasic):
2487         (testJSCTypes):
2488         (foo):
2489         (callback):
2490         (doubleAndSetInResult):
2491         (sumFunction):
2492         (testJSCFunction):
2493         (testJSCObject):
2494         (fooCreate):
2495         (fooCreateWithFoo):
2496         (fooFree):
2497         (setFoo):
2498         (getFoo):
2499         (setSibling):
2500         (getSibling):
2501         (multiplyFoo):
2502         (getMultiplyFoo):
2503         (getMultiplyFooAsync):
2504         (bazCreate):
2505         (testJSCClass):
2506         (barCreate):
2507         (barFree):
2508         (setBar):
2509         (getBar):
2510         (testJSCPrototypes):
2511         (createError):
2512         (testJSCExceptions):
2513         (testJSCPromises):
2514         (fooFreeAndLog):
2515         (testJSCGarbageCollector):
2516         (testsJSCVirtualMachine):
2517         (testsJSCAutocleanups):
2518         (main):
2519         * gtk/generate-gtkdoc:
2520         (get_generator_for_config):
2521
2522 2018-03-20  Tim Horton  <timothy_horton@apple.com>
2523
2524         Enable the minimal simulator feature flag when appropriate
2525         https://bugs.webkit.org/show_bug.cgi?id=183807
2526
2527         Reviewed by Dan Bernstein.
2528
2529         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2530
2531 2018-03-20  Zalan Bujtas  <zalan@apple.com>
2532
2533         [LayoutReloaded] Disconnect Display.Box from Layout.Box
2534         https://bugs.webkit.org/show_bug.cgi?id=183805
2535
2536         Reviewed by Antti Koivisto.
2537
2538         Display.Box is only accessed through the FormattingState.
2539
2540         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
2541         (BlockFormattingContext):
2542         (BlockFormattingContext.prototype.layout):
2543         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
2544         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
2545         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
2546         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
2547         * LayoutReloaded/FormattingContext/FormattingContext.js:
2548         (FormattingContext):
2549         (FormattingContext.prototype.formattingRoot):
2550         (FormattingContext.prototype.formattingState):
2551         (FormattingContext.prototype.layoutState):
2552         (FormattingContext.prototype._toAbsolutePosition):
2553         (FormattingContext.prototype._toRootAbsolutePosition):
2554         (FormattingContext.prototype._addToLayoutQueue):
2555         (FormattingContext.prototype.displayBox):
2556         (FormattingContext.prototype._outOfFlowDescendants):
2557         (FormattingContext.prototype.rootContainer): Deleted.
2558         (FormattingContext.prototype.layoutContext): Deleted.
2559         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
2560         (InlineFormattingContext):
2561         (InlineFormattingContext.prototype.layout):
2562         (InlineFormattingContext.prototype._initializeLine):
2563         * LayoutReloaded/FormattingState/BlockFormattingState.js:
2564         (BlockFormattingState):
2565         * LayoutReloaded/FormattingState/FormattingState.js:
2566         (FormattingState):
2567         (FormattingState.prototype.formattingRoot):
2568         (FormattingState.prototype.layoutState):
2569         (FormattingState.prototype.createDisplayBox):
2570         (FormattingState.prototype.displayBoxMap):
2571         (FormattingState.prototype.displayBox):
2572         (FormattingState.prototype.layoutContext): Deleted.
2573         * LayoutReloaded/FormattingState/InlineFormattingState.js:
2574         (InlineFormattingState):
2575         * LayoutReloaded/Layout.js:
2576         (layout):
2577         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
2578         * LayoutReloaded/LayoutState.js: Renamed from Tools/LayoutReloaded/LayoutContext.js.
2579         (LayoutState):
2580         (LayoutState.prototype.layout):
2581         (LayoutState.prototype._createFormattingState):
2582         (LayoutState.prototype.formattingStates):
2583         (LayoutState.prototype.initialDisplayBox):
2584         * LayoutReloaded/LayoutTree/Box.js:
2585         (Layout.Box.prototype.isOutOfFlowPositioned):
2586         (Layout.Box.prototype.containingBlock):
2587         (Layout.Box.prototype.setDisplayBox): Deleted.
2588         (Layout.Box.prototype.displayBox): Deleted.
2589         * LayoutReloaded/Utils.js:
2590         (Utils.layoutTreeDump):
2591         (Utils._findDisplayBox):
2592         (Utils._dumpBox):
2593         (Utils._dumpTree):
2594         * LayoutReloaded/misc/headers/BlockFormattingContext.h:
2595         * LayoutReloaded/misc/headers/FormattingContext.h:
2596         * LayoutReloaded/misc/headers/LayoutContext.h:
2597         * LayoutReloaded/test/index.html:
2598
2599 2018-03-19  Ryosuke Niwa  <rniwa@webkit.org>
2600
2601         Expose content attributes on _WKLinkIconParameters
2602         https://bugs.webkit.org/show_bug.cgi?id=183768
2603
2604         Reviewed by Alex Christensen.
2605
2606         Expanded the basic test case for _WKLinkIconParameters's properties including newly added "attributes".
2607
2608         * TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm:
2609         (IconLoading.DefaultFavicon):
2610
2611 2018-03-20  Wenson Hsieh  <wenson_hsieh@apple.com>
2612
2613         Add AssistedNodeInformation plumbing for form control placeholder text and label text
2614         https://bugs.webkit.org/show_bug.cgi?id=183802
2615         <rdar://problem/38686273>
2616
2617         Reviewed by Tim Horton.
2618
2619         Adds a new API test to exercise new placeholder and label SPI on _WKFocusedFormElement.
2620
2621         * TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm:
2622         (-[InputDelegate _webView:focusShouldStartInputSession:]):
2623         (-[InputDelegate shouldStartInputSessionHandler]):
2624         (-[InputDelegate setShouldStartInputSessionHandler:]):
2625         (TEST):
2626         (-[FormSubmissionDelegate webView:startURLSchemeTask:]): Deleted.
2627         (-[FormSubmissionDelegate webView:stopURLSchemeTask:]): Deleted.
2628         (-[FormSubmissionDelegate _webView:willSubmitFormValues:userObject:submissionHandler:]): Deleted.
2629
2630 2018-03-20  Basuke Suzuki  <Basuke.Suzuki@sony.com>
2631
2632         [WinCairo] Fix to run-webkit-httpd from native Windows.
2633         https://bugs.webkit.org/show_bug.cgi?id=183605
2634
2635         Reviewed by Daniel Bates.
2636
2637         This fix is to run Apache HTTP server from native Windows. The environment is different
2638         from cygwin, which is used for AppleWin, in following points:
2639         - A temporary file behaves differently. It cannot reopen by anybody when indicated as 
2640           delete on close. To solve this situation, filesystem.mkdtemp() is used instead.
2641         - It's not unix so that `tail` command is not available. Replaced with python equivalent
2642           function.
2643
2644         * Scripts/webkitpy/common/system/filesystem.py:
2645         (FileSystem.mkdtemp.TemporaryDirectory.__init__):
2646         (FileSystem.mkdtemp.TemporaryDirectory.__exit__): The existing contents would be deleted.
2647         (FileSystem.mkdtemp):
2648         * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py:
2649         (parse_args):
2650         (run_server):
2651         (run_server_with_log_file):
2652         (follow_file):
2653
2654 2018-03-20  Brady Eidson  <beidson@apple.com>
2655
2656         First piece of process swapping on navigation.
2657         https://bugs.webkit.org/show_bug.cgi?id=183665
2658
2659         Reviewed by Andy Estes.
2660
2661         Expose the "swaps processes on navigation" setting in MiniBrowser UI for testing:
2662
2663         * MiniBrowser/mac/AppDelegate.m:
2664         (defaultConfiguration):
2665         * MiniBrowser/mac/SettingsController.h:
2666         * MiniBrowser/mac/SettingsController.m:
2667         (-[SettingsController _populateMenu]):
2668         (-[SettingsController validateMenuItem:]):
2669         (-[SettingsController processSwapOnNavigationEnabled]):
2670         (-[SettingsController toggleProcessSwapOnNavigation:]):
2671
2672         Makes sure the current behavior is tested:
2673         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2674         * TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: Added.
2675         (-[PSONNavigationDelegate webView:didFinishNavigation:]):
2676         (-[PSONScheme webView:startURLSchemeTask:]):
2677         (-[PSONScheme webView:stopURLSchemeTask:]):
2678         (TEST):
2679
2680 2018-03-20  Chris Dumez  <cdumez@apple.com>
2681
2682         QuickLook.NavigationDelegate API test is failing on iOS with async policy delegates
2683         https://bugs.webkit.org/show_bug.cgi?id=183791
2684
2685         Reviewed by Alex Christensen.
2686
2687         Add API test coverage.
2688
2689         * TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm:
2690         (-[QuickLookAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
2691         (-[QuickLookAsyncNavigationDelegate _webView:didStartLoadForQuickLookDocumentInMainFrameWithFileName:uti:]):
2692         (-[QuickLookAsyncNavigationDelegate _webView:didFinishLoadForQuickLookDocumentInMainFrame:]):
2693         (-[QuickLookAsyncNavigationDelegate webView:didFinishNavigation:]):
2694         (TEST):
2695
2696 2018-03-20  Tim Horton  <timothy_horton@apple.com>
2697
2698         Add and adopt WK_PLATFORM_NAME and adjust default feature defines
2699         https://bugs.webkit.org/show_bug.cgi?id=183758
2700         <rdar://problem/38017644>
2701
2702         Reviewed by Dan Bernstein.
2703
2704         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2705
2706 2018-03-20  Chris Dumez  <cdumez@apple.com>
2707
2708         Unreviewed, rolling out r229726 and r229763.
2709
2710         Caused some API test failures on iOS
2711
2712         Reverted changesets:
2713
2714         "Make policy decisions asynchronous"
2715         https://bugs.webkit.org/show_bug.cgi?id=180568
2716         https://trac.webkit.org/changeset/229726
2717
2718         "Rebaseline three webarchive tests for WK2 after r229726."
2719         https://bugs.webkit.org/show_bug.cgi?id=180568
2720         https://trac.webkit.org/changeset/229763
2721
2722 2018-03-20  Zalan Bujtas  <zalan@apple.com>
2723
2724         [LayoutReloaded] Move Display.Box handling from FormattingContext to FormattingState
2725         https://bugs.webkit.org/show_bug.cgi?id=183779
2726
2727         Reviewed by Antti Koivisto.
2728
2729         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
2730         (BlockFormattingContext.prototype._computeStaticPosition):
2731         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
2732         (BlockFormattingContext.prototype._computeFloatingWidth):
2733         (BlockFormattingContext.prototype._computeInFlowWidth):
2734         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
2735         (BlockFormattingContext.prototype._computeFloatingHeight):
2736         (BlockFormattingContext.prototype._computeInFlowHeight):
2737         (BlockFormattingContext.prototype._horizontalConstraint):
2738         (BlockFormattingContext.prototype._contentHeight):
2739         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
2740         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
2741         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
2742         * LayoutReloaded/FormattingContext/FloatingContext.js:
2743         (FloatingContext.prototype.computePosition):
2744         (FloatingContext.prototype._positionForClear):
2745         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
2746         (FloatingContext.prototype._availableSpace):
2747         (FloatingContext.prototype._adjustedFloatingPosition):
2748         * LayoutReloaded/FormattingContext/FormattingContext.js:
2749         (FormattingContext):
2750         (FormattingContext.prototype.absoluteMarginBox):
2751         (FormattingContext.prototype.absoluteBorderBox):
2752         (FormattingContext.prototype.absolutePaddingBox):
2753         (FormattingContext.prototype.absoluteContentBox):
2754         (FormattingContext.prototype._toAbsolutePosition):
2755         (FormattingContext.prototype._toRootAbsolutePosition):
2756         (FormattingContext.prototype._addToLayoutQueue):
2757         (FormattingContext.prototype.displayBox):
2758         (FormattingContext.prototype._createDisplayBox): Deleted.
2759         (FormattingContext.prototype.toDisplayBox): Deleted.
2760         (FormattingContext.prototype.toLayoutBox): Deleted.
2761         * LayoutReloaded/FormattingState/FormattingState.js:
2762         (FormattingState):
2763         (FormattingState.prototype.createDisplayBox):
2764         (FormattingState.prototype.displayBox):
2765
2766 2018-03-20  Zalan Bujtas  <zalan@apple.com>
2767
2768         [LayoutReloaded] Introduce FormattingState (Block/Inline/etc)
2769         https://bugs.webkit.org/show_bug.cgi?id=183777
2770
2771         Reviewed by Antti Koivisto.
2772
2773         This is in preparation for moving out states from the formatting contexts.
2774
2775         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
2776         (BlockFormattingContext):
2777         * LayoutReloaded/FormattingContext/FormattingContext.js:
2778         (FormattingContext):
2779         (FormattingContext.prototype.layoutState):
2780         (FormattingContext.prototype.layoutContext):
2781         (FormattingContext.prototype.layout):
2782         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
2783         (InlineFormattingContext):
2784         * LayoutReloaded/FormattingState/BlockFormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
2785         (BlockFormattingState):
2786         * LayoutReloaded/FormattingState/FormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
2787         (FormattingState):
2788         (FormattingState.prototype.formattingContext):
2789         (FormattingState.prototype.layoutContext):
2790         (FormattingState.prototype._setFormattingContext):
2791         * LayoutReloaded/FormattingState/InlineFormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
2792         (InlineFormattingState):
2793         * LayoutReloaded/LayoutContext.js:
2794         (LayoutContext):
2795         (LayoutContext.prototype.layout):
2796         (LayoutContext.prototype._createFormattingState):
2797         (LayoutContext.prototype._createFormattingContext): Deleted.
2798         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
2799         * LayoutReloaded/test/index.html:
2800
2801 2018-03-19  Zalan Bujtas  <zalan@apple.com>
2802
2803         [LayoutReloaded] Layout.Box should not create the formatting context.
2804         https://bugs.webkit.org/show_bug.cgi?id=183766
2805
2806         Reviewed by Antti Koivisto.
2807
2808         Since the formattingContext's lifetime is tied to the layout, the LayoutContext
2809         should construct it instead.
2810
2811         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
2812         (BlockFormattingContext):
2813         (BlockFormattingContext.prototype.layout):
2814         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
2815         (BlockFormattingContext.prototype._contentHeight):
2816         * LayoutReloaded/FormattingContext/FormattingContext.js:
2817         (FormattingContext):
2818         (FormattingContext.prototype.layoutContext):
2819         (FormattingContext.prototype.toDisplayBox):
2820         (FormattingContext.prototype._outOfFlowDescendants):
2821         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
2822         (InlineFormattingContext):
2823         (InlineFormattingContext.prototype.layout):
2824         * LayoutReloaded/Layout.js:
2825         (layout):
2826         * LayoutReloaded/LayoutContext.js:
2827         (LayoutContext.prototype.layout):
2828         (LayoutContext.prototype._createFormattingContext):
2829         (LayoutContext):
2830         (LayoutContext.prototype.layoutFormattingContext): Deleted.
2831         * LayoutReloaded/LayoutTree/Box.js:
2832         (Layout.Box):
2833         (Layout.Box.prototype.establishedFormattingContext): Deleted.
2834         * LayoutReloaded/misc/headers/Box.h:
2835
2836 2018-03-19  Chris Dumez  <cdumez@apple.com>
2837
2838         Have one service worker process per security origin
2839         https://bugs.webkit.org/show_bug.cgi?id=183600
2840         <rdar://problem/35280128>
2841
2842         Reviewed by Brady Eidson.
2843
2844         Add API test coverage.
2845
2846         * TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2847
2848 2018-03-19  Zalan Bujtas  <zalan@apple.com>
2849
2850         [LayoutReloaded] Remove border/padding/contentBox() functions from Layout.Box
2851         https://bugs.webkit.org/show_bug.cgi?id=183761
2852
2853         Reviewed by Antti Koivisto.
2854
2855         Display.Box has them.
2856
2857         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
2858         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
2859         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
2860         (BlockFormattingContext.prototype._horizontalConstraint):
2861         (BlockFormattingContext.prototype._contentHeight):
2862         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
2863         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
2864         * LayoutReloaded/FormattingContext/FloatingContext.js:
2865         (FloatingContext.prototype._availableSpace):
2866         * LayoutReloaded/FormattingContext/FormattingContext.js:
2867         (FormattingContext.prototype.absoluteBorderBox):
2868         (FormattingContext.prototype.absolutePaddingBox):
2869         (FormattingContext.prototype.absoluteContentBox):
2870         * LayoutReloaded/LayoutTree/Box.js:
2871         (Layout.Box.prototype.isDescendantOf):
2872         (Layout.Box):
2873         (Layout.Box.prototype.borderBox): Deleted.
2874         (Layout.Box.prototype.paddingBox): Deleted.
2875         (Layout.Box.prototype.contentBox): Deleted.
2876
2877 2018-03-19  Jiewen Tan  <jiewen_tan@apple.com>
2878
2879         Unreviewed, another quick fix for r229699
2880
2881         Restricts ENABLE_WEB_AUTHN to only macOS and iOS.
2882
2883         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2884         * TestWebKitAPI/Tests/ios/LocalAuthenticator.mm:
2885
2886 2018-03-19  Zalan Bujtas  <zalan@apple.com>
2887
2888         [LayoutReloaded] Move statically positioned absolute box positioning to _computeOutOfFlowPosition
2889         https://bugs.webkit.org/show_bug.cgi?id=183750
2890
2891         Reviewed by Antti Koivisto.
2892
2893         * LayoutReloaded/DisplayTree/Box.js:
2894         (Display.Box.prototype.setTop):
2895         (Display.Box.prototype.paddingBox):
2896         (Display.Box.prototype.contentBox):
2897         (Display.Box):
2898         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
2899         (BlockFormattingContext.prototype._computeStaticPosition):
2900         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
2901         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
2902         * LayoutReloaded/FormattingContext/FormattingContext.js:
2903         (FormattingContext.prototype.absoluteMarginBox):
2904         (FormattingContext.prototype.absoluteBorderBox):
2905         (FormattingContext.prototype.absolutePaddingBox):
2906         (FormattingContext.prototype.absoluteContentBox):
2907         (FormattingContext.prototype._toAbsolutePosition):
2908         (FormattingContext.prototype._toRootAbsolutePosition):
2909         (FormattingContext.prototype.toDisplayBox):
2910         * LayoutReloaded/LayoutTree/InitialBlockContainer.js:
2911         (Layout.InitialBlockContainer.prototype.establishesBlockFormattingContext):
2912         (Layout.InitialBlockContainer):
2913         (Layout.InitialBlockContainer.prototype.paddingBox): Deleted.
2914         (Layout.InitialBlockContainer.prototype.contentBox): Deleted.
2915         * LayoutReloaded/Utils.js:
2916         (Utils.isStaticallyPositioned):
2917
2918 2018-03-19  Chris Dumez  <cdumez@apple.com>
2919
2920         WebKit.WebsitePoliciesAutoplayQuirks API test times out with async policy delegates
2921         https://bugs.webkit.org/show_bug.cgi?id=183702
2922         <rdar://problem/38566060>
2923
2924         Reviewed by Alex Christensen.
2925
2926         Add API test coverage.
2927
2928         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
2929         (-[AsyncAutoplayPoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
2930         (-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
2931         (-[AsyncAutoplayPoliciesDelegate _webView:handleAutoplayEvent:withFlags:]):
2932         (TEST):
2933
2934 2018-03-19  Daniel Bates  <dabates@apple.com>
2935
2936         test-webkitpy no longer runs WebKit2 tests
2937         https://bugs.webkit.org/show_bug.cgi?id=183724
2938
2939         Reviewed by Alexey Proskuryakov.
2940
2941         The WebKit2 tests have seen been moved from Source/WebKit2/Scripts/webkit2 to Source/WebKit/Scripts/webkit.
2942
2943         * Scripts/webkitpy/test/main.py:
2944         (main):
2945
2946 2018-03-19  Daniel Bates  <dabates@apple.com>
2947
2948         Make run-webkit-app work for non-GUI apps
2949         https://bugs.webkit.org/show_bug.cgi?id=183701
2950
2951         Reviewed by Lucas Forschler.
2952
2953         Launch the app directly if it is an executable file. Otherwise, assume it is an app bundle
2954         and launch it using open(1) as we currently do.
2955
2956         Note that open(1) is meant for launching GUI apps. Standard output and standard error are
2957         not sent to the tty when using open(1) to launch a non-GUI app.
2958
2959         * Scripts/run-webkit-app: We make the assumption that 
2960         * Scripts/webkitdirs.pm:
2961             - Define and export constant DO_NOT_USE_OPEN_COMMAND.
2962
2963 2018-03-19  Daniel Bates  <dabates@apple.com>
2964
2965         run-webkit-app -g does not work
2966         https://bugs.webkit.org/show_bug.cgi?id=183699
2967
2968         Reviewed by Lucas Forschler.
2969
2970         Check for the optional command line argument -g/--guard-malloc before taking the
2971         first argument passed to be the path to the app to run.
2972
2973         * Scripts/run-webkit-app:
2974
2975 2018-03-18  Commit Queue  <commit-queue@webkit.org>
2976
2977         Unreviewed, rolling out r229689.
2978         https://bugs.webkit.org/show_bug.cgi?id=183735
2979
2980         Causes fast/loader/inner-iframe-loads-data-url-into-parent-on-
2981         unload-crash.html to fail with async delegates (Requested by
2982         cdumez_ on #webkit).
2983
2984         Reverted changeset:
2985
2986         "WebKit.WebsitePoliciesAutoplayQuirks API test times out with
2987         async policy delegates"
2988         https://bugs.webkit.org/show_bug.cgi?id=183702
2989         https://trac.webkit.org/changeset/229689
2990
2991 2018-03-18  Zalan Bujtas  <zalan@apple.com>
2992
2993         [LayoutReloaded] Remove left/right width/height getters from Layout.Box
2994         https://bugs.webkit.org/show_bug.cgi?id=183734
2995
2996         Reviewed by Antti Koivisto.
2997
2998         ...and use Display.Box instead.
2999
3000         * LayoutReloaded/DisplayTree/Box.js:
3001         (Display.Box.prototype.bottomRight):
3002         (Display.Box.prototype.size):
3003         (Display.Box.prototype.height):
3004         (Display.Box.prototype.width):
3005         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3006         (BlockFormattingContext.prototype._computeStaticPosition):
3007         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
3008         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
3009         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
3010         * LayoutReloaded/FormattingContext/FloatingContext.js:
3011         (FloatingContext.prototype._positionForClear):
3012         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
3013         (FloatingContext.prototype._adjustedFloatingPosition):
3014         * LayoutReloaded/FormattingContext/FormattingContext.js:
3015         (FormattingContext.prototype.absoluteMarginBox):
3016         (FormattingContext.prototype.absoluteBorderBox):
3017         (FormattingContext.prototype.absolutePaddingBox):
3018         (FormattingContext.prototype.absoluteContentBox):
3019         (FormattingContext.prototype._toAbsolutePosition):
3020         (FormattingContext.prototype._toRootAbsolutePosition):
3021         * LayoutReloaded/LayoutTree/Box.js:
3022         (Layout.Box.prototype.rect): Deleted.
3023         (Layout.Box.prototype.topLeft): Deleted.
3024         (Layout.Box.prototype.bottomRight): Deleted.
3025         * LayoutReloaded/Utils.js:
3026         (Utils._dumpBox):
3027         (Utils.mapToContainer): Deleted.
3028
3029 2018-03-18  Zalan Bujtas  <zalan@apple.com>
3030
3031         [LayoutReloaded] Remove left/right width/height setters from Layout.Box
3032         https://bugs.webkit.org/show_bug.cgi?id=183731
3033
3034         Reviewed by Antti Koivisto.
3035
3036         ...and use Display.Box instead.
3037
3038         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3039         (BlockFormattingContext.prototype._computeStaticPosition):
3040         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
3041         (BlockFormattingContext.prototype._computeFloatingWidth):
3042         (BlockFormattingContext.prototype._computeInFlowWidth):
3043         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
3044         (BlockFormattingContext.prototype._computeFloatingHeight):
3045         (BlockFormattingContext.prototype._computeInFlowHeight):
3046         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
3047         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
3048         * LayoutReloaded/FormattingContext/FloatingContext.js:
3049         (FloatingContext.prototype.computePosition):
3050         * LayoutReloaded/FormattingContext/FormattingContext.js:
3051         (FormattingContext.prototype._toDisplayBox):
3052         (FormattingContext.prototype._toLayoutBox):
3053         * LayoutReloaded/Layout.js:
3054         (layout):
3055         * LayoutReloaded/LayoutTree/Box.js:
3056         (Layout.Box.prototype.setTopLeft): Deleted.
3057         (Layout.Box.prototype.setSize): Deleted.
3058         (Layout.Box.prototype.setWidth): Deleted.
3059         (Layout.Box.prototype.setHeight): Deleted.
3060
3061 2018-03-18  Zalan Bujtas  <zalan@apple.com>
3062
3063         [LayoutReloaded] Collect out-of-flow positioned boxes for a given formatting context.
3064         https://bugs.webkit.org/show_bug.cgi?id=183730
3065
3066         Reviewed by Antti Koivisto.
3067
3068         Collect and layout out-of-flow positioned boxes as the final step of the formatting context layout.
3069
3070         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3071         (BlockFormattingContext.prototype.layout):
3072         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
3073         (BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
3074         (BlockFormattingContext.prototype._placePositionedDescendants): Deleted.
3075         (BlockFormattingContext.prototype._placeOutOfFlowDescendants): Deleted.
3076         * LayoutReloaded/FormattingContext/FormattingContext.js:
3077         (FormattingContext.prototype._toAbsolutePosition):
3078         (FormattingContext.prototype._outOfFlowDescendants):
3079         (FormattingContext):
3080         * LayoutReloaded/LayoutTree/Box.js:
3081         (Layout.Box.prototype.nextInFlowOrFloatSibling):
3082         (Layout.Box.prototype.isDescendantOf):
3083         * LayoutReloaded/LayoutTree/Container.js:
3084         (Layout.Container.prototype.firstInFlowOrFloatChild):
3085         (Layout.Container.prototype.hasInFlowOrFloatChild):
3086         (Layout.Container.prototype.outOfFlowDescendants):
3087         (Layout.Container):
3088         * LayoutReloaded/Utils.js:
3089         (Utils.isDescendantOf): Deleted.
3090         (Utils.collectOutOfFlowDescendants): Deleted.
3091
3092 2018-03-17  Jiewen Tan  <jiewen_tan@apple.com>
3093
3094         [WebAuthN] Implement authenticatorMakeCredential
3095         https://bugs.webkit.org/show_bug.cgi?id=183527
3096         <rdar://problem/35275886>
3097
3098         Reviewed by Brent Fulgham.
3099
3100         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3101         * TestWebKitAPI/Tests/ios/LocalAuthenticator.mm: Added.
3102         (TestWebKitAPI::getTestKey):
3103         (TestWebKitAPI::cleanUpKeychain):
3104         (TestWebKitAPI::LACantEvaluatePolicySwizzler::LACantEvaluatePolicySwizzler):
3105         (TestWebKitAPI::LACantEvaluatePolicySwizzler::cantEvaluatePolicy):
3106         (TestWebKitAPI::LACanEvaluatePolicySwizzler::LACanEvaluatePolicySwizzler):
3107         (TestWebKitAPI::LACanEvaluatePolicySwizzler::canEvaluatePolicy):
3108         (TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::LAEvaluatePolicyFailedSwizzler):
3109         (TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::evaluatePolicyFailed):
3110         (TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::LAEvaluatePolicyPassedSwizzler):
3111         (TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::evaluatePolicyPassed):
3112         (TestWebKitAPI::TestLocalAuthenticator::setFailureFlag):
3113         (TestWebKitAPI::TEST):
3114
3115 2018-03-17  Zalan Bujtas  <zalan@apple.com>
3116
3117         [LayoutReloaded] BlockFormattingContext::placePositionedDescendants takes care of both in- and out-of-flow placement
3118         https://bugs.webkit.org/show_bug.cgi?id=183727
3119
3120         Reviewed by Antti Koivisto.
3121
3122         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3123         (BlockFormattingContext.prototype.layout):
3124         (BlockFormattingContext.prototype._placePositionedDescendants):
3125         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
3126         (BlockFormattingContext.prototype._placeOutOfFlowDescendants):
3127         * LayoutReloaded/test/absolute-position-when-containing-block-is-not-in-the-formatting-context.html: Added.
3128         * LayoutReloaded/test/absolute-position-when-containing-block-is-not-in-the-formatting-context2.html: Added.
3129         * LayoutReloaded/test/index.html:
3130         * LayoutReloaded/test/relative-position-when-containing-block-is-not-in-the-formatting-context.html: Added.
3131
3132 2018-03-17  Zalan Bujtas  <zalan@apple.com>
3133
3134         [LayoutReloaded] Ensure that positioning happens within the formatting context
3135         https://bugs.webkit.org/show_bug.cgi?id=183722
3136
3137         Reviewed by Antti Koivisto.
3138
3139         All sizing and positioning need to happen in the formatting context that the box lives in
3140         including the final position of in- and out-of-flow descendants.
3141
3142         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3143         (BlockFormattingContext.prototype.layout):
3144         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
3145         * LayoutReloaded/LayoutTree/Box.js:
3146         (Layout.Box.prototype.establishesBlockFormattingContext):
3147         (Layout.Box.prototype.isPositioned):
3148         (Layout.Box.prototype.isRelativelyPositioned):
3149         (Layout.Box.prototype.isAbsolutelyPositioned):
3150         (Layout.Box.prototype.isOutOfFlowPositioned):
3151         (Layout.Box.prototype.containingBlock):
3152         (Layout.Box.prototype.isRelativePositioned): Deleted.
3153         (Layout.Box.prototype.isAbsolutePositioned): Deleted.
3154         * LayoutReloaded/Utils.js:
3155         (Utils.isRelativelyPositioned):
3156         (Utils.isAbsolutelyPositioned):
3157         (Utils.isRelativePositioned): Deleted.
3158         (Utils.isAbsolutePositioned): Deleted.
3159         * LayoutReloaded/misc/headers/Box.h:
3160
3161 2018-03-16  Wenson Hsieh  <wenson_hsieh@apple.com>
3162
3163         Unreviewed, rolling out r229688.
3164
3165         There's a solution that doesn't require this SPI.
3166
3167         Reverted changeset:
3168
3169         "Add SPI to expose width and height anchors for WKWebView's
3170         content view"
3171         https://bugs.webkit.org/show_bug.cgi?id=183711
3172         https://trac.webkit.org/changeset/229688
3173
3174 2018-03-16  Zalan Bujtas  <zalan@apple.com>
3175
3176         [LayoutReloaded] Move move functions to the base class from BlockFormattingContext
3177         https://bugs.webkit.org/show_bug.cgi?id=183719
3178
3179         Reviewed by Antti Koivisto.
3180
3181         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3182         (BlockFormattingContext):
3183         (BlockFormattingContext.prototype.layout):
3184         (BlockFormattingContext.prototype._shrinkToFitWidth):
3185         (BlockFormattingContext.prototype._toAbsolutePosition): Deleted.
3186         (BlockFormattingContext.prototype._needsLayout): Deleted.
3187         (BlockFormattingContext.prototype._addToLayoutQueue): Deleted.
3188         (BlockFormattingContext.prototype._nextInLayoutQueue): Deleted.
3189         (BlockFormattingContext.prototype._removeFromLayoutQueue): Deleted.
3190         (BlockFormattingContext.prototype._createDisplayBox): Deleted.
3191         (BlockFormattingContext.prototype._toDisplayBox): Deleted.
3192         (BlockFormattingContext.prototype._toLayoutBox): Deleted.
3193         * LayoutReloaded/FormattingContext/FormattingContext.js:
3194         (FormattingContext):
3195         (FormattingContext.prototype._toAbsolutePosition):
3196         (FormattingContext.prototype._descendantNeedsLayout):
3197         (FormattingContext.prototype._addToLayoutQueue):
3198         (FormattingContext.prototype._nextInLayoutQueue):
3199         (FormattingContext.prototype._removeFromLayoutQueue):
3200         (FormattingContext.prototype._createDisplayBox):
3201         (FormattingContext.prototype._toDisplayBox):
3202         (FormattingContext.prototype._toLayoutBox):
3203         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
3204         (InlineFormattingContext.prototype.layout):
3205
3206 2018-03-16  Chris Dumez  <cdumez@apple.com>
3207
3208         WebKit.WebsitePoliciesAutoplayQuirks API test times out with async policy delegates
3209         https://bugs.webkit.org/show_bug.cgi?id=183702
3210
3211         Reviewed by Alex Christensen.
3212
3213         Add API test coverage.
3214
3215         * TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
3216         (-[AsyncAutoplayPoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
3217         (-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
3218         (-[AsyncAutoplayPoliciesDelegate _webView:handleAutoplayEvent:withFlags:]):
3219         (TEST):
3220
3221 2018-03-16  Wenson Hsieh  <wenson_hsieh@apple.com>
3222
3223         Add SPI to expose width and height anchors for WKWebView's content view
3224         https://bugs.webkit.org/show_bug.cgi?id=183711
3225         <rdar://problem/38562899>
3226
3227         Reviewed by Tim Horton.
3228
3229         Adds an API test exercising the new SPI.
3230
3231         * TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm:
3232         (checkCGRect):
3233         (TEST):
3234
3235 2018-03-16  Chris Dumez  <cdumez@apple.com>
3236
3237         WebKit.RestoreSessionStateContainingScrollRestorationDefault API test is failing with async policy delegates
3238         https://bugs.webkit.org/show_bug.cgi?id=183679
3239
3240         Reviewed by Alex Christensen.
3241
3242         Add API test coverage.
3243
3244         * TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
3245         (TestWebKitAPI::decidePolicyForNavigationAction):
3246         (TestWebKitAPI::decidePolicyForResponse):
3247         (TestWebKitAPI::TEST):
3248
3249 2018-03-16  Zalan Bujtas  <zalan@apple.com>
3250
3251         [LayoutReloaded] Introduce Display.Box
3252         https://bugs.webkit.org/show_bug.cgi?id=183700
3253
3254         Reviewed by Antti Koivisto.
3255
3256         Display.Box objects will end up in the display(box) tree. Currently
3257         they are just hanging off of the Layout.Box objects.
3258
3259         * LayoutReloaded/DisplayTree/Box.js: Added.
3260         (Display.Box):
3261         (Display.Box.prototype.rect):
3262         (Display.Box.prototype.top):
3263         (Display.Box.prototype.left):
3264         (Display.Box.prototype.bottom):
3265         (Display.Box.prototype.right):
3266         (Display.Box.prototype.topLeft):
3267         (Display.Box.prototype.bottomRight):
3268         (Display.Box.prototype.setTopLeft):
3269         (Display.Box.prototype.setSize):
3270         (Display.Box.prototype.setWidth):
3271         (Display.Box.prototype.setHeight):
3272         (Display.Box.prototype.borderBox):
3273         (Display.Box.prototype.paddingBox):
3274         (Display.Box.prototype.contentBox):
3275         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3276         (BlockFormattingContext):
3277         (BlockFormattingContext.prototype.layout):
3278         (BlockFormattingContext.prototype._toAbsolutePosition):
3279         (BlockFormattingContext.prototype._needsLayout):
3280         (BlockFormattingContext.prototype._addToLayoutQueue):
3281         (BlockFormattingContext.prototype._nextInLayoutQueue):
3282         (BlockFormattingContext.prototype._removeFromLayoutQueue):
3283         (BlockFormattingContext.prototype._createDisplayBox):
3284         (BlockFormattingContext.prototype._toDisplayBox):
3285         (BlockFormattingContext.prototype._toLayoutBox):
3286         * LayoutReloaded/Layout.js:
3287         (layout):
3288         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
3289         * LayoutReloaded/LayoutTree/Box.js:
3290         (Layout.Box):
3291         (Layout.Box.prototype.setDisplayBox):
3292         (Layout.Box.prototype.displayBox):
3293         (Layout.Box.prototype.rect):
3294         (Layout.Box.prototype.setTopLeft):
3295         (Layout.Box.prototype.setSize):
3296         (Layout.Box.prototype.setWidth):
3297         (Layout.Box.prototype.setHeight):
3298         (Layout.Box.prototype.borderBox):
3299         (Layout.Box.prototype.paddingBox):
3300         (Layout.Box.prototype.contentBox):
3301         * LayoutReloaded/test/index.html:
3302
3303 2018-03-16  Chris Dumez  <cdumez@apple.com>
3304
3305         URLSchemeHandler.Basic API test fails with async policy delegates
3306         https://bugs.webkit.org/show_bug.cgi?id=183678
3307
3308         Reviewed by Alex Christensen.
3309
3310         Add API test coverage.
3311
3312         * TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
3313         (-[URLSchemeHandlerAsyncNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
3314         (-[URLSchemeHandlerAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
3315         (TEST):
3316
3317 2018-03-16  Zalan Bujtas  <zalan@apple.com>
3318
3319         [LayoutReloaded] Utils.computed* functions should just take node instead of box.
3320         https://bugs.webkit.org/show_bug.cgi?id=183697
3321
3322         Reviewed by Antti Koivisto.
3323
3324         This is in preparation for introducing the display tree.
3325
3326         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3327         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
3328         (BlockFormattingContext.prototype._computeFloatingWidth):
3329         (BlockFormattingContext.prototype._computeInFlowWidth):
3330         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
3331         (BlockFormattingContext.prototype._computeFloatingHeight):
3332         (BlockFormattingContext.prototype._computeInFlowHeight):
3333         (BlockFormattingContext.prototype._shrinkToFitWidth):
3334         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
3335         (BlockMarginCollapse._nonCollapsedMarginTop):
3336         (BlockMarginCollapse._nonCollapsedMarginBottom):
3337         (BlockMarginCollapse._collapsedMarginTopFromFirstChild):
3338         (BlockMarginCollapse._collapsedMarginBottomFromLastChild):
3339         * LayoutReloaded/FormattingContext/FormattingContext.js:
3340         (FormattingContext.prototype.marginTop):
3341         (FormattingContext.prototype.marginLeft):
3342         (FormattingContext.prototype.marginBottom):
3343         (FormattingContext.prototype.marginRight):
3344         * LayoutReloaded/LayoutTree/Box.js:
3345         (Layout.Box.prototype.paddingBox):
3346         (Layout.Box.prototype.contentBox):
3347         (Layout.Box):
3348         * LayoutReloaded/Utils.js:
3349         (Utils.computedMarginTop):
3350         (Utils.computedMarginLeft):
3351         (Utils.computedMarginBottom):
3352         (Utils.computedMarginRight):
3353         (Utils.computedBorderTopLeft):
3354         (Utils.computedBorderBottomRight):
3355         (Utils.computedPaddingTopLeft):
3356         (Utils.computedPaddingBottomRight):
3357         (Utils.computedBorderAndPaddingTop):
3358         (Utils.computedBorderAndPaddingLeft):
3359         (Utils.computedBorderAndPaddingBottom):
3360         (Utils.computedBorderAndPaddingRight):
3361         (Utils.computedHorizontalBorderAndPadding):
3362         (Utils.computedVerticalBorderAndPadding):
3363         (Utils.computedLineHeight):
3364         (Utils.hasClearLeft):
3365         (Utils.hasClearRight):
3366         (Utils.hasClearBoth):
3367
3368 2018-03-15  Zalan Bujtas  <zalan@apple.com>
3369
3370         [LayoutReloaded] Should never need to go beyond the root container when asking for the containing block.
3371         https://bugs.webkit.org/show_bug.cgi?id=183691
3372
3373         Reviewed by Antti Koivisto.
3374
3375         While laying out the boxes in a block formatting context, if we happen to need
3376         to get to the containing block of a box to compute geometry, it should always be a
3377         descendant of the root container (or the root container itself).
3378         Nothing outside of the formatting context should be able to impact the boxes inside.
3379
3380         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3381         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
3382         (BlockFormattingContext.prototype._toAbsolutePosition):
3383         (BlockFormattingContext):
3384         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
3385         (BlockMarginCollapse._isMarginTopCollapsedWithParent):
3386         (BlockMarginCollapse._isMarginBottomCollapsedWithParent):
3387         * LayoutReloaded/LayoutTree/Box.js:
3388         (Layout.Box.prototype.isRootBox):
3389         (Layout.Box.prototype.isRootElement): Deleted.
3390         * LayoutReloaded/Utils.js:
3391         (Utils.isDescendantOf):
3392         (Utils.mapStaticToAbsolute): Deleted.
3393         * LayoutReloaded/misc/headers/Box.h:
3394
3395 2018-03-15  Wenson Hsieh  <wenson_hsieh@apple.com>
3396
3397         [iOS WK2] Hit-testing fails when specifying a large top content inset
3398         https://bugs.webkit.org/show_bug.cgi?id=183648
3399         <rdar://problem/38421894>
3400
3401         Reviewed by Tim Horton.
3402
3403         Adds four new API tests to verify that adding top or bottom content insets to the WKWebView's scroll view does
3404         not cause the DOMWindow's innerHeight to shrink. Currently, doing so would cause the innerHeight to be reported
3405         as (viewHeight - inset.top) or (viewHeight - inset.bottom).
3406
3407         See WebKit ChangeLog for more details.
3408
3409         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3410         * TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm: Added.
3411         (TestWebKitAPI::TEST):
3412
3413 2018-03-15  Aakash Jain  <aakash_jain@apple.com>
3414
3415         Add unit-test for NetworkTransaction URLError handling
3416         https://bugs.webkit.org/show_bug.cgi?id=183664
3417
3418         Reviewed by Alexey Proskuryakov.
3419
3420         * Scripts/webkitpy/common/net/networktransaction_unittest.py:
3421         (NetworkTransactionTest._raise_URLError): Method to raise URLError.
3422         (NetworkTransactionTest.test_retry_on_HTTPError): Renamed from test_retry.
3423         (NetworkTransactionTest.test_retry_on_URLError): unit-test for testing URLError handling.
3424
3425 2018-03-15  Aakash Jain  <aakash_jain@apple.com>
3426
3427         EWS should print the URL in logs on URLError
3428         https://bugs.webkit.org/show_bug.cgi?id=183651
3429
3430         Reviewed by Alexey Proskuryakov.
3431
3432         * Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
3433         (Bugzilla.open_url): Pass the url.
3434         * Scripts/webkitpy/common/net/networktransaction.py:
3435         (NetworkTransaction.run): Accept optional url parameter and print it on URLError.
3436
3437 2018-03-15  Zalan Bujtas  <zalan@apple.com>
3438
3439         [LayoutReloaded] Introduce Layout namespace
3440         https://bugs.webkit.org/show_bug.cgi?id=183659
3441
3442         Reviewed by Antti Koivisto.
3443
3444         This is in preparation for introducing the display tree.
3445         Box -> Layout.Box
3446
3447         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3448         (BlockFormattingContext.prototype.layout):
3449         (BlockFormattingContext.prototype.computeWidth):
3450         (BlockFormattingContext.prototype.computeHeight):
3451         (BlockFormattingContext.prototype.marginTop):
3452         (BlockFormattingContext.prototype.marginBottom):
3453         (BlockFormattingContext.prototype._computeStaticPosition):
3454         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
3455         (BlockFormattingContext.prototype._placeOutOfFlowDescendants):
3456         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
3457         (BlockFormattingContext.prototype._computeFloatingWidth):
3458         (BlockFormattingContext.prototype._computeInFlowWidth):
3459         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
3460         (BlockFormattingContext.prototype._computeFloatingHeight):
3461         (BlockFormattingContext.prototype._computeInFlowHeight):
3462         (BlockFormattingContext.prototype._horizontalConstraint):
3463         (BlockFormattingContext.prototype._contentHeight):
3464         (BlockFormattingContext.prototype._adjustBottomWithFIXME):
3465         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
3466         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
3467         (BlockFormattingContext.prototype._shrinkToFitWidth):
3468         (BlockFormattingContext):
3469         (BlockFormattingContext.prototype._computeHorizontalConstraint): Deleted.
3470         (BlockFormattingContext.prototype._computeContentHeight): Deleted.
3471         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
3472         (BlockMarginCollapse.marginTop):
3473         (BlockMarginCollapse.marginBottom):
3474         (BlockMarginCollapse._isMarginTopCollapsedWithSibling):
3475         (BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
3476         (BlockMarginCollapse._isMarginTopCollapsedWithParent):
3477         (BlockMarginCollapse._isMarginBottomCollapsedWithParent):
3478         (BlockMarginCollapse._nonCollapsedMarginTop):
3479         (BlockMarginCollapse._nonCollapsedMarginBottom):
3480         (BlockMarginCollapse._collapsedMarginTopFromFirstChild):
3481         (BlockMarginCollapse._collapsedMarginBottomFromLastChild):
3482         (BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
3483         (BlockMarginCollapse):
3484         * LayoutReloaded/FormattingContext/FloatingContext.js:
3485         (FloatingContext.prototype.computePosition):
3486         (FloatingContext.prototype._positionForClear):
3487         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
3488         * LayoutReloaded/FormattingContext/FormattingContext.js:
3489         (FormattingContext.prototype.computeWidth):
3490         (FormattingContext.prototype.computeHeight):
3491         (FormattingContext.prototype.marginTop):
3492         (FormattingContext.prototype.marginLeft):
3493         (FormattingContext.prototype.marginBottom):
3494         (FormattingContext.prototype.marginRight):
3495         (FormattingContext.prototype.absoluteMarginBox):
3496         (FormattingContext.prototype.absoluteBorderBox):
3497         (FormattingContext.prototype.absolutePaddingBox):
3498         (FormattingContext.prototype.absoluteContentBox):
3499         (FormattingContext):
3500         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
3501         (InlineFormattingContext.prototype.layout):
3502         * LayoutReloaded/LayoutTree/BlockContainer.js:
3503         (BlockContainer): Deleted.
3504         (BlockContainer.prototype.establishesInlineFormattingContext): Deleted.
3505         * LayoutReloaded/LayoutTree/Box.js:
3506         (Box): Deleted.
3507         (Box.prototype.id): Deleted.
3508         (Box.prototype.setRendererName): Deleted.
3509         (Box.prototype.name): Deleted.
3510         (Box.prototype.node): Deleted.
3511         (Box.prototype.parent): Deleted.
3512         (Box.prototype.nextSibling): Deleted.
3513         (Box.prototype.nextInFlowSibling): Deleted.
3514         (Box.prototype.previousSibling): Deleted.
3515         (Box.prototype.previousInFlowSibling): Deleted.
3516         (Box.prototype.setParent): Deleted.
3517         (Box.prototype.setNextSibling): Deleted.
3518         (Box.prototype.setPreviousSibling): Deleted.
3519         (Box.prototype.rect): Deleted.
3520         (Box.prototype.topLeft): Deleted.
3521         (Box.prototype.bottomRight): Deleted.
3522         (Box.prototype.setTopLeft): Deleted.
3523         (Box.prototype.setSize): Deleted.
3524         (Box.prototype.setWidth): Deleted.
3525         (Box.prototype.setHeight): Deleted.
3526         (Box.prototype.isContainer): Deleted.
3527         (Box.prototype.isBlockLevelBox): Deleted.
3528         (Box.prototype.isBlockContainerBox): Deleted.
3529         (Box.prototype.isInlineLevelBox): Deleted.
3530         (Box.prototype.setIsAnonymous): Deleted.
3531         (Box.prototype.isAnonymous): Deleted.
3532         (Box.prototype.establishesFormattingContext): Deleted.
3533         (Box.prototype.establishedFormattingContext): Deleted.
3534         (Box.prototype.establishesBlockFormattingContext): Deleted.
3535         (Box.prototype.establishesInlineFormattingContext): Deleted.
3536         (Box.prototype.isPositioned): Deleted.
3537         (Box.prototype.isRelativePositioned): Deleted.
3538         (Box.prototype.isAbsolutePositioned): Deleted.
3539         (Box.prototype.isFixedPositioned): Deleted.
3540         (Box.prototype.isInFlow): Deleted.
3541         (Box.prototype.isOutOfFlowPositioned): Deleted.
3542         (Box.prototype.isInFlowPositioned): Deleted.
3543         (Box.prototype.isFloatingPositioned): Deleted.
3544         (Box.prototype.isFloatingOrOutOfFlowPositioned): Deleted.
3545         (Box.prototype.isRootElement): Deleted.
3546         (Box.prototype.containingBlock): Deleted.
3547         (Box.prototype.borderBox): Deleted.
3548         (Box.prototype.paddingBox): Deleted.
3549         (Box.prototype.contentBox): Deleted.
3550         * LayoutReloaded/LayoutTree/Container.js:
3551         (Container): Deleted.
3552         (Container.prototype.isContainer): Deleted.
3553         (Container.prototype.setFirstChild): Deleted.
3554         (Container.prototype.setLastChild): Deleted.
3555         (Container.prototype.firstChild): Deleted.
3556         (Container.prototype.firstInFlowChild): Deleted.
3557         (Container.prototype.lastChild): Deleted.
3558         (Container.prototype.lastInFlowChild): Deleted.
3559         (Container.prototype.hasChild): Deleted.
3560         (Container.prototype.hasInFlowChild): Deleted.
3561         * LayoutReloaded/LayoutTree/InitialBlockContainer.js:
3562         (InitialBlockContainer): Deleted.
3563         (InitialBlockContainer.prototype.establishesBlockFormattingContext): Deleted.
3564         (InitialBlockContainer.prototype.paddingBox): Deleted.
3565         (InitialBlockContainer.prototype.contentBox): Deleted.
3566         * LayoutReloaded/LayoutTree/InlineBox.js:
3567         (InlineBox): Deleted.
3568         (InlineBox.prototype.setText): Deleted.
3569         (InlineBox.prototype.text): Deleted.
3570         * LayoutReloaded/TreeBuilder.js:
3571         (TreeBuilder.prototype.createTree):
3572         (TreeBuilder.prototype._createAndAttachBox):
3573         * LayoutReloaded/Utils.js:
3574         (Utils._dumpBox):
3575
3576 2018-03-14  Chris Fleizach  <cfleizach@apple.com>
3577
3578         AX: Implement accessible dismiss action on iOS
3579         https://bugs.webkit.org/show_bug.cgi?id=183352
3580         <rdar://problem/38161500>
3581
3582         Reviewed by Zalan Bujtas.
3583
3584         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
3585         (WTR::AccessibilityUIElement::dismiss const):
3586         * WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
3587         * WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
3588         * WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
3589         (WTR::AccessibilityUIElement::dismiss):
3590
3591 2018-03-14  Youenn Fablet  <youenn@apple.com>
3592
3593         Update libwebrtc up to 36af4e9614f707f733eb2340fae66d6325aaac5b
3594         https://bugs.webkit.org/show_bug.cgi?id=183481
3595
3596         Reviewed by Eric Carlson.
3597
3598         * Scripts/webkitpy/style/checker.py: Do not check style.
3599
3600 2018-03-14  Brendan McLoughlin  <brendan@bocoup.com>
3601
3602         Add label on github when exporting wpt tests to w3c/web-platform-test repo
3603         https://bugs.webkit.org/show_bug.cgi?id=183575
3604
3605         Reviewed by Youenn Fablet.
3606
3607         * Scripts/webkitpy/w3c/test_exporter.py:
3608         (TestExporter.make_pull_request):
3609         (parse_args):
3610         * Scripts/webkitpy/w3c/test_exporter_unittest.py:
3611         (TestExporterTest.test_export):
3612
3613 2018-03-14  Zalan Bujtas  <zalan@apple.com>
3614
3615         [LayoutReloaded] Add InlineBox dump
3616         https://bugs.webkit.org/show_bug.cgi?id=183625
3617
3618         Reviewed by Antti Koivisto.
3619
3620         Right now line boxes live off of the inline formatting context but that's temporary and
3621         they will be moved over to the BoxTree.
3622
3623         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
3624         (BlockFormattingContext.prototype._computeContentHeight):
3625         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
3626         (InlineFormattingContext):
3627         (InlineFormattingContext.prototype.lines):
3628         (InlineFormattingContext.prototype.layout):
3629         (InlineFormattingContext.prototype._handleText):
3630         (InlineFormattingContext.prototype._commitLine):
3631         (InlineFormattingContext.prototype._initializeLine):
3632         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
3633         (Line):
3634         (Line.prototype.isEmpty):
3635         (Line.prototype.rect):
3636         (Line.prototype.lineBoxes):
3637         (Line.prototype.addLineBox):
3638         (Line.prototype.appendFragment): Deleted.
3639         * LayoutReloaded/README.md:
3640         * LayoutReloaded/Utils.js:
3641         (Utils.computedLineHeight):
3642         (Utils.isBlockContainerElement):
3643         (Utils.textHeight):
3644         (Utils._dumpBox):
3645         (Utils._dumpLines.):
3646         (Utils._dumpLines):
3647         (Utils._dumpTree):
3648         (Utils.precisionRound):
3649         (Utils):
3650         * LayoutReloaded/misc/LayoutReloadedWebKit.patch:
3651         * LayoutReloaded/test/index.html:
3652
3653 2018-03-14  Tim Horton  <timothy_horton@apple.com>
3654
3655         Fix the build after r229567
3656
3657         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
3658
3659 2018-03-13  Jer Noble  <jer.noble@apple.com>
3660
3661         [iOS] Muted media playback can interrupt out-of-process audio
3662         https://bugs.webkit.org/show_bug.cgi?id=183606
3663         <rdar://problem/37466253>
3664
3665         Reviewed by Eric Carlson.
3666
3667         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3668         * TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:
3669         (TestWebKitAPI::TEST):
3670         * TestWebKitAPI/Tests/WebKitLegacy/ios/video-with-paused-audio-and-playing-muted.html: Added.
3671
3672 2018-03-13  Ross Kirsling  <ross.kirsling@sony.com>
3673
3674         [Win] Layout Test fast/html/menuitem-element.html is failing.
3675         https://bugs.webkit.org/show_bug.cgi?id=179299
3676
3677         Reviewed by Per Arne Vollan.
3678
3679         * DumpRenderTree/win/DumpRenderTree.cpp:
3680         (setWebPreferencesForTestOptions):
3681         Recognize test option "enableMenuItemElement".
3682
3683 2018-03-12  Tim Horton  <timothy_horton@apple.com>
3684
3685         Stop using SDK conditionals to control feature definitions
3686         https://bugs.webkit.org/show_bug.cgi?id=183430
3687         <rdar://problem/38251619>
3688
3689         Reviewed by Dan Bernstein.
3690
3691         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
3692         * TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig: Renamed.
3693
3694 2018-03-12  Ross Kirsling  <ross.kirsling@sony.com>
3695
3696         [DRT] TestOptions should not be ObjC.
3697         https://bugs.webkit.org/show_bug.cgi?id=183487
3698
3699         Reviewed by Per Arne Vollan.
3700
3701         * DumpRenderTree/CMakeLists.txt:
3702         * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
3703         * DumpRenderTree/PlatformMac.cmake:
3704         Move TestOptions to platform-agnostic sources.
3705
3706         * DumpRenderTree/TestOptions.h:
3707         * DumpRenderTree/TestOptions.cpp: Renamed from Tools/DumpRenderTree/TestOptions.mm.
3708         * DumpRenderTree/mac/DumpRenderTree.mm:
3709         Remove NSURL dependency and align with WTR as much as possible.
3710
3711         * DumpRenderTree/win/DumpRenderTree.cpp:
3712         Consume TestOptions (recognizing just the ones that have WebPreferences defined for now).
3713
3714 2018-03-12  Yoav Weiss  <yoav@yoav.ws>
3715
3716         Runtime flag for link prefetch and remove link subresource.
3717         https://bugs.webkit.org/show_bug.cgi?id=183540
3718
3719         Reviewed by Chris Dumez.
3720
3721         Remove the LINK_PREFETCH build time flag.
3722
3723         * TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
3724
3725 2018-03-12  Wenson Hsieh  <wenson_hsieh@apple.com>
3726
3727         REGRESSION(r211643): Dismissing WKActionSheet should not also dismiss its presenting view controller
3728         https://bugs.webkit.org/show_bug.cgi?id=183549
3729         <rdar://problem/34960698>
3730
3731         Reviewed by Andy Estes.
3732
3733         Add TestWebKitAPI support for testing WKWebViews embedded within presented view controllers, and use this to
3734         check that dismissing an action sheet does not additionally cause the view controller being used to present the
3735         web view to also dismiss.
3736
3737         * TestWebKitAPI/ClassMethodSwizzler.h: Added.
3738         * TestWebKitAPI/ClassMethodSwizzler.mm: Added.
3739         (TestWebKitAPI::ClassMethodSwizzler::ClassMethodSwizzler):
3740         (TestWebKitAPI::ClassMethodSwizzler::~ClassMethodSwizzler):
3741
3742         Add ClassMethodSwizzler, an RAII which swizzles an Objective-C class method over its lifetime.
3743
3744         * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
3745         * TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
3746
3747         Add a new API test that loads a view controller which embeds a WKWebView, and verifies that presenting and then
3748         dismissing an action sheet from that web view does not cause the view controller to also dismiss.
3749
3750         (TestWebKitAPI::setOverrideViewControllerForFullscreenPresentation):
3751         (TestWebKitAPI::overrideViewControllerForFullscreenPresentation):
3752
3753         Mock +[UIViewController _viewControllerForFullScreenPresentationFromView:] to return the web view. This works
3754         around the fact that TestWebKitAPI is not a UI application, so certain pieces of UIKit API and SPI need to be
3755         stubbed or mocked to simulate being a UI application. We can remove these workarounds once
3756         https://webkit.org/b/175204 is addressed, and TestWebKitAPI becomes a UI application that can actually maintain
3757         a root view controller and key window.
3758
3759         (TestWebKitAPI::TEST):
3760         * TestWebKitAPI/cocoa/TestWKWebView.h:
3761         * TestWebKitAPI/cocoa/TestWKWebView.mm:
3762         (-[TestWKWebView initWithFrame:configuration:addToWindow:]):
3763
3764         Add a new initializer for TestWKWebView that doesn't force the view to be hosted within a UIWindow. This is used
3765         by TestWKWebViewController to create a TestWKWebView in -loadView.
3766
3767         * TestWebKitAPI/ios/TestWKWebViewController.h: Added.
3768         * TestWebKitAPI/ios/TestWKWebViewController.mm: Added.
3769         (-[TestWKWebViewControllerWindow _beginKeyWindowDeferral]):
3770         (-[TestWKWebViewControllerWindow _endKeyWindowDeferral]):
3771
3772         Stub out these methods to prevent UIKit from hitting assertions when making this UIWindow the key window. This
3773         can also be removed once TestWebKitAPI is a UI application.
3774
3775         (-[TestWKWebViewController initWithFrame:configuration:]):
3776         (-[TestWKWebViewController loadView]):
3777         (-[TestWKWebViewController webView]):
3778         (-[TestWKWebViewController dismissViewControllerAnimated:completion:]):
3779         (-[TestWKWebViewController dismissalHandler]):
3780         (-[TestWKWebViewController setDismissalHandler:]):
3781
3782         Add a UIViewController helper subclass whose -view is a WKWebView. The new API test presents this view
3783         controller. Tests may also provide a dismissalHandler, which is invoked when the view controller is being
3784         dismissed. The new API test uses this hook to verify that the view controller containing the web view isn't also
3785         dismissed after the action sheet goes away.
3786
3787         * TestWebKitAPI/ios/UIKitSPI.h:
3788
3789 2018-03-12  Basuke Suzuki  <Basuke.Suzuki@sony.com>
3790
3791         [webkitpy] Remove openssl command dependency.
3792         https://bugs.webkit.org/show_bug.cgi?id=183494
3793
3794         Reviewed by Ryosuke Niwa.
3795
3796         Added Python implementation of PEM file perser and switched to use that
3797         from external `openssl` command.
3798
3799         * Scripts/webkitpy/common/system/pemfile.py: Added.
3800         (load):
3801         (BadFormatError):
3802         (Pem):
3803         (Pem.__init__):
3804         (Pem.get):
3805         (Pem.get_all):
3806         (Pem.certificate):
3807         (Pem.private_key):
3808         (Pem.csr):
3809         (Pem.certificate_request):
3810         (Pem.certificate_signing_request):
3811         (_parse_pem_format):
3812         (_parse_pem_format.find_begin):
3813         (_parse_pem_format.find_end):
3814         (_parse_pem_format.sections):
3815         * Scripts/webkitpy/common/system/pemfile_unittest.py: Added.
3816         (PemFileTest):
3817         (PemFileTest.test_parse):
3818         (PemFileTest.test_parse_bad_format):
3819         * Scripts/webkitpy/port/base.py:
3820         (Port.start_websocket_server):
3821         (Port._extract_certificate_from_pem): Deleted.
3822         (Port._extract_private_key_from_pem): Deleted.
3823
3824 2018-03-12  Javier Fernandez  <jfernandez@igalia.com>
3825
3826         Remove GridLayout runtime flag
3827         https://bugs.webkit.org/show_bug.cgi?id=183484
3828
3829         Reviewed by Myles C. Maxfield.
3830
3831         The Grid Layout feature has been enabled by default for almost a
3832         year, so I think it's time to remove the runtime flag and the
3833         codepath run when the feature is disabled.
3834
3835         * DumpRenderTree/mac/DumpRenderTree.mm:
3836         (enableExperimentalFeatures):
3837
3838 2018-03-12  Antoine Quint  <graouts@apple.com>
3839
3840         [Web Animations] Implement CSS Animations and CSS Transitions as Web Animations
3841         https://bugs.webkit.org/show_bug.cgi?id=183504
3842         <rdar://problem/38372965>
3843
3844         Reviewed by Jon Lee.
3845
3846         Add a new <!-- webkit-test-runner --> flag to enable the CSS Animations and CSS Transitions
3847         as Web Animations runtime flag in the new tests we've created for this feature.
3848
3849         * DumpRenderTree/TestOptions.h:
3850         * DumpRenderTree/TestOptions.mm:
3851         (TestOptions::TestOptions):
3852         * DumpRenderTree/mac/DumpRenderTree.mm:
3853         (setWebPreferencesForTestOptions):
3854         * WebKitTestRunner/TestController.cpp:
3855         (WTR::TestController::resetPreferencesToConsistentValues):
3856         (WTR::updateTestOptionsFromTestHeader):
3857         * WebKitTestRunner/TestOptions.h:
3858         (WTR::TestOptions::hasSameInitializationOptions const):
3859
3860 2018-03-11  Zalan Bujtas  <zalan@apple.com>
3861
3862         [LayoutReloaded] Add Line class for InlineFormattingContext -and move files around.
3863         https://bugs.webkit.org/show_bug.cgi?id=183551
3864
3865         Reviewed by Wenson Hsieh.
3866
3867         * LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js: Renamed from Tools/LayoutReloaded/BlockFormattingContext.js.
3868         (BlockFormattingContext):
3869         (BlockFormattingContext.prototype.layout):
3870         (BlockFormattingContext.prototype.computeWidth):
3871         (BlockFormattingContext.prototype.computeHeight):
3872         (BlockFormattingContext.prototype.marginTop):
3873         (BlockFormattingContext.prototype.marginBottom):
3874         (BlockFormattingContext.prototype._computeStaticPosition):
3875         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
3876         (BlockFormattingContext.prototype._placeOutOfFlowDescendants):
3877         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
3878         (BlockFormattingContext.prototype._computeFloatingWidth):
3879         (BlockFormattingContext.prototype._computeInFlowWidth):
3880         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
3881         (BlockFormattingContext.prototype._computeFloatingHeight):
3882         (BlockFormattingContext.prototype._computeInFlowHeight):
3883         (BlockFormattingContext.prototype._computeHorizontalConstraint):
3884         (BlockFormattingContext.prototype._computeContentHeight):
3885         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
3886         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
3887         (BlockFormattingContext.prototype._shrinkToFitWidth):
3888         * LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js: Renamed from Tools/LayoutReloaded/BlockMarginCollapse.js.
3889         (BlockMarginCollapse.marginTop):
3890         (BlockMarginCollapse.marginBottom):
3891         (BlockMarginCollapse._isMarginTopCollapsedWithSibling):
3892         (BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
3893         (BlockMarginCollapse._isMarginTopCollapsedWithParent):
3894         (BlockMarginCollapse._isMarginBottomCollapsedWithParent):
3895         (BlockMarginCollapse._nonCollapsedMarginTop):
3896         (BlockMarginCollapse._nonCollapsedMarginBottom):
3897         (BlockMarginCollapse._collapsedMarginTopFromFirstChild):
3898         (BlockMarginCollapse._collapsedMarginBottomFromLastChild):
3899         (BlockMarginCollapse._marginValue):
3900         (BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
3901         (BlockMarginCollapse):
3902         * LayoutReloaded/FormattingContext/FloatingContext.js: Renamed from Tools/LayoutReloaded/FloatingContext.js.
3903         (FloatingContext):
3904         (FloatingContext.prototype.computePosition):
3905         (FloatingContext.prototype.bottom):
3906         (FloatingContext.prototype._positionForFloating):
3907         (FloatingContext.prototype._positionForClear):
3908         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
3909         (FloatingContext.prototype._addFloating):
3910         (FloatingContext.prototype._findInnerMostLeftAndRight):
3911         (FloatingContext.prototype._moveToNextVerticalPosition):
3912         (FloatingContext.prototype._availableSpace):
3913         (FloatingContext.prototype._findFloatingAtVerticalPosition):
3914         (FloatingContext.prototype._isEmpty):
3915         (FloatingContext.prototype._adjustedFloatingPosition):
3916         (FloatingContext.prototype._bottom):
3917         (FloatingContext.prototype._formattingContext):
3918         * LayoutReloaded/FormattingContext/FormattingContext.js: Renamed from Tools/LayoutReloaded/FormattingContext.js.
3919         (FormattingContext):
3920         (FormattingContext.prototype.rootContainer):
3921         (FormattingContext.prototype.floatingContext):
3922         (FormattingContext.prototype.layout):
3923         (FormattingContext.prototype.computeWidth):
3924         (FormattingContext.prototype.computeHeight):
3925         (FormattingContext.prototype.marginTop):
3926         (FormattingContext.prototype.marginLeft):
3927         (FormattingContext.prototype.marginBottom):
3928         (FormattingContext.prototype.marginRight):
3929         (FormattingContext.prototype.absoluteMarginBox):
3930         (FormattingContext.prototype.absoluteBorderBox):
3931         (FormattingContext.prototype.absolutePaddingBox):
3932         (FormattingContext.prototype.absoluteContentBox):
3933         * LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js: Renamed from Tools/LayoutReloaded/InlineFormattingContext.js.
3934         (InlineFormattingContext):
3935         (InlineFormattingContext.prototype.layout):
3936         (InlineFormattingContext.prototype._handleInlineBox):
3937         (InlineFormattingContext.prototype._handleText):
3938         (InlineFormattingContext.prototype._commitLine):
3939         (InlineFormattingContext.prototype._line):
3940         * LayoutReloaded/FormattingContext/InlineFormatting/Line.js: Copied from Tools/LayoutReloaded/InitialBlockContainer.js.
3941         (Line):
3942         (Line.prototype.isEmpty):
3943         (Line.prototype.availableWidth):
3944         (Line.prototype.appendFragment):
3945         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
3946         * LayoutReloaded/LayoutTree/BlockContainer.js: Renamed from Tools/LayoutReloaded/BlockContainer.js.
3947         (BlockContainer):
3948         (BlockContainer.prototype.establishesInlineFormattingContext):
3949         * LayoutReloaded/LayoutTree/Box.js: Renamed from Tools/LayoutReloaded/Box.js.
3950         (Box):
3951         (Box.prototype.id):
3952         (Box.prototype.setRendererName):
3953         (Box.prototype.name):
3954         (Box.prototype.node):
3955         (Box.prototype.parent):
3956         (Box.prototype.nextSibling):
3957         (Box.prototype.nextInFlowSibling):
3958         (Box.prototype.previousSibling):
3959         (Box.prototype.previousInFlowSibling):
3960         (Box.prototype.setParent):
3961         (Box.prototype.setNextSibling):
3962         (Box.prototype.setPreviousSibling):
3963         (Box.prototype.rect):
3964         (Box.prototype.topLeft):
3965         (Box.prototype.bottomRight):
3966         (Box.prototype.setTopLeft):
3967         (Box.prototype.setSize):
3968         (Box.prototype.setWidth):
3969         (Box.prototype.setHeight):
3970         (Box.prototype.isContainer):
3971         (Box.prototype.isBlockLevelBox):
3972         (Box.prototype.isBlockContainerBox):
3973         (Box.prototype.isInlineLevelBox):
3974         (Box.prototype.setIsAnonymous):
3975         (Box.prototype.isAnonymous):
3976         (Box.prototype.establishesFormattingContext):
3977         (Box.prototype.establishedFormattingContext):
3978         (Box.prototype.establishesBlockFormattingContext):
3979         (Box.prototype.establishesInlineFormattingContext):
3980         (Box.prototype.isPositioned):
3981         (Box.prototype.isRelativePositioned):
3982         (Box.prototype.isAbsolutePositioned):
3983         (Box.prototype.isFixedPositioned):
3984         (Box.prototype.isInFlow):
3985         (Box.prototype.isOutOfFlowPositioned):
3986         (Box.prototype.isInFlowPositioned):
3987         (Box.prototype.isFloatingPositioned):
3988         (Box.prototype.isFloatingOrOutOfFlowPositioned):
3989         (Box.prototype.isRootElement):
3990         (Box.prototype.containingBlock):
3991         (Box.prototype.borderBox):
3992         (Box.prototype.paddingBox):
3993         (Box.prototype.contentBox):
3994         * LayoutReloaded/LayoutTree/Container.js: Renamed from Tools/LayoutReloaded/Container.js.
3995         (Container):
3996         (Container.prototype.isContainer):
3997         (Container.prototype.setFirstChild):
3998         (Container.prototype.setLastChild):
3999         (Container.prototype.firstChild):
4000         (Container.prototype.firstInFlowChild):
4001         (Container.prototype.lastChild):
4002         (Container.prototype.lastInFlowChild):
4003         (Container.prototype.hasChild):
4004         (Container.prototype.hasInFlowChild):
4005         * LayoutReloaded/LayoutTree/InitialBlockContainer.js: Renamed from Tools/LayoutReloaded/InitialBlockContainer.js.
4006         (InitialBlockContainer):
4007         (InitialBlockContainer.prototype.establishesBlockFormattingContext):
4008         (InitialBlockContainer.prototype.paddingBox):
4009         (InitialBlockContainer.prototype.contentBox):
4010         * LayoutReloaded/LayoutTree/InlineBox.js: Renamed from Tools/LayoutReloaded/InlineBox.js.
4011         (InlineBox):
4012         (InlineBox.prototype.setText):
4013         (InlineBox.prototype.text):
4014         * LayoutReloaded/LayoutTree/Text.js: Renamed from Tools/LayoutReloaded/Text.js.
4015         (Text):
4016         (Text.prototype.node):
4017         (Text.prototype.content):
4018         (Text.prototype.length):
4019         * LayoutReloaded/Utils.js:
4020         (Utils.nextBreakingOpportunity):
4021         (Utils.measureText):
4022         * LayoutReloaded/misc/headers/Line.h: Copied from Tools/LayoutReloaded/misc/headers/Text.h.
4023         * LayoutReloaded/misc/headers/Text.h:
4024         * LayoutReloaded/test/border-simple.html:
4025         * LayoutReloaded/test/index.html:
4026
4027 2018-03-10  Wenson Hsieh  <wenson_hsieh@apple.com>
4028
4029         [macOS] Copying a table from the Numbers app and pasting into iCloud Numbers fails
4030         https://bugs.webkit.org/show_bug.cgi?id=183485
4031         <rdar://problem/38041984>
4032
4033         Reviewed by Ryosuke Niwa.
4034
4035         Add new API tests to cover scenarios in which we paste image data alongside text data.
4036
4037         * TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
4038         (TestWebKitAPI::TEST):
4039         * TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
4040         (TestWebKitAPI::TEST):
4041
4042 2018-03-09  Zalan Bujtas  <zalan@apple.com>
4043
4044         [LayoutReloaded] Initial commit -block formatting context.
4045         https://bugs.webkit.org/show_bug.cgi?id=183462
4046
4047         Reviewed by Antti Koivisto.
4048
4049         See README.md
4050
4051         * LayoutReloaded/BlockContainer.js: Added.
4052         (BlockContainer):
4053         (BlockContainer.prototype.establishesInlineFormattingContext):
4054         * LayoutReloaded/BlockFormattingContext.js: Added.
4055         (BlockFormattingContext):
4056         (BlockFormattingContext.prototype.layout):
4057         (BlockFormattingContext.prototype.computeWidth):
4058         (BlockFormattingContext.prototype.computeHeight):
4059         (BlockFormattingContext.prototype.marginTop):
4060         (BlockFormattingContext.prototype.marginBottom):
4061         (BlockFormattingContext.prototype._computeStaticPosition):
4062         (BlockFormattingContext.prototype._placeInFlowPositionedChildren):
4063         (BlockFormattingContext.prototype._placeOutOfFlowDescendants):
4064         (BlockFormattingContext.prototype._computeOutOfFlowWidth):
4065         (BlockFormattingContext.prototype._computeFloatingWidth):
4066         (BlockFormattingContext.prototype._computeInFlowWidth):
4067         (BlockFormattingContext.prototype._computeOutOfFlowHeight):
4068         (BlockFormattingContext.prototype._computeFloatingHeight):
4069         (BlockFormattingContext.prototype._computeInFlowHeight):
4070         (BlockFormattingContext.prototype._computeHorizontalConstraint):
4071         (BlockFormattingContext.prototype._computeContentHeight):
4072         (BlockFormattingContext.prototype._computeInFlowPositionedPosition):
4073         (BlockFormattingContext.prototype._computeOutOfFlowPosition):
4074         (BlockFormattingContext.prototype._shrinkToFitWidth):
4075         * LayoutReloaded/BlockMarginCollapse.js: Added.
4076         (BlockMarginCollapse.marginTop):
4077         (BlockMarginCollapse.marginBottom):
4078         (BlockMarginCollapse._isMarginTopCollapsedWithSibling):
4079         (BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
4080         (BlockMarginCollapse._isMarginTopCollapsedWithParent):
4081         (BlockMarginCollapse._isMarginBottomCollapsedWithParent):
4082         (BlockMarginCollapse._nonCollapsedMarginTop):
4083         (BlockMarginCollapse._nonCollapsedMarginBottom):
4084         (BlockMarginCollapse._collapsedMarginTopFromFirstChild):
4085         (BlockMarginCollapse._collapsedMarginBottomFromLastChild):
4086         (BlockMarginCollapse._marginValue):
4087         (BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
4088         (BlockMarginCollapse):
4089         * LayoutReloaded/Box.js: Added.
4090         (Box):
4091         (Box.prototype.id):
4092         (Box.prototype.setRendererName):
4093         (Box.prototype.name):
4094         (Box.prototype.node):
4095         (Box.prototype.parent):
4096         (Box.prototype.nextSibling):
4097         (Box.prototype.nextInFlowSibling):
4098         (Box.prototype.previousSibling):
4099         (Box.prototype.previousInFlowSibling):
4100         (Box.prototype.setParent):
4101         (Box.prototype.setNextSibling):
4102         (Box.prototype.setPreviousSibling):
4103         (Box.prototype.rect):
4104         (Box.prototype.topLeft):
4105         (Box.prototype.bottomRight):
4106         (Box.prototype.setTopLeft):
4107         (Box.prototype.setSize):
4108         (Box.prototype.setWidth):
4109         (Box.prototype.setHeight):
4110         (Box.prototype.isContainer):
4111         (Box.prototype.isBlockLevelBox):
4112         (Box.prototype.isBlockContainerBox):
4113         (Box.prototype.isInlineLevelBox):
4114         (Box.prototype.setIsAnonymous):
4115         (Box.prototype.isAnonymous):
4116         (Box.prototype.establishesFormattingContext):
4117         (Box.prototype.establishedFormattingContext):
4118         (Box.prototype.establishesBlockFormattingContext):
4119         (Box.prototype.establishesInlineFormattingContext):
4120         (Box.prototype.isPositioned):
4121         (Box.prototype.isRelativePositioned):
4122         (Box.prototype.isAbsolutePositioned):
4123         (Box.prototype.isFixedPositioned):
4124         (Box.prototype.isInFlow):
4125         (Box.prototype.isOutOfFlowPositioned):
4126         (Box.prototype.isInFlowPositioned):
4127         (Box.prototype.isFloatingPositioned):
4128         (Box.prototype.isFloatingOrOutOfFlowPositioned):
4129         (Box.prototype.isRootElement):
4130         (Box.prototype.containingBlock):
4131         (Box.prototype.borderBox):
4132         (Box.prototype.paddingBox):
4133         (Box.prototype.contentBox):
4134         * LayoutReloaded/Container.js: Added.
4135         (Container):
4136         (Container.prototype.isContainer):
4137         (Container.prototype.setFirstChild):
4138         (Container.prototype.setLastChild):
4139         (Container.prototype.firstChild):
4140         (Container.prototype.firstInFlowChild):
4141         (Container.prototype.lastChild):
4142         (Container.prototype.lastInFlowChild):
4143         (Container.prototype.hasChild):
4144         (Container.prototype.hasInFlowChild):
4145         * LayoutReloaded/FloatingContext.js: Added.
4146         (FloatingContext):
4147         (FloatingContext.prototype.computePosition):
4148         (FloatingContext.prototype.bottom):
4149         (FloatingContext.prototype._positionForFloating):
4150         (FloatingContext.prototype._positionForClear):
4151         (FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
4152         (FloatingContext.prototype._addFloating):
4153         (FloatingContext.prototype._findInnerMostLeftAndRight):
4154         (FloatingContext.prototype._moveToNextVerticalPosition):
4155         (FloatingContext.prototype._availableSpace):
4156         (FloatingContext.prototype._findFloatingAtVerticalPosition):
4157         (FloatingContext.prototype._isEmpty):
4158         (FloatingContext.prototype._adjustedFloatingPosition):
4159         (FloatingContext.prototype._bottom):
4160         (FloatingContext.prototype._formattingContext):
4161         * LayoutReloaded/FormattingContext.js: Added.
4162         (FormattingContext):
4163         (FormattingContext.prototype.rootContainer):
4164         (FormattingContext.prototype.floatingContext):
4165         (FormattingContext.prototype.layout):
4166         (FormattingContext.prototype.computeWidth):
4167         (FormattingContext.prototype.computeHeight):
4168         (FormattingContext.prototype.marginTop):
4169         (FormattingContext.prototype.marginLeft):
4170         (FormattingContext.prototype.marginBottom):
4171         (FormattingContext.prototype.marginRight):
4172         (FormattingContext.prototype.absoluteMarginBox):
4173         (FormattingContext.prototype.absoluteBorderBox):
4174         (FormattingContext.prototype.absolutePaddingBox):
4175         (FormattingContext.prototype.absoluteContentBox):
4176         * LayoutReloaded/InitialBlockContainer.js: Added.
4177         (InitialBlockContainer):
4178         (InitialBlockContainer.prototype.establishesBlockFormattingContext):
4179         (InitialBlockContainer.prototype.paddingBox):
4180         (InitialBlockContainer.prototype.contentBox):
4181         * LayoutReloaded/InlineBox.js: Added.
4182         (InlineBox):
4183         (InlineBox.prototype.setText):
4184         (InlineBox.prototype.text):
4185         * LayoutReloaded/InlineFormattingContext.js: Added.
4186         (InlineFormattingContext):
4187         (InlineFormattingContext.prototype.layout):
4188         (InlineFormattingContext.prototype._handleInlineBox):
4189         (InlineFormattingContext.prototype._handleText):
4190         * LayoutReloaded/Layout.js: Added.
4191         (layout):
4192         * LayoutReloaded/LayoutContext.js: Added.
4193         (LayoutContext):
4194         (LayoutContext.prototype.layoutFormattingContext):
4195         * LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata: Added.
4196         * LayoutReloaded/LayoutReloaded.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: Added.
4197         * LayoutReloaded/README.md: Added.
4198         * LayoutReloaded/Text.js: Added.
4199         (Text):
4200         * LayoutReloaded/TreeBuilder.js: Added.
4201         (TreeBuilder.prototype.createTree):
4202         (TreeBuilder.prototype._createAndAttachBox):
4203         (TreeBuilder.prototype._appendChild):
4204         (TreeBuilder.prototype._findBox):
4205         (TreeBuilder.prototype._findNode):
4206         (TreeBuilder):
4207         * LayoutReloaded/Utils.js: Added.
4208         (LayoutPoint):
4209         (LayoutPoint.prototype.setLeft):
4210         (LayoutPoint.prototype.setTop):
4211         (LayoutPoint.prototype.left):
4212         (LayoutPoint.prototype.top):
4213         (LayoutPoint.prototype.shiftLeft):
4214         (LayoutPoint.prototype.shiftTop):
4215         (LayoutPoint.prototype.moveBy):
4216         (LayoutPoint.prototype.equal):
4217         (LayoutPoint.prototype.clone):
4218         (LayoutSize):
4219         (LayoutSize.prototype.setWidth):
4220         (LayoutSize.prototype.setHeight):
4221         (LayoutSize.prototype.width):
4222         (LayoutSize.prototype.height):
4223         (LayoutSize.prototype.growBy):
4224         (LayoutSize.prototype.shrinkBy):
4225         (LayoutSize.prototype.isEmpty):
4226         (LayoutSize.prototype.equal):
4227         (LayoutSize.prototype.clone):
4228         (LayoutRect):
4229         (LayoutRect.prototype.setTop):
4230         (LayoutRect.prototype.setLeft):
4231         (LayoutRect.prototype.setBottom):
4232         (LayoutRect.prototype.setRight):
4233         (LayoutRect.prototype.left):
4234         (LayoutRect.prototype.top):
4235         (LayoutRect.prototype.bottom):
4236         (LayoutRect.prototype.right):
4237         (LayoutRect.prototype.setTopLeft):
4238         (LayoutRect.prototype.topLeft):
4239         (LayoutRect.prototype.topRight):
4240         (LayoutRect.prototype.bottomRight):
4241         (LayoutRect.prototype.setWidth):
4242         (LayoutRect.prototype.setHeight):
4243         (LayoutRect.prototype.setSize):
4244         (LayoutRect.prototype.size):
4245         (LayoutRect.prototype.width):
4246         (LayoutRect.prototype.height):
4247         (LayoutRect.prototype.growBy):
4248         (LayoutRect.prototype.shrinkBy):
4249         (LayoutRect.prototype.moveBy):
4250         (LayoutRect.prototype.isEmpty):
4251         (LayoutRect.prototype.equal):
4252         (LayoutRect.prototype.intersects):
4253         (LayoutRect.prototype.contains):
4254         (LayoutRect.prototype.clone):
4255         (ASSERT_NOT_REACHED):
4256         (ASSERT):
4257         (Utils.computedValue):
4258         (Utils.propertyIsAuto):
4259         (Utils.isWidthAuto):
4260         (Utils.isHeightAuto):
4261         (Utils.isTopAuto):
4262         (Utils.isLeftAuto):
4263         (Utils.isBottomAuto):
4264         (Utils.isRightAuto):
4265         (Utils.width):
4266         (Utils.height):
4267         (Utils.top):
4268         (Utils.bottom):
4269         (Utils.left):
4270         (Utils.right):
4271         (Utils.hasBorderTop):
4272         (Utils.hasBorderBottom):
4273         (Utils.hasPaddingTop):
4274         (Utils.hasPaddingBottom):
4275         (Utils.computedMarginTop):
4276         (Utils.computedMarginLeft):
4277         (Utils.computedMarginBottom):
4278         (Utils.computedMarginRight):
4279         (Utils.computedBorderTopLeft):
4280         (Utils.computedBorderBottomRight):
4281         (Utils.computedPaddingTopLeft):
4282         (Utils.computedPaddingBottomRight):
4283         (Utils.computedBorderAndPaddingTop):
4284         (Utils.computedBorderAndPaddingLeft):
4285         (Utils.computedBorderAndPaddingBottom):
4286         (Utils.computedBorderAndPaddingRight):
4287         (Utils.computedHorizontalBorderAndPadding):
4288         (Utils.computedVerticalBorderAndPadding):
4289         (Utils.hasClear):
4290         (Utils.hasClearLeft):
4291         (Utils.hasClearRight):
4292         (Utils.hasClearBoth):
4293         (Utils.isBlockLevelElement):
4294         (Utils.isBlockContainerElement):
4295         (Utils.isInlineLevelElement):
4296         (Utils.isTableElement):
4297