WebKit-https.git
3 years ago[iOS] Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadi...
cdumez@apple.com [Mon, 17 Oct 2016 17:48:28 +0000 (17:48 +0000)]
[iOS] Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadiusInScreenCoordinates
https://bugs.webkit.org/show_bug.cgi?id=163547

Reviewed by Darin Adler.

Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadiusInScreenCoordinates
now that it is available in UIKit.

* Platform/spi/ios/UIKitSPI.h:
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::extractWebTouchPoint):

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

3 years agopreprocessor.pm: cl.exe outputs processing filenames if Windows Perl is used
commit-queue@webkit.org [Mon, 17 Oct 2016 17:32:18 +0000 (17:32 +0000)]
preprocessor.pm: cl.exe outputs processing filenames if Windows Perl is used
https://bugs.webkit.org/show_bug.cgi?id=163435

Patch by Fujii Hironori <Hironori.Fujii@sony.com> on 2016-10-17
Reviewed by Alex Christensen.

cl.exe outputs processing filenames to stderr. Suppress this
annoying messages by using open3 instead of open2.

* bindings/scripts/preprocessor.pm:
(applyPreprocessor): Use open3 in case of Windows Perl.

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

3 years agoUse the reject() helper function for conditionally throwing TypeErrors.
mark.lam@apple.com [Mon, 17 Oct 2016 16:59:06 +0000 (16:59 +0000)]
Use the reject() helper function for conditionally throwing TypeErrors.
https://bugs.webkit.org/show_bug.cgi?id=163491

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

In some places where we may conditionally throw a TypeError (e.g. when in strict
mode), we already use the reject() helper function to conditionally throw the
TypeError.  Doing so makes the code mode compact.  This patch applies this idiom
consistently in all places that throws TypeError where appropriate.

This patch also does the following:
1. Make the reject() helper function take an ASCIILiteral instead of a const char*
   because we always pass it a literal string anyway.
2. Change the reject helper() to take a ThrowScope&.  This allows the thrown
   error to be attributed to its caller.
3. When an error message string is instantiated repeatedly in more than 1 place,
   create a common copy of that literal string in JSObject.cpp (if one doesn't
   already exist) and use that common string in all those places.
4. Since I was auditing call sites of throwTypeError() to check if they should be
   using the reject() helper instead, I also fixed those up to pass the error
   message as an ASCIILiteral where appropriate.
5. In functions that I touched, change the code to not recompute the VM& when it
   is already available.

* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/ArrayPrototype.cpp:
(JSC::shift):
(JSC::unshift):
(JSC::arrayProtoFuncPop):
(JSC::arrayProtoFuncReverse):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/GetterSetter.cpp:
(JSC::callSetter):
* runtime/JSArray.cpp:
(JSC::JSArray::defineOwnProperty):
(JSC::JSArray::setLengthWithArrayStorage):
(JSC::JSArray::pop):
* runtime/JSArrayBuffer.cpp:
(JSC::JSArrayBuffer::put):
(JSC::JSArrayBuffer::defineOwnProperty):
* runtime/JSCJSValue.cpp:
(JSC::JSValue::putToPrimitive):
(JSC::JSValue::putToPrimitiveByIndex):
* runtime/JSDataView.cpp:
(JSC::JSDataView::put):
(JSC::JSDataView::defineOwnProperty):
* runtime/JSFunction.cpp:
(JSC::JSFunction::put):
(JSC::JSFunction::defineOwnProperty):
* runtime/JSGenericTypedArrayView.h:
(JSC::JSGenericTypedArrayView::setIndex):
* runtime/JSGenericTypedArrayViewInlines.h:
(JSC::JSGenericTypedArrayView<Adaptor>::defineOwnProperty):
(JSC::JSGenericTypedArrayView<Adaptor>::deleteProperty):
* runtime/JSGenericTypedArrayViewPrototypeFunctions.h:
(JSC::speciesConstruct):
(JSC::genericTypedArrayViewPrivateFuncSubarrayCreate):
* runtime/JSModuleNamespaceObject.cpp:
(JSC::JSModuleNamespaceObject::defineOwnProperty):
* runtime/JSObject.cpp:
(JSC::ordinarySetSlow):
(JSC::JSObject::putInlineSlow):
(JSC::JSObject::setPrototypeWithCycleCheck):
(JSC::JSObject::defineOwnIndexedProperty):
(JSC::JSObject::putByIndexBeyondVectorLengthWithArrayStorage):
(JSC::JSObject::putDirectIndexBeyondVectorLengthWithArrayStorage):
(JSC::validateAndApplyPropertyDescriptor):
* runtime/JSObject.h:
* runtime/JSObjectInlines.h:
(JSC::JSObject::putInline):
* runtime/JSProxy.cpp:
(JSC::JSProxy::setPrototype):
* runtime/JSSymbolTableObject.h:
(JSC::symbolTablePut):
* runtime/Lookup.h:
(JSC::putEntry):
* runtime/RegExpObject.cpp:
(JSC::RegExpObject::defineOwnProperty):
* runtime/RegExpObject.h:
(JSC::RegExpObject::setLastIndex):
* runtime/Reject.h:
(JSC::reject):
* runtime/SparseArrayValueMap.cpp:
(JSC::SparseArrayValueMap::putEntry):
(JSC::SparseArrayValueMap::putDirect):
(JSC::SparseArrayEntry::put):
* runtime/StringObject.cpp:
(JSC::StringObject::put):
(JSC::StringObject::putByIndex):
* runtime/SymbolConstructor.cpp:
(JSC::symbolConstructorKeyFor):

Source/WebCore:

No new tests because this patch does not introduce new behavior.

* bindings/js/JSCryptoAlgorithmDictionary.cpp:
(WebCore::createRsaKeyGenParams):
* bindings/js/JSIDBDatabaseCustom.cpp:
(WebCore::JSIDBDatabase::createObjectStore):
* bridge/c/c_instance.cpp:
(JSC::Bindings::CInstance::invokeMethod):

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

3 years agoRebaseline mathml/mathml-in-dashboard.html for mac.
ryanhaddad@apple.com [Mon, 17 Oct 2016 16:56:19 +0000 (16:56 +0000)]
Rebaseline mathml/mathml-in-dashboard.html for mac.

Unreviewed test gardening.

* platform/mac/mathml/mathml-in-dashboard-expected.txt: Added.

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

3 years ago[GTK] Several tests crashing on debug bot in (anonymous namespace)::MediaPlayerPrivat...
commit-queue@webkit.org [Mon, 17 Oct 2016 16:56:19 +0000 (16:56 +0000)]
[GTK] Several tests crashing on debug bot in (anonymous namespace)::MediaPlayerPrivateGStreamerBase::repaint
https://bugs.webkit.org/show_bug.cgi?id=163511

Patch by Miguel Gomez <magomez@igalia.com> on 2016-10-17
Reviewed by Carlos Garcia Campos.

Perform the video repaint in the main thread when accelerated compositing is disabled.

Covered by existent tests.

* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp:
(WebCore::MediaPlayerPrivateGStreamerBase::MediaPlayerPrivateGStreamerBase):
(WebCore::MediaPlayerPrivateGStreamerBase::repaint):
(WebCore::MediaPlayerPrivateGStreamerBase::triggerRepaint):
* platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h:

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

3 years agoAir::IRC needs to place all Tmps on some worklist, even if they have no interference...
fpizlo@apple.com [Mon, 17 Oct 2016 16:19:10 +0000 (16:19 +0000)]
Air::IRC needs to place all Tmps on some worklist, even if they have no interference edges
https://bugs.webkit.org/show_bug.cgi?id=163509

Reviewed by Mark Lam.

The worklist building function in IRC skips temporaries that have no degree. This doesn't appear
to be necessary. This has been there since the original IRC commit. It hasn't caused bugs because
ordinarily, the only way to have a tmp with no degree is to not have any mention of that tmp. But
while working on bug 163371, I hit a crazy corner case where a temporary would have no
interference edges (i.e. no degree). Here's how it happens:

A spill tmp from a previous iteration of IRC may have no degree: imagine a tmp that is live
everywhere and interferes with everyone, but has one use like:

Move %ourTmp, %someOtherTmp

Where there are no other tmps live.  After spill conversion, this may look like:

Move (ourSpill), %newTmp
Move %newTmp, %someOtherTmp

Of course, we'd rather not get this kind of spill code but it's totally possible because we now
have a bunch of random conditions under which we won't slap the spill address directly into the
Move.

After this happens, assuming that the only thing live was %someOtherTmp, we will have zero degree
for %newTmp because the Move is coalescable and does not contribute to interference.

Then, we might coalesce %someOtherTmp with %newTmp.  Once this happens, if we make the %newTmp be
the master, we're in deep trouble because %newTmp is not on any worklist.

I don't know how to reproduce this except through the patch in bug 163371. Removing the two lines
of code that skipped no-degree tmps causes no regressions, and resolves the problem I was having.

* b3/air/AirIteratedRegisterCoalescing.cpp:

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

3 years agoEleminate code duplication between ResourceRequest encoding/decoding implementations
annulen@yandex.ru [Mon, 17 Oct 2016 11:59:58 +0000 (11:59 +0000)]
Eleminate code duplication between ResourceRequest encoding/decoding implementations
https://bugs.webkit.org/show_bug.cgi?id=163507

Reviewed by Carlos Garcia Campos.

ResourceRequestBase::encodeWithoutPlatformData() and Soup implementation of
ArgumentCoder<ResourceRequest>::encodePlatformData() share most of the code,
ditto for decoding implementations.

Source/WebCore:

No new tests needed.

* platform/network/ResourceRequestBase.h:
(WebCore::ResourceRequestBase::encodeBase):
(WebCore::ResourceRequestBase::decodeBase):
(WebCore::ResourceRequestBase::encodeWithoutPlatformData):
(WebCore::ResourceRequestBase::decodeWithoutPlatformData):
* platform/network/soup/ResourceRequest.h:
(WebCore::ResourceRequest::encodeWithPlatformData):
(WebCore::ResourceRequest::decodeWithPlatformData):

Source/WebKit2:

* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

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

3 years agoMove user agent quirks to cross-platform location
mcatanzaro@igalia.com [Mon, 17 Oct 2016 11:30:17 +0000 (11:30 +0000)]
Move user agent quirks to cross-platform location
https://bugs.webkit.org/show_bug.cgi?id=163508

Reviewed by Carlos Garcia Campos.

Source/WebCore:

Tested by Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp.

* PlatformGTK.cmake:
* platform/UserAgent.h: Renamed from Source/WebCore/platform/gtk/UserAgentGtk.h.
* platform/UserAgentQuirks.cpp: Added. Moved from UserAgentGtk.cpp.
(WebCore::urlRequiresChromeBrowser): Sneakily tighten up Google domain detection, it should
only apply to sites if the base domain matches google.*, not any base domain that starts
with google.
(WebCore::urlRequiresMacintoshPlatform):
(WebCore::UserAgentQuirks::quirksForURL):
(WebCore::UserAgentQuirks::stringForQuirk):
* platform/UserAgentQuirks.h: Moved from UserAgentGtk.cpp. prepare-ChangeLog thinks it was
renamed from Source/WebCore/platform/efl/UserAgentEfl.h, but prepare-ChangeLog is dumb.
(WebCore::UserAgentQuirks::UserAgentQuirks):
(WebCore::UserAgentQuirks::add):
(WebCore::UserAgentQuirks::contains):
(WebCore::UserAgentQuirks::isEmpty):
* platform/efl/UserAgentEfl.cpp:
(WebCore::standardUserAgentForURL):
* platform/gtk/UserAgentGtk.cpp:
(WebCore::buildUserAgentString):
(WebCore::standardUserAgentForURL):
(): Deleted.
(WebCore::UserAgentQuirks::UserAgentQuirks): Deleted.
(WebCore::UserAgentQuirks::add): Deleted.
(WebCore::UserAgentQuirks::contains): Deleted.
(WebCore::UserAgentQuirks::isEmpty): Deleted.
(WebCore::urlRequiresChromeBrowser): Deleted.
(WebCore::urlRequiresMacintoshPlatform): Deleted.

Source/WebKit2:

#include <WebCore/UserAgent.h> instead of <WebCore/UserAgentGtk.h>.

* UIProcess/API/gtk/WebKitSettings.cpp:
* UIProcess/efl/WebPageProxyEfl.cpp:
* UIProcess/gtk/WebPageProxyGtk.cpp:
* WebProcess/WebPage/gtk/WebPageGtk.cpp:

Tools:

Move the test to a cross-platform location and improve it to better check the full list of
sites we have defined quirks for.

* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp: Renamed from Tools/TestWebKitAPI/Tests/WebCore/gtk/UserAgentQuirks.cpp.
(TestWebKitAPI::assertUserAgentForURLHasChromeBrowserQuirk):
(TestWebKitAPI::assertUserAgentForURLHasMacPlatformQuirk):
(TestWebKitAPI::TEST):

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

3 years ago[SOUP] Downloads should always sniff contents
carlosgc@webkit.org [Mon, 17 Oct 2016 10:52:02 +0000 (10:52 +0000)]
[SOUP] Downloads should always sniff contents
https://bugs.webkit.org/show_bug.cgi?id=163538

Reviewed by Michael Catanzaro.

Source/WebKit2:

It's quite common that downloads have weird filenames with no extension, so it would be better if the loader
sniff the contents to guess the mime type.

* NetworkProcess/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::startNetworkLoad): Pass true for shouldContentSniff parameter of ResourceHandle::create().

Tools:

Add a test case to check that the MIME type is correctly guessed for downloads.

* TestWebKitAPI/Tests/WebKit2Gtk/TestDownloads.cpp:
(writeNextChunk):
(serverCallback):
(testDownloadMIMEType):
(beforeAll):
(writeNextChunkIdle): Deleted.

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

3 years ago[GTK] Switch to use API::DownloadClient instead of the C API client
carlosgc@webkit.org [Mon, 17 Oct 2016 10:45:15 +0000 (10:45 +0000)]
[GTK] Switch to use API::DownloadClient instead of the C API client
https://bugs.webkit.org/show_bug.cgi?id=163537

Reviewed by Michael Catanzaro.

The code is simpler and we avoid all the toImpl/toAPI.

* UIProcess/API/gtk/WebKitDownloadClient.cpp:
(attachDownloadClientToContext):
(didStart):
(didReceiveResponse):
(didReceiveData):
(decideDestinationWithSuggestedFilename):
(didCreateDestination):
(didFail):
(didCancel):
(didFinish):

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

3 years ago[GTK] gobject-introspection on package build with webkit2gtk fails without active...
berto@igalia.com [Mon, 17 Oct 2016 09:06:17 +0000 (09:06 +0000)]
[GTK] gobject-introspection on package build with webkit2gtk fails without active X session
https://bugs.webkit.org/show_bug.cgi?id=163105

Reviewed by Carlos Garcia Campos.

Don't call XCompositeQueryExtension() or XDamageQueryExtension()
if m_display is NULL.

* platform/graphics/x11/PlatformDisplayX11.cpp:
(WebCore::PlatformDisplayX11::supportsXComposite):
(WebCore::PlatformDisplayX11::supportsXDamage):

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

3 years ago[css-grid] Disable CSS Grid Layout runtime flag by default
rego@igalia.com [Mon, 17 Oct 2016 07:23:07 +0000 (07:23 +0000)]
[css-grid] Disable CSS Grid Layout runtime flag by default
https://bugs.webkit.org/show_bug.cgi?id=163432

Reviewed by Darin Adler.

It was enabled in r201042, but now Safari Technology Preview
has a UI to switch runtime flags so it doesn't need to be enabled
by default anymore.

* Shared/WebPreferencesDefinitions.h: Disable grid layout runtime flag
by default.

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

3 years agoAX: [Mac] roleDescription for AXTextField input types
n_wang@apple.com [Mon, 17 Oct 2016 05:58:18 +0000 (05:58 +0000)]
AX: [Mac] roleDescription for AXTextField input types
https://bugs.webkit.org/show_bug.cgi?id=163419
<rdar://problem/28766192>

Reviewed by Darin Adler.

Source/WebCore:

Provided more detailed role description for input types that
exposed as standard text fields on the mac.

Changes are covered in modified test expectation.

* English.lproj/Localizable.strings:
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper roleDescription]):
* platform/LocalizedStrings.cpp:
(WebCore::AXEmailFieldText):
(WebCore::AXTelephoneFieldText):
(WebCore::AXURLFieldText):
(WebCore::AXDateFieldText):
(WebCore::AXTimeFieldText):
* platform/LocalizedStrings.h:
* platform/efl/LocalizedStringsEfl.cpp:
(WebCore::AXEmailFieldText):
(WebCore::AXTelephoneFieldText):
(WebCore::AXURLFieldText):
(WebCore::AXDateFieldText):
(WebCore::AXTimeFieldText):
* platform/gtk/LocalizedStringsGtk.cpp:
(WebCore::AXEmailFieldText):
(WebCore::AXTelephoneFieldText):
(WebCore::AXURLFieldText):
(WebCore::AXDateFieldText):
(WebCore::AXTimeFieldText):

LayoutTests:

* platform/mac/accessibility/roles-exposed-expected.txt:

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

3 years agoUnreviewed GTK test gardening
mcatanzaro@igalia.com [Mon, 17 Oct 2016 03:41:01 +0000 (03:41 +0000)]
Unreviewed GTK test gardening

* mathml/mathml-in-dashboard-expected.txt:
* platform/gtk/TestExpectations:

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

3 years agoFix Perl warning about masked variable following <http://trac.webkit.org/changeset...
dbates@webkit.org [Mon, 17 Oct 2016 03:03:23 +0000 (03:03 +0000)]
Fix Perl warning about masked variable following <trac.webkit.org/changeset/207382>
(https://bugs.webkit.org/show_bug.cgi?id=163456)

* Scripts/prepare-ChangeLog:
(actuallyGenerateFunctionLists):

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

3 years agoUpdate WebKit localizable strings
cdumez@apple.com [Mon, 17 Oct 2016 02:12:32 +0000 (02:12 +0000)]
Update WebKit localizable strings
https://bugs.webkit.org/show_bug.cgi?id=163513

Reviewed by Dan Bernstein.

Update WebKit localizable strings as it was missing the "too short" one needed
by form validation. This was causing a "Localized string not found" message to
be shown when testing the following sample on WebKit ToT:
- https://googlechrome.github.io/samples/report-validity/

* English.lproj/Localizable.strings:

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

3 years agoREGRESSION (r206750): Crash when pressing Caps Lock if “Use the Caps Lock key to...
cdumez@apple.com [Mon, 17 Oct 2016 01:28:51 +0000 (01:28 +0000)]
REGRESSION (r206750): Crash when pressing Caps Lock if “Use the Caps Lock key to switch to and from U.S.” is selected in Input Sources preferences
https://bugs.webkit.org/show_bug.cgi?id=163506
<rdar://problem/28792483>

Reviewed by Darin Adler.

As per the NSEvent documentation [1], calling [NSEvent characters] is only
valid on key up / key down events and will raise an NSInternalInconsistencyException
if accessed on any other kind of event object. The crash happens when keyForKeyEvent()
is called with the third kind of key event (NSFlagsChanged) which is used for
detecting modifier keys. We normally detect the modifier key and return early before
calling [NSEvent characters]. However, in some rare cases, we fail to detect the
modifier key and we fall through.

To address the issue, we now return "Unidentified" for NSFlagsChanged events, if we
fail to detect the modifier key and before calling [NSEvent characters].

[1] https://developer.apple.com/reference/appkit/nsevent/1534183-characters

No new test, not easily testable.

* platform/mac/PlatformEventFactoryMac.mm:
(WebCore::keyForKeyEvent):

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

3 years agoMove CSS classes from ExceptionCode to Exception
darin@apple.com [Mon, 17 Oct 2016 00:16:05 +0000 (00:16 +0000)]
Move CSS classes from ExceptionCode to Exception
https://bugs.webkit.org/show_bug.cgi?id=163494

Reviewed by Sam Weinig.

Source/WebCore:

Removed the "get" prefix from the names of many CSSPrimitiveValue
functions to match WebKit coding style and to disambiguate them
from the public CSS DOM functions that raise exceptions.

* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::propertyNamePrefix): Use enum class.
(WebCore::parseJavaScriptCSSPropertyName): Tweak style a bit.
(WebCore::stylePropertyGetter): Refactor to simplify structure.
(WebCore::stylePropertyGetterPixelOrPosPrefix): Ditto. Also use floatValue.
(WebCore::JSCSSStyleDeclaration::putDelegate): Use findIgnoringASCIICase,
and use propagateException to handle ExcpetionOr.
(WebCore::JSCSSStyleDeclaration::getPropertyCSSValue): Tweak style a bit.
(WebCore::JSCSSStyleDeclaration::getOwnPropertyNames): Use a lambda to
initialize a global here.

* bindings/js/JSDOMBinding.h: Added toJSString to support bindings for
functions returning ExceptionOr<String>.

* bindings/scripts/gobject-generate-headers.pl: Deleted.

* css/BasicShapeFunctions.cpp:
(WebCore::convertToLengthSize): Use pairValue.
(WebCore::convertToCenterCoordinate): Use valueID and pairValue.
(WebCore::cssValueToBasicShapeRadius): Ditto.
* css/CSSBasicShapes.cpp:
(WebCore::serializePositionOffset): Ditto.
(WebCore::buildSerializablePositionOffset): Ditto.
(WebCore::CSSBasicShapeCircle::cssText): Ditto.
(WebCore::CSSBasicShapeEllipse::cssText): Ditto.
(WebCore::updateCornerRadiusWidthAndHeight): Ditto.
* css/CSSBorderImageSliceValue.h: Use quadValue.
* css/CSSCalculationValue.cpp:
(WebCore::determineCategory): Use floatValue and doubleValue.

* css/CSSCharsetRule.h: Use ExceptionOr. Also made more things private.
* css/CSSCharsetRule.idl: Use non-legacy exceptions.

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::setCssText): Use ExceptionOr.
(WebCore::ComputedStyleExtractor::propertyMatches): Use valueID.
(WebCore::CSSComputedStyleDeclaration::setProperty): Use ExceptionOr.
(WebCore::CSSComputedStyleDeclaration::removeProperty): Ditto.
(WebCore::CSSComputedStyleDeclaration::setPropertyInternal): Ditto.
(WebCore::ComputedStyleExtractor::getBackgroundShorthandValue): Return
a Ref instead of a RefPtr.
* css/CSSComputedStyleDeclaration.h: Updated for above changes.

* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::fixedSize): Use floatValue.
(WebCore::CSSCrossfadeValue::image): Ditto.
(WebCore::CSSCrossfadeValue::blend): Use doubleValue.

* css/CSSFontFace.cpp:
(WebCore::CSSFontFace::calculateStyleMask): Use valueID.
(WebCore::CSSFontFace::calculateWeightMask): Ditto.
* css/CSSFontFaceSet.cpp:
(WebCore::CSSFontFaceSet::familyNameFromPrimitive): Ditto.
(WebCore::CSSFontFaceSet::matchingFaces): Use ExceptoinOr.
(WebCore::CSSFontFaceSet::check): Ditto.
* css/CSSFontFaceSet.h: Updated for above changes.

* css/CSSGradientValue.cpp:
(WebCore::compareStops): Use doubleValue.
(WebCore::CSSGradientValue::addStops): Use floatValue.
(WebCore::positionFromValue): Use floatValue and valudID.
(WebCore::CSSLinearGradientValue::customCSSText): Use doubleValue and valueID.
(WebCore::CSSLinearGradientValue::createGradient): Use floatValue and valueID.
(WebCore::CSSRadialGradientValue::customCSSText): Use doubleValue and valueID.
(WebCore::CSSRadialGradientValue::resolveRadius): Use floatValue.
(WebCore::CSSRadialGradientValue::createGradient): Use valueID.

* css/CSSGroupingRule.cpp:
(WebCore::CSSGroupingRule::insertRule): Use ExceptionOr.
(WebCore::CSSGroupingRule::deleteRule): Ditto.
* css/CSSGroupingRule.h: Updated for above changes.

* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::subimageIsPending): Use valueID.
(WebCore::CSSImageGeneratorValue::cachedImageForCSSValue): Ditto.

* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::fillImageSet): Use floatValue.

* css/CSSMediaRule.idl: Use non-legacy exceptions.

* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::computeDegrees): Use doubleValue.
(WebCore::CSSPrimitiveValue::setFloatValue): Use ExceptionOr.
(WebCore::CSSPrimitiveValue::getFloatValue): Replaced getDoubleValue with this,
since getDoubleValue is unused, moving the call to clampTo into this function.
Also changed this to use ExceptionOr.
(WebCore::CSSPrimitiveValue::doubleValue): Renamed from getDoubleValue.
(WebCore::CSSPrimitiveValue::doubleValueInternal): Use Optional instead of a bool
and an out argument to return the value and check for type failure.
(WebCore::CSSPrimitiveValue::setStringValue): Use ExceptionOr.
(WebCore::CSSPrimitiveValue::getStringValue): Ditto.
(WebCore::CSSPrimitiveValue::stringValue): Renamed from getStringValue.
(WebCore::CSSPrimitiveValue::getCounterValue): Use ExceptionOr.
(WebCore::CSSPrimitiveValue::getRectValue): Use ExceptionOr.
(WebCore::CSSPrimitiveValue::getQuadValue): Deleted.
(WebCore::CSSPrimitiveValue::getLengthRepeatValue): Deleted.
(WebCore::CSSPrimitiveValue::getRGBColorValue): Use ExceptionOr.
(WebCore::CSSPrimitiveValue::getPairValue): Deleted.
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText): Use new names for functions.
* css/CSSPrimitiveValue.h: Reorganized the class, moved large inline function bodies
out of the class definition. Updated for the above changes.
* css/CSSPrimitiveValue.idl: Use non-legacy exceptions.

* css/CSSPrimitiveValueMappings.h: Use value instead of getValue, etc.

* css/CSSRule.cpp:
(WebCore::CSSRule::setCssText): Use ExceptionOr.
* css/CSSRule.h: Updated for above change.
* css/CSSRule.idl: Use non-legacy exceptions.

* css/CSSStyleDeclaration.h: Use ExceptionOr.
* css/CSSStyleDeclaration.idl: Use non-legacy exceptions.

* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::deprecatedInsertRule): Use ExceptionOr.
(WebCore::CSSStyleSheet::insertRule): Ditto.
(WebCore::CSSStyleSheet::deleteRule): Ditto.
(WebCore::CSSStyleSheet::addRule): Ditto.
* css/CSSStyleSheet.h: Updated for the above changes.
* css/CSSStyleSheet.idl: Use non-legacy exceptions.

* css/CSSSupportsRule.idl: Use non-legacy exceptions.

* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapFillAttachment): Use valueID instead of getValueID, etc.
(WebCore::convertToLengthSize): Ditto.
(WebCore::CSSToStyleMap::mapFillSize): Ditto.
(WebCore::CSSToStyleMap::mapFillXPosition): Ditto.
(WebCore::CSSToStyleMap::mapFillYPosition): Ditto.
(WebCore::CSSToStyleMap::mapFillMaskSourceType): Ditto.
(WebCore::CSSToStyleMap::mapAnimationDirection): Ditto.
(WebCore::CSSToStyleMap::mapAnimationFillMode): Ditto.
(WebCore::CSSToStyleMap::mapAnimationIterationCount): Ditto.
(WebCore::CSSToStyleMap::mapAnimationName): Ditto.
(WebCore::CSSToStyleMap::mapAnimationPlayState): Ditto.
(WebCore::CSSToStyleMap::mapAnimationProperty): Ditto.
(WebCore::CSSToStyleMap::mapAnimationTimingFunction): Ditto.
(WebCore::CSSToStyleMap::mapAnimationTrigger): Ditto.
(WebCore::CSSToStyleMap::mapNinePieceImageSlice): Ditto.
(WebCore::CSSToStyleMap::mapNinePieceImageQuad): Ditto.
(WebCore::CSSToStyleMap::mapNinePieceImageRepeat): Ditto.

* css/CSSValue.h: Use ExceptionOr.
* css/CSSValue.idl: Use non-legacy exceptions.

* css/Counter.h: Use stringValue instead of getStringValue, etc.

* css/FontFace.cpp:
(WebCore::FontFace::create): Use ExceptionOr.
(WebCore::FontFace::setFamily): Ditto.
(WebCore::FontFace::setStyle): Ditto.
(WebCore::FontFace::setWeight): Ditto.
(WebCore::FontFace::setStretch): Ditto.
(WebCore::FontFace::setUnicodeRange): Ditto.
(WebCore::FontFace::setVariant): Ditto.
(WebCore::FontFace::setFeatureSettings): Ditto.
* css/FontFace.h: Updated for above changes.
* css/FontFace.idl: Use non-legacy exceptions.

* css/FontFaceSet.cpp:
(WebCore::FontFaceSet::load): Use ExceptionOr.
(WebCore::FontFaceSet::check): Ditto.
* css/FontFaceSet.h: Updated for above changes.
* css/FontFaceSet.idl: Use non-legacy exceptions.

* css/FontVariantBuilder.cpp:
(WebCore::extractFontVariantLigatures): Use valueID instead of getValueID, etc.
(WebCore::extractFontVariantNumeric): Ditto.
(WebCore::extractFontVariantEastAsian): Ditto.

* css/MediaList.cpp:
(WebCore::MediaList::setMediaText): Use ExceptionOr.
(WebCore::MediaList::deleteMedium): Ditto.
(WebCore::MediaList::appendMedium): Ditto.
* css/MediaList.h: Updated for above changes.
* css/MediaList.idl: Use non-legacy exceptions.

* css/MediaQueryEvaluator.cpp:
(WebCore::doubleValue): Use valueID instead of getValueID, etc.
(WebCore::colorGamutEvaluate): Ditto.
(WebCore::invertedColorsEvaluate): Ditto.
(WebCore::orientationEvaluate): Ditto.
(WebCore::evaluateResolution): Ditto.
(WebCore::computeLength): Ditto.
(WebCore::viewModeEvaluate): Ditto.
(WebCore::hoverEvaluate): Ditto.
(WebCore::pointerEvaluate): Ditto.
(WebCore::prefersReducedMotionEvaluate): Ditto.

* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::setCssText): Use ExceptionOr.
(WebCore::PropertySetCSSStyleDeclaration::setProperty): Ditto.
(WebCore::PropertySetCSSStyleDeclaration::removeProperty): Ditto.
(WebCore::PropertySetCSSStyleDeclaration::getPropertyCSSValueInternal): Ditto.
(WebCore::PropertySetCSSStyleDeclaration::setPropertyInternal): Ditto.
* css/PropertySetCSSStyleDeclaration.h: Updated for above changes.
Also marked a couple additional functions private.

* css/StyleBuilderConverter.h: Use doubleValue instead of getDoubleValue, etc.
* css/StyleBuilderCustom.h: Ditto.
* css/StyleProperties.cpp:
(WebCore::StyleProperties::getLayeredShorthandValue): Ditto.
* css/StyleResolver.cpp:
(WebCore::StyleResolver::MatchResult::addMatchedProperties): Ditto.
(WebCore::StyleResolver::colorFromPrimitiveValueIsDerivedFromElement): Ditto.
(WebCore::StyleResolver::colorFromPrimitiveValue): Ditto.
(WebCore::StyleResolver::createFilterOperations): Ditto.
* css/TransformFunctions.cpp:
(WebCore::transformsForValue): Ditto.
* css/ViewportStyleResolver.cpp:
(WebCore::ViewportStyleResolver::getViewportArgumentValue): Ditto.

* css/WebKitCSSMatrix.cpp:
(WebCore::WebKitCSSMatrix::WebKitCSSMatrix): Tweaked constructors a bit,
getting rid of the one that uses an ExceptionCode.
(WebCore::WebKitCSSMatrix::create): Moved in here, and use ExceptionOr.
(WebCore::WebKitCSSMatrix::setMatrixValue): Use ExceptionOr.
(WebCore::WebKitCSSMatrix::multiply): Tweak coding style a bit.
(WebCore::WebKitCSSMatrix::inverse): Use ExceptionOr.
(WebCore::WebKitCSSMatrix::translate): Return a Ref instead of RefPtr.
(WebCore::WebKitCSSMatrix::scale): Ditto.
(WebCore::WebKitCSSMatrix::rotate): Ditto.
(WebCore::WebKitCSSMatrix::rotateAxisAngle): Ditto.
(WebCore::WebKitCSSMatrix::skewX): Ditto.
(WebCore::WebKitCSSMatrix::skewY): Ditto.
(WebCore::WebKitCSSMatrix::toString): Tweaked formatting a bit.
* css/WebKitCSSMatrix.h: Updated for above changes.
* css/WebKitCSSMatrix.idl: Use non-legacy extensions.

* css/makeprop.pl:
(handleCurrentColorValue): Use valueID instead of getValueID.
(generateValueSetter): Ditto.

* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parse4ValuesFillPosition): Use valueID instead of getValueID, etc.
(WebCore::CSSParser::parse3ValuesFillPosition): Ditto.
(WebCore::CSSParser::parseFillPosition): Ditto.
(WebCore::CSSParser::parseFillRepeat): Ditto.
(WebCore::CSSParser::parseGridPosition): Ditto.
(WebCore::CSSParser::parseGridTemplateRowsAndAreasAndColumns): Ditto.
(WebCore::isGridTrackFixedSized): Ditto.
(WebCore::CSSParser::parseRadialGradient): Ditto.
(WebCore::CSSParser::parseBuiltinFilterArguments): Ditto.

* css/parser/CSSParserValues.cpp:
(WebCore::CSSParserValue::createCSSValue): Removed the unneeded call to
setPrimitiveType here. The createParserOperator returns an object that
already has the correct primitive type.

* css/parser/CSSPropertyParser.cpp: Updated most cases of calling the old
getXXXValue functions, but not sure if it's right since it is commented out
code that I did not compile.

* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::clampRGBComponent): Use intValue instead of getIntValue, etc.
(WebCore::CSSPropertyParserHelpers::parseHSLParameters): Ditto.
(WebCore::CSSPropertyParserHelpers::isHorizontalPositionKeywordOnly): Ditto.
(WebCore::CSSPropertyParserHelpers::isVerticalPositionKeywordOnly): Ditto.
(WebCore::CSSPropertyParserHelpers::positionFromThreeOrFourValues): Ditto.
(WebCore::CSSPropertyParserHelpers::consumeRadialGradient): Ditto.

* dom/Range.cpp: Added now-needed include of ExceptionCode.h.
* dom/SelectorQuery.cpp: Ditto.

* editing/ApplyStyleCommand.cpp:
(WebCore::toIdentifier): Use valueID instead of getValueID, etc.
(WebCore::ApplyStyleCommand::computedFontSize): Ditto.
* editing/EditingStyle.cpp:
(WebCore::identifierForStyleProperty): Ditto.
(WebCore::HTMLElementEquivalent::valueIsPresentInStyle): Ditto.
(WebCore::EditingStyle::extractFontSizeDelta): Ditto.
(WebCore::EditingStyle::textDirection): Ditto.
(WebCore::EditingStyle::prepareToApplyAt): Ditto.
(WebCore::EditingStyle::textDirectionForSelection): Ditto.
(WebCore::fontWeightIsBold): Ditto.
(WebCore::legacyFontSizeFromCSSValue): Ditto.
(WebCore::isTransparentColorValue): Ditto.
(WebCore::hasTransparentBackgroundColor): Ditto.
(WebCore::backgroundColorInEffect): Ditto.

* editing/Editor.cpp:
(WebCore::Editor::applyEditingStyleToElement): Removed IGNORE_EXCEPTION; that is
what we do by default for things returning ExceptionOr.
* editing/RemoveCSSPropertyCommand.cpp:
(WebCore::RemoveCSSPropertyCommand::doApply): Ditto.
(WebCore::RemoveCSSPropertyCommand::doUnapply): Ditto.
* editing/ReplaceSelectionCommand.cpp:
(WebCore::ReplaceSelectionCommand::removeRedundantStylesAndKeepStyleSpanInline): Ditto.

* editing/cocoa/HTMLConverter.mm:
(floatValueFromPrimitiveValue): Use floatValue instead of getFloatValue, etc.
* editing/markup.cpp:
(WebCore::propertyMissingOrEqualToNone): Ditto.

* inspector/InspectorStyleSheet.cpp:
(WebCore::InspectorStyleSheet::addRule): Updated to call ExceptionOr-returning functions.
(WebCore::InspectorStyleSheet::deleteRule): Ditto.
(WebCore::InspectorStyleSheet::setStyleText): Ditto.

* svg/SVGLength.cpp:
(WebCore::SVGLength::fromCSSPrimitiveValue): Use floatValue instead of getFloatValue.

Source/WebKit/mac:

* DOM/DOMCSSMediaRule.mm:
(-[DOMCSSMediaRule insertRule:index:]): Use raiseOnDOMError
the new way to handle ExceptionOr instead of ExceptionCode.
(-[DOMCSSMediaRule deleteRule:]): Ditto.
* DOM/DOMCSSPrimitiveValue.mm:
(-[DOMCSSPrimitiveValue setFloatValue:floatValue:]): Ditto.
(-[DOMCSSPrimitiveValue getFloatValue:]): Ditto.
(-[DOMCSSPrimitiveValue setStringValue:stringValue:]): Ditto.
(-[DOMCSSPrimitiveValue getStringValue]): Ditto.
(-[DOMCSSPrimitiveValue getCounterValue]): Ditto.
(-[DOMCSSPrimitiveValue getRectValue]): Ditto.
(-[DOMCSSPrimitiveValue getRGBColorValue]): Ditto.
* DOM/DOMCSSRule.mm:
(-[DOMCSSRule setCssText:]): Ditto.
* DOM/DOMCSSStyleDeclaration.mm:
(-[DOMCSSStyleDeclaration setCssText:]): Ditto.
(-[DOMCSSStyleDeclaration removeProperty:]): Ditto.
(-[DOMCSSStyleDeclaration setProperty:value:priority:]): Ditto.
* DOM/DOMCSSStyleSheet.mm:
(-[DOMCSSStyleSheet insertRule:index:]): Ditto.
(-[DOMCSSStyleSheet deleteRule:]): Ditto.
(-[DOMCSSStyleSheet addRule:style:index:]): Ditto.
(-[DOMCSSStyleSheet removeRule:]): Ditto.
* DOM/DOMCSSValue.mm:
(-[DOMCSSValue setCssText:]): Ditto.
* DOM/DOMMediaList.mm:
(-[DOMMediaList setMediaText:]): Ditto.
(-[DOMMediaList deleteMedium:]): Ditto.
(-[DOMMediaList appendMedium:]): Ditto.

* DOM/ExceptionHandlers.h: Added an overload of raiseDOMException
that works with a WebCore::Exception&& and overloads of
raiseOnDOMError that work with WebCore::ExceptionOr&&.
* DOM/ExceptionHandlers.mm:
(raiseDOMException): Implemented the new version.

Source/WebKit/win:

* DOMCSSClasses.cpp:
(DOMCSSStyleDeclaration::setCssText): Remove ExceptionCode handling.
(DOMCSSStyleDeclaration::setProperty): Ditto.

Source/WebKit2:

* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSRule.cpp:
(webkit_dom_css_rule_set_css_text): Updated for ExceptionOr.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleDeclaration.cpp:
(webkit_dom_css_style_declaration_remove_property): Ditto.
(webkit_dom_css_style_declaration_set_property): Ditto.
(webkit_dom_css_style_declaration_set_css_text): Ditto.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSStyleSheet.cpp:
(webkit_dom_css_style_sheet_insert_rule): Ditto.
(webkit_dom_css_style_sheet_delete_rule): Ditto.
(webkit_dom_css_style_sheet_add_rule): Ditto.
(webkit_dom_css_style_sheet_remove_rule): Ditto.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMCSSValue.cpp:
(webkit_dom_css_value_set_css_text): Ditto.
* WebProcess/InjectedBundle/API/gtk/DOM/WebKitDOMMediaList.cpp:
(webkit_dom_media_list_delete_medium): Ditto.
(webkit_dom_media_list_append_medium): Ditto.
(webkit_dom_media_list_set_media_text): Ditto.

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

3 years ago[Modern Media Controls] Styles for StartButton are missing
commit-queue@webkit.org [Sun, 16 Oct 2016 22:11:41 +0000 (22:11 +0000)]
[Modern Media Controls] Styles for StartButton are missing
https://bugs.webkit.org/show_bug.cgi?id=163499
<rdar://problem/28792009>

Patch by Antoine Quint <graouts@apple.com> on 2016-10-16
Reviewed by Darin Adler.

Source/WebCore:

Add styling for StartButton so that instances are always displayed in the center of their container.

Test: media/modern-media-controls/start-button/start-button-styles.html

* Modules/modern-media-controls/controls/start-button.css: Added.
(button.start):
(button.start > *):
(button.start > div):
(button.start > img):
(button.start:active > img):

LayoutTests:

New test checking StartButton instances have the right CSS styles applied to their DOM structure.

* media/modern-media-controls/start-button/start-button-styles-expected.txt: Added.
* media/modern-media-controls/start-button/start-button-styles.html: Added.

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

3 years agoImplement serializer = { attribute }
simon.fraser@apple.com [Sun, 16 Oct 2016 18:59:31 +0000 (18:59 +0000)]
Implement serializer = { attribute }
https://bugs.webkit.org/show_bug.cgi?id=163466

Follow-up fix to die if "serializer {...}" lists an attribute not present
on the interface. I don't think this is testable with the current bindings tests.

* bindings/scripts/CodeGeneratorJS.pm:
(GenerateSerializerFunction):

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

3 years agoAdd the "Geometry Interfaces" to features.json.
simon.fraser@apple.com [Sun, 16 Oct 2016 18:47:05 +0000 (18:47 +0000)]
Add the "Geometry Interfaces" to features.json.

* features.json:

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

3 years ago[EFL] Meter tests have been failed since r207280
gyuyoung.kim@webkit.org [Sun, 16 Oct 2016 14:30:37 +0000 (14:30 +0000)]
[EFL] Meter tests have been failed since r207280

Unreviewed EFL gardening. And add new baseline for meter-element.html.

* platform/efl/TestExpectations: Mark 2 tests to failure.
* platform/efl/fast/dom/HTMLMeterElement/meter-element-expected.txt: Added.

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

3 years ago[GTK] Default WebKitWebsiteDataManager is always leaked in WebKitWebContext
carlosgc@webkit.org [Sun, 16 Oct 2016 09:31:13 +0000 (09:31 +0000)]
[GTK] Default WebKitWebsiteDataManager is always leaked in WebKitWebContext
https://bugs.webkit.org/show_bug.cgi?id=163443

Reviewed by Michael Catanzaro.

Adopt the reference returned by webkitWebsiteDataManagerCreate().

* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextConstructed):

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

3 years agoUnreviewed. Fix GTK+ unit test /webkit2/WebKitWebContext/languages after r206949.
carlosgc@webkit.org [Sun, 16 Oct 2016 09:27:44 +0000 (09:27 +0000)]
Unreviewed. Fix GTK+ unit test /webkit2/WebKitWebContext/languages after r206949.

After r206949 navigator.language returns en-US instead of en-us. Language tags in Accept-Language header are
actually case-insensitive, so we should actually do case-insensitive comparisons, but we only have
g_assert_cmpstr for tests.

* TestWebKitAPI/Tests/WebKit2Gtk/TestWebKitWebContext.cpp:
(testWebContextLanguages):

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

3 years ago[GTK] WebKitWebPage URI not updated after URI is modified by InjectedBundlePageResour...
carlosgc@webkit.org [Sun, 16 Oct 2016 09:11:18 +0000 (09:11 +0000)]
[GTK] WebKitWebPage URI not updated after URI is modified by InjectedBundlePageResourceLoadClient::willSendRequestForFrame
https://bugs.webkit.org/show_bug.cgi?id=163389

Reviewed by Michael Catanzaro.

Source/WebKit2:

Update the page URI also when the load is committed.

* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(getDocumentLoaderURL):
(didStartProvisionalLoadForFrame):
(didReceiveServerRedirectForProvisionalLoadForFrame):
(didCommitLoadForFrame):
(webkitWebPageCreate):
(getProvisionalURLForFrame): Deleted.

Tools:

Update /webkit2/WebKitWebPage/get-uri test to check that web view and page uri always match even when request is
modified by WebKitWebPage::send-request signal.

* TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp:
(testWebPageURI):

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

3 years agoDocument request not updated after willSendRequest is called for a redirect
carlosgc@webkit.org [Sun, 16 Oct 2016 08:35:18 +0000 (08:35 +0000)]
Document request not updated after willSendRequest is called for a redirect
https://bugs.webkit.org/show_bug.cgi?id=163436

Reviewed by Michael Catanzaro.

Source/WebCore:

The first willSendRequest happens before DocumentLoader::startLoadingMainResource(), that calls setRequest, but
the second one happens after DocumentLoader::redirectReceived() and then the request is never updated again.

Covered by GTK+ unit tests.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willContinueMainResourceLoadAfterRedirect): Set the new request.
* loader/DocumentLoader.h:
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequestInternal): Notify the document loader when loading the main resource
and called for a redirection.

Tools:

Update /webkit2/WebKitWebView/active-uri test to check the active URI also when modified by
WebKitPage::send-request signal in a web extension.

* TestWebKitAPI/Tests/WebKit2Gtk/TestLoaderClient.cpp:
(testWebViewActiveURI):
(serverCallback):
* TestWebKitAPI/Tests/WebKit2Gtk/WebExtensionTest.cpp:
(sendRequestCallback):
* TestWebKitAPI/gtk/WebKit2Gtk/LoadTrackingTest.cpp:
(loadChangedCallback):

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

3 years agoAdd a $vm.getpid() method.
mark.lam@apple.com [Sun, 16 Oct 2016 01:44:18 +0000 (01:44 +0000)]
Add a $vm.getpid() method.
https://bugs.webkit.org/show_bug.cgi?id=163493

Reviewed by Saam Barati.

This is especially useful when we need to know the pid of an instance of jsc in
the foreground that we're trying to attach a debugger to while the JSC tests are
running in the background with a gazillion other jsc processes live at the same
time.

Currently, $vm.getpid() is only supported on non-Windows platforms.
According to https://msdn.microsoft.com/en-us/library/ms235372.aspx, getpid() is
deprecated.  According to https://msdn.microsoft.com/en-us/library/t2y34y40.aspx,
_getpid() cannot be used in applications that execute in the Windows Runtime.

Since this is only a debugging tool and is not a required feature, I'll defer
the Windows implementation of this function till the time when someone actually
needs it.

* tools/JSDollarVMPrototype.cpp:
(JSC::functionGetPID):
(JSC::JSDollarVMPrototype::finishCreation):

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

3 years agoDelete the animated image catchup code
commit-queue@webkit.org [Sun, 16 Oct 2016 00:19:22 +0000 (00:19 +0000)]
Delete the animated image catchup code
https://bugs.webkit.org/show_bug.cgi?id=163410

Patch by Said Abou-Hallawa <sabouhallawa@apple.com> on 2016-10-15
Reviewed by Simon Fraser.

Source/WebCore:

This patch fixes two issues in the animated image workflow:

1) Setting the animation timer should follow the following rules:

    -- Initial case: Which happens before drawing the first frame. We
    should set the timer to fire after the current_frame_duration.

    -- Late case (Slow animation): This happens if the current_time is
    past the next_frame_desired_time. In this case we should fire the
    timer immediately.

    -- Early case (Fast animation): This happens when there is still time
    before the next_frame_desired_time. In this case we should set the
    timer to fire after the difference between the next_frame_desired_time
    and the current_time.

2) Deleting the code for catching up the current_frame:

    This code used to run in the slow animation case. It was never used
    on iOS. It was trying to adjust the current_frame according to the
    current_time as if there were no delay. It turned out that this might
    cause a bigger delay because most likely the decoder decodes the image
    frames incrementally; i.e. to decode frame k, it has to have frame
    (k - 1) decoded.

Test: fast/images/ordered-animated-image-frames.html

* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::draw): Remove the iOS specific code.
(WebCore::BitmapImage::startAnimation): Move the animation finishing code from
BitmapImage::internalAdvanceAnimation() to this function. Simplify the timer
duration code as it is described above.

(WebCore::BitmapImage::advanceAnimation): Merge BitmapImage::internalAdvanceAnimation()
into this function.

(WebCore::BitmapImage::resetAnimation):

(WebCore::BitmapImage::internalAdvanceAnimation): Deleted.
* platform/graphics/BitmapImage.h:

* platform/graphics/Image.cpp:
(WebCore::Image::drawTiled):
* platform/graphics/Image.h:
(WebCore::Image::startAnimation):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::startAnimation):
* svg/graphics/SVGImage.h:
Remove the catchup code form the Image and SVGImage classes.

LayoutTests:

This animated gif has one red frame, one green frame and two red frames.
The test page renders only two frames from this this image on a canvas. The
test passes if the second frame (the green one) is rendered on the canvas
even if drawImage() is called after the duration of the first frame.

* fast/images/ordered-animated-image-frames-expected.html: Added.
* fast/images/ordered-animated-image-frames.html: Added.
* fast/images/resources/animated-red-green-blue.gif: Added.

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

3 years agoREGRESSION (r191699): Contextual menu in Mail compose view doesn’t include any of...
mitz@apple.com [Sat, 15 Oct 2016 23:53:20 +0000 (23:53 +0000)]
REGRESSION (r191699): Contextual menu in Mail compose view doesn’t include any of the standard submenus
https://bugs.webkit.org/show_bug.cgi?id=163492
<rdar://problem/28654799>

Reviewed by Darin Adler.

Source/WebKit/mac:

Test: TestWebKitAPI/Tests/mac/ContextMenuDefaultItemsHaveTags.mm

* WebView/WebHTMLView.mm:
(createMenuItem): Set the tag for items that have submenus as well.

Tools:

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/ContextMenuDefaultItemsHaveTags.mm: Added.
(-[ContextMenuDefaultItemsHaveTagsDelegate webView:didFinishLoadForFrame:]):
(TestWebKitAPI::TEST):

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

3 years agoMove Web SQL database and WebSockets off legacy exceptions
darin@apple.com [Sat, 15 Oct 2016 23:23:33 +0000 (23:23 +0000)]
Move Web SQL database and WebSockets off legacy exceptions
https://bugs.webkit.org/show_bug.cgi?id=163284

Reviewed by Chris Dumez.

* Modules/webdatabase/DOMWindowWebDatabase.cpp:
(WebCore::DOMWindowWebDatabase::openDatabase): Use ExceptionOr.
* Modules/webdatabase/DOMWindowWebDatabase.h: Update for above.
* Modules/webdatabase/DOMWindowWebDatabase.idl: Ditto.

* Modules/webdatabase/SQLResultSet.cpp:
(WebCore::SQLResultSet::SQLResultSet): Move initialization of
many data members into the class definition.
(WebCore::SQLResultSet::insertId): Use ExceptionOr.
(WebCore::SQLResultSet::rowsAffected): Moved into class definition.
(WebCore::SQLResultSet::rows): Ditto.
(WebCore::SQLResultSet::setInsertId): Ditto.
(WebCore::SQLResultSet::setRowsAffected): Ditto.

* Modules/webdatabase/SQLResultSet.h: Updated for above.

* Modules/webdatabase/SQLResultSet.idl: Use non-legacy exceptions.
Added a FIXME about the mismatch between long and int64_t.

* Modules/webdatabase/SQLStatement.cpp:
(WebCore::SQLStatement::execute): Use reference instead of pointer.

* Modules/websockets/WebSocket.cpp:
(WebCore::isValidProtocolString): Use StringView.
(WebCore::WebSocket::subprotocolSeparator): Fixed capitalization and
spelling error in the name of this function.
(WebCore::WebSocket::WebSocket): Move initialization of many data
members into the class definition.
(WebCore::WebSocket::create): Use ExceptionOr.
(WebCore::WebSocket::connect): Ditto.
(WebCore::WebSocket::send): Ditto.
(WebCore::WebSocket::close): Ditto.
(WebCore::WebSocket::binaryType): Update to use enum class.
(WebCore::WebSocket::setBinaryType): Use ExecptionOr and update to
use enum class.
(WebCore::WebSocket::didReceiveBinaryData): Ditto.

* Modules/websockets/WebSocket.h: Updated for above. Changed the
BinaryType enum into an enum class.

* Modules/websockets/WebSocket.idl: Use non-legacy exceptions.

* Modules/websockets/WebSocketHandshake.cpp:
(WebCore::WebSocketHandshake::checkResponseHeaders):
Updated for name change to subprotocolSeparator.

* dom/ExceptionOr.h: Added a constructor for scalar types that does not
require an rvalue reference. We can refine this more later, but for now
this is sufficient to obviate the need for WTFMove where it otherwise would
have been needed in the code above.

* inspector/InspectorDatabaseAgent.cpp: Use reference instead of pointer.

* page/DOMWindow.idl: Touched this file to work around bugs in the dependency
analysis of the current CMake build system, since otherwise it doesn't process the
change to the partial interface WebSocket. Edited lots of comments, removed many
others, and tweaked formatting.

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

3 years agoTest that duplicate axis values in font-variation-settings are resolved correctly
mmaxfield@apple.com [Sat, 15 Oct 2016 23:21:32 +0000 (23:21 +0000)]
Test that duplicate axis values in font-variation-settings are resolved correctly
https://bugs.webkit.org/show_bug.cgi?id=163489

Reviewed by Darin Adler.

* fast/text/variations/duplicate-axis-expected.html: Added.
* fast/text/variations/duplicate-axis.html: Added.

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

3 years agoprepare-ChangeLog erroneously said that a python __init__ method was deleted
dbates@webkit.org [Sat, 15 Oct 2016 22:04:08 +0000 (22:04 +0000)]
prepare-ChangeLog erroneously said that a python __init__ method was deleted
https://bugs.webkit.org/show_bug.cgi?id=163456

Reviewed by Simon Fraser.

Fixes an issue where prepare-ChangeLog may list as deleted functions that are
immediately above added code.

Currently prepare-ChangeLog makes use of the same overlap detection algorithm
to compute the list of deleted functions as it does to compute added and modified
functions. We consider a function deleted if its entire function body and signature
are removed. It is sufficient to compare the list of functions before the patch
is applied and the list of functions are the patch is applied to identify
these functions.

* Scripts/prepare-ChangeLog: Fix some style nits, including using Camel Case for
variable names.
(actuallyGenerateFunctionLists): Modified to call computeModifiedFunctions(). Always
compute the list of functions in the file after the patch regardless of whether the
patch only contains deletions. We will compare this list against the list of functions
before the patch was applied to determine the deleted functions.
(computeModifiedFunctions): Renamed; formerly named generateFunctionListsByRanges.
Removed out argument for the seen functions as we no longer make use of when computing
the list of deleted functions.
(diffCommand): Update comment.
(generateFunctionListsByRanges): Deleted.
* Scripts/webkitperl/prepare-ChangeLog_unittest/generateFunctionLists.pl: Added more unit tests.

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

3 years agoMessageEvent's source property should be a (DOMWindow or MessagePort)? rather than...
weinig@apple.com [Sat, 15 Oct 2016 21:52:09 +0000 (21:52 +0000)]
MessageEvent's source property should be a (DOMWindow or MessagePort)? rather than a EventTarget?
https://bugs.webkit.org/show_bug.cgi?id=163475

Reviewed by Simon Fraser.

Source/WebCore:

Start fleshing out union support, starting with MessageEvent.
- Simplify things a bit for now by requiring interface types to use RefPtr<T> as their type when
  used in sequences and unions. We should revisit this later, and see if we can use Ref<T> where
  possible, but it causes complications for dictionaries, since they want a Ref<T> uninitialized.

* bindings/generic/IDLTypes.h:
Switch IDLInterface to use RefPtr<T> as its implementation type.

* bindings/js/JSDOMConvert.h:
(WebCore::Detail::VariadicConverterBase::convert):
- Remove isJSDOMWrapperType() optimization. It was not correct, due to not being able to detect window
  and window shell, and not always an optimization, e.g. in the case of a single interface.
- Switch from JSC::jsDynamicCast<WrapperType*>() to WrapperType::toWrapped() which can be faster and
  handles window and window shell correctly.
- Also fix an issue where we would wrongly assert that one interface had to match.

* bindings/js/JSDOMWrapper.h:
(WebCore::isJSDOMWrapperType): Deleted.
Remove unused predicate.

* bindings/scripts/IDLParser.pm:
(parseType):
Add missing support for nullable unions.

* bindings/scripts/test/JS/JSTestObj.cpp:
* bindings/scripts/test/TestObj.idl:
Add new tests for unions (both non-null and nullable) in dictionaries.

* dom/ContainerNode.cpp:
(WebCore::ContainerNode::append):
(WebCore::ContainerNode::prepend):
* dom/ContainerNode.h:
* dom/Node.cpp:
(WebCore::nodeSetPreTransformedFromNodeOrStringVector):
(WebCore::Node::convertNodesOrStringsIntoNode):
(WebCore::Node::before):
(WebCore::Node::after):
(WebCore::Node::replaceWith):
* dom/Node.h:
Add using declaration for NodeOrString and change it to use RefPtr<Node>.

* bindings/js/JSMessageEventCustom.cpp:
(WebCore::handleInitMessageEvent):
* dom/MessageEvent.cpp:
(WebCore::MessageEvent::MessageEvent):
(WebCore::MessageEvent::create):
(WebCore::MessageEvent::initMessageEvent):
(WebCore::MessageEvent::source):
(WebCore::isValidSource): Deleted.
* dom/MessageEvent.h:
* dom/MessageEvent.idl:
* page/DOMWindow.cpp:
(WebCore::PostMessageTimer::event):
Change MessageEvent's source to be a std::experimental::variant<RefPtr<DOMWindow>, RefPtr<MessagePort>>.
For now, we only enforce this on setting, and leave the getter a EventTarget?, but that should not be
observable, and will rectified in subsequent patches.

Source/WTF:

* wtf/Variant.h:
Add missing return statement that was tripping up some compilers.

LayoutTests:

* fast/dom/message-port-deleted-by-accessor.html:
Switch source parameter to null to avoid accidental type error.

* fast/events/constructors/message-event-constructor-expected.txt:
* fast/events/constructors/message-event-constructor.html:
Update test expect a thrown type error, as is now expected, for non-window or MessagePort EventTargets.

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

3 years agoAdd support for reportValidity() on form and form control elements
cdumez@apple.com [Sat, 15 Oct 2016 21:31:59 +0000 (21:31 +0000)]
Add support for reportValidity() on form and form control elements
https://bugs.webkit.org/show_bug.cgi?id=163479

Reviewed by Darin Adler.

LayoutTests/imported/w3c:

Rebaseline several W3C tests now that more checks are passing.

* web-platform-tests/html/dom/interfaces-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-reportValidity-expected.txt:
* web-platform-tests/html/semantics/forms/constraints/form-validation-validate-expected.txt:

Source/WebCore:

Add support for reportValidity() on form and form control elements:
- https://html.spec.whatwg.org/#dom-form-reportvalidity
- https://html.spec.whatwg.org/#dom-cva-reportvalidity

Firefox and Chrome already support this.

Demo: https://googlechrome.github.io/samples/report-validity/

No new tests, rebaselined existing tests.

* html/HTMLButtonElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLFormElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLKeygenElement.idl:
* html/HTMLObjectElement.idl:
* html/HTMLOutputElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTextAreaElement.idl:
Add reportValidity() operation.

* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::checkValidity):

(WebCore::HTMLFormControlElement::reportValidity):
Add implementation for reportValidity() for form control elements.
First, it calls checkValidity() and returns early if there is no
constraint violation. if the JS canceled the 'invalid' event
fired by checkValidity(), then return early as well, as per the
specification. If the element is focusable, we scroll to it,
focus it and show the validation message. Otherwise, we log a
error message to the console. The last part of the behavior
matches what we already did in HTMLFormElement::validateInteractively()
and complies with the behavior in the specification.

(WebCore::HTMLFormControlElement::focusAndShowValidationMessage):
Add utility function to scroll to the form control element, focus
it and show its validation message. This code was moved from
HTMLFormElement::validateInteractively() so that it could be reused
in HTMLFormControlElement::reportValidity().

* html/HTMLFormControlElement.h:
* html/HTMLFormElement.cpp:
(WebCore::HTMLFormElement::validateInteractively):
Move the early abort checks to the existing call site (prepareForSubmission)
so that we can reuse this method for reportValidity().

(WebCore::HTMLFormElement::prepareForSubmission):
Only call validateInteractively() if we really should validate. Those checks
used to be in validateInteractively() but I moved them here so we could more
easily reuse validateInteractively().

(WebCore::HTMLFormElement::checkValidity):
(WebCore::HTMLFormElement::checkInvalidControlsAndCollectUnhandled):
Update Vector type to be a Vector of HTMLFormControlElement given that we
only add HTMLFormControlElement objects to it and that it results it simpler
code.

(WebCore::HTMLFormElement::reportValidity):
Add implementation for reportValidity() for form elements. The
implementation calls our already existing validateInteractively()
method, as per the specification.

* html/HTMLFormElement.h:

* html/HTMLObjectElement.h:
reportValidity() returns true unconditionally for object elements,
similarly to checkValidity().

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

3 years agoSort the project file.
simon.fraser@apple.com [Sat, 15 Oct 2016 21:18:56 +0000 (21:18 +0000)]
Sort the project file.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj:

Source/WebKit2:

* WebKit2.xcodeproj/project.pbxproj:

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

3 years agoImplement serializer = { attribute }
simon.fraser@apple.com [Sat, 15 Oct 2016 21:15:17 +0000 (21:15 +0000)]
Implement serializer = { attribute }
https://bugs.webkit.org/show_bug.cgi?id=163466

Reviewed by Darin Adler.

Fix the code generator to generate code for serializer = { attribute }.
In IDLParser, extend domSerializable with flags for the 'inherit', 'getter' and
'attribute' values (the first two are still unsupported). Fix parseSerializationPattern()
to detect these; it needs to create the domSerializable() now. Basic support
for isSerializableAttribute() is added (primitive types only).

GenerateSerializerFunction is fixed to output code for the serializable attributes
in the order specified in "serializer = {}", as specified in WebIDL.

Removed custom serialization for ClientRect and PerformanceTiming.

Other minor cleanup to always get $interfaceName from $interface->name, and to fix
ObjectConstructor.h to be included as <runtime/ObjectConstructor.h>.

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSBindingsAllInOne.cpp:
* bindings/js/JSClientRectCustom.cpp: Removed.
* bindings/js/JSPerformanceTimingCustom.cpp: Removed.
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
(GenerateSerializerFunction):
* bindings/scripts/IDLParser.pm:
(parseSerializerRest):
(parseSerializationPattern):
(parseSerializationAttributes):
(isSerializableAttribute):
(applyMemberList):
* bindings/scripts/test/JS/JSTestNode.cpp:
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionToJSONCaller):
* bindings/scripts/test/JS/JSTestSerialization.cpp: Added.
* bindings/scripts/test/JS/JSTestSerialization.h: Added.
* bindings/scripts/test/TestObj.idl:
* bindings/scripts/test/TestSerialization.idl: Copied from Source/WebCore/dom/ClientRect.idl.
* dom/ClientRect.idl:
* page/PerformanceTiming.idl:

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

3 years agoAssertion failed under operationToLowerCase with a rope with zero length
sbarati@apple.com [Sat, 15 Oct 2016 20:56:24 +0000 (20:56 +0000)]
Assertion failed under operationToLowerCase with a rope with zero length
https://bugs.webkit.org/show_bug.cgi?id=163314

Reviewed by Mark Lam.

JSTests:

* stress/to-lower-case-intrinsic-on-empty-rope.js: Added.
(assert):
(returnRope.helper):
(returnRope):
(lower):

Source/JavaScriptCore:

There are some ways to get JSC to create empty rope strings. ToLowerCase
inside the DFG/FTL goes to the slow path when the argument is a rope.
operationToLowerCase was calling into a WTF string function that
assumed we are passing it a this value that has non-zero length.
However, we were calling it with a string that did have zero length.
To fix this, we make operationToLowerCase return the empty JSString
if it is going to make a string with zero length.

* dfg/DFGOperations.cpp:
* jsc.cpp:
(GlobalObject::finishCreation):
(functionIsRope):

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

3 years ago[GTK] Restore user agent quirk for Yahoo
mcatanzaro@igalia.com [Sat, 15 Oct 2016 15:04:01 +0000 (15:04 +0000)]
[GTK] Restore user agent quirk for Yahoo
https://bugs.webkit.org/show_bug.cgi?id=163481

Reviewed by Carlos Garcia Campos.

finance.yahoo.com is sending a mobile version in response to our standard user agent.

* platform/gtk/UserAgentGtk.cpp:
(WebCore::urlRequiresMacintoshPlatform):

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

3 years agoSetting HTMLMediaElement.volume to NaN or Inf should throw a TypeError
cdumez@apple.com [Sat, 15 Oct 2016 14:53:23 +0000 (14:53 +0000)]
Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError
https://bugs.webkit.org/show_bug.cgi?id=163472

Reviewed by Sam Weinig.

LayoutTests/imported/w3c:

Rebaseline w3c test now that more checks are passing.

* web-platform-tests/html/semantics/embedded-content/media-elements/volume_nonfinite-expected.txt:

Source/WebCore:

Setting HTMLMediaElement.volume to NaN or Inf should throw a TypeError:
- https://html.spec.whatwg.org/#dom-media-volume

This is because the attribute is of type double (not unrestricted double in the IDL).

Chrome and Firefox agree with the specification. WebKit throws an IndexSizeErr instead.

No new tests, rebaselined existing test.

* html/HTMLMediaElement.idl:

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

3 years agoCounterNode::resetRenderers is so inefficient.
zalan@apple.com [Sat, 15 Oct 2016 14:24:33 +0000 (14:24 +0000)]
CounterNode::resetRenderers is so inefficient.
https://bugs.webkit.org/show_bug.cgi?id=163480

Reviewed by Simon Fraser.

CounterNode::resetRenderers() removes all the associated renderers from this CounterNode
and sets the dirty bit on them.
This patch does all that in a loop, instead of traversing the linked tree on each removal.

No change in functionality.

* rendering/CounterNode.cpp:
(WebCore::CounterNode::CounterNode):
(WebCore::CounterNode::~CounterNode):
(WebCore::CounterNode::nextInPreOrderAfterChildren):
(WebCore::CounterNode::lastDescendant):
(WebCore::CounterNode::addRenderer): These assertions do not seem super useful.
(WebCore::CounterNode::removeRenderer):
(WebCore::CounterNode::resetRenderers):
(WebCore::CounterNode::insertAfter):
(WebCore::CounterNode::removeChild):
* rendering/CounterNode.h:
* rendering/RenderCounter.cpp:
(WebCore::makeCounterNode):
(WebCore::RenderCounter::RenderCounter):
(WebCore::RenderCounter::~RenderCounter):
(WebCore::RenderCounter::originalText):
(WebCore::updateCounters):
(WebCore::RenderCounter::invalidate): Deleted.
* rendering/RenderCounter.h:

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

3 years ago[Modern Media Controls] macOS inline controls
commit-queue@webkit.org [Sat, 15 Oct 2016 09:15:41 +0000 (09:15 +0000)]
[Modern Media Controls] macOS inline controls
https://bugs.webkit.org/show_bug.cgi?id=163444
<rdar://problem/27989473>

Patch by Antoine Quint <graouts@apple.com> on 2016-10-15
Reviewed by Dean Jackson.

Source/WebCore:

Introducing the new MacOSMediaControls and MacOSInlineMediaControls classes. MacOSMediaControls is a MediaControls subclass
that adds specific buttons to the macOS platform and sets the layout traits to be macOS. This class has a new subclass,
MacOSInlineMediaControls, which sets the layout traits to also include inline and implements custom layout to drop
controls as necessary as the width of the controls varies. It also shows the volume slider when the mute button is hovered.

Tests: media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html
       media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor.html
       media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html
       media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html
       media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html
       media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility.html
       media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html
       media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html
       media/modern-media-controls/macos-media-controls/macos-media-controls.html

* Modules/modern-media-controls/controls/macos-inline-media-controls.css: Added.
(.media-controls.mac.inline > .controls-bar):
(.media-controls.mac.inline > .controls-bar > *):
(.media-controls.mac.inline button):
(.media-controls.mac.inline button:active):
(.media-controls.mac.inline > .controls-bar button):
(.media-controls.mac.inline > .controls-bar,):
(.media-controls.mac.inline button.play-pause):
(.media-controls.mac.inline button.skip-back):
(.media-controls.mac.inline .scrubber.slider):
(.media-controls.mac.inline button.mute):
(.media-controls.mac.inline button.airplay):
(.media-controls.mac.inline button.pip):
(.media-controls.mac.inline button.tracks):
(.media-controls.mac.inline button.fullscreen):
(.media-controls.mac.inline .time-label):
(.media-controls.mac.inline .volume-slider-container):
(.media-controls.mac.inline .volume-slider-container:before):
(.media-controls.mac.inline .volume.slider):
* Modules/modern-media-controls/controls/macos-inline-media-controls.js: Added.
(MacOSInlineMediaControls.prototype.layout):
(MacOSInlineMediaControls.prototype.handleEvent):
* Modules/modern-media-controls/controls/macos-media-controls.js: Added.
(MacOSMediaControls):

LayoutTests:

Testing the properties of the new MacOSMediaControls and MacOSInlineMediaControls classes.

* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles-expected.txt: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-buttons-styles.html: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor-expected.txt: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-constructor.html: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles-expected.txt: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-controls-bar-styles.html: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout-expected.txt: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-layout.html: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles-expected.txt: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-time-control-styles.html: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility-expected.txt: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-slider-visibility.html: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles-expected.txt: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-controls-volume-styles.html: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls-expected.txt: Added.
* media/modern-media-controls/macos-inline-media-controls/macos-inline-media-dropping-controls.html: Added.
* media/modern-media-controls/macos-media-controls/macos-media-controls-expected.txt: Added.
* media/modern-media-controls/macos-media-controls/macos-media-controls.html: Added.

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

3 years ago100% CPU on homedepot.com page
antti@apple.com [Sat, 15 Oct 2016 08:27:19 +0000 (08:27 +0000)]
100% CPU on homedepot.com page
https://bugs.webkit.org/show_bug.cgi?id=163452
<rdar://problem/28730708>

Reviewed by Simon Fraser.

Source/WebCore:

The site has a keyframe animation on body. Currently this causes the animation to invalidate the
style of the entire document.

Animations use SyntheticStyleChange to invalidate elements when animation progresses and currently
that causes full subtree invalidation. However animation only ever affect individual elements and
the normal style resolution mechanism should be able to deal with things like inheritance as needed.

Test: fast/animation/animation-style-update-size.html

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

    Testing support.

* style/StyleTreeResolver.cpp:
(WebCore::Style::TreeResolver::resolveElement):

    Don't force subtree style resolution for SyntheticStyleChange.

* style/StyleUpdate.h:
(WebCore::Style::Update::size):
* testing/Internals.cpp:
(WebCore::Internals::lastStyleUpdateSize):
* testing/Internals.h:
* testing/Internals.idl:

LayoutTests:

* fast/animation/animation-style-update-size-expected.txt: Added.
* fast/animation/animation-style-update-size.html: Added.

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

3 years agoWeb Inspector: Cleanup parts of DebuggerManager
joepeck@webkit.org [Sat, 15 Oct 2016 07:22:03 +0000 (07:22 +0000)]
Web Inspector: Cleanup parts of DebuggerManager
https://bugs.webkit.org/show_bug.cgi?id=163400

Reviewed by Timothy Hatcher.

* UserInterface/Controllers/DebuggerManager.js:
(WebInspector.DebuggerManager.restoreBreakpointsSoon):

(WebInspector.DebuggerManager.prototype.get paused):
(WebInspector.DebuggerManager.prototype.get pauseReason):
(WebInspector.DebuggerManager.prototype.get pauseData):
(WebInspector.DebuggerManager.prototype.get callFrames):
(WebInspector.DebuggerManager.prototype.get activeCallFrame):
(WebInspector.DebuggerManager.prototype.set activeCallFrame):
Put simple accessors at the top.

(WebInspector.DebuggerManager.prototype.get allExceptionsBreakpoint):
(WebInspector.DebuggerManager.prototype.get allUncaughtExceptionsBreakpoint):
(WebInspector.DebuggerManager.prototype.get breakpoints):
(WebInspector.DebuggerManager.prototype.breakpointForIdentifier):
(WebInspector.DebuggerManager.prototype.breakpointsForSourceCode):
(WebInspector.DebuggerManager.prototype.isBreakpointRemovable):
(WebInspector.DebuggerManager.prototype.isBreakpointEditable):
(WebInspector.DebuggerManager.prototype.get breakpointsDisabledTemporarily):
Group public breakpoint state and access methods.

(WebInspector.DebuggerManager.prototype.scriptForIdentifier):
(WebInspector.DebuggerManager.prototype.scriptsForURL):
(WebInspector.DebuggerManager.prototype.get searchableScripts):
(WebInspector.DebuggerManager.prototype.get knownNonResourceScripts):
Group public script access methods.

(WebInspector.DebuggerManager.prototype.pause):
(WebInspector.DebuggerManager.prototype.resume):
(WebInspector.DebuggerManager.prototype.stepOver):
(WebInspector.DebuggerManager.prototype.stepInto):
(WebInspector.DebuggerManager.prototype.stepOut):
(WebInspector.DebuggerManager.prototype.continueToLocation):
(WebInspector.DebuggerManager.prototype.addBreakpoint):
(WebInspector.DebuggerManager.prototype.removeBreakpoint):
Group and modernize public methods that perform actions.

(WebInspector.DebuggerManager.prototype.nextBreakpointActionIdentifier):
Misc. methods.

(WebInspector.DebuggerManager.prototype.breakpointResolved):
(WebInspector.DebuggerManager.prototype.reset):
(WebInspector.DebuggerManager.prototype.playBreakpointActionSound):
(WebInspector.DebuggerManager.prototype.scriptDidParse):
(WebInspector.DebuggerManager.prototype._setBreakpoint.didSetBreakpoint):
(WebInspector.DebuggerManager.prototype._setBreakpoint):
(WebInspector.DebuggerManager.prototype._breakpointEditablePropertyDidChange):
(WebInspector.DebuggerManager.prototype._updateBreakOnExceptionsState):
(WebInspector.DebuggerManager.prototype._associateBreakpointsWithSourceCode):
Minor cleanup in protected and private methods.

* UserInterface/Models/BreakpointAction.js:
(WebInspector.BreakpointAction):
Getting the next identifier is an action so it should be a function call.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
Remove unused parameter.

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

3 years agoREGRESSION (r206973): Running "webkit-patch suggest-reviewers" throws an AttributeErr...
simon.fraser@apple.com [Sat, 15 Oct 2016 04:18:19 +0000 (04:18 +0000)]
REGRESSION (r206973): Running "webkit-patch suggest-reviewers" throws an AttributeError: 'NoneType' object has no attribute 'full_name'
https://bugs.webkit.org/show_bug.cgi?id=163478

Reviewed by Daniel Bates.

Handle a None other in Contributor.__eq__.

* Scripts/webkitpy/common/config/committers.py:
(Contributor.__eq__):

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

3 years ago[JSC] op_negate should with any type
commit-queue@webkit.org [Sat, 15 Oct 2016 02:19:16 +0000 (02:19 +0000)]
[JSC] op_negate should with any type
https://bugs.webkit.org/show_bug.cgi?id=162587

Patch by Benjamin Poulain <bpoulain@apple.com> on 2016-10-14
Reviewed by Saam Barati.

JSTests:

* stress/arith-abs-to-arith-negate-range-optimizaton.js: Added.
Cover OSR Exits when converting Math.abs() into ArithNegate.

* stress/arith-negate-on-various-types.js: Added.
Cover ArithNegate with all types.

Source/JavaScriptCore:

* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
ArithNegate is quite simple. If the input is double, the output
is double. The other cases are set from the LLInt slow case.

* dfg/DFGByteCodeParser.cpp:
(JSC::DFG::ByteCodeParser::makeSafe):
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):

* dfg/DFGIntegerRangeOptimizationPhase.cpp:
Tweak a bit the IntegerRangeOptimizationPhase when simplifying
ArithAbs to ArithNegate.
We should not do the conversion if the target nodes OSR Exits
on different input than the source node.

In particular, Checked ArithNegate exits on zero while
ArithAbs has not problem with it.
Unchecked ArithAbs() do not OSR Exit on INT_MIN, ArithNeg
should not either.

* dfg/DFGPredictionPropagationPhase.cpp:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileArithNegate):
(JSC::DFG::SpeculativeJIT::compileMathIC):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::callOperation):
* ftl/FTLLowerDFGToB3.cpp:
(JSC::FTL::DFG::LowerDFGToB3::compileMathIC):
(JSC::FTL::DFG::LowerDFGToB3::compileArithNegate):

* jit/JITNegGenerator.cpp:
(JSC::JITNegGenerator::generateFastPath):
* jit/JITOperations.cpp:
Add result profiling in baseline to have types we can use
in DFG and FTL.

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

3 years agoSetting HTMLMediaElement.muted to the same value should not fire a volume change...
cdumez@apple.com [Sat, 15 Oct 2016 01:48:36 +0000 (01:48 +0000)]
Setting HTMLMediaElement.muted to the same value should not fire a volume change event
https://bugs.webkit.org/show_bug.cgi?id=163474

Reviewed by Eric Carlson.

LayoutTests/imported/w3c:

Rebaseline W3C test now that more checks are passing.

* web-platform-tests/html/semantics/embedded-content/media-elements/event_volumechange-expected.txt:

Source/WebCore:

Setting HTMLMediaElement.muted to the same value should not fire a volume
change event:
- https://html.spec.whatwg.org/#dom-media-muted

Chrome and Firefox agree with the specification.

No new tests, rebaselined existing test.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):

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

3 years agoFix Mac build.
andersca@apple.com [Sat, 15 Oct 2016 00:40:25 +0000 (00:40 +0000)]
Fix Mac build.

* UIProcess/ApplePay/mac/WebPaymentCoordinatorProxyMac.mm:
(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):

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

3 years agoAdd Display P3 ColorSpace
dino@apple.com [Sat, 15 Oct 2016 00:37:45 +0000 (00:37 +0000)]
Add Display P3 ColorSpace
https://bugs.webkit.org/show_bug.cgi?id=162880
<rdar://problem/28598564>

Reviewed by Sam Weinig.

Add a new ColorSpace for Display P3.

This will be tested once the Color class can create
objects that reference other color spaces.

* platform/graphics/ColorSpace.h:
* platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::displayP3ColorSpaceRef):
* platform/graphics/cg/GraphicsContextCG.h:
(WebCore::cachedCGColorSpace):

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

3 years ago[Win][Direct2D] Minor cleanups
bfulgham@apple.com [Sat, 15 Oct 2016 00:37:04 +0000 (00:37 +0000)]
[Win][Direct2D] Minor cleanups
https://bugs.webkit.org/show_bug.cgi?id=162953

Reviewed by Dean Jackson.

Code cleanup. No change in behavior.

* platform/graphics/win/ImageDecoderDirect2D.cpp:
(WebCore::ImageDecoder::frameIsCompleteAtIndex):
(WebCore::ImageDecoder::frameBytesAtIndex):

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

3 years agoFix CMake build.
achristensen@apple.com [Sat, 15 Oct 2016 00:11:24 +0000 (00:11 +0000)]
Fix CMake build.

* PlatformMac.cmake:

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

3 years agoBasic WebAssembly testing
jfbastien@apple.com [Sat, 15 Oct 2016 00:10:31 +0000 (00:10 +0000)]
Basic WebAssembly testing

Create a small DSL in JavaScript which can build WebAssembly binary modules based on the JSON description of the format as described in:
https://github.com/WebAssembly/design/blob/master/BinaryEncoding.md

This DSL can then be used to write small text description of valid and invalid WebAssembly binaries, making testing the JSC implementation much easier.

Details and example in README.md.

Basic WebAssembly testing
https://bugs.webkit.org/show_bug.cgi?id=163267

Reviewed by Keith Miller.

JSTests:

* stress/wasm/wasm.json: Removed.
* wasm.yaml: Added.
* wasm/Builder.js: Added.
(const._isValidValue):
(const._BuildWebAssemblyBinary):
(export.default.Builder):
(export.default.Builder.prototype.setChecked):
(export.default.Builder.prototype.setPreamble):
(export.default.Builder.prototype._registerSectionBuilders.switch.case.string_appeared_here.this.section):
(export.default.Builder.prototype._registerSectionBuilders.this.Unknown):
(export.default.Builder.prototype._registerSectionBuilders):
(export.default.Builder.prototype._addSection):
(export.default.Builder.prototype.optimize):
(export.default.Builder.prototype.json):
(export.default.Builder.prototype.AsmJS):
(export.default.Builder.prototype.WebAssembly):
* wasm/LowLevelBinary.js: Added.
(const._getterRangeCheck):
(const._hexdump):
(export.default.LowLevelBinary):
(export.default.LowLevelBinary.prototype.newPatchable):
(export.default.LowLevelBinary.prototype.hexdump):
(export.default.LowLevelBinary.prototype._maybeGrow):
(export.default.LowLevelBinary.prototype._push8):
(export.default.LowLevelBinary.prototype.uint8):
(export.default.LowLevelBinary.prototype.uint16):
(export.default.LowLevelBinary.prototype.uint32):
(export.default.LowLevelBinary.prototype.varuint):
(export.default.LowLevelBinary.prototype.varint):
(export.default.LowLevelBinary.prototype.varuint7):
(export.default.LowLevelBinary.prototype.string):
(export.default.LowLevelBinary.prototype.getSize):
(export.default.LowLevelBinary.prototype.getUint8):
(export.default.LowLevelBinary.prototype.getUint16):
(export.default.LowLevelBinary.prototype.getUint32):
(export.default.LowLevelBinary.prototype.getVaruint):
(export.default.LowLevelBinary.prototype.getVarint):
(export.default.LowLevelBinary.prototype.getVaruint7):
(export.default.LowLevelBinary.prototype.getString):
(PatchableLowLevelBinary):
(PatchableLowLevelBinary.prototype._push8):
(PatchableLowLevelBinary.prototype.apply):
* wasm/README.md: Added.
* wasm/WASM.js: Added.
* wasm/assert.js: Added.
(export.const.notUndef):
(export.const.eq):
(export.const.ge):
(export.const.throwsError):
(export.const.throwsRangeError):
* wasm/generate-wasmops-header.js: Renamed from JSTests/stress/wasm/generate-wasmops-header.js.
* wasm/self-test/test_BuilderJSON.js: Added.
(const.assertOpThrows):
(EmptyModule):
(CustomMagicNumber):
(CustomVersion):
(CustomSection):
(CustomSectionAllBytes):
(CustomSectionInvalidByte):
(TwoCustomSections):
(EmptyCodeSection):
(CodeSectionWithEmptyFunction):
(CodeSectionWithEmptyFunctionWithParameters):
(InvalidFunctionParameters):
(SimpleFunction):
(TwoSimpleFunctions):
(TwoBuildersAtTheSameTime):
(CheckedOpcodeArgumentsTooMany):
(CheckedOpcodeArgumentsNotEnough):
(CallNoArguments):
(CallInvalid):
(I32ConstInvalid):
(F32ConstInvalid):
(F64ConstInvalid):
(CallManyFromStack):
(OpcodeAdd):
(OpcodeUnreachable):
(OpcodeUnreachableCombinations):
(OpcodeSelect):
* wasm/self-test/test_BuilderWebAssembly.js: Added.
(EmptyModule):
(CustomSection):
(Basic):
* wasm/self-test/test_LowLevelBinary_encode.js: Added.
* wasm/self-test/test_LowLevelBinary_string.js: Added.
* wasm/self-test/test_LowLevelBinary_uint16.js: Added.
* wasm/self-test/test_LowLevelBinary_uint32.js: Added.
* wasm/self-test/test_LowLevelBinary_uint8.js: Added.
* wasm/self-test/test_LowLevelBinary_varint.js: Added.
* wasm/self-test/test_LowLevelBinary_varuint.js: Added.
* wasm/self-test/test_LowLevelBinary_varuint7.js: Added.
* wasm/self-test/test_WASM.js: Added.
* wasm/test.sh: Added.
* wasm/utilities.js: Added.
(const._read.filename.switch):
(const._load.filename.switch):
(const._json.filename.switch):
* wasm/wasm.json: Added.

Tools:

* Scripts/run-javascriptcore-tests:
(runJSCStressTests): run wasm.yaml tests
* Scripts/run-jsc-stress-tests: add a WebAssembly-specific runner

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

3 years agoPass on networking settings to the PKPaymentRequest
andersca@apple.com [Fri, 14 Oct 2016 23:56:00 +0000 (23:56 +0000)]
Pass on networking settings to the PKPaymentRequest
https://bugs.webkit.org/show_bug.cgi?id=163462
rdar://problem/28567629

Reviewed by Dan Bernstein.

Source/WebCore:

Add new SPI.

* platform/spi/cocoa/PassKitSPI.h:

Source/WebKit2:

* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.h:
* UIProcess/ApplePay/cocoa/WebPaymentCoordinatorProxyCocoa.mm:
(WebKit::toPKPaymentRequest):
* UIProcess/ApplePay/ios/WebPaymentCoordinatorProxyIOS.mm:
(WebKit::WebPaymentCoordinatorProxy::platformShowPaymentUI):

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

3 years agoCSS parsing should use Color not RGBA32
dino@apple.com [Fri, 14 Oct 2016 23:37:21 +0000 (23:37 +0000)]
CSS parsing should use Color not RGBA32
https://bugs.webkit.org/show_bug.cgi?id=163423
<rdar://problem/28766903>

Reviewed by Simon Fraser.

Re-landing this after it was rolled out in https://trac.webkit.org/r207342.

In order to allow CSS to use the ExtendedColor variant of
Color, we need to stop using RGBA32. This is a fairly big
change that goes through all the places in the parser
related to colors, and moves them from RGBA32 to Color.

No change in functionality, so covered by existing tests.

* WebCore.xcodeproj/project.pbxproj: Add the new ColorHash.h file.

* css/CSSPrimitiveValue.cpp: CSSPrimitiveValue now can hold a Color*
rather than an unsigned int for colors.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::getRGBColorValue):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
(WebCore::CSSPrimitiveValue::equals):
* css/CSSPrimitiveValue.h: Move to Color* and also use some
nullptrs.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add a new inline
constructor.

* css/CSSValuePool.cpp: Move to Color.
(WebCore::CSSValuePool::CSSValuePool):
(WebCore::CSSValuePool::createColorValue):
* css/CSSValuePool.h: Change the ColorValueCache to a new type.

* css/StyleResolver.cpp: Move to Color.
(WebCore::StyleResolver::colorFromPrimitiveValue):
* css/parser/CSSParser.cpp:
(WebCore::parseColorValue):
(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::parseColorFromString):
(WebCore::CSSParser::parseSystemColor):
(WebCore::fastParseColorInternal):
(WebCore::CSSParser::fastParseColor):
(WebCore::CSSParser::parseColorFromValue):
* css/parser/CSSParser.h:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::fastParseColorInternal):
(WebCore::CSSParserFastPaths::parseColor):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeColor):
* css/parser/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
(WebCore::CSSParser::parseSVGPaint):
(WebCore::CSSParser::parseSVGColor):
* editing/EditingStyle.cpp:
(WebCore::cssValueToColor):
(WebCore::textColorFromStyle):
(WebCore::backgroundColorFromStyle):
(WebCore::rgbaBackgroundColorInEffect):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::isTransparentColorValue):
(WebCore::cssValueToRGBA): Deleted.
* editing/cocoa/HTMLConverter.mm:
(HTMLConverterCaches::colorPropertyValueForNode):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::parseAttribute):
* html/canvas/CanvasGradient.cpp:
(WebCore::CanvasGradient::addColorStop):
* html/canvas/CanvasRenderingContext2D.cpp: Ditto, but leave a FIXME to
remind myself to come back when colorWithOverrideAlpha has been updated.
(WebCore::CanvasRenderingContext2D::setStrokeStyle):
(WebCore::CanvasRenderingContext2D::setFillStyle):
(WebCore::CanvasRenderingContext2D::setShadowColor):
(WebCore::CanvasRenderingContext2D::setShadow):
* html/canvas/CanvasStyle.cpp:
(WebCore::isCurrentColorString):
(WebCore::parseColor):
(WebCore::currentColor):
(WebCore::parseColorOrCurrentColor):
(WebCore::CanvasStyle::createFromString):
(WebCore::CanvasStyle::createFromStringWithOverrideAlpha):
* html/canvas/CanvasStyle.h:
* svg/SVGColor.cpp:
(WebCore::SVGColor::colorFromRGBColorString):

* platform/graphics/Color.h: Add new constructors for the special
empty and deleted Color values used in HashTables.
(WebCore::Color::Color):
(WebCore::Color::isHashTableDeletedValue):
(WebCore::Color::asUint64): New accessor to get the raw uint64_t value.

* platform/graphics/ColorHash.h: Added. Implement the traits for a Color HashTable.
(WTF::ColorHash::hash):
(WTF::ColorHash::equal):
(WTF::HashTraits<WebCore::Color>::emptyValue):
(WTF::HashTraits<WebCore::Color>::constructDeletedValue):
(WTF::HashTraits<WebCore::Color>::isDeletedValue):

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

3 years agoB3 needs a special WasmAddress Opcode
keith_miller@apple.com [Fri, 14 Oct 2016 23:22:07 +0000 (23:22 +0000)]
B3 needs a special WasmAddress Opcode
https://bugs.webkit.org/show_bug.cgi?id=163394

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

This patch adds support for WasmAddress. WasmAddress will be used by
Wasm to compute the address of a memory operation from the pinned
base pointer. WasmAddress takes an IntPtr so we can avoid emitting
unnecessary Move32s in Air. This could happen in the following case:

@ptr = Trunc(...)
WasmAddress(@ptr, pinnedGPR)
...
PatchPoint(...) // Do Wasm call
WasmAddress(@ptr, pinnedGPR)
...

In this case we will not be able to CSE the WasmAddresses since the
call writes to pinnedGPR. Thus if WasmAddress took an Int32 we would need
to emit an extra Move32 at the second WasmAddress to ensure it saw a proper
32-bit value. If Wasm ensures that there there is a leading ZExt32 then
the duplicated moves become unnecessary.

* CMakeLists.txt:
* JavaScriptCore.xcodeproj/project.pbxproj:
* b3/B3LowerToAir.cpp:
(JSC::B3::Air::LowerToAir::effectiveAddr):
(JSC::B3::Air::LowerToAir::lower):
* b3/B3Opcode.cpp:
(WTF::printInternal):
* b3/B3Opcode.h:
* b3/B3Validate.cpp:
* b3/B3Value.cpp:
(JSC::B3::Value::effects):
* b3/B3WasmAddressValue.cpp: Added.
(JSC::B3::WasmAddressValue::~WasmAddressValue):
(JSC::B3::WasmAddressValue::dumpMeta):
(JSC::B3::WasmAddressValue::cloneImpl):
(JSC::B3::WasmAddressValue::WasmAddressValue):
* b3/B3WasmAddressValue.h: Added.
* b3/testb3.cpp:
(JSC::B3::testWasmAddress):
(JSC::B3::run):

Websites/webkit.org:

Update the b3 docs for the new WasmAddress opcode.

* docs/b3/intermediate-representation.html:

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

3 years agoWeb Inspector: Dragging to delete a Breakpoint should never trigger a ContentView...
commit-queue@webkit.org [Fri, 14 Oct 2016 23:10:34 +0000 (23:10 +0000)]
Web Inspector: Dragging to delete a Breakpoint should never trigger a ContentView change
https://bugs.webkit.org/show_bug.cgi?id=163403
<rdar://problem/28762930>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-14
Reviewed by Timothy Hatcher.

* UserInterface/Views/BreakpointTreeElement.js:
(WebInspector.BreakpointTreeElement.prototype.ondelete):
Signal when a breakpoint tree element will be going away because it was
deleted via the keyboard operation within the TreeOutline. This is a dirty
way to do the signal but we remove BreakpointTreeElements asynchronously
when the Breakpoint actually gets removed from the backend.

* UserInterface/Views/DebuggerSidebarPanel.js:
(WebInspector.DebuggerSidebarPanel.prototype._removeDebuggerTreeElement):
Deselect a BreakpointTreeElement if it was deleted in a way other then
the delete keyboard shortcut. This ensures another TreeElement selection
doesn't force ContentView changes.

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

3 years agoWeb Inspector: Improve debugger highlight when inside of getter/setter calls
commit-queue@webkit.org [Fri, 14 Oct 2016 23:04:04 +0000 (23:04 +0000)]
Web Inspector: Improve debugger highlight when inside of getter/setter calls
https://bugs.webkit.org/show_bug.cgi?id=163428
<rdar://problem/28769061>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-14
Reviewed by Timothy Hatcher.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype.textEditorExecutionHighlightRange):
When in the middle of a member expression at a '.' or '[' get the best member
expression range.

* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype._updateExecutionRangeHighlight):
Include the character at the current position. This is useful since AST Nodes
don't give us token info but we would like to know if we are at particular tokens.

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

3 years ago[Win][Direct2D] Implement basic SVG support
bfulgham@apple.com [Fri, 14 Oct 2016 22:42:14 +0000 (22:42 +0000)]
[Win][Direct2D] Implement basic SVG support
https://bugs.webkit.org/show_bug.cgi?id=163349

Reviewed by Brent Fulgham.

Direct2D needs access to the target graphics context when generating bitmap
images so that it can properly match pixel format and other settings.

Add implementations for a number of drawing primitives used in the SVG
test cases. Correct some differences between CG and Direct2D for drawing
different primitives.

No new tests. Tested by existing 'svg' tests.

* platform/graphics/BitmapImage.cpp:
       (WebCore::BitmapImage::frameImageAtIndex): Take optional target graphics
       context. Also pass the graphics context to the image decoder.
       (WebCore::BitmapImage::nativeImage): Accept an optional target context.
       (WebCore::BitmapImage::nativeImageForCurrentFrame): Ditto.
       (WebCore::BitmapImage::draw): Pass target graphics context to the
       'frameImageAtIndex' method.
* platform/graphics/BitmapImage.h:
* platform/graphics/Image.h:
* platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::create): Moved from header. Add create function that
takes an optional GraphicsContext argument.
* platform/graphics/ImageBuffer.h:
* platform/graphics/ImageFrameCache.cpp: Add missing include needed to build
under Direct2D.
* platform/graphics/ImageSource.cpp:
(WebCore::ImageSource::setDecoderTargetContext): Added.
(WebCore::ImageSource::setRenderTarget): Deleted.
* platform/graphics/ImageSource.h:
* platform/graphics/Pattern.h:
* platform/graphics/win/GraphicsContextDirect2D.cpp:
(WebCore::GraphicsContextPlatformPrivate::endDraw): Log error state instead of crashing
each time.
(WebCore::GraphicsContext::drawEllipse): Ellipses are defined in D2D as a center, an
X-radius, and a Y-radius.
(WebCore::GraphicsContext::applyStrokePattern):
(WebCore::GraphicsContext::applyFillPattern):
(WebCore::GraphicsContext::clearRect): Use 'Clear' function if possible. Don't clear
anything if the clear rect is outside the drawing area.
(WebCore::GraphicsContext::strokeRect): Provide implementation (needed by SVG).
(WebCore::GraphicsContext::platformFillEllipse): Ellipses are defined in D2D as
a center, an X-radius, and a Y-radius.
(WebCore::GraphicsContext::platformStrokeEllipse): Ditto.
* platform/graphics/win/ImageBufferDirect2D.cpp:
(WebCore::ImageBuffer::createCompatibleBuffer): Accept optional GraphicsContext argument.
(WebCore::ImageBuffer::ImageBuffer): Ditto.
* platform/graphics/win/ImageDecoderDirect2D.cpp:
(WebCore::ImageDecoder::setTargetContext): Renamed from 'setRenderTarget'.
(WebCore::ImageDecoder::createFrameImageAtIndex): Take optional GraphicsContext argument.
(WebCore::ImageDecoder::setRenderTarget): Deleted.
* platform/graphics/win/ImageDecoderDirect2D.h:
* platform/graphics/win/ImageDirect2D.cpp:
(WebCore::BitmapImage::setRenderTarget): Deleted.
* platform/graphics/win/NativeImageDirect2D.cpp: Add missing include.
* platform/graphics/win/PatternDirect2D.cpp:
(WebCore::Pattern::createPlatformPattern): Revise for new signature.
* rendering/FilterEffectRenderer.cpp:
(WebCore::FilterEffectRenderer::allocateBackingStoreIfNeeded): Pass GraphicsContext
to ImageBuffer constructor.
(WebCore::FilterEffectRendererHelper::beginFilterEffect): Pass target context to
filter when allocating backing store.
* rendering/FilterEffectRenderer.h: Add GraphicsContext as argument to constructor.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::hasFilterThatIsPainting): Supply GraphicsContext argument when
building new FilterEffectRenderer and helper.
(WebCore::RenderLayer::setupFilters): Ditto.
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::nativeImageForCurrentFrame): Revise to take optional GraphicsContext
argument.
(WebCore::SVGImage::nativeImage): Ditto.
* svg/graphics/SVGImage.h:
* svg/graphics/SVGImageForContainer.cpp:
(WebCore::SVGImageForContainer::nativeImageForCurrentFrame): Ditto.
* svg/graphics/SVGImageForContainer.h:

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

3 years agoWeb Inspector: Unused Breakpoint getter/setter for "id" - should be "identifier"
commit-queue@webkit.org [Fri, 14 Oct 2016 22:25:09 +0000 (22:25 +0000)]
Web Inspector: Unused Breakpoint getter/setter for "id" - should be "identifier"
https://bugs.webkit.org/show_bug.cgi?id=163395

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-14
Reviewed by Timothy Hatcher.

* UserInterface/Models/Breakpoint.js:
(WebInspector.Breakpoint.prototype.get identifier): Renamed.
(WebInspector.Breakpoint.prototype.set identifier): Renamed.
The only user is DebuggerManager which sets and gets. Previously
it was unexpectedly setting a direct property on the Breakpoint
instead of using these methods to set the member variable.

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

3 years agoUnreviewed, rolling out r207319.
cdumez@apple.com [Fri, 14 Oct 2016 22:16:34 +0000 (22:16 +0000)]
Unreviewed, rolling out r207319.

Regressed Dromaeo and may have caused crashes under
GuardMalloc (rdar://problem/28780835)

Reverted changeset:

"[Web IDL] Add support for [SameObject] extended attribute"
https://bugs.webkit.org/show_bug.cgi?id=163414
http://trac.webkit.org/changeset/207319

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

3 years agoWeb Inspector: Remove uses of delete in SourceCodeTextEditor
commit-queue@webkit.org [Fri, 14 Oct 2016 22:10:54 +0000 (22:10 +0000)]
Web Inspector: Remove uses of delete in SourceCodeTextEditor
https://bugs.webkit.org/show_bug.cgi?id=163379

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-14
Reviewed by Timothy Hatcher.

Remove uses of delete and better group member variables.
One of the deletes was deleting an incorrect property.

* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor):
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointAdded):
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointRemoved):
(WebInspector.SourceCodeTextEditor.prototype.textEditorBreakpointMoved):
(WebInspector.SourceCodeTextEditor.prototype._tokenTrackingControllerHighlightedMarkedExpression):
(WebInspector.SourceCodeTextEditor.prototype._dismissEditingController):
(WebInspector.SourceCodeTextEditor.prototype.editingControllerDidFinishEditing):

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

3 years agoClean up BackForwardClient
andersca@apple.com [Fri, 14 Oct 2016 18:45:52 +0000 (18:45 +0000)]
Clean up BackForwardClient
https://bugs.webkit.org/show_bug.cgi?id=163454

Reviewed by Sam Weinig.

Source/WebCore:

Remove iOS specific member functions that are only used from WebKit.

* history/BackForwardClient.h:
* loader/EmptyClients.cpp:

Source/WebKit/mac:

* History/BackForwardList.h:
Remove override keywords.

* History/BackForwardList.mm:
(BackForwardList::clearAllPageCaches): Deleted.
Remove this, it's no longer used.

* WebView/WebView.mm:
(-[WebView _clearBackForwardCache]): Deleted.
* WebView/WebViewPrivate.h:
Remove SPI that's no longer used by anyone.

Source/WebKit2:

Remove empty iOS only stubs.

* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebBackForwardListProxy.h:
* WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Removed.

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

3 years ago[CMake] Private/unsupported build options should be marked as advanced
mcatanzaro@igalia.com [Fri, 14 Oct 2016 18:29:16 +0000 (18:29 +0000)]
[CMake] Private/unsupported build options should be marked as advanced
https://bugs.webkit.org/show_bug.cgi?id=163451

Reviewed by Carlos Garcia Campos.

When checking to decide whether to mark an option as advanced, the conditional checks
whether _WEBKIT_AVAILABLE_OPTIONS_IS_PUBLIC_${_name} is defined. It is always defined. We
need to check its value instead.

* Source/cmake/WebKitFeatures.cmake:

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

3 years agoAnnotate bots in contributors.json and don't show them on webkit.org/team
simon.fraser@apple.com [Fri, 14 Oct 2016 18:26:44 +0000 (18:26 +0000)]
Annotate bots in contributors.json and don't show them on webkit.org/team
https://bugs.webkit.org/show_bug.cgi?id=163317

Reviewed by Daniel Bates.

Tools:

Add "class" : "bot" for non-humans in contributors.json and round-trip it.

* Scripts/webkitpy/common/config/committers.py:
(Contributor.__init__):
(Contributor.as_dict):
(Bot):
(Bot.__init__):
(CommitterList.load_json):
* Scripts/webkitpy/common/config/contributors.json:

Websites/webkit.org:

Don't show bots.

* wp-content/themes/webkit/team.php:

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

3 years agoFix printing in WK2 MiniBrowser
simon.fraser@apple.com [Fri, 14 Oct 2016 18:26:40 +0000 (18:26 +0000)]
Fix printing in WK2 MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=163455

Reviewed by Tim Horton.

Call the basic -_printOperationWithPrintInfo: which doens't require a frame argument.

* MiniBrowser/mac/WK2BrowserWindowController.m:
(-[WK2BrowserWindowController printWebView:]):

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

3 years agoEnable Gamepads by default in WK2.
beidson@apple.com [Fri, 14 Oct 2016 18:16:26 +0000 (18:16 +0000)]
Enable Gamepads by default in WK2.
https://bugs.webkit.org/show_bug.cgi?id=163447

Rubberstamped by Sam Weinig.

* Shared/WebPreferencesDefinitions.h:

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

3 years agotest262: @isConstructor incorrectly thinks Math.cos is a constructor
commit-queue@webkit.org [Fri, 14 Oct 2016 18:14:03 +0000 (18:14 +0000)]
test262: @isConstructor incorrectly thinks Math.cos is a constructor
https://bugs.webkit.org/show_bug.cgi?id=163437

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-14
Reviewed by Saam Barati.

JSTests:

* stress/is-constructor.js: Added.
(assert):
(prototype.assert):
New test to cover the @isConstructor builtin.

* test262.yaml:
Test now passes.

Source/JavaScriptCore:

* runtime/JSFunction.cpp:
(JSC::JSFunction::getConstructData):
By default, Host JSFunctions are not constructable. They get
the default callHostFunctionAsConstructor native constructor.
When getting construct data we can return ConstructType::None
in these cases instead of indicating it might be constructable
and later throwing an exception when construction is attempted.

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

3 years agoAdd API to restrict WebKit processes to background priority
barraclough@apple.com [Fri, 14 Oct 2016 18:06:47 +0000 (18:06 +0000)]
Add API to restrict WebKit processes to background priority
https://bugs.webkit.org/show_bug.cgi?id=163363

Reviewed by Anders Carlson.

Add API on _WKProcessPoolConfiguration to flag a process pool as 'alwaysRunsAtBackgroundPriority'.
WebContent and Networking processes associated with that pool will only run a background priority,
when they otherwise would have run at foreground priority.

* UIProcess/API/APIProcessPoolConfiguration.h:
    - Add m_alwaysRunsAtBackgroundPriority flag to pool configuration object.
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration alwaysRunsAtBackgroundPriority]):
(-[_WKProcessPoolConfiguration setAlwaysRunsAtBackgroundPriority:]):
    - Expose new configuration property through API.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::alwaysRunsAtBackgroundPriority):
* UIProcess/Network/NetworkProcessProxy.h:
    - Support ProcessThrottlerClient interface to check if alwaysRunsAtBackgroundPriority is set.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::assertionState):
    - When determining whether to take a foreground exception check alwaysRunsAtBackgroundPriority.
* UIProcess/ProcessThrottlerClient.h:
    - Add interface to access alwaysRunsAtBackgroundPriority state of WebProcess of NetworkProcess.
* UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::WebProcessPool):
* UIProcess/WebProcessPool.h:
    - Add m_alwaysRunsAtBackgroundPriority, set by configuration.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::alwaysRunsAtBackgroundPriority):
* UIProcess/WebProcessProxy.h:
    - Support ProcessThrottlerClient interface to check if alwaysRunsAtBackgroundPriority is set.

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

3 years agoMove BackForwardList from WebCore to WebKitLegacy
andersca@apple.com [Fri, 14 Oct 2016 17:14:39 +0000 (17:14 +0000)]
Move BackForwardList from WebCore to WebKitLegacy
https://bugs.webkit.org/show_bug.cgi?id=163418

Reviewed by Tim Horton.

Source/WebCore:

* CMakeLists.txt:
* WebCore.xcodeproj/project.pbxproj:
* history/BackForwardController.cpp:
(WebCore::BackForwardController::BackForwardController):
* history/BackForwardController.h:
* loader/EmptyClients.cpp:
(WebCore::fillWithEmptyClients):
* page/Page.cpp:
(WebCore::Page::Page):

Source/WebKit:

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

* History/BackForwardList.h: Renamed from Source/WebCore/history/BackForwardList.h.
(BackForwardList::create):
(BackForwardList::webView):
* History/BackForwardList.mm: Renamed from Source/WebCore/history/BackForwardList.cpp.
(BackForwardList::BackForwardList):
(BackForwardList::close):
(BackForwardList::containsItem):
* History/WebBackForwardList.mm:
(kit):
(-[WebBackForwardList initWithBackForwardList:]):
(-[WebBackForwardList setPageCacheSize:]):
(-[WebBackForwardList pageCacheSize]):
* History/WebBackForwardListInternal.h:
* WebCoreSupport/WebFrameLoaderClient.mm:
* WebView/WebFrameView.mm:
* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

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

3 years agoUnreviewed, rolling out r207322.
ryanhaddad@apple.com [Fri, 14 Oct 2016 16:23:42 +0000 (16:23 +0000)]
Unreviewed, rolling out r207322.

This change caused JSC test failures

Reverted changeset:

"Fix Array.prototype.splice ES6 compliance."
https://bugs.webkit.org/show_bug.cgi?id=163372
http://trac.webkit.org/changeset/207322

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

3 years ago[css-grid] Changing the argument on fit-content() doesn't cause the grid to be relayout
rego@igalia.com [Fri, 14 Oct 2016 16:23:18 +0000 (16:23 +0000)]
[css-grid] Changing the argument on fit-content() doesn't cause the grid to be relayout
https://bugs.webkit.org/show_bug.cgi?id=163434

Reviewed by Sergio Villar Senin.

Source/WebCore:

When fit-content() was implemented a new attribute
m_fitContentTrackBreadth was added to GridTrackSize.
However we forgot to include it in the == operator implementation,
so we were missing the changes on that value.

Now if you change the argument of a fit-content() track,
the track size is properly recomputed.

Test: fast/css-grid-layout/grid-change-fit-content-argument.html

* rendering/style/GridTrackSize.h:
(WebCore::GridTrackSize::operator==): Check m_fitContentTrackBreadth.

LayoutTests:

* fast/css-grid-layout/grid-change-fit-content-argument-expected.txt: Added.
* fast/css-grid-layout/grid-change-fit-content-argument.html: Added.

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

3 years agoUnreviewed, rolling out r207317.
ryanhaddad@apple.com [Fri, 14 Oct 2016 16:17:47 +0000 (16:17 +0000)]
Unreviewed, rolling out r207317.
https://bugs.webkit.org/show_bug.cgi?id=163448

This change caused an existing LayoutTest to fail on all
platforms (Requested by ryanhaddad on #webkit).

Reverted changeset:

"CSS parsing should use Color not RGBA32"
https://bugs.webkit.org/show_bug.cgi?id=163423
http://trac.webkit.org/changeset/207317

Patch by Commit Queue <commit-queue@webkit.org> on 2016-10-14

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

3 years agoJSON.parse should not modify frozen objects.
mark.lam@apple.com [Fri, 14 Oct 2016 15:58:16 +0000 (15:58 +0000)]
JSON.parse should not modify frozen objects.
https://bugs.webkit.org/show_bug.cgi?id=163430

Reviewed by Saam Barati.

JSTests:

* stress/json-parse-on-frozen-object.js: Added.

Source/JavaScriptCore:

The ES6 spec for JSON.parse (https://tc39.github.io/ecma262/#sec-json.parse and
https://tc39.github.io/ecma262/#sec-internalizejsonproperty) states that it uses
CreateDataProperty() (https://tc39.github.io/ecma262/#sec-createdataproperty) to
set values returned by a reviver.  The spec for CreateDataPropertyOrThrow states:

"This abstract operation creates a property whose attributes are set to the same
defaults used for properties created by the ECMAScript language assignment
operator. Normally, the property will not already exist. If it does exist and is
not configurable or if O is not extensible, [[DefineOwnProperty]] will return
false."

Note: CreateDataProperty() will not throw a TypeError.

Since the properties of frozen objects are not extensible, not configurable, and
not writeable, JSON.parse should fail to write to any frozen objects.  Similarly,
JSON.parse should fail to delete properties in frozen objects.

In JSON.parse(), we previously write to array elements using the form of
putDirectIndex() that uses mode PutDirectIndexLikePutDirect.  This makes it so
that the write (i.e. put) is always successful.  We've now fixed this to use
PutDirectIndexShouldNotThrow mode instead, which will fail to put the element if
the array is not writeable.

Also changed Walker::walk() to use the version of methodTable() that takes a VM&
since the VM& is already available.

* runtime/JSONObject.cpp:
(JSC::Walker::walk):

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

3 years agoUnreviewed, rolling out r207335.
commit-queue@webkit.org [Fri, 14 Oct 2016 15:39:59 +0000 (15:39 +0000)]
Unreviewed, rolling out r207335.
https://bugs.webkit.org/show_bug.cgi?id=163445

WebKit2.ProvisionalURLAfterWillSendRequestCallback is timing
out on Mac bots (Requested by youenn on #webkit).

Reverted changeset:

"Add ProvisionalURLAfterWillSendRequestCallback.cpp and
ProvisionalURLAfterWillSendRequestCallback_Bundle.cpp to Mac
builds"
https://bugs.webkit.org/show_bug.cgi?id=163440
http://trac.webkit.org/changeset/207335

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

3 years agoShare inline stylesheets between shadow trees
antti@apple.com [Fri, 14 Oct 2016 15:39:04 +0000 (15:39 +0000)]
Share inline stylesheets between shadow trees
https://bugs.webkit.org/show_bug.cgi?id=163353

Reviewed by Ryosuke Niwa and Andreas Kling.

If shadow trees have identical inline stylesheets the data structures can be shared.
In future this will also allow sharing style resolvers.

* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::createInline):

    Move StyleSheetContents construction to the client.

* css/parser/CSSParserMode.h:
(WebCore::CSSParserContextHash::hash):
(WebCore::CSSParserContextHash::equal):
(WTF::HashTraits<WebCore::CSSParserContext>::constructDeletedValue):
(WTF::HashTraits<WebCore::CSSParserContext>::isDeletedValue):
(WTF::HashTraits<WebCore::CSSParserContext>::emptyValue):

    Make CSSParserContext hashable.

* dom/ExtensionStyleSheets.cpp:
(WebCore::createExtensionsStyleSheet):
(WebCore::ExtensionStyleSheets::pageUserSheet):
(WebCore::ExtensionStyleSheets::updateInjectedStyleSheetCache):

    Don't use CSSStyleSheet::createInline, these are not really inline stylesheets.
    Code cleanups.

* dom/InlineStyleSheetOwner.cpp:
(WebCore::parserContextForForElement):
(WebCore::makeInlineStyleSheetCacheKey):
(WebCore::inlineStyleSheetCache):

    Implement a simple cache for sharing stylesheets with identical text and context.

(WebCore::InlineStyleSheetOwner::createSheet):
(WebCore::InlineStyleSheetOwner::clearCache):
* dom/InlineStyleSheetOwner.h:
* platform/MemoryPressureHandler.cpp:
(WebCore::MemoryPressureHandler::releaseNoncriticalMemory):

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

3 years ago[Mac] Allow throttling of background tabs that have media elements with no audible...
cdumez@apple.com [Fri, 14 Oct 2016 14:56:05 +0000 (14:56 +0000)]
[Mac] Allow throttling of background tabs that have media elements with no audible audio
https://bugs.webkit.org/show_bug.cgi?id=163402
<rdar://problem/28056151>

Reviewed by Gavin Barraclough.

Allow throttling of background tabs that have media elements with no audible audio.
We were taking an media assertion from the PageThrottler as soon as there was a
media element playing on the page. This prevented throttling of background tabs
even if those media elements had no audible audio, which was unfortunate.

We now have more fine-grained rules for when HTMLMediaElement should take an
assertion. I also added release logging to help debug such issues in the
future.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::setMuted):
(WebCore::HTMLMediaElement::updateVolume):
(WebCore::HTMLMediaElement::updatePlayState):
(WebCore::HTMLMediaElement::updateAudioAssertionState):
(WebCore::HTMLMediaElement::effectiveMuted): Deleted.
* html/HTMLMediaElement.h:

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

3 years ago[Readable Streams API] Cleanup patch, fix small inconsistencies
commit-queue@webkit.org [Fri, 14 Oct 2016 14:09:45 +0000 (14:09 +0000)]
[Readable Streams API] Cleanup patch, fix small inconsistencies
https://bugs.webkit.org/show_bug.cgi?id=163329

Patch by Romain Bellessort <romain.bellessort@crf.canon.fr> on 2016-10-14
Reviewed by Youenn Fablet.

Cleanup patch, fixed 3 small inconsistences between implementation and spec.

No change in behaviour.

* Modules/streams/ReadableStream.idl: Added optional parameter in getReader.
* Modules/streams/ReadableStreamDefaultController.js:
(error): Call readableStreamDefaultControllerError instead of readableStreamError.
* Modules/streams/ReadableStreamInternals.js: Added missing ASSERT in readableStreamDefaultControllerCallPullIfNeeded.

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

3 years agohttp://trac.webkit.org/changeset/207330 broke Mac Windows build
commit-queue@webkit.org [Fri, 14 Oct 2016 11:47:39 +0000 (11:47 +0000)]
trac.webkit.org/changeset/207330 broke Mac Windows build
https://bugs.webkit.org/show_bug.cgi?id=163442

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-14

* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::toPlatformRequestCachePolicy): Do not explicitly use CFURLRequestCachePolicy enumeration values.

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

3 years agoAdd ProvisionalURLAfterWillSendRequestCallback.cpp and ProvisionalURLAfterWillSendReq...
commit-queue@webkit.org [Fri, 14 Oct 2016 10:23:18 +0000 (10:23 +0000)]
Add ProvisionalURLAfterWillSendRequestCallback.cpp and ProvisionalURLAfterWillSendRequestCallback_Bundle.cpp to Mac builds
https://bugs.webkit.org/show_bug.cgi?id=163440

Unreviewed.

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-14

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Adding new test files introduced in
https://bugs.webkit.org/show_bug.cgi?id=146306 patch.

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

3 years agotest262: Failure with RegExp.prototype.compile when pattern is undefined
commit-queue@webkit.org [Fri, 14 Oct 2016 10:04:42 +0000 (10:04 +0000)]
test262: Failure with RegExp.prototype.compile when pattern is undefined
https://bugs.webkit.org/show_bug.cgi?id=163431

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-14
Reviewed by Yusuke Suzuki.

JSTests:

* test262.yaml:

Source/JavaScriptCore:

If pattern is undefined let P be the empty String.
https://tc39.github.io/ecma262/#sec-regexpinitialize

* runtime/RegExpPrototype.cpp:
(JSC::regExpProtoFuncCompile):

LayoutTests:

* js/regexp-compile-expected.txt:
* js/script-tests/regexp-compile.js:

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

3 years agoREGRESSION (r207299): media/modern-media-controls/pip-button/pip-button.html and...
commit-queue@webkit.org [Fri, 14 Oct 2016 09:49:47 +0000 (09:49 +0000)]
REGRESSION (r207299): media/modern-media-controls/pip-button/pip-button.html and media/modern-media-controls/skip-back-button/skip-back-button.html are flaky
https://bugs.webkit.org/show_bug.cgi?id=163411

Patch by Antoine Quint <graouts@apple.com> on 2016-10-14
Reviewed by Antoine Quint.

Ensure all buttons have their required images loaded before we check on the mask-image set through CSS.

* media/modern-media-controls/aspect-ratio-button/aspect-ratio-button.html:
* media/modern-media-controls/forward-button/forward-button.html:
* media/modern-media-controls/fullscreen-button/fullscreen-button.html:
* media/modern-media-controls/mute-button/mute-button.html:
* media/modern-media-controls/pip-button/pip-button.html:
* media/modern-media-controls/rewind-button/rewind-button.html:
* media/modern-media-controls/skip-back-button/skip-back-button.html:
* media/modern-media-controls/tracks-button/tracks-button.html:

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

3 years ago[Cairo] GraphicsContext3D::ImageExtractor fails to extract images
zandobersek@gmail.com [Fri, 14 Oct 2016 09:17:55 +0000 (09:17 +0000)]
[Cairo] GraphicsContext3D::ImageExtractor fails to extract images
https://bugs.webkit.org/show_bug.cgi?id=163439

Reviewed by Carlos Garcia Campos.

In the Cairo implementation of GraphicsContext3D::ImageExtractor,
don't check for frame completeness at index 0. This information
is now cached only after the frame for that index is decoded and
marked as completed, which is done after this check.

Becuase of this the current check forces extractImage() to return
early and abort WebGL texture uploads from image sources.

This bug was most likely exposed after the refactoring in r206481.
https://trac.webkit.org/changeset/206481

* platform/graphics/cairo/GraphicsContext3DCairo.cpp:
(WebCore::GraphicsContext3D::ImageExtractor::extractImage):

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

3 years agoMediaResourceLoader should use CachedResource::ressourceError to do CORS checks
commit-queue@webkit.org [Fri, 14 Oct 2016 09:04:24 +0000 (09:04 +0000)]
MediaResourceLoader should use CachedResource::ressourceError to do CORS checks
https://bugs.webkit.org/show_bug.cgi?id=163279

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-14
Reviewed by Darin Adler.

Covered by existing tests.

* loader/MediaResourceLoader.cpp:
(WebCore::MediaResource::responseReceived): Making use of CachedResource::ressourceError to detect CORS failures.
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::shouldUpdateCachedResourceWithCurrentRequest): Activating loader options checks
before reusing the resource.
(WebCore::isResourceSuitableForDirectReuse): Disabling direct reuse of MediaResource since reuse of raw
resources does not work yet for media resources.

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

3 years agoMake NetworkCache aware of fetch cache mode
commit-queue@webkit.org [Fri, 14 Oct 2016 08:47:16 +0000 (08:47 +0000)]
Make NetworkCache aware of fetch cache mode
https://bugs.webkit.org/show_bug.cgi?id=163332

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-14
Reviewed by Antti Koivisto.

LayoutTests/imported/w3c:

Splitting web-platform-tests/fetch/api/request/request-cache.html in several files so that running the individual test files
is more manageable.

* web-platform-tests/fetch/api/request/request-cache-default-conditional-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-cache-default-conditional.html: Added.
* web-platform-tests/fetch/api/request/request-cache-default-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-cache-default.html: Added.
* web-platform-tests/fetch/api/request/request-cache-expected.txt: Removed.
* web-platform-tests/fetch/api/request/request-cache-force-cache-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-cache-force-cache.html: Added.
* web-platform-tests/fetch/api/request/request-cache-no-cache-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-cache-no-cache.html: Added.
* web-platform-tests/fetch/api/request/request-cache-no-store-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-cache-no-store.html: Added.
* web-platform-tests/fetch/api/request/request-cache-only-if-cached-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-cache-only-if-cached.html: Added.
* web-platform-tests/fetch/api/request/request-cache-reload-expected.txt: Added.
* web-platform-tests/fetch/api/request/request-cache-reload.html: Added.
* web-platform-tests/fetch/api/request/request-cache.html: Removed.
* web-platform-tests/fetch/api/request/request-cache.js: Added.
(base_path):
(make_url):
(expected_status):
(expected_response_text):
(server_state):
(run_next_step):
(make_test):

Source/WebCore:

Tests: imported/w3c/web-platform-tests/fetch/api/request/request-cache-default-conditional.html
       imported/w3c/web-platform-tests/fetch/api/request/request-cache-default.html
       imported/w3c/web-platform-tests/fetch/api/request/request-cache-force-cache.html
       imported/w3c/web-platform-tests/fetch/api/request/request-cache-no-cache.html
       imported/w3c/web-platform-tests/fetch/api/request/request-cache-no-store.html
       imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached.html
       imported/w3c/web-platform-tests/fetch/api/request/request-cache-reload.html

* loader/cache/CachedResourceLoader.cpp:
(WebCore::updateRequestAccordingCacheMode): Setting request cache policy according cache mode.
Basically, these two are about the same.
(WebCore::CachedResourceLoader::determineRevalidationPolicy): Making use of cache policy instead of cache mode.
* platform/network/ResourceRequestBase.h: Adding new cache policies, aligned with fetch cache modes.
* platform/network/cf/ResourceRequestCFNet.cpp:
(WebCore::toPlatformRequestCachePolicy): If policy is not supported by CFNetwork, fallback to ReloadIgnoringCacheData.
This is the best approximate we might find.
(WebCore::ResourceRequest::doUpdatePlatformHTTPBody):
(WebCore::ResourceRequest::doUpdateResourceRequest): Only updating cache policy, if cache policy is the default.
* platform/network/cf/ResourceRequestCFNet.h:
* platform/network/cocoa/ResourceRequestCocoa.mm: Doing the same modifications as for ResourceRequestCFNet.
(WebCore::ResourceRequest::doUpdateResourceRequest):
(WebCore::toPlatformRequestCachePolicy):
(WebCore::ResourceRequest::doUpdatePlatformRequest):

Source/WebKit2:

Adding explicit serialization of ResourceRequest cachePolicy since it does no longer map to platform request cache policy.

Added support for:
- Bypassing entirely the network cache in case cache mode is NoStore.
- requiring revalidation in case of cache hit and cache mode is NoCache.
- Not using any entry if cache mode is Reload (but cache can still be updated)

Also made sure that the ResourceRequest::cachePolicy remains the same throughout redirections.

* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::canUseCache):
(WebKit::NetworkResourceLoader::retrieveCacheEntry):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::cachePolicyAllowsExpired):
(WebKit::NetworkCache::makeRetrieveDecision):
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):

LayoutTests:

* platform/ios-simulator/TestExpectations:
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-only-if-cached-expected.txt: Added.
* platform/mac-wk1/imported/w3c/web-platform-tests/fetch/api/request/request-cache-reload-expected.txt: Added.
* platform/win/TestExpectations:
* platform/wk2/TestExpectations:

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

3 years agoUncaught Exception: TypeError: this.positionToOffset is not a function - seen hoverin...
commit-queue@webkit.org [Fri, 14 Oct 2016 07:10:00 +0000 (07:10 +0000)]
Uncaught Exception: TypeError: this.positionToOffset is not a function - seen hovering expressions with Type Profiler enabled
https://bugs.webkit.org/show_bug.cgi?id=163405
<rdar://problem/28763953>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-14
Reviewed by Matt Baker.

* UserInterface/Views/SourceCodeTextEditor.js:
Use correct method name, the old one must have gone away.

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

3 years agoBinding generated code for private operations should assert for casted-this checks
commit-queue@webkit.org [Fri, 14 Oct 2016 06:58:28 +0000 (06:58 +0000)]
Binding generated code for private operations should assert for casted-this checks
https://bugs.webkit.org/show_bug.cgi?id=163326

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-13
Reviewed by Darin Adler.

Covered by existing tests.

Private operations are not exposed to user scripts and are only called by built-in scripts or other WebKit-controlled code.
The call sites already ensure that the caller is of the right type so there is no need to do that work twice.

Introducing a casted-this-error Assert mode for casted-this checks, which may be reused for other binding generated code.
Updated binding generator to use that mode for private operations.

* bindings/js/JSDOMBinding.h:
(WebCore::BindingCaller::callPromiseOperation):
(WebCore::BindingCaller::callOperation):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateImplementation):
* bindings/scripts/test/JS/JSTestGlobalObject.cpp:
(WebCore::jsTestGlobalObjectInstanceFunctionTestPrivateFunction):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionPrivateMethod):

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

3 years agoUnreviewed. Removed myself from BindingsScripts watch list.
carlosgc@webkit.org [Fri, 14 Oct 2016 06:31:55 +0000 (06:31 +0000)]
Unreviewed. Removed myself from BindingsScripts watch list.

* Scripts/webkitpy/common/config/watchlist:

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

3 years agoException message for expressions with multiple bracket accesses is inconsistent...
commit-queue@webkit.org [Fri, 14 Oct 2016 06:31:40 +0000 (06:31 +0000)]
Exception message for expressions with multiple bracket accesses is inconsistent / incorrect
https://bugs.webkit.org/show_bug.cgi?id=163426

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-13
Reviewed by Geoffrey Garen.

JSTests:

* ChakraCore/test/Error/CallNonFunction_3.baseline-jsc:
* ChakraCore/test/Object/null.baseline-jsc:
* stress/exception-in-to-property-key-should-be-handled-early.js:
Better exception messages.

LayoutTests/imported/w3c:

* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/endTime-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/id-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/pauseOnExit-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/startTime-expected.txt:
* web-platform-tests/html/semantics/embedded-content/media-elements/interfaces/TextTrackCue/track-expected.txt:
Better expection messages.

Source/JavaScriptCore:

* bytecompiler/NodesCodegen.cpp:
(JSC::BracketAccessorNode::emitBytecode):
It matters where emitExpressionInfo is called since it gathers
info about where we are in the instruction stream. We need to
emit it before the bytecode that we want to associate the data
with. In this case, before the getById / getByVal.

LayoutTests:

* js/exception-expression-offset-expected.txt:
* js/script-tests/exception-expression-offset.js:
(testException):
Correct existing tests and add new tests for multiple and intermixed
dot / bracket accesses.

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

3 years agoWebView and WebPage URLs not updated after URL is modified by InjectedBundlePageResou...
carlosgc@webkit.org [Fri, 14 Oct 2016 06:29:36 +0000 (06:29 +0000)]
WebView and WebPage URLs not updated after URL is modified by InjectedBundlePageResourceLoadClient::willSendRequestForFrame
https://bugs.webkit.org/show_bug.cgi?id=146306

Reviewed by Darin Adler.

Source/WebCore:

Notify about the provisional URL change when new request set for main resource load in DocumentLoader has a
different URL than the previous one.

* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::setRequest):

Tools:

Add unit test to check that the committed URL is updated when changed in willSendRequest callback.

* TestWebKitAPI/CMakeLists.txt:
* TestWebKitAPI/PlatformEfl.cmake:
* TestWebKitAPI/PlatformGTK.cmake:
* TestWebKitAPI/Tests/WebKit2/ProvisionalURLAfterWillSendRequestCallback.cpp: Added.
(TestWebKitAPI::didCommitLoadForFrame):
(TestWebKitAPI::TEST):
* TestWebKitAPI/Tests/WebKit2/ProvisionalURLAfterWillSendRequestCallback_Bundle.cpp: Added.
(TestWebKitAPI::ProvisionalURLAfterWillSendRequestCallbackTest::ProvisionalURLAfterWillSendRequestCallbackTest):
(TestWebKitAPI::ProvisionalURLAfterWillSendRequestCallbackTest::willSendRequestForFrame):
(TestWebKitAPI::ProvisionalURLAfterWillSendRequestCallbackTest::didCommitLoadForFrame):

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

3 years agoUpdate serializer and iterator binding generated code
commit-queue@webkit.org [Fri, 14 Oct 2016 06:19:12 +0000 (06:19 +0000)]
Update serializer and iterator binding generated code
https://bugs.webkit.org/show_bug.cgi?id=163325

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-13
Reviewed by Darin Adler.

No change of behavior.
Covered by existing tests and rebased binding generated code.

Making use of BindingCaller::callOperation within serializer and iterator operations.
Refactored serializer code to use direct attribute getters.

* bindings/js/JSDOMIterator.h:
(WebCore::iteratorCreate):
(WebCore::iteratorForEach):
* bindings/scripts/CodeGeneratorJS.pm:
(GenerateSerializerFunction):
(GenerateImplementationIterableFunctions):
* bindings/scripts/test/JS/JSTestIterable.cpp:
(WebCore::jsTestIterablePrototypeFunctionSymbolIteratorCaller):
(WebCore::jsTestIterablePrototypeFunctionSymbolIterator):
(WebCore::jsTestIterablePrototypeFunctionEntriesCaller):
(WebCore::jsTestIterablePrototypeFunctionEntries):
(WebCore::jsTestIterablePrototypeFunctionKeysCaller):
(WebCore::jsTestIterablePrototypeFunctionKeys):
(WebCore::jsTestIterablePrototypeFunctionValuesCaller):
(WebCore::jsTestIterablePrototypeFunctionValues):
(WebCore::jsTestIterablePrototypeFunctionForEachCaller):
(WebCore::jsTestIterablePrototypeFunctionForEach):
* bindings/scripts/test/JS/JSTestNode.cpp:
(WebCore::jsTestNodePrototypeFunctionSymbolIteratorCaller):
(WebCore::jsTestNodePrototypeFunctionSymbolIterator):
(WebCore::jsTestNodePrototypeFunctionEntriesCaller):
(WebCore::jsTestNodePrototypeFunctionEntries):
(WebCore::jsTestNodePrototypeFunctionKeysCaller):
(WebCore::jsTestNodePrototypeFunctionKeys):
(WebCore::jsTestNodePrototypeFunctionValuesCaller):
(WebCore::jsTestNodePrototypeFunctionValues):
(WebCore::jsTestNodePrototypeFunctionForEachCaller):
(WebCore::jsTestNodePrototypeFunctionForEach):
(WebCore::jsTestNodePrototypeFunctionToJSON):
* bindings/scripts/test/JS/JSTestObj.cpp:
(WebCore::jsTestObjPrototypeFunctionToJSON):

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

3 years agoFix API test after r207318.
achristensen@apple.com [Fri, 14 Oct 2016 05:39:07 +0000 (05:39 +0000)]
Fix API test after r207318.
https://bugs.webkit.org/show_bug.cgi?id=162951

This fixes the API test WebKit2.PendingAPIRequestURL which asserted when trying to hash a null String.

* loader/DocumentLoader.cpp:
(WebCore::isRemoteWebArchive):
If the mimeType is a null String, it is not in the set webArchiveMIMETypes, so return false instead of hashing it.

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

3 years agoFix Array.prototype.splice ES6 compliance.
mark.lam@apple.com [Fri, 14 Oct 2016 05:29:02 +0000 (05:29 +0000)]
Fix Array.prototype.splice ES6 compliance.
https://bugs.webkit.org/show_bug.cgi?id=163372

Reviewed by Geoffrey Garen and Yusuke Suzuki.

JSTests:

* stress/array-splice-on-frozen-object.js: Added.

Source/JavaScriptCore:

Our Array.prototype.splice implementation neglected to set length on the result
array (step 12 of https://tc39.github.io/ecma262/#sec-array.prototype.splice) in
a certain code path.  This is now fixed.

I'm deferring the implementation of step 8 till later because it requires more
careful consideration and the fix is of a lesser value (and therefore, of less
urgency).  See https://bugs.webkit.org/show_bug.cgi?id=163417

Also added some needed exception checks and assertions.

* runtime/ArrayPrototype.cpp:
(JSC::arrayProtoFuncSplice):

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

3 years agoHosts of URLs with non-special schemes should be case-sensitive, and non-ASCII charac...
achristensen@apple.com [Fri, 14 Oct 2016 04:09:33 +0000 (04:09 +0000)]
Hosts of URLs with non-special schemes should be case-sensitive, and non-ASCII characters in such hosts should be punycode-encoded
https://bugs.webkit.org/show_bug.cgi?id=163413

Reviewed by Tim Horton.

LayoutTests/imported/w3c:

* web-platform-tests/url/url-setters-expected.txt:
Update results.  Some more tests are failing, but if my proposal in https://github.com/whatwg/url/issues/148 is accepted,
then these web platform tests will need to be changed.  These web platform tests were also failing with the old URL::parse.

Source/WebCore:

This retains compatibility with the canonicalization Chrome, Firefox, and Safari with uppercase characters
in the hosts of URLs with unrecognized schemes.  Safari treats such characters as the host, while Firefox
and Chrome treat such characters as part of the path, starting with the "//" after the ':'
Behavior of non-ASCII characters is inconsistent, and since we need to have a host, we should punycode-encode
the host to be consistent with special schemes because percent-encoding hosts sometimes is inconsistent.

This solution was proposed to the spec in https://github.com/whatwg/url/issues/148

Covered by updated API and layout tests.

* platform/URLParser.cpp:
(WebCore::URLParser::parse):
(WebCore::URLParser::percentDecode):
(WebCore::URLParser::domainToASCII):
(WebCore::URLParser::hasInvalidDomainCharacter):
(WebCore::URLParser::parseHostAndPort):
(WebCore::URLParser::formURLDecode):
(WebCore::percentDecode): Deleted.
(WebCore::domainToASCII): Deleted.
(WebCore::hasInvalidDomainCharacter): Deleted.
(WebCore::formURLDecode): Deleted.
* platform/URLParser.h:

Tools:

* TestWebKitAPI/Tests/WebCore/URLParser.cpp:
(TestWebKitAPI::TEST_F):
Update parsing results.  There are now fewer differences between the new URLParser and the old URL::parse.

LayoutTests:

* contentfiltering/block-after-add-data-then-allow-unblock-expected.txt:
* contentfiltering/block-after-add-data-then-deny-unblock-expected.txt:
* contentfiltering/block-after-finished-adding-data-then-allow-unblock-expected.txt:
* contentfiltering/block-after-finished-adding-data-then-deny-unblock-expected.txt:
* contentfiltering/block-after-response-then-allow-unblock-expected.txt:
* contentfiltering/block-after-response-then-deny-unblock-expected.txt:
* contentfiltering/block-after-will-send-request-then-allow-unblock-expected.txt:
* contentfiltering/block-after-will-send-request-then-deny-unblock-expected.txt:
* fast/backgrounds/background-shorthand-after-set-backgroundSize-expected.txt:
* fast/backgrounds/background-shorthand-after-set-backgroundSize.html:
* fast/backgrounds/background-shorthand-with-backgroundSize-style-expected.txt:
* fast/backgrounds/background-shorthand-with-backgroundSize-style.html:
* fast/css/getComputedStyle/computed-style-border-image-expected.txt:
* fast/css/getComputedStyle/computed-style-border-image.html:
* fast/css/getComputedStyle/computed-style-cross-fade-expected.txt:
* fast/css/getComputedStyle/computed-style-cross-fade.html:
* fast/css/getComputedStyle/getComputedStyle-background-shorthand-expected.txt:
* fast/css/getComputedStyle/getComputedStyle-background-shorthand.html:
* fast/css/getComputedStyle/getComputedStyle-list-style-shorthand-expected.txt:
* fast/css/getComputedStyle/getComputedStyle-list-style-shorthand.html:
* fast/loader/url-parse-1-expected.txt:
* fast/url/host-lowercase-per-scheme-expected.txt:
* fast/url/safari-extension-expected.txt:
* http/tests/xmlhttprequest/access-control-and-redirects-async-expected.txt:
Update test expectations.  This is how they were before r207162, showing that this change to the URLParser increases compatibility.

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

3 years agoVersioning.
matthew_hanson@apple.com [Fri, 14 Oct 2016 02:58:18 +0000 (02:58 +0000)]
Versioning.

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

3 years ago[Web IDL] Add support for [SameObject] extended attribute
cdumez@apple.com [Fri, 14 Oct 2016 02:50:07 +0000 (02:50 +0000)]
[Web IDL] Add support for [SameObject] extended attribute
https://bugs.webkit.org/show_bug.cgi?id=163414

Reviewed by Darin Adler.

Source/WebCore:

Add support for [SameObject] Web IDL extended attribute:
- https://heycam.github.io/webidl/#SameObject

Start using it on DOM / HTML attributes where the specification
mandates it.

Test: js/dom/SameObject-support.html

* bindings/scripts/CodeGeneratorJS.pm:
(ShouldCacheAttribute):
(GenerateHeader):
(GenerateImplementation):
* bindings/scripts/IDLAttributes.txt:
* dom/DataTransfer.idl:
* dom/Document.idl:
* dom/Element.idl:
* dom/MutationRecord.idl:
* dom/Node.idl:
* dom/NodeIterator.idl:
* dom/ParentNode.idl:
* dom/TreeWalker.idl:
* html/HTMLAnchorElement.idl:
* html/HTMLAreaElement.idl:
* html/HTMLButtonElement.idl:
* html/HTMLDataListElement.idl:
* html/HTMLDocument.idl:
* html/HTMLElement.idl:
* html/HTMLFieldSetElement.idl:
* html/HTMLFormElement.idl:
* html/HTMLIFrameElement.idl:
* html/HTMLInputElement.idl:
* html/HTMLKeygenElement.idl:
* html/HTMLLinkElement.idl:
* html/HTMLMapElement.idl:
* html/HTMLMediaElement.idl:
* html/HTMLMeterElement.idl:
* html/HTMLOutputElement.idl:
* html/HTMLProgressElement.idl:
* html/HTMLSelectElement.idl:
* html/HTMLTableElement.idl:
* html/HTMLTableRowElement.idl:
* html/HTMLTableSectionElement.idl:
* html/HTMLTextAreaElement.idl:
* page/Location.idl:
* page/Navigator.idl:

LayoutTests:

Add layout test coverage.

* js/dom/SameObject-support-expected.txt: Added.
* js/dom/SameObject-support.html: Added.

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

3 years ago[iOS] Support Web Archive previews generated by QuickLook
aestes@apple.com [Fri, 14 Oct 2016 01:14:05 +0000 (01:14 +0000)]
[iOS] Support Web Archive previews generated by QuickLook
https://bugs.webkit.org/show_bug.cgi?id=162951
<rdar://problem/28607920>

Reviewed by Brady Eidson.

QuickLook might generate a Web Archive preview for some resource types, but WebKit would
refuse to load it due to the prohibition on loading remote Web Archives. Even though the
original resource might be from a remote origin, the QuickLook-generated preview is a
trusted local resource, so allow it to be loaded.

No test possible.

* loader/DocumentLoader.cpp:
(WebCore::isRemoteWebArchive): Added. Moved the remote web archive check from
continueAfterContentPolicy() to here, and added a check for responses containing the
QuickLook preview protocol.
(WebCore::DocumentLoader::continueAfterContentPolicy): Called isRemoteWebArchive().

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

3 years agoCSS parsing should use Color not RGBA32
dino@apple.com [Fri, 14 Oct 2016 01:10:30 +0000 (01:10 +0000)]
CSS parsing should use Color not RGBA32
https://bugs.webkit.org/show_bug.cgi?id=163423
<rdar://problem/28766903>

Reviewed by Simon Fraser.

In order to allow CSS to use the ExtendedColor variant of
Color, we need to stop using RGBA32. This is a fairly big
change that goes through all the places in the parser
related to colors, and moves them from RGBA32 to Color.

No change in functionality, so covered by existing tests.

* WebCore.xcodeproj/project.pbxproj: Add the new ColorHash.h file.

* css/CSSPrimitiveValue.cpp: CSSPrimitiveValue now can hold a Color*
rather than an unsigned int for colors.
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
(WebCore::CSSPrimitiveValue::cleanup):
(WebCore::CSSPrimitiveValue::getRGBColorValue):
(WebCore::CSSPrimitiveValue::formatNumberForCustomCSSText):
(WebCore::CSSPrimitiveValue::cloneForCSSOM):
(WebCore::CSSPrimitiveValue::equals):
* css/CSSPrimitiveValue.h: Move to Color* and also use some
nullptrs.
* css/CSSPrimitiveValueMappings.h:
(WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Add a new inline
constructor.

* css/CSSValuePool.cpp: Move to Color.
(WebCore::CSSValuePool::CSSValuePool):
(WebCore::CSSValuePool::createColorValue):
* css/CSSValuePool.h: Change the ColorValueCache to a new type.

* css/StyleResolver.cpp: Move to Color.
(WebCore::StyleResolver::colorFromPrimitiveValue):
* css/parser/CSSParser.cpp:
(WebCore::parseColorValue):
(WebCore::CSSParser::parseColor):
(WebCore::CSSParser::parseColorFromString):
(WebCore::CSSParser::parseSystemColor):
(WebCore::fastParseColorInternal):
(WebCore::CSSParser::fastParseColor):
(WebCore::CSSParser::parseColorFromValue):
* css/parser/CSSParser.h:
* css/parser/CSSParserFastPaths.cpp:
(WebCore::fastParseColorInternal):
(WebCore::CSSParserFastPaths::parseColor):
* css/parser/CSSPropertyParserHelpers.cpp:
(WebCore::CSSPropertyParserHelpers::consumeColor):
* css/parser/SVGCSSParser.cpp:
(WebCore::CSSParser::parseSVGValue):
(WebCore::CSSParser::parseSVGPaint):
(WebCore::CSSParser::parseSVGColor):
* editing/EditingStyle.cpp:
(WebCore::cssValueToColor):
(WebCore::textColorFromStyle):
(WebCore::backgroundColorFromStyle):
(WebCore::rgbaBackgroundColorInEffect):
(WebCore::EditingStyle::prepareToApplyAt):
(WebCore::isTransparentColorValue):
(WebCore::cssValueToRGBA): Deleted.
* editing/cocoa/HTMLConverter.mm:
(HTMLConverterCaches::colorPropertyValueForNode):
* html/HTMLBodyElement.cpp:
(WebCore::HTMLBodyElement::parseAttribute):
* html/canvas/CanvasGradient.cpp:
(WebCore::CanvasGradient::addColorStop):
* html/canvas/CanvasRenderingContext2D.cpp: Ditto, but leave a FIXME to
remind myself to come back when colorWithOverrideAlpha has been updated.
(WebCore::CanvasRenderingContext2D::setStrokeStyle):
(WebCore::CanvasRenderingContext2D::setFillStyle):
(WebCore::CanvasRenderingContext2D::setShadowColor):
(WebCore::CanvasRenderingContext2D::setShadow):
* html/canvas/CanvasStyle.cpp:
(WebCore::isCurrentColorString):
(WebCore::parseColor):
(WebCore::currentColor):
(WebCore::parseColorOrCurrentColor):
(WebCore::CanvasStyle::createFromString):
(WebCore::CanvasStyle::createFromStringWithOverrideAlpha):
* html/canvas/CanvasStyle.h:
* svg/SVGColor.cpp:
(WebCore::SVGColor::colorFromRGBColorString):

* platform/graphics/Color.h: Add new constructors for the special
empty and deleted Color values used in HashTables.
(WebCore::Color::Color):
(WebCore::Color::isHashTableDeletedValue):
(WebCore::Color::asUint64): New accessor to get the raw uint64_t value.

* platform/graphics/ColorHash.h: Added. Implement the traits for a Color HashTable.
(WTF::ColorHash::hash):
(WTF::ColorHash::equal):
(WTF::HashTraits<WebCore::Color>::emptyValue):
(WTF::HashTraits<WebCore::Color>::constructDeletedValue):
(WTF::HashTraits<WebCore::Color>::isDeletedValue):

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

3 years agoRebase API tests after r207305.
achristensen@apple.com [Thu, 13 Oct 2016 23:38:48 +0000 (23:38 +0000)]
Rebase API tests after r207305.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
Actually build Tests/mac/LoadInvalidURLRequest.mm so we are running the WebKit1.LoadInvalidURLRequest API test.
* TestWebKitAPI/Tests/WebKit2Cocoa/LoadInvalidURLRequest.mm:
(-[LoadInvalidURLNavigationActionDelegate webView:didFailProvisionalNavigation:withError:]):
* TestWebKitAPI/Tests/mac/LoadInvalidURLRequest.mm:
(-[LoadInvalidURLWebFrameLoadDelegate webView:didFailProvisionalLoadWithError:forFrame:]):
Change results back to what they were before r207162, r207167, and r207184.

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

3 years agoAX: [Mac] better accessibility support for Summary elements
n_wang@apple.com [Thu, 13 Oct 2016 22:52:17 +0000 (22:52 +0000)]
AX: [Mac] better accessibility support for Summary elements
https://bugs.webkit.org/show_bug.cgi?id=163367
<rdar://problem/28745010>

Reviewed by Chris Fleizach.

Source/WebCore:

Exposed summary elements as AXButton and used the text node's content
as AXTitle. Also exposed the details parent's expanded status on the summary
element, so that users would see it as a collapsed/expanded button.

Changes are covered in the modified tests.

* accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::parentObjectUnignored):
(WebCore::AccessibilityObject::scrollViewAncestor):
(WebCore::AccessibilityObject::headingElementForNode):
(WebCore::AccessibilityObject::matchedParent):
(WebCore::AccessibilityObject::isDescendantOfObject):
(WebCore::AccessibilityObject::isInsideARIALiveRegion):
(WebCore::AccessibilityObject::elementAccessibilityHitTest):
(WebCore::AccessibilityObject::isExpanded):
(WebCore::AccessibilityObject::isARIAHidden):
(WebCore::AccessibilityObject::focusableAncestor):
(WebCore::AccessibilityObject::editableAncestor):
* accessibility/AccessibilityObject.h:
(WebCore::AccessibilityObject::isSummary):
* accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
(-[WebAccessibilityObjectWrapper _accessibilityListAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityLandmarkAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityTableAncestor]):
(-[WebAccessibilityObjectWrapper _accessibilityFieldsetAncestor]):
(-[WebAccessibilityObjectWrapper tableCellParent]):
(-[WebAccessibilityObjectWrapper tableParent]):
(-[WebAccessibilityObjectWrapper convertPointToScreenSpace:]):
(-[WebAccessibilityObjectWrapper convertRectToScreenSpace:]):
(-[WebAccessibilityObjectWrapper detailParentForSummaryObject:]):
(-[WebAccessibilityObjectWrapper detailParentForObject:]):
(matchedParent): Deleted.
* accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
(createAccessibilityRoleMap):
(-[WebAccessibilityObjectWrapper roleDescription]):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):

LayoutTests:

* accessibility/mac/details-summary-expected.txt:
* accessibility/mac/details-summary-role-description-expected.txt:
* accessibility/mac/details-summary-role-description.html:
* accessibility/mac/details-summary.html:

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

3 years agoMarking inspector/debugger/breakpoints/resolved-dump-each-line.html as flaky on mac.
ryanhaddad@apple.com [Thu, 13 Oct 2016 22:25:00 +0000 (22:25 +0000)]
Marking inspector/debugger/breakpoints/resolved-dump-each-line.html as flaky on mac.
https://bugs.webkit.org/show_bug.cgi?id=161951

Unreviewed test gardening.

* platform/mac/TestExpectations:

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

3 years agoWeb Inspector: Stepping highlight for dot/bracket expressions in if statements highli...
commit-queue@webkit.org [Thu, 13 Oct 2016 22:20:22 +0000 (22:20 +0000)]
Web Inspector: Stepping highlight for dot/bracket expressions in if statements highlights subset of the expression
https://bugs.webkit.org/show_bug.cgi?id=163378
<rdar://problem/28749376>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-13
Reviewed by Saam Barati.

Source/JavaScriptCore:

* parser/Parser.cpp:
(JSC::Parser<LexerType>::parseAssignmentExpression):
Since each expression builds on the previous, always keep the starting
location the first location.

LayoutTests:

* inspector/debugger/breakpoints/resolved-dump-all-pause-locations-expected.txt:
* inspector/debugger/breakpoints/resolved-dump-each-line-expected.txt:
* inspector/debugger/breakpoints/resources/dump-general.js:
* inspector/debugger/stepping/stepping-misc-expected.txt:
* inspector/debugger/stepping/stepping-misc.html:
Add tests for these kinds of special cases.

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