WebKit-https.git
2 years ago[css-grid] Remove compilation flag ENABLE_CSS_GRID_LAYOUT
rego@igalia.com [Mon, 20 Feb 2017 10:01:22 +0000 (10:01 +0000)]
[css-grid] Remove compilation flag ENABLE_CSS_GRID_LAYOUT
https://bugs.webkit.org/show_bug.cgi?id=167693

Reviewed by Sergio Villar Senin.

.:

CSS Grid Layout has been enabled by default in r211415,
and Safari 10.1 is shipping it.
It seems like a good moment to remove the compilation flag.

* Source/cmake/OptionsMac.cmake:
* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:
* Source/cmake/tools/vsprops/FeatureDefines.props:
* Source/cmake/tools/vsprops/FeatureDefinesCairo.props:

Source/JavaScriptCore:

* Configurations/FeatureDefines.xcconfig:

Source/WebCore:

* Configurations/FeatureDefines.xcconfig:
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridPosition):
(WebCore::isLayoutDependent):
(WebCore::resolveJustifySelfAuto):
(WebCore::isImplicitlyInheritedGridOrFlexProperty):
(WebCore::valueForContentPositionAndDistributionWithOverflowAlignment):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSGridAutoRepeatValue.cpp:
* css/CSSGridAutoRepeatValue.h:
* css/CSSGridLineNamesValue.cpp:
* css/CSSGridLineNamesValue.h:
* css/CSSGridTemplateAreasValue.cpp:
* css/CSSGridTemplateAreasValue.h:
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
* css/CSSProperties.json:
* css/CSSValue.cpp:
(WebCore::CSSValue::equals):
(WebCore::CSSValue::cssText):
(WebCore::CSSValue::destroy):
* css/CSSValue.h:
(WebCore::CSSValue::isContentDistributionValue):
(WebCore::CSSValue::isGridLineNamesValue):
* css/CSSValueKeywords.in:
* css/StyleBuilderConverter.h:
(WebCore::StyleBuilderConverter::convertGridAutoFlow):
(WebCore::StyleBuilderConverter::convertContentAlignmentData):
* css/StyleBuilderCustom.h:
(WebCore::StyleBuilderCustom::applyValueGridTemplateRows):
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getPropertyValue):
* css/StyleResolver.cpp:
(WebCore::equivalentBlockDisplay):
* css/StyleResolver.h:
* css/parser/CSSParser.cpp:
(WebCore::CSSParserContext::CSSParserContext):
(WebCore::operator==):
* css/parser/CSSParserFastPaths.cpp:
(WebCore::isSimpleLengthPropertyID):
(WebCore::CSSParserFastPaths::isValidKeywordPropertyAndValue):
(WebCore::CSSParserFastPaths::isKeywordPropertyID):
* css/parser/CSSParserMode.h:
(WebCore::CSSParserContextHash::hash):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeGridAutoFlow):
(WebCore::consumeGridTemplateAreas):
(WebCore::CSSPropertyParser::parseSingleValue):
(WebCore::CSSPropertyParser::consumeGridShorthand):
(WebCore::CSSPropertyParser::parseShorthand):
* dom/Document.cpp:
* dom/Document.h:
* dom/Position.cpp:
(WebCore::Position::isCandidate):
* page/RuntimeEnabledFeatures.h:
(WebCore::RuntimeEnabledFeatures::isCSSGridLayoutEnabled):
* rendering/Grid.cpp:
* rendering/Grid.h:
* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::getFirstLetter):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::~RenderBox):
(WebCore::RenderBox::styleDidChange):
(WebCore::RenderBox::clearExtraInlineAndBlockOffests):
(WebCore::RenderBox::containingBlockLogicalWidthForContent):
(WebCore::RenderBox::containingBlockLogicalHeightForContent):
(WebCore::RenderBox::perpendicularContainingBlockLogicalHeight):
(WebCore::RenderBox::computeLogicalWidthInRegion):
(WebCore::RenderBox::sizesLogicalWidthToFitContent):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::containingBlockLogicalWidthForPositioned):
(WebCore::RenderBox::containingBlockLogicalHeightForPositioned):
(WebCore::RenderBox::computePositionedLogicalWidth):
(WebCore::RenderBox::computePositionedLogicalHeight):
(WebCore::RenderBox::createsNewFormattingContext):
(WebCore::logicalWidthIsResolvable):
(WebCore::RenderBox::percentageLogicalHeightIsResolvableFromBlock):
(WebCore::RenderBox::hasDefiniteLogicalHeight):
* rendering/RenderBox.h:
(WebCore::RenderBox::isGridItem):
* rendering/RenderElement.cpp:
(WebCore::RenderElement::createFor):
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::alignChildren):
* rendering/RenderGrid.cpp:
* rendering/RenderGrid.h:
* rendering/RenderObject.h:
(WebCore::RenderObject::isRenderGrid):
* rendering/style/GridArea.h:
* rendering/style/GridLength.h:
* rendering/style/GridPosition.h:
* rendering/style/GridPositionsResolver.cpp:
* rendering/style/GridPositionsResolver.h:
* rendering/style/GridTrackSize.h:
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::isCSSGridLayoutEnabled):
(WebCore::RenderStyle::changeRequiresLayout):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::gridItemRowEnd):
(WebCore::RenderStyle::setGridRowGap):
(WebCore::RenderStyle::initialGridItemRowEnd):
(WebCore::RenderStyle::isDisplayReplacedType):
(WebCore::RenderStyle::isDisplayGridBox):
* rendering/style/RenderStyleConstants.h:
* rendering/style/StyleGridData.cpp:
* rendering/style/StyleGridData.h:
* rendering/style/StyleGridItemData.cpp:
* rendering/style/StyleGridItemData.h:
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::StyleRareNonInheritedData):
(WebCore::StyleRareNonInheritedData::operator==):
* rendering/style/StyleRareNonInheritedData.h:
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::Backup::Backup):
(WebCore::InternalSettings::Backup::restoreTo):
(WebCore::InternalSettings::setCSSGridLayoutEnabled):

Source/WebCore/PAL:

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

* Configurations/FeatureDefines.xcconfig:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit2:

* Configurations/FeatureDefines.xcconfig:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):

Tools:

* Scripts/webkitperl/FeatureList.pm:
* TestWebKitAPI/Configurations/FeatureDefines.xcconfig:
* TestWebKitAPI/Tests/WebCore/CSSParser.cpp:
(TestWebKitAPI::computeNumberOfTracks):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebCore/GridPosition.cpp:
(TestWebKitAPI::TEST):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212629 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed GTK+ gardening. Mark fast/events/message-port-postMessage-recursive.html...
carlosgc@webkit.org [Mon, 20 Feb 2017 09:13:52 +0000 (09:13 +0000)]
Unreviewed GTK+ gardening. Mark fast/events/message-port-postMessage-recursive.html as timing out.

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212628 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r212622.
carlosgc@webkit.org [Mon, 20 Feb 2017 09:09:23 +0000 (09:09 +0000)]
Unreviewed, rolling out r212622.

Caused several test failures

Reverted changeset:

"[GTK] Test fast/events/message-port-postMessage-
recursive.html times out"
https://bugs.webkit.org/show_bug.cgi?id=168570
http://trac.webkit.org/changeset/212622

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212627 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION(r212345): [GTK] ASSERT(cookieChangeCallbackMap().contains(jar)) failed...
carlosgc@webkit.org [Mon, 20 Feb 2017 08:30:50 +0000 (08:30 +0000)]
REGRESSION(r212345): [GTK] ASSERT(cookieChangeCallbackMap().contains(jar)) failed in WebCore::stopObservingCookieChanges:54
https://bugs.webkit.org/show_bug.cgi?id=168375

Reviewed by Alex Christensen.

Source/WebCore:

Simplify the way cookie storage is handled in NetworkStorageSessionSoup. Now we always keep a reference to the
cookie jar, no matter if we have a session or not, that is always kept in sync with the one actually used by the
session. We always connect to the changed signal of the current cookie jar and notify the observer if it has been
set.

* platform/network/NetworkStorageSession.h:
* platform/network/soup/CookieStorageSoup.cpp:
(WebCore::startObservingCookieChanges): Remove this implementation and add an ASSERT to ensure we don't use this anymore.
(WebCore::stopObservingCookieChanges): Ditto.
(WebCore::cookieChangeCallbackMap): Deleted.
(WebCore::soupCookiesChanged): Deleted.
* platform/network/soup/NetworkStorageSessionSoup.cpp:
(WebCore::NetworkStorageSession::NetworkStorageSession): Initialize the cookie storage.
(WebCore::NetworkStorageSession::~NetworkStorageSession): Disconnect the changed signal.
(WebCore::NetworkStorageSession::getOrCreateSoupNetworkSession): Always pass the current cookie storage.
(WebCore::NetworkStorageSession::cookiesDidChange): Notify the observer.
(WebCore::NetworkStorageSession::cookieStorage): Return the current cookie storage.
(WebCore::NetworkStorageSession::setCookieStorage): Update the current cookie storage and update the session if
needed too. We always have a valid cookie storage so if nullptr is given we create a new one.
(WebCore::NetworkStorageSession::setCookieObserverHandler): Set a cookie observer handler.

Source/WebKit2:

Simplify the cookies change notification. The current approach of the UI process telling the network process
when to start and stop observing cookie changes is quite fragile and error prone. In the GTK+ port we always
observe cookies, so our cookie manager always calls start in the constructor and stop in the destructor.
Everything would be a lot simpler if the network process always monitored cookies.

* NetworkProcess/soup/NetworkSessionSoup.cpp:
(WebKit::NetworkSessionSoup::NetworkSessionSoup): Set cookies observer handler for the session.
(WebKit::NetworkSessionSoup::~NetworkSessionSoup): Remove the cookies observer handler.
* UIProcess/API/gtk/WebKitCookieManager.cpp:
(_WebKitCookieManagerPrivate::~_WebKitCookieManagerPrivate): Remove the cookies observer callback.
(webkit_cookie_manager_class_init): Remove dispose implementation that is no longer needed.
(webkitCookieManagerCreate): Set the cookies observer callback.
(webkit_cookie_manager_set_persistent_storage): Remove code to start/stop observing cookies when the jar
changes, the network process deals with that now.
(webkitCookieManagerDispose): Deleted.
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::startObservingCookieChanges): Remove the optional callback method in favor of an
explicit method to the set the callback that doesn't send the StartObservingCookieChanges message to the network
process.
(WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Do not change the callback map here.
(WebKit::WebCookieManagerProxy::setCookieObserverCallback): Add the callback to the map or remove the session if
nullptr is given.
* UIProcess/WebCookieManagerProxy.h:
* WebProcess/Cookies/WebCookieManager.cpp:
(WebKit::WebCookieManager::notifyCookiesDidChange): Send CookiesDidChange message to the UI process.
(WebKit::WebCookieManager::startObservingCookieChanges): Use notifyCookiesDidChange().
* WebProcess/Cookies/WebCookieManager.h:
* WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Set the policy on all sessions. Code moved from
WebFrameNetworkingContext since it doesn't belong there.
(WebKit::WebCookieManager::setCookiePersistentStorage): Use new method to set the cookie storage in the
NetworkStorageSession.
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): Deleted.
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212626 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoonbeforeunload event return value coercion is not per-spec
cdumez@apple.com [Mon, 20 Feb 2017 06:36:04 +0000 (06:36 +0000)]
onbeforeunload event return value coercion is not per-spec
https://bugs.webkit.org/show_bug.cgi?id=168382

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Import test coverage from web-platform-tests. We were failing half the checks
before this patch.

* resources/resource-files.json:
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/MANIFEST:
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling-1.html: Added.
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling-expected.txt: Added.
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html: Added.
* web-platform-tests/html/browsers/browsing-the-web/unloading-documents/w3c-import.log:

Source/WebCore:

Update handling of value returned by onbeforeunload event listeners
to match Firefox and the specification:
- https://html.spec.whatwg.org/#the-event-handler-processing-algorithm (step 4)

Namely, the following changes were made:
- Only set the event's returnValue attribute to the returned value if the attribute
  value is the empty string (so as to not override the attribute value if it has
  explicitly been set by JS).
- Cancel the event when the return value is not null by calling preventDefault().

Additionally, the following changes were made:
- Ask the user to confirm the navigation if the event was canceled, not just if the
  returnValue attribute was set to a non-empty string.
as per:
- https://html.spec.whatwg.org/#prompt-to-unload-a-document (step 8)

Tests: fast/events/before-unload-return-string-conversion.html
       imported/w3c/web-platform-tests/html/browsers/browsing-the-web/unloading-documents/beforeunload-canceling.html

* bindings/js/JSEventListener.cpp:
(WebCore::handleBeforeUnloadEventReturnValue):
(WebCore::JSEventListener::handleEvent):
* loader/FrameLoader.cpp:
(WebCore::shouldAskForNavigationConfirmation):
(WebCore::FrameLoader::dispatchBeforeUnloadEvent):

LayoutTests:

Add test case to check that the value returned by a beforeunload event handler
is already converted to a string, even if the returnValue attribute is also
set on the BeforeUnloadEvent. The existing code did not handle this properly
and it has been fixed in this patch.

* fast/events/before-unload-return-string-conversion-expected.txt: Added.
* fast/events/before-unload-return-string-conversion.html: Added.
* fast/events/resources/before-unload-return-string-conversion-frame.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212625 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r212472.
commit-queue@webkit.org [Mon, 20 Feb 2017 06:34:15 +0000 (06:34 +0000)]
Unreviewed, rolling out r212472.
https://bugs.webkit.org/show_bug.cgi?id=168584

Broke CLoop builds when r212466 was rolled out in r212616
(Requested by rniwa on #webkit).

Reverted changeset:

"Unreviewed, fix cloop build."
http://trac.webkit.org/changeset/212472

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212624 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[SOUP] Call SoupNetworkSession::setShouldIgnoreTLSErrors when testRunner.setAllowsAny...
carlosgc@webkit.org [Mon, 20 Feb 2017 06:30:52 +0000 (06:30 +0000)]
[SOUP] Call SoupNetworkSession::setShouldIgnoreTLSErrors when testRunner.setAllowsAnySSLCertificate() is called
https://bugs.webkit.org/show_bug.cgi?id=168571

Reviewed by Michael Catanzaro.

Fixes: http/tests/ssl/upgrade-origin-usage.html

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setAllowsAnySSLCertificate):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212623 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[GTK] Test fast/events/message-port-postMessage-recursive.html times out
carlosgc@webkit.org [Mon, 20 Feb 2017 06:29:10 +0000 (06:29 +0000)]
[GTK] Test fast/events/message-port-postMessage-recursive.html times out
https://bugs.webkit.org/show_bug.cgi?id=168570

Reviewed by Michael Catanzaro.

This has recently been added and the patch is good. It's just revealing a problem with our timers. The test is
posting a message recursively, and also starts a timeout timer to finish the test. The timeout timer is never
fired for us, because WebCore timers have lower priority than the one used by
postMessage. ScriptExecutionContext uses Document::postTask, that uses scheduleOnMainThread, that uses
RunLoop::dispatch(). We are not setting any priority for the timer used by RunLoop::dispatch, so it's using the
default. RunLoop::dispatch is normally used to schedule tasks between threads, or just to ensure something is
run in a different run loop iteration, but in general nothing urgent as a graphics redraw or something like
that. It's quite common to use g_idle_add to schedule tasks between threads, so I think it makes sense to use
G_PRIORITY_DEFAULT_IDLE for the RunLoop timer.

* wtf/glib/RunLoopGLib.cpp:
(WTF::RunLoop::RunLoop):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212622 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION(r212218): Assertion failures in and after parserRemoveChild
rniwa@webkit.org [Mon, 20 Feb 2017 06:22:02 +0000 (06:22 +0000)]
REGRESSION(r212218): Assertion failures in and after parserRemoveChild
https://bugs.webkit.org/show_bug.cgi?id=168458

Reviewed by Antti Koivisto.

Source/WebCore:

The bug was caused by parserRemoveChild not preceeding to remove oldChild even when
oldChild had been inserted elsewhere during unload evnets of the disconnected frames.
Fixed the bug by checking this condition and exiting early.

Also fixed various callers of parserRemoveChild to not call parserAppendChild when
the removed node had already been inserted elsewhere by scripts.

Tests: fast/parser/adoption-agency-unload-iframe-3.html
       fast/parser/adoption-agency-unload-iframe-4.html
       fast/parser/xml-error-unload-iframe.html

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::parserRemoveChild): Exit early when the node had been
inserted elsewhere while firing unload events. Also moved the call to
notifyRemovePendingSheetIfNeeded outside NoEventDispatchAssertion since it can
synchrnously fire a focus event.
(WebCore::ContainerNode::parserAppendChild): Moved adoptNode call to inside
NoEventDispatchAssertion since adoptNode call here should never mutate DOM.
* html/parser/HTMLConstructionSite.cpp:
(WebCore::executeReparentTask): Added an early exit when the node had already been
inserted elsewhere.
(WebCore::executeInsertAlreadyParsedChildTask): Ditto.
* xml/XMLErrors.cpp:
(WebCore::XMLErrors::insertErrorMessageBlock): Ditto.
* xml/parser/XMLDocumentParser.cpp:
(WebCore::XMLDocumentParser::end): Fixed a crash unveiled by one of the test cases.
Exit early when insertErrorMessageBlock detached the parser (by author scripts).
(WebCore::XMLDocumentParser::finish): Keep the parser alive until we exit.

LayoutTests:

Add tests to make sure parserAppendChild aren't called when a node removed by parserRemoveChild
had already been been inserted elsewhere by scripts.

* fast/parser/adoption-agency-unload-iframe-3-expected.txt: Added.
* fast/parser/adoption-agency-unload-iframe-3.html: Added.
* fast/parser/adoption-agency-unload-iframe-4-expected.txt: Added.
* fast/parser/adoption-agency-unload-iframe-4.html: Added.
* fast/parser/xml-error-unload-iframe-expected.txt: Added.
* fast/parser/xml-error-unload-iframe.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212621 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agofunctionTestWasmModuleFunctions() should use a MarkedArgumentBuffer for storing args...
mark.lam@apple.com [Mon, 20 Feb 2017 03:59:19 +0000 (03:59 +0000)]
functionTestWasmModuleFunctions() should use a MarkedArgumentBuffer for storing args instead of a Vector.
https://bugs.webkit.org/show_bug.cgi?id=168574

Reviewed by Filip Pizlo.

* jsc.cpp:
(callWasmFunction):
(functionTestWasmModuleFunctions):
* runtime/ArgList.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212620 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WK2] Support termination of unresponsive WebContent processes that are in the background
cdumez@apple.com [Mon, 20 Feb 2017 02:38:43 +0000 (02:38 +0000)]
[WK2] Support termination of unresponsive WebContent processes that are in the background
https://bugs.webkit.org/show_bug.cgi?id=168479
<rdar://problem/30558745>

Reviewed by Antti Koivisto.

Support termination of unresponsive WebContent processes that are in the background.
This protects us against cases where a background tab is unresponsive and has high CPU
usage, thus draining the battery without the user knowing about it (e.g.
<rdar://problem/29808005>).

The feature works as follows:
- If a WebProcessProxy has pages but none of them are visible, then it will check
  regularly if its associated WebContent process is still responsive.
- Every time we find that the WebContent process is responsive, we exponentially
  back off the timer to avoid waking up the process too often. The timer initially
  uses a 20 seconds interval and can back off up to 8 hours.
- If the WebContent process is unresponsive, then we terminate it. No notification
  is shown to the user and the termination is not immediately observable since the
  tab is not visible and its title remains. The tab is not immediately reloaded
  so as to avoid getting back into a bad state in the background (and have a
  yo-yo effect).
- If the user switches to a tab that was previously killed for being unresponsive
  while in the background, we will then reload the tab in a fresh WebContent
  process. The crash banner will only be shown if the tab has ever been visible.
  If it wasn't ever visible (e.g. session restore case), then it will look as if
  the tab loads for the first time when the user switches to it.

The functionality is disabled by default and can be enabled by the client via the new
WKContextSetUnresponsiveBackgroundProcessesTerminationEnabled() private API.

* CMakeLists.txt:
* UIProcess/API/APIProcessPoolConfiguration.cpp:
(API::ProcessPoolConfiguration::copy):
* UIProcess/API/APIProcessPoolConfiguration.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetUnresponsiveBackgroundProcessesTerminationEnabled):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/UnresponsiveWebProcessTerminator.cpp: Added.
(WebKit::UnresponsiveWebProcessTerminator::UnresponsiveWebProcessTerminator):
(WebKit::UnresponsiveWebProcessTerminator::updateState):
(WebKit::pagesCopy):
(WebKit::UnresponsiveWebProcessTerminator::timerFired):
* UIProcess/UnresponsiveWebProcessTerminator.h: Added.
(WebKit::UnresponsiveWebProcessTerminator::shouldBeActive):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::reloadAfterBeingKilledInBackground):
(WebKit::WebPageProxy::dispatchActivityStateChange):
(WebKit::WebPageProxy::terminateProcess):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
(WebKit::m_backgroundResponsivenessTimer):
(WebKit::WebProcessProxy::createWebPage):
(WebKit::WebProcessProxy::addExistingWebPage):
(WebKit::WebProcessProxy::removeWebPage):
(WebKit::WebProcessProxy::updateBackgroundResponsivenessTimer):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::visiblePageCount):
* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212619 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoCachedCall should let GC know to keep its arguments alive.
mark.lam@apple.com [Mon, 20 Feb 2017 01:46:04 +0000 (01:46 +0000)]
CachedCall should let GC know to keep its arguments alive.
https://bugs.webkit.org/show_bug.cgi?id=168567
<rdar://problem/30475767>

Reviewed by Saam Barati.

Source/JavaScriptCore:

We fix this by having CachedCall use a MarkedArgumentBuffer to store its
arguments instead of a Vector.

Also declared CachedCall, MarkedArgumentBuffer, and ProtoCallFrame as
WTF_FORBID_HEAP_ALLOCATION because they rely on being stack allocated for
correctness.

* interpreter/CachedCall.h:
(JSC::CachedCall::CachedCall):
(JSC::CachedCall::call):
(JSC::CachedCall::clearArguments):
(JSC::CachedCall::appendArgument):
(JSC::CachedCall::setArgument): Deleted.
* interpreter/CallFrame.h:
(JSC::ExecState::emptyList):
* interpreter/Interpreter.cpp:
(JSC::Interpreter::prepareForRepeatCall):
* interpreter/Interpreter.h:
* interpreter/ProtoCallFrame.h:
* runtime/ArgList.cpp:
(JSC::MarkedArgumentBuffer::expandCapacity):
* runtime/ArgList.h:
(JSC::MarkedArgumentBuffer::ensureCapacity):
* runtime/StringPrototype.cpp:
(JSC::replaceUsingRegExpSearch):
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:

Source/WTF:

Added a WTF_FORBID_HEAP_ALLOCATION that will cause a compilation failure if
a class declared with it is malloced.

While this doesn't prevent that class declared WTF_FORBID_HEAP_ALLOCATION from
being embedded in another class that is heap allocated, it does at minimum
document the intent and gives the users of this class a chance to do the
right thing.

* WTF.xcodeproj/project.pbxproj:
* wtf/ForbidHeapAllocation.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212618 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago<input type=color readonly> doesn't act per spec
cdumez@apple.com [Mon, 20 Feb 2017 00:46:27 +0000 (00:46 +0000)]
<input type=color readonly> doesn't act per spec
https://bugs.webkit.org/show_bug.cgi?id=168421
<rdar://problem/30593185>

Reviewed by Ryosuke Niwa.

Source/WebCore:

The 'readonly' attribute should not apply to <input type=color> as per the
HTML specification:
- https://html.spec.whatwg.org/#the-input-element:attr-input-readonly-3

Chrome / Firefox and Edge already behave as per the specification.

Tests: fast/forms/color/input-color-disabled.html
       fast/forms/color/input-color-readonly.html

* html/ColorInputType.cpp:
(WebCore::ColorInputType::handleDOMActivateEvent):
(WebCore::ColorInputType::didChooseColor):

LayoutTests:

Add layout test coverage.

* fast/forms/color/input-color-disabled-expected.txt: Added.
* fast/forms/color/input-color-disabled.html: Added.
* fast/forms/color/input-color-readonly-expected.txt: Added.
* fast/forms/color/input-color-readonly.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212617 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r212466.
commit-queue@webkit.org [Sun, 19 Feb 2017 22:07:58 +0000 (22:07 +0000)]
Unreviewed, rolling out r212466.
https://bugs.webkit.org/show_bug.cgi?id=168577

causes crashes on AArch64 on linux, maybe it's causing crashes
on iOS too (Requested by pizlo on #webkit).

Reverted changeset:

"The collector thread should only start when the mutator
doesn't have heap access"
https://bugs.webkit.org/show_bug.cgi?id=167737
http://trac.webkit.org/changeset/212466

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212616 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSimple line layout: Implement positionForPoint.
zalan@apple.com [Sun, 19 Feb 2017 16:24:20 +0000 (16:24 +0000)]
Simple line layout: Implement positionForPoint.
https://bugs.webkit.org/show_bug.cgi?id=168565
<rdar://problem/30593370>

Reviewed by Antti Koivisto.

With this patch, now we don't need to switch over to line box tree anymore when positionForPoint()
is called on a single RenderText content (which is the majority of the simple line content).
This patch also adds a new positionForPoint method which returns a Position object instead of VisiblePosition.
Some of the positionForPoint() callsites are only interested in the Position object so constructing a VisiblePosition
(which could potentially kick off a layout) is a waste. At this point the non-simple line layout codepath still constructs
a VisiblePosition and that should be addresses as part of webkit.org/b/168566.

Covered by existing tests.

* dom/Document.cpp:
(WebCore::Document::caretRangeFromPoint):
* rendering/RenderBlockFlow.cpp:
(WebCore::RenderBlockFlow::positionForPoint):
* rendering/RenderBlockFlow.h:
* rendering/RenderObject.cpp:
(WebCore::RenderObject::positionForPoint):
* rendering/RenderObject.h:
* rendering/RenderText.cpp:
(WebCore::RenderText::positionForPoint):
* rendering/RenderText.h:
* rendering/SimpleLineLayoutFunctions.cpp:
(WebCore::SimpleLineLayout::positionForPoint):
* rendering/SimpleLineLayoutFunctions.h:
* rendering/SimpleLineLayoutResolver.cpp:
(WebCore::SimpleLineLayout::RunResolver::runForPoint):
* rendering/SimpleLineLayoutResolver.h:
(WebCore::SimpleLineLayout::RunResolver::Run::logicalLeft):
(WebCore::SimpleLineLayout::RunResolver::Run::logicalRight):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212615 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoExecute pending scripts asynchronously after stylesheet loads complete
antti@apple.com [Sun, 19 Feb 2017 12:12:07 +0000 (12:12 +0000)]
Execute pending scripts asynchronously after stylesheet loads complete
https://bugs.webkit.org/show_bug.cgi?id=168367
rdar://problem/30561379

Reviewed by Andreas Kling.

The current synchronous execution is fragile and creates various problems.

* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::checkLoaded):
* dom/ContainerNode.cpp:
(WebCore::ContainerNode::takeAllChildrenFrom):
(WebCore::ContainerNode::notifyChildInserted):
(WebCore::ContainerNode::removeChild):
(WebCore::ContainerNode::parserRemoveChild):
(WebCore::ContainerNode::removeChildren):

    Remove various places where we would trigger delayed synchronous execution.

* dom/Document.cpp:
(WebCore::Document::Document):
(WebCore::Document::recalcStyle):

    Trigger scroll to anchor at the end of style resolution instead of when style sheet load completes.

(WebCore::Document::didRemoveAllPendingStylesheet):

    Call asynchronous script execution function.

* dom/Document.h:
(WebCore::Document::setNeedsNotifyRemoveAllPendingStylesheet): Deleted.
(WebCore::Document::notifyRemovePendingSheetIfNeeded): Deleted.
* dom/ScriptableDocumentParser.cpp:
(WebCore::ScriptableDocumentParser::ScriptableDocumentParser):
(WebCore::ScriptableDocumentParser::executeScriptsWaitingForStylesheetsSoon):
(WebCore::ScriptableDocumentParser::scriptsWaitingForStylesheetsExecutionTimerFired):

    Add a timer for executing pending scripts.

(WebCore::ScriptableDocumentParser::detach):
* dom/ScriptableDocumentParser.h:
(WebCore::ScriptableDocumentParser::executeScriptsWaitingForStylesheets):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::removedFrom):
(WebCore::HTMLLinkElement::removePendingSheet):
* html/HTMLLinkElement.h:
* html/parser/HTMLDocumentParser.cpp:
(WebCore::HTMLDocumentParser::detach):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::isLoadingInAPISense):

    Stay in loading state if we have a pending script. This matches existing behavior.

* style/StyleScope.cpp:
(WebCore::Style::Scope::removePendingSheet):
* style/StyleScope.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212614 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed GTK+ gardening. Rebaseline fast/visual-viewport/rubberbanding-viewport...
carlosgc@webkit.org [Sun, 19 Feb 2017 11:54:36 +0000 (11:54 +0000)]
Unreviewed GTK+ gardening. Rebaseline fast/visual-viewport/rubberbanding-viewport-rects-extended-background.html again.

This matches what bots expect now.

* platform/gtk/fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212613 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed GTK+ gardening. Rebaseline http/tests/loading/server-redirect-for-provisio...
carlosgc@webkit.org [Sun, 19 Feb 2017 11:39:03 +0000 (11:39 +0000)]
Unreviewed GTK+ gardening. Rebaseline http/tests/loading/server-redirect-for-provisional-load-caching.html.

I think we are just setting the FirstPartyForCookies to our request a bit earlier when redirecting.

* platform/gtk/http/tests/loading/server-redirect-for-provisional-load-caching-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212612 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed GTK+ gardening. Update expectations of a few more tests and rebaseline...
carlosgc@webkit.org [Sun, 19 Feb 2017 11:14:43 +0000 (11:14 +0000)]
Unreviewed GTK+ gardening. Update expectations of a few more tests and rebaseline fast/visual-viewport/rubberbanding-viewport-rects-extended-background.html.

* platform/gtk/TestExpectations:
* platform/gtk/fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212611 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago<input type=range readonly> doesn't act per spec
cdumez@apple.com [Sun, 19 Feb 2017 07:22:35 +0000 (07:22 +0000)]
<input type=range readonly> doesn't act per spec
https://bugs.webkit.org/show_bug.cgi?id=168422
<rdar://problem/30593189>

Reviewed by Ryosuke Niwa.

Source/WebCore:

'readonly' attribute should not apply to <input type=range> as per the HTML
specification:
- https://html.spec.whatwg.org/#the-input-element:attr-input-readonly-3

Firefox and Edge already behave as per the specification.

No new tests, updated existing tests.

* html/RangeInputType.cpp:
(WebCore::RangeInputType::handleMouseDownEvent):
(WebCore::RangeInputType::handleTouchEvent):
(WebCore::RangeInputType::handleKeydownEvent):
* html/shadow/SliderThumbElement.cpp:
(WebCore::SliderThumbElement::defaultEventHandler):
(WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
(WebCore::SliderThumbElement::willRespondToMouseClickEvents):

LayoutTests:

Update / rebaseline existing tests to reflect behavior change.

* fast/forms/range/range-drag-expected.txt:
* fast/forms/range/range-drag-when-toggled-disabled-expected.txt:
* fast/forms/range/range-drag-when-toggled-disabled.html:
* fast/forms/range/range-drag.html:
* fast/forms/range/range-keyoperation-expected.txt:
* fast/forms/range/range-keyoperation.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212610 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRecursive MessagePort.postMessage() calls causes tab to become unresponsive
cdumez@apple.com [Sat, 18 Feb 2017 23:58:57 +0000 (23:58 +0000)]
Recursive MessagePort.postMessage() calls causes tab to become unresponsive
https://bugs.webkit.org/show_bug.cgi?id=168548
<rdar://problem/29808005>

Reviewed by Darin Adler.

Source/WebCore:

MessagePort::dispatchMessages() was getting messages one by one of the
channel's MessageQueue and firing the MessageEvent for each of them.
The issue is that we can get stuck in an infinite loop if the
MessageEvent handler posts a message on the same post.

To address the issue, we now takes all messages from the queue before
iterating over them to fire the event. This way, if new messages are
added to the queue in one of the MessageEvent handlers, they will not
be processed until the next event loop iteration, as is expected.

Test: fast/events/message-port-postMessage-recursive.html

* dom/MessagePort.cpp:
(WebCore::MessagePort::dispatchMessages):
* dom/MessagePortChannel.h:
(WebCore::MessagePortChannel::EventData::EventData):
* dom/default/PlatformMessagePortChannel.cpp:
(WebCore::MessagePortChannel::postMessageToRemote):
* dom/default/PlatformMessagePortChannel.h:
(WebCore::PlatformMessagePortChannel::MessagePortQueue::takeMessage):
(WebCore::PlatformMessagePortChannel::MessagePortQueue::takeAllMessages):
(WebCore::PlatformMessagePortChannel::MessagePortQueue::appendAndCheckEmpty):

Source/WTF:

Add API to retrieve all messages in the queue at once.

* wtf/MessageQueue.h:

LayoutTests:

Add layout test coverage. The test used to time out, it now passes.
The test also passes on Firefox and Chrome.

* fast/events/message-port-postMessage-recursive-expected.txt: Added.
* fast/events/message-port-postMessage-recursive.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212609 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove COORDINATED_GRAPHICS_MULTIPROCESS
mcatanzaro@igalia.com [Sat, 18 Feb 2017 23:08:17 +0000 (23:08 +0000)]
Remove COORDINATED_GRAPHICS_MULTIPROCESS
https://bugs.webkit.org/show_bug.cgi?id=168514

Reviewed by Darin Adler.

Source/WebCore:

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

Source/WebKit2:

* Shared/DrawingAreaInfo.h:
* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewFindZoomableAreaForRect):
* UIProcess/AcceleratedDrawingAreaProxy.cpp:
(WebKit::AcceleratedDrawingAreaProxy::AcceleratedDrawingAreaProxy):
* UIProcess/AcceleratedDrawingAreaProxy.h:
(WebKit::AcceleratedDrawingAreaProxy::coordinatedLayerTreeHostProxy): Deleted.
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: Removed.
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: Removed.
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: Removed.
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::pageTransitionViewportReady):
* UIProcess/CoordinatedGraphics/WebPageProxyCoordinatedGraphics.cpp: Removed.
* UIProcess/DrawingAreaProxy.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::pageDidRequestScroll): Deleted.
(WebKit::WebPageProxy::pageTransitionViewportReady): Deleted.
(WebKit::WebPageProxy::didRenderFrame): Deleted.
(WebKit::WebPageProxy::commitPageTransitionViewport): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/AcceleratedDrawingArea.cpp:
(WebKit::AcceleratedDrawingArea::AcceleratedDrawingArea):
(WebKit::AcceleratedDrawingArea::updateBackingStoreState):
(WebKit::AcceleratedDrawingArea::didReceiveCoordinatedLayerTreeHostMessage): Deleted.
* WebProcess/WebPage/AcceleratedDrawingArea.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::commitSceneState):
(WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: Removed.
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::create):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/LayerTreeHost.cpp:
(WebKit::LayerTreeHost::create):
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::~WebPage):
(WebKit::WebPage::pageDidRequestScroll):
(WebKit::WebPage::didCompletePageTransition):
(WebKit::WebPage::didReceiveMessage):
(WebKit::WebPage::commitPageTransitionViewport): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212608 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed GTK+ gardening. Update expectations of a few more tests that are failing.
carlosgc@webkit.org [Sat, 18 Feb 2017 10:30:59 +0000 (10:30 +0000)]
Unreviewed GTK+ gardening. Update expectations of a few more tests that are failing.

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212607 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed GTK+ gardening. Rebaseline imported/w3c/web-platform-tests/html/semantics...
carlosgc@webkit.org [Sat, 18 Feb 2017 10:17:51 +0000 (10:17 +0000)]
Unreviewed GTK+ gardening. Rebaseline imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-textarea.html.

Selection is always directional for us.

* platform/gtk/imported/w3c/web-platform-tests/html/semantics/forms/textfieldselection/selection-not-application-textarea-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212606 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[GTK] Cannot paste primary selection into web view in Wayland
mcatanzaro@igalia.com [Sat, 18 Feb 2017 10:01:13 +0000 (10:01 +0000)]
[GTK] Cannot paste primary selection into web view in Wayland
https://bugs.webkit.org/show_bug.cgi?id=166949

Reviewed by Carlos Garcia Campos.

Once upon a time, primary selection (middle-click paste) was not supported in Wayland. At
the time, I changed this function to report that primary selection was unsupported. But
nowadays, primary selection works fine in all GTK+ applications except WebKit. All we have
to do to make it work in WebKit is change this return value.

* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::supportsGlobalSelection):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212605 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed GTK+ gardening. Update expectations of several tests.
carlosgc@webkit.org [Sat, 18 Feb 2017 09:44:38 +0000 (09:44 +0000)]
Unreviewed GTK+ gardening. Update expectations of several tests.

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212604 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Use Maps in FrameResourceManager instead of objects
nvasilyev@apple.com [Sat, 18 Feb 2017 06:57:42 +0000 (06:57 +0000)]
Web Inspector: Use Maps in FrameResourceManager instead of objects
https://bugs.webkit.org/show_bug.cgi?id=168549
<rdar://problem/30590110>

Reviewed by Joseph Pecoraro.

Use Map for _frameIdentifierMap and _resourceRequestIdentifierMap.

* UserInterface/Controllers/FrameResourceManager.js:
(WebInspector.FrameResourceManager.prototype.initialize):
(WebInspector.FrameResourceManager.prototype.get frames):
(WebInspector.FrameResourceManager.prototype.frameForIdentifier):
(WebInspector.FrameResourceManager.prototype.frameDidDetach):
(WebInspector.FrameResourceManager.prototype.resourceRequestWillBeSent):
(WebInspector.FrameResourceManager.prototype.markResourceRequestAsServedFromMemoryCache):
(WebInspector.FrameResourceManager.prototype.resourceRequestWasServedFromMemoryCache):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveResponse):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidReceiveData):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFinishLoading):
(WebInspector.FrameResourceManager.prototype.resourceRequestDidFailLoading):
(WebInspector.FrameResourceManager.prototype._addNewResourceToFrameOrTarget):
(WebInspector.FrameResourceManager.prototype._processMainFrameResourceTreePayload):
(WebInspector.FrameResourceManager.prototype._createFrame):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212603 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAllow properties in CSSProperties.json that don't trigger code generation
simon.fraser@apple.com [Sat, 18 Feb 2017 06:41:48 +0000 (06:41 +0000)]
Allow properties in CSSProperties.json that don't trigger code generation
https://bugs.webkit.org/show_bug.cgi?id=168535

Reviewed by Sam Weinig.

In order to track the development of CSS properties that we have not yet implemented,
support '"skip-codegen" : true' in "codegen-properties".

Test by adding a few fill-related properties with this attribute.

* css/CSSProperties.json:
* css/makeprop.pl:
(isPropertyEnabled):
(addProperty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212602 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: RTL: Inspector window should dock to the left when using RTL layout...
bburg@apple.com [Sat, 18 Feb 2017 00:40:22 +0000 (00:40 +0000)]
Web Inspector: RTL: Inspector window should dock to the left when using RTL layout direction
https://bugs.webkit.org/show_bug.cgi?id=168273
<rdar://problem/29949325>

Reviewed by Matt Baker.

Add the ability to dock Web Inspector to the left of the inspected view.
The frontend decides whether the Dock to Side button docks left or right
based on the current layout direction.

Source/WebCore:

* inspector/InspectorFrontendClient.h:
* inspector/InspectorFrontendClientLocal.cpp:
(WebCore::InspectorFrontendClientLocal::setAttachedWindow):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::requestSetDockSide):

Source/WebInspectorUI:

* Localizations/en.lproj/localizedStrings.js:
* UserInterface/Base/Main.js:
(WebInspector.contentLoaded):
Rename the "Dock to Right" button to "Dock to Side" instead. It's easier to just
have one button than to try and conditionally hide one or the other based on
the layout direction. Change the dock callback and the icon used for the button
depending on layout direction.

(WebInspector.resolvedLayoutDirection):
Refactor getLayoutDirection() to resolvedLayoutDirection() so callers get back
either "ltr" or "rtl".

Flip the dock side if layout direction changes while docked to the side.

Adjust various code paths to account for the existing of left docking. In particular,
resize rejection needs special-casing for resizing leftward from beyond the right side
of the Inspector view when it is docked to the left. Improve related comments since it
took me an unbelievable amount of time to understand what this code is supposed to do.

* UserInterface/Views/Main.css:
(body.docked.right):
(body.docked.left #docked-resizer):
(body.docked:matches(.right, .left) #navigation-sidebar.collapsed > .resizer):
(body.docked.right #navigation-sidebar.collapsed > .resizer): Deleted.
Add .docked.left analogues to rules for .docked.right.

Source/WebKit2:

* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::attachLeft):
(WebKit::WebInspectorProxy::attach):
(WebKit::WebInspectorProxy::createInspectorPage):
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebInspectorProxy.messages.in:
Add plumbing for new dock configuration.

* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange):
(WebKit::WebInspectorProxy::platformAttach):
Adapt existing sizing logic to work for docking to left.

* WebProcess/WebPage/WebInspectorUI.cpp:
(WebKit::WebInspectorUI::requestSetDockSide):
(WebKit::WebInspectorUI::setDockSide):
* WebProcess/WebPage/WebInspectorUI.h:
(WebKit::WebInspectorUI::attachedLeft):
* WebProcess/WebPage/WebInspectorUI.messages.in:
Add plumbing for new dock configuration.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212597 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoImprove ARM64 disassembler handling of pseudo ops, unsupported opcodes and zero reg
msaboff@apple.com [Fri, 17 Feb 2017 23:52:17 +0000 (23:52 +0000)]
Improve ARM64 disassembler handling of pseudo ops, unsupported opcodes and zero reg
https://bugs.webkit.org/show_bug.cgi?id=168527

Reviewed by Filip Pizlo.

Added support for data processing 1 source instructions like rbit, rev, clz and cls.
Added support for the FP conditional select instruction, fcsel.  Consolidated the
two classes for handling dmb instructions into one class.  Fixed the instruction
selection mask in the integer conditional select class, A64DOpcodeConditionalSelect.
Fixed the processing of extract instruction (extr) including the rotate right (ror)
pseudo instruction.  Changed the printing of x31 and w31 to xzr and wzr as operands
according to the spec.  Added support for common pseudo instructions.  This includes:
- mvn x1, X2 in place of orn x1, xzr, x2
- lsl x3, x4, #count in place of ubfiz x3, x4, #count, #count
- smull x5, w6, w7 in place of smaddl x5, w6, w7, XZR
- More understandable mov x8, #-304 in place of movn x8, #0x12f
- Eliminated xzr from register index loads and stores, outputing
  ldr x10, [x11] instead of ldr x10, [x11, xzr]

Changed the move wide instructions to use hex literals for movz and movk.
This makes it much easier to decifer sequences of wide moves for large literals.
        Before                       After
  movz   x17, #26136           movz   x17, #0x6618
  movk   x17, #672, lsl #16    movk   x17, #0x2a0, lsl #16
  movk   x17, #1, lsl #32      movk   x17, #0x1, lsl #32

Verified that all instructions currently generated by the JSC stress tests are
disassembled.

* disassembler/ARM64/A64DOpcode.cpp:
(JSC::ARM64Disassembler::A64DOpcodeBitfield::format):
(JSC::ARM64Disassembler::A64DOpcodeDataProcessing1Source::format):
(JSC::ARM64Disassembler::A64DOpcodeDataProcessing2Source::format):
(JSC::ARM64Disassembler::A64DOpcodeDataProcessing3Source::format):
(JSC::ARM64Disassembler::A64DOpcodeExtract::format):
(JSC::ARM64Disassembler::A64DOpcodeFloatingPointConditionalSelect::format):
(JSC::ARM64Disassembler::A64DOpcodeFloatingPointIntegerConversions::format):
(JSC::ARM64Disassembler::A64DOpcodeDmb::format):
(JSC::ARM64Disassembler::A64DOpcodeLoadStoreImmediate::format):
(JSC::ARM64Disassembler::A64DOpcodeLoadStoreRegisterOffset::format):
(JSC::ARM64Disassembler::A64DOpcodeLoadStoreRegisterPair::format):
(JSC::ARM64Disassembler::A64DOpcodeLoadStoreUnsignedImmediate::format):
(JSC::ARM64Disassembler::A64DOpcodeLogicalShiftedRegister::format):
(JSC::ARM64Disassembler::A64DOpcodeMoveWide::format):
(JSC::ARM64Disassembler::A64DOpcodeDmbIsh::format): Deleted.
(JSC::ARM64Disassembler::A64DOpcodeDmbIshSt::format): Deleted.
* disassembler/ARM64/A64DOpcode.h:
(JSC::ARM64Disassembler::A64DOpcode::appendSignedImmediate64):
(JSC::ARM64Disassembler::A64DOpcode::appendUnsignedHexImmediate):
(JSC::ARM64Disassembler::A64DOpcodeDataProcessing1Source::opName):
(JSC::ARM64Disassembler::A64DOpcodeDataProcessing1Source::sBit):
(JSC::ARM64Disassembler::A64DOpcodeDataProcessing1Source::opCode):
(JSC::ARM64Disassembler::A64DOpcodeDataProcessing1Source::opCode2):
(JSC::ARM64Disassembler::A64DOpcodeDataProcessing1Source::opNameIndex):
(JSC::ARM64Disassembler::A64DOpcodeDataProcessing3Source::opName):
(JSC::ARM64Disassembler::A64DOpcodeFloatingPointConditionalSelect::opName):
(JSC::ARM64Disassembler::A64DOpcodeFloatingPointConditionalSelect::condition):
(JSC::ARM64Disassembler::A64DOpcodeDmb::option):
(JSC::ARM64Disassembler::A64DOpcodeDmb::crM):
(JSC::ARM64Disassembler::A64DOpcodeLogicalShiftedRegister::isMov):
(JSC::ARM64Disassembler::A64DOpcodeDmbIsh::opName): Deleted.
(JSC::ARM64Disassembler::A64DOpcodeDmbIshSt::opName): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212592 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFix failure from r212579.
aakash_jain@apple.com [Fri, 17 Feb 2017 23:49:59 +0000 (23:49 +0000)]
Fix failure from r212579.

Unreviewed build-fix.

* Scripts/webkitpy/tool/steps/checkpatchrelevance.py:
(CheckPatchRelevance._changes_are_relevant): Return true for all groups others than jsc for now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212591 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAllow PlatformCALayers to specify that they want deep color backing store
simon.fraser@apple.com [Fri, 17 Feb 2017 23:41:37 +0000 (23:41 +0000)]
Allow PlatformCALayers to specify that they want deep color backing store
https://bugs.webkit.org/show_bug.cgi?id=168495

Reviewed by Tim Horton.
Source/WebCore:

Currently capable iOS devices get deep color backing store by virtue of a supports
check in PlatformCALayerCocoa::PlatformCALayerCocoa(), and LegacyTileGridTile.

Future work will make layer contents format selection more complex, so express the need
for deep color on PlatformCALayer, and have the creators of PlatformCALayer (mainly the
flavors of GraphicsLayerCA) choose for them to support deep color. A bit of special-casing
is needed to propagte the state to TileControllers.

The deep-colorness now propagates from PlatformCALayerRemote to RemoteLayerBackingStore,
instead of RemoteLayerBackingStore looking at the properties of the screen directly.

Remove PlatformCALayer::LayerTypeWebTiledLayer which was only used for the old CATiledLayers
that we no longer use.

An iphone7 test verifies that page tiles, normal layers and tiled layers get the deep
color state set on them.

Test: tiled-drawing/ios/iphone7/compositing-layers-deep-color.html

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::createPlatformCALayer):
(WebCore::GraphicsLayerCA::dumpAdditionalProperties):
* platform/graphics/ca/GraphicsLayerCA.h:
* platform/graphics/ca/PlatformCALayer.cpp:
(WebCore::PlatformCALayer::canHaveBackingStore):
(WebCore::operator<<):
* platform/graphics/ca/PlatformCALayer.h:
* platform/graphics/ca/TileController.cpp:
(WebCore::TileController::setZoomedOutContentsScale):
(WebCore::TileController::setAcceleratesDrawing):
(WebCore::TileController::setWantsDeepColorBackingStore):
(WebCore::TileController::createTileLayer):
* platform/graphics/ca/TileController.h:
* platform/graphics/ca/TileGrid.cpp:
(WebCore::TileGrid::updateTileLayerProperties):
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.h:
* platform/graphics/ca/cocoa/PlatformCALayerCocoa.mm:
(PlatformCALayerCocoa::PlatformCALayerCocoa):
(PlatformCALayerCocoa::commonInit):
(PlatformCALayerCocoa::wantsDeepColorBackingStore):
(PlatformCALayerCocoa::setWantsDeepColorBackingStore):
(layerContentsFormat):
(PlatformCALayerCocoa::updateContentsFormat):
* platform/graphics/ca/cocoa/WebTiledBackingLayer.h:
* platform/graphics/ca/cocoa/WebTiledBackingLayer.mm:
(-[WebTiledBackingLayer setWantsDeepColorBackingStore:]):
(-[WebTiledBackingLayer wantsDeepColorBackingStore]):
* platform/graphics/ca/win/PlatformCALayerWin.cpp:
(PlatformCALayerWin::wantsDeepColorBackingStore):
(PlatformCALayerWin::setWantsDeepColorBackingStore):
(printLayer):
* platform/graphics/ca/win/PlatformCALayerWin.h:
* platform/spi/cocoa/QuartzCoreSPI.h:

Source/WebKit2:

Currently capable iOS devices get deep color backing store by virtue of a supports
check in PlatformCALayerCocoa::PlatformCALayerCocoa(), and LegacyTileGridTile.

Future work will make layer contents format selection more complex, so express the need
for deep color on PlatformCALayer, and have the creators of PlatformCALayer (mainly the
flavors of GraphicsLayerCA) choose for them to support deep color. A bit of special-casing
is needed to propagte the state to TileControllers.

The deep-colorness now propagates from PlatformCALayerRemote to RemoteLayerBackingStore,
instead of RemoteLayerBackingStore looking at the properties of the screen directly.

Remove PlatformCALayer::LayerTypeWebTiledLayer which was only used for the old CATiledLayers
that we no longer use.

* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::ensureBackingStore):
(WebKit::RemoteLayerBackingStore::bytesPerPixel):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
(WebKit::RemoteLayerBackingStore::drawInContext):
(WebKit::RemoteLayerBackingStore::surfaceBufferFormat):
(WebKit::bufferFormat): Deleted.
* WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
(WebKit::GraphicsLayerCARemote::createPlatformCALayer):
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
(WebKit::PlatformCALayerRemote::updateBackingStore):
(WebKit::PlatformCALayerRemote::wantsDeepColorBackingStore):
(WebKit::PlatformCALayerRemote::setWantsDeepColorBackingStore):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
(WebKit::PlatformCALayerRemoteTiledBacking::wantsDeepColorBackingStore):
(WebKit::PlatformCALayerRemoteTiledBacking::setWantsDeepColorBackingStore):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:

LayoutTests:

* platform/ios-simulator-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:
* tiled-drawing/ios/iphone7/compositing-layers-deep-color-expected.txt: Added.
* tiled-drawing/ios/iphone7/compositing-layers-deep-color.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212590 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: RTL: add TabBar support for RTL layout
bburg@apple.com [Fri, 17 Feb 2017 22:54:55 +0000 (22:54 +0000)]
Web Inspector: RTL: add TabBar support for RTL layout
https://bugs.webkit.org/show_bug.cgi?id=168446

Reviewed by Matt Baker.

There are two types of changes needed:
 - Flip leading and trailing borders and margins for the tab items.
 - Enumerate tabs in reverse order when performing manual layout.

Along the way, I added some color variables local to TabBar.css to
reduce the number of redundant border-style and color declarations.

* UserInterface/Base/Main.js:
Change this to resolvedLayoutDirection(), and resolve "System" to "ltr" or "rtl".
This makes it suitable for use in manual layout without worrying about "System".
Fix the one existing use-site to not do its own resolution of "System".

* UserInterface/Views/TabBar.css:
Define commonly used colors and border styles and adopt var() usages.
Flip borders that should vary in RTL vs LTR, but not all of them. In
many cases, the border is not direction-dependent and looks the same
on both sides. Also, no need to swap animated properties as all manual
layout is done from the left edge.

(.tab-bar):
(body.window-inactive .tab-bar):
(.tab-bar > .top-border):
(body.window-inactive .tab-bar > .top-border):
(.tab-bar > .item):
(body[dir=ltr] .tab-bar > :nth-child(n + 2 of .item),):
(body[dir=rtl] .tab-bar > :nth-child(n + 2 of .item),):
(.tab-bar:not(.animating) > .item:not(.selected, .disabled):hover):
(body[dir=ltr] .tab-bar:not(.animating) > .item:not(.selected, .disabled):hover,):
(body[dir=rtl] .tab-bar:not(.animating) > .item:not(.selected, .disabled):hover,):
(body.window-inactive .tab-bar > .item):
(body[dir=ltr].window-inactive .tab-bar > .item):
(body[dir=rtl].window-inactive .tab-bar > .item):
(.tab-bar > .item > .close):
(body[dir=ltr] .tab-bar > .item > .close):
(body[dir=rtl] .tab-bar > .item > .close):
(.tab-bar > .item:not(.pinned) > .flex-space:last-child):
(body[dir=ltr] .tab-bar > .item:not(.pinned) > .flex-space:last-child):
(body[dir=rtl] .tab-bar > .item:not(.pinned) > .flex-space:last-child):
(.tab-bar > .item > .title):
(body[dir=ltr] .tab-bar > .item > .title):
(body[dir=rtl] .tab-bar > .item > .title):
(.tab-bar.collapsed > .item > .close):
(body[dir=ltr] .tab-bar.collapsed > .item > .close):
(body[dir=rtl] .tab-bar.collapsed > .item > .close):

* UserInterface/Views/TabBar.js:
When doing manual layout, keep doing calculations with respect to the left edge
and keep the list of tab items in logical (LTR) order, as in the DOM. But, when
manually positioning tab items for RTL layout direction, reverse the tab items
so that it matches the screen/layout order of the flipped flexbox items.

(WebInspector.TabBar.prototype.insertTabBarItem):
(WebInspector.TabBar.prototype.removeTabBarItem.animateTabs):
In RTL, put extra space after closing a tab to the left of normal tabs. This
matches the behavior of LTR, but requires some additional measurement since we
still position tabs using `left` and can't simply infer the leftover space.

(WebInspector.TabBar.prototype._tabBarItemsFromLeftToRight): Added.
(WebInspector.TabBar.prototype._handleMouseMoved):
(WebInspector.TabBar.prototype._handleMouseUp):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212582 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRefactoring: Make sure to unprepare WebAudioSourceProviderAVFObjC when its owner...
jer.noble@apple.com [Fri, 17 Feb 2017 22:51:12 +0000 (22:51 +0000)]
Refactoring: Make sure to unprepare WebAudioSourceProviderAVFObjC when its owner is destroyed.
https://bugs.webkit.org/show_bug.cgi?id=168532

Reviewed by Youenn Fablet.

Because WebAudioSourceProviderAVFObjC has a back-pointer to the object which creted it, make
sure that back-pointer is invalidated once the creating object is destroyed by calling
WebAudioSOurceProviderAVFObjC::unprepare().

Drive-by Fix: In WebAudioSourceProviderAVFObjC::audioSamplesAvailable(), PlatformAudioData will
always be of the WebAudioBufferList type. If this ever becomes untrue, an invalid downcast will
be caught by downcast<>, so just remove the is<> check.

* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::~AVAudioCaptureSource):
* platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
* platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
(WebCore::MockRealtimeAudioSourceMac::~MockRealtimeAudioSourceMac):
* platform/mediastream/mac/RealtimeIncomingAudioSource.cpp:
(WebCore::RealtimeIncomingAudioSource::~RealtimeIncomingAudioSource):
* platform/mediastream/mac/RealtimeIncomingAudioSource.h:
* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
(WebCore::WebAudioSourceProviderAVFObjC::~WebAudioSourceProviderAVFObjC):
(WebCore::WebAudioSourceProviderAVFObjC::setClient):
(WebCore::WebAudioSourceProviderAVFObjC::unprepare):
(WebCore::WebAudioSourceProviderAVFObjC::audioSamplesAvailable):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212581 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Zoom level UI out of sync with setting value
commit-queue@webkit.org [Fri, 17 Feb 2017 22:47:23 +0000 (22:47 +0000)]
Web Inspector: Zoom level UI out of sync with setting value
https://bugs.webkit.org/show_bug.cgi?id=168522

Patch by Devin Rousso <dcrousso+webkit@gmail.com> on 2017-02-17
Reviewed by Brian Burg.

* UserInterface/Views/SettingsTabContentView.js:
(WebInspector.SettingsTabContentView):
Trigger a layout whenever the zoomFactor setting is changed. This is needed since the
zoomFactor setting can also be modified by global keyboard shortcuts.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212580 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoEWS should run JavaScriptCore tests
commit-queue@webkit.org [Fri, 17 Feb 2017 22:41:49 +0000 (22:41 +0000)]
EWS should run JavaScriptCore tests
https://bugs.webkit.org/show_bug.cgi?id=162458

Patch by Srinivasan Vijayaraghavan <svijayaraghavan@apple.com> on 2017-02-17
Reviewed by Alexey Proskuryakov.

* QueueStatusServer/config/queues.py: Add jsc-ews queue.
* QueueStatusServer/model/queuestatus.py:
(QueueStatus.did_skip): Returns whether patch was skipped, based on status.
* QueueStatusServer/handlers/statusbubble.py:
(StatusBubble._should_show_bubble_for): Add logic to hide jsc-ews bubble if the patch does not touch jsc.
* Scripts/webkitpy/common/checkout/scm/scm_mock.py:
(MockSCM.__init__): Add _mockChangedFiles variable.
(MockSCM.changed_files): Change to use _mockChangedFiles variables.
* Scripts/webkitpy/common/config/ews.json: Add config info for JSC EWS.
* Scripts/webkitpy/common/config/ports.py: Add support for JSC EWS in Mac Port.
(DeprecatedPort._append_build_style_flag): Helper function to append build_style to a command.
(DeprecatedPort.build_jsc_command): Added - command to build JSC only (quicker than building all of WebKit).
(DeprecatedPort.run_javascriptcore_tests_command): Allow JSC EWS to only run JSC tests.
(MacPort.run_webkit_tests_command): Check for JSC.
* Scripts/webkitpy/common/config/ports_mock.py:
(MockPort.run_javascriptcore_tests_command): Add build_style argument.
* Scripts/webkitpy/common/config/ports_unittest.py:
(DeprecatedPortTest.test_mac_port): Add unit tests for build-jsc shell command.
* Scripts/webkitpy/common/net/abstracttestresults.py: Added.
(AbstractTestResults): Abstract superclass of JSCTestResults and JSCTestResults.
(AbstractTestResults.test_results): Stub.
(AbstractTestResults.failing_tests): Stub.
(AbstractTestResults.did_exceed_test_failure_limit): Stub.
* Scripts/webkitpy/common/net/jsctestresults.py: Added.
(JSCTestResults): Added.
(JSCTestResults.intersection): Return a JSCTestResults object with failures common to both input objects.
(JSCTestResults.results_from_string): Use json library to parse results.
(JSCTestResults.__init__): Initialize members.
(JSCTestResults.equals): This enables unit testing.
(JSCTestResults.is_subset): Checks if one set of failures is a subset of another.
(JSCTestResults.all_passed): Getter.
(JSCTestResults.failing_tests): Getter.
(JSCTestResults.did_exceed_test_failure_limit): Getter.
* Scripts/webkitpy/common/net/jsctestresults_unittest.py: Added.
(JSCTestResultsTest): Class to test JSCTestResults.
(JSCTestResultsTest.test_results_from_string): Tests parsing.
(JSCTestResultsTest.test_intersection_api_tests): Unit test for intersection() class method.
(JSCTestResultsTest.test_intersection_stress_tests): Unit test for intersection() class method.
(JSCTestResultsTest.test_intersection_general_case): Unit test for intersection() class method.
* Scripts/webkitpy/port/base.py:
(Port.jsc_results_directory): Returns the directory for the JSC test results JSON file.
* Scripts/webkitpy/tool/bot/earlywarningsystemtask.py:
(EarlyWarningSystemTask.run): Add check_patch_relevance step.
* Scripts/webkitpy/tool/bot/jscews_unittest.py: Added.
(MockPatchAnalysisTask): Mocked-out version of PatchAnalysisTask that doesn't run commands.
(MockPatchAnalysisTask.__init__): Sets attributes.
(MockPatchAnalysisTask._test): Override to not run command.
(MockPatchAnalysisTask._build_and_test_without_patch): Override to not run command.
(MockPatchAnalysisTask.validate): Assume mocked patch is valid for purposes of testing retry logic.
(MockPatchAnalysisTask.test_run_count): Specific to the mocked version, to test retry logic.
(MockJSCEarlyWarningSystem): Mocked-out version of AbstarctEarlyWarningSystem so we can provide test results.
(MockJSCEarlyWarningSystem.__init__): Sets attributes, also sets group to jsc.
(MockJSCEarlyWarningSystem.test_results): Returns test results provided by us, instead of using a JSON reader.
(JSCEarlyWarningSystemTest): Class to test retry logic in below situations.
(JSCEarlyWarningSystemTest._create_task): Helper function to abstract out common code.
(JSCEarlyWarningSystemTest._results_indicate_all_passed): False if input is None or has failures, else True.
(JSCEarlyWarningSystemTest.test_success_case): Clean patch on clean tree.
(JSCEarlyWarningSystemTest.test_test_failure): Failed patch on clean tree.
(JSCEarlyWarningSystemTest.test_fix): Patch that fixes all tree redness.
(JSCEarlyWarningSystemTest.test_ineffective_patch): Patch that has same failures as tree.
(JSCEarlyWarningSystemTest.test_partially_effective_patch): Patch fixes some failures but adds no new failures.
(JSCEarlyWarningSystemTest.test_different_test_failures_in_patch_and_tree): Patch has some failures not in tree.
(JSCEarlyWarningSystemTest.test_first_results_could_not_be_read): Patch results not readable.
(JSCEarlyWarningSystemTest.test_second_results_could_not_be_read): Patch results not readable on second run.
(JSCEarlyWarningSystemTest.test_clean_results_could_not_be_read): Results from clean tree not readable.
(JSCEarlyWarningSystemTest.test_flaky_results_on_clean_tree_pass): Patch has one flake and no failures.
(JSCEarlyWarningSystemTest.test_flaky_results_on_clean_tree_pass_v2): Patch has one flake and no failures.
(JSCEarlyWarningSystemTest.test_flaky_results_on_clean_tree_failure): Patch has flakes and failed tests.
(JSCEarlyWarningSystemTest.test_flaky_results_on_red_tree_pass): Patch has same failures as tree, plus a flake.
* Scripts/webkitpy/tool/bot/jsctestresultsreader.py: Added.
(JSCTestResultsReader): Reads results file.
(JSCTestResultsReader.__init__): Sets attributes.
(JSCTestResultsReader._read_file_contents): Reads file.
(JSCTestResultsReader.results): Reads the results file and returns a JSCTestResults object.
* Scripts/webkitpy/tool/bot/patchanalysistask.py:
(PatchIsNotApplicable): Exception for when patch doesn't have relevant changes.
(PatchAnalysisTask._check_patch_relevance): Added.
(PatchAnalysisTask._build): Check for JSC.
(PatchAnalysisTask._build_without_patch): Check for JSC.
(PatchAnalysisTask._test): Check for JSC.
(PatchAnalysisTask._build_and_test_without_patch): Check for JSC.
(PatchAnalysisTask._retry_jsc_tests): Retry logic for JSC EWS.
(PatchAnalysisTask._retry_layout_tests): Retry logic for layout tests EWS.
(PatchAnalysisTask._test_patch): Add retry logic for JSC.
* Scripts/webkitpy/tool/commands/download.py:
(CheckPatchRelevance): Add check-patch-relevance command.
* Scripts/webkitpy/tool/commands/earlywarningsystem.py:
(AbstractEarlyWarningSystem._create_task): Abstract out to enable mocking.
(AbstractEarlyWarningSystem.begin_work_queue): Use JSCTestResultsReader not LayoutTestResultsReader in JSC EWS.
(AbstractEarlyWarningSystem.review_patch): Handle PatchIsApplicable.
(AbstractEarlyWarningSystem.test_results): _layout_test_results_reader -> _test_results_reader.
(AbstractEarlyWarningSystem.archive_last_test_results): _layout_test_results_reader -> _test_results_reader.
(AbstractEarlyWarningSystem.group): This attribute determines the type of EWS (eg. JSC).
(AbstractEarlyWarningSystem.load_ews_classes): Add _group, and make classes of type cls to enable mocking.
* Scripts/webkitpy/tool/commands/earlywarningsystem_unittest.py:
(TestEWS): Sample layout test EWS class used for unit testing.
(TestJSCEWS): Sample JSC EWS class used for unit testing.
(AbstractEarlyWarningSystemTest.test_failing_tests_message.TestEWS): Add _group.
(AbstractEarlyWarningSystemTest.test_failing_jsc_tests_message.TestEWS): Added test for jsc failures message.
(AbstractEarlyWarningSystemTest): Add _group variable.
(EarlyWarningSystemTest._default_expected_logs): Add check-patch-relevance step, inconclusive logs, and group.
(EarlyWarningSystemTest._test_ews): Add logs_are_conclusive option to pass through to default_expected_logs().
(EarlyWarningSystemTest.test_inconclusive_test_results): Test not removing patch from queue if not conclusive.
(MockAbstractEarlyWarningSystemForInconclusiveJSCResults): Added.
(MockAbstractEarlyWarningSystemForInconclusiveJSCResults._test_patch): Simulates running tests but not getting a conclusive result.
(MockEarlyWarningSystemTaskForInconclusiveJSCResults): Added.
(MockEarlyWarningSystemTaskForInconclusiveJSCResults._create_task): Use MockEarlyWarningSystemTask (not EarlyWarningSystemTask).
* Scripts/webkitpy/tool/steps/__init__.py: Add CheckPatchRelevance import.
* Scripts/webkitpy/tool/steps/build.py:
(Build.options): Check for JSC.
(Build.build): Check for JSC.
(Build.run): Check for JSC.
* Scripts/webkitpy/tool/steps/checkpatchrelevance.py: Added.
(CheckPatchRelevance): Added.
(CheckPatchRelevance._does_contain_change_in_paths): Abstract function to perform regex matching.
(CheckPatchRelevance.run): Check if changed files in patch belong in certain folders.
* Scripts/webkitpy/tool/steps/options.py:
(Options): Add --group command line option.
* Scripts/webkitpy/tool/steps/runtests.py:
(RunTests.options): Add group.
(RunTests.run): Check for JSC.
(RunTests._run_webkit_tests): Check for JSC.
(RunTests): Add _group attribute.
(RunTests._run_javascriptcore_tests): New.
* Scripts/webkitpy/tool/steps/steps_unittest.py: Unit tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212579 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Loc: Zoom level in Settings tab needs to use localized formatting
bburg@apple.com [Fri, 17 Feb 2017 22:39:45 +0000 (22:39 +0000)]
Web Inspector: Loc: Zoom level in Settings tab needs to use localized formatting
https://bugs.webkit.org/show_bug.cgi?id=168465

Reviewed by Matt Baker.

* UserInterface/Views/SettingsTabContentView.js:
(WebInspector.SettingsTabContentView.prototype.layout):
(WebInspector.SettingsTabContentView):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212578 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: RTL: CodeMirror text editor instances have scrollbars on left and...
bburg@apple.com [Fri, 17 Feb 2017 22:20:19 +0000 (22:20 +0000)]
Web Inspector: RTL: CodeMirror text editor instances have scrollbars on left and right
https://bugs.webkit.org/show_bug.cgi?id=168274

Reviewed by Matt Baker.

CodeMirror doesn't draw its own scrollbar correctly when content is in RTL,
so it draws an extra scrollbar on the right side. And, for the majority of
cases, we don't want to view CSS / JS content aligned to the right.

Manually set the "dir" attribute for all CodeMirror editor instances to "ltr".
Clients can override this if custom RTL layout is available in a particular case.

* UserInterface/Views/CodeMirrorEditor.js:
(WebInspector.CodeMirrorEditor.create):
(WebInspector.CodeMirrorEditor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212577 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Modern Media Controls] Improve handling of <video> with only audio tracks
graouts@webkit.org [Fri, 17 Feb 2017 21:48:04 +0000 (21:48 +0000)]
[Modern Media Controls] Improve handling of <video> with only audio tracks
https://bugs.webkit.org/show_bug.cgi?id=167836
<rdar://problem/30255812>

Reviewed by Dean Jackson.

Source/WebCore:

We now check for the availability of video tracks before considering a <video>
element is displaying an actual video file and turning auto-hide on. We also
check that we have video tracks before enabling the fullscreen button. This
brings the behavior of a <video> pointing to a resource with no video tracks
to be the same as an <audio> element.

Test: media/modern-media-controls/media-controller/media-controller-video-with-only-audio.html

* Modules/modern-media-controls/media/controls-visibility-support.js:
(ControlsVisibilitySupport.prototype.get tracksToMonitor):
(ControlsVisibilitySupport.prototype._updateControls):
(ControlsVisibilitySupport):
* Modules/modern-media-controls/media/fullscreen-support.js:
(FullscreenSupport.prototype.syncControl):
(FullscreenSupport):

LayoutTests:

Add a new test to check that a <video> with a resource that only has audio tracks
does not auto-hide nor show the fullscreen button. We also rebaseline a few existing
tests for this change of behavior.

* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-expected.txt:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on.html:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle-expected.txt:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-toggle.html:
* media/modern-media-controls/media-controller/media-controller-video-with-only-audio-expected.txt: Added.
* media/modern-media-controls/media-controller/media-controller-video-with-only-audio.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212575 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WK2] Action sheet should not dismiss when a DDAction with user interface is being...
wenson_hsieh@apple.com [Fri, 17 Feb 2017 21:43:41 +0000 (21:43 +0000)]
[WK2] Action sheet should not dismiss when a DDAction with user interface is being presented
https://bugs.webkit.org/show_bug.cgi?id=168528
<rdar://problem/30515324>

Reviewed by Beth Dakin.

After r211643, -[WKActionSheet doneWithSheet] now dismisses the presenting view controller. This is called when
interaction with the sheet is finished and is a reasonable thing to do in most cases. However, when using data
detectors, we don't want to dismiss the presenting view controller, since DataDetector handles dismissing on its
own and expects that its completion handler will be invoked.

To fix this, we add a parameter to doneWithSheet: to indicate whether or not we should additionally dismiss the
presenting view controller, and pass in NO in the case where we are handing control over to DataDetector.

* UIProcess/ios/WKActionSheet.h:
* UIProcess/ios/WKActionSheet.mm:
(-[WKActionSheet doneWithSheet:]):
(-[WKActionSheet doneWithSheet]): Deleted.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showDataDetectorsSheet]):
(-[WKActionSheetAssistant cleanupSheet]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212574 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Modern Media Controls] Toggle playback when clicking on the video on macOS
graouts@webkit.org [Fri, 17 Feb 2017 21:40:37 +0000 (21:40 +0000)]
[Modern Media Controls] Toggle playback when clicking on the video on macOS
https://bugs.webkit.org/show_bug.cgi?id=168515
<rdar://problem/30577441>

Reviewed by Dean Jackson.

Source/WebCore:

Listen to click events on the macOS media controls. Detect any clicks that were on the
background instead of the controls widgets themselves, and tell the delegate (MediaController)
about them.

Tests: media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause.html
       media/modern-media-controls/media-controller/media-controller-click-on-video-background-to-dismiss-tracks-panel-should-not-toggle-playback.html
       media/modern-media-controls/media-controller/media-controller-click-on-video-controls-should-not-pause.html

* Modules/modern-media-controls/controls/macos-fullscreen-media-controls.js:
(MacOSFullscreenMediaControls.prototype._handleMousedown):
* Modules/modern-media-controls/controls/macos-inline-media-controls.js:
(MacOSInlineMediaControls.prototype.handleEvent):
* Modules/modern-media-controls/controls/macos-media-controls.js:
(MacOSMediaControls.prototype.handleEvent):
(MacOSMediaControls):
* Modules/modern-media-controls/media/media-controller.js:
(MediaController.prototype.togglePlayback):
(MediaController.prototype.macOSControlsBackgroundWasClicked):
(MediaController.prototype._updateControlsIfNeeded):
* Modules/modern-media-controls/media/playback-support.js:
(PlaybackSupport.prototype.buttonWasPressed):

LayoutTests:

* media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause-expected.txt: Added.
* media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause.html: Added.
* media/modern-media-controls/media-controller/media-controller-click-on-video-background-to-dismiss-tracks-panel-should-not-toggle-playback-expected.txt: Added.
* media/modern-media-controls/media-controller/media-controller-click-on-video-background-to-dismiss-tracks-panel-should-not-toggle-playback.html: Added.
* media/modern-media-controls/media-controller/media-controller-click-on-video-controls-should-not-pause-expected.txt: Added.
* media/modern-media-controls/media-controller/media-controller-click-on-video-controls-should-not-pause.html: Added.
* media/modern-media-controls/media-documents/click-on-video-should-not-pause-expected.txt:
* media/modern-media-controls/media-documents/click-on-video-should-not-pause.html:
* platform/ios-simulator/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212573 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRefactoring: Remove AudioSourceObserverObjC and AudioCaptureSourceProviderObjC
jer.noble@apple.com [Fri, 17 Feb 2017 21:33:39 +0000 (21:33 +0000)]
Refactoring: Remove AudioSourceObserverObjC and AudioCaptureSourceProviderObjC
https://bugs.webkit.org/show_bug.cgi?id=168520

Reviewed by Youenn Fablet.

Having AudioCaptureSourceProviderObjC as the type provided to WebAudioSourceProviderAVFObjC
(and only ever to WebAudioSourceProviderAVFObjC) makes it impossible for that class to add
an observer on RealtimeMediaSource, of which all classes inheriting from
WebAudioSourceProviderAVFObjC are subclasses. There is no need to treat
WebAudioSourceProviderAVFObjC as an "observer", since the only thing it will ever observe is
the object which created it and hold an explicit reference to it. So replace all instances
of the "observer" pattern with direct calls to the necessary (newly non-virtual) methods.
This allows WebAudioSourceProviderAVFObjC to register as an observer directly on
RealtimeMediaSource, to listen for audioSamplesAvailable() instead of process(), and remove
a lot of unnecessary conversion code and observer duplication.

* WebCore.xcodeproj/project.pbxproj:
* platform/mediastream/RealtimeMediaSource.h:
(WebCore::RealtimeMediaSource::Observer::sourceStopped):
(WebCore::RealtimeMediaSource::Observer::sourceMutedChanged):
(WebCore::RealtimeMediaSource::Observer::sourceEnabledChanged):
(WebCore::RealtimeMediaSource::Observer::sourceSettingsChanged):
(WebCore::RealtimeMediaSource::Observer::preventSourceFromStopping):
* platform/mediastream/mac/AVAudioCaptureSource.h:
* platform/mediastream/mac/AVAudioCaptureSource.mm:
(WebCore::AVAudioCaptureSource::shutdownCaptureSession):
(WebCore::AVAudioCaptureSource::captureOutputDidOutputSampleBufferFromConnection):
(WebCore::AVAudioCaptureSource::addObserver): Deleted.
(WebCore::AVAudioCaptureSource::removeObserver): Deleted.
(WebCore::AVAudioCaptureSource::start): Deleted.
* platform/mediastream/mac/AudioCaptureSourceProviderObjC.h: Removed.
* platform/mediastream/mac/AudioSourceObserverObjC.h: Removed.
* platform/mediastream/mac/AudioTrackPrivateMediaStreamCocoa.h:
* platform/mediastream/mac/MockRealtimeAudioSourceMac.h:
* platform/mediastream/mac/MockRealtimeAudioSourceMac.mm:
(WebCore::MockRealtimeAudioSourceMac::emitSampleBuffers):
(WebCore::MockRealtimeAudioSourceMac::reconfigure):
(WebCore::MockRealtimeAudioSourceMac::audioSourceProvider):
(WebCore::MockRealtimeAudioSourceMac::addObserver): Deleted.
(WebCore::MockRealtimeAudioSourceMac::removeObserver): Deleted.
(WebCore::MockRealtimeAudioSourceMac::start): Deleted.
* platform/mediastream/mac/RealtimeIncomingAudioSource.cpp:
(WebCore::RealtimeIncomingAudioSource::audioSourceProvider):
(WebCore::RealtimeIncomingAudioSource::addObserver): Deleted.
(WebCore::RealtimeIncomingAudioSource::removeObserver): Deleted.
(WebCore::RealtimeIncomingAudioSource::start): Deleted.
* platform/mediastream/mac/RealtimeIncomingAudioSource.h:
* platform/mediastream/mac/RealtimeOutgoingAudioSource.h:
* platform/mediastream/mac/RealtimeOutgoingVideoSource.h:
* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.h:
* platform/mediastream/mac/WebAudioSourceProviderAVFObjC.mm:
(WebCore::WebAudioSourceProviderAVFObjC::create):
(WebCore::WebAudioSourceProviderAVFObjC::WebAudioSourceProviderAVFObjC):
(WebCore::WebAudioSourceProviderAVFObjC::setClient):
(WebCore::WebAudioSourceProviderAVFObjC::audioSamplesAvailable):
(WebCore::WebAudioSourceProviderAVFObjC::process): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212572 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION: Subtitles menu in media controls allows multiple items to be selected
graouts@webkit.org [Fri, 17 Feb 2017 21:32:10 +0000 (21:32 +0000)]
REGRESSION: Subtitles menu in media controls allows multiple items to be selected
https://bugs.webkit.org/show_bug.cgi?id=168168
<rdar://problem/30488605>

Reviewed by Dean Jackson.

Source/WebCore:

Ensure that only a single audio track and a single text track can be selected
in the tracks panel at any given point.

* Modules/modern-media-controls/media/tracks-support.js:
(TracksSupport.prototype.tracksPanelSelectionDidChange):
(TracksSupport.prototype._sortedTrackList):
(TracksSupport):

LayoutTests:

Enhance the interactive track selection test to select a second track and check
that only a single track is selected at once.

* media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel-expected.txt:
* media/modern-media-controls/tracks-support/tracks-support-click-track-in-panel.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212571 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoWeb Inspector: Timeline DataGridNodes are lacking detail in title
commit-queue@webkit.org [Fri, 17 Feb 2017 21:30:15 +0000 (21:30 +0000)]
Web Inspector: Timeline DataGridNodes are lacking detail in title
https://bugs.webkit.org/show_bug.cgi?id=168529
<rdar://problem/30579959>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2017-02-17
Reviewed by Brian Burg.

* UserInterface/Views/TimelineDataGridNode.js:
(WebInspector.TimelineDataGridNode.prototype.displayName):
Include detailed information for DataGridNode display names, since we
want to show maximum detail for records in the DataGrid.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212570 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUpdate TestExpectations for fast/css/appearance-apple-pay-button.html.
ryanhaddad@apple.com [Fri, 17 Feb 2017 21:18:10 +0000 (21:18 +0000)]
Update TestExpectations for fast/css/appearance-apple-pay-button.html.

Unreviewed test gardening.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212569 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoInvalidate WebAVSampleBufferStatusChangeListener when MediaPlayerPrivateMediaStreamAV...
commit-queue@webkit.org [Fri, 17 Feb 2017 21:06:30 +0000 (21:06 +0000)]
Invalidate WebAVSampleBufferStatusChangeListener when MediaPlayerPrivateMediaStreamAVFObjC is deallocated.
https://bugs.webkit.org/show_bug.cgi?id=168488

Patch by Jeremy Jones <jeremyj@apple.com> on 2017-02-17
Reviewed by Jer Noble.

Fixes periodically crashing test: fast/mediastream/MediaStream-video-element-track-stop.html

WebAVSampleBufferStatusChangeListener has an unretained referecne to MediaPlayerPrivateMediaStreamAVFObjC
that must be invaldated when MediaPlayerPrivateMediaStreamAVFObjC is deallocated.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateMediaStreamAVFObjC.mm:
(WebCore::MediaPlayerPrivateMediaStreamAVFObjC::~MediaPlayerPrivateMediaStreamAVFObjC):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212568 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[Modern Media Controls] Improve handling of live broadcast video
commit-queue@webkit.org [Fri, 17 Feb 2017 20:37:00 +0000 (20:37 +0000)]
[Modern Media Controls] Improve handling of live broadcast video
https://bugs.webkit.org/show_bug.cgi?id=168506
<rdar://problem/30432094>

Patch by Antoine Quint <graouts@apple.com> on 2017-02-17
Reviewed by Dean Jackson.

Source/WebCore:

We improve the handling of live broadcast video by:

    - checking that we have a media source before deciding to show the controls
      bar and start button
    - support a mode where neither the status text nor the scrubber is visible
      in case we're still waiting on sufficient data to determine the video
      time and we haven't really started loading data yet
    - not showing time labels when we have an infinite duration
    - ensuring the status label is left-aligned

Test: media/modern-media-controls/status-label/status-label-text-align.html

* Modules/modern-media-controls/controls/macos-inline-media-controls.js:
(MacOSInlineMediaControls.prototype.layout):
* Modules/modern-media-controls/controls/status-label.css:
(.status-label):
* Modules/modern-media-controls/controls/status-label.js:
(StatusLabel.prototype.get enabled):
(StatusLabel.prototype.set enabled):
* Modules/modern-media-controls/media/controls-visibility-support.js:
(ControlsVisibilitySupport.prototype._updateControls):
(ControlsVisibilitySupport):
* Modules/modern-media-controls/media/status-support.js:
(StatusSupport.prototype.syncControl):
(StatusSupport):
* Modules/modern-media-controls/media/time-labels-support.js:
(TimeLabelsSupport.prototype.syncControl):
(TimeLabelsSupport):

LayoutTests:

Rebase existing tests to match new, correct behavior and add a new test to explicitly
check the text-align property on the status label.

* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio-expected.txt:
* media/modern-media-controls/controls-visibility-support/controls-visibility-support-controls-on-audio.html:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-audio-background-expected.txt:
* media/modern-media-controls/ios-inline-media-controls/ios-inline-media-controls-audio-background.html:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label-expected.txt:
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-status-label.html:
* media/modern-media-controls/status-label/status-label-font.html:
* media/modern-media-controls/status-label/status-label-text-align-expected.txt: Added.
* media/modern-media-controls/status-label/status-label-text-align.html: Added.
* media/modern-media-controls/status-label/status-label-text-selection.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212564 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoBegin overhauling the pasteboard implementation
andersca@apple.com [Fri, 17 Feb 2017 20:02:03 +0000 (20:02 +0000)]
Begin overhauling the pasteboard implementation
https://bugs.webkit.org/show_bug.cgi?id=168525

Reviewed by Tim Horton.

Add a new PasteboardWriterData object. This object will hold data that is going
to be written to the pasteboard at some point. Currently it only supports plain text.

Also add a Mac-only PasteboardWriter class which can convert a PasteboardWriterDataObject
into an object that conforms to NSPasteboardWriting.

The basic idea is that instead of doing a bunch of pasteboard operations,
we'll just package all the pasteboard data up into an object and ship it over to WebKit.

This code is currently unused but will be adopted by a new drag implementation (in an upcoming patch).

* WebCore.xcodeproj/project.pbxproj:
* platform/PasteboardWriterData.cpp: Added.
(WebCore::PasteboardWriterData::PasteboardWriterData):
(WebCore::PasteboardWriterData::~PasteboardWriterData):
(WebCore::PasteboardWriterData::isEmpty):
(WebCore::PasteboardWriterData::setPlainText):
* platform/PasteboardWriterData.h: Added.
* platform/mac/PasteboardWriter.h: Added.
* platform/mac/PasteboardWriter.mm: Added.
(WebCore::createPasteboardWriting):
* platform/spi/mac/NSPasteboardSPI.h: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212563 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoApply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text.
pvollan@apple.com [Fri, 17 Feb 2017 19:34:48 +0000 (19:34 +0000)]
Apply SVG styles paint-order, stroke-linejoin, and stroke-linecap on DOM text.
https://bugs.webkit.org/show_bug.cgi?id=168044
Source/WebCore:

rdar://problem/30165746

Reviewed by Simon Fraser.

This patch moves these styles out of svg, and sets the properties on video cues.

Tests: fast/css/parsing-paint-order.html
       fast/css/parsing-stroke-linecap.html
       fast/css/parsing-stroke-linejoin.html
       fast/css/parsing-stroke-width.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::paintOrder):
(WebCore::ComputedStyleExtractor::propertyValue):
* css/CSSProperties.json:
* css/SVGCSSComputedStyleDeclaration.cpp:
(WebCore::ComputedStyleExtractor::svgPropertyValue):
(WebCore::paintOrder): Deleted.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::isValidCueStyleProperty):
* page/CaptionUserPreferencesMediaAF.cpp:
(WebCore::CaptionUserPreferencesMediaAF::cssPropertyWithTextEdgeColor):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::diff):
(WebCore::RenderStyle::paintTypesForPaintOrder):
* rendering/style/RenderStyle.h:
(WebCore::RenderStyle::setPaintOrder):
(WebCore::RenderStyle::paintOrder):
(WebCore::RenderStyle::initialPaintOrder):
(WebCore::RenderStyle::setCapStyle):
(WebCore::RenderStyle::capStyle):
(WebCore::RenderStyle::initialCapStyle):
(WebCore::RenderStyle::setJoinStyle):
(WebCore::RenderStyle::joinStyle):
(WebCore::RenderStyle::initialJoinStyle):
(WebCore::RenderStyle::strokeWidth):
(WebCore::RenderStyle::setStrokeWidth):
(WebCore::RenderStyle::hasVisibleStroke):
(WebCore::RenderStyle::setStrokeOpacity):
* rendering/style/SVGRenderStyle.cpp:
(WebCore::SVGRenderStyle::diff):
(WebCore::SVGRenderStyle::paintTypesForPaintOrder): Deleted.
* rendering/style/SVGRenderStyle.h:
(WebCore::SVGRenderStyle::initialBufferedRendering):
(WebCore::SVGRenderStyle::initialFillRule):
(WebCore::SVGRenderStyle::initialMaskType):
(WebCore::SVGRenderStyle::setBufferedRendering):
(WebCore::SVGRenderStyle::setFillRule):
(WebCore::SVGRenderStyle::setMaskType):
(WebCore::SVGRenderStyle::bufferedRendering):
(WebCore::SVGRenderStyle::fillRule):
(WebCore::SVGRenderStyle::strokeMiterLimit):
(WebCore::SVGRenderStyle::maskType):
(WebCore::SVGRenderStyle::hasStroke):
(WebCore::SVGRenderStyle::setBitDefaults):
(WebCore::SVGRenderStyle::InheritedFlags::operator==):
(WebCore::SVGRenderStyle::initialCapStyle): Deleted.
(WebCore::SVGRenderStyle::initialJoinStyle): Deleted.
(WebCore::SVGRenderStyle::initialPaintOrder): Deleted.
(WebCore::SVGRenderStyle::setCapStyle): Deleted.
(WebCore::SVGRenderStyle::setJoinStyle): Deleted.
(WebCore::SVGRenderStyle::setPaintOrder): Deleted.
(WebCore::SVGRenderStyle::capStyle): Deleted.
(WebCore::SVGRenderStyle::joinStyle): Deleted.
(WebCore::SVGRenderStyle::strokeWidth): Deleted.
(WebCore::SVGRenderStyle::paintOrder): Deleted.
(WebCore::SVGRenderStyle::hasVisibleStroke): Deleted.
(WebCore::SVGRenderStyle::setStrokeWidth): Deleted.
* rendering/style/SVGRenderStyleDefs.cpp:
(WebCore::StyleStrokeData::StyleStrokeData):
(WebCore::StyleStrokeData::operator==):
* rendering/style/SVGRenderStyleDefs.h:
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::StyleRareInheritedData):
(WebCore::StyleRareInheritedData::operator==):
* rendering/style/StyleRareInheritedData.h:
* rendering/svg/RenderSVGEllipse.cpp:
(WebCore::RenderSVGEllipse::strokeShape):
* rendering/svg/RenderSVGPath.cpp:
(WebCore::RenderSVGPath::strokeShape):
(WebCore::RenderSVGPath::shapeDependentStrokeContains):
(WebCore::RenderSVGPath::shouldStrokeZeroLengthSubpath):
(WebCore::RenderSVGPath::zeroLengthLinecapPath):
* rendering/svg/RenderSVGRect.cpp:
(WebCore::RenderSVGRect::strokeShape):
* rendering/svg/RenderSVGShape.cpp:
(WebCore::RenderSVGShape::strokeShape):
(WebCore::RenderSVGShape::fillStrokeMarkers):
(WebCore::RenderSVGShape::strokeWidth):
(WebCore::RenderSVGShape::hasSmoothStroke):
* rendering/svg/RenderSVGText.cpp:
(WebCore::RenderSVGText::strokeBoundingBox):
* rendering/svg/SVGInlineTextBox.cpp:
(WebCore::SVGInlineTextBox::paint):
(WebCore::SVGInlineTextBox::paintDecoration):
* rendering/svg/SVGRenderSupport.cpp:
(WebCore::SVGRenderSupport::applyStrokeStyleToContext):
* rendering/svg/SVGRenderTreeAsText.cpp:
(WebCore::writeStyle):

LayoutTests:

Reviewed by Simon Fraser.

* fast/css/parsing-paint-order-expected.txt: Added.
* fast/css/parsing-paint-order.html: Added.
* fast/css/parsing-stroke-linecap-expected.txt: Added.
* fast/css/parsing-stroke-linecap.html: Added.
* fast/css/parsing-stroke-linejoin-expected.txt: Added.
* fast/css/parsing-stroke-linejoin.html: Added.
* fast/css/parsing-stroke-width-expected.txt: Added.
* fast/css/parsing-stroke-width.html: Added.
* media/track/track-css-stroke-cues-expected.txt:
* media/track/track-css-stroke-cues.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212562 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[SOUP] Handle Settings::allowsAnySSLCertificate() in SSL sockets
commit-queue@webkit.org [Fri, 17 Feb 2017 19:13:36 +0000 (19:13 +0000)]
[SOUP] Handle Settings::allowsAnySSLCertificate() in SSL sockets
https://bugs.webkit.org/show_bug.cgi?id=168521

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-02-17
Reviewed by Michael Catanzaro.

When Settings::allowsAnySSLCertificate() is enabled, connect to accept-certificate signal of the GTlsConnection
to always accept the certificates.

Fixes: http/tests/websocket/tests/hybi/simple-wss.html

* platform/network/soup/SocketStreamHandleImplSoup.cpp:
(WebCore::wssConnectionAcceptCertificateCallback):
(WebCore::wssSocketClientEventCallback):
(WebCore::SocketStreamHandleImpl::create):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212561 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFix iOS ASAN build after r212401
achristensen@apple.com [Fri, 17 Feb 2017 19:13:28 +0000 (19:13 +0000)]
Fix iOS ASAN build after r212401
https://bugs.webkit.org/show_bug.cgi?id=168398

* libwebrtc.xcodeproj/project.pbxproj:
libwebrtc.dylib needs some symbols from CFNetwork,
like CFNetworkCopySystemProxySettings

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212560 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFixed elements bounce when rubber-banding at the bottom of the page
simon.fraser@apple.com [Fri, 17 Feb 2017 19:11:59 +0000 (19:11 +0000)]
Fixed elements bounce when rubber-banding at the bottom of the page
https://bugs.webkit.org/show_bug.cgi?id=168493
rdar://problem/30567713

Reviewed by Tim Horton.

Source/WebCore:

FrameView::visibleDocumentRect() was computing a bad visible rect when bottom-rubber-banding,
by adding rubberBandBottom which is negative, rather than subtracting.

Log some more scrolling stuff.

Ironically, the existing test didn't test stick-to-viewport fixed position because
backgroundShouldExtendBeyondPage() is off by default in WTR, so clone it to a test
that sets this, to test both behaviors.

This also revealed that dynamic changes to backgroundShouldExtendBeyondPage() need
to be propagated to the scrolling tree, which is fixed in AsyncScrollingCoordinator::frameViewLayoutUpdated().

Test: fast/visual-viewport/rubberbanding-viewport-rects-extended-background.html

* page/FrameView.cpp:
(WebCore::FrameView::updateLayoutViewport):
(WebCore::FrameView::visibleDocumentRect):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewLayoutUpdated):
* page/scrolling/ScrollingStateFrameScrollingNode.cpp:
(WebCore::ScrollingStateFrameScrollingNode::dumpProperties):
* page/scrolling/ScrollingTreeFrameScrollingNode.cpp:
(WebCore::ScrollingTreeFrameScrollingNode::layoutViewportForScrollPosition):
* page/scrolling/mac/ScrollingCoordinatorMac.mm:
(WebCore::ScrollingCoordinatorMac::scheduleTreeStateCommit):
(WebCore::ScrollingCoordinatorMac::commitTreeState):

LayoutTests:

* fast/visual-viewport/rubberbanding-viewport-rects-expected.txt:
* fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt: Copied from LayoutTests/fast/visual-viewport/rubberbanding-viewport-rects-expected.txt.
* fast/visual-viewport/rubberbanding-viewport-rects-extended-background.html: Copied from LayoutTests/fast/visual-viewport/rubberbanding-viewport-rects.html.
* fast/visual-viewport/rubberbanding-viewport-rects.html:
* platform/ios-simulator-wk2/fast/visual-viewport/rubberbanding-viewport-rects-expected.txt:
* platform/ios-simulator-wk2/fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt: Copied from LayoutTests/platform/ios-simulator-wk2/fast/visual-viewport/rubberbanding-viewport-rects-expected.txt.
* platform/mac-wk1/fast/visual-viewport/rubberbanding-viewport-rects-extended-background-expected.txt: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212559 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION (209396): Apple Pay buttons do not render
simon.fraser@apple.com [Fri, 17 Feb 2017 19:11:44 +0000 (19:11 +0000)]
REGRESSION (209396): Apple Pay buttons do not render
https://bugs.webkit.org/show_bug.cgi?id=168523
rdar://problem/30451563

Reviewed by Geoffrey Garen.
Source/WebCore:

The new CSS parser mistakenly converted -apple-pay-button values to
-webkit-pay-button, breaking -webkit-appearance: -apple-pay-button.

Fix by excluding "-apple-pay" prefixed values from the conversion.

Test: fast/css/appearance-apple-pay-button.html

* css/parser/CSSPropertyParser.cpp:
(WebCore::isAppleLegacyCssValueKeyword):

LayoutTests:

Ref test that masks out the middle and corners of the buttons.

* fast/css/appearance-apple-pay-button-expected.html: Added.
* fast/css/appearance-apple-pay-button.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212558 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove EFL from WebKit2
mcatanzaro@igalia.com [Fri, 17 Feb 2017 19:10:39 +0000 (19:10 +0000)]
Remove EFL from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=168511

Reviewed by Alex Christensen.

* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::platformInvalidate):
(IPC::Connection::open):
* Platform/Module.h:
* PlatformEfl.cmake: Removed.
* PluginProcess/unix/PluginProcessMainUnix.cpp:
* Shared/API/APIObject.h:
* Shared/API/c/WKBase.h:
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toAPI):
(WebKit::toImpl):
* Shared/NativeWebKeyboardEvent.h:
(WebKit::NativeWebKeyboardEvent::isFakeEventForComposition):
(WebKit::NativeWebKeyboardEvent::isFiltered): Deleted.
* Shared/NativeWebMouseEvent.h:
(WebKit::NativeWebMouseEvent::nativeEvent):
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent): Deleted.
* Shared/NativeWebTouchEvent.h:
(WebKit::NativeWebTouchEvent::nativeEvent):
* Shared/NativeWebWheelEvent.h:
(WebKit::NativeWebWheelEvent::nativeEvent):
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::determineQuirks):
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/APIWebsiteDataStore.cpp:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKTextChecker.cpp:
* UIProcess/API/C/WKTextChecker.h:
* UIProcess/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::getLaunchOptions):
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::pixelAlignedFloatPoint):
* UIProcess/InspectorServer/WebInspectorServer.h:
* UIProcess/Launcher/ProcessLauncher.h:
* UIProcess/Network/CustomProtocols/soup/CustomProtocolManagerProxySoup.cpp:
* UIProcess/PageClient.h:
* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
(WebKit::PluginProcessProxy::scanPlugin):
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::getPluginDisplay):
(WebKit::x11Screen):
(WebKit::displayDepth):
(WebKit::rootWindowID):
(WebKit::NetscapePluginX11::paint):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::selectItemWritingDirectionIsNatural):
(WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::saveViewStateToItem):
(WebKit::WebFrameLoaderClient::restoreViewState):
(WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* config.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212557 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r212463.
commit-queue@webkit.org [Fri, 17 Feb 2017 19:00:25 +0000 (19:00 +0000)]
Unreviewed, rolling out r212463.
https://bugs.webkit.org/show_bug.cgi?id=168526

Some crashes with GuardMalloc (Requested by anttik on
#webkit).

Reverted changeset:

"Execute pending scripts asynchronously after stylesheet loads
complete"
https://bugs.webkit.org/show_bug.cgi?id=168367
http://trac.webkit.org/changeset/212463

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212556 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoStop backing up localStorage databases to iCloud by default.
beidson@apple.com [Fri, 17 Feb 2017 18:48:11 +0000 (18:48 +0000)]
Stop backing up localStorage databases to iCloud by default.
<rdar://problem/29045531> and https://bugs.webkit.org/show_bug.cgi?id=168388

Reviewed by Geoffrey Garen.

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* Misc/WebKitVersionChecks.h:
* Misc/WebKitVersionChecks.mm: Renamed from Source/WebKit/mac/Misc/WebKitVersionChecks.m.
(WebKitLinkedOnOrAfter):
(setWebKitLinkTimeVersion):
(WebKitLinkTimeVersion):
(linkedOnOrAfter):

* Storage/WebStorageManager.mm:
(WebKitInitializeStorageIfNecessary):

Source/WebKit2:

* UIProcess/Cocoa/VersionChecks.h:

* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::databasePath):
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/ios/LocalStorageDatabaseTrackerIOS.mm: Copied from Source/WebKit2/UIProcess/Cocoa/VersionChecks.h.
(WebKit::LocalStorageDatabaseTracker::platformExcludeFromBackup):

* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212555 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRenderView needs to be updated when FrameView changes
bfulgham@apple.com [Fri, 17 Feb 2017 18:41:50 +0000 (18:41 +0000)]
RenderView needs to be updated when FrameView changes
https://bugs.webkit.org/show_bug.cgi?id=168481
<rdar://problem/30339638>

Reviewed by Andreas Kling.

The state of the Document's RenderView can get out of sync with the Frame's FrameView.
We need a notification mechanism so that modifications to the Frame's view are properly
relayed to Document so that it can have a correct RenderView.

* dom/Document.cpp:
(WebCore::Document::didBecomeCurrentDocumentInView): Create an updated render tree (if
one does not already exist).
(WebCore::Document::destroyRenderTree): Remove an incorrect ASSERT. We may enter this
code when the Frame uses 'setView(nullptr)', which happens during certain  updates.
* dom/Document.h:
* page/Frame.cpp:
(WebCore::Frame::setView): Destroy the old render tree (if present) before switching to
the new view. Then notify the document that it is now the current document in the new view.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212554 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRebaseline test for ios-simulator-wk2 after r212522.
ryanhaddad@apple.com [Fri, 17 Feb 2017 18:05:46 +0000 (18:05 +0000)]
Rebaseline test for ios-simulator-wk2 after r212522.

Unreviewed test gardening.

* platform/ios-simulator-wk2/imported/w3c/web-platform-tests/html/semantics/forms/the-label-element/labelable-elements-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212553 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoFix tools that were broken by Efl removal
aakash_jain@apple.com [Fri, 17 Feb 2017 17:09:52 +0000 (17:09 +0000)]
Fix tools that were broken by Efl removal
https://bugs.webkit.org/show_bug.cgi?id=168496

Reviewed by Alexey Proskuryakov.

* QueueStatusServer/config/queues.py:
* Scripts/webkitpy/common/config/ews.json:
* TestResultServer/static-dashboards/builders.jsonp:
* TestResultServer/static-dashboards/flakiness_dashboard.js:
* TestResultServer/static-dashboards/loader_unittests.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212552 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agohttps://bugs.webkit.org/show_bug.cgi?id=168442
lforschler@apple.com [Fri, 17 Feb 2017 16:25:56 +0000 (16:25 +0000)]
https://bugs.webkit.org/show_bug.cgi?id=168442
Move the SVN checkout from http -> https.
Update unit tests.

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/master.cfg:
(CheckOutSource.__init__):
* BuildSlaveSupport/build.webkit.org-config/mastercfg_unittest.py:
(SVNMirrorTest.get_SVNMirrorFromConfig):
* BuildSlaveSupport/build.webkit.org-config/public_html/TestFailures/scripts/checkout_unittests.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212551 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove EFL from Source/cmake
mcatanzaro@igalia.com [Fri, 17 Feb 2017 15:14:49 +0000 (15:14 +0000)]
Remove EFL from Source/cmake
https://bugs.webkit.org/show_bug.cgi?id=168512

Reviewed by Carlos Garcia Campos.

* Source/cmake/OptionsEfl.cmake: Removed.
* Source/cmake/WebKitPackaging.cmake:
* Source/cmake/eflsymbols.filter: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212550 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[GStreamer] Fast replay on video hide/unhide on platforms with limited video buffer...
eocanha@igalia.com [Fri, 17 Feb 2017 14:50:37 +0000 (14:50 +0000)]
[GStreamer] Fast replay on video hide/unhide on platforms with limited video buffer pools
https://bugs.webkit.org/show_bug.cgi?id=168505

Reviewed by Žan Doberšek.

The WebKit code isn't consuming the video samples when the video layer is hidden,
so the buffers aren't being returned to the pool and starve the decoder when the
buffer pool runs out of buffers (on platforms using a buffer pool and a custom
allocator, such as OMX on the Raspberry Pi 2). When the video layer is restored,
the pipeline tries to catch up and the user sees the video "going fast forward".

The added code "consumes" (removes and unrefs) the buffer in that case. However,
the sample isn't completely removed because it still holds important info (eg:
caps) needed for the proper operation of the video element.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::pushTextureToCompositor):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212549 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[SOUP] Stop removing the fragment identifier from resource requests
carlosgc@webkit.org [Fri, 17 Feb 2017 14:46:32 +0000 (14:46 +0000)]
[SOUP] Stop removing the fragment identifier from resource requests
https://bugs.webkit.org/show_bug.cgi?id=168509

Reviewed by Sergio Villar Senin.

I don't know why, but have always removed the fragment identifier from the URL when creating the SoupURI that
is passed to libsoup. Maybe it was a bug in a very old version of libsoup, but it doesn't look necessary anymore
and it's causing several layout test failures.

Fixes: http/tests/svg/svg-use-external.html
       imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/compile-error-same-origin-with-hash.html
       imported/w3c/web-platform-tests/html/webappapis/scripting/processing-model-2/runtime-error-same-origin-with-hash.html

* platform/network/soup/ResourceRequestSoup.cpp:
(WebCore::ResourceRequest::createSoupURI): Do not remove the fragment identifier from the URL.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212548 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[GTK] Unreviewed test gardening
jfernandez@igalia.com [Fri, 17 Feb 2017 14:44:44 +0000 (14:44 +0000)]
[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=168473

Unreviewed GTK+ test gardening.

 - rebaseline imported/w3c/web-platform-tests/html/browsers/history/the-location-interface/location_hash.html test.

* web-platform-tests/html/browsers/history/the-location-interface/location_hash-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212547 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoTest media/modern-media-controls/time-label/time-label-white-space-nowrap.html is...
commit-queue@webkit.org [Fri, 17 Feb 2017 14:17:08 +0000 (14:17 +0000)]
Test media/modern-media-controls/time-label/time-label-white-space-nowrap.html is a flaky failure
https://bugs.webkit.org/show_bug.cgi?id=168507

Unreviewed test gardening.

Patch by Antoine Quint <graouts@apple.com> on 2017-02-17

* media/modern-media-controls/time-label/time-label-white-space-nowrap-expected.txt:
* media/modern-media-controls/time-label/time-label-white-space-nowrap.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212546 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed GTK+ gardening. Remove duplicated entries from TestExpectations.
carlosgc@webkit.org [Fri, 17 Feb 2017 14:03:01 +0000 (14:03 +0000)]
Unreviewed GTK+ gardening. Remove duplicated entries from TestExpectations.

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212545 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[GTK] Unreviewed test gardening
jfernandez@igalia.com [Fri, 17 Feb 2017 12:47:28 +0000 (12:47 +0000)]
[GTK] Unreviewed test gardening
https://bugs.webkit.org/show_bug.cgi?id=168504

Unreviewed GTK+ test gardening.

 - imported/w3c/web-platform-tests/html/semantics/scripting-1/the-script-element/async_007.htm test marked as Slow.
 - http/tests/security/bypassing-cors-checks-for-extension-urls.html skipped (bug 168466)
 - rebaseline http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-basics.html test (matching Mac expectations - bug 167252)

* platform/gtk/TestExpectations:
* platform/gtk/http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-basics-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212544 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed GTK+ gardening. Update expectations of several tests.
carlosgc@webkit.org [Fri, 17 Feb 2017 11:00:56 +0000 (11:00 +0000)]
Unreviewed GTK+ gardening. Update expectations of several tests.

* platform/gtk/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212543 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd tests for the time series chart and fix bugs I found along the way
rniwa@webkit.org [Fri, 17 Feb 2017 09:15:55 +0000 (09:15 +0000)]
Add tests for the time series chart and fix bugs I found along the way
https://bugs.webkit.org/show_bug.cgi?id=168499

Reviewed by Antti Koivisto.

Add basic tests for the time series chart.

Replaced the "ondata" callback set in the options by "dataChange" action now that ComponentBase provides
a facility for defining event-like actions.

Also fixed bugs I encountered while writing these tests see below for descriptions.

* browser-tests/editable-text-tests.js:
(waitToRender): Moved to index.html
* browser-tests/index.html:
(waitToRender): Moved from editable-text-tests.js.
(wait): Added.
* browser-tests/time-series-chart-tests.js: Added.
* public/v3/components/chart-pane-base.js:
(ChartPaneBase.prototype.configure):
* public/v3/components/time-series-chart.js:
(TimeSeriesChart): Removed the code to set display and position inline properties. This is now done inside
cssTemplate with :host pseudo class.
(TimeSeriesChart.prototype._ensureCanvas): Don't strech the canvas to 100% of width and height. This was
causing a flush of contents where the canvas is momentarily streched by the browser and the script later
updates with the content with the correct aspect ratio.
(TimeSeriesChart.cssTemplate): Added :host rule to set display: block and position: relative.
(TimeSeriesChart._updateAllCharts): Deleted.
(TimeSeriesChart.prototype.render): Only run the code for axis when options.axis is defined. Also, avoid
setting the fill style because we never fill for axis drawing.
(TimeSeriesChart.prototype._computeHorizontalRenderingMetrics): Ditto. Fallback to sensible values when
options.axis is not defined.
(TimeSeriesChart.prototype._renderYAxis): Now computeValueGrid generates a sequence of {time, label}.
(TimeSeriesChart.prototype._renderTimeSeries): Don't draw the shades for confidence intervals unless its
fill style is defined. Otherwise, we'd end up drawing black shade and mask the actual data points.
(TimeSeriesChart.prototype._ensureSampledTimeSeries): Dispatch newly added "dataChange" action instead of
calling "ondata" callback in options dictionary.
(TimeSeriesChart.computeTimeGrid): Modernized to use const/let. Also fixed the bug that we were emitting
the date even when the entire time range fit within a 24-hour interval.
(TimeSeriesChart.computeValueGrid): Rewritten to make MB/GB use a nice round number instead of 0.98GB.
We were using a power of 10 to round up the stepping value but the value formatter used a power of 1024
to divide byte measurements (e.g. for memory). Use formatter.divisor to find the right scaling factor for
each kind.
* public/v3/models/metric.js:
(Metric.prototype.makeFormatter):
(Metric.makeFormatter): Extracted from the one on the prototype so that tests don't need a metric object
just to test TimeSeriesChart. Added the second argument which specifies the maximum absolute value of the
range we're formatting. This is needed to use the same number of decimal points when the most significant
digit of some value is smaller than that of the biggest one. For example, we were emitting 0.50GB instead
of 0.5G along with 2.0GB. The "adjustment" reduces the number of significant figures in these cases.
* public/v3/pages/dashboard-page.js:
(DashboardPage.prototype._createChartForCell):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212542 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[GLib] GCActivityCallback::scheduleTimer() keeps pushing dispatch into the future
zandobersek@gmail.com [Fri, 17 Feb 2017 09:13:58 +0000 (09:13 +0000)]
[GLib] GCActivityCallback::scheduleTimer() keeps pushing dispatch into the future
https://bugs.webkit.org/show_bug.cgi?id=168363

Reviewed by Carlos Garcia Campos.

Mimic the USE(CF) implementation of GCActivityCallback and HeapTimer by
scheduling the timer a decade into the future instead of completely
cancelling it. That way new dispatch times for GCActivityCallback can be
computed by simply deducting the difference in the new and previous
delay from the GSource's current dispatch time. Previously we handled an
extra 'paused' state (where m_delay was -1) and allowed for a delay of
an infinite value to be valid, complicating the next dispatch time
computation.

HeapTimer gains the static s_decade variable. The dispatch function in
heapTimerSourceFunctions only dispatches the callback, which now delays
the GSource by a decade. HeapTimer::scheduleTimer() simply schedules the
source to dispatch in the specified amount of time, and cancelTimer()
'cancels' the source by setting the dispatch time to a decade.

GCActivityCallback constructor initializes the delay to the s_decade
value and immediately sets the ready time for GSource a decade into the
future, avoiding the default -1 value as the ready time that would cause
problems in scheduleTimer(). scheduleTimer() doesn't special-case the
zero-delay value anymore, instead it just computes the difference
between the old and the new delay and rolls back the GSource's ready
time for that amount. cancelTimer() sets m_delay to the decade value and
delays the GSource for that same amount.

* heap/GCActivityCallback.cpp:
(JSC::GCActivityCallback::GCActivityCallback):
(JSC::GCActivityCallback::scheduleTimer):
(JSC::GCActivityCallback::cancelTimer):
* heap/GCActivityCallback.h:
* heap/HeapTimer.cpp:
(JSC::HeapTimer::HeapTimer):
(JSC::HeapTimer::scheduleTimer):
(JSC::HeapTimer::cancelTimer):
* heap/HeapTimer.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212541 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[GTK] Test fast/shadow-dom/input-element-in-shadow.html is failing in the bots
commit-queue@webkit.org [Fri, 17 Feb 2017 06:26:54 +0000 (06:26 +0000)]
[GTK] Test fast/shadow-dom/input-element-in-shadow.html is failing in the bots
https://bugs.webkit.org/show_bug.cgi?id=168423

Patch by Carlos Garcia Campos <cgarcia@igalia.com> on 2017-02-16
Reviewed by Ryosuke Niwa.

It's failing only because the result has the spell checker underline, while the the reference image doesn't. I
don't know why the slot is spell checked and the input in the reference isn't, but we could make the test pass
by using real words, since the contents are not important for this test. Use "one", "two" instead of "abc", "def".

* fast/shadow-dom/input-element-in-shadow-expected.html:
* fast/shadow-dom/input-element-in-shadow.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212536 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[JSC] Drop PassRefPtr from ArrayBuffer
utatane.tea@gmail.com [Fri, 17 Feb 2017 06:04:16 +0000 (06:04 +0000)]
[JSC] Drop PassRefPtr from ArrayBuffer
https://bugs.webkit.org/show_bug.cgi?id=168455

Reviewed by Geoffrey Garen.

Source/JavaScriptCore:

This patch finally drops all the PassRefPtr in JSC.
We changed PassRefPtr<ArrayBuffer> to RefPtr<ArrayBuffer>&&.
Since ArrayBuffer may be nullptr if the array is neutered,
we hold it as RefPtr<> instead of Ref<>.

And we also drops 2 files, TypedArrayBase.h and IntegralTypedArrayBase.h.
They are not used (and they are not referenced from the project file).

* inspector/JavaScriptCallFrame.h:
* jsc.cpp:
(functionDollarAgentReceiveBroadcast):
* runtime/ArrayBufferView.cpp:
(JSC::ArrayBufferView::ArrayBufferView):
* runtime/ArrayBufferView.h:
(JSC::ArrayBufferView::possiblySharedBuffer):
(JSC::ArrayBufferView::unsharedBuffer):
(JSC::ArrayBufferView::verifySubRangeLength):
(JSC::ArrayBufferView::clampOffsetAndNumElements):
* runtime/ClassInfo.h:
* runtime/DataView.cpp:
(JSC::DataView::DataView):
(JSC::DataView::create):
* runtime/DataView.h:
* runtime/GenericTypedArrayView.h:
* runtime/GenericTypedArrayViewInlines.h:
(JSC::GenericTypedArrayView<Adaptor>::GenericTypedArrayView):
(JSC::GenericTypedArrayView<Adaptor>::create):
(JSC::GenericTypedArrayView<Adaptor>::subarray):
* runtime/IntegralTypedArrayBase.h: Removed.
* runtime/JSArrayBuffer.cpp:
(JSC::JSArrayBuffer::JSArrayBuffer):
(JSC::JSArrayBuffer::create):
* runtime/JSArrayBuffer.h:
* runtime/JSArrayBufferPrototype.cpp:
(JSC::arrayBufferProtoFuncSlice):
* runtime/JSArrayBufferView.cpp:
(JSC::JSArrayBufferView::ConstructionContext::ConstructionContext):
* runtime/JSArrayBufferView.h:
* runtime/JSArrayBufferViewInlines.h:
(JSC::JSArrayBufferView::possiblySharedImpl):
(JSC::JSArrayBufferView::unsharedImpl):
* runtime/JSCell.cpp:
(JSC::JSCell::slowDownAndWasteMemory):
(JSC::JSCell::getTypedArrayImpl):
* runtime/JSCell.h:
* runtime/JSDataView.cpp:
(JSC::JSDataView::create):
(JSC::JSDataView::possiblySharedTypedImpl):
(JSC::JSDataView::unsharedTypedImpl):
(JSC::JSDataView::getTypedArrayImpl):
* runtime/JSDataView.h:
* runtime/JSGenericTypedArrayView.h:
* runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayViewWithArguments):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::create):
(JSC::JSGenericTypedArrayView<Adaptor>::possiblySharedTypedImpl):
(JSC::JSGenericTypedArrayView<Adaptor>::unsharedTypedImpl):
(JSC::JSGenericTypedArrayView<Adaptor>::getTypedArrayImpl):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):
* runtime/JSTypedArrays.cpp:
(JSC::createUint8TypedArray):
* runtime/TypedArrayBase.h: Removed.

Source/WebCore:

* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readArrayBufferView):
* css/FontFace.cpp:
(WebCore::FontFace::create):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.cpp:
(WebCore::MediaPlayerPrivateAVFoundation::extractKeyURIKeyIDAndCertificateFromInitData):
* platform/graphics/avfoundation/cf/MediaPlayerPrivateAVFoundationCF.cpp:
(WebCore::AVFWrapper::shouldWaitForLoadingOfResource):
* platform/graphics/avfoundation/objc/CDMSessionAVFoundationObjC.mm:
(WebCore::CDMSessionAVFoundationObjC::generateKeyRequest):
* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
(WebCore::MediaPlayerPrivateAVFoundationObjC::shouldWaitForLoadingOfResource):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212535 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove unused methods WKPageGetDebugPaintFlags and WKPageSetDebugPaintFlags
aakash_jain@apple.com [Fri, 17 Feb 2017 06:03:14 +0000 (06:03 +0000)]
Remove unused methods WKPageGetDebugPaintFlags and WKPageSetDebugPaintFlags
https://bugs.webkit.org/show_bug.cgi?id=168464

Reviewed by Alexey Proskuryakov.

* UIProcess/API/C/WKPagePrivate.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212534 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUse expect.js instead of expect in browser tests
rniwa@webkit.org [Fri, 17 Feb 2017 05:36:05 +0000 (05:36 +0000)]
Use expect.js instead of expect in browser tests
https://bugs.webkit.org/show_bug.cgi?id=168492

Reviewed by Joseph Pecoraro.

Use expect.js (https://github.com/Automattic/expect.js) instead of expect (https://github.com/mjackson/expect).

* browser-tests/close-button-tests.js:
* browser-tests/component-base-tests.js:
* browser-tests/editable-text-tests.js:
* browser-tests/index.html:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212533 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoREGRESSION(r212439): Web Inspector Toolbar / Window appears broken
simon.fraser@apple.com [Fri, 17 Feb 2017 05:13:17 +0000 (05:13 +0000)]
REGRESSION(r212439): Web Inspector Toolbar / Window appears broken
https://bugs.webkit.org/show_bug.cgi?id=168494

Reviewed by Joseph Pecoraro.

Missed one conversion from acceleratesDrawing to drawsAsynchronously, which
caused non-Whippet GrpahicsContext shadow drawing to happen unexpectedly.

* platform/graphics/ca/cocoa/WebTiledBackingLayer.mm:
(-[WebTiledBackingLayer drawsAsynchronously]):
(-[WebTiledBackingLayer acceleratesDrawing]): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212524 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago<input>.labels is empty if type changes from text->hidden->checkbox
cdumez@apple.com [Fri, 17 Feb 2017 04:30:45 +0000 (04:30 +0000)]
<input>.labels is empty if type changes from text->hidden->checkbox
https://bugs.webkit.org/show_bug.cgi?id=168358

Reviewed by Ryosuke Niwa.

LayoutTests/imported/w3c:

Re-sync web-platform-test from:
https://github.com/w3c/web-platform-tests/pull/4804

* web-platform-tests/html/semantics/forms/the-label-element/labelable-elements-expected.txt:
* web-platform-tests/html/semantics/forms/the-label-element/labelable-elements.html:

Source/WebCore:

We were invalidating LabelsNodeLists on 'for' attribute change.
We now also invalidate them of 'type' attribute change since
HTMLInputElements whose type is 'hidden' do not support labels.

No new tests, updated existing test.

* dom/Document.h:
* dom/LiveNodeList.h:
(WebCore::shouldInvalidateTypeOnAttributeChange):
* html/LabelsNodeList.cpp:
(WebCore::LabelsNodeList::LabelsNodeList):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212522 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove even more EFL from WebCore
mcatanzaro@igalia.com [Fri, 17 Feb 2017 04:07:12 +0000 (04:07 +0000)]
Remove even more EFL from WebCore
https://bugs.webkit.org/show_bug.cgi?id=168485

Reviewed by Alex Christensen.

* accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
(webkitAccessibleGetAttributes):
(atkRole):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::copy):
* platform/ContextMenuItem.h:
* platform/graphics/OpenGLESShims.h:
* platform/graphics/PlatformDisplay.cpp:
(WebCore::PlatformDisplay::createPlatformDisplay):
* platform/graphics/PlatformDisplay.h:
* platform/graphics/cairo/ImageBufferCairo.cpp:
* platform/graphics/freetype/SimpleFontDataFreeType.cpp:
(WebCore::Font::platformInit):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
* platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
(WebCore::GraphicsLayerTextureMapper::setContentsToImage):
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.cpp:
* platform/graphics/texmap/TextureMapperGC3DPlatformLayer.h:
* platform/network/soup/ResourceErrorSoup.cpp:
(WebCore::ResourceError::timeoutError):
* platform/network/soup/SoupNetworkSession.cpp:
(WebCore::SoupNetworkSession::setProxySettingsFromEnvironment): Deleted.
* platform/network/soup/SoupNetworkSession.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212521 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoModernize and fix measurement-set tests
rniwa@webkit.org [Fri, 17 Feb 2017 03:50:12 +0000 (03:50 +0000)]
Modernize and fix measurement-set tests
https://bugs.webkit.org/show_bug.cgi?id=168484

Reviewed by Joseph Pecoraro.

Modernized and fixed the tests in measurement-set-tests.js.

1. Return a promise instead of manually calling done in then/catch hanlders.
2. Use arrow function everywhere.
3. Explicitly assert the number of calls to callbacks instead of asserting never reached.

The test case labled "should return false when the range ends after the fetched cluster"
was incorrectly asserting that hasFetchedRange returns false when the end time is after
the primary cluster's end time. Test an interval before the primary cluster instead.

Added a test case for hasFetchedRange returning true when the end time appears after
the end of the primary cluster and fixed hasFetchedRange to that end. Since there are
no data points after the primary cluster which is chronologically the last cluster,
there is nothing to fetch beyond its end time.

* public/v3/models/measurement-set.js:
(MeasurementSet.prototype.hasFetchedRange): Fixed the bug that this function returned
false when the end time was after the primary cluster's end by truncating the range by
the end of the primary cluster.
* unit-tests/measurement-set-tests.js:
* unit-tests/resources/mock-remote-api.js:
(assert.notReached.assert.notReached): Deleted. It's no longer used by any tests.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212520 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WebRTC] libwebrtc socket addresses should not be passed as strings
commit-queue@webkit.org [Fri, 17 Feb 2017 02:52:30 +0000 (02:52 +0000)]
[WebRTC] libwebrtc socket addresses should not be passed as strings
https://bugs.webkit.org/show_bug.cgi?id=168474

Patch by Youenn Fablet <youenn@apple.com> on 2017-02-16
Reviewed by Alex Christensen.

Removing all seralization of socket addresses as strings.
Instead, a dedicated serialization is provided.
This allows proper handling of various cases like addresses with both hostnames and resolved IPs.

* NetworkProcess/webrtc/LibWebRTCSocketClient.cpp:
(WebKit::LibWebRTCSocketClient::signalReadPacket):
(WebKit::LibWebRTCSocketClient::signalSentPacket):
(WebKit::LibWebRTCSocketClient::signalAddressReady):
* NetworkProcess/webrtc/NetworkRTCProvider.cpp:
(WebKit::NetworkRTCProvider::createUDPSocket):
(WebKit::NetworkRTCProvider::createServerTCPSocket):
(WebKit::NetworkRTCProvider::createClientTCPSocket):
* NetworkProcess/webrtc/NetworkRTCProvider.h:
* NetworkProcess/webrtc/NetworkRTCProvider.messages.in:
* NetworkProcess/webrtc/NetworkRTCSocket.cpp:
(WebKit::NetworkRTCSocket::sendTo):
* NetworkProcess/webrtc/NetworkRTCSocket.h:
* NetworkProcess/webrtc/NetworkRTCSocket.messages.in:
* Shared/RTCNetwork.cpp:
(WebKit::RTCNetwork::SocketAddress::decode):
(WebKit::RTCNetwork::SocketAddress::encode):
* Shared/RTCNetwork.h:
(WebKit::RTCNetwork::SocketAddress::SocketAddress):
* WebProcess/Network/webrtc/LibWebRTCSocket.cpp:
(WebKit::LibWebRTCSocket::signalAddressReady):
(WebKit::LibWebRTCSocket::SendTo):
* WebProcess/Network/webrtc/LibWebRTCSocket.h:
* WebProcess/Network/webrtc/LibWebRTCSocketFactory.cpp:
(WebKit::LibWebRTCSocketFactory::CreateServerTcpSocket):
(WebKit::LibWebRTCSocketFactory::CreateUdpSocket):
(WebKit::LibWebRTCSocketFactory::CreateClientTcpSocket):
* WebProcess/Network/webrtc/WebRTCSocket.cpp:
(WebKit::WebRTCSocket::signalAddressReady):
* WebProcess/Network/webrtc/WebRTCSocket.h:
* WebProcess/Network/webrtc/WebRTCSocket.messages.in:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212519 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove Chromium-specific code to call FrameLoaderClient::redirectDataToPlugin(nullptr)
commit-queue@webkit.org [Fri, 17 Feb 2017 02:40:21 +0000 (02:40 +0000)]
Remove Chromium-specific code to call FrameLoaderClient::redirectDataToPlugin(nullptr)
https://bugs.webkit.org/show_bug.cgi?id=168417
<rdar://problem/30541748>

Patch by Daniel Bates <dabates@apple.com> on 2017-02-16
Reviewed by Brent Fulgham.

Source/WebCore:

Remove Chromium-specific code that was added in r125500 to call FrameLoaderClient::redirectDataToPlugin(nullptr)
in PluginDocument::detachFromPluginElement(). Calling redirectDataToPlugin() with nullptr was used by the
Chromium port to signify that the plugin document was being destroyed so that they could tear down their
plugin widget. And PluginDocument::detachFromPluginElement() is the only place that calls redirectDataToPlugin()
passing nullptr. No other port made use of this machinery and the Chromium port has long since been removed
from the Open Source WebKit Project. We should remove this code.

* html/PluginDocument.cpp:
(WebCore::PluginDocumentParser::appendBytes): Pass the plugin widget by reference.
(WebCore::PluginDocument::detachFromPluginElement): Remove call to FrameLoaderClient::redirectDataToPlugin().
This call was only used by the Chromium port as means to be notified when the plugin document was being
destroyed. No other port made use of this notification or needed such a notification.
* loader/EmptyClients.cpp: Change argument of redirectDataToPlugin() from Widget* to Widget& to convey
that this function always takes a valid Widget. Also remove unnecessary argument name as the data type
of the argument and the name of the function sufficiently describes the purpose of the argument.
* loader/FrameLoaderClient.h: Ditto.

Source/WebKit/mac:

Update override of FrameLoaderClient::redirectDataToPlugin() to take a Widget& instead of a
Widget* as it is always called with a valid Widget.

* WebCoreSupport/WebFrameLoaderClient.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::redirectDataToPlugin):
* WebKit.order: Remove symbol for WebFrameLoaderClient::redirectDataToPlugin() that took a Widget*
as it no longer exists. I am unclear if this file is still meaningful as it was last modified in
r180570 (2 years ago) though Xcode still references this ordering file (why?).

Source/WebKit/win:

Update override of FrameLoaderClient::redirectDataToPlugin() to take a Widget& instead of a
Widget* as it is always called with a valid Widget.

* WebCoreSupport/WebFrameLoaderClient.cpp:
(WebFrameLoaderClient::redirectDataToPlugin):
* WebCoreSupport/WebFrameLoaderClient.h:

Source/WebKit2:

Update override of FrameLoaderClient::redirectDataToPlugin() to take a Widget& instead of a
Widget* as it is always called with a valid Widget.

* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::redirectDataToPlugin):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* mac/WebKit2.order: Remove symbol for WebFrameLoaderClient::redirectDataToPlugin() that took a Widget*
as it no longer exists. I am unclear if this file is still meaningful as it was last modified in
r180570 (2 years ago) though Xcode still references this ordering file (why?).

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212518 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoUnreviewed, rolling out r212514.
achristensen@apple.com [Fri, 17 Feb 2017 02:15:35 +0000 (02:15 +0000)]
Unreviewed, rolling out r212514.
https://bugs.webkit.org/show_bug.cgi?id=168489

broke test runner (Requested by alexchristensen on #webkit).

Reverted changeset:

"Remove EFL-specific files in Tools."
http://trac.webkit.org/changeset/212514

Patch by Commit Queue <commit-queue@webkit.org> on 2017-02-16

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212517 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark storage/indexeddb/modern/idbcursor-continue-primary-key-1.html as flaky.
ryanhaddad@apple.com [Fri, 17 Feb 2017 01:54:10 +0000 (01:54 +0000)]
Mark storage/indexeddb/modern/idbcursor-continue-primary-key-1.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168391

Unreviewed test gardening.

* platform/mac-wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212516 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSkip js/dom/gc-slot-visitor-parallel-drain-pings-runloop-when-done.html on El Capitan.
ryanhaddad@apple.com [Fri, 17 Feb 2017 01:37:24 +0000 (01:37 +0000)]
Skip js/dom/gc-slot-visitor-parallel-drain-pings-runloop-when-done.html on El Capitan.

Unreviewed test gardening.

* platform/mac/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212515 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove EFL-specific files in Tools.
achristensen@apple.com [Fri, 17 Feb 2017 01:30:41 +0000 (01:30 +0000)]
Remove EFL-specific files in Tools.

Rubber-stamped by Anders Carlsson.

* ImageDiff/efl: Removed.
* ImageDiff/efl/ImageDiff.cpp: Removed.
* MiniBrowser/efl: Removed.
* MiniBrowser/efl/CMakeLists.txt: Removed.
* MiniBrowser/efl/main.c: Removed.
* Scripts/run-efl-tests: Removed.
* Scripts/update-webkitefl-libs: Removed.
* Scripts/webkitpy/port/efl.py: Removed.
* Scripts/webkitpy/port/efl_unittest.py: Removed.
* TestWebKitAPI/Tests/WebKit2/efl: Removed.
* TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks.cpp: Removed.
* TestWebKitAPI/Tests/WebKit2/efl/WKViewClientWebProcessCallbacks_Bundle.cpp: Removed.
* TestWebKitAPI/Tests/WebKit2/efl/WKViewScrollTo.cpp: Removed.
* TestWebKitAPI/Tests/WebKit2/efl/scrollTo.html: Removed.
* TestWebKitAPI/efl: Removed.
* TestWebKitAPI/efl/InjectedBundleController.cpp: Removed.
* TestWebKitAPI/efl/PlatformUtilities.cpp: Removed.
* TestWebKitAPI/efl/PlatformWebView.cpp: Removed.
* TestWebKitAPI/efl/main.cpp: Removed.
* WebKitTestRunner/InjectedBundle/efl: Removed.
* WebKitTestRunner/InjectedBundle/efl/ActivateFontsEfl.cpp: Removed.
* WebKitTestRunner/InjectedBundle/efl/FontManagement.cpp: Removed.
* WebKitTestRunner/InjectedBundle/efl/FontManagement.h: Removed.
* WebKitTestRunner/InjectedBundle/efl/InjectedBundleEfl.cpp: Removed.
* WebKitTestRunner/InjectedBundle/efl/TestRunnerEfl.cpp: Removed.
* WebKitTestRunner/efl: Removed.
* WebKitTestRunner/efl/EventSenderProxyEfl.cpp: Removed.
* WebKitTestRunner/efl/PlatformWebViewEfl.cpp: Removed.
* WebKitTestRunner/efl/TestControllerEfl.cpp: Removed.
* WebKitTestRunner/efl/main.cpp: Removed.
* efl: Removed.
* efl/install-dependencies: Removed.
* efl/jhbuild-optional.modules: Removed.
* efl/jhbuild.modules: Removed.
* efl/jhbuildrc: Removed.
* efl/patches: Removed.
* efl/patches/evas-fix-build-with-giflib5.patch: Removed.
* efl/patches/fontconfig-C-11-requires-a-space-between-literal-and-identifier.patch: Removed.
* efl/patches/gst-libav.patch: Removed.
* efl/patches/gst-plugins-base-rtp-rtcpbuffer-fix-typo-in-enum.patch: Removed.
* efl/patches/gst-plugins-good-Revert-qtdemux-expose-streams-with-first-moof-for-fr.patch: Removed.
* efl/patches/gst-plugins-good-use-the-tfdt-decode-time.patch: Removed.
* efl/patches/openwebrtc-gst-plugins-clang-warning-fix.patch: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212514 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agofont-weight in @font-face can cause a font to be downloaded even when it's not used
mmaxfield@apple.com [Fri, 17 Feb 2017 01:28:00 +0000 (01:28 +0000)]
font-weight in @font-face can cause a font to be downloaded even when it's not used
https://bugs.webkit.org/show_bug.cgi?id=168114
<rdar://problem/30301317>

Reviewed by Darin Adler.

Source/WebCore:

There were two problems with our font loading code.

When we are in the middle of a download, we will use a special interstitial font,
and this special font has a flag set which will cause it to be invisible when it is
drawn. However, when we start using this font during the load, we give it a
unicode-range of U+0-0 which means that it will never be used, and fallback will
happen to other weights immediately.

The second problem with the font loading code is that this interstital font is just
Times. Times doesn't support every character, which means that if we are trying
to render some exotic character, we fall back to other weights. The solution here
is to use LastResort as the interstitial font, because it supports all characters.
Because its metrics are reasonable and we don't ever actually paint this
interstitial font, this choice is no worse than Times.

Tests: fast/text/font-style-download.html
       fast/text/font-weight-download-2.html
       fast/text/font-weight-download.html
       fast/text/font-weight-fallback.html

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::font):
* css/CSSSegmentedFontFace.cpp:
(WebCore::appendFont):
(WebCore::CSSSegmentedFontFace::fontRanges):
(WebCore::appendFontWithInvalidUnicodeRangeIfLoading): Deleted.
* platform/graphics/Font.h:
(WebCore::Font::widthForGlyph):
* platform/graphics/FontCache.h:
* platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::FontCache::lastResortFallbackFontForEveryCharacter):
* platform/graphics/mac/FontCacheMac.mm:
(WebCore::FontCache::lastResortFallbackFontForEveryCharacter):
* platform/graphics/win/FontCacheWin.cpp:
(WebCore::FontCache::lastResortFallbackFontForEveryCharacter):

Tools:

LastResort needs to be usable in tests.

* DumpRenderTree/mac/DumpRenderTree.mm:
(allowedFontFamilySet):
* WebKitTestRunner/InjectedBundle/cocoa/ActivateFontsCocoa.mm:
(WTR::allowedFontFamilySet):
* WebKitTestRunner/mac/TestControllerMac.mm:
(WTR::allowedFontFamilySet):

LayoutTests:

* fast/text/font-style-download-expected.txt: Added.
* fast/text/font-style-download.html: Added.
* fast/text/font-weight-download-2-expected.txt: Added.
* fast/text/font-weight-download-2.html: Added.
* fast/text/font-weight-download-expected.txt: Added.
* fast/text/font-weight-download.html: Added.
* fast/text/font-weight-fallback-expected.html: Added.
* fast/text/font-weight-fallback.html: Added.
* http/tests/webfont/fallback-font-while-loading-expected.txt: We don't want to use the
fallback font while an earlier font is loading because the fallback font might require
an extra download. This represents a policy change.
* http/tests/webfont/fallback-font-while-loading.html: Ditto.
* resources/Ahem_CJK.ttf: Added.
* svg/W3C-SVG-1.1-SE/struct-dom-11-f.svg: The metrics of LastResort are different from
the metrics of the previous interstitial font, which means the new font causes elements
to intersect when they previously didn't. However, the web font isn't actually necessary
here, so we can just stop using it, thereby sidestepping the entire problem.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212513 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove EFL-specific files in Source.
achristensen@apple.com [Fri, 17 Feb 2017 01:25:26 +0000 (01:25 +0000)]
Remove EFL-specific files in Source.

Rubber-stamped by Anders Carlsson.

Source/WebCore:

* editing/efl: Removed.
* page/efl: Removed.
* platform/audio/efl: Removed.
* platform/efl: Removed.
* platform/efl/DefaultTheme: Removed.
* platform/efl/DefaultTheme/widget: Removed.
* platform/efl/DefaultTheme/widget/button: Removed.
* platform/efl/DefaultTheme/widget/check: Removed.
* platform/efl/DefaultTheme/widget/combo: Removed.
* platform/efl/DefaultTheme/widget/entry: Removed.
* platform/efl/DefaultTheme/widget/progressbar: Removed.
* platform/efl/DefaultTheme/widget/radio: Removed.
* platform/efl/DefaultTheme/widget/scrollbar: Removed.
* platform/efl/DefaultTheme/widget/search: Removed.
* platform/efl/DefaultTheme/widget/search/cancel: Removed.
* platform/efl/DefaultTheme/widget/search/decoration: Removed.
* platform/efl/DefaultTheme/widget/search/field: Removed.
* platform/efl/DefaultTheme/widget/slider: Removed.
* platform/efl/DefaultTheme/widget/spinner: Removed.
* platform/gamepad/efl: Removed.
* platform/graphics/efl: Removed.
* platform/graphics/surfaces/efl: Removed.
* platform/network/efl: Removed.

Source/WTF:

* wtf/text/efl: Removed.
* wtf/text/efl/TextBreakIteratorInternalICUEfl.cpp: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212512 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove EFL-specific files in WebKit2.
achristensen@apple.com [Fri, 17 Feb 2017 01:17:34 +0000 (01:17 +0000)]
Remove EFL-specific files in WebKit2.

Rubber-stamped by Anders Carlsson

* DatabaseProcess/efl: Removed.
* DatabaseProcess/efl/DatabaseProcessMainEfl.cpp: Removed.
* NetworkProcess/Downloads/efl: Removed.
* NetworkProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp: Removed.
* NetworkProcess/efl: Removed.
* NetworkProcess/efl/NetworkProcessMainEfl.cpp: Removed.
* Platform/efl: Removed.
* Platform/efl/ModuleEfl.cpp: Removed.
* Shared/API/c/efl: Removed.
* Shared/API/c/efl/WKArrayEfl.cpp: Removed.
* Shared/API/c/efl/WKArrayEfl.h: Removed.
* Shared/API/c/efl/WKBaseEfl.h: Removed.
* Shared/efl: Removed.
* Shared/efl/NativeWebKeyboardEventEfl.cpp: Removed.
* Shared/efl/NativeWebTouchEventEfl.cpp: Removed.
* Shared/efl/NativeWebWheelEventEfl.cpp: Removed.
* Shared/efl/ProcessExecutablePathEfl.cpp: Removed.
* Shared/efl/WebEventFactory.cpp: Removed.
* Shared/efl/WebEventFactory.h: Removed.
* UIProcess/API/C/efl: Removed.
* UIProcess/API/C/efl/WKAPICastEfl.h: Removed.
* UIProcess/API/C/efl/WKColorPickerResultListener.cpp: Removed.
* UIProcess/API/C/efl/WKColorPickerResultListener.h: Removed.
* UIProcess/API/C/efl/WKEventEfl.cpp: Removed.
* UIProcess/API/C/efl/WKEventEfl.h: Removed.
* UIProcess/API/C/efl/WKViewEfl.cpp: Removed.
* UIProcess/API/C/efl/WKViewEfl.h: Removed.
* UIProcess/API/cpp/efl: Removed.
* UIProcess/API/cpp/efl/WKEinaSharedString.cpp: Removed.
* UIProcess/API/cpp/efl/WKEinaSharedString.h: Removed.
* UIProcess/API/efl: Removed.
* UIProcess/API/efl/APIWebsiteDataStoreEfl.cpp: Removed.
* UIProcess/API/efl/EWebKit2.h.in: Removed.
* UIProcess/API/efl/EwkView.cpp: Removed.
* UIProcess/API/efl/EwkView.h: Removed.
* UIProcess/API/efl/EwkViewCallbacks.h: Removed.
* UIProcess/API/efl/GestureRecognizer.cpp: Removed.
* UIProcess/API/efl/GestureRecognizer.h: Removed.
* UIProcess/API/efl/SnapshotImageGL.cpp: Removed.
* UIProcess/API/efl/SnapshotImageGL.h: Removed.
* UIProcess/API/efl/WebAccessibility.cpp: Removed.
* UIProcess/API/efl/WebAccessibility.h: Removed.
* UIProcess/API/efl/ewk_application_cache_manager.cpp: Removed.
* UIProcess/API/efl/ewk_application_cache_manager.h: Removed.
* UIProcess/API/efl/ewk_application_cache_manager_private.h: Removed.
* UIProcess/API/efl/ewk_auth_request.cpp: Removed.
* UIProcess/API/efl/ewk_auth_request.h: Removed.
* UIProcess/API/efl/ewk_auth_request_private.h: Removed.
* UIProcess/API/efl/ewk_back_forward_list.cpp: Removed.
* UIProcess/API/efl/ewk_back_forward_list.h: Removed.
* UIProcess/API/efl/ewk_back_forward_list_item.cpp: Removed.
* UIProcess/API/efl/ewk_back_forward_list_item.h: Removed.
* UIProcess/API/efl/ewk_back_forward_list_item_private.h: Removed.
* UIProcess/API/efl/ewk_back_forward_list_private.h: Removed.
* UIProcess/API/efl/ewk_color_picker.cpp: Removed.
* UIProcess/API/efl/ewk_color_picker.h: Removed.
* UIProcess/API/efl/ewk_color_picker_private.h: Removed.
* UIProcess/API/efl/ewk_context.cpp: Removed.
* UIProcess/API/efl/ewk_context.h: Removed.
* UIProcess/API/efl/ewk_context_menu.cpp: Removed.
* UIProcess/API/efl/ewk_context_menu.h: Removed.
* UIProcess/API/efl/ewk_context_menu_item.cpp: Removed.
* UIProcess/API/efl/ewk_context_menu_item.h: Removed.
* UIProcess/API/efl/ewk_context_menu_item_private.h: Removed.
* UIProcess/API/efl/ewk_context_menu_private.h: Removed.
* UIProcess/API/efl/ewk_context_private.h: Removed.
* UIProcess/API/efl/ewk_cookie_manager.cpp: Removed.
* UIProcess/API/efl/ewk_cookie_manager.h: Removed.
* UIProcess/API/efl/ewk_cookie_manager_private.h: Removed.
* UIProcess/API/efl/ewk_database_manager.cpp: Removed.
* UIProcess/API/efl/ewk_database_manager.h: Removed.
* UIProcess/API/efl/ewk_database_manager_private.h: Removed.
* UIProcess/API/efl/ewk_download_job.cpp: Removed.
* UIProcess/API/efl/ewk_download_job.h: Removed.
* UIProcess/API/efl/ewk_download_job_private.h: Removed.
* UIProcess/API/efl/ewk_error.cpp: Removed.
* UIProcess/API/efl/ewk_error.h: Removed.
* UIProcess/API/efl/ewk_error_private.h: Removed.
* UIProcess/API/efl/ewk_favicon_database.cpp: Removed.
* UIProcess/API/efl/ewk_favicon_database.h: Removed.
* UIProcess/API/efl/ewk_favicon_database_private.h: Removed.
* UIProcess/API/efl/ewk_file_chooser_request.cpp: Removed.
* UIProcess/API/efl/ewk_file_chooser_request.h: Removed.
* UIProcess/API/efl/ewk_file_chooser_request_private.h: Removed.
* UIProcess/API/efl/ewk_form_submission_request.cpp: Removed.
* UIProcess/API/efl/ewk_form_submission_request.h: Removed.
* UIProcess/API/efl/ewk_form_submission_request_private.h: Removed.
* UIProcess/API/efl/ewk_intro.h: Removed.
* UIProcess/API/efl/ewk_main.cpp: Removed.
* UIProcess/API/efl/ewk_main.h: Removed.
* UIProcess/API/efl/ewk_main_private.h: Removed.
* UIProcess/API/efl/ewk_navigation_data.cpp: Removed.
* UIProcess/API/efl/ewk_navigation_data.h: Removed.
* UIProcess/API/efl/ewk_navigation_data_private.h: Removed.
* UIProcess/API/efl/ewk_navigation_policy_decision.cpp: Removed.
* UIProcess/API/efl/ewk_navigation_policy_decision.h: Removed.
* UIProcess/API/efl/ewk_navigation_policy_decision_private.h: Removed.
* UIProcess/API/efl/ewk_object.cpp: Removed.
* UIProcess/API/efl/ewk_object.h: Removed.
* UIProcess/API/efl/ewk_object_private.h: Removed.
* UIProcess/API/efl/ewk_page_group.cpp: Removed.
* UIProcess/API/efl/ewk_page_group.h: Removed.
* UIProcess/API/efl/ewk_page_group_private.h: Removed.
* UIProcess/API/efl/ewk_popup_menu.cpp: Removed.
* UIProcess/API/efl/ewk_popup_menu.h: Removed.
* UIProcess/API/efl/ewk_popup_menu_item.cpp: Removed.
* UIProcess/API/efl/ewk_popup_menu_item.h: Removed.
* UIProcess/API/efl/ewk_popup_menu_item_private.h: Removed.
* UIProcess/API/efl/ewk_popup_menu_private.h: Removed.
* UIProcess/API/efl/ewk_security_origin.cpp: Removed.
* UIProcess/API/efl/ewk_security_origin.h: Removed.
* UIProcess/API/efl/ewk_security_origin_private.h: Removed.
* UIProcess/API/efl/ewk_settings.cpp: Removed.
* UIProcess/API/efl/ewk_settings.h: Removed.
* UIProcess/API/efl/ewk_settings_private.h: Removed.
* UIProcess/API/efl/ewk_storage_manager.cpp: Removed.
* UIProcess/API/efl/ewk_storage_manager.h: Removed.
* UIProcess/API/efl/ewk_storage_manager_private.h: Removed.
* UIProcess/API/efl/ewk_text_checker.cpp: Removed.
* UIProcess/API/efl/ewk_text_checker.h: Removed.
* UIProcess/API/efl/ewk_text_checker_private.h: Removed.
* UIProcess/API/efl/ewk_touch.h: Removed.
* UIProcess/API/efl/ewk_url_request.cpp: Removed.
* UIProcess/API/efl/ewk_url_request.h: Removed.
* UIProcess/API/efl/ewk_url_request_private.h: Removed.
* UIProcess/API/efl/ewk_url_response.cpp: Removed.
* UIProcess/API/efl/ewk_url_response.h: Removed.
* UIProcess/API/efl/ewk_url_response_private.h: Removed.
* UIProcess/API/efl/ewk_url_scheme_request.cpp: Removed.
* UIProcess/API/efl/ewk_url_scheme_request.h: Removed.
* UIProcess/API/efl/ewk_url_scheme_request_private.h: Removed.
* UIProcess/API/efl/ewk_view.cpp: Removed.
* UIProcess/API/efl/ewk_view.h: Removed.
* UIProcess/API/efl/ewk_view_configuration.cpp: Removed.
* UIProcess/API/efl/ewk_view_configuration.h: Removed.
* UIProcess/API/efl/ewk_view_configuration_private.h: Removed.
* UIProcess/API/efl/ewk_view_private.h: Removed.
* UIProcess/API/efl/ewk_window_features.cpp: Removed.
* UIProcess/API/efl/ewk_window_features.h: Removed.
* UIProcess/API/efl/ewk_window_features_private.h: Removed.
* UIProcess/API/efl/tests: Removed.
* UIProcess/API/efl/tests/UnitTestUtils: Removed.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Removed.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: Removed.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp: Removed.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h: Removed.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestMain.cpp: Removed.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp: Removed.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h: Removed.
* UIProcess/API/efl/tests/extensions: Removed.
* UIProcess/API/efl/tests/extensions/extension_sample.cpp: Removed.
* UIProcess/API/efl/tests/resources: Removed.
* UIProcess/API/efl/tests/resources/Page1.html: Removed.
* UIProcess/API/efl/tests/resources/Page2.html: Removed.
* UIProcess/API/efl/tests/resources/Page3.html: Removed.
* UIProcess/API/efl/tests/resources/blank.ico: Removed.
* UIProcess/API/efl/tests/resources/default_test_page.html: Removed.
* UIProcess/API/efl/tests/resources/empty_theme.edj: Removed.
* UIProcess/API/efl/tests/resources/file_chooser.html: Removed.
* UIProcess/API/efl/tests/resources/frame_flattening_test.html: Removed.
* UIProcess/API/efl/tests/resources/frame_flattening_test_subframe.html: Removed.
* UIProcess/API/efl/tests/resources/local_file_access.html: Removed.
* UIProcess/API/efl/tests/resources/redirect_url_to_default.html: Removed.
* UIProcess/API/efl/tests/resources/resultMHTML.mht: Removed.
* UIProcess/API/efl/tests/resources/same_page_navigation.html: Removed.
* UIProcess/API/efl/tests/resources/spelling_selection_tests.html: Removed.
* UIProcess/API/efl/tests/resources/spelling_test.html: Removed.
* UIProcess/API/efl/tests/resources/test.pdf: Removed.
* UIProcess/API/efl/tests/resources/window_move_resize.html: Removed.
* UIProcess/API/efl/tests/test_ewk2_accessibility.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_auth_request.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_color_picker.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_context.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_context_history_callbacks.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_context_menu.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_database_manager.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_download_job.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_file_chooser_request.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_javascript_binding.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_object.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_page.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_page_group.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_popup_menu.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_settings.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_view.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_view_configuration.cpp: Removed.
* UIProcess/API/efl/tests/test_ewk2_window_features.cpp: Removed.
* UIProcess/InspectorServer/efl: Removed.
* UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp: Removed.
* UIProcess/Launcher/efl: Removed.
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: Removed.
* UIProcess/efl: Removed.
* UIProcess/efl/ContextHistoryClientEfl.cpp: Removed.
* UIProcess/efl/ContextHistoryClientEfl.h: Removed.
* UIProcess/efl/ContextMenuClientEfl.cpp: Removed.
* UIProcess/efl/ContextMenuClientEfl.h: Removed.
* UIProcess/efl/DownloadManagerEfl.cpp: Removed.
* UIProcess/efl/DownloadManagerEfl.h: Removed.
* UIProcess/efl/EasingCurves.cpp: Removed.
* UIProcess/efl/EasingCurves.h: Removed.
* UIProcess/efl/EwkDebug.h: Removed.
* UIProcess/efl/EwkTouchEvent.cpp: Removed.
* UIProcess/efl/EwkTouchEvent.h: Removed.
* UIProcess/efl/EwkTouchPoint.cpp: Removed.
* UIProcess/efl/EwkTouchPoint.h: Removed.
* UIProcess/efl/FindClientEfl.cpp: Removed.
* UIProcess/efl/FindClientEfl.h: Removed.
* UIProcess/efl/FormClientEfl.cpp: Removed.
* UIProcess/efl/FormClientEfl.h: Removed.
* UIProcess/efl/InputMethodContextEfl.cpp: Removed.
* UIProcess/efl/InputMethodContextEfl.h: Removed.
* UIProcess/efl/PageLoadClientEfl.cpp: Removed.
* UIProcess/efl/PageLoadClientEfl.h: Removed.
* UIProcess/efl/PagePolicyClientEfl.cpp: Removed.
* UIProcess/efl/PagePolicyClientEfl.h: Removed.
* UIProcess/efl/PageUIClientEfl.cpp: Removed.
* UIProcess/efl/PageUIClientEfl.h: Removed.
* UIProcess/efl/PageViewportControllerClientEfl.cpp: Removed.
* UIProcess/efl/PageViewportControllerClientEfl.h: Removed.
* UIProcess/efl/RequestManagerClientEfl.cpp: Removed.
* UIProcess/efl/RequestManagerClientEfl.h: Removed.
* UIProcess/efl/TextCheckerClientEfl.cpp: Removed.
* UIProcess/efl/TextCheckerClientEfl.h: Removed.
* UIProcess/efl/TextCheckerEfl.cpp: Removed.
* UIProcess/efl/VibrationClientEfl.cpp: Removed.
* UIProcess/efl/VibrationClientEfl.h: Removed.
* UIProcess/efl/ViewClientEfl.cpp: Removed.
* UIProcess/efl/ViewClientEfl.h: Removed.
* UIProcess/efl/WebColorPickerClient.cpp: Removed.
* UIProcess/efl/WebColorPickerClient.h: Removed.
* UIProcess/efl/WebColorPickerEfl.cpp: Removed.
* UIProcess/efl/WebColorPickerEfl.h: Removed.
* UIProcess/efl/WebColorPickerResultListenerProxy.cpp: Removed.
* UIProcess/efl/WebColorPickerResultListenerProxy.h: Removed.
* UIProcess/efl/WebContextMenuProxyEfl.cpp: Removed.
* UIProcess/efl/WebContextMenuProxyEfl.h: Removed.
* UIProcess/efl/WebInspectorProxyEfl.cpp: Removed.
* UIProcess/efl/WebPageProxyEfl.cpp: Removed.
* UIProcess/efl/WebPopupItemEfl.cpp: Removed.
* UIProcess/efl/WebPopupItemEfl.h: Removed.
* UIProcess/efl/WebPopupMenuProxyEfl.cpp: Removed.
* UIProcess/efl/WebPopupMenuProxyEfl.h: Removed.
* UIProcess/efl/WebPreferencesEfl.cpp: Removed.
* UIProcess/efl/WebProcessPoolEfl.cpp: Removed.
* UIProcess/efl/WebView.cpp: Removed.
* UIProcess/efl/WebView.h: Removed.
* UIProcess/efl/WebViewClient.cpp: Removed.
* UIProcess/efl/WebViewClient.h: Removed.
* WebProcess/InjectedBundle/API/efl: Removed.
* WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Removed.
* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Removed.
* WebProcess/InjectedBundle/API/efl/ewk_extension.h: Removed.
* WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Removed.
* WebProcess/InjectedBundle/API/efl/ewk_page.cpp: Removed.
* WebProcess/InjectedBundle/API/efl/ewk_page.h: Removed.
* WebProcess/InjectedBundle/API/efl/ewk_page_private.h: Removed.
* WebProcess/InjectedBundle/efl: Removed.
* WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp: Removed.
* WebProcess/WebCoreSupport/efl: Removed.
* WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp: Removed.
* WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: Removed.
* WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp: Removed.
* WebProcess/WebCoreSupport/efl/WebPopupMenuEfl.cpp: Removed.
* WebProcess/WebPage/efl: Removed.
* WebProcess/WebPage/efl/WebInspectorUIEfl.cpp: Removed.
* WebProcess/WebPage/efl/WebPageEfl.cpp: Removed.
* WebProcess/efl: Removed.
* WebProcess/efl/ExtensionManagerEfl.cpp: Removed.
* WebProcess/efl/ExtensionManagerEfl.h: Removed.
* WebProcess/efl/WebInjectedBundleMainEfl.cpp: Removed.
* WebProcess/efl/WebProcessMainEfl.cpp: Removed.
* efl: Removed.
* efl/EWebKit2Config.cmake.in: Removed.
* efl/EWebKit2ConfigVersion.cmake.in: Removed.
* efl/ewebkit2-extension.pc.in: Removed.
* efl/ewebkit2.pc.in: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212511 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoAdd WebUSB to features.json as a "Not Considering".
simon.fraser@apple.com [Fri, 17 Feb 2017 01:15:26 +0000 (01:15 +0000)]
Add WebUSB to features.json as a "Not Considering".

* features.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212510 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSkip imported/w3c/web-platform-tests/resource-timing tests on Debug.
ryanhaddad@apple.com [Fri, 17 Feb 2017 01:13:19 +0000 (01:13 +0000)]
Skip imported/w3c/web-platform-tests/resource-timing tests on Debug.
https://bugs.webkit.org/show_bug.cgi?id=168356

Unreviewed test gardening.

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212509 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove old URL parser
achristensen@apple.com [Fri, 17 Feb 2017 01:10:35 +0000 (01:10 +0000)]
Remove old URL parser
https://bugs.webkit.org/show_bug.cgi?id=168483

Reviewed by Tim Horton.

Source/WebCore:

* platform/URL.cpp:
(WebCore::isSchemeFirstChar):
(WebCore::isSchemeChar):
(WebCore::URL::URL):
(WebCore::URL::setProtocol):
(WebCore::URL::setHost):
(WebCore::URL::removePort):
(WebCore::URL::setPort):
(WebCore::URL::setHostAndPort):
(WebCore::URL::setUser):
(WebCore::URL::setPass):
(WebCore::URL::setFragmentIdentifier):
(WebCore::URL::setQuery):
(WebCore::URL::setPath):
(WebCore::URL::serialize):
(WebCore::isUserInfoChar): Deleted.
(WebCore::isHostnameChar): Deleted.
(WebCore::isIPv6Char): Deleted.
(WebCore::isPathSegmentEndChar): Deleted.
(WebCore::appendASCII): Deleted.
(WebCore::findFirstOf): Deleted.
(WebCore::checkEncodedString): Deleted.
(WebCore::URL::init): Deleted.
(WebCore::appendEscapingBadChars): Deleted.
(WebCore::escapeAndAppendNonHierarchicalPart): Deleted.
(WebCore::copyPathRemovingDots): Deleted.
(WebCore::hasSlashDotOrDotDot): Deleted.
(WebCore::URL::parse): Deleted.
(WebCore::cannotBeABaseURL): Deleted.
(WebCore::isDefaultPortForScheme): Deleted.
(WebCore::hostPortIsEmptyButCredentialsArePresent): Deleted.
(WebCore::isNonFileHierarchicalScheme): Deleted.
(WebCore::isCanonicalHostnameLowercaseForScheme): Deleted.
(WebCore::findHostnamesInMailToURL): Deleted.
(WebCore::findHostnameInHierarchicalURL): Deleted.
(WebCore::encodeHostnames): Deleted.
(WebCore::encodeRelativeString): Deleted.
(WebCore::substituteBackslashes): Deleted.
* platform/URLParser.cpp:
(WebCore::URLParser::URLParser):
(WebCore::URLParser::setEnabled): Deleted.
(WebCore::URLParser::enabled): Deleted.
* platform/URLParser.h:
* platform/cf/URLCF.cpp:
(WebCore::URL::URL):
* platform/mac/URLMac.mm:
(WebCore::URL::URL):

Source/WebKit2:

* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* NetworkProcess/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* NetworkProcess/NetworkProcessCreationParameters.h:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PlatformMac.cmake:
* Shared/Cocoa/WebKit2InitializeCocoa.mm: Removed.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializer):
* Shared/WebKit2Initialize.cpp:
(WebKit::InitializeWebKit2):
* Shared/WebKit2Initialize.h:
(): Deleted.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* Shared/efl/WebKit2InitializeEFL.cpp: Removed.
* Shared/gtk/WebKit2InitializeGTK.cpp: Removed.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::ensureNetworkProcess):
(WebKit::WebProcessPool::createNewWebProcess):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::checkURL):
(TestWebKitAPI::checkRelativeURL):
(TestWebKitAPI::checkURLDifferences):
(TestWebKitAPI::checkRelativeURLDifferences):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212508 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years ago[WK2] Add additional test infrastructure and unit tests for data interaction
wenson_hsieh@apple.com [Fri, 17 Feb 2017 01:01:36 +0000 (01:01 +0000)]
[WK2] Add additional test infrastructure and unit tests for data interaction
https://bugs.webkit.org/show_bug.cgi?id=168439
<rdar://problem/30557942>

Reviewed by Tim Horton.

Source/WebKit2:

Adds two new _WKTestingDelegate protocol methods that are fired when a 'start data interaction' request has been
sent to the web process, and when a response has been received. See Tools/ChangeLog for more details.

* UIProcess/API/Cocoa/_WKTestingDelegate.h:

Tools:

Adds test support for additional data interaction scenarios that we currently cannot test, and also adds 7 new
test cases to DataInteractionTests. Most of the changes here refactor and augment DataInteractionSimulator to
support data interaction from  See per-method descriptions below for more details.

* Configurations/TestWebKitAPI.xcconfig:

Add MobileCoreServices to the list of additional frameworks to link against on iOS.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Add a new build phase that copies additional resources from WebKitAdditions/Resources/TestWebKitAPI and dumps
them into TestWebKitAPI.resources/ in the build directory, if the WebKitAdditions folder exists.

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm:
(-[TestWKWebView editorContainsImageElement]):
(-[TestWKWebView editorValue]):

New helper methods for querying information from the "editor" element in a test page.

(TestWebKitAPI::TEST):
(TestWebKitAPI::runTestsExpectingToObserveEvents): Deleted.

Moves logic for capturing events during a simulated data interaction run from the test file to
DataInteractionSimulator. See -[DataInteractionSimulator observedEventNames].

* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestMessageHandler removeMessage:]):
(-[TestWKWebView clearMessageHandlers:]):

Add the ability to clear message handlers from the TestWKWebView.

* TestWebKitAPI/ios/DataInteractionSimulator.h:
* TestWebKitAPI/ios/DataInteractionSimulator.mm:
(dataInteractionEventNames):
(-[DataInteractionSimulator initWithWebView:]):
(-[DataInteractionSimulator _resetSimulatedState]):

Moves logic to clear test harness state from any previous runs into a helper. Called at the beginning when
simulating data interaction.

(-[DataInteractionSimulator observedEventNames]):

Returns a list of the names of events relevant to data interaction that were observed over the course of the
most recent run.

(-[DataInteractionSimulator runFrom:to:]):

Changes -run to -runFrom:to:, which takes window-relative start and end locations. This allows the test harness
to run the same data interaction for multiple simulated gestures.

(-[DataInteractionSimulator _advanceProgress]):
(-[DataInteractionSimulator _finishDataInteraction]):
(-[DataInteractionSimulator externalItemProvider]):
(-[DataInteractionSimulator setExternalItemProvider:]):

Adds the -externalItemProvider property to DataInteractionSimulator. Setting this skips the gesture recognition
phase of a test run.

(-[DataInteractionSimulator webViewDidPerformDataInteractionControllerOperation:]):
(-[DataInteractionSimulator webView:beginDataInteractionWithSourceIndex:gestureRecognizer:]):
(-[DataInteractionSimulator webViewDidSendDataInteractionStartRequest:]):
(-[DataInteractionSimulator webView:didReceiveDataInteractionStartResponse:]):

While a request to start data interaction is in flight, put the remainder of the test on hold until the web
process returns. Then continue the test by scheduling a progress advance call. This addresses a race condition
wherein the the web process might take longer than usual to process the request to start data interaction, and
in the meantime, DataInteractionSimulator would end up completing the rest of the test before a response from
the web process is received, which then causes no simulated delegate methods to be fired.

(-[DataInteractionSimulator initWithWebView:startLocation:endLocation:]): Deleted.
(-[DataInteractionSimulator run]): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212507 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove unused test pages in TestWebKitAPI
wenson_hsieh@apple.com [Fri, 17 Feb 2017 00:51:37 +0000 (00:51 +0000)]
Remove unused test pages in TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=168462

Reviewed by Anders Carlsson.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKit2Cocoa/autofocus-contenteditable.html: Removed.
* TestWebKitAPI/Tests/WebKit2Cocoa/background-image-link-and-input.html: Removed.
* TestWebKitAPI/Tests/WebKit2Cocoa/image-and-contenteditable.html: Removed.
* TestWebKitAPI/Tests/WebKit2Cocoa/image-and-textarea.html: Removed.
* TestWebKitAPI/Tests/WebKit2Cocoa/link-and-input.html: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212487 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRebase tests after r212470
achristensen@apple.com [Fri, 17 Feb 2017 00:48:34 +0000 (00:48 +0000)]
Rebase tests after r212470
https://bugs.webkit.org/show_bug.cgi?id=168461

* fast/dom/DOMURL/set-href-attribute-protocol-expected.txt:
* fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt:
I updated the tests but not the results :(

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212486 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoBuild fixes.
andersca@apple.com [Fri, 17 Feb 2017 00:33:00 +0000 (00:33 +0000)]
Build fixes.

* page/gtk/EventHandlerGtk.cpp:
(WebCore::EventHandler::createDraggingDataTransfer):
* page/win/EventHandlerWin.cpp:
(WebCore::EventHandler::createDraggingDataTransfer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212485 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRemove EFL from WebCore
andersca@apple.com [Fri, 17 Feb 2017 00:20:47 +0000 (00:20 +0000)]
Remove EFL from WebCore
https://bugs.webkit.org/show_bug.cgi?id=168477

Reviewed by Brian Burg.

* accessibility/AccessibilityList.cpp:
(WebCore::AccessibilityList::childHasPseudoVisibleListItemMarkers):
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canSetValueAttribute):
* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::AccessibilityObject):
(WebCore::AccessibilityObject::textIteratorBehaviorForTextRange):
* accessibility/AccessibilityObject.h:
* accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::determineAccessibilityRole):
* accessibility/AccessibilityTableColumn.cpp:
(WebCore::AccessibilityTableColumn::computeAccessibilityIsIgnored):
* accessibility/AccessibilityTableHeaderContainer.cpp:
(WebCore::AccessibilityTableHeaderContainer::computeAccessibilityIsIgnored):
* crypto/CryptoKey.cpp:
* crypto/keys/CryptoKeyRSA.h:
* dom/Document.cpp:
(WebCore::Document::implicitClose):
* editing/Editor.cpp:
(WebCore::Editor::performCutOrCopy):
(WebCore::Editor::copyImage):
* editing/Editor.h:
* editing/FrameSelection.h:
* html/HTMLCanvasElement.cpp:
(WebCore::requiresAcceleratedCompositingForWebGL):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::port):
* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreScrollPositionAndViewState):
* loader/icon/IconDatabase.cpp:
(WebCore::IconDatabase::performURLImport):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::contextMenuItemSelected):
(WebCore::ContextMenuController::populate):
(WebCore::ContextMenuController::checkOrEnableIfNeeded):
* page/DragController.cpp:
(WebCore::DragController::startDrag):
* page/EventHandler.cpp:
(WebCore::EventHandler::eventInvertsTabsToLinksClientCallResult):
* page/FrameView.cpp:
(WebCore::FrameView::layout):
* platform/ContextMenuItem.h:
* platform/Cursor.h:
* platform/DragData.h:
* platform/DragImage.h:
* platform/FileSystem.h:
* platform/LocalizedStrings.h:
* platform/MIMETypeRegistry.cpp:
(WebCore::initializeSupportedImageMIMETypesForEncoding):
* platform/NotImplemented.h:
* platform/Pasteboard.h:
* platform/PlatformKeyboardEvent.h:
* platform/PlatformMouseEvent.h:
* platform/PlatformSpeechSynthesizer.h:
* platform/PlatformWheelEvent.h:
* platform/Widget.h:
* platform/graphics/ANGLEWebKitBridge.h:
* platform/graphics/BitmapImage.h:
* platform/graphics/GraphicsContext3D.h:
* platform/graphics/Icon.h:
* platform/graphics/Image.h:
(WebCore::Image::getEvasObject): Deleted.
* platform/graphics/IntPoint.h:
* platform/graphics/IntRect.h:
* platform/graphics/opengl/Extensions3DOpenGL.cpp:
(WebCore::Extensions3DOpenGL::createVertexArrayOES):
(WebCore::Extensions3DOpenGL::deleteVertexArrayOES):
(WebCore::Extensions3DOpenGL::isVertexArrayOES):
(WebCore::Extensions3DOpenGL::bindVertexArrayOES):
(WebCore::Extensions3DOpenGL::supportsExtension):
* platform/graphics/opengl/Extensions3DOpenGL.h:
* platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGL.cpp:
* platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
(WebCore::GraphicsContext3D::createForCurrentGLContext):
(WebCore::GraphicsContext3D::reshape):
(WebCore::GraphicsContext3D::createVertexArray):
(WebCore::GraphicsContext3D::deleteVertexArray):
(WebCore::GraphicsContext3D::isVertexArray):
(WebCore::GraphicsContext3D::bindVertexArray):
* platform/graphics/opengl/TemporaryOpenGLSetting.cpp:
* platform/network/NetworkStateNotifier.h:
* platform/posix/FileSystemPOSIX.cpp:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::ensureRootLayer):
* rendering/RenderText.cpp:
(WebCore::RenderText::previousOffsetForBackwardDeletion):
* xml/XSLStyleSheetLibxslt.cpp:
* xml/XSLTExtensions.cpp:
* xml/XSLTProcessorLibxslt.cpp:
* xml/XSLTUnicodeSort.cpp:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212484 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoASSERTION FAILED: vm.heap.mutatorState() == MutatorState::Running || vm.apiLock(...
keith_miller@apple.com [Fri, 17 Feb 2017 00:08:38 +0000 (00:08 +0000)]
ASSERTION FAILED: vm.heap.mutatorState() == MutatorState::Running || vm.apiLock().ownerThread() != std::this_thread::get_id()
https://bugs.webkit.org/show_bug.cgi?id=168354

Reviewed by Geoffrey Garen.

Instead of adding a custom vmEntryGlobalObject for the debugger
we can just have it use vmEntryScope instead.

* debugger/Debugger.cpp:
(JSC::Debugger::detach):
* interpreter/CallFrame.cpp:
(JSC::CallFrame::vmEntryGlobalObjectForDebuggerDetach): Deleted.
* interpreter/CallFrame.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212483 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoSimple line layout: Add forced line layout info to coverage print.
zalan@apple.com [Thu, 16 Feb 2017 23:58:34 +0000 (23:58 +0000)]
Simple line layout: Add forced line layout info to coverage print.
https://bugs.webkit.org/show_bug.cgi?id=168470

Reviewed by Simon Fraser.

This is about potential vs. actual coverage:

Simple line layout potential coverage: 65.05%
Simple line layout actual coverage: 46.60%
Forced line layout blocks: 4 content length: 57(18.45%)

Not testable.

* rendering/SimpleLineLayout.cpp:
(WebCore::SimpleLineLayout::printSimpleLineLayoutCoverage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212482 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoRename DataTransfer functions to indicate whether they are for dragging or dropping
andersca@apple.com [Thu, 16 Feb 2017 23:52:26 +0000 (23:52 +0000)]
Rename DataTransfer functions to indicate whether they are for dragging or dropping
https://bugs.webkit.org/show_bug.cgi?id=168478

Reviewed by Tim Horton.

* dom/DataTransfer.cpp:
(WebCore::DataTransfer::createForDrag):
(WebCore::DataTransfer::createForDrop):
(WebCore::DataTransfer::createForDragAndDrop): Deleted.
* dom/DataTransfer.h:
* page/DragController.cpp:
(WebCore::DragController::dragExited):
(WebCore::DragController::performDragOperation):
(WebCore::DragController::tryDHTMLDrag):
* page/mac/EventHandlerMac.mm:
(WebCore::EventHandler::createDraggingDataTransfer):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212481 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark media/modern-media-controls/airplay-button/airplay-button.html as flaky.
ryanhaddad@apple.com [Thu, 16 Feb 2017 23:48:50 +0000 (23:48 +0000)]
Mark media/modern-media-controls/airplay-button/airplay-button.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168409

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212480 268f45cc-cd09-0410-ab3c-d52691b4dbfc

2 years agoMark media/modern-media-controls/tracks-button/tracks-button.html as flaky.
ryanhaddad@apple.com [Thu, 16 Feb 2017 23:43:00 +0000 (23:43 +0000)]
Mark media/modern-media-controls/tracks-button/tracks-button.html as flaky.
https://bugs.webkit.org/show_bug.cgi?id=168476

Unreviewed test gardening.

* platform/mac-wk1/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@212479 268f45cc-cd09-0410-ab3c-d52691b4dbfc