blob: 4d16474d58115c4ba45ca6d32ffff9acf1e36c37 [file] [log] [blame]
2018-09-11 Jiewen Tan <jiewen_tan@apple.com>
[WebAuthN] Polish AuthenticatorManager and rename it to AuthenticatorCoordinator
https://bugs.webkit.org/show_bug.cgi?id=189277
<rdar://problem/44115936>
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/ios/LocalAuthenticator.mm:
(TestWebKitAPI::TEST):
2018-09-10 Michael Saboff <msaboff@apple.com>
Test262 failure with Named Capture Groups - using a reference before the group is defined
https://bugs.webkit.org/show_bug.cgi?id=189407
Reviewed by Alex Christensen.
Updated test.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
2018-09-10 Thomas Denney <tdenney@apple.com>
[WHLSL] Inlining should be optional
https://bugs.webkit.org/show_bug.cgi?id=188641
Reviewed by Myles C. Maxfield.
Inlining functions is now optional, and disabled by default. This patch
additionally resolves https://bugs.webkit.org/show_bug.cgi?id=189326 as
the code for calling functions was completely rewritten.
* WebGPUShadingLanguageRI/All.js: Add LateCheckAndLayoutBuffers.js
* WebGPUShadingLanguageRI/CallFunction.js:
(callFunction): Remove dependency on inlining.
* WebGPUShadingLanguageRI/Evaluator.js:
(Evaluator.prototype._snapshot): Allow null srcPtr in the case of void
returns from functions.
(Evaluator.prototype._evaluateArguments): Abstract out argument
evaluation, ensuring that the order is right-to-left for
FunctionLikeBlocks (i.e. inlined functions) and regular calls.
(Evaluator.prototype._evaluateFunction): Abstracted out function body
evaluation for inlined and non-inlined functions.
(Evaluator.prototype.visitFunctionLikeBlock): Ditto.
(Evaluator.prototype.visitCallExpression): Ditto.
* WebGPUShadingLanguageRI/Inline.js:
(_inlineFunction): Moved logic that is needed regardless of inlining
into LateCheckAndLayoutBuffers.js
(resolveInlinedFunction): Deleted.
* WebGPUShadingLanguageRI/LateCheckAndLayoutBuffers.js: Moved logic for
late checking.
* WebGPUShadingLanguageRI/Prepare.js: Make inlining optional and off by
default.
* WebGPUShadingLanguageRI/SPIRV.html: Update include.
* WebGPUShadingLanguageRI/Test.html: Ditto.
* WebGPUShadingLanguageRI/Test.js: Right-to-left argument evaluation,
and inlining tests.
* WebGPUShadingLanguageRI/index.html: Update include.
2018-09-10 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Unable to change the value of select elements while preserving focus state
https://bugs.webkit.org/show_bug.cgi?id=189475
<rdar://problem/41125764>
Reviewed by Tim Horton.
Adds a pair of new API tests to verify that (1) resigning first responder while preserving focus does not blur
the focused element, and (2) if another element is focused and presents an input view while preserving focus,
then we reset preservation state and allow first responder resignation to blur the focused element.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/FocusPreservationTests.mm: Added.
(webViewForTestingFocusPreservation):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView textInputContentView]):
* TestWebKitAPI/ios/UIKitSPI.h:
2018-09-10 Thomas Denney <tdenney@apple.com>
[WHLSL] Add the test shader type
https://bugs.webkit.org/show_bug.cgi?id=189484
Reviewed by Myles C. Maxfield.
Tests are now precedeed by the 'test' keyword so that they are treated
as entry points, in the same way as vertex and fragment shaders.
* WebGPUShadingLanguageRI/LateChecker.js:
(LateChecker.prototype._checkShaderType): Allow tests to return any
type, as some currently return void/pointer types.
* WebGPUShadingLanguageRI/Parse.js:
(parseFuncDecl): Add the test keyword.
* WebGPUShadingLanguageRI/Test.js: Prepend 'test' to every single test.
2018-09-10 Don Olmstead <don.olmstead@sony.com>
CBOR coders should only be compiled if WebAuthN is enabled
https://bugs.webkit.org/show_bug.cgi?id=189425
Reviewed by Jiewen Tan.
Just places ENABLE(WEB_AUTHN) guards around CBOR test files.
* TestWebKitAPI/Tests/WebCore/CBORReaderTest.cpp:
* TestWebKitAPI/Tests/WebCore/CBORValueTest.cpp:
* TestWebKitAPI/Tests/WebCore/CBORWriterTest.cpp:
2018-09-10 Daniel Bates <dabates@apple.com>
[iOS] Make WKWebView become the first responder to support testing key presses to non-editable elements
https://bugs.webkit.org/show_bug.cgi?id=189432
Reviewed by Simon Fraser.
Make the WKWebView become the first responder immediately without the need to focus an editable
element. This allows us to test that DOM keyboard events are dispatched to non-editable elements.
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::PlatformWebView):
2018-09-10 Yusuke Suzuki <yusukesuzuki@slowstart.org>
[WTF] Add Markable<T, Traits>
https://bugs.webkit.org/show_bug.cgi?id=189231
Reviewed by Sam Weinig.
Add tests for Markable.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/Markable.cpp: Added.
(TestWebKitAPI::TEST):
2018-09-10 Simon Fraser <simon.fraser@apple.com>
Before tracking Document leaks, clear all caches
https://bugs.webkit.org/show_bug.cgi?id=189459
Reviewed by Sam Weinig.
It's not enough to clear the page and memory caches; font caches can reference Documents (for SVG fonts),
so just call WebCore::releaseMemory(), which empties caches including the page and memory caches, and
does the GC that we need to happen.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
2018-09-07 Matt Rajca <mrajca@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=189433
<rdar://problem/44186498> Touch Bar displays an active PIP button for audio elements (and it doesn't do anything)
Reviewed by Eric Carlson.
An API test has been added that checks the value of the canTogglePictureInPicture and ensures it
is NO when audio elements are playing.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.html:
* TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/audio-with-controls.html: Added.
2018-09-09 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r235832.
https://bugs.webkit.org/show_bug.cgi?id=189464
Broke WebKit2 tests (Requested by ap on #webkit).
Reverted changeset:
"[Cocoa] Turn on ARC for WebKitTestRunner"
https://bugs.webkit.org/show_bug.cgi?id=189228
https://trac.webkit.org/changeset/235832
2018-09-08 Simon Fraser <simon.fraser@apple.com>
accessibility/notification-listeners.html abandons a document
https://bugs.webkit.org/show_bug.cgi?id=188724
Reviewed by Darin Adler.
AccessibilityControllerMac leaked m_globalNotificationHandler, which leaks a JSValueProtect'd function,
which leaks a Document. Fix by using adoptNS().
* WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
(WTR::AccessibilityController::addNotificationListener):
2018-09-08 Wenson Hsieh <wenson_hsieh@apple.com>
[Cocoa] Use more bridging casts in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=189457
Reviewed by Darin Adler.
Adds some bridging casts to TestWebKitAPI, when converting betweeen several common types of objects, including:
CFStringRef <=> NSString
CFURLRef <=> NSURL
WKPreferences <=> WKPreferencesRef
CFDataRef <=> NSData
* TestWebKitAPI/Tests/WebCore/cocoa/SharedBuffer.mm:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm:
(readHTMLFromPasteboard):
(createWebViewWithCustomPasteboardDataEnabled):
* TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm:
(createWebViewWithCustomPasteboardDataEnabled):
* TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
(writeHTMLToPasteboard):
(createWebViewWithCustomPasteboardDataSetting):
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
(TestWebKitAPI::setUpWebView):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PasteRTFD.mm:
(writeRTFToPasteboard):
(writeRTFDToPasteboard):
(createWebViewWithCustomPasteboardDataEnabled):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
(createWebViewWithCustomPasteboardDataEnabled):
* TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(webViewForTestingAttachments):
* TestWebKitAPI/Tests/WebKitLegacy/mac/AccessingPastedImage.mm:
(writeRTFDToPasteboard):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
(checkRichTextTypePrecedesPlainTextType):
(TestWebKitAPI::TEST):
(TestWebKitAPI::setUpTestWebViewForDataTransferItems):
* TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/mac/PlatformUtilitiesMac.mm:
(TestWebKitAPI::Util::createInjectedBundlePath):
(TestWebKitAPI::Util::createURLForResource):
(TestWebKitAPI::Util::URLForNonExistentResource):
(TestWebKitAPI::Util::MIMETypeForWKURLResponse):
* TestWebKitAPI/mac/WebKitAgnosticTest.mm:
(TestWebKitAPI::WebKitAgnosticTest::loadURL):
2018-09-02 Darin Adler <darin@apple.com>
[Cocoa] Turn on ARC for WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=189228
Reviewed by Sam Weinig.
* TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm:
(+[EventSerializer dictionaryForEvent:relativeToTime:]): Removed autorelease.
* TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
(-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Removed autorelease.
* WebKitTestRunner/Configurations/Base.xcconfig: Added CLANG_ENABLE_OBJC_ARC.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityControllerIOS.mm:
(WTR::AccessibilityController::accessibleElementById): Use a __bridge cast.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityTextMarkerIOS.mm:
(WTR::AccessibilityTextMarker::isEqual): Ditto.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::AccessibilityUIElement): Removed retain.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Removed release.
(WTR::AccessibilityUIElement::removeNotificationListener): Removed release.
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use a __bridge cast.
(WTR::AccessibilityUIElement::textMarkerRangeForElement): Ditto.
(WTR::AccessibilityUIElement::textMarkerRangeLength): Ditto.
(WTR::AccessibilityUIElement::previousTextMarker): Ditto.
(WTR::AccessibilityUIElement::nextTextMarker): Ditto.
(WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto.
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Ditto.
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto.
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto.
(WTR::AccessibilityUIElement::accessibilityElementForTextMarker): Ditto.
(WTR::AccessibilityUIElement::textMarkerRangeMatchesTextNearMarkers): Ditto.
(WTR::_CGPathEnumerationIteration): Ditto.
(WTR::AccessibilityUIElement::pathDescription const): Ditto.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
(-[AccessibilityNotificationHandler dealloc]): Removed [super dealloc].
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::AccessibilityUIElement): Removed retain.
(WTR::AccessibilityUIElement::~AccessibilityUIElement): Removed release.
(WTR::AccessibilityUIElement::removeNotificationListener): Removed release.
(WTR::createJSStringRef): Removed autorelease.
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::initializeWebViewConfiguration): Removed release.
(WTR::TestController::cocoaPlatformInitialize): Removed release.
(WTR::TestController::platformCreateOtherPage): Removed autorelease.
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView dealloc]): Removed [super dealloc] and also many
cases of setting properties to nil that were only present for memory
management reasons.
* WebKitTestRunner/ios/GeneratedTouchesDebugWindow.mm:
(-[GeneratedTouchesDebugWindow dealloc]): Removed release and [super dealloc].
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(-[HIDEventGenerator dealloc]): Deleted.
(-[HIDEventGenerator _sendMarkerHIDEventWithCompletionBlock:]): Removed
Block_copy.
(-[HIDEventGenerator markerEventReceived:]): Removed Block_release.
(-[HIDEventGenerator interpolatedEvents:]): Removed release.
(-[HIDEventGenerator sendEventStream:completionBlock:]): Removed autorelease.
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(-[WebKitTestRunnerWindow dealloc]): Removed [super dealloc].
(WTR::PlatformWebView::PlatformWebView): Removed release.
(WTR::PlatformWebView::~PlatformWebView): Removed release.
(WTR::PlatformWebView::addChromeInputField): Removed release.
(WTR::PlatformWebView::removeChromeInputField): Removed release.
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::initializeInjectedBundlePath): Use __bridge cast.
(WTR::TestController::initializeTestPluginDirectory): Ditto.
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::accessibilitySpeakSelectionContent const):
Use __bridge cast.
(WTR::UIScriptController::enterText): Ditto.
(WTR::UIScriptController::selectFormPopoverTitle const): Ditto.
(WTR::UIScriptController::textContentType const): Ditto.
(WTR::UIScriptController::formInputLabel const): Ditto.
(WTR::UIScriptController::scrollingTreeAsText const): Ditto.
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::~PlatformWebView): Removed release.
(WTR::PlatformWebView::addChromeInputField): Removed release.
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::allowedFontFamilySet): Removed retain.
(WTR::systemHiddenFontFamilySet): Removed retain.
* WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm:
(-[WebKitTestRunnerDraggingInfo draggingDestinationWindow]): Removed retain.
(-[WebKitTestRunnerDraggingInfo dealloc]): Deleted.
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
(+[WebKitTestRunnerPasteboard _pasteboardWithName:]): Removed release.
(+[WebKitTestRunnerPasteboard releaseLocalPasteboards]): Removed release.
Method name is still OK because setting localPasteboards to nil will
still release them.
(+[NSPasteboard superAlloc]): Added. Helper so that LocalPasteboard can
bypass +[NSPasteboard alloc].
(+[NSPasteboard superAllocWithZone:]): Ditto.
(+[LocalPasteboard alloc]): Call superAlloc instead of class_createInstance.
This is a different way to achieve the "bypass NSPasteboard" behavior we need.
(+[LocalPasteboard allocWithZone:]): Added. Calls superAllocWithZone: for the
same reason as above. Needed because, at least at this time, +[NSObject alloc]
calls +allocWithZone: so we have to override both.
(-[LocalPasteboard dealloc]): Deleted.
(-[LocalPasteboard addTypes:owner:]): Removed release.
* WebKitTestRunner/mac/WebKitTestRunnerWindow.mm:
(-[WebKitTestRunnerWindow dealloc]): Removed [super dealloc].
* WebKitTestRunner/mac/main.mm:
(disableAppNapInUIProcess): Removed retain.
2018-09-07 Fujii Hironori <Hironori.Fujii@sony.com>
[WinCairo][MiniBrowser][WebKit] REGRESSION(r235398): ASSERTION FAILED: !m_client.didReceiveTitleForFrame
https://bugs.webkit.org/show_bug.cgi?id=189336
Reviewed by Alex Christensen.
WKPageSetPageLoaderClient is deprecated. Replaced it with
WKPageSetPageNavigationClient.
* MiniBrowser/win/WebKitBrowserWindow.cpp:
(WebKitBrowserWindow::WebKitBrowserWindow):
Call WKPageSetPageNavigationClient instead of WKPageSetPageLoaderClient.
(WebKitBrowserWindow::didFinishNavigation):
Copied from didReceiveTitleForFrame. Use WKPageCopyTitle to get the title.
(WebKitBrowserWindow::didCommitNavigation):
Copied from didCommitLoadForFrame. Use WKPageCopyCommittedURL to get the URL.
(WebKitBrowserWindow::didReceiveTitleForFrame): Deleted.
(WebKitBrowserWindow::didCommitLoadForFrame): Deleted.
* MiniBrowser/win/WebKitBrowserWindow.h: Renamed the class methods.
2018-09-07 Daniel Bates <dabates@apple.com>
[iOS] uiController.typeCharacterUsingHardwareKeyboard("`", ...) dispatches DOM key events for ~
https://bugs.webkit.org/show_bug.cgi?id=189325
Reviewed by Wenson Hsieh.
Fixes an issue where the test infrastructure would incorrectly synthesized a shift key press followed
by a ` key press (i.e. type '~') when instructed to simulate typing a grave accent (`). Typing a
grave accent does not require holding the shift key.
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(shouldWrapWithShiftKeyEventForCharacter):
2018-09-07 Frederic Wang <fwang@igalia.com>
[CSSOM View] Handle the scrollingElement in Element::scroll(Left/Top/Width/Height/To)
https://bugs.webkit.org/show_bug.cgi?id=182230
Reviewed by Simon Fraser.
This patch enables CSSOMViewScrollingAPI during test execution.
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
2018-09-07 Simon Fraser <simon.fraser@apple.com>
resultsjsonparser needs to handle leak failures
https://bugs.webkit.org/show_bug.cgi?id=189430
Reviewed by Alexey Proskuryakov.
Teach resultsjsonparser how to handle LEAK failures, building a FailureDocumentLeak
with a list of the leaked URLs.
* Scripts/webkitpy/common/net/resultsjsonparser.py:
(JSONTestResult._failure_types_from_actual_result):
* Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:
(ParsedJSONResultsTest):
(test_basic):
2018-09-07 Aakash Jain <aakash_jain@apple.com>
[ews-build] API tests should output result summary in json
https://bugs.webkit.org/show_bug.cgi?id=189417
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps.py:
(RunAPITests): Passed --json-output parameter to run-api-tests.
* BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
2018-09-07 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r235784.
https://bugs.webkit.org/show_bug.cgi?id=189421
RunLoopCF does not agree to the fix (Requested by yusukesuzuki
on #webkit).
Reverted changeset:
"[RunLoopGeneric] OneShotTimer should be inactive when fired."
https://bugs.webkit.org/show_bug.cgi?id=189335
https://trac.webkit.org/changeset/235784
2018-09-07 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com>
[RunLoopGeneric] OneShotTimer should be inactive when fired.
https://bugs.webkit.org/show_bug.cgi?id=189335
Reviewed by Yusuke Suzuki.
* TestWebKitAPI/Tests/WTF/RunLoop.cpp:
(TestWebKitAPI::TEST):
Add test expectations about timer's active state.
Add a new test to restart a one-shot timer within
its fired callback.
2018-09-06 Zalan Bujtas <zalan@apple.com>
[LFC] Add support for min/max-height percentage values.
https://bugs.webkit.org/show_bug.cgi?id=189391
Reviewed by Antti Koivisto.
* LayoutReloaded/misc/LFC-passing-tests.txt:
2018-09-06 Simon Fraser <simon.fraser@apple.com>
Log when leak detection changes the test result
https://bugs.webkit.org/show_bug.cgi?id=189293
Reviewed by Jon Lee.
When you have an "Leak" expectation in TestExpectations, it's confusing to see a test unexpectedly pass,
but then show up as an expected fail at the end (because leak detection happens at the end of a shard).
So log when leak detection changes a test result.
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner._annotate_results_with_additional_failures):
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectations):
2018-09-06 Wenson Hsieh <wenson_hsieh@apple.com>
[macOS] [WK2] Support changing attributes for selected text (text shadow, underline, strike-through)
https://bugs.webkit.org/show_bug.cgi?id=189356
<rdar://problem/44185674>
Reviewed by Tim Horton.
Adds a new API test to verify that some font attributes (text shadow, underline, and strike-through) can be
added and removed using NSFontPanel.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/FontManagerTests.mm:
Add the new API test.
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/mac/NSFontPanelTesting.h: Added.
* TestWebKitAPI/mac/NSFontPanelTesting.mm: Added.
Introduce a new file that extends NSFontPanel with some additional testing functionality. This includes the
ability to interact with the text shadow toggle button, choose the text shadow blur radius and opacity, and
change underline and strike-through styles.
(findSubviewOfClass):
(findMenuItemWithTitle):
(-[NSFontPanel fontEffectsBox]):
NSFontEffectsBox (an internal AppKit class) is the sender in the case where -changeAttributes: is invoked
through interaction with the font panel. To simulate this for testing, grab this font effects box and pass it
directory to -changeAttributes:.
(-[NSFontPanel chooseUnderlineMenuItemWithTitle:]):
(-[NSFontPanel chooseStrikeThroughMenuItemWithTitle:]):
The supported values for these menu items are "none" and "single", which adds a single underline or
strike-through to selected text. We grab these menu items by asking for the font panel's NSToolbar, and finding
the relevant menu items via toolbar item identifiers.
(-[NSFontPanel _didChangeAttributes]):
(-[NSFontPanel shadowBlurSlider]):
(-[NSFontPanel shadowOpacitySlider]):
(-[NSFontPanel shadowToggleButton]):
(-[NSFontPanel toggleShadow]):
(-[NSFontPanel shadowOpacity]):
(-[NSFontPanel setShadowOpacity:]):
(-[NSFontPanel shadowBlur]):
(-[NSFontPanel setShadowBlur:]):
(-[NSFontPanel _toolbarItemWithIdentifier:]):
2018-09-06 Simon Fraser <simon.fraser@apple.com>
run-webkit-tests prints confusing messages when test expectations list results that are not compatible with the run options
https://bugs.webkit.org/show_bug.cgi?id=189219
Reviewed by Jon Lee.
If you call run-webkit-tests without --pixel-tests, and a non-ref test is marked as ImageOnlyFailure,
it will be reported as unexpectedly passing. This is more confusing if you run without --world-leaks, yet
tests are marked as [ Leak ] in TestExpectations.
Fix by filtering out expectations that don't apply given the run options. So without --pixel-tests,
a non-ref ImageOnlyFailure becomes a Pass, and without --world-leaks, a Leak becomes a Pass.
Add various unit tests to test the various combinations.
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner._update_summary_with_result):
(LayoutTestRunner._annotate_results_with_additional_failures):
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
(LayoutTestRunnerTests.test_update_summary_with_result):
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationsModel.get_expectations_or_pass):
(TestExpectationsModel):
(TestExpectationsModel.expectations_to_string):
(TestExpectationsModel.get_expectations_string):
(TestExpectations.filtered_expectations_for_test):
(TestExpectations):
(TestExpectations.matches_an_expected_result):
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(summarize_results):
* Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
(summarized_results):
(SummarizedResultsTest.setUp):
(SummarizedResultsTest.test_summarized_results_include_passes):
(SummarizedResultsTest):
(SummarizedResultsTest.test_summarized_results_world_leaks_disabled):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
* Scripts/webkitpy/layout_tests/views/buildbot_results_unittest.py:
(BuildBotPrinterTests.test_print_unexpected_results):
(BuildBotPrinterTests.test_print_unexpected_results_with_options):
(BuildBotPrinterTests.test_print_results):
* Scripts/webkitpy/port/test.py:
(unit_test_list):
2018-09-06 Zalan Bujtas <zalan@apple.com>
[LFC][BFC] Add support for min(max)-height
https://bugs.webkit.org/show_bug.cgi?id=189377
Reviewed by Antti Koivisto.
* LayoutReloaded/misc/LFC-passing-tests.txt:
2018-09-06 Dewei Zhu <dewei_zhu@apple.com>
BenchmarkResults.format should support specifying depth of tests to show.
https://bugs.webkit.org/show_bug.cgi?id=189135
Reviewed by Ryosuke Niwa.
Added the option to specify the depth of tests to show.
* Scripts/webkitpy/benchmark_runner/benchmark_results.py:
(BenchmarkResults):
(BenchmarkResults.format): Added 'max_depth' option.
(BenchmarkResults._format_tests): Added unit tests for 'max_depth'.
2018-09-06 Simon Fraser <simon.fraser@apple.com>
An EWS run that has leak test failures does not correctly add bugzilla comments showing the failures
https://bugs.webkit.org/show_bug.cgi?id=189368
Reviewed by Alexey Proskuryakov.
Include FailureDocumentLeak in ALL_FAILURE_CLASSES (with a fairly redundant test),
which should fix EWS showing leaks in Bugzilla.
* Scripts/webkitpy/layout_tests/models/test_failures.py:
(FailureDocumentLeak.__init__):
* Scripts/webkitpy/layout_tests/models/test_failures_unittest.py:
(TestFailuresTest.test_all_failure_classes):
2018-09-06 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r235755.
https://bugs.webkit.org/show_bug.cgi?id=189367
Didn't address the review comment (Requested by rniwa on
#webkit).
Reverted changeset:
"BenchmarkResults.format should support specifying depth of
tests to show."
https://bugs.webkit.org/show_bug.cgi?id=189135
https://trac.webkit.org/changeset/235755
2018-08-29 Dewei Zhu <dewei_zhu@apple.com>
BenchmarkResults.format should support specifying depth of tests to show.
https://bugs.webkit.org/show_bug.cgi?id=189135
Reviewed by Ryosuke Niwa.
Added the option to specify the depth of tests to show.
* Scripts/webkitpy/benchmark_runner/benchmark_results.py:
(BenchmarkResults):
(BenchmarkResults.format): Added 'max_depth' option.
(BenchmarkResults._format_tests): Added unit tests for 'max_depth'.
2018-09-06 Thomas Denney <tdenney@apple.com>
[WHLSL] Call arguments should be copied as soon as they are evaluated
https://bugs.webkit.org/show_bug.cgi?id=189360
Reviewed by Myles C. Maxfield.
Previously all call arguments were evaluated and then their results were
copied into new buffers for the call. However, the results are not
necessarily independent, so the result should be copied immediately
after evaluation.
* WebGPUShadingLanguageRI/Evaluator.js:
(Evaluator.prototype.visitCallExpression): Move location of copy.
(Evaluator):
* WebGPUShadingLanguageRI/Test.js: Add new test to verify correct
behavior.
2018-09-06 Thomas Denney <tdenney@apple.com>
[WHLSL] The test suite should log the compile time for the standard library
https://bugs.webkit.org/show_bug.cgi?id=189354
Reviewed by Myles C. Maxfield.
The test suite previously only logged the time for test execution, and
not the compile time for the standard library.
* WebGPUShadingLanguageRI/Test.js:
2018-09-06 Wenson Hsieh <wenson_hsieh@apple.com>
[macOS] Cannot change font size at selection until font panel is shown
https://bugs.webkit.org/show_bug.cgi?id=189295
<rdar://problem/35593389>
Reviewed by Ryosuke Niwa.
Add API tests to simulate using menu items to increase or decrease font size, and also simulate using
NSFontPanel to specify the font family, font size, and other traits.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/FontManagerTests.mm: Added.
(-[TestWKWebView selectedText]):
(-[TestWKWebView selectNextWord]):
(-[TestWKWebView stylePropertyAtSelectionStart:]):
(-[TestWKWebView stylePropertyAtSelectionEnd:]):
(webViewForFontManagerTesting):
(menuItemCellForFontAction):
(TestWebKitAPI::TEST):
2018-09-06 Zalan Bujtas <zalan@apple.com>
[LFC][BFC] Add support for min(max)-width
https://bugs.webkit.org/show_bug.cgi?id=189358
Reviewed by Antti Koivisto.
* LayoutReloaded/misc/LFC-passing-tests.txt:
2018-09-06 Myles C. Maxfield <mmaxfield@apple.com>
[WHLSL] The parser is too slow
https://bugs.webkit.org/show_bug.cgi?id=189014
Reviewed by Filip Pizlo.
This patch includes three changes:
1. Migrate from using try/catch to simply returning the WSyntaxError. This means that
each parser call has to check for this sentinel value. The lexer still can throw if
it encounters an unknown token or an unmatched "/*" token (which is rare).
2. After removing try/catch, making the sentinel values not inherit from Error (the
Error constructor was taking lots of time)
3. Previously, every time the parser failed (which is many times per expression) it was
running a regex over the entire source text to figure out where the error occurred.
Instead, we can preprocess the text string to find these line numbers ahead of time.
Together, these make the parser 75x faster. Parsing the standard library goes from 2.5
hours down to 2 minutes. Because it's now a reasonable length, this patch uncomments
the bulk of the standard library.
* WebGPUShadingLanguageRI/All.js:
* WebGPUShadingLanguageRI/Lexer.js:
(Lexer):
(Lexer.prototype.lineNumberForIndex):
* WebGPUShadingLanguageRI/Parse.js:
(fail):
(backtrackingScope):
(testScope):
(genericConsume):
(consumeEndOfTypeArgs):
(parseTerm):
(parseConstexpr):
(parseTypeArguments):
(parseType.getAddressSpace):
(parseType):
(parseTypeDef):
(genericParseLeft):
(parseCallExpression.let.parseArguments):
(isCallExpression):
(parseSuffixOperator):
(parsePossibleSuffix):
(parsePreIncrement):
(parsePossiblePrefix):
(parsePossibleTernaryConditional):
(parsePossibleAssignment):
(parsePostIncrement):
(parseEffectfulExpression):
(genericParseCommaExpression):
(parseEffectfulStatement):
(parseReturn):
(parseBreak):
(parseContinue):
(parseIfStatement):
(parseWhile):
(parseFor):
(parseDo):
(parseVariableDecls):
(parseSwitchCase):
(parseSwitchStatement):
(parseStatement):
(parseBlockBody):
(parseBlock):
(parseParameter):
(parseFuncName):
(parseFuncDecl):
(parseFuncDef):
(parseField):
(parseStructType):
(parseNativeFunc):
(parseNative):
(parseRestrictedFuncDef):
(parseEnumMember):
(parseEnumType):
(parse):
* WebGPUShadingLanguageRI/SPIRV.html:
* WebGPUShadingLanguageRI/StandardLibrary.js:
(let.standardLibrary):
* WebGPUShadingLanguageRI/Test.html:
* WebGPUShadingLanguageRI/Test.js:
(checkFail.doPrep): Deleted.
* WebGPUShadingLanguageRI/WLexicalError.js: Added.
(WLexicalError):
* WebGPUShadingLanguageRI/index.html:
2018-09-06 Xan Lopez <xan@igalia.com>
[test262] Do not call keys on a reference
https://bugs.webkit.org/show_bug.cgi?id=189301
Reviewed by Keith Miller.
* Scripts/test262/Runner.pm:
(UpdateResults):
2018-09-06 David Kilzer <ddkilzer@apple.com>
svn-create-patch fails when svn mv is used on directory trees
<https://webkit.org/b/14590>
Reviewed by Daniel Bates.
* Scripts/VCSUtils.pm: Export parseSvnDiffStartLine() for
svn-create-patch.
(parseDiffStartLine): Use parseSvnDiffStartLine().
(parseGitDiffStartLine): Document a prerequisite. Fix a bug
when parsing Git patches using `git diff --no-prefix` that have
non-native line endings. Found by new tests written for
Scripts/webkitperl/VCSUtils_unittest/parseDiffStartLine.pl.
(parseSvnDiffStartLine): Add. Extract logic from
parseDiffStartLine() for use with svn-create-patch.
* Scripts/svn-create-patch: Update copyright and license.
(generateDiff): Return early for moved directories since
individual files within the directory are handled separately.
(generateFileList): Keep track of moved directories in the
@additionWithHistoryDirectories array, then process this array
in reverse order to create delete/add patches for each file in
a moved directory. This also prevents duplicate patches.
(manufacturePatchForAdditionWithHistory): Fix a long-standing
bug where the path used to describe property changes contained
the original (moved-from) path instead of the new (moved-to)
path. This could cause svn-apply to fail mysteriously when
trying to apply an empty patch created by the property change
containing the moved-from path.
* Scripts/webkitperl/VCSUtils_unittest/parseDiffStartLine.pl: Add.
Tests for parseDiffStartLine(), parseGitDiffStartLine() and
parseSvnDiffStartLine().
2018-09-05 Don Olmstead <don.olmstead@sony.com>
[CMake] Allow port specific options on gtest
https://bugs.webkit.org/show_bug.cgi?id=189313
Reviewed by Alex Christensen.
Use the global property set by the gtest CMake file to add to the
compilation definitions for TestWebKitAPI rather than repeating the
logic.
* TestWebKitAPI/CMakeLists.txt:
2018-09-05 Woodrow Wang <woodrow_wang@apple.com>
Add infrastructure to dump resource load statistics
https://bugs.webkit.org/show_bug.cgi?id=189213
Reviewed by Daniel Bates.
The dumping functionality is not currently used, but will be included in tests for
<https://bugs.webkit.org/show_bug.cgi?id=187773>.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setDumpResourceLoadStatistics):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::resourceStatisticsStringResultCallback):
(WTR::TestController::dumpResourceLoadStatistics):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::dumpResults):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::setDumpResourceLoadStatistics):
* WebKitTestRunner/TestInvocation.h:
2018-09-05 Wenson Hsieh <wenson_hsieh@apple.com>
[macOS] DragAndDropTests.ExposeMultipleURLsInDataTransfer fails on macOS versions prior to Mojave
https://bugs.webkit.org/show_bug.cgi?id=189315
Reviewed by Tim Horton.
Fix the test failure by explicitly enabling custom pasteboard data.
* TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
(TEST):
2018-09-05 Woodrow Wang <woodrow_wang@apple.com>
Added runtime feature flag for web API statistics
https://bugs.webkit.org/show_bug.cgi?id=189211
Reviewed by Daniel Bates.
Added functionality to set the runtime flag with a JavaScript exposed function
for testing.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setWebAPIStatisticsEnabled):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
2018-09-05 Ross Kirsling <ross.kirsling@sony.com>
Add WinCairo to bot watcher's dashboard.
https://bugs.webkit.org/show_bug.cgi?id=189273
Reviewed by Aakash Jain.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Windows10.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Windows10@2x.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
(table.queue-grid tr.platform.windows-10 img.logo): Added.
(table.queue-grid tr.platform.windows-8 img.logo): Deleted.
(table.queue-grid tr.platform.windows-xp img.logo): Deleted.
Add Win10 section to dashboard. Remove unused WinXP and Win8 sections.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
(BubbleQueueServer):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot):
Add WinCairo build, test, and EWS bots to Win10 section of dashboard.
2018-09-05 David Kilzer <ddkilzer@apple.com>
REGRESSION (r209470): EditingHistory folder is missing in EditingHistory Xcode project
Found using `tidy-Xcode-project-file --missing` (see Bug
188754). Fixes were made manually.
* EditingHistory/EditingHistory.xcodeproj/project.pbxproj:
(EditingHistory): Change the path of the folder to
"EditingHistory", then remove the now-redundant name.
(EditingHistory/Resources/DumpEditingHistory.js): Remove
redundant file reference since another file reference exists at
the top of the project file list, and that file reference is the
one used in the "Copy Bundle Resources" build phase.
(EditingHistory/Resources/EditingHistoryUtil.js): Ditto.
2018-09-05 David Kilzer <ddkilzer@apple.com>
REGRESSION (r160736): Bundle folder is missing in MiniBrowser Xcode project
Found using `tidy-Xcode-project-file --missing` (see Bug
188754). Folder fix was made manually.
* MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj:
(Bundle): Change the path of the folder to "mac/Bundle", and set
the name back to "Bundle".
(Bundle/Info.plist): Change file reference to be relative to its
group. Accomplished using Xcode after fixing the folder path.
(Bundle/MiniBrowserBundle_Prefix.pch): Ditto.
2018-09-05 David Kilzer <ddkilzer@apple.com>
REGRESSION (r184033): ContentExtensionTester folder is missing in ContentExtensionTester Xcode project
Found using `tidy-Xcode-project-file --missing` (see Bug
188754). Fixes were made manually.
* ContentExtensionTester/ContentExtensionTester.xcodeproj/project.pbxproj:
(ContentExtensionTester): Change the path of the folder to map
to "." (which exists and is where main.m is located), and then
set the folder's name back to "ContentExtensionTester".
(main.m): Change file reference to be relative to its group now
that the group's path is fixed.
2018-09-04 Don Olmstead <don.olmstead@sony.com>
Add generic entrypoint and run loop in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=189287
Reviewed by Michael Catanzaro.
The implementations in jsconly are platform agnostic.
* TestWebKitAPI/PlatformJSCOnly.cmake:
Use the glib implementation of Utilities when using that as a run loop
otherwise use the generic implementation.
* TestWebKitAPI/PlatformUtilities.h:
Remove repeated entries from Utilities.h.
* TestWebKitAPI/PlatformWPE.cmake:
Use the generic main.cpp.
* TestWebKitAPI/generic/UtilitiesGeneric.cpp: Renamed from Tools/TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp.
(TestWebKitAPI::Util::run):
(TestWebKitAPI::Util::spinRunLoop):
Moved to a generic implementation and added spinRunLoop.
* TestWebKitAPI/generic/main.cpp: Renamed from Tools/TestWebKitAPI/jsconly/main.cpp.
Share between JSCOnly and WPE
* TestWebKitAPI/wpe/main.cpp: Removed.
2018-09-04 Don Olmstead <don.olmstead@sony.com>
[CMake] Make TestWebKitAPI dependencies explicit
https://bugs.webkit.org/show_bug.cgi?id=189282
Reviewed by Fujii Hironori.
The config.h file includes files from JSC, WebCore and WebKit which
places a dependency on those headers even when just building TestWTF.
This makes the depedencies explicit for all CMake ports and shoud
remove any race conditions that can be encountered when building tests.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/PlatformWin.cmake:
2018-09-04 Wenson Hsieh <wenson_hsieh@apple.com>
Populate "text/uri-list" with multiple URLs when the pasteboard contains multiple URLs
https://bugs.webkit.org/show_bug.cgi?id=188890
<rdar://problem/43648605>
Reviewed by Tim Horton.
* DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
(-[LocalPasteboard pasteboardItems]):
Implement this method to avoid crashing when running layout tests that access the pasteboard.
* TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
Add a test to verify that on macOS and iOS, multiple URLs dropped onto the page are accessible via
"text/uri-list".
* TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
Add a test that exercises 5 different ways to write one or more URLs to the pasteboard on macOS; in all cases,
the URLs written to the pasteboard should be exposed to the page via "text/uri-list". In all of these different
cases, the results of using `-[NSPasteboardItem stringForType:]`, `-[NSURL URLFromPasteboard:]` and
`-[NSPasteboard stringForType:]` will yield different results, so the purpose of this API test is to ensure that
our logic for grabbing a list of URLs from the pasteboard on macOS is robust enough to handle all of these
different behaviors.
* TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
Add a test to verify that on iOS, using `-[UIPasteboard setURLs:]` to write to multiple URLs to the pasteboard
and then pasting results in "text/uri-list" exposing a list of all the URLs written to the pasteboard.
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
(-[LocalPasteboard pasteboardItems]):
Implement this method to avoid crashing when running layout tests that access the pasteboard.
2018-09-04 Simon Fraser <simon.fraser@apple.com>
REGRESSION(r235408): GTK bots exiting early
https://bugs.webkit.org/show_bug.cgi?id=189063
Reviewed by Michael Catanzaro.
WebKitTestRunner was running the world leak checks even when run without --world-leaks,
causing GTK bot timeouts. So guard updateLiveDocumentsAfterTest(), checkForWorldLeaks()
and findAndDumpWorldLeaks() with m_checkForWorldLeaks checks, and in
TestController::handleControlCommand() print a message if the control script sends the
"#CHECK FOR WORLD LEAKS" command if WTR was not run with --world-leaks.
I tested that running with --world-leaks still works.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::updateLiveDocumentsAfterTest):
(WTR::TestController::checkForWorldLeaks):
(WTR::TestController::findAndDumpWorldLeaks):
(WTR::TestController::handleControlCommand):
(WTR::TestController::run):
2018-09-04 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewed follow-up to r235635
https://bugs.webkit.org/show_bug.cgi?id=188940
Use "let" variables instead of "var" variables.
* WebGPUShadingLanguageRI/StandardLibrary.js:
(let.standardLibrary):
2018-09-04 Myles C. Maxfield <mmaxfield@apple.com>
[WHLSL] Implement texture types
https://bugs.webkit.org/show_bug.cgi?id=188940
Rubber-stamped by Dean Jackson.
Implement the texture types and operations. This includes Sample(), Load(), Store(), Gather(), and GetDimensions().
These functions were implemented according to section 15 of the Vulkan 1.1.83 spec, which lists each operation
and how to compute its results.
* WebGPUShadingLanguageRI/All.js:
* WebGPUShadingLanguageRI/Casts.js: Moved from Intrinsics. The texture operations need to cast too, so these are
moved into a common location.
(cast):
(bitwiseCast):
(castToUchar):
(castToUshort):
(castToUint):
(castToChar):
(castToShort):
(castToInt):
(castToHalf):
(castToFloat):
* WebGPUShadingLanguageRI/Intrinsics.js: Use Casts.js and call into TextureOperations.js.
(Intrinsics.):
(Intrinsics.checkFalse):
(Intrinsics.boxVector):
(Intrinsics.unboxVector):
(Intrinsics):
(Intrinsics.cast): Deleted.
(Intrinsics.bitwiseCast): Deleted.
(Intrinsics.castToHalf): Deleted.
* WebGPUShadingLanguageRI/SPIRV.html:
* WebGPUShadingLanguageRI/Sampler.js: Added. Represent the Sampler type.
(Sampler):
(Sampler.prototype.get rAddressMode):
(Sampler.prototype.get sAddressMode):
(Sampler.prototype.get tAddressMode):
(Sampler.prototype.get minFilter):
(Sampler.prototype.get magFilter):
(Sampler.prototype.get mipmapFilter):
(Sampler.prototype.get lodMinClamp):
(Sampler.prototype.get lodMaxClamp):
(Sampler.prototype.get maxAnisotropy):
(Sampler.prototype.get compareFunction):
(Sampler.prototype.get borderColor):
(Sampler.prototype.calculateBorderColor.computeValues):
(Sampler.prototype.calculateBorderColor):
* WebGPUShadingLanguageRI/StandardLibrary.js: Update the standard library. Some of the functions were
either missing or wrong.
(let.standardLibrary):
* WebGPUShadingLanguageRI/Test.html:
* WebGPUShadingLanguageRI/Test.js: Test many, many combinations of the texture operations.
(makeSampler):
(make1DTexture):
(make1DTextureArray):
(make2DTexture):
(make2DTextureArray):
(make3DTexture):
(makeTextureCube):
(makeRW1DTexture):
(makeRW1DTextureArray):
(makeRW2DTexture):
(makeRW2DTextureArray):
(makeRW3DTexture):
(make2DDepthTexture):
(make2DDepthTextureArray):
(makeDepthTextureCube):
(makeRW2DDepthTexture):
(makeRW2DDepthTextureArray):
(checkFloat4):
* WebGPUShadingLanguageRI/Texture.js: Added. Represents each of the texture types.
(Texture):
(Texture.prototype.get dimension):
(Texture.prototype.get width):
(Texture.prototype.get height):
(Texture.prototype.get depth):
(Texture.prototype.get levelCount):
(Texture.prototype.get layerCount):
(Texture.prototype.get innerType):
(Texture.prototype.get data):
(Texture.prototype.elementChecked):
(Texture.prototype.setElementChecked):
(Texture1D):
(Texture1D.prototype.widthAtLevel):
(Texture1D.prototype.heightAtLevel):
(Texture1D.prototype.depthAtLevel):
(Texture1D.prototype.element):
(Texture1D.prototype.setElement):
(Texture1DArray):
(Texture1DArray.prototype.widthAtLevel):
(Texture1DArray.prototype.heightAtLevel):
(Texture1DArray.prototype.depthAtLevel):
(Texture1DArray.prototype.element):
(Texture1DArray.prototype.setElement):
(Texture2D):
(Texture2D.prototype.widthAtLevel):
(Texture2D.prototype.heightAtLevel):
(Texture2D.prototype.depthAtLevel):
(Texture2D.prototype.element):
(Texture2D.prototype.setElement):
(Texture2DArray):
(Texture2DArray.prototype.widthAtLevel):
(Texture2DArray.prototype.heightAtLevel):
(Texture2DArray.prototype.depthAtLevel):
(Texture2DArray.prototype.element):
(Texture2DArray.prototype.setElement):
(Texture3D):
(Texture3D.prototype.widthAtLevel):
(Texture3D.prototype.heightAtLevel):
(Texture3D.prototype.depthAtLevel):
(Texture3D.prototype.element):
(Texture3D.prototype.setElement):
(TextureCube):
(TextureCube.prototype.widthAtLevel):
(TextureCube.prototype.heightAtLevel):
(TextureCube.prototype.depthAtLevel):
(TextureCube.prototype.element):
(TextureCube.prototype.setElement):
(Texture1DRW):
(Texture1DRW.prototype.widthAtLevel):
(Texture1DRW.prototype.heightAtLevel):
(Texture1DRW.prototype.depthAtLevel):
(Texture1DRW.prototype.element):
(Texture1DRW.prototype.setElement):
(Texture1DArrayRW):
(Texture1DArrayRW.prototype.widthAtLevel):
(Texture1DArrayRW.prototype.heightAtLevel):
(Texture1DArrayRW.prototype.depthAtLevel):
(Texture1DArrayRW.prototype.element):
(Texture1DArrayRW.prototype.setElement):
(Texture2DRW):
(Texture2DRW.prototype.widthAtLevel):
(Texture2DRW.prototype.heightAtLevel):
(Texture2DRW.prototype.depthAtLevel):
(Texture2DRW.prototype.element):
(Texture2DRW.prototype.setElement):
(Texture2DArrayRW):
(Texture2DArrayRW.prototype.widthAtLevel):
(Texture2DArrayRW.prototype.heightAtLevel):
(Texture2DArrayRW.prototype.depthAtLevel):
(Texture2DArrayRW.prototype.element):
(Texture2DArrayRW.prototype.setElement):
(let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW):
(let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.widthAtLevel):
(let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.heightAtLevel):
(let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.depthAtLevel):
(let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.element):
(let.TextureDepth2DArrayRW.Texture2DArrayRW.Texture3DRW.prototype.setElement):
* WebGPUShadingLanguageRI/TextureOperations.js: Added. This implements the texture operations
as described in section 15 of the Vulkan 1.1.83 spec.
(depthCompareOperation):
(conversionToRGBA):
(projectionOperation):
(cubeMapFaceSelection):
(cubeMapCoordinateTransformation):
(cubeMapDerivativeTransformation):
(scaleFactorOperation):
(levelOfDetailOperation):
(nearest):
(imageLevelSelection):
(strqaToUVWATransformation):
(rne):
(uvwaToIJKLNTransformationAndArrayLayerSelection):
(integerTexelCoordinateOperations):
(mirror):
(transform):
(wrappingOperation):
(calculateLambda):
(shouldBeBorder):
(accessColor):
(computeTau):
(reduce):
(texelGathering):
(computeColorFromLevel):
(texelFiltering):
(castToInnerTypeForGather):
(gatherTexture):
(castToInnerType):
(sampleTexture):
* WebGPUShadingLanguageRI/index.html:
2018-09-04 Alexey Proskuryakov <ap@apple.com>
Removing an accidentally committed debugging print.
* Scripts/run-leaks: (runLeaks)
2018-09-04 Alexey Proskuryakov <ap@apple.com>
run-leaks should run leaks with --list (on Mojave)
https://bugs.webkit.org/show_bug.cgi?id=187716
<rdar://problem/42261676>
Reviewed by Lucas Forschler.
Also enabled dumping memgraphs. We'll be pruning these aggressively, as they take
significant space.
* Scripts/run-leaks:
(main): Added an option to store memgraphs.
(runLeaks): As there is no way to test whether the new format is supported in advance,
we have to try with --list first, and retry if that fails. Also, made leaks operate
on a memgraph file if we are saving it anyway.
* Scripts/webkitpy/port/leakdetector.py:
(LeakDetector._leaks_args): Pass --memgraph-file to run-leaks.
(LeakDetector.leaks_file_name): Removed an incorrect comment.
(LeakDetector.memgraph_file_name): Added.
(LeakDetector.check_for_leaks): Changed how arguments are passed to _leaks_args.
It is a bit ugly that leaks path ends up being computed twice, but this is the least
ugly approach that I could find.
* Scripts/webkitpy/port/leakdetector_unittest.py: Updated for _leaks_args changes.
2018-09-04 Chris Dumez <cdumez@apple.com>
Add process pool configuration flag to turn on automatic process pre-warming
https://bugs.webkit.org/show_bug.cgi?id=189263
<rdar://problem/44101941>
Reviewed by Antti Koivisto.
Add API test coverage.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/ProcessPreWarming.mm: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm.
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
* TestWebKitAPI/Tests/WebKitCocoa/SetMaximumPrewarmedProcessCount.mm: Removed.
2018-09-04 Keith Miller <keith_miller@apple.com>
Perl doesn't like calling keys on a reference
https://bugs.webkit.org/show_bug.cgi?id=189261
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(UpdateResults):
2018-09-04 Jer Noble <jer.noble@apple.com>
REGRESSION (r234081): TestWebKitAPI.VideoControlsManager.VideoControlsManagerAudioElementFollowingUserInteraction is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=187972
<rdar://problem/42667737>
Reviewed by Darin Adler.
Ensure that listeners are added in time to catch messages broadcast at them.
* TestWebKitAPI/Tests/WebKitCocoa/VideoControlsManager.mm:
(TestWebKitAPI::TEST):
2018-09-04 Ross Kirsling <ross.kirsling@sony.com>
Update googletest
https://bugs.webkit.org/show_bug.cgi?id=175722
Reviewed by Brent Fulgham.
* TestWebKitAPI/config.h:
Instead of modifying the gtest source, add the necessary WTF includes here.
* TestWebKitAPI/Configurations/Base.xcconfig
Remove obsoleted definitions GTEST_HAS_TR1_TUPLE=0 and GTEST_HAS_RTTI=0.
2018-09-03 Pablo Saavedra <psaavedra@igalia.com>
[WPE] Add more WPE bots to dashboard
https://bugs.webkit.org/show_bug.cgi?id=189245
Reviewed by Daniel Bates.
There are two missing bots which are not listed in the dashboard for
a while: WPE Linux 64-bit Debug (Build) and WPE Linux 64-bit Debug (Tests)
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot):
2018-09-01 Michael Catanzaro <mcatanzaro@igalia.com>
[WPE] 2.21.91 fails to build with ENABLE_MINIBROWSER
https://bugs.webkit.org/show_bug.cgi?id=189006
Reviewed by Darin Adler.
The MiniBrowser source code is missing from the tarball. Oops! Add it.
* wpe/manifest.txt.in:
2018-09-01 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com>
[WinCairo] Add CryptoDigestOpenSSL
https://bugs.webkit.org/show_bug.cgi?id=188978
Reviewed by Darin Adler.
Add API tests for the PAL::CryptoDigest class.
* TestWebKitAPI/PlatformWin.cmake:
Add CryptoDigest.cpp to TestWebCoreLib_Sources.
Define -DSTATICALLY_LINKED_WITH_PAL=1 to avoid warnings since
without the definition the functions marked with PAL_EXPORT are supposed to be
imported from another shared library, but as it is, TestWebCoreLib
links PAL statically.
* TestWebKitAPI/Tests/WebCore/CryptoDigest.cpp: Added.
(TestWebKitAPI::toHex):
(TestWebKitAPI::expect):
(TestWebKitAPI::expectSHA1):
(TestWebKitAPI::expectSHA224):
(TestWebKitAPI::expectSHA256):
(TestWebKitAPI::expectSHA384):
(TestWebKitAPI::expectSHA512):
(TestWebKitAPI::TEST):
2018-09-01 Dan Bernstein <mitz@apple.com>
[Cocoa] Crash using KVO for 'serverTrust' property of WKWebView - "this class is not key value coding-compliant for the key serverTrust"
https://bugs.webkit.org/show_bug.cgi?id=189222
<rdar://problem/33283179>
Reviewed by Sam Weinig.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebViewServerTrustKVC.mm: Added.
(TEST):
2018-08-31 Aditya Keerthi <akeerthi@apple.com>
Unreviewed, add an alternate email for Aditya Keerthi.
* Scripts/webkitpy/common/config/contributors.json:
2018-08-31 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Consolidate the implementations of readString, stringForType, and readURL in PlatformPasteboardIOS.mm
https://bugs.webkit.org/show_bug.cgi?id=189054
<rdar://problem/43819779>
Reviewed by Tim Horton.
See WebCore/ChangeLog for more detail.
* TestWebKitAPI/Tests/WebKitCocoa/CopyURL.mm:
(createWebViewWithCustomPasteboardDataEnabled):
2018-08-31 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r235565.
https://bugs.webkit.org/show_bug.cgi?id=189212
Broke the WHLSL build (Requested by litherum on #webkit).
Reverted changeset:
"[WHLSL] Remove useless code in NameResolver"
https://bugs.webkit.org/show_bug.cgi?id=189176
https://trac.webkit.org/changeset/235565
2018-08-31 Myles C. Maxfield <mmaxfield@apple.com>
[WHLSL] Remove useless code in NameResolver
https://bugs.webkit.org/show_bug.cgi?id=189176
Reviewed by Dean Jackson and Thomas Denney.
The check will always pass becase the standard library contains at least one function with the correct name.
* WebGPUShadingLanguageRI/NameResolver.js:
(NameResolver.prototype.visitDotExpression):
(NameResolver.prototype._handlePropertyAccess): Deleted.
(NameResolver.prototype.visitIndexExpression): Deleted.
2018-08-31 Simon Fraser <simon.fraser@apple.com>
Make it possible to mark tests as leaks in TestExpectations
https://bugs.webkit.org/show_bug.cgi?id=189088
Reviewed by Jon Lee.
Have webkitpy parse out "Leak" expectations in TestExpectations, and do the right
thing if the test run did not use --world-leaks. Add unit tests for leaks combined
with various other result combinations.
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner._update_summary_with_result):
(LayoutTestRunner._annotate_results_with_additional_failures):
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser):
(TestExpectations): The 'Leak' line was duplicated here, so remove a copy.
(TestExpectations.remove_leak_failures):
(TestExpectations.matches_an_expected_result):
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
(Base.get_basic_tests):
* Scripts/webkitpy/port/test.py:
(TestList.add_reftest):
(unit_test_list):
2018-08-31 Zalan Bujtas <zalan@apple.com>
[LFC] Add margin box verification back now that Display::Box has non-computed horizontal margin.
https://bugs.webkit.org/show_bug.cgi?id=189193
Reviewed by Antti Koivisto.
* LayoutReloaded/misc/LFC-passing-tests.txt:
2018-08-31 Antti Koivisto <antti@apple.com>
Replace OptionSet |= and -= operators with add() and remove() functions
https://bugs.webkit.org/show_bug.cgi?id=189169
Reviewed by Anders Carlsson.
* TestWebKitAPI/Tests/WTF/OptionSet.cpp:
(TestWebKitAPI::TEST):
2018-08-31 Daniel Bates <dabates@apple.com>
lldb-webkit: KeyError thrown for OptionSet with invalid value
https://bugs.webkit.org/show_bug.cgi?id=189070
Update comment to explain that we return early and do not compute the set of enumerators in the
OptionSet when the underlying value of the set is an invalid value.
Additionally, update the change log entry for r235482 to reflect the updated title for the bug
and to better describe the change that was made.
* lldb/lldb_webkit.py:
(WTFOptionSetProvider.update):
2018-08-31 David Kilzer <ddkilzer@apple.com>
WebKitLauncher: Move WebKitLauncher.entitlements into Configurations directory
This makes the Configurations folder in the Xcode project match
what's in the Configurations directory on disk. Found by
tidy-Xcode-project-file (see Bug 188754).
* WebKitLauncher/Configurations/WebKitLauncher.entitlements: Rename from Tools/WebKitLauncher/WebKitLauncher.entitlements.
* WebKitLauncher/WebKitLauncher.xcodeproj/project.pbxproj:
- Update project for file move.
2018-08-31 David Kilzer <ddkilzer@apple.com>
WebKitLauncher: Fix build failures
* WebKitLauncher/Configurations/Base.xcconfig:
(ARCHS): Use $(ARCHS_STANDARD_32_64_BIT).
(MACOSX_DEPLOYMENT_TARGET): Update from Snow Leopard to Sierra.
* WebKitLauncher/WebKitNightlyEnabler.m:
(myApplicationWillFinishLaunching):
* WebKitLauncher/main.m:
(displayErrorAndQuit):
(locateSafariBundle):
- Use pragma to ignore deprecation warnings.
2018-08-31 David Kilzer <ddkilzer@apple.com>
MobileMiniBrowser: Move test2s.mp4 into Resources directory
This makes the Resources folder in the Xcode project match
what's in the Resources directory on disk. Found by
tidy-Xcode-project-file (see Bug 188754).
* MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
- Update project for file move.
* MobileMiniBrowser/MobileMiniBrowserFramework/Resources/test2s.mp4: Rename from Tools/MobileMiniBrowser/MobileMiniBrowserFramework/test2s.mp4.
2018-08-31 Frederic Wang <fwang@igalia.com>
Bug 182053 - [CSSOM View] Implement standard behavior for scrollingElement
https://bugs.webkit.org/show_bug.cgi?id=182053
Reviewed by Simon Fraser.
Add FIXMEs comments to add the new developer flag in the future and disable it for now.
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
2018-08-30 Thomas Denney <tdenney@apple.com>
[WHLSL] Fix array indexing behavior
https://bugs.webkit.org/show_bug.cgi?id=189175
Array, pointer, and array ref types are now parsed and then constructed
in reverse so that the declaration order matches the indexing order, as
in C/C++.
Reviewed by Myles C. Maxfield.
* WebGPUShadingLanguageRI/Parse.js:
(parseType):
* WebGPUShadingLanguageRI/Test.js:
2018-08-30 Wenson Hsieh <wenson_hsieh@apple.com>
Followup to [iOS] TestWebKitAPI.PasteImage tests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=185965
Reviewed by Andy Estes.
The first attempt to fix these flaky tests on iOS caused timeouts on macOS while waiting for a "loaded" message
from the page. To (hopefully) fix this across both platforms, make sure that we first register our script
message handlers in the UI process *before* evaluating script that could propagate the script message.
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
(-[TestWKWebView waitForMessage:afterEvaluatingScript:]):
(TEST):
2018-08-30 Thomas Denney <tdenney@apple.com>
[WHLSL] Implement tests to verify array indexing order matches our desires
https://bugs.webkit.org/show_bug.cgi?id=189099
Reviewed by Myles C. Maxfield.
* WebGPUShadingLanguageRI/Test.js: Add new test for array indexing order
and the option to explicitly disable tests (this test is disabled by
default).
* WebGPUShadingLanguageRI/TypeRef.js:
(TypeRef.wrap): Fixes typo.
2018-08-30 Sihui Liu <sihui_liu@apple.com>
WKNavigation.ProcessCrashDuringCallback is failing on iOS
https://bugs.webkit.org/show_bug.cgi?id=189148
Reviewed by Chris Dumez.
We should not deference WebView or we may get WKErrorWebViewInvalidated error, because
WebView could be destroyed before Web Process termination is noticed.
* TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
(TEST):
2018-08-30 Zalan Bujtas <zalan@apple.com>
[LFC][Floating] Formatting context roots avoid floats.
https://bugs.webkit.org/show_bug.cgi?id=189150
Reviewed by Antti Koivisto.
* LayoutReloaded/misc/LFC-passing-tests.txt:
2018-08-30 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] TestWebKitAPI.PasteImage tests are flaky failures
https://bugs.webkit.org/show_bug.cgi?id=185965
Reviewed by Andy Estes.
These tests pass reliably when run locally, but sometimes fail in automation when checking that the image
element with its "src" attribute set to a new blob URL has an empty size. It's possible that this is happening
because we're checking the size of the image element prior to image load after setting the blob URL; we can fix
this by waiting for the "load" event (which is also done in some of the other tests in this file).
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
(TEST):
2018-08-30 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed, rolling out r235114.
ostree server deleted our commits?
Reverted changeset:
"[Flatpak] Update to GNOME master runtime"
https://bugs.webkit.org/show_bug.cgi?id=188731
https://trac.webkit.org/changeset/235114
2018-08-29 Myles C. Maxfield <mmaxfield@apple.com>
[WHLSL] Test row-majorness of matrices
https://bugs.webkit.org/show_bug.cgi?id=189101
The matrix multiplication functions are temporarily commented out of the standard library,
so I've temporarily copy/pasted them into the test. Matrix multiplication is not
commutative, so it requires the right indexing order.
Reviewed by Dean Jackson and Thomas Denney.
* WebGPUShadingLanguageRI/Intrinsics.js:
* WebGPUShadingLanguageRI/StandardLibrary.js:
(let.standardLibrary):
* WebGPUShadingLanguageRI/Test.js:
2018-08-29 Jer Noble <jer.noble@apple.com>
Unreviewed test gardening; NowPlayingTest API tests require High Sierra.
* TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm:
2018-08-29 Youenn Fablet <youenn@apple.com>
Remove WebRTC legacy API implementation
https://bugs.webkit.org/show_bug.cgi?id=189040
Reviewed by Eric Carlson.
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setWebRTCLegacyAPIEnabled): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
2018-08-29 Daniel Bates <dabates@apple.com>
lldb-webkit: KeyError thrown for OptionSet with invalid value
https://bugs.webkit.org/show_bug.cgi?id=189070
Reviewed by Simon Fraser.
Do not compute what enumerators are in an OptionSet with an invalid value. A local OptionSet
variable is only considered valid when execution passes over its assignment/constructor.
The LLDB Python API does not provide a way to determine whether a variable has a valid
value (SBValue.IsValid() does not seem to check if the actual bit pattern in memory for
a variable represents a valid value). So, we use a simple heuristic: when the value of
the OptionSet is greater than the value of the bitmask with all enumerators set then we
consider the OptionSet to be invalid. When the variable obtains a valid value then LLDB
will notify us to update our state.
* lldb/lldb_webkit.py:
(WTFOptionSetProvider.update):
2018-08-29 Chris Dumez <cdumez@apple.com>
[PSON] We should only process-swap when eTLD+1 changes on navigation
https://bugs.webkit.org/show_bug.cgi?id=189090
<rdar://problem/43799225>
Reviewed by Geoffrey Garen.
Update existing PSON API tests to use different registrable domains instead of different
protocols, as we now only process-swap when the eTLD+1 (aka "registrable domain") changes.
Add test coverage to make sure that we do not process swap when eTLD+1 does not change.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2018-08-29 Youenn Fablet <youenn@apple.com>
Add a runtime flag for WebRTC unified plan
https://bugs.webkit.org/show_bug.cgi?id=189068
Reviewed by Eric Carlson.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setWebRTCUnifiedPlanEnabled):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
2018-08-29 Don Olmstead <don.olmstead@sony.com>
[CMake] Split Tools/CMakeLists.txt into platform files
https://bugs.webkit.org/show_bug.cgi?id=189093
Reviewed by Michael Catanzaro.
* CMakeLists.txt:
* PlatformGTK.cmake: Added.
* PlatformMac.cmake: Added.
* PlatformWPE.cmake: Added.
* PlatformWin.cmake: Added.
2018-08-29 Jer Noble <jer.noble@apple.com>
Muted elements do not have their Now Playing status updated when unmuted.
https://bugs.webkit.org/show_bug.cgi?id=189069
Reviewed by Eric Carlson.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/NowPlaying.mm: Added.
(userInfoHasNowPlayingApplicationPID):
(getNowPlayingClient):
(getNowPlayingClientPid):
(NowPlayingTest::webView):
(NowPlayingTest::configuration):
(NowPlayingTest::webViewPid):
(NowPlayingTest::loadPage):
(NowPlayingTest::runScriptWithUserGesture):
(NowPlayingTest::runScriptWithoutUserGesture):
(NowPlayingTest::executeAndWaitForPlaying):
(NowPlayingTest::executeAndWaitForWebViewToBecomeNowPlaying):
(NowPlayingTest::observers):
(NowPlayingTest::addObserver):
(NowPlayingTest::removeObserver):
(NowPlayingTest::notificationCallback):
(NowPlayingTest::receivedNotification):
(NowPlayingTest::performAfterReceivingNotification):
(TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/now-playing.html: Added.
2018-08-29 Thomas Denney <tdenney@apple.com>
[WHLSL] Ensure that isLValue is copied by the rewriter
https://bugs.webkit.org/show_bug.cgi?id=189083
The value of isLValue was not propagated when new TernaryExpressions are
created in Rewriter.
Reviewed by Myles C. Maxfield.
* WebGPUShadingLanguageRI/Rewriter.js:
(Rewriter.prototype.visitTernaryExpression):
* WebGPUShadingLanguageRI/Test.js: Add new test to verify the value is
propagated.
2018-08-29 Myles C. Maxfield <mmaxfield@apple.com>
[WHLSL] Add more functions to the standard library
https://bugs.webkit.org/show_bug.cgi?id=188873
Reviewed by Filip Pizlo.
This patch adds the rest of the standard library to StandardLibrary.js, and updates the compiler to be able to compile it.
There are a few major pieces:
1. Swizzle operators are now implemented in the language, instead of as native functions
2. Vector constructors are now implemented in the language, instead of as native functions
3. The matrix type is implemented
4. Vector operator&[] is illegal, and is removed from the compiler
5. Vector index setters & index getters are now implemented in the language, instead of as native functions
6. Vector and matrix equality operators are implemented in the language, instead of as native functions
7. Casting a scalar to a boolean is implemented in the language, instead of as native functions
8. Casting a vector to a boolean is not part of the language, and is removed from the compiler
9. Half-precision floating point types are implemented
* WebGPUShadingLanguageRI/All.js:
* WebGPUShadingLanguageRI/BuiltinMatrixGetter.js: Copied from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js.
(BuiltinMatrixGetter):
(BuiltinMatrixGetter.prototype.get height):
(BuiltinMatrixGetter.prototype.get width):
(BuiltinMatrixGetter.prototype.toString):
(BuiltinMatrixGetter.functions):
(BuiltinMatrixGetter.prototype.instantiateImplementation):
* WebGPUShadingLanguageRI/BuiltinMatrixSetter.js: Renamed from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js.
(BuiltinMatrixSetter):
(BuiltinMatrixSetter.prototype.get height):
(BuiltinMatrixSetter.prototype.get width):
(BuiltinMatrixSetter.prototype.toString):
(BuiltinMatrixSetter.functions):
(BuiltinMatrixSetter.prototype.instantiateImplementation):
* WebGPUShadingLanguageRI/BuiltinVectorConstructors.js: Removed.
* WebGPUShadingLanguageRI/BuiltinVectorEqualityOperator.js: Removed.
* WebGPUShadingLanguageRI/BuiltinVectorGetter.js:
(BuiltinVectorGetter.prototype.instantiateImplementation):
(BuiltinVectorGetter):
* WebGPUShadingLanguageRI/BuiltinVectorSetter.js:
(BuiltinVectorSetter.functions):
(BuiltinVectorSetter.prototype.instantiateImplementation):
(BuiltinVectorSetter):
* WebGPUShadingLanguageRI/CallExpression.js:
(CallExpression.prototype.resolve):
* WebGPUShadingLanguageRI/CheckTypesWithArguments.js:
(checkTypesWithArguments.TypeWithArgumentsChecker.prototype.visitTypeRef):
(checkTypesWithArguments.TypeWithArgumentsChecker):
(checkTypesWithArguments):
* WebGPUShadingLanguageRI/Checker.js:
(Checker.prototype.visitVectorType):
(Checker.prototype.visitMatrixType):
* WebGPUShadingLanguageRI/ConstexprFolder.js:
(ConstexprFolder.prototype.visitCallExpression):
(ConstexprFolder):
* WebGPUShadingLanguageRI/Evaluator.js:
(Evaluator.prototype.visitTernaryExpression):
* WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
(FlattenedStructOffsetGatherer.prototype.visitMatrixType):
(FlattenedStructOffsetGatherer):
* WebGPUShadingLanguageRI/Intrinsics.js:
(Intrinsics.):
(Intrinsics):
* WebGPUShadingLanguageRI/MatrixType.js: Renamed from Tools/WebGPUShadingLanguageRI/BuiltinVectorIndexGetter.js.
(MatrixType):
(MatrixType.prototype.get elementType):
(MatrixType.prototype.get numRows):
(MatrixType.prototype.get numColumns):
(MatrixType.prototype.get numRowsValue):
(MatrixType.prototype.get numColumnsValue):
(MatrixType.prototype.get size):
(MatrixType.prototype.unifyImpl):
(MatrixType.prototype.populateDefaultValue):
(MatrixType.prototype.toString):
* WebGPUShadingLanguageRI/NameContext.js:
(NameContext.prototype.add):
* WebGPUShadingLanguageRI/NativeType.js:
(NativeType.create):
(NativeType):
* WebGPUShadingLanguageRI/OperatorAnderIndexer.js: Renamed from Tools/WebGPUShadingLanguageRI/OperatorAnderIndex.js.
(OperatorAnderIndexer):
* WebGPUShadingLanguageRI/OperatorBool.js: Removed.
* WebGPUShadingLanguageRI/Prepare.js:
(let.prepare):
* WebGPUShadingLanguageRI/Program.js:
(Program.prototype.add):
* WebGPUShadingLanguageRI/Rewriter.js:
(Rewriter.prototype.visitMatrixType):
(Rewriter):
* WebGPUShadingLanguageRI/SPIRV.html:
* WebGPUShadingLanguageRI/StandardLibrary.js:
(operator.bool):
(bool.operator):
(uchar.operator):
(ushort.operator):
(char.operator):
(short.operator):
(uint.operator):
(int.operator):
(half.operator):
(float.operator):
(uchar2.operator):
(uchar3.operator):
(uchar4.operator):
(ushort2.operator):
(ushort3.operator):
(ushort4.operator):
(uint2.operator):
(uint3.operator):
(uint4.operator):
(char2.operator):
(char3.operator):
(char4.operator):
(short2.operator):
(short3.operator):
(short4.operator):
(int2.operator):
(int3.operator):
(int4.operator):
(half2.operator):
(half3.operator):
(half4.operator):
(float2.operator):
(float3.operator):
(float4.operator):
(half2x2.operator):
(half2x3.operator):
(half2x4.operator):
(half3x2.operator):
(half3x3.operator):
(half3x4.operator):
(half4x2.operator):
(half4x3.operator):
(half4x4.operator):
(float2x2.operator):
(float2x3.operator):
(float2x4.operator):
(float3x2.operator):
(float3x3.operator):
(float3x4.operator):
(float4x2.operator):
(float4x3.operator):
(float4x4.operator):
(operator.bool2):
(operator.bool3):
(operator.bool4):
(uint.operator.length):
(operator.uchar2):
(operator.uchar3):
(operator.uchar4):
(operator.ushort2):
(operator.ushort3):
(operator.ushort4):
(operator.uint2):
(operator.uint3):
(operator.uint4):
(operator.char2):
(operator.char3):
(operator.char4):
(operator.short2):
(operator.short3):
(operator.short4):
(operator.int2):
(operator.int3):
(operator.int4):
(operator.half2):
(operator.half3):
(operator.half4):
(operator.float2):
(operator.float3):
(operator.float4):
(bool2.operator):
(bool3.operator):
(bool4.operator):
(allVectorTypeNames):
* WebGPUShadingLanguageRI/SwizzleOp.js: Removed.
* WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js:
(synthesizeDefaultConstructorOperator.FindAllTypes.prototype.visitMatrixType):
(synthesizeDefaultConstructorOperator.FindAllTypes):
(synthesizeDefaultConstructorOperator):
* WebGPUShadingLanguageRI/SynthesizeOperatorBool.js: Removed.
* WebGPUShadingLanguageRI/Test.html:
* WebGPUShadingLanguageRI/Test.js:
(makeHalf):
(checkHalf):
* WebGPUShadingLanguageRI/Visitor.js:
(Visitor.prototype.visitMatrixType):
(Visitor):
* WebGPUShadingLanguageRI/index.html:
2018-08-29 Simon Fraser <simon.fraser@apple.com>
Teach webkitpy how to check leaks and treat leaks as test failures
https://bugs.webkit.org/show_bug.cgi?id=189067
Reviewed by Darin Adler.
Add a new "--world-leaks" argument to run-webkit-tests. When enabled, DRT/WTR are launched
with a --world-leaks argument (which is renamed in this patch for consistency). This enables the
behavior added in r235408, namely that they check for leaked documents after each test, and at
the end of one (if --run-singly) or a set of tests run in a single DRT/WTR instance handle the
"#CHECK FOR WORLD LEAKS" command to get still-live documents.
LayoutTestRunner in webkitpy now has the notion of doing "post-tests work", called via _finished_test_group(),
and here it sends the "#CHECK FOR WORLD LEAKS" command to the runner and parses the resulting output block.
If this results block includes leaks, we convert an existing TestResult into a LEAK failure
in TestRunResults.change_result_to_failure(). Leaks are then added to the ouput JSON for display in results.html
Unit tests are updated with some leak examples.
* DumpRenderTree/mac/DumpRenderTree.mm:
(initializeGlobalsFromCommandLineOptions):
* Scripts/webkitpy/common/net/resultsjsonparser_unittest.py:
(ParsedJSONResultsTest):
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner._annotate_results_with_additional_failures):
(LayoutTestRunner._handle_finished_test_group):
(Worker.handle):
(Worker._run_test):
(Worker._do_post_tests_work):
(Worker._finished_test_group):
(Worker._run_test_in_another_thread):
* Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
(JSONLayoutResultsGenerator):
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser):
(TestExpectations):
* Scripts/webkitpy/layout_tests/models/test_expectations_unittest.py:
(Base.get_basic_tests):
* Scripts/webkitpy/layout_tests/models/test_failures.py:
(determine_result_type):
(FailureLeak):
(FailureLeak.__init__):
(FailureLeak.message):
(FailureDocumentLeak):
(FailureDocumentLeak.__init__):
(FailureDocumentLeak.message):
* Scripts/webkitpy/layout_tests/models/test_results.py:
(TestResult.convert_to_failure):
* Scripts/webkitpy/layout_tests/models/test_run_results.py:
(TestRunResults.change_result_to_failure):
(_interpret_test_failures):
(summarize_results):
* Scripts/webkitpy/layout_tests/models/test_run_results_unittest.py:
(get_result):
(run_results):
(summarized_results):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
* Scripts/webkitpy/layout_tests/run_webkit_tests_integrationtest.py:
(parse_args):
(RunTest.test_check_for_world_leaks):
* Scripts/webkitpy/port/driver.py:
(DriverPostTestOutput):
(DriverPostTestOutput.__init__):
(Driver.do_post_tests_work):
(Driver._parse_world_leaks_output):
(Driver.cmd_line):
(DriverProxy.do_post_tests_work):
* Scripts/webkitpy/port/test.py:
(unit_test_list):
* WebKitTestRunner/Options.cpp:
(WTR::OptionsHandler::OptionsHandler):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::checkForWorldLeaks):
2018-08-29 David Kilzer <ddkilzer@apple.com>
Remove empty directories from from svn.webkit.org repository
<https://webkit.org/b/189081>
* DumpRenderTree/TestNetscapePlugIn/unix: Removed.
* WebKitTestRunner/UIScriptContext: Removed.
2018-08-29 Pablo Saavedra <psaavedra@igalia.com>
[GTK][WPE] Add JSCOnly Release bot for Linux ARMv7 Thumb2 SoftFP
https://bugs.webkit.org/show_bug.cgi?id=189077
Reviewed by Michael Catanzaro.
Deployed new bot for WPE Release in Linux ARMv7 Thumb2 SoftFP
This bot (jsconly-linux-igalia-bot-5) will run the 'JSCOnly
Linux ARMv7 Thumb2 SoftFP Release' buildjob.
* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
2018-08-28 Daniel Bates <dabates@apple.com>
lldb-webkit: KeyError thrown for OptionSet
https://bugs.webkit.org/show_bug.cgi?id=189062
Reviewed by Simon Fraser.
For some reason lldb(1) may not retrieve the enumerator names for an enum value
when it calls update() on the synthetic children provider. If this occurs then
bail out as we cannot compute what enumerators are in the set.
* lldb/lldb_webkit.py:
(WTFOptionSetProvider.update):
2018-08-28 Sihui Liu <sihui_liu@apple.com>
Add error information to help debug test failure in WKNavigation.ProcessCrashDuringCallback
https://bugs.webkit.org/show_bug.cgi?id=189037
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
(TEST):
2018-08-28 David Kilzer <ddkilzer@apple.com>
Fix incorrect use of `sourceTree = "<group>";` for built products and frameworks in Xcode projects
Found by tidy-Xcode-project-file script (see Bug 188754).
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
(IOKit.framework): Use `sourceTree = "<absolute>";` to match
other frameworks in the project.
* MobileMiniBrowser/MobileMiniBrowser.xcodeproj/project.pbxproj:
(WebKit.framework): Use `sourceTree = BUILT_PRODUCTS_DIR;` for
built product instead of relative build directory path.
* jsc-cli/jsc-cli.xcodeproj/project.pbxproj:
(JavaScriptCore.framework): Ditto.
* lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj:
(libWTF.a): Use `sourceTree = BUILT_PRODUCTS_DIR;` for built
product.
2018-08-28 Alex Christensen <achristensen@webkit.org>
Fix 32-bit Mac build.
* TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
2018-08-28 Alex Christensen <achristensen@webkit.org>
REGRESSION (r235391): [iOS] TestWebKitAPI.WebKit.RestoreSessionStateWithoutNavigation is timing out
https://bugs.webkit.org/show_bug.cgi?id=189050
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm:
This test wasn't run on iOS before. Let's re-introduce the WK_HAVE_C_SPI guard.
2018-08-28 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] WKAttachmentTests.DropFolderAsAttachmentAndMoveByDragging encounters an exception on iOS simulator
https://bugs.webkit.org/show_bug.cgi?id=189049
Reviewed by Tim Horton.
Wrap an NSURL in a RetainPtr to prevent it from being freed prematurely. It seems this broke when I changed the
load handler from an Objective-C block that captured `folderURL` to a C++ lambda that didn't retain `folderURL`.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(simulateFolderDragWithURL):
2018-08-27 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] Remove WebCore::AttachmentDisplayOptions and friends
https://bugs.webkit.org/show_bug.cgi?id=189004
Reviewed by Dan Bernstein.
Move off of deprecated attachment insertion SPI.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[TestWKWebView synchronouslyInsertAttachmentWithFileWrapper:contentType:]):
(-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
(-[_WKAttachment synchronouslySetDisplayOptions:error:]): Deleted.
2018-08-27 Simon Fraser <simon.fraser@apple.com>
Teach WebKitTestRunner and DumpRenderTree about detecting world leaks
https://bugs.webkit.org/show_bug.cgi?id=188994
Reviewed by Tim Horton.
This patch adds the notion of a "control command" in the protocol between webkitpy and
WebKitTestRunner/DumpRenderTree. A command is simply an input string starting with a #
that is checked for before trying to parse the input as test URL. For now, just one
commmand is supported, which is "#CHECK FOR WORLD LEAKS".
In response to the command, the tool dumps an output block in the usual pseudo-MIME-style,
with a trailing "#EOF". Future patches will add support to webkitpy to parse this output.
DumpRenderTree stubs out the command, returning an empty block.
WebKitTestRunner responds to the command by dumping the list of live documents, if it was
run with the --check-for-world-leaks option.
When run with --check-for-world-leaks, WebKitTestRunner gets the list of live documents via
WKBundleGetLiveDocumentURLs() after every test (this allows it to detect the first test
that leaked a document), and keeps them in a map of document identifier to test and live document URL.
Then when it receives the "#CHECK FOR WORLD LEAKS" command, it calls into the bundle to
clear the page and memory caches, runs a GC, then posts a task (in the Document::postTaks() sense)
after which it requests the list of live documents for a final time, excluding any that are loaded
in live Frames (thus omitting the about:blank that will be loaded at this point). Documents in this
list are therefore leaked (or abandoned).
Future patches will hook up webkitpy reporting for leaked documents.
* DumpRenderTree/mac/DumpRenderTree.mm:
(initializeGlobalsFromCommandLineOptions):
(handleControlCommand):
(runTestingServerLoop):
* DumpRenderTree/win/DumpRenderTree.cpp:
(handleControlCommand):
(main):
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::postGCTask):
(WTR::InjectedBundle::reportLiveDocuments):
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/Options.cpp:
(WTR::handleOptionCheckForWorldLeaks):
(WTR::OptionsHandler::OptionsHandler):
* WebKitTestRunner/Options.h:
* WebKitTestRunner/TestController.cpp:
(WTR::AsyncTask::run):
(WTR::AsyncTask::currentTask):
(WTR::TestController::initialize):
(WTR::TestController::ensureViewSupportsOptionsForTest):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::updateLiveDocumentsAfterTest):
(WTR::TestController::checkForWorldLeaks):
(WTR::TestController::findAndDumpWorldLeaks):
(WTR::TestController::willDestroyWebView):
(WTR::parseInputLine):
(WTR::TestController::waitForCompletion):
(WTR::TestController::handleControlCommand):
(WTR::TestController::runTestingServerLoop):
(WTR::TestController::run):
(WTR::TestController::didReceiveLiveDocumentsList):
(WTR::TestController::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/TestController.h:
(WTR::AsyncTask::AsyncTask):
(WTR::AsyncTask::taskComplete):
(WTR::TestController::AbandonedDocumentInfo::AbandonedDocumentInfo):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::invoke):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
2018-08-27 Alex Christensen <achristensen@webkit.org>
Fix API test after r235398
https://bugs.webkit.org/show_bug.cgi?id=188997
* TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp:
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::willGoToBackForwardListItem): Deleted.
willGoToBackForwardListItem is unused and unsupported. Removing its check.
2018-08-27 Daniel Bates <dabates@apple.com>
Partial revert of r235376
https://bugs.webkit.org/show_bug.cgi?id=189011
For now revert the unit tests added in r235376 as the following tests are failing on Apple Sierra
Debug and Apple High Sierra Debug bots:
lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSetProvider_simple
lldb_webkit_unittest.TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple
Will investigate offline.
* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders):
* lldb/lldb_webkit_unittest.py:
(TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):
(TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_empty): Deleted.
(TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple): Deleted.
(TestSummaryProviders.serial_test_WTFOptionSetProvider_empty): Deleted.
(TestSummaryProviders.serial_test_WTFOptionSetProvider_simple): Deleted.
2018-08-27 Aditya Keerthi <akeerthi@apple.com>
Consolidate ENABLE_INPUT_TYPE_COLOR and ENABLE_INPUT_TYPE_COLOR_POPOVER
https://bugs.webkit.org/show_bug.cgi?id=188931
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Removed ENABLE_INPUT_TYPE_COLOR_POPOVER.
2018-08-27 Justin Fan <justin_fan@apple.com>
Add Justin Fan to list of WebKit contributors
https://bugs.webkit.org/show_bug.cgi?id=184431
* Scripts/webkitpy/common/config/contributors.json:
2018-08-27 Simon Fraser <simon.fraser@apple.com>
Convert timeout values in WebKitTestRunner to WTF::Seconds
https://bugs.webkit.org/show_bug.cgi?id=188987
Reviewed by Ryosuke Niwa.
Replace various 'int' timeout values with WTF::Seconds. The timeout argument
comes in as milliseconds, so convert on input. When sending messages to the InjectedBundle
using integers, convert to and from milliseconds.
Also do some #pragma once, and initializer cleanup.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::InjectedBundle::beginTesting):
(WTR::InjectedBundle::InjectedBundle): Deleted.
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::timeout):
(WTR::TestRunner::setCustomTimeout):
* WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
(WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
* WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
(WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
(WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
* WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
(WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::TestController):
(WTR::parseInputLine):
(WTR::TestController::runTest):
(WTR::TestController::runUntil):
(WTR::TestController::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::shortTimeout const):
(WTR::TestInvocation::createTestSettingsDictionary):
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/TestOptions.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformRunUntil):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::platformRunUntil):
* WebKitTestRunner/wpe/TestControllerWPE.cpp:
(WTR::TestController::platformRunUntil):
2018-08-27 Simon Fraser <simon.fraser@apple.com>
Convert timeout values in WebKitTestRunner to WTF::Seconds
https://bugs.webkit.org/show_bug.cgi?id=188987
Reviewed by Ryosuke Niwa.
Replace various 'int' timeout values with WTF::Seconds. The timeout argument
comes in as milliseconds, so convert on input. When sending messages to the InjectedBundle
using integers, convert to and from milliseconds.
Also do some #pragma once, and initializer cleanup.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::InjectedBundle::beginTesting):
(WTR::InjectedBundle::InjectedBundle): Deleted.
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::timeout):
(WTR::TestRunner::setCustomTimeout):
* WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
(WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
* WebKitTestRunner/InjectedBundle/mac/TestRunnerMac.mm:
(WTR::TestRunner::invalidateWaitToDumpWatchdogTimer):
(WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
* WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
(WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::TestController):
(WTR::parseInputLine):
(WTR::TestController::runTest):
(WTR::TestController::runUntil):
(WTR::TestController::didReceiveMessageFromInjectedBundle):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::shortTimeout const):
(WTR::TestInvocation::createTestSettingsDictionary):
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/TestOptions.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformRunUntil):
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::platformRunUntil):
* WebKitTestRunner/wpe/TestControllerWPE.cpp:
(WTR::TestController::platformRunUntil):
2018-08-27 Alex Christensen <achristensen@webkit.org>
REGRESSION(r234985/r234989) WKPageLoadHTMLString with a 16-bit String has the wrong encoding
https://bugs.webkit.org/show_bug.cgi?id=189002
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKit/WillLoad.cpp:
(TestWebKitAPI::TEST_F):
2018-08-27 Wenson Hsieh <wenson_hsieh@apple.com>
[Cocoa] Exception (fileType 'dyn.agq8u' is not a valid UTI) raised when dragging an attachment whose file wrapper is a directory
https://bugs.webkit.org/show_bug.cgi?id=188903
<rdar://problem/43702993>
Reviewed by Tim Horton.
Add two API tests and adjust existing WKAttachment API tests. The new tests exercise the following scenarios, in
both iOS and macOS:
• Dropping a folder as an attachment element, and then moving that attachment element in the document by
dragging and dropping.
• Using WKWebView SPI to insert a folder and a file with an unknown extension, and then using more
_WKAttachment SPI to swap the attachments' backing file wrappers.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(runTestWithTemporaryFolder):
Add a helper function to run a test with a new folder path, created in the temporary directory and populated
with some sample content. This folder is deleted after running the test.
(simulateFolderDragWithURL):
Add a helper function to prepare a given DragAndDropSimulator for simulating a dragged folder from a source
external to the web view.
(platformCopyRichTextWithMultipleAttachments):
(platformCopyRichTextWithImage):
(platformCopyPNG):
(TestWebKitAPI::TEST):
Add new API tests, and adjust existing tests to reflect new -setFileWrapper:…: behavior. Specifically,
ChangeAttachmentDataAndFileInformation previously required that changing a _WKAttachment's NSFileWrapper would
preserve the previous NSFileWrapper's preferred name if the new file wrapper does not have a preferred name, but
this quirk is no longer supported.
Also add a few bridging casts for the eventual transition of TestWebKitAPI to ARC.
* TestWebKitAPI/cocoa/DragAndDropSimulator.h:
Add a new hook to clear any external drag information on an existing DragAndDropSimulator. This is convenient
when using the same DragAndDropSimulator to perform multiple drags in a single test.
* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator clearExternalDragInformation]):
* TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
(-[DragAndDropSimulator clearExternalDragInformation]):
2018-08-27 Alex Christensen <achristensen@webkit.org>
Translate 4 tests using WKPageLoaderClient to ObjC
https://bugs.webkit.org/show_bug.cgi?id=188827
Reviewed by Tim Horton.
They use processDidBecomeUnresponsive, didChangeBackForwardList, or willGoToBackForwardListItem.
Rather than introduce these to WKPageNavigationClient, I just translated the tests to use WKNavigationDelegate, which already have equivalent callbacks.
willGoToBackForwardListItem had userData from the InjectedBundle, but nobody was using it so I did not add that to the ObjC SPI, so I don't test that unused
bundle functionality any more.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp: Removed.
* TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp: Removed.
* TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp: Removed.
* TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp: Removed.
* TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem_Bundle.cpp: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp.
(-[ResponsivenessTimerDelegate webView:didFinishNavigation:]):
(-[ResponsivenessTimerDelegate _webViewWebProcessDidBecomeUnresponsive:]):
(TestWebKitAPI::TEST):
(): Deleted.
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
(TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
(TestWebKitAPI::setPageLoaderClient): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp.
(-[ResponsivenessDelegate webView:didFinishNavigation:]):
(-[ResponsivenessDelegate _webViewWebProcessDidBecomeUnresponsive:]):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didReceiveMessageFromInjectedBundle): Deleted.
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
(TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
(TestWebKitAPI::setInjectedBundleClient): Deleted.
(TestWebKitAPI::setPageLoaderClient): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp.
(-[SessionStateDelegate webView:didFinishNavigation:]):
(-[SessionStateDelegate _webView:backForwardListItemAdded:removed:]):
(TestWebKitAPI::createSessionStateData):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
(TestWebKitAPI::didChangeBackForwardListForPage): Deleted.
(TestWebKitAPI::setPageLoaderClient): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp.
(-[BackForwardClient webView:didFinishNavigation:]):
(-[BackForwardClient _webView:willGoToBackForwardListItem:inPageCache:]):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
(TestWebKitAPI::willGoToBackForwardListItem): Deleted.
(TestWebKitAPI::setPageLoaderClient): Deleted.
2018-08-27 Wenson Hsieh <wenson_hsieh@apple.com>
[Cocoa] "video.html" appears at the top level of the TestWebKitAPI Xcode project
https://bugs.webkit.org/show_bug.cgi?id=188989
Reviewed by Andy Estes.
Move this into the Tests/WebKit/Resources group in the project.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2018-08-27 Thomas Denney <tdenney@apple.com>
Avoid an exception in the interactive interpreter
https://bugs.webkit.org/show_bug.cgi?id=188991
Reviewed by Myles C. Maxfield.
* WebGPUShadingLanguageRI/index.html: Corrects a typo in the name of a
local variable
2018-08-27 Thomas Denney <tdenney@apple.com>
Allow new vector types to work with the interactive interpreter
https://bugs.webkit.org/show_bug.cgi?id=188988
Reviewed by Myles C. Maxfield.
* WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
(FlattenedStructOffsetGatherer.prototype.visitTypeRef): Do not
unncessarily visit the type arguments of a TypeRef, as by this point
there are none that are relevant.
* WebGPUShadingLanguageRI/Intrinsics.js:
(Intrinsics): Treat VectorType as a primitive type.
2018-08-27 Keith Rollin <krollin@apple.com>
Build system support for LTO
https://bugs.webkit.org/show_bug.cgi?id=187785
<rdar://problem/42353132>
Reviewed by Dan Bernstein.
Add tools/scripts support for controlling LTO builds.
* Scripts/build-webkit: Add --lto-mode={none,thin,full}.
* Scripts/set-webkit-configuration: Add support for saving LTO
configuration to WebKitBuild/LTO.
* Scripts/webkitdirs.pm: Add support for reading configuration from
WebKitBuild/LTO and providing it to xcodebuild.
(determineLTOMode):
(ltoMode):
(XcodeOptions):
2018-08-27 Daniel Bates <dabates@apple.com>
lldb-webkit: Pretty-print OptionSet
https://bugs.webkit.org/show_bug.cgi?id=188936
Reviewed by Simon Fraser.
Add LLDB formatters to pretty-print an OptionSet.
* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders):
* lldb/lldb_webkit.py:
(__lldb_init_module):
(__lldb_init_module.lldb_webkit):
(WTFOptionSet_SummaryProvider):
(WTFOptionSetProvider):
(WTFOptionSetProvider.__init__):
(WTFOptionSetProvider.has_children):
(WTFOptionSetProvider.num_children):
(WTFOptionSetProvider.get_child_index):
(WTFOptionSetProvider.get_child_at_index):
(WTFOptionSetProvider.update):
* lldb/lldb_webkit_unittest.py:
(TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):
(TestSummaryProviders):
(TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_empty):
(TestSummaryProviders.serial_test_WTFOptionSet_SummaryProvider_simple):
(TestSummaryProviders.serial_test_WTFOptionSetProvider_empty):
(TestSummaryProviders.serial_test_WTFOptionSetProvider_simple):
2018-08-27 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] [WK2] Images copied from Mail message view paste with the wrong file name in compose
https://bugs.webkit.org/show_bug.cgi?id=188957
<rdar://problem/43737715>
Reviewed by Darin Adler.
Add a new API test to verify that pasting a web archive containing several image elements with alt attributes
generates _WKAttachments whose names reflect those alt attributes.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(testGIFFileURL):
(testGIFData):
(TestWebKitAPI::TEST):
2018-08-27 Alex Christensen <achristensen@webkit.org>
Unreviewed, rolling out r235367.
Broke iOS build.
Reverted changeset:
"Translate 4 tests using WKPageLoaderClient to ObjC"
https://bugs.webkit.org/show_bug.cgi?id=188827
https://trac.webkit.org/changeset/235367
2018-08-27 Alex Christensen <achristensen@webkit.org>
Fix GTK build.
* TestWebKitAPI/CMakeLists.txt:
2018-08-27 Alex Christensen <achristensen@webkit.org>
Fix iOS build.
* TestWebKitAPI/PlatformWebView.h:
2018-08-27 Alex Christensen <achristensen@webkit.org>
Translate 4 tests using WKPageLoaderClient to ObjC
https://bugs.webkit.org/show_bug.cgi?id=188827
Reviewed by Tim Horton.
They use processDidBecomeUnresponsive, didChangeBackForwardList, or willGoToBackForwardListItem.
Rather than introduce these to WKPageNavigationClient, I just translated the tests to use WKNavigationDelegate, which already have equivalent callbacks.
willGoToBackForwardListItem had userData from the InjectedBundle, but nobody was using it so I did not add that to the ObjC SPI, so I don't test that unused
bundle functionality any more.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp: Removed.
* TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp: Removed.
* TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp: Removed.
* TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp: Removed.
* TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem_Bundle.cpp: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimer.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimer.cpp.
(-[ResponsivenessTimerDelegate webView:didFinishNavigation:]):
(-[ResponsivenessTimerDelegate _webViewWebProcessDidBecomeUnresponsive:]):
(TestWebKitAPI::TEST):
(): Deleted.
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
(TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
(TestWebKitAPI::setPageLoaderClient): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/ResponsivenessTimerDoesntFireEarly.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ResponsivenessTimerDoesntFireEarly.cpp.
(-[ResponsivenessDelegate webView:didFinishNavigation:]):
(-[ResponsivenessDelegate _webViewWebProcessDidBecomeUnresponsive:]):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didReceiveMessageFromInjectedBundle): Deleted.
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
(TestWebKitAPI::processDidBecomeUnresponsive): Deleted.
(TestWebKitAPI::setInjectedBundleClient): Deleted.
(TestWebKitAPI::setPageLoaderClient): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/RestoreSessionStateWithoutNavigation.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/RestoreSessionStateWithoutNavigation.cpp.
(-[SessionStateDelegate webView:didFinishNavigation:]):
(-[SessionStateDelegate _webView:backForwardListItemAdded:removed:]):
(TestWebKitAPI::createSessionStateData):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
(TestWebKitAPI::didChangeBackForwardListForPage): Deleted.
(TestWebKitAPI::setPageLoaderClient): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/ShouldGoToBackForwardListItem.mm: Copied from Tools/TestWebKitAPI/Tests/WebKit/ShouldGoToBackForwardListItem.cpp.
(-[BackForwardClient webView:didFinishNavigation:]):
(-[BackForwardClient _webView:willGoToBackForwardListItem:inPageCache:]):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
(TestWebKitAPI::willGoToBackForwardListItem): Deleted.
(TestWebKitAPI::setPageLoaderClient): Deleted.
2018-08-27 Keith Miller <keith_miller@apple.com>
test262-runner -s --test-only should replace test results
https://bugs.webkit.org/show_bug.cgi?id=188450
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(main):
(SetFailureForTest):
(UpdateResults):
2018-08-26 Sam Weinig <sam@webkit.org>
Using _WKRemoteObjectInterface with a protocol that inherits from a non-NSObject protocol crashes
https://bugs.webkit.org/show_bug.cgi?id=188958
Reviewed by Anders Carlsson.
* TestWebKitAPI/Tests/WebKitCocoa/RemoteObjectRegistry.h:
Update test protocol to have inheritance.
2018-08-26 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] Dropping and pasting images should insert inline image elements with _WKAttachments
https://bugs.webkit.org/show_bug.cgi?id=188933
<rdar://problem/43699724>
Reviewed by Darin Adler.
Rebaseline existing API tests that involve dropping or pasting image files, and additionally write some new
tests. These new tests exercise the following cases:
• Inserting and removing newlines before an inline image with an attachment element does not cause new
_WKAttachments to be created and destroyed.
• Pasting an image, cutting it, and then pasting it again propagates an attachment update to the UI
process with the original _WKAttachment.
• A pasted attachment in the document can be moved around by dragging, and doing so does not cause us to
lose a _WKAttachment.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[TestWKWebView expectElementCount:tagName:]):
(TestWebKitAPI::TEST):
Add the new tests described above, and also adjust existing tests to check that images are dropped or pasted
as image elements, but still have associated attachment elements whose attachment identifiers (observed via
script) match that of the corresponding _WKAttachment's uniqueIdentifier in the UI process.
* TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
(-[DragAndDropSimulator runFrom:to:]):
(-[DragAndDropSimulator continueDragSession]):
(-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
Teach DragAndDropSimulator on macOS to wait until the drop has been handled by the web process before returning
execution to the caller. This ensures that tests which involve dropping promised files as attachments aren't
flaky, due to how the promised data is retrieved asynchronously when performing the drop.
(-[DragAndDropSimulator _webView:didPerformDragOperation:]):
2018-08-26 Lucas Forschler <lforschler@apple.com>
Open svn.webkit.org for commits.
2018-08-24 Myles C. Maxfield <mmaxfield@apple.com>
Unreviewed test fix after r235249
https://bugs.webkit.org/show_bug.cgi?id=178981
* WebGPUShadingLanguageRI/Test.js:
2018-08-24 Alex Christensen <achristensen@webkit.org>
Introduce _WKInspector
https://bugs.webkit.org/show_bug.cgi?id=188923
<rdar://problem/34657861>
Reviewed by Brian Burg.
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController validateMenuItem:]):
(-[WK2BrowserWindowController showHideWebInspector:]):
2018-08-24 Jonathan Bedard <jbedard@apple.com>
Fix handling of iOS minor versions in default_baseline_search_path
https://bugs.webkit.org/show_bug.cgi?id=188902
Reviewed by Aakash Jain.
* Scripts/webkitpy/port/ios.py:
(IOSPort.default_baseline_search_path): When the major version matches the major version of the CURRENT_VERSION, treat
it as a the CURRENT_VERSION.
2018-08-24 Antti Koivisto <antti@apple.com>
Allow creating WeakPtrs to const objects
https://bugs.webkit.org/show_bug.cgi?id=188785
Reviewed by Geoff Garen.
* TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
(TestWebKitAPI::Base::weakPtrFactory const):
(TestWebKitAPI::TEST):
(TestWebKitAPI::Base::weakPtrFactory): Deleted.
2018-08-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] Add API to inject/register user content in isolated worlds
https://bugs.webkit.org/show_bug.cgi?id=188883
Reviewed by Michael Catanzaro.
Add test cases for the new API.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp:
(isStyleSheetInjectedForURLAtPath):
(isScriptInjectedForURLAtPath):
(testUserContentManagerInjectedStyleSheet):
(testUserContentManagerInjectedScript):
(UserScriptMessageTest::registerHandler):
(UserScriptMessageTest::unregisterHandler):
(UserScriptMessageTest::postMessageAndWaitUntilReceived):
(testUserContentManagerScriptMessageInWorldReceived):
(beforeAll):
2018-08-23 Simon Fraser <simon.fraser@apple.com>
Add support for dumping GC heap snapshots, and a viewer
https://bugs.webkit.org/show_bug.cgi?id=186416
Reviewed by Joseph Pecoraro.
Add a viewer for GC heap snapshots. A snapshot JSON file can be dragged into this
page for inspection (or set via the 'filename' URL parameter).
For now, this page shows all objects, all roots, and the shortest path from a root
to all HTMLDocuments and Windows.
* GCHeapInspector/gc-heap-inspector.html: Added.
* GCHeapInspector/heap-analysis/HeapSnapshot.js: Copied from Source/WebInspectorUI/UserInterface/Workers/HeapSnapshot/HeapSnapshot.js.
* GCHeapInspector/script/interface.js: Added.
2018-08-23 Alex Christensen <achristensen@webkit.org>
Add new _webViewRequestPointerLock SPI with a completionHandler
https://bugs.webkit.org/show_bug.cgi?id=188907
<rdar://problem/35871109>
Reviewed by Andy Estes.
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[PointerLockDelegate _webViewRequestPointerLock:completionHandler:]):
(-[PointerLockDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):
2018-08-23 David Fenton <david_fenton@apple.com>
Unreviewed, rolling out r235129.
broke internal builds
Reverted changeset:
"Allow creating WeakPtrs to const objects"
https://bugs.webkit.org/show_bug.cgi?id=188785
https://trac.webkit.org/changeset/235129
2018-08-23 Jonathan Bedard <jbedard@apple.com>
API tests should output json results
https://bugs.webkit.org/show_bug.cgi?id=188869
<rdar://problem/43615652>
Reviewed by Aakash Jain.
JSON output for API tests is of the form:
{
"Failed": [{"name": <test name>, "output": <test log>}],
"Timedout": [...],
"Skipped": [...],
"Crashed": [...]
}
Tests which are successful are not displayed in the json output.
* Scripts/webkitpy/api_tests/manager.py:
(Manager.run): Print test results to provided file as a json dictionary.
* Scripts/webkitpy/api_tests/run_api_tests.py:
(run): Pass json option.
(parse_args): Add --json-output flag.
2018-08-23 Andy Estes <aestes@apple.com>
[Apple Pay] Introduce Apple Pay JS v4 on iOS 12 and macOS Mojave
https://bugs.webkit.org/show_bug.cgi?id=188829
Reviewed by Tim Horton.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-08-23 Myles C. Maxfield <mmaxfield@apple.com>
[WSL] Ternary expressions appear to be unimplemented
https://bugs.webkit.org/show_bug.cgi?id=178981
Reviewed by Saam Barati.
Implement ternary statements. These can be both lvalues and rvalues. (a ? b : c ? d : e)
is parsed as (a ? b : (c ? d : e)).
* WebGPUShadingLanguageRI/All.js:
* WebGPUShadingLanguageRI/Checker.js:
(Checker.prototype.visitTernaryExpression):
* WebGPUShadingLanguageRI/Evaluator.js:
(Evaluator.prototype.visitTernaryExpression):
* WebGPUShadingLanguageRI/NormalUsePropertyResolver.js:
(NormalUsePropertyResolver.prototype.visitTernaryExpression):
(NormalUsePropertyResolver):
* WebGPUShadingLanguageRI/Parse.js:
(parsePossibleTernaryConditional):
* WebGPUShadingLanguageRI/PropertyResolver.js:
(PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder.prototype.visitTernaryExpression):
(PropertyResolver.prototype._visitRValuesWithinLValue.RValueFinder):
(PropertyResolver.prototype._visitRValuesWithinLValue):
* WebGPUShadingLanguageRI/Rewriter.js:
(Rewriter.prototype.visitTernaryExpression):
* WebGPUShadingLanguageRI/SPIRV.html:
* WebGPUShadingLanguageRI/Test.html:
* WebGPUShadingLanguageRI/Test.js:
* WebGPUShadingLanguageRI/Visitor.js:
(Visitor.prototype.visitProtocolDecl):
* WebGPUShadingLanguageRI/index.html:
2018-08-22 Ryosuke Niwa <rniwa@webkit.org>
Assert in NetworkBlobRegistry::unregisterBlobURL after network process had terminated
https://bugs.webkit.org/show_bug.cgi?id=188880
Reviewed by Saam Barati.
Fixed the bug that testRunner's terminateNetworkProcess, terminateServiceWorkerProcess, and terminateStorageProcess
were asynchronously terminating respective processes. Do so synchronously so that we can deterministically
test WebKit's behavior in layout tests.
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::terminateNetworkProcess):
(WTR::TestRunner::terminateServiceWorkerProcess):
(WTR::TestRunner::terminateStorageProcess):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2018-08-23 Myles C. Maxfield <mmaxfield@apple.com>
[WHLSL] Allow native types to have type arguments (like "vector<float, 4>")
https://bugs.webkit.org/show_bug.cgi?id=188773
Reviewed by Filip Pizlo.
Before this patch, it was impossible to represent "native typedef vector<float, 4>" because NativeTypes couldn't have
typeArguments.
Previously, the way to identify a type was strictly by name, which was represented by a string. Therefore, when something like
"vector<int, 3>" was parsed, it would produce a TypeRef with the name "vector" and typeArguments [TypeRef, IntLiteral]. Then,
there was a pass to convert the TypeRef to have the name "int3" and no typeArguments. After this transformation, each type could
be uniquely identified by name. That name was then matched to the string-only NativeType name.
This is okay for vectors and matrices, but it is unfortunate for textures (e.g. Texture2D<float4>) because they don't have any
natural string-only name. In addition, the canonicalization would have to be made aware of the fact that Texture2D<float4> is
the same as Texture2D<vector<float, 4>>. Similarly, an author may wish to typedef float4 to a different name.
It would be possible to mangle the names of the texture types to something unique, but then we lose information about the inner
type. For example, if we did this, Visitor wouldn't recurse into the float4 when encountering Texture2D<float4> because that
information would be lost. This could potentially make operations like programWithUnnecessaryThingsRemoved() more difficult to
implement in the future.
So, it would be better to have each type uniquely identified by (name, typeArguments). TypeRef will therefore also have
typeArguments which are used to determine which type it is referencing. After this analysis is done to determine what each
TypeRef is referencing, subsequent passes shouldn't care about the typeArguments and should only care about the .type field
which had been set - this was true even before this patch.
This means that NameContext has to aggregate types that accept typeArguments into arrays, where each array holds all the Types
that have the same name but different typeArguments. Then, when we need to match a TypeRef with a Type, we can ask the
NameContext for the appropriate array. This is the same way that function resolution works.
We can use Node.unify() to determine whether a TypeRef matches a NativeType. Eventually, this will go away, but for now, this is
an okay start. This works just about the same way that function overload resolution works.
* WebGPUShadingLanguageRI/All.js:
* WebGPUShadingLanguageRI/CallExpression.js:
(CallExpression.prototype.resolve):
* WebGPUShadingLanguageRI/CheckTypesWithArguments.js: Copied from Tools/WebGPUShadingLanguageRI/ResolveTypeDefs.js. After types
have been resolved, there should be no TypeRefs with name "vector" that don't have type arguments. This is just a sanity check.
(checkTypesWithArguments.TypeWithArgumentsChecker.prototype.visitTypeRef):
(checkTypesWithArguments.TypeWithArgumentsChecker):
(checkTypesWithArguments):
* WebGPUShadingLanguageRI/Checker.js:
(Checker.prototype.visitProgram): Program.types mirrors NameContext: it's a Map that maps strings to types. Because types with
typeArguments share names, this has to be updated to map strings to arrays for these types.
(Checker.prototype.visitTypeRef):
* WebGPUShadingLanguageRI/InferTypesForCall.js:
(inferTypesForCall): Don't know why this was here.
(inferTypesForTypeArguments): Same as inferTypesForCall, but this one is for matching type arguments.
* WebGPUShadingLanguageRI/Intrinsics.js: Adding the types. This patch also adds some scalar types like half, char, etc, but they
don't have any functions which accept them. Those will be tested in my next patch which adds math functions for these types. This
moves in the direction of matching the standard library in the spec.
(Intrinsics.cast):
(Intrinsics.bitwiseCast):
(Intrinsics.castToHalf):
(Intrinsics.):
(Intrinsics):
* WebGPUShadingLanguageRI/NameContext.js: Aggregate types with typeArguments into arrays.
(NameContext.prototype.add):
(NameContext.prototype.get let):
(NameContext.underlyingThings.prototype.else):
(NameContext.prototype.Symbol.iterator):
(NameContext):
* WebGPUShadingLanguageRI/NameResolver.js:
(NameResolver.prototype.visitTypeRef): Call TypeRef.resolve().
(NameResolver.prototype.visitCallExpression):
(NameResolver):
(NameResolver.prototype.visitVectorType): Deleted.
* WebGPUShadingLanguageRI/NativeType.js: NativeTypes can have type arguments now.
(NativeType):
(NativeType.prototype.get typeArguments):
(NativeType.prototype.toString):
(NativeType.create):
* WebGPUShadingLanguageRI/Prepare.js:
(let.prepare):
* WebGPUShadingLanguageRI/Program.js: Update to work with types aggregated into arrays.
(Program.prototype.add):
(Program.prototype.toString):
(Program):
* WebGPUShadingLanguageRI/RemoveTypeArguments.js: Removed.
* WebGPUShadingLanguageRI/ResolveNames.js: Update to work with types aggregated into arrays.
(resolveNamesInTypes):
* WebGPUShadingLanguageRI/ResolveOverloadImpl.js: Resolve the type overload for types with typeArguments.
* WebGPUShadingLanguageRI/ResolveTypeDefs.js: Update to work with types aggregated into arrays.
(resolveTypeDefsInTypes):
* WebGPUShadingLanguageRI/Rewriter.js: TypeRefs and Native/Vector types can have typeArguments.
(Rewriter.prototype.visitTypeRef):
(Rewriter.prototype.visitVectorType):
(Rewriter):
* WebGPUShadingLanguageRI/SPIRV.html:
* WebGPUShadingLanguageRI/StandardLibrary.js: Matches Intrinsics.
(bool.operator):
* WebGPUShadingLanguageRI/StatementCloner.js: Native types can have typeArguments.
(StatementCloner.prototype.visitNativeType):
* WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js: Vector types need constructors too.
(synthesizeDefaultConstructorOperator.FindAllTypes.prototype.visitVectorType):
(synthesizeDefaultConstructorOperator.FindAllTypes):
(synthesizeDefaultConstructorOperator):
* WebGPUShadingLanguageRI/SynthesizeStructAccessors.js: No reason to distinguish between wrapping and instantiating a TypeRef.
(synthesizeStructAccessors.createTypeRef):
* WebGPUShadingLanguageRI/Test.html:
* WebGPUShadingLanguageRI/Test.js:
* WebGPUShadingLanguageRI/TypeOverloadResolutionFailure.js: Copied from Tools/WebGPUShadingLanguageRI/ResolveTypeDefs.js.
(TypeOverloadResolutionFailure):
(TypeOverloadResolutionFailure.prototype.get type):
(TypeOverloadResolutionFailure.prototype.get reason):
(TypeOverloadResolutionFailure.prototype.toString):
* WebGPUShadingLanguageRI/TypeRef.js:
(TypeRef.wrap):
(TypeRef.prototype.resolve): Figure out which item in the possibleOverloads array matches this.
(TypeRef.prototype.toString):
(TypeRef):
(TypeRef.instantiate): Deleted.
* WebGPUShadingLanguageRI/UnificationContext.js: We need to give literals a chance to assume their preferred type. This
adds this facility back into the compiler (it was previously deleted).
(UnificationContext.prototype.verify):
* WebGPUShadingLanguageRI/VectorType.js: Vector types have type arguments.
(VectorType):
(VectorType.prototype.get elementType):
(VectorType.prototype.get numElements):
(VectorType.prototype.get numElementsValue):
(VectorType.prototype.toString):
* WebGPUShadingLanguageRI/Visitor.js: Iterate over the typeArguments.
(Visitor.prototype.visitTypeRef):
(Visitor.prototype.visitNativeType):
(Visitor.prototype.visitVectorType):
(Visitor):
* WebGPUShadingLanguageRI/index.html:
2018-08-23 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] Attachment elements don't appear in drag images on macOS
https://bugs.webkit.org/show_bug.cgi?id=188823
<rdar://problem/43616378>
Reviewed by Tim Horton.
Adjusts a couple of existing tests to additionally verify that the drag image generated when dragging an
attachment element in macOS is not completely transparent.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(isCompletelyTransparent):
(TestWebKitAPI::TEST):
2018-08-23 Jonathan Bedard <jbedard@apple.com>
Explain test name matching in run-api-tests help
https://bugs.webkit.org/show_bug.cgi?id=188280
Reviewed by Ryosuke Niwa.
Improve the run-api-tests help message to explain how test
name matching works.
* Scripts/webkitpy/api_tests/run_api_tests.py:
(parse_args):
* Scripts/webkitpy/port/base.py:
(Port):
(Port.path_to_api_test_binaries): Make binary names a globally accessible array.
* Scripts/webkitpy/port/win.py:
(WinPort):
(WinPort.path_to_api_test_binaries): Ditto.
2018-08-23 Youenn Fablet <youenn@apple.com>
Use "wpt serve" to launch WPT server
https://bugs.webkit.org/show_bug.cgi?id=188848
Reviewed by Ryosuke Niwa.
Use "wpt serve" provided by WPT instead of using our custom launcher.
This simplifies things and will avoid future breakage.
Further simplify web_platform_test_server.py by removing no longer needed actions.
- Do not copy files but use alias
- Do not kill main pid, which leaves subprocesses alive, use interrupt instead.
- Stop enumerating subprocess pids.
* Scripts/webkitpy/common/system/executive_mock.py:
(MockExecutive.interrupt):
* Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py: Removed.
* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(WebPlatformTestServer.__init__):
(WebPlatformTestServer.ports_to_forward):
(WebPlatformTestServer._prepare_config):
(WebPlatformTestServer._spawn_process):
(WebPlatformTestServer._stop_running_server):
2018-08-23 Jonathan Bedard <jbedard@apple.com>
run-api-tests: Add --webkit-only, --webcore-only and --webkit-legacy-only options to run WebKit, WebCore and WebKitLegacy tests
https://bugs.webkit.org/show_bug.cgi?id=188262
Reviewed by Ryosuke Niwa.
* Scripts/webkitpy/api_tests/run_api_tests.py:
(parse_args):
2018-08-22 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] Support dragging attachment elements out as files on macOS
https://bugs.webkit.org/show_bug.cgi?id=181294
<rdar://problem/36298801>
Reviewed by Tim Horton.
Add DragAndDropSimulator support for intercepting calls to -beginDraggingSessionWithitems:event:source:. This
enables us to write API tests for macOS that exercise the attachment SPI in combination with dragging attachment
elements.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[TestWKWebView attachmentElementMidPoint]):
Add a helper method local to this test suite that grabs the midpoint (in client coordinates) or the first
attachment element in the document.
(TestWebKitAPI::TEST):
Add a new API test to verify that dragging an attachment element on macOS produces file providers which may be
used to write attachment data to a path on disk. Additionally, refactor an existing API test,
MoveAttachmentElementAsIconByDragging, so that it runs on both iOS and macOS, to test the ability to move
attachment elements around in a document by using drag and drop.
* TestWebKitAPI/cocoa/DragAndDropSimulator.h:
* TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
(-[DragAndDropTestWKWebView beginDraggingSessionWithItems:event:source:]):
(-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
(-[DragAndDropSimulator dealloc]):
(-[DragAndDropSimulator runFrom:to:]):
(-[DragAndDropSimulator beginDraggingSessionInWebView:withItems:source:]):
Begin a drag session and kick off the -continueDragSession loop. Unlike -performDragInWebView:…, which spins
the main runloop until dragging ends, this version returns execution to the web view and schedules dragging
updates asynchronously. This matches AppKit behavior.
(-[DragAndDropSimulator continueDragSession]):
Increment the dragging progress amount, send a drag update to the web view, and continue scheduling calls to
itself until the progress reaches 1.
(-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
(-[DragAndDropSimulator initializeDraggingInfo:dragImage:source:]):
Pull out common logic for creating a new TestDraggingInfo after starting a drag.
(-[DragAndDropSimulator insertedAttachments]):
(-[DragAndDropSimulator removedAttachments]):
(-[DragAndDropSimulator draggingSession]):
(-[DragAndDropSimulator receivePromisedFiles]):
Helper method to save promised files written to the pasteboard after a drag to the temporary directory. These
files are tracked by DragAndDropSimulator and automatically cleaned up after the test finishes.
(-[DragAndDropSimulator endDataTransfer]):
Add a method stub on macOS, so that MoveAttachmentElementAsIconByDragging can be made cross-platform.
(-[DragAndDropSimulator _webView:didInsertAttachment:withSource:]):
(-[DragAndDropSimulator _webView:didRemoveAttachment:]):
Implement method stubs to keep track of inserted or removed attachments while simulating a drag.
2018-08-22 Aditya Keerthi <akeerthi@apple.com>
[iOS] Add support for the inputmode attribute
https://bugs.webkit.org/show_bug.cgi?id=183621
Reviewed by Tim Horton.
Added an API test to verify that the correct UIKeyboardType is set depending on
the type, inputmode, and pattern specified for an input field.
* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/ios/UIKitSPI.h:
2018-08-22 Alex Christensen <achristensen@webkit.org>
Fix API test on Sierra after r235139
https://bugs.webkit.org/show_bug.cgi?id=188810
* TestWebKitAPI/Tests/mac/LimitTitleSize.mm:
(TEST):
2018-08-22 David Kilzer <ddkilzer@apple.com>
Move files in WebCore project to match Xcode folder structure
<https://webkit.org/b/188851>
Reviewed by Tim Horton.
* Scripts/extract-localizable-strings:
* Scripts/update-webkit-localizable-strings:
- Update to match new location of extract-localizable-strings.pl.
2018-08-21 Alex Christensen <achristensen@webkit.org>
Roll out r235139 and r235146
https://bugs.webkit.org/show_bug.cgi?id=188805
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp:
2018-08-21 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] Remove _WKAttachments and notify the UI client upon mainframe navigation
https://bugs.webkit.org/show_bug.cgi?id=188715
<rdar://problem/43541790>
Reviewed by Tim Horton.
Adds API tests to exercises cases where (1) the UI client is notified of attachment removal upon mainframe
navigation, and (2) the UI client is notified of attachment removal upon web content process termination.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::ObserveAttachmentUpdatesForScope::expectAttachmentUpdates):
(TestWebKitAPI::TEST):
2018-08-21 Alex Christensen <achristensen@webkit.org>
Transition ResizeReversePaginatedWebView API test from WKPageLoaderClient to WKPageNavigationClient
https://bugs.webkit.org/show_bug.cgi?id=188821
Reviewed by Simon Fraser.
* TestWebKitAPI/Tests/WebKit/ResizeReversePaginatedWebView.cpp:
(TestWebKitAPI::didLayout):
(TestWebKitAPI::TEST):
2018-08-21 Myles C. Maxfield <mmaxfield@apple.com>
[WHLSL] Call expressions shouldn't have type arguments
https://bugs.webkit.org/show_bug.cgi?id=188770
Reviewed by Filip Pizlo.
Call expressions only had type arguments for casts, becuase native types can have type arguments.
However, instead of putting those type arguments on the CallExpression, we should parse the casted
type as a real type and not as an identifier, which puts the type arguments in the TypeRef.
Test: casts
* WebGPUShadingLanguageRI/CallExpression.js:
(CallExpression):
(CallExpression.prototype.get name):
(CallExpression.resolve):
(CallExpression.prototype.get typeArguments): Deleted.
(CallExpression.prototype.becomeCast): Deleted.
* WebGPUShadingLanguageRI/NameResolver.js:
(NameResolver.prototype.visitCallExpression):
* WebGPUShadingLanguageRI/Parse.js:
(parseConstexpr):
(parseTypeDef):
(parseLeftOperatorCall):
(parseCallExpression.let.parseArguments):
(parsePossiblePrefix):
(parsePossibleRelationalEquality):
(parseLeftLogicalExpression):
(parseIfStatement):
(parseWhile):
(parseFor):
(parseDo):
* WebGPUShadingLanguageRI/RemoveTypeArguments.js:
* WebGPUShadingLanguageRI/Rewriter.js:
(Rewriter.prototype.visitCallExpression):
2018-08-21 Alex Christensen <achristensen@webkit.org>
Translate WebKit.LimitTitleSize API test into ObjC
https://bugs.webkit.org/show_bug.cgi?id=188810
Reviewed by Andy Estes.
It uses WKPageLoaderClient.didReceiveTitleForFrame which has been replaced by KVO.
I'm translating the test into ObjC rather than introducing a new callback to WKPageNavigationClient.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/LimitTitleSize.cpp: Removed.
* TestWebKitAPI/Tests/mac/LimitTitleSize.mm:
(TEST):
(-[LimitTitleSizeTestObserver observeValueForKeyPath:ofObject:change:context:]):
(TestWebKitAPI::TEST): Deleted.
2018-08-21 Alex Christensen <achristensen@webkit.org>
Remove unused shouldKeepCurrentBackForwardListItemInList check
https://bugs.webkit.org/show_bug.cgi?id=188805
Reviewed by Andy Estes.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/ShouldKeepCurrentBackForwardListItemInList.cpp: Removed.
2018-08-21 Alex Christensen <achristensen@webkit.org>
Transition more API tests from WKPageLoaderClient to WKPageNavigationClient
https://bugs.webkit.org/show_bug.cgi?id=188813
Reviewed by Andy Estes.
* TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayout.cpp:
(TestWebKitAPI::didLayout):
(TestWebKitAPI::setPageLoaderClient):
* TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::didLayout):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutForImages.cpp:
(TestWebKitAPI::didLayout):
(TestWebKitAPI::setPageLoaderClient):
2018-08-21 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] Augment _WKAttachment SPI to handle NSFileWrappers in addition to NSData
https://bugs.webkit.org/show_bug.cgi?id=188496
<rdar://problem/43216836>
Reviewed by Tim Horton.
Adjusts existing attachment API tests. See below for more detail.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[TestWKWebView synchronouslyInsertAttachmentWithFileWrapper:contentType:]):
(-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
(-[_WKAttachment synchronouslySetData:newContentType:newFilename:error:]):
(-[_WKAttachment synchronouslySetFileWrapper:newContentType:error:]):
Move off of deprecated attachment SPI, and add new helper functions to synchronously insert a new attachment or
update an existing attachment with a file wrapper.
(-[_WKAttachment expectRequestedDataToBe:]):
(TestWebKitAPI::TEST):
Add a new test to verify that file-URL-backed NSFileWrappers can be used to insert and update attachment data.
Also augment an existing test to check that an attachment element which has been copied and pasted within the
same document has a different _WKAttachment wrapper object than its duplicate, but both _WKAttachments are
backed by the same NSFileWrapper that was originally used to insert the attachment.
Additionally, add another macOS test to verify that dropping promised files in an attachment-element-enabled
editable area inserts attachment elements into the document and notifies the UI client with the inserted
attachment data.
(-[_WKAttachment synchronouslyRequestInfo:]): Deleted.
(-[_WKAttachment synchronouslyRequestData:]): Deleted.
* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator _webView:didInsertAttachment:withSource:]):
Move off of -_webView:didInsertAttachment:.
(-[DragAndDropSimulator _webView:didInsertAttachment:]): Deleted.
2018-08-21 David Kilzer <ddkilzer@apple.com>
sort-Xcode-project-file: top-level files and folders are sorted unintentionally when `mainGroup` has no name
<https://webkit.org/b/188755>
Reviewed by Andy Estes.
* Scripts/sort-Xcode-project-file: Fix regular expression to
make `mainGroup` name optional.
2018-08-21 Andy VanWagoner <andy@vanwagoner.family>
Unreviewed, add myself to committers list.
* Scripts/webkitpy/common/config/contributors.json:
2018-08-21 Antti Koivisto <antti@apple.com>
Allow creating WeakPtrs to const objects
https://bugs.webkit.org/show_bug.cgi?id=188785
Reviewed by Geoffrey Garen.
* TestWebKitAPI/Tests/WTF/WeakPtr.cpp:
(TestWebKitAPI::Base::weakPtrFactory const):
(TestWebKitAPI::TEST):
(TestWebKitAPI::Base::weakPtrFactory): Deleted.
2018-08-21 Per Arne Vollan <pvollan@apple.com>
[WebGL] Contexts are not updated when display configuration changed.
https://bugs.webkit.org/show_bug.cgi?id=188750
Reviewed by Brent Fulgham.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::sendDisplayConfigurationChangedMessageForTesting):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::sendDisplayConfigurationChangedMessageForTesting):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2018-08-21 John Wilander <wilander@apple.com>
Make ResourceLoadObserver::logWebSocketLoading() handle websockets in detached frames
https://bugs.webkit.org/show_bug.cgi?id=188757
<rdar://problem/38713390>
Reviewed by Alex Christensen.
These changes add the new WebKitTestRunner function
isStatisticsRegisteredAsSubresourceUnder().
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::isStatisticsRegisteredAsSubresourceUnder):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::isStatisticsRegisteredAsSubresourceUnder):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2018-08-21 Alex Christensen <achristensen@webkit.org>
Transition more API tests from WKPageLoaderClient to WKPageNavigationClient
https://bugs.webkit.org/show_bug.cgi?id=188797
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKit/AboutBlankLoad.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/EphemeralSessionPushStateNoHistoryCallback.cpp:
(TestWebKitAPI::didSameDocumentNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/FailedLoad.cpp:
(TestWebKitAPI::didFailProvisionalNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/FrameMIMETypeHTML.cpp:
(TestWebKitAPI::didStartProvisionalNavigation):
(TestWebKitAPI::didCommitNavigation):
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
(TestWebKitAPI::didCommitLoadForFrame): Deleted.
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/FrameMIMETypePNG.cpp:
(TestWebKitAPI::didStartProvisionalNavigation):
(TestWebKitAPI::didCommitNavigation):
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
(TestWebKitAPI::didCommitLoadForFrame): Deleted.
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/LayoutMilestonesWithAllContentInFrame.cpp:
(TestWebKitAPI::renderingProgressDidChange):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didLayout): Deleted.
* TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFrames.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::renderingProgressDidChange):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
(TestWebKitAPI::didLayout): Deleted.
* TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
(TestWebKitAPI::State::State):
(TestWebKitAPI::didStartProvisionalNavigation):
(TestWebKitAPI::didCommitNavigation):
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::decidePolicyForNavigationAction):
(TestWebKitAPI::decidePolicyForResponse):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didStartProvisionalLoadForFrame): Deleted.
(TestWebKitAPI::didCommitLoadForFrame): Deleted.
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
(TestWebKitAPI::decidePolicyForNewWindowAction): Deleted.
* TestWebKitAPI/Tests/WebKit/PageLoadDidChangeLocationWithinPageForFrame.cpp:
(TestWebKitAPI::didSameDocumentNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
(TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/PrivateBrowsingPushStateNoHistoryCallback.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::didSameDocumentNavigationForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/ReloadPageAfterCrash.cpp:
(TestWebKitAPI::didFinishLoad):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/WKBundleFileHandle.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/mac/RestoreStateAfterTermination.mm:
(TestWebKitAPI::didFinishLoad):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:
(WebKit2_CommandBackForwardTestWKView::SetUp):
(WebKit2_CommandBackForwardTestWKView::didFinishLoadForFrame): Deleted.
2018-08-20 Alex Christensen <achristensen@webkit.org>
Replace WKPageLoaderClient with WKPageNavigationClient in many API tests
https://bugs.webkit.org/show_bug.cgi?id=188771
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKit/CloseThenTerminate.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/CookieManager.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/DeferredViewInWindowStateChange.mm:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/DidNotHandleKeyDown.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/DidRemoveFrameFromHiearchyInPageCache.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/EventModifiers.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setClients):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/Find.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/FindMatches.mm:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/ForceRepaint.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/FrameHandle.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/Geolocation.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/HitTestResultNodeHandle.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/InjectedBundleBasic.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/LimitTitleSize.cpp:
(TestWebKitAPI::didFinishLoadForFrame):
* TestWebKitAPI/Tests/WebKit/LoadAlternateHTMLStringWithNonDirectoryURL.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::loadAlternateHTMLString):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/LoadCanceledNoServerRedirectCallback.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/LoadPageOnCrash.cpp:
(TestWebKitAPI::WebKit2CrashLoader::WebKit2CrashLoader):
(TestWebKitAPI::didFinishLoad):
* TestWebKitAPI/Tests/WebKit/MenuTypesForMouseEvents.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/MouseMoveAfterCrash.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/NewFirstVisuallyNonEmptyLayoutFails.cpp:
(TestWebKitAPI::didFinishLoadForFrame):
* TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/PendingAPIRequestURL.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/ResizeWindowAfterCrash.cpp:
(TestWebKitAPI::didFinishLoad):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/RestoreSessionStateContainingFormData.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/ScrollPinningBehaviors.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishDocumentLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/SpacebarScrolling.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/StopLoadingDuringDidFailProvisionalLoad.cpp:
(TestWebKitAPI::didFailProvisionalNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFailProvisionalLoadWithErrorForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/TerminateTwice.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/TextFieldDidBeginAndEndEditing.cpp:
(TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::didFinishNavigation):
(TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::setPageLoaderClient):
(TestWebKitAPI::WebKit2TextFieldBeginAndEditEditingTest::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/UserMessage.cpp:
(TestWebKitAPI::WebKit2UserMessageRoundTripTest::didFinishNavigation):
(TestWebKitAPI::WebKit2UserMessageRoundTripTest::setPageLoaderClient):
(TestWebKitAPI::WebKit2UserMessageRoundTripTest::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/WKPageConfiguration.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/WKPageCopySessionStateWithFiltering.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/WKPageGetScaleFactorNotZero.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/WKPageIsPlayingAudio.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setUpClients):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/WKThumbnailView.mm:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/WebArchive.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/mac/AttributedSubstringForProposedRangeWithImage.mm:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/mac/ContextMenuDownload.mm:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/mac/EditorCommands.mm:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/mac/GetPIDAfterAbortedProcessLaunch.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKit/mac/InjectedBundleAppleEvent.cpp:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
(didFinishNavigation):
(TestWebKitAPI::TEST):
(didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
(didFinishNavigation):
(TestWebKitAPI::TEST):
(didFinishLoadForFrame): Deleted.
* TestWebKitAPI/Tests/mac/FirstResponderScrollingPosition.mm:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::TEST):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
* TestWebKitAPI/mac/WebKitAgnosticTest.mm:
(TestWebKitAPI::didFinishNavigation):
(TestWebKitAPI::setPageLoaderClient):
(TestWebKitAPI::didFinishLoadForFrame): Deleted.
2018-08-21 Adrian Perez de Castro <aperez@igalia.com>
[WPE] Update to use libwpe-1.0.0 and WPEBackend-fdo-1.0.0
https://bugs.webkit.org/show_bug.cgi?id=188782
Reviewed by Michael Catanzaro.
Make the build depend on wpe-0.2, and change the Flatpak and JHBuild development
environments to use version 1.0.0 of libwpe and WPEBackend-fdo.
* flatpak/org.webkit.WPE.yaml: Update to use libwpe and WPEBackend-fdo version 1.0.0 from
release tarballs, and removed the (now unneeded) Lua and LuaJIT modules.
* wpe/jhbuild.modules: Ditto.
2018-08-21 Michael Catanzaro <mcatanzaro@igalia.com>
[Flatpak] Update to GNOME master runtime
https://bugs.webkit.org/show_bug.cgi?id=188731
Reviewed by Philippe Normand.
The 3.28 runtime is pretty stale at this point. We could wait a couple weeks for the 3.30
runtime, but I don't think there's any need to stick with the stable runtime when we have
the ability to pin to a particular version of the master runtime. There are also several
advantages to switching to the master runtime.
* flatpak/files/httpd-autogen.sh: Removed.
* flatpak/flatpakutils.py:
(WebkitFlatpak.clean_args):
* flatpak/org.webkit.GTK.yaml:
* flatpak/org.webkit.WebKit.yaml:
* flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Removed.
* flatpak/patches/libgcrypt-0001-Use-pkg-config-to-detect-gpg-error.patch: Removed.
2018-08-20 Jonathan Bedard <jbedard@apple.com>
WebKitTestRunner: Add watchOS entitlements
https://bugs.webkit.org/show_bug.cgi?id=188758
Reviewed by Tim Horton.
watchOS needs an additional entitlement to open up a socket for on-device testing.
* WebKitTestRunner/Configurations/WebKitTestRunnerApp-watchOS.entitlements: Added.
* WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
2018-08-20 Thomas Denney <tdenney@apple.com>
[WHLSL] Remove generics from the interpreter
https://bugs.webkit.org/show_bug.cgi?id=187988
Reviewed by Myles C. Maxfield.
This patch completely removes generic and protocol support from WHLSL
whilst adding back any features that were originally implemented with
generics.
Many of the changes in this patch just remove occurrences of type
arguments and type parameters --- although there are some cases where
they have been deliberately left in --- as well as removing tests only
relevant to those features. These changes are not listed below.
* WebGPUShadingLanguageRI/All.js: Add/remove JS dependencies
* WebGPUShadingLanguageRI/AutoWrapper.js:
(AutoWrapper.prototype.visitConstexprTypeParameter): Deleted.
* WebGPUShadingLanguageRI/BuiltinVectorCasts.js: Added. The built-in
vectors have many constructors for different scalar and vector types.
These were originally implemented with generics.
* WebGPUShadingLanguageRI/BuiltinVectorEqualityOperator.js: Adds the
equality operator for built-in vectors, again this was removed with
generics.
* WebGPUShadingLanguageRI/BuiltinVectorGetter.js: Added, as above.
Built-in vectors only support the getter and setter, and not the ander.
* WebGPUShadingLanguageRI/BuiltinVectorIndexGetter.js: Added.
* WebGPUShadingLanguageRI/BuiltinVectorIndexSetter.js: Added.
* WebGPUShadingLanguageRI/BuiltinVectorSetter.js: Added.
* WebGPUShadingLanguageRI/CallExpression.js: Adds support for
instantiating functions which cannot be discovered earlier in
preparation because their types are absent (specifically support for the
operator &[] for array references and the length operator for array
references). Previously support for these was implemented with generics.
(CallExpression.resolve):
(CallExpression.prototype.resolve):
(CallExpression.prototype._resolveByInstantiation):
(CallExpression.prototype._resolveToOperatorAnderIndexer):
(CallExpression.prototype._resolveToOperatorLength):
(CallExpression.prototype.resolveToOverload):
(CallExpression.prototype.becomeCast):
(CallExpression.prototype.toString):
(CallExpression):
* WebGPUShadingLanguageRI/CallExpressionTypeArgumentResolver.js: Added.
We support syntax like vector<int, 2>(a, b) for constructing vectors;
this new preparation step resolves them to specific constructors.
* WebGPUShadingLanguageRI/CallFunction.js:
* WebGPUShadingLanguageRI/Checker.js:
* WebGPUShadingLanguageRI/ConstexprFolder.js:
* WebGPUShadingLanguageRI/CreateLiteralType.js:
* WebGPUShadingLanguageRI/ExpressionFinder.js:
* WebGPUShadingLanguageRI/FlattenProtocolExtends.js: Removed.
* WebGPUShadingLanguageRI/FlattenedStructOffsetGatherer.js:
* WebGPUShadingLanguageRI/Func.js:
* WebGPUShadingLanguageRI/FuncDef.js:
* WebGPUShadingLanguageRI/FuncInstantiator.js: Deleted.
* WebGPUShadingLanguageRI/InferTypesForCall.js: Removed usage of type arguments.
* WebGPUShadingLanguageRI/Inline.js: Remove use of FuncInstantiator.
* WebGPUShadingLanguageRI/Inliner.js: Ditto.
* WebGPUShadingLanguageRI/Intrinsics.js:
* WebGPUShadingLanguageRI/Lexer.js:
* WebGPUShadingLanguageRI/LiteralTypeChecker.js:
* WebGPUShadingLanguageRI/NameContext.js:
(NameContext.prototype.add):
(NameContext.prototype.get let):
(NameContext.underlyingThings.prototype.else):
(NameContext.prototype.resolveFuncOverload):
* WebGPUShadingLanguageRI/NameFinder.js:
* WebGPUShadingLanguageRI/NameResolver.js:
(NameResolver.prototype.visitFunc):
(NameResolver.prototype.visitFuncDef):
(NameResolver.prototype.visitTypeDef):
(NameResolver.prototype.visitStructType):
(NameResolver.prototype.visitTypeRef):
(NameResolver.prototype.visitCallExpression):
(NameResolver.prototype.visitVectorType):
(NameResolver):
(NameResolver.prototype._visitTypeParametersAndBuildNameContext): Deleted.
(NameResolver.prototype.visitProtocolDecl): Deleted.
* WebGPUShadingLanguageRI/NativeFunc.js:
(NativeFunc):
* WebGPUShadingLanguageRI/NativeFuncInstance.js: Deleted.
* WebGPUShadingLanguageRI/NativeType.js:
(NativeType):
(NativeType.prototype.get name):
(NativeType.prototype.toString):
(NativeType.prototype.get typeParameters): Deleted.
(NativeType.prototype.instantiate): Deleted.
* WebGPUShadingLanguageRI/Node.js:
(Node.prototype.commit):
(Node):
(Node.prototype.substitute): Deleted.
(Node.prototype.substituteToUnification): Deleted.
* WebGPUShadingLanguageRI/OperatorAnderIndex.js: Added, previously
implemented with generics.
* WebGPUShadingLanguageRI/OperatorArrayRefLength.js: Ditto.
* WebGPUShadingLanguageRI/OperatorBool.js: Ditto.
* WebGPUShadingLanguageRI/Parse.js: Removed everything related to
generics and protocols.
* WebGPUShadingLanguageRI/Prepare.js: Added new stages.
* WebGPUShadingLanguageRI/Program.js:
(Program):
(Program.prototype.get types):
(Program.prototype.add):
(Program.prototype.get protocols): Deleted.
* WebGPUShadingLanguageRI/ProtocolDecl.js: Removed.
* WebGPUShadingLanguageRI/ProtocolRef.js: Removed.
* WebGPUShadingLanguageRI/RecursiveTypeChecker.js:
* WebGPUShadingLanguageRI/ResolveCallExpressionsWithTypeArguments.js: Added.
* WebGPUShadingLanguageRI/ResolveNames.js:
* WebGPUShadingLanguageRI/ResolveOverloadImpl.js:
* WebGPUShadingLanguageRI/ResolveTypeDefs.js:
(resolveTypeDefsInProtocols): Deleted.
* WebGPUShadingLanguageRI/Rewriter.js: Changes for new classes.
* WebGPUShadingLanguageRI/SPIRV.html:
* WebGPUShadingLanguageRI/SPIRVCodegen.js:
* WebGPUShadingLanguageRI/StandardLibrary.js: Replace old generic features.
* WebGPUShadingLanguageRI/StatementCloner.js: Changes for new classes.
(StructLayoutBuilder):
* WebGPUShadingLanguageRI/StructType.js:
* WebGPUShadingLanguageRI/SwizzleOp.js:
(SwizzleOp):
(SwizzleOp.prototype.get baseTypeName):
(SwizzleOp.prototype.toString):
(SwizzleOp.functions.):
(SwizzleOp.functions):
(SwizzleOp.prototype.instantiateImplementation):
(SwizzleOp.allSwizzleOperators.): Deleted.
(SwizzleOp.allSwizzleOperators): Deleted.
* WebGPUShadingLanguageRI/SynthesizeArrayOperatorLength.js: Added,
previously implemented with generics.
* WebGPUShadingLanguageRI/SynthesizeCopyConstructorOperator.js: Ditto.
* WebGPUShadingLanguageRI/SynthesizeDefaultConstructorOperator.js: Ditto.
* WebGPUShadingLanguageRI/SynthesizeEnumFunctions.js: Ditto.
* WebGPUShadingLanguageRI/SynthesizeOperatorBool.js: Ditto.
* WebGPUShadingLanguageRI/SynthesizeStructAccessors.js:
(synthesizeStructAccessors.setupImplementationData):
(synthesizeStructAccessors.createFieldType):
(synthesizeStructAccessors.createTypeRef):
(synthesizeStructAccessors.setupAnder):
(synthesizeStructAccessors):
(synthesizeStructAccessors.createTypeParameters): Deleted.
(synthesizeStructAccessors.): Deleted.
* WebGPUShadingLanguageRI/Test.html:
* WebGPUShadingLanguageRI/Test.js: Removed redundant tests and added new
tests for changed language features.
* WebGPUShadingLanguageRI/Type.js:
* WebGPUShadingLanguageRI/TypeDef.js:
* WebGPUShadingLanguageRI/TypeDefResolver.js:
* WebGPUShadingLanguageRI/TypeParameterRewriter.js: Removed.
* WebGPUShadingLanguageRI/TypeRef.js:
* WebGPUShadingLanguageRI/TypeVariable.js: Removed.
* WebGPUShadingLanguageRI/UnificationContext.js:
* WebGPUShadingLanguageRI/VectorType.js: Added.
* WebGPUShadingLanguageRI/Visitor.js: Changes for new classes.
* WebGPUShadingLanguageRI/WSL.md: Removed description of
generics/protocols.
* WebGPUShadingLanguageRI/WrapChecker.js:
(WrapChecker):
(WrapChecker.visitConstexprTypeParameter): Deleted.
(WrapChecker.prototype.visitFuncParameter): Deleted.
(WrapChecker.prototype.visitTypeVariable): Deleted.
* WebGPUShadingLanguageRI/index.html:
2018-08-20 Thomas Denney <tdenney@apple.com>
Added Thomas Denney to contributors.json.
https://bugs.webkit.org/show_bug.cgi?id=188525
Reviewed by Myles C. Maxfield.
* Scripts/webkitpy/common/config/contributors.json:
2018-08-20 Bernhard M. Wiedemann <bwiedemann@suse.de>
[GTK] Sort inspector GResource manifest to ensure reproducible builds
https://bugs.webkit.org/show_bug.cgi?id=188738
Reviewed by Michael Catanzaro.
* glib/generate-inspector-gresource-manifest.py:
(get_filenames): sort list of input files
2018-08-20 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Paste is missing from callout bar when pasteboard only contains custom data
https://bugs.webkit.org/show_bug.cgi?id=184271
<rdar://problem/39256708>
Reviewed by Andy Estes.
This API test is failing when run against older macOS builds, where custom pasteboard
data is not enabled by default.
* TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
(TestWebKitAPI::TEST):
2018-08-20 Claudio Saavedra <csaavedra@igalia.com>
Add WPE Debug configuration to the flakiness dashboard
https://bugs.webkit.org/show_bug.cgi?id=188743
Reviewed by Michael Catanzaro.
* TestResultServer/static-dashboards/builders.jsonp:
* TestResultServer/static-dashboards/flakiness_dashboard_unittests.js:
2018-08-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add API to throw exceptions using printf formatted strings
https://bugs.webkit.org/show_bug.cgi?id=188698
Reviewed by Michael Catanzaro.
Add cases to test the new API.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(createFormattedError):
(createCustomFormattedError):
(testJSCExceptions):
2018-08-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Complete the JSCException API
https://bugs.webkit.org/show_bug.cgi?id=188695
Reviewed by Michael Catanzaro.
Add cases to test the new API.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCCheckSyntax):
(createCustomError):
(testJSCExceptions):
2018-08-18 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Paste is missing from callout bar when pasteboard only contains custom data
https://bugs.webkit.org/show_bug.cgi?id=184271
<rdar://problem/39256708>
Reviewed by Ryosuke Niwa.
Add a new API test to verify that on both iOS and macOS, copied custom pasteboard data can only be pasted in a
matching origin. Additionally verify that on iOS, the web view is capable of performing the "paste:" selector.
* TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
(TestWebKitAPI::TEST):
(imagePath): Deleted.
(writeTypesAndDataToPasteboard): Deleted.
(setUpWebView): Deleted.
(markupString): Deleted.
Make this test file no longer exclusive to macOS.
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView synchronouslyLoadHTMLString:baseURL:]):
Tweak this helper to also take in a `baseURL`. Defaults to using the TestWebKitAPI bundle resource URL.
(-[TestWKWebView synchronouslyLoadHTMLString:]):
2018-08-17 Jonathan Bedard <jbedard@apple.com>
Add back --wtf-only to run-api-tests
https://bugs.webkit.org/show_bug.cgi?id=187893
<rdar://problem/42483983>
Reviewed by Aakash Jain.
When doing WTF development, it is not necessary to build or run all of the API
tests. Generally, if a user has specified a specific binary (or binaries) that
they are interested in testing, it is not necessary to check all API test binaries.
* Scripts/webkitpy/api_tests/manager.py:
(Manager._collect_tests): Only use the binaries matching the program arguments
when collecting tests.
(Manager._binaries_for_arguments): Generate a list of binaries which match the
program arguments.
(Manager.run): Pass a list binaries to check.
* Scripts/webkitpy/api_tests/run_api_tests.py:
(parse_args):
* Scripts/webkitpy/port/base.py:
(Port.check_api_test_build): If the caller specifies which API test binaries it
requires, only check the ones specified.
(Port.path_to_api_test_binaries): Allow the caller to only build the WTF API tests.
(Port._build_api_tests): Allow the caller to only build the WTF API tests.
* Scripts/webkitpy/port/win.py:
(WinPort.path_to_api_test_binaries):
2018-08-17 Jer Noble <jer.noble@apple.com>
REGRESSION (234743) Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio
https://bugs.webkit.org/show_bug.cgi?id=188470
<rdar://problem/43144969>
Reviewed by Alex Christensen.
On a loaded server, the WebContent process may send the "playing" message before the
UIProcess has a chance to register a listener for that message. Restructure the tests
so that the listener is registered before the page is loaded.
* TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
(PreferredAudioBufferSize::runPlayingTestWithPageNamed):
(TEST_F):
2018-08-16 Wenson Hsieh <wenson_hsieh@apple.com>
[macOS] [WK2] Add infrastructure to test receiving file promises on drop
https://bugs.webkit.org/show_bug.cgi?id=188583
Reviewed by Andy Estes.
Enable testing file promise drop handling on the WebKit2 port of macOS by introducing a subclass of
NSFilePromiseReceiver and implementing `-enumerateDraggingItemsWithOptions:forView:…` on TestDraggingInfo (the
concrete NSDraggingInfo implementation used by DragAndDropSimulator) using the mock file receiver. Also
introduces 3 new macOS tests. See below for more details.
A large portion of this logic is ported over from DumpRenderTree testing infrastructure added in r229297. In a
future patch, we should introduce a way to write code common to both API tests, WebKitTestRunner and
DumpRenderTree, and make this code shared among all three testing harnesses.
Tests: DragAndDropTests.DragImageElementIntoFileUpload
DragAndDropTests.DragPromisedImageFileIntoFileUpload
DragAndDropTests.DragImageFileIntoFileUpload
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
(TEST):
Drive-by fix: Replace NSMakePoint with CGPointMake.
* TestWebKitAPI/Tests/WebKitCocoa/image-and-file-upload.html:
Add a new test page consisting of an image and a "file upload" area that updates exercises DataTransfer API to
load the dropped image.
* TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:
(waitForConditionWithLogging):
Add a helper function to wait for a condition to evaluate to true. To make failures more informative,
additionally add a mechanism to log a warning message after a given timeout, if the condition has yet to be met.
(TEST):
Add new tests to exercise a few cases of file upload in WebKit, including: (1) dragging from an image element,
(2) dragging files written to the pasteboard as promises, and (3) files written to the pasteboard as file URLs.
* TestWebKitAPI/cocoa/DragAndDropSimulator.h:
Surface the new functionality provided by the file promise receiver mock via two new methods on
DragAndDropSimulator to (1) write files as file promises to the pasteboard, and (2) write files as file paths
directly to the pasteboard.
* TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
(-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
(-[DragAndDropSimulator externalPromisedFiles]):
(getFilePathsAndTypeIdentifiers):
(-[DragAndDropSimulator writePromisedFiles:]):
(-[DragAndDropSimulator writeFiles:]):
* TestWebKitAPI/mac/TestDraggingInfo.h:
* TestWebKitAPI/mac/TestDraggingInfo.mm:
(-[TestDraggingInfo initWithDragAndDropSimulator:]):
(-[TestDraggingInfo filePromiseReceivers]):
(-[TestDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
Implement this by invoking the given block with a TestFilePromiseReceiver. While all other classes are
unhandled by this testing code, WebKit only calls into this with [NSFilePromiseReceiver class], this is
currently sufficient for testing purposes.
* TestWebKitAPI/mac/TestFilePromiseReceiver.h: Copied from Tools/TestWebKitAPI/mac/TestDraggingInfo.h.
* TestWebKitAPI/mac/TestFilePromiseReceiver.mm: Added.
(-[TestFilePromiseReceiver initWithPromisedTypeIdentifiers:dragAndDropSimulator:]):
(-[TestFilePromiseReceiver fileTypes]):
(-[TestFilePromiseReceiver fileNames]):
(-[TestFilePromiseReceiver dealloc]):
(-[TestFilePromiseReceiver draggingSource]):
(-[TestFilePromiseReceiver setDraggingSource:]):
(fileNameWithNumericSuffix):
(copyFile):
Add a helper to copy a file into a destination directory. Used to implement the main functionality of our
NSFilePromiseReceiver subclass, which copies the files specified by test code into the directory determined by
WebKit.
(-[TestFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]):
2018-08-16 Alex Christensen <achristensen@webkit.org>
Add entitlement to MiniBrowser to allow it to communicate with com.apple.Safari.SafeBrowsing.Service
https://bugs.webkit.org/show_bug.cgi?id=188677
Reviewed by Tim Horton.
* MiniBrowser/MiniBrowser.entitlements:
SSBLookupContext lookUpURL:completionHandler: fails to communicate with its service without this entitlement
on released operating systems. See <rdar://problem/42749777>
2018-08-16 Jer Noble <jer.noble@apple.com>
Add option to run-api-tests to force running of DISABLED tests.
https://bugs.webkit.org/show_bug.cgi?id=188674
Reviewed by Joseph Pecoraro.
* Scripts/webkitpy/api_tests/run_api_tests.py:
(parse_args):
* Scripts/webkitpy/api_tests/runner.py:
(Runner.command_for_port):
(_Worker._run_single_test):
2018-08-16 Aakash Jain <aakash_jain@apple.com>
[ews-build] Separate queues for Builders and Testers - macOS High Sierra
https://bugs.webkit.org/show_bug.cgi?id=188540
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/config.json: Splitted few macOS queues into builders and testers.
2018-08-16 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add build steps ArchiveTestResults, UploadTestResults and ExtractTestResults
https://bugs.webkit.org/show_bug.cgi?id=188666
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps.py:
(ArchiveTestResults): Build step to Archive the test results.
(UploadTestResults): Build step to upload the archive.
(ExtractTestResults): Build step to unzip the archive on server and generate a link.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
(ExpectMasterShellCommand): Copied from other similar internal code.
2018-08-16 Aakash Jain <aakash_jain@apple.com>
[ews-build] Separate queues for Builders and Testers - macOS Sierra
https://bugs.webkit.org/show_bug.cgi?id=188516
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/config.json: Splitted macOS Sierra Release queues into builders and testers.
* BuildSlaveSupport/ews-build/factories.py: Used appropriate base classes for builders and testers.
2018-08-16 Basuke Suzuki <Basuke.Suzuki@sony.com>
[Win][DumpRenderTree] Remove error message for duplicated tests.
https://bugs.webkit.org/show_bug.cgi?id=188662
Reviewed by Per Arne Vollan.
This was added to track down an issue where the same tests appeared
to be run multiple times. This turned out to not be the case.
See https://bugs.webkit.org/show_bug.cgi?id=166760 .
* DumpRenderTree/win/DumpRenderTree.cpp:
(runTest):
2018-08-16 Alex Christensen <achristensen@webkit.org>
Re-introduce assertion removed in r234890
https://bugs.webkit.org/show_bug.cgi?id=188611
Reviewed by Geoffrey Garen.
* TestWebKitAPI/Tests/WTF/Vector.cpp:
(TestWebKitAPI::TEST):
2018-08-16 Jer Noble <jer.noble@apple.com>
Add Experimental Feature support for SourceBuffer.changeType()
https://bugs.webkit.org/show_bug.cgi?id=188626
<rdar://problem/43356021>
Reviewed by Eric Carlson.
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(resetWebPreferencesToConsistentValues):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
2018-08-16 Aditya Keerthi <akeerthi@apple.com>
Support drag-and-drop for input[type=color]
https://bugs.webkit.org/show_bug.cgi?id=188464
Reviewed by Wenson Hsieh.
Added five cross-platform API tests, to verify that dragging and dropping with
color inputs changes the value of the drop target if and only if both inputs are
enabled. Also tests that the change and input events are fired when changing the
value of a color input through drag and drop.
Additionally, added a macOS-specific test to verify that dropping an item with
NSColorPboardType changes the value of the color input.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/color-drop.html: Added.
* TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm:
(TestWebKitAPI::TEST):
2018-08-16 Antti Koivisto <antti@apple.com>
Use OptionSet for ActivityState::Flags
https://bugs.webkit.org/show_bug.cgi?id=188554
Reviewed by Brent Fulgham.
* TestWebKitAPI/Tests/WTF/OptionSet.cpp:
(TestWebKitAPI::TEST):
2018-08-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] MiniBrowser: web view doesn't get the focus when new window is created
https://bugs.webkit.org/show_bug.cgi?id=188546
Reviewed by Michael Catanzaro.
When a new window is created, the first widget of the windo is getting the focus, the toolbar in this case. We
always want the WebView to grab the focus. In case of new empty tab, we want to the URL bar to be focused
instead. This was causing failures in WebDriver tests that create a popup window with an input element that is
filled with send keys command. The input element is marked as focused in the DOM, but the actual focused widget
is the toolbar, so key events are sent to the toolbar instead of the web view.
* MiniBrowser/gtk/BrowserWindow.c:
(webViewCreate):
(newTabCallback):
(openPrivateWindow):
(browser_window_get_or_create_web_view_for_automation):
2018-08-16 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix WebDriver tests after r234839.
New pytest requires to autoinstall attrs too.
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_pytest):
2018-08-15 Ansh Shukla <ansh_shukla@apple.com>
NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault
https://bugs.webkit.org/show_bug.cgi?id=186870
<rdar://problem/41314410>
Reviewed by Alex Christensen.
* WebKitTestRunner/TestController.cpp:
(WTR::toString):
(WTR::TestController::canAuthenticateAgainstProtectionSpace): Expose type of authentication challenge so we can test OAuth.
(WTR::TestController::didReceiveAuthenticationChallenge):
2018-08-15 Ben Richards <benton_richards@apple.com>
We should cache the compiled sandbox profile in a data vault
https://bugs.webkit.org/show_bug.cgi?id=184991
Reviewed by Ryosuke Niwa.
Added trace points for sandbox initialization
* Tracing/SystemTracePoints.plist:
2018-08-15 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r234870.
The test introduced with this change is a flaky failure.
Reverted changeset:
"NSURLAuthenticationMethodOAuth challenges are surfaced to
clients in -didReceiveAuthenticationChallenge as
NSURLAuthenticationMethodDefault"
https://bugs.webkit.org/show_bug.cgi?id=186870
https://trac.webkit.org/changeset/234870
2018-08-15 Jonathan Bedard <jbedard@apple.com>
WebKitTestRunner should support watch devices
https://bugs.webkit.org/show_bug.cgi?id=188570
Reviewed by Alex Christensen.
* WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
2018-08-15 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment SPI] Remove attachment display mode options
https://bugs.webkit.org/show_bug.cgi?id=188596
Reviewed by Dan Bernstein.
Remove API tests and API test helpers for verifying the behavior of in-place media attachment elements.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:]):
(TestWebKitAPI::TEST):
(testVideoData): Deleted.
(displayOptionsWithMode): Deleted.
(-[TestWKWebView synchronouslyInsertAttachmentWithFilename:contentType:data:options:]): Deleted.
2018-08-14 Devin Rousso <drousso@apple.com>
Unreviewed, change my emails.
* Scripts/webkitpy/common/config/contributors.json:
* Scripts/webkitpy/common/config/watchlist:
2018-08-14 Saam barati <sbarati@apple.com>
HashMap<Ref<P>, V> asserts when V is not zero for its empty value
https://bugs.webkit.org/show_bug.cgi?id=188582
Reviewed by Sam Weinig.
* TestWebKitAPI/Tests/WTF/HashMap.cpp:
(TestWebKitAPI::TEST):
2018-08-14 Zalan Bujtas <zalan@apple.com>
[LFC][Floating] Add support for negative clearance.
https://bugs.webkit.org/show_bug.cgi?id=188555
Reviewed by Simon Fraser.
* LayoutReloaded/misc/LFC-passing-tests.txt:
2018-08-14 Sihui Liu <sihui_liu@apple.com>
Crash in WebKit::filterPreloadHSTSEntry via NetworkProcess::getHostNamesWithHSTSCache
https://bugs.webkit.org/show_bug.cgi?id=188576
<rdar://problem/43148977>
Reviewed by Alex Christensen.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WKWebsiteDatastore.mm: Added.
(TEST):
2018-08-14 Alex Christensen <achristensen@webkit.org>
isValidCSSSelector is unsafe to be called from a non-main thread
https://bugs.webkit.org/show_bug.cgi?id=188581
<rdar://problem/40517358>
Reviewed by Sam Weinig.
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::InMemoryCompiledContentExtension::create):
(TestWebKitAPI::checkCompilerError):
2018-08-14 Ansh Shukla <ansh_shukla@apple.com>
NSURLAuthenticationMethodOAuth challenges are surfaced to clients in -didReceiveAuthenticationChallenge as NSURLAuthenticationMethodDefault
https://bugs.webkit.org/show_bug.cgi?id=186870
<rdar://problem/41314410>
Reviewed by Alex Christensen.
* WebKitTestRunner/TestController.cpp:
(WTR::toString):
(WTR::TestController::canAuthenticateAgainstProtectionSpace): Expose type of authentication challenge so we can test OAuth.
(WTR::TestController::didReceiveAuthenticationChallenge):
2018-08-14 Fujii Hironori <Hironori.Fujii@sony.com>
[webkitpy][Win] LayoutTests: test names should be Unix style, separated by slash not backslash
https://bugs.webkit.org/show_bug.cgi?id=187973
Reviewed by Alex Christensen.
In LayoutTests, test names have been canonicalized in Unix style
since Bug 63597, for example 'fast/css/001.html'. But Bug 179219,
Bug 179572, Bug 180660, and Bug 181814 have changed to use
os.path.seq instead of slash if Windows Python is used.
Revert parts of those changes. Change relative_test_filename to
return a slash-separated test name as chromium_win.py used to do.
This change fixes all 41 test-webkitpy failures in WinCairo port.
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser._parse_line): Do not convert test names with normpath.
* Scripts/webkitpy/port/base.py:
(Port.normalize_test_name): Use TEST_PATH_SEPARATOR instead of os.path.sep.
(Port.relative_test_filename): Replace self.host.filesystem.sep with self.TEST_PATH_SEPARATOR.
(Port.abspath_for_test): Replace self.TEST_PATH_SEPARATOR with self.host.filesystem.sep.
* Scripts/webkitpy/port/driver.py:
(Driver): Use '/' instead of os.sep.
* Scripts/webkitpy/port/win.py:
(WinCairoPort): Do not override TEST_PATH_SEPARATOR.
2018-08-14 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add build step to run WK1 layout-test
https://bugs.webkit.org/show_bug.cgi?id=188498
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps.py:
(RunWebKit1Tests): Class to run WebKit1Tests.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2018-08-14 Patrick Griffis <pgriffis@igalia.com>
[Flatpak] Fix --cmakeargs
https://bugs.webkit.org/show_bug.cgi?id=188567
Reviewed by Michael Catanzaro.
* flatpak/flatpakutils.py:
(WebkitFlatpak.setup_dev_env):
2018-08-14 Darshan Kadu <dkadu@igalia.com>
Enhancement request: Make export-w3c-test-changes add the PR to "See Also" links
https://bugs.webkit.org/show_bug.cgi?id=186140
Reviewed by Youenn Fablet.
Added an optional parameter see_also to post_comment_to_bug function and used it for adding see_also variable's content in "See Also"
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla.post_comment_to_bug):
Modified mock for see_also parameter
* Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
(MockBugzilla.post_comment_to_bug):
Made following unit tests to have see_also in bug comment
* Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py:
* Scripts/webkitpy/tool/bot/sheriff_unittest.py:
(SheriffTest.test_post_blame_comment_on_bug):
* Scripts/webkitpy/tool/commands/applywatchlistlocal_unittest.py:
* Scripts/webkitpy/tool/commands/queues_unittest.py:
* Scripts/webkitpy/tool/commands/upload_unittest.py:
* Scripts/webkitpy/tool/steps/applywatchlist_unittest.py:
* Scripts/webkitpy/w3c/test_exporter.py:
(WebPlatformTestExporter.make_pull_request):
* Scripts/webkitpy/w3c/test_exporter_unittest.py:
(TestExporterTest.MockBugzilla.post_comment_to_bug):
(TestExporterTest.test_export):
2018-08-14 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add support for max_builds parameter for workers
https://bugs.webkit.org/show_bug.cgi?id=188531
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/loadConfig.py:
(loadBuilderConfig): Added support for max_builds.
2018-08-14 Zalan Bujtas <zalan@apple.com>
[LFC][Floating] Adjust vertical position with non-collapsing previous sibling margin.
https://bugs.webkit.org/show_bug.cgi?id=188543
Reviewed by Antti Koivisto.
* LayoutReloaded/misc/LFC-passing-tests.txt:
2018-08-14 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix WebDriver tests after r234839.
New pytest requires to autoinstall more_itertools and six too.
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_pytest):
2018-08-14 Tomas Popela <tpopela@redhat.com>
[GTK] Minibrowser: Add labels for buttons
https://bugs.webkit.org/show_bug.cgi?id=188549
Reviewed by Carlos Garcia Campos.
So they are accessible easier (i.e. while testing WebKitGTK+ through Minibrowser in Dogtail).
* MiniBrowser/gtk/BrowserWindow.c:
(webViewIsLoadingChanged):
(browserWindowSetupEditorToolbar):
(browser_window_init):
2018-08-14 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix WebDriver tests after r234839.
New pytest requires to autoinstall atomicwrites too.
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_pytest):
2018-08-14 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix WebDriver tests after r234839.
New pytest requires to autoinstall pluggy and funcsigs too.
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_pytest):
2018-08-13 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update W3C WebDriver imported tests.
Bump pytest version to 3.6.2.
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_pytest):
2018-08-13 Thomas Denney <tdenney@apple.com>
Allow the substring 'me' in contributor names and email addresses
https://bugs.webkit.org/show_bug.cgi?id=188538
Reviewed by Tim Horton.
A test didn't permit the string "me" in email addresses or names of contributors.
* Scripts/webkitpy/common/config/committers_unittest.py:
(CommittersTest.test_contributors_by_fuzzy_match):
2018-08-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r234812.
https://bugs.webkit.org/show_bug.cgi?id=188536
broke the build (Requested by ThomasDenney on #webkit).
Reverted changeset:
"Added Thomas Denney to contributors.json."
https://bugs.webkit.org/show_bug.cgi?id=188525
https://trac.webkit.org/changeset/234812
2018-08-13 Sihui Liu <sihui_liu@apple.com>
Avoid timeout resulted from calling waitUntilDone when test is not running
https://bugs.webkit.org/show_bug.cgi?id=188389
Reviewed by Chris Dumez.
If test is not running, we should not set the waitUntilDone flag, or it may cause subsequent tests timeout.
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::waitUntilDone):
2018-08-13 Wenson Hsieh <wenson_hsieh@apple.com>
[WK2] [macOS] Implement a mechanism to test drag and drop
https://bugs.webkit.org/show_bug.cgi?id=181898
<rdar://problem/39181698>
Reviewed by Simon Fraser.
Implements the currently stubbed DragAndDropSimulator on macOS, and introduces a new API test for r227266. See
comments below for more detail.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/DragAndDropTests.mm: Copied from Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm.
Introduce a file for cross-platform drag and drop tests, currently for iOS and macOS. Additionally add a test
for r227266, which was fixed earlier this year but could not be tested due to a lack of testing mechanism on
macOS in WebKit2.
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/full-page-dropzone.html: Added.
Minor tweaks to this test page to add "dragover" and "drop" event handlers.
* TestWebKitAPI/Tests/WebKitCocoa/image-in-link-and-input.html:
* TestWebKitAPI/Tests/WebKitCocoa/link-in-iframe-and-input.html: Added.
Add a new test page that includes a link embedded within an iframe below a plain text input.
* TestWebKitAPI/Tests/mac/DragAndDropTestsMac.mm: Added.
(TEST):
* TestWebKitAPI/Tests/mac/LegacyDragAndDropTests.mm: Renamed from Tools/TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm.
Move only existing WebKit2 macOS drag and drop test (DragAndDropPasteboardTests.NumberOfValidItemsForDrop) out
of DragAndDropPasteboardTests.mm and into a new file, DragAndDropTestsMac.mm. Additionally, rename
DragAndDropPasteboardTests to LegacyDragAndDropTests, since it now only contains two legacy WebView tests for
drag and drop.
(+[FrameLoadCompletionListener listenerWithCompletionBlock:]):
(-[FrameLoadCompletionListener initWithCompletionBlock:]):
(-[FrameLoadCompletionListener webView:didFinishLoadForFrame:]):
(-[DragSource draggingSourceOperationMaskForLocal:]):
(-[DragInfo initWithImage:offset:pasteboard:source:destinationWindow:]):
(-[DragInfo lastMousePosition]):
(-[DragInfo setLastMousePosition:]):
(-[DragInfo draggingDestinationWindow]):
(-[DragInfo draggingSourceOperationMask]):
(-[DragInfo draggingLocation]):
(-[DragInfo draggedImageLocation]):
(-[DragInfo draggedImage]):
(-[DragInfo draggingPasteboard]):
(-[DragInfo draggingSource]):
(-[DragInfo draggingSequenceNumber]):
(-[DragInfo slideDraggedImageTo:]):
(-[DragInfo namesOfPromisedFilesDroppedAtDestination:]):
(-[DragInfo draggingFormation]):
(-[DragInfo setDraggingFormation:]):
(-[DragInfo animatesToDestination]):
(-[DragInfo setAnimatesToDestination:]):
(-[DragInfo numberOfValidItemsForDrop]):
(-[DragInfo setNumberOfValidItemsForDrop:]):
(-[DragInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
(-[DragInfo springLoadingHighlight]):
(-[DragInfo resetSpringLoading]):
(TestWebKitAPI::getTestImage):
(TestWebKitAPI::webViewAfterPerformingDragOperation):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/mac/full-page-dropzone.html: Removed.
* TestWebKitAPI/cocoa/DragAndDropSimulator.h:
Flesh out some of the DragAndDropSimulator API for macOS, exposing (among other things) the drag pasteboard,
the current NSDraggingInfo, the initial location of the drag image, and the drag image itself.
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView mouseDownAtPoint:simulatePressure:]):
(-[TestWKWebView mouseUpAtPoint:]):
(-[TestWKWebView mouseMoveToPoint:withFlags:]):
(-[TestWKWebView sendClicksAtPoint:numberOfClicks:]):
(-[TestWKWebView mouseEnterAtPoint:]):
(-[TestWKWebView mouseExitAtPoint:]):
(-[TestWKWebView mouseDragToPoint:]):
(-[TestWKWebView _mouseEventWithType:atLocation:]):
(-[TestWKWebView _mouseEventWithType:atLocation:flags:timestamp:clickCount:]):
Add TestWKWebView helpers to send MouseMove, MouseEnter and MouseDrag NSEvents to the web view. Additionally,
rename parameter names to these helpers to make it more obvious that these locations are all in NSWindow
coordinates.
(-[TestWKWebView typeCharacter:]):
Drive-by style fix: put this opening brace on the beginning of the next line.
* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator initWithWebViewFrame:]):
(-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
(-[DragAndDropSimulator webView]):
Small iOS DragAndDropSimulator adjustments for new DragAndDropSimulator interfaces.
* TestWebKitAPI/mac/DragAndDropSimulatorMac.mm:
(-[DragAndDropTestWKWebView initWithFrame:configuration:simulator:]):
Introduce a WKWebView subclass for testing drag and drop that overrides `-dragImage:at:offset:…`, and instead
allows DragAndDropSimulator to take over the drag.
(-[DragAndDropTestWKWebView dragImage:at:offset:event:pasteboard:source:slideBack:]):
Override this entry point into drag and drop code, and instead call out to the DragAndDropSimulator to
coordinate the drag.
(-[DragAndDropTestWKWebView waitForPendingMouseEvents]):
Helper method to wait for the web process to finish handling all in-flight mouse events.
(defaultExternalDragImage):
Set this image as the default drag image when simulating an incoming drag session from outside of the web view.
(-[DragAndDropSimulator initWithWebViewFrame:]):
(-[DragAndDropSimulator initWithWebViewFrame:configuration:]):
(-[DragAndDropSimulator flipAboutXAxisInHostWindow:]):
Helper method to flip a given point about the X axis of the window.
(-[DragAndDropSimulator locationInViewForCurrentProgress]):
Map a progress value (between 0 and 1) to a drag location.
(-[DragAndDropSimulator initialProgressForMouseDrag]):
Determines the initial progress value when initiation a drag in web content. This is the initial progress
required to ensure that the first mouse drag event exceeds the drag distance hysteresis and causes any drag
(if applicable) to begin.
(-[DragAndDropSimulator runFrom:to:]):
(-[DragAndDropSimulator performDragInWebView:atLocation:withImage:pasteboard:source:]):
Helper to coordinate drag updates in both the cases where we're simulating a drag session entering from outside
of the web view, and in the case where we've initiated a drag from the web view itself.
(-[DragAndDropSimulator webView]):
(-[DragAndDropSimulator setExternalDragPasteboard:]):
(-[DragAndDropSimulator externalDragPasteboard]):
Just like its iOS counterpart (setExternalItemProviders:), setting an external drag pasteboard on macOS puts the
DragAndDropSimulator in a mode that simulates a drag coming in from outside the web view, using the given
pasteboard.
(-[DragAndDropSimulator setExternalDragImage:]):
(-[DragAndDropSimulator externalDragImage]):
May be optionally set when specifying an external drag pasteboard to specify the drag image used. If no external
drag image is specified, falls back to the default image returned by `defaultExternalDragImage()`.
(-[DragAndDropSimulator draggingInfo]):
(-[DragAndDropSimulator willEndDraggingHandler]):
(-[DragAndDropSimulator setWillEndDraggingHandler:]):
Hook to allow tests to run logic right before performing the drop (if the current drag operation is not none) or
ending the drag session without performing a drag operation.
(-[DragAndDropSimulator initWithWebView:]): Deleted.
(-[DragAndDropSimulator dealloc]): Deleted.
(-[DragAndDropSimulator phase]): Deleted.
* TestWebKitAPI/mac/TestDraggingInfo.h: Copied from Tools/TestWebKitAPI/mac/DragAndDropSimulatorMac.mm.
* TestWebKitAPI/mac/TestDraggingInfo.mm: Added.
Mock object conforming to NSDraggingInfo that is passed to WKWebView when invoking -draggingUpdated:,
-draggingEntered: and -draggingExited:.
(-[TestDraggingInfo draggingPasteboard]):
(-[TestDraggingInfo setDraggingPasteboard:]):
(-[TestDraggingInfo draggingSource]):
(-[TestDraggingInfo setDraggingSource:]):
(-[TestDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
(-[TestDraggingInfo draggingDestinationWindow]):
(-[TestDraggingInfo draggedImage]):
(-[TestDraggingInfo setDraggedImage:]):
(-[TestDraggingInfo slideDraggedImageTo:]):
(-[TestDraggingInfo namesOfPromisedFilesDroppedAtDestination:]):
(-[TestDraggingInfo resetSpringLoading]):
Empty method stubs, to be implemented in the future as needed.
2018-08-13 Thomas Denney <tdenney@apple.com>
Added Thomas Denney to contributors.json.
https://bugs.webkit.org/show_bug.cgi?id=188525
Reviewed by Myles C. Maxfield.
* Scripts/webkitpy/common/config/contributors.json:
2018-08-13 Antti Koivisto <antti@apple.com>
Meaning of OptionSet::contains is unclear when used with OptionSet argument
https://bugs.webkit.org/show_bug.cgi?id=188501
Reviewed by Anders Carlsson.
* TestWebKitAPI/Tests/WTF/OptionSet.cpp:
(TestWebKitAPI::TEST):
2018-08-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r234747.
https://bugs.webkit.org/show_bug.cgi?id=188524
plugin processes crash on launch (Requested by smfr on
#webkit).
Reverted changeset:
"We should cache the compiled sandbox profile in a data vault"
https://bugs.webkit.org/show_bug.cgi?id=184991
https://trac.webkit.org/changeset/234747
2018-08-13 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Dragging a non-editable text selection into a plain text input inserts HTML markup
https://bugs.webkit.org/show_bug.cgi?id=188485
<rdar://problem/43168784>
Reviewed by Tim Horton.
Add a new API test to verify that dropping selected non-editable rich text into a textarea inserts text as
expected, rather than markup.
It's somewhat interesting to note that this particular use case isn't exercised by any existing tests; the
closest test is DragAndDropTests.ContentEditableToTextarea, which drags a rich text selection from a
contenteditable element to a text area. However, due to logic in `DragController::concludeEditDrag` that handles
drag and drop across editable content differently than drag and drop from non-editable to editable content, the
bug that is fixed here doesn't surface in that existing test.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/selected-text-and-textarea.html: Added.
* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm:
(TestWebKitAPI::TEST):
2018-08-13 Alex Christensen <achristensen@webkit.org>
Use a 1-byte enum class for TextDirection
https://bugs.webkit.org/show_bug.cgi?id=188350
Reviewed by Simon Fraser.
* TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebCore/StringWithDirection.cpp:
(WebCore::operator<<):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/CommandBackForward.mm:
(TEST_F):
2018-08-13 Zalan Bujtas <zalan@apple.com>
[LFC][Floating] Add basic clearance support
https://bugs.webkit.org/show_bug.cgi?id=188492
Reviewed by Antti Koivisto.
* LayoutReloaded/misc/LFC-passing-tests.txt:
2018-08-12 Zalan Bujtas <zalan@apple.com>
[LFC] Float prev/next sibling should prevent top/bottom margin collapsing with parent.
https://bugs.webkit.org/show_bug.cgi?id=188487
Reviewed by Antti Koivisto.
* LayoutReloaded/misc/LFC-passing-tests.txt:
2018-08-11 Aakash Jain <aakash_jain@apple.com>
[ews-build] Separate queues for Builders and Testers - iOS
https://bugs.webkit.org/show_bug.cgi?id=188396
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/config.json: Splitted iOS queues into builders and testers.
Also added ews121 and ews122 to match with current EWS configuration.
* BuildSlaveSupport/ews-build/factories.py:
(TestsFactory): Base classes for various Test factories.
(TestsFactory.getProduct): Download and extract the archive.
2018-08-10 Daniel Bates <dabates@apple.com>
webkit-patch setup-git-clone should set Git core editor to commit-log-editor
https://bugs.webkit.org/show_bug.cgi?id=188473
Reviewed by Ryosuke Niwa.
Have "webkit-patch setup-git-clone" set the Git core editor to "perl Tools/Scripts/commit-log-editor --regenerate-log"
so that the Git commit message is generated from the ChangeLog for developers that manually
generate their ChangeLog using prepare-ChangeLog.
* Scripts/webkitpy/tool/commands/setupgitclone.py:
(SetupGitClone.execute):
2018-08-10 Truitt Savell <tsavell@apple.com>
Unreviewed, rolling out r234749.
Caused all perf tests to fail in Sierra
Reverted changeset:
"[webkitpy][Win] LayoutTests: test names should be Unix style,
separated by slash not backslash"
https://bugs.webkit.org/show_bug.cgi?id=187973
https://trac.webkit.org/changeset/234749
2018-08-10 David Fenton <david_fenton@apple.com>
Timeouts in TestWebKitAPI.PreferredAudioBufferSize.AudioWithWebAudio and TestWebKitAPI.PreferredAudioBufferSize.WebAudio.
https://bugs.webkit.org/show_bug.cgi?id=188470.
Unreviewed test gardening, disabling the tests.
* TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
(TEST_F):
2018-08-10 Joseph Pecoraro <pecoraro@apple.com>
Eliminate remaining instances of "ElCapitan" from LayoutTests / Tools
https://bugs.webkit.org/show_bug.cgi?id=188458
Reviewed by Alex Christensen.
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser):
* TestResultServer/static-dashboards/flakiness_dashboard.js:
2018-08-09 Fujii Hironori <Hironori.Fujii@sony.com>
[webkitpy][Win] LayoutTests: test names should be Unix style, separated by slash not backslash
https://bugs.webkit.org/show_bug.cgi?id=187973
Reviewed by Alex Christensen.
In LayoutTests, test names have been canonicalized in Unix style
since Bug 63597, for example 'fast/css/001.html'. But, Bug 179219,
Bug 179572, Bug 180660 and Bug 181814 have changed to use
os.path.seq instead of slash if Windows Python is used.
Revert parts of those changes. Change relative_test_filename to
return a slash sperated test name as well as chromium_win.py used
to do.
This change fixes all 41 test-webkitpy failures in WinCairo port.
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
(TestExpectationParser._parse_line): Do not convert a test name by using normpath.
* Scripts/webkitpy/port/base.py:
(Port.normalize_test_name): Use TEST_PATH_SEPARATOR instead of os.path.sep.
(Port.relative_test_filename): Replace self.host.filesystem.sep with self.TEST_PATH_SEPARATOR.
(Port.abspath_for_test): Split test_name with TEST_PATH_SEPARATOR.
* Scripts/webkitpy/port/driver.py:
(Driver): Use '/' instead of os.sep.
* Scripts/webkitpy/port/win.py:
(WinCairoPort): Do not override TEST_PATH_SEPARATOR.
2018-08-09 Thomas Denney <tdenney@apple.com>
[WHLSL] Add individual test durations to output
https://bugs.webkit.org/show_bug.cgi?id=188448
Reviewed by Myles C. Maxfield.
* WebGPUShadingLanguageRI/Test.js: Add timing output.
2018-08-09 Ben Richards <benton_richards@apple.com>
We should cache the compiled sandbox profile in a data vault
https://bugs.webkit.org/show_bug.cgi?id=184991
Reviewed by Ryosuke Niwa.
Added trace points for sandbox initialization
* Tracing/SystemTracePoints.plist:
2018-08-09 Jer Noble <jer.noble@apple.com>
Video playback is using more power
https://bugs.webkit.org/show_bug.cgi?id=188452
<rdar://problem/42298937>
Reviewed by Eric Carlson.
* TestWebKitAPI/Tests/WebKitCocoa/PreferredAudioBufferSize.mm:
(PreferredAudioBufferSize::createView):
(PreferredAudioBufferSize::preferredAudioBufferSize const):
(TEST_F):
2018-08-09 Alex Christensen <achristensen@webkit.org>
REGRESSION(234640) Loading stalls in environments without SafariSafeBrowsing framework
https://bugs.webkit.org/show_bug.cgi?id=188453
<rdar://problem/43102553>
Reviewed by Chris Dumez
* TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm:
(TEST):
(+[NullLookupContext sharedLookupContext]):
(TestWebKitAPI::TEST): Deleted.
2018-08-09 Alex Christensen <achristensen@webkit.org>
WKURLSchemeHandler crashes when sent errors with sync XHR
https://bugs.webkit.org/show_bug.cgi?id=188358
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
(-[SyncErrorScheme webView:startURLSchemeTask:]):
(-[SyncErrorScheme webView:stopURLSchemeTask:]):
(-[SyncErrorScheme webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
2018-08-09 Per Arne Vollan <pvollan@apple.com>
REGRESSION(r234652): fast/scrolling/rtl-scrollbars-animation-property.html is failing
https://bugs.webkit.org/show_bug.cgi?id=188397
Reviewed by Tim Horton.
After r234652, [NSScroller preferredScrollerStyle] is called in the UI process, and we need to set the same
user defaults related to scrollbars in the UI process as we do in the WebProcess.
* WebKitTestRunner/mac/main.mm:
(setDefaultsToConsistentValuesForTesting):
2018-08-09 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS WK2] Rename and refactor DataInteractionTests and DataInteractionSimulator
https://bugs.webkit.org/show_bug.cgi?id=188439
Reviewed by Andy Estes and Megan Gardner.
Refactor DataInteractionSimulator (currently used for drag and drop testing on iOS) so that it exists across
macOS and iOS, and rename it to DragAndDropSimulator. Additionally, rename DataInteractionTests to
DragAndDropTests.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: Renamed from Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm.
(testIconImage):
(testZIPArchive):
(-[UIItemProvider registerDataRepresentationForTypeIdentifier:withData:]):
(-[TestWKWebView editorContainsImageElement]):
(-[TestWKWebView editorValue]):
(makeCGRectValue):
(checkCGRectIsEqualToCGRectWithLogging):
(checkSelectionRectsWithLogging):
(checkRichTextTypePrecedesPlainTextType):
(checkFirstTypeIsPresentAndSecondTypeIsMissing):
(checkTypeIdentifierIsRegisteredAtIndex):
(checkEstimatedSize):
(checkSuggestedNameAndEstimatedSize):
(checkStringArraysAreEqual):
(checkDragCaretRectIsContainedInRect):
(checkJSONWithLogging):
(testIconImageData):
(runTestWithTemporaryTextFile):
(runTestWithTemporaryFolder):
(TestWebKitAPI::TEST):
(TestWebKitAPI::setUpTestWebViewForDataTransferItems):
(TestWebKitAPI::testDragAndDropOntoTargetElements):
(TestWebKitAPI::testIconImageData):
* TestWebKitAPI/cocoa/DragAndDropSimulator.h: Renamed from Tools/TestWebKitAPI/ios/DataInteractionSimulator.h.
* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: Renamed from Tools/TestWebKitAPI/ios/DataInteractionSimulator.mm.
(-[WKWebView dropInteractionDelegate]):
(-[WKWebView dragInteractionDelegate]):
(-[WKWebView dropInteraction]):
(-[WKWebView dragInteraction]):
(-[MockDragDropSession initWithItems:location:window:allowMove:]):
(-[MockDragDropSession allowsMoveOperation]):
(-[MockDragDropSession isRestrictedToDraggingApplication]):
(-[MockDragDropSession hasItemsConformingToTypeIdentifiers:]):
(-[MockDragDropSession canLoadObjectsOfClass:]):
(-[MockDragDropSession canLoadObjectsOfClasses:]):
(-[MockDragDropSession items]):
(-[MockDragDropSession setItems:]):
(-[MockDragDropSession addItems:]):
(-[MockDragDropSession locationInView:]):
(-[MockDropSession initWithProviders:location:window:allowMove:]):
(-[MockDropSession isLocal]):
(-[MockDropSession progress]):
(-[MockDropSession setProgressIndicatorStyle:]):
(-[MockDropSession progressIndicatorStyle]):
(-[MockDropSession operationMask]):
(-[MockDropSession localDragSession]):
(-[MockDropSession hasItemsConformingToTypeIdentifier:]):
(-[MockDropSession canCreateItemsOfClass:]):
(-[MockDropSession loadObjectsOfClass:completion:]):
(-[MockDragSession initWithWindow:allowMove:]):
(-[MockDragSession localOperationMask]):
(-[MockDragSession externalOperationMask]):
(-[MockDragSession session]):
(-[MockDragSession localContext]):
(-[MockDragSession setLocalContext:]):
(dragAndDropEventNames):
(-[DragAndDropSimulatorApplication _cancelAllTouches]):
(-[DragAndDropSimulator initWithWebView:]):
(-[DragAndDropSimulator dealloc]):
(-[DragAndDropSimulator _resetSimulatedState]):
(-[DragAndDropSimulator observedEventNames]):
(-[DragAndDropSimulator simulateAllTouchesCanceled:]):
(-[DragAndDropSimulator runFrom:to:]):
(-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]):
(-[DragAndDropSimulator finalSelectionRects]):
(-[DragAndDropSimulator _concludeDropAndPerformOperationIfNecessary]):
(-[DragAndDropSimulator _enqueuePendingAdditionalItemRequestLocations]):
(-[DragAndDropSimulator _sendQueuedAdditionalItemRequest]):
(-[DragAndDropSimulator _advanceProgress]):
(-[DragAndDropSimulator _currentLocation]):
(-[DragAndDropSimulator _scheduleAdvanceProgress]):
(-[DragAndDropSimulator sourceItemProviders]):
(-[DragAndDropSimulator externalItemProviders]):
(-[DragAndDropSimulator setExternalItemProviders:]):
(-[DragAndDropSimulator phase]):
(-[DragAndDropSimulator liftPreviews]):
(-[DragAndDropSimulator lastKnownDragCaretRect]):
(-[DragAndDropSimulator waitForInputSession]):
(-[DragAndDropSimulator insertedAttachments]):
(-[DragAndDropSimulator removedAttachments]):
(-[DragAndDropSimulator endDataTransfer]):
(-[DragAndDropSimulator _webView:dataInteractionOperationWasHandled:forSession:itemProviders:]):
(-[DragAndDropSimulator _webView:willUpdateDataInteractionOperationToOperation:forSession:]):
(-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):
(-[DragAndDropSimulator _webView:showCustomSheetForElement:]):
(-[DragAndDropSimulator _webView:willPerformDropWithSession:]):
(-[DragAndDropSimulator _webView:didInsertAttachment:]):
(-[DragAndDropSimulator _webView:didRemoveAttachment:]):
(-[DragAndDropSimulator _webView:focusShouldStartInputSession:]):
(-[DragAndDropSimulator _webView:didStartInputSession:]):
* TestWebKitAPI/ios/UIKitSPI.h:
* TestWebKitAPI/mac/DragAndDropSimulatorMac.mm: Added.
(-[DragAndDropSimulator initWithWebView:]):
(-[DragAndDropSimulator dealloc]):
(-[DragAndDropSimulator runFrom:to:]):
(-[DragAndDropSimulator insertedAttachments]):
(-[DragAndDropSimulator removedAttachments]):
2018-08-09 Sihui Liu <sihui_liu@apple.com>
REGRESSION (r232083): WKWebView loses first-party cookies on iOS
https://bugs.webkit.org/show_bug.cgi?id=188443
<rdar://problem/42991584>
Reviewed by Chris Dumez.
Skip WebKit.WKHTTPCookieStoreWithoutProcessPool on iOS.
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
2018-08-09 Ross Kirsling <ross.kirsling@sony.com>
Unreviewed follow-up fix for r234720.
* Scripts/webkitpy/bindings/main.py:
(BindingsTests.close_and_remove):
(BindingsTests.main):
Return to the original approach, since this seems to be the simplest cross-platform solution.
2018-08-09 Ali Juma <ajuma@chromium.org>
Import WPTs for IntersectionObserver
https://bugs.webkit.org/show_bug.cgi?id=188416
Reviewed by Simon Fraser.
Enable IntersectionObserver in DumpRenderTree.
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(setWebPreferencesForTestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
2018-08-08 Ross Kirsling <ross.kirsling@sony.com>
run-bindings-tests is not Win32-compatible
https://bugs.webkit.org/show_bug.cgi?id=188424
Reviewed by Fujii Hironori.
* Scripts/webkitpy/bindings/main.py:
(BindingsTests.main):
Stop leaking file descriptors.
(See https://www.logilab.org/blogentry/17873 for details, though the solution here is even simpler.)
2018-08-08 Alex Christensen <achristensen@webkit.org>
Fix possible null dereference in WebBackForwardList::restoreFromState
https://bugs.webkit.org/show_bug.cgi?id=188418
<rdar://problem/42531726>
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
(TestWebKitAPI::TEST):
2018-08-08 Ross Kirsling <ross.kirsling@sony.com>
run-builtins-generator-tests does not correctly handle CRLFs from stderr
https://bugs.webkit.org/show_bug.cgi?id=188392
Reviewed by Fujii Hironori.
Background:
file.write converts LF to os.linesep, so if the input string contains CRLF, we end up writing CRCRLF to the file.
* Scripts/webkitpy/common/system/executive.py:
(Executive.run_command):
Normalize CRLF to LF in decoded stdout/stderr data, so that we don't return consumers a platform-specific string.
2018-08-08 Aditya Keerthi <akeerthi@apple.com>
Unreviewed, add myself to committers list.
* Scripts/webkitpy/common/config/contributors.json:
2018-08-08 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r234314, r234320, and r234321.
https://bugs.webkit.org/show_bug.cgi?id=188414
Caused email sign in issue (Requested by ryanhaddad on
#webkit).
Reverted changesets:
"Remove unused WKNavigationDelegatePrivate
decidePolicyForNavigationAction SPI"
https://bugs.webkit.org/show_bug.cgi?id=188077
https://trac.webkit.org/changeset/234314
"Fix API tests after r234314"
https://bugs.webkit.org/show_bug.cgi?id=188077
https://trac.webkit.org/changeset/234320
"Fix API tests after r234314"
https://bugs.webkit.org/show_bug.cgi?id=188077
https://trac.webkit.org/changeset/234321
2018-08-08 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] fast/events/ios/contenteditable-autocapitalize.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=188401
<rdar://problem/32542300>
Reviewed by Ryosuke Niwa.
When run individually, fast/events/ios/contenteditable-autocapitalize.html passes consistently; however, when
run right after another layout test that finishes while the keyboard is shown, this test sometimes fails. This
is because each of the three steps of this test ends when UIScriptController's `didHideKeyboardCallback` is
invoked, and if the keyboard only begins to dismiss after the previous test completes, we have a race. When the
keyboard finishes dismissing after the UI script is evaluated, it will trigger UI script completion early and
skip over one of the steps in the layout test, resulting in a text diff failure.
To fix this, add a mechanism in WebKitTestRunner to wait until the keyboard is dismissed (with a short timeout)
as a part of resetting test controller state, before moving on to the next layout test.
* WebKitTestRunner/cocoa/TestRunnerWKWebView.h:
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView didStartFormControlInteraction]):
(-[TestRunnerWKWebView didEndFormControlInteraction]):
Use these hooks to keep track of whether the previous test is presenting any form input UI.
(-[TestRunnerWKWebView isInteractingWithFormControl]):
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::handleKeyboardWillHideNotification):
(WTR::handleKeyboardDidHideNotification):
(WTR::TestController::platformInitialize):
(WTR::TestController::platformDestroy):
Register during initialization (and unregister during teardown) for keyboard hiding notifications, to keep track
of when the keyboard dismissal animation ends.
(WTR::TestController::platformResetStateToConsistentValues):
Make a couple of tweaks here: (1) if form input UI is being shown, tell the web view to resign first responder,
which causes the field to lose focus. (2) If necessary, wait for the current keyboard dismissal animation to
finish. This includes any keyboard dismissal animations triggered as a result of step (1).
2018-08-05 Darin Adler <darin@apple.com>
[Cocoa] More tweaks and refactoring to prepare for ARC
https://bugs.webkit.org/show_bug.cgi?id=188245
Reviewed by Dan Bernstein.
* DumpRenderTree/TestNetscapePlugIn/PluginObject.h: Use const void* for a
CFTypeRef instead of void*.
* DumpRenderTree/TestNetscapePlugIn/PluginObjectMac.mm:
(createCoreAnimationLayer): Use CFBridgingRetain.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use bridging casts.
(AccessibilityUIElement::textMarkerRangeForElement): Ditto.
(AccessibilityUIElement::selectedTextMarkerRange): Ditto.
(AccessibilityUIElement::textMarkerRangeLength): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute): Ditto.
(AccessibilityUIElement::indexForTextMarker): Ditto.
(AccessibilityUIElement::textMarkerForIndex): Ditto.
(AccessibilityUIElement::isTextMarkerValid): Ditto.
(AccessibilityUIElement::previousTextMarker): Ditto.
(AccessibilityUIElement::nextTextMarker): Ditto.
(AccessibilityUIElement::stringForTextMarkerRange): Ditto.
(createJSStringRef): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
(AccessibilityUIElement::textMarkerRangeForMarkers): Ditto.
(AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto.
(AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto.
(AccessibilityUIElement::endTextMarkerForBounds): Ditto.
(AccessibilityUIElement::startTextMarkerForBounds): Ditto.
(AccessibilityUIElement::textMarkerForPoint): Ditto.
(AccessibilityUIElement::accessibilityElementForTextMarker): Ditto.
(AccessibilityUIElement::startTextMarker): Ditto.
(AccessibilityUIElement::endTextMarker): Ditto.
(AccessibilityUIElement::setSelectedVisibleTextRange): Ditto.
(AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker): Ditto.
(AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker): Ditto.
(AccessibilityUIElement::previousWordStartTextMarkerForTextMarker): Ditto.
(AccessibilityUIElement::nextWordEndTextMarkerForTextMarker): Ditto.
(AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker): Ditto.
(AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker): Ditto.
(AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker): Ditto.
(AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker): Ditto.
(AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker): Ditto.
(AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker): Ditto.
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebPreferencesToConsistentValues): Use bridging cast.
(dumpFramesAsText): Ditto.
(dumpBackForwardListForAllWindows): Use a modern for loop instead of
CFArray functions to iterate the array.
(dump): Use bridging cast.
(runTest): Ditto.
* DumpRenderTree/mac/DumpRenderTreePasteboard.mm:
(+[LocalPasteboard alloc]): Use class_createInstance instead of NSAllocateObject.
(toUTI): Return a RetainPtr<CFStringRef>.
(-[LocalPasteboard types]): Use the above and bridging casts.
(-[LocalPasteboard availableTypeFromArray:]): Ditto.
(-[LocalPasteboard setData:forType:]): Ditto.
(-[LocalPasteboard dataForType:]): Ditto.
(-[LocalPasteboard setPropertyList:forType:]): Use NSPropertyListSerialization
instead of CFPropertyList.
(-[LocalPasteboard setString:forType:]): Use NSString method instead of
CFStringCreateExternalRepresentation.
* DumpRenderTree/mac/MockGeolocationProvider.h: Put CFTypeRef in a HashSet
instead of an Objective-C object pointer type.
* DumpRenderTree/mac/MockGeolocationProvider.mm:
(-[MockGeolocationProvider registerWebView:]): Update for above.
(-[MockGeolocationProvider unregisterWebView:]): Ditto.
(-[MockGeolocationProvider timerFired]): Ditto.
* DumpRenderTree/mac/MockWebNotificationProvider.h: Use CFTypeRef in
HashMap and HashSet instead of an Objective-C object pointer type.
* DumpRenderTree/mac/MockWebNotificationProvider.mm:
(-[MockWebNotificationProvider registerWebView:]): Update for above.
(-[MockWebNotificationProvider unregisterWebView:]): Ditto.
(-[MockWebNotificationProvider showNotification:fromWebView:]): Ditto.
(-[MockWebNotificationProvider cancelNotification:]): Ditto.
(-[MockWebNotificationProvider simulateWebNotificationClick:]): Ditto.
* DumpRenderTree/mac/ObjCPlugin.m:
(-[JSObjC retainObject:]): Use CFRetain instead of -[NSObject retain].
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::addDisallowedURL): Use bridging cast.
(TestRunner::applicationCacheDiskUsageForOrigin): Ditto.
(TestRunner::clearApplicationCacheForOrigin): Ditto.
(originsArrayToJS): Ditto.
(TestRunner::copyDecodedHostName): Ditto.
(TestRunner::copyEncodedHostName): Ditto.
(TestRunner::queueLoad): Ditto.
(TestRunner::setDomainRelaxationForbiddenForURLScheme): Ditto.
(TestRunner::setMockGeolocationPositionUnavailableError): Ditto.
(TestRunner::setUserStyleSheetLocation): Ditto.
(TestRunner::setValueForUser): Ditto.
(TestRunner::overridePreference): Ditto.
(TestRunner::execCommand): Ditto.
(TestRunner::findString): Ditto.
(TestRunner::isCommandEnabled): Ditto.
(TestRunner::addOriginAccessWhitelistEntry): Ditto.
(TestRunner::removeOriginAccessWhitelistEntry): Ditto.
(TestRunner::addUserScript): Ditto.
(TestRunner::addUserStyleSheet): Ditto.
(TestRunner::evaluateInWebInspector): Ditto.
(TestRunner::evaluateScriptInIsolatedWorld): Ditto.
(TestRunner::authenticateSession): Ditto.
(TestRunner::grantWebNotificationPermission): Ditto.
(TestRunner::denyWebNotificationPermission): Ditto.
* TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
(-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]): Ditto.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Use bridging cast.
(WTR::AccessibilityUIElement::textMarkerRangeForElement): Ditto.
(WTR::AccessibilityUIElement::previousTextMarker): Ditto.
(WTR::AccessibilityUIElement::nextTextMarker): Ditto.
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Ditto.
(WTR::AccessibilityUIElement::selectedTextMarkerRange): Ditto.
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto.
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto.
(WTR::AccessibilityUIElement::endTextMarkerForBounds): Ditto.
(WTR::AccessibilityUIElement::startTextMarkerForBounds): Ditto.
(WTR::AccessibilityUIElement::textMarkerForPoint): Ditto.
(WTR::AccessibilityUIElement::textMarkerForIndex): Ditto.
(WTR::AccessibilityUIElement::startTextMarker): Ditto.
(WTR::AccessibilityUIElement::endTextMarker): Ditto.
(WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker): Ditto.
(WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker): Ditto.
(WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker): Ditto.
(WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker): Ditto.
(WTR::AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker): Ditto.
(WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker): Ditto.
(WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker): Ditto.
(WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker): Ditto.
(WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker): Ditto.
(WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker): Ditto.
* WebKitTestRunner/PlatformMac.cmake: Added WebKitTestRunnerWindow.h and .mm files.
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj: Ditto.
* WebKitTestRunner/mac/EventSenderProxy.mm: Add include of WebKitTestRunnerWindow.h
so we can use the type and know it inherits from NSWindow.
* WebKitTestRunner/mac/PlatformWebViewMac.mm: Add include of WebKitTestRunnerWindow.h
so we can use the type and know it inherits from NSWindow. Moved WebKitTestRunnerWindow
class into a separate file.
(WTR::PlatformWebView::keyWindow): Call +[WebKitTestRunnerWindow _WTR_keyWindow]
instead of have a second copy of the implementation.
* WebKitTestRunner/mac/WebKitTestRunnerEvent.mm: Add include of WebKitTestRunnerWindow.h
so we can use the type and know it inherits from NSWindow. Also removed "using namespace".
(+[WebKitTestRunnerEvent mouseLocation]): Updated for above.
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
(+[LocalPasteboard alloc]): Use class_createInstance instead of NSAllocateObject.
(-[LocalPasteboard availableTypeFromArray:]): Use modern for loop.
(-[LocalPasteboard setData:forType:]): Reordered method to be a tiny bit more efficient.
(-[LocalPasteboard setPropertyList:forType:]): Use NSPropertyListSerialization
instead of CFPropertyList.
(-[LocalPasteboard setString:forType:]): Use NSString method instead of
CFStringCreateExternalRepresentation.
* WebKitTestRunner/mac/WebKitTestRunnerWindow.h: Moved declaration of
WebKitTestRunnerWindow here so it can be included by files that need to know
what the type is and that it inherits from NSWindow.
* WebKitTestRunner/mac/WebKitTestRunnerWindow.mm: Added. Moved implementation here.
(+[WebKitTestRunnerWindow _WTR_keyWindow]): Use modern for loop instead of the old,
messier implementation.
2018-08-07 Alex Christensen <achristensen@webkit.org>
Add a test for using SafeBrowsing
https://bugs.webkit.org/show_bug.cgi?id=188290
Reviewed by Chris Dumez.
Swizzle out SSBLookupContext to write tests for how WebKit responds when it responds in different ways.
We don't do anything with its results in WebKit yet, but when we do I'll add the expected behavior to this test.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/SafeBrowsing.mm: Added.
(-[SafeBrowsingDelegate webView:didFinishNavigation:]):
(TestWebKitAPI::TEST):
2018-08-07 Lucas Forschler <lforschler@apple.com>
If there's a Radar in the ChangeLog, webkit-patch upload/create-bug should put the radar in the bug and set InRadar
https://bugs.webkit.org/show_bug.cgi?id=188235
Reviewed by Daniel Bates, Kocsen Chung, and Aakash Jain.
* Scripts/webkitpy/common/checkout/changelog.py:
(ChangeLogEntry): Teach the ChangeLog tools how to parse a radar_id
* Scripts/webkitpy/common/checkout/changelog_unittest.py: Test out the new _parse_radar_id functionality
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla.add_keyword_to_bug): Add logic to add keywords using the changeform
* Scripts/webkitpy/tool/commands/upload.py:
(Upload): Teach the upload step how to add radar information when creating a new bug.
* Scripts/webkitpy/tool/steps/__init__.py:
* Scripts/webkitpy/tool/steps/addradar.py: Added.
(AddRadar):
(AddRadar.run): Contains the logic to add the radar information to bugzilla.
* Scripts/webkitpy/tool/steps/createbug.py:
(CreateBug.run): set a "created_new_bug" state when creating a new bugzilla bug.
2018-08-07 Wenson Hsieh <wenson_hsieh@apple.com>
Post-review feedback after r234614.
https://bugs.webkit.org/show_bug.cgi?id=188322
<rdar://problem/42455270>
Reviewed by Sam Weinig.
Use std::round instead of roundl — there's no reason to go from double to long double precision when rounding.
* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
(rounded):
2018-08-07 Don Olmstead <don.olmstead@sony.com>
[MiniBrowser][Win] Allow selection of recent user agents
https://bugs.webkit.org/show_bug.cgi?id=188371
Reviewed by Fujii Hironori.
Updates the user agent spoofing strings to the latest released
versions and adds Microsoft Edge's user agent.
Moves the menu item selection to the common base class, BrowserWindow
to support user agent spoofing in a WebKitLegacyBrowserWindow and
WebKitBrowserWindow.
* MiniBrowser/win/BrowserWindow.cpp: Added.
(BrowserWindow::setUserAgent):
* MiniBrowser/win/BrowserWindow.h:
* MiniBrowser/win/CMakeLists.txt:
* MiniBrowser/win/MainWindow.cpp:
(MainWindow::toggleMenuItem):
* MiniBrowser/win/MiniBrowserLib.rc:
* MiniBrowser/win/MiniBrowserLibResource.h:
* MiniBrowser/win/WebKitBrowserWindow.cpp:
* MiniBrowser/win/WebKitBrowserWindow.h:
* MiniBrowser/win/WebKitLegacyBrowserWindow.cpp:
(WebKitLegacyBrowserWindow::setUserAgent):
* MiniBrowser/win/WebKitLegacyBrowserWindow.h:
2018-08-07 Yusuke Suzuki <utatane.tea@gmail.com>
Unreviewed, add a new address to my configuration
* Scripts/webkitpy/common/config/contributors.json:
2018-08-06 David Quesada <david_quesada@apple.com>
webkitdirs.pm should default to iPhone SE for 64-bit testing
https://bugs.webkit.org/show_bug.cgi?id=188361
Reviewed by Daniel Bates.
Use iPhone SE as the default iOS Simulator device type. This corresponds to the change to webkitpy in r234467.
* Scripts/webkitdirs.pm:
(findOrCreateSimulatorForIOSDevice):
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args):
Update the help text for --device-type to reflect the new default device.
2018-08-06 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Caret disappears after resigning and becoming first responder if active focus state is retained
https://bugs.webkit.org/show_bug.cgi?id=188322
<rdar://problem/42455270>
Reviewed by Tim Horton.
Fixes an API test added in r234600, which had incorrect test expectations — namely, the width of the caret rect
was not in content view coordinates, unlike the x, y, and height.
* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
(rounded):
(-[TestWKWebView waitForCaretViewFrameToBecome:]):
(-[TestWKWebView waitForSelectionViewRectsToBecome:]):
(TestWebKitAPI::TEST):
2018-08-06 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r234569.
Breaks internal builds.
Reverted changeset:
"We should cache the compiled sandbox profile in a data vault"
https://bugs.webkit.org/show_bug.cgi?id=184991
https://trac.webkit.org/changeset/234569
2018-08-06 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][DLLLauncher] Remove --highDPI switch
https://bugs.webkit.org/show_bug.cgi?id=188255
Reviewed by Yusuke Suzuki.
Bug 149417 has added `--highDPI` switch to make MiniBrowser DPI
aware. But, Bug 158733 has made MiniBrowser always DPI aware. It
became useless since the change. Remove the switch.
This change fixes the issue all dump render tree tests are failing
in WinCairo port if high DPI display is connected.
* MiniBrowser/win/Common.cpp:
(parseCommandLine): Removed `--highDPI` switch.
* win/DLLLauncher/DLLLauncherMain.cpp:
(wWinMain): Do not call SetProcessDPIAware.
(shouldUseHighDPI): Deleted.
2018-08-06 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Tests that try to interact with the QuickType bar time out on iOS 11+
https://bugs.webkit.org/show_bug.cgi?id=188335
<rdar://problem/32542437> and <rdar://problem/32542433>
Reviewed by Tim Horton.
Remove a UIScriptController helper method that attempted to wait for QuickType buttons to appear, and then send
touch events to the buttons. These were only used for the two tests which this patch refactors. See the
LayoutTests ChangeLog for more detail.
* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::selectTextCandidateAtIndex): Deleted.
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::selectTextCandidateAtIndex): Deleted.
(WTR::UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex): Deleted.
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* TestRunnerShared/spi/UIKitTestSPI.h:
Remove an internal class declaration that is now unnecessary.
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::selectTextCandidateAtIndex): Deleted.
(WTR::UIScriptController::waitForTextPredictionsViewAndSelectCandidateAtIndex): Deleted.
2018-08-06 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Caret disappears after resigning and becoming first responder if active focus state is retained
https://bugs.webkit.org/show_bug.cgi?id=188322
<rdar://problem/42455270>
Reviewed by Tim Horton.
Adds plumbing in UIScriptController to grab the start and end selection handle rects for use in the new layout
test. Also adds new API tests to verify that when a web view resigns first responder, both caret and range
selection views are hidden, and when first responder status is restored, both caret and range selection views
are made visible again.
* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::selectionStartGrabberViewRect const):
(WTR::UIScriptController::selectionEndGrabberViewRect const):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::selectionStartGrabberViewRect const):
(WTR::UIScriptController::selectionEndGrabberViewRect const):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm:
(-[TestWKWebView waitForCaretViewFrameToBecome:]):
(-[TestWKWebView waitForSelectionViewRectsToBecome:]):
(webViewWithAutofocusedInput):
Pull out some common logic for creating a web view that allows programmatic focus to present the keyboard, and
immediately loading a web page with an autofocusing text field.
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView caretViewRectInContentCoordinates]):
(-[TestWKWebView selectionViewRectsInContentCoordinates]):
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::selectionStartGrabberViewRect const):
(WTR::UIScriptController::selectionEndGrabberViewRect const):
2018-08-06 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Layout tests that send HID events cause WebKitTestRunner to crash on recent SDKs
https://bugs.webkit.org/show_bug.cgi?id=188334
<rdar://problem/40630074>
Reviewed by Tim Horton.
To mark the end of previously dispatched IOHID events, HIDEventGenerator currently sends a vendor-defined event
and stores the completion callback ID for the previously dispatched events as vendor-defined data. When this
vendor-defined marker event is handled by the application, we then read the callback ID back from the event, map
it to a completion block, and invoke the completion block to signal that the previous HID event has been
processed.
This callback ID is an unsigned, so we tell IOKit that we need `sizeof(unsigned)` (4 bytes) to store it. On
shipping software, IOKit clamps this to a minimum of 8 bytes, i.e. `sizeof(CFIndex)`. When we later call
IOHIDEventGetIntegerValue to read the value of our vendor-defined data as a CFIndex, we get our expected
callback ID because the buffer was clamped to 8 bytes.
However, on recent iOS SDKs that contain the fix for <rdar://problem/20082284>, IOKit no longer clamps the size
of the vendor-defined data buffer to 8 bytes. This means that when we try to use IOHIDEventGetIntegerValue to
read our callback ID back, we end up getting a CFIndex where the lower 4 bytes are the callback ID we wrote, and
the upper 4 bytes are garbage. In the case where any of these upper 4 bytes are non-zero, we fail to map the
callback ID to a completion handler, and so we never finish dispatching the HID event, causing an exception to
be thrown.
To fix this, we adjust callback ID to be a CFIndex, which matches IOHIDEventGetIntegerValue's return type.
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(+[HIDEventGenerator nextEventCallbackID]):
(-[HIDEventGenerator _sendMarkerHIDEventWithCompletionBlock:]):
Also refactor a bit of `-_sendMarkerHIDEventWithCompletionBlock:` by using auto and move semantics.
2018-08-03 Ben Richards <benton_richards@apple.com>
We should cache the compiled sandbox profile in a data vault
https://bugs.webkit.org/show_bug.cgi?id=184991
Reviewed by Ryosuke Niwa.
Added trace points for sandbox initialization
* Tracing/SystemTracePoints.plist:
2018-08-03 David Fenton <david_fenton@apple.com>
Unreviewed, rolling out r234517.
Caused API test failures on iOS
Reverted changeset:
"[Cocoa] setCookie API fails to set session cookies for
defaultDataStore if processPool created but not used"
https://bugs.webkit.org/show_bug.cgi?id=188209
https://trac.webkit.org/changeset/234517
2018-08-03 Ben Richards <benton_richards@apple.com>
Add configuration for automatic process pre-warming
https://bugs.webkit.org/show_bug.cgi?id=187108
Reviewed by Ryosuke Niwa.
Added new test case for setting maximum prewarmed process count and updated test case for process swap on navigation to set the maximum prewarmed process count to be 1 where relevant.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/InitialWarmedProcessUsed.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
* TestWebKitAPI/Tests/WebKitCocoa/SetMaximumPrewarmedProcessCount.mm:
(TEST):
2018-08-03 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add build step to Check Patch Relevance
https://bugs.webkit.org/show_bug.cgi?id=188295
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps.py:
(CheckPatchRelevance): Added step to check patch relevance.
(CheckPatchRelevance._patch_is_relevant): Checks if the patch is relevant.
(CheckPatchRelevance._get_patch): Retrieves the patch from buildbot.
(CheckPatchRelevance._addToLog): Add the log message.
(CheckPatchRelevance.start):
* BuildSlaveSupport/ews-build/factories.py: Added CheckPatchRelevance step appropriately.
2018-08-03 Jer Noble <jer.noble@apple.com>
Unreviewed gardening; r234534 changed the policy for what audio session is set when a
media element is paused. Updating the test to reflect the new policy.
* TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:
(TestWebKitAPI::TEST):
2018-08-03 Zalan Bujtas <zalan@apple.com>
[LFC][Floating] Now that the document renderer belongs to "complicated cases", adjust viewport stretching.
https://bugs.webkit.org/show_bug.cgi?id=188306
Reviewed by Antti Koivisto.
* LayoutReloaded/misc/LFC-passing-tests.txt:
2018-08-03 Carlos Garcia Campos <cgarcia@igalia.com>
[WPE] Use the new key mapper API from WPEBackend
https://bugs.webkit.org/show_bug.cgi?id=188216
Reviewed by Žan Doberšek.
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
(WTR::EventSenderProxy::keyDown): Use wpe_input_xkb_context_get_entries_for_key_code() to get the hardware key
code.
* wpe/backends/WindowViewBackend.cpp:
(WPEToolingBackends::WindowViewBackend::WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::handleKeyEvent):
(WPEToolingBackends::WindowViewBackend::modifiers const):
* wpe/backends/WindowViewBackend.h:
2018-08-03 Carlos Garcia Campos <cgarcia@igalia.com>
[WPE] Implement MouseEvent.buttons
https://bugs.webkit.org/show_bug.cgi?id=187998
Reviewed by Žan Doberšek.
Pass modifiers to mouse events.
* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
(WTR::senderButtonToWPEButton):
(WTR::modifierForButton):
(WTR::EventSenderProxy::mouseDown):
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
(WTR::EventSenderProxy::mouseScrollBy):
(WTR::wkEventModifiersToWPE):
(WTR::wpeKeySymForKeyRef):
(WTR::EventSenderProxy::keyDown):
(WTR::EventSenderProxy::prepareAndDispatchTouchEvent):
* wpe/backends/WindowViewBackend.cpp:
(WPEToolingBackends::WindowViewBackend::handleKeyEvent):
(WPEToolingBackends::WindowViewBackend::modifiers const):
* wpe/backends/WindowViewBackend.h:
2018-08-03 Carlos Garcia Campos <cgarcia@igalia.com>
[WPE] Use WPE key symbols and new API instead of xkbcommon and the key mapper
https://bugs.webkit.org/show_bug.cgi?id=188093
Reviewed by Žan Doberšek.
* MiniBrowser/wpe/main.cpp: Use WPE key symbols.
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
(WTR::wpeKeySymForKeyRef): Use WPE key symbols and wpe_unicode_to_key_code().
(WTR::EventSenderProxy::keyDown): Do not set unicode char to the event since it was removed.
* flatpak/org.webkit.WPE.yaml: Bump WPEBackend and WPEBackend-fdo versions.
* wpe/backends/WindowViewBackend.cpp:
(WPEToolingBackends::WindowViewBackend::handleKeyEvent): Do not set unicode char to the event since it was removed.
* wpe/jhbuild.modules: Bump WPEBackend and WPEBackend-fdo versions.
2018-08-02 Nan Wang <n_wang@apple.com>
AX: [iOS] add support to return the attributed string under the element
https://bugs.webkit.org/show_bug.cgi?id=188276
<rdar://problem/42872357>
Reviewed by Chris Fleizach.
* DumpRenderTree/AccessibilityUIElement.cpp:
(attributedStringForElementCallback):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::attributedStringForElement):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::attributedStringForElement):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::attributedStringForElement):
2018-08-02 Ryan Haddad <ryanhaddad@apple.com>
Skip API test DataInteractionTests.CustomActionSheetPopover on current SDKs.
https://bugs.webkit.org/show_bug.cgi?id=175204
Unreviewed test gardening.
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
2018-08-02 Sihui Liu <sihui_liu@apple.com>
[Cocoa] setCookie API fails to set session cookies for defaultDataStore if processPool created but not used
https://bugs.webkit.org/show_bug.cgi?id=188209
Reviewed by Geoffrey Garen.
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TEST):
2018-08-02 Dan Bernstein <mitz@apple.com>
Fixed WebKit.AttrStyle timing out on build.webkit.org.
* TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.html: Changed from a URL that requires network
access to one that doesn’t.
* TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm:
(TEST): Updated expected value.
2018-08-02 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Keyboard becomes unresponsive after pressing delete while pressing down on a character key with accents
https://bugs.webkit.org/show_bug.cgi?id=188251
<rdar://problem/37842108>
Reviewed by Tim Horton.
Adds a new API test to verify that clients (in this case, UIKit) is allowed to invoke
-handleKeyWebEvent:withCompletionHandler: within the completion block of a prior invocation.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/KeyboardInputTestsIOS.mm: Added.
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/ios/TestInputDelegate.h: Added.
Pull some logic used to force an input session to start out from an existing API test file
(WKWebViewAutofillTests) and into a separate helper class that is used by both the existing API tests and the
new keyboard input test.
* TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:
(-[AutofillTestView initWithFrame:]):
(TestWebKitAPI::TEST):
(-[TestInputDelegate init]): Deleted.
(-[TestInputDelegate _webView:focusShouldStartInputSession:]): Deleted.
* TestWebKitAPI/ios/UIKitSPI.h:
Add some UIKit SPI utilized by the new API test.
2018-08-01 Dan Bernstein <mitz@apple.com>
Optionally expose Attr::style to JavaScript
https://bugs.webkit.org/show_bug.cgi?id=188226
<rdar://problem/42818113>
Reviewed by Darin Adler.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/AttrStyle.mm: Added.
(TEST):
2018-08-02 David Fenton <david_fenton@apple.com>
Unreviewed, rolling out r234489.
Caused 50+ crashes and 60+ API failures on iOS
Reverted changeset:
"[WTF] Rename String::format to String::deprecatedFormat"
https://bugs.webkit.org/show_bug.cgi?id=188191
https://trac.webkit.org/changeset/234489
2018-08-01 Ross Kirsling <ross.kirsling@sony.com>
TestWTF.WTF_NeverDestroyed.Construct output differs for MSVC in Debug mode
https://bugs.webkit.org/show_bug.cgi?id=188244
Reviewed by Daniel Bates.
Follow-up to r234179. MSVC chooses not to inline the lambda in Debug mode.
* TestWebKitAPI/Tests/WTF/NeverDestroyed.cpp:
2018-08-01 Tomas Popela <tpopela@redhat.com>
[WTF] Rename String::format to String::deprecatedFormat
https://bugs.webkit.org/show_bug.cgi?id=188191
Reviewed by Darin Adler.
It should be replaced with string concatenation.
* DumpRenderTree/win/DumpRenderTree.cpp:
(applicationId):
(main):
* TestWebKitAPI/win/PlatformUtilitiesWin.cpp:
(TestWebKitAPI::Util::createURLForResource):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::cacheTestRunnerCallback):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
(WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::attributedStringForRange):
(WTR::AccessibilityUIElement::url):
(WTR::stringAtOffset):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::didReceiveAuthenticationChallenge):
(WTR::TestController::downloadDidFail):
(WTR::originUserVisibleName):
(WTR::userMediaOriginHash):
(WTR::TestController::didNavigateWithNavigationData):
(WTR::TestController::didPerformClientRedirect):
(WTR::TestController::didPerformServerRedirect):
(WTR::TestController::didUpdateHistoryTitle):
2018-08-01 Nan Wang <n_wang@apple.com>
AX: AOM: Add ARIA IDL Attribute Reflection
https://bugs.webkit.org/show_bug.cgi?id=184676
<rdar://problem/39476882>
Reviewed by Chris Fleizach.
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
2018-08-01 Jonathan Bedard <jbedard@apple.com>
Use iPhone SE as the default simulated device
https://bugs.webkit.org/show_bug.cgi?id=188227
Reviewed by Aakash Jain.
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort):
2018-08-01 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r234443 and r234445.
https://bugs.webkit.org/show_bug.cgi?id=188224
Revision caused 3 api failures across all platforms.
(Requested by Truitt on #webkit).
Reverted changesets:
"Add configuration for automatic process pre-warming"
https://bugs.webkit.org/show_bug.cgi?id=187108
https://trac.webkit.org/changeset/234443
"Add configuration for automatic process pre-warming"
https://bugs.webkit.org/show_bug.cgi?id=187108
https://trac.webkit.org/changeset/234445
2018-07-31 Ben Richards <benton_richards@apple.com>
Add configuration for automatic process pre-warming
https://bugs.webkit.org/show_bug.cgi?id=187108
Reviewed by Ryosuke Niwa.
Added new test case for setting maximum prewarmed process count and updated test case for process swap on navigation to set the maximum prewarmed process count to be 1 where relevant.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
* TestWebKitAPI/Tests/WebKitCocoa/SetMaximumPrewarmedProcessCount.mm: Added.
(TEST):
2018-07-31 John Wilander <wilander@apple.com>
Resource Load Statistics: Remove partitioned cookies for reduced complexity, lower memory footprint, and ability to support more platforms
https://bugs.webkit.org/show_bug.cgi?id=188109
<rdar://problem/42664391>
Reviewed by Brent Fulgham, Chris Dumez, and Alex Christensen.
This patch removes cookie partitioning which reduces the model to just
blocked cookies (in third-party contexts) and first-party cookie access.
Several of the changes are renaming to reflect that there are no more
cookie partitions.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
Removed or renamed functions to reflect that there are no more
partitioned cookies.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::statisticsUpdateCookieBlocking):
(WTR::TestRunner::statisticsCallDidSetBlockCookiesForHostCallback):
(WTR::TestRunner::setCookieStoragePartitioningEnabled): Deleted.
(WTR::TestRunner::setStatisticsHasHadNonRecentUserInteraction): Deleted.
(WTR::TestRunner::setStatisticsTimeToLiveCookiePartitionFree): Deleted.
(WTR::TestRunner::statisticsUpdateCookiePartitioning): Deleted.
(WTR::TestRunner::statisticsSetShouldPartitionCookiesForHost): Deleted.
(WTR::TestRunner::statisticsCallDidSetPartitionOrBlockCookiesForHostCallback): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::statisticsUpdateCookieBlocking):
(WTR::TestController::setStatisticsHasHadNonRecentUserInteraction): Deleted.
(WTR::TestController::setStatisticsTimeToLiveCookiePartitionFree): Deleted.
(WTR::TestController::statisticsUpdateCookiePartitioning): Deleted.
(WTR::TestController::statisticsSetShouldPartitionCookiesForHost): Deleted.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::didSetBlockCookiesForHost):
(WTR::TestInvocation::didSetHasHadUserInteraction):
(WTR::TestInvocation::didSetPartitionOrBlockCookiesForHost): Deleted.
(WTR::TestInvocation::didSetHasHadNonRecentUserInteraction): Deleted.
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::initializeWebViewConfiguration):
2018-07-31 Alex Christensen <achristensen@webkit.org>
Build fix. Remove unused variable.
* TestWebKitAPI/Tests/WebCore/TransformationMatrix.cpp:
(TestWebKitAPI::TEST):
transform was never used. It was introduced in r205871
Apparently I'm the first one to build in a certain configuration that found it.
2018-07-31 Fujii Hironori <Hironori.Fujii@sony.com>
server_process.py should print returncode in debug log if the process crashed
https://bugs.webkit.org/show_bug.cgi?id=188160
Reviewed by Konstantin Tokarev.
* Scripts/webkitpy/port/server_process.py:
(ServerProcess.has_crashed): Put self._proc.returncode into the debug log message.
2018-07-31 Tomas Popela <tpopela@redhat.com>
[WTF] String::formatWithArguments() is unused
https://bugs.webkit.org/show_bug.cgi?id=187955
Reviewed by Darin Adler.
Remove tests for WTF::String::formatWithArguments() as it's unused and
we are removing it.
* TestWebKitAPI/Tests/WTF/WTFString.cpp:
2018-07-30 Aakash Jain <aakash_jain@apple.com>
[ews-build] Fix typo in builder name for Bindings-tests-EWS.
* BuildSlaveSupport/ews-build/config.json: Changed 'tests' to 'Tests' to make it consistent with
other builders.
2018-07-30 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add support for API tests in OpenSource EWS
https://bugs.webkit.org/show_bug.cgi?id=188156
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/config.json:
* BuildSlaveSupport/ews-build/factories.py:
(BuildFactory.__init__): Added triggers parameter.
(BuildFactory): If trigger is defined, create and upload archive and trigger appropriate queues.
(BuildFactory.propertiesToPassToTriggers): Pass all the required properties to triggered queue.
(APITestsFactory): Factory for running API tests.
* BuildSlaveSupport/ews-build/steps.py:
(ConfigureBuild.start): Set the property only if property is defined in config.json. Also set the
source of the property.
2018-07-30 Aakash Jain <aakash_jain@apple.com>
[ews-build] loadConfig should ensure that the triggers are valid
https://bugs.webkit.org/show_bug.cgi?id=188134
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/loadConfig.py:
(checkValidBuilder): Added a check to ensure that the builder doesn't refernce non-existing scheduler.
(checkValidSchedulers): Ensures that the scheduler is not un-used.
* BuildSlaveSupport/ews-build/loadConfig_unittest.py: Updated unit-tests.
2018-07-27 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed, fix typo in test expectations and mark another test as timing out
* TestWebKitAPI/glib/TestExpectations.json:
2018-07-27 Michael Catanzaro <mcatanzaro@igalia.com>
More unreviewed GTK test gardening
* TestWebKitAPI/glib/TestExpectations.json:
2018-07-27 Simon Fraser <simon.fraser@apple.com>
Be more conservative with compositing layer creation when memory is low
https://bugs.webkit.org/show_bug.cgi?id=187866
rdar://problem/42366345
Reviewed by Zalan Bujtas.
When process physical footprint is above a fraction of the jetsam limit, be more conservative in making
compositing layers. We avoid compositing for these situations:
1. Layers with 3D transforms which are affine (like translateZ(0)).
2. Layers with will-change
3. Layers for canvases (other than WebGL/WebGPU)
We reuse some macOS code in MemoryPressureHandler() but choose different thresholds for iOS,
falling into "conservative mode" at 50% of jetsam limit, and "strict mode" at 65%.
Compositing chooses to be more conservative in either "conservative" or "strict" memory modes.
Plumb through a "compositingPolicyOverride" both so that on-device testing isn't
flakily falling into a different mode, and so that we can impose the conservative
mode for testing.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::prepare):
2018-07-27 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed GTK test gardening
* TestWebKitAPI/glib/TestExpectations.json:
2018-07-27 Alex Christensen <achristensen@webkit.org>
Fix API tests after r234314
https://bugs.webkit.org/show_bug.cgi?id=188077
Make API tests use new delegate method.
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[WebsitePoliciesWebsiteDataStoreDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[WebsitePoliciesWebsiteDataStoreDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
2018-07-27 Alex Christensen <achristensen@webkit.org>
Fix API tests after r234314
https://bugs.webkit.org/show_bug.cgi?id=188077
Make API tests use new delegate method.
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[ContentBlockingWebsitePoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[AutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[CustomHeaderFieldsDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[PopUpPoliciesDelegate _webView:decidePolicyForNavigationAction:userInfo:decisionHandler:]):
(-[ContentBlockingWebsitePoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
(-[AutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
(-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
(-[CustomHeaderFieldsDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
(-[PopUpPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]): Deleted.
2018-07-26 Andy VanWagoner <andy@vanwagoner.family>
[INTL] Remove INTL sub-feature compile flags
https://bugs.webkit.org/show_bug.cgi?id=188081
Reviewed by Michael Catanzaro.
* Scripts/webkitperl/FeatureList.pm:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-07-26 Chris Dumez <cdumez@apple.com>
Loading a file URL and then issuing a reload right away causes the load to fail due to sandboxing
https://bugs.webkit.org/show_bug.cgi?id=188078
<rdar://problem/42562493>
Reviewed by Geoff Garen.
Add API test coverage. It exercises the right code path but unfortunately is not yet a regression
test because TestWebKitAPI does not appear to be sandboxed (rdar://problem/42638129).
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/LoadFileThenReload.mm: Added.
(-[LoadFileThenReloadDelegate webView:didFinishNavigation:]):
(-[LoadFileThenReloadDelegate webView:didFailProvisionalNavigation:withError:]):
(-[LoadFileThenReloadDelegate webView:didFailNavigation:withError:]):
(TEST):
2018-07-26 Aaron Chu <aaron_chu@apple.com>
Add Aaron Chu as a committer to contributors.json
https://bugs.webkit.org/show_bug.cgi?id=188066
Unreviwed. Added myself as committer.
* Scripts/webkitpy/common/config/contributors.json:
2018-07-26 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add build step to run API Tests
https://bugs.webkit.org/show_bug.cgi?id=188079
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps.py:
(TestWithFailureCount): Common class for various tests with failure count.
(TestWithFailureCount.start): Configure Buildbot's logobserver.
(TestWithFailureCount.commandComplete): Updates the failure count.
(TestWithFailureCount.evaluateCommand): Set the step status appropriately.
(TestWithFailureCount.getResultSummary): Set the step summary appropriately.
(RunAPITests): Build step to run API tests.
(RunAPITests.countFailures): Count the failures by parsing the output.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2018-07-26 Ross Kirsling <ross.kirsling@sony.com>
String(View) should have a splitAllowingEmptyEntries function instead of a flag parameter
https://bugs.webkit.org/show_bug.cgi?id=187963
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WTF/WTFString.cpp:
Add tests for String::split and String::splitAllowingEmptyEntries.
* TestWebKitAPI/Tests/WTF/StringView.cpp:
* WebKitTestRunner/TestController.cpp:
(WTR::updateTestOptionsFromTestHeader):
Update split/splitAllowingEmptyEntries usage.
2018-07-26 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r234181 and r234189.
https://bugs.webkit.org/show_bug.cgi?id=188075
These are not needed right now (Requested by thorton on
#webkit).
Reverted changesets:
"Enable Web Content Filtering on watchOS"
https://bugs.webkit.org/show_bug.cgi?id=187979
https://trac.webkit.org/changeset/234181
"HAVE(PARENTAL_CONTROLS) should be true on watchOS"
https://bugs.webkit.org/show_bug.cgi?id=187985
https://trac.webkit.org/changeset/234189
2018-07-04 Darin Adler <darin@apple.com>
Improve WebGPU implementation, including using Metal Objective-C protocols more simply and correctly
https://bugs.webkit.org/show_bug.cgi?id=187333
Reviewed by Sam Weinig.
* TestWebKitAPI/Tests/WebCore/mac/GPUBuffer.mm: Updated.
* TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm: Updated.
* TestWebKitAPI/Tests/WebCore/mac/GPUDevice.mm: Updated.
* TestWebKitAPI/Tests/WebCore/mac/GPUFunction.mm: Updated.
* TestWebKitAPI/Tests/WebCore/mac/GPULibrary.mm: Updated.
2018-07-25 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add build steps DownloadBuiltProduct and ExtractBuiltProduct
https://bugs.webkit.org/show_bug.cgi?id=188031
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps.py:
(DownloadBuiltProduct): Added build step DownloadBuiltProduct.
(ExtractBuiltProduct): Added build step ExtractBuiltProduct.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2018-07-25 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add build step UploadBuiltProduct
https://bugs.webkit.org/show_bug.cgi?id=188016
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps.py:
(UploadBuiltProduct): Added build step UploadBuiltProduct.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-test.
2018-07-25 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add build step ArchiveBuiltProduct
https://bugs.webkit.org/show_bug.cgi?id=188014
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps.py:
(ArchiveBuiltProduct): Added build step ArchiveBuiltProduct.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2018-07-25 Chris Dumez <cdumez@apple.com>
navigator.userAgent may return outdated value after webView.customUserAgent is set
https://bugs.webkit.org/show_bug.cgi?id=188009
<rdar://problem/42566456>
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/CustomUserAgent.mm: Added.
(TEST):
2018-07-25 Charlie Turner <cturner@igalia.com>
[Flatpak] Pass more environment variables to sandbox
https://bugs.webkit.org/show_bug.cgi?id=188002
Reviewed by Michael Catanzaro.
* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox):
2018-07-25 Zan Dobersek <zdobersek@igalia.com>
[WPE] Switch ViewBackend to using wpe_view_backend_exportable_fdo_egl APIs
https://bugs.webkit.org/show_bug.cgi?id=187997
Reviewed by Carlos Garcia Campos.
Instead of the raw wpe_view_backend_exportable_fdo API, switch to using
the EGL-oriented API that simply serves EGLImageKHR objects instead of
raw buffer resources. This allows us not to wrangle with creating and
managing lifetime of the same EGLImageKHR by ourselves.
ViewBackend now defines a wpe_view_backend_exportable_fdo_egl_client
struct and uses wpe_view_backend_exportable_fdo_egl_create() to create
the exportable object. This means that for each frame we're served an
EGLImageKHR object that is passed on to the displayBuffer()
implementation.
HeadlessViewBackend now just manages the pending and committed image
objects. Width and height values used during pixel data retrieval are
gathered from the ViewBackend's size that was specified when
constructed.
WindowViewBackend similarly only manages the committed image object,
not having to create an equivalent EGLImageKHR object from the raw
buffer resource anymore.
Unused EGL entrypoints in both HeadlessViewBackend and WindowViewBackend
classes are removed, and destructors for both classes are made virtual.
The WPEBackend-fdo version is bumped in order to have the EGL-specific
export API available.
* flatpak/org.webkit.WPE.yaml:
* wpe/backends/HeadlessViewBackend.cpp:
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::createSnapshot):
(WPEToolingBackends::HeadlessViewBackend::performUpdate):
(WPEToolingBackends::HeadlessViewBackend::displayBuffer):
* wpe/backends/HeadlessViewBackend.h:
* wpe/backends/ViewBackend.cpp:
(WPEToolingBackends::ViewBackend::initialize):
* wpe/backends/ViewBackend.h:
* wpe/backends/WindowViewBackend.cpp:
(WPEToolingBackends::WindowViewBackend::WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::~WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::displayBuffer):
* wpe/backends/WindowViewBackend.h:
* wpe/jhbuild.modules:
2018-07-24 Thomas Denney <tdenney@apple.com>
Remove support for the double type from WHLSL
https://bugs.webkit.org/show_bug.cgi?id=187977
Reviewed by Myles C. Maxfield.
* WebGPUShadingLanguageRI/All.js: Removed DoubleLiteral.js and DoubleLiteralType.js include.
* WebGPUShadingLanguageRI/DoubleLiteral.js: Removed.
* WebGPUShadingLanguageRI/DoubleLiteralType.js: Removed.
* WebGPUShadingLanguageRI/Intrinsics.js: Removed double arithmetic functions.
* WebGPUShadingLanguageRI/Parse.js:
(parseTerm): Removed parsing of double literals.
* WebGPUShadingLanguageRI/SPIRV.html: Removed DoubleLiteral.js and DoubleLiteralType.js include.
* WebGPUShadingLanguageRI/SPIRVCodegen.js: Removed double type logic.
* WebGPUShadingLanguageRI/StandardLibrary.js: Removed double type declarations.
* WebGPUShadingLanguageRI/Test.html: Removed DoubleLiteral.js and DoubleLiteralType.js include.
* WebGPUShadingLanguageRI/Test.js: Removed tests that test doubles or ported them to use floats.
* WebGPUShadingLanguageRI/index.html: Removed DoubleLiteral.js and DoubleLiteralType.js include.
2018-07-24 Tim Horton <timothy_horton@apple.com>
Enable Web Content Filtering on watchOS
https://bugs.webkit.org/show_bug.cgi?id=187979
<rdar://problem/42559346>
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-07-24 Daniel Bates <dabates@apple.com>
Move-constructing NeverDestroyed should move construct underlying object instead of copy constructing it
https://bugs.webkit.org/show_bug.cgi?id=187971
Reviewed by Saam Barati.
Add unit tests to cover move constructing a NeverDestroyed with a non-const and const data type
as well as invoking makeNeverDestroyed() with the result of a function that returns a move-only
data type.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/MoveOnlyLifecycleLogger.cpp: Added.
(TestWebKitAPI::MoveOnlyLifecycleLogger::MoveOnlyLifecycleLogger):
(TestWebKitAPI::MoveOnlyLifecycleLogger::~MoveOnlyLifecycleLogger):
(TestWebKitAPI::MoveOnlyLifecycleLogger::operator=):
(TestWebKitAPI::MoveOnlyLifecycleLogger::setName):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/MoveOnlyLifecycleLogger.h: Added.
* TestWebKitAPI/Tests/WTF/NeverDestroyed.cpp:
(TestWebKitAPI::TEST):
2018-07-24 Thomas Denney <tdenney@apple.com>
Minor changes to the WHLSL interpreter to support the new compiler
https://bugs.webkit.org/show_bug.cgi?id=187728
Reviewed by Myles C. Maxfield.
This bug contains small changes that are make minor changes to the
behaviour of the existing interpreter (the tests are unaffected and all
still pass).
* WebGPUShadingLanguageRI/EnumType.js:
(EnumType.prototype.get isEnum): Property added to EnumType and Type
* WebGPUShadingLanguageRI/Evaluator.js: Correct typo
* WebGPUShadingLanguageRI/Func.js:
(Func.prototype.get isEntryPoint): Add boolean property
* WebGPUShadingLanguageRI/FuncInstantiator.js:
(FuncInstantiator.prototype.get instances): Public accessor for existing
private field
* WebGPUShadingLanguageRI/FunctionLikeBlock.js: Refactored the class so
that it directly wraps a Func instance (therefore the only interface
change is to the constructor and the addition of the func accessor).
This change allows the de-inlining of functions.
(FunctionLikeBlock):
(FunctionLikeBlock.prototype.get func):
(FunctionLikeBlock.prototype.get returnType):
(FunctionLikeBlock.prototype.get parameters):
(FunctionLikeBlock.prototype.get body):
* WebGPUShadingLanguageRI/Inliner.js: Use the new FunctionLikeBlock
constructor
(Inliner.prototype.visitCallExpression):
(Inliner):
* WebGPUShadingLanguageRI/Intrinsics.js: Migrate the swizzle operators
to native functions (with additional support in StandardLibrary.js).
This reduces first-time compile-time from around 4s to around 0.1s.
(Intrinsics):
* WebGPUShadingLanguageRI/Lexer.js: Ensure that the parsing of multiline
comments completes correctly
(Lexer.prototype.next):
(Lexer):
* WebGPUShadingLanguageRI/MakeArrayRefExpression.js: Addition of type
property, which is based on the type of the lValue and the semantics of
the language (the @ operator yields an array reference with the thread
scope).
(MakeArrayRefExpression):
(MakeArrayRefExpression.prototype.get type):
* WebGPUShadingLanguageRI/NativeFunc.js: Add setter/getter for
implementationData to support swizzle operator change
(NativeFunc.prototype.get implementationData):
(NativeFunc.prototype.set implementationData):
* WebGPUShadingLanguageRI/Rewriter.js: Use new FunctionLikeBlock
constructor
(Rewriter.prototype.visitFunctionLikeBlock):
* WebGPUShadingLanguageRI/StandardLibrary.js:
(_generateSwizzle): Deleted.
* WebGPUShadingLanguageRI/SwizzleOp.js: Introduces a new class for
carrying metadata about swizzle operators so that they are implemented
as native functions rather than generated at compile time.
(SwizzleOp):
(SwizzleOp.prototype.get outSize):
(SwizzleOp.prototype.get components):
(SwizzleOp.prototype.get inSize):
(SwizzleOp.prototype.toString):
(SwizzleOp.allSwizzleOperators.):
(SwizzleOp.allSwizzleOperators):
* WebGPUShadingLanguageRI/StandardLibrary.js: + (SwizzleOp):
(SwizzleOp.prototype.get outSize):
(SwizzleOp.prototype.get components):
(SwizzleOp.prototype.get inSize):
(SwizzleOp.prototype.toString):
(generateSwizzles):
(_generateSwizzle): Deleted.
* WebGPUShadingLanguageRI/Type.js: Addition of isEnum property, as
above.
(Type.prototype.get isEnum):
2018-07-24 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r234121.
Caused perf test failures.
Reverted changeset:
"We should cache the compiled sandbox profile in a data vault"
https://bugs.webkit.org/show_bug.cgi?id=184991
https://trac.webkit.org/changeset/234121
2018-07-24 Thibault Saunier <tsaunier@igalia.com>
[Flatpak] Add openh264 as needed by WebRTC
https://bugs.webkit.org/show_bug.cgi?id=187956
Reviewed by Philippe Normand.
* flatpak/org.webkit.WebKit.yaml:
2018-07-24 Ross Kirsling <ross.kirsling@sony.com>
WebCore::URL::hostIsIPAddress needs a Windows implementation
https://bugs.webkit.org/show_bug.cgi?id=187859
Reviewed by Fujii Hironori.
* TestWebKitAPI/Tests/WebCore/URL.cpp:
Check for a few other ways an IP address could be invalid.
2018-07-24 Charlie Turner <cturner@igalia.com>
[Flatpak] Avoid consuming unknown arguments in flatpak wrapper
https://bugs.webkit.org/show_bug.cgi?id=187951
When running run-webkit-tests --wpe --debug, it was observed that
both self.platform != 'wpe' and self.debug != True. This turned
out to be because of the "args" argument consuming the remainder
of future arguments that came after it. Since the first argument
to load_from_args was the test script to run, it would end up
never processing the other arguments supplied to the wrapper
script.
Tested this by rebuilding GTK in debug mode, running the
minibrowser with various extra options, and running some tests
with various extra options.
Reviewed by Michael Catanzaro.
* flatpak/flatpakutils.py:
(WebkitFlatpak.load_from_args):
2018-07-24 Thibault Saunier <tsaunier@igalia.com>
[Flatpak] Remove now unnecessary 'hacks' for running tests
https://bugs.webkit.org/show_bug.cgi?id=187608
Reviewed by Philippe Normand.
We used to need to not share X11 with the sandbox when running tests
but it is not needed anymore as we do not mount `/tmp` on `/tmp` in the
sandbox (we mount it on `/run/host/tmp` now).
This has the advantage of making running the MiniBrowser to display test
results working again.
* flatpak/flatpakutils.py:
(WebkitFlatpak.clean_args):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak._cleanup_faltpak_args_for_tests_if_needed): Deleted.
2018-07-23 Fujii Hironori <Hironori.Fujii@sony.com>
webkitpy.port.server_process_unittest.TestServerProcess.test_basic failed on Windows Python
https://bugs.webkit.org/show_bug.cgi?id=187581
Reviewed by Daniel Bates.
There are two failures in this test case:
1. proc.poll() doesn't return 0.
2. stderr is not output.
For failure #1, this is expected. the process should not exit at
the time. proc.poll() should return None because the process is
still alive.
This change added a new test to check proc.poll() becomes 0 after
the process successfully exits.
For failure #2, stderr is not flushed even though stdout is
flushed. This change uses '-u' command switch to force stdin,
stdout and stderr to be totally unbuffered.
* Scripts/webkitpy/port/server_process_unittest.py:
(TestServerProcess.test_basic): Added -u command switch. Do not
flush stdout. Removed the special condition for Windows. Add a new
test to check proc.poll() returns 0.
(TestServerProcess.test_process_crashing): Added -u command
switch. Do not flush stdout.
2018-07-23 Ross Kirsling <ross.kirsling@sony.com>
WTF::StringView::split should have an allowEmptyEntries flag
https://bugs.webkit.org/show_bug.cgi?id=187864
Reviewed by Konstantin Tokarev.
* TestWebKitAPI/Tests/WTF/StringView.cpp: Add test.
2018-07-23 Ben Richards <benton_richards@apple.com>
We should cache the compiled sandbox profile in a data vault
https://bugs.webkit.org/show_bug.cgi?id=184991
Reviewed by Ryosuke Niwa.
Added trace points for sandbox initialization
* Tracing/SystemTracePoints.plist:
2018-07-23 Zalan Bujtas <zalan@apple.com>
DRT relies on [webView display] to call -viewWillDraw on the WebHTMLView
https://bugs.webkit.org/show_bug.cgi?id=187924
<rdar://problem/41745884>
Reviewed by Simon Fraser.
WebKit relies on -viewWillDraw getting called on WebHTMLView, even though that view has not been marked as needing display.
* DumpRenderTree/mac/PixelDumpSupportMac.mm:
(createBitmapContextFromWebView):
2018-07-23 Chris Dumez <cdumez@apple.com>
WebResourceLoadStatisticsStore fails to unregister itself as a MessageReceiver in its destructor
https://bugs.webkit.org/show_bug.cgi?id=187910
<rdar://problem/42356526>
Reviewed by Brent Fulgham.
Add API test coverage.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/ResourceLoadStatistics.mm:
(-[DisableITPDuringNavigationDelegate webView:didCommitNavigation:]):
(-[DisableITPDuringNavigationDelegate webView:didFinishNavigation:]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/notify-resourceLoadObserver.html: Added.
2018-07-23 Daniel Bates <dabates@apple.com>
test-webkitpy should take configuration command line options
https://bugs.webkit.org/show_bug.cgi?id=187872
Reviewed by David Kilzer.
Add --debug and --release optional command line options and teach the test bots to invoke test-webkitpy
with the appropriate configuration. At the moment these options are only meaningful on Mac since they
effect the configuration lldbWebKitTester is built with and we only build lldbWebKitTester on Mac.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunPythonTests): Pass the configuration to test-webkitpy. On Mac this will effect
how lldbWebKitTester is built. All other ports do not make use of the specified configuration.
* Scripts/webkitpy/test/main.py:
(_build_lldb_webkit_tester): Modified to take the configuration to build lldbWebKitTester. If
the specified configuration is None then we fall back to using the default configuration (as set
by script set-webkit-configuration).
(Tester._parse_args): Add command line options --debug and --release to build lldbWebKitTester
with a Debug configuration and a Release configuration, respectively
(Tester._run_tests): Pass the configuration to build lldbWebKitTester that we parsed from
the command line options. It may be None if neither --debug nor --release were passed.
2018-07-23 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r233030.
https://bugs.webkit.org/show_bug.cgi?id=187904
Broke tarball builds (Requested by mcatanzaro on #webkit).
Reverted changeset:
"run-gtk-tests (glib/common.py) cannot determine build
directory when webKitBranchBuild=true"
https://bugs.webkit.org/show_bug.cgi?id=185643
https://trac.webkit.org/changeset/233030
2018-07-21 Simon Fraser <simon.fraser@apple.com>
Fix lldb summarizers for HashMaps and HashSets
https://bugs.webkit.org/show_bug.cgi?id=187883
Reviewed by Dan Bates.
HashMap and HashSet summarizers were broken in various ways.
The 'type summary add -x' regexp needs to match at the start and end of the string
to avoid finding types nested inside other templates.
The HashTable synthetic child code incorrectly used the type of the key, rather than
the value when synthesizing children.
Add HashMap and HashSet summarizers.
I tried to get synthetic children working directly for HashMap and HashSet, but was unable.
* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders):
* lldb/lldb_webkit.py:
(__lldb_init_module):
(__lldb_init_module.lldb_webkit):
(WTFHashMap_SummaryProvider):
(WTFHashSet_SummaryProvider):
(WebCoreColorProvider._to_string_extended):
(WebCoreURLProvider.to_string):
(WTFHashMapProvider):
(WTFHashMapProvider.__init__):
(WTFHashMapProvider.tableSize):
(WTFHashMapProvider.keyCount):
(WTFHashSetProvider):
(WTFHashSetProvider.__init__):
(WTFHashSetProvider.tableSize):
(WTFHashSetProvider.keyCount):
(WTFHashTableProvider.tableSize):
(WTFHashTableProvider):
(WTFHashTableProvider.keyCount):
(WTFHashTableProvider.get_child_at_index):
(WTFHashTableProvider.update):
* lldb/lldb_webkit_unittest.py:
(TestSummaryProviders.serial_test_WTFVectorProvider_empty_vector):
(TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
(TestSummaryProviders):
(TestSummaryProviders.serial_test_WTFHashMap_tablesize_and_size):
(TestSummaryProviders.serial_test_WTFHashMap_of_vectors_tablesize_and_size):
(TestSummaryProviders.serial_test_WTFHashSet_tablesize_and_size):
2018-07-21 Simon Fraser <simon.fraser@apple.com>
Add lldb formatters for WebCore geometry types
https://bugs.webkit.org/show_bug.cgi?id=187884
Reviewed by Daniel Bates.
Add lldb formatters for IntPoint, IntSize, IntRect, FloatPoint, FloatSize, FloatRect
and LayoutRect.
Testing is blocked by webkit.org/b/187872.
* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders):
* lldb/lldb_webkit.py:
(__lldb_init_module.lldb_webkit):
(__lldb_init_module):
(WebCoreLayoutRect_SummaryProvider):
(WebCoreIntSize_SummaryProvider):
(WebCoreIntPoint_SummaryProvider):
(WebCoreFloatSize_SummaryProvider):
(WebCoreFloatPoint_SummaryProvider):
(WebCoreIntRect_SummaryProvider):
(WebCoreFloatRect_SummaryProvider):
(WebCoreLayoutRectProvider):
(WebCoreLayoutRectProvider.__init__):
(WebCoreLayoutRectProvider.get_x):
(WebCoreLayoutRectProvider.get_y):
(WebCoreLayoutRectProvider.get_width):
(WebCoreLayoutRectProvider.get_height):
(WebCoreIntPointProvider):
(WebCoreIntPointProvider.__init__):
(WebCoreIntPointProvider.get_x):
(WebCoreIntPointProvider.get_y):
(WebCoreIntSizeProvider):
(WebCoreIntSizeProvider.__init__):
(WebCoreIntSizeProvider.get_width):
(WebCoreIntSizeProvider.get_height):
(WebCoreIntRectProvider):
(WebCoreIntRectProvider.__init__):
(WebCoreIntRectProvider.get_x):
(WebCoreIntRectProvider.get_y):
(WebCoreIntRectProvider.get_width):
(WebCoreIntRectProvider.get_height):
(WebCoreFloatPointProvider):
(WebCoreFloatPointProvider.__init__):
(WebCoreFloatPointProvider.get_x):
(WebCoreFloatPointProvider.get_y):
(WebCoreFloatSizeProvider):
(WebCoreFloatSizeProvider.__init__):
(WebCoreFloatSizeProvider.get_width):
(WebCoreFloatSizeProvider.get_height):
(WebCoreFloatRectProvider):
(WebCoreFloatRectProvider.__init__):
(WebCoreFloatRectProvider.get_x):
(WebCoreFloatRectProvider.get_y):
(WebCoreFloatRectProvider.get_width):
(WebCoreFloatRectProvider.get_height):
2018-07-20 John Wilander <wilander@apple.com>
Resource Load Statistics: Enable basic functionality in experimental debug mode
https://bugs.webkit.org/show_bug.cgi?id=187835
<rdar://problem/42408590>
Reviewed by Chris Dumez.
This patch makes the experimental ITP Debug Mode feature work, at least
to a basic level. All of the changes to TestRunner are to support the
layout tests for the functionality.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStatisticsDebugMode):
(WTR::TestRunner::statisticsCallDidSetDebugModeCallback):
(WTR::TestRunner::setStatisticsPrevalentResourceForDebugMode):
(WTR::TestRunner::statisticsCallDidSetPrevalentResourceForDebugModeCallback):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setStatisticsDebugMode):
(WTR::TestController::setStatisticsPrevalentResourceForDebugMode):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::didSetStatisticsDebugMode):
(WTR::TestInvocation::didSetPrevalentResourceForDebugMode):
* WebKitTestRunner/TestInvocation.h:
2018-07-20 Ryosuke Niwa <rniwa@apple.com>
Picking a color from the color panel for typing attributes needs to inverse transform through color-filter
https://bugs.webkit.org/show_bug.cgi?id=187846
Reviewed by Simon Fraser.
Fixed the bug that testRunner.execCommand was using the second argument as the value.
The second argument, aShowDefaultUI, should always be ignored in testRunner.execCommand,
and the third argument should be used as the value. DumpRenderTree's implementation does this already.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::execCommand):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
2018-07-20 Dean Jackson <dino@apple.com>
Accidentally checked in the wrong version of these files.
* lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj:
* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders):
* lldb/lldb_webkit_unittest.py:
(TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
(TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color): Deleted.
(TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color): Deleted.
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color): Deleted.
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color): Deleted.
(TestSummaryProviders.serial_test_WebCoreColorProvider_semantic_color): Deleted.
2018-07-20 Dean Jackson <dino@apple.com>
Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776
Reviewed by Dan Bates.
This time without the tests because we don't want to build
all of WebKit just for python tests.
* lldb/lldb_webkit.py: Add a Color summary provider.
(__lldb_init_module):
(WebCoreColor_SummaryProvider):
(WebCoreColorProvider):
(WebCoreColorProvider.__init__):
(WebCoreColorProvider._is_extended):
(WebCoreColorProvider._is_valid):
(WebCoreColorProvider._is_semantic):
(WebCoreColorProvider._to_string_extended):
(WebCoreColorProvider.to_string):
2018-07-20 Brady Eidson <beidson@apple.com>
Add WKNavigation/WKNavigationAction related SPI.
https://bugs.webkit.org/show_bug.cgi?id=187826
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
(-[NavigationActionHasNavigationDelegate webView:didFinishNavigation:]):
(-[NavigationActionHasNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(TEST):
2018-07-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r233943, r233988, r234004, and
r234012.
https://bugs.webkit.org/show_bug.cgi?id=187856
webkitpy tests are failing to build lldbWebKitTester
(Requested by ryanhaddad on #webkit).
Reverted changesets:
"Provide an lldb type summary for WebCore::Color"
https://bugs.webkit.org/show_bug.cgi?id=187776
https://trac.webkit.org/changeset/233943
"Provide an lldb type summary for WebCore::Color"
https://bugs.webkit.org/show_bug.cgi?id=187776
https://trac.webkit.org/changeset/233988
"Provide an lldb type summary for WebCore::Color"
https://bugs.webkit.org/show_bug.cgi?id=187776
https://trac.webkit.org/changeset/234004
"Provide an lldb type summary for WebCore::Color"
https://bugs.webkit.org/show_bug.cgi?id=187776
https://trac.webkit.org/changeset/234012
2018-07-20 Philippe Normand <pnormand@igalia.com>
[GTK][WPE] enable-media-capabilities websetting
https://bugs.webkit.org/show_bug.cgi?id=187847
Reviewed by Carlos Garcia Campos.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
(testWebKitSettings): Unit test for the new enable-media-capabilities setting.
2018-07-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] jsc_context_evaluate_in_object() should receive an instance when a JSCClass is given
https://bugs.webkit.org/show_bug.cgi?id=187798
Reviewed by Michael Catanzaro.
Update test cases to the new API and use a destroy function and vtable in the test case of calling
jsc_context_evaluate_in_object() with a JSCClass.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCEvaluateInObject):
2018-07-19 Ross Kirsling <ross.kirsling@sony.com>
TestWTF.WTF.StringConcatenate_Unsigned fails for unsigned short on Windows
https://bugs.webkit.org/show_bug.cgi?id=187712
Reviewed by Fujii Hironori.
* TestWebKitAPI/Tests/WTF/StringConcatenate.cpp:
Mark result of unsigned short test case as platform-specific,
since Windows' behavior is actually *less* surprising here.
2018-07-19 Lucas Forschler <lforschler@apple.com>
Teach the AWS Lambda to use the [minified]-platforms database
https://bugs.webkit.org/show_bug.cgi?id=187817
Reviewed by David Kilzer.
* WebKitArchiveSupport/lambda/register-archive-in-dynamodb.py:
(lambda_handler): Add support for the platforms.webkit.org database
* WebKitArchiveSupport/lambda/register-minified-s3-archive-in-dynamodb.py:
(lambda_handler): Add support for the minified-platforms.webkit.org database
2018-07-19 Dean Jackson <dino@apple.com>
Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776
Dan Bates helped me with this attempted fix. Fingers crossed!
* Scripts/build-lldbwebkittester:
2018-07-19 Stephan Szabo <stephan.szabo@sony.com>
[WinCairo] Support DEVELOPER_MODE for allowing inspection of web inspector
https://bugs.webkit.org/show_bug.cgi?id=187786
Reviewed by Fujii Hironori.
* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject): Turn on DEVELOPER_MODE
for WinCairo builds.
2018-07-19 Dean Jackson <dino@apple.com>
Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776
Another attempted build fix for Debug.
* lldb/lldbWebKitTester/Configurations/Base.xcconfig:
* lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj:
2018-07-19 Thomas Denney <tdenney@apple.com>
[WHLSL] The interpreter doesn't support boolean short-circuiting
https://bugs.webkit.org/show_bug.cgi?id=187779
Reviewed by Alex Christensen.
* WebGPUShadingLanguageRI/Evaluator.js:
(Evaluator.prototype.visitLogicalExpression): RHS is only evaluated when necessary
* WebGPUShadingLanguageRI/Test.js:
(tests.booleanShortcircuiting): Adds 4 tests for the evaluation of logical expresions
2018-07-19 Dean Jackson <dino@apple.com>
Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776
Attempted build fix.
* lldb/lldbWebKitTester/Configurations/Base.xcconfig:
2018-07-19 Brady Eidson <beidson@apple.com>
Add an SPI policy action to allow clients to explicitly ask for a new process on a navigation.
https://bugs.webkit.org/show_bug.cgi?id=187789
Reviewed by Andy Estes.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONNavigationDelegate init]):
(-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
2018-07-19 Thibault Saunier <tsaunier@igalia.com>
[Flatpak] Let flatpak process handle SIGINT
https://bugs.webkit.org/show_bug.cgi?id=187521
Reviewed by Philippe Normand.
Ensuring that flatpak process ends properly and that the sandbox is teard down.
It also avoids showing usless backtrace to the end user and makes gdb
much more usable.
Also make flatpakutils not verbose by default
* flatpak/flatpakutils.py:
(disable_signals):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.run_gdb):
2018-07-18 Stephan Szabo <stephan.szabo@sony.com>
Unreviewed. Fix contributors entry.
* Scripts/webkitpy/common/config/contributors.json:
2018-07-18 Dean Jackson <dino@apple.com>
Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776
Reviewed by Dan Bates.
* lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Link against WebKit
to get to WebCore.
* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders): Create some Color objects for testing.
* lldb/lldb_webkit.py: Add a Color summary provider.
(__lldb_init_module):
(WebCoreColor_SummaryProvider):
(WebCoreColorProvider):
(WebCoreColorProvider.__init__):
(WebCoreColorProvider._is_extended):
(WebCoreColorProvider._is_valid):
(WebCoreColorProvider._is_semantic):
(WebCoreColorProvider._to_string_extended):
(WebCoreColorProvider.to_string):
* lldb/lldb_webkit_unittest.py: Tests.
(TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
(TestSummaryProviders):
(TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color):
2018-07-18 Truitt Savell <tsavell@apple.com>
Unreviewed, rolling out r233934.
Revision caused 5 webkitpy failures on Mac and broke webkitpy
testing on iOS simulator
Reverted changeset:
"Provide an lldb type summary for WebCore::Color"
https://bugs.webkit.org/show_bug.cgi?id=187776
https://trac.webkit.org/changeset/233934
2018-07-18 Chris Dumez <cdumez@apple.com>
REGRESSION (r233897): CrashTracer: com.apple.WebKit.WebContent.Development at com.apple.WebKit: WKBooleanGetValue + 9
https://bugs.webkit.org/show_bug.cgi?id=187784
<rdar://problem/42329230>
Reviewed by Brady Eidson.
When process swapping on navigation, WebPageProxy::reattachToWebProcess() unregisters the page as a MessageReceiver
from the old WebProcessProxy and registers itself as a MessageReceiver for the new WebProcessProxy instead. This
means that after this point, IPC sent by the previous WebProcess to its WebPageProxy will fail.
When we process swap, we also navigate the page in the old WebProcess to about:blank, when the navigation to
about:blank would complete, the WebKitTestRunner's injected bundle would try and send IPC to the WebPageProxy
which would fail and would cause WKBundlePagePostSynchronousMessageForTesting() to return a null result. WKTR
would crash when dereferencing this null result. This patch addresses this by dealing with the potential null
result.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::shouldProcessWorkQueue const):
2018-07-18 Dean Jackson <dino@apple.com>
Provide an lldb type summary for WebCore::Color
https://bugs.webkit.org/show_bug.cgi?id=187776
Reviewed by Dan Bates.
* lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Link against WebKit
to get to WebCore.
* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders): Create some Color objects for testing.
* lldb/lldb_webkit.py: Add a Color summary provider.
(__lldb_init_module):
(WebCoreColor_SummaryProvider):
(WebCoreColorProvider):
(WebCoreColorProvider.__init__):
(WebCoreColorProvider._is_extended):
(WebCoreColorProvider._is_valid):
(WebCoreColorProvider._is_semantic):
(WebCoreColorProvider._to_string_extended):
(WebCoreColorProvider.to_string):
* lldb/lldb_webkit_unittest.py: Tests.
(TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
(TestSummaryProviders):
(TestSummaryProviders.serial_test_WebCoreColorProvider_invalid_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_extended_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgb_color):
(TestSummaryProviders.serial_test_WebCoreColorProvider_rgba_color):
2018-07-18 Stephan Szabo <stephan.szabo@sony.com>
Adding myself to contributors.json
Unreviewed contributors.json change.
* Scripts/webkitpy/common/config/contributors.json:
2018-07-18 Jer Noble <jer.noble@apple.com>
-_beginAnimatedResizeWithUpdates: can leave view in bad state if called during an existing animation
https://bugs.webkit.org/show_bug.cgi?id=187739
<rdar://problem/42304518>
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
(TEST):
2018-07-18 Jer Noble <jer.noble@apple.com>
PiP from Element Fullscreen should match AVKit's behavior
https://bugs.webkit.org/show_bug.cgi?id=187623
<rdar://problem/41212379>
Reviewed by Jon Lee.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/ExitFullscreenOnEnterPiP.mm: Added.
(-[ExitFullscreenOnEnterPiPUIDelegate _webView:hasVideoInPictureInPictureDidChange:]):
(-[ExitFullscreenOnEnterPiPUIDelegate _webViewDidEnterFullscreen:]):
(-[ExitFullscreenOnEnterPiPUIDelegate _webViewDidExitFullscreen:]):
(TestWebKitAPI::TEST):
2018-07-18 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add build step to run layout-test
https://bugs.webkit.org/show_bug.cgi?id=187674
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps.py:
(RunWebKitTests): Added build step to run layout-tests. This is similar to current EWS.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
* BuildSlaveSupport/ews-build/factories.py: Added build-step to run layout-test in iOSSimulatorFactory.
2018-07-18 Wenson Hsieh <wenson_hsieh@apple.com>
Add SPI to defer running async script until after document load
https://bugs.webkit.org/show_bug.cgi?id=187748
<rdar://problem/42317378>
Reviewed by Ryosuke Niwa and Tim Horton.
Add an API test to verify that when the deferred async script configuration is set, async scripts will be
executed after the DOMContentLoaded event.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/RunScriptAfterDocumentLoad.mm: Added.
(TEST):
2018-07-18 Charlie Turner <cturner@igalia.com>
[WPE] Update WPEBackend in flatpak
https://bugs.webkit.org/show_bug.cgi?id=187753
r233763 updated WPEBackend for the jhbuild, but not the flatpak. This
caused WPE_BACKEND_CHECK_VERSION to not be defined, triggering a bug
in the version guard,
#if defined(WPE_BACKEND_CHECK_VERSION) && WPE_BACKEND_CHECK_VERSION(0, 2, 0)
This doesn't work as intended, since the C preprocessor first expands
all macro arguments in the #if expression before evaluating the
expression. When WPE_BACKEND_CHECK_VERSION is not defined, this will
lead to a syntax error and some head scratching.
A future patch should address the buggy macro check, when it is
decided whether the assume the macro is always defined and bump
the API requirements on WPEBackend, or to move the check into two
conditionals to avoid the expansion problem.
Unreviewed build fix.
* flatpak/org.webkit.WPE.yaml:
2018-07-18 Simon Fraser <simon.fraser@apple.com>
Fix the parsing of colors in attributed string tests, and make it possible to dump the typing attributes
https://bugs.webkit.org/show_bug.cgi?id=187747
Reviewed by Ryosuke Niwa.
Add textInputController.attributedStringForTyping(), which returns a one-character
attributed string whose attributes are the typing attributes, making it possible to
test -[WebView typingAttributes].
Sadly WebCore's convertObjcValueToValue() doesn't know how to convert NSDictionary,
so we can't return -typingAttributes directly.
* DumpRenderTree/mac/TextInputControllerMac.m:
(+[TextInputController isSelectorExcludedFromWebScript:]):
(-[TextInputController attributedStringForTyping]):
2018-07-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add jsc_context_check_syntax() to GLib API
https://bugs.webkit.org/show_bug.cgi?id=187694
Reviewed by Yusuke Suzuki.
Add a new test case.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCCheckSyntax):
(main):
2018-07-17 Sihui Liu <sihui_liu@apple.com>
REGRESSION: [macOS Sierra] TestWebKitAPI.WebKit.WebsiteDataStoreCustomPaths is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=187066
<rdar://problem/41609065>
Reviewed by Chris Dumez.
In r232668 we started to do reload if web process crashes by default. As we killed the web
process explicitly in this test, if web page got reloaded, messages would be sent again,
and flag set in message handler could keep the test continue to evaluate the expectation
without waiting for removeDataOfTypes to finish.
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(-[WebsiteDataStoreCustomPathsMessageHandler webViewWebContentProcessDidTerminate:]):
(TEST):
2018-07-17 Chris Dumez <cdumez@apple.com>
Turn on PSON in WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=186542
Reviewed by Brady Eidson.
Turn on PSON by default in WebKitTestRunner.
* WebKitTestRunner/TestOptions.h:
2018-07-17 Wenson Hsieh <wenson_hsieh@apple.com>
Add an SPI hook to allow clients to yield document parsing and script execution
https://bugs.webkit.org/show_bug.cgi?id=187682
<rdar://problem/42207453>
Reviewed by Ryosuke Niwa.
Add a few tests to exercise the new document yield token SPI, verifying that clients can use the SPI to defer
document load, and that doing so doesn't cause deferred `script` to execute in the wrong order (i.e. before
synchronous script, or after "DOMContentLoaded").
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenPlugIn.mm: Added.
(-[ParserYieldTokenPlugIn takeDocumentParserTokenAfterCommittingLoad]):
(-[ParserYieldTokenPlugIn releaseDocumentParserToken]):
(-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didCommitLoadForFrame:]):
(-[ParserYieldTokenPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didFinishDocumentLoadForFrame:]):
(-[ParserYieldTokenPlugIn webProcessPlugInBrowserContextController:didFinishLoadForFrame:]):
Add an injected bundle object that knows how to take and release multiple document parser yield tokens.
* TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.h: Added.
* TestWebKitAPI/Tests/WebKitCocoa/ParserYieldTokenTests.mm: Added.
(+[ParserYieldTokenTestWebView webView]):
(-[ParserYieldTokenTestWebView bundle]):
(-[ParserYieldTokenTestWebView schemeHandler]):
(-[ParserYieldTokenTestWebView didFinishDocumentLoad]):
(-[ParserYieldTokenTestWebView didFinishLoad]):
(waitForDelay):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.h: Added.
* TestWebKitAPI/Tests/WebKitCocoa/TestURLSchemeHandler.mm: Added.
(-[TestURLSchemeHandler webView:startURLSchemeTask:]):
(-[TestURLSchemeHandler webView:stopURLSchemeTask:]):
(-[TestURLSchemeHandler setStartURLSchemeTaskHandler:]):
(-[TestURLSchemeHandler startURLSchemeTaskHandler]):
(-[TestURLSchemeHandler setStopURLSchemeTaskHandler:]):
(-[TestURLSchemeHandler stopURLSchemeTaskHandler]):
Add a new test helper class to handle custom schemes via a block-based API.
* TestWebKitAPI/Tests/WebKitCocoa/text-with-async-script.html: Added.
New test HTML page that contains a deferred script element, a synchronous script element, another deferred
script element, and then some text, images, and links.
* TestWebKitAPI/Tests/WebKitCocoa/text-with-deferred-script.html: Added.
2018-07-17 Truitt Savell <tsavell@apple.com>
Adding myself to Contributors.json
Unreviewed
* Scripts/webkitpy/common/config/contributors.json:
2018-07-17 Aditya Keerthi <akeerthi@apple.com>
[macOS] TestWebKitAPI.PictureInPicture.WKUIDelegate is timing out
https://bugs.webkit.org/show_bug.cgi?id=187730
Reviewed by Jer Noble.
This regression was introduced by r233865. PIP can now only be initiated from a
window that is on screen.
* TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
(TestWebKitAPI::TEST):
2018-07-17 John Wilander <wilander@apple.com>
Add completion handlers to TestRunner functions setStatisticsLastSeen(), setStatisticsPrevalentResource(), setStatisticsVeryPrevalentResource(), setStatisticsHasHadUserInteraction(), and setStatisticsHasHadNonRecentUserInteraction()
https://bugs.webkit.org/show_bug.cgi?id=187710
<rdar://problem/42252757>
Reviewed by Chris Dumez.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStatisticsLastSeen):
(WTR::TestRunner::statisticsCallDidSetLastSeenCallback):
(WTR::TestRunner::setStatisticsPrevalentResource):
(WTR::TestRunner::statisticsCallDidSetPrevalentResourceCallback):
(WTR::TestRunner::setStatisticsVeryPrevalentResource):
(WTR::TestRunner::statisticsCallDidSetVeryPrevalentResourceCallback):
(WTR::TestRunner::setStatisticsHasHadUserInteraction):
(WTR::TestRunner::setStatisticsHasHadNonRecentUserInteraction):
(WTR::TestRunner::statisticsCallDidSetHasHadUserInteractionCallback):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setStatisticsLastSeen):
(WTR::TestController::setStatisticsPrevalentResource):
(WTR::TestController::setStatisticsVeryPrevalentResource):
(WTR::TestController::setStatisticsHasHadUserInteraction):
(WTR::TestController::setStatisticsHasHadNonRecentUserInteraction):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didSetLastSeen):
(WTR::TestInvocation::didSetPrevalentResource):
(WTR::TestInvocation::didSetVeryPrevalentResource):
(WTR::TestInvocation::didSetHasHadUserInteraction):
(WTR::TestInvocation::didSetHasHadNonRecentUserInteraction):
* WebKitTestRunner/TestInvocation.h:
2018-07-16 Jeremy Jones <jeremyj@apple.com>
Fix API Test failures introduced by r233865
https://bugs.webkit.org/show_bug.cgi?id=187720
Unreviewed APITest fix after r233865.
Fullscreen can now only be initiated from a window that is on screen.
* TestWebKitAPI/Tests/WebKitCocoa/FullscreenDelegate.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/FullscreenTopContentInset.mm:
(TestWebKitAPI::TEST):
2018-07-11 Dean Jackson <dino@apple.com>
Allow removal of white backgrounds
https://bugs.webkit.org/show_bug.cgi?id=187574
<rdar://problem/41146792>
Reviewed by Simon Fraser.
Add a new menu item for punching out white backgrounds in MiniBrowser.
In WebKitTestRunner, expose the new setting and hook that up to
drawing a background in the WebView.
* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration): Add _punchOutWhiteBackgroundsInDarkMode.
* MiniBrowser/mac/SettingsController.h: Ditto.
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController togglePunchOutWhiteBackgroundsInDarkMode:]):
(-[SettingsController punchOutWhiteBackgroundsInDarkMode]):
* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController didChangeSettings]): Set the new preference.
* WebKitTestRunner/PlatformWebView.h: Expose a drawsBackground property.
* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp: Null implementation.
(WTR::PlatformWebView::drawsBackground const):
(WTR::PlatformWebView::setDrawsBackground):
* WebKitTestRunner/wpe/PlatformWebViewWPE.cpp: Ditto.
(WTR::PlatformWebView::drawsBackground const):
(WTR::PlatformWebView::setDrawsBackground):
* WebKitTestRunner/ios/PlatformWebViewIOS.mm: Call into the WKWebView and
set its SPI.
(WTR::PlatformWebView::drawsBackground const):
(WTR::PlatformWebView::setDrawsBackground):
* WebKitTestRunner/mac/PlatformWebViewMac.mm: Ditto.
(WTR::PlatformWebView::drawsBackground const):
(WTR::PlatformWebView::setDrawsBackground):
* WebKitTestRunner/TestController.cpp: Reset and copy the new preference.
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformCreateWebView): If the option for punching
out the background was set, tell the WebView to not draw its background.
2018-07-16 Aditya Keerthi <akeerthi@apple.com>
[Datalist][macOS] Add suggestions UI for TextFieldInputTypes
https://bugs.webkit.org/show_bug.cgi?id=186531
Reviewed by Tim Horton.
Added isShowingDatalistSuggestions testing hook in order to enable testing of the
visibility of the suggestions view.
* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::isShowingDataListSuggestions const):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::isShowingDataListSuggestions const):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::isShowingDataListSuggestions const):
2018-07-16 Yusuke Suzuki <utatane.tea@gmail.com>
Add --target-path option to dump-class-layout
https://bugs.webkit.org/show_bug.cgi?id=187687
Reviewed by Simon Fraser.
We add an escape hatch to dump-class-layout for specifying target path directly.
This `--target-path` allows us to use dump-class-layout in the other ports
like JSCOnly.
We can dump class layout if we build the target with clang by using the following command.
Tools/Scripts/dump-class-layout \
--architecture=x86_64 \
--target-path=path/to/libJavaScriptCore.so \
JavaScriptCore \
ScopeNode
* Scripts/dump-class-layout:
(main):
2018-07-16 Sihui Liu <sihui_liu@apple.com>
IndexedDB: closeAndDeleteDatabasesForOrigins should remove all databases for those origins
https://bugs.webkit.org/show_bug.cgi?id=187631
<rdar://problem/42164227>
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST):
2018-07-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add API to evaluate code using a given object to store global symbols
https://bugs.webkit.org/show_bug.cgi?id=187639
Reviewed by Michael Catanzaro.
Add a new test case.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCEvaluateInObject):
(testJSCExceptions):
(main):
2018-07-15 Zan Dobersek <zdobersek@igalia.com>
[webkitpy] run-web-platform-tests should allow specifying custom WPT metadata directories
https://bugs.webkit.org/show_bug.cgi?id=187353
Reviewed by Youenn Fablet.
When using run-web-platform-tests, allow specifying custom WPT metadata
directory. This will avoid generating such metadata-filled directory
from the port-specific JSON expectations file, and instead will search
for the metadata files and the include manifest inside the specified
directory. The MANIFEST.json file will also be generated under there.
Rationale for this change is prototyping using custom metadata
directories and avoiding generating all this content from a JSON file.
Using this by default in the future would avoid sporradic changes in how
WPT handles metadata .ini files and releases us from the obligation of
adjusting the generator for every such change. This would also allow
managing this metadata content in a separate repository, avoiding
polluting the main webkit.org repository with thousands of .ini files.
If this turns out to be the preferable way of managing the metadata
content, the JSON files under WebPlatformTests/ and the related code in
wpt_runner.py would be removed.
* Scripts/webkitpy/w3c/wpt_runner.py:
(parse_args):
(WPTRunner._wpt_run_paths):
(WPTRunner.run):
* Scripts/webkitpy/w3c/wpt_runner_unittest.py:
(WPTRunnerTest.test_run_with_specified_options):
2018-07-13 Ross Kirsling <ross.kirsling@sony.com>
[WinCairo] run-api-tests is timing out for almost all test cases
https://bugs.webkit.org/show_bug.cgi?id=187547
Reviewed by Fujii Hironori.
* Scripts/webkitpy/port/server_process.py:
(ServerProcess._wait_for_data_and_update_buffers_using_win32_apis):
Still attempt to read from stdout/stderr even if the process has exited, as long as it's before the deadline.
* Scripts/webkitpy/port/server_process_unittest.py:
(TestServerProcess.test_read_after_process_exits):
Add test case.
2018-07-13 Ryan Haddad <ryanhaddad@apple.com>
Add TestExpectations and baselines for iOS 12
https://bugs.webkit.org/show_bug.cgi?id=187628
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/port/ios.py:
(IOSPort): Bump current version to 12.
2018-07-13 Ryan Haddad <ryanhaddad@apple.com>
Add TestExpectations and baselines for Mojave.
https://bugs.webkit.org/show_bug.cgi?id=187620
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/port/mac.py:
(MacPort): Bump current version to 10.14.
2018-07-13 Timothy Hatcher <timothy@apple.com>
Add _drawsBackground to WKWebViewConfiguration.
https://bugs.webkit.org/show_bug.cgi?id=187665
rdar://problem/42182268
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/Configuration.mm:
(TestWebKitAPI.WebKit.ConfigurationDrawsBackground): Added.
2018-07-13 Chris Dumez <cdumez@apple.com>
Add a FrameLoaderClient willInjectUserScriptForFrame callback
https://bugs.webkit.org/show_bug.cgi?id=187565
<rdar://problem/42095701>
Unreviewed WKTR fix after r233782.
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2018-07-13 Chris Dumez <cdumez@apple.com>
Reduce size of WebCore::URL
https://bugs.webkit.org/show_bug.cgi?id=186820
<rdar://problem/42087508>
Unreviewed, re-generates Service worker registrations database used by API tests after r233789.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-2.sqlite3: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-2.sqlite3-shm: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-3.sqlite3: Renamed from Tools/TestWebKitAPI/Tests/WebKitCocoa/SimpleServiceWorkerRegistrations-2.sqlite3-wal.
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST):
2018-07-12 Wenson Hsieh <wenson_hsieh@apple.com>
Make it easier to hit the significant rendered text layout milestone on pages with main article elements
https://bugs.webkit.org/show_bug.cgi?id=187578
<rdar://problem/42104637>
Reviewed by Ryosuke Niwa.
Tweak an existing layout test to additionally check that the significant text layout milestone is fired on a
page with an article element that is clearly the "main" content on the page (i.e. much taller than all other
articles).
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/significant-text-milestone-article.html: Copied from Tools/TestWebKitAPI/Tests/WebKitCocoa/significant-text-milestone.html.
* TestWebKitAPI/Tests/WebKitCocoa/significant-text-milestone.html:
* TestWebKitAPI/Tests/ios/RenderingProgressTests.mm:
(TEST):
2018-07-12 Fujii Hironori <Hironori.Fujii@sony.com>
Change my status to be a WebKit reviewer.
Unreviewed status update.
* Scripts/webkitpy/common/config/contributors.json:
2018-07-12 Fujii Hironori <Hironori.Fujii@sony.com>
Unreviewed contributors.json update
Just run "validate-committer-lists -c" to canonicalize the style.
* Scripts/webkitpy/common/config/contributors.json:
2018-07-12 Alex Christensen <achristensen@webkit.org>
Reduce size of WebCore::URL
https://bugs.webkit.org/show_bug.cgi?id=186820
Reviewed by Yusuke Suzuki and Youenn Fablet.
* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):
2018-07-12 Brady Eidson <beidson@apple.com>
Make process-swap-on-navigation an experimental feature.
<rdar://problem/41995053> and https://bugs.webkit.org/show_bug.cgi?id=187558
Reviewed by Chris Dumez.
Make sure WKTR doesn't enable ProcessSwapOnNavigation by default simply because it's an experimental feature.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):
(WTR::TestController::resetPreferencesToConsistentValues):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::shouldEnableProcessSwapOnNavigation const):
2018-07-12 Youenn Fablet <youenn@apple.com>
Add a FrameLoaderClient willInjectUserScriptForFrame callback
https://bugs.webkit.org/show_bug.cgi?id=187565
Reviewed by Alex Christensen.
Added new test runner API to check for willInjectUserScriptForFrame callback.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
(WTR::InjectedBundle::resetUserScriptInjectedCount):
(WTR::InjectedBundle::increaseUserScriptInjectedCount):
(WTR::InjectedBundle::userScriptInjectedCount const):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
(WTR::InjectedBundlePage::resetAfterTest):
(WTR::InjectedBundlePage::willInjectUserScriptForFrame):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::userScriptInjectedCount const):
(WTR::TestRunner::injectUserScript):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::injectUserScript):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::injectUserScript):
2018-07-12 Sihui Liu <sihui_liu@apple.com>
IndexedDB: database file of subframe cannot be removed
https://bugs.webkit.org/show_bug.cgi?id=187564
Reviewed by Youenn Fablet.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST):
2018-07-12 Timothy Hatcher <timothy@apple.com>
Make WebKit.LinkColorWithSystemAppearance work across system versions.
https://bugs.webkit.org/show_bug.cgi?id=187573
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm:
(TestWebKitAPI.WebKit.LinkColorWithSystemAppearance): Dynamically generate the expected string.
2018-07-11 Carlos Garcia Campos <cgarcia@igalia.com>
[WPE] Pass the backend library name as command line parameter to the web process
https://bugs.webkit.org/show_bug.cgi?id=186841
Reviewed by Žan Doberšek.
* MiniBrowser/wpe/main.cpp:
(main): Stop using WPE_BACKEND_LIBRARY env var.
* Scripts/run-wpe-tests:
(WPETestRunner.__init__): Ditto.
* Scripts/webkitpy/port/wpe.py:
(WPEPort.setup_environ_for_server): Ditto.
* wpe/backends/ViewBackend.cpp:
(WPEToolingBackends::ViewBackend::ViewBackend): Call wpe_loader_init() to ensure WPEBackend-fdo is used.
* wpe/jhbuild.modules: Upgrade WPEBackend to version 0.2.0.
2018-07-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add API to allow creating variadic functions
https://bugs.webkit.org/show_bug.cgi?id=187517
Reviewed by Michael Catanzaro.
Add test cases.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCFunction):
(fooCreateWithFooV):
(multiplyFooV):
2018-07-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add jsc_context_get_global_object() to GLib API
https://bugs.webkit.org/show_bug.cgi?id=187515
Reviewed by Michael Catanzaro.
Add test cases.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCGlobalObject):
(main):
2018-07-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Handle G_TYPE_STRV in glib API
https://bugs.webkit.org/show_bug.cgi?id=187512
Reviewed by Michael Catanzaro.
Add test cases.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCTypes):
(joinFunction):
(testJSCFunction):
2018-07-11 Aakash Jain <aakash_jain@apple.com>
[ews-build] EWS should unapply patch and re-run jsc tests when patch fails jsc tests
https://bugs.webkit.org/show_bug.cgi?id=187549
Reviewed by Alexey Proskuryakov.
* BuildSlaveSupport/ews-build/factories.py:
(JSCTestsFactory.__init__):
* BuildSlaveSupport/ews-build/steps.py:
(CompileJSCOnlyToT): Build ToT without patch.
(CompileJSCOnlyToT.doStepIf): Run this step only if patch failed to build.
(RunJavaScriptCoreTests.evaluateCommand): Set patchFailedJSCTests property appropriately.
(ReRunJavaScriptCoreTests): Re-runs JSC tests.
(ReRunJavaScriptCoreTests.doStepIf): Run this step only if patch failed JSC tests.
(ReRunJavaScriptCoreTests.evaluateCommand): Set patchFailedJSCTests property appropriately.
(RunJavaScriptCoreTestsToT): Run JSC tests on ToT without patch.
(RunJavaScriptCoreTestsToT.doStepIf): Run this step only if patch failed JSC tests.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2018-07-11 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r233742.
https://bugs.webkit.org/show_bug.cgi?id=187577
Binary incompatible change with respect to Service Worker
registration map (Requested by dydz on #webkit).
Reverted changeset:
"Reduce size of WebCore::URL"
https://bugs.webkit.org/show_bug.cgi?id=186820
https://trac.webkit.org/changeset/233742
2018-07-11 Aditya Keerthi <akeerthi@apple.com>
REGRESSION (231276): Attempting to copy an image fails
https://bugs.webkit.org/show_bug.cgi?id=187212
Reviewed by Ryosuke Niwa.
<rdar://problem/41540074>
Augmented test to include a URL where the lastPathComponent looks similar to a
file URL.
* TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.html:
* TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm:
(TestWebKitAPI::TEST):
2018-07-11 Alex Christensen <achristensen@webkit.org>
Add SPI for immediate injection of user scripts
https://bugs.webkit.org/show_bug.cgi?id=173342
<rdar://problem/29202285>
Reviewed by Brady Eidson, Youenn Fablet, and Geoff Garen.
* TestWebKitAPI/Tests/WebKit2Cocoa/UserContentController.mm:
(waitForMessage):
(TEST):
2018-07-11 Myles C. Maxfield <mmaxfield@apple.com>
Move WHLSL spec work to the W3C GPUWeb GitHub repository
See https://github.com/gpuweb/WHLSL
* WebGPUShadingLanguageRI/SpecWork/Makefile: Removed.
* WebGPUShadingLanguageRI/SpecWork/WSL.g4: Removed.
* WebGPUShadingLanguageRI/SpecWork/WSL.ott: Removed.
* WebGPUShadingLanguageRI/SpecWork/source/conf.py: Removed.
* WebGPUShadingLanguageRI/SpecWork/source/index.rst: Removed.
2018-07-11 Dean Jackson <dino@apple.com>
Force WKTR to use the light appearance
https://bugs.webkit.org/show_bug.cgi?id=187572
<rdar://problem/42097805>
Reviewed by Simon Fraser.
Set the NSAppearance on the NSWindow to light mode.
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView): Use the Aqua appearance.
2018-07-11 Alex Christensen <achristensen@webkit.org>
Reduce size of WebCore::URL
https://bugs.webkit.org/show_bug.cgi?id=186820
Reviewed by Yusuke Suzuki.
* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):
2018-07-11 Youenn Fablet <youenn@apple.com>
Fix remaining Cross-Origin-Resource-Policy failures, if any
https://bugs.webkit.org/show_bug.cgi?id=186761
<rdar://problem/41209829>
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp:
(TestWebKitAPI::TEST):
2018-07-11 Aakash Jain <aakash_jain@apple.com>
[ews-build] EWS should unapply the patch and build ToT when patch fails to build
https://bugs.webkit.org/show_bug.cgi?id=187358
Reviewed by Alexey Proskuryakov.
* BuildSlaveSupport/ews-build/factories.py:
(BuildFactory.__init__):
* BuildSlaveSupport/ews-build/steps.py:
(CompileWebKit): Set haltOnFailure to false so as to run next steps (e.g.: un-apply patch, compile ToT).
(CompileWebKit.evaluateCommand): Set patchFailedToBuild property.
(CompileWebKitToT): Build ToT without patch.
(CompileWebKitToT.doStepIf): Run this step only if patch failed to build.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests. Also lower-cased Release and Debug.
2018-07-11 Robin Morisset <rmorisset@apple.com>
[WSL] WIP, more of the spec
https://bugs.webkit.org/show_bug.cgi?id=186310
Rubberstamped by Filip Pizlo.
Fixed a few issues with the formal rules (such as adding the restrictions on pointers for compilation to SpirV),
and started writing some of the english in the spec.
* WebGPUShadingLanguageRI/SpecWork/WSL.ott:
* WebGPUShadingLanguageRI/SpecWork/source/index.rst:
2018-07-10 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add build step to UnApply patch
https://bugs.webkit.org/show_bug.cgi?id=187357
Reviewed by Alexey Proskuryakov.
* BuildSlaveSupport/ews-build/steps.py:
(UnApplyPatchIfRequired.__init__): Pass alwaysUseLatest parameter in order to unapply the patch.
(UnApplyPatchIfRequired.doStepIf): Run this step only if patch failed to build or failed test. These
properties will be set by build-steps for build and test.
(UnApplyPatchIfRequired.hideStepIf): Hide this step if it is not run.
2018-07-10 Dewei Zhu <dewei_zhu@apple.com>
Update ARES-6.patch file accordingly for r233631.
https://bugs.webkit.org/show_bug.cgi?id=187534
Reviewed by Saam Barati.
Update ARES-6.patch file acoordingly after ARES-6 plan file change to
avoid warning while applying the patch.
* Scripts/webkitpy/benchmark_runner/data/patches/webserver/ARES-6.patch:
2018-07-10 Tim Horton <timothy_horton@apple.com>
doAfterNextPresentationUpdate should not be called while content is hidden due to animated resize
https://bugs.webkit.org/show_bug.cgi?id=187500
<rdar://problem/41294139>
Reviewed by Simon Fraser.
* TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
(-[AnimatedResizeWebView _endAnimatedResize]):
Set didEndAnimatedResize before calling super, because it makes the
new test easier and doesn't affect any of the existing ones.
(AnimatedResizeBlocksViewportFitChanges):
This doAfterNextPresentationUpdate is always called during animated resize,
and then synchronously waited for, so it /must/ use
_doAfterNextPresentationUpdateWithoutWaitingForAnimatedResizeWithTesting.
(AnimatedResizeBlocksDoAfterNextPresentationUpdate):
Add a test ensuring that doAfterNextPresentationUpdate is deferred
until endAnimatedResize is called.
* TestWebKitAPI/cocoa/TestNavigationDelegate.mm:
(-[WKWebView _test_waitForDidFinishNavigation]):
_test_waitForDidFinishNavigation is sometimes called during animated resize,
and synchronously waits for a doAfterNextPresentationUpdate, so
it cannot wait for the animated resize to complete.
2018-07-10 Fujii Hironori <Hironori.Fujii@sony.com>
[GTK][WPE] TestWTF and TestJSC fail to compile due to missing forwarding headers
https://bugs.webkit.org/show_bug.cgi?id=184441
Reviewed by Michael Catanzaro.
All executables of TestWebKitAPI need the forwarding headers of
WebCore and PAL because config.h includes
<WebCore/PlatformExportMacros.h> and <pal/ExportMacros.h>.
The forwarding headers of WebCore are generated by
generate-forwarding-headers.pl in GTK and WPE ports. The
forwarding headers of PAL are generated by
WEBKIT_MAKE_FORWARDING_HEADERS in all CMake ports.
* TestWebKitAPI/PlatformGTK.cmake: Added PALForwardingHeaders to
ForwardingHeadersForTestWebKitAPI_NAME. Added dependencies of
${ForwardingHeadersForTestWebKitAPI_NAME} to TestJSC.
* TestWebKitAPI/PlatformWPE.cmake: Ditto.
2018-07-10 Stephan Szabo <stephan.szabo@sony.com>
[WinCairo] Support display of webinspector ui on non-legacy minibrowser
https://bugs.webkit.org/show_bug.cgi?id=187415
Reviewed by Brian Burg.
* MiniBrowser/win/WebKitBrowserWindow.cpp:
(WebKitBrowserWindow::WebKitBrowserWindow):
2018-07-10 John Wilander <wilander@apple.com>
Resource Load Statistics: Make testRunner.statisticsResetToConsistentState() take a completion handler
https://bugs.webkit.org/show_bug.cgi?id=187499
<rdar://problem/41999431>
Reviewed by Chris Dumez.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::statisticsResetToConsistentState):
(WTR::TestRunner::statisticsCallDidResetToConsistentStateCallback):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::statisticsResetToConsistentState):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didResetStatisticsToConsistentState):
* WebKitTestRunner/TestInvocation.h:
2018-07-10 Ryosuke Niwa <rniwa@webkit.org>
Disable cross-origin-window-policy by default
https://bugs.webkit.org/show_bug.cgi?id=187509
Reviewed by Chris Dumez.
Enable the feature for testing purposes. DumpRenderTree does this already in enableExperimentalFeatures.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
2018-07-10 Thibault Saunier <tsaunier@igalia.com>
[Flatpak] Feature options to build-webkit and --makeargs are not passed inside the sandbox
https://bugs.webkit.org/show_bug.cgi?id=187470
Reviewed by Philippe Normand.
Never force building, the user is responsible to make that decision and the workflow is
now based on external scripts so it doesn't make sense anymore. Doing that leads
to ignoring the options the user passed in.
* flatpak/flatpakutils.py:
(WebkitFlatpak.setup_dev_env):
2018-07-10 Thibault Saunier <tsaunier@igalia.com>
[Flatpak] Fix running wpt tests inside flatpak
https://bugs.webkit.org/show_bug.cgi?id=187490
Reviewed by Philippe Normand.
Still not *all* passing but a big majority do.
* Scripts/webkitpy/w3c/wpt_runner.py:
(main): Generate the /etc/hosts and mount it in flatpak as required.
(WPTRunner.prepare_wpt_checkout): Renamed as we need to first checkout WPT code before generating /etc/hosts.
(WPTRunner._prepare_wpt_checkout): Deleted.
* flatpak/flatpakutils.py: Added a stdout= argument to run_in_sandbox() and
added a way to pass extra env to flatpak itself (so we can mount /etc/hosts).
Stopped passing `--device=all` as it is not required since r233638 (Bug 187400).
* flatpak/org.webkit.WebKit.yaml: Added virtualenv for python2 as required by wpt.
2018-07-10 Thibault Saunier <tsaunier@igalia.com>
[Flatpak] Use logging to print debug information
https://bugs.webkit.org/show_bug.cgi?id=187496
Reviewed by Philippe Normand.
* flatpak/flatpakutils.py:
(WebkitFlatpak.load_from_args):
(WebkitFlatpak.clean_args):
(WebkitFlatpak.run_in_sandbox):
2018-07-09 Timothy Hatcher <timothy@apple.com>
Semantic colors don't update when accessibility Increase Contrast mode is enabled.
https://bugs.webkit.org/show_bug.cgi?id=187425
rdar://problem/39948240
rdar://problem/41796865
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm:
(TestWebKitAPI.WebKit.LinkColorWithSystemAppearance): Use new color value.
2018-07-09 Simon Fraser <simon.fraser@apple.com>
Fix dump-class-layout to show bit padding, and fix issues with padding offsets
https://bugs.webkit.org/show_bug.cgi?id=187442
Reviewed by Daniel Bates.
Synthetic padding members were shown with the wrong offset because they used the
absolute offset rather than the class-relative offset. This didn't change the padding
math, but made the output confusing.
Also add support for showing empty bits in bitfields, and fix computation of padding
after bitfields. Empty bits are computed by inserting a bit padding member after
a bitfield that is not followed by another bitfield (making the assumption that bit
padding will fill to the next byte boundary).
The computation of padding after bitfields was also wrong, since lldb's member_type.GetByteSize()
just reports the size of the type without the bitfield modifier (e.g. for "unsigned : 2" it returned 4).
Fix by setting the byte size for bitfield fields to the number of bits rounded up to the next byte;
this allows byte padding following the bitfield to be computed correctly.
Add or modify test to cover these issues.
* lldb/dump_class_layout_unittest.py:
(serial_test_ClassWithPaddedBitfields):
(serial_test_MemberHasBitfieldPadding):
(serial_test_InheritsFromClassWithPaddedBitfields):
* lldb/lldbWebKitTester/DumpClassLayoutTesting.cpp:
(avoidClassDeadStripping):
* lldb/lldb_dump_class_layout.py:
(ClassLayoutBase):
(ClassLayoutBase._to_string_recursive):
(ClassLayout._parse):
(ClassLayout._compute_padding_recursive):
2018-07-09 Youenn Fablet <youenn@apple.com>
StringView operator==(char*) should check the length of the string
https://bugs.webkit.org/show_bug.cgi?id=187422
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WTF/StringView.cpp:
(TestWebKitAPI::equal2):
(TestWebKitAPI::TEST):
2018-07-09 Ross Kirsling <rkirsling@gmail.com>
[WinCairo] httpd service install needs to precede server start
https://bugs.webkit.org/show_bug.cgi?id=187283
Reviewed by Daniel Bates.
* Scripts/webkitpy/port/base.py:
(Port.check_build):
Remove unused parameter `needs_http`.
(Port.check_sys_deps):
(Port.start_http_server):
Move `check_httpd` call.
* Scripts/webkitpy/port/win.py:
(WinPort.check_httpd): Added.
(WinCairoPort.check_httpd): Deleted.
Move `httpd -k install` logic to common Windows location.
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._set_up_run):
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
* Scripts/webkitpy/port/gtk.py:
(GtkPort.check_sys_deps):
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort.check_sys_deps):
* Scripts/webkitpy/port/mock_drt.py:
(MockDRTPort.check_build):
(MockDRTPort.check_sys_deps):
* Scripts/webkitpy/port/port_testcase.py:
(PortTestCase.integration_test_check_sys_deps):
(test_check_build):
* Scripts/webkitpy/port/test.py:
* Scripts/webkitpy/port/wpe.py:
(WPEPort.check_sys_deps):
* Scripts/webkitpy/tool/commands/perfalizer.py:
(PerfalizerTask.run):
Remove `needs_http` arguments.
2018-07-09 Philippe Normand <pnormand@igalia.com>
[Flatpak] Unreviewed, switch to https for the gst-libav tarball.
* flatpak/org.webkit.WebKit.yaml:
2018-07-09 Thibault Saunier <tsaunier@igalia.com>
[Flatpak] HTTP layout tests broken due to missing CGI.pm in the sandbox
https://bugs.webkit.org/show_bug.cgi?id=187384
Reviewed by Philippe Normand.
And make it usable inside the sandbox even when
perl is launched "tainted" (as the PERL5LIB won't
work otherwise).
* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox):
* flatpak/org.webkit.WebKit.yaml:
2018-07-09 Thibault Saunier <tsaunier@igalia.com>
[WPE][GTK] Mount /dev/shm on /run/shm in sandbox
https://bugs.webkit.org/show_bug.cgi?id=187400
Reviewed by Philippe Normand.
This is where it is expected to be when it is a symlink,
without mounting it the websocket python server can't work
inside the sandbox.
* flatpak/flatpakutils.py:
(WebkitFlatpak.run_in_sandbox):
2018-07-08 Filip Pizlo <fpizlo@apple.com>
run-benchmark should run ARES-6 1.0.1
https://bugs.webkit.org/show_bug.cgi?id=187452
Reviewed by Sam Weinig.
We forgot to update this when we released 1.0.1!
* Scripts/webkitpy/benchmark_runner/data/plans/ares6.plan:
2018-07-07 Youenn Fablet <youenn@apple.com>
WPT importer should create dummy HTML files for *.window.js script files
https://bugs.webkit.org/show_bug.cgi?id=187426
Reviewed by Ryosuke Niwa.
Some WPT tests use *.window.js tests, which should be accessed as *.window.html.
Do the same strategy as done for worker.js/any.js files.
* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.write_html_files_for_templated_js_tests):
2018-07-07 Wenson Hsieh <wenson_hsieh@apple.com>
Introduce a layout milestone to track when the document contains a large number of rendered characters
https://bugs.webkit.org/show_bug.cgi?id=187412
<rdar://problem/41744338>
Reviewed by Ryosuke Niwa.
Add a new API test to check that we observe the new rendering milestone in an article-like document.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/significant-text-milestone.html: Added.
* TestWebKitAPI/Tests/ios/RenderingProgressTests.mm:
(TEST):
2018-06-30 Simon Fraser <simon.fraser@apple.com>
dump-class-layout reports wrong padding in many cases
https://bugs.webkit.org/show_bug.cgi?id=185801
Reviewed by Dan Bates.
Enhance dump-class-layout, fixing bugs and adding unit tests. This also includes
the patch from bug 187141.
Move the code that uses lldb to fetch the class layout to its own module,
lldb_dump_class_layout.py, so it can be unit tested. Change this code
to build up a data structure for the class. This is necessary since correct
padding computation is easier with second traversal over the data structure.
Try to deal with the empty base class optimization, which is necessary to report
correct padding in classes using std::unique_ptr, and correctly handle virtual base classes.
The ClassLayoutBase class knows how to test for equality and generate a string
or string list representation of itself. The derived ClassLayout class knows
how to build up the class layout using the lldb Python bindings.
Finally we wrap the lldb debugger instance in LLDBDebuggerInstance so that we don't
have to make a new one for each unit test. The tests have to run serially.
Add to lldbWebKitTester a .cpp file that contains a set of C++ classes to unit-test
dump-class-layout.
* Scripts/dump-class-layout:
(main):
* lldb/dump_class_layout_unittest.py:
(destroy_cached_debug_session):
(TestDumpClassLayout):
(TestDumpClassLayout.setUpClass):
(TestDumpClassLayout.setUp):
(TestDumpClassLayout.serial_test_BasicClassLayout):
(serial_test_PaddingBetweenClassMembers):
(serial_test_BoolPaddingClass):
(serial_test_ClassWithEmptyClassMembers):
(serial_test_SimpleVirtualClass):
(serial_test_SimpleVirtualClassWithNonVirtualBase):
(serial_test_InterleavedVirtualNonVirtual):
(serial_test_ClassWithTwoVirtualBaseClasses):
(serial_test_ClassWithClassMembers):
(serial_test_ClassWithBitfields):
(serial_test_ClassWithUniquePtrs):
(serial_test_ClassWithOptionals):
(TestDumpClassLayout.test_BasicClassLayout): Deleted.
* lldb/lldbWebKitTester/DumpClassLayoutTesting.cpp:
(EmptyClass::doStuff):
(VirtualBaseClass::~VirtualBaseClass):
(VirtualBaseClass2::~VirtualBaseClass2):
(SimpleVirtualClass::~SimpleVirtualClass):
(SimpleVirtualClass::doStuff):
(SimpleVirtualClassWithNonVirtualBase::~SimpleVirtualClassWithNonVirtualBase):
(SimpleVirtualClassWithNonVirtualBase::doStuff):
(avoidClassDeadStripping):
* lldb/lldb_dump_class_layout.py:
(ansi_colors):
(ClassLayoutBase):
(ClassLayoutBase.__init__):
(ClassLayoutBase.__ne__):
(ClassLayoutBase.__eq__):
(ClassLayoutBase._to_string_recursive):
(ClassLayoutBase.as_string_list):
(ClassLayoutBase.as_string):
(ClassLayoutBase.dump):
(ClassLayoutExpected):
(ClassLayoutExpected.__init__):
(ClassLayout):
(ClassLayout.__init__):
(ClassLayout._has_polymorphic_base_class):
(ClassLayout._parse):
(ClassLayout._probably_has_empty_base_class_optimization):
(ClassLayout._compute_padding_recursive):
(ClassLayout._compute_padding):
(LLDBDebuggerInstance):
(LLDBDebuggerInstance.__init__):
(LLDBDebuggerInstance.__del__):
(LLDBDebuggerInstance._get_first_file_architecture):
(LLDBDebuggerInstance.layout_for_classname):
(ClassLayoutDumper): Deleted.
(ClassLayoutDumper.__init__): Deleted.
(ClassLayoutDumper._get_first_file_architecture): Deleted.
(ClassLayoutDumper.verify_type): Deleted.
(ClassLayoutDumper.verify_type_recursive): Deleted.
(ClassLayoutDumper._class_layout_as_string): Deleted.
(ClassLayoutDumper.dump_to_string): Deleted.
(ClassLayoutDumper.dump): Deleted.
2018-07-06 Christopher Reid <chris.reid@sony.com>
[WinCairo] WebKit MiniBrowser crashes when attempting to navigate to certain URLs
https://bugs.webkit.org/show_bug.cgi?id=187167
Reviewed by Alex Christensen.
A null byte was written past the end of the buffer causing the crash.
Some of the heap allocated buffers were also not getting deleted.
* MiniBrowser/win/WebKitBrowserWindow.cpp:
2018-07-06 Thibault Saunier <tsaunier@igalia.com>
[WPE][GTK] Build php zlib plugin and enable sockets in flatpak
https://bugs.webkit.org/show_bug.cgi?id=187401
Reviewed by Philippe Normand.
* flatpak/org.webkit.WebKit.yaml:
2018-07-06 Aakash Jain <aakash_jain@apple.com>
[ews-build] EWS should run javascriptcore tests
https://bugs.webkit.org/show_bug.cgi?id=187365
Reviewed by David Kilzer.
* BuildSlaveSupport/ews-build/steps.py: Added step to run JavaScriptCoreTests.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
* BuildSlaveSupport/ews-build/factories.py:
2018-07-06 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] REGRESSION(r233111): Test /webkit/WebKitUserContentManager/script-message-received fails
https://bugs.webkit.org/show_bug.cgi?id=187383
Reviewed by Žan Doberšek.
This is actually a problem in the test itself. The problem is that we run js, connect to message-received and
quite the main loop when the message is received, which happens before the run js operation has been
completed. The test finishes early and since r233111 an IPC message is still pending (I guess the run js
callback) and the web page is still protected. Just adding a run loop operation before finishing the test would
fix it. We should wait for the js run to complete, instead of the message.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitUserContentManager.cpp:
(UserScriptMessageTest::scriptMessageReceived):
(UserScriptMessageTest::waitUntilMessageReceived):
(UserScriptMessageTest::runJavaScriptFinished):
(UserScriptMessageTest::postMessageAndWaitUntilReceived):
2018-07-05 Youenn Fablet <youenn@apple.com>
REGRESSION (r230843): Flash doesn't work; Produces blue box on page
https://bugs.webkit.org/show_bug.cgi?id=187346
<rdar://problem/41773974>
Reviewed by Ryosuke Niwa.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::setBlockAllPlugins):
When not blocked, set the load policy to allow once.
* WebKitTestRunner/TestController.h:
2018-07-05 Aakash Jain <aakash_jain@apple.com>
[ews-build] Bindings-tests-EWS should output result in json
https://bugs.webkit.org/show_bug.cgi?id=187330
Reviewed by David Kilzer.
* BuildSlaveSupport/ews-build/steps.py:
(RunBindingsTests): Passed --json-output parameter to run-bindings-tests.
* BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
2018-07-05 Aakash Jain <aakash_jain@apple.com>
[ews-build] WebKitPy-Tests-EWS should output result in json
https://bugs.webkit.org/show_bug.cgi?id=187331
Follow-up fix to r233527. Extracting jsonFileName as a variable and re-using it.
2018-07-05 Aakash Jain <aakash_jain@apple.com>
[ews-build] WebKitPy-Tests-EWS should output result in json
https://bugs.webkit.org/show_bug.cgi?id=187331
Reviewed by David Kilzer.
* BuildSlaveSupport/ews-build/steps.py:
(RunWebKitPyTests): Passed --json-output parameter to test-webkitpy.
* BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
2018-07-05 Philippe Normand <pnormand@igalia.com>
[Flatpak] Add gst-libav to dependencies
https://bugs.webkit.org/show_bug.cgi?id=187340
Reviewed by Žan Doberšek.
* flatpak/org.webkit.WebKit.yaml: Use tarballs instead of git
clones because the FFMPeg git server doesn't support shallow
clones.
2018-07-05 Thibault Saunier <tsaunier@igalia.com>
[WPE][GTK]: Call gtk platform 'gtk' by default as this is what PortFactory expects
https://bugs.webkit.org/show_bug.cgi?id=187322
Reviewed by Žan Doberšek.
* flatpak/flatpakutils.py:
(WebkitFlatpak.__init__):
2018-07-05 Zan Dobersek <zdobersek@igalia.com>
Unreviewed, rolling out r233511.
Proper fix provided in bug #187322
Reverted changeset:
"Unreviewed. Fixing a call in flatpakutils.py to
PortFactory.get(),"
https://trac.webkit.org/changeset/233511
2018-07-04 Zan Dobersek <zdobersek@igalia.com>
Unreviewed. Fixing a call in flatpakutils.py to PortFactory.get(),
enforcing the passed platform argument to always be lowercase, as is
expected from the PortFactory code.
* flatpak/flatpakutils.py:
(WebkitFlatpak.clean_args):
2018-07-04 Tim Horton <timothy_horton@apple.com>
Introduce PLATFORM(IOSMAC)
https://bugs.webkit.org/show_bug.cgi?id=187315
Reviewed by Dan Bernstein.
* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-07-03 Brady Eidson <beidson@apple.com>
WebKit.ResponsivenessTimerCrash sometimes fails.
https://bugs.webkit.org/show_bug.cgi?id=187314
Reviewed by Tim Horton.
Actually unregister observers from objects we're about to destroy before destroying them.
* TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm:
(-[ResponsivenessTimerObserver observeValueForKeyPath:ofObject:change:context:]):
2018-07-03 Fujii Hironori <Hironori.Fujii@sony.com>
update-webkitgtk-flatpak fails if running with python2
https://bugs.webkit.org/show_bug.cgi?id=187240
Reviewed by Michael Catanzaro.
urllib.urlretrieve of Python2 sends invalid requests. Use
urllib2.urlopen instead.
* flatpak/flatpakutils.py: Import urllib2.urlopen for Python2,
urllib.request.urlopen for Python3.
(FlatpakRepo.repo_file): Copy the content of urlopen result to the
temporary file.
2018-07-03 Chris Dumez <cdumez@apple.com>
Make CallbackMap::invalidate() safe to re-enter
https://bugs.webkit.org/show_bug.cgi?id=187298
<rdar://problem/41057167>
Reviewed by Geoffrey Garen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
(TEST):
2018-07-03 Chris Dumez <cdumez@apple.com>
[Cocoa] Disable vnode guard related simulated crashes for WKTR / DRT and WebSQL
https://bugs.webkit.org/show_bug.cgi?id=187270
<rdar://problem/40674034>
Reviewed by Geoffrey Garen.
Disable vnode guard related simulated crashes for WKTR / DRT by setting the
expected environment variable in the test driver.
* Scripts/webkitpy/port/driver.py:
(Driver._setup_environ_for_driver):
2018-07-03 Eric Carlson <eric.carlson@apple.com>
Video sometimes flickers when playing to AppleTV
https://bugs.webkit.org/show_bug.cgi?id=187193
<rdar://problem/40153865>
Unreviewed, fix test broken by r233435.
* TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:
(TestWebKitAPI::waitUntilAudioSessionCategoryIsEqualTo): Poll for a change in audio session
category because it doesn't necessarily happen synchronously.
(TestWebKitAPI::TEST):
2018-07-03 Thibault Saunier <tsaunier@igalia.com>
Unreviewed, add myself as a WebKit committer.
And canonicalize the file as suggested by `check-webkit-style`
* Scripts/webkitpy/common/config/contributors.json:
2018-07-03 Basuke Suzuki <Basuke.Suzuki@sony.com>
check-webkit-style: Run the tool without SVN client.
https://bugs.webkit.org/show_bug.cgi?id=187294
Reviewed by Daniel Bates.
When invoking check-webkit-style without SVN client, the exception was raised and terminated.
Using Git repository is acceptable workflow according to the wording on:
<https://webkit.org/getting-the-code/#checking-out-with-git>
and using Subversion is considered optional by following link:
<https://webkit.org/webkit-on-windows/#installing-developer-tools>.
This patch makes it so that people with only a Git checkout of WebKit that commit using
the commit-queue (or another machine with an SVN checkout) can run check-webkit-style.
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVN.in_working_directory):
2018-07-03 Aakash Jain <aakash_jain@apple.com>
Remove old JSCTestsFactory
Follow-up fix to r233471.
2018-07-03 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add support for JSC-Tests-EWS
https://bugs.webkit.org/show_bug.cgi?id=187201
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/factories.py:
(JSCTestsFactory): Added JSCTestsFactory.
* BuildSlaveSupport/ews-build/steps.py:
(CompileJSCOnly): Command to compile JSC.
* BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
* BuildSlaveSupport/ews-build/config.json: Changed platform to jsc-only. This matches with build.webkit.org configuration.
2018-07-03 Zalan Bujtas <zalan@apple.com>
[LFC] Add test-list file for regression testing
https://bugs.webkit.org/show_bug.cgi?id=187296
Reviewed by Antti Koivisto.
run-webkit-tests --test-list=./Tools/LayoutReloaded/misc/LFC-passing-tests.txt
* LayoutReloaded/misc/LFC-passing-tests.txt: Added.
2018-07-03 John Wilander <wilander@apple.com>
Resource Load Statistics: Make WebsiteDataStore::getAllStorageAccessEntries() call the right network process instead of iterating over the process pools
https://bugs.webkit.org/show_bug.cgi?id=187277
<rdar://problem/41745510>
Reviewed by Chris Dumez.
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::getAllStorageAccessEntries):
2018-07-02 Wenson Hsieh <wenson_hsieh@apple.com>
Fix a leak in ActionSheetTests.DismissingActionSheetShouldNotDismissPresentingViewController
https://bugs.webkit.org/show_bug.cgi?id=187280
Reviewed by Tim Horton.
Add a missing `adoptNS()`.
* TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
(TestWebKitAPI::TEST):
2018-07-02 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Google Fonts doesn't work if the user has the requested font locally-installed
https://bugs.webkit.org/show_bug.cgi?id=187228
<rdar://problem/40967280>
Reviewed by Brent Fulgham.
The test only fails before the patch if the lookup for Helvetica2 is allowed to occur.
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::allowedFontFamilySet):
2018-07-02 Ryosuke Niwa <rniwa@webkit.org>
run-benchmark should include the version number of MotionMark's results
https://bugs.webkit.org/show_bug.cgi?id=187274
Reviewed by Jon Lee.
Append the version number as a part of the suite name.
* Scripts/webkitpy/benchmark_runner/data/patches/webserver/MotionMark.patch:
2018-07-02 Wenson Hsieh <wenson_hsieh@apple.com>
[WK1] editing/spelling/markers.html is failing on recent builds of macOS Mojave
https://bugs.webkit.org/show_bug.cgi?id=187253
Reviewed by Tim Horton.
Enhances and refactors LayoutTestSpellChecker, which was introduced in r233412.
* DumpRenderTree/TestRunner.cpp:
(setSpellCheckerResultsCallback):
Rename setSpellCheckerTextReplacements to setSpellCheckerResults.
(TestRunner::staticFunctions):
(setSpellCheckerTextReplacementsCallback): Deleted.
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setSpellCheckerResults):
(TestRunner::setSpellCheckerTextReplacements): Deleted.
* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::setSpellCheckerResults):
(TestRunner::setSpellCheckerTextReplacements): Deleted.
* TestRunnerShared/cocoa/LayoutTestSpellChecker.h:
* TestRunnerShared/cocoa/LayoutTestSpellChecker.mm:
(-[LayoutTestTextCheckingResult initWithType:range:replacement:details:]):
(-[LayoutTestTextCheckingResult grammarDetails]):
(-[LayoutTestSpellChecker reset]):
(-[LayoutTestSpellChecker results]):
(-[LayoutTestSpellChecker setResults:]):
(-[LayoutTestSpellChecker setResultsFromJSObject:inContext:]):
Add support for passing in a list of grammar correction detail ranges. Necessary for simulating grammar errors.
(-[LayoutTestSpellChecker checkString:range:types:options:inSpellDocumentWithTag:orthography:wordCount:]):
Tweaked to always call the superclass method. This ensures that we set the `orthography` and `wordCount`
outpointers if applicable.
(-[LayoutTestSpellChecker requestCheckingOfString:range:types:options:inSpellDocumentWithTag:completionHandler:]):
Added support for simulating asynchronous spell checking.
(-[LayoutTestTextCheckingResult initWithType:range:replacement:]): Deleted.
(-[LayoutTestSpellChecker replacements]): Deleted.
(-[LayoutTestSpellChecker setReplacements:]): Deleted.
(-[LayoutTestSpellChecker setReplacementsFromJSObject:inContext:]): Deleted.
2018-07-02 Brady Eidson <beidson@apple.com>
Another unreviewed followup to:
Crash notifying observers of responsiveness state change
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView typeCharacter:]): Move this back to the Mac-only category, as we won't be running this
test on iOS for other reasons.
2018-07-02 Brady Eidson <beidson@apple.com>
Unreviewed followup to:
Crash notifying observers of responsiveness state change
* TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm: Need the C-SPI for this test.
2018-07-02 Brady Eidson <beidson@apple.com>
Crash notifying observers of responsiveness state change
<rdar://problem/41267796> and https://bugs.webkit.org/show_bug.cgi?id=187262
Reviewed by Tim Horton.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/ResponsivenessTimerCrash.mm: Added.
(-[RTObserver observeValueForKeyPath:ofObject:change:context:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView typeCharacter:]):
(-[TestWKWebView hostWindow]):
2018-07-02 Michael Catanzaro <mcatanzaro@igalia.com>
[WPE][GTK] flatpakutils.py should respect set-webkit-configuration build type
https://bugs.webkit.org/show_bug.cgi?id=187218
Reviewed by Philippe Normand.
Using the webkitpy Config module, if the build type is not passed on the command line, we
read it from WebKitBuild/Configuration and respect it.
* flatpak/flatpakutils.py:
(WebkitFlatpak.__init__):
(WebkitFlatpak.clean_args):
2018-07-02 Zan Dobersek <zdobersek@igalia.com>
[WPE] Add touch support to WindowViewBackend
https://bugs.webkit.org/show_bug.cgi?id=187245
Reviewed by Carlos Garcia Campos.
Add touch input support to the WindowViewBackend implementation,
plugging into the Wayland protocol in order to get properly notified
about these events, and then dispatching them against the appropriate
wpe_view_backend object so that WebKit can process them.
* wpe/backends/ViewBackend.cpp:
(WPEToolingBackends::ViewBackend::dispatchInputTouchEvent):
* wpe/backends/ViewBackend.h:
* wpe/backends/WindowViewBackend.cpp:
* wpe/backends/WindowViewBackend.h:
2018-07-02 Rob Buis <rbuis@igalia.com>
[GTK] ASSERTION FAILED: url == m_string in UserAgentQuirks test
https://bugs.webkit.org/show_bug.cgi?id=186838
This URL constructor expects canonicalized input, so fix the passed URL. I missed
this one some weeks ago since I had an older checkout.
Reviewed by Michael Catanzaro.
* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::TEST):
2018-07-01 Wenson Hsieh <wenson_hsieh@apple.com>
[macOS] Text replacements that end with symbols are expanded immediately
https://bugs.webkit.org/show_bug.cgi?id=187225
<rdar://problem/41112433>
Reviewed by Darin Adler.
Adds testing support for mocking NSSpellChecker's text checking results. See below for more details, and the new
layout test for an example of its usage.
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/TestRunner.cpp:
(setSpellCheckerTextReplacementsCallback):
Add bindings support in TestRunner to specify a set of text replacement mappings. Each entry in the dictionary
maps a string representing an input to the NSSpellChecker to some information describing the spell checking
result that LayoutTestSpellChecker will return.
(TestRunner::staticFunctions):
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetWebViewToConsistentStateBeforeTesting):
Restore the original shared NSSpellchecker before transitioning to the next layout test, if needed.
* DumpRenderTree/mac/DumpRenderTreeSpellChecker.mm: Removed.
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setSpellCheckerLoggingEnabled):
(TestRunner::setSpellCheckerTextReplacements):
These testRunner methods ensure that `-[NSSpellChecker sharedSpellChecker]` is swizzled to return our mock
LayoutTestSpellChecker instance before calling into it.
* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::setSpellCheckerTextReplacements):
* TestRunnerShared/cocoa/LayoutTestSpellChecker.h: Renamed from Tools/DumpRenderTree/mac/DumpRenderTreeSpellChecker.h.
* TestRunnerShared/cocoa/LayoutTestSpellChecker.mm: Added.
Moved DumpRenderTreeSpellChecker to LayoutTestSpellChecker, and made it compile for both WebKitTestRunner
(modern WebKit) and DumpRenderTree (legacy WebKit) by putting it in TestRunnerShared.
(existingGlobalLayoutTestSpellChecker):
(ensureGlobalLayoutTestSpellChecker):
(stringForCorrectionResponse):
(nsTextCheckingType):
(-[LayoutTestTextCheckingResult initWithType:range:replacement:]):
(-[LayoutTestTextCheckingResult range]):
(-[LayoutTestTextCheckingResult resultType]):
(-[LayoutTestTextCheckingResult replacementString]):
(-[LayoutTestTextCheckingResult description]):
LayoutTestTextCheckingResult represents a fake NSTextCheckingResult containing spell checking results supplied
by the layout test.
(+[LayoutTestSpellChecker installIfNecessary]):
(+[LayoutTestSpellChecker uninstallAndReset]):
Helper methods to begin and end swizzling the shared NSSpellChecker.
(-[LayoutTestSpellChecker reset]):
Resets the state of the LayoutTestSpellChecker (this entails clearing the fake replacements dictionary and
turning off logging for recorded spellchecking responses).
(-[LayoutTestSpellChecker replacements]):
(-[LayoutTestSpellChecker setReplacements:]):
(-[LayoutTestSpellChecker setReplacementsFromJSObject:inContext:]):
Helper method to take a `JSObjectRef` supplied by the test runner and transform it into a map of spell checking
string inputs to LayoutTestTextCheckingResults.
(-[LayoutTestSpellChecker checkString:range:types:options:inSpellDocumentWithTag:orthography:wordCount:]):
Consult the text replacement map and bail early if a match is found, before calling into real NSSpellChecker
logic to perform spellchecking.
(-[LayoutTestSpellChecker recordResponse:toCorrection:forWord:language:inSpellDocumentWithTag:]):
Reimplement the original functionality in DumpRenderTreeSpellChecker to make `-recordResponse:…` print to stdout
by overriding the method and printing if the `-spellCheckerLoggingEnabled` property has been set to YES.
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
2018-07-01 Thibault Saunier <tsaunier@igalia.com>
[WPE][GTK] Fix retrieving backtrace from within flatpak sandbox in test runner
https://bugs.webkit.org/show_bug.cgi?id=187232
Reviewed by Michael Catanzaro.
The place where host tmp folder is mounted changed to /run/host/ we
need to take that into account.
Also explicitely close temporary files as relying on garbage collection to
remove them is a bad idea.
Also minor optimization avoiding to compile regex for each backtrace
retrieval.
* Scripts/webkitpy/port/linux_get_crash_log.py:
(GDBCrashLogGenerator):
(GDBCrashLogGenerator._get_tmp_file_name):
(GDBCrashLogGenerator._get_trace_from_systemd):
2018-06-30 Daniel Bates <dabates@apple.com>
test-webkitpy never rebuilds lldbWebKitTester
https://bugs.webkit.org/show_bug.cgi?id=187229
Reviewed by David Kilzer.
Have test-webkitpy always call script build-lldbwebkittester to build lldbWebKitTester, if needed.
Currently test-webkitpy only calls script build-lldbwebkittester if lldbWebKitTester does not
exist in the build products directory for the active configuration (e.g. Debug); => we do not
build lldbWebKitTester again if its source changes (say, as a result of hacking on lldbWebKitTester).
Instead we should have test-webkitpy unconditionally call build-lldbwebkittester to ensure
that we have an up-to-date build of lldbWebKitTester.
* Scripts/webkitpy/test/main.py:
(Tester._run_tests):
(_find_lldb_webkit_tester): Deleted.
2018-06-30 Michael Catanzaro <mcatanzaro@igalia.com>
[CMake] build-webkit should be able to enable address sanitizer
https://bugs.webkit.org/show_bug.cgi?id=187222
Reviewed by Daniel Bates.
If 'set-webkit-configuration --asan' has been run, then build-webkit should pass
-DENABLE_ADDRESS_SANITIZER=ON to CMake, so that it actually does something.
This also works for build-jsc.
* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject):
2018-06-30 Thibault Saunier <tsaunier@igalia.com>
Make check_flatpak() not verbose when only trying to run command inside flatpak
https://bugs.webkit.org/show_bug.cgi?id=187187
Reviewed by Michael Catanzaro.
* flatpak/flatpakutils.py:
(run_in_sandbox_if_available):
2018-06-29 Daniel Bates <dabates@apple.com>
build-webkit: Perl "use of uninitialized value $previousContents"
https://bugs.webkit.org/show_bug.cgi?id=185776
Reviewed by Michael Catanzaro.
Fixes an issue where reading an empty cached argument file would cause
Perl "uninitialized value" warnings of the form:
Use of uninitialized value $previousContents in chomp at C:/WebKit-BuildWorker/wincairo-wkl-debug/build/Tools/Scripts/webkitdirs.pm line 1969.
Use of uninitialized value $previousContents in string ne at C:/WebKit-BuildWorker/wincairo-wkl-debug/build/Tools/Scripts/webkitdirs.pm line 1972.
* Scripts/webkitdirs.pm:
(isCachedArgumentfileOutOfDate):
2018-06-29 Daniel Bates <dabates@apple.com>
Perl uninitialized value $isEnabled when running build-jsc using a CMake build
https://bugs.webkit.org/show_bug.cgi?id=187208
Reviewed by Tim Horton.
Share logic for computing the feature flags to enable in CMake with both script
build-webkit and script build-jsc instead of duplicating it. This also fixes a
bug in the version of this logic in build-jsc that was inadvertently not updated
in r222394. In r222394 we removed the notion of a default value for a feature flag
listed in webkitperl::FeatureList.
We keep the current behavior of build-jsc and leave it up to the build system
to determine whether to enable or disable ENABLE_EXPERIMENTAL_FEATURES.
* Scripts/build-jsc:
(buildMyProject):
(cMakeArgsFromFeatures): Deleted.
* Scripts/build-webkit:
(cMakeArgsFromFeatures): Deleted; moved to webkitdirs.pm.
* Scripts/webkitdirs.pm:
(cmakeArgsFromFeatures): Moved code from script build-webkit so that it can be shared
with build-jsc.
2018-06-29 Tim Horton <timothy_horton@apple.com>
Add -apple-color-filter and system appearance toggles to MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=187210
Reviewed by Simon Fraser.
* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration):
* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController toggleAppleColorFilterEnabled:]):
(-[SettingsController appleColorFilterEnabled]):
(-[SettingsController toggleUseSystemAppearance:]):
(-[SettingsController useSystemAppearance]):
* MiniBrowser/mac/WK1BrowserWindowController.m:
(-[WK1BrowserWindowController didChangeSettings]):
* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController didChangeSettings]):
2018-06-29 Aditya Keerthi <akeerthi@apple.com>
[macOS] Do not crash if there is an attempt to copy a file URL to the clipboard
https://bugs.webkit.org/show_bug.cgi?id=187183
Reviewed by Wenson Hsieh.
Added a 'runSingly' option to the TestOptions struct. Setting this option to true
will force a new PlatformWebView to be created before running a test. This ensures
that any state set by previous tests are not preserved.
One example of the importance of having this ability is in the case where we want
to test functionality that deals with read access to files. If a test were to
load a valid file URL, universal read access will be granted in WebProcessProxy.
This prevents us from testing cases that rely on us not have universal read
access. Now, if we write the test using the 'runSingly' option, any state set
by previous tests is cleared. Consequently, our test will behave as expected.
* WebKitTestRunner/PlatformWebView.h:
(WTR::PlatformWebView::viewSupportsOptions const):
* WebKitTestRunner/TestController.cpp:
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
2018-06-29 Daniel Bates <dabates@apple.com>
[lldb-webkit] Non-empty strings may be pretty-printed as empty
https://bugs.webkit.org/show_bug.cgi?id=187185
Reviewed by Simon Fraser.
For some reason lldb(1) sometimes has an issue accessing members of WTF::StringImplShape
via a WTF::StringImpl pointer (why?). Explicitly casting a WTF::StringImpl* to a
WTF::StringImplShape* before accessing such members makes LLDB happy.
I tried writing a test for this both for the LLVM project and to add to our lldb_webkit unit
tests to no avail. I have only been able to reproduce this bug sporadically during my WebCore/WebKit
debugging sessions so far.
* lldb/lldb_webkit.py:
(WTFStringImplProvider.__init__): Explicitly cast the WTF::StringImpl* to WTF::StringImplShape*.
(WTFStringImplProvider.get_data8): Update code now that we are directly accessing WTF::StringImplShape*.
(WTFStringImplProvider.get_data16): Ditto.
2018-06-29 Chris Dumez <cdumez@apple.com>
WebKitLegacy: Can trigger recursive loads triggering debug assertions
https://bugs.webkit.org/show_bug.cgi?id=187121
<rdar://problem/41259430>
Reviewed by Brent Fulgham.
Add API test coverage.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/StartLoadInDidFailProvisionalLoad.mm: Added.
(-[StartLoadInDidFailProvisionalLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
(-[StartLoadInDidFailProvisionalLoadDelegate webView:didFinishLoadForFrame:]):
(TestWebKitAPI::TEST):
2018-06-29 Lucas Forschler <lforschler@apple.com>
Teach bisect-builds to retrieve supported platforms from the rest api.
https://bugs.webkit.org/show_bug.cgi?id=187195
This patch updates bisect-builds to use v2_2 of the API. v2_2 adds two api endpoints: /platforms, and /minified-platforms.
These endpoints scan a dynamoDB database, returning the identifier key for all available platforms.
The identifier keys are in the format: platform-architecture-configuration.
Reviewed by Aakash Jain.
* Scripts/bisect-builds:
(get_api_archive_url): refactored from get_api_url.
(get_platforms): helper function to retrieve from the platforms api.
(minified_platforms): returns a list of minified platforms currently in the database
(unminified_platforms): returns a list of unminified platforms currently in the database
(is_supported_platform): checks if the platform-architecture-configuration combo is supported
(fetch_revision_list): refactored to use get_api_archive_url
(get_api_url): Deleted/refactored to get_api_archive_url.
2018-06-29 Keith Miller <keith_miller@apple.com>
run-jsc should print when jsc exits with non-zero status
https://bugs.webkit.org/show_bug.cgi?id=187192
Reviewed by Saam Barati.
* Scripts/run-jsc:
2018-06-29 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add timeout to webkitpy and webkitperl tests
https://bugs.webkit.org/show_bug.cgi?id=187191
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps.py:
(RunWebKitPerlTests.__init__): Set timeout of 2 minutes.
(RunWebKitPyTests.__init__): Ditto.
* BuildSlaveSupport/ews-build/steps_unittest.py: Updated unit-tests.
2018-06-29 Carlos Alberto Lopez Perez <clopez@igalia.com>
[WPE]: Fix exception handling when flatpak is not installed
https://bugs.webkit.org/show_bug.cgi?id=186771
Unreviewed followup-fix after r233362
This was causing failures when flatpak is not installed.
* flatpak/flatpakutils.py:
(check_flatpak):
2018-06-29 Ross Kirsling <ross.kirsling@sony.com>
[JSCOnly] Restore Windows build.
https://bugs.webkit.org/show_bug.cgi?id=187127
Reviewed by Michael Catanzaro.
* Scripts/build-jsc:
Fix condition for disabling FTL JIT on Windows.
* Scripts/webkitdirs.pm:
(executableProductDir):
JSCOnly should still use bin64 on Windows (for consistency with full WebKit build).
(determineIsWin64):
JSCOnly already defaults to 64-bit on Windows with Ninja -- ensure that this is true even with MSBuild.
2018-06-29 Thibault Saunier <tsaunier@igalia.com>
[GTK][WPE]: Add a way to setup our development environment inside flatpak
https://bugs.webkit.org/show_bug.cgi?id=186771
Reviewed by Carlos Alberto Lopez Perez.
This patch introduce a way to setup the development environment inside flatpak[0]
removing the need for jhbuild when doing so. Anything needed to build/run minibrowser/ run
layout tests is provided either but the org.gnome.Sdk runtime or built with flatpak-builder.
The workflow is very similar to the "jhbuild based" one except that you should use update-webkit$PORTNAME-flatpak instead
of update-webkit$PORTNAME-libs and that script requires to specify a build configuration (--release is default).
Our scripts have been updated to be able to run inside that new build environment.
Since everything runs inside a flatpak sandbox, gdb needs to be run from within the sandbox, the script exposes a way to do it
easily with the `--gdb` option:
$ webkit-flatpak --gdb [-m COREDUMPCTL MATCHES]
The Layout test `GDBCrashLogGenerator` has been taugth how to use that and is able to retrieve stacktrace as with the jhbuild based workflow.
[0] http://flatpak.org
* Scripts/build-webkit:
* Scripts/generate-jsc-bundle:
(main):
* Scripts/run-gtk-tests:
* Scripts/run-minibrowser:
* Scripts/run-webdriver-tests:
* Scripts/run-webkit-tests:
* Scripts/run-wpe-tests:
* Scripts/update-webkitgtk-libs:
* Scripts/update-webkitwpe-libs:
* Scripts/webkit-flatpak: Added.
* Scripts/webkitdirs.pm:
(getJhbuildPath):
(getFlatpakPath):
(inFlatpakSandbox):
(runInFlatpak):
(runInFlatpakIfAvalaible):
(wrapperPrefixIfNeeded):
(shouldUseFlatpak):
* Scripts/webkitpy/port/base.py:
(Port._path_to_apache):
(Port._is_flatpak):
(Port._apache_config_file_name_for_platform):
(Port._should_use_flatpak):
(Port):
(Port._in_flatpak_sandbox):
(Port._should_use_jhbuild):
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server):
* Scripts/webkitpy/port/linux_get_crash_log.py:
(GDBCrashLogGenerator._get_trace_from_systemd):
(GDBCrashLogGenerator.generate_crash_log):
* Scripts/webkitpy/port/wpe.py:
(WPEPort.setup_environ_for_server):
* Scripts/webkitpy/w3c/wpt_runner.py:
(main):
* flatpak/files/default.xkm: Added.
* flatpak/files/httpd-autogen.sh: Added.
* flatpak/flatpakutils.py: Added.
(Colors):
(Console):
(Console.message):
(remove_extension_points):
(remove_comments):
(remove_comments._replacer):
(load_manifest):
(expand_manifest):
(FlatpakObject):
(FlatpakObject.__init__):
(FlatpakObject.flatpak):
(FlatpakPackages):
(FlatpakPackages.__init__):
(FlatpakPackages.__detect_packages):
(FlatpakPackages.__detect_packages.in):
(FlatpakPackages.__detect_runtimes):
(FlatpakPackages.__detect_apps):
(FlatpakPackages.__iter__):
(FlatpakRepos):
(FlatpakRepos.__init__):
(FlatpakRepos.update):
(FlatpakRepos.add):
(FlatpakRepo):
(FlatpakRepo.__init__):
(FlatpakRepo.repo_file):
(FlatpakPackage):
(FlatpakPackage.__init__):
(FlatpakPackage.__str__):
(FlatpakPackage.is_installed):
(FlatpakPackage.install):
(FlatpakPackage.update):
(WebkitFlatpak):
(WebkitFlatpak.load_from_args):
(WebkitFlatpak.__init__):
(WebkitFlatpak.check_flatpak):
(WebkitFlatpak.check_flatpak.comparable_version):
(WebkitFlatpak.clean_args):
(WebkitFlatpak.run_in_sandbox):
(WebkitFlatpak.run):
(WebkitFlatpak.has_environment):
(WebkitFlatpak.setup_dev_env):
(WebkitFlatpak.install_all):
(WebkitFlatpak.run_gdb):
(WebkitFlatpak.update_all):
(is_sandboxed):
(run_in_sandbox_if_available):
* flatpak/org.webkit.GTK.yaml: Added.
* flatpak/org.webkit.WPE.yaml: Added.
* flatpak/org.webkit.WebKit.yaml: Added.
* flatpak/patches/httpd-0001-configure-use-pkg-config-for-PCRE-detection.patch: Added.
* flatpak/patches/xvfb-0001-HACK-Avoid-compiling-a-kbm-file.patch: Added.
2018-06-28 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] DataTransfer.getData always returns the empty string when dropping text
https://bugs.webkit.org/show_bug.cgi?id=187130
<rdar://problem/41014117>
Reviewed by Ryosuke Niwa.
Add 2 new API tests to verify that:
- When dropping an item with text, markup, and URL representations, the page is allowed to get "text/html",
"text/plain" and "text/uri-list" data.
- Adding a suggested name to a plain text item causes WebKit to treat it as a file, and suppress access to
DataTransfer.getData().
Additionally tweaks a couple of existing API tests. Namely, in two API tests
(ExternalSourceOverrideDropFileUpload and ExternalSourceHTMLToUploadArea) only a markup string is dropped, and
we previously expected to handle the drop as a file. To allow this test to continue serving its purpose, tweak
them such that the registered items appear to be file-backed (i.e. by adding a suggested filename in one of the
tests, and specifying UIPreferredPresentationStyleAttachment in the other).
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):
2018-06-28 Basuke Suzuki <Basuke.Suzuki@sony.com>
Unreviewed, rolling out r226652.
https://bugs.webkit.org/show_bug.cgi?id=180827
"PlatformInfo should never be instantiated in isolation. So, PlatformInfo should
not have default argument values. The preferred way to get a PlatformInfo object
is to instantiate a Host object." (Requested by dbates).
Reverted changeset:
"[webkitpy] PlatformInfo should have default argument for casual use"
https://bugs.webkit.org/show_bug.cgi?id=180827
2018-06-28 Simon Fraser <simon.fraser@apple.com>
Try to address test failures on the bots.
Allow the test to distinguish between a failure to find the variable, and an error
reporting vector capacity.
* lldb/lldb_webkit_unittest.py:
(TestSummaryProviders.serial_test_WTFVectorProvider_empty_vector):
(TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
2018-06-28 Lucas Forschler <lforschler@apple.com>
Add Windows support for WEBKIT_API_KEY.
https://bugs.webkit.org/show_bug.cgi?id=187155
Reviewed by Daniel Bates.
* EWSTools/start-queue-win.sh:
2018-06-28 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add support for WebKitPy-Tests-EWS
https://bugs.webkit.org/show_bug.cgi?id=187148
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/factories.py: Added WebKitPyFactory.
* BuildSlaveSupport/ews-build/steps.py: Added build step RunWebKitPyTests.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
* BuildSlaveSupport/ews-build/config.json: Updated to use CamelCase.
2018-06-28 Daniel Bates <dabates@apple.com>
Fix the iOS build following r233299
(https://bugs.webkit.org/show_bug.cgi?id=183744)
Only build lldbWebKitTester on Mac as that is the only supported platform at the time of writing.
* Makefile:
2018-06-28 Sihui Liu <sihui_liu@apple.com>
Cookie API: cookie creation time is wrong
https://bugs.webkit.org/show_bug.cgi?id=187101
Reviewed by Geoffrey Garen.
Add test coverage: make sure the cookie creation time returned is the same as set.
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TEST):
2018-06-28 Simon Fraser <simon.fraser@apple.com>
The lldb vector summary provider always shows zero capacity
https://bugs.webkit.org/show_bug.cgi?id=187132
Reviewed by Daniel Bates.
WTFVectorProvider in lldb_webkit.py was calling GetChildMemberWithName('m_capacity')
on the buffer instead of the valobj.
* lldb/lldbWebKitTester/main.cpp:
(testSummaryProviders):
* lldb/lldb_webkit.py:
(WTFVectorProvider.update):
* lldb/lldb_webkit_unittest.py:
(TestSummaryProviders.serial_test_WTFString_SummaryProvider_16bit_string):
(TestSummaryProviders):
(TestSummaryProviders.serial_test_WTFVectorProvider_empty_vector):
(TestSummaryProviders.serial_test_WTFVectorProvider_vector_size_and_capacity):
2018-06-28 Adam Barth <abarth@webkit.org>
Switch OS(FUCHSIA) to using JSCOnly
https://bugs.webkit.org/show_bug.cgi?id=187133
Reviewed by Yusuke Suzuki.
Switch Fuchsia from being a port to just being an OS. We now use a
CMAKE_TOOLCHAIN_FILE to configure the toolchain and the target triple.
* Scripts/webkitdirs.pm: Remove isFuchsia() and clients. Turns out we
can do everything we need using a CMAKE_TOOLCHAIN_FILE via the
--cmakeargs flag.
2018-06-27 Ryosuke Niwa <rniwa@webkit.org>
Make MotionMark's plan file more robust against code changes
https://bugs.webkit.org/show_bug.cgi?id=187116
<rdar://problem/41533956>
Reviewed by Saam Barati.
Moved the code to auto-start the test to the load event listener.
* Scripts/webkitpy/benchmark_runner/data/patches/webserver/MotionMark.patch:
2018-06-27 Daniel Bates <dabates@apple.com>
Add some tests for lldb_webkit.py
https://bugs.webkit.org/show_bug.cgi?id=183744
Reviewed by Alexey Proskuryakov.
Adds some tests to ensure we do not regress LLDB pretty-printing of WTF::StringImpl
and WTF::String objects.
The tests make use of the LLDB Python API (lldb.py) and a simple debug-built test
program, lldbWebKitTester, to run. For now, we only support building lldbWebKitTester
on Mac.
* Makefile: Build the simple test tool lldbWebKitTester on Mac.
* Scripts/build-lldbwebkittester: Added.
(buildProjectOrDie):
* Scripts/dump-class-layout: Extract logic to compute the path to the LLDB Python module
from here to Scripts/webkitpy/common/system/systemhost.py so that it can used by both
this script and lldb/lldb_webkit_unittest.py. Also import the lldb module at the top of
the file and take advantage of Python's default error semantics to throw an exception
if the import fails instead of handling it ourself. This has the side effect that we
now always import the LLDB Python module even if this script is invoked with --help.
If this turns out to be a significant annoyance then we can look to dynamically import
the module as we did before this change.
(webkit_build_dir):
(main):
(developer_dir): Deleted.
(import_lldb): Deleted.
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py: Update FIXME comment to reflect
that fact that test-webkitpy does not support class and module fixtures. This is because
test-webkitpy currently implements parallelism by breaking down existing test classes
into individual test methods itself and having each worker run exactly one test method (via
unittest.TestLoader.loadTestsFromName()) at a time. As a result of this reorganization,
setUpModule()/setUpClass() are called for each test method as opposed to once per test
class/test module.
(remove_dir): Ditto.
* Scripts/webkitpy/common/system/systemhost.py:
(SystemHost):
(SystemHost.path_to_lldb_python_directory): Added.
* Scripts/webkitpy/test/main.py:
(_find_lldb_webkit_tester): Returns whether there exists a Debug or Release-built lldbWebKitTester.
(_build_lldb_webkit_tester): Builds lldbWebKitTester. For now, we only support building
lldbWebKitTester on Mac.
(main): Add Tools/lldb to the test search path if the platform has lldb.py.
(Tester.run): Pass a boolean as to whether we will run the lldb_webkit unit tests.
(Tester._run_tests): Modified to take a boolean as to whether to run the lldb_webkit unit tests.
If we will run these tests then build lldbWebKitTester if it has not already been built as the
unit tests depend on this program.
* lldb/lldbWebKitTester/Configurations/Base.xcconfig: Added.
* lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig: Added.
* lldb/lldbWebKitTester/Configurations/lldbWebKitTester.xcconfig: Added.
* lldb/lldbWebKitTester/Makefile: Added.
* lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Added.
* lldb/lldbWebKitTester/main.cpp: Added.
(breakForTestingSummaryProviders):
(utf16String):
(testSummaryProviders):
(main):
* lldb/lldb_webkit_unittest.py: Added.
(destroy_cached_debug_session):
(LLDBDebugSession):
(LLDBDebugSession.setup):
(LLDBDebugSession.tearDown):
(TestSummaryProviders):
(TestSummaryProviders.setUpClass):
(TestSummaryProviders._sbFrame):
(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_null_string):
(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_empty_string):
(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_8bit_string):
(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_16bit_string):
(TestSummaryProviders.serial_test_WTFString_SummaryProvider_null_string):
(TestSummaryProviders.serial_test_WTFString_SummaryProvider_empty_string):
(TestSummaryProviders.serial_test_WTFString_SummaryProvider_8bit_string):
(TestSummaryProviders.serial_test_WTFString_SummaryProvider_16bit_string):
2018-06-27 Adam Barth <abarth@webkit.org>
Add Fuchsia support to build-jsc
https://bugs.webkit.org/show_bug.cgi?id=187086
Reviewed by Yusuke Suzuki.
Add Fuchsia port to webkitdirs.pm. This patch is sufficient to make
build-jsc kick off a cmake for Fuchsia.
* Scripts/webkitdirs.pm:
(determineSourceDir):
(argumentsForConfiguration):
(determineXcodeSDK):
(findMatchingArguments):
(determinePortName):
(isFuchsia):
(setupAppleWinEnv):
(wrapperPrefixIfNeeded):
(relaunchIOSSimulator):
(debugMiniBrowser):
2018-06-27 Daniel Bates <dabates@apple.com>
style-queue "AttributeError: 'NoneType' object has no attribute 'is_obsolete'" when processing security patch
https://bugs.webkit.org/show_bug.cgi?id=187120
Reviewed by David Kilzer.
Teach the style queue how to refetch a patch from the status server as we did for non-Style
EWS queues.
* Scripts/webkitpy/tool/bot/stylequeuetask.py:
(StyleQueueTask.validate): Similar to change made to EarlyWarningSystemTask.validate() in r233107,
only check if the bug associated with the patch we are processing is closed if the attachment has a
non-None Bug object.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem.refetch_patch): Extract logic to refetch a patch from here...
* Scripts/webkitpy/tool/commands/queues.py:
(PatchProcessingQueue._refetch_patch): ... to here.
(StyleQueue.refetch_patch): Turn around and call PatchProcessingQueue._refetch_patch().
2018-06-27 Tadeu Zagallo <tzagallo@apple.com>
Unreviewed, add myself as a WebKit committer.
* Scripts/webkitpy/common/config/contributors.json:
2018-06-27 Daniel Bates <dabates@apple.com>
webkit-patch should ignore non-ASCII characters in the status server API key
https://bugs.webkit.org/show_bug.cgi?id=187107
Reviewed by Lucas Forschler.
The API key should only consists of ASCII characters. If it contains any
non-ASCII characters then log a warning and ignore them.
* Scripts/webkitpy/common/net/statusserver.py:
(StatusServer.set_api_key): Force conversion to ASCII.
* Scripts/webkitpy/tool/main.py:
(WebKitPatch._status_server_api_key): Convert to ASCII, ignoring non-ASCII
characters and logging a warning.
2018-06-27 Jonathan Bedard <jbedard@apple.com>
Enable WebKit iOS 12 build
https://bugs.webkit.org/show_bug.cgi?id=187024
<rdar://problem/39759057>
Reviewed by David Kilzer.
* Scripts/configure-xcode-for-ios-development:
(copyMissingHeadersFromSDKToSDKIfNeeded): Copy launch.h into embedded SDKs.
2018-06-27 Robin Morisset <rmorisset@apple.com>
[WSL] Add a control-flow stack to the execution rules in WSL.ott
https://bugs.webkit.org/show_bug.cgi?id=186310
Rubberstamped by Filip Pizlo.
The goal of this is to enable (future) rules about uniform control flow for barriers.
It required adding two new special construct: Join(s) and JoinExpr(e) whose only role is to pop the last element of the stack.
* WebGPUShadingLanguageRI/SpecWork/WSL.ott:
2018-06-27 Robin Morisset <rmorisset@apple.com>
[WSL] Fix minor formatting issues in the grammar section
https://bugs.webkit.org/show_bug.cgi?id=186310
Rubberstamped by Filip Pizlo.
* WebGPUShadingLanguageRI/SpecWork/source/index.rst:
2018-06-27 Robin Morisset <rmorisset@apple.com>
[WSL] Put the full grammar in the Sphinx document
https://bugs.webkit.org/show_bug.cgi?id=186310
Rubberstamped by Filip Pizlo.
Put the grammar's production rules in the Sphinx document, along with a few comments and the rules for desugaring.
Also includes a bit of clean-up of the antlr rules.
* WebGPUShadingLanguageRI/SpecWork/WSL.g4:
* WebGPUShadingLanguageRI/SpecWork/source/index.rst:
2018-06-26 Chris Dumez <cdumez@apple.com>
Deal better with the network process crashing on startup
https://bugs.webkit.org/show_bug.cgi?id=187065
<rdar://problem/41451622>
Reviewed by Geoffrey Garen.
Add layout test coverage.
* TestWebKitAPI/Tests/WebKit/NetworkProcessCrashWithPendingConnection.mm:
(-[MonitorWebContentCrashNavigationDelegate _webView:webContentProcessDidTerminateWithReason:]):
(-[MonitorWebContentCrashNavigationDelegate webView:didFinishNavigation:]):
(TestWebKitAPI::TEST):
2018-06-25 Yusuke Suzuki <utatane.tea@gmail.com>
Remove static initializers more
https://bugs.webkit.org/show_bug.cgi?id=186969
Reviewed by Michael Catanzaro.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::assignedUrlsCache):
(WTR::dumpResourceURL):
(WTR::InjectedBundlePage::resetAfterTest):
(WTR::InjectedBundlePage::didInitiateLoadForResource):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityNotificationHandlerAtk.cpp:
(WTR::AccessibilityNotificationHandler::setNotificationFunctionCallback):
(WTR::AccessibilityNotificationHandler::removeAccessibilityNotificationHandler):
(WTR::AccessibilityNotificationHandler::connectAccessibilityCallbacks):
(WTR::AccessibilityNotificationHandler::disconnectAccessibilityCallbacks):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::stringAttributeValue):
Use NeverDestroyed<> and static functions.
2018-06-26 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add support for compiling WebKit
https://bugs.webkit.org/show_bug.cgi?id=187019
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/steps.py:
(CompileWebKit): Added, class to compile WebKit.
(CleanBuild): Added, class to clean up the build.
(KillOldProcesses): Added, class to kill old processes.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
* BuildSlaveSupport/ews-build/config.json: Renamed ios-11-simulator to ios-simulator-11, to match with build.webkit.org code.
Added configuration, architecture which is required for compiling. Renamed Release to release as the tools expect lower-case release.
* BuildSlaveSupport/ews-build/factories.py: Added BuildFactory.
* BuildSlaveSupport/ews-build/loadConfig.py: Renamed configuraton value to lower-case as tools expect lower-case values.
* BuildSlaveSupport/ews-build/loadConfig_unittest.py: Ditto.
2018-06-26 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add support for WebKitPerl-Tests-EWS
https://bugs.webkit.org/show_bug.cgi?id=187023
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/config.json: Added WebKitPerl-tests-EWS.
* BuildSlaveSupport/ews-build/factories.py: Added WebKitPerlFactory.
* BuildSlaveSupport/ews-build/steps.py: Added build step RunWebKitPerlTests.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-test.
2018-06-26 Aakash Jain <aakash_jain@apple.com>
[build.webkit.org] Rename badly named variable kls to schedulerType
https://bugs.webkit.org/show_bug.cgi?id=186926
Reviewed by Lucas Forschler.
* BuildSlaveSupport/build.webkit.org-config/loadConfig.py:
(loadBuilderConfig): Renamed kls to schedulerType.
2018-06-26 Daniel Bates <dabates@apple.com>
EWS should pass --status-host-uses-http when invoking webkit-patch, if needed
https://bugs.webkit.org/show_bug.cgi?id=187061
Reviewed by Per Arne Vollan.
When EWS invokes webkit-patch to perform an operation (e.g. apply an attachment)
it should pass the command line option --status-host-uses-http, if EWS was
started with this command line option, so that we query the status server over
HTTP in child "webkit-patch" processes as we do in the main EWS process.
* Scripts/webkitpy/common/net/statusserver_mock.py:
(MockStatusServer.__init__):
* Scripts/webkitpy/tool/commands/queues.py:
(AbstractQueue.run_webkit_patch):
2018-06-26 Daniel Bates <dabates@apple.com>
webkit-patch: Make attachment commands work with status-server hosted attachments
https://bugs.webkit.org/show_bug.cgi?id=187056
Reviewed by Per Arne Vollan.
Allow the EWS bots to apply, build, test, check-style, and (in the future) land
attachments hosted on the status server. We only download an attachment from the
status server if we do not have sufficient permission to download it from Bugzilla
(e.g. security-sensitive patches).
A valid status server API key is required to run these commands by hand. Otherwise,
the status server will not provide attachment data.
* Scripts/webkitpy/common/net/statusserver_mock.py:
(MockStatusServer.fetch_attachment): Log a message for testing purposes.
* Scripts/webkitpy/tool/commands/download.py:
(ProcessAttachmentsMixin._fetch_list_of_patches_to_process): Fetch the attachment
from the status server if we do not have permission to fetch it from Bugzilla.
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
(EarlyWarningSystemTest._default_expected_logs): Update expected result when
using a custom work item and when fetching an attachment from the status server.
(_test_ews): Modified to take use_security_sensitive_patch (defaults to False) as
to whether to use a security-sensitive patch when testing.
(test_ewses_with_security_sensitive_patch): Added.
2018-06-26 Daniel Bates <dabates@apple.com>
contributors.json fails to parse after r233209
Removing trailing ',' that caused this file to be malformed. Also ran
"validate-committer-lists -c" to canonicalize the style of this file.
* Scripts/webkitpy/common/config/contributors.json:
2018-06-26 Timothy Horton <timothy_horton@apple.com>
Add Aditya to contributors.json as a contributor
* Scripts/webkitpy/common/config/contributors.json:
2018-06-26 Brent Fulgham <bfulgham@apple.com>
Provide a way for Injected Bundles to indicate classes approved for NSSecureCoding
https://bugs.webkit.org/show_bug.cgi?id=186788
<rdar://problem/41094167>
Reviewed by Chris Dumez.
Add a new test case to exercise the class check during NSSecureCoding.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/mac/CustomBundleObject.h: Added.
* TestWebKitAPI/Tests/WebKit/mac/CustomBundleObject.mm: Added.
(-[CustomBundleObject initWithValue:]):
(+[CustomBundleObject supportsSecureCoding]):
(-[CustomBundleObject copyWithZone:]):
(-[CustomBundleObject initWithCoder:]):
(-[CustomBundleObject encodeWithCoder:]):
* TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter.mm: Added.
(TestWebKitAPI::didReceiveMessageFromInjectedBundle):
(TestWebKitAPI::didFinishLoadForFrame):
* TestWebKitAPI/Tests/WebKit/mac/CustomBundleParameter_Bundle.mm: Added.
(TestWebKitAPI::CustomBundleParameterTest::CustomBundleParameterTest):
(TestWebKitAPI::CustomBundleParameterTest::didCreatePage):
2018-06-25 Daniel Bates <dabates@apple.com>
Log a message when fetching attachment data from the status server
https://bugs.webkit.org/show_bug.cgi?id=187032
Reviewed by Zalan Bujtas.
Currently we silently fetch from the status server an attachment when fetching
the attachment from Bugzilla fails due to an access denied error. Instead we
should emit a message when fetching data from the status server to indicate
that webkit-patch/EWS is still processing the command/trying to obtain the
patch.
* Scripts/webkitpy/common/net/statusserver.py:
(StatusServer._fetch_attachment_page):
2018-06-25 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add support for Bindings-tests-EWS
https://bugs.webkit.org/show_bug.cgi?id=187014
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/factories.py:
(BindingsFactory): Added RunBindingsTests build step to BindingsFactory.
* BuildSlaveSupport/ews-build/steps.py:
(RunBindingsTests): Added build-step for running Bindings tests.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2018-06-25 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add support for Style-EWS
https://bugs.webkit.org/show_bug.cgi?id=186955
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/factories.py:
(Factory): Base class for all the factory.
* BuildSlaveSupport/ews-build/loadConfig.py: Initialize factory with required parameters.
* BuildSlaveSupport/ews-build/runUnittests.py: Added, script to run all the unit tests.
* BuildSlaveSupport/ews-build/steps.py: Added.
* BuildSlaveSupport/ews-build/steps_unittest.py: Added unit-tests.
2018-06-25 Youenn Fablet <youenn@apple.com>
Add API to control mock media devices
https://bugs.webkit.org/show_bug.cgi?id=186958
Reviewed by Eric Carlson.
Add test runner API to clear/add/remove/reset mock media devices.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::addMockMediaDevice):
(WTR::TestRunner::addMockCameraDevice):
(WTR::TestRunner::addMockMicrophoneDevice):
(WTR::TestRunner::addMockScreenDevice):
(WTR::TestRunner::clearMockMediaDevices):
(WTR::TestRunner::removeMockMediaDevice):
(WTR::TestRunner::resetMockMediaDevices):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::addMockMediaDevice):
(WTR::TestController::clearMockMediaDevices):
(WTR::TestController::removeMockMediaDevice):
(WTR::TestController::resetMockMediaDevices):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2018-06-25 Aakash Jain <aakash_jain@apple.com>
[ews-build] Add support for try Buildbot try schedulers
https://bugs.webkit.org/show_bug.cgi?id=186948
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/config.json: Use Try_Userpass scheduler.
* BuildSlaveSupport/ews-build/loadConfig.py: Updated to use try scheduler.
2018-06-25 Ross Kirsling <ross.kirsling@sony.com>
[WinCairo] Unreviewed build fix for r233088.
* BuildSlaveSupport/built-product-archive:
(extractBuiltProduct):
"move" throws instead of overwriting, so just use "copy" instead.
2018-06-25 Leo Balter <leonardo.balter@gmail.com>
[test262-runner] Sort the list of failing files in the HTML report
https://bugs.webkit.org/show_bug.cgi?id=186998
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(printHTMLResults): The current list of failing files it not ordered and it's hard to read.
This small patch will sort the list.
2018-06-25 Robin Morisset <rmorisset@apple.com>
[WSL] Start writing the Sphinx document
https://bugs.webkit.org/show_bug.cgi?id=186310
Rubberstamped by Filip Pizlo.
Very early work, just has the lexer and a few fragments of the parser so far.
Also fixing some minor mistake in the formal rules.
* WebGPUShadingLanguageRI/SpecWork/WSL.g4:
* WebGPUShadingLanguageRI/SpecWork/WSL.ott:
* WebGPUShadingLanguageRI/SpecWork/source/conf.py:
* WebGPUShadingLanguageRI/SpecWork/source/index.rst:
2018-06-23 Yusuke Suzuki <utatane.tea@gmail.com>
[WTF] Add user-defined literal for ASCIILiteral
https://bugs.webkit.org/show_bug.cgi?id=186839
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WTF/StringOperators.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/WTFString.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/WorkerPool.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp:
(TEST_F):
* TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebCore/URL.cpp:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebCore/ios/PreviewLoader.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/mac/GPUCommandQueue.mm:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebCore/mac/GPUTest.h:
* TestWebKitAPI/Tests/WebKitCocoa/ContentFilteringPlugIn.mm:
(-[MockContentFilterEnabler initWithCoder:]):
* TestWebKitAPI/Tests/mac/ContentFiltering.mm:
(TestWebKitAPI::loadAlternateTest):
2018-06-22 Brady Eidson <beidson@apple.com>
WKURLSchemeHandler doesn't handle sync XHR.
<rdar://problem/40955884> and https://bugs.webkit.org/show_bug.cgi?id=186902
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
(-[SyncScheme webView:startURLSchemeTask:]):
(-[SyncScheme webView:stopURLSchemeTask:]):
(-[SyncMessageHandler userContentController:didReceiveScriptMessage:]):
(catch):
2018-06-22 Daniel Bates <dabates@apple.com>
Security EWS: bots fails with exception 'NoneType' object has no attribute 'is_closed'
https://bugs.webkit.org/show_bug.cgi?id=186923
Reviewed by Lucas Forschler.
Attachments downloaded from the status server (http://webkit-queues.webkit.org) do not
have an associated Bug object (i.e. Attachment.bug() is None) and reflect the state they
were in, including flags set, at the time they were uploaded to the status server. We
will add support for fetching up-to-date status info about the attachment and its bug
in <https://bugs.webkit.org/show_bug.cgi?id=186817>. For now, we only check if the
bug associated with the patch we are processing is closed if the attachment has a
non-None Bug object.
* Scripts/webkitpy/tool/bot/earlywarningsystemtask.py:
(EarlyWarningSystemTask.validate):
2018-06-22 Ross Kirsling <ross.kirsling@sony.com>
[Win] ImageDiff should use DLLLauncher
https://bugs.webkit.org/show_bug.cgi?id=186927
ImageDiff should use DLLLauncher to find DLLs under WEBKIT_LIBRARIES, in the same way as DRT & TestWebKitAPI.
Reviewed by Per Arne Vollan.
* ImageDiff/CMakeLists.txt:
* ImageDiff/ImageDiff.cpp:
(dllLauncherEntryPoint):
* ImageDiff/PlatformWin.cmake:
2018-06-22 Basuke Suzuki <Basuke.Suzuki@sony.com>
[style] Fix --git-index option for check-webkit-style command
https://bugs.webkit.org/show_bug.cgi?id=186810
When --git-index is specified, it should be compared with HEAD, not the origin/master.
Reviewed by Daniel Bates.
* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.create_patch):
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
(test_create_patch_with_git_index): Added.
2018-06-22 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, fix syntax error introduced by r233088.
* BuildSlaveSupport/built-product-archive:
(extractBuiltProduct):
2018-06-22 Ross Kirsling <ross.kirsling@sony.com>
[WinCairo][Buildbot] Test bots should use same WinCairoRequirements version as the triggering build
https://bugs.webkit.org/show_bug.cgi?id=186857
Reviewed by Lucas Forschler.
* BuildSlaveSupport/built-product-archive:
(archiveBuiltProduct):
(extractBuiltProduct):
Save and restore the WinCairoRequirements version using the build archive.
* Scripts/download-github-release.py: Renamed from Tools/Scripts/download-latest-github-release.py.
Generalize download script -- get the latest version by default, but allow an arbitrary version to be specified.
* Scripts/update-vswhere.py:
Consume renamed script.
* Scripts/update-webkit-wincairo-libs.py:
Consume renamed script and specify a version to download when a config file is present.
2018-06-20 Darin Adler <darin@apple.com>
[Cocoa] Use the isDirectory: variants of NSURL methods more to eliminate unnecessary file system activity
https://bugs.webkit.org/show_bug.cgi?id=186875
Reviewed by Anders Carlsson.
* DumpRenderTree/mac/DumpRenderTree.mm:
(activateTestingFonts): Use isDirectory:NO to create a URL for a font file.
* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
(WTR::activateFonts): Ditto.
(WTR::installFakeHelvetica): Ditto.
2018-06-22 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebDriver: use a dictionary for session capabilities in StartAutomationSession message
https://bugs.webkit.org/show_bug.cgi?id=186915
Reviewed by Žan Doberšek.
Update /webkit/WebKitAutomationSession/request-session to use the new StartAutomationSession message signature.
* TestWebKitAPI/Tests/WebKitGLib/TestAutomationSession.cpp:
2018-06-22 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GLib test /webkit/WebKitSecurityManager/file-xhr after r231000
We are now receiving two console messages instead of one. Simply update the test to check both messages.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
(consoleMessageReceivedCallback):
(testWebContextSecurityFileXHR):
2018-06-22 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed GLib gardening. Update expectations of TestSSL.
/webkit/WebKitWebView/tls-errors-policy and /webkit/WebKitWebView/load-failed-with-tls-errors are failing only
in the bots.
* TestWebKitAPI/glib/TestExpectations.json:
2018-06-21 Daniel Bates <dabates@apple.com>
EWS for security bugs
https://bugs.webkit.org/show_bug.cgi?id=186291
<rdar://problem/40829658>
Substitute webkit.status-api-key for webkit.status_api_key as Git configuration variables can
only consist of alphanumeric characters and underscores (_) per the second paragraph of section
Configuration File of <https://git-scm.com/docs/git-config/2.18.0#_configuration_file>:
The variable names are case-insensitive, allow only alphanumeric characters and -, and must
start with an alphabetic character.
* Scripts/webkitpy/tool/main.py:
(WebKitPatch._status_server_api_key_from_git):
2018-06-21 Daniel Bates <dabates@apple.com>
EWS for security bugs
https://bugs.webkit.org/show_bug.cgi?id=186291
<rdar://problem/40829658>
In r232979, I inadvertently removed a line of code in _parse_authorized_api_keys() to define a local called api_keys.
Add this code back.
* QueueStatusServer/config/authorization.py:
(_parse_authorized_api_keys):
2018-06-21 Daniel Bates <dabates@apple.com>
EWS should not try to post comments or upload result archives to security-sensitive
bugs unless it has access
https://bugs.webkit.org/show_bug.cgi?id=186831
Reviewed by Lucas Forschler.
Following r232979 security-sensitive patches are uploaded to the status server so
that they can be retrieved and processed by EWS bots without the need for Bugzilla
security bug access. Although the EWS machinery is robust against unexpected exceptions,
including exceptions raised when interacting with Bugzilla bugs/attachments with
insufficient credentials, we should not depend on such defenses as they cause webkit-
patch to log a message for the "unexpected" exception. We should reserve such logging
for truly unexpected exceptions that indicate a programming mistake that we need to fix.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem._post_reject_message_on_bug): Bail out early if we cannot
access the bug.
* Scripts/webkitpy/tool/commands/queues.py:
(PatchProcessingQueue._can_access_bug): Added.
(PatchProcessingQueue._upload_results_archive_for_patch): Only add an attachment if we
can access the bug.
(CommitQueue.process_work_item): Only post a rejection comment (i.e. call CommitterValidatorreject_patch_from_commit_queue())
if we can access the bug.
2018-06-21 Lucas Forschler <lforschler@apple.com>
bisect-builds --list not showing all builds
https://bugs.webkit.org/show_bug.cgi?id=185790
The AWS Gateway API call into dynamoDB is limited to returning 1MB of query data. Our archive set has overgrown this limit,
causing us to retrieve a truncated list of results. Fortunately, when this limit is reached, dynamoDB returns a
"LastEvaluatedKey", which can be used to continue the query in another request.
This patch teaches bisect-build to pass along this key when needed. The backend api was updated from v2 to v2_1 to support
this new querystring option. Any existing code using v2 will not be affected.
Reviewed by Aakash Jain.
* Scripts/bisect-builds:
(get_api_url): added optional LastEvaluatedKey argument, which will append the query string to the base api url.
(fetch_revision_list): Added to allow a recursive call which will query until we retrieve every item requested.
(main): teach how to use fetch_revision_list.
2018-06-21 Keith Rollin <krollin@apple.com>
check-webkit-style should warn about exported inline functions
https://bugs.webkit.org/show_bug.cgi?id=186861
<rdar://problem/41303668>
Reviewed by Brent Fulgham.
When checking binaries compiled with LTO enabled, WebKit's
check-for-weak-vtables-and-externals script can complain about
exported inline functions. For instance, in
Source/WebCore/page/scrolling/ScrollingTree.h, the following:
WEBCORE_EXPORT virtual void reportSynchronousScrollingReasonsChanged(MonotonicTime, SynchronousScrollingReasons) { }
WEBCORE_EXPORT virtual void reportExposedUnfilledArea(MonotonicTime, unsigned /* unfilledArea */) { }
Can result in the following error messages:
ERROR: WebCore has a weak external symbol in it (.../OpenSource/WebKitBuild/Release/WebCore.framework/Versions/A/WebCore)
ERROR: A weak external symbol is generated when a symbol is defined in multiple compilation units and is also marked as being exported from the library.
ERROR: A common cause of weak external symbols is when an inline function is listed in the linker export file.
ERROR: symbol __ZN7WebCore13ScrollingTree25reportExposedUnfilledAreaEN3WTF13MonotonicTimeEj
ERROR: symbol __ZN7WebCore13ScrollingTree40reportSynchronousScrollingReasonsChangedEN3WTF13MonotonicTimeEj
Unfortunately, these errors are only emitted when LTO is enabled,
meaning that a developer could check-in a file that will fail an LTO
build if they don't build with that option locally. Therefore, try to
head this off by updating check-webkit-style to identify and warn
about these cases (which includes when an export macro is applied
directly to an inline method as well as when an inline method is part
of an exported class).
* Scripts/webkitpy/style/checkers/cpp.py:
(_FunctionState.begin):
(_FunctionState.export_macro):
(_ClassInfo.__init__):
(check_for_non_standard_constructs):
(check_function_definition):
(process_line):
(CppChecker):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(FunctionDetectionTest.perform_function_detection):
(FunctionDetectionTest.test_webcore_export):
2018-06-21 Aakash Jain <aakash_jain@apple.com>
[ews-build] unit-tests fail when run from another directory
https://bugs.webkit.org/show_bug.cgi?id=186872
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/loadConfig.py:
(loadBuilderConfig): Add support for passing master_prefix_path.
* BuildSlaveSupport/ews-build/loadConfig_unittest.py:
(ConfigDotJSONTest.test_configuration): Set master_prefix_path as current directory.
2018-06-21 Aakash Jain <aakash_jain@apple.com>
Add support for using localhost worker in OpenSource EWS Buildbot
https://bugs.webkit.org/show_bug.cgi?id=186871
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/loadConfig.py:
(loadBuilderConfig): Added a worker named 'local-worker' if use_localhost_worker option is used.
* BuildSlaveSupport/ews-build/master.cfg: Check BUILDBOT_TESTING environment variable and use_localhost_worker if so.
2018-06-21 Aakash Jain <aakash_jain@apple.com>
Add force schedulers to OpenSource EWS Buildbot
https://bugs.webkit.org/show_bug.cgi?id=186876
Reviewed by Lucas Forschler.
* BuildSlaveSupport/ews-build/loadConfig.py:
(loadBuilderConfig): Added support for ForceScheduler.
2018-06-21 Robin Morisset <rmorisset@apple.com>
[WSL] Merge WSL_type.ott and WSL_exec.ott
https://bugs.webkit.org/show_bug.cgi?id=186310
Rubberstamped by Filip Pizlo.
I moved the execution rules into WSL_type.ott, that was renamed WSL.ott.
I also changed the execution judgements:
- they now emit memory events instead of having an explicit store (so they can be connected later to a memory model)
- the environment is now unchangeable (except inside blocks, which are the only place that variable declarations can appear)
- various rules were simplified.
* WebGPUShadingLanguageRI/SpecWork/WSL.ott: Copied from Tools/WebGPUShadingLanguageRI/SpecWork/WSL_type.ott.
* WebGPUShadingLanguageRI/SpecWork/WSL_exec.ott: Removed.
* WebGPUShadingLanguageRI/SpecWork/WSL_type.ott: Removed.
2018-06-21 Leo Balter <leonardo.balter@gmail.com>
[test262-runner] Improve failures output
https://bugs.webkit.org/show_bug.cgi?id=186858
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(main):
(processResult):
2018-06-21 Caitlin Potter <caitp@igalia.com>
[Tools] add a --debug option to test262/Runner.pm for buildbots
https://bugs.webkit.org/show_bug.cgi?id=186113
Reviewed by Michael Saboff.
test262-runner runs Debug builds by default, but this allows us to be
explicit about it in buildbots.
* Scripts/test262/Runner.pm:
(processCLI):
2018-06-21 Carlos Garcia Campos <cgarcia@igalia.com>
run-gtk-tests (glib/common.py) cannot determine build directory when webKitBranchBuild=true
https://bugs.webkit.org/show_bug.cgi?id=185643
Reviewed by Frédéric Wang.
Check if webKitBranchBuild is true in git config to add the branch name to the build path.
* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.read_git_config): Add output_type parameter.
(Git.read_config): Call read_git_config with cws and executive.
(Git._upstream_branch): Use read_config().
(Git._assert_can_squash): Ditto.
(Git.remote_branch_ref): Ditto.
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
(GitSVNTest.test_read_git_config):
* glib/common.py:
(get_build_path):
2018-06-20 Wenson Hsieh <wenson_hsieh@apple.com>
[WebKit on watchOS] Fixed position elements sometimes flicker when scrolling
https://bugs.webkit.org/show_bug.cgi?id=186860
<rdar://problem/39953563>
Reviewed by Tim Horton.
Add a new API test to exercise a race condition between receiving remote layer tree commits and updating visible
content rects which would result in the compositing layer for a fixed position element sometimes appearing in
the wrong place. See WebKit ChangeLog for more details.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/fixed-nav-bar.html: Added.
* TestWebKitAPI/Tests/ios/WKScrollViewTests.mm: Added.
(traverseLayerTree):
(TEST):
2018-06-20 Daniel Bates <dabates@apple.com>
AttributeError: StatusServer instance has no attribute '_api_key' thrown when processing a patch
https://bugs.webkit.org/show_bug.cgi?id=186852
Fixes an issue where StatusServer._api_key may not be defined. This issue manifests itself
in a Python AttributeError exception when an EWS bot tries to fetch the next patch to process.
Currently StatusServer._api_key is only defined when either the environment variable WEBKIT_STATUS_API_KEY
or the Git configuration key webkit.status_api_key has a non-empty value. Instead we should
always define StatusServer._api_key in the StatusServer constructor.
* Scripts/webkitpy/common/net/statusserver.py:
(StatusServer.__init__):
2018-06-20 Robin Morisset <rmorisset@apple.com>
[WSL] Add details to the sphinx outline
https://bugs.webkit.org/show_bug.cgi?id=186310
Rubberstamped by Filip Pizlo.
Mostly improving the sphinx outline.
Also started moving the execution rules to WSL_type.ott (which will eventually become WSL.ott).
Tried formalizing the gathering of declarations into the environment, but I think I will scratch it.
It is both trivial to do (and to explain in english) and a bit of a pain to formalize.
* WebGPUShadingLanguageRI/SpecWork/WSL_type.ott:
* WebGPUShadingLanguageRI/SpecWork/source/index.rst:
2018-06-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r232844.
https://bugs.webkit.org/show_bug.cgi?id=186843
"Too many flakiness on the tests, so the EWS bots cant process
patches correctly" (Requested by clopez on #webkit).
Reverted changeset:
"[GTK] Enable tests on the GTK EWS queue"
https://bugs.webkit.org/show_bug.cgi?id=186559
https://trac.webkit.org/changeset/232844
2018-06-20 Rob Buis <rbuis@igalia.com>
[GTK] ASSERTION FAILED: url == m_string in UserAgentQuirks test
https://bugs.webkit.org/show_bug.cgi?id=186838
This URL constructor expects canonicalized input, so fix the passed URL.
Reviewed by Frédéric Wang.
* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::TEST):
2018-06-20 Robin Morisset <rmorisset@apple.com>
[WSL] Make the typing rules explicitely translate type syntax into actual types
https://bugs.webkit.org/show_bug.cgi?id=186310
Rubberstamped by Filip Pizlo.
The typing rules must describe how and most importantly when typedefs and the like are resolved.
This is important because they can be shadowed (by type variables for example), and we want to make it unambiguous what behaviour is required in that case.
* WebGPUShadingLanguageRI/SpecWork/WSL.g4:
* WebGPUShadingLanguageRI/SpecWork/WSL_type.ott:
2018-06-20 Yusuke Suzuki <utatane.tea@gmail.com>
[GTK][WPE][Nicosia] Add name for Nicosia Painting Threads
https://bugs.webkit.org/show_bug.cgi?id=186836
Reviewed by Carlos Garcia Campos.
* TestWebKitAPI/Tests/WTF/WorkerPool.cpp:
(TestWebKitAPI::TEST):
2018-06-20 Yusuke Suzuki <utatane.tea@gmail.com>
[WPE] Remove warnings by setting nullptr for unused listeners
https://bugs.webkit.org/show_bug.cgi?id=186835
Reviewed by Carlos Garcia Campos.
frame, axis_source, axis_stop, and axis_discrete are unused.
Setting nullptr explicitly to remove warnings in GCC.
* wpe/backends/WindowViewBackend.cpp:
2018-06-19 Leo Balter <leonardo.balter@gmail.com>
[test262-runner] Reduce flakiness of unit tests for the runner
https://bugs.webkit.org/show_bug.cgi?id=186824
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(main):
* Scripts/webkitperl/test262_unittest/test262-runner-tests.pl:
2018-06-19 Leo Balter <leonardo.balter@gmail.com>
[test262-runner] Print results report to HTML
https://bugs.webkit.org/show_bug.cgi?id=186790
Reviewed by Michael Saboff.
After runing the tests, 2 html files are created with a list to failing tests and summaries.
* Scripts/test262/Runner.pm:
(main):
(summarizeResults):
(printHTML):
2018-06-19 Keith Rollin <krollin@apple.com>
Crash running check-webkit-style on webrtc/.../exceptions.py
https://bugs.webkit.org/show_bug.cgi?id=186816
<rdar://problem/41262553>
Reviewed by Michael Catanzaro.
It's not apparent to me why the crash is occurring. Trying to write a
unittest that checks this file in isolation does not reproduce the
crash. But the crash goes away when updating to pylint-0.25.2.
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_pylint):
2018-06-19 Keith Rollin <krollin@apple.com>
cpp style checker needs to know more about NOLINT
https://bugs.webkit.org/show_bug.cgi?id=186796
Reviewed by Aakash Jain.
Running check-webkit-style on
ThirdParty/gtest/src/gtest-internal-inl.h crashes with a KeyError as
it tries to look up information about a particular #include in a
dictionary it maintains. The problem has to do with the following
lines in gtest-internal-inl.h:
#include <gtest/gtest.h> // NOLINT
#include <gtest/gtest-spi.h>
The NOLINT annotation will prevent the cpp-checker from processing or
even seeing that line. In skipping that line, information regarding
that line is NOT added to some internal tables. However, when the code
that checks that #includes are correctly alphabetized gets to the
"gtest-spi.h" line, it will not respect the NOLINT annotation and will
see the gtest.h line. When doing so, it runs afoul of the fact that it
hadn't seen that line before and it crashes when it tries to look up
that line in some internal records.
Fix this by catering to the possibility that a #include line may not
have been entered into these internal records.
* Scripts/webkitpy/style/checkers/cpp.py:
(check_include_line):
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
2018-06-19 Daniel Bates <dabates@apple.com>
EWS for security bugs
https://bugs.webkit.org/show_bug.cgi?id=186291
<rdar://problem/40829658>
Update comment in AbstractEarlyWarningSystem.refetch_patch() to reference <https://bugs.webkit.org/show_bug.cgi?id=186817>.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem.refetch_patch):
2018-06-19 Daniel Bates <dabates@apple.com>
EWS for security bugs
https://bugs.webkit.org/show_bug.cgi?id=186291
<rdar://problem/40829658>
Reviewed by Lucas Forschler.
Part 1 of 2.
Implements support for EWS processing of patches on security sensitive bugs. We add new
endpoints to the status server to support uploading and downloading of patches and associated
metadata. When webkit-patch submits a patch for EWS processing it will now upload the contents
and metadata for the patch to the status server if the patch is on a security sensitive bug.
We teach the EWS machinery in webkitpy to query the status server for a patch only if fetching
the patch from Bugzilla is not permitted due to an authorization error.
Fetching patches from the status server requires an API key. The API key is read from the
environment variable WEBKIT_STATUS_API_KEY or the value of the Git configuration key webkit.status_api_key
(in that order). Contact me or another Apple engineer for an API key.
Additionally, default to using HTTPS when querying the status server and expose an optional
command line option called --status-host-uses-http to use the former behavior of querying
over HTTP.
* QueueStatusServer/config/authorization.py: Added.
(_path_to_authorized_api_keys_file): Returns the absolute filesystem path to the file authorized_api_keys.txt.
(_parse_authorized_api_keys):
(authorized_api_keys):
(_parse_authorization_header): Parses the API key from the Authorization header. We use a
custom authentication scheme: "apikey". See remark below for more details.
(is_authorized): Checks if the request includes an API key and whether that API key is in the
list of authorized keys (performs a case-sensitive match). The API key may be specified either
in a HTTP header Authorization or in the query string argument "apikey". When using the HTTP
headers approach the Authorization header should have the form: "Authorization: apikey X" where
X is the case-sensitive API key.
* QueueStatusServer/handlers/fetchattachment.py: Added.
(FetchAttachment):
(FetchAttachment.get):
* QueueStatusServer/handlers/releasepatch.py:
(ReleasePatch.check_processed_by_all_queues): Returns whether the specified attachment was processed by all the queues.
(ReleasePatch.post): Delete the patch from AppEngine (if we have it) once the patch was processed
by all the queues.
* QueueStatusServer/handlers/submittoews.py:
(SubmitToEWS._should_add_to_ews_queue): Fix a typo in a comment while I am working in this code.
* QueueStatusServer/handlers/uploadattachment.py: Added.
(UploadAttachment):
(UploadAttachment.get):
(UploadAttachment.post):
* QueueStatusServer/main.py: Add new routes /upload-attachment and /attachment to upload an attachment
and view an attachment (or its metadata), respectively.
* QueueStatusServer/model/attachmentdata.py: Added.
(AttachmentData):
(AttachmentData.add_attachment_data):
(AttachmentData.lookup_if_exists):
(AttachmentData.remove_attachment_data):
* QueueStatusServer/templates/uploadattachment.html: Added.
* Scripts/webkitpy/common/net/bugzilla/attachment.py:
(Attachment.committer):
(Attachment):
(Attachment.to_json): Serialize to JSON so that we can upload it to AppEngine.
(Attachment.from_json): Deserialize from JSON. This is used as part of downloading a patch from AppEngine.
* Scripts/webkitpy/common/net/bugzilla/attachment_unittest.py:
(AttachmentTest.test_convert_to_json_and_back): Added.
* Scripts/webkitpy/common/net/bugzilla/bug.py:
(Bug.groups): Returns a frozenset of groups that the bug is a member of.
(Bug.is_security_sensitive): Returns whether the bug is in group Security-Sensitive.
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(BugzillaQueries.fetch_attachment_ids_from_review_queue): Modified to take an optional boolean, only_security_bugs,
as to whether to only fetch attachment ids for unreviewed patches associated with security bugs. By default, we
keep the current behavior and query for the attachment ids of all unreviewed patches that the currently logged in
Bugzilla user can see, which may include patches associated with security bugs.
(Bugzilla._parse_date): Update for moved and renamed constant. See remark for class Bugzilla.
(Bugzilla._parse_bug_dictionary_from_xml): Modified to return an empty dictionary if we do not have access to view the bug.
Otherwise, extract the name of the group the bug is in.
(Bugzilla.fetch_bug): Modified to return None if we do not have access to view the bug.
(Bugzilla._parse_bug_title_from_attachment_page): Extracted out logic to parse the title of the Attachment page
from _parse_bug_id_from_attachment_page() so that it can be used from both _parse_bug_id_from_attachment_page()
and get_bug_id_for_attachment_id().
(Bugzilla): Moved class constant _bugzilla_date_format to Scripts/webkitpy/common/net/bugzilla/constants.py
and renamed it to BUGZILLA_DATE_FORMAT.
(Bugzilla.AccessError):
(Bugzilla.AccessError.__init__):
(Bugzilla._parse_bug_id_from_attachment_page): Modified to return a tuple of ("bug id", "error code") so that
the caller can know the reason the parse failed if it did. The parse will fail if we do not have access to view
the bug.
(Bugzilla.bug_id_for_attachment_id): Modified to take a boolean throw_on_access_error (default: False)
as to whether to raise a Bugzilla.AccessError exception and pass it through to get_bug_id_for_attachment_id().
(Bugzilla.get_bug_id_for_attachment_id): Modified to take a boolean throw_on_access_error (default: False)
as to whether to raise a Bugzilla.AccessError exception if we do not have access to the bug associated with
the specified attachment id.
(Bugzilla.fetch_attachment):
* Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
(MockBugzillaQueries.fetch_attachment_ids_from_review_queue):
(MockBugzilla):
(MockBugzilla.fetch_attachment):
(MockBugzilla.fetch_attachment_contents):
(MockBugzilla.add_patch_to_bug):
* Scripts/webkitpy/common/net/bugzilla/bugzilla_unittest.py:
* Scripts/webkitpy/common/net/bugzilla/constants.py: Added.
* Scripts/webkitpy/common/net/statusserver.py:
(StatusServer)
(StatusServer.__init__): Modified to take an boolean use_https as to whether to query the server using
HTTPS (default: True - use HTTPS).
(StatusServer.set_host): Moved logic to compute the server URL from her to _server_url().
(StatusServer.set_use_https): Added.
(StatusServer.set_api_key): Added.
(StatusServer._server_url): Added.
(StatusServer._authorization_header_name_and_value_pair): Added.
(StatusServer.results_url_for_status): Update to use _server_url().
(StatusServer._post_status_to_server): Ditto.
(StatusServer._post_svn_revision_to_server): Ditto.
(StatusServer._post_work_items_to_server): Ditto.
(StatusServer._upload_attachment_to_server): Added.
(StatusServer.upload_attachment): Added.
(StatusServer._post_work_item_to_ews): Update to use _server_url().
(StatusServer.next_work_item): Ditto.
(StatusServer._post_release_work_item): Ditto.
(StatusServer._post_release_lock): Ditto.
(StatusServer._fetch_attachment_page): Added.
(StatusServer.fetch_attachment): Added.
(StatusServer._fetch_url): Add the API Key to the request if we have one.
(StatusServer.patch_status): Update to use _server_url().
(StatusServer.svn_revision): Ditto.
* Scripts/webkitpy/common/net/statusserver_mock.py:
(MockStatusServer.upload_attachment): Added.
(MockStatusServer.fetch_attachment): Added.
* Scripts/webkitpy/tool/bot/feeders.py:
(EWSFeeder.feed): Modified to download patches on security bugs and upload them to the status server (AppEngine).
* Scripts/webkitpy/tool/commands/download.py:
(ProcessAttachmentsMixin._fetch_list_of_patches_to_process): Modified to handle the case when fetching the
bug details from Bugzilla fail, say because we are not allowed to the view the bug.
(ProcessBugsMixin._fetch_list_of_patches_to_process): Filter out None values for attachments that we failed
to fetch, say because we are not allowed to the view the bug the attachment is on.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem.refetch_patch): For now, refetch the patch from the status server. Ideally, we
need a way to ask the status server to fetch the patch again from Bugzilla (or at least its metadata) so
that the EWS can check the current state of the patch (i.e. is it still marked r?).
* Scripts/webkitpy/tool/commands/queries_unittest.py:
(QueryCommandsTest.test_patches_to_review): Update expected result.
* Scripts/webkitpy/tool/commands/queues.py:
(AbstractPatchQueue._next_patch): Fetch the patch from the status server if we failed to fetch it from
Bugzilla because we do not have permission to view it.
* Scripts/webkitpy/tool/commands/queues_unittest.py:
* Scripts/webkitpy/tool/commands/upload_unittest.py:
(test_upload_of_security_sensitive_patch_with_no_review_and_ews): Added.
* Scripts/webkitpy/tool/main.py:
(WebKitPatch):
(WebKitPatch._status_server_api_key_from_git): Read the API key from the Git configuration key webkit.status_api_key.
(WebKitPatch._status_server_api_key): Read the API key from the environment variable WEBKIT_STATUS_API_KEY.
(WebKitPatch.handle_global_options): Read the API key and update the state of the StatusServer object, if applicable.
* Scripts/webkitpy/tool/steps/obsoletepatches.py:
(ObsoletePatches.run): Modified to handle the case when fetching the bug details from Bugzilla fail, say because we
are not allowed to the view the bug.
* Scripts/webkitpy/tool/steps/submittoews.py:
(SubmitToEWS.run): Upload the contents of the patch and the Bugzilla metadata about it to the status server
if the patch was posted to a security bug.
2018-06-19 Daniel Bates <dabates@apple.com>
QueueStatusServer: "'NoneType' object has no attribute 'message'" in ReleasePatch.get()
when attachment is skipped by queue
https://bugs.webkit.org/show_bug.cgi?id=186748
Reviewed by Lucas Forschler.
Fixes an issue where releasing a patch that was skipped by a queue would cause an AttributeError
in ReleasePatch.get().
When removing a patch from a queue we update queue statistics. As part of this process
we record the last message posted to the status server for the patch. Currently if a patch
is skipped by the queue when picking the next patch to process (say, we failed to fetch the
attachment) then the queue does not post a message to the status server before it asks the
status server to remove the patch from the list of patches the queue needs to process. Instead
the queue should tell the status server that it chose to skip the patch before asking for the
patch to be removed from its list of patches to process.
* Scripts/webkitpy/common/net/bugzilla/attachment.py:
(Attachment.bug_id): Return None if we do not have a bug ID. This can happen if we failed
to fetch the attachment from Bugzilla (say, Bugzilla's markup changed) or we do not have
have permission to view the Bugzilla bug.
* Scripts/webkitpy/common/net/bugzilla/attachment_unittest.py: Added.
(AttachmentTest):
(AttachmentTest.test_no_bug_id):
* Scripts/webkitpy/tool/commands/queues.py:
(AbstractPatchQueue._next_patch): Call AbstractPatchQueue._did_skip() to post a status
update to the status server and then release the work item.
* Scripts/webkitpy/tool/commands/queues_unittest.py:
(AbstractPatchQueueTest.test_next_patch): Update expected result.
2018-06-19 Leo Balter <leonardo.balter@gmail.com>
Test262-Runner: Improve files queue to optimize CPU usage/balancing
https://bugs.webkit.org/show_bug.cgi?id=186443
Reviewed by Michael Saboff.
This patch creates a queue manager for to keep the child process open while the parent process feed each child with test files to run.
* Scripts/test262/Runner.pm:
(processCLI):
(main):
2018-06-19 Wenson Hsieh <wenson_hsieh@apple.com>
[WebKit on watchOS] Vend username text content type when using scribble in login fields
https://bugs.webkit.org/show_bug.cgi?id=186791
<rdar://problem/41226935>
Reviewed by Beth Dakin.
Add testing support for grabbing the current text content type of the focused element.
* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::textContentType const):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::textContentType const):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::textContentType const):
2018-06-19 Robin Morisset <rmorisset@apple.com>
[WSL] Improving the typing rules
https://bugs.webkit.org/show_bug.cgi?id=186310
Rubberstamped by Filip Pizlo.
Several changes:
- added a "well_formed" judgement, and defined it on function definitions (tying together with the typing rules)
- cleaned up the desugaring relation (it now works on normal statements, and deals with for loops correctly)
- added the null literal, the comma operator, the not operator, and parens
- fixed a bunch of minor typographic issues
* WebGPUShadingLanguageRI/SpecWork/WSL_type.ott:
2018-06-18 Robin Morisset <rmorisset@apple.com>
[WSL] Starting to write the spec
https://bugs.webkit.org/show_bug.cgi?id=186310
Rubberstamped by Filip Pizlo.
This is a snapshot of my current work on the WSL spec (I will try to commit more regularly in the future).
WSL.g4 is the grammar, in antlr4 format. I only made minor changes in it since last time.
source/index.rst is the Sphinx document.
It currently only contain a very rough outline, and some TODOs.
It can be compiled with make html or make pdf, and relies on Makefile and source/conf.py.
WSL_exec.ott is the current set of execution rules I have formalized.
They will need a fair bit of refactoring, to account for the new desugaring phase,
to be compatible with whatever memory model we decide on,
and to be explicit about the memory layout of structs and arrays
They can be compiled to latex with OTT (which in turn requires OCaml and opam).
Just ask me by email if you want a pdf of all the rules without having to install all that.
WSL_type.ott is the current set of local typing rules I have formalized.
Like WSL_exex.ott, it is very incomplete, lacking all function calls among other things.
* WebGPUShadingLanguageRI/SpecWork/Makefile: Added.
* WebGPUShadingLanguageRI/SpecWork/WSL.g4:
* WebGPUShadingLanguageRI/SpecWork/WSL_exec.ott: Added.
* WebGPUShadingLanguageRI/SpecWork/WSL_type.ott: Added.
* WebGPUShadingLanguageRI/SpecWork/source: Added.
* WebGPUShadingLanguageRI/SpecWork/source/conf.py: Added.
* WebGPUShadingLanguageRI/SpecWork/source/index.rst: Added.
2018-06-18 Chris Dumez <cdumez@apple.com>
Crash under WebProcessPool::networkProcessFailedToLaunch():
https://bugs.webkit.org/show_bug.cgi?id=186784
<rdar://problem/33535377>
Reviewed by Brady Eidson.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST):
2018-06-18 Zan Dobersek <zdobersek@igalia.com>
[webkitpy] WPTRunner should remove any metadata content before (re)generating it
https://bugs.webkit.org/show_bug.cgi?id=186755
Reviewed by Carlos Garcia Campos.
WPTRunner generates the WPT-compliant metadata content before each test
run. Before it does so, it should remove the complete target directory
for this metadata, allowing any change in the expectations JSON to be
immediately reflected.
For example, if a test failure expectation is removed, the related .ini
metadata file is not generated anymore, but the stale .ini file isn't
removed from the current metadata directory. To avoid this, purging
the metadata directory and regenerating it from scratch should be done
for each test run.
* Scripts/webkitpy/w3c/wpt_runner.py:
(WPTRunner._generate_metadata_directory):
* Scripts/webkitpy/w3c/wpt_runner_unittest.py:
(WPTRunnerTest.test_generate_metadata_directory):
2018-06-12 Darin Adler <darin@apple.com>
[Cocoa] Make some RetainPtr refinements to get more ready for ARC
https://bugs.webkit.org/show_bug.cgi?id=186526
Reviewed by Anders Carlsson.
* DumpRenderTree/mac/LayoutTestHelper.m:
(colorProfileURLForDisplay): Use CFBridgingRelease instead of using
CFAutorelease for a bridging use case.
2018-06-16 Leo Balter <leonardo.balter@gmail.com>
[test262-runner] Handle items from the config list with inline comments
https://bugs.webkit.org/show_bug.cgi?id=186707
Reviewed by Michael Saboff.
This is a workaround for the Yaml parser that bundles inline comments together with any items.
* Scripts/test262/Runner.pm:
(shouldSkip):
2018-06-16 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: option to run test skipped in config file
https://bugs.webkit.org/show_bug.cgi?id=186660
Reviewed by Michael Saboff.
Adds option --skipped-files, -S, to run all files skipped in the
config.yaml file.
* Scripts/test262/Runner.pm:
(processCLI):
(main):
(getBuildPath):
(processFile):
(processResult):
2018-05-18 Basuke Suzuki <basuke.suzuki@sony.com>
Unreviewed, add myself as a WebKit committer.
* Scripts/webkitpy/common/config/contributors.json:
2018-06-15 Chris Dumez <cdumez@apple.com>
Add API test coverage for SW RegistrationDatabase destruction and fix issues found by the test
https://bugs.webkit.org/show_bug.cgi?id=186681
Reviewed by Brady Eidson.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2018-06-15 Brady Eidson <beidson@apple.com>
Crash in both StorageProcess and UIProcess when using custom WKWebsiteDataStores for data management.
<rdar://problem/41019893> and https://bugs.webkit.org/show_bug.cgi?id=186682
Reviewed by Chris Dumez.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST):
2018-06-15 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] Fix adding error in browserperfdash_runner.
Unreviewed follow-up fix after r232820.
* Scripts/webkitpy/browserperfdash/browserperfdash_runner.py:
(BrowserPerfDashRunner.run):
2018-06-15 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK][WKE] Disable memory pressure handling when running layout tests (WTR)
https://bugs.webkit.org/show_bug.cgi?id=186663
Reviewed by Michael Catanzaro.
Disable memory pressure handling when running tests via WTR by
setting WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR=1 on the environment.
* WebKitTestRunner/gtk/main.cpp:
(main):
* WebKitTestRunner/wpe/main.cpp:
(main):
2018-06-15 Jonathan Bedard <jbedard@apple.com>
Add iOS 12 and watchOS 5 to webkitpy
https://bugs.webkit.org/show_bug.cgi?id=186285
Reviewed by Aakash Jain.
* BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
* BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
Trigger the right build queues for iOS 12 on check-in.
* Scripts/webkitpy/common/version_name_map.py:
(VersionNameMap.__init__): Add iOS 12, tvOS 12 and watchOS 5.
* Scripts/webkitpy/common/version_name_map_unittest.py:
(VersionMapTestCase.test_ios_name_by_version): Test iOS 12 version-name mapping.
* Scripts/webkitpy/port/ios_device_unittest.py:
(IOSDeviceTest.test_layout_test_searchpath_without_apple_additions):
* Scripts/webkitpy/port/ios_simulator_unittest.py:
(IOSSimulatorTest.test_layout_test_searchpath_without_apple_additions):
2018-06-14 Saam Barati <sbarati@apple.com>
sun spider compile time benchmark fails in run-jsc-benchmarks with JSC_validateOptions=1
https://bugs.webkit.org/show_bug.cgi?id=186647
Reviewed by Yusuke Suzuki.
Let's use `unset JSC_useBlah` instead of `export JSC_useBlah=` to clear environment
variables. The latter was causing crashes with when JSC_validateOptions was true.
* Scripts/run-jsc-benchmarks:
2018-06-14 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK][buildbot] Raise timeouts for the step benchmark-test on the GTK perf bot
https://bugs.webkit.org/show_bug.cgi?id=186635
Reviewed by Michael Catanzaro.
The current maximum timeout for a run-benchmark test is 1800 (Motionmark plan),
but the buildbot default timeout for the whole step without text output is 1200.
That means that a timeout on a single test can cause a whole step abort because
the buildbot one will trigger first.
Set the benchmark-test step timeout to 2000 to avoid this.
When this benchmark-test was added in r197505 it was already added with a higher
timeout than default (1500) due to the above problem, but it seems this has been
ignored so far because buildbot won't accept the timeout to be set on the class
definition (not even on the class constructor).
The new timeout has to be defined in the addStep call itself.
I have double-checked that by testing locally with the script run-buildbot-test.py
And this upstream issue confirms that https://github.com/buildbot/buildbot/issues/3887
* BuildSlaveSupport/build.webkit.org-config/factories.py:
(BuildAndPerfTestFactory.__init__):
(DownloadAndPerfTestFactory.__init__):
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunBenchmarkTests):
2018-06-14 Roy Reapor <rreapor@apple.com>
Use new jQuery file layout
https://bugs.webkit.org/show_bug.cgi?id=186636
Reviewed by Aakash Jain.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/rebaseline.html:
* TestResultServer/static-dashboards/run-embedded-unittests.html:
2018-06-14 Basuke Suzuki <Basuke.Suzuki@sony.com>
[Win][MiniBrowser] Change to use WebKit by default if it's available
https://bugs.webkit.org/show_bug.cgi?id=186633
When MiniBrowser is built with WebKit, use it by default. Also add command
line switch for WebKitLegacy.
Reviewed by Youenn Fablet.
* MiniBrowser/win/Common.cpp:
(parseCommandLine):
(dllLauncherEntryPoint): Deleted.
* MiniBrowser/win/Common.h:
* MiniBrowser/win/WinMain.cpp:
(wWinMain):
(dllLauncherEntryPoint):
2018-06-14 Matt Lewis <jlewis3@apple.com>
Unreviewed, rolling out r232823.
This caused both test timeouts and api failures.
Reverted changeset:
"[Mail] Use the Mail Viewer width as the base for resolving
horizontal viewport units"
https://bugs.webkit.org/show_bug.cgi?id=186585
https://trac.webkit.org/changeset/232823
2018-06-14 Youenn Fablet <youenn@apple.com>
TestWebKitAPI.WebKit.WKNavigationResponsePDFType fails after r232815
https://bugs.webkit.org/show_bug.cgi?id=186631
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm:
(TEST): Update PDF plug-in identifier.
2018-06-14 Leo Balter <leonardo.balter@gmail.com>
[test262-runner] Improve displayed settings, use rel paths
https://bugs.webkit.org/show_bug.cgi?id=186626
Reviewed by Michael Saboff.
Use relative paths for the information printed in the settings summary after calling the Test262 Runner. This provides a cleaner summary that is easier to read and consume.
* Scripts/test262/Runner.pm:
(processCLI):
(getBuildPath):
2018-06-14 Leo Balter <leonardo.balter@gmail.com>
Test262-Runner: Add more information in the summarized stats
https://bugs.webkit.org/show_bug.cgi?id=185749
Reviewed by Michael Saboff.
This patch adds extra information in the summarized stats for the given results for each run.
This includes a total of files, a total of executed files and a time information per path and feature.
* Scripts/test262/Runner.pm:
(summarizeResults):
2018-06-14 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] Enable tests on the GTK EWS queue
https://bugs.webkit.org/show_bug.cgi?id=186559
Reviewed by Michael Catanzaro.
Enable testing for the gtk-wk2 EWS queue.
* Scripts/webkitpy/common/config/ews.json:
2018-06-14 Valerie R Young <valerie@bocoup.com>
[test262-runner] Test output should summarize tests that are
unexpectedly passing/failing.
https://bugs.webkit.org/show_bug.cgi?id=186527
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(main):
In verbose mode, a summary of all new failing tests
and all new passing tests are printed at the end of
the script output.
2018-06-14 Zan Dobersek <zdobersek@igalia.com>
[GTK][WPE] MiniBrowsers should be able to ignore TLS errors
https://bugs.webkit.org/show_bug.cgi?id=186557
Reviewed by Carlos Garcia Campos.
Add the --ignore-tls-errors flags to the GTK and WPE MiniBrowsers.
Enabling the flag enforces ignoring of TLS errors that occur during
load. This is primarily useful for loading test cases from the wpt or
run-webkit-httpd servers where testing-purpose certificates are used.
* MiniBrowser/gtk/main.c:
(main):
* MiniBrowser/wpe/main.cpp:
(main):
2018-06-13 Adrian Perez de Castro <aperez@igalia.com>
[WPE] Trying to access the remote inspector hits an assertion in the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=186588
Reviewed by Carlos Garcia Campos.
Make both the WPE and GTK+ ports use /org/webkit/inspector as base prefix
for resource paths, which avoids needing a switcheroo depending on the port.
* WebKitTestRunner/InjectedBundle/gtk/TestRunnerGtk.cpp:
(WTR::TestRunner::inspectorTestStubURL):
* glib/generate-inspector-gresource-manifest.py:
2018-06-11 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] Add a script to upload the data generated with run-benchmark to a browserperfdash server and use it on the gtk perf bot
https://bugs.webkit.org/show_bug.cgi?id=166885
Reviewed by Michael Catanzaro.
This patch adds a new script that will execute run-benchmark and upload the results it generates to a browserperfdash web app.
It also modifies the buildbot config file so the GTK performance bot runs this script on the perf-test step.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunBenchmarkTests):
* Scripts/browserperfdash-benchmark: Added.
* Scripts/webkitpy/browserperfdash/README: Added.
* Scripts/webkitpy/browserperfdash/__init__.py: Added.
* Scripts/webkitpy/browserperfdash/browserperfdash_runner.py: Added.
(parse_args):
(BrowserPerfDashRunner):
(BrowserPerfDashRunner.__init__):
(BrowserPerfDashRunner._parse_config_file):
(BrowserPerfDashRunner._get_test_version_string):
(BrowserPerfDashRunner._get_test_data_json_string):
(BrowserPerfDashRunner._upload_result):
(BrowserPerfDashRunner.run):
(format_logger):
(main):
* Scripts/webkitpy/browserperfdash/browserperfdash_unittest.py: Added.
(FakeBenchmarkRunner):
(FakeBenchmarkRunner.__init__):
(FakeBenchmarkRunner.execute):
(BrowserPerfDashRunnerTest):
(BrowserPerfDashRunnerTest.test_list_plans_at_least_five):
(BrowserPerfDashRunnerTest.test_benchmark_runner_subclasses_at_least_two):
(BrowserPerfDashRunnerTest.test_can_construct_runner_object_minimum_parameters):
* Scripts/webkitpy/browserperfdash/config-file-example.txt: Added.
2018-06-13 David Fenton <david_fenton@apple.com>
Unreviewed, add myself as a WebKit committer.
* Scripts/webkitpy/common/config/contributors.json:
2018-06-13 Carlos Alberto Lopez Perez <clopez@igalia.com>
[JSCOnly] Add a MIPS32el JSCOnly EWS (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=186523
Unreviewed follow-up fix after r232748
* Scripts/webkitpy/common/config/ports.py:
(JscOnlyPort.build_jsc_command): It is needed to pass a --jsc-only argument to the build-jsc script.
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_jsconly_port):
2018-06-12 Thibault Saunier <tsaunier@igalia.com>
webkitpy: Implement coredumpctl support on linux
https://bugs.webkit.org/show_bug.cgi?id=184039
Reviewed by Daniel Bates.
And start using an Executive to run subprocesses
in GDBCrashLogGenerator.
Unit tests adapted to the new API and still passing.
* Scripts/webkitpy/port/linux_get_crash_log.py:
(GDBCrashLogGenerator):
(GDBCrashLogGenerator._get_trace_from_systemd):
(GDBCrashLogGenerator.generate_crash_log):
2018-06-12 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: fix one test (can't find jsc)
https://bugs.webkit.org/show_bug.cgi?id=186573
Reviewed by Michael Saboff.
* Scripts/webkitperl/test262_unittest/test262-runner-tests.pl:
fix subtest to use mock JSC
2018-06-12 Tim Horton <timothy_horton@apple.com>
Add a API test for r232601
https://bugs.webkit.org/show_bug.cgi?id=186417
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
(immediateSubviewOfClass):
(TEST):
Ensure that we put the view hierarchy back together (move WKContentView
out of the animated resize view) and unhide WKContentView after a
resize-with-hidden-content.
2018-06-12 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: add unit tests
https://bugs.webkit.org/show_bug.cgi?id=185783
Reviewed by Michael Saboff.
* Scripts/webkitperl/test262_unittest/README: Added.
* Scripts/webkitperl/test262_unittest/fixtures/expectations-compare.yaml: Added.
* Scripts/webkitperl/test262_unittest/fixtures/expectations.yaml: Added.
* Scripts/webkitperl/test262_unittest/fixtures/mock-jsc-fail-new-error.pl: Added.
* Scripts/webkitperl/test262_unittest/fixtures/mock-jsc-fail.pl: Added.
* Scripts/webkitperl/test262_unittest/fixtures/mock-jsc-pass.pl: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-failing-with-new-error.js: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-failing.js: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-passing.js: Added.
(f):
* Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-pass-now-failing.js: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/fail.js: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/pass.js: Added.
(f):
* Scripts/webkitperl/test262_unittest/test262-runner-tests.pl: Added.
2018-06-12 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: minor updates
https://bugs.webkit.org/show_bug.cgi?id=186399
- If harness files cannot be found in a CLI supplied
test262 path, then default to webkit's test262 harness files.
- Lazily create the test262-results directory (only right before
writing to it)
- If an expectation file is supplied via the CLI, save to the
supplied location instead of the default webkit location
(JSTest/test262/expectation.yaml).
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(processCLI):
(main):
(compileTest):
(processResult):
(getHarness):
(summarizeResults):
2018-06-11 Carlos Alberto Lopez Perez <clopez@igalia.com>
[JSCOnly] Add a MIPS32el JSCOnly EWS
https://bugs.webkit.org/show_bug.cgi?id=186523
Reviewed by Michael Catanzaro.
Add a new jsc-mips-ews queue that will execute build-jsc for the jsc-only (Linux) port.
The worker(s) on this queue should be pre-configured to cross-build JSC for MIPS32el.
* QueueStatusServer/config/queues.py:
* QueueStatusServer/model/queues.py:
(Queue.display_name):
* Scripts/webkitpy/common/config/ews.json:
* Scripts/webkitpy/common/config/ports.py:
(DeprecatedPort.port):
(WpePort.run_webkit_tests_command):
(JscOnlyPort):
(JscOnlyPort.build_jsc_command):
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_wincairo_port):
(DeprecatedPortTest):
(DeprecatedPortTest.test_jsconly_port):
* Scripts/webkitpy/port/factory.py:
(PortFactory):
* Scripts/webkitpy/port/jsc_only.py: Added. Add a basic port definition. Required by the EWS tooling.
(JscOnlyPort):
(JscOnlyPort.__init__):
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
(test_ews_name):
2018-06-12 Zan Dobersek <zdobersek@igalia.com>
Add run-web-platform-tests script
https://bugs.webkit.org/show_bug.cgi?id=183356
Reviewed by Carlos Alberto Lopez Perez.
Add the run-web-platform-tests script that allows running WebKit builds
against the external web-platform-tests project.
The script sets up all the port-specific information, including the
display driver. If no web-platform-tests repository location is
specified, the TestDownloader utility is used to clone the repository,
and path to that clone is leveraged instead.
Port-specific TestManifest.ini and TestExpectations.json file paths are
then constructed, bailing if any of the files is missing. The JSON file
is then used to construct the metadata file tree, creating an .ini file
for each test that is disabled, has a certain expectation, or has
subtests that themselves have certain expectations. This metadata tree
is built under the build directory, and is purged and reconstructed for
each separate run.
Lastly, the WPT python module is imported from the web-platform-tests
source location, and wpt.main() is invoked along with all the necessary
arguments that set up a web-platform-tests suite run using the WebKit
product.
* Scripts/run-web-platform-tests: Added.
* Scripts/webkitpy/common/config/ports_mock.py:
(MockPort.run_bindings_tests_command):
(MockPort):
(MockPort.wpt_metadata_directory):
(MockPort.wpt_manifest_file):
* Scripts/webkitpy/port/base.py:
(Port.wpt_metadata_directory):
(Port):
(Port.wpt_manifest_file):
* Scripts/webkitpy/w3c/common.py:
(is_file_exportable):
(WPTPaths):
(WPTPaths.checkout_directory):
(WPTPaths.wpt_checkout_path):
* Scripts/webkitpy/w3c/test_downloader.py:
(TestDownloader.clone_tests):
(TestDownloader):
(TestDownloader.download_tests):
* Scripts/webkitpy/w3c/test_exporter.py:
(WebPlatformTestExporter.__init__):
* Scripts/webkitpy/w3c/wpt_runner.py: Added.
(main):
(parse_args):
(create_webdriver):
(spawn_wpt):
(WPTRunner):
(WPTRunner.__init__):
(WPTRunner._prepare_wpt_checkout):
(WPTRunner._generate_metadata_directory):
(WPTRunner.run):
* Scripts/webkitpy/w3c/wpt_runner_unittest.py: Added.
(WPTRunnerTest):
(WPTRunnerTest.MockTestDownloader):
(WPTRunnerTest.MockTestDownloader.default_options):
(WPTRunnerTest.MockTestDownloader.__init__):
(WPTRunnerTest.MockTestDownloader.clone_tests):
(WPTRunnerTest.MockWebDriver):
(WPTRunnerTest.MockWebDriver.create):
(WPTRunnerTest.MockWebDriver.binary_path):
(WPTRunnerTest.MockWebDriver.browser_path):
(WPTRunnerTest.MockWebDriver.browser_args):
(WPTRunnerTest.MockSpawnWPT):
(WPTRunnerTest.MockSpawnWPT.__init__):
(WPTRunnerTest.MockSpawnWPT.__call__):
(WPTRunnerTest.TestInstance):
(WPTRunnerTest.TestInstance.__init__):
(WPTRunnerTest.TestInstance.prepare_mock_files_for_run):
(WPTRunnerTest.test_prepare_wpt_checkout):
(WPTRunnerTest.test_prepare_wpt_checkout_specified_path):
(WPTRunnerTest.test_generate_metadata_directory):
(WPTRunnerTest.test_run):
(WPTRunnerTest.test_run_with_specified_options):
(WPTRunnerTest.test_run_with_args):
2018-06-11 Mark Lam <mark.lam@apple.com>
Add support for webkit-test-runner jscOptions in DumpRenderTree and WebKitTestRunner.
https://bugs.webkit.org/show_bug.cgi?id=186451
<rdar://problem/40875792>
Reviewed by Tim Horton.
This jscOptions option can be used by a layout test to specify some JSC runtime
options needed by the test e.g. by adding something like this to the top of the
html file after the DOCTYPE tag:
<!-- webkit-test-runner [ jscOptions=--useIntlPluralRules=true ] -->
If more than one option is needed, the options can be specified as a comma
separated string e.g.
<!-- webkit-test-runner [ jscOptions=--useIntlPluralRules=true,--useZombieMode=true ] -->
This only works with JSC options that can be changed at runtime. Not all JSC
options can be changed this way as some options are only checked and set once at
VM / process initialization time: changing this type of options may have no
effect. It's the test writer's responsibility to determine which options are
appropriate for with this webkit-test-runner jscOptions option.
This implementation is a workaround until we can change the run-webkit-tests
scripts to parse the option and apply it to a new launch of DRT or WKTR:
https://bugs.webkit.org/show_bug.cgi?id=186452
* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
(TestOptions::webViewIsCompatibleWithOptions const):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(setJSCOptions):
(resetWebViewToConsistentStateBeforeTesting):
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
2018-06-11 Brady Eidson <beidson@apple.com>
Add a command line default to force WebKitTestRunner to turn on process swap on navigation.
https://bugs.webkit.org/show_bug.cgi?id=186534
Reviewed by Chris Dumez.
Right now Process Swap On Navigation is enabled on a per-test basis.
The future is to enable it by default.
Adding a 'defaults write' helps us get to that future.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::testOptionsForTest const):
(WTR::TestController::platformAddTestOptions const):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformAddTestOptions const):
2018-06-11 Chris Dumez <cdumez@apple.com>
Allow enabling PSON in layout tests without window.open support
https://bugs.webkit.org/show_bug.cgi?id=186537
Reviewed by Geoffrey Garen.
Allow enabling PSON in layout tests without window.open support since window.open support
is far from being ready and we plan to enable PSON in layout tests soon.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
2018-06-11 Brady Eidson <beidson@apple.com>
Followup to [Cocoa] Remove all uses of NSAutoreleasePool as part of preparation for ARC
https://bugs.webkit.org/show_bug.cgi?id=186436
Patch by Darin Adler
Reviewed by Brady Eidson.
* TestWebKitAPI/Tests/mac/StopLoadingFromDidFinishLoading.mm:
(TestWebKitAPI::TEST):
2018-06-11 Mark Lam <mark.lam@apple.com>
Gardening: skip BigInt tests on iOS until the feature is stable.
<rdar://problem/40331121>
Not reviewed.
* Scripts/run-jsc-stress-tests:
2018-06-11 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] Add WebKitBrowserWindow class for modern WebKit API
https://bugs.webkit.org/show_bug.cgi?id=186478
Reviewed by Alex Christensen.
Added "New WebKit Window" and "New WebKitLegacy Window" menu
items. Disabled the menu item "New WebKit Window" if
!ENABLE(WEBKIT).
* MiniBrowser/win/CMakeLists.txt: Added WebKitBrowserWindow.cpp
source file and ENABLE_WEBKIT macro if ENABLE_WEBKIT.
* MiniBrowser/win/MainWindow.cpp:
(MainWindow::MainWindow):
(MainWindow::create):
(MainWindow::init):
(MainWindow::WndProc):
* MiniBrowser/win/MainWindow.h:
* MiniBrowser/win/MiniBrowserLib.rc:
* MiniBrowser/win/MiniBrowserLibResource.h:
* MiniBrowser/win/PrintWebUIDelegate.cpp:
(PrintWebUIDelegate::createWebViewWithRequest):
* MiniBrowser/win/WebKitBrowserWindow.cpp: Added.
(createString):
(toUtf8):
(createWKString):
(createWKURL):
(WebKitBrowserWindow::create):
(WebKitBrowserWindow::WebKitBrowserWindow):
(WebKitBrowserWindow::init):
(WebKitBrowserWindow::hwnd):
(WebKitBrowserWindow::loadURL):
(WebKitBrowserWindow::loadHTMLString):
(WebKitBrowserWindow::navigateForwardOrBackward):
(WebKitBrowserWindow::navigateToHistory):
(WebKitBrowserWindow::setPreference):
(WebKitBrowserWindow::print):
(WebKitBrowserWindow::launchInspector):
(WebKitBrowserWindow::setUserAgent):
(WebKitBrowserWindow::userAgent):
(WebKitBrowserWindow::showLayerTree):
(WebKitBrowserWindow::updateStatistics):
(WebKitBrowserWindow::resetZoom):
(WebKitBrowserWindow::zoomIn):
(WebKitBrowserWindow::zoomOut):
(toWebKitBrowserWindow):
(WebKitBrowserWindow::didReceiveTitleForFrame):
(WebKitBrowserWindow::didCommitLoadForFrame):
* MiniBrowser/win/WebKitBrowserWindow.h:
* MiniBrowser/win/WinMain.cpp:
(wWinMain):
2018-06-11 Keith Miller <keith_miller@apple.com>
Add missing whitespace to run-jsc command
https://bugs.webkit.org/show_bug.cgi?id=186528
Reviewed by Mark Lam.
* Scripts/run-jsc:
2018-06-11 Philippe Normand <pnormand@igalia.com>
[webkitpy] PHP7.2 support on Debian platforms
https://bugs.webkit.org/show_bug.cgi?id=186521
Reviewed by Michael Catanzaro.
* Scripts/webkitpy/port/base.py:
(Port._debian_php_version): Refactor and add PHP 7.2 version support.
2018-06-11 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix WPE API and layout tests after r232670.
Now that dyz is not installed, there's not -default.so symlink for the WPE backend, so we need to use
WPE_BACKEND_LIBRARY environment variable to ensure tests are run with fdo backend.
* Scripts/run-wpe-tests:
(WPETestRunner.__init__):
(WPETestRunner):
(WPETestRunner.setup_testing_environment):
* Scripts/webkitpy/port/wpe.py:
(WPEPort.setup_environ_for_server):
* glib/api_test_runner.py:
(TestRunner.setup_testing_environment):
(TestRunner.run_tests):
(TestRunner._setup_testing_environment): Deleted.
2018-06-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] Add API run run javascript from a WebKitWebView in an isolated world
https://bugs.webkit.org/show_bug.cgi?id=186192
Reviewed by Michael Catanzaro.
Add tests cases for the new API.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewRunJavaScript):
* TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
(methodCallCallback):
(webkit_web_extension_initialize_with_user_data):
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(runJavaScriptInWorldReadyCallback):
(WebViewTest::runJavaScriptFromGResourceAndWaitUntilFinished):
(WebViewTest::runJavaScriptInWorldAndWaitUntilFinished):
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
2018-06-10 Carlos Garcia Campos <cgarcia@igalia.com>
[WPE] Add a MiniBrowser and use it to run WebDriver tests
https://bugs.webkit.org/show_bug.cgi?id=186345
Reviewed by Žan Doberšek.
Most of the code is based on dyz and gtk MiniBrowser. This patch adds a new internal library WPEToolingBackends,
including the headless view backend and a new window backend to be used by the MiniBrowser. MiniBrowser can also
run in headless mode, by using the headless backend instead of the window one, which will allow us to run the
WebDriver tests in the bots.
* CMakeLists.txt:
* MiniBrowser/wpe/CMakeLists.txt: Added.
* MiniBrowser/wpe/main.cpp: Added.
(automationStartedCallback):
(createViewBackend):
(main):
* Scripts/run-minibrowser: Remove WPE specific code.
* Scripts/run-webdriver-tests: Add headless display-server option.
* Scripts/webkitdirs.pm:
(launcherName): Remove WPE specific code.
* Scripts/webkitpy/webdriver_tests/webdriver_driver_wpe.py:
(WebDriverWPE.browser_name): Return MiniBrowser.
(WebDriverWPE.browser_path): Return the path to the MiniBrowser in build dir.
(WebDriverWPE.browser_args): Add --headless when running in headless mode.
(WebDriverWPE.capabilities): Use the full browser path.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py:
(WebDriverTestRunnerSelenium.collect_tests): Fix early return value.
* TestWebKitAPI/PlatformWPE.cmake: Use WPEToolingBackends instead of HeadlessViewBackend.
* TestWebKitAPI/PlatformWebView.h: Ditto.
* TestWebKitAPI/glib/PlatformWPE.cmake: Ditto
* TestWebKitAPI/glib/WebKitGLib/TestMain.h:
(Test::createWebViewBackend): Ditto.
* TestWebKitAPI/wpe/PlatformWebViewWPE.cpp:
(TestWebKitAPI::PlatformWebView::initialize): Ditto.
* WebKitTestRunner/PlatformWPE.cmake: Ditto.
* WebKitTestRunner/PlatformWebView.h: Ditto.
* WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
(WTR::PlatformWebView::PlatformWebView): Ditto.
* wpe/HeadlessViewBackend/CMakeLists.txt: Removed.
* wpe/backends/CMakeLists.txt: Added.
* wpe/backends/HeadlessViewBackend.cpp: Renamed from Tools/wpe/HeadlessViewBackend/HeadlessViewBackend.cpp.
(WPEToolingBackends::getEGLDisplay):
(WPEToolingBackends::HeadlessViewBackend::HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::~HeadlessViewBackend):
(WPEToolingBackends::HeadlessViewBackend::createSnapshot):
(WPEToolingBackends::HeadlessViewBackend::performUpdate):
(WPEToolingBackends::HeadlessViewBackend::displayBuffer):
* wpe/backends/HeadlessViewBackend.h: Renamed from Tools/wpe/HeadlessViewBackend/HeadlessViewBackend.h.
* wpe/backends/ViewBackend.cpp: Added.
(WPEToolingBackends::ViewBackend::ViewBackend):
(WPEToolingBackends::ViewBackend::~ViewBackend):
(WPEToolingBackends::ViewBackend::initialize):
(WPEToolingBackends::ViewBackend::setInputClient):
(WPEToolingBackends::ViewBackend::backend const):
(WPEToolingBackends::ViewBackend::dispatchInputPointerEvent):
(WPEToolingBackends::ViewBackend::dispatchInputAxisEvent):
(WPEToolingBackends::ViewBackend::dispatchInputKeyboardEvent):
* wpe/backends/ViewBackend.h: Added.
* wpe/backends/WindowViewBackend.cpp: Added.
(WPEToolingBackends::WindowViewBackend::WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::~WindowViewBackend):
(WPEToolingBackends::WindowViewBackend::displayBuffer):
(WPEToolingBackends::WindowViewBackend::handleKeyEvent):
* wpe/backends/WindowViewBackend.h: Added.
* wpe/jhbuild.modules: Remove dyz and add wayland-protocols.
2018-06-10 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] MiniBrowser class should be renamed to WebKitLegacyBrowserWindow
https://bugs.webkit.org/show_bug.cgi?id=186427
Reviewed by Ryosuke Niwa.
* MiniBrowser/win/AccessibilityDelegate.cpp:
* MiniBrowser/win/AccessibilityDelegate.h:
(AccessibilityDelegate::AccessibilityDelegate):
* MiniBrowser/win/CMakeLists.txt: Removed MiniBrowser.cpp. Added WebKitLegacyBrowserWindow.cpp.
* MiniBrowser/win/Common.h:
* MiniBrowser/win/MainWindow.cpp:
(MainWindow::init):
* MiniBrowser/win/MainWindow.h:
* MiniBrowser/win/MiniBrowserWebHost.cpp:
* MiniBrowser/win/MiniBrowserWebHost.h:
(MiniBrowserWebHost::MiniBrowserWebHost):
* MiniBrowser/win/PageLoadTestClient.cpp:
(PageLoadTestClient::PageLoadTestClient):
* MiniBrowser/win/PageLoadTestClient.h:
* MiniBrowser/win/PrintWebUIDelegate.cpp:
(PrintWebUIDelegate::createWebViewWithRequest):
* MiniBrowser/win/PrintWebUIDelegate.h:
(PrintWebUIDelegate::PrintWebUIDelegate):
* MiniBrowser/win/ResourceLoadDelegate.cpp:
* MiniBrowser/win/ResourceLoadDelegate.h:
(ResourceLoadDelegate::ResourceLoadDelegate):
* MiniBrowser/win/WebKitLegacyBrowserWindow.cpp: Renamed from Tools/MiniBrowser/win/MiniBrowser.cpp.
* MiniBrowser/win/WebKitLegacyBrowserWindow.h: Renamed from Tools/MiniBrowser/win/MiniBrowser.h.
* MiniBrowser/win/WebDownloadDelegate.cpp:
(WebDownloadDelegate::WebDownloadDelegate):
* MiniBrowser/win/WebDownloadDelegate.h:
2018-06-10 Chris Dumez <cdumez@apple.com>
Reload the Web view in case of crash if the client does not implement webViewWebContentProcessDidTerminate delegate
https://bugs.webkit.org/show_bug.cgi?id=186468
Reviewed by Geoffrey Garen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
(-[BasicNavigationDelegateWithoutCrashHandler webView:didStartProvisionalNavigation:]):
(-[BasicNavigationDelegateWithoutCrashHandler webView:didFinishNavigation:]):
(TEST):
2018-06-10 Michael Catanzaro <mcatanzaro@igalia.com>
[WPE][GTK] paypal.com requires user agent quirk
https://bugs.webkit.org/show_bug.cgi?id=186466
Reviewed by Carlos Garcia Campos.
* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::TEST):
2018-06-09 Dan Bernstein <mitz@apple.com>
[Xcode] Clean up and modernize some build setting definitions
https://bugs.webkit.org/show_bug.cgi?id=186463
Reviewed by Sam Weinig.
* DumpRenderTree/mac/Configurations/Base.xcconfig: Removed definition for macOS 10.11.
Simplified the definition of WK_PRIVATE_FRAMEWORK_STUBS_DIR now that
WK_XCODE_SUPPORTS_TEXT_BASED_STUBS is true for all supported Xcode versions.
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: Removed definition for macOS
10.11.
* MiniBrowser/Configurations/Base.xcconfig: Ditto.
* MiniBrowser/Configurations/DebugRelease.xcconfig: Ditto.
* TestWebKitAPI/Configurations/Base.xcconfig: Ditto.
* TestWebKitAPI/Configurations/DebugRelease.xcconfig: Ditto.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Simplified the definitions of
ENABLE_APPLE_PAY and ENABLE_VIDEO_PRESENTATION_MODE now macOS 10.12 is the earliest
supported version.
* TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig: Removed definitions for
macOS 10.11.
* WebKitTestRunner/Configurations/Base.xcconfig: Ditto. Also simplified the definition of
WK_PRIVATE_FRAMEWORK_STUBS_DIR now that WK_XCODE_SUPPORTS_TEXT_BASED_STUBS is true for all
supported Xcode versions
* WebKitTestRunner/Configurations/DebugRelease.xcconfig: Removed definition for macOS 10.11.
2018-06-09 Dan Bernstein <mitz@apple.com>
Added missing file references to the Configuration group.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2018-06-08 Darin Adler <darin@apple.com>
[Cocoa] Remove all uses of NSAutoreleasePool as part of preparation for ARC
https://bugs.webkit.org/show_bug.cgi?id=186436
Reviewed by Anders Carlsson.
* TestWebKitAPI/Tests/WebKitObjC/CustomProtocolsTest.mm:
(TestWebKitAPI::WebKit2CustomProtocolsTest_ProcessPoolDestroyedDuringLoading):
Use @autoreleasepool.
* TestWebKitAPI/Tests/mac/MenuTypesForMouseEvents.mm:
(TestWebKitAPI::buildAndPerformTest): Ditto.
* TestWebKitAPI/Tests/mac/StopLoadingFromDidFinishLoading.mm:
(TestWebKitAPI::WebKitLegacy_StopLoadingFromDidFinishLoading): Ditto.
2018-06-08 Wenson Hsieh <wenson_hsieh@apple.com>
[WebKit on watchOS] Upstream watchOS source additions to OpenSource (Part 1)
https://bugs.webkit.org/show_bug.cgi?id=186442
<rdar://problem/40879364>
Reviewed by Tim Horton.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-06-08 Alicia Boya García <aboya@igalia.com>
[GTK] Update to libva-2.1.0 in jhbuild
https://bugs.webkit.org/show_bug.cgi?id=186434
Reviewed by Philippe Normand.
* gstreamer/jhbuild.modules:
2018-06-07 Yusuke Suzuki <utatane.tea@gmail.com>
[WTF] Add WorkerPool
https://bugs.webkit.org/show_bug.cgi?id=174569
Reviewed by Carlos Garcia Campos.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/WorkerPool.cpp: Added.
(TestWebKitAPI::TEST):
2018-06-07 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] Add a new BrowserWindow interface to abstract WK1 and WK2 BrowserWindow
https://bugs.webkit.org/show_bug.cgi?id=186421
Reviewed by Ryosuke Niwa.
This is the core patch to make MiniBrowser to support WK1 and WK2
windows (Bug 184770).
I will rename MiniBrowser class to WK1BrowserWindow in a follow-up
patch (Bug 184770 Comment 12).
* MiniBrowser/win/BrowserWindow.h: Added.
* MiniBrowser/win/MainWindow.cpp:
(MainWindow::WndProc):
* MiniBrowser/win/MainWindow.h:
(MainWindow::browserWindow const):
* MiniBrowser/win/MiniBrowser.cpp:
(MiniBrowser::create):
(MiniBrowser::navigateForwardOrBackward): Removed the unsed first argument hWnd.
(MiniBrowser::navigateToHistory): Ditto.
* MiniBrowser/win/MiniBrowser.h: Inherit BrowserWindow interface.
Make all other methods private and make delegates classes friends.
* MiniBrowser/win/PrintWebUIDelegate.cpp:
(PrintWebUIDelegate::createWebViewWithRequest):
2018-06-07 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] MiniBrowser::updateDeviceScaleFactor should be a MainWindow's method
https://bugs.webkit.org/show_bug.cgi?id=186387
Reviewed by Ryosuke Niwa.
MiniBrowser::updateDeviceScaleFactor does nothing for MiniBrowser.
It should be a MainWindow's method.
* MiniBrowser/win/MainWindow.cpp:
(MainWindow::init): Call MainWindow::updateDeviceScaleFactor.
(MainWindow::resizeSubViews): Do not set a font every time window size is changed.
(MainWindow::WndProc): Call MainWindow::updateDeviceScaleFactor on WM_DPICHANGED.
(MainWindow::updateDeviceScaleFactor): Converted from
MiniBrowser::updateDeviceScaleFactor and
MiniBrowser::generateFontForScaleFactor. Set a URL bar's font if DPI is changed.
* MiniBrowser/win/MainWindow.h:
* MiniBrowser/win/MiniBrowser.cpp:
(MiniBrowser::init):
(MiniBrowser::generateFontForScaleFactor): Deleted.
(MiniBrowser::updateDeviceScaleFactor): Deleted.
* MiniBrowser/win/MiniBrowser.h:
(MiniBrowser::deviceScaleFactor): Deleted.
(MiniBrowser::urlBarFont): Deleted.
2018-06-07 Jonathan Bedard <jbedard@apple.com>
[webkitpy] Treat svn versions as Version objects
https://bugs.webkit.org/show_bug.cgi?id=186403
<rdar://problem/40904860>
Reviewed by Dan Bernstein.
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVN.svn_version): Return Version object instead of string.
(SVN._status_regexp): Convert version string to Version object.
(SVN.add_list): Ditto.
2018-06-07 Tadeu Zagallo <tzagallo@apple.com>
Don't try to allocate JIT memory if we don't have the JIT entitlement
https://bugs.webkit.org/show_bug.cgi?id=182605
<rdar://problem/38271229>
Reviewed by Mark Lam.
Add the Security framework to the TestWTF target, since it's required by the new function to check the entitlements.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
2018-06-07 Mark Lam <mark.lam@apple.com>
Enhance run-jsc-stress-tests to allow a test to specify test specific options required for it to run.
https://bugs.webkit.org/show_bug.cgi?id=186409
<rdar://problem/40909007>
Reviewed by Saam Barati.
This is needed because some tests are written with specific features in mind, and
we may not necessarily want to enable that option for all tests.
We can now specify something like this at the top of a test file:
//@ requireOptions("--useIntlPluralRules=true")
... and ensure that that test will be run with the --useIntlPluralRules=true
option for all test configurations that run the test.
* Scripts/run-jsc-stress-tests:
2018-06-07 Tim Horton <timothy_horton@apple.com>
REGRESSION (r232544): [iOS] TestWebKitAPI.WebKit.OverrideLayoutSizeChangesDuringAnimatedResizeSucceed is failing
https://bugs.webkit.org/show_bug.cgi?id=186395
<rdar://problem/40902427>
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
(TEST):
endAnimatedResize no longer synchronizes, so we have to wait for the next presentation update.
2018-06-07 Thibault Saunier <tsaunier@igalia.com>
[GTK][WPE] Start implementing MediaStream API
https://bugs.webkit.org/show_bug.cgi?id=185787
Reviewed by Philippe Normand.
* Scripts/webkitpy/style/checker.py: Apply special formatting rules for new GObject subclasses.
* gstreamer/jhbuild.modules: Added a patch for the gst-plugins-base.
* gstreamer/patches/gst-plugins-base-0001-parsebin-Post-STREAM_COLLECTION-on-EVENT_STREAM_COLL.patch:
Added this fix to gst-plugings-base to fix the decodebin3. Merged as 89d0e9cc92a86aa0227ee87406737b6d31670aea
2018-06-07 Brendan McLoughlin <brendan@bocoup.com>
Update web-platform-tests github location in webkitpy.w3c.test_importer
https://bugs.webkit.org/show_bug.cgi?id=186392
Reviewed by Youenn Fablet.
* Scripts/webkitpy/w3c/test_importer.py:
(TestImporter.write_import_log):
2018-06-07 Jonathan Bedard <jbedard@apple.com>
webkitperl: Generalize .internal SDK suffix
https://bugs.webkit.org/show_bug.cgi?id=186352
<rdar://problem/40853947>
Reviewed by Alexey Proskuryakov.
* Scripts/build-webkit:
* Scripts/package-root:
(usage):
* Scripts/webkitdirs.pm:
(parseAvailableXcodeSDKS): Parse 'xcodebuild -showsdks' output.
(availableXcodeSDKS): Generate a list of all available Xcode SDKs on this machine.
(determineXcodeSDK): Always prefer .internal SDKs if available.
* Scripts/webkitperl/webkitdirs_unittest/availableXcodeSDKS.pl:
2018-06-07 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] Support multiple windows properly
https://bugs.webkit.org/show_bug.cgi?id=186263
Reviewed by Ryosuke Niwa.
The current implementation of
PrintWebUIDelegate::createWebViewWithRequest is wrong. It is using
CreateProcess to open a new window, and doesn't return the new
instance of IWebView. As the result, for example, window.close
doesn't work as expected.
In this change, a new MainWindow is created and return the
IWebView in PrintWebUIDelegate::createWebViewWithRequest.
In addition to it, this change unifies the lifetime of MiniBrowser
and its delegates AccessibilityDelegate, PrintWebUIDelegate,
ResourceLoadDelegate and WebDownloadDelegate in order to keep
MiniBrowser alive as long as the delegates live. Because the
window of webview keeps references of such delegates and accesses
those after MiniBrowser destruction.
* MiniBrowser/win/MainWindow.h: Added s_numInstances class member
to count the number of instance to close the application. Do not
use unique_ptr for m_browserWindow because it has ref count now.
* MiniBrowser/win/MainWindow.cpp:
(MainWindow::MainWindow): Increment s_numInstances.
(MainWindow::~MainWindow): Decrement s_numInstances.
(MainWindow::create):
(MainWindow::init):
(MainWindow::WndProc): Rename thiz to thisWindow. Keep this
instance alive during this function by using RefPtr<MainWindow>.
Deref the MainWindow instance on WM_DESTROY. Quit the application
when the last MainWindow is closed.
(MainWindow::cachesDialogProc): Rename thiz to thisWindow.
(MainWindow::customUserAgentDialogProc): Ditto.
* MiniBrowser/win/MiniBrowser.h: Added declarations AddRef and Release.
* MiniBrowser/win/MiniBrowser.cpp:
(MiniBrowser::create):
(MiniBrowser::AddRef):
(MiniBrowser::Release):
(MiniBrowser::init): Passes this to the constructors of delegates.
* MiniBrowser/win/AccessibilityDelegate.cpp:
(AccessibilityDelegate::AddRef): Delegate to MiniBrowser.
(AccessibilityDelegate::Release): Ditto.
* MiniBrowser/win/AccessibilityDelegate.h: Removed m_refCount.
(AccessibilityDelegate::AccessibilityDelegate):
* MiniBrowser/win/MiniBrowserWebHost.cpp:
(MiniBrowserWebHost::AddRef): Delegate to MiniBrowser.
(MiniBrowserWebHost::Release): Ditto.
* MiniBrowser/win/MiniBrowserWebHost.h: Removed m_refCount.
* MiniBrowser/win/PrintWebUIDelegate.cpp:
(PrintWebUIDelegate::createWebViewWithRequest): Create a new
MainWindow and return the IWebView.
(PrintWebUIDelegate::AddRef): Delegate to MiniBrowser.
(PrintWebUIDelegate::Release): Ditto.
* MiniBrowser/win/PrintWebUIDelegate.h: Removed m_refCount.
(PrintWebUIDelegate::PrintWebUIDelegate):
* MiniBrowser/win/ResourceLoadDelegate.cpp:
(ResourceLoadDelegate::AddRef): Delegate to MiniBrowser.
(ResourceLoadDelegate::Release): Ditto.
* MiniBrowser/win/ResourceLoadDelegate.h: Removed m_refCount.
* MiniBrowser/win/WebDownloadDelegate.cpp:
(WebDownloadDelegate::WebDownloadDelegate):
(WebDownloadDelegate::AddRef): Delegate to MiniBrowser.
(WebDownloadDelegate::Release): Ditto.
* MiniBrowser/win/WebDownloadDelegate.h: Removed m_refCount.
2018-06-06 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] Remove gMainWindow global variable
https://bugs.webkit.org/show_bug.cgi?id=186378
Reviewed by Ryosuke Niwa.
I'm going to support multiple MainWindow in Bug 186263. It should
not be assumed that MainWindow has only one instance. gMainWindow
is used only in DisplayAuthDialog.
* MiniBrowser/win/Common.cpp:
(authDialogProc): Use DWLP_USER to store the dialog data.
(displayAuthDialog): Moved and renamed from
MainWindow::displayAuthDialog. Use DialogBoxParam instead of
DialogBox to pass a data pointer. Do not return S_OK if
DialogBoxParam returns -1. Take a HWND argument as the parent
window.
(DisplayAuthDialog): Deleted.
* MiniBrowser/win/Common.h:
* MiniBrowser/win/MainWindow.cpp:
(authDialogProc): Moved to Common.cpp.
(MainWindow::displayAuthDialog): Ditto.
* MiniBrowser/win/MainWindow.h:
* MiniBrowser/win/ResourceLoadDelegate.cpp:
(ResourceLoadDelegate::didReceiveAuthenticationChallenge):
* MiniBrowser/win/WinMain.cpp:
(wWinMain): Added a local variable mainWindow instead of using
gMainWindow.
2018-06-06 Dan Bernstein <mitz@apple.com>
[Xcode] Opt out of the New Build System
https://bugs.webkit.org/show_bug.cgi?id=186380
Reviewed by Alexey Proskuryakov.
* Scripts/webkitdirs.pm:
(XcodeOptions): Have -UseNewBuildSystem=NO passed to xcodebuild.
2018-06-06 Antoine Quint <graouts@apple.com>
Rename color-filter to -apple-color-filter and do not expose it to Web content
https://bugs.webkit.org/show_bug.cgi?id=186306
<rdar://problem/39874167>
Reviewed by Simon Fraser.
Adding an option to turn support for the -apple-color-filter property on via an HTML comment.
* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::platformCreateWebView):
2018-06-06 Brent Fulgham <bfulgham@apple.com>
Adjust compile and runtime flags to match shippable state of features (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=186319
<rdar://problem/40352045>
Unreviewed test fix.
TestWebKitAPI was timing out because 'color' input types are no longer support. I also discovered that the
ASSERT_STREQ macro returns on error, which causes tests to time out whenever a 'done = true' call (needed to
end the test) is done after ASSERT_STREQ, which might fail and return early, preventing the flag from being
set.
* TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsTextField.mm:
(-[InjectedBundleNodeHandleIsTextField webProcessPlugIn:didCreateBrowserContextController:]): Make testing of
the 'color' input type conditional on the feature being part of the build.
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[AutoFillDelegate _webView:didClickAutoFillButtonWithUserInfo:]): Set the 'done=true' state before performing
string equality assertions, since they do an early return and bypass the end state of the test.
(-[DidResignInputElementStrongPasswordAppearanceDelegate _webView:didResignInputElementStrongPasswordAppearanceWithUserInfo:]): Ditto.
(-[AutoFillAvailableDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): Ditto.
(-[InjectedBundleNodeHandleIsTextFieldDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]): Ditto.
2018-06-05 Chris Dumez <cdumez@apple.com>
Regression(r232082): Websites get loaded inside of Messages App chat transcript
https://bugs.webkit.org/show_bug.cgi?id=186331
<rdar://problem/40735446>
Reviewed by Darin Adler.
Add API test coverage.
* TestWebKitAPI/Tests/mac/NoPolicyDelegateResponse.mm:
(-[NoDecidePolicyForNavigationActionDecisionDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):
(-[NoDecidePolicyForNavigationActionDecisionDelegate webView:didStartProvisionalLoadForFrame:]):
(TestWebKitAPI::TEST):
(-[NoPolicyDelegateDecisionDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]): Deleted.
(-[NoPolicyDelegateDecisionDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]): Deleted.
(-[NoPolicyDelegateDecisionDelegate webView:didFinishLoadForFrame:]): Deleted.
2018-06-05 Wenson Hsieh <wenson_hsieh@apple.com>
DataInteractionTests ContentEditableToTextarea and ContentEditableToContentEditable are failing on recent iOS 12
https://bugs.webkit.org/show_bug.cgi?id=186325
<rdar://problem/40527850>
Reviewed by Tim Horton.
Tweak these API tests so that they're robust against changes to how NSAttributedStrings are serialized in item
providers ("public.rtf" vs. "com.apple.flat-rtfd"). Across all versions of iOS, just verify that either rich
text type is present in the list of dragged type identifiers, and that the rich text type is placed at a higher
fidelity than plain text.
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(checkRichTextTypePrecedesPlainTextType):
(TestWebKitAPI::TEST):
(checkTypeIdentifierPrecedesOtherTypeIdentifier): Deleted.
2018-06-05 Brent Fulgham <bfulgham@apple.com>
Adjust compile and runtime flags to match shippable state of features
https://bugs.webkit.org/show_bug.cgi?id=186319
<rdar://problem/40352045>
Reviewed by Maciej Stachowiak, Jon Lee, and others.
This patch revises the compile time and runtime state for various features to match their
suitability for end-user releases.
* TestWebKitAPI/Configurations/DebugRelease.xcconfig: Update to match WebKit definition of
WK_RELOCATABLE_FRAMEWORKS so that ENABLE(EXPERIMENTAL_FEATURES) is defined properly for
Cocoa builds.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Don't build ENABLE_INPUT_TYPE_COLOR
or ENABLE_INPUT_TYPE_COLOR_POPOVER.
2018-06-05 Saam Barati <sbarati@apple.com>
run-testmem should have a dry run option and an option to parse the stdout of executing the dry run
https://bugs.webkit.org/show_bug.cgi?id=186293
Reviewed by Mark Lam.
This makes it easier to execute run-testmem on a device that doesn't have ruby
on it. run-testmem now has a --dry option that will output commands to execute
in bash. To run on a device that doesn't have ruby, just put its output into
a bash script, and copy the PerformanceTests/testmem directory onto that device,
and execute the bash script. Running that bash script will give you raw output.
Make a file with that output and pass it into run-testmem using the --parse option.
run-testmem will parse the raw output and compute the benchmark score.
* Scripts/run-testmem:
2018-06-05 Youenn Fablet <youenn@apple.com>
ServiceWorker registration should store any script fetched through importScripts
https://bugs.webkit.org/show_bug.cgi?id=182444
<rdar://problem/37164835>
Reviewed by Chris Dumez.
Add support to crash the storage process from Internals.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::terminateStorageProcess):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::terminateStorageProcess):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
2018-06-05 Brent Fulgham <bfulgham@apple.com>
Revise DEFAULT_EXPERIMENTAL_FEATURES_ENABLED to work properly on Apple builds
https://bugs.webkit.org/show_bug.cgi?id=186286
<rdar://problem/40782992>
Reviewed by Dan Bernstein.
Use the WK_RELOCATABLE_FRAMEWORKS flag (which is always defined for non-production builds)
to define ENABLE(EXPERIMENTAL_FEATURES) so that we do not need to manually
change this flag when preparing for a production release.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Use WK_RELOCATABLE_FRAMEWORKS to
determine whether experimental features should be enabled, and use it to properly define
the feature flag.
2018-06-05 Robin Morisset <rmorisset@apple.com>
Add a grammar (in antlr4 format) to the WSL spec.
https://bugs.webkit.org/show_bug.cgi?id=186310
Rubberstamped by Filip Pizlo
It is just the raw rules, without much comments and no typesetting.
Compiles to any of Java/JS/C++/etc.. with antlr4 (requires a JDK)
It does not exactly match the parser of the current js implementation of WSL, it:
- Accepts negative literals
- Reserves keywords fallthrough/auto
- Refuses '_' as a valid identifier
- Accepts several capitalizations for Null/True/False
- Accepts variable declarations at the top-level
- Correctly parses ternary expressions
- Forbids empty extension list for protocols
- Does not allow a space between '[' and ']' in type suffixes
- Correctly parses nested generics
- Accepts a 'fallthrough;' statement (for switches)
- Refuses chained relational operator (e.g. x < y < z)
- Generally a completely different structure for parsing effectful expressions, although it probably accepts about the same language
- Currently only accepts literals and identifiers as constexpr (while the js parser accepts way too much, including '(x += 42)')
There are probably more differences that I missed. The js parser will probably have to be mostly rewritten to follow the spec more closely (and fix all the bugs).
I will try to see if it can be automatically derived from the antlr4 grammar.
* WebGPUShadingLanguageRI/SpecWork/WSL.g4: Added.
2018-06-04 Frederic Wang <fwang@igalia.com>
import-w3c-tests should rely on <meta name="flags"> to detect CSS manual tests
https://bugs.webkit.org/show_bug.cgi?id=186261
Reviewed by Youenn Fablet.
* Scripts/webkitpy/w3c/test_parser.py:
(TestParser.is_wpt_manualtest): Add code to detect whether a file is a manual test
from its <meta name="flags"> tags. This is based on SourceFile::content_is_css_manual from
the WPT repository.
* Scripts/webkitpy/w3c/test_parser_unittest.py: Add a test to verify whether files with
<meta name="flags"> are manual or non-manual according to CSS WG rules.
2018-06-04 Dan Bernstein <mitz@apple.com>
Fixed building ImageDiff with the default build system in the Xcode 10 developer beta.
* ImageDiff/cg/Configurations/Base.xcconfig: Use #include? to include
HaveInternalSDK.xcconfig, since it may not be preent.
2018-06-04 Dan Bernstein <mitz@apple.com>
Fixed building TestWebKitAPI with a shared build directory with XCBuild, which is the
default build system in the Xcode 10 developer beta.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Changed the reference to the
built libWTF.a to be relative to the built products directory.
2018-06-04 Chris Dumez <cdumez@apple.com>
Rename "Cross-Origin-Options" HTTP header to "Cross-Origin-Window-Policy"
https://bugs.webkit.org/show_bug.cgi?id=186287
<rdar://problem/40783352>
Reviewed by Youenn Fablet.
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
2018-06-04 Daniel Bates <dabates@apple.com>
Typo in MockBugzillaQueries.fetch_attachment_ids_from_review_queue()
https://bugs.webkit.org/show_bug.cgi?id=186290
Reviewed by Aakash Jain.
Although the usefulness of the code in MockBugzillaQueries.fetch_attachment_ids_from_review_queue() is
questionable we should fix a typo when calling this mocked function with argument since.
* Scripts/webkitpy/common/net/bugzilla/bugzilla_mock.py:
(MockBugzillaQueries.fetch_attachment_ids_from_review_queue):
2018-06-04 Dan Bernstein <mitz@apple.com>
Fixed building with the macOS Mojave seed SDK.
* TestWebKitAPI/Tests/mac/MediaPlaybackSleepAssertion.mm:
2018-06-04 Alexey Proskuryakov <ap@apple.com>
Add Mojave support to WebKit tools
https://bugs.webkit.org/show_bug.cgi?id=186282
Reviewed by Daniel Bates.
Nightly build support will be added separately.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Images/Mojave@2x.png: Added.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
Added dashboard support.
* BuildSlaveSupport/build.webkit.org-config/wkbuild.py:
* BuildSlaveSupport/build.webkit.org-config/wkbuild_unittest.py:
Trigger the right build queues on check-in.
* Scripts/webkitpy/common/version_name_map.py:
* Scripts/webkitpy/common/version_name_map_unittest.py:
The main version mapping class updated.
* Scripts/webkitpy/layout_tests/models/test_expectations.py:
* Scripts/webkitpy/port/mac_unittest.py:
Updated for more platforms in unit tests.
* TestResultServer/static-dashboards/flakiness_dashboard.js:
Added the new platform to flakiness dashboard.
2018-06-04 Wenson Hsieh <wenson_hsieh@apple.com>
[WebKit on watchOS] Remove all uses of the EXTRA_ZOOM_MODE compiler flag
https://bugs.webkit.org/show_bug.cgi?id=186279
Reviewed by Tim Horton.
Replaces uses of ENABLE(EXTRA_ZOOM_MODE) with PLATFORM(WATCHOS).
* TestWebKitAPI/Tests/ios/RenderingProgressTests.mm:
2018-06-03 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] Remove gMiniBrowser global variable
https://bugs.webkit.org/show_bug.cgi?id=186134
Reviewed by Brent Fulgham.
It should not be assumed there is only one main window and one browser
window to support multiple windows properly. gMainWindow and
gMiniBrowser global variables should be removed. This change
removes gMiniBrowser.
* MiniBrowser/win/Common.cpp: Removed gMiniBrowser global variable.
* MiniBrowser/win/Common.h: Ditto.
* MiniBrowser/win/MainWindow.cpp:
(MainWindow::init):
(MainWindow::WndProc):
(EditProc): Post WM_COMMAND if the enter key is pressed in URL bar.
(MainWindow::cachesDialogProc): Renamed from Caches.
(MainWindow::customUserAgentDialogProc): Renamed from CustomUserAgent.
(MainWindow::onURLBarEnter): Extracted from EditProc.
(BackButtonProc): Deleted.
(ForwardButtonProc): Deleted.
(Caches): Renamed to MainWindow::cachesDialogProc.
(CustomUserAgent): Renamed to MainWindow::customUserAgentDialogProc.
* MiniBrowser/win/MainWindow.h: Convert hCacheWnd global variable to a member variable of MainWindow.
* MiniBrowser/win/MiniBrowserLibResource.h:
* MiniBrowser/win/WinMain.cpp:
(wWinMain):
2018-06-02 Darin Adler <darin@apple.com>
[Cocoa] Update some code to be more ARC-compatible to prepare for future ARC adoption
https://bugs.webkit.org/show_bug.cgi?id=186227
Reviewed by Dan Bernstein.
* DumpRenderTree/mac/AccessibilityCommonMac.mm:
(+[NSString stringWithJSStringRef:]): Use CFBridgingRelease instead of autorelease.
(-[NSString createJSStringRef]): Add __bridge to a bridging typecast.
* DumpRenderTree/mac/AccessibilityControllerMac.mm: Add a missing include.
* DumpRenderTree/mac/AccessibilityNotificationHandler.mm:
(-[NSString createJSStringRef]): Add __bridge to a bridging typecast.
* DumpRenderTree/mac/AccessibilityTextMarkerMac.mm:
(AccessibilityTextMarker::isEqual): Ditto.
(AccessibilityTextMarkerRange::isEqual): Ditto.
* DumpRenderTree/mac/DumpRenderTree.mm:
(-[DumpRenderTree _waitForWebThread]): Use @autoreleasepool instead of NSAutoreleasePool.
(DumpRenderTreeMain): Ditto.
(WebThreadLockAfterDelegateCallbacksHaveCompleted): Ditto.
(runTest): Ditto.
* DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
(copyFile): Use a std::pair to return both a URL and an error rather than using an
out argument for the NSError.
(-[DumpRenderTreeFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]):
Updated for the above change.
* DumpRenderTree/mac/DumpRenderTreeWindow.mm:
(-[DumpRenderTreeWindow _addToOpenWindows]): Add __bridge to a bridging typecast.
(-[DumpRenderTreeWindow close]): Ditto.
* DumpRenderTree/mac/LayoutTestHelper.m:
(setDisplayColorProfile): Ditto.
* DumpRenderTree/mac/PolicyDelegate.mm: Add a missing include.
* DumpRenderTree/mac/ResourceLoadDelegate.mm:
(-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
Add __bridge to a bridging typecast.
* DumpRenderTree/mac/TestRunnerMac.mm:
(-[APITestDelegateIPhone initWithTestRunner:utf8Data:baseURL:]): Ditto.
(TestRunner::apiTestNewWindowDataLoadBaseURL): Use @autoreleasepool instead of NSAutoreleasePool.
* DumpRenderTree/mac/TextInputControllerMac.m: Fix a comment.
* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::replaceTextAtRange): Add __bridge to a bridging typecast.
(WTR::UIScriptController::contentsOfUserInterfaceItem const): Ditto.
(WTR::UIScriptController::overridePreference): Ditto.
* DumpRenderTree/mac/WorkQueueItemMac.mm:
(LoadItem::invoke const): Ditto.
(LoadHTMLStringItem::invoke const): Ditto.
(ScriptItem::invoke const): Ditto.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(+[NSString stringWithJSStringRef:]): Use CFBridgingRelease instead of autorelease.
(-[NSString createJSStringRef]): Add __bridge to a bridging typecast.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityCommonMac.mm:
(+[NSString stringWithJSStringRef:]): Use CFBridgingRelease instead of autorelease.
(-[NSString createJSStringRef]): Add __bridge to a bridging typecast.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityControllerMac.mm:
(WTR::AccessibilityController::accessibleElementById): Add __bridge to a bridging typecast.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityNotificationHandler.mm:
(-[NSString createJSStringRef]): Ditto.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerMac.mm:
(WTR::AccessibilityTextMarker::isEqual): Ditto.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityTextMarkerRangeMac.mm:
(WTR::AccessibilityTextMarkerRange::isEqual): Ditto.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::setSelectedVisibleTextRange): Ditto.
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker): Ditto.
(WTR::AccessibilityUIElement::textMarkerRangeLength): Ditto.
(WTR::AccessibilityUIElement::previousTextMarker): Ditto.
(WTR::AccessibilityUIElement::nextTextMarker): Ditto.
(WTR::AccessibilityUIElement::stringForTextMarkerRange): Ditto.
(WTR::AccessibilityUIElement::textMarkerRangeForMarkers): Ditto.
(WTR::AccessibilityUIElement::startTextMarkerForTextMarkerRange): Ditto.
(WTR::AccessibilityUIElement::endTextMarkerForTextMarkerRange): Ditto.
(WTR::AccessibilityUIElement::accessibilityElementForTextMarker): Ditto.
(WTR::createJSStringRef): Ditto.
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange): Ditto.
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions): Ditto.
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeContainsAttribute): Ditto.
(WTR::AccessibilityUIElement::indexForTextMarker): Ditto.
(WTR::AccessibilityUIElement::isTextMarkerValid): Ditto.
(WTR::AccessibilityUIElement::leftWordTextMarkerRangeForTextMarker): Ditto.
(WTR::AccessibilityUIElement::rightWordTextMarkerRangeForTextMarker): Ditto.
(WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker): Ditto.
(WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker): Ditto.
(WTR::AccessibilityUIElement::paragraphTextMarkerRangeForTextMarker): Ditto.
(WTR::AccessibilityUIElement::previousParagraphStartTextMarkerForTextMarker): Ditto.
(WTR::AccessibilityUIElement::nextParagraphEndTextMarkerForTextMarker): Ditto.
(WTR::AccessibilityUIElement::sentenceTextMarkerRangeForTextMarker): Ditto.
(WTR::AccessibilityUIElement::previousSentenceStartTextMarkerForTextMarker): Ditto.
(WTR::AccessibilityUIElement::nextSentenceEndTextMarkerForTextMarker): Ditto.
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::initializeWebViewConfiguration): Ditto.
(WTR::TestController::platformContext): Ditto.
(WTR::TestController::platformPreferences): Ditto.
(WTR::TestController::platformAdjustContext): Ditto.
* WebKitTestRunner/mac/PlatformWebViewMac.mm:
(WTR::PlatformWebView::PlatformWebView): Ditto.
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::initializeInjectedBundlePath): Ditto.
(WTR::TestController::initializeTestPluginDirectory): Ditto.
(WTR::TestController::platformConfigureViewForTest): Ditto.
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::nsString): Use CFBridgingRelease instead of autorelease.
(WTR::UIScriptController::platformPlayBackEventStream): Add __bridge to a bridging
typecast.
* WebKitTestRunner/mac/WebKitTestRunnerDraggingInfo.mm: Add a missing include.
* WebKitTestRunner/mac/WebKitTestRunnerPasteboard.mm:
(-[LocalPasteboard setPropertyList:forType:]): Add _bridge to a bridging typecast.
(-[LocalPasteboard setString:forType:]): Ditto.
* WebKitTestRunner/mac/main.mm:
(main): Use @autoreleasepool instead of NSAutoreleasePool.
2018-06-02 Keith Miller <keith_miller@apple.com>
run-jsc should pass the option to use dollar vm by default
https://bugs.webkit.org/show_bug.cgi?id=186170
Reviewed by Yusuke Suzuki.
* Scripts/run-jsc:
2018-06-02 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r232421.
https://bugs.webkit.org/show_bug.cgi?id=186240
Breaks webkitpy tests (Requested by aakashjain on #webkit).
Reverted changeset:
"Add some tests for lldb_webkit.py"
https://bugs.webkit.org/show_bug.cgi?id=183744
https://trac.webkit.org/changeset/232421
2018-06-01 Daniel Bates <dabates@apple.com>
Add some tests for lldb_webkit.py
https://bugs.webkit.org/show_bug.cgi?id=183744
Reviewed by Alexey Proskuryakov.
Adds some tests to ensure we do not regress LLDB pretty-printing of WTF::StringImpl
and WTF::String objects.
The tests make use of the LLDB Python API (lldb.py) and a simple debug-built test
program, lldbWebKitTester, to run. For now, we only support building lldbWebKitTester
on Mac.
* Makefile: Build the simple test tool lldbWebKitTester on Mac.
* Scripts/build-lldbwebkittester: Added.
(buildProjectOrDie):
* Scripts/dump-class-layout: Extract logic to compute the path to the LLDB Python module
from here to Scripts/webkitpy/common/system/systemhost.py so that it can used by both
this script and lldb/lldb_webkit_unittest.py. Also import the lldb module at the top of
the file and take advantage of Python's default error semantics to throw an exception
if the import fails instead of handling it ourself. This has the side effect that we
now always import the LLDB Python module even if this script is invoked with --help.
If this turns out to be a significant annoyance then we can look to dynamically import
the module as we did before this change.
(webkit_build_dir):
(main):
(developer_dir): Deleted.
(import_lldb): Deleted.
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py: Update FIXME comment to reflect
that fact that test-webkitpy does not support class and module fixtures. This is because
test-webkitpy currently implements parallelism by breaking down existing test classes
into individual test methods itself and having each worker run exactly one test method (via
unittest.TestLoader.loadTestsFromName()) at a time. As a result of this reorganization,
setUpModule()/setUpClass() are called for each test method as opposed to once per test
class/test module.
(remove_dir): Ditto.
* Scripts/webkitpy/common/system/systemhost.py:
(SystemHost):
(SystemHost.path_to_lldb_python_directory): Added.
* Scripts/webkitpy/test/main.py:
(_find_lldb_webkit_tester): Returns whether there exists a Debug or Release-built lldbWebKitTester.
(_build_lldb_webkit_tester): Builds lldbWebKitTester. For now, we only support building
lldbWebKitTester on Mac.
(main): Add Tools/lldb to the test search path if the platform has lldb.py.
(Tester.run): Pass a boolean as to whether we will run the lldb_webkit unit tests.
(Tester._run_tests): Modified to take a boolean as to whether to run the lldb_webkit unit tests.
If we will run these tests then build lldbWebKitTester if it has not already been built as the
unit tests depend on this program.
* lldb/lldbWebKitTester/Configurations/Base.xcconfig: Added.
* lldb/lldbWebKitTester/Configurations/DebugRelease.xcconfig: Added.
* lldb/lldbWebKitTester/Configurations/lldbWebKitTester.xcconfig: Added.
* lldb/lldbWebKitTester/Makefile: Added.
* lldb/lldbWebKitTester/lldbWebKitTester.xcodeproj/project.pbxproj: Added.
* lldb/lldbWebKitTester/main.cpp: Added.
(breakForTestingSummaryProviders):
(utf16String):
(testSummaryProviders):
(main):
* lldb/lldb_webkit_unittest.py: Added.
(destroy_cached_debug_session):
(LLDBDebugSession):
(LLDBDebugSession.setup):
(LLDBDebugSession.tearDown):
(TestSummaryProviders):
(TestSummaryProviders.setUpClass):
(TestSummaryProviders._sbFrame):
(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_null_string):
(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_empty_string):
(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_8bit_string):
(TestSummaryProviders.serial_test_WTFStringImpl_SummaryProvider_16bit_string):
(TestSummaryProviders.serial_test_WTFString_SummaryProvider_null_string):
(TestSummaryProviders.serial_test_WTFString_SummaryProvider_empty_string):
(TestSummaryProviders.serial_test_WTFString_SummaryProvider_8bit_string):
(TestSummaryProviders.serial_test_WTFString_SummaryProvider_16bit_string):
2018-06-01 Frederic Wang <fwang@igalia.com>
export-w3c-test-changes cannot apply patches when some w3c-import.log files are changed
https://bugs.webkit.org/show_bug.cgi?id=186133
Reviewed by Youenn Fablet.
* Scripts/webkitpy/w3c/test_exporter.py: Exclude w3c-import.log from the diff.
* Scripts/webkitpy/w3c/test_exporter_unittest.py: Add unit test.
2018-05-31 Frederic Wang <fwang@igalia.com>
export-w3c-test-changes should use the new location & name of the WPT repo
https://bugs.webkit.org/show_bug.cgi?id=186135
Reviewed by Youenn Fablet.
Web platform tests have been moved to GitHub's web-platform-tests/wpt. This patch updates the
corresponding variables to use the new organization and repository name. It also refactors a
bit the code to reduce the amount of hardcoded strings.
* Scripts/webkitpy/w3c/common.py: Use org web-platform-tests, repo name wpt. Also removes the
final slash to WPT_GH_URL, so it can be used for repo URL too.
* Scripts/webkitpy/w3c/test_exporter.py: Import more symbols and define WPT_PR_URL from
WPT_GH_URL.
(WebPlatformTestExporter._wpt_fork_branch_github_url): Use WPT_GH_REPO_NAME.
(WebPlatformTestExporter._wpt_fork_push_url): Use WPT_GH_REPO_NAME.
(WebPlatformTestExporter._git): Use WPT_GH_URL.
(WebPlatformTestExporter._ensure_username_and_token): Use WPT_GH_ORG, WPT_GH_REPO_NAME.
(WebPlatformTestExporter.make_pull_request): Use WPT_GH_ORG, WPT_GH_REPO_NAME.
(parse_args): Use WPT_GH_REPO_NAME, WPT_GH_URL.
* Scripts/webkitpy/w3c/test_exporter_unittest.py:
(TestExporterTest.test_export): Update organization and repository names for the remote
branch and pull request.
(TestExporterTest.test_export_with_specific_branch): Update repository name.
2018-05-31 Ryan Haddad <ryanhaddad@apple.com>
Update expected results for BuildStepsConstructorTest
https://bugs.webkit.org/show_bug.cgi?id=186119
Reviewed by Alex Christensen.
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Add missing entries for 'WinCairo 64-bit' bots.
2018-05-31 Sihui Liu <sihui_liu@apple.com>
[iOS] TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPool fails because cookies use different files with/without processpool
https://bugs.webkit.org/show_bug.cgi?id=185831
<rdar://problem/40468716>
Reviewed by David Kilzer.
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(-[CookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):
2018-05-31 Chris Dumez <cdumez@apple.com>
[iOS] API test ScrollViewInsetTests.InnerHeightWithLargeTopContentInset is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=184893
<rdar://problem/39747271>
Reviewed by Wenson Hsieh.
Update test to wait until the view is the expected height instead of
calling waitForNextPresentationUpdate once and expect the view to
have the right height. This fixes the flakiness.
* TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:
(TestWebKitAPI::waitUntilInnerHeightIs):
(TestWebKitAPI::TEST):
2018-05-31 Leo Balter <leonardo.balter@gmail.com>
test262-runner should run in verbose mode in automation
https://bugs.webkit.org/show_bug.cgi?id=186115
Reviewed by Yusuke Suzuki.
This patch toggles the verbose mode in the build bot and reports every test file
in order to avoid the '1200 seconds without output' issue.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunTest262Tests):
* Scripts/test262/Runner.pm:
(processResult):
2018-05-30 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] Move MainWindow related code from Common.cpp to MainWindow.cpp
https://bugs.webkit.org/show_bug.cgi?id=186079
Reviewed by Alex Christensen.
This is a sub task of Bug 184770.
This change is partial. I'm going to remove global variables
gMainWindow and gMiniBrowser and convert more functions to
MainWindow's methods in follow-up patches.
* MiniBrowser/win/CMakeLists.txt: Added Common.cpp
* MiniBrowser/win/Common.cpp:
(menuItemIsChecked): Moved to MainWindow.cpp.
(turnOffOtherUserAgents): Ditto.
(EditProc): Ditto.
(BackButtonProc): Ditto.
(ForwardButtonProc): Ditto.
(About): Ditto.
(Caches): Ditto.
(CustomUserAgent): Ditto.
(AuthDialogProc): Ditto.
(DisplayAuthDialog): Converted to MainWindow's method.
(ToggleMenuItem): Ditto.
(loadURL): Ditto.
* MiniBrowser/win/Common.h:
* MiniBrowser/win/MainWindow.cpp:
(MainWindow::init): Call SetFocus at the end of the construction.
(MainWindow::WndProc):
(menuItemIsChecked): Moved from Common.cpp.
(turnOffOtherUserAgents): Ditto.
(EditProc): Ditto.
(BackButtonProc): Ditto.
(ForwardButtonProc): Ditto.
(About): Ditto.
(Caches): Ditto.
(CustomUserAgent): Ditto.
(authDialogProc): Ditto.
(MainWindow::displayAuthDialog): Converted from a function of Common.cpp.
(MainWindow::toggleMenuItem): Ditto.
(MainWindow::loadURL): Ditto.
* MiniBrowser/win/MainWindow.h: Added method declarations.
* MiniBrowser/win/MiniBrowser.h: Added pragma once.
* MiniBrowser/win/WinMain.cpp:
(wWinMain): Include Common.h instead of Common.cpp.
2018-05-30 Brady Eidson <beidson@apple.com>
REGRESSION (r224684): User-agent seen by page does not change when modified by the develop menu options after reloading.
<rdar://problem/34918109> and https://bugs.webkit.org/show_bug.cgi?id=186111
Reviewed by Andy Estes.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setCustomUserAgent):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2018-05-30 Youenn Fablet <youenn@apple.com>
Rename CrossOriginResourcePolicy same to same-origin
https://bugs.webkit.org/show_bug.cgi?id=186080
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp:
(TestWebKitAPI::TEST):
2018-05-30 Ms2ger <Ms2ger@igalia.com>
[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=186098
Unreviewed gardening.
* TestWebKitAPI/glib/TestExpectations.json: update expectations.
2018-05-29 Youenn Fablet <youenn@apple.com>
Add a consistency check between URL and CFURL
https://bugs.webkit.org/show_bug.cgi?id=182444
<rdar://problem/37164835>
Reviewed by Geoff Garen.
DRT code expected a non null URL which is no longer the case now.
Updated DRT to remove that assumption.
* DumpRenderTree/TestRunner.cpp:
(TestRunner::redirectionDestinationForURL):
* DumpRenderTree/TestRunner.h:
* DumpRenderTree/mac/ResourceLoadDelegate.mm:
(-[ResourceLoadDelegate webView:resource:willSendRequest:redirectResponse:fromDataSource:]):
2018-05-29 Brendan McLoughlin <brendan@bocoup.com>
Export changes to web-platform-test as part of the webkit-patch upload workflow
https://bugs.webkit.org/show_bug.cgi?id=184914
Reviewed by Youenn Fablet.
* Scripts/webkitpy/tool/commands/upload.py:
(Upload):
(CreateBug.execute):
(WPTChangeExport):
* Scripts/webkitpy/tool/steps/__init__.py:
* Scripts/webkitpy/tool/steps/wptchangeexport.py: Added.
(WPTChangeExport):
(WPTChangeExport.options):
(WPTChangeExport.run):
* Scripts/webkitpy/w3c/common.py:
* Scripts/webkitpy/w3c/test_exporter.py:
(WebPlatformTestExporter):
(WebPlatformTestExporter.__init__):
(WebPlatformTestExporter.username):
(WebPlatformTestExporter.token):
(WebPlatformTestExporter._github):
(WebPlatformTestExporter._wpt_fork_branch_github_url):
(WebPlatformTestExporter._wpt_fork_remote):
(WebPlatformTestExporter._wpt_fork_push_url):
(WebPlatformTestExporter._git):
(WebPlatformTestExporter._branch_name):
(WebPlatformTestExporter._public_branch_name):
(WebPlatformTestExporter._wpt_patch):
(WebPlatformTestExporter.has_wpt_changes):
(WebPlatformTestExporter._find_filename):
(WebPlatformTestExporter._is_ignored_file):
(WebPlatformTestExporter._strip_ignored_files_from_diff):
(WebPlatformTestExporter.write_git_patch_file):
(WebPlatformTestExporter._prompt_for_token):
(WebPlatformTestExporter._prompt_for_username):
(WebPlatformTestExporter._ensure_username_and_token):
(WebPlatformTestExporter._validate_and_save_token):
(WebPlatformTestExporter.create_branch_with_patch):
(WebPlatformTestExporter.push_to_wpt_fork):
(WebPlatformTestExporter.make_pull_request):
(WebPlatformTestExporter.delete_local_branch):
(WebPlatformTestExporter.create_upload_remote_if_needed):
(WebPlatformTestExporter.do_export):
(parse_args):
(TestExporter): Deleted.
(TestExporter.__init__): Deleted.
(TestExporter._ensure_wpt_repository): Deleted.
(TestExporter._fetch_wpt_repository): Deleted.
(TestExporter._ensure_new_branch_name): Deleted.
(TestExporter.download_and_commit_patch): Deleted.
(TestExporter.clean): Deleted.
(TestExporter.create_branch_with_patch): Deleted.
(TestExporter.push_to_wpt_fork): Deleted.
(TestExporter.make_pull_request): Deleted.
(TestExporter.create_wpt_pull_request): Deleted.
(TestExporter.delete_local_branch): Deleted.
(TestExporter.create_git_patch): Deleted.
(TestExporter.create_upload_remote): Deleted.
(TestExporter.do_export): Deleted.
* Scripts/webkitpy/w3c/test_exporter_unittest.py:
(TestExporterTest.MockGit):
(TestExporterTest.MockGit.create_patch):
(TestExporterTest.test_export):
(TestExporterTest.test_export_with_specific_branch):
(TestExporterTest):
(TestExporterTest.test_export_interactive_mode):
(TestExporterTest.test_export_invalid_token):
(TestExporterTest.test_export_wrong_token):
(TestExporterTest.test_has_wpt_changes):
(TestExporterTest.test_has_no_wpt_changes_for_no_diff):
(TestExporterTest.test_ignore_changes_to_expected_file):
2018-05-29 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] Move WK1 specific code from Common.cpp to MiniBrowser.cpp
https://bugs.webkit.org/show_bug.cgi?id=186029
Reviewed by Alex Christensen.
This is a sub task of Bug 184770.
* MiniBrowser/win/Common.cpp:
(ToggleMenuItem): Extracted WK1 specific code to MiniBrowser::setPreference.
(Caches): Call MiniBrowser::updateStatistics instead of updateStatistics.
(AbortProc): Moved to MiniBrowser.cpp.
(getPrinterDC): Ditto.
(initDocStruct): Ditto.
(PrintView): Ditto.
(ToggleMenuFlag): Ditto.
(setWindowText): Ditto.
(updateStatistics): Ditto.
* MiniBrowser/win/MainWindow.cpp:
(MainWindow::WndProc): Call MiniBrowser::print instead of PrintView.
* MiniBrowser/win/MiniBrowser.cpp:
(AbortProc): Moved from Common.cpp.
(getPrinterDC): Moved from Common.cpp.
(initDocStruct): Moved from Common.cpp.
(setWindowText): Moved from Common.cpp.
(MiniBrowser::print): Renamed from PrintView of Common.cpp.
(MiniBrowser::updateStatistics): Renamed from updateStatistics of Common.cpp.
(MiniBrowser::setPreference): Extracted from ToggleMenuItem of Common.cpp.
* MiniBrowser/win/MiniBrowser.h: Add method declarations.
* MiniBrowser/win/MiniBrowserWebHost.cpp: Removed duplicated IWebFramePtr typedef.
2018-05-29 Saam Barati <sbarati@apple.com>
JSC should put bmalloc's scavenger into mini mode
https://bugs.webkit.org/show_bug.cgi?id=185988
Reviewed by Michael Saboff.
This patch makes it so that we turn off the JIT when running run-testmem
that way we make JSC use its mini mode.
* Scripts/run-testmem:
2018-05-29 Sihui Liu <sihui_liu@apple.com>
Unable to remove IndexedDB Databases with Cocoa API removeDataOfTypes
https://bugs.webkit.org/show_bug.cgi?id=185835
<rdar://problem/39142257>
Reviewed by Chris Dumez.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
(TEST):
2018-05-29 Wenson Hsieh <wenson_hsieh@apple.com>
[Extra zoom mode] "Significant area painted" rendering progress event is rarely fired
https://bugs.webkit.org/show_bug.cgi?id=186042
<rdar://problem/40604182>
Reviewed by Tim Horton.
Adds a new API test to check that the "significant area painting" rendering milestone is dispatched when a
significant portion of the page has been painted before document load is finished.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/paint-significant-area-milestone.html: Added.
* TestWebKitAPI/Tests/ios/RenderingProgressTests.mm: Added.
(-[MissingResourceSchemeHandler webView:stopURLSchemeTask:]):
(-[MissingResourceSchemeHandler webView:startURLSchemeTask:]):
(-[RenderingProgressHandler initWithHandler:]):
(-[RenderingProgressHandler _webView:renderingProgressDidChange:]):
(TEST):
2018-05-29 Thibault Saunier <tsaunier@igalia.com>
[GStreamer] Update "qtdemux: Clarify field name about stream-encryption-system" patch
https://bugs.webkit.org/show_bug.cgi?id=186040
The patch we merge contained a type and was merged in upstream GStreamer fixing that
(s/avalaible/available/).
Reviewed by Xabier Rodriguez-Calvar.
* gstreamer/patches/gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch:
2018-05-28 Sihui Liu <sihui_liu@apple.com>
Add an API test to check process privilege when using Cookie API
https://bugs.webkit.org/show_bug.cgi?id=185406
Reviewed by Geoffrey Garen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TEST):
2018-05-28 Thibault Saunier <tsaunier@igalia.com>
[GStreamer] Handle changes in the "drm-preferred-decryption-system-id" NEED_CONTEXT message.
https://bugs.webkit.org/show_bug.cgi?id=185948
Reviewed by Xabier Rodriguez-Calvar.
When the patch introducing gst_protection_filter_systems_by_available_decryptors was merged, we changed sensibly its behaviour
concerning the way empty results is represented (now returning NULL instead of an array of 1(NULL) element) and this change was not
properly taken into account in the qtdemux patch that uses it and got upstreamed. Those 3 new patches fixe that and change the
NEED_CONTEXT field names to clarify the meaning of "stream-encryption-systems".
* gstreamer/jhbuild.modules:
* gstreamer/patches/gst-plugins-good-0001-qtdemux-Do-not-run-the-preferred-decryptor-context-q.patch: Added. Merged upstream as 3e063703b3a51b8aaa7f75f36c4660c583a60e93
* gstreamer/patches/gst-plugins-good-0002-qtdemux-Do-not-unref-a-NULL-stream_tags.patch: Added. Merged upstream as 43a540b1cd9f162d3dae5d50e36703dfaf558a3e
* gstreamer/patches/gst-plugins-good-0003-qtdemux-Clarify-field-name-about-stream-encryption-s.patch: Added.
2018-05-27 Dan Bernstein <mitz@apple.com>
Reverted the changes made for https://webkit.org/b/186016
They broke the USE(APPLE_INTERNAL_SDK) Sierra build.
2018-05-27 Dan Bernstein <mitz@apple.com>
[Cocoa] Avoid importing directly from subumbrella frameworks
https://bugs.webkit.org/show_bug.cgi?id=186016
Reviewed by Sam Weinig.
* DumpRenderTree/cg/PixelDumpSupportCG.cpp: Include CoreServices.h instead of a
LaunchServices header.
* DumpRenderTree/mac/Configurations/BaseTarget.xcconfig: Removed -iframework options from
OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
* DumpRenderTree/mac/LayoutTestHelper.m: Import ApplicationServices.h instead of ColorSync.h
when using SDKs earlier than 10.13.
* TestWebKitAPI/Configurations/Base.xcconfig: Removed -iframework options from OTHER_CFLAGS
and OTHER_CPLUSPLUSFLAGS.
* TestWebKitAPI/Tests/mac/MediaPlaybackSleepAssertion.mm: Import Carbon.h instead of an
HIToolbox header.
* WebKitTestRunner/Configurations/BaseTarget.xcconfig: Removed -iframework options from
OTHER_CFLAGS and OTHER_CPLUSPLUSFLAGS.
* WebKitTestRunner/cg/TestInvocationCG.cpp: Include CoreServices.h instead of a
LaunchServices header.
2018-05-27 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] Add MainWindow class
https://bugs.webkit.org/show_bug.cgi?id=185814
Reviewed by Per Arne Vollan.
This is a sub task of Bug 184770. Added a new class MainWindow to
represent the main window which will be shared among WK1 and WK2.
This change is partial so that it's easy to review this patch.
I'll move more functions into MainWindow.cpp, and remove more
global variables in forthcoming patches.
* MiniBrowser/win/CMakeLists.txt: Added MainWindow.cpp.
* MiniBrowser/win/Common.cpp: Removed MainWindow related global
variables hMainWnd, hURLBarWnd, hBackButtonWnd and
hForwardButtonWnd. Added a new global variable gMainWindow.
(WndProc): Moved to MainWindow.cpp.
(resizeSubViews): Ditto.
(ToggleMenuFlag): Removed static to be called from MainWindow.cpp.
(ToggleMenuItem): Ditto.
(CustomUserAgent): Follow the global variables removal.
(DisplayAuthDialog): Ditto.
(loadURL): Ditto.
(WndProc): Renamed to MainWindow::WndProc.
* MiniBrowser/win/MainWindow.cpp: Added.
(MainWindow::registerClass): Renamed from MyRegisterClass of WinMain.cpp.
(MainWindow::init): Extracted MainWindow initialization code from wWinMain.
(MainWindow::resizeSubViews): Moved from Common.cpp.
(MainWindow::WndProc): Ditto.
* MiniBrowser/win/MainWindow.h: Added.
(MainWindow::hwnd):
(MainWindow::browserWindow):
* MiniBrowser/win/MiniBrowser.cpp:
(MiniBrowser::init):
(MiniBrowser::prepareViews): Extract some code into MiniBrowser::loadDefaultHTML.
(MiniBrowser::loadDefaultHTML): Extracted from MiniBrowser::prepareViews.
* MiniBrowser/win/MiniBrowser.h:
* MiniBrowser/win/WinMain.cpp:
(wWinMain): Extracted MainWindow initialization code into MainWindow::init.
(MyRegisterClass): Moved to MainWindow.cpp.
2018-05-27 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] Remove URL argument of MiniBrowser::init
https://bugs.webkit.org/show_bug.cgi?id=185969
Reviewed by Alex Christensen.
MiniBrowser::init takes URL argument, but it's used only for
loading default HTML if URL is not given.
- Add a new method MiniBrowser::loadHTMLString
- Remove loadHTMLString process from MiniBrowser::prepareViews
* MiniBrowser/win/MiniBrowser.cpp:
(MiniBrowser::init): Removed `requestedURL` argument.
(MiniBrowser::prepareViews): Ditto.
(MiniBrowser::loadHTMLString): New.
(MiniBrowser::loadURL): Return E_INVALIDARG if passedURL is null instead of calling loadHTMLString.
* MiniBrowser/win/MiniBrowser.h: Removed URL argument. Added loadHTMLString.
* MiniBrowser/win/WinMain.cpp:
(wWinMain): Call MiniBrowser::loadHTMLString if URL is not given.
2018-05-27 David Kilzer <ddkilzer@apple.com>
svn-apply fails when a patch has an empty file
<https://webkit.org/b/29684>
Reviewed by Daniel Bates.
Prior to this change, applying the following patches resulted in:
- svn: add empty file (failure)
- svn: delete empty file (failure)
- svn: rename empty file (failure)
- git: add empty file (false-positive success)
- git: delete empty file (success)
- git: rename empty file (failure)
* Scripts/VCSUtils.pm:
(parseSvnDiffHeader): Handle the case when there is no patch
following the header. If the file exists and is empty, that
means it's a deletion. If the file does not exist, that means
it's an addition. Everything else is a fatal error.
* Scripts/svn-apply:
(patch):
- Only apply a patch for deletion if it has one or more text
chunks.
- Add a case to handle adding an empty file (an addition with no
text chunks), and verify the file doesn't exist yet.
- Any unhandled patch is a fatal error.
* Scripts/webkitperl/VCSUtils_unittest/parseSvnDiffHeader.pl:
Add tests for adding an empty file and deleting an empty file.
* Scripts/webkitperl/VCSUtils_unittest/resources/empty.txt: Add.
Used by parseSvnDiffHeader.pl unit test for "add an empty file"
test case.
2018-05-25 Aakash Jain <aakash_jain@apple.com>
Display detailed error logs when a script fails in EWS
https://bugs.webkit.org/show_bug.cgi?id=175696
<rdar://problem/34841885>
Reviewed by Darin Adler.
* Scripts/webkitpy/tool/bot/queueengine.py: Set output_limit to 5000 characters instead of default 500 characters.
* Scripts/webkitpy/tool/commands/abstractsequencedcommand.py: Ditto.
* Scripts/webkitpy/tool/commands/download.py: Ditto.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py: Ditto.
* Scripts/webkitpy/tool/commands/queues.py: Ditto.
* Scripts/webkitpy/tool/commands/stepsequence.py: Ditto.
2018-05-25 Daniel Bates <dabates@apple.com>
test-webkitpy messages logged using __main__ logger are not displayed
https://bugs.webkit.org/show_bug.cgi?id=185823
Rubber-stamped by Aakash Jain.
Configure the logger for __main__ so that messages that are logged before it parses its
command line arguments are printed to standard error.
Currently test-webkitpy creates a named logger (__main__) for its logging. However it does
not configure a stream to use for printing until after it parses its command line arguments
via webkitpy.test.printer.Printer.configure(). Messages logged until then are never written
to the console. We explicitly configure the __main__ logger instead of calling webkitpy.test.printer.Printer.configure()
earlier because the latter both configures a stream and filters logged messages based on
the specified verbosity. Logged messaged from code in __main__ should not be subject to
such filtering. So, we explicitly configure the __main__ logger.
* Scripts/webkitpy/test/main.py:
(main):
2018-05-25 Saam Barati <sbarati@apple.com>
Make JSC have a mini mode that kicks in when the JIT is disabled
https://bugs.webkit.org/show_bug.cgi?id=185931
Reviewed by Mark Lam.
This renames a variable for clarity.
* Scripts/run-testmem:
2018-05-25 Alex Christensen <achristensen@webkit.org>
URL::host should return a StringView to reduce allocations
https://bugs.webkit.org/show_bug.cgi?id=185986
Reviewed by Geoff Garen.
* TestWebKitAPI/Tests/WebCore/URL.cpp:
(TestWebKitAPI::TEST_F):
* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::eq):
* TestWebKitAPI/Tests/mac/SSLKeyGenerator.mm:
(TestWebKitAPI::SSLKeyGeneratorTest::TearDown):
2018-05-25 Ms2ger <Ms2ger@igalia.com>
Minor improvements to wpt exporter.
https://bugs.webkit.org/show_bug.cgi?id=185978
Reviewed by Youenn Fablet.
* Scripts/webkitpy/w3c/test_exporter.py:
(TestExporter.push_to_wpt_fork): Update call to create_upload_remote().
(TestExporter.make_pull_request): Improve the description of the created PR.
(TestExporter.create_upload_remote): Always update the remote to override any obsolete state.
2018-05-25 Saam Barati <sbarati@apple.com>
Have a memory test where we can validate JSCs mini memory mode
https://bugs.webkit.org/show_bug.cgi?id=185932
Reviewed by Mark Lam.
This patch adds the run-testmem script. This runs the new testmem
CLI against the contents in the testmem benchmark. The contents of testmem
contain tests from ARES-6, Sunspider, Octane, and JetStream.
One iteration of the benchmark comprises of running each testmem test for
a certain number of iterations. We collect the peak memory usage, the memory
usage after running all the iterations, and the time it takes to run all the
iterations. We then run the entire benchmark 3 times over. For each test, we
compute the arithmetic mean over each iteration for time, peak memory, and
end memory. The benchmark then computes a time score and memory score.
peak memory score = geomean({peak memory of each individual test})
end memory score = geomean({end memory of each individual test})
memory score = geomean({peak memory score, end memory score})
time score = geomean({time score of each individual test})
We want the memory score to weigh improvements to peak memory usage and
memory usage at the end equally.
We plan to tune this benchmark in JSC's mini mode by improving the memory
score while ensuring the time score is not more than 10-15% regressed.
* Scripts/run-testmem: Added.
2018-05-25 Sihui Liu <sihui_liu@apple.com>
[WKHTTPCookieStore getAllCookies] returns inconsistent creation time
https://bugs.webkit.org/show_bug.cgi?id=185041
<rdar://problem/34684214>
Reviewed by Geoffrey Garen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TEST):
2018-05-24 Chris Dumez <cdumez@apple.com>
Reduce copying of FontCascadeDescription objects by moving them around
https://bugs.webkit.org/show_bug.cgi?id=185963
Reviewed by Simon Fraser.
Reduce copying of FontCascadeDescription objects by moving them around when possible.
* TestWebKitAPI/Tests/WebCore/ComplexTextController.cpp:
(TestWebKitAPI::TEST_F):
2018-05-24 Carlos Garcia Campos <cgarcia@igalia.com>
WebDriver: implement maximize, minimize and fullscreen window commands
https://bugs.webkit.org/show_bug.cgi?id=180398
Reviewed by Brian Burg.
* Scripts/webkitpy/port/xvfbdriver.py:
(XvfbDriver._setup_environ_for_test): Set UNDER_XVFB environment variable when running under Xvfb.
2018-05-24 Xabier Rodriguez Calvar <calvaris@igalia.com>
[GStreamer] Save some time disabling some compile options in the dependencies
https://bugs.webkit.org/show_bug.cgi?id=185909
Reviewed by Philippe Normand.
* gstreamer/jhbuild.modules: Added --disable-tests to gstreamer
and --disable-examples --disable-gtk-doc to gstreamer-vaapi.
2018-05-23 Roy Reapor <rreapor@apple.com>
Use Helvetica on build.webkit.org webpages
https://bugs.webkit.org/show_bug.cgi?id=185894
Reviewed by Aakash Jain.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/styles/common.css:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary-mock.html:
2018-05-23 Aakash Jain <aakash_jain@apple.com>
Add Buildbot configuration for Opensource EWS
https://bugs.webkit.org/show_bug.cgi?id=185484
Rubber-stamped by Alexey Proskuryakov.
* BuildSlaveSupport/ews-build/config.json: Added, config file.
* BuildSlaveSupport/ews-build/factories.py: Added, basic template for factories.
* BuildSlaveSupport/ews-build/loadConfig.py: Added.
(loadBuilderConfig): Loads the configuration.
(checkValidWorker): Checks if the worker is valid.
(checkValidBuilder): Checks if the builder is valid.
(checkWorkersAndBuildersForConsistency): Check if workers and builders are consistent.
(checkWorkersAndBuildersForConsistency._find_worker_with_name):
(getBlackListedTags): Returns a list of keywords which should not be listed as tags.
(getValidTags): Returns a list of valid tags.
(getTagsForBuilder): Return a list of tags for given builder.
* BuildSlaveSupport/ews-build/loadConfig_unittest.py: unit-tests for loadConfig.py.
* BuildSlaveSupport/ews-build/master.cfg: Configuration for buildbot.
2018-05-23 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Silence GCC 8 warnings
https://bugs.webkit.org/show_bug.cgi?id=185556
Reviewed by Žan Doberšek.
GCC is complaining about this strncpy. It's guaranteed to be safe, because the length of
source and destination are always identical. But switching to snprintf avoids the warning.
* DumpRenderTree/TestNetscapePlugIn/Tests/FormValue.cpp:
(FormValue::NPP_GetValue):
2018-05-23 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r232112.
The tests added with this change are failing on the bots.
Reverted changeset:
"test262/Runner.pm: add unit tests"
https://bugs.webkit.org/show_bug.cgi?id=185783
https://trac.webkit.org/changeset/232112
2018-05-23 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: add unit tests
https://bugs.webkit.org/show_bug.cgi?id=185783
Reviewed by Aakash Jain.
Add unit tests to be run by test-webkitperl
* Scripts/test262/Runner.pm:
(main):
- If harness files cannot be found in a custom, supplies test262 path,
then sure the webkit test262 harness files.
- Lazily create the test262-results directory.
- If an expectation file is supplied via command line, save to the
supplied location instead of the detault webkit location.
(compileTest):
(processResult):
(getHarness):
* Scripts/webkitperl/test262_unittest/README: Added.
* Scripts/webkitperl/test262_unittest/fixtures/expectations-compare.yaml: Added.
* Scripts/webkitperl/test262_unittest/fixtures/expectations.yaml: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-failing-with-new-error.js: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-failing.js: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-fail-now-passing.js: Added.
(f):
* Scripts/webkitperl/test262_unittest/fixtures/test/expected-to-pass-now-failing.js: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/fail.js: Added.
* Scripts/webkitperl/test262_unittest/fixtures/test/pass.js: Added.
(f):
* Scripts/webkitperl/test262_unittest/test262-runner-tests.pl: Added.
2018-05-22 Roy Reapor <rreapor@apple.com>
Test infrastructure websites should use jQuery and jQuery UI hosted on webkit.org
https://bugs.webkit.org/show_bug.cgi?id=185788
Reviewed by Aakash Jain.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/garden-o-matic.html:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/index.html:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/rebaseline.html:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/run-unittests.html:
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/summary-mock.html:
* TestResultServer/static-dashboards/run-embedded-unittests.html:
* TestResultServer/static-dashboards/run-unittests.html:
2018-05-22 Sihui Liu <sihui_liu@apple.com>
[iOS] TestWebKitAPI.WebKit.WKHTTPCookieStoreWithoutProcessPool is crashing with reason: 'Completion handler passed to -[CookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:] was not called'
https://bugs.webkit.org/show_bug.cgi?id=185831
Reviewed by Chris Dumez.
Updated the test to prevent crash after assertion fails.
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(-[CookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
2018-05-22 Chris Dumez <cdumez@apple.com>
Regression(AsyncPolicyDelegates): Box.app login Window is blank
https://bugs.webkit.org/show_bug.cgi?id=185832
<rdar://problem/40307871>
Reviewed by Geoffrey Garen.
Add API test coverage.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/cocoa/WeakObjCPtr.mm:
* TestWebKitAPI/Tests/mac/NoPolicyDelegateResponse.mm: Added.
(-[NoPolicyDelegateDecisionDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):
(-[NoPolicyDelegateDecisionDelegate webView:decidePolicyForMIMEType:request:frame:decisionListener:]):
(-[NoPolicyDelegateDecisionDelegate webView:didFinishLoadForFrame:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[WKWebView _isBackground]):
2018-05-22 Sihui Liu <sihui_liu@apple.com>
Conversion between SecurityOriginData and DatabaseIdentifier is asymmetric when port is null
https://bugs.webkit.org/show_bug.cgi?id=185715
Reviewed by Geoffrey Garen.
Add API test coverage.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/LocalStorageDatabaseTracker.mm: Added.
(-[LocalStorageUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):
2018-05-22 Sihui Liu <sihui_liu@apple.com>
Unreviewed, added myself as a WebKit committer.
* Scripts/webkitpy/common/config/contributors.json:
2018-05-22 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r232052.
Breaks internal builds.
Reverted changeset:
"Use more C++17"
https://bugs.webkit.org/show_bug.cgi?id=185176
https://trac.webkit.org/changeset/232052
2018-05-22 Thibault Saunier <tsaunier@igalia.com>
[GStreamer] Update to GStreamer 1.14.1 in jhbuild
https://bugs.webkit.org/show_bug.cgi?id=185689
Reviewed by Philippe Normand.
And update the patches, removing the ones that have been merged upstream.
* gstreamer/jhbuild.modules:
* gstreamer/patches/gst-plugins-good-0001-gstgdkpixbufdec-stop-pretending-to-decode-gifs.patch: Removed.
* gstreamer/patches/gst-plugins-good-0001-souphttpsrc-cookie-jar-and-context-query-support.patch: Removed. Not needed anymore and closed as OBSELETE upstream.
* gstreamer/patches/gst-plugins-good-0002-qtdemux-add-context-for-a-preferred-protection.patch: Renamed from Tools/gstreamer/patches/gst-plugins-good-0006-qtdemux-add-context-for-a-preferred-protection.patch
This patch has now been merged in GStreamer master and will be there in GStreamer 1.16.
* gstreamer/patches/gst-plugins-good-0003-qtdemux-also-push-buffers-without-encryption-info-in.patch: Renamed from Tools/gstreamer/patches/gst-plugins-good-0008-qtdemux-also-push-buffers-without-encryption-info-in.patch.
This patch has now been merged in GStreamer master and will be there in GStreamer 1.16.
* gstreamer/patches/gst-plugins-good-0009-qtdemux-fix-assert-when-moof-contains-one-sample.patch: Removed.
* gstreamer/patches/gstreamer-0001-protection-added-function-to-filter-system-ids.patch: Removed.
2018-05-21 Yusuke Suzuki <utatane.tea@gmail.com>
Use more C++17
https://bugs.webkit.org/show_bug.cgi?id=185176
Reviewed by JF Bastien.
* DumpRenderTree/mac/Configurations/Base.xcconfig:
* ImageDiff/cg/Configurations/Base.xcconfig:
* MiniBrowser/Configurations/Base.xcconfig:
* MobileMiniBrowser/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:
2018-05-21 Fujii Hironori <Hironori.Fujii@sony.com>
[WinCairo] Enable WebKit build by default
https://bugs.webkit.org/show_bug.cgi?id=185141
Reviewed by Per Arne Vollan.
TestWTF, TestWebCore and TestWebKitLegacy need a dependency to
WebKitForwardingHeaders because config.h includes a header of WK2.
* TestWebKitAPI/PlatformWin.cmake: Make TestWTFLib, TestWebCoreLib and TestWebKitLegacyLib depend on WebKitForwardingHeaders.
* TestWebKitAPI/config.h: Use PLATFORM(WIN_CAIRO) instead of BUILDING_WIN_CAIRO_WEBKIT.
2018-05-21 Jer Noble <jer.noble@apple.com>
Complete fix for enabling modern EME by default
https://bugs.webkit.org/show_bug.cgi?id=185770
<rdar://problem/40368220>
Reviewed by Eric Carlson.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-05-18 Christopher Reid <chris.reid@sony.com>
Unreviewed, add myself as a WebKit committer.
* Scripts/webkitpy/common/config/contributors.json:
2018-05-21 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed, rolling out r222967.
It's not ready yet
Reverted changeset:
"[GTK][WPE] Add API to configure and enable resource load
statistics"
https://bugs.webkit.org/show_bug.cgi?id=177943
https://trac.webkit.org/changeset/222967
2018-05-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] MiniBrowser crashes when loading twice quickly
https://bugs.webkit.org/show_bug.cgi?id=185763
Reviewed by Michael Catanzaro.
This is very difficult to reproduce manually, but it happens when running WebDriver tests where loads are very
fast and multiple loads are done quickly. The problem is that we use an idle to reset the progress bar, but we
don't reset it when a new load starts. We always reset the last idle on destroy, but if there's another one
leaked, it will crash when scheduled if the window has already been destroyed.
* MiniBrowser/gtk/BrowserWindow.c:
(webViewLoadProgressChanged): Stop any pending reset task when progress != 1.
2018-05-19 Sihui Liu <sihui_liu@apple.com>
Flaky API test WebKit.WKHTTPCookieStoreWithoutProcessPool: incorrect order of cookies
https://bugs.webkit.org/show_bug.cgi?id=185624
<rdar://problem/39111626>
Reviewed by Chris Dumez.
Modified expectation to make test more robust as cookies can be returned in different orders.
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(-[CookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):
2018-05-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r231982.
https://bugs.webkit.org/show_bug.cgi?id=185793
Caused layout test failures (Requested by realdawei on
#webkit).
Reverted changeset:
"Complete fix for enabling modern EME by default"
https://bugs.webkit.org/show_bug.cgi?id=185770
https://trac.webkit.org/changeset/231982
2018-05-18 Eric Carlson <eric.carlson@apple.com>
Handle failure to extend sandbox gracefully
https://bugs.webkit.org/show_bug.cgi?id=185779
<rdar://problem/40316349>
Unreviewed, fix test results.
* TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm:
(TEST_F):
2018-05-18 Jer Noble <jer.noble@apple.com>
Complete fix for enabling modern EME by default
https://bugs.webkit.org/show_bug.cgi?id=185770
<rdar://problem/40368220>
Reviewed by Eric Carlson.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-05-18 Eric Carlson <eric.carlson@apple.com>
Handle failure to extend sandbox gracefully
https://bugs.webkit.org/show_bug.cgi?id=185779
<rdar://problem/40316349>
Reviewed by Brent Fulgham.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/UserMediaSimulateFailedSandbox.mm: Added.
(-[SimulateFailedSandboxMessageHandler userContentController:didReceiveScriptMessage:]):
(-[SimulateFailedSandboxUIDelegate _webView:requestUserMediaAuthorizationForDevices:url:mainFrameURL:decisionHandler:]):
(-[SimulateFailedSandboxUIDelegate _webView:checkUserMediaPermissionForURL:mainFrameURL:frameIdentifier:decisionHandler:]):
(MediaCaptureSimulateFailedSandbox::SetUp):
(MediaCaptureSimulateFailedSandbox::loadTestAndWaitForMessage):
(TEST_F):
* TestWebKitAPI/Tests/WebKitCocoa/disableGetUserMedia.html:
2018-05-18 Daniel Bates <dabates@apple.com>
"debug-safari --ios-simulator" creates lldb target to launch Mac Safari
https://bugs.webkit.org/show_bug.cgi?id=185774
Reviewed by Andy Estes.
For now, the script debug-safari is not supported for WebKit for iOS. To
fix this we differentiate between the Apple Mac port and Apple embedded
ports.
* Scripts/webkitdirs.pm:
(safariPath): Substitute isAppleMacWebKit() for isAppleCocoaWebKit().
(isAppleMacWebKit): Added.
(isAppleCocoaWebKit): Write in terms of isAppleMacWebKit() and isEmbeddedWebKit().
(launcherName): Substitute isAppleMacWebKit() for isAppleCocoaWebKit().
(mobileSafariBundle): Substitute isIOSWebKit() for isAppleCocoaWebKit().
(debugSafari): Substitute isAppleMacWebKit() for isAppleCocoaWebKit().
(runSafari): Ditto.
(runMiniBrowser): Ditto.
(debugMiniBrowser): Ditto.
(runWebKitTestRunner): Ditto.
(debugWebKitTestRunner): Ditto.
2018-05-18 Antoine Quint <graouts@apple.com>
[Web Animations] Turn Web Animations with CSS integration on for test runners
https://bugs.webkit.org/show_bug.cgi?id=184819
<rdar://problem/39597337>
Unreviewed. Rolling out the patch for this bug, it caused some flaky timeouts for animation suspension tests.
* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(runTest):
(shouldOverrideAndDisableWebAnimationsCSSIntegrationPreference): Deleted.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::TestOptions):
(WTR::isLegacyAnimationEngineTestPath): Deleted.
* WebKitTestRunner/TestOptions.h:
2018-05-18 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] Create MainWindow even in transparent mode
https://bugs.webkit.org/show_bug.cgi?id=185597
Reviewed by Per Arne Vollan.
The current implementations doesn't create the MainWindow in
transparent mode. The screenshot is in Bug 58300.
There were three problems:
- Can't control the WebView. ie. going backward and forward.
- Can't quit the program.
- It makes implementation complicated.
* MiniBrowser/win/Common.cpp (resizeSubViews): Resize sub views
even in the transparent mode.
* MiniBrowser/win/WinMain.cpp:
(wWinMain): Create the main window even in the transparent mode.
2018-05-18 Antoine Quint <graouts@apple.com>
[Web Animations] Turn Web Animations with CSS integration on for test runners
https://bugs.webkit.org/show_bug.cgi?id=184819
<rdar://problem/39597337>
Reviewed by Jon Lee.
Make the test runners turn both the main Web Animations flag and the Web Animations CSS
integration flag on.
We also remove the ability to toggle the Web Animations CSS integration flag using an HTML
comment directly at the top of the file since test runners now set the flag on by default
and a dedicated directory exists for tests that need to run with this flag off.
* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(shouldOverrideAndDisableWebAnimationsCSSIntegrationPreference):
(runTest):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.cpp:
(WTR::isLegacyAnimationEngineTestPath):
(WTR::TestOptions::TestOptions):
* WebKitTestRunner/TestOptions.h:
2018-05-17 Nan Wang <n_wang@apple.com>
AX: [macOS] Expose the primary screen height through AX API
https://bugs.webkit.org/show_bug.cgi?id=185742
Reviewed by Chris Fleizach.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(attributesOfElement):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::attributesOfElement):
2018-05-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r231912.
https://bugs.webkit.org/show_bug.cgi?id=185750
It is prompting the user when there is no WPT changes
(Requested by bmac on #webkit).
Reverted changeset:
"Export changes to web-platform-test as part of the webkit-
patch upload workflow"
https://bugs.webkit.org/show_bug.cgi?id=184914
https://trac.webkit.org/changeset/231912
2018-05-17 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: expand $INC to find webkitdirs.pm
https://bugs.webkit.org/show_bug.cgi?id=185739
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(getBuildPath):
2018-05-17 Carlos Alberto Lopez Perez <clopez@igalia.com>
[WPE] Implement and enable FULLSCREEN_API
https://bugs.webkit.org/show_bug.cgi?id=185676
Reviewed by Žan Doberšek.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewFullScreen):
2018-05-17 Brendan McLoughlin <brendan@bocoup.com>
Export changes to web-platform-test as part of the webkit-patch upload workflow
https://bugs.webkit.org/show_bug.cgi?id=184914
Reviewed by Youenn Fablet.
* Scripts/webkitpy/tool/commands/upload.py:
(Upload):
(CreateBug.execute):
(WPTChangeExport):
* Scripts/webkitpy/tool/steps/__init__.py:
* Scripts/webkitpy/tool/steps/wptchangeexport.py: Added.
(WPTChangeExport):
(WPTChangeExport.options):
(WPTChangeExport.run):
* Scripts/webkitpy/w3c/common.py:
* Scripts/webkitpy/w3c/test_exporter.py:
(WebPlatformTestExporter):
(WebPlatformTestExporter.__init__):
(WebPlatformTestExporter.username):
(WebPlatformTestExporter.token):
(WebPlatformTestExporter._github):
(WebPlatformTestExporter._wpt_fork_branch_github_url):
(WebPlatformTestExporter._wpt_fork_remote):
(WebPlatformTestExporter._wpt_fork_push_url):
(WebPlatformTestExporter._git):
(WebPlatformTestExporter._branch_name):
(WebPlatformTestExporter._public_branch_name):
(WebPlatformTestExporter.has_wpt_changes):
(WebPlatformTestExporter._create_patch):
(WebPlatformTestExporter.create_git_patch):
(WebPlatformTestExporter._prompt_for_token):
(WebPlatformTestExporter._prompt_for_username):
(WebPlatformTestExporter._ensure_username_and_token):
(WebPlatformTestExporter._validate_and_save_token):
(WebPlatformTestExporter.push_to_wpt_fork):
(WebPlatformTestExporter.make_pull_request):
(WebPlatformTestExporter.delete_local_branch):
(parse_args):
(TestExporter): Deleted.
(TestExporter.__init__): Deleted.
(TestExporter._ensure_wpt_repository): Deleted.
(TestExporter._fetch_wpt_repository): Deleted.
(TestExporter._ensure_new_branch_name): Deleted.
(TestExporter.download_and_commit_patch): Deleted.
(TestExporter.clean): Deleted.
(TestExporter.create_branch_with_patch): Deleted.
(TestExporter.push_to_wpt_fork): Deleted.
(TestExporter.make_pull_request): Deleted.
(TestExporter.create_wpt_pull_request): Deleted.
(TestExporter.delete_local_branch): Deleted.
(TestExporter.create_git_patch): Deleted.
(TestExporter.create_upload_remote_if_needed): Deleted.
(TestExporter.do_export): Deleted.
* Scripts/webkitpy/w3c/test_exporter_unittest.py:
(TestExporterTest.test_export):
(TestExporterTest.test_export_with_specific_branch):
(TestExporterTest):
(TestExporterTest.test_export_interactive_mode):
(TestExporterTest.test_export_invalid_token):
(TestExporterTest.test_export_wrong_token):
2018-05-17 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: look for jsc in path if cannot call webkit-build-directory
https://bugs.webkit.org/show_bug.cgi?id=185650
Reviewed by Michael Saboff.
First, use jsc from CLI arg, then try to use webkit-build-directory,
if that doesn't work, look for jsc in the $PATH
* Scripts/test262/Runner.pm:
(processCLI):
(getBuildPath):
(runTest):
2018-05-16 Leo Balter <leonardo.balter@gmail.com>
Test262-Runner: Adds a --timeout option
https://bugs.webkit.org/show_bug.cgi?id=185696
Reviewed by Michael Saboff.
The timeout option is used to set a timeout execution in ms for each test run in JSC.
The passed value - if defined - will be used as the value for the JSC --watchdog arg.
* Scripts/test262/Runner.pm:
(processCLI):
(runTest):
2018-05-16 Leo Balter <leonardo.balter@gmail.com>
Test262-Runner: Set timer for each test run
https://bugs.webkit.org/show_bug.cgi?id=185692
Reviewed by Michael Saboff.
Sets a high resolution timer for each execution call of JSC, reporting
the time in the results report to allow identifying slow tests.
* Scripts/test262/Runner.pm:
(main):
(processFile):
(runTest):
(processResult):
2018-05-16 Andy VanWagoner <andy@vanwagoner.family>
Add support for Intl NumberFormat formatToParts
https://bugs.webkit.org/show_bug.cgi?id=185375
Reviewed by Yusuke Suzuki.
Add flag for NumberFormat formatToParts.
* Scripts/webkitperl/FeatureList.pm:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-05-14 Yusuke Suzuki <utatane.tea@gmail.com>
[Win] Use C++17 in MSVC
https://bugs.webkit.org/show_bug.cgi?id=185232
Reviewed by Alex Christensen.
Do not use `using namespace std;`. In C++17, we have std::byte. This "byte"
conflicts with ::byte defined in Windows' header.
* DumpRenderTree/TestNetscapePlugIn/win/WindowedPluginTest.cpp:
(WindowedPluginTest::WindowedPluginTest):
* DumpRenderTree/win/AccessibilityControllerWin.cpp:
(logEventProc):
(stringEvent):
(AccessibilityController::winNotificationReceived):
* DumpRenderTree/win/TextInputController.cpp:
(markedRangeCallback):
(firstRectForCharacterRangeCallback):
(selectedRangeCallback):
* DumpRenderTree/win/TextInputController.h:
* DumpRenderTree/win/TextInputControllerWin.cpp:
(TextInputController::markedRange):
(TextInputController::firstRectForCharacterRange):
(TextInputController::selectedRange):
2018-05-16 Sihui Liu <sihui_liu@apple.com>
Session cookies aren't reliably set when using default WKWebSiteDataStore
https://bugs.webkit.org/show_bug.cgi?id=185624
<rdar://problem/39111626>
Reviewed by Geoffrey Garen.
Modified and enabled WebKit.WKHTTPCookieStoreWithoutProcessPool.
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(-[CookieUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):
2018-05-16 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: save to supplied expectation file if supplied
https://bugs.webkit.org/show_bug.cgi?id=185660
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(processCLI):
(main):
2018-05-15 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r231763.
The test added with this change is failing an assertion.
Reverted changeset:
"NSEvent event trackers don't work from WebKitTestRunner"
https://bugs.webkit.org/show_bug.cgi?id=185383
https://trac.webkit.org/changeset/231763
2018-05-15 David Kilzer <ddkilzer@apple.com>
TestWebKitAPI: Fix warnings found by new clang compiler
<https://webkit.org/b/185631>
Reviewed by Michael Catanzaro.
* TestWebKitAPI/Tests/WTF/NakedPtr.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/Poisoned.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedRefPtr.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/RefPtr.cpp:
(TestWebKitAPI::TEST):
- Add #pragma statements to ignore the new
-Wself-assign-overloaded warning and to ignore
this as an unknown warning on older clang versions. We want
to keep these self assigments as this code is designed to test
that use case.
* TestWebKitAPI/Tests/WebKit/FindMatches.mm:
(TestWebKitAPI::didFindStringMatches):
- Replace the "rect = rect;" statement that was used to avoid an
unused variable warning with two expectations.
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[PinnedStateObserver observeValueForKeyPath:ofObject:change:context:]):
- Switch from -integerValue to -unsignedIntegerValue when
comparing against _WKRectEdgeAll since it's an enum declared
as an NSUInteger.
2018-05-15 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed, rolling out r230749
This did not work as desired.
* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::TEST):
2018-05-15 Antoine Quint <graouts@apple.com>
[Web Animations] Expose Web Animations CSS integration as an experimental feature
https://bugs.webkit.org/show_bug.cgi?id=185647
Reviewed by Dean Jackson.
Rename the Web Animations CSS integration flag.
* DumpRenderTree/TestOptions.cpp:
(TestOptions::TestOptions):
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
2018-05-14 Brady Eidson <beidson@apple.com>
Add an API test to guard against regressions while re-entering setDefersLoading:.
<rdar://problem/37033737> and https://bugs.webkit.org/show_bug.cgi?id=185630
Reviewed by Chris Dumez.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoading.mm: Added.
(-[DoubleDefersNavigationDelegate _webView:navigation:didSameDocumentNavigation:]):
(-[DoubleDefersNavigationDelegate webView:didFinishNavigation:]):
(-[DefersScheme initWithBytes:]):
(-[DefersScheme webView:startURLSchemeTask:]):
(-[DefersScheme webView:stopURLSchemeTask:]):
* TestWebKitAPI/Tests/WebKitCocoa/DoubleDefersLoadingPlugin.mm: Added.
(-[DoubleDefersLoadingPlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[DoubleDefersLoadingPlugIn webProcessPlugInBrowserContextController:didSameDocumentNavigation:forFrame:]):
(-[DoubleDefersLoadingPlugIn dealloc]):
2018-05-14 Daniel Bates <dabates@apple.com>
[iOS] Add a test to ensure that setTimeout() does not fire more than expected when using UIWebView
https://bugs.webkit.org/show_bug.cgi?id=185599
<rdar://problem/22493890>
Reviewed by Simon Fraser.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/SetTimeoutFunction.mm: Added.
(-[SetTimeoutFunctionWebViewDelegate webViewDidFinishLoad:]):
(-[SetTimeoutFunctionWebViewDelegate webView:didFailLoadWithError:]):
(-[SetTimeoutFunctionWebViewDelegate webView:shouldStartLoadWithRequest:navigationType:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/ios/set-timeout-function.html: Added.
2018-05-14 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: small bugs in CLI and error codes
https://bugs.webkit.org/show_bug.cgi?id=185629
Reviewed by Michael Saboff.
Fix two commandline args with use '-f', correct
error code of failures.
* Scripts/test262/Runner.pm:
(processCLI):
(main):
2018-05-14 Ryan Haddad <ryanhaddad@apple.com>
Disable API tests that time out after pointer poisioning was disabled.
https://bugs.webkit.org/show_bug.cgi?id=185586
Unreviewed test gardening.
* TestWebKitAPI/Tests/WTF/Poisoned.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtr.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForNonTriviallyDestructibleArrays.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForTriviallyDestructibleArrays.cpp:
(TestWebKitAPI::TEST):
2018-05-14 Leo Balter <leonardo.balter@gmail.com>
Test262-Runner: Fix RegExp for capturing tests metadata"
https://bugs.webkit.org/show_bug.cgi?id=185622
Reviewed by Michael Saboff.
This patch fixes the RegExp used to capture each test metadata regarding their EOL characters for
both LF and CRLF forms.
The fix also allows the runner to capture the proper results from two specific files using CR and
CRLF line terminators. They are updated in the expectations file.
* Scripts/test262/Runner.pm:
(parseData):
2018-05-14 Jeremy Jones <jeremyj@apple.com>
NSEvent event trackers don't work from WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=185383
rdar://problem/40025045
Reviewed by Simon Fraser.
Post simulated wheel events to _sendEventToObservers: so they can be handled by NSEvent observers.
NSEvent swipe tracking is used for webkit swipe navigation.
* WebKitTestRunner/mac/EventSenderProxy.mm:
(WTR::EventSenderProxy::mouseScrollByWithWheelAndMomentumPhases):
2018-05-11 Leo Balter <leonardo.balter@gmail.com>
Test262 Runner should search for the Debug JSC by default
https://bugs.webkit.org/show_bug.cgi?id=185562
Reviewed by Michael Saboff.
The Test262 Runner is now searching for the Debug build of JSC by
default, not the Release build.
This fix allows a similar call from the previous runner, making
it compatible with the current build bot configuration parameters.
This patch also adds some minor improvements the verbose mode output.
* Scripts/test262/Runner.pm:
(processCLI):
(main):
(getBuildPath):
(processResult):
2018-05-11 Charles Vazac <cvazac@gmail.com>
Runtime feature flag for Server-Timing
https://bugs.webkit.org/show_bug.cgi?id=184758
Reviewed by Youenn Fablet.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig: added ENABLE_SERVER_TIMING.
* DumpRenderTree/win/DumpRenderTree.cpp: enable Server Timing
2018-05-11 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] Move WK1 related code into MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=185418
Reviewed by Alex Christensen.
All WK1 related code should be moved into MiniBrowser for the preparation
of Bug 184770.
This change moves the initilization code of MiniBrowse into MiniBrowser::init().
* MiniBrowser/win/Common.cpp:
(getAppDataFolder): Removed `static` keyword to be called from MiniBrowser.cpp.
(setCacheFolder): This is only for WK1. Moved into MiniBrowser.cpp.
* MiniBrowser/win/Common.h: Added.
* MiniBrowser/win/MiniBrowser.cpp:
(MiniBrowser::init): Moved the initilization code from wWinMain.
(MiniBrowser::setCacheFolder): Moved from Common.cpp and made it a method.
* MiniBrowser/win/MiniBrowser.h:
(MiniBrowser::setCacheFolder): Changed to a private method.
(MiniBrowser::subclassForLayeredWindow): Changed to a private method.
* MiniBrowser/win/WinMain.cpp:
(wWinMain): Moved MiniBrowse initilization code into MiniBrowser.cpp.
2018-05-11 Brady Eidson <beidson@apple.com>
Make sure history navigations reuse the existing process when necessary.
<rdar://problem/39746516> and https://bugs.webkit.org/show_bug.cgi?id=185532
Reviewed by Ryosuke Niwa.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2018-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
[JSC][GLIB] Add introspectable alternatives to functions using vargars
https://bugs.webkit.org/show_bug.cgi?id=185508
Reviewed by Michael Catanzaro.
Add test cases for the new API.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCFunction):
(testJSCObject):
2018-05-10 Leo Balter <leonardo.balter@gmail.com>
[Build Bot] Restore configuration options to the Test262 Runner
During the switch from the previous Test262 runner to the new one,
a call for an extra configurations options got removed.
This call is important to inform the script to find the debug or
release build of JSC. It's being restored in this patch.
https://bugs.webkit.org/show_bug.cgi?id=185513
Reviewed by Yusuke Suzuki.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunTest262Tests):
2018-05-10 Jonathan Bedard <jbedard@apple.com>
REGRESSION (r230998): Cannot stream API test output
https://bugs.webkit.org/show_bug.cgi?id=185090
Reviewed by Ryosuke Niwa.
Change run-api-tests so that the stdout and stderr of a test will be printed
before it's result. If -v is passed, the output of single test runs will be
streamed.
* Scripts/webkitpy/api_tests/run_api_tests.py:
(run): Use print_timestamps flag.
(parse_args): Add timestamps option to print timestamps in the log.
* Scripts/webkitpy/api_tests/runner.py:
(Runner): Add running status.
(Runner.__init__): Add number of workers and a flag to detect if a newline
is needed at the beginning of a log line.
(Runner.run): Turn off most logging coming from server process since it is
not constructive for API tests.
(Runner.handle): Add new log message to stream stdout and stderr instead of
caching values until the test run finished.
(_Worker._run_single_test): Log stdout and stderr in real time.
(_Worker._run_shard_with_binary): Log stderr and stdout buffer before ending
the test.
(_Worker.post): Provide a post with explicitly enumerated argument names.
* Scripts/webkitpy/layout_tests/views/metered_stream.py:
(MeteredStream.__init__): Differentiate verbose logging and logging with timestamps.
(MeteredStream.write): Allow for verbose logging without timestamps.
* Scripts/webkitpy/layout_tests/views/metered_stream_unittest.py:
(RegularTest): Add print_timestamps flag.
(RegularTest.setUp):
(RegularTest.test_logging_not_included):
(VerboseTest.test_log_args):
(VerboseWithOutTimestamp):
(VerboseWithOutTimestamp.test_basic): Add test for verbose logging without timestamps.
2018-05-10 Ryosuke Niwa <rniwa@webkit.org>
build-webkit can erroneously warn about Xcode being too old
https://bugs.webkit.org/show_bug.cgi?id=185533
Reviewed by Dan Bernstein.
Don't assume the version number is always a single digit.
* Scripts/webkitdirs.pm:
(determineXcodeVersion):
2018-05-10 Ross Kirsling <ross.kirsling@sony.com>
[WinCairo][Buildbot] Test bots need to acquire WinCairoRequirements.
https://bugs.webkit.org/show_bug.cgi?id=185528
Reviewed by Lucas Forschler.
* BuildSlaveSupport/build.webkit.org-config/factories.py:
(TestFactory.__init__):
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(InstallWinCairoDependencies):
2018-05-10 Michael Catanzaro <mcatanzaro@igalia.com>
Fix some -Wstring-op-truncation warnings
https://bugs.webkit.org/show_bug.cgi?id=185496
Reviewed by Alex Christensen.
We have an off-by-one in the use of strncpy. The strings would not be null-terminated if
the input was too long. Ensure the buffers are zero-initialized so we don't need to manually
set the last bucket to NUL.
* TestWebKitAPI/Tests/WTF/AtomicString.cpp:
(TestWebKitAPI::testAtomicStringNumber):
* TestWebKitAPI/Tests/WTF/WTFString.cpp:
(TestWebKitAPI::testStringNumberFixedPrecision):
(TestWebKitAPI::testStringNumberFixedWidth):
(TestWebKitAPI::testStringNumber):
2018-05-10 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][MiniBrowser] Add a separate WndProc for the layered window
https://bugs.webkit.org/show_bug.cgi?id=185460
Reviewed by Brent Fulgham.
All WK1 related code should be moved into MiniBrowser for the
preparation of Bug 184770.
The layered window was using WndProc of the main window. The
layered window is specific only for WK1. the main window will be
shared among WK1 and WK2.
This change add a new WndProc for the layer window.
* MiniBrowser/win/Common.cpp:
(WndProc): Removed code for the layered windows.
(subclassForLayeredWindow): Moved into MiniBrowser.cpp.
* MiniBrowser/win/MiniBrowser.cpp:
(MiniBrowser::prepareViews): Removed the fourth argument `viewHwnd`.
(viewWndProc): New WndProc for the layered windows.
(MiniBrowser::subclassForLayeredWindow): Moved from Common.cpp.
* MiniBrowser/win/MiniBrowser.h:
(MiniBrowser::hwnd):
* MiniBrowser/win/WinMain.cpp:
(wWinMain): Added m_viewWnd.
2018-05-10 Stephan Szabo <stephan.szabo@sony.com>
Support --verbose in run-javascriptcore-tests
https://bugs.webkit.org/show_bug.cgi?id=185492
Reviewed by Daniel Bates.
* Scripts/run-javascriptcore-tests:
(runJSCStressTests):
2018-05-10 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: --failing-files uses results file not expectations
https://bugs.webkit.org/show_bug.cgi?id=185395
Reviewed by Michael Saboff.
--failing-files arg now uses results file to find failing tests
to rerun. It will look in the test262-results directory from whereever
the script is run, or a results.yaml file can be supplied via command
line argument.
--expectations arg added for suppling expectation file.
* Scripts/test262/Runner.pm:
(processCLI):
(main):
(loadImportFile):
(findAllFailing):
2018-05-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add support for settings cookies policy and storage type in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=185506
Reviewed by Philippe Normand.
Useful for testing and debugging.
* MiniBrowser/gtk/main.c:
(main):
2018-05-09 Chris Dumez <cdumez@apple.com>
Unreviewed Windows build fix after r231622.
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
2018-05-09 Sihui Liu <sihui_liu@apple.com>
Update WebKit.WebsiteDataStoreCustomPaths after r231536
https://bugs.webkit.org/show_bug.cgi?id=185486
<rdar://problem/37214391>
Reviewed by Chris Dumez.
Update WebKit.WebsiteDataStoreCustomPaths as _syncNetworkProcessCookies is async now.
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST):
2018-05-09 Leo Balter <leonardo.balter@gmail.com>
Test262-Runner: Improve the verbose output
https://bugs.webkit.org/show_bug.cgi?id=185491
Reviewed by Michael Saboff.
* Scripts/test262/Import.pm:
(transferFiles):
* Scripts/test262/Runner.pm:
(processResult):
2018-05-09 Leo Balter <leonardo.balter@gmail.com>
Fix Test262 Runner to have DYLD_FRAMEWORK_PATH always set
https://bugs.webkit.org/show_bug.cgi?id=185488
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(processCLI):
(getBuildPath):
(runTest):
2018-05-09 Richard Houle <rhoule@apple.com>
[Cocoa] Some fields are not identified as [WKWebProcessPlugInNodeHandle isTextField]
https://bugs.webkit.org/show_bug.cgi?id=185260
<rdar://problem/39290394>
Reviewed by Tim Horton.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/InjectedBundleNodeHandleIsTextField.mm: Added.
(-[InjectedBundleNodeHandleIsTextField isTextFieldForHTMLInputType:document:jsContext:]):
(-[InjectedBundleNodeHandleIsTextField webProcessPlugIn:didCreateBrowserContextController:]):
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[InjectedBundleNodeHandleIsTextFieldDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
2018-05-09 Thibault Saunier <tsaunier@igalia.com>
[tests][GStreamer]: Pass USE_PLAYBIN3 to the tests subprocess
https://bugs.webkit.org/show_bug.cgi?id=185481
Reviewed by Philippe Normand.
[tests][GStreamer]: Pass USE_PLAYBIN3 to the tests subprocess
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server):
2018-05-09 Leo Balter <leonardo.balter@gmail.com>
Set build.webkit.org to use the new Test262-runner
https://bugs.webkit.org/show_bug.cgi?id=184933
Reviewed by Aakash Jain.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunTest262Tests):
(RunTest262Tests.countFailures):
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
2018-05-09 Carlos Eduardo Ramalho <cadubentzen@gmail.com>
[GTK][JHBuild] LLVM 3.7.0 build is broken with GCC 8.1
https://bugs.webkit.org/show_bug.cgi?id=185461
Reviewed by Michael Catanzaro.
JHBuild now compiles LLVM 6 and Mesa 18.0.3.
* gtk/jhbuild.modules:
2018-05-09 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed. Update OptionsWPE.cmake and NEWS for 2.21.1 release.
* wpe/manifest.txt.in: Distribute the NEWS.
2018-05-09 Michael Catanzaro <mcatanzaro@igalia.com>
[WPE] Build cleanly with GCC 8 and ICU 60
https://bugs.webkit.org/show_bug.cgi?id=185462
Reviewed by Carlos Alberto Lopez Perez.
* TestWebKitAPI/CMakeLists.txt: Fix weird build failure, we were missing a directory. Not
sure why this was never noticed until now or why the bots are OK.
* gtk/jhbuild.modules: Add upstream patch to avoid warnings inside G_DEFINE_TYPE.
* gtk/patches/glib-cast-function-type.patch: Added.
* wpe/jhbuild.modules: Add upstream patch to avoid warnings inside G_DEFINE_TYPE.
* wpe/patches/glib-cast-function-type.patch: Added.
2018-05-06 Yusuke Suzuki <utatane.tea@gmail.com>
[JSC][GTK][JSCONLY] Use capstone disassembler
https://bugs.webkit.org/show_bug.cgi?id=185283
Reviewed by Michael Catanzaro.
* gtk/manifest.txt.in:
* wpe/manifest.txt.in:
2018-05-09 Antti Koivisto <antti@apple.com>
Add OptionSet::operator& and operator bool
https://bugs.webkit.org/show_bug.cgi?id=185306
Reviewed by Anders Carlsson.
* TestWebKitAPI/Tests/WTF/OptionSet.cpp:
(TestWebKitAPI::TEST):
2018-05-08 Wenson Hsieh <wenson_hsieh@apple.com>
Consolidate WebContentReaderIOS and WebContentReaderMac into WebContentReaderCocoa
https://bugs.webkit.org/show_bug.cgi?id=185340
Reviewed by Tim Horton.
Adds a new API test to verify that URLs written using -[NSPasteboard writeObjects:] are pasted as anchors with
non-empty text in a contenteditable.
* TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
(TestWebKitAPI::TEST):
2018-05-08 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: create results dir for results of test262 run
https://bugs.webkit.org/show_bug.cgi?id=185392
Reviewed by Michael Saboff.
New directory test262-results created from where ever script is
called.
* Scripts/test262/Runner.pm:
(processCLI):
2018-05-08 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: lower number of processes per core
https://bugs.webkit.org/show_bug.cgi?id=185426
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(getProcesses):
2018-05-08 Leo Balter <leonardo.balter@gmail.com>
Test262-Runner: Add base Perl UnicodeData
https://bugs.webkit.org/show_bug.cgi?id=185444
Reviewed by Michael Saboff.
* Scripts/test262/local/lib/perl5/unicore/lib/gc_sc/SpacePer.pl: Added.
* Scripts/test262/local/lib/perl5/unicore/lib/gc_sc/Word.pl: Added.
2018-05-08 Daniel Bates <dabates@apple.com>
Add tests to ensure that the Strong Password appearance is removed on form reset
https://bugs.webkit.org/show_bug.cgi?id=185440
Reviewed by Ryosuke Niwa.
* TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm:
(-[DidResignInputElementStrongPasswordAppearance webProcessPlugIn:didCreateBrowserContextController:]):
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(TEST):
2018-05-08 Daniel Bates <dabates@apple.com>
Resign Strong Password appearance when text field value changes
https://bugs.webkit.org/show_bug.cgi?id=185433
<rdar://problem/39958508>
Reviewed by Ryosuke Niwa.
Add a unit test to ensure the injected bundle API and WebKit UI delegate SPI is invoked
when the field has the Strong Password button and its value changes.
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(testDidResignInputElementStrongPasswordAppearanceAfterEvaluatingJavaScript):
(TEST):
2018-05-06 Filip Pizlo <fpizlo@apple.com>
InPlaceAbstractState::beginBasicBlock shouldn't have to clear any abstract values
https://bugs.webkit.org/show_bug.cgi?id=185365
Reviewed by Saam Barati.
Make it possible to measure compile times.
Rolling back in after fixing cloop builds.
* Scripts/run-jsc-benchmarks:
2018-05-08 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] WKAttachmentTestsIOS.InsertDroppedItemProvidersInOrder fails after r231396
https://bugs.webkit.org/show_bug.cgi?id=185414
Reviewed by Tim Horton.
Adjust a test expectation to check that the resulting DOM contains an attachment element,
anchor element, and another attachment element in that order. This ensures that the test
still passes, even after the anchor element is followed by a line break.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::TEST):
2018-05-08 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r231491.
https://bugs.webkit.org/show_bug.cgi?id=185434
Setting the Created key on a cookie does not work yet, due a
bug in CFNetwork (Requested by ggaren on #webkit).
Reverted changeset:
"[WKHTTPCookieStore getAllCookies] returns inconsistent
creation time"
https://bugs.webkit.org/show_bug.cgi?id=185041
https://trac.webkit.org/changeset/231491
2018-05-08 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: move input files to JSTests/test262
https://bugs.webkit.org/show_bug.cgi?id=185389
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(processCLI):
2018-05-08 Chris Dumez <cdumez@apple.com>
Unreviewed, simplify Speedometer fixes landed in r231489, r231483 & r231474.
* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):
2018-05-08 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r231468.
Broke the CLoop build
Reverted changeset:
"InPlaceAbstractState::beginBasicBlock shouldn't have to clear
any abstract values"
https://bugs.webkit.org/show_bug.cgi?id=185365
https://trac.webkit.org/changeset/231468
2018-05-08 Sihui Liu <sihui_liu@apple.com>
[WKHTTPCookieStore getAllCookies] returns inconsistent creation time
https://bugs.webkit.org/show_bug.cgi?id=185041
<rdar://problem/34684214>
Reviewed by Geoffrey Garen.
Add API test Coverage.
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TEST):
2018-05-08 Chris Dumez <cdumez@apple.com>
Unreviewed, fix issue with running Speedometer PerfTest after r231450.
* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):
2018-05-08 Chris Dumez <cdumez@apple.com>
Unreviewed, fix issue with running Speedometer PerfTest after r231450.
* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):
2018-05-07 Chris Dumez <cdumez@apple.com>
Unreviewed, fix issue with running Speedometer PerfTest after r231450.
* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest):
2018-05-06 Filip Pizlo <fpizlo@apple.com>
InPlaceAbstractState::beginBasicBlock shouldn't have to clear any abstract values
https://bugs.webkit.org/show_bug.cgi?id=185365
Reviewed by Saam Barati.
Make it possible to measure compile times.
* Scripts/run-jsc-benchmarks:
2018-05-07 Leo Balter <leonardo.balter@gmail.com>
Test262-Runner: Add base module to the local deps - unicore/Exact.pl
https://bugs.webkit.org/show_bug.cgi?id=185390
Reviewed by Michael Saboff.
* Scripts/test262/local/lib/perl5/unicore/Exact.pl: Added.
2018-05-07 Jonathan Bedard <jbedard@apple.com>
Check for com.apple.datamigrator before declaring simulators booted
https://bugs.webkit.org/show_bug.cgi?id=185315
<rdar://problem/39986261>
Reviewed by David Kilzer.
* Scripts/webkitdirs.pm:
(waitUntilProcessNotRunning): Wait until a process is not found.
(relaunchIOSSimulator): Wait until com.apple.datamigrator stops running to declare
a simulator booted.
* Scripts/webkitpy/common/system/executive_mock.py:
(MockExecutive2.__init__): Define _running_pids.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager.initialize_devices): Call wait_until_data_migration_is_done before
declaring that devices have been booted, increase the timeout since data migration will frequently
take longer than 60 seconds, especially with multiple simulators booting.
(SimulatedDeviceManager.swap): Ditto.
(SimulatedDeviceManager):
(SimulatedDeviceManager.wait_until_data_migration_is_done): Wait until there are no com.apple.datamigrator
processes running.
2018-05-07 Daniel Bates <dabates@apple.com>
REGRESSION (r229955): run-webkit-tests runs tests in skipped directories and subdirectories of directory given on command line
https://bugs.webkit.org/show_bug.cgi?id=185054
<rdar://problem/39773209>
Reviewed by Ryosuke Niwa.
Fallback to MacPort.CURRENT_VERSION if we are not using a known named macOS and do not have Apple Additions.
Darwin-based ports have OS version-specific test expectations and are certified to support running tests using
the currently shipping OS by way of a hardcoded class variable CURRENT_VERSION. The run-webkit-tests script
depends on the OS version to find the applicable TestExpectations files to parse to compute the list of skipped
tests for the port.
* Scripts/webkitpy/port/mac.py:
(MacPort.__init__): Fall back to MacPort.CURRENT_VERSION if we are not using a known named macOS and do not
have Apple Additions.
* Scripts/webkitpy/port/mac_unittest.py:
(MacTest.test_factory_with_future_version): Added.
(MacTest.test_factory_with_future_version_and_apple_additions): Renamed from MacTest.test_factory_with_future_version()
and added code to use the mock Apple Additions so that running this code with- and without- the real Apple Additions
produces consistent results now that the Mac port's OS version falls back to MacPort.CURRENT_VERSION when Apple Additions
is absent.
2018-05-07 Brian Burg <bburg@apple.com>
Web Inspector: opt out of process swap on navigation if a Web Inspector frontend is connected
https://bugs.webkit.org/show_bug.cgi?id=184861
<rdar://problem/39153768>
Reviewed by Timothy Hatcher.
Add a new test that checks whether a new process is used for navigation when
an Inspector is shown. Also check that the behavior reverts to normal after
the Inspector has been closed.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2018-05-04 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Multiple links in Mail are dropped in a single line, and are difficult to tell apart
https://bugs.webkit.org/show_bug.cgi?id=185289
<rdar://problem/35756912>
Reviewed by Tim Horton and Darin Adler.
Augment and rebaseline some iOS drag-and-drop API tests that handle dropping URLs as a part of multi-item drop
sessions.
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):
2018-05-04 Timothy Hatcher <timothy@apple.com>
Deprecate legacy WebView and friends
https://bugs.webkit.org/show_bug.cgi?id=185279
rdar://problem/33268700
Reviewed by Tim Horton.
* MiniBrowser/Configurations/Base.xcconfig: Added GCC_PREPROCESSOR_DEFINITIONS
to define DISABLE_LEGACY_WEBKIT_DEPRECATIONS.
2018-05-04 Leo Balter <leonardo.balter@gmail.com>
Test262-Runner: Add base module to the local deps - unicore/PVA.pl
https://bugs.webkit.org/show_bug.cgi?id=185314
Reviewed by Michael Saboff.
* Scripts/test262/local/lib/perl5/unicore/PVA.pl: Added.
2018-05-04 Wenson Hsieh <whsieh@berkeley.edu>
REGRESSION: [ios-simulator] 3 WKWebViewAutofillTests API test failures seen with 11.3 SDK
https://bugs.webkit.org/show_bug.cgi?id=184196
<rdar://problem/39054481>
Reviewed by Tim Horton.
Removes some unnecessary workarounds to enable running app autofill tests against iOS versions
earlier than 11.3. Also re-enables these tests.
* TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:
(TestWebKitAPI::TEST):
(-[UITextAutofillSuggestion initWithUsername:password:]): Deleted.
(+[UITextAutofillSuggestion autofillSuggestionWithUsername:password:]): Deleted.
2018-05-04 Myles C. Maxfield <mmaxfield@apple.com>
Text shaping in the simple path is flipped in the y direction
https://bugs.webkit.org/show_bug.cgi?id=185062
<rdar://problem/39778678>
Reviewed by Simon Fraser.
Huge thanks to Ulrike Rausch of LiebeFonts for contributing the test fonts!!!
* Scripts/webkitpy/common/config/contributors.json:
2018-05-04 Leo Balter <leonardo.balter@gmail.com>
Test262-Runner: place the processCLI inside the main call
https://bugs.webkit.org/show_bug.cgi?id=185304
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(main):
2018-05-04 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Epiphany (GNOME Web) says "Error downloading: Service Unavailable." when trying to download an image from discogs.com
https://bugs.webkit.org/show_bug.cgi?id=174730
Reviewed by Michael Catanzaro.
Update unit tests to check that User-Agent header is included in HTTP download requests.
* TestWebKitAPI/Tests/WebKitGLib/TestDownloads.cpp:
(testDownloadRemoteFile):
(testWebViewDownloadURI):
(testPolicyResponseDownload):
(testPolicyResponseDownloadCancel):
(testDownloadMIMEType):
(testContextMenuDownloadActions):
2018-05-03 Ross Kirsling <ross.kirsling@sony.com>
[WinCairo] Test archive must use Python zipfile, just like build product.
https://bugs.webkit.org/show_bug.cgi?id=185265
Reviewed by Per Arne Vollan.
* BuildSlaveSupport/test-result-archive:
(archive_test_results):
Copy over Win32-oriented archiving logic from built-product-archive.
2018-05-03 Leo Balter <leonardo.balter@gmail.com>
cleanup modules usage for the Test262-Runner
https://bugs.webkit.org/show_bug.cgi?id=185263
Reviewed by Michael Saboff.
* Scripts/test262-runner:
* Scripts/test262/Runner.pm:
(processCLI):
2018-05-03 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: minor fixes
https://bugs.webkit.org/show_bug.cgi?id=185250
Reviewed by Michael Saboff.
Add comments, change output and fix bug: unintended interpolation
of filename when running jsc.
* Scripts/test262/Runner.pm:
(processCLI):
(main):
(runTest):
2018-05-03 Chris Dumez <cdumez@apple.com>
Load hangs if the WebProcess fails to launch
https://bugs.webkit.org/show_bug.cgi?id=185225
<rdar://problem/38249058>
Reviewed by Geoff Garen.
Add API test coverage.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm: Added.
(-[CrashOnStartNavigationDelegate _webView:webContentProcessDidTerminateWithReason:]):
(-[CrashOnStartNavigationDelegate webView:didFinishNavigation:]):
(-[CrashRecoveryScriptMessageHandler userContentController:didReceiveScriptMessage:]):
(TEST):
2018-05-03 Don Olmstead <don.olmstead@sony.com>
[WinCairo] Add JSC test bots
https://bugs.webkit.org/show_bug.cgi?id=185234
Reviewed by Per Arne Vollan.
* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunJavaScriptCoreTests.start):
2018-05-03 Michael Catanzaro <mcatanzaro@igalia.com>
WebKit should send fake macOS user agent to docs.google.com
https://bugs.webkit.org/show_bug.cgi?id=185165
Reviewed by Carlos Garcia Campos.
* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::TEST):
2018-05-03 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: performance improvements
https://bugs.webkit.org/show_bug.cgi?id=185202
Reviewed by Michael Saboff.
Batch the tests by the number of processes, and give each process
a file to save results to to avoid threading. Do not parallelize
when running small sets of tests.
* Scripts/test262/Runner.pm:
(processCLI):
(main):
(processFile):
(processResult):
2018-05-03 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r231253.
The API test added with this change is crashing on the bots.
Reverted changeset:
"Web Inspector: opt out of process swap on navigation if a Web
Inspector frontend is connected"
https://bugs.webkit.org/show_bug.cgi?id=184861
https://trac.webkit.org/changeset/231253
2018-05-03 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r222772): [GTK][WPE] WebProcess from WebKitGtk+ 2.19.9x SIGSEVs in WebKit::WebProcess::ensureNetworkProcessConnection() at Source/WebKit/WebProcess/WebProcess.cpp:1127
https://bugs.webkit.org/show_bug.cgi?id=183348
Reviewed by Michael Catanzaro.
Add a test case to reproduce the crash.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewCloseQuickly):
(beforeAll):
2018-05-02 Aditya Keerthi <akeerthi@apple.com>
Can't copy and paste URLs that have no title into Mail (macOS)
https://bugs.webkit.org/show_bug.cgi?id=185205
<rdar://problem/36352406>
Reviewed by Tim Horton.
Added test to verify behavior when copying and pasting a URL without a title.
* TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.html:
* TestWebKitAPI/Tests/mac/ContextMenuCanCopyURL.mm:
(TestWebKitAPI::TEST):
2018-05-02 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] Generate a JSC bundle on the 64 and 32 bit release bots and upload it to webkitgtk.org (follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=184699
Unreviewed follow-up fix after r231230.
* Scripts/generate-jsc-bundle:
(generate_wrapper_script): Quote the arguments passed to jsc.
2018-05-02 Brian Burg <bburg@apple.com>
Web Inspector: opt out of process swap on navigation if a Web Inspector frontend is connected
https://bugs.webkit.org/show_bug.cgi?id=184861
<rdar://problem/39153768>
Reviewed by Ryosuke Niwa.
Add a new test that checks whether a new process is used for navigation when
an Inspector is shown. Also check that the behavior reverts to normal after
the Inspector has been closed.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2018-05-02 Valerie R Young <valerie@bocoup.com>
test262/Runner.pm: save summary to file
https://bugs.webkit.org/show_bug.cgi?id=185200
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(processCLI):
(main):
(summarizeResults):
2018-05-02 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] Generate a JSC bundle on the 64 and 32 bit release bots and upload it to webkitgtk.org
https://bugs.webkit.org/show_bug.cgi?id=184699
Reviewed by Gustavo Noronha Silva.
This adds a new step for the GTK 64-bit release build bot and the
GTK 32-bit release build&test bot.
This step will be run as one of the lasts ones (after the product
is built) and will execute the script generate-jsc-bundle.
This script will take care of creating a JSC bundle and uploading
it to a server defined on a configuration file that has to be
deployed on the bots with the required server data and credentials
for this upload.
In this case, the built products should then be accessible at
<https://webkitgtk.org/jsc-built-products>. But the implementation
is not tied to any specific server. All the details about where
to upload the file is done in configuration file that is kept
private on each bot outside of the WebKit source tree.
The script also supports generating a JSC bundle locally and not
uploading it anywhere. This is the default mode of running.
The remote upload will only be activated if a --remote-config-file
parameter is passed (which is done from the buildbot config)
* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/factories.py:
(BuildFactory):
(BuildFactory.__init__):
(TestFactory):
(TestFactory.__init__):
(BuildAndGenerateJSCBundleFactory):
(BuildAndNonLayoutTestAndGenerateJSCBundleFactory):
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(GenerateJSCBundle):
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
* Scripts/generate-jsc-bundle: Added.
(ldd_get_libs_and_interpreter):
(generate_readme):
(generate_wrapper_script):
(copy_and_remove_rpath):
(createJSCBundle):
(sha256sum):
(uploadJSCBundle):
(main):
2018-05-01 Ryosuke Niwa <rniwa@webkit.org>
PSON: Make WebKitTestRunner work with process swap on navigation turned on
https://bugs.webkit.org/show_bug.cgi?id=185111
Reviewed by Chris Dumez.
Add the basic support for running layout tests with process-swap-on-navigation turned on.
First, move m_whatToDump, m_dumpPixels, m_waitToDump, and m_dumpFrameLoadCallbacks from WebContent process
to UI process so that calls to waitUntilDone, dumpAsText, etc... persist across process swaps.
In addition, initialize the injected bundle inside a new WebContent process when the first page is created.
This instantiates objects such as TestRunner, GCController, etc... in the new process. The initialization
can't be done in InjectedBundle::beginTesting because some steps in InjectedBundle::initialize require
the current PageGroup and Page objects. We avoid clearing databases and app cache in this case.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didCreatePage): Send "Initialization" message to UI process. This message returns
all the dictionary values usually present in "BeginTest" message from UI process as well as "ResumeTesting"
boolean which is set when this process was created as a result of a process swap on navgation. Invoke
beginTesting with BegingTestingMode::Resume when this boolean is set.
(WTR::InjectedBundle::didReceiveMessageToPage):
(WTR::InjectedBundle::beginTesting): Don't clear database, app cache, etc... when initializing an injected
bundle after a process swap on navigation.
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dump):
(WTR::InjectedBundlePage::frameDidChangeLocation):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::TestRunner):
(WTR::TestRunner::shouldDumpPixels const): Added.
(WTR::TestRunner::setDumpPixels): Added.
(WTR::TestRunner::dumpAsText):
(WTR::TestRunner::whatToDump const): Added.
(WTR::TestRunner::setWhatToDump): Added.
(WTR::TestRunner::waitUntilDone):
(WTR::TestRunner::setWaitUntilDone): Added.
(WTR::TestRunner::shouldWaitUntilDone): Added.
(WTR::TestRunner::notifyDone):
(WTR::TestRunner::forceImmediateCompletion):
(WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Added.
(WTR::TestRunner::shouldDumpFrameLoadCallbacks): Added.
(WTR::TestRunner::setAudioResult):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::dumpChildFramesAsText):
(WTR::TestRunner::dumpDOMAsWebArchive):
(WTR::TestRunner::setShouldDumpFrameLoadCallbacks): Moved to cpp.
(WTR::TestRunner::whatToDump const): Moved to cpp.
(WTR::TestRunner::shouldDumpMainFrameScrollPosition const):
(WTR::TestRunner::shouldDumpPixels const): Moved to cpp.
(WTR::TestRunner::shouldDumpFrameLoadCallbacks const): Moved to cpp.
(WTR::TestRunner::waitToDump const): Renamed to shouldWaitUntilDone and moved to cpp.
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::TestInvocation): Initialize m_dumpFrameLoadCallbacks here.
(WTR::TestInvocation::shouldLogFrameLoadDelegates const): Deleted.
(WTR::TestInvocation::createTestSettingsDictionary): Extracted from invoke().
(WTR::TestInvocation::invoke): Sets m_startedTesting to true immediately afte sending "BeginTest" message.
m_startedTesting is later used in didReceiveSynchronousMessageFromInjectedBundle to detect whether a given
"Initialization" message is sent from a regular WebContent process (m_startedTesting is false) or the one
started as a result of a process swap on navigation (m_startedTesting is true).
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle): Added a bunch of new messgaes to
support initializing the injected bundle in a process swapped after navigation and set/get messages for
the states which must persist across process swaps within a test.
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
* Tools/WebKitTestRunner/WhatToDump.h:
(WTR::WhatToDump): Added.
2018-05-01 Leo Balter <leonardo.balter@gmail.com>
Auto save the results for Test262
https://bugs.webkit.org/show_bug.cgi?id=184926
Reviewed by Michael Saboff.
* Scripts/test262/Runner.pm:
(processCLI):
(main):
(parseError):
(processResult):
(summarizeResults):
* Scripts/test262/config.yaml: Renamed from Tools/Scripts/test262/test262-config.yaml.
2018-05-01 Jonathan Bedard <jbedard@apple.com>
webkitpy: SIGKILL right after SIGTERM causes orphaned processes with 'xcrun simctl spawn'
https://bugs.webkit.org/show_bug.cgi?id=185164
Reviewed by David Kilzer.
* Scripts/webkitpy/common/system/executive.py:
(Executive.kill_process): First attempt will always send a SIGTERM, all subsequent attempts will
send a SIGKILL. A SIGKILL with not be sent if the process is not running to avoid orphaning childen.
2018-05-01 Chris Dumez <cdumez@apple.com>
REGRESSION (r230919): API test WebKit.AutoLayoutIntegration is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=184918
<rdar://problem/39705516>
Reviewed by Wenson Hsieh.
Make sure provisional load has started before calling beginLayoutAtMinimumWidth
on the AutoLayoutWKWebView to restore pre-r230919 behavior. The load now starts
asynchronously because we ask the client if it is OK to do the load and the policy
delegates are asynchronous nowadays.
* TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm:
(-[AutoLayoutWKWebView load:withWidth:expectingContentSize:resettingWidth:]):
* TestWebKitAPI/cocoa/TestNavigationDelegate.h:
* TestWebKitAPI/cocoa/TestNavigationDelegate.mm:
(-[TestNavigationDelegate webView:didStartProvisionalNavigation:]):
(-[TestNavigationDelegate waitForDidStartProvisionalNavigation]):
(-[WKWebView _test_waitForDidStartProvisionalNavigation]):
2018-05-01 Ross Kirsling <ross.kirsling@sony.com>
[WinCairo] Align buildbot test stages with AppleWin.
https://bugs.webkit.org/show_bug.cgi?id=185094
Reviewed by Brent Fulgham.
* BuildSlaveSupport/build.webkit.org-config/factories.py:
(TestFactory.__init__):
Do run API tests, don't run dashboard tests.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunUnitTests):
Call run-api-tests with Python, not Perl (bugfix for r230998).
* Scripts/webkitpy/port/win.py:
(WinPort.environment_for_api_tests):
Retrieve necessary Windows environment variables.
2018-05-01 Eric Carlson <eric.carlson@apple.com>
[MediaStream] remove WK1 support
https://bugs.webkit.org/show_bug.cgi?id=185136
Reviewed by Youenn Fablet.
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate webView:decidePolicyForUserMediaRequestFromOrigin:listener:]): Deleted.
2018-05-01 Chris Dumez <cdumez@apple.com>
[WKTR] Move navigation policy for response decision from InjectedBundle to UIProcess
https://bugs.webkit.org/show_bug.cgi?id=185157
Reviewed by Geoffrey Garen.
Move navigation policy for response decision from InjectedBundle to UIProcess. This is a more
common configuration and should therefore be the configuration we test by default.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::decidePolicyForResponse):
2018-05-01 Oleksandr Skachkov <gskachkov@gmail.com>
WebAssembly: add support for stream APIs - JavaScript API
https://bugs.webkit.org/show_bug.cgi?id=183442
Reviewed by Yusuke Suzuki and JF Bastien.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-04-30 Mark Lam <mark.lam@apple.com>
Apply PtrTags to the MetaAllocator and friends.
https://bugs.webkit.org/show_bug.cgi?id=185110
<rdar://problem/39533895>
Reviewed by Saam Barati.
Update the test to match MetaAllocator changes in WTF.
* TestWebKitAPI/Tests/WTF/MetaAllocator.cpp:
(TestWebKitAPI::TEST_F):
(WTF::tagForPtr):
(WTF::ptrTagName):
2018-04-30 Alex Christensen <achristensen@webkit.org>
Add WKUIDelegatePrivate equivalent of WKPageContextMenuClient getContextMenuFromProposedMenuAsync
https://bugs.webkit.org/show_bug.cgi?id=180955
Reviewed by Andy Estes.
* TestWebKitAPI/Tests/WebKit/mac/ContextMenuImgWithVideo.mm:
(-[ContextMenuImgWithVideoDelegate _webView:contextMenu:forElement:]):
(-[ContextMenuImgWithVideoDelegate _webView:getContextMenuFromProposedMenu:forElement:userInfo:completionHandler:]):
2018-04-30 JF Bastien <jfbastien@apple.com>
Use some C++17 features
https://bugs.webkit.org/show_bug.cgi?id=185135
Reviewed by Alex Christensen.
* DumpRenderTree/PlatformMac.cmake:
* gtk/ycm_extra_conf.py:
(FlagsForFile):
2018-04-30 Yusuke Suzuki <utatane.tea@gmail.com>
Use WordLock instead of std::mutex for Threading
https://bugs.webkit.org/show_bug.cgi?id=185121
Reviewed by Geoffrey Garen.
* TestWebKitAPI/Tests/WTF/Signals.cpp:
(TEST):
2018-04-30 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Webkit should spoof as Safari on a Mac when on Chase.com
https://bugs.webkit.org/show_bug.cgi?id=185103
Reviewed by Carlos Garcia Campos.
* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::TEST):
2018-04-28 Sihui Liu <sihui_liu@apple.com>
[Cocoa] Set HTTPOnly flag when converting Cookie to NSHTTPCookie
https://bugs.webkit.org/show_bug.cgi?id=185052
Reviewed by Geoffrey Garen.
Modified API test to provide correct test cases for HTTPOnly flag.
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TEST):
2018-04-28 Rick Waldron <waldron.rick@gmail.com>
Token misspelled "tocken" in error message string
https://bugs.webkit.org/show_bug.cgi?id=185030
Reviewed by Saam Barati.
* Scripts/test262/test262-expectations.yaml: Fix typo "tocken" => "token"
2018-04-27 Stephan Szabo <stephan.szabo@sony.com>
[WinCairo] Support --no-copy for jsc tests in wincairo tests, add copying of dlls for copy case
https://bugs.webkit.org/show_bug.cgi?id=185049
Reviewed by Keith Miller.
* Scripts/run-javascriptcore-tests:
(runJSCStressTests):
* Scripts/run-jsc-stress-tests:
2018-04-26 Ryosuke Niwa <rniwa@webkit.org>
PSON: Triggering a navigation to an invalid URL creates a new WebContent process
https://bugs.webkit.org/show_bug.cgi?id=185066
Reviewed by Youenn Fablet.
Added a new test case (ProcessSwap.NavigateToInvalidURL) for navigating to an invalid URL.
WebKit should not swap WebContent process in this case.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONNavigationDelegate webView:didFailProvisionalNavigation:withError:]):
(-[PSONUIDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
2018-04-27 Nan Wang <n_wang@apple.com>
AX: Accessibility needs to know which part of the content view is visible on iOS
https://bugs.webkit.org/show_bug.cgi?id=185085
<rdar://problem/39801363>
Reviewed by Chris Fleizach.
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::stringAttributeValue):
2018-04-27 Wenson Hsieh <wenson_hsieh@apple.com>
[Extra zoom mode] Add a mechanism to override default viewport behaviors in extra zoom mode
https://bugs.webkit.org/show_bug.cgi?id=185050
<rdar://problem/39624038>
Reviewed by Tim Horton.
Remove a test that's no longer useful, now that the SPI it was testing is gone. This functionality is now
tested by the layout test added in this patch.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/ViewportSizingTests.mm: Removed.
2018-04-26 Ryan Haddad <ryanhaddad@apple.com>
REGRESSION (r231039): RunUnitTests step reports disabled tests as failures
https://bugs.webkit.org/show_bug.cgi?id=185061
Reviewed by Aakash Jain.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunUnitTests.countFailures): Return the difference between the total number of tests run and the number that passed.
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Add a test.
2018-04-26 Ross Kirsling <ross.kirsling@sony.com>
Add release bots for WinCairo.
https://bugs.webkit.org/show_bug.cgi?id=185042
Reviewed by Lucas Forschler.
* BuildSlaveSupport/build.webkit.org-config/config.json:
Add a release build bot and two test bots, replacing the outdated WinCairo release bots.
2018-04-26 Sihui Liu <sihui_liu@apple.com>
-[WKHTTPCookieStore deleteCookie:completionHandler:] doesn't delete cookies
https://bugs.webkit.org/show_bug.cgi?id=184938
<rdar://problem/34737395>
Reviewed by Geoffrey Garen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/WKHTTPCookieStore.mm:
(TEST):
2018-04-26 Ross Kirsling <ross.kirsling@sony.com>
WinCairo test bots should run JSC tests with options for Windows command prompt.
https://bugs.webkit.org/show_bug.cgi?id=185019
Reviewed by Per Arne Vollan.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunJavaScriptCoreTests.start):
2018-04-26 Ross Kirsling <ross.kirsling@sony.com>
WinCairo WKL Debug Test bot is not using DRT.
https://bugs.webkit.org/show_bug.cgi?id=185009
Reviewed by Per Arne Vollan.
* BuildSlaveSupport/build.webkit.org-config/config.json:
2018-04-26 Per Arne Vollan <pvollan@apple.com>
Disable content filtering in minimal simulator mode
https://bugs.webkit.org/show_bug.cgi?id=185027
<rdar://problem/39736091>
Reviewed by Jer Noble.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-04-26 Brady Eidson <beidson@apple.com>
Add a setting for keeping around all processes and always reusing them per-origin.
<rdar://problem/39695798> and https://bugs.webkit.org/show_bug.cgi?id=185020
Reviewed by Andy Estes.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2018-04-26 Andy VanWagoner <thetalecrafter@gmail.com>
[INTL] Implement Intl.PluralRules
https://bugs.webkit.org/show_bug.cgi?id=184312
Reviewed by JF Bastien.
Added Intl.PluralRules feature flag.
* Scripts/webkitperl/FeatureList.pm:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-04-25 Michael Catanzaro <mcatanzaro@igalia.com>
[WPE] Build and link against latest WPEBackend and WPEBackend-fdo
https://bugs.webkit.org/show_bug.cgi?id=184643
Reviewed by Žan Doberšek.
Add missing INCLUDE_DIRS in many places.
Adapt to single-header WPE includes.
Null-initialize padding to silence -Wmissing-field-initializers. (Yuck.)
* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewWebBackend):
* TestWebKitAPI/glib/PlatformWPE.cmake:
* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/PlatformWPE.cmake:
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
* wpe/HeadlessViewBackend/CMakeLists.txt:
* wpe/HeadlessViewBackend/HeadlessViewBackend.cpp:
* wpe/HeadlessViewBackend/HeadlessViewBackend.h:
* wpe/jhbuild.modules:
2018-04-25 Jonathan Bedard <jbedard@apple.com>
REGRESSION (r230998): Bot watcher's dashboard doesn't display number of API test failures
https://bugs.webkit.org/show_bug.cgi?id=184982
Rubber-stamped by Aakash Jain.
Correctly count the number of API test failures.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunUnitTests.countFailures): Count the number of test failures for the new run-api-tests.
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
* Scripts/webkitpy/api_tests/manager.py:
(Manager.run): Disabled tests are not run.
2018-04-25 Jiewen Tan <jiewen_tan@apple.com>
Remove access to keychain from the WebContent process
https://bugs.webkit.org/show_bug.cgi?id=184428
<rdar://problem/13150903>
Reviewed by Brent Fulgham.
This patch does the followings:
1. Added an API test for this patch.
2. Instrument DumpRenderTree and WebKitTestRunner to take advantages of new SPIs.
* DumpRenderTree/mac/UIDelegate.mm:
(-[UIDelegate signedPublicKeyAndChallengeStringForWebView:]):
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/SSLKeyGenerator.mm: Added.
(TestWebKitAPI::SSLKeyGeneratorTest::SetUp):
(TestWebKitAPI::SSLKeyGeneratorTest::TearDown):
(TestWebKitAPI::TEST_F):
* WebKitTestRunner/TestController.cpp:
(WTR::copySignedPublicKeyAndChallengeString):
(WTR::TestController::createOtherPage):
(WTR::TestController::createWebViewWithOptions):
2018-04-25 Wenson Hsieh <wenson_hsieh@apple.com>
[Extra zoom mode] The search field on www.bing.com is missing label text
https://bugs.webkit.org/show_bug.cgi?id=184975
<rdar://problem/39723081>
Reviewed by Tim Horton.
Adds UIScriptController.formInputLabel, which asynchronously requests the input label text for the currently
focused element in extra zoom mode.
* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::formInputLabel const):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::formInputLabel const):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::formInputLabel const):
2018-04-25 Michael Catanzaro <mcatanzaro@igalia.com>
[WPE] Should load injected bundle from builddir in developer builds
https://bugs.webkit.org/show_bug.cgi?id=184983
Reviewed by Carlos Alberto Lopez Perez.
Set WEBKIT_INJECTED_BUNDLE_PATH when running WPE MiniBrowser.
* Scripts/run-minibrowser:
2018-04-25 Michael Catanzaro <mcatanzaro@igalia.com>
[WPE] libgstggtk.so broken in jhbuild environment
https://bugs.webkit.org/show_bug.cgi?id=184984
Reviewed by Carlos Alberto Lopez Perez.
Don't pass --enable-glx=no when building libepoxy, to ensure it's compatible with
gst-plugins-good.
* wpe/jhbuild.modules:
2018-04-25 Ryosuke Niwa <rniwa@webkit.org>
PSON: Don't create a new process when navigating to a blob URL, data URL, and about:blank
https://bugs.webkit.org/show_bug.cgi?id=184962
Reviewed by Youenn Fablet.
Added four test cases for navigating to a blob URL, data URL, and about:blank with process-swap-on-navigation turned on.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(ProcessSwap.SameOriginBlobNavigation): Added.
(ProcessSwap.CrossOriginBlobNavigation): Added.
(ProcessSwap.NavigateToAboutBlank): Added.
(ProcessSwap.NavigateToDataURL): Added.
2018-04-25 Michael Catanzaro <mcatanzaro@igalia.com>
[WPE] Remove deprecated functions and properties from the API
https://bugs.webkit.org/show_bug.cgi?id=179295
Reviewed by Žan Doberšek.
* TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp:
(testWebViewAuthenticationStorage): Disable this test for now. It will require some effort
to rewrite LoadTrackingTest to not require the web view at construction time.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitSettings.cpp:
(testWebKitSettings): Don't test private browsing setting, which is gone.
* TestWebKitAPI/glib/CMakeLists.txt: Disable TestCookieManager for now.
2018-04-25 Andy Estes <aestes@apple.com>
[Mac] Number of drop items is always 0 when performing a DHTML drag
https://bugs.webkit.org/show_bug.cgi?id=184943
Reviewed by Ryosuke Niwa.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/DragAndDropPasteboardTests.mm:
(-[DragInfo numberOfValidItemsForDrop]):
(-[DragInfo setNumberOfValidItemsForDrop:]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/mac/full-page-dropzone.html: Added.
2018-04-25 Jonathan Bedard <jbedard@apple.com>
API test harness should be Python
https://bugs.webkit.org/show_bug.cgi?id=181043
<rdar://problem/36164410>
Reviewed by David Kilzer.
Run API tests from a Python script rather than Perl. The Python API tests have
the same structure as the layout tests.
* Scripts/run-api-tests: Changed from Perl to Python.
* Scripts/webkitpy/api_tests: Added.
* Scripts/webkitpy/api_tests/__init__.py: Added.
* Scripts/webkitpy/api_tests/manager.py: Added.
(Manager):
(Manager.__init__):
(Manager._test_list_from_output): Construct a list of tests from the output of
TestWTF and TestWebKitAPI.
(Manager._find_test_subset): Given a list of all possible tests and command line
arguments, return a list of tests which match the provided arguments.
(Manager._collect_tests): Run TestWTF and TestWebKitAPI with --gtest_list_tests
to determine which tests will be run.
(Manager._print_test_result): Formatted print of a test with it's output.
(Manager._print_tests_result_with_status): Print all tests and output for tests
which ran with a specified exit status.
(Manager.run): Collect all tests, run them and then print results from the run.
* Scripts/webkitpy/api_tests/run_api_tests.py: Added.
(main): Parse arguments, construct a port, early exit for illegal ports and
then run tests.
(run): Setup logging and printing before using the Manager to run tests.
(parse_args): Use argparse to define all options used by run-api-tests.
* Scripts/webkitpy/api_tests/runner.py: Added.
(Runner):
(Runner.__init__):
(Runner._shard_tests): Split tests so that each suite runs together.
(Runner.command_for_port): Run a command on the device specified by the given
port object. Once <https://bugs.webkit.org/show_bug.cgi?id=175204> is completed,
this function would be entirely replaced by the server_process factory owned
by the port object.
(Runner.run): Run all shards in the message_pool.
(Runner.handle): Handle reports from child processes.
(Runner.result_map_by_status): Return a mapping of tests to output for tests
which exit with a specific status.
(_Worker):
(_Worker.__init__):
(_Worker._filter_noisy_output): Filter out objc warnings since these polite the log.
(_Worker._run_single_test): Runs a single test in a single child process.
(_Worker._run_shard_with_binary): Attempts to run a group of tests in the same
child process. If this technique fails, the remaining tests are run singly.
(_Worker.handle): Run the specified shard.
* Scripts/webkitpy/port/base.py:
(Port):
(Port.check_api_test_build): Check if TestWTF and TestWebKitAPI are built.
(Port.environment_for_api_tests): Return the environment needed to run
the TestWebKitAPI binary.
(Port. path_to_api_test_binaries): Return a list of the path to all binaries
used when running API tests.
(Port._build_api_tests): Build TestWTF and TestWebKitAPI if required.
* Scripts/webkitpy/port/mac.py:
(MacPort.environment_for_api_tests): Enable GuardMalloc for API tests.
* Scripts/webkitpy/port/server_process.py:
(ServerProcess.pop_all_buffered_stdout):
2018-04-25 Carlos Garcia Campos <cgarcia@igalia.com>
Incorrect number of WebDriver test failures shown in the bots
https://bugs.webkit.org/show_bug.cgi?id=184959
Reviewed by Michael Catanzaro.
The regular expression we are using to get the number of failures from the log is matching a particular test
error output. Improve the regular expression to avoid matching other strings in the log. Ensure that only
matches at the beginning of lines and add spaces after Unexpected and before the (<failures>).
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunWebDriverTests.commandComplete):
2018-04-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Implement MouseEvent.buttons
https://bugs.webkit.org/show_bug.cgi?id=184913
Reviewed by Žan Doberšek.
Include the mouse buttons state in WTR synthesized events.
* WebKitTestRunner/EventSenderProxy.h:
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
(WTR::EventSenderProxy::EventSenderProxy):
(WTR::EventSenderProxy::createMouseButtonEvent):
(WTR::EventSenderProxy::mouseDown):
(WTR::EventSenderProxy::mouseUp):
(WTR::EventSenderProxy::mouseMoveTo):
2018-04-24 Pablo Saavedra <psaavedra@igalia.com>
[GTK][WPE] Fix triggered bot name on the WPE Debug Build bot
https://bugs.webkit.org/show_bug.cgi?id=184954
Reviewed by Michael Catanzaro.
* BuildSlaveSupport/build.webkit.org-config/config.json:
2018-04-24 Saam Barati <sbarati@apple.com>
Keep around a pre-warmed process when doing process swap on navigation
https://bugs.webkit.org/show_bug.cgi?id=184765
<rdar://problem/39685099>
Reviewed by Ryosuke Niwa and Brady Eidson.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2018-04-24 Aakash Jain <aakash_jain@apple.com>
[build.webkit.org] unit-tests fail when passwords.json is missing
https://bugs.webkit.org/show_bug.cgi?id=180390
Reviewed by Carlos Alberto Lopez Perez.
* BuildSlaveSupport/build.webkit.org-config/loadConfig.py:
(loadBuilderConfig): Add support for test_mode. Load mock passwords in test_mode.
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
(BuildBotConfigLoader._add_dependant_modules_to_sys_modules): Call _add_webkitpy_to_sys_path as well.
(BuildBotConfigLoader._mock_open): Deleted.
(BuildBotConfigLoader.load_config): Deleted.
2018-04-24 John Wilander <wilander@apple.com>
From-Origin: Support for 'same' and 'same-site' response header, nested frame origin check
https://bugs.webkit.org/show_bug.cgi?id=184560
<rdar://problem/38901344>
Reviewed by Youenn Fablet and Daniel Bates.
This patch implements significant parts of https://github.com/whatwg/fetch/issues/687.
We consume the From-Origin response header and only load the resource if:
- The header is non-existent, empty, or invalid.
- The header specifies 'same' and the resource's origin matches the originating
document's origin and the origins up the frame tree.
- The header specifies 'same-site' and the resource's eTLD+1 matches the originating
document's eTLD+1 and the eTLD+1 of the documents up the frame tree.
This feature is experimental and off by default.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp: Added.
(TestWebKitAPI::TEST):
Tests for From-Origin header parsing.
2018-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update W3C WebDriver imported tests.
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
(WebDriverW3CExecutor.__init__):
2018-04-24 Zan Dobersek <zdobersek@igalia.com>
[WPE] Remove libgbm dependency
https://bugs.webkit.org/show_bug.cgi?id=184906
Reviewed by Carlos Garcia Campos.
Stop searching for libgbm, using its compiler flags for the
HeadlessViewBackend compilation and linking against the .so object.
This is not necessary anymore after r230562 switched to a different
backend implementation for testing.
* wpe/HeadlessViewBackend/CMakeLists.txt:
* wpe/install-dependencies:
2018-04-23 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Make it possible to use a different timeout for slow test cases in GLib tests
https://bugs.webkit.org/show_bug.cgi?id=184816
Reviewed by Michael Catanzaro.
Pass a function from api test runner to glib test runner to check if a test is slow and use the given slow
timeout.
* TestWebKitAPI/glib/TestExpectations.json:
* glib/api_test_runner.py:
(TestRunner._run_test_glib.is_slow_test):
(TestRunner._run_test_glib):
* glib/glib_test_runner.py:
(GLibTestRunner.__init__):
(GLibTestRunner._stop_timeout):
(GLibTestRunner._subtest_start):
(GLibTestRunner._subtest_end):
2018-04-23 Wenson Hsieh <wenson_hsieh@apple.com>
[Extra zoom mode] REGRESSION(230860) Unable to change time input values using UI
https://bugs.webkit.org/show_bug.cgi?id=184901
<rdar://problem/39664797>
Reviewed by Tim Horton.
Introduce a new UIScriptController method to set the value of a currently focused input of type time, by
interacting with the UI. See WebKit ChangeLogs for more detail.
* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::setTimePickerValue):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::setTimePickerValue):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::setTimePickerValue):
2018-04-23 Zalan Bujtas <zalan@apple.com>
[LayoutFormattingContext] Initial commit.
https://bugs.webkit.org/show_bug.cgi?id=184896
Reviewed by Antti Koivisto.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-04-23 Chris Dumez <cdumez@apple.com>
[WKTR] Move navigation policy decision from the injected bundle to the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=184801
Reviewed by Geoffrey Garen.
Move navigation policy decision from the injected bundle to the UIProcess in WebKitTestRunner.
This is a more common configuration and therefore should be the default testing configuration.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::decidePolicyForNavigationAction):
Always respond with 'PassThrough' in the InjectedBundle so the UIProcess
is now asked for the policy decision.
2018-04-23 Pablo Saavedra <psaavedra@igalia.com>
[GTK][WPE] Add Debug bots (build and tests) for WPE
https://bugs.webkit.org/show_bug.cgi?id=184887
Reviewed by Carlos Alberto Lopez Perez.
Deployed 2 new bots for WPE Debug: wpe-linux-bot-3 and
wpe-linux-bot-4
Both bots have already the credentials ready to authenticated against
build.webkit.org. They provides the bots for the "debug" configuration over
the "WPE" platform and building for the "x86_64" architecture:
WPE Linux 64-bit Debug (Build) and WPE Linux 64-bit Debug (Tests) 
* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
2018-04-23 Chris Dumez <cdumez@apple.com>
HTML String load cannot be prevented by responding 'Cancel' asynchronously in decidePolicyForNavigationAction
https://bugs.webkit.org/show_bug.cgi?id=184848
<rdar://problem/39145306>
Reviewed by Brady Eidson.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm:
(-[DecidePolicyForNavigationActionController webView:decidePolicyForNavigationAction:decisionHandler:]):
(TEST):
2018-04-23 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK][WPE] TestSSL fails due to additional TLS errors returned
https://bugs.webkit.org/show_bug.cgi?id=184860
Reviewed by Carlos Garcia Campos.
Add script and config file for regenerating the test certificate.
Regenerate it. TestSSL no longer fails on my machine.
I do see a ton of network process crashes and JavaScript errors, none of
which prevent the test from passing, but this commit only claims to fix
the certificate validation portion of the test.
* TestWebKitAPI/Tests/WebKitGLib/resources/generate-test-cert.sh: Added.
* TestWebKitAPI/Tests/WebKitGLib/resources/test-cert.conf: Added.
* TestWebKitAPI/Tests/WebKitGLib/resources/test-cert.pem:
2018-04-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] ERROR: Thread was unable to be detached when running /jsc/vm test in debug
https://bugs.webkit.org/show_bug.cgi?id=184815
Reviewed by Michael Catanzaro.
This is because in the test we are calling both join and detach. We should only call join.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testsJSCVirtualMachine):
2018-04-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Test /jsc/prototypes crashes in debug
https://bugs.webkit.org/show_bug.cgi?id=184814
Reviewed by Michael Catanzaro.
We should also call the constructor/destructor of Bar struct to ensure Foo is constructed.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(barCreate):
(barFree):
2018-04-20 Michael Catanzaro <mcatanzaro@igalia.com>
REGRESSION(r228088): [SOUP] Check TLS errors for WebSockets on GTlsConnection::accept-certificate
https://bugs.webkit.org/show_bug.cgi?id=184804
Reviewed by Carlos Garcia Campos.
* TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp:
(WebSocketTest::WebSocketTest):
(WebSocketTest::~WebSocketTest):
(WebSocketTest::serverWebSocketCallback):
(WebSocketTest::webSocketTestResultCallback):
(WebSocketTest::connectToServerAndWaitForEvents):
(testWebSocketTLSErrors):
(beforeAll):
2018-04-20 Chris Dumez <cdumez@apple.com>
Unreviewed, update 2 more API tests after r230876.
* TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
(TEST):
* TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:
(TestWebKitAPI::TEST):
2018-04-20 Tim Horton <timothy_horton@apple.com>
Adjust geolocation feature flag
https://bugs.webkit.org/show_bug.cgi?id=184856
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-04-20 Chris Dumez <cdumez@apple.com>
REGRESSION (r229828): web view doesn’t update or respond to resizing until client calls policy decision handler
https://bugs.webkit.org/show_bug.cgi?id=184210
<rdar://problem/39072354>
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebKit/large-red-square-image.html:
* TestWebKitAPI/Tests/WebKitCocoa/dragstart-change-selection-offscreen.html:
Add viewport meta tags.
* TestWebKitAPI/cocoa/TestNavigationDelegate.mm:
(-[WKWebView _test_waitForDidFinishNavigation]):
Update _test_waitForDidFinishNavigation to wait for the next presentation update
to make iOS API tests happy without having to modify each of them.
2018-04-20 Timothy Hatcher <timothy@apple.com>
REGRESSION: API test WebKit.BackgroundColorSystemColor is failing
https://bugs.webkit.org/show_bug.cgi?id=184849
rdar://problem/39386405
Reviewed by Brian Burg.
* TestWebKitAPI/Tests/mac/BackgroundColor.mm:
(TestWebKitAPI::TEST): Use CGColorEqualToColor since we might get a different
CGColor pointer from NSColor each time.
2018-04-20 Wenson Hsieh <wenson_hsieh@apple.com>
[Extra zoom mode] Injected bundle form client should be notified when editing text fields
https://bugs.webkit.org/show_bug.cgi?id=184822
<rdar://problem/38807319>
Reviewed by Tim Horton.
Add WebKitTestRunner support for listening to form editing SPI hooks in the injected bundle. The new layout test
installs callbacks that listen for "begin editing", "end editing", and "text changed" calls to injected bundle
SPI. See other ChangeLogs for more detail.
* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::enterText):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
Add UIScriptController support for simulating text entry in the currently focused element.
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::enterText):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
Add TestRunner bindings for registering injected bundle form client callbacks.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::handleTextDidChangeInTextField):
(WTR::handleTextFieldDidBeginEditing):
(WTR::handleTextFieldDidEndEditing):
(WTR::InjectedBundle::didCreatePage):
Set the injected bundle form editor client.
(WTR::InjectedBundle::setUpInjectedBundleClients):
(WTR::InjectedBundle::textDidChangeInTextField):
(WTR::InjectedBundle::textFieldDidBeginEditing):
(WTR::InjectedBundle::textFieldDidEndEditing):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::installTextDidChangeInTextFieldCallback):
(WTR::TestRunner::textDidChangeInTextFieldCallback):
(WTR::TestRunner::installTextFieldDidBeginEditingCallback):
(WTR::TestRunner::textFieldDidBeginEditingCallback):
(WTR::TestRunner::installTextFieldDidEndEditingCallback):
(WTR::TestRunner::textFieldDidEndEditingCallback):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::enterText):
2018-04-20 Youenn Fablet <youenn@apple.com>
WebPage sometimes incorrectly rules out PDF as a mime type that can be showed
https://bugs.webkit.org/show_bug.cgi?id=184369
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/WKNavigationResponse.mm:
(TEST):
2018-04-20 Daniel Bates <dabates@apple.com>
Remove Strong Password decoration when text field type changes
https://bugs.webkit.org/show_bug.cgi?id=184795
<rdar://problem/38325108>
Reviewed by Antti Koivisto.
Add a unit test to ensure the injected bundle API and WebKit UI delegate SPI is invoked
when the field has the Strong Password button and its type changes.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/DidResignInputElementStrongPasswordAppearance.mm: Added.
(didResignInputElementStrongPasswordAppearance):
(-[DidResignInputElementStrongPasswordAppearance webProcessPlugIn:didCreateBrowserContextController:]):
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[DidResignInputElementStrongPasswordAppearanceDelegate _webView:didResignInputElementStrongPasswordAppearanceWithUserInfo:]):
(-[DidResignInputElementStrongPasswordAppearanceDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(TEST):
2018-04-20 Brady Eidson <beidson@apple.com>
Add a test to verify load/unload/pageshow/pagehide all work with process swapping.
https://bugs.webkit.org/show_bug.cgi?id=184807
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
2018-04-20 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Mark TestJSC as slow in debug.
Only /jsc/vm is slow, but GLib API test runner only checks the test binary for GLib tests.
* TestWebKitAPI/glib/TestExpectations.json:
2018-04-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Local cross references are broken in API documentation
https://bugs.webkit.org/show_bug.cgi?id=184771
Reviewed by Michael Catanzaro.
The problem is that gtkdoc-fixxref expects the links to be in the form html/modulename (like the installed
ones), but we generate the documentation as modulename/html. So, links to WebKitDOM or JSC are generated as
../html/Foo. The rebase command considers html to be the module name in this case, creating broken links in all
the cases.
* gtk/gtkdoc.py:
(GTKDoc._copy_doc_files_to_output_dir): We don't have any html dir in the source tree so, we are not copying
anything here.
(GTKDoc._run_gtkdoc_mkhtml): Create the html dir here using html/modulename instead now.
(GTKDoc._run_gtkdoc_fixxref): Pass the new directory as module dir to gtkdoc-fixxref and fix several links for
which gtkdoc-fixxref always uses absolute paths.
* gtk/manifest.txt.in: Update the documentation html paths and include the JSC GLib API in the tarball too.
2018-04-19 Brady Eidson <beidson@apple.com>
Make back forward cache work with process swapping.
<rdar://problem/38676604> and https://bugs.webkit.org/show_bug.cgi?id=184793
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2018-04-19 David Kilzer <ddkilzer@apple.com>
Enable Objective-C weak references
<https://webkit.org/b/184789>
<rdar://problem/39571716>
Reviewed by Dan Bernstein.
* ContentExtensionTester/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
* DumpRenderTree/mac/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
* ImageDiff/cg/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
* MiniBrowser/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
* TestWebKitAPI/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
* WebEditingTester/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_ARC): Re-order.
* WebKitLauncher/Configurations/Base.xcconfig: Add newline at
end of file.
(CLANG_ENABLE_OBJC_WEAK): Enable.
* WebKitTestRunner/Configurations/Base.xcconfig:
(CLANG_ENABLE_OBJC_WEAK): Enable.
2018-04-19 Chris Dumez <cdumez@apple.com>
REGRESSION (r229133): decidePolicyForNavigationAction not called for loading an HTML string
https://bugs.webkit.org/show_bug.cgi?id=184209
<rdar://problem/39145306>
Reviewed by Ryosuke Niwa.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/DecidePolicyForNavigationAction.mm:
(TEST):
2018-04-18 Ross Kirsling <ross.kirsling@sony.com>
[WinCairo][EWS] Build bot should clean user temp directory each time.
https://bugs.webkit.org/show_bug.cgi?id=184761
Reviewed by Lucas Forschler.
* EWSTools/Start-Queue.ps1:
Clean user's temp directory before each build, so that Windows git doesn't fill it up over time.
2018-04-18 Ross Kirsling <ross.kirsling@sony.com>
Buildbots using Python zipfile should enable compression
https://bugs.webkit.org/show_bug.cgi?id=184759
Reviewed by Lucas Forschler.
* BuildSlaveSupport/built-product-archive:
(createZipManually):
Default is to archive without compressing, so tell it to compress as well.
2018-04-18 Nan Wang <n_wang@apple.com>
AX: [macOS] WebKit hangs when triggering an alert from an AOM increment event
https://bugs.webkit.org/show_bug.cgi?id=184742
Reviewed by Chris Fleizach.
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::increment):
(AccessibilityUIElement::decrement):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(WTR::AccessibilityUIElement::asyncIncrement):
(WTR::AccessibilityUIElement::asyncDecrement):
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::increment):
(WTR::AccessibilityUIElement::decrement):
(WTR::AccessibilityUIElement::asyncIncrement):
(WTR::AccessibilityUIElement::asyncDecrement):
2018-04-18 Ross Kirsling <ross.kirsling@sony.com>
Fix archive step for WinCairo build bot.
https://bugs.webkit.org/show_bug.cgi?id=184715
Reviewed by Lucas Forschler.
* BuildSlaveSupport/built-product-archive:
(archiveBuiltProduct):
(extractBuiltProduct):
2018-04-18 Sihui Liu <sihui_liu@apple.com>
REGRESSION: Using the reload button while offline pushes identical pages onto the back/forward list
https://bugs.webkit.org/show_bug.cgi?id=184570
<rdar://problem/34807323>
Reviewed by Chris Dumez.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/LoadAlternateHTMLString.mm:
(TEST):
2018-04-18 Chris Dumez <cdumez@apple.com>
Add support for converting a local window to a remote window
https://bugs.webkit.org/show_bug.cgi?id=184515
<rdar://problem/39011318>
Reviewed by Ryosuke Niwa.
* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration):
* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController processSwapOnWindowOpenWithOpenerEnabled]):
(-[SettingsController toggleProcessSwapOnWindowOpenWithOpener:]):
Add menu entry in minibrowser to turn on process swap on cross-origin window.open().
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
Turn on process swap on cross-origin window.open() for corresponding test and update
test to expect that a new WebProcess is created.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::decidePolicyForResponse):
Add null checks for injectedBundle.testRunner(). When we swap process on navigation,
the InjectedBundlePage::decidePolicyForResponse() gets called in the new process.
In this new process, we have constructed a InjectedBundlePage for the page but we
have not initialized the InjectedBundle members such as testRunner.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
Add a way for layout tests to turn on process swap on navigation via a test header.
2018-04-18 Yusuke Suzuki <utatane.tea@gmail.com>
Unreviewed, reland r230697, r230720, and r230724.
https://bugs.webkit.org/show_bug.cgi?id=184600
* Scripts/run-jsc-stress-tests:
2018-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Make it possible to handle JSCClass external properties not added to the prototype
https://bugs.webkit.org/show_bug.cgi?id=184687
Reviewed by Michael Catanzaro.
Add test cases for the new API.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(fooCreate):
(fooFree):
(fooGetProperty):
(fooSetProperty):
(testJSCPromises):
(testJSCGarbageCollector):
(testsJSCVirtualMachine):
* TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
(windowObjectClearedCallback):
2018-04-17 Wenson Hsieh <wenson_hsieh@apple.com>
[Extra zoom mode] Programmatically changing focus when an element already has focus is a confusing experience
https://bugs.webkit.org/show_bug.cgi?id=184635
<rdar://problem/39440642>
Reviewed by Tim Horton.
Add plumbing to support invoking `didHideKeyboardCallback` and `didShowKeyboardCallback` when (respectively)
dismissing or presenting fullscreen input view controllers in extra zoom mode.
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView initWithFrame:configuration:]):
(-[TestRunnerWKWebView dealloc]):
(-[TestRunnerWKWebView _invokeShowKeyboardCallbackIfNecessary]):
(-[TestRunnerWKWebView _invokeHideKeyboardCallbackIfNecessary]):
(-[TestRunnerWKWebView _keyboardDidShow:]):
(-[TestRunnerWKWebView _keyboardDidHide:]):
(-[TestRunnerWKWebView _webView:didPresentFocusedElementViewController:]):
(-[TestRunnerWKWebView _webView:didDismissFocusedElementViewController:]):
2018-04-17 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Webkit should spoof as Safari on a Mac for Outlook.com
https://bugs.webkit.org/show_bug.cgi?id=184573
Reviewed by Carlos Alberto Lopez Perez.
* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::TEST):
2018-04-17 Fujii Hironori <Hironori.Fujii@sony.com>
[WinCairo][TestWebKitAPI] Implement PlatformWebView for TestWebKit
https://bugs.webkit.org/show_bug.cgi?id=184524
Reviewed by Alex Christensen.
Resurrect PlatformWebView for Windows port which was removed in Bug 104607.
* TestWebKitAPI/PlatformWebView.h:
* TestWebKitAPI/PlatformWin.cmake:
* TestWebKitAPI/win/InjectedBundleControllerWin.cpp: Added.
(TestWebKitAPI::InjectedBundleController::platformInitialize):
* TestWebKitAPI/win/PlatformUtilitiesWin.cpp: Added.
(TestWebKitAPI::Util::moduleDirectory):
(TestWebKitAPI::Util::createInjectedBundlePath):
(TestWebKitAPI::Util::createURLForResource):
(TestWebKitAPI::Util::URLForNonExistentResource):
(TestWebKitAPI::Util::isKeyDown):
* TestWebKitAPI/win/PlatformWebViewWin.cpp: Added.
(TestWebKitAPI::PlatformWebView::registerWindowClass):
(TestWebKitAPI::PlatformWebView::PlatformWebView):
(TestWebKitAPI::PlatformWebView::initialize):
(TestWebKitAPI::PlatformWebView::~PlatformWebView):
(TestWebKitAPI::PlatformWebView::page const):
(TestWebKitAPI::PlatformWebView::resizeTo):
(TestWebKitAPI::PlatformWebView::simulateSpacebarKeyPress):
(TestWebKitAPI::PlatformWebView::simulateAltKeyPress):
(TestWebKitAPI::PlatformWebView::simulateRightClick):
(TestWebKitAPI::PlatformWebView::simulateMouseMove):
(TestWebKitAPI::PlatformWebView::wndProc):
* TestWebKitAPI/win/UtilitiesWin.cpp: Added.
(TestWebKitAPI::Util::run):
(TestWebKitAPI::Util::spinRunLoop):
(TestWebKitAPI::Util::sleep):
2018-04-17 Jonathan Bedard <jbedard@apple.com>
Fix hasher tests for system with 32 bit longs
https://bugs.webkit.org/show_bug.cgi?id=184708
<rdar://problem/39459977>
Reviewed by Mark Lam.
Some systems have 32 bit longs. The Hasher WTF tests should handle this case.
* TestWebKitAPI/Tests/WTF/Hasher.cpp:
(TestWebKitAPI::TEST):
2018-04-17 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r230697, r230720, and r230724.
https://bugs.webkit.org/show_bug.cgi?id=184717
These caused multiple failures on the Test262 testers.
(Requested by mlewis13 on #webkit).
Reverted changesets:
"[WebAssembly][Modules] Prototype wasm import"
https://bugs.webkit.org/show_bug.cgi?id=184600
https://trac.webkit.org/changeset/230697
"[WebAssembly][Modules] Implement function import from wasm
modules"
https://bugs.webkit.org/show_bug.cgi?id=184689
https://trac.webkit.org/changeset/230720
"[JSC] Rename runWebAssembly to runWebAssemblySuite"
https://bugs.webkit.org/show_bug.cgi?id=184703
https://trac.webkit.org/changeset/230724
2018-04-17 Jonathan Bedard <jbedard@apple.com>
Unreviewed rollout of r230632. Regression in memory usage.
That bug tracked in https://bugs.webkit.org/show_bug.cgi?id=184569.
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(runTest):
(shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference): Deleted.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
* WebKitTestRunner/TestOptions.cpp:
(WTR::TestOptions::TestOptions):
(WTR::isLegacyAnimationEngineTestPath): Deleted.
* WebKitTestRunner/TestOptions.h:
2018-04-17 Yusuke Suzuki <utatane.tea@gmail.com>
[JSC] Rename runWebAssembly to runWebAssemblySuite
https://bugs.webkit.org/show_bug.cgi?id=184703
Reviewed by JF Bastien.
* Scripts/run-jsc-stress-tests:
2018-04-17 Yusuke Suzuki <utatane.tea@gmail.com>
[WebAssembly][Modules] Implement function import from wasm modules
https://bugs.webkit.org/show_bug.cgi?id=184689
Reviewed by JF Bastien.
Add runWebAssemblyDirect, which runs wasm file directly.
* Scripts/run-jsc-stress-tests:
2018-04-17 Saam Barati <sbarati@apple.com>
Add system trace points for process launch and for initializeWebProcess
https://bugs.webkit.org/show_bug.cgi?id=184669
Reviewed by Simon Fraser.
* Tracing/SystemTracePoints.plist:
2018-04-17 Ross Kirsling <ross.kirsling@sony.com>
Add debug bots for WinCairo.
https://bugs.webkit.org/show_bug.cgi?id=184663
Reviewed by Lucas Forschler.
* BuildSlaveSupport/build.webkit.org-config/config.json:
Add a debug build bot and two debug test bots.
* BuildSlaveSupport/build.webkit.org-config/loadConfig.py:
* BuildSlaveSupport/build.webkit.org-config/templates/root.html:
Add a WinCairo category to build.webkit.org.
2018-04-17 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Set inline-block box position.
https://bugs.webkit.org/show_bug.cgi?id=184690
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._handleInlineBlock):
* LayoutReloaded/Utils.js:
(Utils._dumpBox):
* LayoutReloaded/test/inline-block-with-fixed-width-height.html:
2018-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add API to clear JSCContext uncaught exception
https://bugs.webkit.org/show_bug.cgi?id=184685
Reviewed by Žan Doberšek.
Add test cases for the new API.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCExceptions):
2018-04-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add API to query, delete and enumerate properties
https://bugs.webkit.org/show_bug.cgi?id=184647
Reviewed by Michael Catanzaro.
Add test cases for the new API.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCObject):
(testJSCClass):
(testJSCPrototypes):
2018-04-16 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Add support for replaced box.
https://bugs.webkit.org/show_bug.cgi?id=184680
Reviewed by Antti Koivisto.
Basic support for inline replaced.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._handleInlineBox):
(InlineFormattingContext.prototype._handleInlineBlock):
(InlineFormattingContext.prototype._handleReplaced):
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
(Line.prototype.lastLineBox):
(Line.prototype.addInlineBox):
(Line.prototype.addInlineContainerBox): Deleted.
* LayoutReloaded/TreeBuilder.js:
(TreeBuilder.prototype._createAndAttachBox):
* LayoutReloaded/Utils.js:
(Utils._dumpBox):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-simple-replaced.html: Added.
2018-04-16 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Minor InlineFormattingContext::layout() cleanup.
https://bugs.webkit.org/show_bug.cgi?id=184679
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext):
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleInlineContainer):
(InlineFormattingContext.prototype._handleInlineContent):
(InlineFormattingContext.prototype._handleInlineBlock):
(InlineFormattingContext.prototype._handleReplacedBox):
(InlineFormattingContext.prototype._clearNeedsLayoutAndMoveToNextSibling):
(InlineFormattingContext.prototype._handleInlineBlockContainer): Deleted.
(InlineFormattingContext.prototype._clearAndMoveToNext): Deleted.
2018-04-16 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Introduce fragmentation state/context.
https://bugs.webkit.org/show_bug.cgi?id=184677
Reviewed by Antti Koivisto.
State/context for fragmented content (multicol, regions, pagination etc).
* LayoutReloaded/FormattingContext/FragmentationContext.js: Added.
(FragmentationContext):
* LayoutReloaded/FormattingState/FragmentationState.js: Added.
(FragmentationState):
(FragmentationState.prototype.formattingState):
2018-04-16 Andy Estes <aestes@apple.com>
[iOS] Enable WKPDFView by default
https://bugs.webkit.org/show_bug.cgi?id=184675
<rdar://problem/27885452>
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:
2018-04-16 Leo Balter <leonardo.balter@gmail.com>
Perl-based Test262 runner
https://bugs.webkit.org/show_bug.cgi?id=183343
Reviewed by Michael Saboff.
* Scripts/test262-helpers/README.md: Added.
* Scripts/test262-helpers/agent.js: Added.
(262.getGlobal):
(262.setGlobal):
(262.destroy):
(262.IsHTMLDDA):
* Scripts/test262-helpers/cpanfile: Added.
* Scripts/test262-helpers/cpanfile.snapshot: Added.
* Scripts/test262-helpers/test262-runner.pl: Added.
(main):
(processFile):
(getScenarios):
(addScenario):
(compileTest):
(runTest):
(processResult):
(getTempFile):
(getContents):
(parseData):
(getHarness):
* Scripts/test262-helpers/tests.log: Added.
2018-04-15 Andy Estes <aestes@apple.com>
[iOS] Add API tests for PDF find-in-page
https://bugs.webkit.org/show_bug.cgi?id=184634
Reviewed by Dan Bernstein.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/find.pdf: Added.
* TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:
(-[TestFindDelegate findString]):
(-[TestFindDelegate _webView:didCountMatches:forString:]):
(-[TestFindDelegate _webView:didFindMatches:forString:withMatchIndex:]):
(-[TestFindDelegate _webView:didFailToFindString:]):
(loadWebView):
(TEST):
2018-04-13 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Update class documentation
https://bugs.webkit.org/show_bug.cgi?id=184625
Reviewed by Antti Koivisto.
* LayoutReloaded/DisplayTree/Box.js:
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
* LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
* LayoutReloaded/FormattingContext/FloatingContext.js:
* LayoutReloaded/FormattingContext/FormattingContext.js:
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
* LayoutReloaded/FormattingState/BlockFormattingState.js:
* LayoutReloaded/FormattingState/FloatingState.js:
* LayoutReloaded/FormattingState/FormattingState.js:
* LayoutReloaded/FormattingState/InlineFormattingState.js:
* LayoutReloaded/LayoutState.js:
* LayoutReloaded/LayoutTree/BlockContainer.js:
* LayoutReloaded/LayoutTree/Box.js:
* LayoutReloaded/LayoutTree/Container.js:
* LayoutReloaded/LayoutTree/InlineBox.js:
* LayoutReloaded/LayoutTree/InlineContainer.js:
* LayoutReloaded/LayoutTree/Text.js:
* LayoutReloaded/misc/headers/BlockContainer.h: Removed.
* LayoutReloaded/misc/headers/BlockFormattingContext.h: Removed.
* LayoutReloaded/misc/headers/BlockMarginCollapse.h: Removed.
* LayoutReloaded/misc/headers/Box.h: Removed.
* LayoutReloaded/misc/headers/Container.h: Removed.
* LayoutReloaded/misc/headers/FloatingContext.h: Removed.
* LayoutReloaded/misc/headers/FormattingContext.h: Removed.
* LayoutReloaded/misc/headers/InitialBlockContainer.h: Removed.
* LayoutReloaded/misc/headers/InlineBox.h: Removed.
* LayoutReloaded/misc/headers/LayoutContext.h: Removed.
* LayoutReloaded/misc/headers/Line.h: Removed.
* LayoutReloaded/misc/headers/Text.h: Removed.
2018-04-13 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Add simple implementation for FormattingState::markNeedsLayout()
https://bugs.webkit.org/show_bug.cgi?id=184621
Reviewed by Antti Koivisto.
This is just a simple, mark ancestors dirty implementation.
* LayoutReloaded/FormattingState/FormattingState.js:
(FormattingState.prototype.markNeedsLayout):
* LayoutReloaded/LayoutState.js:
(LayoutState.prototype.markNeedsLayout):
(LayoutState.prototype.setNeedsLayoutById): Deleted.
(LayoutState.prototype.setNeedsLayout): Deleted.
* LayoutReloaded/TreeBuilder.js:
(TreeBuilder.prototype._createAndAttachBox):
(TreeBuilder.prototype._findBox): Deleted.
* LayoutReloaded/Utils.js:
(Utils.layoutBoxById):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/simple-incremental-layout-with-static-content.html:
2018-04-13 Carlos Alberto Lopez Perez <clopez@igalia.com>
[WPE] [webkitpy] The driver requirements should be checked before starting the tests
https://bugs.webkit.org/show_bug.cgi?id=184595
Reviewed by Michael Catanzaro.
Ensure Driver.check_driver() is checked at check_sys_deps() time.
* Scripts/webkitpy/port/wpe.py:
(WPEPort.check_sys_deps):
2018-04-13 Zalan Bujtas <zalan@apple.com>
Rebaseline LayoutReloaded patch file (collectRenderersWithNeedsLayout).
* LayoutReloaded/misc/LayoutReloadedWebKit.patch:
2018-04-13 Jonathan Bedard <jbedard@apple.com>
Boot fewer simulators in CI/EWS machines
https://bugs.webkit.org/show_bug.cgi?id=184594
<rdar://problem/39188082>
Reviewed by Alexey Proskuryakov.
This is a temporary workaround fro <rdar://problem/39393590>.
* Scripts/webkitpy/xcode/simulated_device.py:
(SimulatedDeviceManager): Treat simulators as taking 6 gigs instead of 2.
2018-04-13 Brady Eidson <beidson@apple.com>
Introduce SuspendedPageProxy to keep old web processes around after their WebPageProxy has been swapped to a new one.
https://bugs.webkit.org/show_bug.cgi?id=184559
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2018-04-13 Chris Dumez <cdumez@apple.com>
input.webkitEntries does not work as expected when folder contains accented chars
https://bugs.webkit.org/show_bug.cgi?id=184517
<rdar://problem/39265537>
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/Tests/WebCore/FileSystem.cpp:
(TestWebKitAPI::TEST_F):
2018-04-13 Thibault Saunier <tsaunier@igalia.com>
Update my emails ordering in contributors.json
https://bugs.webkit.org/show_bug.cgi?id=184587
Rubber-stamped by Philippe Normand.
Bugzilla seems to pick up tsaunier@igalia.com which is not the one I use there.
* Scripts/webkitpy/common/config/contributors.json:
2018-04-13 Michael Catanzaro <mcatanzaro@igalia.com>
[WPE] xkbcommon: ERROR: failed to add default include path /home/mcatanzaro/Projects/WebKit/WebKitBuild/DependenciesWPE/Root/share/X11/xkb
https://bugs.webkit.org/show_bug.cgi?id=184388
Reviewed by Carlos Alberto Lopez Perez.
Remove libxkbcommon from the JHBuild environment. We could alternatively add
xkeyboard-config, but there doesn't seem to be any need to build libxkbcommon because I do
not believe it depends on anything else in the JHBuild environment.
* wpe/install-dependencies:
* wpe/jhbuild.modules:
2018-04-12 Antoine Quint <graouts@apple.com>
[Web Animations] Turn CSS Animations and CSS Transitions as Web Animations on by default
https://bugs.webkit.org/show_bug.cgi?id=184569
<rdar://problem/38671301>
Reviewed by Jon Lee.
We set the default value for the CSS Animations and CSS Transitions as Web Animations flag to true
but override it to be false always in the LayoutTests/legacy-animation-engine directory.
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/mac/DumpRenderTree.mm:
(shouldOverrideAndDisableCSSAnimationsAndCSSTransitionsBackedByWebAnimationsPreference):
(runTest):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
* WebKitTestRunner/TestOptions.cpp:
(WTR::isLegacyAnimationEngineTestPath):
(WTR::TestOptions::TestOptions):
* WebKitTestRunner/TestOptions.h:
2018-04-13 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Tests WTF_RefPtr.ReleaseInNonMainThread and WTF_RefPtr.ReleaseInNonMainThreadDestroyInMainThread are crashing since they were added
https://bugs.webkit.org/show_bug.cgi?id=184531
Reviewed by Michael Catanzaro.
It's not a bug in WebKit, but in the tests. The problem is that those tests are using RunLoop::main() but main
run loop hasn't been initialized. ReleaseInNonMainThread doesn't really need to initialize the main run loop if
we change Util::run() to always use RunLop::current() instead of RunLoop::main(). But
ReleaseInNonMainThreadDestroyInMainThread ends up scheduling a task to the main thread, and the generic
implementation fo that uses RunLoop::main(), so we need to initialize the main loop in this case.
* TestWebKitAPI/Tests/WTF/RefPtr.cpp:
(TestWebKitAPI::TEST): Call RunLoop::initializeMainRunLoop().
* TestWebKitAPI/glib/UtilitiesGLib.cpp:
(TestWebKitAPI::Util::run): Use RunLop::current() to stop the current run loop.
(TestWebKitAPI::Util::sleep): Ditto.
2018-04-12 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Add support for incremental layout
https://bugs.webkit.org/show_bug.cgi?id=184578
Reviewed by Antti Koivisto.
* LayoutReloaded/Layout.js:
(layout):
* LayoutReloaded/LayoutState.js:
(LayoutState.prototype.rootContainer):
(LayoutState.prototype.setNeedsLayoutById):
* LayoutReloaded/Utils.js:
(Utils.layoutTreeDump):
* LayoutReloaded/test/TestHarness.js:
(verifyLayout):
(runLayout):
(verifyLayoutTreeDump): Deleted.
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/simple-incremental-layout-with-static-content.html: Added.
2018-04-12 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Move root container ownership to layout state
https://bugs.webkit.org/show_bug.cgi?id=184575
Reviewed by Antti Koivisto.
Now the root container is on the associated layout state (ICB only at this point though).
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype.layout):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype._layoutOutOfFlowDescendants):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._handleInlineBlockContainer):
(InlineFormattingContext.prototype._handleFloatingBox):
* LayoutReloaded/Layout.js:
(layout):
* LayoutReloaded/LayoutState.js:
(LayoutState):
(LayoutState.prototype.formattingContext):
(LayoutState.prototype.establishedFormattingState):
(LayoutState.prototype.formattingStateForBox):
(LayoutState.prototype.needsLayout):
(LayoutState.prototype.displayBox):
(LayoutState.prototype._formattingContext):
(LayoutState.prototype.layout): Deleted.
(LayoutState.prototype.formattingStates): Deleted.
(LayoutState.prototype.initialDisplayBox): Deleted.
* LayoutReloaded/Utils.js:
(Utils._dumpBox):
(Utils._findDisplayBox): Deleted.
2018-04-12 Jonathan Bedard <jbedard@apple.com>
Fix --build-directory flag for run-webkit-tests
https://bugs.webkit.org/show_bug.cgi?id=184545
<rdar://problem/39385080>
Rubber-stamped by Aakash Jain.
The --build-directory path does not work with iOS-Simulator.
* Scripts/webkitpy/port/base.py:
(Port._build_path): Use the port configuration to calculate the root directory.
* Scripts/webkitpy/port/base_unittest.py:
(PortTest.test_build_path): Test build directories for embedded configurations.
2018-04-12 Ross Kirsling <ross.kirsling@sony.com>
pemfile.py should not assume POSIX line endings
https://bugs.webkit.org/show_bug.cgi?id=184507
Reviewed by Daniel Bates.
* Scripts/webkitpy/common/system/pemfile.py:
(_parse_pem_format):
* Scripts/webkitpy/common/system/pemfile_unittest.py:
(PemFileTest.test_parse_crlf):
(PemFileTest.test_parse_cr):
2018-04-12 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Minor cleanup in LayoutSate
https://bugs.webkit.org/show_bug.cgi?id=184546
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.isInFormattingContext):
* LayoutReloaded/FormattingState/FormattingState.js:
(FormattingState.prototype.displayBoxes):
(FormattingState.prototype.displayBox):
(FormattingState.prototype._markSubTreeNeedsLayout):
(FormattingState):
(FormattingState.prototype.displayBoxMap): Deleted.
* LayoutReloaded/LayoutState.js:
(LayoutState.prototype.formattingStateForBox):
(LayoutState.prototype.needsLayout):
(LayoutState.prototype.displayBox):
(LayoutState.prototype._createFormattingState):
(LayoutState):
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.isFormattingContextDescendant): Deleted.
* LayoutReloaded/LayoutTree/Container.js:
(Layout.Container.prototype.isContainingBlockDescendant): Deleted.
* LayoutReloaded/Utils.js:
(Utils._findDisplayBox):
2018-04-12 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Introduce needsLayout to InlineFormattingContext
https://bugs.webkit.org/show_bug.cgi?id=184538
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._adjustBottomWithFIXME):
(BlockFormattingContext):
(BlockFormattingContext.prototype._firstInFlowChildWithNeedsLayout): Deleted.
(BlockFormattingContext.prototype._nextInFlowSiblingWithNeedsLayout): Deleted.
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype._firstInFlowChildWithNeedsLayout):
(FormattingContext.prototype._nextInFlowSiblingWithNeedsLayout):
(FormattingContext):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleInlineContainer):
(InlineFormattingContext.prototype._handleInlineBlockContainer):
(InlineFormattingContext.prototype._handleInlineContent):
(InlineFormattingContext.prototype._clearAndMoveToNext):
(InlineFormattingContext):
2018-04-12 Xabier Rodriguez Calvar <calvaris@igalia.com>
[GStreamer] Speed up GStreamer dependency build by removing examples compilation
https://bugs.webkit.org/show_bug.cgi?id=184528
Reviewed by Philippe Normand.
* gstreamer/jhbuild.modules: Added --disable-examples for GStreamer package.
2018-04-12 Zan Dobersek <zdobersek@igalia.com>
[WPE] Switch testing process to using WPEBackend-fdo
https://bugs.webkit.org/show_bug.cgi?id=184357
Reviewed by Carlos Alberto Lopez Perez.
Switch WPE testing to using the WPEBackend-fdo implementation that
depends on the WL_bind_wayland_display EGL extension, as defined under
the freedesktop.org project.
https://cgit.freedesktop.org/mesa/mesa/tree/docs/specs/WL_bind_wayland_display.spec
HeadlessViewBackend is refactored to use the WPEBackend-fdo API, but
otherwise is not changed in functionality.
Unit tests now have to unconditionally use HeadlessViewBackend as a
wpe_view_backend provider, since WPEBackend-fdo does not provide a
default wpe_view_backend implementation. Unit tests covering that are
adjusted to instead use a mock wpe_view_backend interface.
* Scripts/webkitdirs.pm:
(builtDylibPathForName): Fix the libWPEWebKit.so name to also include
the API version that was added in r230449.
* Scripts/webkitpy/port/waylanddriver.py:
(WaylandDriver._setup_environ_for_test): Export EGL_PLATFORM=wayland.
* Scripts/webkitpy/port/wpe.py:
(WPEPort._driver_class): Use WaylandDriver by default.
* TestWebKitAPI/PlatformWebView.h:
(): Deleted.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewWebBackend):
* TestWebKitAPI/glib/WebKitGLib/TestMain.h:
(Test::createWebViewBackend):
* TestWebKitAPI/wpe/PlatformWebViewWPE.cpp:
(TestWebKitAPI::PlatformWebView::~PlatformWebView):
(TestWebKitAPI::PlatformWebView::initialize):
* wpe/HeadlessViewBackend/CMakeLists.txt:
* wpe/HeadlessViewBackend/HeadlessViewBackend.cpp:
(getEGLDisplay):
(HeadlessViewBackend::HeadlessViewBackend):
(HeadlessViewBackend::~HeadlessViewBackend):
(HeadlessViewBackend::backend const):
(HeadlessViewBackend::createSnapshot):
(HeadlessViewBackend::performUpdate):
(HeadlessViewBackend::makeCurrent): Deleted.
* wpe/HeadlessViewBackend/HeadlessViewBackend.h:
* wpe/jhbuild.modules: Module name cleanup. Dyz version is bumped.
2018-04-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Switch to use always complex text code path
https://bugs.webkit.org/show_bug.cgi?id=183285
Reviewed by Michael Catanzaro.
Keep the auto mode for the layout tests to avoid having to rebaseline a lot of tests.
* WebKitTestRunner/gtk/main.cpp:
(main): Set WEBKIT_FORCE_COMPLEX_TEXT to 0 unless it's already present in the environment.
2018-04-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Handle strings containing null characters
https://bugs.webkit.org/show_bug.cgi?id=184450
Reviewed by Michael Catanzaro.
Add test case for strings with null characters and update all calls to evaluate to pass the script length.
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(testJSCBasic):
(testJSCFunction):
(testJSCObject):
(testJSCClass):
(testJSCPrototypes):
(testJSCExceptions):
(testJSCPromises):
(testJSCGarbageCollector):
(testJSCWeakValue):
(testsJSCVirtualMachine):
(testsJSCAutocleanups):
* TestWebKitAPI/Tests/JavaScriptCore/glib/script.js: Added.
* TestWebKitAPI/Tests/WebKitGLib/DOMElementTest.cpp:
(DOMElementTest::testAutoFill):
* TestWebKitAPI/Tests/WebKitGLib/EditorTest.cpp:
(WebKitWebEditorTest::testSelectionChanged):
* TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
(WebKitFrameTest::testJavaScriptValues):
* TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
(consoleMessageSentCallback):
(methodCallCallback):
2018-04-11 Zan Dobersek <zdobersek@igalia.com>
[WPE] Make WebKitWebViewBackend object mandatory for webkit_web_view_new*() constructors
https://bugs.webkit.org/show_bug.cgi?id=184513
Reviewed by Michael Catanzaro.
Update the WPE-specific testWebViewWebBackend() test case, removing the
test that passes a null WebKitWebViewBackend object to the
webkit_web_view_new() call.
Helper createWebViewBackend() that's called via Test::createWebView()
variations is updated to, in case of not using the headless backend,
return a WebKitWebViewBackend instance that wraps around a
default wpe_view_backend object.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewWebBackend):
* TestWebKitAPI/glib/WebKitGLib/TestMain.h:
(Test::createWebViewBackend):
2018-04-11 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Introduce needsLayout flag
https://bugs.webkit.org/show_bug.cgi?id=184527
Reviewed by Antti Koivisto.
Use the formatting state to mark boxes dirty.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype.layout):
(BlockFormattingContext.prototype._firstInFlowChildWithNeedsLayout):
(BlockFormattingContext.prototype._nextInFlowSiblingWithNeedsLayout):
(BlockFormattingContext):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype._layoutOutOfFlowDescendants):
* LayoutReloaded/FormattingState/FormattingState.js:
(FormattingState):
(FormattingState.prototype.markNeedsLayout):
(FormattingState.prototype.clearNeedsLayout):
(FormattingState.prototype.needsLayout):
(FormattingState.prototype.layoutNeeded):
(FormattingState.prototype._markSubTreeNeedsLayout):
* LayoutReloaded/LayoutState.js:
(LayoutState.prototype.formattingStateForBox):
(LayoutState.prototype.setNeedsLayout):
(LayoutState.prototype.needsLayout):
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.isFormattingContextDescendant):
* LayoutReloaded/LayoutTree/Container.js:
(Layout.Container.prototype.isContainingBlockDescendant):
2018-04-11 Jonathan Bedard <jbedard@apple.com>
Fix TestInvocation class for newer versions of clang.
https://bugs.webkit.org/show_bug.cgi?id=184508
<rdar://problem/39328648>
Reviewed by Alexey Proskuryakov.
Declare TestInvocation to be final so it does not require a virtual destructor.
* WebKitTestRunner/TestInvocation.h:
2018-04-10 Alex Christensen <achristensen@webkit.org>
IDN spoofing with Hebrew combining characters
https://bugs.webkit.org/show_bug.cgi?id=184472
<rdar://problem/39148687>
Reviewed by Brent Fulgham.
* TestWebKitAPI/Tests/WebCore/cocoa/URLExtras.mm:
(TestWebKitAPI::TEST):
2018-04-11 Wenson Hsieh <wenson_hsieh@apple.com>
[Extra zoom mode] Missing label when focusing a <select> with a title attribute but no associated <label>
https://bugs.webkit.org/show_bug.cgi?id=184352
<rdar://problem/39237683>
Reviewed by Andy Estes.
Add support for UIScriptController::selectFormPopoverTitle, which returns the title of the current select
popover's UITableViewController (for testing purposes).
* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::selectFormPopoverTitle const):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::selectFormPopoverTitle const):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::selectFormPopoverTitle const):
2018-04-10 Nan Wang <n_wang@apple.com>
AX: Expose strong password fields on iOS
https://bugs.webkit.org/show_bug.cgi?id=184465
<rdar://problem/39325104>
Reviewed by Chris Fleizach.
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::boolAttributeValue):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::boolAttributeValue):
2018-04-10 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Add support for out-of-flow descendants in inline formatting context.
https://bugs.webkit.org/show_bug.cgi?id=184454
Reviewed by Antti Koivisto.
When the containing block of an out-of-flow positioned element establishes an inline formatting context.
This is mostly about moving out-of-flow logic from BlockFormattingContext to the base class.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._adjustBottomWithFIXME):
(BlockFormattingContext):
(BlockFormattingContext.prototype._layoutOutOfFlowDescendants): Deleted.
(BlockFormattingContext.prototype._computeOutOfFlowWidth): Deleted.
(BlockFormattingContext.prototype._computeInFlowWidth): Deleted.
(BlockFormattingContext.prototype._computeOutOfFlowHeight): Deleted.
(BlockFormattingContext.prototype._computeOutOfFlowPosition): Deleted.
(BlockFormattingContext.prototype._shrinkToFitWidth): Deleted.
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype._placeInFlowPositionedChildren):
(FormattingContext.prototype._computeInFlowWidth):
(FormattingContext.prototype._layoutOutOfFlowDescendants):
(FormattingContext.prototype._computeOutOfFlowWidth):
(FormattingContext.prototype._computeOutOfFlowHeight):
(FormattingContext.prototype._computeOutOfFlowPosition):
(FormattingContext.prototype._shrinkToFitWidth):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleInlineContainer):
(InlineFormattingContext.prototype._handleInlineBlockContainer):
(InlineFormattingContext.prototype._placeOutOfFlowDescendants): Deleted.
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-with-out-of-flow-descendant.html: Added.
2018-04-09 Zan Dobersek <zdobersek@igalia.com>
WKTR: Enable DOM cache, SW registration directory cleanup on non-Cocoa platforms
https://bugs.webkit.org/show_bug.cgi?id=184414
Reviewed by Michael Catanzaro.
Enable clearServiceWorkerRegistrations(), clearDOMCache() and
clearDOMCaches() implementations in WebKitTestRunner's TestController
class for non-Cocoa platforms. Implementations depend on the generic
WK2 C API that other ports can leverage as well.
The clearDOMCache() and clearDOMCaches() calls are now operational for
tests that invoke them. clearServiceWorkerRegistrations() and
clearDOMCaches() are also called between each test, cleaning up relevant
resources.
The TestController::getAllStorageAccessEntries() stub for non-Cocoa
platforms is moved into the main !PLATFORM(COCOA) block.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::getAllStorageAccessEntries):
(WTR::clearServiceWorkerRegistrationsCallback):
(WTR::TestController::clearServiceWorkerRegistrations):
(WTR::clearDOMCacheCallback):
(WTR::TestController::clearDOMCache):
(WTR::TestController::clearDOMCaches):
2018-04-09 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Add support for relatively positioned containers in inline formatting context.
https://bugs.webkit.org/show_bug.cgi?id=184439
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._placeInFlowPositionedChildren): Deleted.
(BlockFormattingContext.prototype._computeInFlowPositionedPosition): Deleted.
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype._computeInFlowPositionedPosition):
(FormattingContext.prototype._placeInFlowPositionedChildren):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._placeInFlowPositionedChildren): Deleted.
* LayoutReloaded/Utils.js:
(Utils._dumpBox):
(Utils._dumpLines.):
(Utils._dumpLines):
(Utils.precisionRoundWithDecimals):
(Utils.precisionRound):
(Utils):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-with-relative-positioning.html: Added.
2018-04-09 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Remove Layout.InitialContainingBlock class
https://bugs.webkit.org/show_bug.cgi?id=184436
Reviewed by Antti Koivisto.
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.establishesBlockFormattingContext):
* LayoutReloaded/LayoutTree/InitialBlockContainer.js: Removed.
* LayoutReloaded/TreeBuilder.js:
(TreeBuilder.prototype.createTree):
* LayoutReloaded/test/index.html:
2018-04-09 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Add support for inline-block.
https://bugs.webkit.org/show_bug.cgi?id=184434
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext):
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleInlineContainer):
(InlineFormattingContext.prototype._handleInlineBlockContainer):
(InlineFormattingContext.prototype._handleInlineContent):
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
(Line.prototype.addInlineContainerBox):
(Line.prototype.addTextLineBox):
(Line):
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.isInlineBlockBox):
* LayoutReloaded/Utils.js:
(LayoutRect.prototype.growHorizontally):
(Utils.isBlockContainerElement):
(Utils.isInlineBlockElement):
(Utils._dumpLines.):
(Utils._dumpLines):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-block-with-fixed-width-height.html: Added.
2018-04-09 Timothy Hatcher <timothy@apple.com>
Add support for setting a background color on WKWebView and WKView
https://bugs.webkit.org/show_bug.cgi?id=184426
Reviewed by Wenson Hsieh.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/BackgroundColor.mm: Added.
2018-04-09 Charlie Turner <cturner@igalia.com>
[WPE] Add some missing install dependencies
https://bugs.webkit.org/show_bug.cgi?id=184383
Reviewed by Michael Catanzaro.
* wpe/install-dependencies:
2018-04-09 Sihui Liu <sihui_liu@apple.com>
REGRESSION(r229929): localStorage is broken for WebInspector
https://bugs.webkit.org/show_bug.cgi?id=184382
<rdar://problem/39257355>
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/localstorage-empty-string-value.html:
2018-04-09 Zan Dobersek <zdobersek@igalia.com>
Unreviewed follow-up to r230389.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::platformAdjustContext): Use the 'ServiceWorkers'
subdirectory for the temporary testing-purpose SW registration directory
like it's used in Cocoa's TestController, addressing the review comment
that I forgot about.
2018-04-08 Zan Dobersek <zdobersek@igalia.com>
Non-Cocoa ports use default directory for ServiceWorker data during testing
https://bugs.webkit.org/show_bug.cgi?id=183784
Reviewed by Youenn Fablet.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::platformAdjustContext): Set the service worker registration
directory through the new WKWebsiteDataStore API for non-Cocoa ports.
2018-04-08 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Adjust line with inline container's margin border and padding
https://bugs.webkit.org/show_bug.cgi?id=184409
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleFloatingBox):
(InlineFormattingContext.prototype._adjustLineForInlineContainerStart):
(InlineFormattingContext.prototype._adjustLineForInlineContainerEnd):
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
(Line.prototype.shrink):
(Line.prototype.adjustWithOffset):
(Line.prototype.moveContentHorizontally):
(Line.prototype.addTextLineBox):
(Line):
(Line.prototype.addFloatingBox): Deleted.
* LayoutReloaded/misc/LayoutReloadedWebKit.patch:
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-with-padding-border-margin-offsets.html: Added.
2018-04-07 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Add support for InlineContainer
https://bugs.webkit.org/show_bug.cgi?id=184394
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype._addToLayoutQueue):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleInlineContent):
(InlineFormattingContext.prototype._handleFloatingBox):
(InlineFormattingContext.prototype._adjustLineForInlineContainerStart):
(InlineFormattingContext.prototype._adjustLineForInlineContainerEnd):
(InlineFormattingContext.prototype._placeInFlowPositionedChildren):
(InlineFormattingContext.prototype._placeOutOfFlowDescendants):
(InlineFormattingContext.prototype._createNewLine):
(InlineFormattingContext.prototype._handleContent): Deleted.
* LayoutReloaded/LayoutState.js:
(LayoutState.prototype._createFormattingState):
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.isContainer):
(Layout.Box.prototype.isInlineContainer):
(Layout.Box.prototype.isInlineBox):
* LayoutReloaded/LayoutTree/Container.js:
(Layout.Container.prototype.isContainer): Deleted.
* LayoutReloaded/LayoutTree/InlineContainer.js: Added.
(Layout.InlineContainer):
* LayoutReloaded/TreeBuilder.js:
(TreeBuilder.prototype._createAndAttachBox):
* LayoutReloaded/Utils.js:
(Utils._dumpBox):
(Utils.precisionRound):
(Utils):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-content-simple2.html: Added.
* LayoutReloaded/test/inline-floating1.html: Added.
* LayoutReloaded/test/inline-formatting-context-floats1.html: Added.
* LayoutReloaded/test/inline-formatting-context-floats2.html: Added.
2018-04-07 Timothy Hatcher <timothy@apple.com>
Use the system's link color when system appearance is desired for a WebView.
https://bugs.webkit.org/show_bug.cgi?id=184353
rdar://problem/9420053
Reviewed by Wenson Hsieh.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/SystemColors.mm: Added.
(TestWebKitAPI::WebKit::LinkColor):
(TestWebKitAPI::WebKit::LinkColorWithSystemAppearance):
2018-04-06 Zalan Bujtas <zalan@apple.com>
Rebaseline LayoutReloaded patch file.
* LayoutReloaded/misc/LayoutReloadedWebKit.patch:
2018-04-06 Fujii Hironori <Hironori.Fujii@sony.com>
[Win][WebCore] Expose a constant for scrollbar pixels per line (cScrollbarPixelsPerLine)
https://bugs.webkit.org/show_bug.cgi?id=184296
Reviewed by Alex Christensen.
* DumpRenderTree/win/EventSender.cpp:
(mouseScrollBy): Removed the duplicated cScrollbarPixelsPerLine
definition. Use WebCore::cScrollbarPixelsPerLine.
2018-04-06 Zalan Bujtas <zalan@apple.com>
Rebaseline LayoutReloaded patch file.
* LayoutReloaded/misc/LayoutReloadedWebKit.patch:
2018-04-05 Youenn Fablet <youenn@apple.com>
Test expectation updater should handle Win bot results
https://bugs.webkit.org/show_bug.cgi?id=184274
Reviewed by Ryosuke Niwa.
Add processing of win bot results.
They will update platform/win results.
Updated the script so that if there is no mac-wk2 results, it will still process specific results.
* Scripts/webkitpy/common/net/bugzilla/test_expectation_updater.py:
(TestExpectationUpdater.__init__):
(TestExpectationUpdater._bot_type):
(TestExpectationUpdater.do_update):
* Scripts/webkitpy/common/net/bugzilla/test_expectation_updater_unittest.py:
(MockAttachment):
(MockAttachment.__init__):
(MockAttachment.contents):
(MockBugzilla):
(MockBugzilla.__init__):
(MockBugzilla.fetch_bug):
(MockBugzilla.attachments):
(MockZip):
(MockZip.__init__):
(MockZip.unzip):
(MockZip.read):
(TestExpectationUpdaterTest.test_update_test_expectations):
(TestExpectationUpdaterTest):
(TestExpectationUpdaterTest.test_update_win_future_test_expectations):
2018-04-05 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Fix static position for floating boxes when they don't fit the current line
https://bugs.webkit.org/show_bug.cgi?id=184354
Reviewed by Antti Koivisto.
Do not shrink the current line with the floating box unless it is on the current line.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._handleFloatingBox):
(InlineFormattingContext.prototype._mapFloatingVerticalPosition):
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
(Line.prototype.addFloatingBox):
(Line):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-with-right-floats3.html: Added.
2018-04-05 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Add support for right floating boxes in inline formatting context
https://bugs.webkit.org/show_bug.cgi?id=184351
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._handleFloatingBox):
(InlineFormattingContext.prototype._mapFloatingVerticalPosition):
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
(Line.prototype.addFloatingBox):
(Line):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-with-right-float-simple.html: Added.
* LayoutReloaded/test/inline-with-right-floats2.html: Added.
2018-04-05 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Move floating box to the next line when needed
https://bugs.webkit.org/show_bug.cgi?id=184349
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleContent):
(InlineFormattingContext.prototype._handleText):
(InlineFormattingContext.prototype._handleFloatingBox):
(InlineFormattingContext.prototype._mapFloatingHorizontalPosition):
(InlineFormattingContext):
(InlineFormattingContext.prototype._handleFloatingBoxes): Deleted.
(InlineFormattingContext.prototype._floatingBoxes): Deleted.
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
(Line.prototype.addTextLineBox):
(Line.prototype.addFloatingBox):
(Line):
* LayoutReloaded/Utils.js:
(LayoutRect.prototype.moveHorizontally):
(LayoutRect.prototype.moveVertically):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-with-floats-when-they-dont-fit.html: Added.
2018-04-05 Brady Eidson <beidson@apple.com>
Process Swap on Navigation causes many webpages to hang due to attempted process swap for iframe navigations.
<rdar://problem/39162236> and https://bugs.webkit.org/show_bug.cgi?id=184318
Reviewed by Andy Estes.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
(-[PSONScheme addMappingFromURLString:toData:]):
(-[PSONScheme webView:startURLSchemeTask:]):
2018-04-05 Yusuke Suzuki <utatane.tea@gmail.com>
[WTF] Remove StaticLock
https://bugs.webkit.org/show_bug.cgi?id=184332
Reviewed by Mark Lam.
* DumpRenderTree/JavaScriptThreading.cpp:
2018-04-05 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Find the correct left edge for a line when floating boxes are in parent formatting context.
https://bugs.webkit.org/show_bug.cgi?id=184330
Reviewed by Antti Koivisto.
In inline formatting context, the floating boxes can come from the parent (block) formatting context. Let's
take them into account when computing the line edges.
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext.prototype.left):
(FloatingContext.prototype.right):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._createNewLine):
(InlineFormattingContext.prototype._mapFloatingVerticalPosition):
(InlineFormattingContext.prototype._mapFloatingHorizontalPosition):
(InlineFormattingContext.prototype._mapFloatingPosition): Deleted.
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/multiple-left-floats-on-line-from-parent-formatting-context.html: Added.
2018-04-05 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Collect floating boxes in inline formatting context and layout them first.
https://bugs.webkit.org/show_bug.cgi?id=184329
Reviewed by Antti Koivisto.
Let's do this for now. There might be some cases where this violates layout.
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype._outOfFlowDescendants):
(FormattingContext):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleFloatingBoxes):
(InlineFormattingContext.prototype._handleFloatingBox):
(InlineFormattingContext.prototype._floatingBoxes):
(InlineFormattingContext):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/multiple-left-floats-on-line-simple.html: Added.
2018-04-04 Youenn Fablet <youenn@apple.com>
WebRTC data channel only applications require capture permissions for direct connections
https://bugs.webkit.org/show_bug.cgi?id=174500
<rdar://problem/34134281>
Reviewed by Eric Carlson.
Adding options to enable MDNS ICE candidates.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setMediaDevicesEnabled):
(WTR::TestRunner::setMDNSICECandidatesEnabled):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
2018-04-04 Ryan Haddad <ryanhaddad@apple.com>
Disable failing WKWebViewAutofillTests
https://bugs.webkit.org/show_bug.cgi?id=184196
Unreviewed test gardening.
* TestWebKitAPI/Tests/ios/WKWebViewAutofillTests.mm:
(TestWebKitAPI::TEST):
2018-04-04 Youenn Fablet <youenn@apple.com>
Introduce a ThreadSafeRefCounted parameter to ensure being destroyed on the main thread
https://bugs.webkit.org/show_bug.cgi?id=183988
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WTF/RefPtr.cpp:
(TestWebKitAPI::ThreadSafeRefCountedObject::create):
(TestWebKitAPI::ThreadSafeRefCountedObject::~ThreadSafeRefCountedObject):
(TestWebKitAPI::MainThreadSafeRefCountedObject::create):
(TestWebKitAPI::MainThreadSafeRefCountedObject::~MainThreadSafeRefCountedObject):
(TestWebKitAPI::TEST):
2018-04-04 Ms2ger <Ms2ger@igalia.com>
Test gardening for GTK.
https://bugs.webkit.org/show_bug.cgi?id=184298
Unreviewed test gardening.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: Add pointer to
https://bugs.webkit.org/show_bug.cgi?id=184295.
2018-04-03 Carlos Garcia Campos <cgarcia@igalia.com>
ASSERTION FAILED: !m_mainFrame->coreFrame()->loader().frameHasLoaded() || !m_pendingNavigationID when reloading page while a page is loading
https://bugs.webkit.org/show_bug.cgi?id=153210
Reviewed by Alex Christensen.
Add unit tests to WebKit C API and WebKitGLib.
* TestWebKitAPI/Tests/WebKit/PageLoadBasic.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitGLib/TestLoaderClient.cpp:
(LoadTwiceAndReloadTest::reloadOnFinishLoad):
(LoadTwiceAndReloadTest::LoadTwiceAndReloadTest):
(LoadTwiceAndReloadTest::~LoadTwiceAndReloadTest):
(LoadTwiceAndReloadTest::waitUntilFinished):
(testWebViewLoadTwiceAndReload):
(beforeAll):
2018-04-03 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Test /webkit/WebKitWebPage/context-menu is failing since r229831
https://bugs.webkit.org/show_bug.cgi?id=184260
Reviewed by Michael Catanzaro.
This is not a regression introduced in r229831, though, it's a bug in the test itself revealed by r229831. We
should wait for the load to complete before trying to show the context menu.
* TestWebKitAPI/Tests/WebKitGtk/TestContextMenu.cpp:
(testContextMenuWebExtensionMenu):
2018-04-03 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Introduce floating to InlineFormattingContext
https://bugs.webkit.org/show_bug.cgi?id=184288
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._computeFloatingWidth): Deleted.
(BlockFormattingContext.prototype._computeFloatingHeight): Deleted.
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype._computeFloatingWidth):
(FormattingContext.prototype._computeFloatingHeight):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleFloatingBox):
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
(Line.prototype.addFloatingBox):
(Line):
* LayoutReloaded/test/float-is-inside-inline-formatting-context-simple.html: Added.
* LayoutReloaded/test/index.html:
2018-04-03 Youenn Fablet <youenn@apple.com>
NetworkResourceLoader does not need to expose all redirect response headers
https://bugs.webkit.org/show_bug.cgi?id=184114
<rdar://problem/39010557>
Reviewed by Ryosuke Niwa.
Add an option to dump the number of headers in a response.
This allows validating that filtering does happen or not.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::dumpResponseDescriptionSuitableForTestResult):
(WTR::InjectedBundlePage::responseHeaderCount):
(WTR::InjectedBundlePage::willSendRequestForFrame):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.h:
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::dumpAllHTTPRedirectedResponseHeaders):
(WTR::TestRunner::shouldDumpAllHTTPRedirectedResponseHeaders const):
* WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm:
(WTR::InjectedBundlePage::responseHeaderCount):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
2018-04-03 Andy Estes <aestes@apple.com>
[Mac] Prioritize file promises over filenames during drag and drop
https://bugs.webkit.org/show_bug.cgi?id=184237
<rdar://problem/38278076>
Reviewed by Wenson Hsieh.
* DumpRenderTree/mac/EventSendingController.mm:
(-[EventSendingController beginDragWithFilePromises:]):
2018-04-03 Brady Eidson <beidson@apple.com>
Make SessionStorage work with process swapping.
https://bugs.webkit.org/show_bug.cgi?id=184270
Reviewed by Andy Estes.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
2018-04-03 Chris Dumez <cdumez@apple.com>
Drop MainFrame class
https://bugs.webkit.org/show_bug.cgi?id=184191
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WebCore/cocoa/WebCoreNSURLSession.mm:
2018-04-03 Charlie Turner <cturner@igalia.com>
[WPE] Add WPE port to garden-o-matic
https://bugs.webkit.org/show_bug.cgi?id=182998
Reviewed by Michael Catanzaro.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
Add WPE as a port to check.
(config.kPlatforms.string_appeared_here._builderApplies): Use less
surprising equality operator.
(config.kPlatforms.string_appeared_here.resultsDirectoryNameFromBuilderName):
Ditto.
(config.kPlatforms.string_appeared_here.resultsDirectoryForBuildNumber):
Ditto.
2018-04-03 Adrian Perez de Castro <aperez@igalia.com>
[GTK][JHBuild] Tools/gtk/install-dependencies: Replace libxfont with libxfont2 in Arch Linux
https://bugs.webkit.org/show_bug.cgi?id=184258
Reviewed by Carlos Alberto Lopez Perez.
* gtk/install-dependencies: Use libxfont2 on Arch Linux as well.
2018-04-02 Brady Eidson <beidson@apple.com>
Process swapping on navigation needs to handle server redirects.
<rdar://problem/38690465> and https://bugs.webkit.org/show_bug.cgi?id=184142
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONNavigationDelegate webView:didFinishNavigation:]):
(-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[PSONNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]):
(-[PSONScheme addRedirectFromURLString:toURLString:]):
(-[PSONScheme webView:startURLSchemeTask:]):
2018-04-02 Daniel Bates <dabates@apple.com>
Add infrastructure to relax SSL for allowed hosts in DumpRenderTree and WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=184239
Reviewed by Alexey Proskuryakov.
Adds a new optional command line option --allow-any-certificate-for-allowed-hosts (defaults to disabled)
to allow the allowed hosts to accept any HTTPS certificate. You can specify an allowed host
by using the existing command line option --allowed-host.
Currently both DumpRenderTree and WebKitTestRunner relax SSL certificate validation
for 127.0.0.1 and localhost so that we can run HTTPS tests from these hosts using
a self-signed certificate. They do not relax these restrictions for any allowed host,
specified using the optional command line option --allowed-host. For testing purposes
it is useful to be able to run a local HTTPS server with a self-signed certificate and
mimic a non-localhost hostname (by adding an alias(es) for 127.0.0.1 to /etc/hosts).
We should support relaxing SSL restrictions for such testing purposes.
For example, to allow host example.test to present any HTTPS certificate when running
tests you would invoke:
run-webkit-tests --allowed-host example.test --additional-drt-flag '--allow-any-certificate-for-allowed-hosts'
* DumpRenderTree/mac/DumpRenderTree.mm:
(initializeGlobalsFromCommandLineOptions): Parse the command line option --allow-any-certificate-for-allowed-hosts.
(dumpRenderTree): Allow any HTTPS certificate from each allowed host.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage): Clear out the existing list of allowed hosts
before appending entries to it to avoid growing the list of allowed hosts without bound. Call
platformAllowAnyHTTPSCertificateForAllowedHosts() to apply SSL relaxation for each allowed host.
* WebKitTestRunner/Options.cpp:
(WTR::handleOptionAllowAnyHTTPSCertificateForAllowedHosts): Added.
(WTR::handleOptionAllowedHost): Update code as needed now that Options::allowedHosts is a std::set.
(WTR::OptionsHandler::OptionsHandler):
* WebKitTestRunner/Options.h: Change the data type of allowedHosts from a std::vector to a std::set
so that we can make use of the convenience functon std::set::find() in TestController::canAuthenticateAgainstProtectionSpace().
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
(WTR::TestController::canAuthenticateAgainstProtectionSpace): Allow any HTTPS certificate from each allowed host.
* WebKitTestRunner/TestController.h:
2018-04-02 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r230174.
Caused LayoutTests to exit early with assertion failures.
Reverted changeset:
"Process swapping on navigation needs to handle server
redirects."
https://bugs.webkit.org/show_bug.cgi?id=184142
https://trac.webkit.org/changeset/230174
2018-04-02 Daniel Bates <dabates@apple.com>
Remove pre-Network Session code path for allowing any HTTPS certificate on Mac and iOS
https://bugs.webkit.org/show_bug.cgi?id=184242
Reviewed by Alexey Proskuryakov.
Following r227364 we use the Network Session (NSURLSession) code path by default in
modern WebKit on Mac and iOS. That is, we no longer use {CF, NS}URLConnection in modern
WebKit on these platforms. So, we can remove code that used NSURLRequest SPI to allow
any HTTPS certificate from localhost and 127.0.0.1 when using {CF, NS}URLConnection.
The equivalent functionality is implemented in TestController::canAuthenticateAgainstProtectionSpace().
* WebKitTestRunner/InjectedBundle/ios/InjectedBundleIOS.mm:
(WTR::InjectedBundle::platformInitialize):
* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize):
2018-04-02 Brady Eidson <beidson@apple.com>
Process swapping on navigation needs to handle server redirects.
<rdar://problem/38690465> and https://bugs.webkit.org/show_bug.cgi?id=184142
Reviewed by Alex Christensen.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONNavigationDelegate webView:didFinishNavigation:]):
(-[PSONNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[PSONNavigationDelegate webView:didReceiveServerRedirectForProvisionalNavigation:]):
(-[PSONScheme addRedirectFromURLString:toURLString:]):
(-[PSONScheme webView:startURLSchemeTask:]):
2018-04-02 Thibault Saunier <tsaunier@igalia.com>
webkitpy: Use current environment value for GST_DEBUG(_FILE) and DOT_DIR env vars
https://bugs.webkit.org/show_bug.cgi?id=184036
Reviewed by Philippe Normand.
Those variables are for debug purpose and should not change the behaviour
itself, and developers expect them to have effect.
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server):
2018-04-02 Daniel Bates <dabates@apple.com>
Remove Options constructor and use internal linkage for option handlers
https://bugs.webkit.org/show_bug.cgi?id=184229
Reviewed by Andy Estes.
Use C++11 default initializer syntax to remove the need to explicitly have a constructor
for the struct Options. Use internal linkage for option handler functions as these
are never invoked outside the translation unit they are defined in.
* WebKitTestRunner/Options.cpp:
(WTR::handleOptionNoTimeout):
(WTR::handleOptionVerbose):
(WTR::handleOptionGcBetweenTests):
(WTR::handleOptionPixelTests):
(WTR::handleOptionPrintSupportedFeatures):
(WTR::handleOptionComplexText):
(WTR::handleOptionAcceleratedDrawing):
(WTR::handleOptionRemoteLayerTree):
(WTR::handleOptionShowWebView):
(WTR::handleOptionShowTouches):
(WTR::handleOptionAllowedHost):
(WTR::handleOptionUnmatched):
(WTR::Options::Options): Deleted.
* WebKitTestRunner/Options.h:
2018-04-02 Alejandro G. Castro <alex@igalia.com>
Unreviewed GTK port dependencies fix after r230152.
Add alsa library dependency for gtk.
* gtk/install-dependencies:
2018-04-02 Alejandro G. Castro <alex@igalia.com>
[GTK] Make libwebrtc backend buildable for GTK port
https://bugs.webkit.org/show_bug.cgi?id=178860
Reviewed by Youenn Fablet.
* gstreamer/jhbuild.modules: Modified the libvpx module for the
libwebrtc compilation.
* gtk/install-dependencies: Add libevent as a system requirement.
* Scripts/webkitpy/style/checker.py: Added libwebrtc to the list of third
party libraries with reduced style checks.
2018-04-01 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Use containing block's contentBox left edge when the float is to the right.
https://bugs.webkit.org/show_bug.cgi?id=184230
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._mapFloatingPosition):
(InlineFormattingContext):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-formatting-context-with-floats2.html: Added.
2018-04-01 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Right floating box reduces available line width.
https://bugs.webkit.org/show_bug.cgi?id=184226
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._createNewLine):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-with-floats-right-left-simple.html: Added.
2018-03-31 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Floating box reduces line with in inline formatting context
https://bugs.webkit.org/show_bug.cgi?id=184223
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext.prototype.left):
(FloatingContext.prototype.right):
(FloatingContext.prototype._mapDisplayMarginBoxToFormattingRoot):
(FloatingContext.prototype._mapBorderBoxToFormattingRoot):
(FloatingContext.prototype._mapContentBoxToFormattingRoot):
(FloatingContext.prototype.formattingRoot):
(FloatingContext.prototype._floatingState):
(FloatingContext.prototype._formattingRoot): Deleted.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._createNewLine):
(InlineFormattingContext.prototype._mapFloatingPosition):
(InlineFormattingContext):
* LayoutReloaded/FormattingState/FormattingState.js:
(FormattingState.prototype.displayBox):
(FormattingState):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/inline-formatting-context-with-floats.html: Added.
2018-03-31 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] InlineFormattingState should inherit the floating state from its parent formatting state
https://bugs.webkit.org/show_bug.cgi?id=184220
Reviewed by Antti Koivisto.
If the block container box that initiates an inline formatting context also establishes a block context,
create a new float state, otherwise use the existing one.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._contentHeight):
* LayoutReloaded/FormattingState/InlineFormattingState.js:
(InlineFormattingState):
* LayoutReloaded/LayoutState.js:
(LayoutState.prototype.establishedFormattingState):
(LayoutState.prototype.formattingStateForBox):
(LayoutState.prototype.formattingState): Deleted.
* LayoutReloaded/Utils.js:
2018-03-31 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] FloatingContext does not need a parent formatting context.
https://bugs.webkit.org/show_bug.cgi?id=184219
Reviewed by Antti Koivisto.
We don't need the formatting context in the FloatingContext now that margins are moved over to Display.Box.
This is in preparation for being able to create a FloatingContext for an inline formatting context,
when the inline context actually inherits the floating state from its formatting root.
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext):
(FloatingContext.prototype._availableSpace):
(FloatingContext.prototype._adjustedFloatingPosition):
(FloatingContext.prototype._addFloatingBox):
(FloatingContext.prototype._formattingContext): Deleted.
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext):
2018-03-31 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Do not clone Display.Box for FloatingState stacks.
https://bugs.webkit.org/show_bug.cgi?id=184218
Reviewed by Antti Koivisto.
Now that Display.Box is in a tree context, we can't just clone it for the purpose of caching its absolute position.
* LayoutReloaded/DisplayTree/Box.js:
(Display.Box.prototype.clone): Deleted.
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext.prototype._positionForFloating):
(FloatingContext.prototype._moveToNextVerticalPosition):
(FloatingContext.prototype._availableSpace):
(FloatingContext.prototype._findFloatingAtVerticalPosition):
(FloatingContext.prototype._adjustedFloatingPosition):
(FloatingContext.prototype._bottom):
(FloatingContext.prototype._addFloatingBox):
(FloatingContext.prototype._mapMarginBoxToFormattingRoot):
(FloatingContext.prototype._mapDisplayMarginBoxToFormattingRoot):
* LayoutReloaded/FormattingState/FloatingState.js:
(FloatingState.prototype.addFloating):
2018-03-31 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Remove all FormattingContext::absolute*Box functions.
https://bugs.webkit.org/show_bug.cgi?id=184215
Reviewed by Antti Koivisto.
Use Display.Box instead.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext.prototype._availableSpace):
(FloatingContext.prototype._adjustedFloatingPosition):
(FloatingContext.prototype._mapBorderBoxToFormattingRoot):
(FloatingContext.prototype._mapContentBoxToFormattingRoot):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype.absoluteBorderBox): Deleted.
(FormattingContext.prototype.absolutePaddingBox): Deleted.
(FormattingContext.prototype.absoluteContentBox): Deleted.
(FormattingContext.prototype._toAbsolutePosition): Deleted.
(FormattingContext.prototype._toRootAbsolutePosition): Deleted.
* LayoutReloaded/Utils.js:
(Utils.mapPosition):
(Utils.marginBox):
(Utils.borderBox):
(Utils.contentBox):
2018-03-31 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Remove FormattingContext::absoluteMarginBox
https://bugs.webkit.org/show_bug.cgi?id=184213
Reviewed by Antti Koivisto.
Display.Box already has the margin values.
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext.prototype._positionForFloating):
(FloatingContext.prototype._addFloatingBox):
(FloatingContext.prototype._mapMarginBoxToFormattingRoot):
(FloatingContext.prototype._formattingRoot):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype.absoluteMarginBox): Deleted.
* LayoutReloaded/Utils.js:
(Utils.marginBox):
2018-03-31 Zalan Bujtas <zalan@apple.com>
[layoutReloaded] Introduce margin to Display.Box
https://bugs.webkit.org/show_bug.cgi?id=184212
Reviewed by Antti Koivisto.
This is in preparation for moving margin box out of formatting context to Display.Box.
* LayoutReloaded/DisplayTree/Box.js:
(Display.Box):
(Display.Box.prototype.setRect):
(Display.Box.prototype.setTopLeft):
(Display.Box.prototype.setTop):
(Display.Box.prototype.setLeft):
(Display.Box.prototype.setSize):
(Display.Box.prototype.setWidth):
(Display.Box.prototype.setHeight):
(Display.Box.prototype.width):
(Display.Box.prototype.setMarginTop):
(Display.Box.prototype.setMarginLeft):
(Display.Box.prototype.setMarginBottom):
(Display.Box.prototype.setMarginRight):
(Display.Box.prototype.marginTop):
(Display.Box.prototype.marginLeft):
(Display.Box.prototype.marginBottom):
(Display.Box.prototype.marginRight):
(Display.Box.prototype.marginBox):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype.absoluteMarginBox):
(FormattingContext.prototype._addToLayoutQueue):
* LayoutReloaded/FormattingState/FormattingState.js:
(FormattingState.prototype.createDisplayBox):
2018-03-31 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Add tree context to Display.Box
https://bugs.webkit.org/show_bug.cgi?id=184211
Reviewed by Antti Koivisto.
This is preparation for using the Display.Box tree to resolve absolute coordinates.
* LayoutReloaded/DisplayTree/Box.js:
(Display.Box):
(Display.Box.prototype.setParent):
(Display.Box.prototype.setNextSibling):
(Display.Box.prototype.setPreviousSibling):
(Display.Box.prototype.setFirstChild):
(Display.Box.prototype.setLastChild):
(Display.Box.prototype.parent):
(Display.Box.prototype.nextSibling):
(Display.Box.prototype.previousSibling):
(Display.Box.prototype.firstChild):
(Display.Box.prototype.lastChild):
* LayoutReloaded/FormattingState/FormattingState.js:
(FormattingState.prototype.createDisplayBox):
2018-03-30 Ryosuke Niwa <rniwa@webkit.org>
Copying a list from Microsoft Word to TinyMCE fails when mso-list is the first property
https://bugs.webkit.org/show_bug.cgi?id=182938
<rdar://problem/37683007>
Reviewed by Wenson Hsieh.
Added more assertions to PasteHTML.PreservesMSOList for preserving an inline style which starts with mso-list
or the one which line-breaks right before it.
* TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
* TestWebKitAPI/Tests/WebKitCocoa/mso-list.html:
2018-03-29 Ryosuke Niwa <rniwa@webkit.org>
Copying a list from Microsoft Word to TinyMCE fails when mso-list is on tags other than P
https://bugs.webkit.org/show_bug.cgi?id=182954
<rdar://problem/37713141>
Reviewed by Wenson Hsieh.
Added a test case for a HTML generated by Microsoft Word which sets mso-list on h4.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
* TestWebKitAPI/Tests/WebKitCocoa/mso-list-compat-mode.html: Fixed the file path.
* TestWebKitAPI/Tests/WebKitCocoa/mso-list-on-h4.html: Added.
2018-03-29 Ross Kirsling <ross.kirsling@sony.com>
run-jsc-benchmarks should recognize Windows-style build directory structure.
https://bugs.webkit.org/show_bug.cgi?id=184117
Reviewed by Yusuke Suzuki.
* Scripts/run-jsc-benchmarks:
Allow not only bin/jsc but also bin64/jsc.exe.
2018-03-29 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Decouple formatting state and context lifetime.
https://bugs.webkit.org/show_bug.cgi?id=184136
Reviewed by Antti Koivisto.
FormattingContext is about the layout logic. We don't need to hold on to it.
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext):
(FloatingContext.prototype.computePosition):
(FloatingContext.prototype._positionForClear):
(FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
(FloatingContext.prototype._addFloatingBox):
(FloatingContext.prototype._formattingContext):
(FloatingContext.prototype._formattingState):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext):
* LayoutReloaded/FormattingState/BlockFormattingState.js:
(BlockFormattingState):
* LayoutReloaded/FormattingState/FloatingState.js:
(FloatingState):
(FloatingState.prototype.addFloating):
(FloatingState.prototype.formattingState):
(FloatingState.prototype.formattingContext): Deleted.
* LayoutReloaded/FormattingState/FormattingState.js:
(FormattingState):
(FormattingState.prototype.formattingContext): Deleted.
* LayoutReloaded/FormattingState/InlineFormattingState.js:
(InlineFormattingState):
* LayoutReloaded/LayoutState.js:
(LayoutState.prototype.layout):
(LayoutState.prototype.formattingContext):
2018-03-28 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Introduce FloatingState.
https://bugs.webkit.org/show_bug.cgi?id=184126
Reviewed by Antti Koivisto.
It holds the floating state (left/right floating stack) for a given formatting state (Block or Inline).
(FormattingState -> FloatingState/FormattingContext -> FloatingContext)
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext):
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext):
(FloatingContext.prototype.computePosition):
(FloatingContext.prototype.bottom):
(FloatingContext.prototype._positionForFloating):
(FloatingContext.prototype._positionForClear):
(FloatingContext.prototype._findInnerMostLeftAndRight):
(FloatingContext.prototype._isEmpty):
(FloatingContext.prototype._floatingState):
(FloatingContext.prototype._formattingContext):
(FloatingContext.prototype._lastFloating):
(FloatingContext.prototype._leftFloatingStack):
(FloatingContext.prototype._rightFloatingStack):
(FloatingContext.prototype._addFloating): Deleted.
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext):
* LayoutReloaded/FormattingState/BlockFormattingState.js:
(BlockFormattingState):
* LayoutReloaded/FormattingState/FloatingState.js: Copied from Tools/LayoutReloaded/FormattingState/InlineFormattingState.js.
(FloatingState):
(FloatingState.prototype.addFloating):
(FloatingState.prototype.leftFloatingStack):
(FloatingState.prototype.rightFloatingStack):
(FloatingState.prototype.lastFloating):
(FloatingState.prototype.formattingContext):
* LayoutReloaded/FormattingState/FormattingState.js:
(FormattingState):
(FormattingState.prototype.floatingState):
* LayoutReloaded/FormattingState/InlineFormattingState.js:
(InlineFormattingState):
* LayoutReloaded/test/index.html:
2018-03-28 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Convert floating left/right stack display boxes absolute to the formatting context's root.
https://bugs.webkit.org/show_bug.cgi?id=184123
Reviewed by Antti Koivisto.
1. The left/right floating array should hold the Display.Box (and not the Layout.Box)
2. Clone the Display.Box and convert its rect absolute to the formatting context's root so that we
don't have to keep converting the coordinates while computing the positions.
* LayoutReloaded/DisplayTree/Box.js:
(Display.Box.prototype.clone):
(Display.Box.prototype.setRect):
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext.prototype.computePosition):
(FloatingContext.prototype._positionForFloating):
(FloatingContext.prototype._addFloating):
(FloatingContext.prototype._moveToNextVerticalPosition):
(FloatingContext.prototype._availableSpace):
(FloatingContext.prototype._findFloatingAtVerticalPosition):
(FloatingContext.prototype._adjustedFloatingPosition):
(FloatingContext.prototype._bottom):
2018-03-28 Chris Dumez <cdumez@apple.com>
Unreviewed iOS build fix after r230060.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2018-03-28 Chris Dumez <cdumez@apple.com>
Unreviewed, disable new window.open() API tests introduced in r230051 on iOS.
I will investigate if this is testable on iOS.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
2018-03-28 Chris Dumez <cdumez@apple.com>
Do process swap when opening a cross-origin URL via window.open(url, '_blank', 'noopener')
https://bugs.webkit.org/show_bug.cgi?id=183962
<rdar://problem/38817833>
Reviewed by Brady Eidson.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONUIDelegate initWithNavigationDelegate:]):
(-[PSONUIDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
2018-03-28 Carlos Eduardo Ramalho <cadubentzen@gmail.com>
Add Carlos Eduardo Ramalho as contributor
https://bugs.webkit.org/show_bug.cgi?id=184082
Reviewed by Carlos Alberto Lopez Perez.
* Scripts/webkitpy/common/config/contributors.json:
2018-03-28 Wenson Hsieh <wenson_hsieh@apple.com>
[Extra zoom mode] Make boosted text autosizing values switchable at runtime
https://bugs.webkit.org/show_bug.cgi?id=184092
<rdar://problem/38939917>
Reviewed by Tim Horton.
Add an API test to check that toggling the boosted text autosizing preference causes text to lay out larger than
it would with normal text autosizing.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/TextAutosizingBoost.mm: Added.
(TEST):
2018-03-28 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] InlineFormattingContext::_handleText should support runs on multiple lines
https://bugs.webkit.org/show_bug.cgi?id=184101
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext):
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleText):
(InlineFormattingContext.prototype._createNewLine):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/simple-multiline-text.html: Added.
2018-03-28 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Add InlineTextBreaker::skipLeadingWhitespaceIfNeeded
https://bugs.webkit.org/show_bug.cgi?id=184099
Reviewed by Antti Koivisto.
* LayoutReloaded/misc/LayoutReloadedWebKit.patch:
2018-03-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GLIB] Add JSCWeakValue to JavaScriptCore GLib API
https://bugs.webkit.org/show_bug.cgi?id=184041
Reviewed by Michael Catanzaro.
Add test case for JSCWeakValue.
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:
(weakValueClearedCallback):
(testJSCWeakValue):
(main):
2018-03-27 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Start using window.collectTextRuns() to layout text lines in inline formatting context
https://bugs.webkit.org/show_bug.cgi?id=184070
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype._handleText):
(InlineFormattingContext.prototype._commitLine):
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
(Line.prototype.addTextLineBox):
(Line):
(Line.prototype.addLineBox): Deleted.
* LayoutReloaded/FormattingState/BlockFormattingState.js:
(BlockFormattingState):
* LayoutReloaded/FormattingState/FormattingState.js:
(FormattingState.prototype.displayBox):
(FormattingState):
(FormattingState.prototype._setFormattingContext): Deleted.
* LayoutReloaded/FormattingState/InlineFormattingState.js:
(InlineFormattingState):
* LayoutReloaded/LayoutTree/Text.js:
(Text.prototype.content):
* LayoutReloaded/Utils.js:
(Utils.textRuns):
(Utils.textRunsForLine):
(Utils._dumpLines.):
(Utils._dumpLines):
* LayoutReloaded/test/simple-inline-text.html:
2018-03-27 Eric Carlson <eric.carlson@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=183876
<rdar://problem/38726459>
Unreviewed, fix for the test added in r229995 in the iOS simulator.
* TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm:
(TestWebKitAPI::AVFoundationPref::testWithPreference):
2018-03-27 Jiewen Tan <jiewen_tan@apple.com>
[WebAuthN] Implement authenticatorGetAssertion
https://bugs.webkit.org/show_bug.cgi?id=183881
<rdar://problem/37258628>
Reviewed by Brent Fulgham.
* TestWebKitAPI/Tests/ios/LocalAuthenticator.mm:
(TestWebKitAPI::getTestKey):
(TestWebKitAPI::addTestKeyToKeychain):
(TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::evaluatePolicyFailed):
(TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::evaluatePolicyPassed):
(TestWebKitAPI::LAEvaluateAccessControlFailedSwizzler::LAEvaluateAccessControlFailedSwizzler):
(TestWebKitAPI::LAEvaluateAccessControlFailedSwizzler::evaluateAccessControlFailed):
(TestWebKitAPI::LAEvaluateAccessControlPassedSwizzler::LAEvaluateAccessControlPassedSwizzler):
(TestWebKitAPI::LAEvaluateAccessControlPassedSwizzler::evaluateAccessControlPassed):
(TestWebKitAPI::TEST):
2018-03-27 Brian Burg <bburg@apple.com>
REGRESSION(r229937): WebDriver tests no longer run, test runner hangs when launching wpt web server
https://bugs.webkit.org/show_bug.cgi?id=184056
<rdar://problem/38925058>
Reviewed by Timothy Hatcher and Youenn Fablet.
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
(WebDriverW3CWebServer.start):
The config key used in upstream WPT has changed from 'host' to 'browser_host'.
2018-03-27 Timothy Hatcher <timothy@hatcher.name>
Update my email address in contributors.json and scripts
https://bugs.webkit.org/show_bug.cgi?id=184054
* Scripts/validate-committer-lists:
(CommitterListFromGit):
* Scripts/webkitpy/common/config/contributors.json:
2018-03-27 Eric Carlson <eric.carlson@apple.com>
Make AVFoundationEnabled preference available on iOS
https://bugs.webkit.org/show_bug.cgi?id=183876
<rdar://problem/38726459>
Reviewed by Youenn Fablet.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/video.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/AVFoundationPreference.mm: Added.
(-[PreferenceTestMessageHandler userContentController:didReceiveScriptMessage:]):
(TestWebKitAPI::AVFoundationPref::SetUp):
(TestWebKitAPI::AVFoundationPref::testWithPreference):
(TestWebKitAPI::TEST_F):
2018-03-26 Brent Fulgham <bfulgham@apple.com>
Warn against cookie access in the WebContent process using ProcessPrivilege assertions
https://bugs.webkit.org/show_bug.cgi?id=183911
<rdar://problem/38762306>
Reviewed by Youenn Fablet.
Add a set of ProcessPrivilege assertions to enforce the rule that the WebContent process
should never call Cookie API directly. That should only happen in the Networking or
UIProcess.
* DumpRenderTree/mac/DumpRenderTree.mm:
(DumpRenderTreeMain):
* TestWebKitAPI/TestsController.cpp:
(TestWebKitAPI::TestsController::TestsController):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::initialize):
2018-03-26 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Add InlineText DOM interface and dependencies
https://bugs.webkit.org/show_bug.cgi?id=184010
Reviewed by Antti Koivisto.
to help inline text layout.
* LayoutReloaded/misc/LayoutReloadedWebKit.patch:
2018-03-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] Add API to convert between DOM and JSCValue
https://bugs.webkit.org/show_bug.cgi?id=183448
Reviewed by Michael Catanzaro.
Add unit tests for non-deprecated DOM API and switch existing tests to use non-deprecated API except for the
ones that test the deprecated API.
* TestWebKitAPI/Tests/WebKitGLib/DOMElementTest.cpp: Added.
(DOMElementTest::create):
(DOMElementTest::testAutoFill):
(registerTests):
* TestWebKitAPI/Tests/WebKitGLib/EditorTest.cpp: Added.
(WebKitWebEditorTest::create):
(WebKitWebEditorTest::selectionChangedCallback):
(WebKitWebEditorTest::testSelectionchanged):
(registerTests):
* TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
(WebKitFrameTest::testJavaScriptValues):
(registerTests):
* TestWebKitAPI/Tests/WebKitGLib/TestDOMElement.cpp: Renamed from Source/WebKit/WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMObjectPrivate.h.
(testWebKitDOMElementAutoFill):
(beforeAll):
(afterAll):
* TestWebKitAPI/Tests/WebKitGLib/TestEditor.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebKitGtk/TestEditor.cpp.
* TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp:
(testWebKitFrameJavaScriptValues):
(beforeAll):
* TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:
(inputElementIsUserEdited):
(testWebExtensionInputElementIsUserEdited):
(testWebExtensionFormSubmissionSteps):
(beforeAll):
* TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
(documentLoadedCallback):
(serializeNode):
(contextMenuCallback):
(consoleMessageSentCallback):
(formControlsAssociatedCallback):
(willSubmitFormCallback):
(pageCreatedCallback):
(methodCallCallback):
* TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
(checkLeaks):
(webProcessTestRunnerFinalize):
(checkLeaksAtExit):
* TestWebKitAPI/Tests/WebKitGtk/AutocleanupsTest.cpp:
(AutocleanupsTest::testWebProcessAutocleanups):
* TestWebKitAPI/Tests/WebKitGtk/DOMClientRectTest.cpp:
* TestWebKitAPI/Tests/WebKitGtk/DOMNodeFilterTest.cpp:
* TestWebKitAPI/Tests/WebKitGtk/DOMNodeTest.cpp:
* TestWebKitAPI/Tests/WebKitGtk/DOMXPathNSResolverTest.cpp:
* TestWebKitAPI/Tests/WebKitGtk/EditorTest.cpp: Removed.
* TestWebKitAPI/glib/CMakeLists.txt:
* TestWebKitAPI/glib/PlatformGTK.cmake:
* TestWebKitAPI/glib/PlatformWPE.cmake:
2018-03-24 Jonathan Bedard <jbedard@apple.com>
webkitpy: Unrecognized mac versions always use WebKitTestRunner
https://bugs.webkit.org/show_bug.cgi?id=183681
<rdar://problem/38509162>
Reviewed by Daniel Bates.
When an unrecognized version is used, we were unconditionally adding '-wk2'
to the mac version name. This would mean that the port object would always
use WebKitTestRunner as the driver, even if DumpRenderTree was explicitly
requested.
* Scripts/webkitpy/port/apple.py:
(ApplePort.determine_full_port_name): Only add wk2 to port names if
WebKitTestRunner is specified.
* Scripts/webkitpy/port/mac.py:
(MacPort.__init__): Compare length of split string, and do not treat wk2 as a
version name.
* Scripts/webkitpy/port/mac_unittest.py:
(MacTest):
(MacTest.test_factory_with_future_version): Confirm that future versions correctly
assign the driver and have undefined version names.
(MacTest.test_factory_with_portname_version): Confirm that general versions correctly assign
the driver and have defined versions.
(MacTest.test_factory_with_portname_wk2): Ensure that mac ports ending in 'wk2' set
the driver to be WebKitTestRunner even if webkit_test_runner=False.
2018-03-23 Zan Dobersek <zdobersek@igalia.com>
Fix the run-benchmark script, properly specifying the plan directory
where the Skipped file is located.
Rubber-stamped by Carlos Alberto Lopez Perez.
* Scripts/webkitpy/benchmark_runner/run_benchmark.py:
(start):
2018-03-23 Tim Horton <timothy_horton@apple.com>
Fix the build with no pasteboard
https://bugs.webkit.org/show_bug.cgi?id=183973
Reviewed by Dan Bernstein.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-03-23 Youenn Fablet <youenn@apple.com>
Update WPT tools to a1ec330
https://bugs.webkit.org/show_bug.cgi?id=183934
Reviewed by Chris Dumez.
Update script to run WPT server according updated WPT tools.
* Scripts/webkitpy/layout_tests/servers/web_platform_test_launcher.py:
(main):
* Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py:
(base_http_url):
(base_https_url):
2018-03-23 Sihui Liu <sihui_liu@apple.com>
Local storage getItem() for an empty string returned UNDEFINED value.
https://bugs.webkit.org/show_bug.cgi?id=69138
<rdar://problem/13410974>
Reviewed by Brady Eidson.
Add API test coverage.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/LocalStoragePersistence.mm: Added.
(-[LocalStorageMessageHandler userContentController:didReceiveScriptMessage:]):
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/localstorage-empty-string-value.html: Added.
2018-03-23 Chris Dumez <cdumez@apple.com>
Promptly terminate service worker processes when they are no longer needed
https://bugs.webkit.org/show_bug.cgi?id=183873
<rdar://problem/38676995>
Reviewed by Youenn Fablet.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2018-03-23 Brady Eidson <beidson@apple.com>
Go to back/forward list items after a process-swapped navigation.
<rdar://problem/38690544> and https://bugs.webkit.org/show_bug.cgi?id=183920
Reviewed by Andy Estes.
Add a new API test that does some process-swapping navigations (including a back navigation)
and verifies the state of the engine afterwards.
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm:
(-[PSONMessageHandler userContentController:didReceiveScriptMessage:]):
(-[PSONScheme initWithBytes:]):
(-[PSONScheme webView:startURLSchemeTask:]):
(log):
(function):
(TEST): Deleted.
2018-03-23 Brendan McLoughlin <brendan@bocoup.com>
Lint web-platform-tests changes with the wpt linter before exporting
https://bugs.webkit.org/show_bug.cgi?id=183796
Reviewed by Youenn Fablet.
* Scripts/webkitpy/w3c/test_exporter.py:
(TestExporter.__init__):
(TestExporter.do_export):
* Scripts/webkitpy/w3c/test_exporter_unittest.py:
(TestExporterTest.MockWPTLinter):
(TestExporterTest.MockWPTLinter.__init__):
(TestExporterTest.MockWPTLinter.lint):
(TestExporterTest.test_export):
(TestExporterTest.test_export_with_specific_branch):
* Scripts/webkitpy/w3c/wpt_linter.py: Added.
(WPTLinter):
(WPTLinter.__init__):
(WPTLinter.lint):
2018-03-23 David Kilzer <ddkilzer@apple.com>
Stop using dispatch_set_target_queue()
<https://webkit.org/b/183908>
<rdar://problem/33553533>
Reviewed by Daniel Bates.
* Scripts/webkitpy/style/checkers/cpp.py:
(check_language): Add check for use of
dispatch_set_target_queue().
(CppChecker): Add 'runtime/dispatch_set_target_queue' category.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest): Add test.
2018-03-23 Youenn Fablet <youenn@apple.com>
Allow fully whitelisted plug-ins to match non HTTP URLs
https://bugs.webkit.org/show_bug.cgi?id=183938
rdar://problem/38534312
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebCore/URL.cpp:
(TestWebKitAPI::TEST_F):
2018-03-23 JF Bastien <jfbastien@apple.com>
dump-class-layout is just wrong
https://bugs.webkit.org/show_bug.cgi?id=183939
Reviewed by Yusuke Suzuki.
Looks like r229291 contained a half-renamed variable in it, so it
just doesn't work.
* Scripts/dump-class-layout:
(verify_type):
(verify_type_recursive):
2018-03-23 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Run JSC GLib API tests in GTK+ and WPE bots.
The test runners were still considering the JSC tests as google tests, but they are now GLib tests.
* Scripts/run-gtk-tests:
(GtkTestRunner.is_glib_test):
(GtkTestRunner.is_google_test):
* Scripts/run-wpe-tests:
(WPETestRunner.is_glib_test):
(WPETestRunner.is_google_test):
2018-03-22 Daniel Bates <dabates@apple.com>
Expose SchemeRegistry::registerAsCanDisplayOnlyIfCanRequest() as WebKit SPI
https://bugs.webkit.org/show_bug.cgi?id=183907
<rdar://problem/38759127>
Reviewed by Alex Christensen.
Adds unit tests for the modern Objective-C and C SPI to ensure we do not regress it.
We use the deprecated -[WKBrowsingContextController registerSchemeForCustomProtocol:]
in both the modern Objective-C API and C API tests to share code. Once we no longer
need to support the C API we should remove the tests and transition the modern Objective-
C tests to use -[WKWebViewConfiguration setURLSchemeHandler:forURLScheme:].
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/SchemeRegistry.mm: Added.
(+[EchoURLProtocol canInitWithRequest:]):
(+[EchoURLProtocol canonicalRequestForRequest:]):
(+[EchoURLProtocol requestIsCacheEquivalent:toRequest:]):
(-[EchoURLProtocol startLoading]):
(-[EchoURLProtocol stopLoading]):
(-[WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequestLoadDelegate browsingContextController:didFailProvisionalLoadWithError:]):
(-[WKContextRegisterURLSchemeAsCanDisplayOnlyIfCanRequestLoadDelegate browsingContextControllerDidFinishLoad:]):
(TestWebKitAPI::TEST):
2018-03-22 Adrian Perez de Castro <aperez@igalia.com>
[WPE] Enable WOFF2 support
https://bugs.webkit.org/show_bug.cgi?id=178158
Reviewed by Frédéric Wang.
* wpe/jhbuild.modules: Add "brotli" and "woff2" to the JHBuild moduleset.
2018-03-22 Brendan McLoughlin <brendan@bocoup.com>
Do not export web-platform-test files generated by the wpt importer to assist the webkit test runner
https://bugs.webkit.org/show_bug.cgi?id=183916
Reviewed by Youenn Fablet.
* Scripts/webkitpy/w3c/test_exporter.py:
(TestExporter.create_branch_with_patch):
* Scripts/webkitpy/w3c/test_exporter_unittest.py:
(TestExporterTest.test_export):
(TestExporterTest.test_export_with_specific_branch):
2018-03-22 Tim Horton <timothy_horton@apple.com>
Improve readability of WebCore's OTHER_LDFLAGS
https://bugs.webkit.org/show_bug.cgi?id=183909
<rdar://problem/38760992>
Reviewed by Dan Bernstein.
* TestWebKitAPI/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-03-21 Fujii Hironori <Hironori.Fujii@sony.com>
Unreviewed. Marked myself as a committer.
* Scripts/webkitpy/common/config/contributors.json:
2018-03-21 Yoshiaki Jitsukawa <yoshiaki.jitsukawa@sony.com>
Unreviewed, make the email address of Yoshiaki Jitsukawa all lower case.
* Scripts/webkitpy/common/config/contributors.json:
2018-03-21 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com>
Unreviewed, add myself as a WebKit committer.
* Scripts/webkitpy/common/config/contributors.json:
2018-03-21 Chris Dumez <cdumez@apple.com>
ScrollViewInsetTests.RestoreInitialContentOffsetAfterCrash API test is failing with async delegates
https://bugs.webkit.org/show_bug.cgi?id=183787
Reviewed by Wenson Hsieh.
Add API test coverage.
* TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm:
(-[AsyncPolicyDelegateForInsetTest webView:didFinishNavigation:]):
(-[AsyncPolicyDelegateForInsetTest webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[AsyncPolicyDelegateForInsetTest webView:decidePolicyForNavigationResponse:decisionHandler:]):
(-[AsyncPolicyDelegateForInsetTest webViewWebContentProcessDidTerminate:]):
(TestWebKitAPI::TEST):
2018-03-21 Chris Dumez <cdumez@apple.com>
Fix DataInteractionTests.InjectedBundleAllowPerformTwoStepDrop to use synchronouslyLoadTestPageNamed
https://bugs.webkit.org/show_bug.cgi?id=183858
Reviewed by Wenson Hsieh.
Fix DataInteractionTests.InjectedBundleAllowPerformTwoStepDrop to use synchronouslyLoadTestPageNamed
instead of loadTestPageNamed because injecting script.
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):
2018-03-21 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Enable formatting state for InlineFormattingContext
https://bugs.webkit.org/show_bug.cgi?id=183853
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._contentHeight):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext):
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._createNewLine):
* LayoutReloaded/LayoutState.js:
(LayoutState.prototype.formattingState):
* LayoutReloaded/README.md:
* LayoutReloaded/Utils.js:
(Utils._dumpTree):
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/simple-inline-text.html: Added.
2018-03-21 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Move inline lines to InlineFormattingState.
https://bugs.webkit.org/show_bug.cgi?id=183814
Reviewed by Antti Koivisto.
InlineFormattingContext is not supposed to hold state.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext):
(InlineFormattingContext.prototype._commitLine):
(InlineFormattingContext.prototype._createNewLine):
(InlineFormattingContext.prototype.lines): Deleted.
(InlineFormattingContext.prototype._initializeLine): Deleted.
* LayoutReloaded/FormattingState/InlineFormattingState.js:
(InlineFormattingState):
(InlineFormattingState.prototype.lines):
(InlineFormattingState.prototype.appendLine):
2018-03-21 Ms2ger <Ms2ger@igalia.com>
[WPE] Disable most of TestWebKitFaviconDatabase.
https://bugs.webkit.org/show_bug.cgi?id=183813
Unreviewed test gardening.
The relevant APIs were mostly removed in r223953, making this test
time out consistently.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitFaviconDatabase.cpp:
2018-03-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] JSC bindings not introspectable
https://bugs.webkit.org/show_bug.cgi?id=136989
Reviewed by Michael Catanzaro.
Use the new API instead of the deprecated one.
* MiniBrowser/gtk/main.c:
(aboutDataScriptMessageReceivedCallback):
* TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
(WebKitFrameTest::testJavaScriptContext):
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebView.cpp:
(testWebViewRunJavaScript):
* TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
(consoleMessageSentCallback):
(echoCallback):
(windowObjectCleared):
(methodCallCallback):
* TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
(runTest):
(webProcessTestRunnerFinalize):
(windowObjectClearedCallback):
* TestWebKitAPI/glib/PlatformGTK.cmake:
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(WebViewTest::javascriptResultToCString):
(WebViewTest::javascriptResultToNumber):
(WebViewTest::javascriptResultToBoolean):
(WebViewTest::javascriptResultIsNull):
(WebViewTest::javascriptResultIsUndefined):
2018-03-21 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] Initial implementation of JavaScriptCore glib bindings
https://bugs.webkit.org/show_bug.cgi?id=164061
Reviewed by Michael Catanzaro.
Add unit tests for the new API and generate the API documentation with generate-gtkdoc.
* Scripts/webkitpy/style/checker.py: Ignore some style errors in public GLib API headers.
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp: Added.
(LeakChecker::~LeakChecker):
(LeakChecker::watch):
(ExceptionHandler::ExceptionHandler):
(ExceptionHandler::~ExceptionHandler):
(ExceptionHandler::push):
(ExceptionHandler::pop):
(jscContextGarbageCollect):
(testJSCBasic):
(testJSCTypes):
(foo):
(callback):
(doubleAndSetInResult):
(sumFunction):
(testJSCFunction):
(testJSCObject):
(fooCreate):
(fooCreateWithFoo):
(fooFree):
(setFoo):
(getFoo):
(setSibling):
(getSibling):
(multiplyFoo):
(getMultiplyFoo):
(getMultiplyFooAsync):
(bazCreate):
(testJSCClass):
(barCreate):
(barFree):
(setBar):
(getBar):
(testJSCPrototypes):
(createError):
(testJSCExceptions):
(testJSCPromises):
(fooFreeAndLog):
(testJSCGarbageCollector):
(testsJSCVirtualMachine):
(testsJSCAutocleanups):
(main):
* gtk/generate-gtkdoc:
(get_generator_for_config):
2018-03-20 Tim Horton <timothy_horton@apple.com>
Enable the minimal simulator feature flag when appropriate
https://bugs.webkit.org/show_bug.cgi?id=183807
Reviewed by Dan Bernstein.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-03-20 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Disconnect Display.Box from Layout.Box
https://bugs.webkit.org/show_bug.cgi?id=183805
Reviewed by Antti Koivisto.
Display.Box is only accessed through the FormattingState.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext):
(BlockFormattingContext.prototype.layout):
(BlockFormattingContext.prototype._placeInFlowPositionedChildren):
(BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
(BlockFormattingContext.prototype._adjustBottomWithFIXME):
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext):
(FormattingContext.prototype.formattingRoot):
(FormattingContext.prototype.formattingState):
(FormattingContext.prototype.layoutState):
(FormattingContext.prototype._toAbsolutePosition):
(FormattingContext.prototype._toRootAbsolutePosition):
(FormattingContext.prototype._addToLayoutQueue):
(FormattingContext.prototype.displayBox):
(FormattingContext.prototype._outOfFlowDescendants):
(FormattingContext.prototype.rootContainer): Deleted.
(FormattingContext.prototype.layoutContext): Deleted.
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext):
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._initializeLine):
* LayoutReloaded/FormattingState/BlockFormattingState.js:
(BlockFormattingState):
* LayoutReloaded/FormattingState/FormattingState.js:
(FormattingState):
(FormattingState.prototype.formattingRoot):
(FormattingState.prototype.layoutState):
(FormattingState.prototype.createDisplayBox):
(FormattingState.prototype.displayBoxMap):
(FormattingState.prototype.displayBox):
(FormattingState.prototype.layoutContext): Deleted.
* LayoutReloaded/FormattingState/InlineFormattingState.js:
(InlineFormattingState):
* LayoutReloaded/Layout.js:
(layout):
* LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
* LayoutReloaded/LayoutState.js: Renamed from Tools/LayoutReloaded/LayoutContext.js.
(LayoutState):
(LayoutState.prototype.layout):
(LayoutState.prototype._createFormattingState):
(LayoutState.prototype.formattingStates):
(LayoutState.prototype.initialDisplayBox):
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.isOutOfFlowPositioned):
(Layout.Box.prototype.containingBlock):
(Layout.Box.prototype.setDisplayBox): Deleted.
(Layout.Box.prototype.displayBox): Deleted.
* LayoutReloaded/Utils.js:
(Utils.layoutTreeDump):
(Utils._findDisplayBox):
(Utils._dumpBox):
(Utils._dumpTree):
* LayoutReloaded/misc/headers/BlockFormattingContext.h:
* LayoutReloaded/misc/headers/FormattingContext.h:
* LayoutReloaded/misc/headers/LayoutContext.h:
* LayoutReloaded/test/index.html:
2018-03-19 Ryosuke Niwa <rniwa@webkit.org>
Expose content attributes on _WKLinkIconParameters
https://bugs.webkit.org/show_bug.cgi?id=183768
Reviewed by Alex Christensen.
Expanded the basic test case for _WKLinkIconParameters's properties including newly added "attributes".
* TestWebKitAPI/Tests/WebKitCocoa/IconLoadingDelegate.mm:
(IconLoading.DefaultFavicon):
2018-03-20 Wenson Hsieh <wenson_hsieh@apple.com>
Add AssistedNodeInformation plumbing for form control placeholder text and label text
https://bugs.webkit.org/show_bug.cgi?id=183802
<rdar://problem/38686273>
Reviewed by Tim Horton.
Adds a new API test to exercise new placeholder and label SPI on _WKFocusedFormElement.
* TestWebKitAPI/Tests/WebKitCocoa/_WKInputDelegate.mm:
(-[InputDelegate _webView:focusShouldStartInputSession:]):
(-[InputDelegate shouldStartInputSessionHandler]):
(-[InputDelegate setShouldStartInputSessionHandler:]):
(TEST):
(-[FormSubmissionDelegate webView:startURLSchemeTask:]): Deleted.
(-[FormSubmissionDelegate webView:stopURLSchemeTask:]): Deleted.
(-[FormSubmissionDelegate _webView:willSubmitFormValues:userObject:submissionHandler:]): Deleted.
2018-03-20 Basuke Suzuki <Basuke.Suzuki@sony.com>
[WinCairo] Fix to run-webkit-httpd from native Windows.
https://bugs.webkit.org/show_bug.cgi?id=183605
Reviewed by Daniel Bates.
This fix is to run Apache HTTP server from native Windows. The environment is different
from cygwin, which is used for AppleWin, in following points:
- A temporary file behaves differently. It cannot reopen by anybody when indicated as
delete on close. To solve this situation, filesystem.mkdtemp() is used instead.
- It's not unix so that `tail` command is not available. Replaced with python equivalent
function.
* Scripts/webkitpy/common/system/filesystem.py:
(FileSystem.mkdtemp.TemporaryDirectory.__init__):
(FileSystem.mkdtemp.TemporaryDirectory.__exit__): The existing contents would be deleted.
(FileSystem.mkdtemp):
* Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py:
(parse_args):
(run_server):
(run_server_with_log_file):
(follow_file):
2018-03-20 Brady Eidson <beidson@apple.com>
First piece of process swapping on navigation.
https://bugs.webkit.org/show_bug.cgi?id=183665
Reviewed by Andy Estes.
Expose the "swaps processes on navigation" setting in MiniBrowser UI for testing:
* MiniBrowser/mac/AppDelegate.m:
(defaultConfiguration):
* MiniBrowser/mac/SettingsController.h:
* MiniBrowser/mac/SettingsController.m:
(-[SettingsController _populateMenu]):
(-[SettingsController validateMenuItem:]):
(-[SettingsController processSwapOnNavigationEnabled]):
(-[SettingsController toggleProcessSwapOnNavigation:]):
Makes sure the current behavior is tested:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: Added.
(-[PSONNavigationDelegate webView:didFinishNavigation:]):
(-[PSONScheme webView:startURLSchemeTask:]):
(-[PSONScheme webView:stopURLSchemeTask:]):
(TEST):
2018-03-20 Chris Dumez <cdumez@apple.com>
QuickLook.NavigationDelegate API test is failing on iOS with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183791
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/QuickLook.mm:
(-[QuickLookAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
(-[QuickLookAsyncNavigationDelegate _webView:didStartLoadForQuickLookDocumentInMainFrameWithFileName:uti:]):
(-[QuickLookAsyncNavigationDelegate _webView:didFinishLoadForQuickLookDocumentInMainFrame:]):
(-[QuickLookAsyncNavigationDelegate webView:didFinishNavigation:]):
(TEST):
2018-03-20 Tim Horton <timothy_horton@apple.com>
Add and adopt WK_PLATFORM_NAME and adjust default feature defines
https://bugs.webkit.org/show_bug.cgi?id=183758
<rdar://problem/38017644>
Reviewed by Dan Bernstein.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-03-20 Chris Dumez <cdumez@apple.com>
Unreviewed, rolling out r229726 and r229763.
Caused some API test failures on iOS
Reverted changesets:
"Make policy decisions asynchronous"
https://bugs.webkit.org/show_bug.cgi?id=180568
https://trac.webkit.org/changeset/229726
"Rebaseline three webarchive tests for WK2 after r229726."
https://bugs.webkit.org/show_bug.cgi?id=180568
https://trac.webkit.org/changeset/229763
2018-03-20 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Move Display.Box handling from FormattingContext to FormattingState
https://bugs.webkit.org/show_bug.cgi?id=183779
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._computeStaticPosition):
(BlockFormattingContext.prototype._computeOutOfFlowWidth):
(BlockFormattingContext.prototype._computeFloatingWidth):
(BlockFormattingContext.prototype._computeInFlowWidth):
(BlockFormattingContext.prototype._computeOutOfFlowHeight):
(BlockFormattingContext.prototype._computeFloatingHeight):
(BlockFormattingContext.prototype._computeInFlowHeight):
(BlockFormattingContext.prototype._horizontalConstraint):
(BlockFormattingContext.prototype._contentHeight):
(BlockFormattingContext.prototype._adjustBottomWithFIXME):
(BlockFormattingContext.prototype._computeInFlowPositionedPosition):
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext.prototype.computePosition):
(FloatingContext.prototype._positionForClear):
(FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
(FloatingContext.prototype._availableSpace):
(FloatingContext.prototype._adjustedFloatingPosition):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext):
(FormattingContext.prototype.absoluteMarginBox):
(FormattingContext.prototype.absoluteBorderBox):
(FormattingContext.prototype.absolutePaddingBox):
(FormattingContext.prototype.absoluteContentBox):
(FormattingContext.prototype._toAbsolutePosition):
(FormattingContext.prototype._toRootAbsolutePosition):
(FormattingContext.prototype._addToLayoutQueue):
(FormattingContext.prototype.displayBox):
(FormattingContext.prototype._createDisplayBox): Deleted.
(FormattingContext.prototype.toDisplayBox): Deleted.
(FormattingContext.prototype.toLayoutBox): Deleted.
* LayoutReloaded/FormattingState/FormattingState.js:
(FormattingState):
(FormattingState.prototype.createDisplayBox):
(FormattingState.prototype.displayBox):
2018-03-20 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Introduce FormattingState (Block/Inline/etc)
https://bugs.webkit.org/show_bug.cgi?id=183777
Reviewed by Antti Koivisto.
This is in preparation for moving out states from the formatting contexts.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext):
(FormattingContext.prototype.layoutState):
(FormattingContext.prototype.layoutContext):
(FormattingContext.prototype.layout):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext):
* LayoutReloaded/FormattingState/BlockFormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
(BlockFormattingState):
* LayoutReloaded/FormattingState/FormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
(FormattingState):
(FormattingState.prototype.formattingContext):
(FormattingState.prototype.layoutContext):
(FormattingState.prototype._setFormattingContext):
* LayoutReloaded/FormattingState/InlineFormattingState.js: Copied from Tools/LayoutReloaded/LayoutContext.js.
(InlineFormattingState):
* LayoutReloaded/LayoutContext.js:
(LayoutContext):
(LayoutContext.prototype.layout):
(LayoutContext.prototype._createFormattingState):
(LayoutContext.prototype._createFormattingContext): Deleted.
* LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
* LayoutReloaded/test/index.html:
2018-03-19 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Layout.Box should not create the formatting context.
https://bugs.webkit.org/show_bug.cgi?id=183766
Reviewed by Antti Koivisto.
Since the formattingContext's lifetime is tied to the layout, the LayoutContext
should construct it instead.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext):
(BlockFormattingContext.prototype.layout):
(BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
(BlockFormattingContext.prototype._contentHeight):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext):
(FormattingContext.prototype.layoutContext):
(FormattingContext.prototype.toDisplayBox):
(FormattingContext.prototype._outOfFlowDescendants):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext):
(InlineFormattingContext.prototype.layout):
* LayoutReloaded/Layout.js:
(layout):
* LayoutReloaded/LayoutContext.js:
(LayoutContext.prototype.layout):
(LayoutContext.prototype._createFormattingContext):
(LayoutContext):
(LayoutContext.prototype.layoutFormattingContext): Deleted.
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box):
(Layout.Box.prototype.establishedFormattingContext): Deleted.
* LayoutReloaded/misc/headers/Box.h:
2018-03-19 Chris Dumez <cdumez@apple.com>
Have one service worker process per security origin
https://bugs.webkit.org/show_bug.cgi?id=183600
<rdar://problem/35280128>
Reviewed by Brady Eidson.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2018-03-19 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Remove border/padding/contentBox() functions from Layout.Box
https://bugs.webkit.org/show_bug.cgi?id=183761
Reviewed by Antti Koivisto.
Display.Box has them.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._computeOutOfFlowWidth):
(BlockFormattingContext.prototype._computeOutOfFlowHeight):
(BlockFormattingContext.prototype._horizontalConstraint):
(BlockFormattingContext.prototype._contentHeight):
(BlockFormattingContext.prototype._adjustBottomWithFIXME):
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext.prototype._availableSpace):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype.absoluteBorderBox):
(FormattingContext.prototype.absolutePaddingBox):
(FormattingContext.prototype.absoluteContentBox):
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.isDescendantOf):
(Layout.Box):
(Layout.Box.prototype.borderBox): Deleted.
(Layout.Box.prototype.paddingBox): Deleted.
(Layout.Box.prototype.contentBox): Deleted.
2018-03-19 Jiewen Tan <jiewen_tan@apple.com>
Unreviewed, another quick fix for r229699
Restricts ENABLE_WEB_AUTHN to only macOS and iOS.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
* TestWebKitAPI/Tests/ios/LocalAuthenticator.mm:
2018-03-19 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Move statically positioned absolute box positioning to _computeOutOfFlowPosition
https://bugs.webkit.org/show_bug.cgi?id=183750
Reviewed by Antti Koivisto.
* LayoutReloaded/DisplayTree/Box.js:
(Display.Box.prototype.setTop):
(Display.Box.prototype.paddingBox):
(Display.Box.prototype.contentBox):
(Display.Box):
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._computeStaticPosition):
(BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype.absoluteMarginBox):
(FormattingContext.prototype.absoluteBorderBox):
(FormattingContext.prototype.absolutePaddingBox):
(FormattingContext.prototype.absoluteContentBox):
(FormattingContext.prototype._toAbsolutePosition):
(FormattingContext.prototype._toRootAbsolutePosition):
(FormattingContext.prototype.toDisplayBox):
* LayoutReloaded/LayoutTree/InitialBlockContainer.js:
(Layout.InitialBlockContainer.prototype.establishesBlockFormattingContext):
(Layout.InitialBlockContainer):
(Layout.InitialBlockContainer.prototype.paddingBox): Deleted.
(Layout.InitialBlockContainer.prototype.contentBox): Deleted.
* LayoutReloaded/Utils.js:
(Utils.isStaticallyPositioned):
2018-03-19 Chris Dumez <cdumez@apple.com>
WebKit.WebsitePoliciesAutoplayQuirks API test times out with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183702
<rdar://problem/38566060>
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[AsyncAutoplayPoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[AsyncAutoplayPoliciesDelegate _webView:handleAutoplayEvent:withFlags:]):
(TEST):
2018-03-19 Daniel Bates <dabates@apple.com>
test-webkitpy no longer runs WebKit2 tests
https://bugs.webkit.org/show_bug.cgi?id=183724
Reviewed by Alexey Proskuryakov.
The WebKit2 tests have seen been moved from Source/WebKit2/Scripts/webkit2 to Source/WebKit/Scripts/webkit.
* Scripts/webkitpy/test/main.py:
(main):
2018-03-19 Daniel Bates <dabates@apple.com>
Make run-webkit-app work for non-GUI apps
https://bugs.webkit.org/show_bug.cgi?id=183701
Reviewed by Lucas Forschler.
Launch the app directly if it is an executable file. Otherwise, assume it is an app bundle
and launch it using open(1) as we currently do.
Note that open(1) is meant for launching GUI apps. Standard output and standard error are
not sent to the tty when using open(1) to launch a non-GUI app.
* Scripts/run-webkit-app: We make the assumption that
* Scripts/webkitdirs.pm:
- Define and export constant DO_NOT_USE_OPEN_COMMAND.
2018-03-19 Daniel Bates <dabates@apple.com>
run-webkit-app -g does not work
https://bugs.webkit.org/show_bug.cgi?id=183699
Reviewed by Lucas Forschler.
Check for the optional command line argument -g/--guard-malloc before taking the
first argument passed to be the path to the app to run.
* Scripts/run-webkit-app:
2018-03-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r229689.
https://bugs.webkit.org/show_bug.cgi?id=183735
Causes fast/loader/inner-iframe-loads-data-url-into-parent-on-
unload-crash.html to fail with async delegates (Requested by
cdumez_ on #webkit).
Reverted changeset:
"WebKit.WebsitePoliciesAutoplayQuirks API test times out with
async policy delegates"
https://bugs.webkit.org/show_bug.cgi?id=183702
https://trac.webkit.org/changeset/229689
2018-03-18 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Remove left/right width/height getters from Layout.Box
https://bugs.webkit.org/show_bug.cgi?id=183734
Reviewed by Antti Koivisto.
...and use Display.Box instead.
* LayoutReloaded/DisplayTree/Box.js:
(Display.Box.prototype.bottomRight):
(Display.Box.prototype.size):
(Display.Box.prototype.height):
(Display.Box.prototype.width):
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._computeStaticPosition):
(BlockFormattingContext.prototype._adjustBottomWithFIXME):
(BlockFormattingContext.prototype._computeInFlowPositionedPosition):
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext.prototype._positionForClear):
(FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
(FloatingContext.prototype._adjustedFloatingPosition):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype.absoluteMarginBox):
(FormattingContext.prototype.absoluteBorderBox):
(FormattingContext.prototype.absolutePaddingBox):
(FormattingContext.prototype.absoluteContentBox):
(FormattingContext.prototype._toAbsolutePosition):
(FormattingContext.prototype._toRootAbsolutePosition):
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.rect): Deleted.
(Layout.Box.prototype.topLeft): Deleted.
(Layout.Box.prototype.bottomRight): Deleted.
* LayoutReloaded/Utils.js:
(Utils._dumpBox):
(Utils.mapToContainer): Deleted.
2018-03-18 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Remove left/right width/height setters from Layout.Box
https://bugs.webkit.org/show_bug.cgi?id=183731
Reviewed by Antti Koivisto.
...and use Display.Box instead.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._computeStaticPosition):
(BlockFormattingContext.prototype._computeOutOfFlowWidth):
(BlockFormattingContext.prototype._computeFloatingWidth):
(BlockFormattingContext.prototype._computeInFlowWidth):
(BlockFormattingContext.prototype._computeOutOfFlowHeight):
(BlockFormattingContext.prototype._computeFloatingHeight):
(BlockFormattingContext.prototype._computeInFlowHeight):
(BlockFormattingContext.prototype._computeInFlowPositionedPosition):
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext.prototype.computePosition):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype._toDisplayBox):
(FormattingContext.prototype._toLayoutBox):
* LayoutReloaded/Layout.js:
(layout):
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.setTopLeft): Deleted.
(Layout.Box.prototype.setSize): Deleted.
(Layout.Box.prototype.setWidth): Deleted.
(Layout.Box.prototype.setHeight): Deleted.
2018-03-18 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Collect out-of-flow positioned boxes for a given formatting context.
https://bugs.webkit.org/show_bug.cgi?id=183730
Reviewed by Antti Koivisto.
Collect and layout out-of-flow positioned boxes as the final step of the formatting context layout.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype.layout):
(BlockFormattingContext.prototype._placeInFlowPositionedChildren):
(BlockFormattingContext.prototype._layoutOutOfFlowDescendants):
(BlockFormattingContext.prototype._placePositionedDescendants): Deleted.
(BlockFormattingContext.prototype._placeOutOfFlowDescendants): Deleted.
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype._toAbsolutePosition):
(FormattingContext.prototype._outOfFlowDescendants):
(FormattingContext):
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.nextInFlowOrFloatSibling):
(Layout.Box.prototype.isDescendantOf):
* LayoutReloaded/LayoutTree/Container.js:
(Layout.Container.prototype.firstInFlowOrFloatChild):
(Layout.Container.prototype.hasInFlowOrFloatChild):
(Layout.Container.prototype.outOfFlowDescendants):
(Layout.Container):
* LayoutReloaded/Utils.js:
(Utils.isDescendantOf): Deleted.
(Utils.collectOutOfFlowDescendants): Deleted.
2018-03-17 Jiewen Tan <jiewen_tan@apple.com>
[WebAuthN] Implement authenticatorMakeCredential
https://bugs.webkit.org/show_bug.cgi?id=183527
<rdar://problem/35275886>
Reviewed by Brent Fulgham.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/LocalAuthenticator.mm: Added.
(TestWebKitAPI::getTestKey):
(TestWebKitAPI::cleanUpKeychain):
(TestWebKitAPI::LACantEvaluatePolicySwizzler::LACantEvaluatePolicySwizzler):
(TestWebKitAPI::LACantEvaluatePolicySwizzler::cantEvaluatePolicy):
(TestWebKitAPI::LACanEvaluatePolicySwizzler::LACanEvaluatePolicySwizzler):
(TestWebKitAPI::LACanEvaluatePolicySwizzler::canEvaluatePolicy):
(TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::LAEvaluatePolicyFailedSwizzler):
(TestWebKitAPI::LAEvaluatePolicyFailedSwizzler::evaluatePolicyFailed):
(TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::LAEvaluatePolicyPassedSwizzler):
(TestWebKitAPI::LAEvaluatePolicyPassedSwizzler::evaluatePolicyPassed):
(TestWebKitAPI::TestLocalAuthenticator::setFailureFlag):
(TestWebKitAPI::TEST):
2018-03-17 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] BlockFormattingContext::placePositionedDescendants takes care of both in- and out-of-flow placement
https://bugs.webkit.org/show_bug.cgi?id=183727
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype.layout):
(BlockFormattingContext.prototype._placePositionedDescendants):
(BlockFormattingContext.prototype._placeInFlowPositionedChildren):
(BlockFormattingContext.prototype._placeOutOfFlowDescendants):
* LayoutReloaded/test/absolute-position-when-containing-block-is-not-in-the-formatting-context.html: Added.
* LayoutReloaded/test/absolute-position-when-containing-block-is-not-in-the-formatting-context2.html: Added.
* LayoutReloaded/test/index.html:
* LayoutReloaded/test/relative-position-when-containing-block-is-not-in-the-formatting-context.html: Added.
2018-03-17 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Ensure that positioning happens within the formatting context
https://bugs.webkit.org/show_bug.cgi?id=183722
Reviewed by Antti Koivisto.
All sizing and positioning need to happen in the formatting context that the box lives in
including the final position of in- and out-of-flow descendants.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype.layout):
(BlockFormattingContext.prototype._placeInFlowPositionedChildren):
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.establishesBlockFormattingContext):
(Layout.Box.prototype.isPositioned):
(Layout.Box.prototype.isRelativelyPositioned):
(Layout.Box.prototype.isAbsolutelyPositioned):
(Layout.Box.prototype.isOutOfFlowPositioned):
(Layout.Box.prototype.containingBlock):
(Layout.Box.prototype.isRelativePositioned): Deleted.
(Layout.Box.prototype.isAbsolutePositioned): Deleted.
* LayoutReloaded/Utils.js:
(Utils.isRelativelyPositioned):
(Utils.isAbsolutelyPositioned):
(Utils.isRelativePositioned): Deleted.
(Utils.isAbsolutePositioned): Deleted.
* LayoutReloaded/misc/headers/Box.h:
2018-03-16 Wenson Hsieh <wenson_hsieh@apple.com>
Unreviewed, rolling out r229688.
There's a solution that doesn't require this SPI.
Reverted changeset:
"Add SPI to expose width and height anchors for WKWebView's
content view"
https://bugs.webkit.org/show_bug.cgi?id=183711
https://trac.webkit.org/changeset/229688
2018-03-16 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Move move functions to the base class from BlockFormattingContext
https://bugs.webkit.org/show_bug.cgi?id=183719
Reviewed by Antti Koivisto.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext):
(BlockFormattingContext.prototype.layout):
(BlockFormattingContext.prototype._shrinkToFitWidth):
(BlockFormattingContext.prototype._toAbsolutePosition): Deleted.
(BlockFormattingContext.prototype._needsLayout): Deleted.
(BlockFormattingContext.prototype._addToLayoutQueue): Deleted.
(BlockFormattingContext.prototype._nextInLayoutQueue): Deleted.
(BlockFormattingContext.prototype._removeFromLayoutQueue): Deleted.
(BlockFormattingContext.prototype._createDisplayBox): Deleted.
(BlockFormattingContext.prototype._toDisplayBox): Deleted.
(BlockFormattingContext.prototype._toLayoutBox): Deleted.
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext):
(FormattingContext.prototype._toAbsolutePosition):
(FormattingContext.prototype._descendantNeedsLayout):
(FormattingContext.prototype._addToLayoutQueue):
(FormattingContext.prototype._nextInLayoutQueue):
(FormattingContext.prototype._removeFromLayoutQueue):
(FormattingContext.prototype._createDisplayBox):
(FormattingContext.prototype._toDisplayBox):
(FormattingContext.prototype._toLayoutBox):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype.layout):
2018-03-16 Chris Dumez <cdumez@apple.com>
WebKit.WebsitePoliciesAutoplayQuirks API test times out with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183702
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[AsyncAutoplayPoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[AsyncAutoplayPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[AsyncAutoplayPoliciesDelegate _webView:handleAutoplayEvent:withFlags:]):
(TEST):
2018-03-16 Wenson Hsieh <wenson_hsieh@apple.com>
Add SPI to expose width and height anchors for WKWebView's content view
https://bugs.webkit.org/show_bug.cgi?id=183711
<rdar://problem/38562899>
Reviewed by Tim Horton.
Adds an API test exercising the new SPI.
* TestWebKitAPI/Tests/WebKitCocoa/AutoLayoutIntegration.mm:
(checkCGRect):
(TEST):
2018-03-16 Chris Dumez <cdumez@apple.com>
WebKit.RestoreSessionStateContainingScrollRestorationDefault API test is failing with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183679
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKit/RestoreSessionState.cpp:
(TestWebKitAPI::decidePolicyForNavigationAction):
(TestWebKitAPI::decidePolicyForResponse):
(TestWebKitAPI::TEST):
2018-03-16 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Introduce Display.Box
https://bugs.webkit.org/show_bug.cgi?id=183700
Reviewed by Antti Koivisto.
Display.Box objects will end up in the display(box) tree. Currently
they are just hanging off of the Layout.Box objects.
* LayoutReloaded/DisplayTree/Box.js: Added.
(Display.Box):
(Display.Box.prototype.rect):
(Display.Box.prototype.top):
(Display.Box.prototype.left):
(Display.Box.prototype.bottom):
(Display.Box.prototype.right):
(Display.Box.prototype.topLeft):
(Display.Box.prototype.bottomRight):
(Display.Box.prototype.setTopLeft):
(Display.Box.prototype.setSize):
(Display.Box.prototype.setWidth):
(Display.Box.prototype.setHeight):
(Display.Box.prototype.borderBox):
(Display.Box.prototype.paddingBox):
(Display.Box.prototype.contentBox):
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext):
(BlockFormattingContext.prototype.layout):
(BlockFormattingContext.prototype._toAbsolutePosition):
(BlockFormattingContext.prototype._needsLayout):
(BlockFormattingContext.prototype._addToLayoutQueue):
(BlockFormattingContext.prototype._nextInLayoutQueue):
(BlockFormattingContext.prototype._removeFromLayoutQueue):
(BlockFormattingContext.prototype._createDisplayBox):
(BlockFormattingContext.prototype._toDisplayBox):
(BlockFormattingContext.prototype._toLayoutBox):
* LayoutReloaded/Layout.js:
(layout):
* LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box):
(Layout.Box.prototype.setDisplayBox):
(Layout.Box.prototype.displayBox):
(Layout.Box.prototype.rect):
(Layout.Box.prototype.setTopLeft):
(Layout.Box.prototype.setSize):
(Layout.Box.prototype.setWidth):
(Layout.Box.prototype.setHeight):
(Layout.Box.prototype.borderBox):
(Layout.Box.prototype.paddingBox):
(Layout.Box.prototype.contentBox):
* LayoutReloaded/test/index.html:
2018-03-16 Chris Dumez <cdumez@apple.com>
URLSchemeHandler.Basic API test fails with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183678
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm:
(-[URLSchemeHandlerAsyncNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[URLSchemeHandlerAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
(TEST):
2018-03-16 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Utils.computed* functions should just take node instead of box.
https://bugs.webkit.org/show_bug.cgi?id=183697
Reviewed by Antti Koivisto.
This is in preparation for introducing the display tree.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._computeOutOfFlowWidth):
(BlockFormattingContext.prototype._computeFloatingWidth):
(BlockFormattingContext.prototype._computeInFlowWidth):
(BlockFormattingContext.prototype._computeOutOfFlowHeight):
(BlockFormattingContext.prototype._computeFloatingHeight):
(BlockFormattingContext.prototype._computeInFlowHeight):
(BlockFormattingContext.prototype._shrinkToFitWidth):
* LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
(BlockMarginCollapse._nonCollapsedMarginTop):
(BlockMarginCollapse._nonCollapsedMarginBottom):
(BlockMarginCollapse._collapsedMarginTopFromFirstChild):
(BlockMarginCollapse._collapsedMarginBottomFromLastChild):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype.marginTop):
(FormattingContext.prototype.marginLeft):
(FormattingContext.prototype.marginBottom):
(FormattingContext.prototype.marginRight):
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.paddingBox):
(Layout.Box.prototype.contentBox):
(Layout.Box):
* LayoutReloaded/Utils.js:
(Utils.computedMarginTop):
(Utils.computedMarginLeft):
(Utils.computedMarginBottom):
(Utils.computedMarginRight):
(Utils.computedBorderTopLeft):
(Utils.computedBorderBottomRight):
(Utils.computedPaddingTopLeft):
(Utils.computedPaddingBottomRight):
(Utils.computedBorderAndPaddingTop):
(Utils.computedBorderAndPaddingLeft):
(Utils.computedBorderAndPaddingBottom):
(Utils.computedBorderAndPaddingRight):
(Utils.computedHorizontalBorderAndPadding):
(Utils.computedVerticalBorderAndPadding):
(Utils.computedLineHeight):
(Utils.hasClearLeft):
(Utils.hasClearRight):
(Utils.hasClearBoth):
2018-03-15 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Should never need to go beyond the root container when asking for the containing block.
https://bugs.webkit.org/show_bug.cgi?id=183691
Reviewed by Antti Koivisto.
While laying out the boxes in a block formatting context, if we happen to need
to get to the containing block of a box to compute geometry, it should always be a
descendant of the root container (or the root container itself).
Nothing outside of the formatting context should be able to impact the boxes inside.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
(BlockFormattingContext.prototype._toAbsolutePosition):
(BlockFormattingContext):
* LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
(BlockMarginCollapse._isMarginTopCollapsedWithParent):
(BlockMarginCollapse._isMarginBottomCollapsedWithParent):
* LayoutReloaded/LayoutTree/Box.js:
(Layout.Box.prototype.isRootBox):
(Layout.Box.prototype.isRootElement): Deleted.
* LayoutReloaded/Utils.js:
(Utils.isDescendantOf):
(Utils.mapStaticToAbsolute): Deleted.
* LayoutReloaded/misc/headers/Box.h:
2018-03-15 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS WK2] Hit-testing fails when specifying a large top content inset
https://bugs.webkit.org/show_bug.cgi?id=183648
<rdar://problem/38421894>
Reviewed by Tim Horton.
Adds four new API tests to verify that adding top or bottom content insets to the WKWebView's scroll view does
not cause the DOMWindow's innerHeight to shrink. Currently, doing so would cause the innerHeight to be reported
as (viewHeight - inset.top) or (viewHeight - inset.bottom).
See WebKit ChangeLog for more details.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/ScrollViewInsetTests.mm: Added.
(TestWebKitAPI::TEST):
2018-03-15 Aakash Jain <aakash_jain@apple.com>
Add unit-test for NetworkTransaction URLError handling
https://bugs.webkit.org/show_bug.cgi?id=183664
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/common/net/networktransaction_unittest.py:
(NetworkTransactionTest._raise_URLError): Method to raise URLError.
(NetworkTransactionTest.test_retry_on_HTTPError): Renamed from test_retry.
(NetworkTransactionTest.test_retry_on_URLError): unit-test for testing URLError handling.
2018-03-15 Aakash Jain <aakash_jain@apple.com>
EWS should print the URL in logs on URLError
https://bugs.webkit.org/show_bug.cgi?id=183651
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla.open_url): Pass the url.
* Scripts/webkitpy/common/net/networktransaction.py:
(NetworkTransaction.run): Accept optional url parameter and print it on URLError.
2018-03-15 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Introduce Layout namespace
https://bugs.webkit.org/show_bug.cgi?id=183659
Reviewed by Antti Koivisto.
This is in preparation for introducing the display tree.
Box -> Layout.Box
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype.layout):
(BlockFormattingContext.prototype.computeWidth):
(BlockFormattingContext.prototype.computeHeight):
(BlockFormattingContext.prototype.marginTop):
(BlockFormattingContext.prototype.marginBottom):
(BlockFormattingContext.prototype._computeStaticPosition):
(BlockFormattingContext.prototype._placeInFlowPositionedChildren):
(BlockFormattingContext.prototype._placeOutOfFlowDescendants):
(BlockFormattingContext.prototype._computeOutOfFlowWidth):
(BlockFormattingContext.prototype._computeFloatingWidth):
(BlockFormattingContext.prototype._computeInFlowWidth):
(BlockFormattingContext.prototype._computeOutOfFlowHeight):
(BlockFormattingContext.prototype._computeFloatingHeight):
(BlockFormattingContext.prototype._computeInFlowHeight):
(BlockFormattingContext.prototype._horizontalConstraint):
(BlockFormattingContext.prototype._contentHeight):
(BlockFormattingContext.prototype._adjustBottomWithFIXME):
(BlockFormattingContext.prototype._computeInFlowPositionedPosition):
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
(BlockFormattingContext.prototype._shrinkToFitWidth):
(BlockFormattingContext):
(BlockFormattingContext.prototype._computeHorizontalConstraint): Deleted.
(BlockFormattingContext.prototype._computeContentHeight): Deleted.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js:
(BlockMarginCollapse.marginTop):
(BlockMarginCollapse.marginBottom):
(BlockMarginCollapse._isMarginTopCollapsedWithSibling):
(BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
(BlockMarginCollapse._isMarginTopCollapsedWithParent):
(BlockMarginCollapse._isMarginBottomCollapsedWithParent):
(BlockMarginCollapse._nonCollapsedMarginTop):
(BlockMarginCollapse._nonCollapsedMarginBottom):
(BlockMarginCollapse._collapsedMarginTopFromFirstChild):
(BlockMarginCollapse._collapsedMarginBottomFromLastChild):
(BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
(BlockMarginCollapse):
* LayoutReloaded/FormattingContext/FloatingContext.js:
(FloatingContext.prototype.computePosition):
(FloatingContext.prototype._positionForClear):
(FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
* LayoutReloaded/FormattingContext/FormattingContext.js:
(FormattingContext.prototype.computeWidth):
(FormattingContext.prototype.computeHeight):
(FormattingContext.prototype.marginTop):
(FormattingContext.prototype.marginLeft):
(FormattingContext.prototype.marginBottom):
(FormattingContext.prototype.marginRight):
(FormattingContext.prototype.absoluteMarginBox):
(FormattingContext.prototype.absoluteBorderBox):
(FormattingContext.prototype.absolutePaddingBox):
(FormattingContext.prototype.absoluteContentBox):
(FormattingContext):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext.prototype.layout):
* LayoutReloaded/LayoutTree/BlockContainer.js:
(BlockContainer): Deleted.
(BlockContainer.prototype.establishesInlineFormattingContext): Deleted.
* LayoutReloaded/LayoutTree/Box.js:
(Box): Deleted.
(Box.prototype.id): Deleted.
(Box.prototype.setRendererName): Deleted.
(Box.prototype.name): Deleted.
(Box.prototype.node): Deleted.
(Box.prototype.parent): Deleted.
(Box.prototype.nextSibling): Deleted.
(Box.prototype.nextInFlowSibling): Deleted.
(Box.prototype.previousSibling): Deleted.
(Box.prototype.previousInFlowSibling): Deleted.
(Box.prototype.setParent): Deleted.
(Box.prototype.setNextSibling): Deleted.
(Box.prototype.setPreviousSibling): Deleted.
(Box.prototype.rect): Deleted.
(Box.prototype.topLeft): Deleted.
(Box.prototype.bottomRight): Deleted.
(Box.prototype.setTopLeft): Deleted.
(Box.prototype.setSize): Deleted.
(Box.prototype.setWidth): Deleted.
(Box.prototype.setHeight): Deleted.
(Box.prototype.isContainer): Deleted.
(Box.prototype.isBlockLevelBox): Deleted.
(Box.prototype.isBlockContainerBox): Deleted.
(Box.prototype.isInlineLevelBox): Deleted.
(Box.prototype.setIsAnonymous): Deleted.
(Box.prototype.isAnonymous): Deleted.
(Box.prototype.establishesFormattingContext): Deleted.
(Box.prototype.establishedFormattingContext): Deleted.
(Box.prototype.establishesBlockFormattingContext): Deleted.
(Box.prototype.establishesInlineFormattingContext): Deleted.
(Box.prototype.isPositioned): Deleted.
(Box.prototype.isRelativePositioned): Deleted.
(Box.prototype.isAbsolutePositioned): Deleted.
(Box.prototype.isFixedPositioned): Deleted.
(Box.prototype.isInFlow): Deleted.
(Box.prototype.isOutOfFlowPositioned): Deleted.
(Box.prototype.isInFlowPositioned): Deleted.
(Box.prototype.isFloatingPositioned): Deleted.
(Box.prototype.isFloatingOrOutOfFlowPositioned): Deleted.
(Box.prototype.isRootElement): Deleted.
(Box.prototype.containingBlock): Deleted.
(Box.prototype.borderBox): Deleted.
(Box.prototype.paddingBox): Deleted.
(Box.prototype.contentBox): Deleted.
* LayoutReloaded/LayoutTree/Container.js:
(Container): Deleted.
(Container.prototype.isContainer): Deleted.
(Container.prototype.setFirstChild): Deleted.
(Container.prototype.setLastChild): Deleted.
(Container.prototype.firstChild): Deleted.
(Container.prototype.firstInFlowChild): Deleted.
(Container.prototype.lastChild): Deleted.
(Container.prototype.lastInFlowChild): Deleted.
(Container.prototype.hasChild): Deleted.
(Container.prototype.hasInFlowChild): Deleted.
* LayoutReloaded/LayoutTree/InitialBlockContainer.js:
(InitialBlockContainer): Deleted.
(InitialBlockContainer.prototype.establishesBlockFormattingContext): Deleted.
(InitialBlockContainer.prototype.paddingBox): Deleted.
(InitialBlockContainer.prototype.contentBox): Deleted.
* LayoutReloaded/LayoutTree/InlineBox.js:
(InlineBox): Deleted.
(InlineBox.prototype.setText): Deleted.
(InlineBox.prototype.text): Deleted.
* LayoutReloaded/TreeBuilder.js:
(TreeBuilder.prototype.createTree):
(TreeBuilder.prototype._createAndAttachBox):
* LayoutReloaded/Utils.js:
(Utils._dumpBox):
2018-03-14 Chris Fleizach <cfleizach@apple.com>
AX: Implement accessible dismiss action on iOS
https://bugs.webkit.org/show_bug.cgi?id=183352
<rdar://problem/38161500>
Reviewed by Zalan Bujtas.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::dismiss const):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::dismiss):
2018-03-14 Youenn Fablet <youenn@apple.com>
Update libwebrtc up to 36af4e9614f707f733eb2340fae66d6325aaac5b
https://bugs.webkit.org/show_bug.cgi?id=183481
Reviewed by Eric Carlson.
* Scripts/webkitpy/style/checker.py: Do not check style.
2018-03-14 Brendan McLoughlin <brendan@bocoup.com>
Add label on github when exporting wpt tests to w3c/web-platform-test repo
https://bugs.webkit.org/show_bug.cgi?id=183575
Reviewed by Youenn Fablet.
* Scripts/webkitpy/w3c/test_exporter.py:
(TestExporter.make_pull_request):
(parse_args):
* Scripts/webkitpy/w3c/test_exporter_unittest.py:
(TestExporterTest.test_export):
2018-03-14 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Add InlineBox dump
https://bugs.webkit.org/show_bug.cgi?id=183625
Reviewed by Antti Koivisto.
Right now line boxes live off of the inline formatting context but that's temporary and
they will be moved over to the BoxTree.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js:
(BlockFormattingContext.prototype._computeContentHeight):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js:
(InlineFormattingContext):
(InlineFormattingContext.prototype.lines):
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleText):
(InlineFormattingContext.prototype._commitLine):
(InlineFormattingContext.prototype._initializeLine):
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js:
(Line):
(Line.prototype.isEmpty):
(Line.prototype.rect):
(Line.prototype.lineBoxes):
(Line.prototype.addLineBox):
(Line.prototype.appendFragment): Deleted.
* LayoutReloaded/README.md:
* LayoutReloaded/Utils.js:
(Utils.computedLineHeight):
(Utils.isBlockContainerElement):
(Utils.textHeight):
(Utils._dumpBox):
(Utils._dumpLines.):
(Utils._dumpLines):
(Utils._dumpTree):
(Utils.precisionRound):
(Utils):
* LayoutReloaded/misc/LayoutReloadedWebKit.patch:
* LayoutReloaded/test/index.html:
2018-03-14 Tim Horton <timothy_horton@apple.com>
Fix the build after r229567
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-03-13 Jer Noble <jer.noble@apple.com>
[iOS] Muted media playback can interrupt out-of-process audio
https://bugs.webkit.org/show_bug.cgi?id=183606
<rdar://problem/37466253>
Reviewed by Eric Carlson.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitLegacy/ios/AudioSessionCategoryIOS.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitLegacy/ios/video-with-paused-audio-and-playing-muted.html: Added.
2018-03-13 Ross Kirsling <ross.kirsling@sony.com>
[Win] Layout Test fast/html/menuitem-element.html is failing.
https://bugs.webkit.org/show_bug.cgi?id=179299
Reviewed by Per Arne Vollan.
* DumpRenderTree/win/DumpRenderTree.cpp:
(setWebPreferencesForTestOptions):
Recognize test option "enableMenuItemElement".
2018-03-12 Tim Horton <timothy_horton@apple.com>
Stop using SDK conditionals to control feature definitions
https://bugs.webkit.org/show_bug.cgi?id=183430
<rdar://problem/38251619>
Reviewed by Dan Bernstein.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
* TestWebKitAPI/Configurations/WebKitTargetConditionals.xcconfig: Renamed.
2018-03-12 Ross Kirsling <ross.kirsling@sony.com>
[DRT] TestOptions should not be ObjC.
https://bugs.webkit.org/show_bug.cgi?id=183487
Reviewed by Per Arne Vollan.
* DumpRenderTree/CMakeLists.txt:
* DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj:
* DumpRenderTree/PlatformMac.cmake:
Move TestOptions to platform-agnostic sources.
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestOptions.cpp: Renamed from Tools/DumpRenderTree/TestOptions.mm.
* DumpRenderTree/mac/DumpRenderTree.mm:
Remove NSURL dependency and align with WTR as much as possible.
* DumpRenderTree/win/DumpRenderTree.cpp:
Consume TestOptions (recognizing just the ones that have WebPreferences defined for now).
2018-03-12 Yoav Weiss <yoav@yoav.ws>
Runtime flag for link prefetch and remove link subresource.
https://bugs.webkit.org/show_bug.cgi?id=183540
Reviewed by Chris Dumez.
Remove the LINK_PREFETCH build time flag.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-03-12 Wenson Hsieh <wenson_hsieh@apple.com>
REGRESSION(r211643): Dismissing WKActionSheet should not also dismiss its presenting view controller
https://bugs.webkit.org/show_bug.cgi?id=183549
<rdar://problem/34960698>
Reviewed by Andy Estes.
Add TestWebKitAPI support for testing WKWebViews embedded within presented view controllers, and use this to
check that dismissing an action sheet does not additionally cause the view controller being used to present the
web view to also dismiss.
* TestWebKitAPI/ClassMethodSwizzler.h: Added.
* TestWebKitAPI/ClassMethodSwizzler.mm: Added.
(TestWebKitAPI::ClassMethodSwizzler::ClassMethodSwizzler):
(TestWebKitAPI::ClassMethodSwizzler::~ClassMethodSwizzler):
Add ClassMethodSwizzler, an RAII which swizzles an Objective-C class method over its lifetime.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
Add a new API test that loads a view controller which embeds a WKWebView, and verifies that presenting and then
dismissing an action sheet from that web view does not cause the view controller to also dismiss.
(TestWebKitAPI::setOverrideViewControllerForFullscreenPresentation):
(TestWebKitAPI::overrideViewControllerForFullscreenPresentation):
Mock +[UIViewController _viewControllerForFullScreenPresentationFromView:] to return the web view. This works
around the fact that TestWebKitAPI is not a UI application, so certain pieces of UIKit API and SPI need to be
stubbed or mocked to simulate being a UI application. We can remove these workarounds once
https://webkit.org/b/175204 is addressed, and TestWebKitAPI becomes a UI application that can actually maintain
a root view controller and key window.
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView initWithFrame:configuration:addToWindow:]):
Add a new initializer for TestWKWebView that doesn't force the view to be hosted within a UIWindow. This is used
by TestWKWebViewController to create a TestWKWebView in -loadView.
* TestWebKitAPI/ios/TestWKWebViewController.h: Added.
* TestWebKitAPI/ios/TestWKWebViewController.mm: Added.
(-[TestWKWebViewControllerWindow _beginKeyWindowDeferral]):
(-[TestWKWebViewControllerWindow _endKeyWindowDeferral]):
Stub out these methods to prevent UIKit from hitting assertions when making this UIWindow the key window. This
can also be removed once TestWebKitAPI is a UI application.
(-[TestWKWebViewController initWithFrame:configuration:]):
(-[TestWKWebViewController loadView]):
(-[TestWKWebViewController webView]):
(-[TestWKWebViewController dismissViewControllerAnimated:completion:]):
(-[TestWKWebViewController dismissalHandler]):
(-[TestWKWebViewController setDismissalHandler:]):
Add a UIViewController helper subclass whose -view is a WKWebView. The new API test presents this view
controller. Tests may also provide a dismissalHandler, which is invoked when the view controller is being
dismissed. The new API test uses this hook to verify that the view controller containing the web view isn't also
dismissed after the action sheet goes away.
* TestWebKitAPI/ios/UIKitSPI.h:
2018-03-12 Basuke Suzuki <Basuke.Suzuki@sony.com>
[webkitpy] Remove openssl command dependency.
https://bugs.webkit.org/show_bug.cgi?id=183494
Reviewed by Ryosuke Niwa.
Added Python implementation of PEM file perser and switched to use that
from external `openssl` command.
* Scripts/webkitpy/common/system/pemfile.py: Added.
(load):
(BadFormatError):
(Pem):
(Pem.__init__):
(Pem.get):
(Pem.get_all):
(Pem.certificate):
(Pem.private_key):
(Pem.csr):
(Pem.certificate_request):
(Pem.certificate_signing_request):
(_parse_pem_format):
(_parse_pem_format.find_begin):
(_parse_pem_format.find_end):
(_parse_pem_format.sections):
* Scripts/webkitpy/common/system/pemfile_unittest.py: Added.
(PemFileTest):
(PemFileTest.test_parse):
(PemFileTest.test_parse_bad_format):
* Scripts/webkitpy/port/base.py:
(Port.start_websocket_server):
(Port._extract_certificate_from_pem): Deleted.
(Port._extract_private_key_from_pem): Deleted.
2018-03-12 Javier Fernandez <jfernandez@igalia.com>
Remove GridLayout runtime flag
https://bugs.webkit.org/show_bug.cgi?id=183484
Reviewed by Myles C. Maxfield.
The Grid Layout feature has been enabled by default for almost a
year, so I think it's time to remove the runtime flag and the
codepath run when the feature is disabled.
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
2018-03-12 Antoine Quint <graouts@apple.com>
[Web Animations] Implement CSS Animations and CSS Transitions as Web Animations
https://bugs.webkit.org/show_bug.cgi?id=183504
<rdar://problem/38372965>
Reviewed by Jon Lee.
Add a new <!-- webkit-test-runner --> flag to enable the CSS Animations and CSS Transitions
as Web Animations runtime flag in the new tests we've created for this feature.
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestOptions.mm:
(TestOptions::TestOptions):
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
2018-03-11 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Add Line class for InlineFormattingContext -and move files around.
https://bugs.webkit.org/show_bug.cgi?id=183551
Reviewed by Wenson Hsieh.
* LayoutReloaded/FormattingContext/BlockFormatting/BlockFormattingContext.js: Renamed from Tools/LayoutReloaded/BlockFormattingContext.js.
(BlockFormattingContext):
(BlockFormattingContext.prototype.layout):
(BlockFormattingContext.prototype.computeWidth):
(BlockFormattingContext.prototype.computeHeight):
(BlockFormattingContext.prototype.marginTop):
(BlockFormattingContext.prototype.marginBottom):
(BlockFormattingContext.prototype._computeStaticPosition):
(BlockFormattingContext.prototype._placeInFlowPositionedChildren):
(BlockFormattingContext.prototype._placeOutOfFlowDescendants):
(BlockFormattingContext.prototype._computeOutOfFlowWidth):
(BlockFormattingContext.prototype._computeFloatingWidth):
(BlockFormattingContext.prototype._computeInFlowWidth):
(BlockFormattingContext.prototype._computeOutOfFlowHeight):
(BlockFormattingContext.prototype._computeFloatingHeight):
(BlockFormattingContext.prototype._computeInFlowHeight):
(BlockFormattingContext.prototype._computeHorizontalConstraint):
(BlockFormattingContext.prototype._computeContentHeight):
(BlockFormattingContext.prototype._computeInFlowPositionedPosition):
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
(BlockFormattingContext.prototype._shrinkToFitWidth):
* LayoutReloaded/FormattingContext/BlockFormatting/BlockMarginCollapse.js: Renamed from Tools/LayoutReloaded/BlockMarginCollapse.js.
(BlockMarginCollapse.marginTop):
(BlockMarginCollapse.marginBottom):
(BlockMarginCollapse._isMarginTopCollapsedWithSibling):
(BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
(BlockMarginCollapse._isMarginTopCollapsedWithParent):
(BlockMarginCollapse._isMarginBottomCollapsedWithParent):
(BlockMarginCollapse._nonCollapsedMarginTop):
(BlockMarginCollapse._nonCollapsedMarginBottom):
(BlockMarginCollapse._collapsedMarginTopFromFirstChild):
(BlockMarginCollapse._collapsedMarginBottomFromLastChild):
(BlockMarginCollapse._marginValue):
(BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
(BlockMarginCollapse):
* LayoutReloaded/FormattingContext/FloatingContext.js: Renamed from Tools/LayoutReloaded/FloatingContext.js.
(FloatingContext):
(FloatingContext.prototype.computePosition):
(FloatingContext.prototype.bottom):
(FloatingContext.prototype._positionForFloating):
(FloatingContext.prototype._positionForClear):
(FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
(FloatingContext.prototype._addFloating):
(FloatingContext.prototype._findInnerMostLeftAndRight):
(FloatingContext.prototype._moveToNextVerticalPosition):
(FloatingContext.prototype._availableSpace):
(FloatingContext.prototype._findFloatingAtVerticalPosition):
(FloatingContext.prototype._isEmpty):
(FloatingContext.prototype._adjustedFloatingPosition):
(FloatingContext.prototype._bottom):
(FloatingContext.prototype._formattingContext):
* LayoutReloaded/FormattingContext/FormattingContext.js: Renamed from Tools/LayoutReloaded/FormattingContext.js.
(FormattingContext):
(FormattingContext.prototype.rootContainer):
(FormattingContext.prototype.floatingContext):
(FormattingContext.prototype.layout):
(FormattingContext.prototype.computeWidth):
(FormattingContext.prototype.computeHeight):
(FormattingContext.prototype.marginTop):
(FormattingContext.prototype.marginLeft):
(FormattingContext.prototype.marginBottom):
(FormattingContext.prototype.marginRight):
(FormattingContext.prototype.absoluteMarginBox):
(FormattingContext.prototype.absoluteBorderBox):
(FormattingContext.prototype.absolutePaddingBox):
(FormattingContext.prototype.absoluteContentBox):
* LayoutReloaded/FormattingContext/InlineFormatting/InlineFormattingContext.js: Renamed from Tools/LayoutReloaded/InlineFormattingContext.js.
(InlineFormattingContext):
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleInlineBox):
(InlineFormattingContext.prototype._handleText):
(InlineFormattingContext.prototype._commitLine):
(InlineFormattingContext.prototype._line):
* LayoutReloaded/FormattingContext/InlineFormatting/Line.js: Copied from Tools/LayoutReloaded/InitialBlockContainer.js.
(Line):
(Line.prototype.isEmpty):
(Line.prototype.availableWidth):
(Line.prototype.appendFragment):
* LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata:
* LayoutReloaded/LayoutTree/BlockContainer.js: Renamed from Tools/LayoutReloaded/BlockContainer.js.
(BlockContainer):
(BlockContainer.prototype.establishesInlineFormattingContext):
* LayoutReloaded/LayoutTree/Box.js: Renamed from Tools/LayoutReloaded/Box.js.
(Box):
(Box.prototype.id):
(Box.prototype.setRendererName):
(Box.prototype.name):
(Box.prototype.node):
(Box.prototype.parent):
(Box.prototype.nextSibling):
(Box.prototype.nextInFlowSibling):
(Box.prototype.previousSibling):
(Box.prototype.previousInFlowSibling):
(Box.prototype.setParent):
(Box.prototype.setNextSibling):
(Box.prototype.setPreviousSibling):
(Box.prototype.rect):
(Box.prototype.topLeft):
(Box.prototype.bottomRight):
(Box.prototype.setTopLeft):
(Box.prototype.setSize):
(Box.prototype.setWidth):
(Box.prototype.setHeight):
(Box.prototype.isContainer):
(Box.prototype.isBlockLevelBox):
(Box.prototype.isBlockContainerBox):
(Box.prototype.isInlineLevelBox):
(Box.prototype.setIsAnonymous):
(Box.prototype.isAnonymous):
(Box.prototype.establishesFormattingContext):
(Box.prototype.establishedFormattingContext):
(Box.prototype.establishesBlockFormattingContext):
(Box.prototype.establishesInlineFormattingContext):
(Box.prototype.isPositioned):
(Box.prototype.isRelativePositioned):
(Box.prototype.isAbsolutePositioned):
(Box.prototype.isFixedPositioned):
(Box.prototype.isInFlow):
(Box.prototype.isOutOfFlowPositioned):
(Box.prototype.isInFlowPositioned):
(Box.prototype.isFloatingPositioned):
(Box.prototype.isFloatingOrOutOfFlowPositioned):
(Box.prototype.isRootElement):
(Box.prototype.containingBlock):
(Box.prototype.borderBox):
(Box.prototype.paddingBox):
(Box.prototype.contentBox):
* LayoutReloaded/LayoutTree/Container.js: Renamed from Tools/LayoutReloaded/Container.js.
(Container):
(Container.prototype.isContainer):
(Container.prototype.setFirstChild):
(Container.prototype.setLastChild):
(Container.prototype.firstChild):
(Container.prototype.firstInFlowChild):
(Container.prototype.lastChild):
(Container.prototype.lastInFlowChild):
(Container.prototype.hasChild):
(Container.prototype.hasInFlowChild):
* LayoutReloaded/LayoutTree/InitialBlockContainer.js: Renamed from Tools/LayoutReloaded/InitialBlockContainer.js.
(InitialBlockContainer):
(InitialBlockContainer.prototype.establishesBlockFormattingContext):
(InitialBlockContainer.prototype.paddingBox):
(InitialBlockContainer.prototype.contentBox):
* LayoutReloaded/LayoutTree/InlineBox.js: Renamed from Tools/LayoutReloaded/InlineBox.js.
(InlineBox):
(InlineBox.prototype.setText):
(InlineBox.prototype.text):
* LayoutReloaded/LayoutTree/Text.js: Renamed from Tools/LayoutReloaded/Text.js.
(Text):
(Text.prototype.node):
(Text.prototype.content):
(Text.prototype.length):
* LayoutReloaded/Utils.js:
(Utils.nextBreakingOpportunity):
(Utils.measureText):
* LayoutReloaded/misc/headers/Line.h: Copied from Tools/LayoutReloaded/misc/headers/Text.h.
* LayoutReloaded/misc/headers/Text.h:
* LayoutReloaded/test/border-simple.html:
* LayoutReloaded/test/index.html:
2018-03-10 Wenson Hsieh <wenson_hsieh@apple.com>
[macOS] Copying a table from the Numbers app and pasting into iCloud Numbers fails
https://bugs.webkit.org/show_bug.cgi?id=183485
<rdar://problem/38041984>
Reviewed by Ryosuke Niwa.
Add new API tests to cover scenarios in which we paste image data alongside text data.
* TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
(TestWebKitAPI::TEST):
2018-03-09 Zalan Bujtas <zalan@apple.com>
[LayoutReloaded] Initial commit -block formatting context.
https://bugs.webkit.org/show_bug.cgi?id=183462
Reviewed by Antti Koivisto.
See README.md
* LayoutReloaded/BlockContainer.js: Added.
(BlockContainer):
(BlockContainer.prototype.establishesInlineFormattingContext):
* LayoutReloaded/BlockFormattingContext.js: Added.
(BlockFormattingContext):
(BlockFormattingContext.prototype.layout):
(BlockFormattingContext.prototype.computeWidth):
(BlockFormattingContext.prototype.computeHeight):
(BlockFormattingContext.prototype.marginTop):
(BlockFormattingContext.prototype.marginBottom):
(BlockFormattingContext.prototype._computeStaticPosition):
(BlockFormattingContext.prototype._placeInFlowPositionedChildren):
(BlockFormattingContext.prototype._placeOutOfFlowDescendants):
(BlockFormattingContext.prototype._computeOutOfFlowWidth):
(BlockFormattingContext.prototype._computeFloatingWidth):
(BlockFormattingContext.prototype._computeInFlowWidth):
(BlockFormattingContext.prototype._computeOutOfFlowHeight):
(BlockFormattingContext.prototype._computeFloatingHeight):
(BlockFormattingContext.prototype._computeInFlowHeight):
(BlockFormattingContext.prototype._computeHorizontalConstraint):
(BlockFormattingContext.prototype._computeContentHeight):
(BlockFormattingContext.prototype._computeInFlowPositionedPosition):
(BlockFormattingContext.prototype._computeOutOfFlowPosition):
(BlockFormattingContext.prototype._shrinkToFitWidth):
* LayoutReloaded/BlockMarginCollapse.js: Added.
(BlockMarginCollapse.marginTop):
(BlockMarginCollapse.marginBottom):
(BlockMarginCollapse._isMarginTopCollapsedWithSibling):
(BlockMarginCollapse._isMarginBottomCollapsedWithSibling):
(BlockMarginCollapse._isMarginTopCollapsedWithParent):
(BlockMarginCollapse._isMarginBottomCollapsedWithParent):
(BlockMarginCollapse._nonCollapsedMarginTop):
(BlockMarginCollapse._nonCollapsedMarginBottom):
(BlockMarginCollapse._collapsedMarginTopFromFirstChild):
(BlockMarginCollapse._collapsedMarginBottomFromLastChild):
(BlockMarginCollapse._marginValue):
(BlockMarginCollapse._hasAdjoiningMarginTopAndBottom):
(BlockMarginCollapse):
* LayoutReloaded/Box.js: Added.
(Box):
(Box.prototype.id):
(Box.prototype.setRendererName):
(Box.prototype.name):
(Box.prototype.node):
(Box.prototype.parent):
(Box.prototype.nextSibling):
(Box.prototype.nextInFlowSibling):
(Box.prototype.previousSibling):
(Box.prototype.previousInFlowSibling):
(Box.prototype.setParent):
(Box.prototype.setNextSibling):
(Box.prototype.setPreviousSibling):
(Box.prototype.rect):
(Box.prototype.topLeft):
(Box.prototype.bottomRight):
(Box.prototype.setTopLeft):
(Box.prototype.setSize):
(Box.prototype.setWidth):
(Box.prototype.setHeight):
(Box.prototype.isContainer):
(Box.prototype.isBlockLevelBox):
(Box.prototype.isBlockContainerBox):
(Box.prototype.isInlineLevelBox):
(Box.prototype.setIsAnonymous):
(Box.prototype.isAnonymous):
(Box.prototype.establishesFormattingContext):
(Box.prototype.establishedFormattingContext):
(Box.prototype.establishesBlockFormattingContext):
(Box.prototype.establishesInlineFormattingContext):
(Box.prototype.isPositioned):
(Box.prototype.isRelativePositioned):
(Box.prototype.isAbsolutePositioned):
(Box.prototype.isFixedPositioned):
(Box.prototype.isInFlow):
(Box.prototype.isOutOfFlowPositioned):
(Box.prototype.isInFlowPositioned):
(Box.prototype.isFloatingPositioned):
(Box.prototype.isFloatingOrOutOfFlowPositioned):
(Box.prototype.isRootElement):
(Box.prototype.containingBlock):
(Box.prototype.borderBox):
(Box.prototype.paddingBox):
(Box.prototype.contentBox):
* LayoutReloaded/Container.js: Added.
(Container):
(Container.prototype.isContainer):
(Container.prototype.setFirstChild):
(Container.prototype.setLastChild):
(Container.prototype.firstChild):
(Container.prototype.firstInFlowChild):
(Container.prototype.lastChild):
(Container.prototype.lastInFlowChild):
(Container.prototype.hasChild):
(Container.prototype.hasInFlowChild):
* LayoutReloaded/FloatingContext.js: Added.
(FloatingContext):
(FloatingContext.prototype.computePosition):
(FloatingContext.prototype.bottom):
(FloatingContext.prototype._positionForFloating):
(FloatingContext.prototype._positionForClear):
(FloatingContext.prototype._computePositionToAvoidIntrudingFloats):
(FloatingContext.prototype._addFloating):
(FloatingContext.prototype._findInnerMostLeftAndRight):
(FloatingContext.prototype._moveToNextVerticalPosition):
(FloatingContext.prototype._availableSpace):
(FloatingContext.prototype._findFloatingAtVerticalPosition):
(FloatingContext.prototype._isEmpty):
(FloatingContext.prototype._adjustedFloatingPosition):
(FloatingContext.prototype._bottom):
(FloatingContext.prototype._formattingContext):
* LayoutReloaded/FormattingContext.js: Added.
(FormattingContext):
(FormattingContext.prototype.rootContainer):
(FormattingContext.prototype.floatingContext):
(FormattingContext.prototype.layout):
(FormattingContext.prototype.computeWidth):
(FormattingContext.prototype.computeHeight):
(FormattingContext.prototype.marginTop):
(FormattingContext.prototype.marginLeft):
(FormattingContext.prototype.marginBottom):
(FormattingContext.prototype.marginRight):
(FormattingContext.prototype.absoluteMarginBox):
(FormattingContext.prototype.absoluteBorderBox):
(FormattingContext.prototype.absolutePaddingBox):
(FormattingContext.prototype.absoluteContentBox):
* LayoutReloaded/InitialBlockContainer.js: Added.
(InitialBlockContainer):
(InitialBlockContainer.prototype.establishesBlockFormattingContext):
(InitialBlockContainer.prototype.paddingBox):
(InitialBlockContainer.prototype.contentBox):
* LayoutReloaded/InlineBox.js: Added.
(InlineBox):
(InlineBox.prototype.setText):
(InlineBox.prototype.text):
* LayoutReloaded/InlineFormattingContext.js: Added.
(InlineFormattingContext):
(InlineFormattingContext.prototype.layout):
(InlineFormattingContext.prototype._handleInlineBox):
(InlineFormattingContext.prototype._handleText):
* LayoutReloaded/Layout.js: Added.
(layout):
* LayoutReloaded/LayoutContext.js: Added.
(LayoutContext):
(LayoutContext.prototype.layoutFormattingContext):
* LayoutReloaded/LayoutReloaded.xcworkspace/contents.xcworkspacedata: Added.
* LayoutReloaded/LayoutReloaded.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: Added.
* LayoutReloaded/README.md: Added.
* LayoutReloaded/Text.js: Added.
(Text):
* LayoutReloaded/TreeBuilder.js: Added.
(TreeBuilder.prototype.createTree):
(TreeBuilder.prototype._createAndAttachBox):
(TreeBuilder.prototype._appendChild):
(TreeBuilder.prototype._findBox):
(TreeBuilder.prototype._findNode):
(TreeBuilder):
* LayoutReloaded/Utils.js: Added.
(LayoutPoint):
(LayoutPoint.prototype.setLeft):
(LayoutPoint.prototype.setTop):
(LayoutPoint.prototype.left):
(LayoutPoint.prototype.top):
(LayoutPoint.prototype.shiftLeft):
(LayoutPoint.prototype.shiftTop):
(LayoutPoint.prototype.moveBy):
(LayoutPoint.prototype.equal):
(LayoutPoint.prototype.clone):
(LayoutSize):
(LayoutSize.prototype.setWidth):
(LayoutSize.prototype.setHeight):
(LayoutSize.prototype.width):
(LayoutSize.prototype.height):
(LayoutSize.prototype.growBy):
(LayoutSize.prototype.shrinkBy):
(LayoutSize.prototype.isEmpty):
(LayoutSize.prototype.equal):
(LayoutSize.prototype.clone):
(LayoutRect):
(LayoutRect.prototype.setTop):
(LayoutRect.prototype.setLeft):
(LayoutRect.prototype.setBottom):
(LayoutRect.prototype.setRight):
(LayoutRect.prototype.left):
(LayoutRect.prototype.top):
(LayoutRect.prototype.bottom):
(LayoutRect.prototype.right):
(LayoutRect.prototype.setTopLeft):
(LayoutRect.prototype.topLeft):
(LayoutRect.prototype.topRight):
(LayoutRect.prototype.bottomRight):
(LayoutRect.prototype.setWidth):
(LayoutRect.prototype.setHeight):
(LayoutRect.prototype.setSize):
(LayoutRect.prototype.size):
(LayoutRect.prototype.width):
(LayoutRect.prototype.height):
(LayoutRect.prototype.growBy):
(LayoutRect.prototype.shrinkBy):
(LayoutRect.prototype.moveBy):
(LayoutRect.prototype.isEmpty):
(LayoutRect.prototype.equal):
(LayoutRect.prototype.intersects):
(LayoutRect.prototype.contains):
(LayoutRect.prototype.clone):
(ASSERT_NOT_REACHED):
(ASSERT):
(Utils.computedValue):
(Utils.propertyIsAuto):
(Utils.isWidthAuto):
(Utils.isHeightAuto):
(Utils.isTopAuto):
(Utils.isLeftAuto):
(Utils.isBottomAuto):
(Utils.isRightAuto):
(Utils.width):
(Utils.height):
(Utils.top):
(Utils.bottom):
(Utils.left):
(Utils.right):
(Utils.hasBorderTop):
(Utils.hasBorderBottom):
(Utils.hasPaddingTop):
(Utils.hasPaddingBottom):
(Utils.computedMarginTop):
(Utils.computedMarginLeft):
(Utils.computedMarginBottom):
(Utils.computedMarginRight):
(Utils.computedBorderTopLeft):
(Utils.computedBorderBottomRight):
(Utils.computedPaddingTopLeft):
(Utils.computedPaddingBottomRight):
(Utils.computedBorderAndPaddingTop):
(Utils.computedBorderAndPaddingLeft):
(Utils.computedBorderAndPaddingBottom):
(Utils.computedBorderAndPaddingRight):
(Utils.computedHorizontalBorderAndPadding):
(Utils.computedVerticalBorderAndPadding):
(Utils.hasClear):
(Utils.hasClearLeft):
(Utils.hasClearRight):
(Utils.hasClearBoth):
(Utils.isBlockLevelElement):
(Utils.isBlockContainerElement):
(Utils.isInlineLevelElement):
(Utils.isTableElement):
(Utils.isRelativePositioned):
(Utils.isAbsolutePositioned):
(Utils.isFixedPositioned):
(Utils.isOverflowVisible):
(Utils.isFloatingPositioned):
(Utils.isFloatingLeft):
(Utils.mapToContainer):
(Utils.mapStaticToAbsolute):
(Utils.collectOutOfFlowDescendants):
(Utils.nextBreakingOpportunity):
(Utils.measureText):
(Utils.layoutTreeDump):
(Utils._dumpBox):
(Utils._dumpTree):
(Utils):
* LayoutReloaded/misc/LayoutReloadedWebKit.patch: Added.
* LayoutReloaded/misc/headers/BlockContainer.h: Added.
* LayoutReloaded/misc/headers/BlockFormattingContext.h: Added.
* LayoutReloaded/misc/headers/BlockMarginCollapse.h: Added.
* LayoutReloaded/misc/headers/Box.h: Added.
* LayoutReloaded/misc/headers/Container.h: Added.
* LayoutReloaded/misc/headers/FloatingContext.h: Added.
* LayoutReloaded/misc/headers/FormattingContext.h: Added.
* LayoutReloaded/misc/headers/InitialBlockContainer.h: Added.
* LayoutReloaded/misc/headers/InlineBox.h: Added.
* LayoutReloaded/misc/headers/LayoutContext.h: Added.
* LayoutReloaded/misc/headers/Text.h: Added.
* LayoutReloaded/test/TestHarness.js: Added.
(verifyLayoutTreeDump):
(runLayout):
* LayoutReloaded/test/absolute-auto-with-sibling-margin-bottom.html: Added.
* LayoutReloaded/test/absolute-bottom.html: Added.
* LayoutReloaded/test/absolute-height-stretch.html: Added.
* LayoutReloaded/test/absolute-left-auto.html: Added.
* LayoutReloaded/test/absolute-left-right-top-bottom-auto.html: Added.
* LayoutReloaded/test/absolute-nested.html: Added.
* LayoutReloaded/test/absolute-nested2.html: Added.
* LayoutReloaded/test/absolute-simple.html: Added.
* LayoutReloaded/test/absolute-width-shrink-to-fit.html: Added.
* LayoutReloaded/test/absolute-width-stretch.html: Added.
* LayoutReloaded/test/absolute-with-inline-preferred-width.html: Added.
* LayoutReloaded/test/absolute-with-static-block-position-nested.html: Added.
* LayoutReloaded/test/almost-intruding-left-float-simple.html: Added.
* LayoutReloaded/test/border-simple.html: Added.
* LayoutReloaded/test/fixed-nested.html: Added.
* LayoutReloaded/test/float-left-when-container-has-padding-margin.html: Added.
* LayoutReloaded/test/floating-box-clear-both-simple.html: Added.
* LayoutReloaded/test/floating-box-clear-right-simple.html: Added.
* LayoutReloaded/test/floating-box-left-and-right-multiple-with-top-offset.html: Added.
* LayoutReloaded/test/floating-box-left-and-right-multiple.html: Added.
* LayoutReloaded/test/floating-box-right-simple.html: Added.
* LayoutReloaded/test/floating-box-with-clear-siblings.html: Added.
* LayoutReloaded/test/floating-box-with-clear-simple.html: Added.
* LayoutReloaded/test/floating-box-with-new-formatting-context.html: Added.
* LayoutReloaded/test/floating-box-with-relative-positioned-sibling.html: Added.
* LayoutReloaded/test/floating-left-right-simple.html: Added.
* LayoutReloaded/test/floating-left-right-with-all-margins.html: Added.
* LayoutReloaded/test/floating-lefts-and-rights-simple.html: Added.
* LayoutReloaded/test/floating-multiple-lefts-in-body.html: Added.
* LayoutReloaded/test/floating-multiple-lefts-multiple-lines.html: Added.
* LayoutReloaded/test/floating-multiple-lefts.html: Added.
* LayoutReloaded/test/floating-sizing.html: Added.
* LayoutReloaded/test/floating-sizing2.html: Added.
* LayoutReloaded/test/floating-sizing3.html: Added.
* LayoutReloaded/test/floating-with-new-block-formatting-context.html: Added.
* LayoutReloaded/test/index.html: Added.
* LayoutReloaded/test/inline-content-simple.html: Added.
* LayoutReloaded/test/intruding-left-float-simple.html: Added.
* LayoutReloaded/test/margin-collapse-bottom-bottom.html: Added.
* LayoutReloaded/test/margin-collapse-bottom-nested.html: Added.
* LayoutReloaded/test/margin-collapse-first-last-are-floating.html: Added.
* LayoutReloaded/test/margin-collapse-simple.html: Added.
* LayoutReloaded/test/margin-collapse-top-nested.html: Added.
* LayoutReloaded/test/margin-collapse-when-child-has-padding-border.html: Added.
* LayoutReloaded/test/margin-collapse-with-block-formatting-context.html: Added.
* LayoutReloaded/test/margin-collapse-with-block-formatting-context2.html: Added.
* LayoutReloaded/test/margin-left-right-sizing-out-of-flow.html: Added.
* LayoutReloaded/test/margin-left-right-sizing.html: Added.
* LayoutReloaded/test/margin-propagation-simple-content-height.html: Added.
* LayoutReloaded/test/margin-sibling-collapse-propagated.html: Added.
* LayoutReloaded/test/margin-simple.html: Added.
* LayoutReloaded/test/negative-margin-simple.html: Added.
* LayoutReloaded/test/padding-nested.html: Added.
* LayoutReloaded/test/padding-simple.html: Added.
* LayoutReloaded/test/relative-auto-with-parent-offset.html: Added.
* LayoutReloaded/test/relative-auto.html: Added.
* LayoutReloaded/test/relative-bottom.html: Added.
* LayoutReloaded/test/relative-right.html: Added.
* LayoutReloaded/test/relative-siblings.html: Added.
* LayoutReloaded/test/relative-simple.html: Added.
2018-03-09 Stephan Szabo <stephan.szabo@sony.com>
WebKitTestRunner: Do not build accessibility files/idl when !HAVE(ACCESSIBILITY)
https://bugs.webkit.org/show_bug.cgi?id=183516
Reviewed by Alex Christensen.
* WebKitTestRunner/CMakeLists.txt:
2018-03-09 Basuke Suzuki <Basuke.Suzuki@sony.com>
[webkitpy, WinCairo] Launch Apache HTTPD for HTTP Tests.
https://bugs.webkit.org/show_bug.cgi?id=183265
Reviewed by Daniel Bates.
Launch apache httpd server from python script for WinCairo HTTP LayoutTests. By now, AppleWin uses
Cygwin to launch httpd server. This patch enables native Windows to run HTTP LayoutTests by starting
and stopping httpd server from the script.
* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd.__init__):
(LayoutTestApacheHttpd._copy_apache_config_file):
(LayoutTestApacheHttpd):
(LayoutTestApacheHttpd.platform):
(LayoutTestApacheHttpd._spawn_process):
(LayoutTestApacheHttpd._stop_running_server):
(LayoutTestApacheHttpd._run):
(LayoutTestApacheHttpd._server_error):
* Scripts/webkitpy/layout_tests/servers/http_server_base.py:
(HttpServerBase.aliases):
(HttpServerBase):
(HttpServerBase._build_alias_path_pairs):
(HttpServerBase._build_alias_path_pairs._make_path):
* Scripts/webkitpy/layout_tests/servers/http_server_base_unittest.py:
(TestHttpServerBase.test_corrupt_pid_file):
(TestHttpServerBase):
(TestHttpServerBase.test_build_alias_path_pairs):
* Scripts/webkitpy/port/base.py:
(Port._apache_config_file_name_for_platform):
* Scripts/webkitpy/port/port_testcase.py:
(test_apache_config_file_name_for_platform):
* Scripts/webkitpy/port/win.py:
(WinPort._path_to_apache):
(WinCairoPort.default_baseline_search_path):
(WinCairoPort):
(WinCairoPort.check_httpd):
2018-03-09 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Do not use WebKitDOMHTMLFormElement as argument of signal WebKitWebPage::will-submit-form
https://bugs.webkit.org/show_bug.cgi?id=183510
Reviewed by Michael Catanzaro.
Update the test to use WebKitDOMElement instead and fix a memory leak.
* TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
(handleFormSubmissionCallback):
(willSubmitFormCallback):
2018-03-08 Stephan Szabo <stephan.szabo@sony.com>
WebKitTestRunner: Don't use accessibility controller when !HAVE(ACCESSIBILITY)
https://bugs.webkit.org/show_bug.cgi?id=183475
Reviewed by Youenn Fablet.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::done):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didClearWindowForFrame):
2018-03-08 Ms2ger <Ms2ger@igalia.com>
[WPE] Update expectations for API tests
https://bugs.webkit.org/show_bug.cgi?id=183434
Unreviewed test gardening.
* TestWebKitAPI/glib/TestExpectations.json:
2018-03-07 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] Leak checker is not working in WebKitGLib web process tests
https://bugs.webkit.org/show_bug.cgi?id=183404
Reviewed by Michael Catanzaro.
This might have regressed when we started to use the JSC garbage collector timers. The thing is that we expect
that the WebProcessTester object that we expose to JavaScript is released when the web frame is destroyed, but
that's no longer the case. On window object cleared a GC is scheduled, but JSC timers do the actual garbage
collection later. In the case of tests that never happens because the web process finishes quickly after the
test. We need to force a garbage collection at some point when the web page is destroyed. We can't use the
WebKitWebPage destroy signal, since we are also checking that WebKitWebPage isn't leaked. The
API::InjectedBundle::Client::willDestroyPage() always happen when the page is closed, even if WebKitWebPage is
still alive, so we can force the GC at that point. The only problem is that the frame is detached right after
that point, so we can't check WebKitFrame leaks. The only frame in the tests is the main one, so we can assume
that if WebKitWebPage is released, the frame is too.
* TestWebKitAPI/Tests/WebKitGLib/FrameTest.cpp:
(WebKitFrameTest::testMainFrame): Stop checking we don't leak WebKitFrame.
(WebKitFrameTest::testURI): Ditto.
(WebKitFrameTest::testJavaScriptContext): Ditto.
* TestWebKitAPI/Tests/WebKitGLib/TestFrame.cpp:
(testWebKitFrameMainFrame): Use new WebViewTest::runWebProcessTest() API.
(testWebKitFrameURI): Ditto.
(testWebKitFrameJavaScriptContext): Ditto.
(webkitFrameTestRun): Deleted.
* TestWebKitAPI/Tests/WebKitGLib/WebProcessTest.cpp:
(runTest): We no longer need the special case for dom-cache test.
(windowObjectClearedCallback): Only expose test runner object to JavaScript when loading tests.
(webkit_web_extension_initialize): Call webkitWebExtensionSetGarbageCollectOnPageDestroy() to ensure a garbage
collection is performed when the page is closing.
* TestWebKitAPI/Tests/WebKitGtk/DOMClientRectTest.cpp:
(WebKitDOMClientRectTest::testDivClientRectsPositionAndLength): Fix memory leak,
webkit_dom_client_rect_list_item() returns a full reference.
* TestWebKitAPI/Tests/WebKitGtk/TestAutocleanups.cpp:
(testWebProcessAutocleanups):Use new WebViewTest::runWebProcessTest() API.
* TestWebKitAPI/Tests/WebKitGtk/TestDOMClientRect.cpp:
(testWebKitDOMClientRectDivBoundingClientRectPosition): Use new WebViewTest::runWebProcessTest() API.
(testWebKitDOMClientRectDivClientRectsPositionAndLength): Use new WebViewTest::runWebProcessTest() API.
(prepareDOMForClientRectPositionTests): Deleted.
* TestWebKitAPI/Tests/WebKitGtk/TestDOMNode.cpp:
(testWebKitDOMNodeHierarchyNavigation): Use new WebViewTest::runWebProcessTest() API.
(testWebKitDOMNodeInsertion): Ditto.
(testWebKitDOMNodeTagNamesNodeList): Ditto.
(testWebKitDOMNodeTagNamesHTMLCollection): Ditto.
(testWebKitDOMObjectCache): We no longer need to run the test several times, since runWebProcessTest() loads
about blank after every test.
(prepareDOMForTagNamesTests): Deleted.
* TestWebKitAPI/Tests/WebKitGtk/TestDOMNodeFilter.cpp:
(testWebKitDOMNodeFilterTreeWalker): Use new WebViewTest::runWebProcessTest() API.
(testWebKitDOMNodeFilterNodeIterator): Ditto.
(runTest): Deleted.
* TestWebKitAPI/Tests/WebKitGtk/TestDOMXPathNSResolver.cpp:
(testWebKitDOMXPathNSResolverNative): Use new WebViewTest::runWebProcessTest() API.
(testWebKitDOMXPathNSResolverCustom): Ditto.
* TestWebKitAPI/Tests/WebKitGtk/TestEditor.cpp:
(testWebKitWebEditorSelectionChanged): Use new WebViewTest::runWebProcessTest() API.
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.cpp:
(WebViewTest::runWebProcessTest): It now receives the contents, so it automatically loads the view using
"webprocess://test" as base URI, used to detect tests in the web process. It also loads about:blank after every
test to ensure that window object is cleared.
* TestWebKitAPI/glib/WebKitGLib/WebViewTest.h:
2018-03-07 Youenn Fablet <youenn@apple.com>
Match unsupported plugins based on domains and not origin
https://bugs.webkit.org/show_bug.cgi?id=183384
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebCore/URL.cpp:
(TestWebKitAPI::TEST_F):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setPluginSupportedMode): Update to whitelist
localhost and not http://localhost:8080
2018-03-07 Jonathan Bedard <jbedard@apple.com>
webkitpy: Allow apple_additions() to define additional ports
https://bugs.webkit.org/show_bug.cgi?id=183412
<rdar://problem/38232353>
Reviewed by Aakash Jain.
* Scripts/webkitpy/port/factory.py:
(PortFactory.get): Allow apple_additions to define port classes to be used
in run-webkit-tests.
2018-03-07 Jonathan Bedard <jbedard@apple.com>
webkitpy: Remove obsolete function from MockAppleAdditions
https://bugs.webkit.org/show_bug.cgi?id=183415
<rdar://problem/38236407>
Reviewed by Aakash Jain.
* Scripts/webkitpy/port/port_testcase.py:
(bind_mock_apple_additions.MockAppleAdditions):
(bind_mock_apple_additions.MockAppleAdditions.ios_os_name): Deleted.
(bind_mock_apple_additions.MockAppleAdditions.mac_os_name): Deleted.
2018-03-07 Jonathan Bedard <jbedard@apple.com>
webkitpy: --dedicated-simulators does not boot the correct number of simulators
https://bugs.webkit.org/show_bug.cgi?id=183409
<rdar://problem/38224631>
Reviewed by Aakash Jain.
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort.default_child_processes): When not using dedicated simulators,
we should use the number of booted simulators as our default child processes.
2018-03-07 Alejandro G. Castro <alex@igalia.com>
Make NetworkRTCResolver port agnostic
https://bugs.webkit.org/show_bug.cgi?id=178855
Reviewed by Youenn Fablet.
Added new unit tests for he resolve and stopResolve functions. We need to compile them for the
other platforms when the APIs are supported.
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebCore/DNS.cpp:
2018-03-06 Youenn Fablet <youenn@apple.com>
didReceiveServerRedirectForProvisionalNavigation is not called in case of document redirection with service worker registration change
https://bugs.webkit.org/show_bug.cgi?id=183299
<rdar://problem/37547029>
Reviewed by Alex Christensen.
Add support for checking whether this callback is called.
Used in the added layout test.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::didReceiveServerRedirectForProvisionalNavigation const):
(WTR::TestRunner::clearDidReceiveServerRedirectForProvisionalNavigation):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createOtherPage):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::didReceiveServerRedirectForProvisionalNavigation):
* WebKitTestRunner/TestController.h:
(WTR::TestController::didReceiveServerRedirectForProvisionalNavigation const):
(WTR::TestController::clearDidReceiveServerRedirectForProvisionalNavigation):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2018-03-06 Chris Dumez <cdumez@apple.com>
fast/loader/redirect-to-invalid-url-using-meta-refresh-disallowed.html fails with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183345
Reviewed by Alex Christensen.
Add layout test infrastructure so a test can know when didCancelClientRedirectForFrame has
been called. The tests used to rely on a 0-timer but this does not work when the client
responds to the navigation policy asynchronously.
* DumpRenderTree/TestRunner.cpp:
(getDidCancelClientRedirect):
(TestRunner::staticValues):
* DumpRenderTree/TestRunner.h:
(TestRunner::didCancelClientRedirect const):
(TestRunner::setDidCancelClientRedirect):
* DumpRenderTree/mac/FrameLoadDelegate.mm:
(-[FrameLoadDelegate webView:didCancelClientRedirectForFrame:]):
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::didCancelClientRedirectForFrame):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::didCancelClientRedirect const):
(WTR::TestRunner::setDidCancelClientRedirect):
2018-03-06 Zan Dobersek <zdobersek@igalia.com>
REGRESSION(r229309): s_exceptionInstructions allocation change causing crashes in LLInt on WPE
https://bugs.webkit.org/show_bug.cgi?id=183366
Reviewed by Michael Catanzaro.
Have the TestRunnerInjectedBundle CMake library link against libraries
in the WebKitTestRunnerInjectedBundle_LIBRARIES list, and not the
WebKitTestRunner_LIBRARIES list, which is used for the WebKitTestRunner
executable. This allows narrowing down the libraries to only those that
are necessary for the injected bundle shared object.
The GTK+ port already has this list specified, adding one for the WPE
port.
* WebKitTestRunner/CMakeLists.txt:
Link the TestRunnerInjectedBundle library against the libraries in the
WebKitTestRunnerInjectedBundle_LIBRARIES list.
* WebKitTestRunner/PlatformWPE.cmake:
Specify the WebKitTestRunnerInjectedBundle_LIBRARIES list, including the
basic system dependencies, WebCoreTestSupport and WebKit. This follows
the GTK+ port.
2018-03-06 Dominik Infuehr <dinfuehr@igalia.com>
[ARM] Disable tests that run out of memory
https://bugs.webkit.org/show_bug.cgi?id=182699
Reviewed by Žan Doberšek.
Add run mode to allow running modules.yaml-tests without
disabling LLInt for specific tests.
* Scripts/run-jsc-stress-tests:
2018-03-05 Yusuke Suzuki <utatane.tea@gmail.com>
Fix std::make_unique / new[] using system malloc
https://bugs.webkit.org/show_bug.cgi?id=182975
Reviewed by JF Bastien.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/UniqueArray.cpp: Copied from Source/WebKit/Platform/win/LoggingWin.cpp.
(TestWebKitAPI::NonTrivialDestructor::NonTrivialDestructor):
(TestWebKitAPI::NonTrivialDestructor::~NonTrivialDestructor):
(TestWebKitAPI::NonTrivialDestructor::setLog):
(TestWebKitAPI::TEST):
2018-03-05 Myles C. Maxfield <mmaxfield@apple.com>
DumpRenderTree build fix
Unreviewed.
* DumpRenderTree/mac/LayoutTestHelper.m:
2018-03-05 Andy Estes <aestes@apple.com>
[Mac] Teach WebCore::Pasteboard about file promise drags
https://bugs.webkit.org/show_bug.cgi?id=183314
<rdar://problem/38105493>
Reviewed by Darin Adler.
* DumpRenderTree/DumpRenderTreeFileDraggingSource.h:
* DumpRenderTree/DumpRenderTreeFileDraggingSource.m:
(-[DumpRenderTreeFileDraggingSource initWithPromisedFileURLs:]):
(-[DumpRenderTreeFileDraggingSource dealloc]):
Taught DumpRenderTreeFileDraggingSource to store the promised file URLs.
* DumpRenderTree/mac/DumpRenderTree.mm:
(runTest):
Called +[DumpRenderTreeDraggingInfo clearAllFilePromiseReceivers] after running a test.
* DumpRenderTree/mac/DumpRenderTreeDraggingInfo.h:
* DumpRenderTree/mac/DumpRenderTreeDraggingInfo.mm:
(-[DumpRenderTreeFilePromiseReceiver initWithPromisedUTIs:]):
(-[DumpRenderTreeFilePromiseReceiver fileTypes]):
(-[DumpRenderTreeFilePromiseReceiver fileNames]):
(-[DumpRenderTreeFilePromiseReceiver dealloc]):
(copyFile):
(-[DumpRenderTreeFilePromiseReceiver receivePromisedFilesAtDestination:options:operationQueue:reader:]):
We can't instantiate real NSFilePromiseReceivers in DumpRenderTree. They rely on the
pasteboard server to generate unique file URLs, which is incompatible with our swizzled
NSPasteboard.
Instead, create a subclass of NSFilePromiseReceiver that implements its own promise resolution.
-receivePromisedFilesAtDestination:... asks its DumpRenderTreeFileDraggingSource for the
array of file URLs, then copies each to the destination directory on the specified operation
queue. It emulates how NSPasteboard tries to find a unique destination name by appending
numbers to the file name.
All receivers are collected in a global array that is cleared when each test finishes.
DumpRenderTreeFilePromiseReceiver will delete the files it copied in -dealloc.
(+[DumpRenderTreeDraggingInfo clearAllFilePromiseReceivers]):
(-[DumpRenderTreeDraggingInfo enumerateDraggingItemsWithOptions:forView:classes:searchOptions:usingBlock:]):
If NSFilesPromisePboardType is on the pasteboard and classArray contains
NSFilePromiseReceiver, construct a DumpRenderTreeFilePromiseReceiver, add it to the array of
all file promise receivers, then wrap it in an NSDraggingItem and call block.
* DumpRenderTree/mac/EventSendingController.mm:
(+[EventSendingController isSelectorExcludedFromWebScript:]):
(+[EventSendingController webScriptNameForSelector:]):
(-[EventSendingController beginDragWithFilePromises:]):
Implement eventSender.beginDragWithFilePromises() by placing file UTIs on the pasteboard
with type NSFilesPromisePboardType, creating a DumpRenderTreeFileDraggingSource with the
file URLs, and creating a new DumpRenderTreeDraggingInfo and passing it to
-[WebView draggingEntered:].
2018-03-05 Aakash Jain <aakash_jain@apple.com>
[webkitpy] Bugzilla class should use NetworkTransaction for network operations
https://bugs.webkit.org/show_bug.cgi?id=183222
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla.open_url): Method which uses NetworkTransaction for opening url.
(Bugzilla.fetch_user): Used self.open_url instead of directly calling browser.open().
(Bugzilla.add_user_to_groups): Ditto.
(Bugzilla._fetch_bug_page): Ditto.
(Bugzilla.fetch_attachment_contents): Ditto.
(Bugzilla.get_bug_id_for_attachment_id): Ditto.
(Bugzilla.authenticate): Ditto.
(Bugzilla.add_attachment_to_bug): Ditto.
(Bugzilla.add_patch_to_bug): Ditto.
(Bugzilla.create_bug): Ditto.
(Bugzilla.clear_attachment_flags): Ditto.
(Bugzilla.set_flag_on_attachment): Ditto.
(Bugzilla.obsolete_attachment): Ditto.
(Bugzilla.add_cc_to_bug): Ditto.
(Bugzilla.post_comment_to_bug): Ditto.
(Bugzilla.close_bug_as_fixed): Ditto.
(Bugzilla.reassign_bug): Ditto.
(Bugzilla.reopen_bug): Ditto.
(Bugzilla._fetch_bug_page_by_url): Deleted, not required anymore.
* Scripts/webkitpy/common/net/networktransaction.py:
(NetworkTransaction.run): Added a FIXME.
2018-03-05 Joseph Pecoraro <pecoraro@apple.com>
dump-class-layout mishandles duplicates base classes and miscomputes padding
https://bugs.webkit.org/show_bug.cgi?id=183311
Reviewed by Simon Fraser.
* Scripts/dump-class-layout:
(verify_type):
(verify_type_recursive):
Keep a list of seen (offset, type) that we have output and don't re-output them.
The Python types list the base classes as members multiple times as you iterate
through the members, so just ignore them if we have seem them already at a
specific offset.
2018-03-05 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK][Wayland] The GTK Wayland bot exits early because of assertions related with libsecret since r221925
https://bugs.webkit.org/show_bug.cgi?id=183330
Reviewed by Michael Catanzaro.
Add libsecret to the JHBuild and build it only when the system version is
less than 0.18.6 (unreleased as of writing this) in order to cherry pick
a fix for a bug that causes crashes with layout tests.
* gtk/jhbuild.modules:
* gtk/patches/libsecret-secret-methods-Don-t-unref-NULL-when-search-fails.patch: Added.
2018-03-05 Claudio Saavedra <csaavedra@igalia.com>
[GTK] Implement WTR's PlatformWebView::setWindowIsKey()
https://bugs.webkit.org/show_bug.cgi?id=183143
Reviewed by Carlos Garcia Campos.
Implement ::setWindowIsKey() by keeping a second window to be
presented when the webview's window is to lose its key status.
* WebKitTestRunner/PlatformWebView.h:
* WebKitTestRunner/gtk/PlatformWebViewGtk.cpp:
(WTR::PlatformWebView::PlatformWebView):
(WTR::PlatformWebView::~PlatformWebView):
(WTR::PlatformWebView::setWindowIsKey):
2018-03-05 Yusuke Suzuki <utatane.tea@gmail.com>
Unreviewed, attempt to fix Apple port build
* TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
2018-03-05 Yusuke Suzuki <utatane.tea@gmail.com>
Unreviewed, attempt to fix WPE build
* WebKitTestRunner/InjectedBundle/wpe/TestRunnerWPE.cpp:
(WTR::TestRunner::initializeWaitToDumpWatchdogTimerIfNeeded):
* WebKitTestRunner/wpe/PlatformWebViewWPE.cpp:
(WTR::PlatformWebView::windowSnapshotImage):
* WebKitTestRunner/wpe/TestControllerWPE.cpp:
(WTR::TestController::platformRunUntil):
2018-03-04 Yusuke Suzuki <utatane.tea@gmail.com>
[WTF] Move currentCPUTime and sleep(Seconds) to CPUTime.h and Seconds.h respectively
https://bugs.webkit.org/show_bug.cgi?id=183312
Reviewed by Mark Lam.
Remove wtf/CurrentTime.h include pragma.
* DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
* DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSWithinNPP_New.cpp:
* DumpRenderTree/TestNetscapePlugIn/Tests/InvokeDestroysPluginWithinNPP_New.cpp:
* DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp:
* TestWebKitAPI/Tests/WTF/Condition.cpp:
* TestWebKitAPI/Tests/WTF/Signals.cpp:
* TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
* TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
* TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
* TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
2018-03-04 Tim Horton <timothy_horton@apple.com>
Make !ENABLE(DATA_DETECTION) iOS build actually succeed
https://bugs.webkit.org/show_bug.cgi?id=183283
<rdar://problem/38062148>
Reviewed by Sam Weinig.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-03-02 Chris Dumez <cdumez@apple.com>
Converting a load to a download does not work with async policy delegates
https://bugs.webkit.org/show_bug.cgi?id=183254
<rdar://problem/38035334>
Reviewed by Youenn Fablet.
Add layout test infrastructure for responding to the decidePolicyForNavigationResponse
delegate asynchronously.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::decidePolicyForResponse):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setShouldDecideResponsePolicyAfterDelay):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(WTR::TestRunner::shouldDecideResponsePolicyAfterDelay const):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::decidePolicyForNavigationResponse):
* WebKitTestRunner/TestController.h:
(WTR::TestController::setShouldDecideResponsePolicyAfterDelay):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
2018-03-01 Youenn Fablet <youenn@apple.com>
Add API test to validate setting of service worker and cache storage directories
https://bugs.webkit.org/show_bug.cgi?id=182543
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2018-03-01 Ross Kirsling <ross.kirsling@sony.com>
[Win][DRT] Implement setSpatialNavigationEnabled.
https://bugs.webkit.org/show_bug.cgi?id=183166
Reviewed by Per Arne Vollan.
* DumpRenderTree/TestRunner.cpp:
(setSpatialNavigationEnabledCallback):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetWebPreferencesToConsistentValues):
* DumpRenderTree/win/TestRunnerWin.cpp:
(TestRunner::setSpatialNavigationEnabled):
2018-03-01 Basuke Suzuki <Basuke.Suzuki@sony.com>
[webkitpy] Use shell=False to launch apache http server.
https://bugs.webkit.org/show_bug.cgi?id=183191
Reviewed by Aakash Jain.
* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd.__init__):
(LayoutTestApacheHttpd._run):
2018-03-01 Chris Dumez <cdumez@apple.com>
Unreviewed, update WebKit.CustomHeaderFields API test after r229133.
We no longer do policy checks for 'about:blank'.
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[CustomHeaderFieldsDelegate webView:startURLSchemeTask:]):
(TEST):
2018-02-28 Jonathan Bedard <jbedard@apple.com>
[webkitpy] Remove concept of 'future' versions (Follow-up fix 2)
https://bugs.webkit.org/show_bug.cgi?id=183184
<rdar://problem/37958594>
Reviewed by Aakash Jain.
Unlisted Apple versions can't run webkitpy tests because they don't
have specified port names.
* Scripts/webkitpy/port/apple.py:
(ApplePort.determine_full_port_name): Return valid port name for unnamed
versions.
* Scripts/webkitpy/port/base.py:
(Port.version_name): Check both public and internal version mapping
when returning a version name.
* Scripts/webkitpy/port/mac.py:
(MacPort.__init__): If no os version is defined, use the current version.
2018-02-28 John Wilander <wilander@apple.com>
Add a second tier of prevalence to facilitate telemetry on very prevalent domains
https://bugs.webkit.org/show_bug.cgi?id=183218
<rdar://problem/37992388>
Reviewed by Brent Fulgham.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
Added two new testRunner functions:
- setStatisticsVeryPrevalentResource()
- isStatisticsVeryPrevalentResource()
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStatisticsVeryPrevalentResource):
(WTR::TestRunner::isStatisticsVeryPrevalentResource):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setStatisticsVeryPrevalentResource):
(WTR::TestController::isStatisticsVeryPrevalentResource):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2018-02-28 Jonathan Bedard <jbedard@apple.com>
[webkitpy] Remove concept of 'future' versions (Follow-up fix)
https://bugs.webkit.org/show_bug.cgi?id=183184
<rdar://problem/37958594>
Reviewed by David Kilzer.
The factory also relies on future in a non-obvious way.
* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo.os_version_name): Check both public and internal version mapping
when returning a version name.
* Scripts/webkitpy/common/system/platforminfo_mock.py:
(MockPlatformInfo.os_version_name): Ditto.
2018-02-28 Zan Dobersek <zdobersek@igalia.com>
Unreviewed WPE fixup after r229080.
Add empty definitions for two AccessibilityUIElement methods,
avoiding undefined symbols in the WKTR injected bundle.
* WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp:
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
2018-02-27 Jonathan Bedard <jbedard@apple.com>
Remove concept of 'future'
https://bugs.webkit.org/show_bug.cgi?id=183184
<rdar://problem/37958594>
Reviewed by Aakash Jain.
Remove concept of 'future' from expectations and instead
use a system of inheritance centered around the current version
of an OS for Mac and iOS.
Inheritance works like so:
| ....
V Future
> High Sierra (mac)
^ mac-sierra
| mac-elcapitan
| ....
This does not change expectation inheritance for any currently running
configurations, it generalizes the logic already used.
* Scripts/webkitpy/common/version_name_map.py:
(VersionNameMap.__init__): Remove all future versions.
(VersionNameMap.mapping_for_platform): Return empty dicts instead of
asserting.
* Scripts/webkitpy/port/apple.py:
(ApplePort):
(ApplePort._allowed_versions): Return all available versions.
(ApplePort._generate_all_test_configurations): Instead of picking from a set
of allowed versions, assume that every specified version is allowed.
(ApplePort._port_name_with_version): Deleted.
* Scripts/webkitpy/port/darwin.py: Add CURRENT_VERSION overridden by subclasses.
(DarwinPort):
* Scripts/webkitpy/port/ios.py:
(IOSPort):
(IOSPort.default_baseline_search_path): Use system of inheritance centered around
the current version.
* Scripts/webkitpy/port/mac.py:
(MacPort):
(MacPort.__init__): Use current version by default.
(MacPort.default_baseline_search_path): Use system of inheritance centered around
the current version.
(MacPort.configuration_specifier_macros): Use the same set of version names
supported in default_baseline_search_path.
* Scripts/webkitpy/port/mac_unittest.py:
(MacTest.test_versions): Remove 'future' tests.
2018-02-27 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed GTK test gardening
* TestWebKitAPI/glib/TestExpectations.json:
2018-02-27 Doug Russell <doug@getitdownonpaper.com>
AX: Spell check and style attributes should be optional when fetching attributed string
https://bugs.webkit.org/show_bug.cgi?id=160744
Reviewed by Chris Fleizach.
The overhead of fetching a spell checked attributed string via AX API is substantial.
In some cases on the order of 7/8 of the total time spent fetching the string.
This change introduces the new attribute AXAttributedStringForTextMarkerRangeWithOptions which accepts an NSDictionary as it's parameter with keys "AXTextMarkerRange" (AXTextMarkerRangeRef) and "AXSpellCheck" (NSNumber(BOOL)).
AXAttributedStringForTextMarkerRange will remain unchanged.
* DumpRenderTree/AccessibilityUIElement.cpp:
(attributedStringForTextMarkerRangeCallback):
(attributedStringForTextMarkerRangeWithOptionsCallback):
(AccessibilityUIElement::attributedStringForTextMarkerRange):
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
(AccessibilityUIElement::getJSClass):
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::attributedStringForTextMarkerRange):
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(createJSStringRef):
(AccessibilityUIElement::attributedStringForTextMarkerRange):
(AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::createJSStringRef):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRange):
(WTR::AccessibilityUIElement::attributedStringForTextMarkerRangeWithOptions):
2018-02-27 Daniel Bates <dabates@apple.com>
Standardize terminology for marked text
https://bugs.webkit.org/show_bug.cgi?id=180999
Reviewed by Zalan Bujtas.
The name MarkerSubrange is a misnomer for a data structure that associates a text subrange with a type
and optional document marker. In particular, a MarkerSubrange may not always correspond to a document
marker. For instance, selected text is represented using a MarkerSubrange that does not have a
corresponding document marker. Let's standardize on the phrase "marked text" as the canonical way to
describe these tagged text subranges.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/MarkedText.cpp: Added.
(WebCore::operator<<):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/MarkerSubrange.cpp: Removed.
2018-02-27 Aakash Jain <aakash_jain@apple.com>
webkitpy Bugzilla transactions should retry on URLError
https://bugs.webkit.org/show_bug.cgi?id=183156
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(Bugzilla): Use NetworkTransaction.
(Bugzilla._fetch_bug_page_by_url):
(Bugzilla.bug_id_for_attachment_id):
(Bugzilla.get_bug_id_for_attachment_id):
2018-02-27 Wenson Hsieh <wenson_hsieh@apple.com>
[Extra zoom mode] Implement additional SPI for adjusting viewport shrink-to-fit behavior
https://bugs.webkit.org/show_bug.cgi?id=183100
<rdar://problem/37840987>
Reviewed by Tim Horton.
Add API tests that exercise -_setMinimumAllowedLayoutWidth: and -_setForceHorizontalViewportShrinkToFit:. See
WebKit ChangeLog for more detail.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/ViewportSizingTests.mm: Added.
(TestWebKitAPI::while):
(viewportTestPageMarkup):
(TestWebKitAPI::TEST):
2018-02-27 Yusuke Suzuki <utatane.tea@gmail.com>
Unreviewed, skip FTL tests if FTL is disabled
https://bugs.webkit.org/show_bug.cgi?id=183071
* Scripts/run-jsc-stress-tests:
2018-02-26 Don Olmstead <don.olmstead@sony.com>
Fix WebCore includes within WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=183147
Reviewed by Tim Horton.
* MiniBrowser/win/ResourceLoadDelegate.cpp:
2018-02-26 Yousuke Kimoto <yousuke.kimoto@sony.com>
[WinCairo] WebKit2_C.h should be included for TestWebKit
https://bugs.webkit.org/show_bug.cgi?id=182682
Reviewed by Yusuke Suzuki.
* TestWebKitAPI/config.h:
2018-02-25 Fujii Hironori <Hironori.Fujii@sony.com>
[WK2] http/tests/navigation/new-window-redirect-history.html crashes
https://bugs.webkit.org/show_bug.cgi?id=127683
Reviewed by Dan Bernstein.
m_previousTestBackForwardListItem was null for the new window.
m_previousTestBackForwardListItem is initialized only for the main
window in InjectedBundlePage::prepare.
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::dumpBackForwardList):
Do null-check of m_previousTestBackForwardListItem.
2018-02-25 Alexey Proskuryakov <ap@apple.com>
Various crashes in WebKitTestRunner, especially when system is under heavy load
https://bugs.webkit.org/show_bug.cgi?id=183109
Reviewed by Tim Horton.
WebKitTestRunner had many places where it sent messages to WebContent with a timeout,
but it didn't handle the timeout when it did occur. Nearly all of those would result
in logic errors and failing tests, and most would even result in stack corruption,
as the response handler modified local variables.
There is only one timeout scenario that we actually mean to handle in WKTR. That's
when a test freezes after it is done (e.g. an infinite loop in beforeunload) - we don't
want to blame the next test for freezing, so we silently relaunch WebContent.
Everything else is cargo cult code that never worked.
This patch addresses the crashes, and actually makes tests pass a lot more on an
overloaded system.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues): Moved m_doneResetting assignment
to where it's actually needed, for clarity.
(WTR::TestController::reattachPageToWebProcess): This function used to always hit
and ignore message timeout, as m_doneResetting is only updated by navigation callback
when the state is Resetting. This change makes it faster.
(WTR::TestController::platformResetStateToConsistentValues): Style fix.
(WTR::TestController::clearServiceWorkerRegistrations): Timing out here wasn't
handled in a meaningful manner, and would even corrupt the stack.
(WTR::TestController::clearDOMCache): Ditto.
(WTR::TestController::clearDOMCaches): Ditto.
(WTR::TestController::hasDOMCache): Ditto.
(WTR::TestController::domCacheSize): Ditto.
(WTR::TestController::isStatisticsPrevalentResource): Ditto.
(WTR::TestController::isStatisticsRegisteredAsSubFrameUnder): Ditto.
(WTR::TestController::isStatisticsRegisteredAsRedirectingTo): Ditto.
(WTR::TestController::isStatisticsHasHadUserInteraction): Ditto.
(WTR::TestController::isStatisticsGrandfathered): Ditto.
(WTR::TestController::statisticsUpdateCookiePartitioning): Ditto.
(WTR::TestController::statisticsSetShouldPartitionCookiesForHost): Ditto.
(WTR::TestController::statisticsClearInMemoryAndPersistentStore): Ditto.
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Ditto.
(WTR::TestController::statisticsClearThroughWebsiteDataRemoval): Ditto.
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::shortTimeout const): Made shortTimeout shorter (on a hunch).
(WTR::TestInvocation::invoke): Removed a timeout waiting for initial response. There
is never a logical reason for such a timeout, as we always have a new or responsive
WebContent process here.
(WTR::TestInvocation::dumpResults): Removed another timeout that we don't know how to
properly handle.
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Removed assignment to
m_errorMessage, which had no effect in this context.
* WebKitTestRunner/TestInvocation.h: Removed no longer used code.
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::cocoaResetStateToConsistentValues): Use a named constant for
no timeout.
* WebKitTestRunner/ios/TestControllerIOS.mm:
(WTR::TestController::platformConfigureViewForTest): Removed a useless timeout.
Not sure if timing out here would corrupt the stack or not, but there is no reason
to impose arbitrary limits on individual steps of a test.
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformConfigureViewForTest): Use a named constant for
no timeout.
2018-02-25 Ali Juma <ajuma@chromium.org>
Unreviewed. Change my status to committer.
* Scripts/webkitpy/common/config/contributors.json:
2018-02-25 Chris Dumez <cdumez@apple.com>
Service workers do not work well inside Web.app
https://bugs.webkit.org/show_bug.cgi?id=183105
<rdar://problem/37864140>
Reviewed by Youenn Fablet.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2018-02-25 Aakash Jain <aakash_jain@apple.com>
[build.webkit.org] unit-tests fail if buildbot 0.8.6p1 is not installed locally
https://bugs.webkit.org/show_bug.cgi?id=183103
Reviewed by Alexey Proskuryakov.
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py: Removed extra imports.
2018-02-24 Wenson Hsieh <wenson_hsieh@apple.com>
Unreviewed, fix the TestWebKitAPI build after r228825.
I removed a `>= iOS 11` check in r228825, but forgot that this was also neeed to guard against tvOS and watchOS
builds. This fixes the build by restoring the compile-time guard and also makes it explicit for these platforms.
* TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
2018-02-22 Yusuke Suzuki <utatane.tea@gmail.com>
Remove currentTime() / currentTimeMS()
https://bugs.webkit.org/show_bug.cgi?id=183052
Reviewed by Mark Lam.
* DumpRenderTree/TestRunner.cpp:
(preciseTimeCallback):
* DumpRenderTree/mac/TestRunnerMac.mm:
(TestRunner::setMockGeolocationPosition):
* TestWebKitAPI/Tests/WTF/Condition.cpp:
* TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
* TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
* WebKitTestRunner/GeolocationProviderMock.cpp:
(WTR::GeolocationProviderMock::setPosition):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::preciseTime):
2018-02-22 Yusuke Suzuki <utatane.tea@gmail.com>
Remove sleep(double) and sleepMS(double) interfaces
https://bugs.webkit.org/show_bug.cgi?id=183038
Reviewed by Mark Lam.
* DumpRenderTree/TestNetscapePlugIn/PluginTest.cpp:
(PluginTest::indicateTestFailure):
* DumpRenderTree/TestNetscapePlugIn/Tests/EvaluateJSWithinNPP_New.cpp:
(EvaluteJSWithinNPP_New::NPP_New):
* DumpRenderTree/TestNetscapePlugIn/Tests/InvokeDestroysPluginWithinNPP_New.cpp:
(InvokeDestroysPluginWithinNPP_New::NPP_New):
* DumpRenderTree/TestNetscapePlugIn/Tests/SlowNPPNew.cpp:
* TestWebKitAPI/Tests/WTF/Signals.cpp:
(TEST):
* TestWebKitAPI/Tests/WTF/ThreadGroup.cpp:
(TestWebKitAPI::testThreadGroup):
* TestWebKitAPI/Tests/WTF/WorkQueue.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PictureInPictureDelegate.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/jsconly/PlatformUtilitiesJSCOnly.cpp:
(TestWebKitAPI::Util::sleep):
2018-02-21 Don Olmstead <don.olmstead@sony.com>
[CMake][Win] Use cmakeconfig.h rather than config.h and Platform.h
https://bugs.webkit.org/show_bug.cgi?id=182883
Reviewed by Per Arne Vollan.
* DumpRenderTree/config.h:
* TestWebKitAPI/config.h:
2018-02-21 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Unsafe g_setenv use in MiniBrowser main
https://bugs.webkit.org/show_bug.cgi?id=182978
Reviewed by Carlos Garcia Campos.
setenv (and g_setenv) will randomly crash if called too late.
* MiniBrowser/gtk/main.c:
(main):
2018-02-21 Aakash Jain <aakash_jain@apple.com>
webkitpy NetworkTransaction should retry on URLError
https://bugs.webkit.org/show_bug.cgi?id=182987
Reviewed by Alexey Proskuryakov.
* Scripts/webkitpy/common/net/networktransaction.py:
(NetworkTransaction.run): Retry on urllib2.URLError.
2018-02-21 Ms2ger <Ms2ger@igalia.com>
[WTR][WPE] Correct the process names in TestController.
https://bugs.webkit.org/show_bug.cgi?id=178700
Reviewed by Michael Catanzaro.
Similar to r228731 for GTK.
* Scripts/webkitpy/port/wpe.py:
(WPEPort._get_crash_log): removed the code to convert WebProcess name.
* WebKitTestRunner/TestController.cpp: return the correct process names for WPE.
(WTR::TestController::webProcessName):
(WTR::TestController::networkProcessName):
(WTR::TestController::databaseProcessName):
2018-02-21 Ms2ger <Ms2ger@igalia.com>
[ATK] Remove attributeSet variable from AccessibilityUIElement::attributedStringForRange().
https://bugs.webkit.org/show_bug.cgi?id=183000
Reviewed by Joanmarie Diggs.
It is never initialized, but is passed to atk_attribute_set_free.
This caused a crash in accessibility/content-editable-as-textarea.html on the debug bots.
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::attributedStringForRange):
2018-02-21 Myles C. Maxfield <mmaxfield@apple.com>
[Cocoa] Make system-ui obey the user-installed-font policy
https://bugs.webkit.org/show_bug.cgi?id=182860
<rdar://problem/36158249>
Reviewed by Antti Koivisto.
Create a font, FakeHelvetica-ArmenianCharacter.ttf, which supports a particular Armenian
character which isn't isn't supported by any other font on the system.
* WebKitTestRunner/FakeHelvetica-ArmenianCharacter.ttf:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
2018-02-20 Timothy Horton <timothy_horton@apple.com>
Try to fix the 32-bit build after r228857
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::firstResponderSuppressionForWebView):
2018-02-20 Nan Wang <n_wang@apple.com>
AX: Keyboard focus not following VoiceOver cursor into web content or within web content.
https://bugs.webkit.org/show_bug.cgi?id=182752
<rdar://problem/37518233>
Reviewed by Ryosuke Niwa.
* DumpRenderTree/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::firstResponderSuppressionForWebView):
(WTR::UIScriptController::makeWindowContentViewFirstResponder):
(WTR::UIScriptController::isWindowContentViewFirstResponder const):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::firstResponderSuppressionForWebView):
(WTR::UIScriptController::makeWindowContentViewFirstResponder):
(WTR::UIScriptController::isWindowContentViewFirstResponder const):
* TestRunnerShared/UIScriptContext/UIScriptController.h:
* WebKitTestRunner/mac/UIScriptControllerMac.mm:
(WTR::UIScriptController::firstResponderSuppressionForWebView):
(WTR::UIScriptController::makeWindowContentViewFirstResponder):
(WTR::UIScriptController::isWindowContentViewFirstResponder const):
2018-02-20 Fujii Hironori <Hironori.Fujii@sony.com>
[GTK] jhbuild: Remove gtk-doc
https://bugs.webkit.org/show_bug.cgi?id=182956
Reviewed by Michael Catanzaro.
jhbuild doesn't need to build gtk-doc because major LTS Linux
distributions have gtk-doc v1.25, and
Tools/gtk/install-dependencies installs gtk-doc.
* gtk/jhbuild.modules: Removed gtk-doc.
2018-02-20 Tim Horton <timothy_horton@apple.com>
Introduce HAVE(IOSURFACE_ACCELERATOR)
https://bugs.webkit.org/show_bug.cgi?id=182955
<rdar://problem/37699510>
Reviewed by Sam Weinig.
* DumpRenderTree/ios/PixelDumpSupportIOS.mm:
(createBitmapContextFromWebView):
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::windowSnapshotImage):
2018-02-20 Chris Dumez <cdumez@apple.com>
Provisional load may get committed before receiving the decidePolicyForNavigationResponse response
https://bugs.webkit.org/show_bug.cgi?id=182720
<rdar://problem/37515204>
Reviewed by Alex Christensen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm:
(-[TestAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
(TestWebKitAPI::TEST):
2018-02-20 Nan Wang <n_wang@apple.com>
AX: AOM: Dispatch accessibleclick event
https://bugs.webkit.org/show_bug.cgi?id=180898
<rdar://problem/36086710>
Reviewed by Ryosuke Niwa.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
(WTR::AccessibilityUIElement::syncPress):
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::syncPress):
2018-02-20 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS 11.3 Beta] Can't copy a URL from Safari and paste it into the Gmail app
https://bugs.webkit.org/show_bug.cgi?id=182952
<rdar://problem/37636190>
Reviewed by Tim Horton.
Adds a new iOS copy/paste test that copies an anchor element via action sheet, and checks that upon pasting,
both "text/plain" and "text/uri-list" are provided. Additionally tweaks an existing iOS drag and drop test to
check for the same behavior.
* TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):
2018-02-20 Philippe Normand <pnormand@igalia.com>
[GStreamer][MiniBrowser] Honor GStreamer command line parameters in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=173655
Reviewed by Xabier Rodriguez-Calvar.
The FIXME in GStreamerUtilities.cpp asks to pass the command line
parameters to the GStreamer initialization function.
Based on initial patch by: Vanessa Chipirrás Navalón <vchipirras@igalia.com>
* MiniBrowser/gtk/main.c:
(main): Add the group containing the Gstreamer options that the console displays.
2018-02-19 Fujii Hironori <Hironori.Fujii@sony.com>
[WTR][GTK] crash log backtrace doesn't show symbol names for DatabaseProcess and NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=182953
Reviewed by Carlos Garcia Campos.
* Scripts/webkitpy/port/gtk.py:
(GtkPort._get_crash_log): Removed the code to convert WebProcess name.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::webProcessName): Return the correct program name for GTK+ port.
(WTR::TestController::networkProcessName): Ditto.
(WTR::TestController::databaseProcessName): Ditto.
2018-02-19 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r228696.
The API test added with this change is timing out on macOS.
Reverted changeset:
"Null pointer dereference in
WebPageProxy::urlSchemeHandlerForScheme()"
https://bugs.webkit.org/show_bug.cgi?id=182905
https://trac.webkit.org/changeset/228696
2018-02-16 Ryosuke Niwa <rniwa@webkit.org>
Add an entitlement check for service worker on iOS
https://bugs.webkit.org/show_bug.cgi?id=182865
<rdar://problem/37505903>
Reviewed by Brady Eidson.
Added the service worker entitlements to WebKitTestRunner and TestWebKitAPI on iOS.
* TestWebKitAPI/Configurations/TestWebKitAPI-iOS.entitlements:
* WebKitTestRunner/Configurations/WebKitTestRunnerApp-iOS.entitlements:
* WebKitTestRunner/Configurations/WebKitTestRunnerApp.xcconfig:
* WebKitTestRunner/WebKitTestRunner.xcodeproj/project.pbxproj:
2018-02-16 Youenn Fablet <youenn@apple.com>
Allow specifying which plug-ins are supported
https://bugs.webkit.org/show_bug.cgi?id=182748
Reviewed by Chris Dumez.
Add support for a test runner API to specificy supported plug-ins.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setPluginsAsUnsupported):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::setPluginsAsUnsupported):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
2018-02-16 Per Arne Vollan <pvollan@apple.com>
Implement stopping of run loop in the WebContent process when using NSRunLoop.
https://bugs.webkit.org/show_bug.cgi?id=182499
<rdar://problem/37247424>
Reviewed by Brent Fulgham.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WebProcessTerminate.mm: Added.
(TEST):
2018-02-15 Alexey Proskuryakov <ap@apple.com>
Speed up dSYM generation on build.webkit.org with -gline-tables-only
https://bugs.webkit.org/show_bug.cgi?id=182841
rdar://problem/34579649
Reviewed by Aakash Jain.
Build speed and binary size improvements are so substantial that I'm willing to make
CI builds less suitable for debugging, which is not a common scenario anyway.
Crash logs will still have line numbers in them.
* BuildSlaveSupport/build.webkit.org-config/steps.py: (CompileWebKit.start):
2018-02-15 Don Olmstead <don.olmstead@sony.com>
WebCore headers should not be included relatively within dependent projects
https://bugs.webkit.org/show_bug.cgi?id=182805
Reviewed by Chris Dumez.
* TestWebKitAPI/win/TestWebCoreStubs.cpp:
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
* WebKitTestRunner/InjectedBundle/wpe/AccessibilityControllerWPE.cpp:
* WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp:
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
2018-02-15 Tomas Popela <tpopela@redhat.com>
run-jsc-stress-tests - skip a test if any of the run commands evals to skip
https://bugs.webkit.org/show_bug.cgi?id=182729
If multiple run commands are specified and one of them evals to skip,
then the test is not skipped, because the run is scheduled while
evaluating other commands.
Remember if the test is going to be skipped - if yes, just stop
evaluating the other run commands.
Reviewed by Saam Barati.
* Scripts/run-jsc-stress-tests:
2018-02-14 Charlie Turner <cturner@igalia.com>
Get Garden-O-Matic running again.
https://bugs.webkit.org/show_bug.cgi?id=179089
Reviewed by Carlos Alberto Lopez Perez.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/Trac.js:
(parseCommitData): Author field is not always spelled 'author' these days.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/config.js:
No longer have a 32-bit builder.
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/ui/perf.js:
(ui.perf.View.base.init): createElement has a required parameter these days.
* Scripts/webkitpy/tool/commands/gardenomatic.py:
(GardenOMatic): Override use_globs so that platform lookup in config.js works.
2018-02-14 Don Olmstead <don.olmstead@sony.com>
Remove unused ForwardingHeaders directories from Tools
https://bugs.webkit.org/show_bug.cgi?id=182813
Reviewed by Konstantin Tokarev.
* DumpRenderTree/ForwardingHeaders/runtime/ArrayBufferView.h: Removed.
* DumpRenderTree/ForwardingHeaders/runtime/JSArrayBufferView.h: Removed.
* DumpRenderTree/ForwardingHeaders/runtime/JSExportMacros.h: Removed.
* DumpRenderTree/ForwardingHeaders/runtime/TypedArrayInlines.h: Removed.
* TestWebKitAPI/ForwardingHeaders/WebCore/LayoutUnit.h: Removed.
2018-02-14 Daniel Bates <dabates@apple.com>
Disallow cross-origin subresources from asking for credentials
https://bugs.webkit.org/show_bug.cgi?id=182579
<rdar://problem/36162271>
Reviewed by Andy Estes.
Add test option allowCrossOriginSubresourcesToAskForCredential (defaults to false)
so that tests can toggle between the old behavior and new behavior.
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestOptions.mm:
(TestOptions::TestOptions):
* DumpRenderTree/mac/DumpRenderTree.mm:
(setWebPreferencesForTestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
2018-02-12 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION (r223440): Copying & pasting a list from Microsoft Word to TinyMCE fails
https://bugs.webkit.org/show_bug.cgi?id=182564
Reviewed by Wenson Hsieh.
Updated assertions to make sure the trailing "}" of @list rules is includd in the style, the "style" element
is wrapped by "head" element (not present in the pasted markup since the fragment parsing algorithm strips away),
and the style content is enclosed in "<!--" and "-->".
Also use execCommand('insertHTML', ~) to insert the HTML obtained via dataTransfer.getData instead of innerHTML
to make sure our pasting code preserves the special style element for MSO list quirks.
Finally, added two more test cases for pasting content from Microsoft Word's compatibility mode.
* TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm:
(TEST):
* TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
(TEST):
2018-02-14 Ross Kirsling <ross.kirsling@sony.com>
[Tools] --wincairo should imply --64-bit by default.
https://bugs.webkit.org/show_bug.cgi?id=182753
Reviewed by Daniel Bates.
WinCairo does not currently support 32-bit and `--wincairo` itself should refer to a working platform.
This patch ensures x64 is determined correctly for `build-webkit --no-ninja` and `run-webkit-tests`.
* Scripts/webkitdirs.pm:
(determinePassedArchitecture):
(shouldBuild32Bit):
(determineShouldBuild32Bit):
(determineIsWin64):
* Scripts/webkitpy/common/config/ports.py:
(WinCairoPort.build_webkit_command):
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_wincairo_port):
* Scripts/webkitpy/port/win.py:
(WinCairoPort):
2018-02-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r228431.
https://bugs.webkit.org/show_bug.cgi?id=182766
Regressed CMake build stability (Requested by dolmstead on
#webkit).
Reverted changeset:
"[CMake] Make WebCore headers copies"
https://bugs.webkit.org/show_bug.cgi?id=182512
https://trac.webkit.org/changeset/228431
2018-02-13 Don Olmstead <don.olmstead@sony.com>
[CMake] Make WebCore headers copies
https://bugs.webkit.org/show_bug.cgi?id=182512
Reviewed by Keith Miller.
* DumpRenderTree/CMakeLists.txt:
* DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt:
* DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npapi.h:
* DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npfunctions.h:
* DumpRenderTree/TestNetscapePlugIn/ForwardingHeaders/WebKit/npruntime.h:
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/PlatformWin.cmake:
* TestWebKitAPI/win/TestWebCoreStubs.cpp:
(loadResourceIntoBuffer):
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
* WebKitTestRunner/InjectedBundle/wpe/AccessibilityControllerWPE.cpp:
* WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp:
* WebKitTestRunner/gtk/EventSenderProxyGtk.cpp:
* WebKitTestRunner/wpe/EventSenderProxyWPE.cpp:
2018-02-13 Chris Dumez <cdumez@apple.com>
REGRESSION (r228299): Broke reader mode in Safari
https://bugs.webkit.org/show_bug.cgi?id=182697
<rdar://problem/37399012>
Reviewed by Ryosuke Niwa.
Add API test coverage for responding asynchronously to the decidePolicyForNavigationResponse
delegate.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/AsyncPolicyForNavigationResponse.mm: Added.
(-[TestAsyncNavigationDelegate webView:didFinishNavigation:]):
(-[TestAsyncNavigationDelegate webView:didFailNavigation:withError:]):
(-[TestAsyncNavigationDelegate webView:didFailProvisionalNavigation:withError:]):
(-[TestAsyncNavigationDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[TestAsyncNavigationDelegate webView:decidePolicyForNavigationResponse:decisionHandler:]):
(TestWebKitAPI::TEST):
2018-02-12 John Wilander <wilander@apple.com>
Resource Load Statistics: Classify resources as prevalent based on redirects to other prevalent resources
https://bugs.webkit.org/show_bug.cgi?id=182664
<rdar://problem/37372572>
Reviewed by Brent Fulgham.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStatisticsSubresourceUniqueRedirectFrom):
(WTR::TestRunner::setStatisticsTopFrameUniqueRedirectTo):
(WTR::TestRunner::setStatisticsTopFrameUniqueRedirectFrom):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::setStatisticsSubresourceUniqueRedirectFrom):
(WTR::TestController::setStatisticsTopFrameUniqueRedirectTo):
(WTR::TestController::setStatisticsTopFrameUniqueRedirectFrom):
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
2018-02-12 Ross Kirsling <ross.kirsling@sony.com>
download-latest-github-release .py should not use "browser download URL".
https://bugs.webkit.org/show_bug.cgi?id=182646
Reviewed by Per Arne Vollan.
* Scripts/download-latest-github-release.py:
Download request should be a proper GitHub API call and should actually include the token when applicable.
(Also clean up usage of args and print while we're in here.)
2018-02-12 Per Arne Vollan <pvollan@apple.com>
EWS should run Windows tests.
https://bugs.webkit.org/show_bug.cgi?id=177967
Reviewed by Lucas Forschler.
This will help catch regressions at an early stage.
* Scripts/webkitpy/common/config/ews.json:
2018-02-08 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION (r223440): Copying & pasting a list from Microsoft Word to TinyMCE fails
https://bugs.webkit.org/show_bug.cgi?id=182564
Reviewed by Wenson Hsieh.
Added tests for pasting HTML with list items generated by Microsoft Word as well as HTML which looks like
the one generated by Microsoft Word but missing a proper "html" element at the beginning.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm: Added test cases.
* TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm: Added test cases.
(msoListMarkupWithoutProperHTMLElement): Added.
* TestWebKitAPI/Tests/WebKitCocoa/mso-list.html: Added.
2018-02-09 Don Olmstead <don.olmstead@sony.com>
[CMake] Make PAL headers copies
https://bugs.webkit.org/show_bug.cgi?id=182645
Reviewed by Alex Christensen.
* TestWebKitAPI/CMakeLists.txt:
2018-02-08 Wenson Hsieh <wenson_hsieh@apple.com>
Pasting from Excel no longer provides text/html data
https://bugs.webkit.org/show_bug.cgi?id=182636
<rdar://problem/37087060>
Reviewed by Ryosuke Niwa.
Add new API tests to exercise pasting images with various other content types on macOS, and when dropping images
and HTML markup on iOS. See the WebCore ChangeLog for more detail.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/DataTransfer.html: Added.
Add a new API test harness that dumps various bits of information about a DataTransfer upon paste and drop.
While somewhat similar to some existing harnesses, this makes a distinction between the raw HTML data on the
pasteboard and the actual result of inserting said HTML into the DOM. This allows us to check that the HTML has
been sanitized, while making checks for the actual content of the HTML robust against inline style changes.
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
* TestWebKitAPI/Tests/WebKitCocoa/PasteMixedContent.mm: Added.
Add a new test suite to exercise pasting mixed content types. In these test cases, the pasteboard contains a
file, with some combination of plain text, rich text, and URLs.
(imagePath):
(writeTypesAndDataToPasteboard):
Add a helper to write a var-arg list of content types and data to the general NSPasteboard.
(setUpWebView):
(markupString):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::testIconImageData):
(TestWebKitAPI::TEST):
* TestWebKitAPI/cocoa/TestWKWebView.h:
Move a private declaration of -[WKWebView paste:] out to TestWKWebView.h, so that it can be shared across
multiple tests. Currently, it only resides in PasteImage.mm, but I need it in PasteMixedContent.mm as well.
2018-02-09 Carlos Garcia Campos <cgarcia@igalia.com>
Add a way to check if a host is an IP address
https://bugs.webkit.org/show_bug.cgi?id=182427
Reviewed by Alex Christensen.
Add unit test for URL::hostIsIPAddress().
* TestWebKitAPI/Tests/WebCore/URL.cpp:
(TestWebKitAPI::TEST_F):
2018-02-09 Philippe Normand <pnormand@igalia.com>
[GStreamer] Layout test fast/replaced/border-radius-clip.html crashes with GStreamer-CRITICAL **: gst_segment_to_stream_time: assertion 'segment->format == format' failed in gst_segment_to_stream_time()
https://bugs.webkit.org/show_bug.cgi?id=176802
Reviewed by Xabier Rodriguez-Calvar.
* gstreamer/jhbuild.modules:
* gstreamer/patches/gst-plugins-good-0001-gstgdkpixbufdec-stop-pretending-to-decode-gifs.patch: Added.
2018-02-09 Philippe Normand <pnormand@igalia.com>
[JHBuild] Update Mesa to version 17
https://bugs.webkit.org/show_bug.cgi?id=182599
Reviewed by Carlos Alberto Lopez Perez.
* gtk/jhbuild.modules: Update Mesa (and its dependencies, hopefully) to version 17.3.3.
2018-02-08 Chris Dumez <cdumez@apple.com>
There should be a way to disable [OverrideBuiltins] behavior in a given DOMWrapperWorld
https://bugs.webkit.org/show_bug.cgi?id=182524
<rdar://problem/9057327>
Reviewed by Ryosuke Niwa.
Add API test coverage.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior.cpp: Added.
(TestWebKitAPI::runJavaScriptAlert):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit/InjectedBundleDisableOverrideBuiltinsBehavior_Bundle.cpp: Added.
(TestWebKitAPI::InjectedBundleDisableOverrideBuiltinsBehaviorTest::InjectedBundleDisableOverrideBuiltinsBehaviorTest):
(TestWebKitAPI::InjectedBundleDisableOverrideBuiltinsBehaviorTest::initialize):
* TestWebKitAPI/Tests/WebKit/override-builtins-test.html: Added.
2018-02-08 Michael Catanzaro <mcatanzaro@igalia.com>
TestController should not exercise cocoa-specific resource load statistics APIs
https://bugs.webkit.org/show_bug.cgi?id=182355
Reviewed by Alex Christensen.
Remove unnecessary use of platform-specific APIs in the TestController, since there are
cross-platform APIs to do the same thing.
Also, ensure callbacks execute before returning from TestController's functions, since
otherwise the tests are guaranteed to be flaky at best, and also since there's nothing to
prevent the TestController from being destroyed before the callbacks execute.
* WebKitTestRunner/TestController.cpp:
(WTR::resourceStatisticsVoidResultCallback):
(WTR::resourceStatisticsBooleanResultCallback):
(WTR::TestController::isStatisticsPrevalentResource):
(WTR::TestController::isStatisticsRegisteredAsSubFrameUnder):
(WTR::TestController::isStatisticsRegisteredAsRedirectingTo):
(WTR::TestController::isStatisticsHasHadUserInteraction):
(WTR::TestController::isStatisticsGrandfathered):
(WTR::TestController::statisticsUpdateCookiePartitioning):
(WTR::TestController::statisticsSetShouldPartitionCookiesForHost):
(WTR::TestController::statisticsClearInMemoryAndPersistentStore):
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
(WTR::TestController::statisticsClearThroughWebsiteDataRemoval):
(WTR::resourceStatisticsCallback): Deleted.
(WTR::TestController::statisticsClearThroughWebsiteDataRemovalCallback): Deleted.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::toNSString): Deleted.
(WTR::TestController::setStatisticsLastSeen): Deleted.
(WTR::TestController::setStatisticsPrevalentResource): Deleted.
(WTR::TestController::isStatisticsPrevalentResource): Deleted.
(WTR::TestController::isStatisticsRegisteredAsSubFrameUnder): Deleted.
(WTR::TestController::isStatisticsRegisteredAsRedirectingTo): Deleted.
(WTR::TestController::setStatisticsHasHadUserInteraction): Deleted.
(WTR::TestController::setStatisticsHasHadNonRecentUserInteraction): Deleted.
(WTR::TestController::isStatisticsHasHadUserInteraction): Deleted.
(WTR::TestController::setStatisticsGrandfathered): Deleted.
(WTR::TestController::isStatisticsGrandfathered): Deleted.
(WTR::TestController::setStatisticsSubframeUnderTopFrameOrigin): Deleted.
(WTR::TestController::setStatisticsSubresourceUnderTopFrameOrigin): Deleted.
(WTR::TestController::setStatisticsSubresourceUniqueRedirectTo): Deleted.
(WTR::TestController::setStatisticsTimeToLiveUserInteraction): Deleted.
(WTR::TestController::setStatisticsTimeToLiveCookiePartitionFree): Deleted.
(WTR::TestController::statisticsProcessStatisticsAndDataRecords): Deleted.
(WTR::TestController::statisticsUpdateCookiePartitioning): Deleted.
(WTR::TestController::statisticsSetShouldPartitionCookiesForHost): Deleted.
(WTR::TestController::statisticsSubmitTelemetry): Deleted.
(WTR::TestController::setStatisticsNotifyPagesWhenDataRecordsWereScanned): Deleted.
(WTR::TestController::setStatisticsShouldClassifyResourcesBeforeDataRecordsRemoval): Deleted.
(WTR::TestController::setStatisticsNotifyPagesWhenTelemetryWasCaptured): Deleted.
(WTR::TestController::setStatisticsMinimumTimeBetweenDataRecordsRemoval): Deleted.
(WTR::TestController::setStatisticsGrandfatheringTime): Deleted.
(WTR::TestController::setStatisticsMaxStatisticsEntries): Deleted.
(WTR::TestController::setStatisticsPruneEntriesDownTo): Deleted.
(WTR::TestController::statisticsClearInMemoryAndPersistentStore): Deleted.
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours): Deleted.
(WTR::TestController::statisticsClearThroughWebsiteDataRemoval): Deleted.
(WTR::TestController::statisticsResetToConsistentState): Deleted.
2018-02-08 Jonathan Bedard <jbedard@apple.com>
webkit-patch suggest-reviewers dies with AttributeError: 'NoneType' object has no attribute 'revision'
https://bugs.webkit.org/show_bug.cgi?id=182584
Reviewed by Daniel Bates.
It is possible that a specific revision has an empty ChangeLog. In this case, Checkout.commit_info_for_revision
will return 'None'. Checkout.recent_commit_infos_for_files should never return a set with 'None' in it.
* Scripts/webkitpy/common/checkout/checkout.py:
(Checkout.recent_commit_infos_for_files): Remove any empty commit information from the set.
* Scripts/webkitpy/common/checkout/checkout_unittest.py: Add a file which references an empty ChangeLog.
2018-02-08 Matt Lewis <jlewis3@apple.com>
Unreviewed, rolling out r228261.
This broke an internal build
Reverted changeset:
"Add a way to check if a host is an IP address"
https://bugs.webkit.org/show_bug.cgi?id=182427
https://trac.webkit.org/changeset/228261
2018-02-08 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r228267, r228268, and r228269.
https://bugs.webkit.org/show_bug.cgi?id=182601
jhbuild socks (Requested by philn on #webkit).
Reverted changesets:
"[JHBuild] Update Mesa to version 17"
https://bugs.webkit.org/show_bug.cgi?id=182599
https://trac.webkit.org/changeset/228267
"Unreviewed, GTK build fix attempt after r228267."
https://trac.webkit.org/changeset/228268
"Unreviewed, final GTK build fix attempt after r228267."
https://trac.webkit.org/changeset/228269
2018-02-08 Philippe Normand <pnormand@igalia.com>
Unreviewed, final GTK build fix attempt after r228267.
* gtk/jhbuild.modules: sha256sum for libdrm was for the tar.gz archive. Oops.
2018-02-08 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK build fix attempt after r228267.
* gtk/jhbuild.modules: Update to libdrm version 2.4.89, Mesa 17 requires at least version 2.4.75.
2018-02-08 Philippe Normand <pnormand@igalia.com>
[JHBuild] Update Mesa to version 17
https://bugs.webkit.org/show_bug.cgi?id=182599
Reviewed by Carlos Alberto Lopez Perez.
* gtk/jhbuild.modules: Update Mesa to version 17.3.3.
2018-02-05 Carlos Garcia Campos <cgarcia@igalia.com>
Add a way to check if a host is an IP address
https://bugs.webkit.org/show_bug.cgi?id=182427
Reviewed by Alex Christensen.
Add unit test for URL::hostIsIPAddress().
* TestWebKitAPI/Tests/WebCore/URL.cpp:
(TestWebKitAPI::TEST_F):
2018-02-07 Tim Horton <timothy_horton@apple.com>
Evernote device management web view sometimes displays at the wrong scale
https://bugs.webkit.org/show_bug.cgi?id=182590
<rdar://problem/36633687>
Reviewed by Simon Fraser.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/ios/WKScrollViewDelegate.mm: Renamed from Tools/TestWebKitAPI/Tests/ios/WKScrollViewDelegateCrash.mm.
(-[TestDelegateForScrollView dealloc]):
(TestWebKitAPI::TEST):
(-[WKScrollViewDelegateWithViewForZoomingOverridden viewForZoomingInScrollView:]):
Add a test that failed before the change that ensures that we don't
consult the external delegate for viewForZoomingInScrollView:, and that
we succesfully update the scale even if it matches that of the view
the external delegate returns for viewForZoomingInScrollView:.
2018-02-07 Wenson Hsieh <wenson_hsieh@apple.com>
REGRESSION(r226396): File paths are inserted when dropping image files
https://bugs.webkit.org/show_bug.cgi?id=182557
<rdar://problem/37294120>
Reviewed by Ryosuke Niwa.
Tweak some image pasting API tests to ensure that file paths are not inserted when pasting images backed by
file paths on disk.
* TestWebKitAPI/Tests/WebKitCocoa/PasteImage.mm:
(TEST):
2018-02-07 Ms2ger <Ms2ger@igalia.com>
[GTK] Enable WebKit.GeolocationTransitionTo{High,Low}Accuracy tests
https://bugs.webkit.org/show_bug.cgi?id=125068
Unreviewed test gardening.
They do not appear to have failed since we started running them again in r226944.
* TestWebKitAPI/glib/TestExpectations.json:
2018-02-07 Ms2ger <Ms2ger@igalia.com>
[GTK] Enable WebKit.InjectedBundleFrameHitTest test
https://bugs.webkit.org/show_bug.cgi?id=120303
Unreviewed test gardening.
It does not appear to have failed since we started running it again in r226944.
* TestWebKitAPI/glib/TestExpectations.json:
2018-02-07 Ms2ger <Ms2ger@igalia.com>
[GTK] Enable WebKit.ForceRepaint test
https://bugs.webkit.org/show_bug.cgi?id=105532
Unreviewed test gardening.
It does not appear to have failed since we started running it again in r226944.
* TestWebKitAPI/glib/TestExpectations.json:
2018-02-07 Philippe Normand <pnormand@igalia.com>
[JHBuild] Add libva in moduleset
https://bugs.webkit.org/show_bug.cgi?id=182384
Reviewed by Xabier Rodriguez-Calvar.
* gstreamer/jhbuild.modules: Add libva and disable spurious message output.
* gtk/install-dependencies: Remove libva from dependencies.
* wpe/install-dependencies: Ditto.
2018-02-07 Ms2ger <Ms2ger@igalia.com>
[GTK] Enable WebKit.NewFirstVisuallyNonEmptyLayoutFrames test
https://bugs.webkit.org/show_bug.cgi?id=85037
Unreviewed test gardening.
It does not appear to have failed since we started running it again in r226944.
* TestWebKitAPI/glib/TestExpectations.json:
2018-02-06 Leo Balter <leonardo.balter@gmail.com>
Nit fix for ruby script called through Perl
https://bugs.webkit.org/show_bug.cgi?id=182552
Reviewed by Yusuke Suzuki.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunTest262Tests):
2018-02-06 Don Olmstead <don.olmstead@sony.com>
Remove WebCore/ForwardingHeaders directory
https://bugs.webkit.org/show_bug.cgi?id=182347
Reviewed by Keith Miller.
* WebKitTestRunner/TestController.cpp:
2018-02-06 Ross Kirsling <ross.kirsling@sony.com>
webkit-patch upload should ask for confirmation before creating a new bug
https://bugs.webkit.org/show_bug.cgi?id=182551
Reviewed by Daniel Bates.
It is quite easy to paste unintended text into the bug number prompt. This creates a junk bug with an uneditable
first comment, which could result in embarrassment or potentially even a proprietary information leak.
* Scripts/webkitpy/tool/commands/upload_unittest.py:
(test_prepare):
* Scripts/webkitpy/tool/steps/promptforbugortitle.py:
(PromptForBugOrTitle):
(PromptForBugOrTitle.options):
(PromptForBugOrTitle.run):
2018-02-06 Youenn Fablet <youenn@apple.com>
HasServiceWorkerRegistration bit should be sent when creating a new page
https://bugs.webkit.org/show_bug.cgi?id=182410
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2018-02-06 Andres Gomez <agomez@igalia.com>
[GTK][WPE] Add dependencies watching lists for WKGTK+ and WPE
https://bugs.webkit.org/show_bug.cgi?id=182346
Reviewed by Michael Catanzaro.
Loren, Carlos and Andres are interested on the WKGTK+ dependencies
watchlist since they are running WKGTK+ EWS.
Similarly, Adrian and Carlos are running a WPE EWS.
* Scripts/webkitpy/common/config/watchlist: Added WPEDependencies
and WebKitGTKDependencies watchlists with the proper people.
2018-02-06 Andres Gomez <agomez@igalia.com>
Unreviewed, canonicalize contributors.json
After Thibault's addition, automatic checks complain about
contributors.json with:
"[...] Use "validate-committer-lists --canonicalize" to reformat
it. [...]"
* Scripts/webkitpy/common/config/contributors.json: Canonicalize.
2018-02-06 Andres Gomez <agomez@igalia.com>
Unreviewed, add Lorenzo Tilve to contributors.json
We need to add Loren to the contributors list in order to CC him
in Bugzilla.
* Scripts/webkitpy/common/config/contributors.json: Added Lorenzo
Tilve.
2018-02-05 Yousuke Kimoto <yousuke.kimoto@sony.com>
[WinCairo] Refine WebKitLegacy and WebKit build for wincairo
https://bugs.webkit.org/show_bug.cgi?id=182478
Reviewed by Alex Christensen.
For TestWebKitAPI, sources related to WebKitLegacy are built
at WebKit build. Those files should be reffered for WebKitLegacy build.
* TestWebKitAPI/PlatformWin.cmake:
2018-02-05 Daniel Bates <dabates@apple.com>
REGRESSION (r217572): run-webkit-tests exits without emitting newline character
https://bugs.webkit.org/show_bug.cgi?id=182360
Rubber-stamped by Aakash Jain.
Fixes an annoyance where run-webkit-tests always exits without printing a newline character.
In the terminal this looks like:
$ Tools/Scripts/run-webkit-tests
Expected to fail, but passed: (7)
...
Stopping WebSocket server ...$
This bug was caused by code added in r217572 to stop all run-webkit-tests started servers (e.g. an HTTP
server) from an at-exit handler. When run-webkit-tests runs successfully (i.e. without error or
control-C interruption) we would stop all such servers twice: once as part of ending the test
run and once from the at-exit handler. The latter never prints a trailing newline character hence
the state of the terminal (as depicted above). Instead LayoutTestRunner.stop_servers() should only
stop servers that it started in LayoutTestRunner.start_servers().
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py:
(LayoutTestRunner.__init__):
(LayoutTestRunner.start_servers):
(LayoutTestRunner.stop_servers):
Only start servers that run-webkit-tests has not already started and only stop servers that
run-webkit-tests started.
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
(LayoutTestRunnerTests.test_servers_started.is_websocket_server_running):
(LayoutTestRunnerTests.test_servers_started):
(LayoutTestRunnerTests.test_servers_started.is_websocket_servers_running): Deleted.
Update due to rename below.
* Scripts/webkitpy/layout_tests/servers/websocket_server.py:
(is_web_socket_server_running): Added.
(PyWebSocket.is_running): Deleted.
* Scripts/webkitpy/port/base.py:
(Port.is_http_server_running): Check if we already started the server ourself.
(Port.is_websocket_server_running): Formerly named is_websocket_servers_running. Modified
to check if we already started the server ourself. Take a similar approach as the other
Port.is_*_running methods and only check if an existing WebSocket server is running on the
non-secure server port. This is a simple heuristic and should be sufficient in practice.
(Port.is_wpt_server_running): Check if we already started the server ourself.
(Port.is_websocket_servers_running): Deleted; renamed to is_websocket_server_running().
2018-02-05 Daniel Bates <dabates@apple.com>
prepare-ChangeLog gets confused about Python docstrings that contain the word "class" or "def"
https://bugs.webkit.org/show_bug.cgi?id=182405
Reviewed by David Kilzer.
String literal statements, including docstrings, do not demarcate a new scope in Python.
So, do not treat them like they do when building up the list of modified functions.
* Scripts/prepare-ChangeLog:
(get_function_line_ranges_for_python):
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests-expected.txt:
The expected ending line number for the last "pass" statement inside the scope of Class5 changed
from 97 to 98 because empty lines do not effect scope. This is consistent with the parsing
of the second "pass" statement in the scope of class Class5. A "pass" is a null operation that
is used as a syntactic placeholder when a statement is required. Ideally we would make
the parsing code smarter so as to avoid emitting ranges for "pass" statements that serve
not syntactic purpose.
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/python_unittests.py:
(Class5):
(Class6):
(Class6.__init__):
(Class7):
(Class7.__init__):
(Class8):
(Class8.__init__):
Add some more tests.
2018-02-05 Matt Lewis <jlewis3@apple.com>
Unreviewed, rolling out r228086.
This introduced a failure with API test
URLTest.HostIsIPAddress.
Reverted changeset:
"Add a way to check if a host is an IP address"
https://bugs.webkit.org/show_bug.cgi?id=182427
https://trac.webkit.org/changeset/228086
2018-02-05 John Wilander <wilander@apple.com>
Storage Access API: Add testRunner.getAllStorageAccessEntries() to make testing easier and more explicit
https://bugs.webkit.org/show_bug.cgi?id=181601
<rdar://problem/36475837>
Reviewed by Alex Christensen.
http/tests/storageAccess/request-and-grant-access-then-detach-should-not-have-access.html
was found to be flaky. With the testRunner.hasStorageAccessEntry() getter
it's possible to check access even if a frame doesn't respond timely to
postMessage after detach and attach.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setStorageAccessAPIEnabled):
Just moved for source file grouping.
(WTR::TestRunner::getAllStorageAccessEntries):
(WTR::TestRunner::callDidReceiveAllStorageAccessEntriesCallback):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::getAllStorageAccessEntries):
Note that this is just stubbed out, i.e. not implemented.
* WebKitTestRunner/TestController.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
(WTR::TestInvocation::didReceiveAllStorageAccessEntries):
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::getAllStorageAccessEntries):
This is the Cocoa-specific version of this test infrastructure.
2018-02-05 Basuke Suzuki <Basuke.Suzuki@sony.com>
[Win] Enable multi CPU building on MSBuild.
https://bugs.webkit.org/show_bug.cgi?id=182446
Compiling itself already uses multi cores, but other stuff is still on single core.
This patch enables that by passing an argument to MSBuild.exe.
Reviewed by Alex Christensen.
* Scripts/webkitdirs.pm:
(determineNumberOfCPUs):
(buildVisualStudioProject):
2018-02-05 Alicia Boya García <aboya@igalia.com>
Fix bug in MediaTime comparison for negative values with different scale.
https://bugs.webkit.org/show_bug.cgi?id=182433
Improved test coverage for MediaTime::compare().
Reviewed by Xabier Rodriguez-Calvar.
* TestWebKitAPI/Tests/WTF/MediaTime.cpp:
(TestWebKitAPI::TEST):
2018-02-05 Carlos Garcia Campos <cgarcia@igalia.com>
[SOUP] WebSockets must use system proxy settings
https://bugs.webkit.org/show_bug.cgi?id=126384
Reviewed by Michael Catanzaro.
Check also WebSockets in /webkit2/WebKitWebContext/proxy.
* TestWebKitAPI/Tests/WebKitGLib/TestWebKitWebContext.cpp:
(ProxyTest::webSocketProxyServerCallback):
(ProxyTest::ProxyTest):
(ProxyTest::webSocketConnected):
(ProxyTest::createWebSocketAndWaitUntilConnected):
(webSocketServerCallback):
(testWebContextProxySettings):
* TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp:
(WebKitTestServer::~WebKitTestServer):
(WebKitTestServer::addWebSocketHandler):
(WebKitTestServer::removeWebSocketHandler):
(WebKitTestServer::getWebSocketURIForPath const):
(WebKitTestServer::getURIForPath const):
* TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.h:
(WebKitTestServer::baseURI const):
(WebKitTestServer::baseWebSocketURI const):
2018-02-05 Carlos Garcia Campos <cgarcia@igalia.com>
Add a way to check if a host is an IP address
https://bugs.webkit.org/show_bug.cgi?id=182427
Reviewed by Alex Christensen.
Add unit test for URL::hostIsIPAddress().
* TestWebKitAPI/Tests/WebCore/URL.cpp:
(TestWebKitAPI::TEST_F):
2018-02-03 Charlie Turner <cturner@igalia.com>
Add libmount to WPE dependencies
https://bugs.webkit.org/show_bug.cgi?id=182345
Reviewed by Michael Catanzaro.
* wpe/install-dependencies:
2018-02-02 Youenn Fablet <youenn@apple.com>
W3C test exporter should allow exporting newly added files
https://bugs.webkit.org/show_bug.cgi?id=182369
Reviewed by Ryosuke Niwa.
* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.apply_mail_patch):
2018-02-02 David Quesada <david_quesada@apple.com>
WebAppManifest scope should default to the containing directory of start_url if 'scope' is not specified
https://bugs.webkit.org/show_bug.cgi?id=182363
rdar://problem/37093498
Reviewed by Ryosuke Niwa.
Updated ApplicationManifestParserTests to account for the new default scope behavior.
* TestWebKitAPI/Tests/WebCore/ApplicationManifestParser.cpp:
(assertManifestHasDefaultValues):
(TEST_F):
2018-02-02 Youenn Fablet <youenn@apple.com>
Clearing all service worker registrations should wait for importing service worker registration to finish
https://bugs.webkit.org/show_bug.cgi?id=182407
Reviewed by Chris Dumez.
Make sure we finish clearing service worker registrations before running tests.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetStateToConsistentValues):
(WTR::ClearServiceWorkerRegistrationsCallbackContext::ClearServiceWorkerRegistrationsCallbackContext):
(WTR::clearServiceWorkerRegistrationsCallback):
(WTR::TestController::clearServiceWorkerRegistrations):
* WebKitTestRunner/TestController.h:
2018-02-02 Youenn Fablet <youenn@apple.com>
Configure serviceWorkerRegistrationDirectory on the web site data store and move it to a Caches subfolder as a default
https://bugs.webkit.org/show_bug.cgi?id=182403
Reviewed by Alex Christensen.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::generateContextConfiguration const):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::initializeWebViewConfiguration):
2018-02-02 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebDriver: tests step always times out in the bot
https://bugs.webkit.org/show_bug.cgi?id=182437
Reviewed by Carlos Alberto Lopez Perez.
The process itself is not timing out, but the buildbot step is. This is because we are leaking the Xvfb
processes. We should ensure that only one driver is executed and it's stopped before the process finishes.
* Scripts/run-webdriver-tests: Call teardown() after run().
* Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:
(WebDriverSeleniumExecutor.__init__): Receive the env directly instead of the display driver.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:
(WebDriverTestRunner.__init__): Use the driver class directly instead of using the DriverProxy. Get the env from
the display driver once and pass it to the test runners.
(WebDriverTestRunner.teardown): Stop the display server.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py:
(WebDriverTestRunnerSelenium.__init__): Receive the env directly instead of the display driver.
(WebDriverTestRunnerSelenium.collect_tests): Pass the env to the executor.
(WebDriverTestRunnerSelenium.run): Ditto.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py:
(WebDriverTestRunnerW3C.__init__): Receive the env directly instead of the display driver.
(WebDriverTestRunnerW3C.run): Pass the env to the executor.
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
(WebDriverW3CExecutor.__init__): Receive the env directly instead of the display driver.
2018-02-02 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed, rolling out r227999.
It didn't fix the problem
Reverted changeset:
"Unreviewed. Try to avoid webdriver tests step timing out in
the bots."
https://trac.webkit.org/changeset/227999
2018-02-02 Carlos Alberto Lopez Perez <clopez@igalia.com>
Start timeout for the run-buildbot-test script is too aggressive
https://bugs.webkit.org/show_bug.cgi?id=182429
Reviewed by Carlos Garcia Campos.
15 seconds is not enough waiting for the update database process
to complete on a system backed with rotational HDDs. Raise it to 60.
* BuildSlaveSupport/build.webkit.org-config/run-buildbot-test.py:
(wait_for_master_ready):
2018-02-02 Carlos Alberto Lopez Perez <clopez@igalia.com>
re-add ARM JSCOnly bots on buildbot waterfall
https://bugs.webkit.org/show_bug.cgi?id=182428
Reviewed by Csaba Osztrogonác.
* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
2018-02-02 Csaba Osztrogonác <ossy@webkit.org>
Remove ARM JSCOnly bots from buildbot waterfall
https://bugs.webkit.org/show_bug.cgi?id=182398
Reviewed by Alexey Proskuryakov.
* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
2018-02-02 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Try to avoid webdriver tests step timing out in the bots.
This is another speculative workaround. Carlos Lopez suggested to use os._exit() instead of sys.exit() as a
workaround for a bug in python2.7 when using multiprocess module.
* Scripts/run-webdriver-tests:
2018-02-01 Youenn Fablet <youenn@apple.com>
Delay service worker process creation until actually needed by SWServer
https://bugs.webkit.org/show_bug.cgi?id=182301
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
(function):
2018-02-01 Aakash Jain <aakash_jain@apple.com>
Bubbles intermittently disappear from bot watchers dashboard
https://bugs.webkit.org/show_bug.cgi?id=182085
Reviewed by Alexey Proskuryakov.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype.failureLogURL): failureLogURL doesn't depend on step in Buildbot 0.9.
Return the Build Page URL for Buildbot Buildbot 0.9. Earlier code was also doing the same using a
confusing if (!this._firstFailedStep.logs) statement which is always false for Buildbot 0.9.
2018-02-01 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Problem with Washington Post images
https://bugs.webkit.org/show_bug.cgi?id=181421
Reviewed by Carlos Alberto Lopez Perez.
Add test case for the new user agent quirk.
* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp:
(TestWebKitAPI::TEST):
2018-02-01 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] MiniBrowser settings are just a list of names
https://bugs.webkit.org/show_bug.cgi?id=182005
Reviewed by Sergio Villar Senin.
The default size we are using is too small to show the values column, and the window is not resizable because
GObjectClass::constructed() is not called in the parent class.
* MiniBrowser/gtk/BrowserSettingsDialog.c:
(browser_settings_dialog_init): Use 600x400 as default size.
(browserSettingsDialogConstructed): Chain up to parent constructed.
2018-01-31 Andres Gomez <agomez@igalia.com>
Unreviewed. Remove WebInspectorUI watchlist and remove myself from 2 watchlists more
* Scripts/webkitpy/common/config/watchlist:
2018-01-31 Per Arne Vollan <pvollan@apple.com>
Layout Test fast/events/beforeunload-dom-manipulation-crash.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=181204
<rdar://problem/36256274>
Reviewed by Ryosuke Niwa.
Implement 'testRunner.forceImmediateCompletion()' for WK1.
* DumpRenderTree/TestRunner.cpp:
(forceImmediateCompletionCallback):
(TestRunner::staticFunctions):
2018-01-31 Alex Christensen <achristensen@webkit.org>
Unreviewed, rolling out r227942.
r227875 should not have been rolled out.
Reverted changeset:
"Unreviewed, rolling out r227875."
https://bugs.webkit.org/show_bug.cgi?id=182357
https://trac.webkit.org/changeset/227942
2018-01-31 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed, rolling out r227875.
https://bugs.webkit.org/show_bug.cgi?id=182357
Missing cross-platform TestController implementation
Reverted changeset:
"Add callbacks to testRunner.statisticsSetShouldPartitionCookiesForHost() and testRunner.statisticsUpdateCookiePartitioning()"
https://bugs.webkit.org/show_bug.cgi?id=181958
https://trac.webkit.org/changeset/227875
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::statisticsUpdateCookiePartitioning):
(WTR::TestRunner::statisticsSetShouldPartitionCookiesForHost):
(WTR::TestRunner::statisticsCallDidSetPartitionOrBlockCookiesForHostCallback): Deleted.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didSetPartitionOrBlockCookiesForHost): Deleted.
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::statisticsUpdateCookiePartitioning):
(WTR::TestController::statisticsSetShouldPartitionCookiesForHost):
2018-01-31 Michael Catanzaro <mcatanzaro@igalia.com>
REGRESSION(r227223): http/tests/resourceLoadStatistics/clear-in-memory-and-persistent-store-one-hour.html, http/tests/resourceLoadStatistics/grandfathering.html timing out on GTK, WPE
https://bugs.webkit.org/show_bug.cgi?id=182222
Reviewed by Alex Christensen.
Use the new API to notify when resource load statistics deletion is complete.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::statisticsClearThroughWebsiteDataRemovalCallback):
(WTR::TestController::statisticsClearInMemoryAndPersistentStore):
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
2018-01-31 Ryosuke Niwa <rniwa@webkit.org>
Add the support for running StyleBench to run-benchmark
https://bugs.webkit.org/show_bug.cgi?id=182323
Reviewed by Antti Koivisto.
Added the plan file and the patch needed to run StyleBench using run-benchmark as of r227863.
* Scripts/webkitpy/benchmark_runner/data/patches/webserver/StyleBench.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/stylebench.plan: Added.
2018-01-31 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS WK2] API test DataInteractionTests.ExternalSourceDataTransferItemGetFolderAsEntry is failing after an SDK update
https://bugs.webkit.org/show_bug.cgi?id=182339
<rdar://problem/36041396>
Reviewed by Andy Estes.
This API test wasn't meant to be dependent on the size of an image generated using UIImagePNGRepresentation().
To make this test robust against changes to image encoding, write the raw data to the test folder instead and
check against the length of the data written.
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(testIconImageData):
(runTestWithTemporaryFolder):
(TestWebKitAPI::TEST):
2018-01-31 Dan Bernstein <mitz@apple.com>
[macOS] MiniBrowser isn’t app-sandboxed
https://bugs.webkit.org/show_bug.cgi?id=182147
Reviewed by Sam Weinig.
Enable App Sandbox and add a temporary exception allowing read access to all files.
* MiniBrowser/Configurations/Base.xcconfig: Enabled ad-hoc code signing.
* MiniBrowser/Configurations/MiniBrowser.xcconfig: Specified the entitlements file to use.
* MiniBrowser/MiniBrowser.entitlements: Added. Enables App Sandbox with outbound networking
and read access from /.
* MiniBrowser/MiniBrowser.xcodeproj/project.pbxproj: Added reference to new file.
2018-01-31 Philippe Normand <pnormand@igalia.com>
[JHBuild] Add gstreamer-vaapi in moduleset
https://bugs.webkit.org/show_bug.cgi?id=182283
Reviewed by Carlos Alberto Lopez Perez.
GStreamer-VAAPI is required for hardware-accelerated video
playback support on Intel and AMD (using radeosi driver)
platforms.
* gstreamer/jhbuild.modules: Add gstreamer-vaapi.
* gtk/install-dependencies: Install libva.
* wpe/install-dependencies: Ditto.
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server): Disable va-api support when
testing because it's incompatible with Mesa's softGL driver.
2018-01-31 Charlie Turner <cturner@igalia.com>
[WPE] Update jhbuild dependencies
https://bugs.webkit.org/show_bug.cgi?id=182286
This upgrades the following packages,
glib 2.44.1 -> 2.54.3
glib-networking 2.42.0 -> 2.54.1
libsoup 2.48.0 -> 2.60.3
The initial reason for performing these upgrades was that when
visiting https://youtube.com, WPE was getting TLS certificate
errors. After upgrading glib-networking, these were fixed, but the
upgrade introduced dependencies on newer versions of the other
packages upgraded in this commit.
The upgrade to glib caused a linking error in gstreamer, the
following errors were being logged during linking,
//usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined reference to `hb_glib_script_from_script'
//usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined reference to `hb_glib_get_unicode_funcs'
//usr/lib/x86_64-linux-gnu/libpangoft2-1.0.so.0: undefined reference to `hb_glib_script_to_script'
This was fixed by adding the glib package built in the jhbuild to
harfbuzz.
Finally, the upgrade of glib caused the glib-warning-fix.patch to
no longer apply, so this patch was removed.
Reviewed by Michael Catanzaro.
* wpe/jhbuild.modules: Added dependecies.
* wpe/patches/glib-warning-fix.patch: Removed.
2018-01-31 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed, rolling out r227782.
It didn't fix the problem
Reverted changeset:
"Unreviewed. Try to avoid webdriver tests step timing out in
the bots."
https://trac.webkit.org/changeset/227782
2018-01-31 Carlos Garcia Campos <cgarcia@igalia.com>
WebDriver: add domains to server config in w3c tests
https://bugs.webkit.org/show_bug.cgi?id=182294
Reviewed by Carlos Alberto Lopez Perez.
Several cookie tests expect server_config to have a domains key.
Fixes: imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_domain_cookie
imported/w3c/webdriver/tests/cookies/add_cookie.py::test_add_session_cookie_with_leading_dot_character_in_domain
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
(WebDriverW3CExecutor.__init__):
2018-01-31 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update W3C WebDriver imported tests.
Show full pytest failure logs.
pytest truncates long lists when printing a failed assertion.
This is not great for debugging and arguably it should be the
default to show the full diff when comparing lists.
* Scripts/webkitpy/webdriver_tests/pytest_runner.py:
(run):
2018-01-30 John Wilander <wilander@apple.com>
Add callbacks to testRunner.statisticsSetShouldPartitionCookiesForHost() and testRunner.statisticsUpdateCookiePartitioning()
https://bugs.webkit.org/show_bug.cgi?id=181958
https://bugs.webkit.org/show_bug.cgi?id=182072
<rdar://problem/36801804>
<rdar://problem/36845795>
Reviewed by Brent Fulgham.
Because of the asynchronous nature of XPC and cookies,
we need callbacks in these TestRunner functions so that
the layout tests can wait for state changes to finish
before checking test conditions.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessageToPage):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::statisticsUpdateCookiePartitioning):
(WTR::TestRunner::statisticsSetShouldPartitionCookiesForHost):
(WTR::TestRunner::statisticsCallDidSetPartitionOrBlockCookiesForHostCallback):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didSetPartitionOrBlockCookiesForHost):
* WebKitTestRunner/TestInvocation.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::statisticsUpdateCookiePartitioning):
(WTR::TestController::statisticsSetShouldPartitionCookiesForHost):
2018-01-30 Basuke Suzuki <Basuke.Suzuki@sony.com>
[webkitpy] Config file for apache is copied twice.
https://bugs.webkit.org/show_bug.cgi?id=182131
Reviewed by Daniel Bates.
* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd.__init__):
(LayoutTestApacheHttpd._copy_apache_config_file):
(LayoutTestApacheHttpd._get_apache_config_file_path): Deleted.
2018-01-30 Don Olmstead <don.olmstead@sony.com>
JSExports.h should be included as <JavaScriptCore/JSExportMacros.h>
https://bugs.webkit.org/show_bug.cgi?id=182312
Reviewed by Michael Catanzaro.
* DumpRenderTree/config.h:
* TestWebKitAPI/config.h:
* WebKitTestRunner/config.h:
2018-01-30 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] API test UIPasteboardTests.DataTransferGetDataWhenPastingPlatformRepresentations fails after r223440
https://bugs.webkit.org/show_bug.cgi?id=182307
<rdar://problem/36041485>
Reviewed by Ryosuke Niwa.
Adjusts a failing API test that we forgot to rebaseline after r223440, which ensures that the result of reading
"text/html" from the DataTransfer is sanitized markup. To do this, teach the test harness
(dump-datatransfer-types.html) to ignore inline styles in markup if a flag is set, and then set that flag in
UIPasteboardTests.DataTransferGetDataWhenPastingPlatformRepresentations.
* TestWebKitAPI/Tests/WebKitCocoa/dump-datatransfer-types.html:
* TestWebKitAPI/Tests/ios/UIPasteboardTests.mm:
(TestWebKitAPI::TEST):
2018-01-30 Sergio Villar Senin <svillar@igalia.com>
[WebVR][GTK][WPE] Exclude OpenVR from tarballs
https://bugs.webkit.org/show_bug.cgi?id=182284
Reviewed by Michael Catanzaro.
* gtk/manifest.txt.in: Added ThirdParty/openvr to exclusions.
* wpe/manifest.txt.in: Ditto.
2018-01-30 Yusuke Suzuki <utatane.tea@gmail.com>
Unreviewed, try to fix JSCOnly build
https://bugs.webkit.org/show_bug.cgi?id=177202
* CMakeLists.txt:
2018-01-30 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Try to avoid webdriver tests step timing out in the bots.
The process itself doesn't seem to be timing out, but the buildbot is always reporting the step as finished
after timeout. I think there's a race condition or something in buildbot, and it keeps watching the json log
file even when it has already been written. This is a speculative workaround, assuming that's the problem, that
creates the json file before running the tests. I'll revert this if it doesn't fix the issue in the end.
* Scripts/run-webdriver-tests:
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:
(WebDriverTestRunner.dump_results_to_json_file):
2018-01-30 Basuke Suzuki <Basuke.Suzuki@sony.com>
[WinCairo] Fix forwarding header conflict of WebKit on WinCairo
https://bugs.webkit.org/show_bug.cgi?id=177202
Reviewed by Alex Christensen.
* CMakeLists.txt:
2018-01-29 Alex Christensen <achristensen@webkit.org>
Clean up API after bugs 178240 and 176474
https://bugs.webkit.org/show_bug.cgi?id=182259
Reviewed by Dan Bernstein.
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(TEST):
(-[PinnedStateObserver observeValueForKeyPath:ofObject:change:context:]):
2018-01-29 Jiewen Tan <jiewen_tan@apple.com>
[WebAuthN] Add a compile-time feature flag
https://bugs.webkit.org/show_bug.cgi?id=182211
<rdar://problem/36936365>
Reviewed by Brent Fulgham.
* Scripts/webkitperl/FeatureList.pm:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-01-29 Brady Eidson <beidson@apple.com>
Make the API test added in r227737 be Mac-only.
Unreviewed gardening.
* TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm:
2018-01-29 Matt Lewis <jlewis3@apple.com>
Unreviewed, rolling out r227731.
This caused and assertion failure in API tests.
Reverted changeset:
"Layout Test fast/events/beforeunload-dom-manipulation-
crash.html is crashing"
https://bugs.webkit.org/show_bug.cgi?id=181204
https://trac.webkit.org/changeset/227731
2018-01-29 Youenn Fablet <youenn@apple.com>
WPT test exporter should add WebKit export in its PR description
https://bugs.webkit.org/show_bug.cgi?id=182246
Reviewed by Chris Dumez.
Updating PR description body to contain the words 'WebKit export'.
That way, WPT PR bot will mark the PR as reviewed downstream.
* Scripts/webkitpy/w3c/test_exporter.py:
(TestExporter.__init__):
(TestExporter.make_pull_request):
* Scripts/webkitpy/w3c/test_exporter_unittest.py:
(TestExporterTest.test_export):
2018-01-29 Ryosuke Niwa <rniwa@webkit.org>
Add the support for running Speedometer 2.0 to run-benchmark
https://bugs.webkit.org/show_bug.cgi?id=182231
Reviewed by Antti Koivisto.
Made it possible to run Speedometer 2.0 using run-benchmark. To do this, this patch adds the ability to
aggregate results using the differently aggregated values of subtests. In particular, Speedometer 2.0
requires aggregating the geometric mean out of total time spent in each suite.
Also added --show-iteration-values to show individual measured values in each iteration.
* Scripts/webkitpy/benchmark_runner/benchmark_results.py:
(BenchmarkResults.format): Added show_iteration_values as an option.
(BenchmarkResults._format_tests): Ditto.
(BenchmarkResults._format_values): Ditto. Added the code to show the measured values for each iteration
when show_iteration_values is set to True. We don't emit the unit in each value so that the list of values
is easily parsable as a JSON array.
(BenchmarkResults._format_values.format_scaled): Added. A helper function.
(BenchmarkResults._subtest_values_by_config_iteration): Added the support for aggregating values using
the aggregated values of a subtest even when they were computed using a different aggregator if the subtest
had exactly one aggregator.
(BenchmarkResults._lint_results):
(BenchmarkResults._lint_subtest_results): Replaced parent_needing_aggregation, which is set to the parent
test's name only when the parent test had an aggregator, by self-explanatory parent_test and
parent_aggregator_list.
(BenchmarkResults._lint_aggregator_list): Ditto. Added raise an exception when a test has an aggregator but
its subtest doesn't specify the same aggregator or it has more than one aggregators, making it ambiguous.
(BenchmarkResults._lint_configuration):
* Scripts/webkitpy/benchmark_runner/benchmark_results_unittest.py:
(test_format_values_with_no_unit_scaling): Added.
(test_format_values_with_iteration_values): Added.
(test_format_values_with_no_unit_scaling_and_iteration_values): Added.
(test_aggregate_results_from_another_aggregator): Added.
(test_lint_results): Added a test case.
* Scripts/webkitpy/benchmark_runner/benchmark_runner.py:
(BenchmarkRunner.__init__): Added show_iteration_values as an argument.
(BenchmarkRunner._run_benchmark): Ditto.
(BenchmarkRunner.show_results): Ditto.
* Scripts/webkitpy/benchmark_runner/data/patches/webserver/Speedometer2.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/speedometer2.plan: Added.
* Scripts/webkitpy/benchmark_runner/run_benchmark.py:
(parse_args): Added --show-iteration-values as a boolean argument.
(run_benchmark_plan): Ditto.
(start): Ditto.
* Scripts/webkitpy/benchmark_runner/webserver_benchmark_runner.py:
(WebServerBenchmarkRunner.__init__): Ditto.
2018-01-29 Brady Eidson <beidson@apple.com>
Make it possible for apps that use both WK1 and WK2 to use MessagePorts.
https://bugs.webkit.org/show_bug.cgi?id=182229
Reviewed by Chris Dumez.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/MessagePortProviders.mm: Added.
2018-01-29 Carlos Garcia Campos <cgarcia@igalia.com>
WebDriver: properly recover w3c tests after a webdriver server crash
https://bugs.webkit.org/show_bug.cgi?id=182242
Reviewed by Carlos Alberto Lopez Perez.
When a test makes the webdriver server crash, all other subsequent tests fail because they still try to send
messages to the server, gettin connection refused errors all the time. Selenium tests handle this correctly by
relaunching the server after every test failure, because other failures, even when not crashing the server,
might leave it in an bad state. WPT runner does the same for test files, it uses a subprocess to run the tests
and when any subtest fails, a new subsprocess is used for the following test file. We could do the same.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py:
(WebDriverTestRunnerW3C.run): Restart the executor if any subtest failed.
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
(WebDriverW3CExecutor.__init__): Save timeout and expectations and do not import pytest.
(WebDriverW3CExecutor.setup): Create a subprocess to run the tests.
(WebDriverW3CExecutor.teardown): Send a message to the subprocess to terminate.
(WebDriverW3CExecutor._runner): Run the tests using pytest runner.
(WebDriverW3CExecutor.run): Send a message to the subprocess to run the given test and return the results message.
2018-01-29 Per Arne Vollan <pvollan@apple.com>
Layout Test fast/events/beforeunload-dom-manipulation-crash.html is crashing
https://bugs.webkit.org/show_bug.cgi?id=181204
<rdar://problem/36256274>
Reviewed by Ryosuke Niwa.
Implement 'testRunner.forceImmediateCompletion()' for WK1.
* DumpRenderTree/TestRunner.cpp:
(forceImmediateCompletionCallback):
(TestRunner::staticFunctions):
2018-01-29 Frederic Wang <fwang@igalia.com>
Unreviewed, add myself to some watch lists.
* Scripts/webkitpy/common/config/watchlist:
2018-01-27 Dan Bernstein <mitz@apple.com>
HaveInternalSDK includes should be "#include?"
https://bugs.webkit.org/show_bug.cgi?id=179670
* DumpRenderTree/mac/Configurations/Base.xcconfig:
2018-01-26 Chris Dumez <cdumez@apple.com>
Make sure service worker code does not launch a StorageProcess unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=182192
<rdar://problem/36927427>
Reviewed by Geoffrey Garen.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
2018-01-26 Chris Dumez <cdumez@apple.com>
Offlined content does not work for apps on home screen
https://bugs.webkit.org/show_bug.cgi?id=182070
<rdar://problem/36843906>
Reviewed by Youenn Fablet.
Add API test coverage to make sure an already registered service worker is able to intercept
the very first load.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
(-[SWMessageHandlerWithExpectedMessage userContentController:didReceiveScriptMessage:]):
2018-01-26 Chris Nardi <cnardi@chromium.org>
Addressing post-review comments after r226614
https://bugs.webkit.org/show_bug.cgi?id=182151
Reviewed by Myles C. Maxfield.
* TestWebKitAPI/Tests/WTF/TextBreakIterator.cpp:
(TestWebKitAPI::TEST):
2018-01-25 Per Arne Vollan <pvollan@apple.com>
Unreviewed, rolling out r224920.
Some Win EWS bots are not coming back up after starting reboot.
* EWSTools/start-queue-win.sh:
2018-01-26 Carlos Garcia Campos <cgarcia@igalia.com>
WebDriver: simplify the tests json report
https://bugs.webkit.org/show_bug.cgi?id=182171
Reviewed by Carlos Alberto Lopez Perez.
We are duplicating the test name in every subtest name. WPT already changed the format to remove the test name
form the subtest name. We should do the same for simplicity and compatibility with WPT.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:
(WebDriverTestRunner.dump_results_to_json_file):
2018-01-25 Alex Christensen <achristensen@webkit.org>
REGRESSION (r221899): Web Content process hangs when webpage tries to make a new window if the WKWebView doesn’t have a UI delegate
https://bugs.webkit.org/show_bug.cgi?id=182152
Reviewed by Joseph Pecoraro.
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[NoUIDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(TEST):
2018-01-25 Youenn Fablet <youenn@apple.com>
WebPluginInfoProvider should handle null host queries
https://bugs.webkit.org/show_bug.cgi?id=182112
Reviewed by Chris Dumez.
* TestWebKitAPI/Tests/WebKitCocoa/PluginLoadClientPolicies.mm:
(TEST):
2018-01-25 Basuke Suzuki <Basuke.Suzuki@sony.com>
[webkitpy] Stop modifying path information only when running on Cygwin
https://bugs.webkit.org/show_bug.cgi?id=182136
On LayoutTestApacheHttpd, some path configuration is modified when platform
is Windows. This modification is only required for AppleWin running on Cygwin.
WinCairo uses native Windows environment, so the condition should be changed.
Reviewed by Per Arne Vollan.
* Scripts/webkitpy/layout_tests/servers/apache_http_server.py:
(LayoutTestApacheHttpd.__init__):
(LayoutTestApacheHttpd._get_apache_config_file_path):
2018-01-25 Eric Carlson <eric.carlson@apple.com>
REGRESSION(r227457): Release assert in updateLayout while destructing a media element
https://bugs.webkit.org/show_bug.cgi?id=182038
<rdar://problem/36812083>
Reviewed by Jer Noble.
* TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm:
(TestWebKitAPI::TEST): Show/hide page so controls are always updated.
2018-01-24 Daniel Bates <dabates@apple.com>
webkit-patch upload emits irrelevant simulator warnings
https://bugs.webkit.org/show_bug.cgi?id=181702
<rdar://problem/36556359>
Reviewed by Aakash Jain.
Remove warning when a person explicitly passes --child-processes with a value greater than
the default number of simulator instances webkitpy would have used had --child-processes
been omitted. Moreover, the placement of the warning logic to support printing such a message
(in the IOSSimulatorPort constructor) caused side effects that may print other warning messages.
By default, webkitpy will parallelize running tests using the maximum number of simulator
instances that can be supported based on available system resources at the time run-webkit-tests
is invoked. It seems reasonable to assume that a person that explicitly overrides this default
by specifying --child-processes knows what they are doing. The effects of picking a large
value be obvious, the system may become sluggish.
As a side benefit of this change we no longer will emit simulator warnings whenever the iOS
simulator port is instantiated by non-layout test related code (e.g. check-webkit-style).
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort.__init__):
2018-01-25 Sergio Villar Senin <svillar@igalia.com>
[WebVR][GTK][WPE] Remove the WebVR public API added in r227518
https://bugs.webkit.org/show_bug.cgi?id=182102
Reviewed by Carlos Garcia Campos.
* MiniBrowser/gtk/main.c:
(main): Removed the call to set_enable_webvr().
2018-01-25 Carlos Garcia Campos <cgarcia@igalia.com>
WebDriver: add support for slow tests
https://bugs.webkit.org/show_bug.cgi?id=182095
Reviewed by Carlos Alberto Lopez Perez.
Add timeout mark to slow tests.
* Scripts/webkitpy/webdriver_tests/pytest_runner.py:
(TestExpectationsMarker.__init__): Save the timeout.
(TestExpectationsMarker.pytest_collection_modifyitems): If test is slow use timeout * 5.
(run): Pass timeout to TestExpectationsMarker constructor.
2018-01-24 Alex Christensen <achristensen@webkit.org>
Gracefully recover from NetworkProcess crashes in private browsing
https://bugs.webkit.org/show_bug.cgi?id=182073
<rdar://problem/36572023>
Reviewed by Geoff Garen.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/NetworkProcessCrashNonPersistentDataStore.mm: Added.
(-[CrashDelegate webView:didFinishNavigation:]):
(-[CrashDelegate webView:didFailProvisionalNavigation:withError:]):
(-[CrashDelegate webView:didFailNavigation:withError:]):
(TEST):
2018-01-24 Ali Juma <ajuma@chromium.org>
REGRESSION (r227430): ASSERTION FAILED: !self.zoomToScaleCompletionHandler in TestRunnerWKWebView::zoomToScale
https://bugs.webkit.org/show_bug.cgi?id=182052
Reviewed by Simon Fraser.
Don't set zoomToScaleCompletionHandler in zoomToScale:animated when calling the completion handler
immediately.
Test: fast/visual-viewport/viewport-dimensions.html
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView zoomToScale:animated:completionHandler:]):
2018-01-24 Alex Christensen <achristensen@webkit.org>
Remove pre-Sierra-OS-specific code in Tools
https://bugs.webkit.org/show_bug.cgi?id=182034
Reviewed by Tim Horton.
* DumpRenderTree/mac/DumpRenderTree.mm:
(setDefaultsToConsistentValuesForTesting):
* MiniBrowser/mac/BrowserWindowController.m:
(-[BrowserWindowController windowDidLoad]):
(-[BrowserWindowController share:]):
* MiniBrowser/mac/MiniBrowser_Prefix.pch:
* TestRunnerShared/EventSerialization/mac/EventSerializerMac.mm:
(-[EventStreamPlayer playbackTimerFired:]):
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/FontCache.cpp: Removed.
* TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm:
* TestWebKitAPI/Tests/mac/PageVisibilityStateWithWindowChanges.mm:
(TestWebKitAPI::PageVisibilityStateWithWindowChanges::runTest):
* WebKitTestRunner/InjectedBundle/mac/InjectedBundleMac.mm:
(WTR::InjectedBundle::platformInitialize):
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::initializeWebViewConfiguration):
2018-01-24 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r226485): Many new wasm leaks detected by the leaks bot
https://bugs.webkit.org/show_bug.cgi?id=181400
<rdar://problem/36358768>
Reviewed by Joseph Pecoraro.
* BuildSlaveSupport/build.webkit.org-config/config.json: Remove incorrect option.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py: (_set_up_derived_options):
Always disable poisoning when running with --leaks, as this should work locally,
not just on bots.
2018-01-24 Daniel Bates <dabates@apple.com>
REGRESSION (r226138): Selecting a line that ends with zero-width joiner (ZWJ) may cause text transformation
https://bugs.webkit.org/show_bug.cgi?id=181993
<rdar://problem/36421080>
Reviewed by David Hyatt.
Remove unit test for overlap strategy FrontmostWithLongestEffectiveRange
as we no longer support this strategy.
* TestWebKitAPI/Tests/WebCore/MarkerSubrange.cpp:
2018-01-24 David Kilzer <ddkilzer@apple.com>
check-webkit-style reports false-positive whitespace/braces warning about blocks with return types as arguments in Objective-C
<https://webkit.org/b/182015>
<rdar://problem/36449728>
Reviewed by Tim Horton.
* Scripts/webkitpy/style/checkers/cpp.py:
(regex_for_lambdas_and_blocks): Update regex to include
optional return type for block argument in Objective-C.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_braces): Add test.
2018-01-24 Ms2ger <Ms2ger@igalia.com>
WPE-focused test gardening.
https://bugs.webkit.org/show_bug.cgi?id=182051
Unreviewed test gardening.
* TestWebKitAPI/glib/TestExpectations.json: TestWebKitFindController failure was fixed in r227418.
2018-01-23 Mark Lam <mark.lam@apple.com>
Update Poisoned pointers to take a Poison class instead of a uintptr_t&.
https://bugs.webkit.org/show_bug.cgi?id=182017
<rdar://problem/36795513>
Reviewed by Filip Pizlo and JF Bastien.
* TestWebKitAPI/Tests/WTF/Poisoned.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedRef.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::passWithRef):
* TestWebKitAPI/Tests/WTF/PoisonedRefPtr.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::f1):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtr.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::poisonedPtrFoo):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForNonTriviallyDestructibleArrays.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForTriviallyDestructibleArrays.cpp:
(TestWebKitAPI::TEST):
2018-01-18 Sergio Villar Senin <svillar@igalia.com>
[WebVR] Add OpenVR to the tree and to the build
https://bugs.webkit.org/show_bug.cgi?id=177298
Reviewed by Žan Doberšek.
* Scripts/webkitpy/style/checker.py: Added openvr to the list of third party libraries
with reduced style checks.
2018-01-24 Chris Nardi <cnardi@chromium.org>
Add Chris Nardi to contributors list
https://bugs.webkit.org/show_bug.cgi?id=182029
Reviewed by Antti Koivisto.
* Scripts/webkitpy/common/config/contributors.json:
2018-01-22 Ryosuke Niwa <rniwa@webkit.org>
Mac Sierra perf bots have been failing due to CG errors
https://bugs.webkit.org/show_bug.cgi?id=181955
Reviewed by Antti Koivisto.
Ignore the CoreGraphics error messages on macOS Sierra.
Also added tests for ignoring lines in stdout and stderr.
* Scripts/webkitpy/performance_tests/perftest.py:
(PerfTest.run_failed): Refactored for clarity.
(PerfTest):
(PerfTest.filter_ignored_lines): Added.
(PerfTest._lines_to_ignore): Renamed from _lines_to_ignore_in_parser_result since these regular expressions
are now used to ignore lines in other kinds of tests than parser tests.
(PerfTest._errors_to_ignore_in_sierra): Added.
(PerfTest._filter_output): Added the code to ignore errors only on macOS Sierra.
* Scripts/webkitpy/performance_tests/perftest_unittest.py:
(test_parse_output_with_ignored_stdout): Added.
(test_parse_output_with_ignored_stderr): Added.
(test_parse_output_with_ignored_stderr.MockPortWithSierraName): Added.
2018-01-23 Eric Carlson <eric.carlson@apple.com>
Resign NowPlaying status when no media element is eligible
https://bugs.webkit.org/show_bug.cgi?id=181914
<rdar://problem/35294116>
Reviewed by Jer Noble.
* TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm:
(-[NowPlayingTestWebView hasActiveNowPlayingSession]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/large-video-test-now-playing.html:
2018-01-23 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com>
[WinCairo] Use 64-bit toolset
https://bugs.webkit.org/show_bug.cgi?id=181979
Reviewed by Alex Christensen.
Use 64-bit toolset for 64-bit build in order to improve build time.
* Scripts/webkitdirs.pm:
(generateBuildSystemFromCMakeProject):
2018-01-23 Simon Fraser <simon.fraser@apple.com>
Element with position:fixed stops scrolling at the bottom of the page, but is painted in the right place on Chacos.com.
https://bugs.webkit.org/show_bug.cgi?id=181741
rdar://problem/36593581
Reviewed by Tim Horton.
If zoomToScale:animated: is called with the current zoom level, call the callback
rather than doing nothing.
* WebKitTestRunner/cocoa/TestRunnerWKWebView.mm:
(-[TestRunnerWKWebView zoomToScale:animated:completionHandler:]):
2018-01-23 Basuke Suzuki <Basuke.Suzuki@sony.com>
Add ignore_errors keyword argument to Executive.run_command() for replacing the common pattern of error_handler usage
https://bugs.webkit.org/show_bug.cgi?id=180820
Reviewed by David Kilzer.
* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.in_working_directory):
(Git.clone):
(Git.read_git_config):
(Git.apply_reverse_diff):
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.run):
* Scripts/webkitpy/common/checkout/scm/scm_unittest.py:
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVNRepository.has_authorization_for_realm):
* Scripts/webkitpy/common/net/credentials_unittest.py:
* Scripts/webkitpy/common/system/abstractexecutive.py:
(AbstractExecutive.run_command):
* Scripts/webkitpy/common/system/executive.py:
(Executive.kill_process.is):
(Executive.running_pids):
(Executive.kill_all):
(Executive.run_command):
* Scripts/webkitpy/common/system/executive_mock.py:
(MockExecutive.run_command):
(MockExecutive2.run_command):
* Scripts/webkitpy/common/system/executive_unittest.py:
(ExecutiveTest.test_run_command_with_bad_command.run_bad_command):
* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo.xcode_sdk_version):
* Scripts/webkitpy/layout_tests/servers/http_server.py:
(Lighttpd._check_and_kill):
* Scripts/webkitpy/port/base.py:
(Port._symbols_string):
* Scripts/webkitpy/port/gtk.py:
(GtkPort.setup_environ_for_server):
* Scripts/webkitpy/port/win.py:
(WinPort._runtime_feature_list):
(WinPort.read_registry_value):
* Scripts/webkitpy/port/win_unittest.py:
(WinPortTest.test_runtime_feature_list):
* Scripts/webkitpy/tool/commands/analyzechangelog.py:
* Scripts/webkitpy/tool/commands/analyzechangelog_unittest.py:
2018-01-23 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r227279 and r227373.
https://bugs.webkit.org/show_bug.cgi?id=181988
The LayoutTest crash fix introduced an API test failure.
(Requested by ryanhaddad on #webkit).
Reverted changesets:
"Resign NowPlaying status when no media element is eligible"
https://bugs.webkit.org/show_bug.cgi?id=181914
https://trac.webkit.org/changeset/227279
"Resign NowPlaying status when no media element is eligible"
https://bugs.webkit.org/show_bug.cgi?id=181914
https://trac.webkit.org/changeset/227373
2018-01-22 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Add test case for slow in test_expectations.py.
I forgot to also check slow tests in test_expectations.py unit tests.
* Scripts/webkitpy/common/test_expectations_unittest.py:
(assert_slow):
(test_build_type):
(test_slow):
2018-01-22 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Mark test WTF_Lock.ManyContendedShortSections as slow.
* TestWebKitAPI/glib/TestExpectations.json:
2018-01-22 Ryosuke Niwa <rniwa@webkit.org>
Blob conversion and sanitization doesn't work with Microsoft Word for Mac 2011
https://bugs.webkit.org/show_bug.cgi?id=181616
<rdar://problem/36484908>
Reviewed by Wenson Hsieh.
Added tests to make sure we sanitize plain HTML, not just web archives,
when and only when custom pasteboard data is enabled.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/PasteHTML.mm: Added.
(writeHTMLToPasteboard): Added.
(createWebViewWithCustomPasteboardDataSetting): Added.
2018-01-22 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r226485): Many new wasm leaks detected by the leaks bot
https://bugs.webkit.org/show_bug.cgi?id=181400
rdar://problem/36358768
Reviewed by JF Bastien.
* BuildSlaveSupport/build.webkit.org-config/config.json: Disable poisoning on the leaks bot.
2018-01-22 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Test /webkit/WebKitWebsiteData/resource-load-statistics is failing since r227223
https://bugs.webkit.org/show_bug.cgi?id=181929
Reviewed by Michael Catanzaro.
The test is checking that the resource load stats file is deleted after clearing website data. Since r227223,
the website data completion callback is not called immediately, and a new file is created when the operation
finishes. We need to check that the file was removing after calling clear.
* TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:
(fileChangedCallback):
(testWebsiteDataResourceLoadStatistics):
2018-01-22 Carlos Garcia Campos <cgarcia@igalia.com>
Reviewed GTK gardening. Mark /webkit/WebKitWebView/mouse-target as fail too.
* TestWebKitAPI/glib/TestExpectations.json:
2018-01-22 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed GTK+ gardening. Fix /webkit/WebKitConsoleMessage/network-error.
Partially revert r226782, the fix was wrong for the GLib version we currently use.
* TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp:
(testWebKitConsoleMessageNetworkError):
2018-01-21 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Remove unused verbose mode from GLib API tests runner.
* glib/api_test_runner.py:
(add_options):
2018-01-21 Wenson Hsieh <wenson_hsieh@apple.com>
Add a new feature flag for EXTRA_ZOOM_MODE and reintroduce AdditionalFeatureDefines.h
https://bugs.webkit.org/show_bug.cgi?id=181918
Reviewed by Tim Horton.
Add EXTRA_ZOOM_MODE to FeatureDefines.xconfig (off by default).
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-01-21 Eric Carlson <eric.carlson@apple.com>
Resign NowPlaying status when no media element is eligible
https://bugs.webkit.org/show_bug.cgi?id=181914
<rdar://problem/35294116>
Reviewed by Jer Noble.
* TestWebKitAPI/Tests/WebKitCocoa/NowPlayingControlsTests.mm:
(-[NowPlayingTestWebView hasActiveNowPlayingSession]):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKitCocoa/large-video-test-now-playing.html:
2018-01-21 Aakash Jain <aakash_jain@apple.com>
Fix broken unit-tests after r227192
https://bugs.webkit.org/show_bug.cgi?id=181909
Reviewed by Carlos Garcia Campos.
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
2018-01-20 Chris Dumez <cdumez@apple.com>
API test URLSchemeHandler.Leaks1 is timing out on iOS simulator debug
https://bugs.webkit.org/show_bug.cgi?id=174984
<rdar://problem/33665676>
Reviewed by Alexey Proskuryakov.
Disable URLSchemeHandler.Leaks1 API test on iOS as it sometimes times out.
* TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-leaks.mm:
(TEST):
2018-01-20 Brian Burg <bburg@apple.com>
WebDriver: fix some nits that prevent running W3C tests on Mac
https://bugs.webkit.org/show_bug.cgi?id=181864
Reviewed by Carlos Garcia Campos.
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_web_server.py:
(WebDriverW3CWebServer.__init__): _wsout needs to always be defined,
as we assume that the property exists later.
(WebDriverW3CWebServer.stop): If the temporary file doesn't
exist for some reason, the remove call will raise and exception.
Gracefully handle the case where the file isn't created due to
a problem/exception that happened elsewhere.
2018-01-19 Ling Ho <lingcherd_ho@apple.com>
Move Bingdings EWS and Webkitpy EWS queues to High Sierra on buildbot dashboard.
https://bugs.webkit.org/show_bug.cgi?id=181881
Reviewed by Alexey Proskuryakov.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BubbleQueueServer.js:
(BubbleQueueServer):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Dashboard.js:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
(table.queue-grid tr.platform.mac-os-x-elcapitan img.logo): Deleted.
2018-01-19 Youenn Fablet <youenn@apple.com>
Do not go to the storage process when registering a service worker client if there is no service worker registered
https://bugs.webkit.org/show_bug.cgi?id=181740
<rdar://problem/36650400>
Reviewed by Chris Dumez.
Add support for internals inside API tests.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/InjectInternals_Bundle.cpp: Added.
(TestWebKitAPI::InternalsInjectedBundleTest::InternalsInjectedBundleTest):
(TestWebKitAPI::InternalsInjectedBundleTest::initialize):
(TestWebKitAPI::InternalsInjectedBundleTest::didCreatePage):
(TestWebKitAPI::InternalsInjectedBundleTest::didClearWindowForFrame):
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
(setConfigurationInjectedBundlePath):
(-[RegularPageMessageHandler userContentController:didReceiveScriptMessage:]):
2018-01-19 John Wilander <wilander@apple.com>
Resource Load Statistics: Implement callback support for removal of WebsiteDataType::ResourceLoadStatistics
https://bugs.webkit.org/show_bug.cgi?id=181822
https://bugs.webkit.org/show_bug.cgi?id=175263
https://bugs.webkit.org/show_bug.cgi?id=178536
https://bugs.webkit.org/show_bug.cgi?id=181223
https://bugs.webkit.org/show_bug.cgi?id=181482
<rdar://problem/33491222>
<rdar://problem/33805293>
<rdar://problem/36332683>
<rdar://problem/36549026>
Reviewed by Alex Christensen.
* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStore):
(WTR::TestRunner::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
* WebKitTestRunner/InjectedBundle/TestRunner.h:
* WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::statisticsClearInMemoryAndPersistentStore):
(WTR::TestController::statisticsClearInMemoryAndPersistentStoreModifiedSinceHours):
2018-01-19 Jonathan Bedard <jbedard@apple.com>
run-webkit-tests fails when there is a curly brace in Xcode build output
https://bugs.webkit.org/show_bug.cgi?id=181254
<rdar://problem/36453374>
Reviewed by Daniel Bates.
* Scripts/webkitpy/port/base.py:
(Port._run_script): Encode script output before logging it.
2018-01-19 Chris Dumez <cdumez@apple.com>
Service worker registrations restored from disk may not be reused when the JS calls register() again
https://bugs.webkit.org/show_bug.cgi?id=181810
<rdar://problem/36591711>
Reviewed by Youenn Fablet.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
(-[SWMessageHandlerForRestoreFromDiskTest initWithExpectedMessage:]):
(-[SWMessageHandlerForRestoreFromDiskTest userContentController:didReceiveScriptMessage:]):
2018-01-19 Ryan Haddad <ryanhaddad@apple.com>
Remove El Capitan queues from flakiness dashboard
https://bugs.webkit.org/show_bug.cgi?id=181860
Reviewed by Aakash Jain.
* TestResultServer/static-dashboards/builders.jsonp:
2018-01-19 Keith Miller <keith_miller@apple.com>
HaveInternalSDK includes should be "#include?"
https://bugs.webkit.org/show_bug.cgi?id=179670
Reviewed by Dan Bernstein.
* MiniBrowser/Configurations/Base.xcconfig:
* MobileMiniBrowser/Configurations/Base.xcconfig:
* TestWebKitAPI/Configurations/Base.xcconfig:
* WebKitTestRunner/Configurations/Base.xcconfig:
2018-01-19 Carlos Garcia Campos <cgarcia@igalia.com>
WebDriver: driver environment not passed to pytest when running w3c tests
https://bugs.webkit.org/show_bug.cgi?id=181852
Reviewed by Carlos Alberto Lopez Perez.
That's why color codes are not used in the bots log for selenium tests but they appear in w3c tests.
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
(WebDriverW3CExecutor.run):
2018-01-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebDriver: wayland display no used in wayland bot
https://bugs.webkit.org/show_bug.cgi?id=181851
Reviewed by Carlos Alberto Lopez Perez.
We need to handle the additionalArguments property in the WebDriverTests step.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunWebDriverTests.start):
2018-01-19 Carlos Alberto Lopez Perez <clopez@igalia.com>
[GTK] TERM environment variable is not passed to the test driver.
https://bugs.webkit.org/show_bug.cgi?id=181847
Rubber-stamped by by Carlos Garcia Campos.
* Scripts/webkitpy/port/base.py:
(Port.to.setup_environ_for_server):
2018-01-19 Carlos Garcia Campos <cgarcia@igalia.com>
WebDriver: run-webdriver-tests is crashing in the bots when creating results json file
https://bugs.webkit.org/show_bug.cgi?id=181844
Reviewed by Carlos Alberto Lopez Perez.
We always try to create the directory where to store the json file, but when the filename is given directly,
like in the bots, the current dir is used.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:
(WebDriverTestRunner.dump_results_to_json_file): Do not try to create the directory if dirname() returns an
empty string.
2018-01-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebDriver tests are running outside the jhbuild env
https://bugs.webkit.org/show_bug.cgi?id=181842
Reviewed by Žan Doberšek.
We need to enter jhbuild env in run-webdriver-tests.
* Scripts/run-webdriver-tests:
2018-01-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Run WebDriver tests in the bots
https://bugs.webkit.org/show_bug.cgi?id=181787
Reviewed by Michael Catanzaro.
Add a step to run WebDriver tests in the GTK test bots. The new step is not GTK specific, but only added to the
factory for the GTK port for now.
* BuildSlaveSupport/build.webkit.org-config/factories.py:
(TestFactory.__init__):
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunWebDriverTests):
(RunWebDriverTests.start):
(RunWebDriverTests.commandComplete):
(RunWebDriverTests.evaluateCommand):
(RunWebDriverTests.getText):
(RunWebDriverTests.getText2):
2018-01-18 Basuke Suzuki <Basuke.Suzuki@sony.com>
[WinCairo] Pass correct url for http test to test driver.
https://bugs.webkit.org/show_bug.cgi?id=181814
Reviewed by Alex Christensen.
* Scripts/webkitpy/port/driver.py:
(Driver):
(Driver.http_test_path_to_uri):
(Driver.is_secure_path):
(Driver.http_base_url):
(Driver.uri_to_test):
2018-01-18 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, update the triggerable name for 'sierra-release-perf-tests'
* BuildSlaveSupport/build.webkit.org-config/config.json:
2018-01-18 Dan Bernstein <mitz@apple.com>
[Xcode] Streamline and future-proof target-macOS-version-dependent build setting definitions
https://bugs.webkit.org/show_bug.cgi?id=181803
Reviewed by Tim Horton.
* DumpRenderTree/mac/Configurations/Base.xcconfig: Updated.
* DumpRenderTree/mac/Configurations/DebugRelease.xcconfig: Ditto.
* ImageDiff/cg/Configurations/Base.xcconfig: Ditto.
* ImageDiff/cg/Configurations/DebugRelease.xcconfig: Ditto.
* MiniBrowser/Configurations/Base.xcconfig: Ditto.
* MiniBrowser/Configurations/DebugRelease.xcconfig: Ditto.
* TestWebKitAPI/Configurations/Base.xcconfig: Ditto.
* TestWebKitAPI/Configurations/DebugRelease.xcconfig: Ditto.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig: Adopted macOSTargetConditionals
helpers.
* TestWebKitAPI/Configurations/macOSTargetConditionals.xcconfig: Added. Defines helper build
settings useful for defining settings that depend on the target macOS version.
* WebKitTestRunner/Configurations/Base.xcconfig: Updated.
* WebKitTestRunner/Configurations/DebugRelease.xcconfig: Updated.
2018-01-18 Ling Ho <lingcherd_ho@apple.com>
Remove Opensource El Capitan queues from buildbot
https://bugs.webkit.org/show_bug.cgi?id=181712
Reviewed by Aakash Jain.
* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot):
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
2018-01-18 Chris Dumez <cdumez@apple.com>
Service Workers restored from persistent storage have 'redundant' state
https://bugs.webkit.org/show_bug.cgi?id=181749
<rdar://problem/36556486>
Reviewed by Youenn Fablet.
Add API test coverage.
* TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm:
(-[SWMessageHandlerForFetchTest userContentController:didReceiveScriptMessage:]):
2018-01-18 Joanmarie Diggs <jdiggs@igalia.com>
[GTK] AX: Two layout tests crash with error 'g_strstr_len: assertion 'haystack != NULL' failed' in Accessibility::UIElement::url
https://bugs.webkit.org/show_bug.cgi?id=176796
Reviewed by Chris Fleizach.
Add sanity check that we have a URL before calling g_strstr_len().
* WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp:
(WTR::AccessibilityUIElement::url):
2018-01-18 Ryan Haddad <ryanhaddad@apple.com>
Add triggers for Sierra test262 and perf queues
https://bugs.webkit.org/show_bug.cgi?id=181799
Reviewed by Aakash Jain.
* BuildSlaveSupport/build.webkit.org-config/config.json:
2018-01-18 Wenson Hsieh <wenson_hsieh@apple.com>
[iOS] Specify -[NSURL _title] for the associated URL when copying an image element
https://bugs.webkit.org/show_bug.cgi?id=181783
<rdar://problem/35785445>
Reviewed by Ryosuke Niwa.
Augments an existing API test and adds a new test to make sure that the resulting NSItemProvider's NSURL when
copying an image contains a relevant title.
* TestWebKitAPI/Tests/ios/ActionSheetTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/ios/DataInteractionSimulator.mm:
* TestWebKitAPI/ios/UIKitSPI.h:
2018-01-17 Carlos Garcia Campos <cgarcia@igalia.com>
WebDriver: ignore the driver in selenium test names when getting expectations
https://bugs.webkit.org/show_bug.cgi?id=181738
Reviewed by Carlos Alberto Lopez Perez.
In selenium tests, the driver is added as a parameter to every test which results in tests names like
foo[DriverName] or foo[DriverName-param2] in case of tests using more parameters. We don't want to include the
driver name in the test expectations file, so we need to remove it when querying the expectations.
* Scripts/webkitpy/webdriver_tests/pytest_runner.py:
(TestExpectationsMarker.__init__): Save the param to ignore.
(TestExpectationsMarker._item_name): Return the name of the test without the para to ignore.
(TestExpectationsMarker.pytest_collection_modifyitems): Use _item_name().
(run): Pass param to ignore to TestExpectationsMarker().
* Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:
(WebDriverSeleniumExecutor.__init__): Save the driver name.
(WebDriverSeleniumExecutor.run): Pass the driver name as param to ignore.
2018-01-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] Show unit tests unexpectedly passing in the bots
https://bugs.webkit.org/show_bug.cgi?id=181726
Reviewed by Michael Catanzaro.
Now that we have the info, let's show it also in the bots.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunGLibAPITests.commandComplete):
2018-01-17 Ling Ho <lingcherd_ho@apple.com>
Fix broken unittest after r227048
https://bugs.webkit.org/show_bug.cgi?id=181760
Reviewed by Aakash Jain.
2018-01-17 Michael Catanzaro <mcatanzaro@igalia.com>
WEBKIT_FRAMEWORK should not modify file-global include directories
https://bugs.webkit.org/show_bug.cgi?id=181656
Reviewed by Konstantin Tokarev.
* TestWebKitAPI/PlatformWPE.cmake:
* TestWebKitAPI/glib/CMakeLists.txt:
2018-01-17 Alicia Boya García <aboya@igalia.com>
Unreviewed, mark Alicia as committer in contributors.json
* Scripts/webkitpy/common/config/contributors.json:
2018-01-17 Youenn Fablet <youenn@apple.com>
Put fetch Request.keepalive behind a runtime flag
https://bugs.webkit.org/show_bug.cgi?id=181592
Reviewed by Chris Dumez.
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
* DumpRenderTree/win/DumpRenderTree.cpp:
(enableExperimentalFeatures):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
2018-01-17 Wenson Hsieh <wenson_hsieh@apple.com>
Add injected bundle SPI to replace subresource URLs when dropping or pasting rich content
https://bugs.webkit.org/show_bug.cgi?id=181637
<rdar://problem/36508471>
Reviewed by Tim Horton.
Add 2 new API tests to exercise injected bundle SPI for supplying replacement URLs when pasting an image, and an
attributed string containing multiple NSTextAttachments. See WebKit and WebCore ChangeLogs for more detail.
* TestWebKitAPI/Tests/WebKitCocoa/BundleEditingDelegatePlugIn.mm:
(-[BundleEditingDelegatePlugIn webProcessPlugIn:didCreateBrowserContextController:]):
(-[BundleEditingDelegatePlugIn _webProcessPlugInBrowserContextController:replacementURLForResource:mimeType:]):
Implement the new Objective-C bundle SPI to look up the incoming MIME type in the dictionary supplied via the
"MIMETypeToReplacementURLMap" bundle initialization parameter, and return it.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(webViewForTestingAttachments):
(-[TestWKWebView tagsInBody]):
(-[TestWKWebView expectElementTagsInOrder:]):
(-[TestWKWebView expectElementTag:toComeBefore:]):
Add a test helper to check that the given list of element tags appears in the document body. Also, reimplement
the existing -expectElementTag:toComeBefore: as a special case of -expectElementTagsInOrder:.
(TestWebKitAPI::TEST):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
2018-01-17 Carlos Garcia Campos <cgarcia@igalia.com>
WebDriver: add support for test expectations
https://bugs.webkit.org/show_bug.cgi?id=180420
Reviewed by Carlos Alberto Lopez Perez.
Add support for parsing test expectations from a JSON file and mark tests on collection accordingly.
* Scripts/run-webdriver-tests: Get the retval from process_results().
* Scripts/webkitpy/thirdparty/__init__.py:
(AutoinstallImportHook._install_pytest): Install also py because pytest needs it.
* Scripts/webkitpy/webdriver_tests/pytest_runner.py:
(TestExpectationsMarker): Plugin to mark tests based on given expectations.
(TestExpectationsMarker.__init__): Initialize expectations.
(TestExpectationsMarker.pytest_collection_modifyitems): Mark tests if needed,
(run): Create and use TestExpectationsMarker plugin.
* Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:
(WebDriverSeleniumExecutor.run): Pass expectations to pytest_runner.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner.py:
(WebDriverTestRunner.__init__): Create a TestExpectations and pass it to the runners.
(WebDriverTestRunner.run): Do not count results here.
(WebDriverTestRunner.process_results): Rename print_results() as process_results() since it now returns the
amount of failures. Printing the test summary while processing results will be made optional in a follow up
patch.
(WebDriverTestRunner.process_results.report): Return the amount of failures.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_selenium.py:
(WebDriverTestRunnerSelenium.__init__): Initialize _expectations.
(WebDriverTestRunnerSelenium.collect_tests): Do not include skipped tests.
(WebDriverTestRunnerSelenium.run): Stop returning the tests count.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py:
(WebDriverTestRunnerW3C.__init__): Initialize _expectations.
(WebDriverTestRunnerW3C.collect_tests): Do not include skipped tests.
(WebDriverTestRunnerW3C._scan_directory): Ditto.
(WebDriverTestRunnerW3C.run): Stop returning the tests count.
* Scripts/webkitpy/webdriver_tests/webdriver_w3c_executor.py:
(WebDriverW3CExecutor.run): Pass expectations to pytest_runner.
2018-01-17 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed WPE gardening. Mark some known unit test failures.
* TestWebKitAPI/glib/TestExpectations.json:
2018-01-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] Use the same subtest names in GTK and WPE unit tests
https://bugs.webkit.org/show_bug.cgi?id=181724
Reviewed by Philippe Normand.
We currently use /webkit2/foo/bar for GTK and /wpe/foo/bar for WPE. Many of the tests are common, so there's no
reason to use different names. This way we can refer to the same test names for both and we can share the
expectations in the TestExpectations.json file.
* TestWebKitAPI/glib/TestExpectations.json:
* TestWebKitAPI/glib/WebKitGLib/TestMain.h: Use /webkit/foo/bar in GTK and WPE.
2018-01-17 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Increase the slow timeout of GTK and WPE unit tests.
We are using now a lower default timeout, so multiplying by 5 is no longer enough for some of the WTF
tests. Multiply by 10 so that we get the same slow timeout as before, 50.
* glib/api_test_runner.py:
(TestRunner._run_test_glib):
(TestRunner._run_google_test):
2018-01-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Duplicated symbols in libjavascriptcoregtk and libwebkit2gtk can cause crashes in production builds
https://bugs.webkit.org/show_bug.cgi?id=179914
Reviewed by Žan Doberšek.
Add two scripts to be run by dist-check step when releasing. One is to detect symbols duplicated in
libjavascriptcoregtk and libwebkit2gtk that should be included to the version script. The other one is to ensure
all symbols listed in the script are present in the library.
* Scripts/check-for-global-bss-symbols-in-webkigtk-libs: Added.
(bss_symbols):
* Scripts/check-for-invalid-symbols-in-version-script: Added.
(script_symbols):
* Scripts/make-dist:
(Distcheck.build):
(Distcheck):
(Distcheck.check_symbols):
(Distcheck.check):
2018-01-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] Propagate the parameters when restarting glib api tests after a crash
https://bugs.webkit.org/show_bug.cgi?id=181722
Reviewed by Žan Doberšek.
I forgot to pass the parameters to run() when restarting.
* glib/glib_test_runner.py:
(GLibTestRunner.run):
2018-01-16 Fujii Hironori <Hironori.Fujii@sony.com>
[CMake] Remove WebCoreDerivedSources library target
https://bugs.webkit.org/show_bug.cgi?id=181664
Reviewed by Carlos Garcia Campos.
* TestWebKitAPI/PlatformWPE.cmake: Do not link WebCoreDerivedSources.
* TestWebKitAPI/PlatformWin.cmake: Ditto.
2018-01-16 Ling Ho <lingcherd_ho@apple.com>
Move Debug Test262, Release Test262 and Performance queues to Sierra
https://bugs.webkit.org/show_bug.cgi?id=181692
Unreviewed
2018-01-16 Zach Li <zachli@apple.com>
Add pop-up policy support in website policies.
https://bugs.webkit.org/show_bug.cgi?id=181544.
rdar://problem/30521400.
Reviewed by Alex Christensen.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
Added pop-up-check.html.
* TestWebKitAPI/Tests/WebKit/pop-up-check.html: Added.
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[PopUpPoliciesDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[PopUpPoliciesDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[PopUpPoliciesDelegate webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:]):
(TEST):
2018-01-16 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] Provide the `src` of an attachment to the UI delegate when an attachment is inserted
https://bugs.webkit.org/show_bug.cgi?id=181638
<rdar://problem/36508702>
Reviewed by Dan Bernstein.
Tweak an existing API test to check that the `src` of an attachment element inserted via script matches the
`source` provided to the UI delegate via -[WKUIDelegate _webView:didInsertAttachment:withSource:].
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[AttachmentUpdateObserver init]):
(-[AttachmentUpdateObserver sourceForIdentifier:]):
(-[AttachmentUpdateObserver _webView:didInsertAttachment:withSource:]):
(TestWebKitAPI::ObserveAttachmentUpdatesForScope::expectSourceForIdentifier):
(TestWebKitAPI::TEST):
(-[AttachmentUpdateObserver _webView:didInsertAttachment:]): Deleted.
2018-01-16 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK unit tests execution in the bots after r226967.
I forgot to pass the environment to the GLibTestRunner and Xvfb was not used in the bots.
* glib/api_test_runner.py:
(TestRunner._run_test_glib): Pass env to GLibTestRunner.
* glib/glib_test_runner.py:
(GLibTestRunner.run): Use given env.
2018-01-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] Stop passing --verbose to run-api-tests from the bots
https://bugs.webkit.org/show_bug.cgi?id=181676
Reviewed by Carlos Alberto Lopez Perez.
The option was removed in r226967.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
(RunGtkAPITests):
(RunWPEAPITests):
2018-01-16 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Temporarily bring back --verbose option of api_test_runner.py.
The bots are still passing that option and the step is failing because it was removed in r226967.
* glib/api_test_runner.py:
(add_options):
2018-01-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] Improve the way glib tests are run
https://bugs.webkit.org/show_bug.cgi?id=181674
Reviewed by Žan Doberšek.
Stop using gtester external program and use our own tester from python directly. This way we no longer need to
parse the tests output to get the results which is causing problems in WPE bot. We can now differentiate between
tests failing due to an expected assert in the test and unexpected crashes.
This also fixes a bug in previous code where we failed to properly detect tests timing out, because gtester was
not showing the subtest name in stdout in case of timeouts.
I've lowered the default timeout from 10 to 5, since we are now properly handling the timeout for every test
case. I've also removed the verbose option, since it was only used by gtester and we now always show the result
of every test case.
* glib/api_test_runner.py:
(TestRunner._run_test_glib): Use GLibTestRunner.
(TestRunner._run_google_test): Wrote tests timing out to stdout too.
(add_options):
* glib/glib_test_runner.py: Added.
(TestTimeout):
(Message):
(Message.__init__):
(Message.create):
(Message.create.read_unsigned):
(Message.create.read_double):
(Message.create.read_string):
(GLibTestRunner):
(GLibTestRunner.__init__):
(GLibTestRunner._process_data):
(GLibTestRunner._process_message):
(GLibTestRunner._read_from_pipe):
(GLibTestRunner._read_from_stderr):
(GLibTestRunner._start_timeout):
(GLibTestRunner._start_timeout._alarm_handler):
(GLibTestRunner._stop_timeout):
(GLibTestRunner._subtest_start):
(GLibTestRunner._subtest_message):
(GLibTestRunner._subtest_stderr):
(GLibTestRunner._subtest_end):
(GLibTestRunner.run):
2018-01-15 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed, add Thibault to contributors.json
It's a bit weird to add someone here before their first contribution, but this affects
Bugzilla autocomplete, and that is serious business.
* Scripts/webkitpy/common/config/contributors.json:
2018-01-15 JF Bastien <jfbastien@apple.com>
Remove makePoisonedUnique
https://bugs.webkit.org/show_bug.cgi?id=181630
<rdar://problem/36498623>
Reviewed by Mark Lam.
Update tests.
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtr.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForNonTriviallyDestructibleArrays.cpp:
(TestWebKitAPI::TEST):
2018-01-15 Adrian Perez de Castro <aperez@igalia.com>
[GTK][JHBuild] Tools/gtk/install-dependencies: Package libxfont does not exist anymore in Arch Linux
https://bugs.webkit.org/show_bug.cgi?id=181476
Reviewed by Michael Catanzaro.
Update to xorg-server 1.19.6 which depends on libxfont2, and change
the lists of packages to install libxfont2-devel (or equivalent).
* gtk/install-dependencies:
* gtk/jhbuild.modules:
2018-01-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WPE] Add support for unit test expectations
https://bugs.webkit.org/show_bug.cgi?id=181589
Reviewed by Michael Catanzaro.
We currently have a way to skip tests by annotating them in the api test runner script. The main problem of this
approach is that we skip tests when they fail in the bots and we never notice if they stop failing, keeping the
tests skipped forever. This is indeed the case of several WebKit2 C API tests. Annotating skipped tests in the
script itself is not a good idea either.
This patch adds a generic TestExpectations class for simple tests based on tests with subtests, like our unit
tests, but also WebDriver tests. It parses a json file with the tests and subtests expectations and provides
convenient methods to query them.
* Scripts/run-gtk-tests:
(GtkTestRunner): Remove all Skipped and Slow tests marked here.
* Scripts/run-wpe-tests:
(WPETestRunner): Ditto.
* Scripts/webkitpy/common/test_expectations.py: Added.
(TestExpectations):
(TestExpectations.__init__):
(TestExpectations._port_name_for_expected):
(TestExpectations._expected_value):
(TestExpectations.skipped_tests):
(TestExpectations.skipped_subtests):
(TestExpectations._expectation_value):
(TestExpectations.is_slow):
(TestExpectations.get_expectation):
* Scripts/webkitpy/common/test_expectations_unittest.py: Added.
(MockTestExpectations):
(MockTestExpectations.__init__):
(MockTestExpectations.is_skip):
(ExpectationsTest):
(assert_exp):
(assert_not_exp):
(assert_bad_exp):
(assert_skip):
(test_basic):
(test_skip):
(test_flaky):
(test_build_type):
* TestWebKitAPI/glib/TestExpectations.json: Added.
* glib/api_test_runner.py:
(TestRunner): Remove SkippedTest implementation.
(TestRunner.__init__): Create a TestExpectations.
(TestRunner._test_cases_to_skip): Use TestExpectations to check skipped tests.
(TestRunner._should_run_test_program): Ditto.
(TestRunner._run_test_glib): Use TestExpectations to check if test suite is slow.
(TestRunner._run_test_glib.parse_line.set_test_result): Register also tests passing.
(TestRunner._run_google_test): Use TestExpectations to check if test cases is slow and register tests passing.
(TestRunner.run_tests): Check if actual result is the expected one and register also unexpected passes.
(TestRunner.run_tests.report): Helper to write report to stdout.
2018-01-13 Mark Lam <mark.lam@apple.com>
Replace all use of ConstExprPoisoned with Poisoned.
https://bugs.webkit.org/show_bug.cgi?id=181542
<rdar://problem/36442138>
Reviewed by JF Bastien.
1. Converted tests to using new uintptr_t& poison type.
2. Added tests for Poisoned comparison operators.
* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WTF/ConstExprPoisoned.cpp: Removed.
* TestWebKitAPI/Tests/WTF/Poisoned.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::initializeTestPoison): Deleted.
* TestWebKitAPI/Tests/WTF/PoisonedRef.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::passWithRef):
* TestWebKitAPI/Tests/WTF/PoisonedRefPtr.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::f1):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtr.cpp:
(TestWebKitAPI::TEST):
(TestWebKitAPI::poisonedPtrFoo):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForNonTriviallyDestructibleArrays.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForTriviallyDestructibleArrays.cpp:
(TestWebKitAPI::TEST):
2018-01-13 David Kilzer <ddkilzer@apple.com>
check-webkit-style: false positive for [whitespace/braces] with os_log format string
<https://webkit.org/b/181606>
Reviewed by Darin Adler.
* Scripts/webkitpy/style/checkers/cpp.py:
(check_spacing): Modify regular expression to ignore
os_log format strings like '%{public}'.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(CppStyleTest.test_spacing_before_braces): Add os_log
format string test.
2018-01-12 Wenson Hsieh <wenson_hsieh@apple.com>
[macOS] API tests ChangeAttachmentDataUpdatesWithInPlaceDisplay and InPlaceVideoAttachmentInsertionWithinList are failing
https://bugs.webkit.org/show_bug.cgi?id=181626
Reviewed by Joseph Pecoraro.
Make the web view for WKAttachmentTests slightly bigger to avoid size clamping behavior introduced in r226915.
Additionally, write a new API test covering the change in r226915.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(webViewForTestingAttachments):
(TestWebKitAPI::TEST):
2018-01-12 Alex Christensen <achristensen@webkit.org>
History state should be updated during client redirects with asynchronous policy decisions
https://bugs.webkit.org/show_bug.cgi?id=181358
<rdar://problem/35547689>
Reviewed by Andy Estes.
* TestWebKitAPI/Tests/WebKit/WKBackForwardList.mm:
(-[AsyncPolicyDecisionDelegate webView:didFinishNavigation:]):
(-[AsyncPolicyDecisionDelegate webView:decidePolicyForNavigationAction:decisionHandler:]):
(TEST):
2018-01-12 Jonathan Bedard <jbedard@apple.com>
webkitpy: Refactor simulator code (Part 4)
https://bugs.webkit.org/show_bug.cgi?id=180555
<rdar://problem/36131381>
Reviewed by Aakash Jain.
Move new_simulated_device.py to simulated_device.py.
* Scripts/webkitpy/port/ios_simulator.py: Update import statement.
* Scripts/webkitpy/xcode/new_simulated_device.py: Removed.
* Scripts/webkitpy/xcode/new_simulated_device_unittest.py: Removed.
* Scripts/webkitpy/xcode/simulated_device.py: Copied from Tools/Scripts/webkitpy/xcode/new_simulated_device.py.
* Scripts/webkitpy/xcode/simulated_device_unittest.py: Copied from Tools/Scripts/webkitpy/xcode/new_simulated_device_unittest.py.
2018-01-12 Alex Christensen <achristensen@webkit.org>
REGRESSION (r226818): API test WebKitLegacy.LoadInvalidURLRequest is failing
https://bugs.webkit.org/show_bug.cgi?id=181595
This test was testing behavior of an invalid URL that WebCore parses but NSURL does not.
It was using example.com<> but after r226479 < and > are considered invalid by WebCore.
I change the < and > to $ to make this test pass and continue to test what it used to.
* TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.html:
* TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm:
(-[LoadInvalidURLWebFrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
2018-01-11 Keith Miller <keith_miller@apple.com>
Rename ENABLE_ASYNC_ITERATION to ENABLE_JS_ASYNC_ITERATION
https://bugs.webkit.org/show_bug.cgi?id=181573
Reviewed by Simon Fraser.
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
2018-01-11 Jiewen Tan <jiewen_tan@apple.com>
[WebAuthN] Import a CBOR coder from Chromium
https://bugs.webkit.org/show_bug.cgi?id=181522
<rdar://problem/36055729>
Reviewed by Brent Fulgham.
This patch also imports all unit tests into our API tests to ensure all
workarounds and modification against the original codebase doesn't change
any original functionalities.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebCore/CBORReaderTest.cpp: Added.
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/CBORValueTest.cpp: Added.
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/CBORWriterTest.cpp: Added.
(TestWebKitAPI::eq):
Workarounds applied.
(TestWebKitAPI::TEST):
2018-01-11 Jonathan Bedard <jbedard@apple.com>
webkitpy: Use partially disambiguated type in SimulatedDeviceManager._disambiguate_device_type
https://bugs.webkit.org/show_bug.cgi?id=181538
<rdar://problem/36440580>
Reviewed by Aakash Jain.
When disambiguating a device type, it is possible that the provided device type is sufficiently
ambiguous that the comparisons against complete device types without a disambiguated hardware_family
will result in a failure to disambiguate the type.
* Scripts/webkitpy/xcode/new_simulated_device.py:
(SimulatedDeviceManager._disambiguate_device_type):
2018-01-11 Brent Fulgham <bfulgham@apple.com>
REGRESSION(r219530): ResourceLoadStatisticsPersistentStorage should be read-only in ephemeral sessions
https://bugs.webkit.org/show_bug.cgi?id=181136
<rdar://problem/36116604>
Reviewed by Chris Dumez.
Add a new API test to confirm that ResourceLoadStatistics can be turned on safely for ephemeral
browsing sessions.
* Scripts/run-gtk-tests:
(GtkTestRunner): Unskip test now that it passes.
* TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm:
(TEST): Add new WebsiteDataStoreEphemeral test.
2018-01-11 Ryan Haddad <ryanhaddad@apple.com>
Unreviewed, rolling out r226816.
This change broke LayoutTests on the bots.
Reverted changeset:
"run-webkit-tests fails when there is a curly brace in Xcode
build output"
https://bugs.webkit.org/show_bug.cgi?id=181254
https://trac.webkit.org/changeset/226816
2018-01-11 Jonathan Bedard <jbedard@apple.com>
webkitpy: Fix flakey webserver tests
https://bugs.webkit.org/show_bug.cgi?id=181555
<rdar://problem/36448273>
Reviewed by Aakash Jain.
* Scripts/webkitpy/layout_tests/controllers/layout_test_runner_unittest.py:
(LayoutTestRunnerTests.test_servers_started): Add and bind custom checks to
determine if a specific server is running.
2018-01-11 Jonathan Bedard <jbedard@apple.com>
Commit queue failed to land a bug, 'NoneType' object has no attribute 'strip'
https://bugs.webkit.org/show_bug.cgi?id=181561
<rdar://problem/36452652>
Reviewed by Aakash Jain.
BeautifulSoup.find may return None, this case should be gracefully handled.
* Scripts/webkitpy/common/net/bugzilla/bugzilla.py:
(BugzillaQueries._parse_result_count):
(BugzillaQueries._fetch_bugs_from_advanced_query): Added logging.
2018-01-11 Alexey Proskuryakov <ap@apple.com>
run-webkit-tests fails when there is a curly brace in Xcode build output
https://bugs.webkit.org/show_bug.cgi?id=181254
Reviewed by Daniel Bates.
* Scripts/webkitpy/layout_tests/views/metered_stream.py:
(MeteredStream.write):
2018-01-11 Jonathan Bedard <jbedard@apple.com>
webkitpy: Reimplement simulator code (Part 3)
https://bugs.webkit.org/show_bug.cgi?id=180555
<rdar://problem/36131381>
Reviewed by Aakash Jain.
Remove old simulator code.
* Scripts/webkitpy/xcode/__init__.py: Remove import statement.
* Scripts/webkitpy/xcode/simulated_device.py: Removed.
* Scripts/webkitpy/xcode/simulator.py: Removed.
* Scripts/webkitpy/xcode/simulator_unittest.py: Removed.
2018-01-11 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] Support moving attachment elements in editable areas using drag and drop
https://bugs.webkit.org/show_bug.cgi?id=181337
<rdar://problem/36324813>
Reviewed by Tim Horton.
Add 3 new API tests for attachment element dragging.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[TestWKWebView expectElementTag:toComeBefore:]):
(-[NSItemProvider expectType:withData:]):
(TestWebKitAPI::TEST):
2018-01-11 Jonathan Bedard <jbedard@apple.com>
REGRESSION(r225856): Incorrectly managing 'future' baseline_search_paths.
https://bugs.webkit.org/show_bug.cgi?id=179621
<rdar://problem/35589585>
Unreviewed infrastructure fix.
* Scripts/webkitpy/port/mac.py:
(MacPort.default_baseline_search_path): Include 'future' in the version_fallback
list if we are the VERSION_MAX, which usually corresponds with future.
2018-01-11 Filip Pizlo <fpizlo@apple.com>
CodeBlocks should be in IsoSubspaces
https://bugs.webkit.org/show_bug.cgi?id=180884
Reviewed by Saam Barati.
Remove some less important benchmarks from the default run. Doing run-jsc-benchmarks
shouldn't take a long time due to benchmarks we don't optimize for.
* Scripts/run-jsc-benchmarks:
2018-01-11 Ms2ger <Ms2ger@igalia.com>
Test gardening for GTK.
https://bugs.webkit.org/show_bug.cgi?id=181477
Unreviewed test gardening.
* TestWebKitAPI/Tests/WebKitGLib/TestAuthentication.cpp: Correct the file name.
* TestWebKitAPI/Tests/WebKitGLib/TestConsoleMessage.cpp: Adjust the expected console message.
2018-01-11 Carlos Alberto Lopez Perez <clopez@igalia.com>
Add the new JSCOnly bot to the scheduler.
https://bugs.webkit.org/show_bug.cgi?id=181487
Unreviewed follow-up patch after r226729
On r226729 I missed to add the new JSCOnly bot the default scheduler.
This is needed to make the bot automatically pick each commit for testing.
* BuildSlaveSupport/build.webkit.org-config/config.json:
2018-01-11 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] Support dragging attachment elements out as files on iOS
https://bugs.webkit.org/show_bug.cgi?id=181199
<rdar://problem/36299316>
Reviewed by Tim Horton, Andy Estes and Joseph Pecoraro.
Add support in the drag and drop simulator for testing blob-backed attachment element dragging, and also add new
attachment API tests.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[NSItemProvider expectType:withData:]):
(TestWebKitAPI::TEST):
Add two new WKAttachmentTests to exercise dragging data- and file-backed blobs via attachment elements. These
tests first insert attachments via drop or WKWebView SPI, and then drag these attachments out and use the
-expectType:withData: helper to inspect the item providers created from the drag source.
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):
* TestWebKitAPI/ios/DataInteractionSimulator.h:
* TestWebKitAPI/ios/DataInteractionSimulator.mm:
(-[MockDragSession localContext]):
(-[MockDragSession setLocalContext:]):
(-[DataInteractionSimulator _resetSimulatedState]):
(-[DataInteractionSimulator simulateAllTouchesCanceled:]):
(-[DataInteractionSimulator _concludeDataInteractionAndPerformOperationIfNecessary]):
(-[DataInteractionSimulator _advanceProgress]):
(-[DataInteractionSimulator endDataTransfer]):
Make some tweaks to the iOS drag and drop simulator. In particular, this patch (1) adds a new hook to tell
WebKit that data transfers have been completed, (2) fixes incorrect drop proposal handling when returning
UIDropOperationForbidden by replacing _shouldPerformOperation with a UIDropProposal, and (3) teach the
MockDragSession to hold on to a localContext.
2018-01-11 Ali Juma <ajuma@chromium.org>
Unreviewed. Add Ali Juma as contributor
* Scripts/webkitpy/common/config/contributors.json:
2018-01-11 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update Selenium WebDriver imported tests.
New version of selenium uses command line options to pass driver and browser binaries to pytest instead of
environment variables.
* Scripts/webkitpy/webdriver_tests/pytest_runner.py:
(collect): Reorder the arguments to make pytest happy.
(run): Ditto.
* Scripts/webkitpy/webdriver_tests/webdriver_selenium_executor.py:
(WebDriverSeleniumExecutor.__init__): Add driver binary, browser binary and browser args as arguments.
2018-01-11 Ling Ho <lingcherd_ho@apple.com>
Move Commit Queue and EWS Queues to Sierra on Bot Watcher's Dasboard
https://bugs.webkit.org/show_bug.cgi?id=181492
<rdar://problem/36359679>
Reviewed by Alexey Proskuryakov.
2018-01-10 Adrian Perez de Castro <aperez@igalia.com>
[GTK] Tools/gtk/install-dependencies: Packages geoclue, ruby-highline, xorg-utils do not exist in Arch Linux
https://bugs.webkit.org/show_bug.cgi?id=181475
Reviewed by Michael Catanzaro.
* gtk/install-dependencies: Update package list for Arch Linux, extend
message shown at end of installation with additional tips.
2018-01-10 Wenson Hsieh <wenson_hsieh@apple.com>
REGRESSION(r222507): Composition highlight doesn't render when using IME
https://bugs.webkit.org/show_bug.cgi?id=181485
<rdar://problem/35896516>
Reviewed by Ryosuke Niwa.
Add a `suppressUnderline` argument to TextInputController.setMarkedText. This suppresses the custom underlines
rendered when testing IME on iOS in WebKit2. In this new test, suppressing underline rendering is needed to
allow rendering composition backgrounds (see InlineTextBox::paint).
* DumpRenderTree/ios/TextInputControllerIOS.m:
(+[TextInputController isSelectorExcludedFromWebScript:]):
(+[TextInputController webScriptNameForSelector:]):
(-[TextInputController setMarkedText:selectedFrom:length:suppressUnderline:]):
(-[TextInputController setMarkedText:selectedFrom:length:]): Deleted.
* DumpRenderTree/mac/TextInputControllerMac.m:
(+[TextInputController isSelectorExcludedFromWebScript:]):
(+[TextInputController webScriptNameForSelector:]):
(-[TextInputController setMarkedText:selectedFrom:length:suppressUnderline:]):
(-[TextInputController setMarkedText:selectedFrom:length:]): Deleted.
* WebKitTestRunner/InjectedBundle/Bindings/TextInputController.idl:
* WebKitTestRunner/InjectedBundle/TextInputController.cpp:
(WTR::TextInputController::setMarkedText):
* WebKitTestRunner/InjectedBundle/TextInputController.h:
2018-01-10 JF Bastien <jfbastien@apple.com>
Poison small JSObject derivatives which only contain pointers
https://bugs.webkit.org/show_bug.cgi?id=181483
<rdar://problem/36407127>
Reviewed by Mark Lam.
Test the new move-assign and move-copy from unique_ptr, as well as
nullptr_t ctors.
* TestWebKitAPI/Tests/WTF/Poisoned.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtr.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedUniquePtrForTriviallyDestructibleArrays.cpp:
(TestWebKitAPI::TEST):
2018-01-10 Chris Dumez <cdumez@apple.com>
Multiple http/wpt/beacon/contentextensions/ test are flaky.
https://bugs.webkit.org/show_bug.cgi?id=179256
<rdar://problem/35401978>
Reviewed by Alex Christensen.
Update WebKitTestRunner to set a temporary path for content extensions so that its WKTR
instance gets its own folder to avoid conflicts and flakiness.
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::TestController::platformConfigureViewForTest):
2018-01-10 Tim Horton <timothy_horton@apple.com>
REGRESSION (r213590): Swipe from edge to go to previous page is significantly slower than tapping back button on Twitter
https://bugs.webkit.org/show_bug.cgi?id=181269
<rdar://problem/35110344>
Reviewed by Simon Fraser.
* DumpRenderTree/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::beginBackSwipe):
(WTR::UIScriptController::completeBackSwipe):
* TestRunnerShared/UIScriptContext/UIScriptController.cpp:
(WTR::UIScriptController::beginBackSwipe):
(WTR::UIScriptController::completeBackSwipe):
(WTR::UIScriptController::overridePreference):
(WTR::UIScriptController::replaceTextAtRange):
* WebKitTestRunner/ios/PlatformWebViewIOS.mm:
(WTR::PlatformWebView::setNavigationGesturesEnabled):
* WebKitTestRunner/ios/UIScriptControllerIOS.mm:
(WTR::UIScriptController::beginBackSwipe):
(WTR::UIScriptController::completeBackSwipe):
Implement beginBackSwipe and completeBackSwipe on iOS (they already
exist on Mac) in terms of the new WKWebView testing SPI.
2018-01-10 Jonathan Bedard <jbedard@apple.com>
REGRESSION (r226715): ignore WARNING output in linter tests
https://bugs.webkit.org/show_bug.cgi?id=181486
<rdar://problem/36408847>
Reviewed by Aakash Jain.
Linter unit tests should not be interested in logs at the the INFO or WARNING levels.
* Scripts/webkitpy/common/system/outputcapture.py:
(OutputCapture.__init__): Pass logging level to be captured.
* Scripts/webkitpy/style/main_unittest.py:
(ExpectationLinterInStyleCheckerTest.test_no_linter_errors): Capture logging at the ERROR level.
(ExpectationLinterInStyleCheckerTest.test_linter_duplicate_line): Ditto.
(ExpectationLinterInStyleCheckerTest.test_linter_duplicate_line_no_edit): Ditto.
(ExpectationLinterInStyleCheckerTest.test_linter_duplicate_line_edit_in_file): Ditto.
(ExpectationLinterInStyleCheckerTest.test_linter_duplicate_line_only_deletes): Ditto.
(ExpectationLinterInStyleCheckerTest.test_linter_added_file_with_error): Ditto.
(ExpectationLinterInStyleCheckerTest.test_linter_deleted_file): Ditto.
(ExpectationLinterInStyleCheckerTest.test_linter_deleted_file_no_edit): Ditto.
2018-01-10 Carlos Alberto Lopez Perez <clopez@igalia.com>
Add a JSCOnly MIPS buildbot
https://bugs.webkit.org/show_bug.cgi?id=181487
Reviewed by Michael Catanzaro.
Add the new bot configs definitions for the master and update the unit tests.
* BuildSlaveSupport/build.webkit.org-config/config.json:
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
2018-01-10 Jonathan Bedard <jbedard@apple.com>
REGRESSION (r226715): don't re-check number of simulators in child processes
https://bugs.webkit.org/show_bug.cgi?id=181484
<rdar://problem/36407151>
Reviewed by Aakash Jain.
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort.__init__): Skip the number of simulators check if simulators
are already initialized.
2018-01-10 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r226667 and r226673.
https://bugs.webkit.org/show_bug.cgi?id=181488
This caused a flaky crash. (Requested by mlewis13 on #webkit).
Reverted changesets:
"CodeBlocks should be in IsoSubspaces"
https://bugs.webkit.org/show_bug.cgi?id=180884
https://trac.webkit.org/changeset/226667
"REGRESSION (r226667): CodeBlocks should be in IsoSubspaces"
https://bugs.webkit.org/show_bug.cgi?id=180884
https://trac.webkit.org/changeset/226673
2018-01-10 Jonathan Bedard <jbedard@apple.com>
Follow-up fix to r226715
https://bugs.webkit.org/show_bug.cgi?id=180555
<rdar://problem/36131381>
Unreviewed infrastructure fix.
* Scripts/webkitpy/xcode/new_simulated_device.py:
(SimulatedDeviceManager._create_or_find_device_for_request): Use _delete instead
of delete.
2018-01-10 Jonathan Bedard <jbedard@apple.com>
webkitpy: Refactor simulator code (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=180555
<rdar://problem/36131381>
Reviewed by Aakash Jain.
The patch leverages the SimulatedDeviceManager when running layout tests.
This patch is primarily code removal, since much of the IOSSimulatorPort
was dedicated to managing simulators. The removed code is either now owned by the
SimulatedDeviceManager (and committed in Part 1) or supported a technique to
boot multiple simulators which was made obsolete in Xcode 9.
* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._custom_device_for_test.in): Device names now have spaces in them,
strip those spaces.
* Scripts/webkitpy/layout_tests/run_webkit_tests.py:
(parse_args): Remove '--runtime' flag, this is achieved with the --version flag.
* Scripts/webkitpy/port/ios.py:
(IOSPort.__init__): The _current_device idiom is no longer required since the
SimulatedDeviceManager keeps track of any previously booted devices.
(IOSPort.target_host): Even when only a single device is used, it will be accessed
through the array of managed devices.
(IOSPort.using_multiple_devices): Deleted.
* Scripts/webkitpy/port/ios_device.py:
(IOSDevicePort.using_multiple_devices): Deleted.
* Scripts/webkitpy/port/ios_simulator.py:
(IOSSimulatorPort): Remove constants required to manage simulators, change device
class strings so they can be parsed by the DeviceType class.
(IOSSimulatorPort.__init__): Determine the number of processes to use by checking
the number of simulators currently booted, the number of child processes specified
and the maximum number of simulators supported by this system.
(IOSSimulatorPort._device_for_worker_number_map):Return the array of initialized
devices owned by the SimulatedDeviceManager.
(IOSSimulatorPort.ios_version): Remove support for the --runtime option.
(IOSSimulatorPort.default_child_processes): Use the SimulatedDeviceManager to check
the maximum number of supported simulators on this system.
(IOSSimulatorPort._create_devices): Construct a list of device requests with a
request for each child process and send this list to the SimulatedDeviceManager to
initialize the devices.
(IOSSimulatorPort.clean_up_test_run):
(IOSSimulatorPort.check_sys_deps): Check that there are simulators running the
specified version of iOS.
(IOSSimulatorPort.reset_preferences):
(IOSSimulatorPort.simulator_runtime): Deleted.
(IOSSimulatorPort.simulator_device_type): Deleted.
(IOSSimulatorPort._teardown_managed_simulators): Deleted.
(IOSSimulatorPort.use_multiple_simulator_apps): Deleted.
(IOSSimulatorPort._create_simulators): Deleted.
(IOSSimulatorPort._quit_ios_simulator): Deleted.
(IOSSimulatorPort._using_dedicated_simulators): Deleted.
(IOSSimulatorPort.using_multiple_devices): Deleted.
(IOSSimulatorPort._create_device): Deleted.
(IOSSimulatorPort.get_simulator_path): Deleted.
(IOSSimulatorPort._createSimulatorApps): Deleted.
(IOSSimulatorPort._createSimulatorApp): Deleted.
* Scripts/webkitpy/tool/commands/rebaseline_unittest.py:
(TestRebaseline.test_rebaseline): Filter out commands run when determining the
maximum number of simulators run on this system.
(TestRebaselineExpectations.test_rebaseline_expectations): Ditto.
* Scripts/webkitpy/xcode/new_simulated_device.py:
(SimulatedDeviceManager._does_fulfill_request): Fixed log statement.
2018-01-10 Carlos Garcia Campos <cgarcia@igalia.com>
WebDriver: run-webdriver-tests doesn't handle test names with a '/' correctly
https://bugs.webkit.org/show_bug.cgi?id=181474
Reviewed by Carlos Alberto Lopez Perez.
We use os.path.basename() to get the subtest name. If the test name contains a slash we get part of the subtest
name as the name.
* Scripts/webkitpy/webdriver_tests/webdriver_test_runner_w3c.py:
(WebDriverTestRunnerW3C._subtest_name): Helper function to get the subtest name.
(WebDriverTestRunnerW3C.run): Use _subtest_name() instead of os.path.basename().
2018-01-09 Andy Estes <aestes@apple.com>
[Xcode] Use the Apple Internal SDK if available when building ImageDiff
https://bugs.webkit.org/show_bug.cgi?id=181459
Reviewed by Dan Bernstein.
* ImageDiff/cg/Configurations/Base.xcconfig:
2018-01-09 Myles C. Maxfield <mmaxfield@apple.com>
font-display:fallback can cause a visual flash (which is supposed to be impossible)
https://bugs.webkit.org/show_bug.cgi?id=181374
Reviewed by Simon Fraser.
The test requires Palatino.
* DumpRenderTree/mac/DumpRenderTree.mm:
(allowedFontFamilySet):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::allowedFontFamilySet):
2018-01-09 Saam Barati <sbarati@apple.com>
Give some slack in display-profiler-outputs computation of the terminal window's number of columns
https://bugs.webkit.org/show_bug.cgi?id=181449
Reviewed by JF Bastien.
This allows me to Cmd+f in my terminal to search for things without
having the results become misaligned.
* Scripts/display-profiler-output:
2018-01-09 Basuke Suzuki <Basuke.Suzuki@sony.com>
[webkitpy] PlatformInfo should have default argument for casual use
https://bugs.webkit.org/show_bug.cgi?id=180827
Reviewed by David Kilzer.
PlatformInfo should be the only way to check platform specific thing instead
of sys.platform or other various checks. If there is something you want to check,
it should be placed in PlatformInfo.
Currently to instantiate PlatformInfo, it requires arguments, which is usually
sys, platform and Executive(). They are straight forward and should be handled
by default arguments. Then we can instantiate PlatformInfo more casual.
* Scripts/webkitpy/common/system/platforminfo.py:
(PlatformInfo): Use relative module path import
(PlatformInfo.__init__):
(PlatformInfo.executive): Lazy instantiation of Executive()
(PlatformInfo.total_bytes_memory): Accessing via above property
(PlatformInfo.xcode_sdk_version): Ditto
(PlatformInfo.xcode_simctl_list): Ditto
(PlatformInfo.xcode_version): Ditto
(PlatformInfo._win_version_str): Ditto
* Scripts/webkitpy/common/system/systemhost.py:
(SystemHost.__init__):
* Scripts/webkitpy/common/system/user.py:
(User.__init__):
2018-01-09 Yoshiaki Jitsukawa <Yoshiaki.Jitsukawa@sony.com>
[Win] Remove workaround for Bug 176442 after stopping MSVC 2015 support
https://bugs.webkit.org/show_bug.cgi?id=176443
Reviewed by Darin Adler.
* TestWebKitAPI/Tests/WTF/PriorityQueue.cpp:
(TEST):
2018-01-09 Frederic Wang <fwang@igalia.com.fr>
check-webkit-style: Verify syntax for WK_API_AVAILABLE
https://bugs.webkit.org/show_bug.cgi?id=181394
Reviewed by Darin Adler.
A common syntax error for WK_API_AVAILABLE is to write ios(WK_MAC_TBA)
as the second parameter instead of ios(WK_IOS_TBA). This generally
builds for iOS on EWS but not when using the public SDK. See r224057,
r223207 and r226211 for example. This patch adds a basic style check
for that macro to prevent this kind of mistake.
* Scripts/webkitpy/style/checkers/cpp.py:
(check_min_versions_of_wk_api_available): New function to verify the parameters of WX_API_AVAILABLE.
(check_style): Run new style check.
(CppChecker): Add build type for the new style check.
* Scripts/webkitpy/style/checkers/cpp_unittest.py:
(WebKitStyleTest.test_min_versions_of_wk_api_available): Add tests for the new style check.
2018-01-08 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] Expose HTMLAttachmentElement.uniqueIdentifier to bindings
https://bugs.webkit.org/show_bug.cgi?id=181420
<rdar://problem/36365827>
Reviewed by Alex Christensen.
Adjusts some existing API tests to verify that attachment elements' uniqueIdentifiers match the uniqueIdentifier
of corresponding _WKAttachments.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::TEST):
2018-01-08 Alex Christensen <achristensen@webkit.org>
Add WKNavigationDelegate SPI exposing WebProcess crash reason
https://bugs.webkit.org/show_bug.cgi?id=181410
<rdar://problem/36167199>
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebKitCocoa/Navigation.mm:
(-[CrashReasonDelegate _webView:webContentProcessDidTerminateWithReason:]):
(TEST):
2018-01-08 Alex Christensen <achristensen@webkit.org>
Add SPI for WKOpenPanelParameters._acceptedMIMETypes and _acceptedFileExtensions
https://bugs.webkit.org/show_bug.cgi?id=181408
<rdar://problem/35884960>
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/RunOpenPanel.mm:
(-[RunOpenPanelUIDelegate webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]):
2018-01-08 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] Expose file name and content type of WKAttachment
https://bugs.webkit.org/show_bug.cgi?id=181390
<rdar://problem/36336837>
Reviewed by Tim Horton.
Adjusts some existing tests in WKAttachmentTests to exercise -requestInfo:.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[_WKAttachment synchronouslyRequestInfo:]):
(-[_WKAttachment synchronouslyRequestData:]):
Reimplement this in terms of -synchronouslyRequestInfo:.
(-[_WKAttachment expectRequestedDataToBe:]):
(TestWebKitAPI::TEST):
2018-01-08 Wenson Hsieh <wenson_hsieh@apple.com>
Copying, pasting, and then deleting an attachment element breaks attachment data requests
https://bugs.webkit.org/show_bug.cgi?id=181365
<rdar://problem/36340647>
Reviewed by Tim Horton.
Adds two new attachment API tests to verify that copying and pasting an existing attachment inserts an
attachment element that may be edited independently of the original attachment. See WebCore/ChangeLog for more
detail.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::TEST):
2018-01-08 Youenn Fablet <youenn@apple.com>
navigator.onLine does not work inside service workers
https://bugs.webkit.org/show_bug.cgi?id=181079
<rdar://problem/36178606>
Reviewed by Darin Adler.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::initialize): Setting service worker creation callback to inject ServiceWorkerInternals object.
2018-01-07 Saam Barati <sbarati@apple.com>
Add total exits and total compilations sorting mode to the "full" command in display-profiler-output
https://bugs.webkit.org/show_bug.cgi?id=181372
Reviewed by Filip Pizlo.
Adding these sorting modes makes it easier to analyze functions
that recompile a lot and exit a lot.
* Scripts/display-profiler-output:
2018-01-06 Julien Brianceau <julien.brianceau@gmail.com>
Unreviewed, remove my Cisco email from contributors.json
* Scripts/webkitpy/common/config/contributors.json:
2018-01-05 JF Bastien <jfbastien@apple.com>
WebAssembly: poison JS object's secrets
https://bugs.webkit.org/show_bug.cgi?id=181339
<rdar://problem/36325001>
Reviewed by Mark Lam.
Update tests for swap(Poisoned<k, T>, T*)
* TestWebKitAPI/Tests/WTF/ConstExprPoisoned.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/Poisoned.cpp:
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WTF/PoisonedRef.cpp:
(TestWebKitAPI::TEST):
2018-01-05 Wenson Hsieh <wenson_hsieh@apple.com>
REGRESSION(r226396) DataInteractionTests: ContentEditableToContentEditable and ContentEditableToTextarea are failing
https://bugs.webkit.org/show_bug.cgi?id=181359
Reviewed by Tim Horton.
Ensure that these tests still pass using older SDKs.
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(TestWebKitAPI::TEST):
2018-01-05 Alex Christensen <achristensen@webkit.org>
Rebase API test after r226469
https://bugs.webkit.org/show_bug.cgi?id=181308
* TestWebKitAPI/Tests/WebKitCocoa/LoadInvalidURLRequest.mm:
(-[LoadInvalidURLNavigationActionDelegate webView:didFailProvisionalNavigation:withError:]):
A URL with < or > in it is now recognized as invalid by WebKit. This is intentional, and matches our behavior before enabling the new URLParser.
2018-01-05 Alex Christensen <achristensen@webkit.org>
Restrict navigation-time WKWebsiteDataStore swapping to main frame navigations
https://bugs.webkit.org/show_bug.cgi?id=181217
Reviewed by Tim Horton.
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[WebsitePoliciesWebsiteDataStoreDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
(TEST):
2018-01-05 Alex Christensen <achristensen@webkit.org>
Add WKBundleFrameCreateFrameHandle
https://bugs.webkit.org/show_bug.cgi?id=181232
<rdar://problem/35926696>
Reviewed by Tim Horton.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/FrameHandleSerialization.mm: Added.
(mouseDidMoveOverElement):
(-[FrameHandleSerialization webProcessPlugIn:didCreateBrowserContextController:]):
* TestWebKitAPI/Tests/WebKitCocoa/UIDelegate.mm:
(-[MouseMoveOverElementDelegate _webView:mouseDidMoveOverElement:withFlags:userInfo:]):
(TEST):
2018-01-05 Chris Fleizach <cfleizach@apple.com>
iOS: Build fix after r226432.
Unreviewed. Stop duplicating speakAs symbols for iOS.
* DumpRenderTree/AccessibilityUIElement.cpp:
(AccessibilityUIElement::speakAs):
2018-01-05 Javier Fernandez <jfernandez@igalia.com>
Unreviewed, added myself as WebKit reviewer
* Scripts/webkitpy/common/config/contributors.json:
2018-01-05 Claudio Saavedra <csaavedra@igalia.com>
WPE: Build fix after r226432.
Unreviewed. Rename ::speak() to ::speakAs().
* WebKitTestRunner/InjectedBundle/wpe/AccessibilityUIElementWPE.cpp:
(WTR::AccessibilityUIElement::speakAs):
(WTR::AccessibilityUIElement::speak): Deleted.
2018-01-04 Chris Fleizach <cfleizach@apple.com>
AX: Implement updated CSS3 Speech for 'speak' and 'speak-as' properties
https://bugs.webkit.org/show_bug.cgi?id=180361
Reviewed by Zalan Bujtas.
* DumpRenderTree/AccessibilityUIElement.cpp:
(speakAsCallback):
(AccessibilityUIElement::speakAs):
(AccessibilityUIElement::getJSClass):
(speakCallback): Deleted.
(AccessibilityUIElement::speak): Deleted.
* DumpRenderTree/AccessibilityUIElement.h:
* DumpRenderTree/ios/AccessibilityUIElementIOS.mm:
(AccessibilityUIElement::speakAs):
* DumpRenderTree/mac/AccessibilityUIElementMac.mm:
(AccessibilityUIElement::speakAs):
(AccessibilityUIElement::speak): Deleted.
* WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* WebKitTestRunner/InjectedBundle/ios/AccessibilityUIElementIOS.mm:
(WTR::AccessibilityUIElement::speakAs):
(WTR::AccessibilityUIElement::speak): Deleted.
* WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::speakAs):
(WTR::AccessibilityUIElement::speak): Deleted.
2018-01-04 Jonathan Bedard <jbedard@apple.com>
REGRESSION (r226395): test-webkitperl test expectations incorrect
https://bugs.webkit.org/show_bug.cgi?id=181307
<rdar://problem/36306558>
Rubber-stamped by Aakash Jain.
r226395 added two lines towards the beginning of
Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests.pl, the line
numbers in the test expectations need to update.
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests-expected.txt:
2018-01-04 Tim Horton <timothy_horton@apple.com>
WKWebView loses minimum layout size overrides that happen while the process is terminated
https://bugs.webkit.org/show_bug.cgi?id=181306
<rdar://problem/34398288>
Reviewed by Dan Bernstein.
* TestWebKitAPI/Tests/WebKitCocoa/AnimatedResize.mm:
(TEST):
Add a test that calling _overrideLayoutParametersWithMinimumLayoutSize
while the process is terminated results in the page getting the correct
minimum layout size.
2018-01-04 Eric Carlson <eric.carlson@apple.com>
[MediaStream] Add Mock screen capture source
https://bugs.webkit.org/show_bug.cgi?id=181291
<rdar://problem/36298164>
Reviewed by Dean Jackson.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add new test.
* TestWebKitAPI/Tests/WebKitCocoa/GetDisplayMedia.mm:
* TestWebKitAPI/Tests/WebKit/getDisplayMedia.html:
2018-01-04 Lucas Forschler <lforschler@apple.com>
<rdar://problem/36300930> Change proxy server setting on master config to reach s3 servers
Reviewed by Ling Ho.
* BuildSlaveSupport/build.webkit.org-config/steps.py:
2018-01-03 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] Create attachment elements when dropping files on iOS
https://bugs.webkit.org/show_bug.cgi?id=181192
<rdar://problem/36280945>
Reviewed by Tim Horton.
Adds 3 new API tests to exercise different use cases of dropping content as attachment elements when the runtime
switch is enabled. See below for more details.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(-[NSItemProvider registerData:type:]):
(platformCopyPNG):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
Fix some currently failing iOS drag and drop tests. In this case, there's no reason RTFD should appear in the
source item provider when dragging rich text *without* attachments, so this should have been a check for just
kUTTypeRTF instead.
(TestWebKitAPI::TEST):
Tests a few cases of inserting attachment elements via drop:
1. We should distinguish between drops containing rich/plain text files from just dropping rich/plain text.
Instead of inserting the contents as inline web content, this should generate attachment elements.
2. Test the fallback mechanism for inserting attachment elements. If the preferred presentation style is not
explicitly set, but there's nothing WebKit would otherwise do with the dropped content, then we should fall
back to inserting the content as an attachment.
3. Test that if multiple attachments and inline item providers are present, WebKit will respect the order in
which they were inserted by the source (as opposed to, for instance, putting all of the attachments in front
or at the end).
* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView objectByEvaluatingJavaScript:]):
Add a helper method to return an object that represents the result of evaluating some given script, and rewrite
-stringByEvaluatingJavaScript to just turn around and call this.
(-[TestWKWebView stringByEvaluatingJavaScript:]):
2018-01-03 Ting-Wei Lan <lantw44@gmail.com>
Replace hard-coded paths in shebangs with #!/usr/bin/env
https://bugs.webkit.org/show_bug.cgi?id=181040
Reviewed by Alex Christensen.
* BuildSlaveSupport/build-launcher-app:
* BuildSlaveSupport/build-launcher-dmg:
* BuildSlaveSupport/build.webkit.org-config/steps_unittest.py:
* BuildSlaveSupport/built-product-archive:
* BuildSlaveSupport/clean-build:
* BuildSlaveSupport/delete-stale-build-files:
* BuildSlaveSupport/download-built-product:
* BuildSlaveSupport/gtk/buildbot/log/run:
* BuildSlaveSupport/gtk/buildbot/run:
* BuildSlaveSupport/gtk/pulseaudio/run:
* BuildSlaveSupport/kill-old-processes:
* BuildSlaveSupport/test-result-archive:
* BuildSlaveSupport/win/kill-old-processes:
* Scripts/SpacingHeuristics.pm:
* Scripts/add-include:
* Scripts/build-api-tests:
* Scripts/build-dumprendertree:
* Scripts/build-imagediff:
* Scripts/build-jsc:
* Scripts/build-webkit:
* Scripts/build-webkittestrunner:
* Scripts/check-Xcode-source-file-types:
* Scripts/check-dom-results:
* Scripts/check-for-exit-time-destructors:
* Scripts/check-for-global-initializers:
* Scripts/check-for-inappropriate-objc-class-names:
* Scripts/check-for-weak-vtables-and-externals:
* Scripts/clean-header-guards:
* Scripts/compare-timing-files:
* Scripts/configure-xcode-for-ios-development:
* Scripts/copy-webkitlibraries-to-product-directory:
* Scripts/create-exports:
* Scripts/debug-minibrowser:
* Scripts/debug-safari:
* Scripts/debug-test-runner:
* Scripts/do-file-rename:
* Scripts/do-webcore-rename:
* Scripts/dump-webkit-tests-run:
* Scripts/ensure-valid-python:
* Scripts/execAppWithEnv:
* Scripts/extract-localizable-js-strings:
* Scripts/filter-build-webkit:
* Scripts/find-extra-includes:
* Scripts/fix-blink-patch:
* Scripts/generate-coverage-data:
* Scripts/git-add-reviewer:
* Scripts/jsc-stress-test-helpers/js-exception-fuzz:
* Scripts/jsc-stress-test-helpers/js-executable-allocation-fuzz:
* Scripts/jsc-stress-test-helpers/js-osr-exit-fuzz:
* Scripts/make-new-script-test:
* Scripts/make-script-test-wrappers:
* Scripts/package-root:
* Scripts/parse-malloc-history:
* Scripts/report-include-statistics:
* Scripts/resolve-ChangeLogs:
* Scripts/run-api-tests:
* Scripts/run-bindings-tests:
* Scripts/run-content-extension-tester:
* Scripts/run-iexploder-tests:
* Scripts/run-javascriptcore-tests:
* Scripts/run-jsc:
* Scripts/run-leaks:
* Scripts/run-mangleme-tests:
* Scripts/run-minibrowser:
* Scripts/run-pageloadtest:
* Scripts/run-regexp-tests:
* Scripts/run-safari:
* Scripts/run-sunspider:
* Scripts/run-test-runner:
* Scripts/run-webkit-app:
* Scripts/run-webkit-httpd:
* Scripts/run-webkit-websocketserver:
* Scripts/set-webkit-configuration:
* Scripts/show-pretty-diff:
* Scripts/sort-Xcode-project-file:
* Scripts/split-file-by-class:
* Scripts/sunspider-compare-results:
* Scripts/svn-apply:
* Scripts/svn-unapply:
* Scripts/test-webkit-scripts:
* Scripts/test-webkitperl:
* Scripts/update-iexploder-cssproperties:
* Scripts/update-javascriptcore-test-results:
* Scripts/update-webkit:
* Scripts/update-webkit-auxiliary-libs:
* Scripts/update-webkit-dependency:
* Scripts/update-webkit-libs-jhbuild:
* Scripts/update-webkit-localizable-strings:
* Scripts/update-webkit-support-libs:
* Scripts/update-webkitgtk-libs:
* Scripts/update-webkitwpe-libs:
* Scripts/webkit-build-directory:
* Scripts/webkitperl/LoadAsModule.pm:
* Scripts/webkitperl/VCSUtils_unittest/decodeGitBinaryPatch.pl:
* Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatch.pl:
* Scripts/webkitperl/VCSUtils_unittest/fixChangeLogPatchThenSetChangeLogDateAndReviewer.pl:
* Scripts/webkitperl/VCSUtils_unittest/fixSVNPatchForAdditionWithHistory.pl:
* Scripts/webkitperl/VCSUtils_unittest/generatePatchCommand.pl:
* Scripts/webkitperl/VCSUtils_unittest/mergeChangeLogs.pl:
* Scripts/webkitperl/VCSUtils_unittest/parseChunkRange.pl:
* Scripts/webkitperl/VCSUtils_unittest/parseDiff.pl:
* Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl:
* Scripts/webkitperl/VCSUtils_unittest/parseDiffWithMockFiles.pl:
* Scripts/webkitperl/VCSUtils_unittest/parseFirstEOL.pl:
* Scripts/webkitperl/VCSUtils_unittest/parseGitDiffHeader.pl:
* Scripts/webkitperl/VCSUtils_unittest/parsePatch.pl:
* Scripts/webkitperl/VCSUtils_unittest/parseSvnDiffFooter.pl:
* Scripts/webkitperl/VCSUtils_unittest/parseSvnDiffHeader.pl:
* Scripts/webkitperl/VCSUtils_unittest/parseSvnProperty.pl:
* Scripts/webkitperl/VCSUtils_unittest/parseSvnPropertyValue.pl:
* Scripts/webkitperl/VCSUtils_unittest/parseUnifiedDiffHeader.pl:
* Scripts/webkitperl/VCSUtils_unittest/prepareParsedPatch.pl:
* Scripts/webkitperl/VCSUtils_unittest/removeEOL.pl:
* Scripts/webkitperl/VCSUtils_unittest/runCommand.pl:
* Scripts/webkitperl/VCSUtils_unittest/runPatchCommand.pl:
* Scripts/webkitperl/VCSUtils_unittest/setChangeLogDateAndReviewer.pl:
* Scripts/webkitperl/auto-version_unittest/autoVersionTests.pl:
* Scripts/webkitperl/auto-version_unittest/versionStampTests.pl:
* Scripts/webkitperl/filter-build-webkit_unittest/shouldIgnoreLine_unittests.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/extractLineRangeBeforeAndAfterChange.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/fetchRadarURLFromBugXMLData.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/generateFunctionLists.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/parser_unittests.pl:
* Scripts/webkitperl/prepare-ChangeLog_unittest/resources/perl_unittests.pl:
* Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v1.0.pl:
* Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-new.pl:
* Scripts/webkitperl/run-leaks_unittest/run-leaks-report-v2.0-old.pl:
* Scripts/webkitperl/webkitdirs_unittest/appendToEnvironmentVariableList.pl:
* Scripts/webkitperl/webkitdirs_unittest/checkForArgumentAndRemoveFromArrayRef.pl:
* Scripts/webkitperl/webkitdirs_unittest/checkForArgumentAndRemoveFromArrayRefGettingValue.pl:
* Scripts/webkitperl/webkitdirs_unittest/extractNonMacOSHostConfiguration.pl:
* Scripts/webkitperl/webkitdirs_unittest/prependToEnvironmentVariableList.pl:
* Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py:
* ccache/ccache-clang:
* ccache/ccache-clang++:
* ccache/ccache-wrapper:
* gtk/install-dependencies:
* iExploder/iexploder-1.3.2/htdocs/iexploder.cgi:
* iExploder/iexploder-1.3.2/htdocs/webserver.rb:
* iExploder/iexploder-1.3.2/tools/lasthit.rb:
* iExploder/iexploder-1.3.2/tools/osx_last_crash.rb:
* iExploder/iexploder-1.3.2/tools/showtest.rb:
* iExploder/iexploder-1.7.2/src/browser_harness.rb:
* iExploder/iexploder-1.7.2/src/iexploder.cgi:
* iExploder/iexploder-1.7.2/src/webserver.rb:
* iExploder/iexploder-1.7.2/tools/lasthit.rb:
* iExploder/iexploder-1.7.2/tools/osx_last_crash.rb:
* wpe/install-dependencies:
2018-01-03 Simon Fraser <simon.fraser@apple.com>
filter-build-webkit filters out useful compiler error lines
https://bugs.webkit.org/show_bug.cgi?id=179864
Reviewed by Tim Horton.
Don't filter out lines that contain information about build errors by always showing lines
after a line that contains "note:" or "error:".
* Scripts/filter-build-webkit:
(shouldShowSubsequentLine):
(shouldIgnoreLine):
2018-01-03 Michael Catanzaro <mcatanzaro@igalia.com>
REGRESSION(r226366): [GTK] Broke TestBackForwardList and TestWebKitWebView
https://bugs.webkit.org/show_bug.cgi?id=173915
Unreviewed follow-up. Fix /webkit2/WebKitWebView/session-state-with-form-data and
/webkit2/WebKitWebView/submit-form. The form ID may be NULL, but we can't put NULL into a
GVariant unless we use maybe types, and maybe types are incompatible with D-Bus. So use an
empty string in this case.
* TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
(emitFormSubmissionEvent):
2018-01-03 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Add web process API to detect when form is submitted via JavaScript
https://bugs.webkit.org/show_bug.cgi?id=173915
Reviewed by Carlos Garcia Campos.
Test it.
* TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:
(FormSubmissionTest::FormSubmissionTest):
(FormSubmissionTest::~FormSubmissionTest):
(FormSubmissionTest::testFormSubmissionResult):
(FormSubmissionTest::willSendDOMEventCallback):
(FormSubmissionTest::willCompleteCallback):
(FormSubmissionTest::runJavaScriptAndWaitUntilFormSubmitted):
(testWebExtensionFormSubmissionSteps):
(beforeAll):
* TestWebKitAPI/Tests/WebKitGLib/WebExtensionTest.cpp:
(DelayedSignal::DelayedSignal):
(emitFormSubmissionEvent):
(handleFormSubmissionCallback):
(willSubmitFormCallback):
(pageCreatedCallback):
2018-01-03 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed, skip broken API test /webkit2/WebKitWebsiteData/databases
https://bugs.webkit.org/show_bug.cgi?id=181251
* Scripts/run-gtk-tests:
(GtkTestRunner):
2018-01-03 Michael Catanzaro <mcatanzaro@igalia.com>
Unreviewed, skip broken API test /webkit2/WebKitWebsiteData/ephemeral
https://bugs.webkit.org/show_bug.cgi?id=181136
* Scripts/run-gtk-tests:
(GtkTestRunner):
2018-01-02 Brent Fulgham <bfulgham@apple.com>
[macOS, iOS] Adopt new secure coding APIs in WebKit
https://bugs.webkit.org/show_bug.cgi?id=181085
<rdar://problem/34837397>
Reviewed by Tim Horton.
Update API tests to use secure coding wherever possible. Currently, NSView/UIView-based classes are not
capable of supporting NSSecureCoding, so pass through the current coding routines.
* TestWebKitAPI/Tests/WebKitCocoa/ApplicationManifest.mm: Updated for NSSecureCoding.
* TestWebKitAPI/Tests/WebKitCocoa/Coding.mm:
(encodeAndDecode): Check if class supports the NSSecureCoding protocol and use non-secure coding
routines if necessary.
(TEST): Updated for NSSecureCoding.
* TestWebKitAPI/Tests/mac/EarlyKVOCrash.mm:
(TestWebKitAPI::TEST): Updated for NSSecureCoding.
2017-12-28 Yusuke Suzuki <utatane.tea@gmail.com>
Remove std::chrono completely
https://bugs.webkit.org/show_bug.cgi?id=181186
Reviewed by Alex Christensen.
* WebKitTestRunner/gtk/TestControllerGtk.cpp:
(WTR::TestController::platformRunUntil):
2018-01-02 Michael Catanzaro <mcatanzaro@igalia.com>
REGRESSION(r223253): Broke ResourceLoadStatistics layout tests for non-Cocoa ports
https://bugs.webkit.org/show_bug.cgi?id=181231
Reviewed by Alex Christensen.
Implement TestController APIs needed by ResourceLoadStatistics tests.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::isStatisticsRegisteredAsSubFrameUnder):
(WTR::TestController::isStatisticsRegisteredAsRedirectingTo):
2018-01-02 Tim Horton <timothy_horton@apple.com>
Disable WKAttachmentTests if UIPasteboard.itemProviders is not available
https://bugs.webkit.org/show_bug.cgi?id=181219
Reviewed by Wenson Hsieh.
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
2018-01-02 Jiewen Tan <jiewen_tan@apple.com>
Add a WebAuthentication runtime feature flag
https://bugs.webkit.org/show_bug.cgi?id=181220
<rdar://problem/36055305>
Reviewed by Brent Fulgham.
Renames the CredentialManagement runtime feature flag into WebAuthentication.
* DumpRenderTree/TestOptions.h:
* DumpRenderTree/TestOptions.mm:
(TestOptions::TestOptions):
* DumpRenderTree/mac/DumpRenderTree.mm:
(enableExperimentalFeatures):
(setWebPreferencesForTestOptions):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::resetPreferencesToConsistentValues):
(WTR::updateTestOptionsFromTestHeader):
* WebKitTestRunner/TestOptions.h:
(WTR::TestOptions::hasSameInitializationOptions const):
2018-01-02 Wenson Hsieh <wenson_hsieh@apple.com>
[Attachment Support] Don't Blob-convert images and attachments with https:, http: or data: urls
https://bugs.webkit.org/show_bug.cgi?id=181143
<rdar://problem/36200381>
Reviewed by Tim Horton.
Add a new API test to ensure that a copied image with a data URL does not get pasted as an attachment when
attachment elements are enabled.
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/WKAttachmentTests.mm:
(TestWebKitAPI::TEST):
2018-01-02 Jiewen Tan <jiewen_tan@apple.com>
Update Credential Management API for WebAuthentication
https://bugs.webkit.org/show_bug.cgi?id=181082
<rdar://problem/36055239>
Reviewed by Brent Fulgham.
Enable Credential Management API for testing.
* DumpRenderTree/TestOptions.h:
* WebKitTestRunner/TestOptions.h:
2018-01-02 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Test /webkit2/WebKitWebExtension/form-controls-associated-signal is flaky
https://bugs.webkit.org/show_bug.cgi?id=168194
Reviewed by Carlos Garcia Campos.
Fix an assertion and unskip the test. The order that form controls are associated is not
guaranteed.
* Scripts/run-gtk-tests:
(GtkTestRunner):
* TestWebKitAPI/Tests/WebKitGLib/TestWebExtensions.cpp:
(didAssociateFormControlsCallback):
2018-01-02 Alex Christensen <achristensen@webkit.org>
Use new WebsiteDataStore passed in through decidePolicyForNavigation SPI
https://bugs.webkit.org/show_bug.cgi?id=180897
<rdar://problem/35535328>
Reviewed by Brent Fulgham.
Test two forms of storage to be sure we are using a different WebsiteDataStore: cookies and sessionStorage.
* TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm:
(-[WebsitePoliciesWebsiteDataStoreDelegate _webView:decidePolicyForNavigationAction:decisionHandler:]):
(-[WebsitePoliciesWebsiteDataStoreDelegate webView:startURLSchemeTask:]):
(-[WebsitePoliciesWebsiteDataStoreDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:completionHandler:]):
(websiteDataStoreTestWebView):
(TEST):
== Rolled over to ChangeLog-2018-01-01 ==